diff --git a/dist/quagga.js b/dist/quagga.js
index fae3fde7..fb4e4553 100644
--- a/dist/quagga.js
+++ b/dist/quagga.js
@@ -1,10 +1,10 @@
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory(factory.toString());
+ module.exports = factory(factory.toString()).default;
else if(typeof exports === 'object')
- exports["Quagga"] = factory(factory.toString());
+ exports["Quagga"] = factory(factory.toString()).default;
else
- root["Quagga"] = factory(factory.toString());
+ root["Quagga"] = factory(factory.toString()).default;
})(this, function(__factorySource__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
@@ -15,23 +15,23 @@ return /******/ (function(modules) { // webpackBootstrap
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
+/******/ return installedModules[moduleId].e;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
+/******/ e: {},
+/******/ i: moduleId,
+/******/ l: false
/******/ };
/******/
/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/ modules[moduleId].call(module.e, module, module.e, __webpack_require__);
/******/
/******/ // Flag the module as loaded
-/******/ module.loaded = true;
+/******/ module.l = true;
/******/
/******/ // Return the exports of the module
-/******/ return module.exports;
+/******/ return module.e;
/******/ }
/******/
/******/
@@ -45,1126 +45,1173 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ __webpack_require__.p = "/";
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(0);
+/******/ return __webpack_require__(__webpack_require__.s = 154);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(1);
-
-
-/***/ },
-/* 1 */
-/***/ function(module, exports, __webpack_require__) {
-
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
'use strict';
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var _commonTypedefs = __webpack_require__(2);
+ var logDisabled_ = false;
- var _commonTypedefs2 = _interopRequireDefault(_commonTypedefs);
-
- // eslint-disable-line no-unused-vars
-
- var _commonImage_wrapper = __webpack_require__(3);
+ // Utility methods.
+ var utils = {
+ disableLog: function(bool) {
+ if (typeof bool !== 'boolean') {
+ return new Error('Argument type: ' + typeof bool +
+ '. Please use a boolean.');
+ }
+ logDisabled_ = bool;
+ return (bool) ? 'adapter.js logging disabled' :
+ 'adapter.js logging enabled';
+ },
- var _commonImage_wrapper2 = _interopRequireDefault(_commonImage_wrapper);
+ log: function() {
+ if (typeof window === 'object') {
+ if (logDisabled_) {
+ return;
+ }
+ console.log.apply(console, arguments);
+ }
+ },
+
+ /**
+ * Extract browser version out of the provided user agent string.
+ * @param {!string} uastring userAgent string.
+ * @param {!string} expr Regular expression used as match criteria.
+ * @param {!number} pos position in the version string to be returned.
+ * @return {!number} browser version.
+ */
+ extractVersion: function(uastring, expr, pos) {
+ var match = uastring.match(expr);
+ return match && match.length >= pos && parseInt(match[pos], 10);
+ },
+
+ /**
+ * Browser detector.
+ * @return {object} result containing browser, version and minVersion
+ * properties.
+ */
+ detectBrowser: function() {
+ // Returned result object.
+ var result = {};
+ result.browser = null;
+ result.version = null;
+ result.minVersion = null;
+
+ if (typeof window === 'undefined' || !window.navigator) {
+ result.browser = 'Not a browser.';
+ return result;
+ } else if (navigator.mozGetUserMedia) {
+ // Firefox.
+ result.browser = 'firefox';
+ result.version = this.extractVersion(navigator.userAgent,
+ /Firefox\/([0-9]+)\./, 1);
+ result.minVersion = 31;
+ } else if (navigator.webkitGetUserMedia && window.webkitRTCPeerConnection) {
+ // Chrome, Chromium, WebView, Opera and other WebKit browsers.
+ result.browser = 'chrome';
+ result.version = this.extractVersion(navigator.userAgent,
+ /Chrom(e|ium)\/([0-9]+)\./, 2);
+ result.minVersion = 38;
+ } else if(navigator.mediaDevices &&
+ navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)) {
+ // Edge.
+ result.browser = 'edge';
+ result.version = this.extractVersion(navigator.userAgent,
+ /Edge\/(\d+).(\d+)$/, 2);
+ result.minVersion = 10547;
+ } else {
+ result.browser = 'Not a supported browser.';
+ return result;
+ }
- var _locatorBarcode_locator = __webpack_require__(18);
+ // Warn if version is less than minVersion.
+ if (result.version < result.minVersion) {
+ utils.log('Browser: ' + result.browser + ' Version: ' + result.version +
+ ' < minimum supported version: ' + result.minVersion +
+ '\n some things might not work!');
+ }
- var _locatorBarcode_locator2 = _interopRequireDefault(_locatorBarcode_locator);
+ return result;
+ }
+ };
- var _decoderBarcode_decoder = __webpack_require__(23);
+ // Export.
+ module.e = {
+ log: utils.log,
+ disableLog: utils.disableLog,
+ browserDetails: utils.detectBrowser(),
+ extractVersion: utils.extractVersion
+ };
+
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(module, global) {var checkGlobal = __webpack_require__(104);
- var _decoderBarcode_decoder2 = _interopRequireDefault(_decoderBarcode_decoder);
+ /** Used to determine if values are of the language type `Object`. */
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
- var _commonEvents = __webpack_require__(68);
+ /** Detect free variable `exports`. */
+ var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
+ ? exports
+ : undefined;
- var _commonEvents2 = _interopRequireDefault(_commonEvents);
+ /** Detect free variable `module`. */
+ var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
+ ? module
+ : undefined;
- var _inputCamera_access = __webpack_require__(69);
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
- var _inputCamera_access2 = _interopRequireDefault(_inputCamera_access);
+ /** Detect free variable `self`. */
+ var freeSelf = checkGlobal(objectTypes[typeof self] && self);
- var _commonImage_debug = __webpack_require__(19);
+ /** Detect free variable `window`. */
+ var freeWindow = checkGlobal(objectTypes[typeof window] && window);
- var _commonImage_debug2 = _interopRequireDefault(_commonImage_debug);
+ /** Detect `this` as the global object. */
+ var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
- var _glMatrix = __webpack_require__(7);
+ /**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+ var root = freeGlobal ||
+ ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
+ freeSelf || thisGlobal || Function('return this')();
- var _analyticsResult_collector = __webpack_require__(70);
+ module.e = root;
- var _analyticsResult_collector2 = _interopRequireDefault(_analyticsResult_collector);
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(48)(module), (function() { return this; }())))
+
+/***/ },
+/* 2 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
- var _configConfig = __webpack_require__(71);
+ module.e = isObject;
+
+
+/***/ },
+/* 3 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getNative = __webpack_require__(12),
+ root = __webpack_require__(1);
- var _configConfig2 = _interopRequireDefault(_configConfig);
+ /* Built-in method references that are verified to be native. */
+ var Map = getNative(root, 'Map');
- var _input_stream = __webpack_require__(73);
+ module.e = Map;
+
+
+/***/ },
+/* 4 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @type {Function}
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
- var _input_stream2 = _interopRequireDefault(_input_stream);
+ module.e = isArray;
+
+
+/***/ },
+/* 5 */
+/***/ function(module, exports, __webpack_require__) {
+
+ function BarcodeReader(config) {
+ this._row = [];
+ this.config = config || {};
+ return this;
+ }
- var _frame_grabber = __webpack_require__(75);
+ BarcodeReader.prototype._nextUnset = function (line, start) {
+ var i;
- var _frame_grabber2 = _interopRequireDefault(_frame_grabber);
+ if (start === undefined) {
+ start = 0;
+ }
+ for (i = start; i < line.length; i++) {
+ if (!line[i]) {
+ return i;
+ }
+ }
+ return line.length;
+ };
- var merge = __webpack_require__(35);
+ BarcodeReader.prototype._matchPattern = function (counter, code) {
+ var i,
+ error = 0,
+ singleError = 0,
+ modulo = this.MODULO,
+ maxSingleError = this.SINGLE_CODE_ERROR || 1;
- var _inputStream,
- _framegrabber,
- _stopped,
- _canvasContainer = {
- ctx: {
- image: null,
- overlay: null
- },
- dom: {
- image: null,
- overlay: null
+ for (i = 0; i < counter.length; i++) {
+ singleError = Math.abs(code[i] - counter[i]);
+ if (singleError > maxSingleError) {
+ return Number.MAX_VALUE;
+ }
+ error += singleError;
}
- },
- _inputImageWrapper,
- _boxSize,
- _decoder,
- _workerPool = [],
- _onUIThread = true,
- _resultCollector,
- _config = {};
+ return error / modulo;
+ };
- function initializeData(imageWrapper) {
- initBuffers(imageWrapper);
- _decoder = _decoderBarcode_decoder2['default'].create(_config.decoder, _inputImageWrapper);
- }
+ BarcodeReader.prototype._nextSet = function (line, offset) {
+ var i;
- function initInputStream(cb) {
- var video;
- if (_config.inputStream.type === "VideoStream") {
- video = document.createElement("video");
- _inputStream = _input_stream2['default'].createVideoStream(video);
- } else if (_config.inputStream.type === "ImageStream") {
- _inputStream = _input_stream2['default'].createImageStream();
- } else if (_config.inputStream.type === "LiveStream") {
- var $viewport = getViewPort();
- if ($viewport) {
- video = $viewport.querySelector("video");
- if (!video) {
- video = document.createElement("video");
- $viewport.appendChild(video);
- }
+ offset = offset || 0;
+ for (i = offset; i < line.length; i++) {
+ if (line[i]) {
+ return i;
}
- _inputStream = _input_stream2['default'].createLiveStream(video);
- _inputCamera_access2['default'].request(video, _config.inputStream.constraints, function (err) {
- if (!err) {
- _inputStream.trigger("canrecord");
- } else {
- return cb(err);
- }
- });
}
+ return line.length;
+ };
- _inputStream.setAttribute("preload", "auto");
- _inputStream.setAttribute("autoplay", true);
- _inputStream.setInputStream(_config.inputStream);
- _inputStream.addEventListener("canrecord", canRecord.bind(undefined, cb));
- }
+ BarcodeReader.prototype._normalize = function (counter, modulo) {
+ var i,
+ self = this,
+ sum = 0,
+ ratio,
+ numOnes = 0,
+ normalized = [],
+ norm = 0;
- function getViewPort() {
- var target = _config.inputStream.target;
- // Check if target is already a DOM element
- if (target && target.nodeName && target.nodeType === 1) {
- return target;
+ if (!modulo) {
+ modulo = self.MODULO;
+ }
+ for (i = 0; i < counter.length; i++) {
+ if (counter[i] === 1) {
+ numOnes++;
+ } else {
+ sum += counter[i];
+ }
+ }
+ ratio = sum / (modulo - numOnes);
+ if (ratio > 1.0) {
+ for (i = 0; i < counter.length; i++) {
+ norm = counter[i] === 1 ? counter[i] : counter[i] / ratio;
+ normalized.push(norm);
+ }
} else {
- // Use '#interactive.viewport' as a fallback selector (backwards compatibility)
- var selector = typeof target === 'string' ? target : '#interactive.viewport';
- return document.querySelector(selector);
+ ratio = (sum + numOnes) / modulo;
+ for (i = 0; i < counter.length; i++) {
+ norm = counter[i] / ratio;
+ normalized.push(norm);
+ }
}
- }
+ return normalized;
+ };
- function canRecord(cb) {
- _locatorBarcode_locator2['default'].checkImageConstraints(_inputStream, _config.locator);
- initCanvas(_config);
- _framegrabber = _frame_grabber2['default'].create(_inputStream, _canvasContainer.dom.image);
+ BarcodeReader.prototype._matchTrace = function (cmpCounter, epsilon) {
+ var counter = [],
+ i,
+ self = this,
+ offset = self._nextSet(self._row),
+ isWhite = !self._row[offset],
+ counterPos = 0,
+ bestMatch = {
+ error: Number.MAX_VALUE,
+ code: -1,
+ start: 0
+ },
+ error;
- adjustWorkerPool(_config.numOfWorkers, function () {
- if (_config.numOfWorkers === 0) {
- initializeData();
+ if (cmpCounter) {
+ for (i = 0; i < cmpCounter.length; i++) {
+ counter.push(0);
}
- ready(cb);
- });
- }
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ if (counterPos === counter.length - 1) {
+ error = self._matchPattern(counter, cmpCounter);
- function ready(cb) {
- _inputStream.play();
- cb();
- }
-
- function initCanvas() {
- if (typeof document !== "undefined") {
- var $viewport = getViewPort();
- _canvasContainer.dom.image = document.querySelector("canvas.imgBuffer");
- if (!_canvasContainer.dom.image) {
- _canvasContainer.dom.image = document.createElement("canvas");
- _canvasContainer.dom.image.className = "imgBuffer";
- if ($viewport && _config.inputStream.type === "ImageStream") {
- $viewport.appendChild(_canvasContainer.dom.image);
+ if (error < epsilon) {
+ bestMatch.start = i - offset;
+ bestMatch.end = i;
+ bestMatch.counter = counter;
+ return bestMatch;
+ } else {
+ return null;
+ }
+ } else {
+ counterPos++;
+ }
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
}
}
- _canvasContainer.ctx.image = _canvasContainer.dom.image.getContext("2d");
- _canvasContainer.dom.image.width = _inputStream.getCanvasSize().x;
- _canvasContainer.dom.image.height = _inputStream.getCanvasSize().y;
-
- _canvasContainer.dom.overlay = document.querySelector("canvas.drawingBuffer");
- if (!_canvasContainer.dom.overlay) {
- _canvasContainer.dom.overlay = document.createElement("canvas");
- _canvasContainer.dom.overlay.className = "drawingBuffer";
- if ($viewport) {
- $viewport.appendChild(_canvasContainer.dom.overlay);
- }
- var clearFix = document.createElement("br");
- clearFix.setAttribute("clear", "all");
- if ($viewport) {
- $viewport.appendChild(clearFix);
+ } else {
+ counter.push(0);
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ counterPos++;
+ counter.push(0);
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
}
}
- _canvasContainer.ctx.overlay = _canvasContainer.dom.overlay.getContext("2d");
- _canvasContainer.dom.overlay.width = _inputStream.getCanvasSize().x;
- _canvasContainer.dom.overlay.height = _inputStream.getCanvasSize().y;
}
- }
- function initBuffers(imageWrapper) {
- if (imageWrapper) {
- _inputImageWrapper = imageWrapper;
- } else {
- _inputImageWrapper = new _commonImage_wrapper2['default']({
- x: _inputStream.getWidth(),
- y: _inputStream.getHeight()
- });
- }
+ // if cmpCounter was not given
+ bestMatch.start = offset;
+ bestMatch.end = self._row.length - 1;
+ bestMatch.counter = counter;
+ return bestMatch;
+ };
- if (true) {
- console.log(_inputImageWrapper.size);
- }
- _boxSize = [_glMatrix.vec2.clone([0, 0]), _glMatrix.vec2.clone([0, _inputImageWrapper.size.y]), _glMatrix.vec2.clone([_inputImageWrapper.size.x, _inputImageWrapper.size.y]), _glMatrix.vec2.clone([_inputImageWrapper.size.x, 0])];
- _locatorBarcode_locator2['default'].init(_inputImageWrapper, _config.locator);
- }
+ BarcodeReader.prototype.decodePattern = function (pattern) {
+ var self = this,
+ result;
- function getBoundingBoxes() {
- if (_config.locate) {
- return _locatorBarcode_locator2['default'].locate();
+ self._row = pattern;
+ result = self._decode();
+ if (result === null) {
+ self._row.reverse();
+ result = self._decode();
+ if (result) {
+ result.direction = BarcodeReader.DIRECTION.REVERSE;
+ result.start = self._row.length - result.start;
+ result.end = self._row.length - result.end;
+ }
} else {
- return [[_glMatrix.vec2.clone(_boxSize[0]), _glMatrix.vec2.clone(_boxSize[1]), _glMatrix.vec2.clone(_boxSize[2]), _glMatrix.vec2.clone(_boxSize[3])]];
+ result.direction = BarcodeReader.DIRECTION.FORWARD;
}
- }
-
- function transformResult(result) {
- var topRight = _inputStream.getTopRight(),
- xOffset = topRight.x,
- yOffset = topRight.y,
- i;
-
- if (xOffset === 0 && yOffset === 0) {
- return;
+ if (result) {
+ result.format = self.FORMAT;
}
+ return result;
+ };
- if (result.barcodes) {
- for (i = 0; i < result.barcodes.length; i++) {
- transformResult(result.barcodes[i]);
+ BarcodeReader.prototype._matchRange = function (start, end, value) {
+ var i;
+
+ start = start < 0 ? 0 : start;
+ for (i = start; i < end; i++) {
+ if (this._row[i] !== value) {
+ return false;
}
}
+ return true;
+ };
- if (result.line && result.line.length === 2) {
- moveLine(result.line);
- }
+ BarcodeReader.prototype._fillCounters = function (offset, end, isWhite) {
+ var self = this,
+ counterPos = 0,
+ i,
+ counters = [];
- if (result.box) {
- moveBox(result.box);
- }
+ isWhite = typeof isWhite !== 'undefined' ? isWhite : true;
+ offset = typeof offset !== 'undefined' ? offset : self._nextUnset(self._row);
+ end = end || self._row.length;
- if (result.boxes && result.boxes.length > 0) {
- for (i = 0; i < result.boxes.length; i++) {
- moveBox(result.boxes[i]);
+ counters[counterPos] = 0;
+ for (i = offset; i < end; i++) {
+ if (self._row[i] ^ isWhite) {
+ counters[counterPos]++;
+ } else {
+ counterPos++;
+ counters[counterPos] = 1;
+ isWhite = !isWhite;
}
}
+ return counters;
+ };
- function moveBox(box) {
- var corner = box.length;
+ Object.defineProperty(BarcodeReader.prototype, "FORMAT", {
+ value: 'unknown',
+ writeable: false
+ });
- while (corner--) {
- box[corner][0] += xOffset;
- box[corner][1] += yOffset;
- }
- }
+ BarcodeReader.DIRECTION = {
+ FORWARD: 1,
+ REVERSE: -1
+ };
- function moveLine(line) {
- line[0].x += xOffset;
- line[0].y += yOffset;
- line[1].x += xOffset;
- line[1].y += yOffset;
- }
- }
+ BarcodeReader.Exception = {
+ StartNotFoundException: "Start-Info was not found!",
+ CodeNotFoundException: "Code could not be found!",
+ PatternNotFoundException: "Pattern could not be found!"
+ };
- function addResult(result, imageData) {
- if (!imageData || !_resultCollector) {
- return;
- }
+ BarcodeReader.CONFIG_KEYS = {};
- if (result.barcodes) {
- result.barcodes.filter(function (barcode) {
- return barcode.codeResult;
- }).forEach(function (barcode) {
- return addResult(barcode, imageData);
- });
- } else if (result.codeResult) {
- _resultCollector.addResult(imageData, _inputStream.getCanvasSize(), result.codeResult);
- }
- }
+ /* harmony default export */ exports["a"] = BarcodeReader;
+
+/***/ },
+/* 6 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = clone
- function hasCodeResult(result) {
- return result && (result.barcodes ? result.barcodes.some(function (barcode) {
- return barcode.codeResult;
- }) : result.codeResult);
+ /**
+ * Creates a new vec2 initialized with values from an existing vector
+ *
+ * @param {vec2} a vector to clone
+ * @returns {vec2} a new 2D vector
+ */
+ function clone(a) {
+ var out = new Float32Array(2)
+ out[0] = a[0]
+ out[1] = a[1]
+ return out
}
-
- function publishResult(result, imageData) {
- var resultToPublish = result && (result.barcodes || result);
-
- if (result && _onUIThread) {
- transformResult(result);
- addResult(result, imageData);
- }
-
- _commonEvents2['default'].publish("processed", resultToPublish);
- if (hasCodeResult(result)) {
- _commonEvents2['default'].publish("detected", resultToPublish);
- }
+
+/***/ },
+/* 7 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
}
- function locateAndDecode() {
- var result, boxes;
+ module.e = isObjectLike;
+
+
+/***/ },
+/* 8 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* harmony default export */ exports["a"] = {
+ init: function init(arr, val) {
+ var l = arr.length;
+ while (l--) {
+ arr[l] = val;
+ }
+ },
- boxes = getBoundingBoxes();
- if (boxes) {
- result = _decoder.decodeFromBoundingBoxes(boxes);
- result = result || {};
- result.boxes = boxes;
- publishResult(result, _inputImageWrapper.data);
- } else {
- publishResult();
- }
- }
-
- function update() {
- var availableWorker;
+ /**
+ * Shuffles the content of an array
+ * @return {Array} the array itself shuffled
+ */
+ shuffle: function shuffle(arr) {
+ var i = arr.length - 1,
+ j,
+ x;
+ for (i; i >= 0; i--) {
+ j = Math.floor(Math.random() * i);
+ x = arr[i];
+ arr[i] = arr[j];
+ arr[j] = x;
+ }
+ return arr;
+ },
- if (_onUIThread) {
- if (_workerPool.length > 0) {
- availableWorker = _workerPool.filter(function (workerThread) {
- return !workerThread.busy;
- })[0];
- if (availableWorker) {
- _framegrabber.attachData(availableWorker.imageData);
- } else {
- return; // all workers are busy
- }
- } else {
- _framegrabber.attachData(_inputImageWrapper.data);
- }
- if (_framegrabber.grab()) {
- if (availableWorker) {
- availableWorker.busy = true;
- availableWorker.worker.postMessage({
- cmd: 'process',
- imageData: availableWorker.imageData
- }, [availableWorker.imageData.buffer]);
- } else {
- locateAndDecode();
+ toPointList: function toPointList(arr) {
+ var i,
+ j,
+ row = [],
+ rows = [];
+ for (i = 0; i < arr.length; i++) {
+ row = [];
+ for (j = 0; j < arr[i].length; j++) {
+ row[j] = arr[i][j];
}
+ rows[i] = "[" + row.join(",") + "]";
}
- } else {
- locateAndDecode();
- }
- }
-
- function startContinuousUpdate() {
- var next = null,
- delay = 1000 / (_config.frequency || 60);
+ return "[" + rows.join(",\r\n") + "]";
+ },
- _stopped = false;
- (function frame(timestamp) {
- next = next || timestamp;
- if (!_stopped) {
- if (timestamp >= next) {
- next += delay;
- update();
+ /**
+ * returns the elements which's score is bigger than the threshold
+ * @return {Array} the reduced array
+ */
+ threshold: function threshold(arr, _threshold, scoreFunc) {
+ var i,
+ queue = [];
+ for (i = 0; i < arr.length; i++) {
+ if (scoreFunc.apply(arr, [arr[i]]) >= _threshold) {
+ queue.push(arr[i]);
}
- window.requestAnimFrame(frame);
}
- })(performance.now());
- }
-
- function _start() {
- if (_onUIThread && _config.inputStream.type === "LiveStream") {
- startContinuousUpdate();
- } else {
- update();
- }
- }
-
- function initWorker(cb) {
- var blobURL,
- workerThread = {
- worker: undefined,
- imageData: new Uint8Array(_inputStream.getWidth() * _inputStream.getHeight()),
- busy: true
- };
-
- blobURL = generateWorkerBlob();
- workerThread.worker = new Worker(blobURL);
+ return queue;
+ },
- workerThread.worker.onmessage = function (e) {
- if (e.data.event === 'initialized') {
- URL.revokeObjectURL(blobURL);
- workerThread.busy = false;
- workerThread.imageData = new Uint8Array(e.data.imageData);
- if (true) {
- console.log("Worker initialized");
+ maxIndex: function maxIndex(arr) {
+ var i,
+ max = 0;
+ for (i = 0; i < arr.length; i++) {
+ if (arr[i] > arr[max]) {
+ max = i;
}
- return cb(workerThread);
- } else if (e.data.event === 'processed') {
- workerThread.imageData = new Uint8Array(e.data.imageData);
- workerThread.busy = false;
- publishResult(e.data.result, workerThread.imageData);
- } else if (e.data.event === 'error') {
- if (true) {
- console.log("Worker error: " + e.data.message);
+ }
+ return max;
+ },
+
+ max: function max(arr) {
+ var i,
+ max = 0;
+ for (i = 0; i < arr.length; i++) {
+ if (arr[i] > max) {
+ max = arr[i];
}
}
- };
+ return max;
+ },
- workerThread.worker.postMessage({
- cmd: 'init',
- size: { x: _inputStream.getWidth(), y: _inputStream.getHeight() },
- imageData: workerThread.imageData,
- config: _config
- }, [workerThread.imageData.buffer]);
- }
+ sum: function sum(arr) {
+ var length = arr.length,
+ sum = 0;
- function workerInterface(factory) {
- /* eslint-disable no-undef*/
- if (factory) {
- var Quagga = factory();
- if (!Quagga) {
- self.postMessage({ 'event': 'error', message: 'Quagga could not be created' });
- return;
+ while (length--) {
+ sum += arr[length];
}
+ return sum;
}
- var imageWrapper;
-
- self.onmessage = function (e) {
- if (e.data.cmd === 'init') {
- var config = e.data.config;
- config.numOfWorkers = 0;
- imageWrapper = new Quagga.ImageWrapper({
- x: e.data.size.x,
- y: e.data.size.y
- }, new Uint8Array(e.data.imageData));
- Quagga.init(config, ready, imageWrapper);
- Quagga.onProcessed(onProcessed);
- } else if (e.data.cmd === 'process') {
- imageWrapper.data = new Uint8Array(e.data.imageData);
- Quagga.start();
- } else if (e.data.cmd === 'setReaders') {
- Quagga.setReaders(e.data.readers);
+ };
+
+/***/ },
+/* 9 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* harmony default export */ exports["a"] = {
+ drawRect: function drawRect(pos, size, ctx, style) {
+ ctx.strokeStyle = style.color;
+ ctx.fillStyle = style.color;
+ ctx.lineWidth = 1;
+ ctx.beginPath();
+ ctx.strokeRect(pos.x, pos.y, size.x, size.y);
+ },
+ drawPath: function drawPath(path, def, ctx, style) {
+ ctx.strokeStyle = style.color;
+ ctx.fillStyle = style.color;
+ ctx.lineWidth = style.lineWidth;
+ ctx.beginPath();
+ ctx.moveTo(path[0][def.x], path[0][def.y]);
+ for (var j = 1; j < path.length; j++) {
+ ctx.lineTo(path[j][def.x], path[j][def.y]);
}
- };
+ ctx.closePath();
+ ctx.stroke();
+ },
+ drawImage: function drawImage(imageData, size, ctx) {
+ var canvasData = ctx.getImageData(0, 0, size.x, size.y),
+ data = canvasData.data,
+ imageDataPos = imageData.length,
+ canvasDataPos = data.length,
+ value;
- function onProcessed(result) {
- self.postMessage({
- 'event': 'processed',
- imageData: imageWrapper.data,
- result: result
- }, [imageWrapper.data.buffer]);
+ if (canvasDataPos / imageDataPos !== 4) {
+ return false;
+ }
+ while (imageDataPos--) {
+ value = imageData[imageDataPos];
+ data[--canvasDataPos] = 255;
+ data[--canvasDataPos] = value;
+ data[--canvasDataPos] = value;
+ data[--canvasDataPos] = value;
+ }
+ ctx.putImageData(canvasData, 0, 0);
+ return true;
}
+ };
+
+/***/ },
+/* 10 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__barcode_reader__ = __webpack_require__(5);
- function ready() {
- // eslint-disable-line
- self.postMessage({ 'event': 'initialized', imageData: imageWrapper.data }, [imageWrapper.data.buffer]);
- }
- /* eslint-enable */
+ function EANReader(opts) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__barcode_reader__["a"].call(this, opts);
}
- function generateWorkerBlob() {
- var blob, factorySource;
-
- /* jshint ignore:start */
- if (typeof __factorySource__ !== 'undefined') {
- factorySource = __factorySource__; // eslint-disable-line no-undef
- }
- /* jshint ignore:end */
+ var properties = {
+ CODE_L_START: { value: 0 },
+ MODULO: { value: 7 },
+ CODE_G_START: { value: 10 },
+ START_PATTERN: { value: [1 / 3 * 7, 1 / 3 * 7, 1 / 3 * 7] },
+ STOP_PATTERN: { value: [1 / 3 * 7, 1 / 3 * 7, 1 / 3 * 7] },
+ MIDDLE_PATTERN: { value: [1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7] },
+ CODE_PATTERN: { value: [[3, 2, 1, 1], [2, 2, 2, 1], [2, 1, 2, 2], [1, 4, 1, 1], [1, 1, 3, 2], [1, 2, 3, 1], [1, 1, 1, 4], [1, 3, 1, 2], [1, 2, 1, 3], [3, 1, 1, 2], [1, 1, 2, 3], [1, 2, 2, 2], [2, 2, 1, 2], [1, 1, 4, 1], [2, 3, 1, 1], [1, 3, 2, 1], [4, 1, 1, 1], [2, 1, 3, 1], [3, 1, 2, 1], [2, 1, 1, 3]] },
+ CODE_FREQUENCY: { value: [0, 11, 13, 14, 19, 25, 28, 21, 22, 26] },
+ SINGLE_CODE_ERROR: { value: 0.67 },
+ AVG_CODE_ERROR: { value: 0.27 },
+ FORMAT: { value: "ean_13", writeable: false }
+ };
- blob = new Blob(['(' + workerInterface.toString() + ')(' + factorySource + ');'], { type: 'text/javascript' });
+ EANReader.prototype = Object.create(/* harmony import */__WEBPACK_IMPORTED_MODULE_0__barcode_reader__["a"].prototype, properties);
+ EANReader.prototype.constructor = EANReader;
- return window.URL.createObjectURL(blob);
- }
+ EANReader.prototype._decodeCode = function (start, coderange) {
+ var counter = [0, 0, 0, 0],
+ i,
+ self = this,
+ offset = start,
+ isWhite = !self._row[offset],
+ counterPos = 0,
+ bestMatch = {
+ error: Number.MAX_VALUE,
+ code: -1,
+ start: start,
+ end: start
+ },
+ code,
+ error,
+ normalized;
- function _setReaders(readers) {
- if (_decoder) {
- _decoder.setReaders(readers);
- } else if (_onUIThread && _workerPool.length > 0) {
- _workerPool.forEach(function (workerThread) {
- workerThread.worker.postMessage({ cmd: 'setReaders', readers: readers });
- });
+ if (!coderange) {
+ coderange = self.CODE_PATTERN.length;
}
- }
- function adjustWorkerPool(capacity, cb) {
- var increaseBy = capacity - _workerPool.length;
- if (increaseBy === 0) {
- return cb && cb();
- }
- if (increaseBy < 0) {
- var workersToTerminate = _workerPool.slice(increaseBy);
- workersToTerminate.forEach(function (workerThread) {
- workerThread.worker.terminate();
- if (true) {
- console.log("Worker terminated!");
- }
- });
- _workerPool = _workerPool.slice(0, increaseBy);
- return cb && cb();
- } else {
- var workerInitialized = function workerInitialized(workerThread) {
- _workerPool.push(workerThread);
- if (_workerPool.length >= capacity) {
- cb && cb();
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ if (counterPos === counter.length - 1) {
+ normalized = self._normalize(counter);
+ if (normalized) {
+ for (code = 0; code < coderange; code++) {
+ error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
+ if (error < bestMatch.error) {
+ bestMatch.code = code;
+ bestMatch.error = error;
+ }
+ }
+ bestMatch.end = i;
+ if (bestMatch.error > self.AVG_CODE_ERROR) {
+ return null;
+ }
+ return bestMatch;
+ }
+ } else {
+ counterPos++;
}
- };
-
- for (var i = 0; i < increaseBy; i++) {
- initWorker(workerInitialized);
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
}
}
- }
+ return null;
+ };
- exports['default'] = {
- init: function init(config, cb, imageWrapper) {
- _config = merge({}, _configConfig2['default'], config);
- if (imageWrapper) {
- _onUIThread = false;
- initializeData(imageWrapper);
- return cb();
- } else {
- initInputStream(cb);
- }
- },
- start: function start() {
- _start();
- },
- stop: function stop() {
- _stopped = true;
- adjustWorkerPool(0);
- if (_config.inputStream.type === "LiveStream") {
- _inputCamera_access2['default'].release();
- _inputStream.clearEventHandlers();
- }
- },
- pause: function pause() {
- _stopped = true;
- },
- onDetected: function onDetected(callback) {
- _commonEvents2['default'].subscribe("detected", callback);
- },
- offDetected: function offDetected(callback) {
- _commonEvents2['default'].unsubscribe("detected", callback);
- },
- onProcessed: function onProcessed(callback) {
- _commonEvents2['default'].subscribe("processed", callback);
- },
- offProcessed: function offProcessed(callback) {
- _commonEvents2['default'].unsubscribe("processed", callback);
- },
- setReaders: function setReaders(readers) {
- _setReaders(readers);
- },
- registerResultCollector: function registerResultCollector(resultCollector) {
- if (resultCollector && typeof resultCollector.addResult === 'function') {
- _resultCollector = resultCollector;
- }
- },
- canvas: _canvasContainer,
- decodeSingle: function decodeSingle(config, resultCallback) {
- config = merge({
- inputStream: {
- type: "ImageStream",
- sequence: false,
- size: 800,
- src: config.src
- },
- numOfWorkers: (true) && config.debug ? 0 : 1,
- locator: {
- halfSample: false
- }
- }, config);
- this.init(config, function () {
- _commonEvents2['default'].once("processed", function (result) {
- _stopped = true;
- resultCallback.call(null, result);
- }, true);
- _start();
- });
+ EANReader.prototype._findPattern = function (pattern, offset, isWhite, tryHarder, epsilon) {
+ var counter = [],
+ self = this,
+ i,
+ counterPos = 0,
+ bestMatch = {
+ error: Number.MAX_VALUE,
+ code: -1,
+ start: 0,
+ end: 0
},
- ImageWrapper: _commonImage_wrapper2['default'],
- ImageDebug: _commonImage_debug2['default'],
- ResultCollector: _analyticsResult_collector2['default']
- };
- module.exports = exports['default'];
-
-/***/ },
-/* 2 */
-/***/ function(module, exports) {
-
- /*
- * typedefs.js
- * Normalizes browser-specific prefixes
- */
+ error,
+ j,
+ sum,
+ normalized;
- 'use strict';
+ if (!offset) {
+ offset = self._nextSet(self._row);
+ }
- if (typeof window !== 'undefined') {
- window.requestAnimFrame = (function () {
- return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function ( /* function FrameRequestCallback */callback) {
- window.setTimeout(callback, 1000 / 60);
- };
- })();
+ if (isWhite === undefined) {
+ isWhite = false;
+ }
- navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
- window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
- }
- Math.imul = Math.imul || function (a, b) {
- var ah = a >>> 16 & 0xffff,
- al = a & 0xffff,
- bh = b >>> 16 & 0xffff,
- bl = b & 0xffff;
- // the shift by 0 fixes the sign on the high part
- // the final |0 converts the unsigned value into a signed value
- return al * bl + (ah * bl + al * bh << 16 >>> 0) | 0;
- };
-
-/***/ },
-/* 3 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
+ if (tryHarder === undefined) {
+ tryHarder = true;
+ }
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
+ if (epsilon === undefined) {
+ epsilon = self.AVG_CODE_ERROR;
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ for (i = 0; i < pattern.length; i++) {
+ counter[i] = 0;
+ }
- var _subImage = __webpack_require__(4);
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ if (counterPos === counter.length - 1) {
+ sum = 0;
+ for (j = 0; j < counter.length; j++) {
+ sum += counter[j];
+ }
+ normalized = self._normalize(counter);
+ if (normalized) {
+ error = self._matchPattern(normalized, pattern);
- var _subImage2 = _interopRequireDefault(_subImage);
+ if (error < epsilon) {
+ bestMatch.error = error;
+ bestMatch.start = i - sum;
+ bestMatch.end = i;
+ return bestMatch;
+ }
+ }
+ if (tryHarder) {
+ for (j = 0; j < counter.length - 2; j++) {
+ counter[j] = counter[j + 2];
+ }
+ counter[counter.length - 2] = 0;
+ counter[counter.length - 1] = 0;
+ counterPos--;
+ } else {
+ return null;
+ }
+ } else {
+ counterPos++;
+ }
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
+ }
+ }
+ return null;
+ };
- var _commonCv_utils = __webpack_require__(5);
+ EANReader.prototype._findStart = function () {
+ var self = this,
+ leadingWhitespaceStart,
+ offset = self._nextSet(self._row),
+ startInfo;
- var _commonCv_utils2 = _interopRequireDefault(_commonCv_utils);
+ while (!startInfo) {
+ startInfo = self._findPattern(self.START_PATTERN, offset);
+ if (!startInfo) {
+ return null;
+ }
+ leadingWhitespaceStart = startInfo.start - (startInfo.end - startInfo.start);
+ if (leadingWhitespaceStart >= 0) {
+ if (self._matchRange(leadingWhitespaceStart, startInfo.start, 0)) {
+ return startInfo;
+ }
+ }
+ offset = startInfo.end;
+ startInfo = null;
+ }
+ };
- var _commonArray_helper = __webpack_require__(17);
+ EANReader.prototype._verifyTrailingWhitespace = function (endInfo) {
+ var self = this,
+ trailingWhitespaceEnd;
- var _commonArray_helper2 = _interopRequireDefault(_commonArray_helper);
-
- var _glMatrix = __webpack_require__(7);
-
- /**
- * Represents a basic image combining the data and size.
- * In addition, some methods for manipulation are contained.
- * @param size {x,y} The size of the image in pixel
- * @param data {Array} If given, a flat array containing the pixel data
- * @param ArrayType {Type} If given, the desired DataType of the Array (may be typed/non-typed)
- * @param initialize {Boolean} Indicating if the array should be initialized on creation.
- * @returns {ImageWrapper}
- */
- function ImageWrapper(size, data, ArrayType, initialize) {
- if (!data) {
- if (ArrayType) {
- this.data = new ArrayType(size.x * size.y);
- if (ArrayType === Array && initialize) {
- _commonArray_helper2['default'].init(this.data, 0);
- }
- } else {
- this.data = new Uint8Array(size.x * size.y);
- if (Uint8Array === Array && initialize) {
- _commonArray_helper2['default'].init(this.data, 0);
- }
+ trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start);
+ if (trailingWhitespaceEnd < self._row.length) {
+ if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
+ return endInfo;
}
- } else {
- this.data = data;
}
- this.size = size;
- }
-
- /**
- * tests if a position is within the image with a given offset
- * @param imgRef {x, y} The location to test
- * @param border Number the padding value in pixel
- * @returns {Boolean} true if location inside the image's border, false otherwise
- * @see cvd/image.h
- */
- ImageWrapper.prototype.inImageWithBorder = function (imgRef, border) {
- return imgRef.x >= border && imgRef.y >= border && imgRef.x < this.size.x - border && imgRef.y < this.size.y - border;
+ return null;
};
- /**
- * Performs bilinear sampling
- * @param inImg Image to extract sample from
- * @param x the x-coordinate
- * @param y the y-coordinate
- * @returns the sampled value
- * @see cvd/vision.h
- */
- ImageWrapper.sample = function (inImg, x, y) {
- var lx = Math.floor(x);
- var ly = Math.floor(y);
- var w = inImg.size.x;
- var base = ly * inImg.size.x + lx;
- var a = inImg.data[base + 0];
- var b = inImg.data[base + 1];
- var c = inImg.data[base + w];
- var d = inImg.data[base + w + 1];
- var e = a - b;
- x -= lx;
- y -= ly;
-
- var result = Math.floor(x * (y * (e - c + d) - e) + y * (c - a) + a);
- return result;
- };
+ EANReader.prototype._findEnd = function (offset, isWhite) {
+ var self = this,
+ endInfo = self._findPattern(self.STOP_PATTERN, offset, isWhite, false);
- /**
- * Initializes a given array. Sets each element to zero.
- * @param array {Array} The array to initialize
- */
- ImageWrapper.clearArray = function (array) {
- var l = array.length;
- while (l--) {
- array[l] = 0;
- }
+ return endInfo !== null ? self._verifyTrailingWhitespace(endInfo) : null;
};
- /**
- * Creates a {SubImage} from the current image ({this}).
- * @param from {ImageRef} The position where to start the {SubImage} from. (top-left corner)
- * @param size {ImageRef} The size of the resulting image
- * @returns {SubImage} A shared part of the original image
- */
- ImageWrapper.prototype.subImage = function (from, size) {
- return new _subImage2['default'](from, size, this);
- };
+ EANReader.prototype._calculateFirstDigit = function (codeFrequency) {
+ var i,
+ self = this;
- /**
- * Creates an {ImageWrapper) and copies the needed underlying image-data area
- * @param imageWrapper {ImageWrapper} The target {ImageWrapper} where the data should be copied
- * @param from {ImageRef} The location where to copy from (top-left location)
- */
- ImageWrapper.prototype.subImageAsCopy = function (imageWrapper, from) {
- var sizeY = imageWrapper.size.y,
- sizeX = imageWrapper.size.x;
- var x, y;
- for (x = 0; x < sizeX; x++) {
- for (y = 0; y < sizeY; y++) {
- imageWrapper.data[y * sizeX + x] = this.data[(from.y + y) * this.size.x + from.x + x];
+ for (i = 0; i < self.CODE_FREQUENCY.length; i++) {
+ if (codeFrequency === self.CODE_FREQUENCY[i]) {
+ return i;
}
}
+ return null;
};
- ImageWrapper.prototype.copyTo = function (imageWrapper) {
- var length = this.data.length,
- srcData = this.data,
- dstData = imageWrapper.data;
+ EANReader.prototype._decodePayload = function (code, result, decodedCodes) {
+ var i,
+ self = this,
+ codeFrequency = 0x0,
+ firstDigit;
- while (length--) {
- dstData[length] = srcData[length];
+ for (i = 0; i < 6; i++) {
+ code = self._decodeCode(code.end);
+ if (!code) {
+ return null;
+ }
+ if (code.code >= self.CODE_G_START) {
+ code.code = code.code - self.CODE_G_START;
+ codeFrequency |= 1 << 5 - i;
+ } else {
+ codeFrequency |= 0 << 5 - i;
+ }
+ result.push(code.code);
+ decodedCodes.push(code);
}
- };
- /**
- * Retrieves a given pixel position from the image
- * @param x {Number} The x-position
- * @param y {Number} The y-position
- * @returns {Number} The grayscale value at the pixel-position
- */
- ImageWrapper.prototype.get = function (x, y) {
- return this.data[y * this.size.x + x];
- };
+ firstDigit = self._calculateFirstDigit(codeFrequency);
+ if (firstDigit === null) {
+ return null;
+ }
+ result.unshift(firstDigit);
- /**
- * Retrieves a given pixel position from the image
- * @param x {Number} The x-position
- * @param y {Number} The y-position
- * @returns {Number} The grayscale value at the pixel-position
- */
- ImageWrapper.prototype.getSafe = function (x, y) {
- var i;
+ code = self._findPattern(self.MIDDLE_PATTERN, code.end, true, false);
+ if (code === null) {
+ return null;
+ }
+ decodedCodes.push(code);
- if (!this.indexMapping) {
- this.indexMapping = {
- x: [],
- y: []
- };
- for (i = 0; i < this.size.x; i++) {
- this.indexMapping.x[i] = i;
- this.indexMapping.x[i + this.size.x] = i;
- }
- for (i = 0; i < this.size.y; i++) {
- this.indexMapping.y[i] = i;
- this.indexMapping.y[i + this.size.y] = i;
+ for (i = 0; i < 6; i++) {
+ code = self._decodeCode(code.end, self.CODE_G_START);
+ if (!code) {
+ return null;
}
+ decodedCodes.push(code);
+ result.push(code.code);
}
- return this.data[this.indexMapping.y[y + this.size.y] * this.size.x + this.indexMapping.x[x + this.size.x]];
- };
- /**
- * Sets a given pixel position in the image
- * @param x {Number} The x-position
- * @param y {Number} The y-position
- * @param value {Number} The grayscale value to set
- * @returns {ImageWrapper} The Image itself (for possible chaining)
- */
- ImageWrapper.prototype.set = function (x, y, value) {
- this.data[y * this.size.x + x] = value;
- return this;
+ return code;
};
- /**
- * Sets the border of the image (1 pixel) to zero
- */
- ImageWrapper.prototype.zeroBorder = function () {
- var i,
- width = this.size.x,
- height = this.size.y,
- data = this.data;
- for (i = 0; i < width; i++) {
- data[i] = data[(height - 1) * width + i] = 0;
+ EANReader.prototype._decode = function () {
+ var startInfo,
+ self = this,
+ code,
+ result = [],
+ decodedCodes = [];
+
+ startInfo = self._findStart();
+ if (!startInfo) {
+ return null;
}
- for (i = 1; i < height - 1; i++) {
- data[i * width] = data[i * width + (width - 1)] = 0;
+ code = {
+ code: startInfo.code,
+ start: startInfo.start,
+ end: startInfo.end
+ };
+ decodedCodes.push(code);
+ code = self._decodePayload(code, result, decodedCodes);
+ if (!code) {
+ return null;
+ }
+ code = self._findEnd(code.end, false);
+ if (!code) {
+ return null;
+ }
+
+ decodedCodes.push(code);
+
+ // Checksum
+ if (!self._checksum(result)) {
+ return null;
}
+
+ return {
+ code: result.join(""),
+ start: startInfo.start,
+ end: code.end,
+ codeset: "",
+ startInfo: startInfo,
+ decodedCodes: decodedCodes
+ };
};
- /**
- * Inverts a binary image in place
- */
- ImageWrapper.prototype.invert = function () {
- var data = this.data,
- length = data.length;
+ EANReader.prototype._checksum = function (result) {
+ var sum = 0,
+ i;
- while (length--) {
- data[length] = data[length] ? 0 : 1;
+ for (i = result.length - 2; i >= 0; i -= 2) {
+ sum += result[i];
+ }
+ sum *= 3;
+ for (i = result.length - 1; i >= 0; i -= 2) {
+ sum += result[i];
}
+ return sum % 10 === 0;
};
- ImageWrapper.prototype.convolve = function (kernel) {
- var x,
- y,
- kx,
- ky,
- kSize = kernel.length / 2 | 0,
- accu = 0;
- for (y = 0; y < this.size.y; y++) {
- for (x = 0; x < this.size.x; x++) {
- accu = 0;
- for (ky = -kSize; ky <= kSize; ky++) {
- for (kx = -kSize; kx <= kSize; kx++) {
- accu += kernel[ky + kSize][kx + kSize] * this.getSafe(x + kx, y + ky);
- }
- }
- this.data[y * this.size.x + x] = accu;
- }
- }
- };
-
- ImageWrapper.prototype.moments = function (labelcount) {
- var data = this.data,
- x,
- y,
- height = this.size.y,
- width = this.size.x,
- val,
- ysq,
- labelsum = [],
- i,
- label,
- mu11,
- mu02,
- mu20,
- x_,
- y_,
- tmp,
- result = [],
- PI = Math.PI,
- PI_4 = PI / 4;
-
- if (labelcount <= 0) {
- return result;
- }
-
- for (i = 0; i < labelcount; i++) {
- labelsum[i] = {
- m00: 0,
- m01: 0,
- m10: 0,
- m11: 0,
- m02: 0,
- m20: 0,
- theta: 0,
- rad: 0
- };
- }
-
- for (y = 0; y < height; y++) {
- ysq = y * y;
- for (x = 0; x < width; x++) {
- val = data[y * width + x];
- if (val > 0) {
- label = labelsum[val - 1];
- label.m00 += 1;
- label.m01 += y;
- label.m10 += x;
- label.m11 += x * y;
- label.m02 += ysq;
- label.m20 += x * x;
- }
- }
- }
+ /* harmony default export */ exports["a"] = EANReader;
+
+/***/ },
+/* 11 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var eq = __webpack_require__(15);
- for (i = 0; i < labelcount; i++) {
- label = labelsum[i];
- if (!isNaN(label.m00) && label.m00 !== 0) {
- x_ = label.m10 / label.m00;
- y_ = label.m01 / label.m00;
- mu11 = label.m11 / label.m00 - x_ * y_;
- mu02 = label.m02 / label.m00 - y_ * y_;
- mu20 = label.m20 / label.m00 - x_ * x_;
- tmp = (mu02 - mu20) / (2 * mu11);
- tmp = 0.5 * Math.atan(tmp) + (mu11 >= 0 ? PI_4 : -PI_4) + PI;
- label.theta = (tmp * 180 / PI + 90) % 180 - 90;
- if (label.theta < 0) {
- label.theta += 180;
- }
- label.rad = tmp > PI ? tmp - PI : tmp;
- label.vec = _glMatrix.vec2.clone([Math.cos(tmp), Math.sin(tmp)]);
- result.push(label);
- }
+ /**
+ * Gets the index at which the first occurrence of `key` is found in `array`
+ * of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
}
+ }
+ return -1;
+ }
- return result;
- };
+ module.e = assocIndexOf;
+
+
+/***/ },
+/* 12 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isNative = __webpack_require__(140);
/**
- * Displays the {ImageWrapper} in a given canvas
- * @param canvas {Canvas} The canvas element to write to
- * @param scale {Number} Scale which is applied to each pixel-value
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
*/
- ImageWrapper.prototype.show = function (canvas, scale) {
- var ctx, frame, data, current, pixel, x, y;
-
- if (!scale) {
- scale = 1.0;
- }
- ctx = canvas.getContext('2d');
- canvas.width = this.size.x;
- canvas.height = this.size.y;
- frame = ctx.getImageData(0, 0, canvas.width, canvas.height);
- data = frame.data;
- current = 0;
- for (y = 0; y < this.size.y; y++) {
- for (x = 0; x < this.size.x; x++) {
- pixel = y * this.size.x + x;
- current = this.get(x, y) * scale;
- data[pixel * 4 + 0] = current;
- data[pixel * 4 + 1] = current;
- data[pixel * 4 + 2] = current;
- data[pixel * 4 + 3] = 255;
- }
- }
- //frame.data = data;
- ctx.putImageData(frame, 0, 0);
- };
+ function getNative(object, key) {
+ var value = object[key];
+ return isNative(value) ? value : undefined;
+ }
+ module.e = getNative;
+
+
+/***/ },
+/* 13 */
+/***/ function(module, exports, __webpack_require__) {
+
/**
- * Displays the {SubImage} in a given canvas
- * @param canvas {Canvas} The canvas element to write to
- * @param scale {Number} Scale which is applied to each pixel-value
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
- ImageWrapper.prototype.overlay = function (canvas, scale, from) {
- if (!scale || scale < 0 || scale > 360) {
- scale = 360;
- }
- var hsv = [0, 1, 1];
- var rgb = [0, 0, 0];
- var whiteRgb = [255, 255, 255];
- var blackRgb = [0, 0, 0];
- var result = [];
- var ctx = canvas.getContext('2d');
- var frame = ctx.getImageData(from.x, from.y, this.size.x, this.size.y);
- var data = frame.data;
- var length = this.data.length;
- while (length--) {
- hsv[0] = this.data[length] * scale;
- result = hsv[0] <= 0 ? whiteRgb : hsv[0] >= 360 ? blackRgb : _commonCv_utils2['default'].hsv2rgb(hsv, rgb);
- data[length * 4 + 0] = result[0];
- data[length * 4 + 1] = result[1];
- data[length * 4 + 2] = result[2];
- data[length * 4 + 3] = 255;
- }
- ctx.putImageData(frame, from.x, from.y);
- };
+ function isKeyable(value) {
+ var type = typeof value;
+ return type == 'number' || type == 'boolean' ||
+ (type == 'string' && value != '__proto__') || value == null;
+ }
- exports['default'] = ImageWrapper;
- module.exports = exports['default'];
+ module.e = isKeyable;
+
/***/ },
-/* 4 */
-/***/ function(module, exports) {
+/* 14 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getNative = __webpack_require__(12);
+
+ /* Built-in method references that are verified to be native. */
+ var nativeCreate = getNative(Object, 'create');
+
+ module.e = nativeCreate;
+
+
+/***/ },
+/* 15 */
+/***/ function(module, exports, __webpack_require__) {
/**
- * Construct representing a part of another {ImageWrapper}. Shares data
- * between the parent and the child.
- * @param from {ImageRef} The position where to start the {SubImage} from. (top-left corner)
- * @param size {ImageRef} The size of the resulting image
- * @param I {ImageWrapper} The {ImageWrapper} to share from
- * @returns {SubImage} A shared part of the original image
+ * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
*/
- 'use strict';
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- function SubImage(from, size, I) {
- if (!I) {
- I = {
- data: null,
- size: size
- };
- }
- this.data = I.data;
- this.originalSize = I.size;
- this.I = I;
+ module.e = eq;
+
+
+/***/ },
+/* 16 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(2);
- this.from = from;
- this.size = size;
- }
+ /** `Object#toString` result references. */
+ var funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]';
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
/**
- * Displays the {SubImage} in a given canvas
- * @param canvas {Canvas} The canvas element to write to
- * @param scale {Number} Scale which is applied to each pixel-value
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
*/
- SubImage.prototype.show = function (canvas, scale) {
- var ctx, frame, data, current, y, x, pixel;
-
- if (!scale) {
- scale = 1.0;
- }
- ctx = canvas.getContext('2d');
- canvas.width = this.size.x;
- canvas.height = this.size.y;
- frame = ctx.getImageData(0, 0, canvas.width, canvas.height);
- data = frame.data;
- current = 0;
- for (y = 0; y < this.size.y; y++) {
- for (x = 0; x < this.size.x; x++) {
- pixel = y * this.size.x + x;
- current = this.get(x, y) * scale;
- data[pixel * 4 + 0] = current;
- data[pixel * 4 + 1] = current;
- data[pixel * 4 + 2] = current;
- data[pixel * 4 + 3] = 255;
- }
- }
- frame.data = data;
- ctx.putImageData(frame, 0, 0);
- };
-
- /**
- * Retrieves a given pixel position from the {SubImage}
- * @param x {Number} The x-position
- * @param y {Number} The y-position
- * @returns {Number} The grayscale value at the pixel-position
- */
- SubImage.prototype.get = function (x, y) {
- return this.data[(this.from.y + y) * this.originalSize.x + this.from.x + x];
- };
-
- /**
- * Updates the underlying data from a given {ImageWrapper}
- * @param image {ImageWrapper} The updated image
- */
- SubImage.prototype.updateData = function (image) {
- this.originalSize = image.size;
- this.data = image.data;
- };
+ var objectToString = objectProto.toString;
/**
- * Updates the position of the shared area
- * @param from {x,y} The new location
- * @returns {SubImage} returns {this} for possible chaining
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
*/
- SubImage.prototype.updateFrom = function (from) {
- this.from = from;
- return this;
- };
+ function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+ }
- exports['default'] = SubImage;
- module.exports = exports['default'];
+ module.e = isFunction;
+
/***/ },
-/* 5 */
+/* 17 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var _cluster = __webpack_require__(6);
-
- var _cluster2 = _interopRequireDefault(_cluster);
-
- var _array_helper = __webpack_require__(17);
-
- var _array_helper2 = _interopRequireDefault(_array_helper);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cluster__ = __webpack_require__(51);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array_helper__ = __webpack_require__(8);
+ /* harmony export */ exports["f"] = imageRef;/* unused harmony export computeIntegralImage2 *//* unused harmony export computeIntegralImage *//* unused harmony export thresholdImage *//* unused harmony export computeHistogram *//* unused harmony export sharpenLine *//* unused harmony export determineOtsuThreshold *//* harmony export */ exports["c"] = otsuThreshold;/* unused harmony export computeBinaryImage *//* harmony export */ exports["d"] = cluster;/* unused harmony export dilate *//* unused harmony export erode *//* unused harmony export subtract *//* unused harmony export bitwiseOr *//* unused harmony export countNonZero *//* harmony export */ exports["e"] = topGeneric;/* unused harmony export grayArrayFromImage *//* unused harmony export grayArrayFromContext *//* harmony export */ exports["i"] = grayAndHalfSampleFromCanvasData;/* harmony export */ exports["j"] = computeGray;/* unused harmony export loadImageArray *//* harmony export */ exports["g"] = halfSample;/* harmony export */ exports["a"] = hsv2rgb;/* unused harmony export _computeDivisors *//* harmony export */ exports["b"] = calculatePatchSize;/* unused harmony export _parseCSSDimensionValues *//* harmony export */ exports["h"] = computeImageArea;
- var _glMatrix = __webpack_require__(7);
-
- var CVUtils = {};
+ var vec2 = {
+ clone: __webpack_require__(6)
+ };
+ var vec3 = {
+ clone: __webpack_require__(78)
+ };
/**
* @param x x-coordinate
* @param y y-coordinate
* @return ImageReference {x,y} Coordinate
*/
- CVUtils.imageRef = function (x, y) {
+ function imageRef(x, y) {
var that = {
x: x,
y: y,
toVec2: function toVec2() {
- return _glMatrix.vec2.clone([this.x, this.y]);
+ return vec2.clone([this.x, this.y]);
},
toVec3: function toVec3() {
- return _glMatrix.vec3.clone([this.x, this.y, 1]);
+ return vec3.clone([this.x, this.y, 1]);
},
round: function round() {
this.x = this.x > 0.0 ? Math.floor(this.x + 0.5) : Math.floor(this.x - 0.5);
@@ -1179,7 +1226,7 @@ return /******/ (function(modules) { // webpackBootstrap
* Computes an integral image of a given grayscale image.
* @param imageDataContainer {ImageDataContainer} the image to be integrated
*/
- CVUtils.computeIntegralImage2 = function (imageWrapper, integralWrapper) {
+ function computeIntegralImage2(imageWrapper, integralWrapper) {
var imageData = imageWrapper.data;
var width = imageWrapper.size.x;
var height = imageWrapper.size.y;
@@ -1227,7 +1274,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- CVUtils.computeIntegralImage = function (imageWrapper, integralWrapper) {
+ function computeIntegralImage(imageWrapper, integralWrapper) {
var imageData = imageWrapper.data;
var width = imageWrapper.size.x;
var height = imageWrapper.size.y;
@@ -1249,7 +1296,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- CVUtils.thresholdImage = function (imageWrapper, threshold, targetWrapper) {
+ function thresholdImage(imageWrapper, threshold, targetWrapper) {
if (!targetWrapper) {
targetWrapper = imageWrapper;
}
@@ -1262,7 +1309,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- CVUtils.computeHistogram = function (imageWrapper, bitsPerPixel) {
+ function computeHistogram(imageWrapper, bitsPerPixel) {
if (!bitsPerPixel) {
bitsPerPixel = 8;
}
@@ -1278,7 +1325,7 @@ return /******/ (function(modules) { // webpackBootstrap
return hist;
};
- CVUtils.sharpenLine = function (line) {
+ function sharpenLine(line) {
var i,
length = line.length,
left = line[0],
@@ -1295,7 +1342,7 @@ return /******/ (function(modules) { // webpackBootstrap
return line;
};
- CVUtils.determineOtsuThreshold = function (imageWrapper, bitsPerPixel) {
+ function determineOtsuThreshold(imageWrapper, bitsPerPixel) {
if (!bitsPerPixel) {
bitsPerPixel = 8;
}
@@ -1334,7 +1381,7 @@ return /******/ (function(modules) { // webpackBootstrap
m12,
max = (1 << bitsPerPixel) - 1;
- hist = CVUtils.computeHistogram(imageWrapper, bitsPerPixel);
+ hist = computeHistogram(imageWrapper, bitsPerPixel);
for (k = 1; k < max; k++) {
p1 = px(0, k);
p2 = px(k + 1, max);
@@ -1347,23 +1394,23 @@ return /******/ (function(modules) { // webpackBootstrap
m12 = m1 - m2;
vet[k] = m12 * m12 / p12;
}
- return _array_helper2['default'].maxIndex(vet);
+ return /* harmony import */__WEBPACK_IMPORTED_MODULE_1__array_helper__["a"].maxIndex(vet);
}
threshold = determineThreshold();
return threshold << bitShift;
};
- CVUtils.otsuThreshold = function (imageWrapper, targetWrapper) {
- var threshold = CVUtils.determineOtsuThreshold(imageWrapper);
+ function otsuThreshold(imageWrapper, targetWrapper) {
+ var threshold = determineOtsuThreshold(imageWrapper);
- CVUtils.thresholdImage(imageWrapper, threshold, targetWrapper);
+ thresholdImage(imageWrapper, threshold, targetWrapper);
return threshold;
};
// local thresholding
- CVUtils.computeBinaryImage = function (imageWrapper, integralWrapper, targetWrapper) {
- CVUtils.computeIntegralImage(imageWrapper, integralWrapper);
+ function computeBinaryImage(imageWrapper, integralWrapper, targetWrapper) {
+ computeIntegralImage(imageWrapper, integralWrapper);
if (!targetWrapper) {
targetWrapper = imageWrapper;
@@ -1413,7 +1460,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- CVUtils.cluster = function (points, threshold, property) {
+ function cluster(points, threshold, property) {
var i,
k,
cluster,
@@ -1438,15 +1485,15 @@ return /******/ (function(modules) { // webpackBootstrap
// iterate over each cloud
for (i = 0; i < points.length; i++) {
- point = _cluster2['default'].createPoint(points[i], i, property);
+ point = /* harmony import */__WEBPACK_IMPORTED_MODULE_0__cluster__["a"].createPoint(points[i], i, property);
if (!addToCluster(point)) {
- clusters.push(_cluster2['default'].create(point, threshold));
+ clusters.push(/* harmony import */__WEBPACK_IMPORTED_MODULE_0__cluster__["a"].create(point, threshold));
}
}
return clusters;
};
- CVUtils.Tracer = {
+ var Tracer = {
trace: function trace(points, vec) {
var iteration,
maxIterations = 10,
@@ -1522,12 +1569,12 @@ return /******/ (function(modules) { // webpackBootstrap
}
return result;
}
- };
+ };/* unused harmony export Tracer */
- CVUtils.DILATE = 1;
- CVUtils.ERODE = 2;
+ var DILATE = 1;/* unused harmony export DILATE */
+ var ERODE = 2;/* unused harmony export ERODE */
- CVUtils.dilate = function (inImageWrapper, outImageWrapper) {
+ function dilate(inImageWrapper, outImageWrapper) {
var v,
u,
inImageData = inImageWrapper.data,
@@ -1552,7 +1599,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- CVUtils.erode = function (inImageWrapper, outImageWrapper) {
+ function erode(inImageWrapper, outImageWrapper) {
var v,
u,
inImageData = inImageWrapper.data,
@@ -1577,7 +1624,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- CVUtils.subtract = function (aImageWrapper, bImageWrapper, resultImageWrapper) {
+ function subtract(aImageWrapper, bImageWrapper, resultImageWrapper) {
if (!resultImageWrapper) {
resultImageWrapper = aImageWrapper;
}
@@ -1591,7 +1638,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- CVUtils.bitwiseOr = function (aImageWrapper, bImageWrapper, resultImageWrapper) {
+ function bitwiseOr(aImageWrapper, bImageWrapper, resultImageWrapper) {
if (!resultImageWrapper) {
resultImageWrapper = aImageWrapper;
}
@@ -1605,7 +1652,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- CVUtils.countNonZero = function (imageWrapper) {
+ function countNonZero(imageWrapper) {
var length = imageWrapper.data.length,
data = imageWrapper.data,
sum = 0;
@@ -1616,7 +1663,7 @@ return /******/ (function(modules) { // webpackBootstrap
return sum;
};
- CVUtils.topGeneric = function (list, top, scoreFunc) {
+ function topGeneric(list, top, scoreFunc) {
var i,
minIdx = 0,
min = 0,
@@ -1651,18 +1698,18 @@ return /******/ (function(modules) { // webpackBootstrap
return queue;
};
- CVUtils.grayArrayFromImage = function (htmlImage, offsetX, ctx, array) {
+ function grayArrayFromImage(htmlImage, offsetX, ctx, array) {
ctx.drawImage(htmlImage, offsetX, 0, htmlImage.width, htmlImage.height);
var ctxData = ctx.getImageData(offsetX, 0, htmlImage.width, htmlImage.height).data;
- CVUtils.computeGray(ctxData, array);
+ computeGray(ctxData, array);
};
- CVUtils.grayArrayFromContext = function (ctx, size, offset, array) {
+ function grayArrayFromContext(ctx, size, offset, array) {
var ctxData = ctx.getImageData(offset.x, offset.y, size.x, size.y).data;
- CVUtils.computeGray(ctxData, array);
+ computeGray(ctxData, array);
};
- CVUtils.grayAndHalfSampleFromCanvasData = function (canvasData, size, outArray) {
+ function grayAndHalfSampleFromCanvasData(canvasData, size, outArray) {
var topRowIdx = 0;
var bottomRowIdx = size.x;
var endIdx = Math.floor(canvasData.length / 4);
@@ -1683,7 +1730,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- CVUtils.computeGray = function (imageData, outArray, config) {
+ function computeGray(imageData, outArray, config) {
var l = imageData.length / 4 | 0,
i,
singleChannel = config && config.singleChannel === true;
@@ -1699,7 +1746,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- CVUtils.loadImageArray = function (src, callback, canvas) {
+ function loadImageArray(src, callback, canvas) {
if (!canvas) {
canvas = document.createElement('canvas');
}
@@ -1713,7 +1760,7 @@ return /******/ (function(modules) { // webpackBootstrap
var array = new Uint8Array(this.width * this.height);
ctx.drawImage(this, 0, 0);
var data = ctx.getImageData(0, 0, this.width, this.height).data;
- CVUtils.computeGray(data, array);
+ computeGray(data, array);
this.callback(array, {
x: this.width,
y: this.height
@@ -1726,7 +1773,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @param inImg {ImageWrapper} input image to be sampled
* @param outImg {ImageWrapper} to be stored in
*/
- CVUtils.halfSample = function (inImgWrapper, outImgWrapper) {
+ function halfSample(inImgWrapper, outImgWrapper) {
var inImg = inImgWrapper.data;
var inWidth = inImgWrapper.size.x;
var outImg = outImgWrapper.data;
@@ -1747,7 +1794,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
- CVUtils.hsv2rgb = function (hsv, rgb) {
+ function hsv2rgb(hsv, rgb) {
var h = hsv[0],
s = hsv[1],
v = hsv[2],
@@ -1785,7 +1832,7 @@ return /******/ (function(modules) { // webpackBootstrap
return rgb;
};
- CVUtils._computeDivisors = function (n) {
+ function _computeDivisors(n) {
var largeDivisors = [],
divisors = [],
i;
@@ -1801,7 +1848,7 @@ return /******/ (function(modules) { // webpackBootstrap
return divisors.concat(largeDivisors);
};
- CVUtils._computeIntersection = function (arr1, arr2) {
+ function _computeIntersection(arr1, arr2) {
var i = 0,
j = 0,
result = [];
@@ -1820,11 +1867,11 @@ return /******/ (function(modules) { // webpackBootstrap
return result;
};
- CVUtils.calculatePatchSize = function (patchSize, imgSize) {
- var divisorsX = this._computeDivisors(imgSize.x),
- divisorsY = this._computeDivisors(imgSize.y),
+ function calculatePatchSize(patchSize, imgSize) {
+ var divisorsX = _computeDivisors(imgSize.x),
+ divisorsY = _computeDivisors(imgSize.y),
wideSide = Math.max(imgSize.x, imgSize.y),
- common = this._computeIntersection(divisorsX, divisorsY),
+ common = _computeIntersection(divisorsX, divisorsY),
nrOfPatchesList = [8, 10, 15, 20, 32, 60, 80],
nrOfPatchesMap = {
"x-small": 5,
@@ -1860,15 +1907,15 @@ return /******/ (function(modules) { // webpackBootstrap
optimalPatchSize = findPatchSizeForDivisors(common);
if (!optimalPatchSize) {
- optimalPatchSize = findPatchSizeForDivisors(this._computeDivisors(wideSide));
+ optimalPatchSize = findPatchSizeForDivisors(_computeDivisors(wideSide));
if (!optimalPatchSize) {
- optimalPatchSize = findPatchSizeForDivisors(this._computeDivisors(desiredPatchSize * nrOfPatches));
+ optimalPatchSize = findPatchSizeForDivisors(_computeDivisors(desiredPatchSize * nrOfPatches));
}
}
return optimalPatchSize;
};
- CVUtils._parseCSSDimensionValues = function (value) {
+ function _parseCSSDimensionValues(value) {
var dimension = {
value: parseFloat(value),
unit: value.indexOf("%") === value.length - 1 ? "%" : "%"
@@ -1877,7 +1924,7 @@ return /******/ (function(modules) { // webpackBootstrap
return dimension;
};
- CVUtils._dimensionsConverters = {
+ var _dimensionsConverters = {
top: function top(dimension, context) {
if (dimension.unit === "%") {
return Math.floor(context.height * (dimension.value / 100));
@@ -1898,15 +1945,15 @@ return /******/ (function(modules) { // webpackBootstrap
return Math.floor(context.width * (dimension.value / 100));
}
}
- };
+ };/* unused harmony export _dimensionsConverters */
- CVUtils.computeImageArea = function (inputWidth, inputHeight, area) {
+ function computeImageArea(inputWidth, inputHeight, area) {
var context = { width: inputWidth, height: inputHeight };
var parsedArea = Object.keys(area).reduce(function (result, key) {
var value = area[key],
- parsed = CVUtils._parseCSSDimensionValues(value),
- calculated = CVUtils._dimensionsConverters[key](parsed, context);
+ parsed = _parseCSSDimensionValues(value),
+ calculated = _dimensionsConverters[key](parsed, context);
result[key] = calculated;
return result;
@@ -1919,7496 +1966,5056 @@ return /******/ (function(modules) { // webpackBootstrap
sh: parsedArea.bottom - parsedArea.top
};
};
-
- exports['default'] = CVUtils;
- module.exports = exports['default'];
/***/ },
-/* 6 */
+/* 18 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__subImage__ = __webpack_require__(53);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_cv_utils__ = __webpack_require__(17);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_array_helper__ = __webpack_require__(8);
+
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- var _glMatrix = __webpack_require__(7);
+ var vec2 = {
+ clone: __webpack_require__(6)
+ };
/**
- * Creates a cluster for grouping similar orientations of datapoints
+ * Represents a basic image combining the data and size.
+ * In addition, some methods for manipulation are contained.
+ * @param size {x,y} The size of the image in pixel
+ * @param data {Array} If given, a flat array containing the pixel data
+ * @param ArrayType {Type} If given, the desired DataType of the Array (may be typed/non-typed)
+ * @param initialize {Boolean} Indicating if the array should be initialized on creation.
+ * @returns {ImageWrapper}
*/
- exports['default'] = {
- create: function create(point, threshold) {
- var points = [],
- center = {
- rad: 0,
- vec: _glMatrix.vec2.clone([0, 0])
- },
- pointMap = {};
-
- function init() {
- _add(point);
- updateCenter();
- }
-
- function _add(pointToAdd) {
- pointMap[pointToAdd.id] = pointToAdd;
- points.push(pointToAdd);
- }
-
- function updateCenter() {
- var i,
- sum = 0;
- for (i = 0; i < points.length; i++) {
- sum += points[i].rad;
+ function ImageWrapper(size, data, ArrayType, initialize) {
+ if (!data) {
+ if (ArrayType) {
+ this.data = new ArrayType(size.x * size.y);
+ if (ArrayType === Array && initialize) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_2__common_array_helper__["a"].init(this.data, 0);
}
- center.rad = sum / points.length;
- center.vec = _glMatrix.vec2.clone([Math.cos(center.rad), Math.sin(center.rad)]);
- }
-
- init();
-
- return {
- add: function add(pointToAdd) {
- if (!pointMap[pointToAdd.id]) {
- _add(pointToAdd);
- updateCenter();
- }
- },
- fits: function fits(otherPoint) {
- // check cosine similarity to center-angle
- var similarity = Math.abs(_glMatrix.vec2.dot(otherPoint.point.vec, center.vec));
- if (similarity > threshold) {
- return true;
- }
- return false;
- },
- getPoints: function getPoints() {
- return points;
- },
- getCenter: function getCenter() {
- return center;
+ } else {
+ this.data = new Uint8Array(size.x * size.y);
+ if (Uint8Array === Array && initialize) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_2__common_array_helper__["a"].init(this.data, 0);
}
- };
- },
- createPoint: function createPoint(newPoint, id, property) {
- return {
- rad: newPoint[property],
- point: newPoint,
- id: id
- };
+ }
+ } else {
+ this.data = data;
}
- };
- module.exports = exports['default'];
-
-/***/ },
-/* 7 */
-/***/ function(module, exports, __webpack_require__) {
-
- /**
- * @fileoverview gl-matrix - High performance matrix and vector operations
- * @author Brandon Jones
- * @author Colin MacKenzie IV
- * @version 2.3.0
- */
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
- // END HEADER
-
- exports.glMatrix = __webpack_require__(8);
- exports.mat2 = __webpack_require__(9);
- exports.mat2d = __webpack_require__(10);
- exports.mat3 = __webpack_require__(11);
- exports.mat4 = __webpack_require__(12);
- exports.quat = __webpack_require__(13);
- exports.vec2 = __webpack_require__(16);
- exports.vec3 = __webpack_require__(14);
- exports.vec4 = __webpack_require__(15);
-
-/***/ },
-/* 8 */
-/***/ function(module, exports) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- /**
- * @class Common utilities
- * @name glMatrix
- */
- var glMatrix = {};
-
- // Constants
- glMatrix.EPSILON = 0.000001;
- glMatrix.ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array;
- glMatrix.RANDOM = Math.random;
-
- /**
- * Sets the type of array used when creating new vectors and matrices
- *
- * @param {Type} type Array type, such as Float32Array or Array
- */
- glMatrix.setMatrixArrayType = function(type) {
- GLMAT_ARRAY_TYPE = type;
- }
-
- var degree = Math.PI / 180;
-
- /**
- * Convert Degree To Radian
- *
- * @param {Number} Angle in Degrees
- */
- glMatrix.toRadian = function(a){
- return a * degree;
+ this.size = size;
}
- module.exports = glMatrix;
-
-
-/***/ },
-/* 9 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(8);
-
/**
- * @class 2x2 Matrix
- * @name mat2
+ * tests if a position is within the image with a given offset
+ * @param imgRef {x, y} The location to test
+ * @param border Number the padding value in pixel
+ * @returns {Boolean} true if location inside the image's border, false otherwise
+ * @see cvd/image.h
*/
- var mat2 = {};
+ ImageWrapper.prototype.inImageWithBorder = function (imgRef, border) {
+ return imgRef.x >= border && imgRef.y >= border && imgRef.x < this.size.x - border && imgRef.y < this.size.y - border;
+ };
/**
- * Creates a new identity mat2
- *
- * @returns {mat2} a new 2x2 matrix
+ * Performs bilinear sampling
+ * @param inImg Image to extract sample from
+ * @param x the x-coordinate
+ * @param y the y-coordinate
+ * @returns the sampled value
+ * @see cvd/vision.h
*/
- mat2.create = function() {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
+ ImageWrapper.sample = function (inImg, x, y) {
+ var lx = Math.floor(x);
+ var ly = Math.floor(y);
+ var w = inImg.size.x;
+ var base = ly * inImg.size.x + lx;
+ var a = inImg.data[base + 0];
+ var b = inImg.data[base + 1];
+ var c = inImg.data[base + w];
+ var d = inImg.data[base + w + 1];
+ var e = a - b;
+ x -= lx;
+ y -= ly;
+
+ var result = Math.floor(x * (y * (e - c + d) - e) + y * (c - a) + a);
+ return result;
};
/**
- * Creates a new mat2 initialized with values from an existing matrix
- *
- * @param {mat2} a matrix to clone
- * @returns {mat2} a new 2x2 matrix
+ * Initializes a given array. Sets each element to zero.
+ * @param array {Array} The array to initialize
*/
- mat2.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
+ ImageWrapper.clearArray = function (array) {
+ var l = array.length;
+ while (l--) {
+ array[l] = 0;
+ }
};
/**
- * Copy the values from one mat2 to another
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
+ * Creates a {SubImage} from the current image ({this}).
+ * @param from {ImageRef} The position where to start the {SubImage} from. (top-left corner)
+ * @param size {ImageRef} The size of the resulting image
+ * @returns {SubImage} A shared part of the original image
*/
- mat2.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
+ ImageWrapper.prototype.subImage = function (from, size) {
+ return new /* harmony import */__WEBPACK_IMPORTED_MODULE_0__subImage__["a"](from, size, this);
};
/**
- * Set a mat2 to the identity matrix
- *
- * @param {mat2} out the receiving matrix
- * @returns {mat2} out
- */
- mat2.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- };
-
- /**
- * Transpose the values of a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
+ * Creates an {ImageWrapper) and copies the needed underlying image-data area
+ * @param imageWrapper {ImageWrapper} The target {ImageWrapper} where the data should be copied
+ * @param from {ImageRef} The location where to copy from (top-left location)
*/
- mat2.transpose = function(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache some values
- if (out === a) {
- var a1 = a[1];
- out[1] = a[2];
- out[2] = a1;
- } else {
- out[0] = a[0];
- out[1] = a[2];
- out[2] = a[1];
- out[3] = a[3];
+ ImageWrapper.prototype.subImageAsCopy = function (imageWrapper, from) {
+ var sizeY = imageWrapper.size.y,
+ sizeX = imageWrapper.size.x;
+ var x, y;
+ for (x = 0; x < sizeX; x++) {
+ for (y = 0; y < sizeY; y++) {
+ imageWrapper.data[y * sizeX + x] = this.data[(from.y + y) * this.size.x + from.x + x];
+ }
}
-
- return out;
};
- /**
- * Inverts a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
- */
- mat2.invert = function(out, a) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
-
- // Calculate the determinant
- det = a0 * a3 - a2 * a1;
+ ImageWrapper.prototype.copyTo = function (imageWrapper) {
+ var length = this.data.length,
+ srcData = this.data,
+ dstData = imageWrapper.data;
- if (!det) {
- return null;
+ while (length--) {
+ dstData[length] = srcData[length];
}
- det = 1.0 / det;
-
- out[0] = a3 * det;
- out[1] = -a1 * det;
- out[2] = -a2 * det;
- out[3] = a0 * det;
-
- return out;
};
/**
- * Calculates the adjugate of a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
+ * Retrieves a given pixel position from the image
+ * @param x {Number} The x-position
+ * @param y {Number} The y-position
+ * @returns {Number} The grayscale value at the pixel-position
*/
- mat2.adjoint = function(out, a) {
- // Caching this value is nessecary if out == a
- var a0 = a[0];
- out[0] = a[3];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = a0;
-
- return out;
+ ImageWrapper.prototype.get = function (x, y) {
+ return this.data[y * this.size.x + x];
};
/**
- * Calculates the determinant of a mat2
- *
- * @param {mat2} a the source matrix
- * @returns {Number} determinant of a
+ * Retrieves a given pixel position from the image
+ * @param x {Number} The x-position
+ * @param y {Number} The y-position
+ * @returns {Number} The grayscale value at the pixel-position
*/
- mat2.determinant = function (a) {
- return a[0] * a[3] - a[2] * a[1];
- };
+ ImageWrapper.prototype.getSafe = function (x, y) {
+ var i;
- /**
- * Multiplies two mat2's
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the first operand
- * @param {mat2} b the second operand
- * @returns {mat2} out
- */
- mat2.multiply = function (out, a, b) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];
- var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];
- out[0] = a0 * b0 + a2 * b1;
- out[1] = a1 * b0 + a3 * b1;
- out[2] = a0 * b2 + a2 * b3;
- out[3] = a1 * b2 + a3 * b3;
- return out;
+ if (!this.indexMapping) {
+ this.indexMapping = {
+ x: [],
+ y: []
+ };
+ for (i = 0; i < this.size.x; i++) {
+ this.indexMapping.x[i] = i;
+ this.indexMapping.x[i + this.size.x] = i;
+ }
+ for (i = 0; i < this.size.y; i++) {
+ this.indexMapping.y[i] = i;
+ this.indexMapping.y[i + this.size.y] = i;
+ }
+ }
+ return this.data[this.indexMapping.y[y + this.size.y] * this.size.x + this.indexMapping.x[x + this.size.x]];
};
/**
- * Alias for {@link mat2.multiply}
- * @function
- */
- mat2.mul = mat2.multiply;
-
- /**
- * Rotates a mat2 by the given angle
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2} out
+ * Sets a given pixel position in the image
+ * @param x {Number} The x-position
+ * @param y {Number} The y-position
+ * @param value {Number} The grayscale value to set
+ * @returns {ImageWrapper} The Image itself (for possible chaining)
*/
- mat2.rotate = function (out, a, rad) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
- s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = a0 * c + a2 * s;
- out[1] = a1 * c + a3 * s;
- out[2] = a0 * -s + a2 * c;
- out[3] = a1 * -s + a3 * c;
- return out;
- };
-
- /**
- * Scales the mat2 by the dimensions in the given vec2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the matrix to rotate
- * @param {vec2} v the vec2 to scale the matrix by
- * @returns {mat2} out
- **/
- mat2.scale = function(out, a, v) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
- v0 = v[0], v1 = v[1];
- out[0] = a0 * v0;
- out[1] = a1 * v0;
- out[2] = a2 * v1;
- out[3] = a3 * v1;
- return out;
+ ImageWrapper.prototype.set = function (x, y, value) {
+ this.data[y * this.size.x + x] = value;
+ return this;
};
/**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
- *
- * mat2.identity(dest);
- * mat2.rotate(dest, dest, rad);
- *
- * @param {mat2} out mat2 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2} out
+ * Sets the border of the image (1 pixel) to zero
*/
- mat2.fromRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = c;
- out[1] = s;
- out[2] = -s;
- out[3] = c;
- return out;
- }
+ ImageWrapper.prototype.zeroBorder = function () {
+ var i,
+ width = this.size.x,
+ height = this.size.y,
+ data = this.data;
+ for (i = 0; i < width; i++) {
+ data[i] = data[(height - 1) * width + i] = 0;
+ }
+ for (i = 1; i < height - 1; i++) {
+ data[i * width] = data[i * width + (width - 1)] = 0;
+ }
+ };
/**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat2.identity(dest);
- * mat2.scale(dest, dest, vec);
- *
- * @param {mat2} out mat2 receiving operation result
- * @param {vec2} v Scaling vector
- * @returns {mat2} out
+ * Inverts a binary image in place
*/
- mat2.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = v[1];
- return out;
- }
+ ImageWrapper.prototype.invert = function () {
+ var data = this.data,
+ length = data.length;
- /**
- * Returns a string representation of a mat2
- *
- * @param {mat2} mat matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
- mat2.str = function (a) {
- return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';
+ while (length--) {
+ data[length] = data[length] ? 0 : 1;
+ }
};
- /**
- * Returns Frobenius norm of a mat2
- *
- * @param {mat2} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
- mat2.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2)))
+ ImageWrapper.prototype.convolve = function (kernel) {
+ var x,
+ y,
+ kx,
+ ky,
+ kSize = kernel.length / 2 | 0,
+ accu = 0;
+ for (y = 0; y < this.size.y; y++) {
+ for (x = 0; x < this.size.x; x++) {
+ accu = 0;
+ for (ky = -kSize; ky <= kSize; ky++) {
+ for (kx = -kSize; kx <= kSize; kx++) {
+ accu += kernel[ky + kSize][kx + kSize] * this.getSafe(x + kx, y + ky);
+ }
+ }
+ this.data[y * this.size.x + x] = accu;
+ }
+ }
};
- /**
- * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix
- * @param {mat2} L the lower triangular matrix
- * @param {mat2} D the diagonal matrix
- * @param {mat2} U the upper triangular matrix
- * @param {mat2} a the input matrix to factorize
- */
-
- mat2.LDU = function (L, D, U, a) {
- L[2] = a[2]/a[0];
- U[0] = a[0];
- U[1] = a[1];
- U[3] = a[3] - L[2] * U[1];
- return [L, D, U];
- };
-
-
- module.exports = mat2;
-
-
-/***/ },
-/* 10 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(8);
+ ImageWrapper.prototype.moments = function (labelcount) {
+ var data = this.data,
+ x,
+ y,
+ height = this.size.y,
+ width = this.size.x,
+ val,
+ ysq,
+ labelsum = [],
+ i,
+ label,
+ mu11,
+ mu02,
+ mu20,
+ x_,
+ y_,
+ tmp,
+ result = [],
+ PI = Math.PI,
+ PI_4 = PI / 4;
- /**
- * @class 2x3 Matrix
- * @name mat2d
- *
- * @description
- * A mat2d contains six elements defined as:
- *
- * [a, c, tx,
- * b, d, ty]
- *
- * This is a short form for the 3x3 matrix:
- *
- * [a, c, tx,
- * b, d, ty,
- * 0, 0, 1]
- *
- * The last row is ignored so the array is shorter and operations are faster.
- */
- var mat2d = {};
+ if (labelcount <= 0) {
+ return result;
+ }
- /**
- * Creates a new identity mat2d
- *
- * @returns {mat2d} a new 2x3 matrix
- */
- mat2d.create = function() {
- var out = new glMatrix.ARRAY_TYPE(6);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = 0;
- out[5] = 0;
- return out;
- };
+ for (i = 0; i < labelcount; i++) {
+ labelsum[i] = {
+ m00: 0,
+ m01: 0,
+ m10: 0,
+ m11: 0,
+ m02: 0,
+ m20: 0,
+ theta: 0,
+ rad: 0
+ };
+ }
- /**
- * Creates a new mat2d initialized with values from an existing matrix
- *
- * @param {mat2d} a matrix to clone
- * @returns {mat2d} a new 2x3 matrix
- */
- mat2d.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(6);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- return out;
- };
+ for (y = 0; y < height; y++) {
+ ysq = y * y;
+ for (x = 0; x < width; x++) {
+ val = data[y * width + x];
+ if (val > 0) {
+ label = labelsum[val - 1];
+ label.m00 += 1;
+ label.m01 += y;
+ label.m10 += x;
+ label.m11 += x * y;
+ label.m02 += ysq;
+ label.m20 += x * x;
+ }
+ }
+ }
- /**
- * Copy the values from one mat2d to another
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the source matrix
- * @returns {mat2d} out
- */
- mat2d.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- return out;
- };
+ for (i = 0; i < labelcount; i++) {
+ label = labelsum[i];
+ if (!isNaN(label.m00) && label.m00 !== 0) {
+ x_ = label.m10 / label.m00;
+ y_ = label.m01 / label.m00;
+ mu11 = label.m11 / label.m00 - x_ * y_;
+ mu02 = label.m02 / label.m00 - y_ * y_;
+ mu20 = label.m20 / label.m00 - x_ * x_;
+ tmp = (mu02 - mu20) / (2 * mu11);
+ tmp = 0.5 * Math.atan(tmp) + (mu11 >= 0 ? PI_4 : -PI_4) + PI;
+ label.theta = (tmp * 180 / PI + 90) % 180 - 90;
+ if (label.theta < 0) {
+ label.theta += 180;
+ }
+ label.rad = tmp > PI ? tmp - PI : tmp;
+ label.vec = vec2.clone([Math.cos(tmp), Math.sin(tmp)]);
+ result.push(label);
+ }
+ }
- /**
- * Set a mat2d to the identity matrix
- *
- * @param {mat2d} out the receiving matrix
- * @returns {mat2d} out
- */
- mat2d.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = 0;
- out[5] = 0;
- return out;
+ return result;
};
/**
- * Inverts a mat2d
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the source matrix
- * @returns {mat2d} out
+ * Displays the {ImageWrapper} in a given canvas
+ * @param canvas {Canvas} The canvas element to write to
+ * @param scale {Number} Scale which is applied to each pixel-value
*/
- mat2d.invert = function(out, a) {
- var aa = a[0], ab = a[1], ac = a[2], ad = a[3],
- atx = a[4], aty = a[5];
+ ImageWrapper.prototype.show = function (canvas, scale) {
+ var ctx, frame, data, current, pixel, x, y;
- var det = aa * ad - ab * ac;
- if(!det){
- return null;
+ if (!scale) {
+ scale = 1.0;
}
- det = 1.0 / det;
-
- out[0] = ad * det;
- out[1] = -ab * det;
- out[2] = -ac * det;
- out[3] = aa * det;
- out[4] = (ac * aty - ad * atx) * det;
- out[5] = (ab * atx - aa * aty) * det;
- return out;
- };
-
- /**
- * Calculates the determinant of a mat2d
- *
- * @param {mat2d} a the source matrix
- * @returns {Number} determinant of a
- */
- mat2d.determinant = function (a) {
- return a[0] * a[3] - a[1] * a[2];
+ ctx = canvas.getContext('2d');
+ canvas.width = this.size.x;
+ canvas.height = this.size.y;
+ frame = ctx.getImageData(0, 0, canvas.width, canvas.height);
+ data = frame.data;
+ current = 0;
+ for (y = 0; y < this.size.y; y++) {
+ for (x = 0; x < this.size.x; x++) {
+ pixel = y * this.size.x + x;
+ current = this.get(x, y) * scale;
+ data[pixel * 4 + 0] = current;
+ data[pixel * 4 + 1] = current;
+ data[pixel * 4 + 2] = current;
+ data[pixel * 4 + 3] = 255;
+ }
+ }
+ //frame.data = data;
+ ctx.putImageData(frame, 0, 0);
};
/**
- * Multiplies two mat2d's
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the first operand
- * @param {mat2d} b the second operand
- * @returns {mat2d} out
+ * Displays the {SubImage} in a given canvas
+ * @param canvas {Canvas} The canvas element to write to
+ * @param scale {Number} Scale which is applied to each pixel-value
*/
- mat2d.multiply = function (out, a, b) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];
- out[0] = a0 * b0 + a2 * b1;
- out[1] = a1 * b0 + a3 * b1;
- out[2] = a0 * b2 + a2 * b3;
- out[3] = a1 * b2 + a3 * b3;
- out[4] = a0 * b4 + a2 * b5 + a4;
- out[5] = a1 * b4 + a3 * b5 + a5;
- return out;
+ ImageWrapper.prototype.overlay = function (canvas, scale, from) {
+ if (!scale || scale < 0 || scale > 360) {
+ scale = 360;
+ }
+ var hsv = [0, 1, 1];
+ var rgb = [0, 0, 0];
+ var whiteRgb = [255, 255, 255];
+ var blackRgb = [0, 0, 0];
+ var result = [];
+ var ctx = canvas.getContext('2d');
+ var frame = ctx.getImageData(from.x, from.y, this.size.x, this.size.y);
+ var data = frame.data;
+ var length = this.data.length;
+ while (length--) {
+ hsv[0] = this.data[length] * scale;
+ result = hsv[0] <= 0 ? whiteRgb : hsv[0] >= 360 ? blackRgb : /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["a"].bind()(hsv, rgb);
+ data[length * 4 + 0] = result[0];
+ data[length * 4 + 1] = result[1];
+ data[length * 4 + 2] = result[2];
+ data[length * 4 + 3] = 255;
+ }
+ ctx.putImageData(frame, from.x, from.y);
};
+ /* harmony default export */ exports["a"] = ImageWrapper;
+
+/***/ },
+/* 19 */
+/***/ function(module, exports, __webpack_require__) {
+
/**
- * Alias for {@link mat2d.multiply}
- * @function
- */
- mat2d.mul = mat2d.multiply;
-
- /**
- * Rotates a mat2d by the given angle
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
*
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2d} out
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as the initial value.
+ * @returns {*} Returns the accumulated value.
*/
- mat2d.rotate = function (out, a, rad) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = a0 * c + a2 * s;
- out[1] = a1 * c + a3 * s;
- out[2] = a0 * -s + a2 * c;
- out[3] = a1 * -s + a3 * c;
- out[4] = a4;
- out[5] = a5;
- return out;
- };
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array.length;
- /**
- * Scales the mat2d by the dimensions in the given vec2
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the matrix to translate
- * @param {vec2} v the vec2 to scale the matrix by
- * @returns {mat2d} out
- **/
- mat2d.scale = function(out, a, v) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- v0 = v[0], v1 = v[1];
- out[0] = a0 * v0;
- out[1] = a1 * v0;
- out[2] = a2 * v1;
- out[3] = a3 * v1;
- out[4] = a4;
- out[5] = a5;
- return out;
- };
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+ }
- /**
- * Translates the mat2d by the dimensions in the given vec2
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the matrix to translate
- * @param {vec2} v the vec2 to translate the matrix by
- * @returns {mat2d} out
- **/
- mat2d.translate = function(out, a, v) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- v0 = v[0], v1 = v[1];
- out[0] = a0;
- out[1] = a1;
- out[2] = a2;
- out[3] = a3;
- out[4] = a0 * v0 + a2 * v1 + a4;
- out[5] = a1 * v0 + a3 * v1 + a5;
- return out;
- };
+ module.e = arrayReduce;
+
+
+/***/ },
+/* 20 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var copyObjectWith = __webpack_require__(111);
/**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.rotate(dest, dest, rad);
+ * Copies properties of `source` to `object`.
*
- * @param {mat2d} out mat2d receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2d} out
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property names to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @returns {Object} Returns `object`.
*/
- mat2d.fromRotation = function(out, rad) {
- var s = Math.sin(rad), c = Math.cos(rad);
- out[0] = c;
- out[1] = s;
- out[2] = -s;
- out[3] = c;
- out[4] = 0;
- out[5] = 0;
- return out;
+ function copyObject(source, props, object) {
+ return copyObjectWith(source, props, object);
}
+ module.e = copyObject;
+
+
+/***/ },
+/* 21 */
+/***/ function(module, exports, __webpack_require__) {
+
/**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.scale(dest, dest, vec);
+ * Checks if `value` is a host object in IE < 9.
*
- * @param {mat2d} out mat2d receiving operation result
- * @param {vec2} v Scaling vector
- * @returns {mat2d} out
- */
- mat2d.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = v[1];
- out[4] = 0;
- out[5] = 0;
- return out;
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+ function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
}
+ module.e = isHostObject;
+
+
+/***/ },
+/* 22 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /** Used as references for various `Number` constants. */
+ var MAX_SAFE_INTEGER = 9007199254740991;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
/**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.translate(dest, dest, vec);
+ * Checks if `value` is a valid array-like index.
*
- * @param {mat2d} out mat2d receiving operation result
- * @param {vec2} v Translation vector
- * @returns {mat2d} out
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
- mat2d.fromTranslation = function(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = v[0];
- out[5] = v[1];
- return out;
+ function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
}
- /**
- * Returns a string representation of a mat2d
- *
- * @param {mat2d} a matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
- mat2d.str = function (a) {
- return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' +
- a[3] + ', ' + a[4] + ', ' + a[5] + ')';
- };
+ module.e = isIndex;
+
+
+/***/ },
+/* 23 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
/**
- * Returns Frobenius norm of a mat2d
+ * Checks if `value` is likely a prototype object.
*
- * @param {mat2d} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
- mat2d.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + 1))
- };
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+ }
- module.exports = mat2d;
+ module.e = isPrototype;
/***/ },
-/* 11 */
+/* 24 */
/***/ function(module, exports, __webpack_require__) {
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
+ var isArrayLikeObject = __webpack_require__(26);
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]';
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- var glMatrix = __webpack_require__(8);
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * @class 3x3 Matrix
- * @name mat3
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
*/
- var mat3 = {};
+ var objectToString = objectProto.toString;
- /**
- * Creates a new identity mat3
- *
- * @returns {mat3} a new 3x3 matrix
- */
- mat3.create = function() {
- var out = new glMatrix.ARRAY_TYPE(9);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 1;
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
- };
+ /** Built-in value references. */
+ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
- * Copies the upper-left 3x3 values into the given mat3.
+ * Checks if `value` is likely an `arguments` object.
*
- * @param {mat3} out the receiving 3x3 matrix
- * @param {mat4} a the source 4x4 matrix
- * @returns {mat3} out
- */
- mat3.fromMat4 = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[4];
- out[4] = a[5];
- out[5] = a[6];
- out[6] = a[8];
- out[7] = a[9];
- out[8] = a[10];
- return out;
- };
-
- /**
- * Creates a new mat3 initialized with values from an existing matrix
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
*
- * @param {mat3} a matrix to clone
- * @returns {mat3} a new 3x3 matrix
- */
- mat3.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(9);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
- };
-
- /**
- * Copy the values from one mat3 to another
+ * _.isArguments(function() { return arguments; }());
+ * // => true
*
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
+ * _.isArguments([1, 2, 3]);
+ * // => false
*/
- mat3.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
- };
+ function isArguments(value) {
+ // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+ }
- /**
- * Set a mat3 to the identity matrix
- *
- * @param {mat3} out the receiving matrix
- * @returns {mat3} out
- */
- mat3.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 1;
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
- };
+ module.e = isArguments;
+
+
+/***/ },
+/* 25 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getLength = __webpack_require__(115),
+ isFunction = __webpack_require__(16),
+ isLength = __webpack_require__(27);
/**
- * Transpose the values of a mat3
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
- */
- mat3.transpose = function(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache some values
- if (out === a) {
- var a01 = a[1], a02 = a[2], a12 = a[5];
- out[1] = a[3];
- out[2] = a[6];
- out[3] = a01;
- out[5] = a[7];
- out[6] = a02;
- out[7] = a12;
- } else {
- out[0] = a[0];
- out[1] = a[3];
- out[2] = a[6];
- out[3] = a[1];
- out[4] = a[4];
- out[5] = a[7];
- out[6] = a[2];
- out[7] = a[5];
- out[8] = a[8];
- }
-
- return out;
- };
-
- /**
- * Inverts a mat3
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
*
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
- */
- mat3.invert = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
-
- b01 = a22 * a11 - a12 * a21,
- b11 = -a22 * a10 + a12 * a20,
- b21 = a21 * a10 - a11 * a20,
-
- // Calculate the determinant
- det = a00 * b01 + a01 * b11 + a02 * b21;
-
- if (!det) {
- return null;
- }
- det = 1.0 / det;
-
- out[0] = b01 * det;
- out[1] = (-a22 * a01 + a02 * a21) * det;
- out[2] = (a12 * a01 - a02 * a11) * det;
- out[3] = b11 * det;
- out[4] = (a22 * a00 - a02 * a20) * det;
- out[5] = (-a12 * a00 + a02 * a10) * det;
- out[6] = b21 * det;
- out[7] = (-a21 * a00 + a01 * a20) * det;
- out[8] = (a11 * a00 - a01 * a10) * det;
- return out;
- };
-
- /**
- * Calculates the adjugate of a mat3
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
*
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
- */
- mat3.adjoint = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8];
-
- out[0] = (a11 * a22 - a12 * a21);
- out[1] = (a02 * a21 - a01 * a22);
- out[2] = (a01 * a12 - a02 * a11);
- out[3] = (a12 * a20 - a10 * a22);
- out[4] = (a00 * a22 - a02 * a20);
- out[5] = (a02 * a10 - a00 * a12);
- out[6] = (a10 * a21 - a11 * a20);
- out[7] = (a01 * a20 - a00 * a21);
- out[8] = (a00 * a11 - a01 * a10);
- return out;
- };
-
- /**
- * Calculates the determinant of a mat3
+ * _.isArrayLike(document.body.children);
+ * // => true
*
- * @param {mat3} a the source matrix
- * @returns {Number} determinant of a
- */
- mat3.determinant = function (a) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8];
-
- return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);
- };
-
- /**
- * Multiplies two mat3's
+ * _.isArrayLike('abc');
+ * // => true
*
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the first operand
- * @param {mat3} b the second operand
- * @returns {mat3} out
+ * _.isArrayLike(_.noop);
+ * // => false
*/
- mat3.multiply = function (out, a, b) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
-
- b00 = b[0], b01 = b[1], b02 = b[2],
- b10 = b[3], b11 = b[4], b12 = b[5],
- b20 = b[6], b21 = b[7], b22 = b[8];
-
- out[0] = b00 * a00 + b01 * a10 + b02 * a20;
- out[1] = b00 * a01 + b01 * a11 + b02 * a21;
- out[2] = b00 * a02 + b01 * a12 + b02 * a22;
-
- out[3] = b10 * a00 + b11 * a10 + b12 * a20;
- out[4] = b10 * a01 + b11 * a11 + b12 * a21;
- out[5] = b10 * a02 + b11 * a12 + b12 * a22;
-
- out[6] = b20 * a00 + b21 * a10 + b22 * a20;
- out[7] = b20 * a01 + b21 * a11 + b22 * a21;
- out[8] = b20 * a02 + b21 * a12 + b22 * a22;
- return out;
- };
+ function isArrayLike(value) {
+ return value != null && isLength(getLength(value)) && !isFunction(value);
+ }
- /**
- * Alias for {@link mat3.multiply}
- * @function
- */
- mat3.mul = mat3.multiply;
+ module.e = isArrayLike;
+
+
+/***/ },
+/* 26 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isArrayLike = __webpack_require__(25),
+ isObjectLike = __webpack_require__(7);
/**
- * Translate a mat3 by the given vector
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
*
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the matrix to translate
- * @param {vec2} v vector to translate by
- * @returns {mat3} out
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
*/
- mat3.translate = function(out, a, v) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
- x = v[0], y = v[1];
-
- out[0] = a00;
- out[1] = a01;
- out[2] = a02;
-
- out[3] = a10;
- out[4] = a11;
- out[5] = a12;
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
- out[6] = x * a00 + y * a10 + a20;
- out[7] = x * a01 + y * a11 + a21;
- out[8] = x * a02 + y * a12 + a22;
- return out;
- };
+ module.e = isArrayLikeObject;
+
+
+/***/ },
+/* 27 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /** Used as references for various `Number` constants. */
+ var MAX_SAFE_INTEGER = 9007199254740991;
/**
- * Rotates a mat3 by the given angle
+ * Checks if `value` is a valid array-like length.
*
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat3} out
- */
- mat3.rotate = function (out, a, rad) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
-
- s = Math.sin(rad),
- c = Math.cos(rad);
-
- out[0] = c * a00 + s * a10;
- out[1] = c * a01 + s * a11;
- out[2] = c * a02 + s * a12;
-
- out[3] = c * a10 - s * a00;
- out[4] = c * a11 - s * a01;
- out[5] = c * a12 - s * a02;
-
- out[6] = a20;
- out[7] = a21;
- out[8] = a22;
- return out;
- };
-
- /**
- * Scales the mat3 by the dimensions in the given vec2
+ * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
*
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the matrix to rotate
- * @param {vec2} v the vec2 to scale the matrix by
- * @returns {mat3} out
- **/
- mat3.scale = function(out, a, v) {
- var x = v[0], y = v[1];
-
- out[0] = x * a[0];
- out[1] = x * a[1];
- out[2] = x * a[2];
-
- out[3] = y * a[3];
- out[4] = y * a[4];
- out[5] = y * a[5];
-
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
- };
-
- /**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
*
- * mat3.identity(dest);
- * mat3.translate(dest, dest, vec);
+ * _.isLength(3);
+ * // => true
*
- * @param {mat3} out mat3 receiving operation result
- * @param {vec2} v Translation vector
- * @returns {mat3} out
- */
- mat3.fromTranslation = function(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 1;
- out[5] = 0;
- out[6] = v[0];
- out[7] = v[1];
- out[8] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
*
- * mat3.identity(dest);
- * mat3.rotate(dest, dest, rad);
+ * _.isLength(Infinity);
+ * // => false
*
- * @param {mat3} out mat3 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat3} out
+ * _.isLength('3');
+ * // => false
*/
- mat3.fromRotation = function(out, rad) {
- var s = Math.sin(rad), c = Math.cos(rad);
-
- out[0] = c;
- out[1] = s;
- out[2] = 0;
-
- out[3] = -s;
- out[4] = c;
- out[5] = 0;
-
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
+ module.e = isLength;
+
+
+/***/ },
+/* 28 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseMerge = __webpack_require__(99),
+ createAssigner = __webpack_require__(113);
+
/**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable properties of source objects into the destination
+ * object. Source properties that resolve to `undefined` are skipped if a
+ * destination value exists. Array and plain object properties are merged
+ * recursively.Other objects and value types are overridden by assignment.
+ * Source objects are applied from left to right. Subsequent sources
+ * overwrite property assignments of previous sources.
*
- * mat3.identity(dest);
- * mat3.scale(dest, dest, vec);
+ * **Note:** This method mutates `object`.
*
- * @param {mat3} out mat3 receiving operation result
- * @param {vec2} v Scaling vector
- * @returns {mat3} out
- */
- mat3.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
-
- out[3] = 0;
- out[4] = v[1];
- out[5] = 0;
-
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
- }
-
- /**
- * Copies the values from a mat2d into a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {mat2d} a the matrix to copy
- * @returns {mat3} out
- **/
- mat3.fromMat2d = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = 0;
-
- out[3] = a[2];
- out[4] = a[3];
- out[5] = 0;
-
- out[6] = a[4];
- out[7] = a[5];
- out[8] = 1;
- return out;
- };
-
- /**
- * Calculates a 3x3 matrix from the given quaternion
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {quat} q Quaternion to create matrix from
- *
- * @returns {mat3} out
- */
- mat3.fromQuat = function (out, q) {
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- yx = y * x2,
- yy = y * y2,
- zx = z * x2,
- zy = z * y2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2;
-
- out[0] = 1 - yy - zz;
- out[3] = yx - wz;
- out[6] = zx + wy;
-
- out[1] = yx + wz;
- out[4] = 1 - xx - zz;
- out[7] = zy - wx;
-
- out[2] = zx - wy;
- out[5] = zy + wx;
- out[8] = 1 - xx - yy;
-
- return out;
- };
-
- /**
- * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {mat4} a Mat4 to derive the normal matrix from
- *
- * @returns {mat3} out
- */
- mat3.normalFromMat4 = function (out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
-
- b00 = a00 * a11 - a01 * a10,
- b01 = a00 * a12 - a02 * a10,
- b02 = a00 * a13 - a03 * a10,
- b03 = a01 * a12 - a02 * a11,
- b04 = a01 * a13 - a03 * a11,
- b05 = a02 * a13 - a03 * a12,
- b06 = a20 * a31 - a21 * a30,
- b07 = a20 * a32 - a22 * a30,
- b08 = a20 * a33 - a23 * a30,
- b09 = a21 * a32 - a22 * a31,
- b10 = a21 * a33 - a23 * a31,
- b11 = a22 * a33 - a23 * a32,
-
- // Calculate the determinant
- det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
-
- if (!det) {
- return null;
- }
- det = 1.0 / det;
-
- out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
- out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
- out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
-
- out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
- out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
- out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
-
- out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
- out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
- out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
-
- return out;
- };
-
- /**
- * Returns a string representation of a mat3
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
*
- * @param {mat3} mat matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
- mat3.str = function (a) {
- return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' +
- a[3] + ', ' + a[4] + ', ' + a[5] + ', ' +
- a[6] + ', ' + a[7] + ', ' + a[8] + ')';
- };
-
- /**
- * Returns Frobenius norm of a mat3
+ * var users = {
+ * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
+ * };
*
- * @param {mat3} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
+ * var ages = {
+ * 'data': [{ 'age': 36 }, { 'age': 40 }]
+ * };
+ *
+ * _.merge(users, ages);
+ * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
*/
- mat3.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2)))
- };
-
+ var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+ });
- module.exports = mat3;
+ module.e = merge;
/***/ },
-/* 12 */
+/* 29 */
/***/ function(module, exports, __webpack_require__) {
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(8);
-
- /**
- * @class 4x4 Matrix
- * @name mat4
- */
- var mat4 = {};
-
- /**
- * Creates a new identity mat4
- *
- * @returns {mat4} a new 4x4 matrix
- */
- mat4.create = function() {
- var out = new glMatrix.ARRAY_TYPE(16);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- };
-
- /**
- * Creates a new mat4 initialized with values from an existing matrix
- *
- * @param {mat4} a matrix to clone
- * @returns {mat4} a new 4x4 matrix
- */
- mat4.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(16);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
- };
-
- /**
- * Copy the values from one mat4 to another
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
- mat4.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
- };
-
- /**
- * Set a mat4 to the identity matrix
- *
- * @param {mat4} out the receiving matrix
- * @returns {mat4} out
- */
- mat4.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- };
-
- /**
- * Transpose the values of a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
- mat4.transpose = function(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache some values
- if (out === a) {
- var a01 = a[1], a02 = a[2], a03 = a[3],
- a12 = a[6], a13 = a[7],
- a23 = a[11];
-
- out[1] = a[4];
- out[2] = a[8];
- out[3] = a[12];
- out[4] = a01;
- out[6] = a[9];
- out[7] = a[13];
- out[8] = a02;
- out[9] = a12;
- out[11] = a[14];
- out[12] = a03;
- out[13] = a13;
- out[14] = a23;
- } else {
- out[0] = a[0];
- out[1] = a[4];
- out[2] = a[8];
- out[3] = a[12];
- out[4] = a[1];
- out[5] = a[5];
- out[6] = a[9];
- out[7] = a[13];
- out[8] = a[2];
- out[9] = a[6];
- out[10] = a[10];
- out[11] = a[14];
- out[12] = a[3];
- out[13] = a[7];
- out[14] = a[11];
- out[15] = a[15];
- }
-
- return out;
- };
-
- /**
- * Inverts a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
- mat4.invert = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
-
- b00 = a00 * a11 - a01 * a10,
- b01 = a00 * a12 - a02 * a10,
- b02 = a00 * a13 - a03 * a10,
- b03 = a01 * a12 - a02 * a11,
- b04 = a01 * a13 - a03 * a11,
- b05 = a02 * a13 - a03 * a12,
- b06 = a20 * a31 - a21 * a30,
- b07 = a20 * a32 - a22 * a30,
- b08 = a20 * a33 - a23 * a30,
- b09 = a21 * a32 - a22 * a31,
- b10 = a21 * a33 - a23 * a31,
- b11 = a22 * a33 - a23 * a32,
-
- // Calculate the determinant
- det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
-
- if (!det) {
- return null;
- }
- det = 1.0 / det;
-
- out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
- out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
- out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
- out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;
- out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
- out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
- out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
- out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;
- out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
- out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
- out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
- out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;
- out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;
- out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;
- out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;
- out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;
-
- return out;
- };
-
- /**
- * Calculates the adjugate of a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
- mat4.adjoint = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];
-
- out[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));
- out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));
- out[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));
- out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));
- out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));
- out[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));
- out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));
- out[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));
- out[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));
- out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));
- out[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));
- out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));
- out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));
- out[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));
- out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));
- out[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));
- return out;
- };
-
- /**
- * Calculates the determinant of a mat4
- *
- * @param {mat4} a the source matrix
- * @returns {Number} determinant of a
- */
- mat4.determinant = function (a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
-
- b00 = a00 * a11 - a01 * a10,
- b01 = a00 * a12 - a02 * a10,
- b02 = a00 * a13 - a03 * a10,
- b03 = a01 * a12 - a02 * a11,
- b04 = a01 * a13 - a03 * a11,
- b05 = a02 * a13 - a03 * a12,
- b06 = a20 * a31 - a21 * a30,
- b07 = a20 * a32 - a22 * a30,
- b08 = a20 * a33 - a23 * a30,
- b09 = a21 * a32 - a22 * a31,
- b10 = a21 * a33 - a23 * a31,
- b11 = a22 * a33 - a23 * a32;
-
- // Calculate the determinant
- return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
- };
-
- /**
- * Multiplies two mat4's
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the first operand
- * @param {mat4} b the second operand
- * @returns {mat4} out
- */
- mat4.multiply = function (out, a, b) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];
-
- // Cache only the current line of the second matrix
- var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];
- out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
-
- b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];
- out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
-
- b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];
- out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
-
- b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];
- out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
- return out;
- };
-
- /**
- * Alias for {@link mat4.multiply}
- * @function
- */
- mat4.mul = mat4.multiply;
-
- /**
- * Translate a mat4 by the given vector
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to translate
- * @param {vec3} v vector to translate by
- * @returns {mat4} out
- */
- mat4.translate = function (out, a, v) {
- var x = v[0], y = v[1], z = v[2],
- a00, a01, a02, a03,
- a10, a11, a12, a13,
- a20, a21, a22, a23;
-
- if (a === out) {
- out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];
- out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];
- out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];
- out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];
- } else {
- a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];
- a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];
- a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];
-
- out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;
- out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;
- out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;
-
- out[12] = a00 * x + a10 * y + a20 * z + a[12];
- out[13] = a01 * x + a11 * y + a21 * z + a[13];
- out[14] = a02 * x + a12 * y + a22 * z + a[14];
- out[15] = a03 * x + a13 * y + a23 * z + a[15];
- }
-
- return out;
- };
-
- /**
- * Scales the mat4 by the dimensions in the given vec3
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to scale
- * @param {vec3} v the vec3 to scale the matrix by
- * @returns {mat4} out
- **/
- mat4.scale = function(out, a, v) {
- var x = v[0], y = v[1], z = v[2];
-
- out[0] = a[0] * x;
- out[1] = a[1] * x;
- out[2] = a[2] * x;
- out[3] = a[3] * x;
- out[4] = a[4] * y;
- out[5] = a[5] * y;
- out[6] = a[6] * y;
- out[7] = a[7] * y;
- out[8] = a[8] * z;
- out[9] = a[9] * z;
- out[10] = a[10] * z;
- out[11] = a[11] * z;
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
- };
-
- /**
- * Rotates a mat4 by the given angle around the given axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @param {vec3} axis the axis to rotate around
- * @returns {mat4} out
- */
- mat4.rotate = function (out, a, rad, axis) {
- var x = axis[0], y = axis[1], z = axis[2],
- len = Math.sqrt(x * x + y * y + z * z),
- s, c, t,
- a00, a01, a02, a03,
- a10, a11, a12, a13,
- a20, a21, a22, a23,
- b00, b01, b02,
- b10, b11, b12,
- b20, b21, b22;
-
- if (Math.abs(len) < glMatrix.EPSILON) { return null; }
-
- len = 1 / len;
- x *= len;
- y *= len;
- z *= len;
-
- s = Math.sin(rad);
- c = Math.cos(rad);
- t = 1 - c;
-
- a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];
- a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];
- a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];
-
- // Construct the elements of the rotation matrix
- b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;
- b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;
- b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;
-
- // Perform rotation-specific matrix multiplication
- out[0] = a00 * b00 + a10 * b01 + a20 * b02;
- out[1] = a01 * b00 + a11 * b01 + a21 * b02;
- out[2] = a02 * b00 + a12 * b01 + a22 * b02;
- out[3] = a03 * b00 + a13 * b01 + a23 * b02;
- out[4] = a00 * b10 + a10 * b11 + a20 * b12;
- out[5] = a01 * b10 + a11 * b11 + a21 * b12;
- out[6] = a02 * b10 + a12 * b11 + a22 * b12;
- out[7] = a03 * b10 + a13 * b11 + a23 * b12;
- out[8] = a00 * b20 + a10 * b21 + a20 * b22;
- out[9] = a01 * b20 + a11 * b21 + a21 * b22;
- out[10] = a02 * b20 + a12 * b21 + a22 * b22;
- out[11] = a03 * b20 + a13 * b21 + a23 * b22;
-
- if (a !== out) { // If the source and destination differ, copy the unchanged last row
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
- return out;
- };
-
- /**
- * Rotates a matrix by the given angle around the X axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.rotateX = function (out, a, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad),
- a10 = a[4],
- a11 = a[5],
- a12 = a[6],
- a13 = a[7],
- a20 = a[8],
- a21 = a[9],
- a22 = a[10],
- a23 = a[11];
-
- if (a !== out) { // If the source and destination differ, copy the unchanged rows
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
-
- // Perform axis-specific matrix multiplication
- out[4] = a10 * c + a20 * s;
- out[5] = a11 * c + a21 * s;
- out[6] = a12 * c + a22 * s;
- out[7] = a13 * c + a23 * s;
- out[8] = a20 * c - a10 * s;
- out[9] = a21 * c - a11 * s;
- out[10] = a22 * c - a12 * s;
- out[11] = a23 * c - a13 * s;
- return out;
- };
-
- /**
- * Rotates a matrix by the given angle around the Y axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.rotateY = function (out, a, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad),
- a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a03 = a[3],
- a20 = a[8],
- a21 = a[9],
- a22 = a[10],
- a23 = a[11];
-
- if (a !== out) { // If the source and destination differ, copy the unchanged rows
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
-
- // Perform axis-specific matrix multiplication
- out[0] = a00 * c - a20 * s;
- out[1] = a01 * c - a21 * s;
- out[2] = a02 * c - a22 * s;
- out[3] = a03 * c - a23 * s;
- out[8] = a00 * s + a20 * c;
- out[9] = a01 * s + a21 * c;
- out[10] = a02 * s + a22 * c;
- out[11] = a03 * s + a23 * c;
- return out;
- };
-
- /**
- * Rotates a matrix by the given angle around the Z axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.rotateZ = function (out, a, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad),
- a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a03 = a[3],
- a10 = a[4],
- a11 = a[5],
- a12 = a[6],
- a13 = a[7];
-
- if (a !== out) { // If the source and destination differ, copy the unchanged last row
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
-
- // Perform axis-specific matrix multiplication
- out[0] = a00 * c + a10 * s;
- out[1] = a01 * c + a11 * s;
- out[2] = a02 * c + a12 * s;
- out[3] = a03 * c + a13 * s;
- out[4] = a10 * c - a00 * s;
- out[5] = a11 * c - a01 * s;
- out[6] = a12 * c - a02 * s;
- out[7] = a13 * c - a03 * s;
- return out;
- };
-
- /**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, dest, vec);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {vec3} v Translation vector
- * @returns {mat4} out
- */
- mat4.fromTranslation = function(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.scale(dest, dest, vec);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {vec3} v Scaling vector
- * @returns {mat4} out
- */
- mat4.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = v[1];
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = v[2];
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from a given angle around a given axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotate(dest, dest, rad, axis);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @param {vec3} axis the axis to rotate around
- * @returns {mat4} out
- */
- mat4.fromRotation = function(out, rad, axis) {
- var x = axis[0], y = axis[1], z = axis[2],
- len = Math.sqrt(x * x + y * y + z * z),
- s, c, t;
-
- if (Math.abs(len) < glMatrix.EPSILON) { return null; }
-
- len = 1 / len;
- x *= len;
- y *= len;
- z *= len;
-
- s = Math.sin(rad);
- c = Math.cos(rad);
- t = 1 - c;
-
- // Perform rotation-specific matrix multiplication
- out[0] = x * x * t + c;
- out[1] = y * x * t + z * s;
- out[2] = z * x * t - y * s;
- out[3] = 0;
- out[4] = x * y * t - z * s;
- out[5] = y * y * t + c;
- out[6] = z * y * t + x * s;
- out[7] = 0;
- out[8] = x * z * t + y * s;
- out[9] = y * z * t - x * s;
- out[10] = z * z * t + c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from the given angle around the X axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateX(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.fromXRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
-
- // Perform axis-specific matrix multiplication
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = c;
- out[6] = s;
- out[7] = 0;
- out[8] = 0;
- out[9] = -s;
- out[10] = c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from the given angle around the Y axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateY(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.fromYRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
-
- // Perform axis-specific matrix multiplication
- out[0] = c;
- out[1] = 0;
- out[2] = -s;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = s;
- out[9] = 0;
- out[10] = c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from the given angle around the Z axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateZ(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.fromZRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
-
- // Perform axis-specific matrix multiplication
- out[0] = c;
- out[1] = s;
- out[2] = 0;
- out[3] = 0;
- out[4] = -s;
- out[5] = c;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from a quaternion rotation and vector translation
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * var quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {vec3} v Translation vector
- * @returns {mat4} out
- */
- mat4.fromRotationTranslation = function (out, q, v) {
- // Quaternion math
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- xy = x * y2,
- xz = x * z2,
- yy = y * y2,
- yz = y * z2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2;
-
- out[0] = 1 - (yy + zz);
- out[1] = xy + wz;
- out[2] = xz - wy;
- out[3] = 0;
- out[4] = xy - wz;
- out[5] = 1 - (xx + zz);
- out[6] = yz + wx;
- out[7] = 0;
- out[8] = xz + wy;
- out[9] = yz - wx;
- out[10] = 1 - (xx + yy);
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
-
- return out;
- };
-
- /**
- * Creates a matrix from a quaternion rotation, vector translation and vector scale
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * var quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- * mat4.scale(dest, scale)
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {vec3} v Translation vector
- * @param {vec3} s Scaling vector
- * @returns {mat4} out
- */
- mat4.fromRotationTranslationScale = function (out, q, v, s) {
- // Quaternion math
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- xy = x * y2,
- xz = x * z2,
- yy = y * y2,
- yz = y * z2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2,
- sx = s[0],
- sy = s[1],
- sz = s[2];
-
- out[0] = (1 - (yy + zz)) * sx;
- out[1] = (xy + wz) * sx;
- out[2] = (xz - wy) * sx;
- out[3] = 0;
- out[4] = (xy - wz) * sy;
- out[5] = (1 - (xx + zz)) * sy;
- out[6] = (yz + wx) * sy;
- out[7] = 0;
- out[8] = (xz + wy) * sz;
- out[9] = (yz - wx) * sz;
- out[10] = (1 - (xx + yy)) * sz;
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
-
- return out;
- };
-
- /**
- * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * mat4.translate(dest, origin);
- * var quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- * mat4.scale(dest, scale)
- * mat4.translate(dest, negativeOrigin);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {vec3} v Translation vector
- * @param {vec3} s Scaling vector
- * @param {vec3} o The origin vector around which to scale and rotate
- * @returns {mat4} out
- */
- mat4.fromRotationTranslationScaleOrigin = function (out, q, v, s, o) {
- // Quaternion math
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- xy = x * y2,
- xz = x * z2,
- yy = y * y2,
- yz = y * z2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2,
-
- sx = s[0],
- sy = s[1],
- sz = s[2],
-
- ox = o[0],
- oy = o[1],
- oz = o[2];
-
- out[0] = (1 - (yy + zz)) * sx;
- out[1] = (xy + wz) * sx;
- out[2] = (xz - wy) * sx;
- out[3] = 0;
- out[4] = (xy - wz) * sy;
- out[5] = (1 - (xx + zz)) * sy;
- out[6] = (yz + wx) * sy;
- out[7] = 0;
- out[8] = (xz + wy) * sz;
- out[9] = (yz - wx) * sz;
- out[10] = (1 - (xx + yy)) * sz;
- out[11] = 0;
- out[12] = v[0] + ox - (out[0] * ox + out[4] * oy + out[8] * oz);
- out[13] = v[1] + oy - (out[1] * ox + out[5] * oy + out[9] * oz);
- out[14] = v[2] + oz - (out[2] * ox + out[6] * oy + out[10] * oz);
- out[15] = 1;
-
- return out;
- };
-
- mat4.fromQuat = function (out, q) {
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- yx = y * x2,
- yy = y * y2,
- zx = z * x2,
- zy = z * y2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2;
-
- out[0] = 1 - yy - zz;
- out[1] = yx + wz;
- out[2] = zx - wy;
- out[3] = 0;
-
- out[4] = yx - wz;
- out[5] = 1 - xx - zz;
- out[6] = zy + wx;
- out[7] = 0;
-
- out[8] = zx + wy;
- out[9] = zy - wx;
- out[10] = 1 - xx - yy;
- out[11] = 0;
-
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
-
- return out;
- };
-
- /**
- * Generates a frustum matrix with the given bounds
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {Number} left Left bound of the frustum
- * @param {Number} right Right bound of the frustum
- * @param {Number} bottom Bottom bound of the frustum
- * @param {Number} top Top bound of the frustum
- * @param {Number} near Near bound of the frustum
- * @param {Number} far Far bound of the frustum
- * @returns {mat4} out
- */
- mat4.frustum = function (out, left, right, bottom, top, near, far) {
- var rl = 1 / (right - left),
- tb = 1 / (top - bottom),
- nf = 1 / (near - far);
- out[0] = (near * 2) * rl;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = (near * 2) * tb;
- out[6] = 0;
- out[7] = 0;
- out[8] = (right + left) * rl;
- out[9] = (top + bottom) * tb;
- out[10] = (far + near) * nf;
- out[11] = -1;
- out[12] = 0;
- out[13] = 0;
- out[14] = (far * near * 2) * nf;
- out[15] = 0;
- return out;
- };
-
- /**
- * Generates a perspective projection matrix with the given bounds
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {number} fovy Vertical field of view in radians
- * @param {number} aspect Aspect ratio. typically viewport width/height
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum
- * @returns {mat4} out
- */
- mat4.perspective = function (out, fovy, aspect, near, far) {
- var f = 1.0 / Math.tan(fovy / 2),
- nf = 1 / (near - far);
- out[0] = f / aspect;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = f;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = (far + near) * nf;
- out[11] = -1;
- out[12] = 0;
- out[13] = 0;
- out[14] = (2 * far * near) * nf;
- out[15] = 0;
- return out;
- };
-
- /**
- * Generates a perspective projection matrix with the given field of view.
- * This is primarily useful for generating projection matrices to be used
- * with the still experiemental WebVR API.
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {number} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum
- * @returns {mat4} out
- */
- mat4.perspectiveFromFieldOfView = function (out, fov, near, far) {
- var upTan = Math.tan(fov.upDegrees * Math.PI/180.0),
- downTan = Math.tan(fov.downDegrees * Math.PI/180.0),
- leftTan = Math.tan(fov.leftDegrees * Math.PI/180.0),
- rightTan = Math.tan(fov.rightDegrees * Math.PI/180.0),
- xScale = 2.0 / (leftTan + rightTan),
- yScale = 2.0 / (upTan + downTan);
-
- out[0] = xScale;
- out[1] = 0.0;
- out[2] = 0.0;
- out[3] = 0.0;
- out[4] = 0.0;
- out[5] = yScale;
- out[6] = 0.0;
- out[7] = 0.0;
- out[8] = -((leftTan - rightTan) * xScale * 0.5);
- out[9] = ((upTan - downTan) * yScale * 0.5);
- out[10] = far / (near - far);
- out[11] = -1.0;
- out[12] = 0.0;
- out[13] = 0.0;
- out[14] = (far * near) / (near - far);
- out[15] = 0.0;
- return out;
- }
-
- /**
- * Generates a orthogonal projection matrix with the given bounds
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {number} left Left bound of the frustum
- * @param {number} right Right bound of the frustum
- * @param {number} bottom Bottom bound of the frustum
- * @param {number} top Top bound of the frustum
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum
- * @returns {mat4} out
- */
- mat4.ortho = function (out, left, right, bottom, top, near, far) {
- var lr = 1 / (left - right),
- bt = 1 / (bottom - top),
- nf = 1 / (near - far);
- out[0] = -2 * lr;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = -2 * bt;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 2 * nf;
- out[11] = 0;
- out[12] = (left + right) * lr;
- out[13] = (top + bottom) * bt;
- out[14] = (far + near) * nf;
- out[15] = 1;
- return out;
- };
-
- /**
- * Generates a look-at matrix with the given eye position, focal point, and up axis
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {vec3} eye Position of the viewer
- * @param {vec3} center Point the viewer is looking at
- * @param {vec3} up vec3 pointing up
- * @returns {mat4} out
- */
- mat4.lookAt = function (out, eye, center, up) {
- var x0, x1, x2, y0, y1, y2, z0, z1, z2, len,
- eyex = eye[0],
- eyey = eye[1],
- eyez = eye[2],
- upx = up[0],
- upy = up[1],
- upz = up[2],
- centerx = center[0],
- centery = center[1],
- centerz = center[2];
-
- if (Math.abs(eyex - centerx) < glMatrix.EPSILON &&
- Math.abs(eyey - centery) < glMatrix.EPSILON &&
- Math.abs(eyez - centerz) < glMatrix.EPSILON) {
- return mat4.identity(out);
- }
-
- z0 = eyex - centerx;
- z1 = eyey - centery;
- z2 = eyez - centerz;
-
- len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);
- z0 *= len;
- z1 *= len;
- z2 *= len;
-
- x0 = upy * z2 - upz * z1;
- x1 = upz * z0 - upx * z2;
- x2 = upx * z1 - upy * z0;
- len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);
- if (!len) {
- x0 = 0;
- x1 = 0;
- x2 = 0;
- } else {
- len = 1 / len;
- x0 *= len;
- x1 *= len;
- x2 *= len;
- }
+ /**
+ * http://www.codeproject.com/Tips/407172/Connected-Component-Labeling-and-Vectorization
+ */
+ var Tracer = {
+ searchDirections: [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]],
+ create: function create(imageWrapper, labelWrapper) {
+ var imageData = imageWrapper.data,
+ labelData = labelWrapper.data,
+ searchDirections = this.searchDirections,
+ width = imageWrapper.size.x,
+ pos;
- y0 = z1 * x2 - z2 * x1;
- y1 = z2 * x0 - z0 * x2;
- y2 = z0 * x1 - z1 * x0;
+ function _trace(current, color, label, edgelabel) {
+ var i, y, x;
- len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);
- if (!len) {
- y0 = 0;
- y1 = 0;
- y2 = 0;
- } else {
- len = 1 / len;
- y0 *= len;
- y1 *= len;
- y2 *= len;
- }
+ for (i = 0; i < 7; i++) {
+ y = current.cy + searchDirections[current.dir][0];
+ x = current.cx + searchDirections[current.dir][1];
+ pos = y * width + x;
+ if (imageData[pos] === color && (labelData[pos] === 0 || labelData[pos] === label)) {
+ labelData[pos] = label;
+ current.cy = y;
+ current.cx = x;
+ return true;
+ } else {
+ if (labelData[pos] === 0) {
+ labelData[pos] = edgelabel;
+ }
+ current.dir = (current.dir + 1) % 8;
+ }
+ }
+ return false;
+ }
- out[0] = x0;
- out[1] = y0;
- out[2] = z0;
- out[3] = 0;
- out[4] = x1;
- out[5] = y1;
- out[6] = z1;
- out[7] = 0;
- out[8] = x2;
- out[9] = y2;
- out[10] = z2;
- out[11] = 0;
- out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);
- out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);
- out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);
- out[15] = 1;
+ function vertex2D(x, y, dir) {
+ return {
+ dir: dir,
+ x: x,
+ y: y,
+ next: null,
+ prev: null
+ };
+ }
- return out;
- };
+ function _contourTracing(sy, sx, label, color, edgelabel) {
+ var Fv = null,
+ Cv,
+ P,
+ ldir,
+ current = {
+ cx: sx,
+ cy: sy,
+ dir: 0
+ };
- /**
- * Returns a string representation of a mat4
- *
- * @param {mat4} mat matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
- mat4.str = function (a) {
- return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' +
- a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' +
- a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' +
- a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')';
- };
+ if (_trace(current, color, label, edgelabel)) {
+ Fv = vertex2D(sx, sy, current.dir);
+ Cv = Fv;
+ ldir = current.dir;
+ P = vertex2D(current.cx, current.cy, 0);
+ P.prev = Cv;
+ Cv.next = P;
+ P.next = null;
+ Cv = P;
+ do {
+ current.dir = (current.dir + 6) % 8;
+ _trace(current, color, label, edgelabel);
+ if (ldir !== current.dir) {
+ Cv.dir = current.dir;
+ P = vertex2D(current.cx, current.cy, 0);
+ P.prev = Cv;
+ Cv.next = P;
+ P.next = null;
+ Cv = P;
+ } else {
+ Cv.dir = ldir;
+ Cv.x = current.cx;
+ Cv.y = current.cy;
+ }
+ ldir = current.dir;
+ } while (current.cx !== sx || current.cy !== sy);
+ Fv.prev = Cv.prev;
+ Cv.prev.next = Fv;
+ }
+ return Fv;
+ }
- /**
- * Returns Frobenius norm of a mat4
- *
- * @param {mat4} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
- mat4.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2) + Math.pow(a[9], 2) + Math.pow(a[10], 2) + Math.pow(a[11], 2) + Math.pow(a[12], 2) + Math.pow(a[13], 2) + Math.pow(a[14], 2) + Math.pow(a[15], 2) ))
+ return {
+ trace: function trace(current, color, label, edgelabel) {
+ return _trace(current, color, label, edgelabel);
+ },
+ contourTracing: function contourTracing(sy, sx, label, color, edgelabel) {
+ return _contourTracing(sy, sx, label, color, edgelabel);
+ }
+ };
+ }
};
-
- module.exports = mat4;
-
+ /* harmony default export */ exports["a"] = Tracer;
/***/ },
-/* 13 */
+/* 30 */
/***/ function(module, exports, __webpack_require__) {
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__barcode_reader__ = __webpack_require__(5);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_array_helper__ = __webpack_require__(8);
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
+ function Code39Reader() {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__barcode_reader__["a"].call(this);
+ }
- var glMatrix = __webpack_require__(8);
- var mat3 = __webpack_require__(11);
- var vec3 = __webpack_require__(14);
- var vec4 = __webpack_require__(15);
+ var properties = {
+ ALPHABETH_STRING: { value: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%" },
+ ALPHABET: { value: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 45, 46, 32, 42, 36, 47, 43, 37] },
+ CHARACTER_ENCODINGS: { value: [0x034, 0x121, 0x061, 0x160, 0x031, 0x130, 0x070, 0x025, 0x124, 0x064, 0x109, 0x049, 0x148, 0x019, 0x118, 0x058, 0x00D, 0x10C, 0x04C, 0x01C, 0x103, 0x043, 0x142, 0x013, 0x112, 0x052, 0x007, 0x106, 0x046, 0x016, 0x181, 0x0C1, 0x1C0, 0x091, 0x190, 0x0D0, 0x085, 0x184, 0x0C4, 0x094, 0x0A8, 0x0A2, 0x08A, 0x02A] },
+ ASTERISK: { value: 0x094 },
+ FORMAT: { value: "code_39", writeable: false }
+ };
- /**
- * @class Quaternion
- * @name quat
- */
- var quat = {};
+ Code39Reader.prototype = Object.create(/* harmony import */__WEBPACK_IMPORTED_MODULE_0__barcode_reader__["a"].prototype, properties);
+ Code39Reader.prototype.constructor = Code39Reader;
- /**
- * Creates a new identity quat
- *
- * @returns {quat} a new quaternion
- */
- quat.create = function() {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- };
+ Code39Reader.prototype._toCounters = function (start, counter) {
+ var self = this,
+ numCounters = counter.length,
+ end = self._row.length,
+ isWhite = !self._row[start],
+ i,
+ counterPos = 0;
- /**
- * Sets a quaternion to represent the shortest rotation from one
- * vector to another.
- *
- * Both vectors are assumed to be unit length.
- *
- * @param {quat} out the receiving quaternion.
- * @param {vec3} a the initial vector
- * @param {vec3} b the destination vector
- * @returns {quat} out
- */
- quat.rotationTo = (function() {
- var tmpvec3 = vec3.create();
- var xUnitVec3 = vec3.fromValues(1,0,0);
- var yUnitVec3 = vec3.fromValues(0,1,0);
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_array_helper__["a"].init(counter, 0);
- return function(out, a, b) {
- var dot = vec3.dot(a, b);
- if (dot < -0.999999) {
- vec3.cross(tmpvec3, xUnitVec3, a);
- if (vec3.length(tmpvec3) < 0.000001)
- vec3.cross(tmpvec3, yUnitVec3, a);
- vec3.normalize(tmpvec3, tmpvec3);
- quat.setAxisAngle(out, tmpvec3, Math.PI);
- return out;
- } else if (dot > 0.999999) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
+ for (i = start; i < end; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
} else {
- vec3.cross(tmpvec3, a, b);
- out[0] = tmpvec3[0];
- out[1] = tmpvec3[1];
- out[2] = tmpvec3[2];
- out[3] = 1 + dot;
- return quat.normalize(out, out);
+ counterPos++;
+ if (counterPos === numCounters) {
+ break;
+ } else {
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
+ }
}
- };
- })();
-
- /**
- * Sets the specified quaternion with values corresponding to the given
- * axes. Each axis is a vec3 and is expected to be unit length and
- * perpendicular to all other specified axes.
- *
- * @param {vec3} view the vector representing the viewing direction
- * @param {vec3} right the vector representing the local "right" direction
- * @param {vec3} up the vector representing the local "up" direction
- * @returns {quat} out
- */
- quat.setAxes = (function() {
- var matr = mat3.create();
-
- return function(out, view, right, up) {
- matr[0] = right[0];
- matr[3] = right[1];
- matr[6] = right[2];
+ }
- matr[1] = up[0];
- matr[4] = up[1];
- matr[7] = up[2];
+ return counter;
+ };
- matr[2] = -view[0];
- matr[5] = -view[1];
- matr[8] = -view[2];
+ Code39Reader.prototype._decode = function () {
+ var self = this,
+ counters = [0, 0, 0, 0, 0, 0, 0, 0, 0],
+ result = [],
+ start = self._findStart(),
+ decodedChar,
+ lastStart,
+ pattern,
+ nextStart;
- return quat.normalize(out, quat.fromMat3(out, matr));
- };
- })();
-
- /**
- * Creates a new quat initialized with values from an existing quaternion
- *
- * @param {quat} a quaternion to clone
- * @returns {quat} a new quaternion
- * @function
- */
- quat.clone = vec4.clone;
-
- /**
- * Creates a new quat initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {quat} a new quaternion
- * @function
- */
- quat.fromValues = vec4.fromValues;
+ if (!start) {
+ return null;
+ }
+ nextStart = self._nextSet(self._row, start.end);
- /**
- * Copy the values from one quat to another
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the source quaternion
- * @returns {quat} out
- * @function
- */
- quat.copy = vec4.copy;
+ do {
+ counters = self._toCounters(nextStart, counters);
+ pattern = self._toPattern(counters);
+ if (pattern < 0) {
+ return null;
+ }
+ decodedChar = self._patternToChar(pattern);
+ if (decodedChar < 0) {
+ return null;
+ }
+ result.push(decodedChar);
+ lastStart = nextStart;
+ nextStart += /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_array_helper__["a"].sum(counters);
+ nextStart = self._nextSet(self._row, nextStart);
+ } while (decodedChar !== '*');
+ result.pop();
- /**
- * Set the components of a quat to the given values
- *
- * @param {quat} out the receiving quaternion
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {quat} out
- * @function
- */
- quat.set = vec4.set;
+ if (!result.length) {
+ return null;
+ }
- /**
- * Set a quat to the identity quaternion
- *
- * @param {quat} out the receiving quaternion
- * @returns {quat} out
- */
- quat.identity = function(out) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- };
+ if (!self._verifyTrailingWhitespace(lastStart, nextStart, counters)) {
+ return null;
+ }
- /**
- * Sets a quat from the given angle and rotation axis,
- * then returns it.
- *
- * @param {quat} out the receiving quaternion
- * @param {vec3} axis the axis around which to rotate
- * @param {Number} rad the angle in radians
- * @returns {quat} out
- **/
- quat.setAxisAngle = function(out, axis, rad) {
- rad = rad * 0.5;
- var s = Math.sin(rad);
- out[0] = s * axis[0];
- out[1] = s * axis[1];
- out[2] = s * axis[2];
- out[3] = Math.cos(rad);
- return out;
+ return {
+ code: result.join(""),
+ start: start.start,
+ end: nextStart,
+ startInfo: start,
+ decodedCodes: result
+ };
};
- /**
- * Adds two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @returns {quat} out
- * @function
- */
- quat.add = vec4.add;
-
- /**
- * Multiplies two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @returns {quat} out
- */
- quat.multiply = function(out, a, b) {
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bx = b[0], by = b[1], bz = b[2], bw = b[3];
+ Code39Reader.prototype._verifyTrailingWhitespace = function (lastStart, nextStart, counters) {
+ var trailingWhitespaceEnd,
+ patternSize = /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_array_helper__["a"].sum(counters);
- out[0] = ax * bw + aw * bx + ay * bz - az * by;
- out[1] = ay * bw + aw * by + az * bx - ax * bz;
- out[2] = az * bw + aw * bz + ax * by - ay * bx;
- out[3] = aw * bw - ax * bx - ay * by - az * bz;
- return out;
+ trailingWhitespaceEnd = nextStart - lastStart - patternSize;
+ if (trailingWhitespaceEnd * 3 >= patternSize) {
+ return true;
+ }
+ return false;
};
- /**
- * Alias for {@link quat.multiply}
- * @function
- */
- quat.mul = quat.multiply;
-
- /**
- * Scales a quat by a scalar number
- *
- * @param {quat} out the receiving vector
- * @param {quat} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {quat} out
- * @function
- */
- quat.scale = vec4.scale;
-
- /**
- * Rotates a quaternion by the given angle about the X axis
- *
- * @param {quat} out quat receiving operation result
- * @param {quat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
- quat.rotateX = function (out, a, rad) {
- rad *= 0.5;
-
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bx = Math.sin(rad), bw = Math.cos(rad);
+ Code39Reader.prototype._patternToChar = function (pattern) {
+ var i,
+ self = this;
- out[0] = ax * bw + aw * bx;
- out[1] = ay * bw + az * bx;
- out[2] = az * bw - ay * bx;
- out[3] = aw * bw - ax * bx;
- return out;
+ for (i = 0; i < self.CHARACTER_ENCODINGS.length; i++) {
+ if (self.CHARACTER_ENCODINGS[i] === pattern) {
+ return String.fromCharCode(self.ALPHABET[i]);
+ }
+ }
+ return -1;
};
- /**
- * Rotates a quaternion by the given angle about the Y axis
- *
- * @param {quat} out quat receiving operation result
- * @param {quat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
- quat.rotateY = function (out, a, rad) {
- rad *= 0.5;
+ Code39Reader.prototype._findNextWidth = function (counters, current) {
+ var i,
+ minWidth = Number.MAX_VALUE;
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- by = Math.sin(rad), bw = Math.cos(rad);
+ for (i = 0; i < counters.length; i++) {
+ if (counters[i] < minWidth && counters[i] > current) {
+ minWidth = counters[i];
+ }
+ }
- out[0] = ax * bw - az * by;
- out[1] = ay * bw + aw * by;
- out[2] = az * bw + ax * by;
- out[3] = aw * bw - ay * by;
- return out;
+ return minWidth;
};
- /**
- * Rotates a quaternion by the given angle about the Z axis
- *
- * @param {quat} out quat receiving operation result
- * @param {quat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
- quat.rotateZ = function (out, a, rad) {
- rad *= 0.5;
-
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bz = Math.sin(rad), bw = Math.cos(rad);
-
- out[0] = ax * bw + ay * bz;
- out[1] = ay * bw - ax * bz;
- out[2] = az * bw + aw * bz;
- out[3] = aw * bw - az * bz;
- return out;
- };
+ Code39Reader.prototype._toPattern = function (counters) {
+ var numCounters = counters.length,
+ maxNarrowWidth = 0,
+ numWideBars = numCounters,
+ wideBarWidth = 0,
+ self = this,
+ pattern,
+ i;
- /**
- * Calculates the W component of a quat from the X, Y, and Z components.
- * Assumes that quaternion is 1 unit in length.
- * Any existing W component will be ignored.
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quat to calculate W component of
- * @returns {quat} out
- */
- quat.calculateW = function (out, a) {
- var x = a[0], y = a[1], z = a[2];
+ while (numWideBars > 3) {
+ maxNarrowWidth = self._findNextWidth(counters, maxNarrowWidth);
+ numWideBars = 0;
+ pattern = 0;
+ for (i = 0; i < numCounters; i++) {
+ if (counters[i] > maxNarrowWidth) {
+ pattern |= 1 << numCounters - 1 - i;
+ numWideBars++;
+ wideBarWidth += counters[i];
+ }
+ }
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));
- return out;
+ if (numWideBars === 3) {
+ for (i = 0; i < numCounters && numWideBars > 0; i++) {
+ if (counters[i] > maxNarrowWidth) {
+ numWideBars--;
+ if (counters[i] * 2 >= wideBarWidth) {
+ return -1;
+ }
+ }
+ }
+ return pattern;
+ }
+ }
+ return -1;
};
- /**
- * Calculates the dot product of two quat's
- *
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @returns {Number} dot product of a and b
- * @function
- */
- quat.dot = vec4.dot;
-
- /**
- * Performs a linear interpolation between two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {quat} out
- * @function
- */
- quat.lerp = vec4.lerp;
-
- /**
- * Performs a spherical linear interpolation between two quat
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {quat} out
- */
- quat.slerp = function (out, a, b, t) {
- // benchmarks:
- // http://jsperf.com/quaternion-slerp-implementations
-
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bx = b[0], by = b[1], bz = b[2], bw = b[3];
-
- var omega, cosom, sinom, scale0, scale1;
-
- // calc cosine
- cosom = ax * bx + ay * by + az * bz + aw * bw;
- // adjust signs (if necessary)
- if ( cosom < 0.0 ) {
- cosom = -cosom;
- bx = - bx;
- by = - by;
- bz = - bz;
- bw = - bw;
- }
- // calculate coefficients
- if ( (1.0 - cosom) > 0.000001 ) {
- // standard case (slerp)
- omega = Math.acos(cosom);
- sinom = Math.sin(omega);
- scale0 = Math.sin((1.0 - t) * omega) / sinom;
- scale1 = Math.sin(t * omega) / sinom;
- } else {
- // "from" and "to" quaternions are very close
- // ... so we can do a linear interpolation
- scale0 = 1.0 - t;
- scale1 = t;
- }
- // calculate final values
- out[0] = scale0 * ax + scale1 * bx;
- out[1] = scale0 * ay + scale1 * by;
- out[2] = scale0 * az + scale1 * bz;
- out[3] = scale0 * aw + scale1 * bw;
-
- return out;
- };
-
- /**
- * Performs a spherical linear interpolation with two control points
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @param {quat} c the third operand
- * @param {quat} d the fourth operand
- * @param {Number} t interpolation amount
- * @returns {quat} out
- */
- quat.sqlerp = (function () {
- var temp1 = quat.create();
- var temp2 = quat.create();
-
- return function (out, a, b, c, d, t) {
- quat.slerp(temp1, a, d, t);
- quat.slerp(temp2, b, c, t);
- quat.slerp(out, temp1, temp2, 2 * t * (1 - t));
-
- return out;
- };
- }());
+ Code39Reader.prototype._findStart = function () {
+ var self = this,
+ offset = self._nextSet(self._row),
+ patternStart = offset,
+ counter = [0, 0, 0, 0, 0, 0, 0, 0, 0],
+ counterPos = 0,
+ isWhite = false,
+ i,
+ j,
+ whiteSpaceMustStart;
- /**
- * Calculates the inverse of a quat
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quat to calculate inverse of
- * @returns {quat} out
- */
- quat.invert = function(out, a) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
- dot = a0*a0 + a1*a1 + a2*a2 + a3*a3,
- invDot = dot ? 1.0/dot : 0;
-
- // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ if (counterPos === counter.length - 1) {
+ // find start pattern
+ if (self._toPattern(counter) === self.ASTERISK) {
+ whiteSpaceMustStart = Math.floor(Math.max(0, patternStart - (i - patternStart) / 4));
+ if (self._matchRange(whiteSpaceMustStart, patternStart, 0)) {
+ return {
+ start: patternStart,
+ end: i
+ };
+ }
+ }
- out[0] = -a0*invDot;
- out[1] = -a1*invDot;
- out[2] = -a2*invDot;
- out[3] = a3*invDot;
- return out;
+ patternStart += counter[0] + counter[1];
+ for (j = 0; j < 7; j++) {
+ counter[j] = counter[j + 2];
+ }
+ counter[7] = 0;
+ counter[8] = 0;
+ counterPos--;
+ } else {
+ counterPos++;
+ }
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
+ }
+ }
+ return null;
};
- /**
- * Calculates the conjugate of a quat
- * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quat to calculate conjugate of
- * @returns {quat} out
- */
- quat.conjugate = function (out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = a[3];
- return out;
- };
+ /* harmony default export */ exports["a"] = Code39Reader;
+
+/***/ },
+/* 31 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = dot
/**
- * Calculates the length of a quat
+ * Calculates the dot product of two vec2's
*
- * @param {quat} a vector to calculate length of
- * @returns {Number} length of a
- * @function
- */
- quat.length = vec4.length;
-
- /**
- * Alias for {@link quat.length}
- * @function
+ * @param {vec2} a the first operand
+ * @param {vec2} b the second operand
+ * @returns {Number} dot product of a and b
*/
- quat.len = quat.length;
+ function dot(a, b) {
+ return a[0] * b[0] + a[1] * b[1]
+ }
+
+/***/ },
+/* 32 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var stackClear = __webpack_require__(133),
+ stackDelete = __webpack_require__(134),
+ stackGet = __webpack_require__(135),
+ stackHas = __webpack_require__(136),
+ stackSet = __webpack_require__(137);
/**
- * Calculates the squared length of a quat
+ * Creates a stack cache object to store key-value pairs.
*
- * @param {quat} a vector to calculate squared length of
- * @returns {Number} squared length of a
- * @function
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
*/
- quat.squaredLength = vec4.squaredLength;
+ function Stack(values) {
+ var index = -1,
+ length = values ? values.length : 0;
- /**
- * Alias for {@link quat.squaredLength}
- * @function
- */
- quat.sqrLen = quat.squaredLength;
+ this.clear();
+ while (++index < length) {
+ var entry = values[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
- /**
- * Normalize a quat
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quaternion to normalize
- * @returns {quat} out
- * @function
- */
- quat.normalize = vec4.normalize;
+ // Add functions to the `Stack` cache.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+ module.e = Stack;
+
+
+/***/ },
+/* 33 */
+/***/ function(module, exports, __webpack_require__) {
+
/**
- * Creates a quaternion from the given 3x3 rotation matrix.
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
*
- * NOTE: The resultant quaternion is not normalized, so you should be sure
- * to renormalize the quaternion yourself where necessary.
- *
- * @param {quat} out the receiving quaternion
- * @param {mat3} m rotation matrix
- * @returns {quat} out
- * @function
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
*/
- quat.fromMat3 = function(out, m) {
- // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes
- // article "Quaternion Calculus and Fast Animation".
- var fTrace = m[0] + m[4] + m[8];
- var fRoot;
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array.length;
- if ( fTrace > 0.0 ) {
- // |w| > 1/2, may as well choose w > 1/2
- fRoot = Math.sqrt(fTrace + 1.0); // 2w
- out[3] = 0.5 * fRoot;
- fRoot = 0.5/fRoot; // 1/(4w)
- out[0] = (m[5]-m[7])*fRoot;
- out[1] = (m[6]-m[2])*fRoot;
- out[2] = (m[1]-m[3])*fRoot;
- } else {
- // |w| <= 1/2
- var i = 0;
- if ( m[4] > m[0] )
- i = 1;
- if ( m[8] > m[i*3+i] )
- i = 2;
- var j = (i+1)%3;
- var k = (i+2)%3;
-
- fRoot = Math.sqrt(m[i*3+i]-m[j*3+j]-m[k*3+k] + 1.0);
- out[i] = 0.5 * fRoot;
- fRoot = 0.5 / fRoot;
- out[3] = (m[j*3+k] - m[k*3+j]) * fRoot;
- out[j] = (m[j*3+i] + m[i*3+j]) * fRoot;
- out[k] = (m[k*3+i] + m[i*3+k]) * fRoot;
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
}
-
- return out;
- };
+ }
+ return array;
+ }
+
+ module.e = arrayEach;
+
+
+/***/ },
+/* 34 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var eq = __webpack_require__(15);
/**
- * Returns a string representation of a quatenion
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
*
- * @param {quat} vec vector to represent as a string
- * @returns {String} string representation of the vector
- */
- quat.str = function (a) {
- return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';
- };
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (typeof key == 'number' && value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
- module.exports = quat;
+ module.e = assignMergeValue;
/***/ },
-/* 14 */
+/* 35 */
/***/ function(module, exports, __webpack_require__) {
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
+ var eq = __webpack_require__(15);
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(8);
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- /**
- * @class 3 Dimensional Vector
- * @name vec3
- */
- var vec3 = {};
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * Creates a new, empty vec3
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
*
- * @returns {vec3} a new 3D vector
- */
- vec3.create = function() {
- var out = new glMatrix.ARRAY_TYPE(3);
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- return out;
- };
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
- /**
- * Creates a new vec3 initialized with values from an existing vector
- *
- * @param {vec3} a vector to clone
- * @returns {vec3} a new 3D vector
- */
- vec3.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(3);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- return out;
- };
+ module.e = assignValue;
+
+
+/***/ },
+/* 36 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assocIndexOf = __webpack_require__(11);
- /**
- * Creates a new vec3 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @returns {vec3} a new 3D vector
- */
- vec3.fromValues = function(x, y, z) {
- var out = new glMatrix.ARRAY_TYPE(3);
- out[0] = x;
- out[1] = y;
- out[2] = z;
- return out;
- };
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype;
- /**
- * Copy the values from one vec3 to another
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the source vector
- * @returns {vec3} out
- */
- vec3.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- return out;
- };
+ /** Built-in value references. */
+ var splice = arrayProto.splice;
/**
- * Set the components of a vec3 to the given values
+ * Removes `key` and its value from the associative array.
*
- * @param {vec3} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @returns {vec3} out
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
- vec3.set = function(out, x, y, z) {
- out[0] = x;
- out[1] = y;
- out[2] = z;
- return out;
- };
+ function assocDelete(array, key) {
+ var index = assocIndexOf(array, key);
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = array.length - 1;
+ if (index == lastIndex) {
+ array.pop();
+ } else {
+ splice.call(array, index, 1);
+ }
+ return true;
+ }
- /**
- * Adds two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
- vec3.add = function(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- return out;
- };
+ module.e = assocDelete;
+
+
+/***/ },
+/* 37 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assocIndexOf = __webpack_require__(11);
/**
- * Subtracts vector b from vector a
+ * Gets the associative array value for `key`.
*
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
*/
- vec3.subtract = function(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- return out;
- };
+ function assocGet(array, key) {
+ var index = assocIndexOf(array, key);
+ return index < 0 ? undefined : array[index][1];
+ }
- /**
- * Alias for {@link vec3.subtract}
- * @function
- */
- vec3.sub = vec3.subtract;
+ module.e = assocGet;
+
+
+/***/ },
+/* 38 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assocIndexOf = __webpack_require__(11);
/**
- * Multiplies two vec3's
+ * Checks if an associative array value for `key` exists.
*
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
- vec3.multiply = function(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- out[2] = a[2] * b[2];
- return out;
- };
+ function assocHas(array, key) {
+ return assocIndexOf(array, key) > -1;
+ }
- /**
- * Alias for {@link vec3.multiply}
- * @function
- */
- vec3.mul = vec3.multiply;
+ module.e = assocHas;
+
+
+/***/ },
+/* 39 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assocIndexOf = __webpack_require__(11);
/**
- * Divides two vec3's
+ * Sets the associative array `key` to `value`.
*
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
- vec3.divide = function(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- out[2] = a[2] / b[2];
- return out;
- };
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ */
+ function assocSet(array, key, value) {
+ var index = assocIndexOf(array, key);
+ if (index < 0) {
+ array.push([key, value]);
+ } else {
+ array[index][1] = value;
+ }
+ }
- /**
- * Alias for {@link vec3.divide}
- * @function
- */
- vec3.div = vec3.divide;
+ module.e = assocSet;
+
+
+/***/ },
+/* 40 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Uint8Array = __webpack_require__(84);
/**
- * Returns the minimum of two vec3's
+ * Creates a clone of `arrayBuffer`.
*
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
*/
- vec3.min = function(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- out[2] = Math.min(a[2], b[2]);
- return out;
- };
+ function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+ }
+ module.e = cloneArrayBuffer;
+
+
+/***/ },
+/* 41 */
+/***/ function(module, exports, __webpack_require__) {
+
/**
- * Returns the maximum of two vec3's
+ * Copies the values of `source` to `array`.
*
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
*/
- vec3.max = function(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- out[2] = Math.max(a[2], b[2]);
- return out;
- };
+ function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
- /**
- * Scales a vec3 by a scalar number
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec3} out
- */
- vec3.scale = function(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- return out;
- };
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
- /**
- * Adds two vec3's after scaling the second operand by a scalar value
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec3} out
- */
- vec3.scaleAndAdd = function(out, a, b, scale) {
- out[0] = a[0] + (b[0] * scale);
- out[1] = a[1] + (b[1] * scale);
- out[2] = a[2] + (b[2] * scale);
- return out;
- };
+ module.e = copyArray;
+
+
+/***/ },
+/* 42 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var nativeCreate = __webpack_require__(14);
- /**
- * Calculates the euclidian distance between two vec3's
- *
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {Number} distance between a and b
- */
- vec3.distance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2];
- return Math.sqrt(x*x + y*y + z*z);
- };
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- /**
- * Alias for {@link vec3.distance}
- * @function
- */
- vec3.dist = vec3.distance;
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * Calculates the squared euclidian distance between two vec3's
+ * Checks if a hash value for `key` exists.
*
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {Number} squared distance between a and b
+ * @private
+ * @param {Object} hash The hash to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
- vec3.squaredDistance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2];
- return x*x + y*y + z*z;
- };
+ function hashHas(hash, key) {
+ return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
+ }
- /**
- * Alias for {@link vec3.squaredDistance}
- * @function
- */
- vec3.sqrDist = vec3.squaredDistance;
+ module.e = hashHas;
+
+
+/***/ },
+/* 43 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseTimes = __webpack_require__(103),
+ isArguments = __webpack_require__(24),
+ isArray = __webpack_require__(4),
+ isLength = __webpack_require__(27),
+ isString = __webpack_require__(142);
/**
- * Calculates the length of a vec3
+ * Creates an array of index keys for `object` values of arrays,
+ * `arguments` objects, and strings, otherwise `null` is returned.
*
- * @param {vec3} a vector to calculate length of
- * @returns {Number} length of a
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array|null} Returns index keys, else `null`.
*/
- vec3.length = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2];
- return Math.sqrt(x*x + y*y + z*z);
- };
+ function indexKeys(object) {
+ var length = object ? object.length : undefined;
+ if (isLength(length) &&
+ (isArray(object) || isString(object) || isArguments(object))) {
+ return baseTimes(length, String);
+ }
+ return null;
+ }
- /**
- * Alias for {@link vec3.length}
- * @function
- */
- vec3.len = vec3.length;
+ module.e = indexKeys;
+
+
+/***/ },
+/* 44 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isLength = __webpack_require__(27),
+ isObjectLike = __webpack_require__(7);
- /**
- * Calculates the squared length of a vec3
- *
- * @param {vec3} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
- vec3.squaredLength = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2];
- return x*x + y*y + z*z;
- };
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
- /**
- * Alias for {@link vec3.squaredLength}
- * @function
- */
- vec3.sqrLen = vec3.squaredLength;
+ var arrayBufferTag = '[object ArrayBuffer]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
- /**
- * Negates the components of a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a vector to negate
- * @returns {vec3} out
- */
- vec3.negate = function(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- return out;
- };
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dateTag] = typedArrayTags[errorTag] =
+ typedArrayTags[funcTag] = typedArrayTags[mapTag] =
+ typedArrayTags[numberTag] = typedArrayTags[objectTag] =
+ typedArrayTags[regexpTag] = typedArrayTags[setTag] =
+ typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
- /**
- * Returns the inverse of the components of a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a vector to invert
- * @returns {vec3} out
- */
- vec3.inverse = function(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- out[2] = 1.0 / a[2];
- return out;
- };
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
/**
- * Normalize a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a vector to normalize
- * @returns {vec3} out
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
*/
- vec3.normalize = function(out, a) {
- var x = a[0],
- y = a[1],
- z = a[2];
- var len = x*x + y*y + z*z;
- if (len > 0) {
- //TODO: evaluate use of glm_invsqrt here?
- len = 1 / Math.sqrt(len);
- out[0] = a[0] * len;
- out[1] = a[1] * len;
- out[2] = a[2] * len;
- }
- return out;
- };
+ var objectToString = objectProto.toString;
/**
- * Calculates the dot product of two vec3's
+ * Checks if `value` is classified as a typed array.
*
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {Number} dot product of a and b
- */
- vec3.dot = function (a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
- };
-
- /**
- * Computes the cross product of two vec3's
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
*
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
- vec3.cross = function(out, a, b) {
- var ax = a[0], ay = a[1], az = a[2],
- bx = b[0], by = b[1], bz = b[2];
-
- out[0] = ay * bz - az * by;
- out[1] = az * bx - ax * bz;
- out[2] = ax * by - ay * bx;
- return out;
- };
-
- /**
- * Performs a linear interpolation between two vec3's
+ * _.isTypedArray(new Uint8Array);
+ * // => true
*
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec3} out
+ * _.isTypedArray([]);
+ * // => false
*/
- vec3.lerp = function (out, a, b, t) {
- var ax = a[0],
- ay = a[1],
- az = a[2];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- out[2] = az + t * (b[2] - az);
- return out;
- };
+ function isTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
+ }
- /**
- * Performs a hermite interpolation with two control points
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {vec3} c the third operand
- * @param {vec3} d the fourth operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec3} out
- */
- vec3.hermite = function (out, a, b, c, d, t) {
- var factorTimes2 = t * t,
- factor1 = factorTimes2 * (2 * t - 3) + 1,
- factor2 = factorTimes2 * (t - 2) + t,
- factor3 = factorTimes2 * (t - 1),
- factor4 = factorTimes2 * (3 - 2 * t);
-
- out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
- out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
- out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
-
- return out;
- };
+ module.e = isTypedArray;
+
+
+/***/ },
+/* 45 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseHas = __webpack_require__(96),
+ baseKeys = __webpack_require__(97),
+ indexKeys = __webpack_require__(43),
+ isArrayLike = __webpack_require__(25),
+ isIndex = __webpack_require__(22),
+ isPrototype = __webpack_require__(23);
/**
- * Performs a bezier interpolation with two control points
+ * Creates an array of the own enumerable property names of `object`.
*
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {vec3} c the third operand
- * @param {vec3} d the fourth operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec3} out
- */
- vec3.bezier = function (out, a, b, c, d, t) {
- var inverseFactor = 1 - t,
- inverseFactorTimesTwo = inverseFactor * inverseFactor,
- factorTimes2 = t * t,
- factor1 = inverseFactorTimesTwo * inverseFactor,
- factor2 = 3 * t * inverseFactorTimesTwo,
- factor3 = 3 * factorTimes2 * inverseFactor,
- factor4 = factorTimes2 * t;
-
- out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
- out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
- out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
-
- return out;
- };
-
- /**
- * Generates a random vector with the given scale
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
+ * for more details.
*
- * @param {vec3} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec3} out
- */
- vec3.random = function (out, scale) {
- scale = scale || 1.0;
-
- var r = glMatrix.RANDOM() * 2.0 * Math.PI;
- var z = (glMatrix.RANDOM() * 2.0) - 1.0;
- var zScale = Math.sqrt(1.0-z*z) * scale;
-
- out[0] = Math.cos(r) * zScale;
- out[1] = Math.sin(r) * zScale;
- out[2] = z * scale;
- return out;
- };
-
- /**
- * Transforms the vec3 with a mat4.
- * 4th vector component is implicitly '1'
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
*
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to transform
- * @param {mat4} m matrix to transform with
- * @returns {vec3} out
- */
- vec3.transformMat4 = function(out, a, m) {
- var x = a[0], y = a[1], z = a[2],
- w = m[3] * x + m[7] * y + m[11] * z + m[15];
- w = w || 1.0;
- out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;
- out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;
- out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;
- return out;
- };
-
- /**
- * Transforms the vec3 with a mat3.
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to transform
- * @param {mat4} m the 3x3 matrix to transform with
- * @returns {vec3} out
- */
- vec3.transformMat3 = function(out, a, m) {
- var x = a[0], y = a[1], z = a[2];
- out[0] = x * m[0] + y * m[3] + z * m[6];
- out[1] = x * m[1] + y * m[4] + z * m[7];
- out[2] = x * m[2] + y * m[5] + z * m[8];
- return out;
- };
-
- /**
- * Transforms the vec3 with a quat
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to transform
- * @param {quat} q quaternion to transform with
- * @returns {vec3} out
- */
- vec3.transformQuat = function(out, a, q) {
- // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations
-
- var x = a[0], y = a[1], z = a[2],
- qx = q[0], qy = q[1], qz = q[2], qw = q[3],
-
- // calculate quat * vec
- ix = qw * x + qy * z - qz * y,
- iy = qw * y + qz * x - qx * z,
- iz = qw * z + qx * y - qy * x,
- iw = -qx * x - qy * y - qz * z;
-
- // calculate result * inverse quat
- out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
- out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
- out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
- return out;
- };
-
- /**
- * Rotate a 3D vector around the x-axis
- * @param {vec3} out The receiving vec3
- * @param {vec3} a The vec3 point to rotate
- * @param {vec3} b The origin of the rotation
- * @param {Number} c The angle of rotation
- * @returns {vec3} out
- */
- vec3.rotateX = function(out, a, b, c){
- var p = [], r=[];
- //Translate point to the origin
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2];
-
- //perform rotation
- r[0] = p[0];
- r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c);
- r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c);
-
- //translate to correct position
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
-
- return out;
- };
-
- /**
- * Rotate a 3D vector around the y-axis
- * @param {vec3} out The receiving vec3
- * @param {vec3} a The vec3 point to rotate
- * @param {vec3} b The origin of the rotation
- * @param {Number} c The angle of rotation
- * @returns {vec3} out
- */
- vec3.rotateY = function(out, a, b, c){
- var p = [], r=[];
- //Translate point to the origin
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2];
-
- //perform rotation
- r[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c);
- r[1] = p[1];
- r[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c);
-
- //translate to correct position
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
-
- return out;
- };
-
- /**
- * Rotate a 3D vector around the z-axis
- * @param {vec3} out The receiving vec3
- * @param {vec3} a The vec3 point to rotate
- * @param {vec3} b The origin of the rotation
- * @param {Number} c The angle of rotation
- * @returns {vec3} out
- */
- vec3.rotateZ = function(out, a, b, c){
- var p = [], r=[];
- //Translate point to the origin
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2];
-
- //perform rotation
- r[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c);
- r[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c);
- r[2] = p[2];
-
- //translate to correct position
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
-
- return out;
- };
-
- /**
- * Perform some operation over an array of vec3s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
- vec3.forEach = (function() {
- var vec = vec3.create();
-
- return function(a, stride, offset, count, fn, arg) {
- var i, l;
- if(!stride) {
- stride = 3;
- }
-
- if(!offset) {
- offset = 0;
- }
-
- if(count) {
- l = Math.min((count * stride) + offset, a.length);
- } else {
- l = a.length;
- }
-
- for(i = offset; i < l; i += stride) {
- vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2];
- fn(vec, vec, arg);
- a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2];
- }
-
- return a;
- };
- })();
-
- /**
- * Get the angle between two 3D vectors
- * @param {vec3} a The first operand
- * @param {vec3} b The second operand
- * @returns {Number} The angle in radians
- */
- vec3.angle = function(a, b) {
-
- var tempA = vec3.fromValues(a[0], a[1], a[2]);
- var tempB = vec3.fromValues(b[0], b[1], b[2]);
-
- vec3.normalize(tempA, tempA);
- vec3.normalize(tempB, tempB);
-
- var cosine = vec3.dot(tempA, tempB);
-
- if(cosine > 1.0){
- return 0;
- } else {
- return Math.acos(cosine);
- }
- };
-
- /**
- * Returns a string representation of a vector
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
*
- * @param {vec3} vec vector to represent as a string
- * @returns {String} string representation of the vector
+ * _.keys('hi');
+ * // => ['0', '1']
*/
- vec3.str = function (a) {
- return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')';
- };
+ function keys(object) {
+ var isProto = isPrototype(object);
+ if (!(isProto || isArrayLike(object))) {
+ return baseKeys(object);
+ }
+ var indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
+
+ for (var key in object) {
+ if (baseHas(object, key) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(isProto && key == 'constructor')) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
- module.exports = vec3;
+ module.e = keys;
/***/ },
-/* 15 */
+/* 46 */
/***/ function(module, exports, __webpack_require__) {
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(8);
-
- /**
- * @class 4 Dimensional Vector
- * @name vec4
- */
- var vec4 = {};
-
- /**
- * Creates a new, empty vec4
- *
- * @returns {vec4} a new 4D vector
- */
- vec4.create = function() {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- return out;
- };
+ var baseKeysIn = __webpack_require__(98),
+ indexKeys = __webpack_require__(43),
+ isIndex = __webpack_require__(22),
+ isPrototype = __webpack_require__(23);
- /**
- * Creates a new vec4 initialized with values from an existing vector
- *
- * @param {vec4} a vector to clone
- * @returns {vec4} a new 4D vector
- */
- vec4.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
- };
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- /**
- * Creates a new vec4 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {vec4} a new 4D vector
- */
- vec4.fromValues = function(x, y, z, w) {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = w;
- return out;
- };
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * Copy the values from one vec4 to another
+ * Creates an array of the own and inherited enumerable property names of `object`.
*
- * @param {vec4} out the receiving vector
- * @param {vec4} a the source vector
- * @returns {vec4} out
- */
- vec4.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
- };
-
- /**
- * Set the components of a vec4 to the given values
+ * **Note:** Non-object values are coerced to objects.
*
- * @param {vec4} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {vec4} out
- */
- vec4.set = function(out, x, y, z, w) {
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = w;
- return out;
- };
-
- /**
- * Adds two vec4's
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
*
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
- vec4.add = function(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- out[3] = a[3] + b[3];
- return out;
- };
-
- /**
- * Subtracts vector b from vector a
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
*
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
- vec4.subtract = function(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- out[3] = a[3] - b[3];
- return out;
- };
-
- /**
- * Alias for {@link vec4.subtract}
- * @function
- */
- vec4.sub = vec4.subtract;
-
- /**
- * Multiplies two vec4's
+ * Foo.prototype.c = 3;
*
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
- vec4.multiply = function(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- out[2] = a[2] * b[2];
- out[3] = a[3] * b[3];
- return out;
- };
+ function keysIn(object) {
+ var index = -1,
+ isProto = isPrototype(object),
+ props = baseKeysIn(object),
+ propsLength = props.length,
+ indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
- /**
- * Alias for {@link vec4.multiply}
- * @function
- */
- vec4.mul = vec4.multiply;
+ while (++index < propsLength) {
+ var key = props[index];
+ if (!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
- /**
- * Divides two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
- vec4.divide = function(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- out[2] = a[2] / b[2];
- out[3] = a[3] / b[3];
- return out;
- };
+ module.e = keysIn;
+
+
+/***/ },
+/* 47 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var apply = __webpack_require__(88),
+ toInteger = __webpack_require__(144);
- /**
- * Alias for {@link vec4.divide}
- * @function
- */
- vec4.div = vec4.divide;
+ /** Used as the `TypeError` message for "Functions" methods. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
- /**
- * Returns the minimum of two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
- vec4.min = function(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- out[2] = Math.min(a[2], b[2]);
- out[3] = Math.min(a[3], b[3]);
- return out;
- };
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeMax = Math.max;
/**
- * Returns the maximum of two vec4's
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as an array.
*
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
- vec4.max = function(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- out[2] = Math.max(a[2], b[2]);
- out[3] = Math.max(a[3], b[3]);
- return out;
- };
-
- /**
- * Scales a vec4 by a scalar number
+ * **Note:** This method is based on the [rest parameter](https://mdn.io/rest_parameters).
*
- * @param {vec4} out the receiving vector
- * @param {vec4} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec4} out
- */
- vec4.scale = function(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- out[3] = a[3] * b;
- return out;
- };
-
- /**
- * Adds two vec4's after scaling the second operand by a scalar value
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
*
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec4} out
- */
- vec4.scaleAndAdd = function(out, a, b, scale) {
- out[0] = a[0] + (b[0] * scale);
- out[1] = a[1] + (b[1] * scale);
- out[2] = a[2] + (b[2] * scale);
- out[3] = a[3] + (b[3] * scale);
- return out;
- };
-
- /**
- * Calculates the euclidian distance between two vec4's
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
*
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {Number} distance between a and b
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
*/
- vec4.distance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2],
- w = b[3] - a[3];
- return Math.sqrt(x*x + y*y + z*z + w*w);
- };
+ function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
- /**
- * Alias for {@link vec4.distance}
- * @function
- */
- vec4.dist = vec4.distance;
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ switch (start) {
+ case 0: return func.call(this, array);
+ case 1: return func.call(this, args[0], array);
+ case 2: return func.call(this, args[0], args[1], array);
+ }
+ var otherArgs = Array(start + 1);
+ index = -1;
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = array;
+ return apply(func, this, otherArgs);
+ };
+ }
- /**
- * Calculates the squared euclidian distance between two vec4's
- *
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {Number} squared distance between a and b
- */
- vec4.squaredDistance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2],
- w = b[3] - a[3];
- return x*x + y*y + z*z + w*w;
- };
+ module.e = rest;
+
+
+/***/ },
+/* 48 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = function(module) {
+ if(!module.webpackPolyfill) {
+ module.deprecate = function() {};
+ module.paths = [];
+ // module.parent = undefined by default
+ module.children = [];
+ Object.defineProperty(module, "exports", {
+ enumerable: true,
+ configurable: false,
+ get: function() { return module.e; },
+ set: function(v) { return module.e = v; }
+ });
+ Object.defineProperty(module, "loaded", {
+ enumerable: true,
+ configurable: false,
+ get: function() { return module.l; }
+ });
+ Object.defineProperty(module, "id", {
+ enumerable: true,
+ configurable: false,
+ get: function() { return module.i; }
+ });
+ module.webpackPolyfill = 1;
+ }
+ return module;
+ }
+
+
+/***/ },
+/* 49 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_merge__ = __webpack_require__(28);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_merge___default = __WEBPACK_IMPORTED_MODULE_0_lodash_merge__ && __WEBPACK_IMPORTED_MODULE_0_lodash_merge__.__esModule ? function() { return __WEBPACK_IMPORTED_MODULE_0_lodash_merge__['default'] } : function() { return __WEBPACK_IMPORTED_MODULE_0_lodash_merge__; }
+ /* harmony import */ Object.defineProperty(__WEBPACK_IMPORTED_MODULE_0_lodash_merge___default, 'a', { get: __WEBPACK_IMPORTED_MODULE_0_lodash_merge___default });
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_typedefs__ = __webpack_require__(54);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_typedefs___default = __WEBPACK_IMPORTED_MODULE_1__common_typedefs__ && __WEBPACK_IMPORTED_MODULE_1__common_typedefs__.__esModule ? function() { return __WEBPACK_IMPORTED_MODULE_1__common_typedefs__['default'] } : function() { return __WEBPACK_IMPORTED_MODULE_1__common_typedefs__; }
+ /* harmony import */ Object.defineProperty(__WEBPACK_IMPORTED_MODULE_1__common_typedefs___default, 'a', { get: __WEBPACK_IMPORTED_MODULE_1__common_typedefs___default });
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_webrtc_adapter__ = __webpack_require__(147);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_webrtc_adapter___default = __WEBPACK_IMPORTED_MODULE_2_webrtc_adapter__ && __WEBPACK_IMPORTED_MODULE_2_webrtc_adapter__.__esModule ? function() { return __WEBPACK_IMPORTED_MODULE_2_webrtc_adapter__['default'] } : function() { return __WEBPACK_IMPORTED_MODULE_2_webrtc_adapter__; }
+ /* harmony import */ Object.defineProperty(__WEBPACK_IMPORTED_MODULE_2_webrtc_adapter___default, 'a', { get: __WEBPACK_IMPORTED_MODULE_2_webrtc_adapter___default });
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_image_wrapper__ = __webpack_require__(18);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__locator_barcode_locator__ = __webpack_require__(63);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__decoder_barcode_decoder__ = __webpack_require__(57);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_events__ = __webpack_require__(52);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__input_camera_access__ = __webpack_require__(59);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__common_image_debug__ = __webpack_require__(9);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__analytics_result_collector__ = __webpack_require__(50);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__config_config__ = __webpack_require__(56);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_input_stream__ = __webpack_require__(62);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_frame_grabber__ = __webpack_require__(60);
- /**
- * Alias for {@link vec4.squaredDistance}
- * @function
- */
- vec4.sqrDist = vec4.squaredDistance;
+ // eslint-disable-line no-unused-vars
+ // eslint-disable-line no-unused-vars
- /**
- * Calculates the length of a vec4
- *
- * @param {vec4} a vector to calculate length of
- * @returns {Number} length of a
- */
- vec4.length = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- return Math.sqrt(x*x + y*y + z*z + w*w);
- };
- /**
- * Alias for {@link vec4.length}
- * @function
- */
- vec4.len = vec4.length;
- /**
- * Calculates the squared length of a vec4
- *
- * @param {vec4} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
- vec4.squaredLength = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- return x*x + y*y + z*z + w*w;
- };
- /**
- * Alias for {@link vec4.squaredLength}
- * @function
- */
- vec4.sqrLen = vec4.squaredLength;
- /**
- * Negates the components of a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a vector to negate
- * @returns {vec4} out
- */
- vec4.negate = function(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = -a[3];
- return out;
- };
- /**
- * Returns the inverse of the components of a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a vector to invert
- * @returns {vec4} out
- */
- vec4.inverse = function(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- out[2] = 1.0 / a[2];
- out[3] = 1.0 / a[3];
- return out;
- };
- /**
- * Normalize a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a vector to normalize
- * @returns {vec4} out
- */
- vec4.normalize = function(out, a) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- var len = x*x + y*y + z*z + w*w;
- if (len > 0) {
- len = 1 / Math.sqrt(len);
- out[0] = x * len;
- out[1] = y * len;
- out[2] = z * len;
- out[3] = w * len;
- }
- return out;
- };
- /**
- * Calculates the dot product of two vec4's
- *
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {Number} dot product of a and b
- */
- vec4.dot = function (a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
- };
- /**
- * Performs a linear interpolation between two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec4} out
- */
- vec4.lerp = function (out, a, b, t) {
- var ax = a[0],
- ay = a[1],
- az = a[2],
- aw = a[3];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- out[2] = az + t * (b[2] - az);
- out[3] = aw + t * (b[3] - aw);
- return out;
- };
- /**
- * Generates a random vector with the given scale
- *
- * @param {vec4} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec4} out
- */
- vec4.random = function (out, scale) {
- scale = scale || 1.0;
- //TODO: This is a pretty awful way of doing this. Find something better.
- out[0] = glMatrix.RANDOM();
- out[1] = glMatrix.RANDOM();
- out[2] = glMatrix.RANDOM();
- out[3] = glMatrix.RANDOM();
- vec4.normalize(out, out);
- vec4.scale(out, out, scale);
- return out;
+ var vec2 = {
+ clone: __webpack_require__(6)
};
- /**
- * Transforms the vec4 with a mat4.
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the vector to transform
- * @param {mat4} m matrix to transform with
- * @returns {vec4} out
- */
- vec4.transformMat4 = function(out, a, m) {
- var x = a[0], y = a[1], z = a[2], w = a[3];
- out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;
- out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;
- out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;
- out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;
- return out;
- };
+ var _inputStream,
+ _framegrabber,
+ _stopped,
+ _canvasContainer = {
+ ctx: {
+ image: null,
+ overlay: null
+ },
+ dom: {
+ image: null,
+ overlay: null
+ }
+ },
+ _inputImageWrapper,
+ _boxSize,
+ _decoder,
+ _workerPool = [],
+ _onUIThread = true,
+ _resultCollector,
+ _config = {};
- /**
- * Transforms the vec4 with a quat
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the vector to transform
- * @param {quat} q quaternion to transform with
- * @returns {vec4} out
- */
- vec4.transformQuat = function(out, a, q) {
- var x = a[0], y = a[1], z = a[2],
- qx = q[0], qy = q[1], qz = q[2], qw = q[3],
+ function initializeData(imageWrapper) {
+ initBuffers(imageWrapper);
+ _decoder = /* harmony import */__WEBPACK_IMPORTED_MODULE_5__decoder_barcode_decoder__["a"].create(_config.decoder, _inputImageWrapper);
+ }
- // calculate quat * vec
- ix = qw * x + qy * z - qz * y,
- iy = qw * y + qz * x - qx * z,
- iz = qw * z + qx * y - qy * x,
- iw = -qx * x - qy * y - qz * z;
+ function initInputStream(cb) {
+ var video;
+ if (_config.inputStream.type === "VideoStream") {
+ video = document.createElement("video");
+ _inputStream = /* harmony import */__WEBPACK_IMPORTED_MODULE_11_input_stream__["a"].createVideoStream(video);
+ } else if (_config.inputStream.type === "ImageStream") {
+ _inputStream = /* harmony import */__WEBPACK_IMPORTED_MODULE_11_input_stream__["a"].createImageStream();
+ } else if (_config.inputStream.type === "LiveStream") {
+ var $viewport = getViewPort();
+ if ($viewport) {
+ video = $viewport.querySelector("video");
+ if (!video) {
+ video = document.createElement("video");
+ $viewport.appendChild(video);
+ }
+ }
+ _inputStream = /* harmony import */__WEBPACK_IMPORTED_MODULE_11_input_stream__["a"].createLiveStream(video);
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_7__input_camera_access__["a"].request(video, _config.inputStream.constraints).then(function () {
+ _inputStream.trigger("canrecord");
+ }).catch(function (err) {
+ return cb(err);
+ });
+ }
- // calculate result * inverse quat
- out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
- out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
- out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
- out[3] = a[3];
- return out;
- };
+ _inputStream.setAttribute("preload", "auto");
+ _inputStream.setAttribute("autoplay", true);
+ _inputStream.setInputStream(_config.inputStream);
+ _inputStream.addEventListener("canrecord", canRecord.bind(undefined, cb));
+ }
- /**
- * Perform some operation over an array of vec4s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
- vec4.forEach = (function() {
- var vec = vec4.create();
+ function getViewPort() {
+ var target = _config.inputStream.target;
+ // Check if target is already a DOM element
+ if (target && target.nodeName && target.nodeType === 1) {
+ return target;
+ } else {
+ // Use '#interactive.viewport' as a fallback selector (backwards compatibility)
+ var selector = typeof target === 'string' ? target : '#interactive.viewport';
+ return document.querySelector(selector);
+ }
+ }
- return function(a, stride, offset, count, fn, arg) {
- var i, l;
- if(!stride) {
- stride = 4;
- }
+ function canRecord(cb) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_4__locator_barcode_locator__["a"].checkImageConstraints(_inputStream, _config.locator);
+ initCanvas(_config);
+ _framegrabber = /* harmony import */__WEBPACK_IMPORTED_MODULE_12_frame_grabber__["a"].create(_inputStream, _canvasContainer.dom.image);
- if(!offset) {
- offset = 0;
+ adjustWorkerPool(_config.numOfWorkers, function () {
+ if (_config.numOfWorkers === 0) {
+ initializeData();
}
-
- if(count) {
- l = Math.min((count * stride) + offset, a.length);
- } else {
- l = a.length;
+ ready(cb);
+ });
+ }
+
+ function ready(cb) {
+ _inputStream.play();
+ cb();
+ }
+
+ function initCanvas() {
+ if (typeof document !== "undefined") {
+ var $viewport = getViewPort();
+ _canvasContainer.dom.image = document.querySelector("canvas.imgBuffer");
+ if (!_canvasContainer.dom.image) {
+ _canvasContainer.dom.image = document.createElement("canvas");
+ _canvasContainer.dom.image.className = "imgBuffer";
+ if ($viewport && _config.inputStream.type === "ImageStream") {
+ $viewport.appendChild(_canvasContainer.dom.image);
+ }
}
+ _canvasContainer.ctx.image = _canvasContainer.dom.image.getContext("2d");
+ _canvasContainer.dom.image.width = _inputStream.getCanvasSize().x;
+ _canvasContainer.dom.image.height = _inputStream.getCanvasSize().y;
- for(i = offset; i < l; i += stride) {
- vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; vec[3] = a[i+3];
- fn(vec, vec, arg);
- a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; a[i+3] = vec[3];
+ _canvasContainer.dom.overlay = document.querySelector("canvas.drawingBuffer");
+ if (!_canvasContainer.dom.overlay) {
+ _canvasContainer.dom.overlay = document.createElement("canvas");
+ _canvasContainer.dom.overlay.className = "drawingBuffer";
+ if ($viewport) {
+ $viewport.appendChild(_canvasContainer.dom.overlay);
+ }
+ var clearFix = document.createElement("br");
+ clearFix.setAttribute("clear", "all");
+ if ($viewport) {
+ $viewport.appendChild(clearFix);
+ }
}
-
- return a;
- };
- })();
+ _canvasContainer.ctx.overlay = _canvasContainer.dom.overlay.getContext("2d");
+ _canvasContainer.dom.overlay.width = _inputStream.getCanvasSize().x;
+ _canvasContainer.dom.overlay.height = _inputStream.getCanvasSize().y;
+ }
+ }
- /**
- * Returns a string representation of a vector
- *
- * @param {vec4} vec vector to represent as a string
- * @returns {String} string representation of the vector
- */
- vec4.str = function (a) {
- return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';
- };
+ function initBuffers(imageWrapper) {
+ if (imageWrapper) {
+ _inputImageWrapper = imageWrapper;
+ } else {
+ _inputImageWrapper = new /* harmony import */__WEBPACK_IMPORTED_MODULE_3__common_image_wrapper__["a"]({
+ x: _inputStream.getWidth(),
+ y: _inputStream.getHeight()
+ });
+ }
- module.exports = vec4;
-
-
-/***/ },
-/* 16 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
+ if (true) {
+ console.log(_inputImageWrapper.size);
+ }
+ _boxSize = [vec2.clone([0, 0]), vec2.clone([0, _inputImageWrapper.size.y]), vec2.clone([_inputImageWrapper.size.x, _inputImageWrapper.size.y]), vec2.clone([_inputImageWrapper.size.x, 0])];
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_4__locator_barcode_locator__["a"].init(_inputImageWrapper, _config.locator);
+ }
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
+ function getBoundingBoxes() {
+ if (_config.locate) {
+ return /* harmony import */__WEBPACK_IMPORTED_MODULE_4__locator_barcode_locator__["a"].locate();
+ } else {
+ return [[vec2.clone(_boxSize[0]), vec2.clone(_boxSize[1]), vec2.clone(_boxSize[2]), vec2.clone(_boxSize[3])]];
+ }
+ }
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
+ function transformResult(result) {
+ var topRight = _inputStream.getTopRight(),
+ xOffset = topRight.x,
+ yOffset = topRight.y,
+ i;
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
+ if (xOffset === 0 && yOffset === 0) {
+ return;
+ }
- var glMatrix = __webpack_require__(8);
+ if (result.barcodes) {
+ for (i = 0; i < result.barcodes.length; i++) {
+ transformResult(result.barcodes[i]);
+ }
+ }
- /**
- * @class 2 Dimensional Vector
- * @name vec2
- */
- var vec2 = {};
+ if (result.line && result.line.length === 2) {
+ moveLine(result.line);
+ }
- /**
- * Creates a new, empty vec2
- *
- * @returns {vec2} a new 2D vector
- */
- vec2.create = function() {
- var out = new glMatrix.ARRAY_TYPE(2);
- out[0] = 0;
- out[1] = 0;
- return out;
- };
+ if (result.box) {
+ moveBox(result.box);
+ }
- /**
- * Creates a new vec2 initialized with values from an existing vector
- *
- * @param {vec2} a vector to clone
- * @returns {vec2} a new 2D vector
- */
- vec2.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(2);
- out[0] = a[0];
- out[1] = a[1];
- return out;
- };
+ if (result.boxes && result.boxes.length > 0) {
+ for (i = 0; i < result.boxes.length; i++) {
+ moveBox(result.boxes[i]);
+ }
+ }
- /**
- * Creates a new vec2 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @returns {vec2} a new 2D vector
- */
- vec2.fromValues = function(x, y) {
- var out = new glMatrix.ARRAY_TYPE(2);
- out[0] = x;
- out[1] = y;
- return out;
- };
+ function moveBox(box) {
+ var corner = box.length;
- /**
- * Copy the values from one vec2 to another
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the source vector
- * @returns {vec2} out
- */
- vec2.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- return out;
- };
+ while (corner--) {
+ box[corner][0] += xOffset;
+ box[corner][1] += yOffset;
+ }
+ }
- /**
- * Set the components of a vec2 to the given values
- *
- * @param {vec2} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @returns {vec2} out
- */
- vec2.set = function(out, x, y) {
- out[0] = x;
- out[1] = y;
- return out;
- };
+ function moveLine(line) {
+ line[0].x += xOffset;
+ line[0].y += yOffset;
+ line[1].x += xOffset;
+ line[1].y += yOffset;
+ }
+ }
- /**
- * Adds two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.add = function(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- return out;
- };
+ function addResult(result, imageData) {
+ if (!imageData || !_resultCollector) {
+ return;
+ }
- /**
- * Subtracts vector b from vector a
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.subtract = function(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- return out;
- };
+ if (result.barcodes) {
+ result.barcodes.filter(function (barcode) {
+ return barcode.codeResult;
+ }).forEach(function (barcode) {
+ return addResult(barcode, imageData);
+ });
+ } else if (result.codeResult) {
+ _resultCollector.addResult(imageData, _inputStream.getCanvasSize(), result.codeResult);
+ }
+ }
- /**
- * Alias for {@link vec2.subtract}
- * @function
- */
- vec2.sub = vec2.subtract;
+ function hasCodeResult(result) {
+ return result && (result.barcodes ? result.barcodes.some(function (barcode) {
+ return barcode.codeResult;
+ }) : result.codeResult);
+ }
- /**
- * Multiplies two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.multiply = function(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- return out;
- };
-
- /**
- * Alias for {@link vec2.multiply}
- * @function
- */
- vec2.mul = vec2.multiply;
-
- /**
- * Divides two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.divide = function(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- return out;
- };
+ function publishResult(result, imageData) {
+ var resultToPublish = result && (result.barcodes || result);
- /**
- * Alias for {@link vec2.divide}
- * @function
- */
- vec2.div = vec2.divide;
+ if (result && _onUIThread) {
+ transformResult(result);
+ addResult(result, imageData);
+ }
- /**
- * Returns the minimum of two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.min = function(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- return out;
- };
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_6__common_events__["a"].publish("processed", resultToPublish);
+ if (hasCodeResult(result)) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_6__common_events__["a"].publish("detected", resultToPublish);
+ }
+ }
- /**
- * Returns the maximum of two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.max = function(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- return out;
- };
+ function locateAndDecode() {
+ var result, boxes;
- /**
- * Scales a vec2 by a scalar number
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec2} out
- */
- vec2.scale = function(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- return out;
- };
+ boxes = getBoundingBoxes();
+ if (boxes) {
+ result = _decoder.decodeFromBoundingBoxes(boxes);
+ result = result || {};
+ result.boxes = boxes;
+ publishResult(result, _inputImageWrapper.data);
+ } else {
+ publishResult();
+ }
+ }
- /**
- * Adds two vec2's after scaling the second operand by a scalar value
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec2} out
- */
- vec2.scaleAndAdd = function(out, a, b, scale) {
- out[0] = a[0] + (b[0] * scale);
- out[1] = a[1] + (b[1] * scale);
- return out;
- };
+ function update() {
+ var availableWorker;
- /**
- * Calculates the euclidian distance between two vec2's
- *
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {Number} distance between a and b
- */
- vec2.distance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1];
- return Math.sqrt(x*x + y*y);
- };
+ if (_onUIThread) {
+ if (_workerPool.length > 0) {
+ availableWorker = _workerPool.filter(function (workerThread) {
+ return !workerThread.busy;
+ })[0];
+ if (availableWorker) {
+ _framegrabber.attachData(availableWorker.imageData);
+ } else {
+ return; // all workers are busy
+ }
+ } else {
+ _framegrabber.attachData(_inputImageWrapper.data);
+ }
+ if (_framegrabber.grab()) {
+ if (availableWorker) {
+ availableWorker.busy = true;
+ availableWorker.worker.postMessage({
+ cmd: 'process',
+ imageData: availableWorker.imageData
+ }, [availableWorker.imageData.buffer]);
+ } else {
+ locateAndDecode();
+ }
+ }
+ } else {
+ locateAndDecode();
+ }
+ }
- /**
- * Alias for {@link vec2.distance}
- * @function
- */
- vec2.dist = vec2.distance;
+ function startContinuousUpdate() {
+ var next = null,
+ delay = 1000 / (_config.frequency || 60);
- /**
- * Calculates the squared euclidian distance between two vec2's
- *
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {Number} squared distance between a and b
- */
- vec2.squaredDistance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1];
- return x*x + y*y;
- };
+ _stopped = false;
+ (function frame(timestamp) {
+ next = next || timestamp;
+ if (!_stopped) {
+ if (timestamp >= next) {
+ next += delay;
+ update();
+ }
+ window.requestAnimFrame(frame);
+ }
+ })(performance.now());
+ }
- /**
- * Alias for {@link vec2.squaredDistance}
- * @function
- */
- vec2.sqrDist = vec2.squaredDistance;
+ function _start() {
+ if (_onUIThread && _config.inputStream.type === "LiveStream") {
+ startContinuousUpdate();
+ } else {
+ update();
+ }
+ }
- /**
- * Calculates the length of a vec2
- *
- * @param {vec2} a vector to calculate length of
- * @returns {Number} length of a
- */
- vec2.length = function (a) {
- var x = a[0],
- y = a[1];
- return Math.sqrt(x*x + y*y);
- };
+ function initWorker(cb) {
+ var blobURL,
+ workerThread = {
+ worker: undefined,
+ imageData: new Uint8Array(_inputStream.getWidth() * _inputStream.getHeight()),
+ busy: true
+ };
- /**
- * Alias for {@link vec2.length}
- * @function
- */
- vec2.len = vec2.length;
+ blobURL = generateWorkerBlob();
+ workerThread.worker = new Worker(blobURL);
- /**
- * Calculates the squared length of a vec2
- *
- * @param {vec2} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
- vec2.squaredLength = function (a) {
- var x = a[0],
- y = a[1];
- return x*x + y*y;
- };
+ workerThread.worker.onmessage = function (e) {
+ if (e.data.event === 'initialized') {
+ URL.revokeObjectURL(blobURL);
+ workerThread.busy = false;
+ workerThread.imageData = new Uint8Array(e.data.imageData);
+ if (true) {
+ console.log("Worker initialized");
+ }
+ return cb(workerThread);
+ } else if (e.data.event === 'processed') {
+ workerThread.imageData = new Uint8Array(e.data.imageData);
+ workerThread.busy = false;
+ publishResult(e.data.result, workerThread.imageData);
+ } else if (e.data.event === 'error') {
+ if (true) {
+ console.log("Worker error: " + e.data.message);
+ }
+ }
+ };
- /**
- * Alias for {@link vec2.squaredLength}
- * @function
- */
- vec2.sqrLen = vec2.squaredLength;
+ workerThread.worker.postMessage({
+ cmd: 'init',
+ size: { x: _inputStream.getWidth(), y: _inputStream.getHeight() },
+ imageData: workerThread.imageData,
+ config: _config
+ }, [workerThread.imageData.buffer]);
+ }
- /**
- * Negates the components of a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a vector to negate
- * @returns {vec2} out
- */
- vec2.negate = function(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- return out;
- };
+ function workerInterface(factory) {
+ /* eslint-disable no-undef*/
+ if (factory) {
+ var Quagga = factory().default;
+ if (!Quagga) {
+ self.postMessage({ 'event': 'error', message: 'Quagga could not be created' });
+ return;
+ }
+ }
+ var imageWrapper;
- /**
- * Returns the inverse of the components of a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a vector to invert
- * @returns {vec2} out
- */
- vec2.inverse = function(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- return out;
- };
+ self.onmessage = function (e) {
+ if (e.data.cmd === 'init') {
+ var config = e.data.config;
+ config.numOfWorkers = 0;
+ imageWrapper = new Quagga.ImageWrapper({
+ x: e.data.size.x,
+ y: e.data.size.y
+ }, new Uint8Array(e.data.imageData));
+ Quagga.init(config, ready, imageWrapper);
+ Quagga.onProcessed(onProcessed);
+ } else if (e.data.cmd === 'process') {
+ imageWrapper.data = new Uint8Array(e.data.imageData);
+ Quagga.start();
+ } else if (e.data.cmd === 'setReaders') {
+ Quagga.setReaders(e.data.readers);
+ }
+ };
- /**
- * Normalize a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a vector to normalize
- * @returns {vec2} out
- */
- vec2.normalize = function(out, a) {
- var x = a[0],
- y = a[1];
- var len = x*x + y*y;
- if (len > 0) {
- //TODO: evaluate use of glm_invsqrt here?
- len = 1 / Math.sqrt(len);
- out[0] = a[0] * len;
- out[1] = a[1] * len;
+ function onProcessed(result) {
+ self.postMessage({
+ 'event': 'processed',
+ imageData: imageWrapper.data,
+ result: result
+ }, [imageWrapper.data.buffer]);
}
- return out;
- };
- /**
- * Calculates the dot product of two vec2's
- *
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {Number} dot product of a and b
- */
- vec2.dot = function (a, b) {
- return a[0] * b[0] + a[1] * b[1];
- };
+ function ready() {
+ // eslint-disable-line
+ self.postMessage({ 'event': 'initialized', imageData: imageWrapper.data }, [imageWrapper.data.buffer]);
+ }
- /**
- * Computes the cross product of two vec2's
- * Note that the cross product must by definition produce a 3D vector
- *
- * @param {vec3} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec3} out
- */
- vec2.cross = function(out, a, b) {
- var z = a[0] * b[1] - a[1] * b[0];
- out[0] = out[1] = 0;
- out[2] = z;
- return out;
- };
+ /* eslint-enable */
+ }
- /**
- * Performs a linear interpolation between two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec2} out
- */
- vec2.lerp = function (out, a, b, t) {
- var ax = a[0],
- ay = a[1];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- return out;
- };
-
- /**
- * Generates a random vector with the given scale
- *
- * @param {vec2} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec2} out
- */
- vec2.random = function (out, scale) {
- scale = scale || 1.0;
- var r = glMatrix.RANDOM() * 2.0 * Math.PI;
- out[0] = Math.cos(r) * scale;
- out[1] = Math.sin(r) * scale;
- return out;
- };
+ function generateWorkerBlob() {
+ var blob, factorySource;
- /**
- * Transforms the vec2 with a mat2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat2} m matrix to transform with
- * @returns {vec2} out
- */
- vec2.transformMat2 = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[2] * y;
- out[1] = m[1] * x + m[3] * y;
- return out;
- };
+ /* jshint ignore:start */
+ if (typeof __factorySource__ !== 'undefined') {
+ factorySource = __factorySource__; // eslint-disable-line no-undef
+ }
+ /* jshint ignore:end */
- /**
- * Transforms the vec2 with a mat2d
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat2d} m matrix to transform with
- * @returns {vec2} out
- */
- vec2.transformMat2d = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[2] * y + m[4];
- out[1] = m[1] * x + m[3] * y + m[5];
- return out;
- };
+ blob = new Blob(['(' + workerInterface.toString() + ')(' + factorySource + ');'], { type: 'text/javascript' });
- /**
- * Transforms the vec2 with a mat3
- * 3rd vector component is implicitly '1'
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat3} m matrix to transform with
- * @returns {vec2} out
- */
- vec2.transformMat3 = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[3] * y + m[6];
- out[1] = m[1] * x + m[4] * y + m[7];
- return out;
- };
+ return window.URL.createObjectURL(blob);
+ }
- /**
- * Transforms the vec2 with a mat4
- * 3rd vector component is implicitly '0'
- * 4th vector component is implicitly '1'
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat4} m matrix to transform with
- * @returns {vec2} out
- */
- vec2.transformMat4 = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[4] * y + m[12];
- out[1] = m[1] * x + m[5] * y + m[13];
- return out;
- };
+ function _setReaders(readers) {
+ if (_decoder) {
+ _decoder.setReaders(readers);
+ } else if (_onUIThread && _workerPool.length > 0) {
+ _workerPool.forEach(function (workerThread) {
+ workerThread.worker.postMessage({ cmd: 'setReaders', readers: readers });
+ });
+ }
+ }
- /**
- * Perform some operation over an array of vec2s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
- vec2.forEach = (function() {
- var vec = vec2.create();
+ function adjustWorkerPool(capacity, cb) {
+ var increaseBy = capacity - _workerPool.length;
+ if (increaseBy === 0) {
+ return cb && cb();
+ }
+ if (increaseBy < 0) {
+ var workersToTerminate = _workerPool.slice(increaseBy);
+ workersToTerminate.forEach(function (workerThread) {
+ workerThread.worker.terminate();
+ if (true) {
+ console.log("Worker terminated!");
+ }
+ });
+ _workerPool = _workerPool.slice(0, increaseBy);
+ return cb && cb();
+ } else {
+ var workerInitialized = function workerInitialized(workerThread) {
+ _workerPool.push(workerThread);
+ if (_workerPool.length >= capacity) {
+ cb && cb();
+ }
+ };
- return function(a, stride, offset, count, fn, arg) {
- var i, l;
- if(!stride) {
- stride = 2;
+ for (var i = 0; i < increaseBy; i++) {
+ initWorker(workerInitialized);
}
+ }
+ }
- if(!offset) {
- offset = 0;
- }
-
- if(count) {
- l = Math.min((count * stride) + offset, a.length);
+ /* harmony default export */ exports["default"] = {
+ init: function init(config, cb, imageWrapper) {
+ _config = /* harmony import */__WEBPACK_IMPORTED_MODULE_0_lodash_merge___default.a.bind()({}, /* harmony import */__WEBPACK_IMPORTED_MODULE_10__config_config__["a"], config);
+ if (imageWrapper) {
+ _onUIThread = false;
+ initializeData(imageWrapper);
+ return cb();
} else {
- l = a.length;
- }
-
- for(i = offset; i < l; i += stride) {
- vec[0] = a[i]; vec[1] = a[i+1];
- fn(vec, vec, arg);
- a[i] = vec[0]; a[i+1] = vec[1];
- }
-
- return a;
- };
- })();
-
- /**
- * Returns a string representation of a vector
- *
- * @param {vec2} vec vector to represent as a string
- * @returns {String} string representation of the vector
- */
- vec2.str = function (a) {
- return 'vec2(' + a[0] + ', ' + a[1] + ')';
- };
-
- module.exports = vec2;
-
-
-/***/ },
-/* 17 */
-/***/ function(module, exports) {
-
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports["default"] = {
- init: function init(arr, val) {
- var l = arr.length;
- while (l--) {
- arr[l] = val;
+ initInputStream(cb);
}
},
-
- /**
- * Shuffles the content of an array
- * @return {Array} the array itself shuffled
- */
- shuffle: function shuffle(arr) {
- var i = arr.length - 1,
- j,
- x;
- for (i; i >= 0; i--) {
- j = Math.floor(Math.random() * i);
- x = arr[i];
- arr[i] = arr[j];
- arr[j] = x;
- }
- return arr;
+ start: function start() {
+ _start();
},
-
- toPointList: function toPointList(arr) {
- var i,
- j,
- row = [],
- rows = [];
- for (i = 0; i < arr.length; i++) {
- row = [];
- for (j = 0; j < arr[i].length; j++) {
- row[j] = arr[i][j];
- }
- rows[i] = "[" + row.join(",") + "]";
+ stop: function stop() {
+ _stopped = true;
+ adjustWorkerPool(0);
+ if (_config.inputStream.type === "LiveStream") {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_7__input_camera_access__["a"].release();
+ _inputStream.clearEventHandlers();
}
- return "[" + rows.join(",\r\n") + "]";
},
-
- /**
- * returns the elements which's score is bigger than the threshold
- * @return {Array} the reduced array
- */
- threshold: function threshold(arr, _threshold, scoreFunc) {
- var i,
- queue = [];
- for (i = 0; i < arr.length; i++) {
- if (scoreFunc.apply(arr, [arr[i]]) >= _threshold) {
- queue.push(arr[i]);
- }
- }
- return queue;
+ pause: function pause() {
+ _stopped = true;
},
-
- maxIndex: function maxIndex(arr) {
- var i,
- max = 0;
- for (i = 0; i < arr.length; i++) {
- if (arr[i] > arr[max]) {
- max = i;
- }
+ onDetected: function onDetected(callback) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_6__common_events__["a"].subscribe("detected", callback);
+ },
+ offDetected: function offDetected(callback) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_6__common_events__["a"].unsubscribe("detected", callback);
+ },
+ onProcessed: function onProcessed(callback) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_6__common_events__["a"].subscribe("processed", callback);
+ },
+ offProcessed: function offProcessed(callback) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_6__common_events__["a"].unsubscribe("processed", callback);
+ },
+ setReaders: function setReaders(readers) {
+ _setReaders(readers);
+ },
+ registerResultCollector: function registerResultCollector(resultCollector) {
+ if (resultCollector && typeof resultCollector.addResult === 'function') {
+ _resultCollector = resultCollector;
}
- return max;
},
+ canvas: _canvasContainer,
+ decodeSingle: function decodeSingle(config, resultCallback) {
+ var _this = this;
- max: function max(arr) {
- var i,
- max = 0;
- for (i = 0; i < arr.length; i++) {
- if (arr[i] > max) {
- max = arr[i];
+ config = /* harmony import */__WEBPACK_IMPORTED_MODULE_0_lodash_merge___default.a.bind()({
+ inputStream: {
+ type: "ImageStream",
+ sequence: false,
+ size: 800,
+ src: config.src
+ },
+ numOfWorkers: true && config.debug ? 0 : 1,
+ locator: {
+ halfSample: false
}
- }
- return max;
+ }, config);
+ this.init(config, function () {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_6__common_events__["a"].once("processed", function (result) {
+ _this.stop();
+ resultCallback.call(null, result);
+ }, true);
+ _start();
+ });
},
-
- sum: function sum(arr) {
- var length = arr.length,
- sum = 0;
-
- while (length--) {
- sum += arr[length];
- }
- return sum;
- }
+ ImageWrapper: /* harmony import */__WEBPACK_IMPORTED_MODULE_3__common_image_wrapper__["a"],
+ ImageDebug: /* harmony import */__WEBPACK_IMPORTED_MODULE_8__common_image_debug__["a"],
+ ResultCollector: /* harmony import */__WEBPACK_IMPORTED_MODULE_9__analytics_result_collector__["a"]
};
- module.exports = exports["default"];
/***/ },
-/* 18 */
+/* 50 */
/***/ function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_image_debug__ = __webpack_require__(9);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _commonImage_wrapper = __webpack_require__(3);
+ function contains(codeResult, list) {
+ if (list) {
+ return list.some(function (item) {
+ return Object.keys(item).every(function (key) {
+ return item[key] === codeResult[key];
+ });
+ });
+ }
+ return false;
+ }
- var _commonImage_wrapper2 = _interopRequireDefault(_commonImage_wrapper);
+ function passesFilter(codeResult, filter) {
+ if (typeof filter === 'function') {
+ return filter(codeResult);
+ }
+ return true;
+ }
- var _commonCv_utils = __webpack_require__(5);
-
- var _commonCv_utils2 = _interopRequireDefault(_commonCv_utils);
-
- var _commonArray_helper = __webpack_require__(17);
-
- var _commonArray_helper2 = _interopRequireDefault(_commonArray_helper);
-
- var _commonImage_debug = __webpack_require__(19);
-
- var _commonImage_debug2 = _interopRequireDefault(_commonImage_debug);
-
- var _rasterizer = __webpack_require__(20);
-
- var _rasterizer2 = _interopRequireDefault(_rasterizer);
-
- var _tracer = __webpack_require__(21);
-
- var _tracer2 = _interopRequireDefault(_tracer);
-
- var _skeletonizer2 = __webpack_require__(22);
-
- var _skeletonizer3 = _interopRequireDefault(_skeletonizer2);
-
- var _glMatrix = __webpack_require__(7);
-
- var _config,
- _currentImageWrapper,
- _skelImageWrapper,
- _subImageWrapper,
- _labelImageWrapper,
- _patchGrid,
- _patchLabelGrid,
- _imageToPatchGrid,
- _binaryImageWrapper,
- _patchSize,
- _canvasContainer = {
- ctx: {
- binary: null
- },
- dom: {
- binary: null
- }
- },
- _numPatches = { x: 0, y: 0 },
- _inputImageWrapper,
- _skeletonizer;
-
- function initBuffers() {
- var skeletonImageData;
-
- if (_config.halfSample) {
- _currentImageWrapper = new _commonImage_wrapper2['default']({
- x: _inputImageWrapper.size.x / 2 | 0,
- y: _inputImageWrapper.size.y / 2 | 0
- });
- } else {
- _currentImageWrapper = _inputImageWrapper;
- }
-
- _patchSize = _commonCv_utils2['default'].calculatePatchSize(_config.patchSize, _currentImageWrapper.size);
-
- _numPatches.x = _currentImageWrapper.size.x / _patchSize.x | 0;
- _numPatches.y = _currentImageWrapper.size.y / _patchSize.y | 0;
-
- _binaryImageWrapper = new _commonImage_wrapper2['default'](_currentImageWrapper.size, undefined, Uint8Array, false);
-
- _labelImageWrapper = new _commonImage_wrapper2['default'](_patchSize, undefined, Array, true);
+ /* harmony default export */ exports["a"] = {
+ create: function create(config) {
+ var canvas = document.createElement("canvas"),
+ ctx = canvas.getContext("2d"),
+ results = [],
+ capacity = config.capacity || 20,
+ capture = config.capture === true;
- skeletonImageData = new ArrayBuffer(64 * 1024);
- _subImageWrapper = new _commonImage_wrapper2['default'](_patchSize, new Uint8Array(skeletonImageData, 0, _patchSize.x * _patchSize.y));
- _skelImageWrapper = new _commonImage_wrapper2['default'](_patchSize, new Uint8Array(skeletonImageData, _patchSize.x * _patchSize.y * 3, _patchSize.x * _patchSize.y), undefined, true);
- _skeletonizer = (0, _skeletonizer3['default'])(typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : global, {
- size: _patchSize.x
- }, skeletonImageData);
+ function matchesConstraints(codeResult) {
+ return capacity && codeResult && !contains(codeResult, config.blacklist) && passesFilter(codeResult, config.filter);
+ }
- _imageToPatchGrid = new _commonImage_wrapper2['default']({
- x: _currentImageWrapper.size.x / _subImageWrapper.size.x | 0,
- y: _currentImageWrapper.size.y / _subImageWrapper.size.y | 0
- }, undefined, Array, true);
- _patchGrid = new _commonImage_wrapper2['default'](_imageToPatchGrid.size, undefined, undefined, true);
- _patchLabelGrid = new _commonImage_wrapper2['default'](_imageToPatchGrid.size, undefined, Int32Array, true);
- }
+ return {
+ addResult: function addResult(data, imageSize, codeResult) {
+ var result = {};
- function initCanvas() {
- if (_config.useWorker || typeof document === 'undefined') {
- return;
- }
- _canvasContainer.dom.binary = document.createElement("canvas");
- _canvasContainer.dom.binary.className = "binaryBuffer";
- if ((true) && _config.debug.showCanvas === true) {
- document.querySelector("#debug").appendChild(_canvasContainer.dom.binary);
+ if (matchesConstraints(codeResult)) {
+ capacity--;
+ result.codeResult = codeResult;
+ if (capture) {
+ canvas.width = imageSize.x;
+ canvas.height = imageSize.y;
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_image_debug__["a"].drawImage(data, imageSize, ctx);
+ result.frame = canvas.toDataURL();
+ }
+ results.push(result);
+ }
+ },
+ getResults: function getResults() {
+ return results;
+ }
+ };
}
- _canvasContainer.ctx.binary = _canvasContainer.dom.binary.getContext("2d");
- _canvasContainer.dom.binary.width = _binaryImageWrapper.size.x;
- _canvasContainer.dom.binary.height = _binaryImageWrapper.size.y;
- }
-
+ };
+
+/***/ },
+/* 51 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var vec2 = {
+ clone: __webpack_require__(6),
+ dot: __webpack_require__(31)
+ };
/**
- * Creates a bounding box which encloses all the given patches
- * @returns {Array} The minimal bounding box
+ * Creates a cluster for grouping similar orientations of datapoints
*/
- function boxFromPatches(patches) {
- var overAvg,
- i,
- j,
- patch,
- transMat,
- minx = _binaryImageWrapper.size.x,
- miny = _binaryImageWrapper.size.y,
- maxx = -_binaryImageWrapper.size.x,
- maxy = -_binaryImageWrapper.size.y,
- box,
- scale;
-
- // draw all patches which are to be taken into consideration
- overAvg = 0;
- for (i = 0; i < patches.length; i++) {
- patch = patches[i];
- overAvg += patch.rad;
- if ((true) && _config.debug.showPatches) {
- _commonImage_debug2['default'].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "red" });
- }
- }
-
- overAvg /= patches.length;
- overAvg = (overAvg * 180 / Math.PI + 90) % 180 - 90;
- if (overAvg < 0) {
- overAvg += 180;
- }
-
- overAvg = (180 - overAvg) * Math.PI / 180;
- transMat = _glMatrix.mat2.clone([Math.cos(overAvg), Math.sin(overAvg), -Math.sin(overAvg), Math.cos(overAvg)]);
+ /* harmony default export */ exports["a"] = {
+ create: function create(point, threshold) {
+ var points = [],
+ center = {
+ rad: 0,
+ vec: vec2.clone([0, 0])
+ },
+ pointMap = {};
- // iterate over patches and rotate by angle
- for (i = 0; i < patches.length; i++) {
- patch = patches[i];
- for (j = 0; j < 4; j++) {
- _glMatrix.vec2.transformMat2(patch.box[j], patch.box[j], transMat);
+ function init() {
+ _add(point);
+ updateCenter();
}
- if ((true) && _config.debug.boxFromPatches.showTransformed) {
- _commonImage_debug2['default'].drawPath(patch.box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#99ff00', lineWidth: 2 });
+ function _add(pointToAdd) {
+ pointMap[pointToAdd.id] = pointToAdd;
+ points.push(pointToAdd);
}
- }
- // find bounding box
- for (i = 0; i < patches.length; i++) {
- patch = patches[i];
- for (j = 0; j < 4; j++) {
- if (patch.box[j][0] < minx) {
- minx = patch.box[j][0];
- }
- if (patch.box[j][0] > maxx) {
- maxx = patch.box[j][0];
- }
- if (patch.box[j][1] < miny) {
- miny = patch.box[j][1];
- }
- if (patch.box[j][1] > maxy) {
- maxy = patch.box[j][1];
+ function updateCenter() {
+ var i,
+ sum = 0;
+ for (i = 0; i < points.length; i++) {
+ sum += points[i].rad;
}
+ center.rad = sum / points.length;
+ center.vec = vec2.clone([Math.cos(center.rad), Math.sin(center.rad)]);
}
- }
- box = [[minx, miny], [maxx, miny], [maxx, maxy], [minx, maxy]];
+ init();
- if ((true) && _config.debug.boxFromPatches.showTransformedBox) {
- _commonImage_debug2['default'].drawPath(box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#ff0000', lineWidth: 2 });
+ return {
+ add: function add(pointToAdd) {
+ if (!pointMap[pointToAdd.id]) {
+ _add(pointToAdd);
+ updateCenter();
+ }
+ },
+ fits: function fits(otherPoint) {
+ // check cosine similarity to center-angle
+ var similarity = Math.abs(vec2.dot(otherPoint.point.vec, center.vec));
+ if (similarity > threshold) {
+ return true;
+ }
+ return false;
+ },
+ getPoints: function getPoints() {
+ return points;
+ },
+ getCenter: function getCenter() {
+ return center;
+ }
+ };
+ },
+ createPoint: function createPoint(newPoint, id, property) {
+ return {
+ rad: newPoint[property],
+ point: newPoint,
+ id: id
+ };
}
+ };
+
+/***/ },
+/* 52 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* harmony default export */ exports["a"] = function () {
+ var events = {};
- scale = _config.halfSample ? 2 : 1;
- // reverse rotation;
- transMat = _glMatrix.mat2.invert(transMat, transMat);
- for (j = 0; j < 4; j++) {
- _glMatrix.vec2.transformMat2(box[j], box[j], transMat);
+ function getEvent(eventName) {
+ if (!events[eventName]) {
+ events[eventName] = {
+ subscribers: []
+ };
+ }
+ return events[eventName];
}
- if ((true) && _config.debug.boxFromPatches.showBB) {
- _commonImage_debug2['default'].drawPath(box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#ff0000', lineWidth: 2 });
+ function clearEvents() {
+ events = {};
}
- for (j = 0; j < 4; j++) {
- _glMatrix.vec2.scale(box[j], box[j], scale);
+ function publishSubscription(subscription, data) {
+ if (subscription.async) {
+ setTimeout(function () {
+ subscription.callback(data);
+ }, 4);
+ } else {
+ subscription.callback(data);
+ }
}
- return box;
- }
+ function _subscribe(event, callback, async) {
+ var subscription;
- /**
- * Creates a binary image of the current image
- */
- function binarizeImage() {
- _commonCv_utils2['default'].otsuThreshold(_currentImageWrapper, _binaryImageWrapper);
- _binaryImageWrapper.zeroBorder();
- if (_config.showCanvas) {
- _binaryImageWrapper.show(_canvasContainer.dom.binary, 255);
- }
- }
+ if (typeof callback === "function") {
+ subscription = {
+ callback: callback,
+ async: async
+ };
+ } else {
+ subscription = callback;
+ if (!subscription.callback) {
+ throw "Callback was not specified on options";
+ }
+ }
- /**
- * Iterate over the entire image
- * extract patches
- */
- function findPatches() {
- var i,
- j,
- x,
- y,
- moments,
- patchesFound = [],
- rasterizer,
- rasterResult,
- patch;
- for (i = 0; i < _numPatches.x; i++) {
- for (j = 0; j < _numPatches.y; j++) {
- x = _subImageWrapper.size.x * i;
- y = _subImageWrapper.size.y * j;
+ getEvent(event).subscribers.push(subscription);
+ }
- // seperate parts
- skeletonize(x, y);
+ return {
+ subscribe: function subscribe(event, callback, async) {
+ return _subscribe(event, callback, async);
+ },
+ publish: function publish(eventName, data) {
+ var event = getEvent(eventName),
+ subscribers = event.subscribers;
- // Rasterize, find individual bars
- _skelImageWrapper.zeroBorder();
- _commonArray_helper2['default'].init(_labelImageWrapper.data, 0);
- rasterizer = _rasterizer2['default'].create(_skelImageWrapper, _labelImageWrapper);
- rasterResult = rasterizer.rasterize(0);
+ event.subscribers = subscribers.filter(function (subscriber) {
+ publishSubscription(subscriber, data);
+ return !subscriber.once;
+ });
+ },
+ once: function once(event, callback, async) {
+ _subscribe(event, {
+ callback: callback,
+ async: async,
+ once: true
+ });
+ },
+ unsubscribe: function unsubscribe(eventName, callback) {
+ var event;
- if ((true) && _config.debug.showLabels) {
- _labelImageWrapper.overlay(_canvasContainer.dom.binary, Math.floor(360 / rasterResult.count), { x: x, y: y });
+ if (eventName) {
+ event = getEvent(eventName);
+ if (event && callback) {
+ event.subscribers = event.subscribers.filter(function (subscriber) {
+ return subscriber.callback !== callback;
+ });
+ } else {
+ event.subscribers = [];
+ }
+ } else {
+ clearEvents();
}
-
- // calculate moments from the skeletonized patch
- moments = _labelImageWrapper.moments(rasterResult.count);
-
- // extract eligible patches
- patchesFound = patchesFound.concat(describePatch(moments, [i, j], x, y));
- }
- }
-
- if ((true) && _config.debug.showFoundPatches) {
- for (i = 0; i < patchesFound.length; i++) {
- patch = patchesFound[i];
- _commonImage_debug2['default'].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "#99ff00", lineWidth: 2 });
}
+ };
+ }();
+
+/***/ },
+/* 53 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Construct representing a part of another {ImageWrapper}. Shares data
+ * between the parent and the child.
+ * @param from {ImageRef} The position where to start the {SubImage} from. (top-left corner)
+ * @param size {ImageRef} The size of the resulting image
+ * @param I {ImageWrapper} The {ImageWrapper} to share from
+ * @returns {SubImage} A shared part of the original image
+ */
+ function SubImage(from, size, I) {
+ if (!I) {
+ I = {
+ data: null,
+ size: size
+ };
}
+ this.data = I.data;
+ this.originalSize = I.size;
+ this.I = I;
- return patchesFound;
+ this.from = from;
+ this.size = size;
}
/**
- * Finds those connected areas which contain at least 6 patches
- * and returns them ordered DESC by the number of contained patches
- * @param {Number} maxLabel
+ * Displays the {SubImage} in a given canvas
+ * @param canvas {Canvas} The canvas element to write to
+ * @param scale {Number} Scale which is applied to each pixel-value
*/
- function findBiggestConnectedAreas(maxLabel) {
- var i,
- sum,
- labelHist = [],
- topLabels = [];
+ SubImage.prototype.show = function (canvas, scale) {
+ var ctx, frame, data, current, y, x, pixel;
- for (i = 0; i < maxLabel; i++) {
- labelHist.push(0);
+ if (!scale) {
+ scale = 1.0;
}
- sum = _patchLabelGrid.data.length;
- while (sum--) {
- if (_patchLabelGrid.data[sum] > 0) {
- labelHist[_patchLabelGrid.data[sum] - 1]++;
+ ctx = canvas.getContext('2d');
+ canvas.width = this.size.x;
+ canvas.height = this.size.y;
+ frame = ctx.getImageData(0, 0, canvas.width, canvas.height);
+ data = frame.data;
+ current = 0;
+ for (y = 0; y < this.size.y; y++) {
+ for (x = 0; x < this.size.x; x++) {
+ pixel = y * this.size.x + x;
+ current = this.get(x, y) * scale;
+ data[pixel * 4 + 0] = current;
+ data[pixel * 4 + 1] = current;
+ data[pixel * 4 + 2] = current;
+ data[pixel * 4 + 3] = 255;
}
}
-
- labelHist = labelHist.map(function (val, idx) {
- return {
- val: val,
- label: idx + 1
- };
- });
-
- labelHist.sort(function (a, b) {
- return b.val - a.val;
- });
-
- // extract top areas with at least 6 patches present
- topLabels = labelHist.filter(function (el) {
- return el.val >= 5;
- });
-
- return topLabels;
- }
+ frame.data = data;
+ ctx.putImageData(frame, 0, 0);
+ };
/**
- *
+ * Retrieves a given pixel position from the {SubImage}
+ * @param x {Number} The x-position
+ * @param y {Number} The y-position
+ * @returns {Number} The grayscale value at the pixel-position
*/
- function findBoxes(topLabels, maxLabel) {
- var i,
- j,
- sum,
- patches = [],
- patch,
- box,
- boxes = [],
- hsv = [0, 1, 1],
- rgb = [0, 0, 0];
-
- for (i = 0; i < topLabels.length; i++) {
- sum = _patchLabelGrid.data.length;
- patches.length = 0;
- while (sum--) {
- if (_patchLabelGrid.data[sum] === topLabels[i].label) {
- patch = _imageToPatchGrid.data[sum];
- patches.push(patch);
- }
- }
- box = boxFromPatches(patches);
- if (box) {
- boxes.push(box);
-
- // draw patch-labels if requested
- if ((true) && _config.debug.showRemainingPatchLabels) {
- for (j = 0; j < patches.length; j++) {
- patch = patches[j];
- hsv[0] = topLabels[i].label / (maxLabel + 1) * 360;
- _commonCv_utils2['default'].hsv2rgb(hsv, rgb);
- _commonImage_debug2['default'].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "rgb(" + rgb.join(",") + ")", lineWidth: 2 });
- }
- }
- }
- }
- return boxes;
- }
+ SubImage.prototype.get = function (x, y) {
+ return this.data[(this.from.y + y) * this.originalSize.x + this.from.x + x];
+ };
/**
- * Find similar moments (via cluster)
- * @param {Object} moments
+ * Updates the underlying data from a given {ImageWrapper}
+ * @param image {ImageWrapper} The updated image
*/
- function similarMoments(moments) {
- var clusters = _commonCv_utils2['default'].cluster(moments, 0.90);
- var topCluster = _commonCv_utils2['default'].topGeneric(clusters, 1, function (e) {
- return e.getPoints().length;
- });
- var points = [],
- result = [];
- if (topCluster.length === 1) {
- points = topCluster[0].item.getPoints();
- for (var i = 0; i < points.length; i++) {
- result.push(points[i].point);
- }
- }
- return result;
- }
-
- function skeletonize(x, y) {
- _binaryImageWrapper.subImageAsCopy(_subImageWrapper, _commonCv_utils2['default'].imageRef(x, y));
- _skeletonizer.skeletonize();
-
- // Show skeleton if requested
- if ((true) && _config.debug.showSkeleton) {
- _skelImageWrapper.overlay(_canvasContainer.dom.binary, 360, _commonCv_utils2['default'].imageRef(x, y));
- }
- }
+ SubImage.prototype.updateData = function (image) {
+ this.originalSize = image.size;
+ this.data = image.data;
+ };
/**
- * Extracts and describes those patches which seem to contain a barcode pattern
- * @param {Array} moments
- * @param {Object} patchPos,
- * @param {Number} x
- * @param {Number} y
- * @returns {Array} list of patches
+ * Updates the position of the shared area
+ * @param from {x,y} The new location
+ * @returns {SubImage} returns {this} for possible chaining
*/
- function describePatch(moments, patchPos, x, y) {
- var k,
- avg,
- eligibleMoments = [],
- matchingMoments,
- patch,
- patchesFound = [],
- minComponentWeight = Math.ceil(_patchSize.x / 3);
-
- if (moments.length >= 2) {
- // only collect moments which's area covers at least minComponentWeight pixels.
- for (k = 0; k < moments.length; k++) {
- if (moments[k].m00 > minComponentWeight) {
- eligibleMoments.push(moments[k]);
- }
- }
+ SubImage.prototype.updateFrom = function (from) {
+ this.from = from;
+ return this;
+ };
- // if at least 2 moments are found which have at least minComponentWeights covered
- if (eligibleMoments.length >= 2) {
- matchingMoments = similarMoments(eligibleMoments);
- avg = 0;
- // determine the similarity of the moments
- for (k = 0; k < matchingMoments.length; k++) {
- avg += matchingMoments[k].rad;
- }
+ /* harmony default export */ exports["a"] = SubImage;
+
+/***/ },
+/* 54 */
+/***/ function(module, exports) {
+
+ /*
+ * typedefs.js
+ * Normalizes browser-specific prefixes
+ */
- // Only two of the moments are allowed not to fit into the equation
- // add the patch to the set
- if (matchingMoments.length > 1 && matchingMoments.length >= eligibleMoments.length / 4 * 3 && matchingMoments.length > moments.length / 4) {
- avg /= matchingMoments.length;
- patch = {
- index: patchPos[1] * _numPatches.x + patchPos[0],
- pos: {
- x: x,
- y: y
- },
- box: [_glMatrix.vec2.clone([x, y]), _glMatrix.vec2.clone([x + _subImageWrapper.size.x, y]), _glMatrix.vec2.clone([x + _subImageWrapper.size.x, y + _subImageWrapper.size.y]), _glMatrix.vec2.clone([x, y + _subImageWrapper.size.y])],
- moments: matchingMoments,
- rad: avg,
- vec: _glMatrix.vec2.clone([Math.cos(avg), Math.sin(avg)])
- };
- patchesFound.push(patch);
+ if (typeof window !== 'undefined') {
+ window.requestAnimFrame = function () {
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function ( /* function FrameRequestCallback */callback) {
+ window.setTimeout(callback, 1000 / 60);
+ };
+ }();
+ }
+ Math.imul = Math.imul || function (a, b) {
+ var ah = a >>> 16 & 0xffff,
+ al = a & 0xffff,
+ bh = b >>> 16 & 0xffff,
+ bl = b & 0xffff;
+ // the shift by 0 fixes the sign on the high part
+ // the final |0 converts the unsigned value into a signed value
+ return al * bl + (ah * bl + al * bh << 16 >>> 0) | 0;
+ };
+
+/***/ },
+/* 55 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = {
+ inputStream: {
+ name: "Live",
+ type: "LiveStream",
+ constraints: {
+ width: 640,
+ height: 480,
+ // aspectRatio: 640/480, // optional
+ facingMode: "environment" },
+ // or user
+ // deviceId: "38745983457387598375983759834"
+ area: {
+ top: "0%",
+ right: "0%",
+ left: "0%",
+ bottom: "0%"
+ },
+ singleChannel: false // true: only the red color-channel is read
+ },
+ locate: true,
+ numOfWorkers: 0,
+ decoder: {
+ readers: ['code_128_reader'],
+ debug: {
+ drawBoundingBox: false,
+ showFrequency: false,
+ drawScanline: false,
+ showPattern: false
+ }
+ },
+ locator: {
+ halfSample: true,
+ patchSize: "medium", // x-small, small, medium, large, x-large
+ debug: {
+ showCanvas: false,
+ showPatches: false,
+ showFoundPatches: false,
+ showSkeleton: false,
+ showLabels: false,
+ showPatchLabels: false,
+ showRemainingPatchLabels: false,
+ boxFromPatches: {
+ showTransformed: false,
+ showTransformedBox: false,
+ showBB: false
}
}
}
- return patchesFound;
+ };
+
+/***/ },
+/* 56 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var config = void 0;
+
+ if (true) {
+ config = __webpack_require__(55);
+ } else if (ENV.node) {
+ config = require('./config.node.js');
+ } else {
+ config = require('./config.prod.js');
}
- /**
- * finds patches which are connected and share the same orientation
- * @param {Object} patchesFound
- */
- function rasterizeAngularSimilarity(patchesFound) {
- var label = 0,
- threshold = 0.95,
- currIdx = 0,
- j,
- patch,
- hsv = [0, 1, 1],
- rgb = [0, 0, 0];
+ /* harmony default export */ exports["a"] = config;
+
+/***/ },
+/* 57 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__bresenham__ = __webpack_require__(58);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_image_debug__ = __webpack_require__(9);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reader_code_128_reader__ = __webpack_require__(67);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__reader_ean_reader__ = __webpack_require__(10);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__reader_code_39_reader__ = __webpack_require__(30);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__reader_code_39_vin_reader__ = __webpack_require__(68);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__reader_codabar_reader__ = __webpack_require__(66);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__reader_upc_reader__ = __webpack_require__(72);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__reader_ean_8_reader__ = __webpack_require__(69);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__reader_upc_e_reader__ = __webpack_require__(71);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__reader_i2of5_reader__ = __webpack_require__(70);
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
- function notYetProcessed() {
- var i;
- for (i = 0; i < _patchLabelGrid.data.length; i++) {
- if (_patchLabelGrid.data[i] === 0 && _patchGrid.data[i] === 1) {
- return i;
- }
- }
- return _patchLabelGrid.length;
- }
- function trace(currentIdx) {
- var x,
- y,
- currentPatch,
- idx,
- dir,
- current = {
- x: currentIdx % _patchLabelGrid.size.x,
- y: currentIdx / _patchLabelGrid.size.x | 0
- },
- similarity;
- if (currentIdx < _patchLabelGrid.data.length) {
- currentPatch = _imageToPatchGrid.data[currentIdx];
- // assign label
- _patchLabelGrid.data[currentIdx] = label;
- for (dir = 0; dir < _tracer2['default'].searchDirections.length; dir++) {
- y = current.y + _tracer2['default'].searchDirections[dir][0];
- x = current.x + _tracer2['default'].searchDirections[dir][1];
- idx = y * _patchLabelGrid.size.x + x;
- // continue if patch empty
- if (_patchGrid.data[idx] === 0) {
- _patchLabelGrid.data[idx] = Number.MAX_VALUE;
- continue;
- }
- if (_patchLabelGrid.data[idx] === 0) {
- similarity = Math.abs(_glMatrix.vec2.dot(_imageToPatchGrid.data[idx].vec, currentPatch.vec));
- if (similarity > threshold) {
- trace(idx);
- }
- }
- }
- }
- }
- // prepare for finding the right patches
- _commonArray_helper2['default'].init(_patchGrid.data, 0);
- _commonArray_helper2['default'].init(_patchLabelGrid.data, 0);
- _commonArray_helper2['default'].init(_imageToPatchGrid.data, null);
- for (j = 0; j < patchesFound.length; j++) {
- patch = patchesFound[j];
- _imageToPatchGrid.data[patch.index] = patch;
- _patchGrid.data[patch.index] = 1;
- }
- // rasterize the patches found to determine area
- _patchGrid.zeroBorder();
- while ((currIdx = notYetProcessed()) < _patchLabelGrid.data.length) {
- label++;
- trace(currIdx);
- }
- // draw patch-labels if requested
- if ((true) && _config.debug.showPatchLabels) {
- for (j = 0; j < _patchLabelGrid.data.length; j++) {
- if (_patchLabelGrid.data[j] > 0 && _patchLabelGrid.data[j] <= label) {
- patch = _imageToPatchGrid.data[j];
- hsv[0] = _patchLabelGrid.data[j] / (label + 1) * 360;
- _commonCv_utils2['default'].hsv2rgb(hsv, rgb);
- _commonImage_debug2['default'].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "rgb(" + rgb.join(",") + ")", lineWidth: 2 });
- }
- }
- }
- return label;
- }
- exports['default'] = {
- init: function init(inputImageWrapper, config) {
- _config = config;
- _inputImageWrapper = inputImageWrapper;
- initBuffers();
+ var READERS = {
+ code_128_reader: /* harmony import */__WEBPACK_IMPORTED_MODULE_2__reader_code_128_reader__["a"],
+ ean_reader: /* harmony import */__WEBPACK_IMPORTED_MODULE_3__reader_ean_reader__["a"],
+ ean_8_reader: /* harmony import */__WEBPACK_IMPORTED_MODULE_8__reader_ean_8_reader__["a"],
+ code_39_reader: /* harmony import */__WEBPACK_IMPORTED_MODULE_4__reader_code_39_reader__["a"],
+ code_39_vin_reader: /* harmony import */__WEBPACK_IMPORTED_MODULE_5__reader_code_39_vin_reader__["a"],
+ codabar_reader: /* harmony import */__WEBPACK_IMPORTED_MODULE_6__reader_codabar_reader__["a"],
+ upc_reader: /* harmony import */__WEBPACK_IMPORTED_MODULE_7__reader_upc_reader__["a"],
+ upc_e_reader: /* harmony import */__WEBPACK_IMPORTED_MODULE_9__reader_upc_e_reader__["a"],
+ i2of5_reader: /* harmony import */__WEBPACK_IMPORTED_MODULE_10__reader_i2of5_reader__["a"]
+ };
+ /* harmony default export */ exports["a"] = {
+ create: function create(config, inputImageWrapper) {
+ var _canvas = {
+ ctx: {
+ frequency: null,
+ pattern: null,
+ overlay: null
+ },
+ dom: {
+ frequency: null,
+ pattern: null,
+ overlay: null
+ }
+ },
+ _barcodeReaders = [];
+
initCanvas();
- },
+ initReaders();
+ initConfig();
- locate: function locate() {
- var patchesFound, topLabels, boxes;
+ function initCanvas() {
+ if (true && typeof document !== 'undefined') {
+ var $debug = document.querySelector("#debug.detection");
+ _canvas.dom.frequency = document.querySelector("canvas.frequency");
+ if (!_canvas.dom.frequency) {
+ _canvas.dom.frequency = document.createElement("canvas");
+ _canvas.dom.frequency.className = "frequency";
+ if ($debug) {
+ $debug.appendChild(_canvas.dom.frequency);
+ }
+ }
+ _canvas.ctx.frequency = _canvas.dom.frequency.getContext("2d");
- if (_config.halfSample) {
- _commonCv_utils2['default'].halfSample(_inputImageWrapper, _currentImageWrapper);
- }
+ _canvas.dom.pattern = document.querySelector("canvas.patternBuffer");
+ if (!_canvas.dom.pattern) {
+ _canvas.dom.pattern = document.createElement("canvas");
+ _canvas.dom.pattern.className = "patternBuffer";
+ if ($debug) {
+ $debug.appendChild(_canvas.dom.pattern);
+ }
+ }
+ _canvas.ctx.pattern = _canvas.dom.pattern.getContext("2d");
- binarizeImage();
- patchesFound = findPatches();
- // return unless 5% or more patches are found
- if (patchesFound.length < _numPatches.x * _numPatches.y * 0.05) {
- return null;
+ _canvas.dom.overlay = document.querySelector("canvas.drawingBuffer");
+ if (_canvas.dom.overlay) {
+ _canvas.ctx.overlay = _canvas.dom.overlay.getContext("2d");
+ }
+ }
}
- // rasterrize area by comparing angular similarity;
- var maxLabel = rasterizeAngularSimilarity(patchesFound);
- if (maxLabel < 1) {
- return null;
+ function initReaders() {
+ config.readers.forEach(function (readerConfig) {
+ var reader,
+ configuration = {};
+
+ if ((typeof readerConfig === 'undefined' ? 'undefined' : _typeof(readerConfig)) === 'object') {
+ reader = readerConfig.format;
+ configuration = readerConfig.config;
+ } else if (typeof readerConfig === 'string') {
+ reader = readerConfig;
+ }
+ if (true) {
+ console.log("Before registering reader: ", reader);
+ }
+ _barcodeReaders.push(new READERS[reader](configuration));
+ });
+ if (true) {
+ console.log("Registered Readers: " + _barcodeReaders.map(function (reader) {
+ return JSON.stringify({ format: reader.FORMAT, config: reader.config });
+ }).join(', '));
+ }
}
- // search for area with the most patches (biggest connected area)
- topLabels = findBiggestConnectedAreas(maxLabel);
- if (topLabels.length === 0) {
- return null;
+ function initConfig() {
+ if (true && typeof document !== 'undefined') {
+ var i,
+ vis = [{
+ node: _canvas.dom.frequency,
+ prop: config.debug.showFrequency
+ }, {
+ node: _canvas.dom.pattern,
+ prop: config.debug.showPattern
+ }];
+
+ for (i = 0; i < vis.length; i++) {
+ if (vis[i].prop === true) {
+ vis[i].node.style.display = "block";
+ } else {
+ vis[i].node.style.display = "none";
+ }
+ }
+ }
}
- boxes = findBoxes(topLabels, maxLabel);
- return boxes;
- },
+ /**
+ * extend the line on both ends
+ * @param {Array} line
+ * @param {Number} angle
+ */
+ function getExtendedLine(line, angle, ext) {
+ function extendLine(amount) {
+ var extension = {
+ y: amount * Math.sin(angle),
+ x: amount * Math.cos(angle)
+ };
- checkImageConstraints: function checkImageConstraints(inputStream, config) {
- var patchSize,
- width = inputStream.getWidth(),
- height = inputStream.getHeight(),
- halfSample = config.halfSample ? 0.5 : 1,
- size,
- area;
+ line[0].y -= extension.y;
+ line[0].x -= extension.x;
+ line[1].y += extension.y;
+ line[1].x += extension.x;
+ }
- // calculate width and height based on area
- if (inputStream.getConfig().area) {
- area = _commonCv_utils2['default'].computeImageArea(width, height, inputStream.getConfig().area);
- inputStream.setTopRight({ x: area.sx, y: area.sy });
- inputStream.setCanvasSize({ x: width, y: height });
- width = area.sw;
- height = area.sh;
+ // check if inside image
+ extendLine(ext);
+ while (ext > 1 && (!inputImageWrapper.inImageWithBorder(line[0], 0) || !inputImageWrapper.inImageWithBorder(line[1], 0))) {
+ ext -= Math.ceil(ext / 2);
+ extendLine(-ext);
+ }
+ return line;
}
- size = {
- x: Math.floor(width * halfSample),
- y: Math.floor(height * halfSample)
- };
-
- patchSize = _commonCv_utils2['default'].calculatePatchSize(config.patchSize, size);
- if (true) {
- console.log("Patch-Size: " + JSON.stringify(patchSize));
+ function getLine(box) {
+ return [{
+ x: (box[1][0] - box[0][0]) / 2 + box[0][0],
+ y: (box[1][1] - box[0][1]) / 2 + box[0][1]
+ }, {
+ x: (box[3][0] - box[2][0]) / 2 + box[2][0],
+ y: (box[3][1] - box[2][1]) / 2 + box[2][1]
+ }];
}
- inputStream.setWidth(Math.floor(Math.floor(size.x / patchSize.x) * (1 / halfSample) * patchSize.x));
- inputStream.setHeight(Math.floor(Math.floor(size.y / patchSize.y) * (1 / halfSample) * patchSize.y));
+ function tryDecode(line) {
+ var result = null,
+ i,
+ barcodeLine = /* harmony import */__WEBPACK_IMPORTED_MODULE_0__bresenham__["a"].getBarcodeLine(inputImageWrapper, line[0], line[1]);
- if (inputStream.getWidth() % patchSize.x === 0 && inputStream.getHeight() % patchSize.y === 0) {
- return true;
- }
+ if (true && config.debug.showFrequency) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_image_debug__["a"].drawPath(line, { x: 'x', y: 'y' }, _canvas.ctx.overlay, { color: 'red', lineWidth: 3 });
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__bresenham__["a"].debug.printFrequency(barcodeLine.line, _canvas.dom.frequency);
+ }
- throw new Error("Image dimensions do not comply with the current settings: Width (" + width + " )and height (" + height + ") must a multiple of " + patchSize.x);
- }
- };
- module.exports = exports['default'];
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
-
-/***/ },
-/* 19 */
-/***/ function(module, exports) {
-
- "use strict";
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__bresenham__["a"].toBinaryLine(barcodeLine);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports["default"] = {
- drawRect: function drawRect(pos, size, ctx, style) {
- ctx.strokeStyle = style.color;
- ctx.fillStyle = style.color;
- ctx.lineWidth = 1;
- ctx.beginPath();
- ctx.strokeRect(pos.x, pos.y, size.x, size.y);
- },
- drawPath: function drawPath(path, def, ctx, style) {
- ctx.strokeStyle = style.color;
- ctx.fillStyle = style.color;
- ctx.lineWidth = style.lineWidth;
- ctx.beginPath();
- ctx.moveTo(path[0][def.x], path[0][def.y]);
- for (var j = 1; j < path.length; j++) {
- ctx.lineTo(path[j][def.x], path[j][def.y]);
+ if (true && config.debug.showPattern) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__bresenham__["a"].debug.printPattern(barcodeLine.line, _canvas.dom.pattern);
+ }
+
+ for (i = 0; i < _barcodeReaders.length && result === null; i++) {
+ result = _barcodeReaders[i].decodePattern(barcodeLine.line);
+ }
+ if (result === null) {
+ return null;
+ }
+ return {
+ codeResult: result,
+ barcodeLine: barcodeLine
+ };
}
- ctx.closePath();
- ctx.stroke();
- },
- drawImage: function drawImage(imageData, size, ctx) {
- var canvasData = ctx.getImageData(0, 0, size.x, size.y),
- data = canvasData.data,
- imageDataPos = imageData.length,
- canvasDataPos = data.length,
- value;
- if (canvasDataPos / imageDataPos !== 4) {
- return false;
+ /**
+ * This method slices the given area apart and tries to detect a barcode-pattern
+ * for each slice. It returns the decoded barcode, or null if nothing was found
+ * @param {Array} box
+ * @param {Array} line
+ * @param {Number} lineAngle
+ */
+ function tryDecodeBruteForce(box, line, lineAngle) {
+ var sideLength = Math.sqrt(Math.pow(box[1][0] - box[0][0], 2) + Math.pow(box[1][1] - box[0][1], 2)),
+ i,
+ slices = 16,
+ result = null,
+ dir,
+ extension,
+ xdir = Math.sin(lineAngle),
+ ydir = Math.cos(lineAngle);
+
+ for (i = 1; i < slices && result === null; i++) {
+ // move line perpendicular to angle
+ dir = sideLength / slices * i * (i % 2 === 0 ? -1 : 1);
+ extension = {
+ y: dir * xdir,
+ x: dir * ydir
+ };
+ line[0].y += extension.x;
+ line[0].x -= extension.y;
+ line[1].y += extension.x;
+ line[1].x -= extension.y;
+
+ result = tryDecode(line);
+ }
+ return result;
}
- while (imageDataPos--) {
- value = imageData[imageDataPos];
- data[--canvasDataPos] = 255;
- data[--canvasDataPos] = value;
- data[--canvasDataPos] = value;
- data[--canvasDataPos] = value;
+
+ function getLineLength(line) {
+ return Math.sqrt(Math.pow(Math.abs(line[1].y - line[0].y), 2) + Math.pow(Math.abs(line[1].x - line[0].x), 2));
}
- ctx.putImageData(canvasData, 0, 0);
- return true;
- }
- };
- module.exports = exports["default"];
-
-/***/ },
-/* 20 */
-/***/ function(module, exports, __webpack_require__) {
-
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
+ /**
+ * With the help of the configured readers (Code128 or EAN) this function tries to detect a
+ * valid barcode pattern within the given area.
+ * @param {Object} box The area to search in
+ * @returns {Object} the result {codeResult, line, angle, pattern, threshold}
+ */
+ function _decodeFromBoundingBox(box) {
+ var line,
+ lineAngle,
+ ctx = _canvas.ctx.overlay,
+ result,
+ lineLength;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ if (true) {
+ if (config.debug.drawBoundingBox && ctx) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_image_debug__["a"].drawPath(box, { x: 0, y: 1 }, ctx, { color: "blue", lineWidth: 2 });
+ }
+ }
- var _tracer = __webpack_require__(21);
+ line = getLine(box);
+ lineLength = getLineLength(line);
+ lineAngle = Math.atan2(line[1].y - line[0].y, line[1].x - line[0].x);
+ line = getExtendedLine(line, lineAngle, Math.floor(lineLength * 0.1));
+ if (line === null) {
+ return null;
+ }
- var _tracer2 = _interopRequireDefault(_tracer);
+ result = tryDecode(line);
+ if (result === null) {
+ result = tryDecodeBruteForce(box, line, lineAngle);
+ }
- /**
- * http://www.codeproject.com/Tips/407172/Connected-Component-Labeling-and-Vectorization
- */
- var Rasterizer = {
- createContour2D: function createContour2D() {
- return {
- dir: null,
- index: null,
- firstVertex: null,
- insideContours: null,
- nextpeer: null,
- prevpeer: null
- };
- },
- CONTOUR_DIR: {
- CW_DIR: 0,
- CCW_DIR: 1,
- UNKNOWN_DIR: 2
- },
- DIR: {
- OUTSIDE_EDGE: -32767,
- INSIDE_EDGE: -32766
- },
- create: function create(imageWrapper, labelWrapper) {
- var imageData = imageWrapper.data,
- labelData = labelWrapper.data,
- width = imageWrapper.size.x,
- height = imageWrapper.size.y,
- tracer = _tracer2["default"].create(imageWrapper, labelWrapper);
+ if (result === null) {
+ return null;
+ }
+
+ if (true && result && config.debug.drawScanline && ctx) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_image_debug__["a"].drawPath(line, { x: 'x', y: 'y' }, ctx, { color: 'red', lineWidth: 3 });
+ }
+
+ return {
+ codeResult: result.codeResult,
+ line: line,
+ angle: lineAngle,
+ pattern: result.barcodeLine.line,
+ threshold: result.barcodeLine.threshold
+ };
+ }
return {
- rasterize: function rasterize(depthlabel) {
- var color,
- bc,
- lc,
- labelindex,
- cx,
- cy,
- colorMap = [],
- vertex,
- p,
- cc,
- sc,
- pos,
- connectedCount = 0,
- i;
-
- for (i = 0; i < 400; i++) {
- colorMap[i] = 0;
- }
-
- colorMap[0] = imageData[0];
- cc = null;
- for (cy = 1; cy < height - 1; cy++) {
- labelindex = 0;
- bc = colorMap[0];
- for (cx = 1; cx < width - 1; cx++) {
- pos = cy * width + cx;
- if (labelData[pos] === 0) {
- color = imageData[pos];
- if (color !== bc) {
- if (labelindex === 0) {
- lc = connectedCount + 1;
- colorMap[lc] = color;
- bc = color;
- vertex = tracer.contourTracing(cy, cx, lc, color, Rasterizer.DIR.OUTSIDE_EDGE);
- if (vertex !== null) {
- connectedCount++;
- labelindex = lc;
- p = Rasterizer.createContour2D();
- p.dir = Rasterizer.CONTOUR_DIR.CW_DIR;
- p.index = labelindex;
- p.firstVertex = vertex;
- p.nextpeer = cc;
- p.insideContours = null;
- if (cc !== null) {
- cc.prevpeer = p;
- }
- cc = p;
- }
- } else {
- vertex = tracer.contourTracing(cy, cx, Rasterizer.DIR.INSIDE_EDGE, color, labelindex);
- if (vertex !== null) {
- p = Rasterizer.createContour2D();
- p.firstVertex = vertex;
- p.insideContours = null;
- if (depthlabel === 0) {
- p.dir = Rasterizer.CONTOUR_DIR.CCW_DIR;
- } else {
- p.dir = Rasterizer.CONTOUR_DIR.CW_DIR;
- }
- p.index = depthlabel;
- sc = cc;
- while (sc !== null && sc.index !== labelindex) {
- sc = sc.nextpeer;
- }
- if (sc !== null) {
- p.nextpeer = sc.insideContours;
- if (sc.insideContours !== null) {
- sc.insideContours.prevpeer = p;
- }
- sc.insideContours = p;
- }
- }
- }
- } else {
- labelData[pos] = labelindex;
- }
- } else if (labelData[pos] === Rasterizer.DIR.OUTSIDE_EDGE || labelData[pos] === Rasterizer.DIR.INSIDE_EDGE) {
- labelindex = 0;
- if (labelData[pos] === Rasterizer.DIR.INSIDE_EDGE) {
- bc = imageData[pos];
- } else {
- bc = colorMap[0];
- }
- } else {
- labelindex = labelData[pos];
- bc = colorMap[labelindex];
- }
- }
- }
- sc = cc;
- while (sc !== null) {
- sc.index = depthlabel;
- sc = sc.nextpeer;
- }
- return {
- cc: cc,
- count: connectedCount
- };
+ decodeFromBoundingBox: function decodeFromBoundingBox(box) {
+ return _decodeFromBoundingBox(box);
},
- debug: {
- drawContour: function drawContour(canvas, firstContour) {
- var ctx = canvas.getContext("2d"),
- pq = firstContour,
- iq,
- q,
- p;
+ decodeFromBoundingBoxes: function decodeFromBoundingBoxes(boxes) {
+ var i,
+ result,
+ barcodes = [],
+ multiple = config.multiple;
- ctx.strokeStyle = "red";
- ctx.fillStyle = "red";
- ctx.lineWidth = 1;
+ for (i = 0; i < boxes.length; i++) {
+ var box = boxes[i];
+ result = _decodeFromBoundingBox(box) || {};
+ result.box = box;
- if (pq !== null) {
- iq = pq.insideContours;
- } else {
- iq = null;
+ if (multiple) {
+ barcodes.push(result);
+ } else if (result.codeResult) {
+ return result;
}
+ }
- while (pq !== null) {
- if (iq !== null) {
- q = iq;
- iq = iq.nextpeer;
- } else {
- q = pq;
- pq = pq.nextpeer;
- if (pq !== null) {
- iq = pq.insideContours;
- } else {
- iq = null;
- }
- }
-
- switch (q.dir) {
- case Rasterizer.CONTOUR_DIR.CW_DIR:
- ctx.strokeStyle = "red";
- break;
- case Rasterizer.CONTOUR_DIR.CCW_DIR:
- ctx.strokeStyle = "blue";
- break;
- case Rasterizer.CONTOUR_DIR.UNKNOWN_DIR:
- ctx.strokeStyle = "green";
- break;
- }
-
- p = q.firstVertex;
- ctx.beginPath();
- ctx.moveTo(p.x, p.y);
- do {
- p = p.next;
- ctx.lineTo(p.x, p.y);
- } while (p !== q.firstVertex);
- ctx.stroke();
- }
+ if (multiple) {
+ return {
+ barcodes: barcodes
+ };
}
+ },
+ setReaders: function setReaders(readers) {
+ config.readers = readers;
+ _barcodeReaders.length = 0;
+ initReaders();
}
};
}
};
-
- exports["default"] = Rasterizer;
- module.exports = exports["default"];
/***/ },
-/* 21 */
-/***/ function(module, exports) {
+/* 58 */
+/***/ function(module, exports, __webpack_require__) {
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_image_wrapper__ = __webpack_require__(18);
+
+
+ var Bresenham = {};
+
+ var Slope = {
+ DIR: {
+ UP: 1,
+ DOWN: -1
+ }
+ };
/**
- * http://www.codeproject.com/Tips/407172/Connected-Component-Labeling-and-Vectorization
+ * Scans a line of the given image from point p1 to p2 and returns a result object containing
+ * gray-scale values (0-255) of the underlying pixels in addition to the min
+ * and max values.
+ * @param {Object} imageWrapper
+ * @param {Object} p1 The start point {x,y}
+ * @param {Object} p2 The end point {x,y}
+ * @returns {line, min, max}
*/
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var Tracer = {
- searchDirections: [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]],
- create: function create(imageWrapper, labelWrapper) {
- var imageData = imageWrapper.data,
- labelData = labelWrapper.data,
- searchDirections = this.searchDirections,
- width = imageWrapper.size.x,
- pos;
+ Bresenham.getBarcodeLine = function (imageWrapper, p1, p2) {
+ var x0 = p1.x | 0,
+ y0 = p1.y | 0,
+ x1 = p2.x | 0,
+ y1 = p2.y | 0,
+ steep = Math.abs(y1 - y0) > Math.abs(x1 - x0),
+ deltax,
+ deltay,
+ error,
+ ystep,
+ y,
+ tmp,
+ x,
+ line = [],
+ imageData = imageWrapper.data,
+ width = imageWrapper.size.x,
+ sum = 0,
+ val,
+ min = 255,
+ max = 0;
- function _trace(current, color, label, edgelabel) {
- var i, y, x;
+ function read(a, b) {
+ val = imageData[b * width + a];
+ sum += val;
+ min = val < min ? val : min;
+ max = val > max ? val : max;
+ line.push(val);
+ }
- for (i = 0; i < 7; i++) {
- y = current.cy + searchDirections[current.dir][0];
- x = current.cx + searchDirections[current.dir][1];
- pos = y * width + x;
- if (imageData[pos] === color && (labelData[pos] === 0 || labelData[pos] === label)) {
- labelData[pos] = label;
- current.cy = y;
- current.cx = x;
- return true;
- } else {
- if (labelData[pos] === 0) {
- labelData[pos] = edgelabel;
- }
- current.dir = (current.dir + 1) % 8;
- }
- }
- return false;
- }
+ if (steep) {
+ tmp = x0;
+ x0 = y0;
+ y0 = tmp;
- function vertex2D(x, y, dir) {
- return {
- dir: dir,
- x: x,
- y: y,
- next: null,
- prev: null
- };
+ tmp = x1;
+ x1 = y1;
+ y1 = tmp;
+ }
+ if (x0 > x1) {
+ tmp = x0;
+ x0 = x1;
+ x1 = tmp;
+
+ tmp = y0;
+ y0 = y1;
+ y1 = tmp;
+ }
+ deltax = x1 - x0;
+ deltay = Math.abs(y1 - y0);
+ error = deltax / 2 | 0;
+ y = y0;
+ ystep = y0 < y1 ? 1 : -1;
+ for (x = x0; x < x1; x++) {
+ if (steep) {
+ read(y, x);
+ } else {
+ read(x, y);
+ }
+ error = error - deltay;
+ if (error < 0) {
+ y = y + ystep;
+ error = error + deltax;
}
+ }
- function _contourTracing(sy, sx, label, color, edgelabel) {
- var Fv = null,
- Cv,
- P,
- ldir,
- current = {
- cx: sx,
- cy: sy,
- dir: 0
- };
+ return {
+ line: line,
+ min: min,
+ max: max
+ };
+ };
- if (_trace(current, color, label, edgelabel)) {
- Fv = vertex2D(sx, sy, current.dir);
- Cv = Fv;
- ldir = current.dir;
- P = vertex2D(current.cx, current.cy, 0);
- P.prev = Cv;
- Cv.next = P;
- P.next = null;
- Cv = P;
- do {
- current.dir = (current.dir + 6) % 8;
- _trace(current, color, label, edgelabel);
- if (ldir !== current.dir) {
- Cv.dir = current.dir;
- P = vertex2D(current.cx, current.cy, 0);
- P.prev = Cv;
- Cv.next = P;
- P.next = null;
- Cv = P;
- } else {
- Cv.dir = ldir;
- Cv.x = current.cx;
- Cv.y = current.cy;
- }
- ldir = current.dir;
- } while (current.cx !== sx || current.cy !== sy);
- Fv.prev = Cv.prev;
- Cv.prev.next = Fv;
- }
- return Fv;
+ /**
+ * Converts the result from getBarcodeLine into a binary representation
+ * also considering the frequency and slope of the signal for more robust results
+ * @param {Object} result {line, min, max}
+ */
+ Bresenham.toBinaryLine = function (result) {
+ var min = result.min,
+ max = result.max,
+ line = result.line,
+ slope,
+ slope2,
+ center = min + (max - min) / 2,
+ extrema = [],
+ currentDir,
+ dir,
+ threshold = (max - min) / 12,
+ rThreshold = -threshold,
+ i,
+ j;
+
+ // 1. find extrema
+ currentDir = line[0] > center ? Slope.DIR.UP : Slope.DIR.DOWN;
+ extrema.push({
+ pos: 0,
+ val: line[0]
+ });
+ for (i = 0; i < line.length - 2; i++) {
+ slope = line[i + 1] - line[i];
+ slope2 = line[i + 2] - line[i + 1];
+ if (slope + slope2 < rThreshold && line[i + 1] < center * 1.5) {
+ dir = Slope.DIR.DOWN;
+ } else if (slope + slope2 > threshold && line[i + 1] > center * 0.5) {
+ dir = Slope.DIR.UP;
+ } else {
+ dir = currentDir;
}
- return {
- trace: function trace(current, color, label, edgelabel) {
- return _trace(current, color, label, edgelabel);
- },
- contourTracing: function contourTracing(sy, sx, label, color, edgelabel) {
- return _contourTracing(sy, sx, label, color, edgelabel);
+ if (currentDir !== dir) {
+ extrema.push({
+ pos: i,
+ val: line[i]
+ });
+ currentDir = dir;
+ }
+ }
+ extrema.push({
+ pos: line.length,
+ val: line[line.length - 1]
+ });
+
+ for (j = extrema[0].pos; j < extrema[1].pos; j++) {
+ line[j] = line[j] > center ? 0 : 1;
+ }
+
+ // iterate over extrema and convert to binary based on avg between minmax
+ for (i = 1; i < extrema.length - 1; i++) {
+ if (extrema[i + 1].val > extrema[i].val) {
+ threshold = extrema[i].val + (extrema[i + 1].val - extrema[i].val) / 3 * 2 | 0;
+ } else {
+ threshold = extrema[i + 1].val + (extrema[i].val - extrema[i + 1].val) / 3 | 0;
+ }
+
+ for (j = extrema[i].pos; j < extrema[i + 1].pos; j++) {
+ line[j] = line[j] > threshold ? 0 : 1;
+ }
+ }
+
+ return {
+ line: line,
+ threshold: threshold
+ };
+ };
+
+ /**
+ * Used for development only
+ */
+ Bresenham.debug = {
+ printFrequency: function printFrequency(line, canvas) {
+ var i,
+ ctx = canvas.getContext("2d");
+ canvas.width = line.length;
+ canvas.height = 256;
+
+ ctx.beginPath();
+ ctx.strokeStyle = "blue";
+ for (i = 0; i < line.length; i++) {
+ ctx.moveTo(i, 255);
+ ctx.lineTo(i, 255 - line[i]);
+ }
+ ctx.stroke();
+ ctx.closePath();
+ },
+
+ printPattern: function printPattern(line, canvas) {
+ var ctx = canvas.getContext("2d"),
+ i;
+
+ canvas.width = line.length;
+ ctx.fillColor = "black";
+ for (i = 0; i < line.length; i++) {
+ if (line[i] === 1) {
+ ctx.fillRect(i, 0, 1, 100);
}
- };
+ }
}
};
- exports["default"] = Tracer;
- module.exports = exports["default"];
+ /* harmony default export */ exports["a"] = Bresenham;
/***/ },
-/* 22 */
-/***/ function(module, exports) {
+/* 59 */
+/***/ function(module, exports, __webpack_require__) {
- /* @preserve ASM BEGIN */
- /* eslint-disable eqeqeq*/
- "use strict";
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_pick__ = __webpack_require__(143);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_pick___default = __WEBPACK_IMPORTED_MODULE_0_lodash_pick__ && __WEBPACK_IMPORTED_MODULE_0_lodash_pick__.__esModule ? function() { return __WEBPACK_IMPORTED_MODULE_0_lodash_pick__['default'] } : function() { return __WEBPACK_IMPORTED_MODULE_0_lodash_pick__; }
+ /* harmony import */ Object.defineProperty(__WEBPACK_IMPORTED_MODULE_0_lodash_pick___default, 'a', { get: __WEBPACK_IMPORTED_MODULE_0_lodash_pick___default });
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_merge__ = __webpack_require__(28);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_merge___default = __WEBPACK_IMPORTED_MODULE_1_lodash_merge__ && __WEBPACK_IMPORTED_MODULE_1_lodash_merge__.__esModule ? function() { return __WEBPACK_IMPORTED_MODULE_1_lodash_merge__['default'] } : function() { return __WEBPACK_IMPORTED_MODULE_1_lodash_merge__; }
+ /* harmony import */ Object.defineProperty(__WEBPACK_IMPORTED_MODULE_1_lodash_merge___default, 'a', { get: __WEBPACK_IMPORTED_MODULE_1_lodash_merge___default });
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- function Skeletonizer(stdlib, foreign, buffer) {
- "use asm";
- var images = new stdlib.Uint8Array(buffer),
- size = foreign.size | 0,
- imul = stdlib.Math.imul;
- function erode(inImagePtr, outImagePtr) {
- inImagePtr = inImagePtr | 0;
- outImagePtr = outImagePtr | 0;
- var v = 0,
- u = 0,
- sum = 0,
- yStart1 = 0,
- yStart2 = 0,
- xStart1 = 0,
- xStart2 = 0,
- offset = 0;
+ var streamRef, loadedDataHandler;
- for (v = 1; (v | 0) < (size - 1 | 0); v = v + 1 | 0) {
- offset = offset + size | 0;
- for (u = 1; (u | 0) < (size - 1 | 0); u = u + 1 | 0) {
- yStart1 = offset - size | 0;
- yStart2 = offset + size | 0;
- xStart1 = u - 1 | 0;
- xStart2 = u + 1 | 0;
- sum = (images[inImagePtr + yStart1 + xStart1 | 0] | 0) + (images[inImagePtr + yStart1 + xStart2 | 0] | 0) + (images[inImagePtr + offset + u | 0] | 0) + (images[inImagePtr + yStart2 + xStart1 | 0] | 0) + (images[inImagePtr + yStart2 + xStart2 | 0] | 0) | 0;
- if ((sum | 0) == (5 | 0)) {
- images[outImagePtr + offset + u | 0] = 1;
+ function waitForVideo(video) {
+ return new Promise(function (resolve, reject) {
+ var attempts = 10;
+
+ function checkVideo() {
+ if (attempts > 0) {
+ if (video.videoWidth > 0 && video.videoHeight > 0) {
+ if (true) {
+ console.log(video.videoWidth + "px x " + video.videoHeight + "px");
+ }
+ resolve();
} else {
- images[outImagePtr + offset + u | 0] = 0;
+ window.setTimeout(checkVideo, 500);
}
+ } else {
+ reject('Unable to play video stream. Is webcam working?');
}
+ attempts--;
}
- return;
- }
-
- function subtract(aImagePtr, bImagePtr, outImagePtr) {
- aImagePtr = aImagePtr | 0;
- bImagePtr = bImagePtr | 0;
- outImagePtr = outImagePtr | 0;
+ checkVideo();
+ });
+ }
- var length = 0;
+ /**
+ * Tries to attach the camera-stream to a given video-element
+ * and calls the callback function when the content is ready
+ * @param {Object} constraints
+ * @param {Object} video
+ */
+ function initCamera(video, constraints) {
+ return navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {
+ return new Promise(function (resolve, reject) {
+ streamRef = stream;
+ video.src = window.URL.createObjectURL(stream);
+ video.onloadedmetadata = function (e) {
+ video.play();
+ resolve();
+ };
+ });
+ }).then(waitForVideo.bind(null, video));
+ }
- length = imul(size, size) | 0;
+ function deprecatedConstraints(videoConstraints) {
+ var normalized = /* harmony import */__WEBPACK_IMPORTED_MODULE_0_lodash_pick___default.a.bind()(videoConstraints, ["width", "height", "facingMode", "aspectRatio", "deviceId"]);
- while ((length | 0) > 0) {
- length = length - 1 | 0;
- images[outImagePtr + length | 0] = (images[aImagePtr + length | 0] | 0) - (images[bImagePtr + length | 0] | 0) | 0;
- }
+ if (typeof videoConstraints["minAspectRatio"] !== 'undefined' && videoConstraints["minAspectRatio"] > 0) {
+ normalized["aspectRatio"] = videoConstraints["minAspectRatio"];
+ console.log("WARNING: Constraint 'minAspectRatio' is deprecated; Use 'aspectRatio' instead");
}
+ if (typeof videoConstraints["facing"] !== 'undefined') {
+ normalized["facingMode"] = videoConstraints["facing"];
+ console.log("WARNING: Constraint 'facing' is deprecated. Use 'facingMode' instead'");
+ }
+ return normalized;
+ }
- function bitwiseOr(aImagePtr, bImagePtr, outImagePtr) {
- aImagePtr = aImagePtr | 0;
- bImagePtr = bImagePtr | 0;
- outImagePtr = outImagePtr | 0;
-
- var length = 0;
-
- length = imul(size, size) | 0;
-
- while ((length | 0) > 0) {
- length = length - 1 | 0;
- images[outImagePtr + length | 0] = images[aImagePtr + length | 0] | 0 | (images[bImagePtr + length | 0] | 0) | 0;
- }
+ function applyCameraFacing(facing, constraints) {
+ if (typeof constraints.video.deviceId !== 'undefined' || !facing) {
+ return Promise.resolve(constraints);
}
+ if (typeof MediaStreamTrack !== 'undefined' && typeof MediaStreamTrack.getSources !== 'undefined') {
+ return new Promise(function (resolve, reject) {
+ MediaStreamTrack.getSources(function (sourceInfos) {
+ var videoSource = sourceInfos.filter(function (sourceInfo) {
+ return sourceInfo.kind === "video" && sourceInfo.facing === facing;
+ })[0];
+ if (videoSource) {
+ return resolve(/* harmony import */__WEBPACK_IMPORTED_MODULE_1_lodash_merge___default.a.bind()({}, constraints, { video: { deviceId: videoSource.id } }));
+ }
+ return resolve(constraints);
+ });
+ });
+ }
+ return Promise.resolve(/* harmony import */__WEBPACK_IMPORTED_MODULE_1_lodash_merge___default.a.bind()({}, constraints, { video: { facingMode: facing } }));
+ }
- function countNonZero(imagePtr) {
- imagePtr = imagePtr | 0;
-
- var sum = 0,
- length = 0;
-
- length = imul(size, size) | 0;
+ function pickConstraints(videoConstraints) {
+ var constraints = {
+ audio: false,
+ video: deprecatedConstraints(videoConstraints)
+ };
+ return applyCameraFacing(constraints.video.facingMode, constraints);
+ }
- while ((length | 0) > 0) {
- length = length - 1 | 0;
- sum = (sum | 0) + (images[imagePtr + length | 0] | 0) | 0;
+ /* harmony default export */ exports["a"] = {
+ request: function request(video, videoConstraints) {
+ return pickConstraints(videoConstraints).then(initCamera.bind(null, video));
+ },
+ release: function release() {
+ var tracks = streamRef && streamRef.getVideoTracks();
+ if (tracks && tracks.length) {
+ tracks[0].stop();
}
-
- return sum | 0;
+ streamRef = null;
}
+ };
+
+/***/ },
+/* 60 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_cv_utils__ = __webpack_require__(17);
- function init(imagePtr, value) {
- imagePtr = imagePtr | 0;
- value = value | 0;
- var length = 0;
+ var FrameGrabber = {};
- length = imul(size, size) | 0;
+ FrameGrabber.create = function (inputStream, canvas) {
+ var _that = {},
+ _streamConfig = inputStream.getConfig(),
+ _video_size = /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_cv_utils__["f"].bind()(inputStream.getRealWidth(), inputStream.getRealHeight()),
+ _canvasSize = inputStream.getCanvasSize(),
+ _size = /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_cv_utils__["f"].bind()(inputStream.getWidth(), inputStream.getHeight()),
+ topRight = inputStream.getTopRight(),
+ _sx = topRight.x,
+ _sy = topRight.y,
+ _canvas,
+ _ctx = null,
+ _data = null;
- while ((length | 0) > 0) {
- length = length - 1 | 0;
- images[imagePtr + length | 0] = value;
- }
+ _canvas = canvas ? canvas : document.createElement("canvas");
+ _canvas.width = _canvasSize.x;
+ _canvas.height = _canvasSize.y;
+ _ctx = _canvas.getContext("2d");
+ _data = new Uint8Array(_size.x * _size.y);
+ if (true) {
+ console.log("FrameGrabber", JSON.stringify({
+ size: _size,
+ topRight: topRight,
+ videoSize: _video_size,
+ canvasSize: _canvasSize
+ }));
}
- function dilate(inImagePtr, outImagePtr) {
- inImagePtr = inImagePtr | 0;
- outImagePtr = outImagePtr | 0;
+ /**
+ * Uses the given array as frame-buffer
+ */
+ _that.attachData = function (data) {
+ _data = data;
+ };
- var v = 0,
- u = 0,
- sum = 0,
- yStart1 = 0,
- yStart2 = 0,
- xStart1 = 0,
- xStart2 = 0,
- offset = 0;
+ /**
+ * Returns the used frame-buffer
+ */
+ _that.getData = function () {
+ return _data;
+ };
- for (v = 1; (v | 0) < (size - 1 | 0); v = v + 1 | 0) {
- offset = offset + size | 0;
- for (u = 1; (u | 0) < (size - 1 | 0); u = u + 1 | 0) {
- yStart1 = offset - size | 0;
- yStart2 = offset + size | 0;
- xStart1 = u - 1 | 0;
- xStart2 = u + 1 | 0;
- sum = (images[inImagePtr + yStart1 + xStart1 | 0] | 0) + (images[inImagePtr + yStart1 + xStart2 | 0] | 0) + (images[inImagePtr + offset + u | 0] | 0) + (images[inImagePtr + yStart2 + xStart1 | 0] | 0) + (images[inImagePtr + yStart2 + xStart2 | 0] | 0) | 0;
- if ((sum | 0) > (0 | 0)) {
- images[outImagePtr + offset + u | 0] = 1;
- } else {
- images[outImagePtr + offset + u | 0] = 0;
- }
+ /**
+ * Fetches a frame from the input-stream and puts into the frame-buffer.
+ * The image-data is converted to gray-scale and then half-sampled if configured.
+ */
+ _that.grab = function () {
+ var doHalfSample = _streamConfig.halfSample,
+ frame = inputStream.getFrame(),
+ ctxData;
+ if (frame) {
+ _ctx.drawImage(frame, 0, 0, _canvasSize.x, _canvasSize.y);
+ ctxData = _ctx.getImageData(_sx, _sy, _size.x, _size.y).data;
+ if (doHalfSample) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_cv_utils__["i"].bind()(ctxData, _size, _data);
+ } else {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_cv_utils__["j"].bind()(ctxData, _data, _streamConfig);
}
+ return true;
+ } else {
+ return false;
}
- return;
- }
+ };
- function memcpy(srcImagePtr, dstImagePtr) {
- srcImagePtr = srcImagePtr | 0;
- dstImagePtr = dstImagePtr | 0;
+ _that.getSize = function () {
+ return _size;
+ };
- var length = 0;
+ return _that;
+ };
- length = imul(size, size) | 0;
+ /* harmony default export */ exports["a"] = FrameGrabber;
+
+/***/ },
+/* 61 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var ImageLoader = {};
+ ImageLoader.load = function (directory, callback, offset, size, sequence) {
+ var htmlImagesSrcArray = new Array(size),
+ htmlImagesArray = new Array(htmlImagesSrcArray.length),
+ i,
+ img,
+ num;
- while ((length | 0) > 0) {
- length = length - 1 | 0;
- images[dstImagePtr + length | 0] = images[srcImagePtr + length | 0] | 0;
+ if (sequence === false) {
+ htmlImagesSrcArray[0] = directory;
+ } else {
+ for (i = 0; i < htmlImagesSrcArray.length; i++) {
+ num = offset + i;
+ htmlImagesSrcArray[i] = directory + "image-" + ("00" + num).slice(-3) + ".jpg";
}
}
-
- function zeroBorder(imagePtr) {
- imagePtr = imagePtr | 0;
-
- var x = 0,
- y = 0;
-
- for (x = 0; (x | 0) < (size - 1 | 0); x = x + 1 | 0) {
- images[imagePtr + x | 0] = 0;
- images[imagePtr + y | 0] = 0;
- y = y + size - 1 | 0;
- images[imagePtr + y | 0] = 0;
- y = y + 1 | 0;
+ htmlImagesArray.notLoaded = [];
+ htmlImagesArray.addImage = function (image) {
+ htmlImagesArray.notLoaded.push(image);
+ };
+ htmlImagesArray.loaded = function (loadedImg) {
+ var notloadedImgs = htmlImagesArray.notLoaded;
+ for (var x = 0; x < notloadedImgs.length; x++) {
+ if (notloadedImgs[x] === loadedImg) {
+ notloadedImgs.splice(x, 1);
+ for (var y = 0; y < htmlImagesSrcArray.length; y++) {
+ var imgName = htmlImagesSrcArray[y].substr(htmlImagesSrcArray[y].lastIndexOf("/"));
+ if (loadedImg.src.lastIndexOf(imgName) !== -1) {
+ htmlImagesArray[y] = loadedImg;
+ break;
+ }
+ }
+ break;
+ }
}
- for (x = 0; (x | 0) < (size | 0); x = x + 1 | 0) {
- images[imagePtr + y | 0] = 0;
- y = y + 1 | 0;
+ if (notloadedImgs.length === 0) {
+ if (true) {
+ console.log("Images loaded");
+ }
+ callback.apply(null, [htmlImagesArray]);
}
- }
-
- function skeletonize() {
- var subImagePtr = 0,
- erodedImagePtr = 0,
- tempImagePtr = 0,
- skelImagePtr = 0,
- sum = 0,
- done = 0;
-
- erodedImagePtr = imul(size, size) | 0;
- tempImagePtr = erodedImagePtr + erodedImagePtr | 0;
- skelImagePtr = tempImagePtr + erodedImagePtr | 0;
-
- // init skel-image
- init(skelImagePtr, 0);
- zeroBorder(subImagePtr);
+ };
- do {
- erode(subImagePtr, erodedImagePtr);
- dilate(erodedImagePtr, tempImagePtr);
- subtract(subImagePtr, tempImagePtr, tempImagePtr);
- bitwiseOr(skelImagePtr, tempImagePtr, skelImagePtr);
- memcpy(erodedImagePtr, subImagePtr);
- sum = countNonZero(subImagePtr) | 0;
- done = (sum | 0) == 0 | 0;
- } while (!done);
+ for (i = 0; i < htmlImagesSrcArray.length; i++) {
+ img = new Image();
+ htmlImagesArray.addImage(img);
+ addOnloadHandler(img, htmlImagesArray);
+ img.src = htmlImagesSrcArray[i];
}
+ };
- return {
- skeletonize: skeletonize
+ function addOnloadHandler(img, htmlImagesArray) {
+ img.onload = function () {
+ htmlImagesArray.loaded(this);
};
}
- exports["default"] = Skeletonizer;
-
- /* eslint-enable eqeqeq*/
- /* @preserve ASM END */
- module.exports = exports["default"];
+ /* harmony default export */ exports["a"] = ImageLoader;
/***/ },
-/* 23 */
+/* 62 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var _bresenham = __webpack_require__(24);
-
- var _bresenham2 = _interopRequireDefault(_bresenham);
-
- var _commonImage_debug = __webpack_require__(19);
-
- var _commonImage_debug2 = _interopRequireDefault(_commonImage_debug);
-
- var _readerCode_128_reader = __webpack_require__(25);
-
- var _readerCode_128_reader2 = _interopRequireDefault(_readerCode_128_reader);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__image_loader__ = __webpack_require__(61);
- var _readerEan_reader = __webpack_require__(27);
- var _readerEan_reader2 = _interopRequireDefault(_readerEan_reader);
-
- var _readerCode_39_reader = __webpack_require__(28);
-
- var _readerCode_39_reader2 = _interopRequireDefault(_readerCode_39_reader);
+ var InputStream = {};
+ InputStream.createVideoStream = function (video) {
+ var that = {},
+ _config = null,
+ _eventNames = ['canrecord', 'ended'],
+ _eventHandlers = {},
+ _calculatedWidth,
+ _calculatedHeight,
+ _topRight = { x: 0, y: 0 },
+ _canvasSize = { x: 0, y: 0 };
- var _readerCode_39_vin_reader = __webpack_require__(29);
+ function initSize() {
+ var width = video.videoWidth,
+ height = video.videoHeight;
- var _readerCode_39_vin_reader2 = _interopRequireDefault(_readerCode_39_vin_reader);
+ _calculatedWidth = _config.size ? width / height > 1 ? _config.size : Math.floor(width / height * _config.size) : width;
+ _calculatedHeight = _config.size ? width / height > 1 ? Math.floor(height / width * _config.size) : _config.size : height;
- var _readerCodabar_reader = __webpack_require__(30);
+ _canvasSize.x = _calculatedWidth;
+ _canvasSize.y = _calculatedHeight;
+ }
- var _readerCodabar_reader2 = _interopRequireDefault(_readerCodabar_reader);
+ that.getRealWidth = function () {
+ return video.videoWidth;
+ };
- var _readerUpc_reader = __webpack_require__(31);
+ that.getRealHeight = function () {
+ return video.videoHeight;
+ };
- var _readerUpc_reader2 = _interopRequireDefault(_readerUpc_reader);
+ that.getWidth = function () {
+ return _calculatedWidth;
+ };
- var _readerEan_8_reader = __webpack_require__(32);
+ that.getHeight = function () {
+ return _calculatedHeight;
+ };
- var _readerEan_8_reader2 = _interopRequireDefault(_readerEan_8_reader);
+ that.setWidth = function (width) {
+ _calculatedWidth = width;
+ };
- var _readerUpc_e_reader = __webpack_require__(33);
+ that.setHeight = function (height) {
+ _calculatedHeight = height;
+ };
- var _readerUpc_e_reader2 = _interopRequireDefault(_readerUpc_e_reader);
+ that.setInputStream = function (config) {
+ _config = config;
+ video.src = typeof config.src !== 'undefined' ? config.src : '';
+ };
- var _readerI2of5_reader = __webpack_require__(34);
+ that.ended = function () {
+ return video.ended;
+ };
- var _readerI2of5_reader2 = _interopRequireDefault(_readerI2of5_reader);
+ that.getConfig = function () {
+ return _config;
+ };
- var READERS = {
- code_128_reader: _readerCode_128_reader2['default'],
- ean_reader: _readerEan_reader2['default'],
- ean_8_reader: _readerEan_8_reader2['default'],
- code_39_reader: _readerCode_39_reader2['default'],
- code_39_vin_reader: _readerCode_39_vin_reader2['default'],
- codabar_reader: _readerCodabar_reader2['default'],
- upc_reader: _readerUpc_reader2['default'],
- upc_e_reader: _readerUpc_e_reader2['default'],
- i2of5_reader: _readerI2of5_reader2['default']
- };
- exports['default'] = {
- create: function create(config, inputImageWrapper) {
- var _canvas = {
- ctx: {
- frequency: null,
- pattern: null,
- overlay: null
- },
- dom: {
- frequency: null,
- pattern: null,
- overlay: null
- }
- },
- _barcodeReaders = [];
+ that.setAttribute = function (name, value) {
+ video.setAttribute(name, value);
+ };
- initCanvas();
- initReaders();
- initConfig();
+ that.pause = function () {
+ video.pause();
+ };
- function initCanvas() {
- if ((true) && typeof document !== 'undefined') {
- var $debug = document.querySelector("#debug.detection");
- _canvas.dom.frequency = document.querySelector("canvas.frequency");
- if (!_canvas.dom.frequency) {
- _canvas.dom.frequency = document.createElement("canvas");
- _canvas.dom.frequency.className = "frequency";
- if ($debug) {
- $debug.appendChild(_canvas.dom.frequency);
- }
- }
- _canvas.ctx.frequency = _canvas.dom.frequency.getContext("2d");
+ that.play = function () {
+ video.play();
+ };
- _canvas.dom.pattern = document.querySelector("canvas.patternBuffer");
- if (!_canvas.dom.pattern) {
- _canvas.dom.pattern = document.createElement("canvas");
- _canvas.dom.pattern.className = "patternBuffer";
- if ($debug) {
- $debug.appendChild(_canvas.dom.pattern);
- }
- }
- _canvas.ctx.pattern = _canvas.dom.pattern.getContext("2d");
+ that.setCurrentTime = function (time) {
+ if (_config.type !== "LiveStream") {
+ video.currentTime = time;
+ }
+ };
- _canvas.dom.overlay = document.querySelector("canvas.drawingBuffer");
- if (_canvas.dom.overlay) {
- _canvas.ctx.overlay = _canvas.dom.overlay.getContext("2d");
- }
+ that.addEventListener = function (event, f, bool) {
+ if (_eventNames.indexOf(event) !== -1) {
+ if (!_eventHandlers[event]) {
+ _eventHandlers[event] = [];
}
+ _eventHandlers[event].push(f);
+ } else {
+ video.addEventListener(event, f, bool);
}
+ };
- function initReaders() {
- config.readers.forEach(function (readerConfig) {
- var reader,
- configuration = {};
-
- if (typeof readerConfig === 'object') {
- reader = readerConfig.format;
- configuration = readerConfig.config;
- } else if (typeof readerConfig === 'string') {
- reader = readerConfig;
- }
- if (true) {
- console.log("Before registering reader: ", reader);
- }
- _barcodeReaders.push(new READERS[reader](configuration));
- });
- if (true) {
- console.log("Registered Readers: " + _barcodeReaders.map(function (reader) {
- return JSON.stringify({ format: reader.FORMAT, config: reader.config });
- }).join(', '));
+ that.clearEventHandlers = function () {
+ _eventNames.forEach(function (eventName) {
+ var handlers = _eventHandlers[eventName];
+ if (handlers && handlers.length > 0) {
+ handlers.forEach(function (handler) {
+ video.removeEventListener(eventName, handler);
+ });
}
- }
+ });
+ };
- function initConfig() {
- if ((true) && typeof document !== 'undefined') {
- var i,
- vis = [{
- node: _canvas.dom.frequency,
- prop: config.debug.showFrequency
- }, {
- node: _canvas.dom.pattern,
- prop: config.debug.showPattern
- }];
+ that.trigger = function (eventName, args) {
+ var j,
+ handlers = _eventHandlers[eventName];
- for (i = 0; i < vis.length; i++) {
- if (vis[i].prop === true) {
- vis[i].node.style.display = "block";
- } else {
- vis[i].node.style.display = "none";
- }
- }
+ if (eventName === 'canrecord') {
+ initSize();
+ }
+ if (handlers && handlers.length > 0) {
+ for (j = 0; j < handlers.length; j++) {
+ handlers[j].apply(that, args);
}
}
+ };
- /**
- * extend the line on both ends
- * @param {Array} line
- * @param {Number} angle
- */
- function getExtendedLine(line, angle, ext) {
- function extendLine(amount) {
- var extension = {
- y: amount * Math.sin(angle),
- x: amount * Math.cos(angle)
- };
+ that.setTopRight = function (topRight) {
+ _topRight.x = topRight.x;
+ _topRight.y = topRight.y;
+ };
- line[0].y -= extension.y;
- line[0].x -= extension.x;
- line[1].y += extension.y;
- line[1].x += extension.x;
- }
+ that.getTopRight = function () {
+ return _topRight;
+ };
- // check if inside image
- extendLine(ext);
- while (ext > 1 && (!inputImageWrapper.inImageWithBorder(line[0], 0) || !inputImageWrapper.inImageWithBorder(line[1], 0))) {
- ext -= Math.ceil(ext / 2);
- extendLine(-ext);
- }
- return line;
- }
+ that.setCanvasSize = function (size) {
+ _canvasSize.x = size.x;
+ _canvasSize.y = size.y;
+ };
- function getLine(box) {
- return [{
- x: (box[1][0] - box[0][0]) / 2 + box[0][0],
- y: (box[1][1] - box[0][1]) / 2 + box[0][1]
- }, {
- x: (box[3][0] - box[2][0]) / 2 + box[2][0],
- y: (box[3][1] - box[2][1]) / 2 + box[2][1]
- }];
- }
+ that.getCanvasSize = function () {
+ return _canvasSize;
+ };
- function tryDecode(line) {
- var result = null,
- i,
- barcodeLine = _bresenham2['default'].getBarcodeLine(inputImageWrapper, line[0], line[1]);
+ that.getFrame = function () {
+ return video;
+ };
- if ((true) && config.debug.showFrequency) {
- _commonImage_debug2['default'].drawPath(line, { x: 'x', y: 'y' }, _canvas.ctx.overlay, { color: 'red', lineWidth: 3 });
- _bresenham2['default'].debug.printFrequency(barcodeLine.line, _canvas.dom.frequency);
- }
+ return that;
+ };
- _bresenham2['default'].toBinaryLine(barcodeLine);
+ InputStream.createLiveStream = function (video) {
+ video.setAttribute("autoplay", true);
+ var that = InputStream.createVideoStream(video);
- if ((true) && config.debug.showPattern) {
- _bresenham2['default'].debug.printPattern(barcodeLine.line, _canvas.dom.pattern);
- }
+ that.ended = function () {
+ return false;
+ };
- for (i = 0; i < _barcodeReaders.length && result === null; i++) {
- result = _barcodeReaders[i].decodePattern(barcodeLine.line);
- }
- if (result === null) {
- return null;
- }
- return {
- codeResult: result,
- barcodeLine: barcodeLine
- };
- }
+ return that;
+ };
- /**
- * This method slices the given area apart and tries to detect a barcode-pattern
- * for each slice. It returns the decoded barcode, or null if nothing was found
- * @param {Array} box
- * @param {Array} line
- * @param {Number} lineAngle
- */
- function tryDecodeBruteForce(box, line, lineAngle) {
- var sideLength = Math.sqrt(Math.pow(box[1][0] - box[0][0], 2) + Math.pow(box[1][1] - box[0][1], 2)),
- i,
- slices = 16,
- result = null,
- dir,
- extension,
- xdir = Math.sin(lineAngle),
- ydir = Math.cos(lineAngle);
+ InputStream.createImageStream = function () {
+ var that = {};
+ var _config = null;
- for (i = 1; i < slices && result === null; i++) {
- // move line perpendicular to angle
- dir = sideLength / slices * i * (i % 2 === 0 ? -1 : 1);
- extension = {
- y: dir * xdir,
- x: dir * ydir
- };
- line[0].y += extension.x;
- line[0].x -= extension.y;
- line[1].y += extension.x;
- line[1].x -= extension.y;
+ var width = 0,
+ height = 0,
+ frameIdx = 0,
+ paused = true,
+ loaded = false,
+ imgArray = null,
+ size = 0,
+ offset = 1,
+ baseUrl = null,
+ ended = false,
+ calculatedWidth,
+ calculatedHeight,
+ _eventNames = ['canrecord', 'ended'],
+ _eventHandlers = {},
+ _topRight = { x: 0, y: 0 },
+ _canvasSize = { x: 0, y: 0 };
- result = tryDecode(line);
+ function loadImages() {
+ loaded = false;
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__image_loader__["a"].load(baseUrl, function (imgs) {
+ imgArray = imgs;
+ width = imgs[0].width;
+ height = imgs[0].height;
+ calculatedWidth = _config.size ? width / height > 1 ? _config.size : Math.floor(width / height * _config.size) : width;
+ calculatedHeight = _config.size ? width / height > 1 ? Math.floor(height / width * _config.size) : _config.size : height;
+ _canvasSize.x = calculatedWidth;
+ _canvasSize.y = calculatedHeight;
+ loaded = true;
+ frameIdx = 0;
+ setTimeout(function () {
+ publishEvent("canrecord", []);
+ }, 0);
+ }, offset, size, _config.sequence);
+ }
+
+ function publishEvent(eventName, args) {
+ var j,
+ handlers = _eventHandlers[eventName];
+
+ if (handlers && handlers.length > 0) {
+ for (j = 0; j < handlers.length; j++) {
+ handlers[j].apply(that, args);
}
- return result;
}
+ }
- function getLineLength(line) {
- return Math.sqrt(Math.pow(Math.abs(line[1].y - line[0].y), 2) + Math.pow(Math.abs(line[1].x - line[0].x), 2));
+ that.trigger = publishEvent;
+
+ that.getWidth = function () {
+ return calculatedWidth;
+ };
+
+ that.getHeight = function () {
+ return calculatedHeight;
+ };
+
+ that.setWidth = function (newWidth) {
+ calculatedWidth = newWidth;
+ };
+
+ that.setHeight = function (newHeight) {
+ calculatedHeight = newHeight;
+ };
+
+ that.getRealWidth = function () {
+ return width;
+ };
+
+ that.getRealHeight = function () {
+ return height;
+ };
+
+ that.setInputStream = function (stream) {
+ _config = stream;
+ if (stream.sequence === false) {
+ baseUrl = stream.src;
+ size = 1;
+ } else {
+ baseUrl = stream.src;
+ size = stream.length;
}
+ loadImages();
+ };
- /**
- * With the help of the configured readers (Code128 or EAN) this function tries to detect a
- * valid barcode pattern within the given area.
- * @param {Object} box The area to search in
- * @returns {Object} the result {codeResult, line, angle, pattern, threshold}
- */
- function _decodeFromBoundingBox(box) {
- var line,
- lineAngle,
- ctx = _canvas.ctx.overlay,
- result,
- lineLength;
+ that.ended = function () {
+ return ended;
+ };
- if (true) {
- if (config.debug.drawBoundingBox && ctx) {
- _commonImage_debug2['default'].drawPath(box, { x: 0, y: 1 }, ctx, { color: "blue", lineWidth: 2 });
- }
- }
+ that.setAttribute = function () {};
- line = getLine(box);
- lineLength = getLineLength(line);
- lineAngle = Math.atan2(line[1].y - line[0].y, line[1].x - line[0].x);
- line = getExtendedLine(line, lineAngle, Math.floor(lineLength * 0.1));
- if (line === null) {
- return null;
- }
+ that.getConfig = function () {
+ return _config;
+ };
- result = tryDecode(line);
- if (result === null) {
- result = tryDecodeBruteForce(box, line, lineAngle);
- }
+ that.pause = function () {
+ paused = true;
+ };
- if (result === null) {
- return null;
- }
+ that.play = function () {
+ paused = false;
+ };
- if ((true) && result && config.debug.drawScanline && ctx) {
- _commonImage_debug2['default'].drawPath(line, { x: 'x', y: 'y' }, ctx, { color: 'red', lineWidth: 3 });
- }
+ that.setCurrentTime = function (time) {
+ frameIdx = time;
+ };
- return {
- codeResult: result.codeResult,
- line: line,
- angle: lineAngle,
- pattern: result.barcodeLine.line,
- threshold: result.barcodeLine.threshold
- };
+ that.addEventListener = function (event, f) {
+ if (_eventNames.indexOf(event) !== -1) {
+ if (!_eventHandlers[event]) {
+ _eventHandlers[event] = [];
+ }
+ _eventHandlers[event].push(f);
}
+ };
- return {
- decodeFromBoundingBox: function decodeFromBoundingBox(box) {
- return _decodeFromBoundingBox(box);
- },
- decodeFromBoundingBoxes: function decodeFromBoundingBoxes(boxes) {
- var i,
- result,
- barcodes = [],
- multiple = config.multiple;
+ that.setTopRight = function (topRight) {
+ _topRight.x = topRight.x;
+ _topRight.y = topRight.y;
+ };
- for (i = 0; i < boxes.length; i++) {
- var box = boxes[i];
- result = _decodeFromBoundingBox(box) || {};
- result.box = box;
+ that.getTopRight = function () {
+ return _topRight;
+ };
- if (multiple) {
- barcodes.push(result);
- } else if (result.codeResult) {
- return result;
- }
- }
+ that.setCanvasSize = function (canvasSize) {
+ _canvasSize.x = canvasSize.x;
+ _canvasSize.y = canvasSize.y;
+ };
- if (multiple) {
- return {
- barcodes: barcodes
- };
- }
- },
- setReaders: function setReaders(readers) {
- config.readers = readers;
- _barcodeReaders.length = 0;
- initReaders();
+ that.getCanvasSize = function () {
+ return _canvasSize;
+ };
+
+ that.getFrame = function () {
+ var frame;
+
+ if (!loaded) {
+ return null;
+ }
+ if (!paused) {
+ frame = imgArray[frameIdx];
+ if (frameIdx < size - 1) {
+ frameIdx++;
+ } else {
+ setTimeout(function () {
+ ended = true;
+ publishEvent("ended", []);
+ }, 0);
}
- };
- }
+ }
+ return frame;
+ };
+
+ return that;
};
- module.exports = exports['default'];
+
+ /* harmony default export */ exports["a"] = InputStream;
/***/ },
-/* 24 */
+/* 63 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
+ /* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_image_wrapper__ = __webpack_require__(18);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_cv_utils__ = __webpack_require__(17);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_array_helper__ = __webpack_require__(8);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_image_debug__ = __webpack_require__(9);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__rasterizer__ = __webpack_require__(64);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__tracer__ = __webpack_require__(29);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__skeletonizer__ = __webpack_require__(65);
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var _commonCv_utils = __webpack_require__(5);
- var _commonCv_utils2 = _interopRequireDefault(_commonCv_utils);
- var _commonImage_wrapper = __webpack_require__(3);
- var _commonImage_wrapper2 = _interopRequireDefault(_commonImage_wrapper);
- var Bresenham = {};
+ var vec2 = {
+ clone: __webpack_require__(6),
+ dot: __webpack_require__(31),
+ scale: __webpack_require__(76),
+ transformMat2: __webpack_require__(77)
+ };
+ var mat2 = {
+ copy: __webpack_require__(73),
+ create: __webpack_require__(74),
+ invert: __webpack_require__(75)
+ };
- var Slope = {
- DIR: {
- UP: 1,
- DOWN: -1
+ var _config,
+ _currentImageWrapper,
+ _skelImageWrapper,
+ _subImageWrapper,
+ _labelImageWrapper,
+ _patchGrid,
+ _patchLabelGrid,
+ _imageToPatchGrid,
+ _binaryImageWrapper,
+ _patchSize,
+ _canvasContainer = {
+ ctx: {
+ binary: null
+ },
+ dom: {
+ binary: null
}
- };
- /**
- * Scans a line of the given image from point p1 to p2 and returns a result object containing
- * gray-scale values (0-255) of the underlying pixels in addition to the min
- * and max values.
- * @param {Object} imageWrapper
- * @param {Object} p1 The start point {x,y}
- * @param {Object} p2 The end point {x,y}
- * @returns {line, min, max}
- */
- Bresenham.getBarcodeLine = function (imageWrapper, p1, p2) {
- var x0 = p1.x | 0,
- y0 = p1.y | 0,
- x1 = p2.x | 0,
- y1 = p2.y | 0,
- steep = Math.abs(y1 - y0) > Math.abs(x1 - x0),
- deltax,
- deltay,
- error,
- ystep,
- y,
- tmp,
- x,
- line = [],
- imageData = imageWrapper.data,
- width = imageWrapper.size.x,
- sum = 0,
- val,
- min = 255,
- max = 0;
+ },
+ _numPatches = { x: 0, y: 0 },
+ _inputImageWrapper,
+ _skeletonizer;
- function read(a, b) {
- val = imageData[b * width + a];
- sum += val;
- min = val < min ? val : min;
- max = val > max ? val : max;
- line.push(val);
+ function initBuffers() {
+ var skeletonImageData;
+
+ if (_config.halfSample) {
+ _currentImageWrapper = new /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_image_wrapper__["a"]({
+ x: _inputImageWrapper.size.x / 2 | 0,
+ y: _inputImageWrapper.size.y / 2 | 0
+ });
+ } else {
+ _currentImageWrapper = _inputImageWrapper;
}
- if (steep) {
- tmp = x0;
- x0 = y0;
- y0 = tmp;
+ _patchSize = /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["b"].bind()(_config.patchSize, _currentImageWrapper.size);
- tmp = x1;
- x1 = y1;
- y1 = tmp;
- }
- if (x0 > x1) {
- tmp = x0;
- x0 = x1;
- x1 = tmp;
+ _numPatches.x = _currentImageWrapper.size.x / _patchSize.x | 0;
+ _numPatches.y = _currentImageWrapper.size.y / _patchSize.y | 0;
- tmp = y0;
- y0 = y1;
- y1 = tmp;
- }
- deltax = x1 - x0;
- deltay = Math.abs(y1 - y0);
- error = deltax / 2 | 0;
- y = y0;
- ystep = y0 < y1 ? 1 : -1;
- for (x = x0; x < x1; x++) {
- if (steep) {
- read(y, x);
- } else {
- read(x, y);
- }
- error = error - deltay;
- if (error < 0) {
- y = y + ystep;
- error = error + deltax;
- }
- }
+ _binaryImageWrapper = new /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_image_wrapper__["a"](_currentImageWrapper.size, undefined, Uint8Array, false);
- return {
- line: line,
- min: min,
- max: max
- };
- };
+ _labelImageWrapper = new /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_image_wrapper__["a"](_patchSize, undefined, Array, true);
- Bresenham.toOtsuBinaryLine = function (result) {
- var line = result.line,
- image = new _commonImage_wrapper2['default']({ x: line.length - 1, y: 1 }, line),
- threshold = _commonCv_utils2['default'].determineOtsuThreshold(image, 5);
+ skeletonImageData = new ArrayBuffer(64 * 1024);
+ _subImageWrapper = new /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_image_wrapper__["a"](_patchSize, new Uint8Array(skeletonImageData, 0, _patchSize.x * _patchSize.y));
+ _skelImageWrapper = new /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_image_wrapper__["a"](_patchSize, new Uint8Array(skeletonImageData, _patchSize.x * _patchSize.y * 3, _patchSize.x * _patchSize.y), undefined, true);
+ _skeletonizer = /* harmony import */__WEBPACK_IMPORTED_MODULE_6__skeletonizer__["a"].bind()(typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : global, {
+ size: _patchSize.x
+ }, skeletonImageData);
- line = _commonCv_utils2['default'].sharpenLine(line);
- _commonCv_utils2['default'].thresholdImage(image, threshold);
+ _imageToPatchGrid = new /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_image_wrapper__["a"]({
+ x: _currentImageWrapper.size.x / _subImageWrapper.size.x | 0,
+ y: _currentImageWrapper.size.y / _subImageWrapper.size.y | 0
+ }, undefined, Array, true);
+ _patchGrid = new /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_image_wrapper__["a"](_imageToPatchGrid.size, undefined, undefined, true);
+ _patchLabelGrid = new /* harmony import */__WEBPACK_IMPORTED_MODULE_0__common_image_wrapper__["a"](_imageToPatchGrid.size, undefined, Int32Array, true);
+ }
- return {
- line: line,
- threshold: threshold
- };
- };
+ function initCanvas() {
+ if (_config.useWorker || typeof document === 'undefined') {
+ return;
+ }
+ _canvasContainer.dom.binary = document.createElement("canvas");
+ _canvasContainer.dom.binary.className = "binaryBuffer";
+ if (true && _config.debug.showCanvas === true) {
+ document.querySelector("#debug").appendChild(_canvasContainer.dom.binary);
+ }
+ _canvasContainer.ctx.binary = _canvasContainer.dom.binary.getContext("2d");
+ _canvasContainer.dom.binary.width = _binaryImageWrapper.size.x;
+ _canvasContainer.dom.binary.height = _binaryImageWrapper.size.y;
+ }
/**
- * Converts the result from getBarcodeLine into a binary representation
- * also considering the frequency and slope of the signal for more robust results
- * @param {Object} result {line, min, max}
+ * Creates a bounding box which encloses all the given patches
+ * @returns {Array} The minimal bounding box
*/
- Bresenham.toBinaryLine = function (result) {
- var min = result.min,
- max = result.max,
- line = result.line,
- slope,
- slope2,
- center = min + (max - min) / 2,
- extrema = [],
- currentDir,
- dir,
- threshold = (max - min) / 12,
- rThreshold = -threshold,
+ function boxFromPatches(patches) {
+ var overAvg,
i,
- j;
-
- // 1. find extrema
- currentDir = line[0] > center ? Slope.DIR.UP : Slope.DIR.DOWN;
- extrema.push({
- pos: 0,
- val: line[0]
- });
- for (i = 0; i < line.length - 2; i++) {
- slope = line[i + 1] - line[i];
- slope2 = line[i + 2] - line[i + 1];
- if (slope + slope2 < rThreshold && line[i + 1] < center * 1.5) {
- dir = Slope.DIR.DOWN;
- } else if (slope + slope2 > threshold && line[i + 1] > center * 0.5) {
- dir = Slope.DIR.UP;
- } else {
- dir = currentDir;
- }
+ j,
+ patch,
+ transMat,
+ minx = _binaryImageWrapper.size.x,
+ miny = _binaryImageWrapper.size.y,
+ maxx = -_binaryImageWrapper.size.x,
+ maxy = -_binaryImageWrapper.size.y,
+ box,
+ scale;
- if (currentDir !== dir) {
- extrema.push({
- pos: i,
- val: line[i]
- });
- currentDir = dir;
+ // draw all patches which are to be taken into consideration
+ overAvg = 0;
+ for (i = 0; i < patches.length; i++) {
+ patch = patches[i];
+ overAvg += patch.rad;
+ if (true && _config.debug.showPatches) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_3__common_image_debug__["a"].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "red" });
}
}
- extrema.push({
- pos: line.length,
- val: line[line.length - 1]
- });
- for (j = extrema[0].pos; j < extrema[1].pos; j++) {
- line[j] = line[j] > center ? 0 : 1;
+ overAvg /= patches.length;
+ overAvg = (overAvg * 180 / Math.PI + 90) % 180 - 90;
+ if (overAvg < 0) {
+ overAvg += 180;
}
- // iterate over extrema and convert to binary based on avg between minmax
- for (i = 1; i < extrema.length - 1; i++) {
- if (extrema[i + 1].val > extrema[i].val) {
- threshold = extrema[i].val + (extrema[i + 1].val - extrema[i].val) / 3 * 2 | 0;
- } else {
- threshold = extrema[i + 1].val + (extrema[i].val - extrema[i + 1].val) / 3 | 0;
- }
+ overAvg = (180 - overAvg) * Math.PI / 180;
+ transMat = mat2.copy(mat2.create(), [Math.cos(overAvg), Math.sin(overAvg), -Math.sin(overAvg), Math.cos(overAvg)]);
- for (j = extrema[i].pos; j < extrema[i + 1].pos; j++) {
- line[j] = line[j] > threshold ? 0 : 1;
+ // iterate over patches and rotate by angle
+ for (i = 0; i < patches.length; i++) {
+ patch = patches[i];
+ for (j = 0; j < 4; j++) {
+ vec2.transformMat2(patch.box[j], patch.box[j], transMat);
}
- }
-
- return {
- line: line,
- threshold: threshold
- };
- };
-
- /**
- * Used for development only
- */
- Bresenham.debug = {
- printFrequency: function printFrequency(line, canvas) {
- var i,
- ctx = canvas.getContext("2d");
- canvas.width = line.length;
- canvas.height = 256;
- ctx.beginPath();
- ctx.strokeStyle = "blue";
- for (i = 0; i < line.length; i++) {
- ctx.moveTo(i, 255);
- ctx.lineTo(i, 255 - line[i]);
+ if (true && _config.debug.boxFromPatches.showTransformed) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_3__common_image_debug__["a"].drawPath(patch.box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#99ff00', lineWidth: 2 });
}
- ctx.stroke();
- ctx.closePath();
- },
-
- printPattern: function printPattern(line, canvas) {
- var ctx = canvas.getContext("2d"),
- i;
+ }
- canvas.width = line.length;
- ctx.fillColor = "black";
- for (i = 0; i < line.length; i++) {
- if (line[i] === 1) {
- ctx.fillRect(i, 0, 1, 100);
+ // find bounding box
+ for (i = 0; i < patches.length; i++) {
+ patch = patches[i];
+ for (j = 0; j < 4; j++) {
+ if (patch.box[j][0] < minx) {
+ minx = patch.box[j][0];
+ }
+ if (patch.box[j][0] > maxx) {
+ maxx = patch.box[j][0];
+ }
+ if (patch.box[j][1] < miny) {
+ miny = patch.box[j][1];
+ }
+ if (patch.box[j][1] > maxy) {
+ maxy = patch.box[j][1];
}
}
}
- };
- exports['default'] = Bresenham;
- module.exports = exports['default'];
-
-/***/ },
-/* 25 */
-/***/ function(module, exports, __webpack_require__) {
-
- "use strict";
+ box = [[minx, miny], [maxx, miny], [maxx, maxy], [minx, maxy]];
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
+ if (true && _config.debug.boxFromPatches.showTransformedBox) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_3__common_image_debug__["a"].drawPath(box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#ff0000', lineWidth: 2 });
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ scale = _config.halfSample ? 2 : 1;
+ // reverse rotation;
+ transMat = mat2.invert(transMat, transMat);
+ for (j = 0; j < 4; j++) {
+ vec2.transformMat2(box[j], box[j], transMat);
+ }
- var _barcode_reader = __webpack_require__(26);
+ if (true && _config.debug.boxFromPatches.showBB) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_3__common_image_debug__["a"].drawPath(box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#ff0000', lineWidth: 2 });
+ }
- var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
+ for (j = 0; j < 4; j++) {
+ vec2.scale(box[j], box[j], scale);
+ }
- function Code128Reader() {
- _barcode_reader2["default"].call(this);
+ return box;
}
- var properties = {
- CODE_SHIFT: { value: 98 },
- CODE_C: { value: 99 },
- CODE_B: { value: 100 },
- CODE_A: { value: 101 },
- START_CODE_A: { value: 103 },
- START_CODE_B: { value: 104 },
- START_CODE_C: { value: 105 },
- STOP_CODE: { value: 106 },
- MODULO: { value: 11 },
- CODE_PATTERN: { value: [[2, 1, 2, 2, 2, 2], [2, 2, 2, 1, 2, 2], [2, 2, 2, 2, 2, 1], [1, 2, 1, 2, 2, 3], [1, 2, 1, 3, 2, 2], [1, 3, 1, 2, 2, 2], [1, 2, 2, 2, 1, 3], [1, 2, 2, 3, 1, 2], [1, 3, 2, 2, 1, 2], [2, 2, 1, 2, 1, 3], [2, 2, 1, 3, 1, 2], [2, 3, 1, 2, 1, 2], [1, 1, 2, 2, 3, 2], [1, 2, 2, 1, 3, 2], [1, 2, 2, 2, 3, 1], [1, 1, 3, 2, 2, 2], [1, 2, 3, 1, 2, 2], [1, 2, 3, 2, 2, 1], [2, 2, 3, 2, 1, 1], [2, 2, 1, 1, 3, 2], [2, 2, 1, 2, 3, 1], [2, 1, 3, 2, 1, 2], [2, 2, 3, 1, 1, 2], [3, 1, 2, 1, 3, 1], [3, 1, 1, 2, 2, 2], [3, 2, 1, 1, 2, 2], [3, 2, 1, 2, 2, 1], [3, 1, 2, 2, 1, 2], [3, 2, 2, 1, 1, 2], [3, 2, 2, 2, 1, 1], [2, 1, 2, 1, 2, 3], [2, 1, 2, 3, 2, 1], [2, 3, 2, 1, 2, 1], [1, 1, 1, 3, 2, 3], [1, 3, 1, 1, 2, 3], [1, 3, 1, 3, 2, 1], [1, 1, 2, 3, 1, 3], [1, 3, 2, 1, 1, 3], [1, 3, 2, 3, 1, 1], [2, 1, 1, 3, 1, 3], [2, 3, 1, 1, 1, 3], [2, 3, 1, 3, 1, 1], [1, 1, 2, 1, 3, 3], [1, 1, 2, 3, 3, 1], [1, 3, 2, 1, 3, 1], [1, 1, 3, 1, 2, 3], [1, 1, 3, 3, 2, 1], [1, 3, 3, 1, 2, 1], [3, 1, 3, 1, 2, 1], [2, 1, 1, 3, 3, 1], [2, 3, 1, 1, 3, 1], [2, 1, 3, 1, 1, 3], [2, 1, 3, 3, 1, 1], [2, 1, 3, 1, 3, 1], [3, 1, 1, 1, 2, 3], [3, 1, 1, 3, 2, 1], [3, 3, 1, 1, 2, 1], [3, 1, 2, 1, 1, 3], [3, 1, 2, 3, 1, 1], [3, 3, 2, 1, 1, 1], [3, 1, 4, 1, 1, 1], [2, 2, 1, 4, 1, 1], [4, 3, 1, 1, 1, 1], [1, 1, 1, 2, 2, 4], [1, 1, 1, 4, 2, 2], [1, 2, 1, 1, 2, 4], [1, 2, 1, 4, 2, 1], [1, 4, 1, 1, 2, 2], [1, 4, 1, 2, 2, 1], [1, 1, 2, 2, 1, 4], [1, 1, 2, 4, 1, 2], [1, 2, 2, 1, 1, 4], [1, 2, 2, 4, 1, 1], [1, 4, 2, 1, 1, 2], [1, 4, 2, 2, 1, 1], [2, 4, 1, 2, 1, 1], [2, 2, 1, 1, 1, 4], [4, 1, 3, 1, 1, 1], [2, 4, 1, 1, 1, 2], [1, 3, 4, 1, 1, 1], [1, 1, 1, 2, 4, 2], [1, 2, 1, 1, 4, 2], [1, 2, 1, 2, 4, 1], [1, 1, 4, 2, 1, 2], [1, 2, 4, 1, 1, 2], [1, 2, 4, 2, 1, 1], [4, 1, 1, 2, 1, 2], [4, 2, 1, 1, 1, 2], [4, 2, 1, 2, 1, 1], [2, 1, 2, 1, 4, 1], [2, 1, 4, 1, 2, 1], [4, 1, 2, 1, 2, 1], [1, 1, 1, 1, 4, 3], [1, 1, 1, 3, 4, 1], [1, 3, 1, 1, 4, 1], [1, 1, 4, 1, 1, 3], [1, 1, 4, 3, 1, 1], [4, 1, 1, 1, 1, 3], [4, 1, 1, 3, 1, 1], [1, 1, 3, 1, 4, 1], [1, 1, 4, 1, 3, 1], [3, 1, 1, 1, 4, 1], [4, 1, 1, 1, 3, 1], [2, 1, 1, 4, 1, 2], [2, 1, 1, 2, 1, 4], [2, 1, 1, 2, 3, 2], [2, 3, 3, 1, 1, 1, 2]] },
- SINGLE_CODE_ERROR: { value: 1 },
- AVG_CODE_ERROR: { value: 0.5 },
- FORMAT: { value: "code_128", writeable: false }
- };
+ /**
+ * Creates a binary image of the current image
+ */
+ function binarizeImage() {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["c"].bind()(_currentImageWrapper, _binaryImageWrapper);
+ _binaryImageWrapper.zeroBorder();
+ if (_config.showCanvas) {
+ _binaryImageWrapper.show(_canvasContainer.dom.binary, 255);
+ }
+ }
- Code128Reader.prototype = Object.create(_barcode_reader2["default"].prototype, properties);
- Code128Reader.prototype.constructor = Code128Reader;
+ /**
+ * Iterate over the entire image
+ * extract patches
+ */
+ function findPatches() {
+ var i,
+ j,
+ x,
+ y,
+ moments,
+ patchesFound = [],
+ rasterizer,
+ rasterResult,
+ patch;
+ for (i = 0; i < _numPatches.x; i++) {
+ for (j = 0; j < _numPatches.y; j++) {
+ x = _subImageWrapper.size.x * i;
+ y = _subImageWrapper.size.y * j;
- Code128Reader.prototype._decodeCode = function (start) {
- var counter = [0, 0, 0, 0, 0, 0],
- i,
- self = this,
- offset = start,
- isWhite = !self._row[offset],
- counterPos = 0,
- bestMatch = {
- error: Number.MAX_VALUE,
- code: -1,
- start: start,
- end: start
- },
- code,
- error,
- normalized;
+ // seperate parts
+ skeletonize(x, y);
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- if (counterPos === counter.length - 1) {
- normalized = self._normalize(counter);
- if (normalized) {
- for (code = 0; code < self.CODE_PATTERN.length; code++) {
- error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
- if (error < bestMatch.error) {
- bestMatch.code = code;
- bestMatch.error = error;
- }
- }
- bestMatch.end = i;
- return bestMatch;
- }
- } else {
- counterPos++;
+ // Rasterize, find individual bars
+ _skelImageWrapper.zeroBorder();
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_2__common_array_helper__["a"].init(_labelImageWrapper.data, 0);
+ rasterizer = /* harmony import */__WEBPACK_IMPORTED_MODULE_4__rasterizer__["a"].create(_skelImageWrapper, _labelImageWrapper);
+ rasterResult = rasterizer.rasterize(0);
+
+ if (true && _config.debug.showLabels) {
+ _labelImageWrapper.overlay(_canvasContainer.dom.binary, Math.floor(360 / rasterResult.count), { x: x, y: y });
}
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
- }
- return null;
- };
- Code128Reader.prototype._findStart = function () {
- var counter = [0, 0, 0, 0, 0, 0],
- i,
- self = this,
- offset = self._nextSet(self._row),
- isWhite = false,
- counterPos = 0,
- bestMatch = {
- error: Number.MAX_VALUE,
- code: -1,
- start: 0,
- end: 0
- },
- code,
- error,
- j,
- sum,
- normalized;
+ // calculate moments from the skeletonized patch
+ moments = _labelImageWrapper.moments(rasterResult.count);
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- if (counterPos === counter.length - 1) {
- sum = 0;
- for (j = 0; j < counter.length; j++) {
- sum += counter[j];
- }
- normalized = self._normalize(counter);
- if (normalized) {
- for (code = self.START_CODE_A; code <= self.START_CODE_C; code++) {
- error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
- if (error < bestMatch.error) {
- bestMatch.code = code;
- bestMatch.error = error;
- }
- }
- if (bestMatch.error < self.AVG_CODE_ERROR) {
- bestMatch.start = i - sum;
- bestMatch.end = i;
- return bestMatch;
- }
- }
+ // extract eligible patches
+ patchesFound = patchesFound.concat(describePatch(moments, [i, j], x, y));
+ }
+ }
- for (j = 0; j < 4; j++) {
- counter[j] = counter[j + 2];
- }
- counter[4] = 0;
- counter[5] = 0;
- counterPos--;
- } else {
- counterPos++;
- }
- counter[counterPos] = 1;
- isWhite = !isWhite;
+ if (true && _config.debug.showFoundPatches) {
+ for (i = 0; i < patchesFound.length; i++) {
+ patch = patchesFound[i];
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_3__common_image_debug__["a"].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "#99ff00", lineWidth: 2 });
}
}
- return null;
- };
- Code128Reader.prototype._decode = function () {
- var self = this,
- startInfo = self._findStart(),
- code = null,
- done = false,
- result = [],
- multiplier = 0,
- checksum = 0,
- codeset,
- rawResult = [],
- decodedCodes = [],
- shiftNext = false,
- unshift,
- removeLastCharacter = true;
+ return patchesFound;
+ }
- if (startInfo === null) {
- return null;
+ /**
+ * Finds those connected areas which contain at least 6 patches
+ * and returns them ordered DESC by the number of contained patches
+ * @param {Number} maxLabel
+ */
+ function findBiggestConnectedAreas(maxLabel) {
+ var i,
+ sum,
+ labelHist = [],
+ topLabels = [];
+
+ for (i = 0; i < maxLabel; i++) {
+ labelHist.push(0);
}
- code = {
- code: startInfo.code,
- start: startInfo.start,
- end: startInfo.end
- };
- decodedCodes.push(code);
- checksum = code.code;
- switch (code.code) {
- case self.START_CODE_A:
- codeset = self.CODE_A;
- break;
- case self.START_CODE_B:
- codeset = self.CODE_B;
- break;
- case self.START_CODE_C:
- codeset = self.CODE_C;
- break;
- default:
- return null;
+ sum = _patchLabelGrid.data.length;
+ while (sum--) {
+ if (_patchLabelGrid.data[sum] > 0) {
+ labelHist[_patchLabelGrid.data[sum] - 1]++;
+ }
}
- while (!done) {
- unshift = shiftNext;
- shiftNext = false;
- code = self._decodeCode(code.end);
- if (code !== null) {
- if (code.code !== self.STOP_CODE) {
- removeLastCharacter = true;
- }
+ labelHist = labelHist.map(function (val, idx) {
+ return {
+ val: val,
+ label: idx + 1
+ };
+ });
- if (code.code !== self.STOP_CODE) {
- rawResult.push(code.code);
- multiplier++;
- checksum += multiplier * code.code;
- }
- decodedCodes.push(code);
+ labelHist.sort(function (a, b) {
+ return b.val - a.val;
+ });
- switch (codeset) {
- case self.CODE_A:
- if (code.code < 64) {
- result.push(String.fromCharCode(32 + code.code));
- } else if (code.code < 96) {
- result.push(String.fromCharCode(code.code - 64));
- } else {
- if (code.code !== self.STOP_CODE) {
- removeLastCharacter = false;
- }
- switch (code.code) {
- case self.CODE_SHIFT:
- shiftNext = true;
- codeset = self.CODE_B;
- break;
- case self.CODE_B:
- codeset = self.CODE_B;
- break;
- case self.CODE_C:
- codeset = self.CODE_C;
- break;
- case self.STOP_CODE:
- done = true;
- break;
+ // extract top areas with at least 6 patches present
+ topLabels = labelHist.filter(function (el) {
+ return el.val >= 5;
+ });
+
+ return topLabels;
+ }
+
+ /**
+ *
+ */
+ function findBoxes(topLabels, maxLabel) {
+ var i,
+ j,
+ sum,
+ patches = [],
+ patch,
+ box,
+ boxes = [],
+ hsv = [0, 1, 1],
+ rgb = [0, 0, 0];
+
+ for (i = 0; i < topLabels.length; i++) {
+ sum = _patchLabelGrid.data.length;
+ patches.length = 0;
+ while (sum--) {
+ if (_patchLabelGrid.data[sum] === topLabels[i].label) {
+ patch = _imageToPatchGrid.data[sum];
+ patches.push(patch);
+ }
+ }
+ box = boxFromPatches(patches);
+ if (box) {
+ boxes.push(box);
+
+ // draw patch-labels if requested
+ if (true && _config.debug.showRemainingPatchLabels) {
+ for (j = 0; j < patches.length; j++) {
+ patch = patches[j];
+ hsv[0] = topLabels[i].label / (maxLabel + 1) * 360;
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["a"].bind()(hsv, rgb);
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_3__common_image_debug__["a"].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "rgb(" + rgb.join(",") + ")", lineWidth: 2 });
+ }
+ }
+ }
+ }
+ return boxes;
+ }
+
+ /**
+ * Find similar moments (via cluster)
+ * @param {Object} moments
+ */
+ function similarMoments(moments) {
+ var clusters = /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["d"].bind()(moments, 0.90);
+ var topCluster = /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["e"].bind()(clusters, 1, function (e) {
+ return e.getPoints().length;
+ });
+ var points = [],
+ result = [];
+ if (topCluster.length === 1) {
+ points = topCluster[0].item.getPoints();
+ for (var i = 0; i < points.length; i++) {
+ result.push(points[i].point);
+ }
+ }
+ return result;
+ }
+
+ function skeletonize(x, y) {
+ _binaryImageWrapper.subImageAsCopy(_subImageWrapper, /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["f"].bind()(x, y));
+ _skeletonizer.skeletonize();
+
+ // Show skeleton if requested
+ if (true && _config.debug.showSkeleton) {
+ _skelImageWrapper.overlay(_canvasContainer.dom.binary, 360, /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["f"].bind()(x, y));
+ }
+ }
+
+ /**
+ * Extracts and describes those patches which seem to contain a barcode pattern
+ * @param {Array} moments
+ * @param {Object} patchPos,
+ * @param {Number} x
+ * @param {Number} y
+ * @returns {Array} list of patches
+ */
+ function describePatch(moments, patchPos, x, y) {
+ var k,
+ avg,
+ eligibleMoments = [],
+ matchingMoments,
+ patch,
+ patchesFound = [],
+ minComponentWeight = Math.ceil(_patchSize.x / 3);
+
+ if (moments.length >= 2) {
+ // only collect moments which's area covers at least minComponentWeight pixels.
+ for (k = 0; k < moments.length; k++) {
+ if (moments[k].m00 > minComponentWeight) {
+ eligibleMoments.push(moments[k]);
+ }
+ }
+
+ // if at least 2 moments are found which have at least minComponentWeights covered
+ if (eligibleMoments.length >= 2) {
+ matchingMoments = similarMoments(eligibleMoments);
+ avg = 0;
+ // determine the similarity of the moments
+ for (k = 0; k < matchingMoments.length; k++) {
+ avg += matchingMoments[k].rad;
+ }
+
+ // Only two of the moments are allowed not to fit into the equation
+ // add the patch to the set
+ if (matchingMoments.length > 1 && matchingMoments.length >= eligibleMoments.length / 4 * 3 && matchingMoments.length > moments.length / 4) {
+ avg /= matchingMoments.length;
+ patch = {
+ index: patchPos[1] * _numPatches.x + patchPos[0],
+ pos: {
+ x: x,
+ y: y
+ },
+ box: [vec2.clone([x, y]), vec2.clone([x + _subImageWrapper.size.x, y]), vec2.clone([x + _subImageWrapper.size.x, y + _subImageWrapper.size.y]), vec2.clone([x, y + _subImageWrapper.size.y])],
+ moments: matchingMoments,
+ rad: avg,
+ vec: vec2.clone([Math.cos(avg), Math.sin(avg)])
+ };
+ patchesFound.push(patch);
+ }
+ }
+ }
+ return patchesFound;
+ }
+
+ /**
+ * finds patches which are connected and share the same orientation
+ * @param {Object} patchesFound
+ */
+ function rasterizeAngularSimilarity(patchesFound) {
+ var label = 0,
+ threshold = 0.95,
+ currIdx = 0,
+ j,
+ patch,
+ hsv = [0, 1, 1],
+ rgb = [0, 0, 0];
+
+ function notYetProcessed() {
+ var i;
+ for (i = 0; i < _patchLabelGrid.data.length; i++) {
+ if (_patchLabelGrid.data[i] === 0 && _patchGrid.data[i] === 1) {
+ return i;
+ }
+ }
+ return _patchLabelGrid.length;
+ }
+
+ function trace(currentIdx) {
+ var x,
+ y,
+ currentPatch,
+ idx,
+ dir,
+ current = {
+ x: currentIdx % _patchLabelGrid.size.x,
+ y: currentIdx / _patchLabelGrid.size.x | 0
+ },
+ similarity;
+
+ if (currentIdx < _patchLabelGrid.data.length) {
+ currentPatch = _imageToPatchGrid.data[currentIdx];
+ // assign label
+ _patchLabelGrid.data[currentIdx] = label;
+ for (dir = 0; dir < /* harmony import */__WEBPACK_IMPORTED_MODULE_5__tracer__["a"].searchDirections.length; dir++) {
+ y = current.y + /* harmony import */__WEBPACK_IMPORTED_MODULE_5__tracer__["a"].searchDirections[dir][0];
+ x = current.x + /* harmony import */__WEBPACK_IMPORTED_MODULE_5__tracer__["a"].searchDirections[dir][1];
+ idx = y * _patchLabelGrid.size.x + x;
+
+ // continue if patch empty
+ if (_patchGrid.data[idx] === 0) {
+ _patchLabelGrid.data[idx] = Number.MAX_VALUE;
+ continue;
+ }
+
+ if (_patchLabelGrid.data[idx] === 0) {
+ similarity = Math.abs(vec2.dot(_imageToPatchGrid.data[idx].vec, currentPatch.vec));
+ if (similarity > threshold) {
+ trace(idx);
+ }
+ }
+ }
+ }
+ }
+
+ // prepare for finding the right patches
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_2__common_array_helper__["a"].init(_patchGrid.data, 0);
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_2__common_array_helper__["a"].init(_patchLabelGrid.data, 0);
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_2__common_array_helper__["a"].init(_imageToPatchGrid.data, null);
+
+ for (j = 0; j < patchesFound.length; j++) {
+ patch = patchesFound[j];
+ _imageToPatchGrid.data[patch.index] = patch;
+ _patchGrid.data[patch.index] = 1;
+ }
+
+ // rasterize the patches found to determine area
+ _patchGrid.zeroBorder();
+
+ while ((currIdx = notYetProcessed()) < _patchLabelGrid.data.length) {
+ label++;
+ trace(currIdx);
+ }
+
+ // draw patch-labels if requested
+ if (true && _config.debug.showPatchLabels) {
+ for (j = 0; j < _patchLabelGrid.data.length; j++) {
+ if (_patchLabelGrid.data[j] > 0 && _patchLabelGrid.data[j] <= label) {
+ patch = _imageToPatchGrid.data[j];
+ hsv[0] = _patchLabelGrid.data[j] / (label + 1) * 360;
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["a"].bind()(hsv, rgb);
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_3__common_image_debug__["a"].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "rgb(" + rgb.join(",") + ")", lineWidth: 2 });
+ }
+ }
+ }
+
+ return label;
+ }
+
+ /* harmony default export */ exports["a"] = {
+ init: function init(inputImageWrapper, config) {
+ _config = config;
+ _inputImageWrapper = inputImageWrapper;
+
+ initBuffers();
+ initCanvas();
+ },
+
+ locate: function locate() {
+ var patchesFound, topLabels, boxes;
+
+ if (_config.halfSample) {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["g"].bind()(_inputImageWrapper, _currentImageWrapper);
+ }
+
+ binarizeImage();
+ patchesFound = findPatches();
+ // return unless 5% or more patches are found
+ if (patchesFound.length < _numPatches.x * _numPatches.y * 0.05) {
+ return null;
+ }
+
+ // rasterrize area by comparing angular similarity;
+ var maxLabel = rasterizeAngularSimilarity(patchesFound);
+ if (maxLabel < 1) {
+ return null;
+ }
+
+ // search for area with the most patches (biggest connected area)
+ topLabels = findBiggestConnectedAreas(maxLabel);
+ if (topLabels.length === 0) {
+ return null;
+ }
+
+ boxes = findBoxes(topLabels, maxLabel);
+ return boxes;
+ },
+
+ checkImageConstraints: function checkImageConstraints(inputStream, config) {
+ var patchSize,
+ width = inputStream.getWidth(),
+ height = inputStream.getHeight(),
+ halfSample = config.halfSample ? 0.5 : 1,
+ size,
+ area;
+
+ // calculate width and height based on area
+ if (inputStream.getConfig().area) {
+ area = /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["h"].bind()(width, height, inputStream.getConfig().area);
+ inputStream.setTopRight({ x: area.sx, y: area.sy });
+ inputStream.setCanvasSize({ x: width, y: height });
+ width = area.sw;
+ height = area.sh;
+ }
+
+ size = {
+ x: Math.floor(width * halfSample),
+ y: Math.floor(height * halfSample)
+ };
+
+ patchSize = /* harmony import */__WEBPACK_IMPORTED_MODULE_1__common_cv_utils__["b"].bind()(config.patchSize, size);
+ if (true) {
+ console.log("Patch-Size: " + JSON.stringify(patchSize));
+ }
+
+ inputStream.setWidth(Math.floor(Math.floor(size.x / patchSize.x) * (1 / halfSample) * patchSize.x));
+ inputStream.setHeight(Math.floor(Math.floor(size.y / patchSize.y) * (1 / halfSample) * patchSize.y));
+
+ if (inputStream.getWidth() % patchSize.x === 0 && inputStream.getHeight() % patchSize.y === 0) {
+ return true;
+ }
+
+ throw new Error("Image dimensions do not comply with the current settings: Width (" + width + " )and height (" + height + ") must a multiple of " + patchSize.x);
+ }
+ };
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 64 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tracer__ = __webpack_require__(29);
+
+
+ /**
+ * http://www.codeproject.com/Tips/407172/Connected-Component-Labeling-and-Vectorization
+ */
+ var Rasterizer = {
+ createContour2D: function createContour2D() {
+ return {
+ dir: null,
+ index: null,
+ firstVertex: null,
+ insideContours: null,
+ nextpeer: null,
+ prevpeer: null
+ };
+ },
+ CONTOUR_DIR: {
+ CW_DIR: 0,
+ CCW_DIR: 1,
+ UNKNOWN_DIR: 2
+ },
+ DIR: {
+ OUTSIDE_EDGE: -32767,
+ INSIDE_EDGE: -32766
+ },
+ create: function create(imageWrapper, labelWrapper) {
+ var imageData = imageWrapper.data,
+ labelData = labelWrapper.data,
+ width = imageWrapper.size.x,
+ height = imageWrapper.size.y,
+ tracer = /* harmony import */__WEBPACK_IMPORTED_MODULE_0__tracer__["a"].create(imageWrapper, labelWrapper);
+
+ return {
+ rasterize: function rasterize(depthlabel) {
+ var color,
+ bc,
+ lc,
+ labelindex,
+ cx,
+ cy,
+ colorMap = [],
+ vertex,
+ p,
+ cc,
+ sc,
+ pos,
+ connectedCount = 0,
+ i;
+
+ for (i = 0; i < 400; i++) {
+ colorMap[i] = 0;
+ }
+
+ colorMap[0] = imageData[0];
+ cc = null;
+ for (cy = 1; cy < height - 1; cy++) {
+ labelindex = 0;
+ bc = colorMap[0];
+ for (cx = 1; cx < width - 1; cx++) {
+ pos = cy * width + cx;
+ if (labelData[pos] === 0) {
+ color = imageData[pos];
+ if (color !== bc) {
+ if (labelindex === 0) {
+ lc = connectedCount + 1;
+ colorMap[lc] = color;
+ bc = color;
+ vertex = tracer.contourTracing(cy, cx, lc, color, Rasterizer.DIR.OUTSIDE_EDGE);
+ if (vertex !== null) {
+ connectedCount++;
+ labelindex = lc;
+ p = Rasterizer.createContour2D();
+ p.dir = Rasterizer.CONTOUR_DIR.CW_DIR;
+ p.index = labelindex;
+ p.firstVertex = vertex;
+ p.nextpeer = cc;
+ p.insideContours = null;
+ if (cc !== null) {
+ cc.prevpeer = p;
+ }
+ cc = p;
+ }
+ } else {
+ vertex = tracer.contourTracing(cy, cx, Rasterizer.DIR.INSIDE_EDGE, color, labelindex);
+ if (vertex !== null) {
+ p = Rasterizer.createContour2D();
+ p.firstVertex = vertex;
+ p.insideContours = null;
+ if (depthlabel === 0) {
+ p.dir = Rasterizer.CONTOUR_DIR.CCW_DIR;
+ } else {
+ p.dir = Rasterizer.CONTOUR_DIR.CW_DIR;
+ }
+ p.index = depthlabel;
+ sc = cc;
+ while (sc !== null && sc.index !== labelindex) {
+ sc = sc.nextpeer;
+ }
+ if (sc !== null) {
+ p.nextpeer = sc.insideContours;
+ if (sc.insideContours !== null) {
+ sc.insideContours.prevpeer = p;
+ }
+ sc.insideContours = p;
+ }
+ }
+ }
+ } else {
+ labelData[pos] = labelindex;
+ }
+ } else if (labelData[pos] === Rasterizer.DIR.OUTSIDE_EDGE || labelData[pos] === Rasterizer.DIR.INSIDE_EDGE) {
+ labelindex = 0;
+ if (labelData[pos] === Rasterizer.DIR.INSIDE_EDGE) {
+ bc = imageData[pos];
+ } else {
+ bc = colorMap[0];
+ }
+ } else {
+ labelindex = labelData[pos];
+ bc = colorMap[labelindex];
}
}
- break;
- case self.CODE_B:
- if (code.code < 96) {
- result.push(String.fromCharCode(32 + code.code));
+ }
+ sc = cc;
+ while (sc !== null) {
+ sc.index = depthlabel;
+ sc = sc.nextpeer;
+ }
+ return {
+ cc: cc,
+ count: connectedCount
+ };
+ },
+ debug: {
+ drawContour: function drawContour(canvas, firstContour) {
+ var ctx = canvas.getContext("2d"),
+ pq = firstContour,
+ iq,
+ q,
+ p;
+
+ ctx.strokeStyle = "red";
+ ctx.fillStyle = "red";
+ ctx.lineWidth = 1;
+
+ if (pq !== null) {
+ iq = pq.insideContours;
} else {
- if (code.code !== self.STOP_CODE) {
- removeLastCharacter = false;
- }
- switch (code.code) {
- case self.CODE_SHIFT:
- shiftNext = true;
- codeset = self.CODE_A;
- break;
- case self.CODE_A:
- codeset = self.CODE_A;
- break;
- case self.CODE_C:
- codeset = self.CODE_C;
- break;
- case self.STOP_CODE:
- done = true;
- break;
- }
+ iq = null;
}
- break;
- case self.CODE_C:
- if (code.code < 100) {
- result.push(code.code < 10 ? "0" + code.code : code.code);
- } else {
- if (code.code !== self.STOP_CODE) {
- removeLastCharacter = false;
+
+ while (pq !== null) {
+ if (iq !== null) {
+ q = iq;
+ iq = iq.nextpeer;
+ } else {
+ q = pq;
+ pq = pq.nextpeer;
+ if (pq !== null) {
+ iq = pq.insideContours;
+ } else {
+ iq = null;
+ }
}
- switch (code.code) {
- case self.CODE_A:
- codeset = self.CODE_A;
+
+ switch (q.dir) {
+ case Rasterizer.CONTOUR_DIR.CW_DIR:
+ ctx.strokeStyle = "red";
break;
- case self.CODE_B:
- codeset = self.CODE_B;
+ case Rasterizer.CONTOUR_DIR.CCW_DIR:
+ ctx.strokeStyle = "blue";
break;
- case self.STOP_CODE:
- done = true;
+ case Rasterizer.CONTOUR_DIR.UNKNOWN_DIR:
+ ctx.strokeStyle = "green";
break;
}
+
+ p = q.firstVertex;
+ ctx.beginPath();
+ ctx.moveTo(p.x, p.y);
+ do {
+ p = p.next;
+ ctx.lineTo(p.x, p.y);
+ } while (p !== q.firstVertex);
+ ctx.stroke();
}
- break;
+ }
}
- } else {
- done = true;
+ };
+ }
+ };
+
+ /* harmony default export */ exports["a"] = Rasterizer;
+
+/***/ },
+/* 65 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* @preserve ASM BEGIN */
+ /* eslint-disable eqeqeq*/
+ function Skeletonizer(stdlib, foreign, buffer) {
+ "use asm";
+
+ var images = new stdlib.Uint8Array(buffer),
+ size = foreign.size | 0,
+ imul = stdlib.Math.imul;
+
+ function erode(inImagePtr, outImagePtr) {
+ inImagePtr = inImagePtr | 0;
+ outImagePtr = outImagePtr | 0;
+
+ var v = 0,
+ u = 0,
+ sum = 0,
+ yStart1 = 0,
+ yStart2 = 0,
+ xStart1 = 0,
+ xStart2 = 0,
+ offset = 0;
+
+ for (v = 1; (v | 0) < (size - 1 | 0); v = v + 1 | 0) {
+ offset = offset + size | 0;
+ for (u = 1; (u | 0) < (size - 1 | 0); u = u + 1 | 0) {
+ yStart1 = offset - size | 0;
+ yStart2 = offset + size | 0;
+ xStart1 = u - 1 | 0;
+ xStart2 = u + 1 | 0;
+ sum = (images[inImagePtr + yStart1 + xStart1 | 0] | 0) + (images[inImagePtr + yStart1 + xStart2 | 0] | 0) + (images[inImagePtr + offset + u | 0] | 0) + (images[inImagePtr + yStart2 + xStart1 | 0] | 0) + (images[inImagePtr + yStart2 + xStart2 | 0] | 0) | 0;
+ if ((sum | 0) == (5 | 0)) {
+ images[outImagePtr + offset + u | 0] = 1;
+ } else {
+ images[outImagePtr + offset + u | 0] = 0;
+ }
+ }
+ }
+ return;
+ }
+
+ function subtract(aImagePtr, bImagePtr, outImagePtr) {
+ aImagePtr = aImagePtr | 0;
+ bImagePtr = bImagePtr | 0;
+ outImagePtr = outImagePtr | 0;
+
+ var length = 0;
+
+ length = imul(size, size) | 0;
+
+ while ((length | 0) > 0) {
+ length = length - 1 | 0;
+ images[outImagePtr + length | 0] = (images[aImagePtr + length | 0] | 0) - (images[bImagePtr + length | 0] | 0) | 0;
+ }
+ }
+
+ function bitwiseOr(aImagePtr, bImagePtr, outImagePtr) {
+ aImagePtr = aImagePtr | 0;
+ bImagePtr = bImagePtr | 0;
+ outImagePtr = outImagePtr | 0;
+
+ var length = 0;
+
+ length = imul(size, size) | 0;
+
+ while ((length | 0) > 0) {
+ length = length - 1 | 0;
+ images[outImagePtr + length | 0] = images[aImagePtr + length | 0] | 0 | (images[bImagePtr + length | 0] | 0) | 0;
+ }
+ }
+
+ function countNonZero(imagePtr) {
+ imagePtr = imagePtr | 0;
+
+ var sum = 0,
+ length = 0;
+
+ length = imul(size, size) | 0;
+
+ while ((length | 0) > 0) {
+ length = length - 1 | 0;
+ sum = (sum | 0) + (images[imagePtr + length | 0] | 0) | 0;
+ }
+
+ return sum | 0;
+ }
+
+ function init(imagePtr, value) {
+ imagePtr = imagePtr | 0;
+ value = value | 0;
+
+ var length = 0;
+
+ length = imul(size, size) | 0;
+
+ while ((length | 0) > 0) {
+ length = length - 1 | 0;
+ images[imagePtr + length | 0] = value;
+ }
+ }
+
+ function dilate(inImagePtr, outImagePtr) {
+ inImagePtr = inImagePtr | 0;
+ outImagePtr = outImagePtr | 0;
+
+ var v = 0,
+ u = 0,
+ sum = 0,
+ yStart1 = 0,
+ yStart2 = 0,
+ xStart1 = 0,
+ xStart2 = 0,
+ offset = 0;
+
+ for (v = 1; (v | 0) < (size - 1 | 0); v = v + 1 | 0) {
+ offset = offset + size | 0;
+ for (u = 1; (u | 0) < (size - 1 | 0); u = u + 1 | 0) {
+ yStart1 = offset - size | 0;
+ yStart2 = offset + size | 0;
+ xStart1 = u - 1 | 0;
+ xStart2 = u + 1 | 0;
+ sum = (images[inImagePtr + yStart1 + xStart1 | 0] | 0) + (images[inImagePtr + yStart1 + xStart2 | 0] | 0) + (images[inImagePtr + offset + u | 0] | 0) + (images[inImagePtr + yStart2 + xStart1 | 0] | 0) + (images[inImagePtr + yStart2 + xStart2 | 0] | 0) | 0;
+ if ((sum | 0) > (0 | 0)) {
+ images[outImagePtr + offset + u | 0] = 1;
+ } else {
+ images[outImagePtr + offset + u | 0] = 0;
+ }
+ }
+ }
+ return;
+ }
+
+ function memcpy(srcImagePtr, dstImagePtr) {
+ srcImagePtr = srcImagePtr | 0;
+ dstImagePtr = dstImagePtr | 0;
+
+ var length = 0;
+
+ length = imul(size, size) | 0;
+
+ while ((length | 0) > 0) {
+ length = length - 1 | 0;
+ images[dstImagePtr + length | 0] = images[srcImagePtr + length | 0] | 0;
+ }
+ }
+
+ function zeroBorder(imagePtr) {
+ imagePtr = imagePtr | 0;
+
+ var x = 0,
+ y = 0;
+
+ for (x = 0; (x | 0) < (size - 1 | 0); x = x + 1 | 0) {
+ images[imagePtr + x | 0] = 0;
+ images[imagePtr + y | 0] = 0;
+ y = y + size - 1 | 0;
+ images[imagePtr + y | 0] = 0;
+ y = y + 1 | 0;
}
- if (unshift) {
- codeset = codeset === self.CODE_A ? self.CODE_B : self.CODE_A;
+ for (x = 0; (x | 0) < (size | 0); x = x + 1 | 0) {
+ images[imagePtr + y | 0] = 0;
+ y = y + 1 | 0;
}
}
- if (code === null) {
- return null;
+ function skeletonize() {
+ var subImagePtr = 0,
+ erodedImagePtr = 0,
+ tempImagePtr = 0,
+ skelImagePtr = 0,
+ sum = 0,
+ done = 0;
+
+ erodedImagePtr = imul(size, size) | 0;
+ tempImagePtr = erodedImagePtr + erodedImagePtr | 0;
+ skelImagePtr = tempImagePtr + erodedImagePtr | 0;
+
+ // init skel-image
+ init(skelImagePtr, 0);
+ zeroBorder(subImagePtr);
+
+ do {
+ erode(subImagePtr, erodedImagePtr);
+ dilate(erodedImagePtr, tempImagePtr);
+ subtract(subImagePtr, tempImagePtr, tempImagePtr);
+ bitwiseOr(skelImagePtr, tempImagePtr, skelImagePtr);
+ memcpy(erodedImagePtr, subImagePtr);
+ sum = countNonZero(subImagePtr) | 0;
+ done = (sum | 0) == 0 | 0;
+ } while (!done);
}
+ return {
+ skeletonize: skeletonize
+ };
+ }
+ /* @preserve ASM END */
+ /* harmony default export */ exports["a"] = Skeletonizer;
+ /* eslint-enable eqeqeq*/
+
+/***/ },
+/* 66 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__barcode_reader__ = __webpack_require__(5);
- code.end = self._nextUnset(self._row, code.end);
- if (!self._verifyTrailingWhitespace(code)) {
+
+ function CodabarReader() {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__barcode_reader__["a"].call(this);
+ this._counters = [];
+ }
+
+ var properties = {
+ ALPHABETH_STRING: { value: "0123456789-$:/.+ABCD" },
+ ALPHABET: { value: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 45, 36, 58, 47, 46, 43, 65, 66, 67, 68] },
+ CHARACTER_ENCODINGS: { value: [0x003, 0x006, 0x009, 0x060, 0x012, 0x042, 0x021, 0x024, 0x030, 0x048, 0x00c, 0x018, 0x045, 0x051, 0x054, 0x015, 0x01A, 0x029, 0x00B, 0x00E] },
+ START_END: { value: [0x01A, 0x029, 0x00B, 0x00E] },
+ MIN_ENCODED_CHARS: { value: 4 },
+ MAX_ACCEPTABLE: { value: 2.0 },
+ PADDING: { value: 1.5 },
+ FORMAT: { value: "codabar", writeable: false }
+ };
+
+ CodabarReader.prototype = Object.create(/* harmony import */__WEBPACK_IMPORTED_MODULE_0__barcode_reader__["a"].prototype, properties);
+ CodabarReader.prototype.constructor = CodabarReader;
+
+ CodabarReader.prototype._decode = function () {
+ var self = this,
+ result = [],
+ start,
+ decodedChar,
+ pattern,
+ nextStart,
+ end;
+
+ this._counters = self._fillCounters();
+ start = self._findStart();
+ if (!start) {
return null;
}
+ nextStart = start.startCounter;
- checksum -= multiplier * rawResult[rawResult.length - 1];
- if (checksum % 103 !== rawResult[rawResult.length - 1]) {
+ do {
+ pattern = self._toPattern(nextStart);
+ if (pattern < 0) {
+ return null;
+ }
+ decodedChar = self._patternToChar(pattern);
+ if (decodedChar < 0) {
+ return null;
+ }
+ result.push(decodedChar);
+ nextStart += 8;
+ if (result.length > 1 && self._isStartEnd(pattern)) {
+ break;
+ }
+ } while (nextStart < self._counters.length);
+
+ // verify end
+ if (result.length - 2 < self.MIN_ENCODED_CHARS || !self._isStartEnd(pattern)) {
return null;
}
- if (!result.length) {
+ // verify end white space
+ if (!self._verifyWhitespace(start.startCounter, nextStart - 8)) {
return null;
}
- // remove last code from result (checksum)
- if (removeLastCharacter) {
- result.splice(result.length - 1, 1);
+ if (!self._validateResult(result, start.startCounter)) {
+ return null;
}
+ nextStart = nextStart > self._counters.length ? self._counters.length : nextStart;
+ end = start.start + self._sumCounters(start.startCounter, nextStart - 8);
+
return {
code: result.join(""),
- start: startInfo.start,
- end: code.end,
- codeset: codeset,
- startInfo: startInfo,
- decodedCodes: decodedCodes,
- endInfo: code
+ start: start.start,
+ end: end,
+ startInfo: start,
+ decodedCodes: result
};
};
- _barcode_reader2["default"].prototype._verifyTrailingWhitespace = function (endInfo) {
- var self = this,
- trailingWhitespaceEnd;
-
- trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
- if (trailingWhitespaceEnd < self._row.length) {
- if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
- return endInfo;
+ CodabarReader.prototype._verifyWhitespace = function (startCounter, endCounter) {
+ if (startCounter - 1 <= 0 || this._counters[startCounter - 1] >= this._calculatePatternLength(startCounter) / 2.0) {
+ if (endCounter + 8 >= this._counters.length || this._counters[endCounter + 7] >= this._calculatePatternLength(endCounter) / 2.0) {
+ return true;
}
}
- return null;
+ return false;
};
- exports["default"] = Code128Reader;
- module.exports = exports["default"];
-
-/***/ },
-/* 26 */
-/***/ function(module, exports) {
-
- 'use strict';
+ CodabarReader.prototype._calculatePatternLength = function (offset) {
+ var i,
+ sum = 0;
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- function BarcodeReader(config) {
- this._row = [];
- this.config = config || {};
- return this;
- }
+ for (i = offset; i < offset + 7; i++) {
+ sum += this._counters[i];
+ }
- BarcodeReader.prototype._nextUnset = function (line, start) {
- var i;
+ return sum;
+ };
- if (start === undefined) {
- start = 0;
- }
- for (i = start; i < line.length; i++) {
- if (!line[i]) {
- return i;
+ CodabarReader.prototype._thresholdResultPattern = function (result, startCounter) {
+ var self = this,
+ categorization = {
+ space: {
+ narrow: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE },
+ wide: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE }
+ },
+ bar: {
+ narrow: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE },
+ wide: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE }
+ }
+ },
+ kind,
+ cat,
+ i,
+ j,
+ pos = startCounter,
+ pattern;
+
+ for (i = 0; i < result.length; i++) {
+ pattern = self._charToPattern(result[i]);
+ for (j = 6; j >= 0; j--) {
+ kind = (j & 1) === 2 ? categorization.bar : categorization.space;
+ cat = (pattern & 1) === 1 ? kind.wide : kind.narrow;
+ cat.size += self._counters[pos + j];
+ cat.counts++;
+ pattern >>= 1;
}
+ pos += 8;
}
- return line.length;
+
+ ["space", "bar"].forEach(function (key) {
+ var newkind = categorization[key];
+ newkind.wide.min = Math.floor((newkind.narrow.size / newkind.narrow.counts + newkind.wide.size / newkind.wide.counts) / 2);
+ newkind.narrow.max = Math.ceil(newkind.wide.min);
+ newkind.wide.max = Math.ceil((newkind.wide.size * self.MAX_ACCEPTABLE + self.PADDING) / newkind.wide.counts);
+ });
+
+ return categorization;
};
- BarcodeReader.prototype._matchPattern = function (counter, code) {
- var i,
- error = 0,
- singleError = 0,
- modulo = this.MODULO,
- maxSingleError = this.SINGLE_CODE_ERROR || 1;
+ CodabarReader.prototype._charToPattern = function (char) {
+ var self = this,
+ charCode = char.charCodeAt(0),
+ i;
- for (i = 0; i < counter.length; i++) {
- singleError = Math.abs(code[i] - counter[i]);
- if (singleError > maxSingleError) {
- return Number.MAX_VALUE;
+ for (i = 0; i < self.ALPHABET.length; i++) {
+ if (self.ALPHABET[i] === charCode) {
+ return self.CHARACTER_ENCODINGS[i];
}
- error += singleError;
}
- return error / modulo;
+ return 0x0;
};
- BarcodeReader.prototype._nextSet = function (line, offset) {
- var i;
+ CodabarReader.prototype._validateResult = function (result, startCounter) {
+ var self = this,
+ thresholds = self._thresholdResultPattern(result, startCounter),
+ i,
+ j,
+ kind,
+ cat,
+ size,
+ pos = startCounter,
+ pattern;
- offset = offset || 0;
- for (i = offset; i < line.length; i++) {
- if (line[i]) {
- return i;
+ for (i = 0; i < result.length; i++) {
+ pattern = self._charToPattern(result[i]);
+ for (j = 6; j >= 0; j--) {
+ kind = (j & 1) === 0 ? thresholds.bar : thresholds.space;
+ cat = (pattern & 1) === 1 ? kind.wide : kind.narrow;
+ size = self._counters[pos + j];
+ if (size < cat.min || size > cat.max) {
+ return false;
+ }
+ pattern >>= 1;
+ }
+ pos += 8;
+ }
+ return true;
+ };
+
+ CodabarReader.prototype._patternToChar = function (pattern) {
+ var i,
+ self = this;
+
+ for (i = 0; i < self.CHARACTER_ENCODINGS.length; i++) {
+ if (self.CHARACTER_ENCODINGS[i] === pattern) {
+ return String.fromCharCode(self.ALPHABET[i]);
}
}
- return line.length;
+ return -1;
};
- BarcodeReader.prototype._normalize = function (counter, modulo) {
+ CodabarReader.prototype._computeAlternatingThreshold = function (offset, end) {
var i,
- self = this,
- sum = 0,
- ratio,
- numOnes = 0,
- normalized = [],
- norm = 0;
+ min = Number.MAX_VALUE,
+ max = 0,
+ counter;
- if (!modulo) {
- modulo = self.MODULO;
- }
- for (i = 0; i < counter.length; i++) {
- if (counter[i] === 1) {
- numOnes++;
- } else {
- sum += counter[i];
- }
- }
- ratio = sum / (modulo - numOnes);
- if (ratio > 1.0) {
- for (i = 0; i < counter.length; i++) {
- norm = counter[i] === 1 ? counter[i] : counter[i] / ratio;
- normalized.push(norm);
+ for (i = offset; i < end; i += 2) {
+ counter = this._counters[i];
+ if (counter > max) {
+ max = counter;
}
- } else {
- ratio = (sum + numOnes) / modulo;
- for (i = 0; i < counter.length; i++) {
- norm = counter[i] / ratio;
- normalized.push(norm);
+ if (counter < min) {
+ min = counter;
}
}
- return normalized;
+
+ return (min + max) / 2.0 | 0;
};
- BarcodeReader.prototype._matchTrace = function (cmpCounter, epsilon) {
- var counter = [],
+ CodabarReader.prototype._toPattern = function (offset) {
+ var numCounters = 7,
+ end = offset + numCounters,
+ barThreshold,
+ spaceThreshold,
+ bitmask = 1 << numCounters - 1,
+ pattern = 0,
i,
- self = this,
- offset = self._nextSet(self._row),
- isWhite = !self._row[offset],
- counterPos = 0,
- bestMatch = {
- error: Number.MAX_VALUE,
- code: -1,
- start: 0
- },
- error;
+ threshold;
- if (cmpCounter) {
- for (i = 0; i < cmpCounter.length; i++) {
- counter.push(0);
- }
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- if (counterPos === counter.length - 1) {
- error = self._matchPattern(counter, cmpCounter);
+ if (end > this._counters.length) {
+ return -1;
+ }
- if (error < epsilon) {
- bestMatch.start = i - offset;
- bestMatch.end = i;
- bestMatch.counter = counter;
- return bestMatch;
- } else {
- return null;
- }
- } else {
- counterPos++;
- }
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
- }
- } else {
- counter.push(0);
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- counterPos++;
- counter.push(0);
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
+ barThreshold = this._computeAlternatingThreshold(offset, end);
+ spaceThreshold = this._computeAlternatingThreshold(offset + 1, end);
+
+ for (i = 0; i < numCounters; i++) {
+ threshold = (i & 1) === 0 ? barThreshold : spaceThreshold;
+ if (this._counters[offset + i] > threshold) {
+ pattern |= bitmask;
}
+ bitmask >>= 1;
}
- // if cmpCounter was not given
- bestMatch.start = offset;
- bestMatch.end = self._row.length - 1;
- bestMatch.counter = counter;
- return bestMatch;
+ return pattern;
};
- BarcodeReader.prototype.decodePattern = function (pattern) {
- var self = this,
- result;
+ CodabarReader.prototype._isStartEnd = function (pattern) {
+ var i;
- self._row = pattern;
- result = self._decode();
- if (result === null) {
- self._row.reverse();
- result = self._decode();
- if (result) {
- result.direction = BarcodeReader.DIRECTION.REVERSE;
- result.start = self._row.length - result.start;
- result.end = self._row.length - result.end;
+ for (i = 0; i < this.START_END.length; i++) {
+ if (this.START_END[i] === pattern) {
+ return true;
}
- } else {
- result.direction = BarcodeReader.DIRECTION.FORWARD;
- }
- if (result) {
- result.format = self.FORMAT;
}
- return result;
+ return false;
};
- BarcodeReader.prototype._matchRange = function (start, end, value) {
- var i;
+ CodabarReader.prototype._sumCounters = function (start, end) {
+ var i,
+ sum = 0;
- start = start < 0 ? 0 : start;
for (i = start; i < end; i++) {
- if (this._row[i] !== value) {
- return false;
- }
+ sum += this._counters[i];
}
- return true;
+ return sum;
};
- BarcodeReader.prototype._fillCounters = function (offset, end, isWhite) {
+ CodabarReader.prototype._findStart = function () {
var self = this,
- counterPos = 0,
i,
- counters = [];
-
- isWhite = typeof isWhite !== 'undefined' ? isWhite : true;
- offset = typeof offset !== 'undefined' ? offset : self._nextUnset(self._row);
- end = end || self._row.length;
+ pattern,
+ start = self._nextUnset(self._row),
+ end;
- counters[counterPos] = 0;
- for (i = offset; i < end; i++) {
- if (self._row[i] ^ isWhite) {
- counters[counterPos]++;
- } else {
- counterPos++;
- counters[counterPos] = 1;
- isWhite = !isWhite;
+ for (i = 1; i < this._counters.length; i++) {
+ pattern = self._toPattern(i);
+ if (pattern !== -1 && self._isStartEnd(pattern)) {
+ // TODO: Look for whitespace ahead
+ start += self._sumCounters(0, i);
+ end = start + self._sumCounters(i, i + 8);
+ return {
+ start: start,
+ end: end,
+ startCounter: i,
+ endCounter: i + 8
+ };
}
}
- return counters;
- };
-
- Object.defineProperty(BarcodeReader.prototype, "FORMAT", {
- value: 'unknown',
- writeable: false
- });
-
- BarcodeReader.DIRECTION = {
- FORWARD: 1,
- REVERSE: -1
- };
-
- BarcodeReader.Exception = {
- StartNotFoundException: "Start-Info was not found!",
- CodeNotFoundException: "Code could not be found!",
- PatternNotFoundException: "Pattern could not be found!"
};
- BarcodeReader.CONFIG_KEYS = {};
-
- exports['default'] = BarcodeReader;
- module.exports = exports['default'];
+ /* harmony default export */ exports["a"] = CodabarReader;
/***/ },
-/* 27 */
+/* 67 */
/***/ function(module, exports, __webpack_require__) {
- "use strict";
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__barcode_reader__ = __webpack_require__(5);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- var _barcode_reader = __webpack_require__(26);
-
- var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
- function EANReader(opts) {
- _barcode_reader2["default"].call(this, opts);
+ function Code128Reader() {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__barcode_reader__["a"].call(this);
}
var properties = {
- CODE_L_START: { value: 0 },
- MODULO: { value: 7 },
- CODE_G_START: { value: 10 },
- START_PATTERN: { value: [1 / 3 * 7, 1 / 3 * 7, 1 / 3 * 7] },
- STOP_PATTERN: { value: [1 / 3 * 7, 1 / 3 * 7, 1 / 3 * 7] },
- MIDDLE_PATTERN: { value: [1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7] },
- CODE_PATTERN: { value: [[3, 2, 1, 1], [2, 2, 2, 1], [2, 1, 2, 2], [1, 4, 1, 1], [1, 1, 3, 2], [1, 2, 3, 1], [1, 1, 1, 4], [1, 3, 1, 2], [1, 2, 1, 3], [3, 1, 1, 2], [1, 1, 2, 3], [1, 2, 2, 2], [2, 2, 1, 2], [1, 1, 4, 1], [2, 3, 1, 1], [1, 3, 2, 1], [4, 1, 1, 1], [2, 1, 3, 1], [3, 1, 2, 1], [2, 1, 1, 3]] },
- CODE_FREQUENCY: { value: [0, 11, 13, 14, 19, 25, 28, 21, 22, 26] },
- SINGLE_CODE_ERROR: { value: 0.67 },
- AVG_CODE_ERROR: { value: 0.27 },
- FORMAT: { value: "ean_13", writeable: false }
+ CODE_SHIFT: { value: 98 },
+ CODE_C: { value: 99 },
+ CODE_B: { value: 100 },
+ CODE_A: { value: 101 },
+ START_CODE_A: { value: 103 },
+ START_CODE_B: { value: 104 },
+ START_CODE_C: { value: 105 },
+ STOP_CODE: { value: 106 },
+ MODULO: { value: 11 },
+ CODE_PATTERN: { value: [[2, 1, 2, 2, 2, 2], [2, 2, 2, 1, 2, 2], [2, 2, 2, 2, 2, 1], [1, 2, 1, 2, 2, 3], [1, 2, 1, 3, 2, 2], [1, 3, 1, 2, 2, 2], [1, 2, 2, 2, 1, 3], [1, 2, 2, 3, 1, 2], [1, 3, 2, 2, 1, 2], [2, 2, 1, 2, 1, 3], [2, 2, 1, 3, 1, 2], [2, 3, 1, 2, 1, 2], [1, 1, 2, 2, 3, 2], [1, 2, 2, 1, 3, 2], [1, 2, 2, 2, 3, 1], [1, 1, 3, 2, 2, 2], [1, 2, 3, 1, 2, 2], [1, 2, 3, 2, 2, 1], [2, 2, 3, 2, 1, 1], [2, 2, 1, 1, 3, 2], [2, 2, 1, 2, 3, 1], [2, 1, 3, 2, 1, 2], [2, 2, 3, 1, 1, 2], [3, 1, 2, 1, 3, 1], [3, 1, 1, 2, 2, 2], [3, 2, 1, 1, 2, 2], [3, 2, 1, 2, 2, 1], [3, 1, 2, 2, 1, 2], [3, 2, 2, 1, 1, 2], [3, 2, 2, 2, 1, 1], [2, 1, 2, 1, 2, 3], [2, 1, 2, 3, 2, 1], [2, 3, 2, 1, 2, 1], [1, 1, 1, 3, 2, 3], [1, 3, 1, 1, 2, 3], [1, 3, 1, 3, 2, 1], [1, 1, 2, 3, 1, 3], [1, 3, 2, 1, 1, 3], [1, 3, 2, 3, 1, 1], [2, 1, 1, 3, 1, 3], [2, 3, 1, 1, 1, 3], [2, 3, 1, 3, 1, 1], [1, 1, 2, 1, 3, 3], [1, 1, 2, 3, 3, 1], [1, 3, 2, 1, 3, 1], [1, 1, 3, 1, 2, 3], [1, 1, 3, 3, 2, 1], [1, 3, 3, 1, 2, 1], [3, 1, 3, 1, 2, 1], [2, 1, 1, 3, 3, 1], [2, 3, 1, 1, 3, 1], [2, 1, 3, 1, 1, 3], [2, 1, 3, 3, 1, 1], [2, 1, 3, 1, 3, 1], [3, 1, 1, 1, 2, 3], [3, 1, 1, 3, 2, 1], [3, 3, 1, 1, 2, 1], [3, 1, 2, 1, 1, 3], [3, 1, 2, 3, 1, 1], [3, 3, 2, 1, 1, 1], [3, 1, 4, 1, 1, 1], [2, 2, 1, 4, 1, 1], [4, 3, 1, 1, 1, 1], [1, 1, 1, 2, 2, 4], [1, 1, 1, 4, 2, 2], [1, 2, 1, 1, 2, 4], [1, 2, 1, 4, 2, 1], [1, 4, 1, 1, 2, 2], [1, 4, 1, 2, 2, 1], [1, 1, 2, 2, 1, 4], [1, 1, 2, 4, 1, 2], [1, 2, 2, 1, 1, 4], [1, 2, 2, 4, 1, 1], [1, 4, 2, 1, 1, 2], [1, 4, 2, 2, 1, 1], [2, 4, 1, 2, 1, 1], [2, 2, 1, 1, 1, 4], [4, 1, 3, 1, 1, 1], [2, 4, 1, 1, 1, 2], [1, 3, 4, 1, 1, 1], [1, 1, 1, 2, 4, 2], [1, 2, 1, 1, 4, 2], [1, 2, 1, 2, 4, 1], [1, 1, 4, 2, 1, 2], [1, 2, 4, 1, 1, 2], [1, 2, 4, 2, 1, 1], [4, 1, 1, 2, 1, 2], [4, 2, 1, 1, 1, 2], [4, 2, 1, 2, 1, 1], [2, 1, 2, 1, 4, 1], [2, 1, 4, 1, 2, 1], [4, 1, 2, 1, 2, 1], [1, 1, 1, 1, 4, 3], [1, 1, 1, 3, 4, 1], [1, 3, 1, 1, 4, 1], [1, 1, 4, 1, 1, 3], [1, 1, 4, 3, 1, 1], [4, 1, 1, 1, 1, 3], [4, 1, 1, 3, 1, 1], [1, 1, 3, 1, 4, 1], [1, 1, 4, 1, 3, 1], [3, 1, 1, 1, 4, 1], [4, 1, 1, 1, 3, 1], [2, 1, 1, 4, 1, 2], [2, 1, 1, 2, 1, 4], [2, 1, 1, 2, 3, 2], [2, 3, 3, 1, 1, 1, 2]] },
+ SINGLE_CODE_ERROR: { value: 1 },
+ AVG_CODE_ERROR: { value: 0.5 },
+ FORMAT: { value: "code_128", writeable: false }
};
- EANReader.prototype = Object.create(_barcode_reader2["default"].prototype, properties);
- EANReader.prototype.constructor = EANReader;
+ Code128Reader.prototype = Object.create(/* harmony import */__WEBPACK_IMPORTED_MODULE_0__barcode_reader__["a"].prototype, properties);
+ Code128Reader.prototype.constructor = Code128Reader;
- EANReader.prototype._decodeCode = function (start, coderange) {
- var counter = [0, 0, 0, 0],
+ Code128Reader.prototype._decodeCode = function (start) {
+ var counter = [0, 0, 0, 0, 0, 0],
i,
self = this,
offset = start,
@@ -9424,10 +7031,6 @@ return /******/ (function(modules) { // webpackBootstrap
error,
normalized;
- if (!coderange) {
- coderange = self.CODE_PATTERN.length;
- }
-
for (i = offset; i < self._row.length; i++) {
if (self._row[i] ^ isWhite) {
counter[counterPos]++;
@@ -9435,7 +7038,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (counterPos === counter.length - 1) {
normalized = self._normalize(counter);
if (normalized) {
- for (code = 0; code < coderange; code++) {
+ for (code = 0; code < self.CODE_PATTERN.length; code++) {
error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
if (error < bestMatch.error) {
bestMatch.code = code;
@@ -9443,9 +7046,6 @@ return /******/ (function(modules) { // webpackBootstrap
}
}
bestMatch.end = i;
- if (bestMatch.error > self.AVG_CODE_ERROR) {
- return null;
- }
return bestMatch;
}
} else {
@@ -9458,10 +7058,12 @@ return /******/ (function(modules) { // webpackBootstrap
return null;
};
- EANReader.prototype._findPattern = function (pattern, offset, isWhite, tryHarder, epsilon) {
- var counter = [],
- self = this,
+ Code128Reader.prototype._findStart = function () {
+ var counter = [0, 0, 0, 0, 0, 0],
i,
+ self = this,
+ offset = self._nextSet(self._row),
+ isWhite = false,
counterPos = 0,
bestMatch = {
error: Number.MAX_VALUE,
@@ -9469,31 +7071,12 @@ return /******/ (function(modules) { // webpackBootstrap
start: 0,
end: 0
},
+ code,
error,
j,
sum,
normalized;
- if (!offset) {
- offset = self._nextSet(self._row);
- }
-
- if (isWhite === undefined) {
- isWhite = false;
- }
-
- if (tryHarder === undefined) {
- tryHarder = true;
- }
-
- if (epsilon === undefined) {
- epsilon = self.AVG_CODE_ERROR;
- }
-
- for (i = 0; i < pattern.length; i++) {
- counter[i] = 0;
- }
-
for (i = offset; i < self._row.length; i++) {
if (self._row[i] ^ isWhite) {
counter[counterPos]++;
@@ -9505,25 +7088,26 @@ return /******/ (function(modules) { // webpackBootstrap
}
normalized = self._normalize(counter);
if (normalized) {
- error = self._matchPattern(normalized, pattern);
-
- if (error < epsilon) {
- bestMatch.error = error;
+ for (code = self.START_CODE_A; code <= self.START_CODE_C; code++) {
+ error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
+ if (error < bestMatch.error) {
+ bestMatch.code = code;
+ bestMatch.error = error;
+ }
+ }
+ if (bestMatch.error < self.AVG_CODE_ERROR) {
bestMatch.start = i - sum;
bestMatch.end = i;
return bestMatch;
}
}
- if (tryHarder) {
- for (j = 0; j < counter.length - 2; j++) {
- counter[j] = counter[j + 2];
- }
- counter[counter.length - 2] = 0;
- counter[counter.length - 1] = 0;
- counterPos--;
- } else {
- return null;
+
+ for (j = 0; j < 4; j++) {
+ counter[j] = counter[j + 2];
}
+ counter[4] = 0;
+ counter[5] = 0;
+ counterPos--;
} else {
counterPos++;
}
@@ -9534,413 +7118,199 @@ return /******/ (function(modules) { // webpackBootstrap
return null;
};
- EANReader.prototype._findStart = function () {
+ Code128Reader.prototype._decode = function () {
var self = this,
- leadingWhitespaceStart,
- offset = self._nextSet(self._row),
- startInfo;
+ startInfo = self._findStart(),
+ code = null,
+ done = false,
+ result = [],
+ multiplier = 0,
+ checksum = 0,
+ codeset,
+ rawResult = [],
+ decodedCodes = [],
+ shiftNext = false,
+ unshift,
+ removeLastCharacter = true;
- while (!startInfo) {
- startInfo = self._findPattern(self.START_PATTERN, offset);
- if (!startInfo) {
- return null;
- }
- leadingWhitespaceStart = startInfo.start - (startInfo.end - startInfo.start);
- if (leadingWhitespaceStart >= 0) {
- if (self._matchRange(leadingWhitespaceStart, startInfo.start, 0)) {
- return startInfo;
- }
- }
- offset = startInfo.end;
- startInfo = null;
+ if (startInfo === null) {
+ return null;
}
- };
-
- EANReader.prototype._verifyTrailingWhitespace = function (endInfo) {
- var self = this,
- trailingWhitespaceEnd;
-
- trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start);
- if (trailingWhitespaceEnd < self._row.length) {
- if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
- return endInfo;
- }
+ code = {
+ code: startInfo.code,
+ start: startInfo.start,
+ end: startInfo.end
+ };
+ decodedCodes.push(code);
+ checksum = code.code;
+ switch (code.code) {
+ case self.START_CODE_A:
+ codeset = self.CODE_A;
+ break;
+ case self.START_CODE_B:
+ codeset = self.CODE_B;
+ break;
+ case self.START_CODE_C:
+ codeset = self.CODE_C;
+ break;
+ default:
+ return null;
}
- return null;
- };
-
- EANReader.prototype._findEnd = function (offset, isWhite) {
- var self = this,
- endInfo = self._findPattern(self.STOP_PATTERN, offset, isWhite, false);
-
- return endInfo !== null ? self._verifyTrailingWhitespace(endInfo) : null;
- };
-
- EANReader.prototype._calculateFirstDigit = function (codeFrequency) {
- var i,
- self = this;
- for (i = 0; i < self.CODE_FREQUENCY.length; i++) {
- if (codeFrequency === self.CODE_FREQUENCY[i]) {
- return i;
- }
- }
- return null;
- };
+ while (!done) {
+ unshift = shiftNext;
+ shiftNext = false;
+ code = self._decodeCode(code.end);
+ if (code !== null) {
+ if (code.code !== self.STOP_CODE) {
+ removeLastCharacter = true;
+ }
- EANReader.prototype._decodePayload = function (code, result, decodedCodes) {
- var i,
- self = this,
- codeFrequency = 0x0,
- firstDigit;
+ if (code.code !== self.STOP_CODE) {
+ rawResult.push(code.code);
+ multiplier++;
+ checksum += multiplier * code.code;
+ }
+ decodedCodes.push(code);
- for (i = 0; i < 6; i++) {
- code = self._decodeCode(code.end);
- if (!code) {
- return null;
- }
- if (code.code >= self.CODE_G_START) {
- code.code = code.code - self.CODE_G_START;
- codeFrequency |= 1 << 5 - i;
+ switch (codeset) {
+ case self.CODE_A:
+ if (code.code < 64) {
+ result.push(String.fromCharCode(32 + code.code));
+ } else if (code.code < 96) {
+ result.push(String.fromCharCode(code.code - 64));
+ } else {
+ if (code.code !== self.STOP_CODE) {
+ removeLastCharacter = false;
+ }
+ switch (code.code) {
+ case self.CODE_SHIFT:
+ shiftNext = true;
+ codeset = self.CODE_B;
+ break;
+ case self.CODE_B:
+ codeset = self.CODE_B;
+ break;
+ case self.CODE_C:
+ codeset = self.CODE_C;
+ break;
+ case self.STOP_CODE:
+ done = true;
+ break;
+ }
+ }
+ break;
+ case self.CODE_B:
+ if (code.code < 96) {
+ result.push(String.fromCharCode(32 + code.code));
+ } else {
+ if (code.code !== self.STOP_CODE) {
+ removeLastCharacter = false;
+ }
+ switch (code.code) {
+ case self.CODE_SHIFT:
+ shiftNext = true;
+ codeset = self.CODE_A;
+ break;
+ case self.CODE_A:
+ codeset = self.CODE_A;
+ break;
+ case self.CODE_C:
+ codeset = self.CODE_C;
+ break;
+ case self.STOP_CODE:
+ done = true;
+ break;
+ }
+ }
+ break;
+ case self.CODE_C:
+ if (code.code < 100) {
+ result.push(code.code < 10 ? "0" + code.code : code.code);
+ } else {
+ if (code.code !== self.STOP_CODE) {
+ removeLastCharacter = false;
+ }
+ switch (code.code) {
+ case self.CODE_A:
+ codeset = self.CODE_A;
+ break;
+ case self.CODE_B:
+ codeset = self.CODE_B;
+ break;
+ case self.STOP_CODE:
+ done = true;
+ break;
+ }
+ }
+ break;
+ }
} else {
- codeFrequency |= 0 << 5 - i;
+ done = true;
}
- result.push(code.code);
- decodedCodes.push(code);
- }
-
- firstDigit = self._calculateFirstDigit(codeFrequency);
- if (firstDigit === null) {
- return null;
- }
- result.unshift(firstDigit);
-
- code = self._findPattern(self.MIDDLE_PATTERN, code.end, true, false);
- if (code === null) {
- return null;
- }
- decodedCodes.push(code);
-
- for (i = 0; i < 6; i++) {
- code = self._decodeCode(code.end, self.CODE_G_START);
- if (!code) {
- return null;
+ if (unshift) {
+ codeset = codeset === self.CODE_A ? self.CODE_B : self.CODE_A;
}
- decodedCodes.push(code);
- result.push(code.code);
}
- return code;
- };
-
- EANReader.prototype._decode = function () {
- var startInfo,
- self = this,
- code,
- result = [],
- decodedCodes = [];
-
- startInfo = self._findStart();
- if (!startInfo) {
- return null;
- }
- code = {
- code: startInfo.code,
- start: startInfo.start,
- end: startInfo.end
- };
- decodedCodes.push(code);
- code = self._decodePayload(code, result, decodedCodes);
- if (!code) {
- return null;
- }
- code = self._findEnd(code.end, false);
- if (!code) {
+ if (code === null) {
return null;
}
- decodedCodes.push(code);
-
- // Checksum
- if (!self._checksum(result)) {
+ code.end = self._nextUnset(self._row, code.end);
+ if (!self._verifyTrailingWhitespace(code)) {
return null;
}
- return {
- code: result.join(""),
- start: startInfo.start,
- end: code.end,
- codeset: "",
- startInfo: startInfo,
- decodedCodes: decodedCodes
- };
- };
-
- EANReader.prototype._checksum = function (result) {
- var sum = 0,
- i;
-
- for (i = result.length - 2; i >= 0; i -= 2) {
- sum += result[i];
- }
- sum *= 3;
- for (i = result.length - 1; i >= 0; i -= 2) {
- sum += result[i];
- }
- return sum % 10 === 0;
- };
-
- exports["default"] = EANReader;
- module.exports = exports["default"];
-
-/***/ },
-/* 28 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var _barcode_reader = __webpack_require__(26);
-
- var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
-
- var _commonArray_helper = __webpack_require__(17);
-
- var _commonArray_helper2 = _interopRequireDefault(_commonArray_helper);
-
- function Code39Reader() {
- _barcode_reader2['default'].call(this);
- }
-
- var properties = {
- ALPHABETH_STRING: { value: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%" },
- ALPHABET: { value: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 45, 46, 32, 42, 36, 47, 43, 37] },
- CHARACTER_ENCODINGS: { value: [0x034, 0x121, 0x061, 0x160, 0x031, 0x130, 0x070, 0x025, 0x124, 0x064, 0x109, 0x049, 0x148, 0x019, 0x118, 0x058, 0x00D, 0x10C, 0x04C, 0x01C, 0x103, 0x043, 0x142, 0x013, 0x112, 0x052, 0x007, 0x106, 0x046, 0x016, 0x181, 0x0C1, 0x1C0, 0x091, 0x190, 0x0D0, 0x085, 0x184, 0x0C4, 0x094, 0x0A8, 0x0A2, 0x08A, 0x02A] },
- ASTERISK: { value: 0x094 },
- FORMAT: { value: "code_39", writeable: false }
- };
-
- Code39Reader.prototype = Object.create(_barcode_reader2['default'].prototype, properties);
- Code39Reader.prototype.constructor = Code39Reader;
-
- Code39Reader.prototype._toCounters = function (start, counter) {
- var self = this,
- numCounters = counter.length,
- end = self._row.length,
- isWhite = !self._row[start],
- i,
- counterPos = 0;
-
- _commonArray_helper2['default'].init(counter, 0);
-
- for (i = start; i < end; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- counterPos++;
- if (counterPos === numCounters) {
- break;
- } else {
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
- }
- }
-
- return counter;
- };
-
- Code39Reader.prototype._decode = function () {
- var self = this,
- counters = [0, 0, 0, 0, 0, 0, 0, 0, 0],
- result = [],
- start = self._findStart(),
- decodedChar,
- lastStart,
- pattern,
- nextStart;
-
- if (!start) {
+ checksum -= multiplier * rawResult[rawResult.length - 1];
+ if (checksum % 103 !== rawResult[rawResult.length - 1]) {
return null;
}
- nextStart = self._nextSet(self._row, start.end);
-
- do {
- counters = self._toCounters(nextStart, counters);
- pattern = self._toPattern(counters);
- if (pattern < 0) {
- return null;
- }
- decodedChar = self._patternToChar(pattern);
- if (decodedChar < 0) {
- return null;
- }
- result.push(decodedChar);
- lastStart = nextStart;
- nextStart += _commonArray_helper2['default'].sum(counters);
- nextStart = self._nextSet(self._row, nextStart);
- } while (decodedChar !== '*');
- result.pop();
if (!result.length) {
return null;
}
- if (!self._verifyTrailingWhitespace(lastStart, nextStart, counters)) {
- return null;
+ // remove last code from result (checksum)
+ if (removeLastCharacter) {
+ result.splice(result.length - 1, 1);
}
return {
code: result.join(""),
- start: start.start,
- end: nextStart,
- startInfo: start,
- decodedCodes: result
- };
- };
-
- Code39Reader.prototype._verifyTrailingWhitespace = function (lastStart, nextStart, counters) {
- var trailingWhitespaceEnd,
- patternSize = _commonArray_helper2['default'].sum(counters);
-
- trailingWhitespaceEnd = nextStart - lastStart - patternSize;
- if (trailingWhitespaceEnd * 3 >= patternSize) {
- return true;
- }
- return false;
- };
-
- Code39Reader.prototype._patternToChar = function (pattern) {
- var i,
- self = this;
-
- for (i = 0; i < self.CHARACTER_ENCODINGS.length; i++) {
- if (self.CHARACTER_ENCODINGS[i] === pattern) {
- return String.fromCharCode(self.ALPHABET[i]);
- }
- }
- return -1;
- };
-
- Code39Reader.prototype._findNextWidth = function (counters, current) {
- var i,
- minWidth = Number.MAX_VALUE;
-
- for (i = 0; i < counters.length; i++) {
- if (counters[i] < minWidth && counters[i] > current) {
- minWidth = counters[i];
- }
- }
-
- return minWidth;
- };
-
- Code39Reader.prototype._toPattern = function (counters) {
- var numCounters = counters.length,
- maxNarrowWidth = 0,
- numWideBars = numCounters,
- wideBarWidth = 0,
- self = this,
- pattern,
- i;
-
- while (numWideBars > 3) {
- maxNarrowWidth = self._findNextWidth(counters, maxNarrowWidth);
- numWideBars = 0;
- pattern = 0;
- for (i = 0; i < numCounters; i++) {
- if (counters[i] > maxNarrowWidth) {
- pattern |= 1 << numCounters - 1 - i;
- numWideBars++;
- wideBarWidth += counters[i];
- }
- }
-
- if (numWideBars === 3) {
- for (i = 0; i < numCounters && numWideBars > 0; i++) {
- if (counters[i] > maxNarrowWidth) {
- numWideBars--;
- if (counters[i] * 2 >= wideBarWidth) {
- return -1;
- }
- }
- }
- return pattern;
- }
- }
- return -1;
- };
-
- Code39Reader.prototype._findStart = function () {
- var self = this,
- offset = self._nextSet(self._row),
- patternStart = offset,
- counter = [0, 0, 0, 0, 0, 0, 0, 0, 0],
- counterPos = 0,
- isWhite = false,
- i,
- j,
- whiteSpaceMustStart;
-
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- if (counterPos === counter.length - 1) {
- // find start pattern
- if (self._toPattern(counter) === self.ASTERISK) {
- whiteSpaceMustStart = Math.floor(Math.max(0, patternStart - (i - patternStart) / 4));
- if (self._matchRange(whiteSpaceMustStart, patternStart, 0)) {
- return {
- start: patternStart,
- end: i
- };
- }
- }
+ start: startInfo.start,
+ end: code.end,
+ codeset: codeset,
+ startInfo: startInfo,
+ decodedCodes: decodedCodes,
+ endInfo: code
+ };
+ };
- patternStart += counter[0] + counter[1];
- for (j = 0; j < 7; j++) {
- counter[j] = counter[j + 2];
- }
- counter[7] = 0;
- counter[8] = 0;
- counterPos--;
- } else {
- counterPos++;
- }
- counter[counterPos] = 1;
- isWhite = !isWhite;
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__barcode_reader__["a"].prototype._verifyTrailingWhitespace = function (endInfo) {
+ var self = this,
+ trailingWhitespaceEnd;
+
+ trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
+ if (trailingWhitespaceEnd < self._row.length) {
+ if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
+ return endInfo;
}
}
return null;
};
- exports['default'] = Code39Reader;
- module.exports = exports['default'];
+ /* harmony default export */ exports["a"] = Code128Reader;
/***/ },
-/* 29 */
+/* 68 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__code_39_reader__ = __webpack_require__(30);
- var _code_39_reader = __webpack_require__(28);
-
- var _code_39_reader2 = _interopRequireDefault(_code_39_reader);
function Code39VINReader() {
- _code_39_reader2['default'].call(this);
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__code_39_reader__["a"].call(this);
}
var patterns = {
@@ -9948,13 +7318,13 @@ return /******/ (function(modules) { // webpackBootstrap
AZ09: /[A-Z0-9]{17}/
};
- Code39VINReader.prototype = Object.create(_code_39_reader2['default'].prototype);
+ Code39VINReader.prototype = Object.create(/* harmony import */__WEBPACK_IMPORTED_MODULE_0__code_39_reader__["a"].prototype);
Code39VINReader.prototype.constructor = Code39VINReader;
// Cribbed from:
// https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/client/result/VINResultParser.java
Code39VINReader.prototype._decode = function () {
- var result = _code_39_reader2['default'].prototype._decode.apply(this);
+ var result = /* harmony import */__WEBPACK_IMPORTED_MODULE_0__code_39_reader__["a"].prototype._decode.apply(this);
if (!result) {
return null;
}
@@ -9987,428 +7357,399 @@ return /******/ (function(modules) { // webpackBootstrap
return !!code;
};
- exports['default'] = Code39VINReader;
- module.exports = exports['default'];
+ /* harmony default export */ exports["a"] = Code39VINReader;
/***/ },
-/* 30 */
+/* 69 */
/***/ function(module, exports, __webpack_require__) {
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ean_reader__ = __webpack_require__(10);
- var _barcode_reader = __webpack_require__(26);
- var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
-
- function CodabarReader() {
- _barcode_reader2["default"].call(this);
- this._counters = [];
+ function EAN8Reader() {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__ean_reader__["a"].call(this);
}
var properties = {
- ALPHABETH_STRING: { value: "0123456789-$:/.+ABCD" },
- ALPHABET: { value: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 45, 36, 58, 47, 46, 43, 65, 66, 67, 68] },
- CHARACTER_ENCODINGS: { value: [0x003, 0x006, 0x009, 0x060, 0x012, 0x042, 0x021, 0x024, 0x030, 0x048, 0x00c, 0x018, 0x045, 0x051, 0x054, 0x015, 0x01A, 0x029, 0x00B, 0x00E] },
- START_END: { value: [0x01A, 0x029, 0x00B, 0x00E] },
- MIN_ENCODED_CHARS: { value: 4 },
- MAX_ACCEPTABLE: { value: 2.0 },
- PADDING: { value: 1.5 },
- FORMAT: { value: "codabar", writeable: false }
+ FORMAT: { value: "ean_8", writeable: false }
};
- CodabarReader.prototype = Object.create(_barcode_reader2["default"].prototype, properties);
- CodabarReader.prototype.constructor = CodabarReader;
-
- CodabarReader.prototype._decode = function () {
- var self = this,
- result = [],
- start,
- decodedChar,
- pattern,
- nextStart,
- end;
+ EAN8Reader.prototype = Object.create(/* harmony import */__WEBPACK_IMPORTED_MODULE_0__ean_reader__["a"].prototype, properties);
+ EAN8Reader.prototype.constructor = EAN8Reader;
- this._counters = self._fillCounters();
- start = self._findStart();
- if (!start) {
- return null;
- }
- nextStart = start.startCounter;
+ EAN8Reader.prototype._decodePayload = function (code, result, decodedCodes) {
+ var i,
+ self = this;
- do {
- pattern = self._toPattern(nextStart);
- if (pattern < 0) {
- return null;
- }
- decodedChar = self._patternToChar(pattern);
- if (decodedChar < 0) {
+ for (i = 0; i < 4; i++) {
+ code = self._decodeCode(code.end, self.CODE_G_START);
+ if (!code) {
return null;
}
- result.push(decodedChar);
- nextStart += 8;
- if (result.length > 1 && self._isStartEnd(pattern)) {
- break;
- }
- } while (nextStart < self._counters.length);
-
- // verify end
- if (result.length - 2 < self.MIN_ENCODED_CHARS || !self._isStartEnd(pattern)) {
- return null;
- }
-
- // verify end white space
- if (!self._verifyWhitespace(start.startCounter, nextStart - 8)) {
- return null;
+ result.push(code.code);
+ decodedCodes.push(code);
}
- if (!self._validateResult(result, start.startCounter)) {
+ code = self._findPattern(self.MIDDLE_PATTERN, code.end, true, false);
+ if (code === null) {
return null;
}
+ decodedCodes.push(code);
- nextStart = nextStart > self._counters.length ? self._counters.length : nextStart;
- end = start.start + self._sumCounters(start.startCounter, nextStart - 8);
-
- return {
- code: result.join(""),
- start: start.start,
- end: end,
- startInfo: start,
- decodedCodes: result
- };
- };
-
- CodabarReader.prototype._verifyWhitespace = function (startCounter, endCounter) {
- if (startCounter - 1 <= 0 || this._counters[startCounter - 1] >= this._calculatePatternLength(startCounter) / 2.0) {
- if (endCounter + 8 >= this._counters.length || this._counters[endCounter + 7] >= this._calculatePatternLength(endCounter) / 2.0) {
- return true;
+ for (i = 0; i < 4; i++) {
+ code = self._decodeCode(code.end, self.CODE_G_START);
+ if (!code) {
+ return null;
}
- }
- return false;
- };
-
- CodabarReader.prototype._calculatePatternLength = function (offset) {
- var i,
- sum = 0;
-
- for (i = offset; i < offset + 7; i++) {
- sum += this._counters[i];
+ decodedCodes.push(code);
+ result.push(code.code);
}
- return sum;
+ return code;
};
- CodabarReader.prototype._thresholdResultPattern = function (result, startCounter) {
- var self = this,
- categorization = {
- space: {
- narrow: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE },
- wide: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE }
- },
- bar: {
- narrow: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE },
- wide: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE }
- }
- },
- kind,
- cat,
- i,
- j,
- pos = startCounter,
- pattern;
-
- for (i = 0; i < result.length; i++) {
- pattern = self._charToPattern(result[i]);
- for (j = 6; j >= 0; j--) {
- kind = (j & 1) === 2 ? categorization.bar : categorization.space;
- cat = (pattern & 1) === 1 ? kind.wide : kind.narrow;
- cat.size += self._counters[pos + j];
- cat.counts++;
- pattern >>= 1;
- }
- pos += 8;
- }
+ /* harmony default export */ exports["a"] = EAN8Reader;
+
+/***/ },
+/* 70 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_merge__ = __webpack_require__(28);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_merge___default = __WEBPACK_IMPORTED_MODULE_0_lodash_merge__ && __WEBPACK_IMPORTED_MODULE_0_lodash_merge__.__esModule ? function() { return __WEBPACK_IMPORTED_MODULE_0_lodash_merge__['default'] } : function() { return __WEBPACK_IMPORTED_MODULE_0_lodash_merge__; }
+ /* harmony import */ Object.defineProperty(__WEBPACK_IMPORTED_MODULE_0_lodash_merge___default, 'a', { get: __WEBPACK_IMPORTED_MODULE_0_lodash_merge___default });
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__barcode_reader__ = __webpack_require__(5);
- ["space", "bar"].forEach(function (key) {
- var newkind = categorization[key];
- newkind.wide.min = Math.floor((newkind.narrow.size / newkind.narrow.counts + newkind.wide.size / newkind.wide.counts) / 2);
- newkind.narrow.max = Math.ceil(newkind.wide.min);
- newkind.wide.max = Math.ceil((newkind.wide.size * self.MAX_ACCEPTABLE + self.PADDING) / newkind.wide.counts);
- });
- return categorization;
- };
- CodabarReader.prototype._charToPattern = function (char) {
- var self = this,
- charCode = char.charCodeAt(0),
- i;
- for (i = 0; i < self.ALPHABET.length; i++) {
- if (self.ALPHABET[i] === charCode) {
- return self.CHARACTER_ENCODINGS[i];
- }
+ function I2of5Reader(opts) {
+ opts = /* harmony import */__WEBPACK_IMPORTED_MODULE_0_lodash_merge___default.a.bind()(getDefaulConfig(), opts);
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_1__barcode_reader__["a"].call(this, opts);
+ this.barSpaceRatio = [1, 1];
+ if (opts.normalizeBarSpaceWidth) {
+ this.SINGLE_CODE_ERROR = 0.38;
+ this.AVG_CODE_ERROR = 0.09;
}
- return 0x0;
- };
-
- CodabarReader.prototype._validateResult = function (result, startCounter) {
- var self = this,
- thresholds = self._thresholdResultPattern(result, startCounter),
- i,
- j,
- kind,
- cat,
- size,
- pos = startCounter,
- pattern;
+ }
- for (i = 0; i < result.length; i++) {
- pattern = self._charToPattern(result[i]);
- for (j = 6; j >= 0; j--) {
- kind = (j & 1) === 0 ? thresholds.bar : thresholds.space;
- cat = (pattern & 1) === 1 ? kind.wide : kind.narrow;
- size = self._counters[pos + j];
- if (size < cat.min || size > cat.max) {
- return false;
- }
- pattern >>= 1;
- }
- pos += 8;
- }
- return true;
- };
+ function getDefaulConfig() {
+ var config = {};
- CodabarReader.prototype._patternToChar = function (pattern) {
- var i,
- self = this;
+ Object.keys(I2of5Reader.CONFIG_KEYS).forEach(function (key) {
+ config[key] = I2of5Reader.CONFIG_KEYS[key].default;
+ });
+ return config;
+ }
- for (i = 0; i < self.CHARACTER_ENCODINGS.length; i++) {
- if (self.CHARACTER_ENCODINGS[i] === pattern) {
- return String.fromCharCode(self.ALPHABET[i]);
- }
- }
- return -1;
+ var N = 1,
+ W = 3,
+ properties = {
+ MODULO: { value: 10 },
+ START_PATTERN: { value: [N * 2.5, N * 2.5, N * 2.5, N * 2.5] },
+ STOP_PATTERN: { value: [N * 2, N * 2, W * 2] },
+ CODE_PATTERN: { value: [[N, N, W, W, N], [W, N, N, N, W], [N, W, N, N, W], [W, W, N, N, N], [N, N, W, N, W], [W, N, W, N, N], [N, W, W, N, N], [N, N, N, W, W], [W, N, N, W, N], [N, W, N, W, N]] },
+ SINGLE_CODE_ERROR: { value: 0.78, writable: true },
+ AVG_CODE_ERROR: { value: 0.38, writable: true },
+ MAX_CORRECTION_FACTOR: { value: 5 },
+ FORMAT: { value: "i2of5" }
};
- CodabarReader.prototype._computeAlternatingThreshold = function (offset, end) {
- var i,
- min = Number.MAX_VALUE,
- max = 0,
- counter;
+ I2of5Reader.prototype = Object.create(/* harmony import */__WEBPACK_IMPORTED_MODULE_1__barcode_reader__["a"].prototype, properties);
+ I2of5Reader.prototype.constructor = I2of5Reader;
+
+ I2of5Reader.prototype._matchPattern = function (counter, code) {
+ if (this.config.normalizeBarSpaceWidth) {
+ var i,
+ counterSum = [0, 0],
+ codeSum = [0, 0],
+ correction = [0, 0],
+ correctionRatio = this.MAX_CORRECTION_FACTOR,
+ correctionRatioInverse = 1 / correctionRatio;
- for (i = offset; i < end; i += 2) {
- counter = this._counters[i];
- if (counter > max) {
- max = counter;
+ for (i = 0; i < counter.length; i++) {
+ counterSum[i % 2] += counter[i];
+ codeSum[i % 2] += code[i];
}
- if (counter < min) {
- min = counter;
+ correction[0] = codeSum[0] / counterSum[0];
+ correction[1] = codeSum[1] / counterSum[1];
+
+ correction[0] = Math.max(Math.min(correction[0], correctionRatio), correctionRatioInverse);
+ correction[1] = Math.max(Math.min(correction[1], correctionRatio), correctionRatioInverse);
+ this.barSpaceRatio = correction;
+ for (i = 0; i < counter.length; i++) {
+ counter[i] *= this.barSpaceRatio[i % 2];
}
}
-
- return (min + max) / 2.0 | 0;
+ return /* harmony import */__WEBPACK_IMPORTED_MODULE_1__barcode_reader__["a"].prototype._matchPattern.call(this, counter, code);
};
- CodabarReader.prototype._toPattern = function (offset) {
- var numCounters = 7,
- end = offset + numCounters,
- barThreshold,
- spaceThreshold,
- bitmask = 1 << numCounters - 1,
- pattern = 0,
+ I2of5Reader.prototype._findPattern = function (pattern, offset, isWhite, tryHarder) {
+ var counter = [],
+ self = this,
i,
- threshold;
-
- if (end > this._counters.length) {
- return -1;
- }
+ counterPos = 0,
+ bestMatch = {
+ error: Number.MAX_VALUE,
+ code: -1,
+ start: 0,
+ end: 0
+ },
+ error,
+ j,
+ sum,
+ normalized,
+ epsilon = self.AVG_CODE_ERROR;
- barThreshold = this._computeAlternatingThreshold(offset, end);
- spaceThreshold = this._computeAlternatingThreshold(offset + 1, end);
+ isWhite = isWhite || false;
+ tryHarder = tryHarder || false;
- for (i = 0; i < numCounters; i++) {
- threshold = (i & 1) === 0 ? barThreshold : spaceThreshold;
- if (this._counters[offset + i] > threshold) {
- pattern |= bitmask;
- }
- bitmask >>= 1;
+ if (!offset) {
+ offset = self._nextSet(self._row);
}
- return pattern;
- };
+ for (i = 0; i < pattern.length; i++) {
+ counter[i] = 0;
+ }
- CodabarReader.prototype._isStartEnd = function (pattern) {
- var i;
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ if (counterPos === counter.length - 1) {
+ sum = 0;
+ for (j = 0; j < counter.length; j++) {
+ sum += counter[j];
+ }
+ normalized = self._normalize(counter);
+ if (normalized) {
+ error = self._matchPattern(normalized, pattern);
- for (i = 0; i < this.START_END.length; i++) {
- if (this.START_END[i] === pattern) {
- return true;
+ if (error < epsilon) {
+ bestMatch.error = error;
+ bestMatch.start = i - sum;
+ bestMatch.end = i;
+ return bestMatch;
+ }
+ }
+ if (tryHarder) {
+ for (j = 0; j < counter.length - 2; j++) {
+ counter[j] = counter[j + 2];
+ }
+ counter[counter.length - 2] = 0;
+ counter[counter.length - 1] = 0;
+ counterPos--;
+ } else {
+ return null;
+ }
+ } else {
+ counterPos++;
+ }
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
}
}
- return false;
+ return null;
};
- CodabarReader.prototype._sumCounters = function (start, end) {
- var i,
- sum = 0;
+ I2of5Reader.prototype._findStart = function () {
+ var self = this,
+ leadingWhitespaceStart,
+ offset = self._nextSet(self._row),
+ startInfo,
+ narrowBarWidth = 1;
- for (i = start; i < end; i++) {
- sum += this._counters[i];
+ while (!startInfo) {
+ startInfo = self._findPattern(self.START_PATTERN, offset, false, true);
+ if (!startInfo) {
+ return null;
+ }
+ narrowBarWidth = Math.floor((startInfo.end - startInfo.start) / 4);
+ leadingWhitespaceStart = startInfo.start - narrowBarWidth * 10;
+ if (leadingWhitespaceStart >= 0) {
+ if (self._matchRange(leadingWhitespaceStart, startInfo.start, 0)) {
+ return startInfo;
+ }
+ }
+ offset = startInfo.end;
+ startInfo = null;
}
- return sum;
};
- CodabarReader.prototype._findStart = function () {
+ I2of5Reader.prototype._verifyTrailingWhitespace = function (endInfo) {
var self = this,
- i,
- pattern,
- start = self._nextUnset(self._row),
- end;
+ trailingWhitespaceEnd;
- for (i = 1; i < this._counters.length; i++) {
- pattern = self._toPattern(i);
- if (pattern !== -1 && self._isStartEnd(pattern)) {
- // TODO: Look for whitespace ahead
- start += self._sumCounters(0, i);
- end = start + self._sumCounters(i, i + 8);
- return {
- start: start,
- end: end,
- startCounter: i,
- endCounter: i + 8
- };
+ trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
+ if (trailingWhitespaceEnd < self._row.length) {
+ if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
+ return endInfo;
}
}
+ return null;
};
- exports["default"] = CodabarReader;
- module.exports = exports["default"];
-
-/***/ },
-/* 31 */
-/***/ function(module, exports, __webpack_require__) {
-
- "use strict";
+ I2of5Reader.prototype._findEnd = function () {
+ var self = this,
+ endInfo,
+ tmp;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
+ self._row.reverse();
+ endInfo = self._findPattern(self.STOP_PATTERN);
+ self._row.reverse();
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ if (endInfo === null) {
+ return null;
+ }
- var _ean_reader = __webpack_require__(27);
+ // reverse numbers
+ tmp = endInfo.start;
+ endInfo.start = self._row.length - endInfo.end;
+ endInfo.end = self._row.length - tmp;
- var _ean_reader2 = _interopRequireDefault(_ean_reader);
+ return endInfo !== null ? self._verifyTrailingWhitespace(endInfo) : null;
+ };
- function UPCReader() {
- _ean_reader2["default"].call(this);
- }
+ I2of5Reader.prototype._decodePair = function (counterPair) {
+ var i,
+ code,
+ codes = [],
+ self = this;
- var properties = {
- FORMAT: { value: "upc_a", writeable: false }
+ for (i = 0; i < counterPair.length; i++) {
+ code = self._decodeCode(counterPair[i]);
+ if (!code) {
+ return null;
+ }
+ codes.push(code);
+ }
+ return codes;
};
- UPCReader.prototype = Object.create(_ean_reader2["default"].prototype, properties);
- UPCReader.prototype.constructor = UPCReader;
+ I2of5Reader.prototype._decodeCode = function (counter) {
+ var j,
+ self = this,
+ sum = 0,
+ normalized,
+ error,
+ epsilon = self.AVG_CODE_ERROR,
+ code,
+ bestMatch = {
+ error: Number.MAX_VALUE,
+ code: -1,
+ start: 0,
+ end: 0
+ };
- UPCReader.prototype._decode = function () {
- var result = _ean_reader2["default"].prototype._decode.call(this);
+ for (j = 0; j < counter.length; j++) {
+ sum += counter[j];
+ }
+ normalized = self._normalize(counter);
+ if (normalized) {
+ for (code = 0; code < self.CODE_PATTERN.length; code++) {
+ error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
+ if (error < bestMatch.error) {
+ bestMatch.code = code;
+ bestMatch.error = error;
+ }
+ }
+ if (bestMatch.error < epsilon) {
+ return bestMatch;
+ }
+ }
+ return null;
+ };
- if (result && result.code && result.code.length === 13 && result.code.charAt(0) === "0") {
- result.code = result.code.substring(1);
- return result;
+ I2of5Reader.prototype._decodePayload = function (counters, result, decodedCodes) {
+ var i,
+ self = this,
+ pos = 0,
+ counterLength = counters.length,
+ counterPair = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0]],
+ codes;
+
+ while (pos < counterLength) {
+ for (i = 0; i < 5; i++) {
+ counterPair[0][i] = counters[pos] * this.barSpaceRatio[0];
+ counterPair[1][i] = counters[pos + 1] * this.barSpaceRatio[1];
+ pos += 2;
+ }
+ codes = self._decodePair(counterPair);
+ if (!codes) {
+ return null;
+ }
+ for (i = 0; i < codes.length; i++) {
+ result.push(codes[i].code + "");
+ decodedCodes.push(codes[i]);
+ }
}
- return null;
+ return codes;
};
- exports["default"] = UPCReader;
- module.exports = exports["default"];
-
-/***/ },
-/* 32 */
-/***/ function(module, exports, __webpack_require__) {
-
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- var _ean_reader = __webpack_require__(27);
-
- var _ean_reader2 = _interopRequireDefault(_ean_reader);
-
- function EAN8Reader() {
- _ean_reader2["default"].call(this);
- }
-
- var properties = {
- FORMAT: { value: "ean_8", writeable: false }
+ I2of5Reader.prototype._verifyCounterLength = function (counters) {
+ return counters.length % 10 === 0;
};
- EAN8Reader.prototype = Object.create(_ean_reader2["default"].prototype, properties);
- EAN8Reader.prototype.constructor = EAN8Reader;
-
- EAN8Reader.prototype._decodePayload = function (code, result, decodedCodes) {
- var i,
- self = this;
+ I2of5Reader.prototype._decode = function () {
+ var startInfo,
+ endInfo,
+ self = this,
+ code,
+ result = [],
+ decodedCodes = [],
+ counters;
- for (i = 0; i < 4; i++) {
- code = self._decodeCode(code.end, self.CODE_G_START);
- if (!code) {
- return null;
- }
- result.push(code.code);
- decodedCodes.push(code);
+ startInfo = self._findStart();
+ if (!startInfo) {
+ return null;
}
+ decodedCodes.push(startInfo);
- code = self._findPattern(self.MIDDLE_PATTERN, code.end, true, false);
- if (code === null) {
+ endInfo = self._findEnd();
+ if (!endInfo) {
return null;
}
- decodedCodes.push(code);
- for (i = 0; i < 4; i++) {
- code = self._decodeCode(code.end, self.CODE_G_START);
- if (!code) {
- return null;
- }
- decodedCodes.push(code);
- result.push(code.code);
+ counters = self._fillCounters(startInfo.end, endInfo.start, false);
+ if (!self._verifyCounterLength(counters)) {
+ return null;
+ }
+ code = self._decodePayload(counters, result, decodedCodes);
+ if (!code) {
+ return null;
+ }
+ if (result.length % 2 !== 0 || result.length < 6) {
+ return null;
}
- return code;
+ decodedCodes.push(endInfo);
+ return {
+ code: result.join(""),
+ start: startInfo.start,
+ end: endInfo.end,
+ startInfo: startInfo,
+ decodedCodes: decodedCodes
+ };
+ };
+
+ I2of5Reader.CONFIG_KEYS = {
+ normalizeBarSpaceWidth: {
+ 'type': 'boolean',
+ 'default': false,
+ 'description': 'If true, the reader tries to normalize the' + 'width-difference between bars and spaces'
+ }
};
- exports["default"] = EAN8Reader;
- module.exports = exports["default"];
+ /* harmony default export */ exports["a"] = I2of5Reader;
/***/ },
-/* 33 */
+/* 71 */
/***/ function(module, exports, __webpack_require__) {
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ean_reader__ = __webpack_require__(10);
- var _ean_reader = __webpack_require__(27);
-
- var _ean_reader2 = _interopRequireDefault(_ean_reader);
function UPCEReader() {
- _ean_reader2["default"].call(this);
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__ean_reader__["a"].call(this);
}
var properties = {
@@ -10417,7 +7758,7 @@ return /******/ (function(modules) { // webpackBootstrap
FORMAT: { value: "upc_e", writeable: false }
};
- UPCEReader.prototype = Object.create(_ean_reader2["default"].prototype, properties);
+ UPCEReader.prototype = Object.create(/* harmony import */__WEBPACK_IMPORTED_MODULE_0__ean_reader__["a"].prototype, properties);
UPCEReader.prototype.constructor = UPCEReader;
UPCEReader.prototype._decodePayload = function (code, result, decodedCodes) {
@@ -10459,2601 +7800,4599 @@ return /******/ (function(modules) { // webpackBootstrap
return false;
};
- UPCEReader.prototype._convertToUPCA = function (result) {
- var upca = [result[0]],
- lastDigit = result[result.length - 2];
+ UPCEReader.prototype._convertToUPCA = function (result) {
+ var upca = [result[0]],
+ lastDigit = result[result.length - 2];
+
+ if (lastDigit <= 2) {
+ upca = upca.concat(result.slice(1, 3)).concat([lastDigit, 0, 0, 0, 0]).concat(result.slice(3, 6));
+ } else if (lastDigit === 3) {
+ upca = upca.concat(result.slice(1, 4)).concat([0, 0, 0, 0, 0]).concat(result.slice(4, 6));
+ } else if (lastDigit === 4) {
+ upca = upca.concat(result.slice(1, 5)).concat([0, 0, 0, 0, 0, result[5]]);
+ } else {
+ upca = upca.concat(result.slice(1, 6)).concat([0, 0, 0, 0, lastDigit]);
+ }
+
+ upca.push(result[result.length - 1]);
+ return upca;
+ };
+
+ UPCEReader.prototype._checksum = function (result) {
+ return /* harmony import */__WEBPACK_IMPORTED_MODULE_0__ean_reader__["a"].prototype._checksum.call(this, this._convertToUPCA(result));
+ };
+
+ UPCEReader.prototype._findEnd = function (offset, isWhite) {
+ isWhite = true;
+ return /* harmony import */__WEBPACK_IMPORTED_MODULE_0__ean_reader__["a"].prototype._findEnd.call(this, offset, isWhite);
+ };
+
+ UPCEReader.prototype._verifyTrailingWhitespace = function (endInfo) {
+ var self = this,
+ trailingWhitespaceEnd;
+
+ trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
+ if (trailingWhitespaceEnd < self._row.length) {
+ if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
+ return endInfo;
+ }
+ }
+ };
+
+ /* harmony default export */ exports["a"] = UPCEReader;
+
+/***/ },
+/* 72 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ean_reader__ = __webpack_require__(10);
+
+
+ function UPCReader() {
+ /* harmony import */__WEBPACK_IMPORTED_MODULE_0__ean_reader__["a"].call(this);
+ }
+
+ var properties = {
+ FORMAT: { value: "upc_a", writeable: false }
+ };
+
+ UPCReader.prototype = Object.create(/* harmony import */__WEBPACK_IMPORTED_MODULE_0__ean_reader__["a"].prototype, properties);
+ UPCReader.prototype.constructor = UPCReader;
+
+ UPCReader.prototype._decode = function () {
+ var result = /* harmony import */__WEBPACK_IMPORTED_MODULE_0__ean_reader__["a"].prototype._decode.call(this);
+
+ if (result && result.code && result.code.length === 13 && result.code.charAt(0) === "0") {
+ result.code = result.code.substring(1);
+ return result;
+ }
+ return null;
+ };
+
+ /* harmony default export */ exports["a"] = UPCReader;
+
+/***/ },
+/* 73 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = copy
+
+ /**
+ * Copy the values from one mat2 to another
+ *
+ * @alias mat2.copy
+ * @param {mat2} out the receiving matrix
+ * @param {mat2} a the source matrix
+ * @returns {mat2} out
+ */
+ function copy(out, a) {
+ out[0] = a[0]
+ out[1] = a[1]
+ out[2] = a[2]
+ out[3] = a[3]
+ return out
+ }
+
+
+/***/ },
+/* 74 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = create
+
+ /**
+ * Creates a new identity mat2
+ *
+ * @alias mat2.create
+ * @returns {mat2} a new 2x2 matrix
+ */
+ function create() {
+ var out = new Float32Array(4)
+ out[0] = 1
+ out[1] = 0
+ out[2] = 0
+ out[3] = 1
+ return out
+ }
+
+
+/***/ },
+/* 75 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = invert
+
+ /**
+ * Inverts a mat2
+ *
+ * @alias mat2.invert
+ * @param {mat2} out the receiving matrix
+ * @param {mat2} a the source matrix
+ * @returns {mat2} out
+ */
+ function invert(out, a) {
+ var a0 = a[0]
+ var a1 = a[1]
+ var a2 = a[2]
+ var a3 = a[3]
+ var det = a0 * a3 - a2 * a1
+
+ if (!det) return null
+ det = 1.0 / det
+
+ out[0] = a3 * det
+ out[1] = -a1 * det
+ out[2] = -a2 * det
+ out[3] = a0 * det
+
+ return out
+ }
+
+
+/***/ },
+/* 76 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = scale
+
+ /**
+ * Scales a vec2 by a scalar number
+ *
+ * @param {vec2} out the receiving vector
+ * @param {vec2} a the vector to scale
+ * @param {Number} b amount to scale the vector by
+ * @returns {vec2} out
+ */
+ function scale(out, a, b) {
+ out[0] = a[0] * b
+ out[1] = a[1] * b
+ return out
+ }
+
+/***/ },
+/* 77 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = transformMat2
+
+ /**
+ * Transforms the vec2 with a mat2
+ *
+ * @param {vec2} out the receiving vector
+ * @param {vec2} a the vector to transform
+ * @param {mat2} m matrix to transform with
+ * @returns {vec2} out
+ */
+ function transformMat2(out, a, m) {
+ var x = a[0],
+ y = a[1]
+ out[0] = m[0] * x + m[2] * y
+ out[1] = m[1] * x + m[3] * y
+ return out
+ }
+
+/***/ },
+/* 78 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = clone;
+
+ /**
+ * Creates a new vec3 initialized with values from an existing vector
+ *
+ * @param {vec3} a vector to clone
+ * @returns {vec3} a new 3D vector
+ */
+ function clone(a) {
+ var out = new Float32Array(3)
+ out[0] = a[0]
+ out[1] = a[1]
+ out[2] = a[2]
+ return out
+ }
+
+/***/ },
+/* 79 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var nativeCreate = __webpack_require__(14);
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /**
+ * Creates an hash object.
+ *
+ * @private
+ * @constructor
+ * @returns {Object} Returns the new hash object.
+ */
+ function Hash() {}
+
+ // Avoid inheriting from `Object.prototype` when possible.
+ Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
+
+ module.e = Hash;
+
+
+/***/ },
+/* 80 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var mapClear = __webpack_require__(126),
+ mapDelete = __webpack_require__(127),
+ mapGet = __webpack_require__(128),
+ mapHas = __webpack_require__(129),
+ mapSet = __webpack_require__(130);
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function MapCache(values) {
+ var index = -1,
+ length = values ? values.length : 0;
- if (lastDigit <= 2) {
- upca = upca.concat(result.slice(1, 3)).concat([lastDigit, 0, 0, 0, 0]).concat(result.slice(3, 6));
- } else if (lastDigit === 3) {
- upca = upca.concat(result.slice(1, 4)).concat([0, 0, 0, 0, 0]).concat(result.slice(4, 6));
- } else if (lastDigit === 4) {
- upca = upca.concat(result.slice(1, 5)).concat([0, 0, 0, 0, 0, result[5]]);
- } else {
- upca = upca.concat(result.slice(1, 6)).concat([0, 0, 0, 0, lastDigit]);
- }
+ this.clear();
+ while (++index < length) {
+ var entry = values[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
- upca.push(result[result.length - 1]);
- return upca;
- };
+ // Add functions to the `MapCache`.
+ MapCache.prototype.clear = mapClear;
+ MapCache.prototype['delete'] = mapDelete;
+ MapCache.prototype.get = mapGet;
+ MapCache.prototype.has = mapHas;
+ MapCache.prototype.set = mapSet;
- UPCEReader.prototype._checksum = function (result) {
- return _ean_reader2["default"].prototype._checksum.call(this, this._convertToUPCA(result));
- };
+ module.e = MapCache;
+
+
+/***/ },
+/* 81 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var root = __webpack_require__(1);
- UPCEReader.prototype._findEnd = function (offset, isWhite) {
- isWhite = true;
- return _ean_reader2["default"].prototype._findEnd.call(this, offset, isWhite);
- };
+ /** Built-in value references. */
+ var Reflect = root.Reflect;
- UPCEReader.prototype._verifyTrailingWhitespace = function (endInfo) {
- var self = this,
- trailingWhitespaceEnd;
+ module.e = Reflect;
+
+
+/***/ },
+/* 82 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getNative = __webpack_require__(12),
+ root = __webpack_require__(1);
- trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
- if (trailingWhitespaceEnd < self._row.length) {
- if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
- return endInfo;
- }
- }
- };
+ /* Built-in method references that are verified to be native. */
+ var Set = getNative(root, 'Set');
- exports["default"] = UPCEReader;
- module.exports = exports["default"];
+ module.e = Set;
+
/***/ },
-/* 34 */
+/* 83 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
+ var root = __webpack_require__(1);
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
+ /** Built-in value references. */
+ var Symbol = root.Symbol;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ module.e = Symbol;
+
+
+/***/ },
+/* 84 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var root = __webpack_require__(1);
- var _barcode_reader = __webpack_require__(26);
+ /** Built-in value references. */
+ var Uint8Array = root.Uint8Array;
- var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
+ module.e = Uint8Array;
+
+
+/***/ },
+/* 85 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getNative = __webpack_require__(12),
+ root = __webpack_require__(1);
- var merge = __webpack_require__(35);
+ /* Built-in method references that are verified to be native. */
+ var WeakMap = getNative(root, 'WeakMap');
- function I2of5Reader(opts) {
- opts = merge(getDefaulConfig(), opts);
- _barcode_reader2['default'].call(this, opts);
- this.barSpaceRatio = [1, 1];
- if (opts.normalizeBarSpaceWidth) {
- this.SINGLE_CODE_ERROR = 0.38;
- this.AVG_CODE_ERROR = 0.09;
- }
+ module.e = WeakMap;
+
+
+/***/ },
+/* 86 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Adds the key-value `pair` to `map`.
+ *
+ * @private
+ * @param {Object} map The map to modify.
+ * @param {Array} pair The key-value pair to add.
+ * @returns {Object} Returns `map`.
+ */
+ function addMapEntry(map, pair) {
+ // Don't return `Map#set` because it doesn't return the map instance in IE 11.
+ map.set(pair[0], pair[1]);
+ return map;
}
- function getDefaulConfig() {
- var config = {};
+ module.e = addMapEntry;
+
+
+/***/ },
+/* 87 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Adds `value` to `set`.
+ *
+ * @private
+ * @param {Object} set The set to modify.
+ * @param {*} value The value to add.
+ * @returns {Object} Returns `set`.
+ */
+ function addSetEntry(set, value) {
+ set.add(value);
+ return set;
+ }
- Object.keys(I2of5Reader.CONFIG_KEYS).forEach(function (key) {
- config[key] = I2of5Reader.CONFIG_KEYS[key]['default'];
- });
- return config;
+ module.e = addSetEntry;
+
+
+/***/ },
+/* 88 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+ function apply(func, thisArg, args) {
+ var length = args.length;
+ switch (length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
}
- var N = 1,
- W = 3,
- properties = {
- MODULO: { value: 10 },
- START_PATTERN: { value: [N * 2.5, N * 2.5, N * 2.5, N * 2.5] },
- STOP_PATTERN: { value: [N * 2, N * 2, W * 2] },
- CODE_PATTERN: { value: [[N, N, W, W, N], [W, N, N, N, W], [N, W, N, N, W], [W, W, N, N, N], [N, N, W, N, W], [W, N, W, N, N], [N, W, W, N, N], [N, N, N, W, W], [W, N, N, W, N], [N, W, N, W, N]] },
- SINGLE_CODE_ERROR: { value: 0.78, writable: true },
- AVG_CODE_ERROR: { value: 0.38, writable: true },
- MAX_CORRECTION_FACTOR: { value: 5 },
- FORMAT: { value: "i2of5" }
- };
+ module.e = apply;
+
+
+/***/ },
+/* 89 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
- I2of5Reader.prototype = Object.create(_barcode_reader2['default'].prototype, properties);
- I2of5Reader.prototype.constructor = I2of5Reader;
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
- I2of5Reader.prototype._matchPattern = function (counter, code) {
- if (this.config.normalizeBarSpaceWidth) {
- var i,
- counterSum = [0, 0],
- codeSum = [0, 0],
- correction = [0, 0],
- correctionRatio = this.MAX_CORRECTION_FACTOR,
- correctionRatioInverse = 1 / correctionRatio;
+ module.e = arrayPush;
+
+
+/***/ },
+/* 90 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var copyObject = __webpack_require__(20),
+ keys = __webpack_require__(45);
- for (i = 0; i < counter.length; i++) {
- counterSum[i % 2] += counter[i];
- codeSum[i % 2] += code[i];
- }
- correction[0] = codeSum[0] / counterSum[0];
- correction[1] = codeSum[1] / counterSum[1];
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
- correction[0] = Math.max(Math.min(correction[0], correctionRatio), correctionRatioInverse);
- correction[1] = Math.max(Math.min(correction[1], correctionRatio), correctionRatioInverse);
- this.barSpaceRatio = correction;
- for (i = 0; i < counter.length; i++) {
- counter[i] *= this.barSpaceRatio[i % 2];
- }
- }
- return _barcode_reader2['default'].prototype._matchPattern.call(this, counter, code);
- };
+ module.e = baseAssign;
+
+
+/***/ },
+/* 91 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Stack = __webpack_require__(32),
+ arrayEach = __webpack_require__(33),
+ assignValue = __webpack_require__(35),
+ baseAssign = __webpack_require__(90),
+ baseForOwn = __webpack_require__(95),
+ cloneBuffer = __webpack_require__(105),
+ copyArray = __webpack_require__(41),
+ copySymbols = __webpack_require__(112),
+ getTag = __webpack_require__(117),
+ initCloneArray = __webpack_require__(121),
+ initCloneByTag = __webpack_require__(122),
+ initCloneObject = __webpack_require__(123),
+ isArray = __webpack_require__(4),
+ isBuffer = __webpack_require__(139),
+ isHostObject = __webpack_require__(21),
+ isObject = __webpack_require__(2);
- I2of5Reader.prototype._findPattern = function (pattern, offset, isWhite, tryHarder) {
- var counter = [],
- self = this,
- i,
- counterPos = 0,
- bestMatch = {
- error: Number.MAX_VALUE,
- code: -1,
- start: 0,
- end: 0
- },
- error,
- j,
- sum,
- normalized,
- epsilon = self.AVG_CODE_ERROR;
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
- isWhite = isWhite || false;
- tryHarder = tryHarder || false;
+ var arrayBufferTag = '[object ArrayBuffer]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
- if (!offset) {
- offset = self._nextSet(self._row);
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
+ cloneableTags[dateTag] = cloneableTags[float32Tag] =
+ cloneableTags[float64Tag] = cloneableTags[int8Tag] =
+ cloneableTags[int16Tag] = cloneableTags[int32Tag] =
+ cloneableTags[mapTag] = cloneableTags[numberTag] =
+ cloneableTags[objectTag] = cloneableTags[regexpTag] =
+ cloneableTags[setTag] = cloneableTags[stringTag] =
+ cloneableTags[symbolTag] = cloneableTags[uint8Tag] =
+ cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] =
+ cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @param {boolean} [isFull] Specify a clone including symbols.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
+ var result;
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ if (isHostObject(value)) {
+ return object ? value : {};
+ }
+ result = initCloneObject(isFunc ? {} : value);
+ if (!isDeep) {
+ result = baseAssign(result, value);
+ return isFull ? copySymbols(value, result) : result;
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, isDeep);
}
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ // Recursively populate clone (susceptible to call stack limits).
+ (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
+ assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
+ });
+ return (isFull && !isArr) ? copySymbols(value, result) : result;
+ }
+
+ module.e = baseClone;
+
+
+/***/ },
+/* 92 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(2);
+
+ /** Built-in value references. */
+ var objectCreate = Object.create;
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ function baseCreate(proto) {
+ return isObject(proto) ? objectCreate(proto) : {};
+ }
+
+ module.e = baseCreate;
+
+
+/***/ },
+/* 93 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var arrayPush = __webpack_require__(89),
+ isArguments = __webpack_require__(24),
+ isArray = __webpack_require__(4),
+ isArrayLikeObject = __webpack_require__(26);
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, isStrict, result) {
+ result || (result = []);
+
+ var index = -1,
+ length = array.length;
- for (i = 0; i < pattern.length; i++) {
- counter[i] = 0;
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && isArrayLikeObject(value) &&
+ (isStrict || isArray(value) || isArguments(value))) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
}
+ }
+ return result;
+ }
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- if (counterPos === counter.length - 1) {
- sum = 0;
- for (j = 0; j < counter.length; j++) {
- sum += counter[j];
- }
- normalized = self._normalize(counter);
- if (normalized) {
- error = self._matchPattern(normalized, pattern);
+ module.e = baseFlatten;
+
+
+/***/ },
+/* 94 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var createBaseFor = __webpack_require__(114);
- if (error < epsilon) {
- bestMatch.error = error;
- bestMatch.start = i - sum;
- bestMatch.end = i;
- return bestMatch;
- }
- }
- if (tryHarder) {
- for (j = 0; j < counter.length - 2; j++) {
- counter[j] = counter[j + 2];
- }
- counter[counter.length - 2] = 0;
- counter[counter.length - 1] = 0;
- counterPos--;
- } else {
- return null;
- }
- } else {
- counterPos++;
- }
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
- }
- return null;
- };
+ /**
+ * The base implementation of `baseForIn` and `baseForOwn` which iterates
+ * over `object` properties returned by `keysFunc` invoking `iteratee` for
+ * each property. Iteratee functions may exit iteration early by explicitly
+ * returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
- I2of5Reader.prototype._findStart = function () {
- var self = this,
- leadingWhitespaceStart,
- offset = self._nextSet(self._row),
- startInfo,
- narrowBarWidth = 1;
+ module.e = baseFor;
+
+
+/***/ },
+/* 95 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseFor = __webpack_require__(94),
+ keys = __webpack_require__(45);
- while (!startInfo) {
- startInfo = self._findPattern(self.START_PATTERN, offset, false, true);
- if (!startInfo) {
- return null;
- }
- narrowBarWidth = Math.floor((startInfo.end - startInfo.start) / 4);
- leadingWhitespaceStart = startInfo.start - narrowBarWidth * 10;
- if (leadingWhitespaceStart >= 0) {
- if (self._matchRange(leadingWhitespaceStart, startInfo.start, 0)) {
- return startInfo;
- }
- }
- offset = startInfo.end;
- startInfo = null;
- }
- };
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
- I2of5Reader.prototype._verifyTrailingWhitespace = function (endInfo) {
- var self = this,
- trailingWhitespaceEnd;
+ module.e = baseForOwn;
+
+
+/***/ },
+/* 96 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
- if (trailingWhitespaceEnd < self._row.length) {
- if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
- return endInfo;
- }
- }
- return null;
- };
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- I2of5Reader.prototype._findEnd = function () {
- var self = this,
- endInfo,
- tmp;
+ /** Built-in value references. */
+ var getPrototypeOf = Object.getPrototypeOf;
- self._row.reverse();
- endInfo = self._findPattern(self.STOP_PATTERN);
- self._row.reverse();
+ /**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHas(object, key) {
+ // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
+ // that are composed entirely of index properties, return `false` for
+ // `hasOwnProperty` checks of them.
+ return hasOwnProperty.call(object, key) ||
+ (typeof object == 'object' && key in object && getPrototypeOf(object) === null);
+ }
- if (endInfo === null) {
- return null;
- }
+ module.e = baseHas;
+
+
+/***/ },
+/* 97 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeKeys = Object.keys;
- // reverse numbers
- tmp = endInfo.start;
- endInfo.start = self._row.length - endInfo.end;
- endInfo.end = self._row.length - tmp;
+ /**
+ * The base implementation of `_.keys` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ return nativeKeys(Object(object));
+ }
- return endInfo !== null ? self._verifyTrailingWhitespace(endInfo) : null;
- };
+ module.e = baseKeys;
+
+
+/***/ },
+/* 98 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Reflect = __webpack_require__(81),
+ iteratorToArray = __webpack_require__(125);
- I2of5Reader.prototype._decodePair = function (counterPair) {
- var i,
- code,
- codes = [],
- self = this;
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- for (i = 0; i < counterPair.length; i++) {
- code = self._decodeCode(counterPair[i]);
- if (!code) {
- return null;
- }
- codes.push(code);
- }
- return codes;
- };
+ /** Built-in value references. */
+ var enumerate = Reflect ? Reflect.enumerate : undefined,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable;
- I2of5Reader.prototype._decodeCode = function (counter) {
- var j,
- self = this,
- sum = 0,
- normalized,
- error,
- epsilon = self.AVG_CODE_ERROR,
- code,
- bestMatch = {
- error: Number.MAX_VALUE,
- code: -1,
- start: 0,
- end: 0
- };
+ /**
+ * The base implementation of `_.keysIn` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeysIn(object) {
+ object = object == null ? object : Object(object);
- for (j = 0; j < counter.length; j++) {
- sum += counter[j];
- }
- normalized = self._normalize(counter);
- if (normalized) {
- for (code = 0; code < self.CODE_PATTERN.length; code++) {
- error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
- if (error < bestMatch.error) {
- bestMatch.code = code;
- bestMatch.error = error;
- }
- }
- if (bestMatch.error < epsilon) {
- return bestMatch;
- }
- }
- return null;
- };
+ var result = [];
+ for (var key in object) {
+ result.push(key);
+ }
+ return result;
+ }
- I2of5Reader.prototype._decodePayload = function (counters, result, decodedCodes) {
- var i,
- self = this,
- pos = 0,
- counterLength = counters.length,
- counterPair = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0]],
- codes;
+ // Fallback for IE < 9 with es6-shim.
+ if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
+ baseKeysIn = function(object) {
+ return iteratorToArray(enumerate(object));
+ };
+ }
- while (pos < counterLength) {
- for (i = 0; i < 5; i++) {
- counterPair[0][i] = counters[pos] * this.barSpaceRatio[0];
- counterPair[1][i] = counters[pos + 1] * this.barSpaceRatio[1];
- pos += 2;
- }
- codes = self._decodePair(counterPair);
- if (!codes) {
- return null;
- }
- for (i = 0; i < codes.length; i++) {
- result.push(codes[i].code + "");
- decodedCodes.push(codes[i]);
- }
+ module.e = baseKeysIn;
+
+
+/***/ },
+/* 99 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Stack = __webpack_require__(32),
+ arrayEach = __webpack_require__(33),
+ assignMergeValue = __webpack_require__(34),
+ baseMergeDeep = __webpack_require__(100),
+ isArray = __webpack_require__(4),
+ isObject = __webpack_require__(2),
+ isTypedArray = __webpack_require__(44),
+ keysIn = __webpack_require__(46);
+
+ /**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged counterparts.
+ */
+ function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ var props = (isArray(source) || isTypedArray(source))
+ ? undefined
+ : keysIn(source);
+
+ arrayEach(props || source, function(srcValue, key) {
+ if (props) {
+ key = srcValue;
+ srcValue = source[key];
+ }
+ if (isObject(srcValue)) {
+ stack || (stack = new Stack);
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
}
- return codes;
- };
+ else {
+ var newValue = customizer
+ ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ : undefined;
- I2of5Reader.prototype._verifyCounterLength = function (counters) {
- return counters.length % 10 === 0;
- };
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ });
+ }
- I2of5Reader.prototype._decode = function () {
- var startInfo,
- endInfo,
- self = this,
- code,
- result = [],
- decodedCodes = [],
- counters;
+ module.e = baseMerge;
+
+
+/***/ },
+/* 100 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assignMergeValue = __webpack_require__(34),
+ baseClone = __webpack_require__(91),
+ copyArray = __webpack_require__(41),
+ isArguments = __webpack_require__(24),
+ isArray = __webpack_require__(4),
+ isArrayLikeObject = __webpack_require__(26),
+ isFunction = __webpack_require__(16),
+ isObject = __webpack_require__(2),
+ isPlainObject = __webpack_require__(141),
+ isTypedArray = __webpack_require__(44),
+ toPlainObject = __webpack_require__(146);
- startInfo = self._findStart();
- if (!startInfo) {
- return null;
- }
- decodedCodes.push(startInfo);
+ /**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged counterparts.
+ */
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = object[key],
+ srcValue = source[key],
+ stacked = stack.get(srcValue);
- endInfo = self._findEnd();
- if (!endInfo) {
- return null;
- }
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
- counters = self._fillCounters(startInfo.end, endInfo.start, false);
- if (!self._verifyCounterLength(counters)) {
- return null;
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ newValue = srcValue;
+ if (isArray(srcValue) || isTypedArray(srcValue)) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else {
+ isCommon = false;
+ newValue = baseClone(srcValue, !customizer);
+ }
}
- code = self._decodePayload(counters, result, decodedCodes);
- if (!code) {
- return null;
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ isCommon = false;
+ newValue = baseClone(srcValue, !customizer);
+ }
+ else {
+ newValue = objValue;
+ }
}
- if (result.length % 2 !== 0 || result.length < 6) {
- return null;
+ else {
+ isCommon = false;
}
+ }
+ stack.set(srcValue, newValue);
- decodedCodes.push(endInfo);
- return {
- code: result.join(""),
- start: startInfo.start,
- end: endInfo.end,
- startInfo: startInfo,
- decodedCodes: decodedCodes
- };
- };
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ }
+ stack['delete'](srcValue);
+ assignMergeValue(object, key, newValue);
+ }
- I2of5Reader.CONFIG_KEYS = {
- normalizeBarSpaceWidth: {
- 'type': 'boolean',
- 'default': false,
- 'description': 'If true, the reader tries to normalize the' + 'width-difference between bars and spaces'
+ module.e = baseMergeDeep;
+
+
+/***/ },
+/* 101 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var arrayReduce = __webpack_require__(19);
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property names.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} props The property names to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, props) {
+ object = Object(object);
+ return arrayReduce(props, function(result, key) {
+ if (key in object) {
+ result[key] = object[key];
}
- };
+ return result;
+ }, {});
+ }
- exports['default'] = I2of5Reader;
- module.exports = exports['default'];
+ module.e = basePick;
+
/***/ },
-/* 35 */
+/* 102 */
/***/ function(module, exports, __webpack_require__) {
- var baseMerge = __webpack_require__(36),
- createAssigner = __webpack_require__(63);
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+ module.e = baseProperty;
+
+
+/***/ },
+/* 103 */
+/***/ function(module, exports, __webpack_require__) {
+
/**
- * Recursively merges own enumerable properties of the source object(s), that
- * don't resolve to `undefined` into the destination object. Subsequent sources
- * overwrite property assignments of previous sources. If `customizer` is
- * provided it's invoked to produce the merged values of the destination and
- * source properties. If `customizer` returns `undefined` merging is handled
- * by the method instead. The `customizer` is bound to `thisArg` and invoked
- * with five arguments: (objectValue, sourceValue, key, object, source).
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
*
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {Object} Returns `object`.
- * @example
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
+
+ module.e = baseTimes;
+
+
+/***/ },
+/* 104 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Checks if `value` is a global object.
*
- * var users = {
- * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
- * };
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+ function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+ }
+
+ module.e = checkGlobal;
+
+
+/***/ },
+/* 105 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Creates a clone of `buffer`.
*
- * var ages = {
- * 'data': [{ 'age': 36 }, { 'age': 40 }]
- * };
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+ function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var result = new buffer.constructor(buffer.length);
+ buffer.copy(result);
+ return result;
+ }
+
+ module.e = cloneBuffer;
+
+
+/***/ },
+/* 106 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var addMapEntry = __webpack_require__(86),
+ arrayReduce = __webpack_require__(19),
+ mapToArray = __webpack_require__(131);
+
+ /**
+ * Creates a clone of `map`.
*
- * _.merge(users, ages);
- * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
+ * @private
+ * @param {Object} map The map to clone.
+ * @returns {Object} Returns the cloned map.
+ */
+ function cloneMap(map) {
+ return arrayReduce(mapToArray(map), addMapEntry, new map.constructor);
+ }
+
+ module.e = cloneMap;
+
+
+/***/ },
+/* 107 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /**
+ * Creates a clone of `regexp`.
*
- * // using a customizer callback
- * var object = {
- * 'fruits': ['apple'],
- * 'vegetables': ['beet']
- * };
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+ function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+ }
+
+ module.e = cloneRegExp;
+
+
+/***/ },
+/* 108 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var addSetEntry = __webpack_require__(87),
+ arrayReduce = __webpack_require__(19),
+ setToArray = __webpack_require__(132);
+
+ /**
+ * Creates a clone of `set`.
*
- * var other = {
- * 'fruits': ['banana'],
- * 'vegetables': ['carrot']
- * };
+ * @private
+ * @param {Object} set The set to clone.
+ * @returns {Object} Returns the cloned set.
+ */
+ function cloneSet(set) {
+ return arrayReduce(setToArray(set), addSetEntry, new set.constructor);
+ }
+
+ module.e = cloneSet;
+
+
+/***/ },
+/* 109 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Symbol = __webpack_require__(83);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+ /**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+ function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+ }
+
+ module.e = cloneSymbol;
+
+
+/***/ },
+/* 110 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var cloneArrayBuffer = __webpack_require__(40);
+
+ /**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+ function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+ }
+
+ module.e = cloneTypedArray;
+
+
+/***/ },
+/* 111 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assignValue = __webpack_require__(35);
+
+ /**
+ * This function is like `copyObject` except that it accepts a function to
+ * customize copied values.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property names to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObjectWith(source, props, object, customizer) {
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : source[key];
+
+ assignValue(object, key, newValue);
+ }
+ return object;
+ }
+
+ module.e = copyObjectWith;
+
+
+/***/ },
+/* 112 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var copyObject = __webpack_require__(20),
+ getSymbols = __webpack_require__(116);
+
+ /**
+ * Copies own symbol properties of `source` to `object`.
*
- * _.merge(object, other, function(a, b) {
- * if (_.isArray(a)) {
- * return a.concat(b);
- * }
- * });
- * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
*/
- var merge = createAssigner(baseMerge);
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
- module.exports = merge;
+ module.e = copySymbols;
/***/ },
-/* 36 */
+/* 113 */
/***/ function(module, exports, __webpack_require__) {
- var arrayEach = __webpack_require__(37),
- baseMergeDeep = __webpack_require__(38),
- isArray = __webpack_require__(46),
- isArrayLike = __webpack_require__(41),
- isObject = __webpack_require__(50),
- isObjectLike = __webpack_require__(45),
- isTypedArray = __webpack_require__(58),
- keys = __webpack_require__(61);
+ var isIterateeCall = __webpack_require__(124),
+ rest = __webpack_require__(47);
/**
- * The base implementation of `_.merge` without support for argument juggling,
- * multiple sources, and `this` binding `customizer` functions.
+ * Creates a function like `_.assign`.
*
* @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates values with source counterparts.
- * @returns {Object} Returns `object`.
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
*/
- function baseMerge(object, source, customizer, stackA, stackB) {
- if (!isObject(object)) {
- return object;
- }
- var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),
- props = isSrcArr ? undefined : keys(source);
+ function createAssigner(assigner) {
+ return rest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
- arrayEach(props || source, function(srcValue, key) {
- if (props) {
- key = srcValue;
- srcValue = source[key];
- }
- if (isObjectLike(srcValue)) {
- stackA || (stackA = []);
- stackB || (stackB = []);
- baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
- }
- else {
- var value = object[key],
- result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
- isCommon = result === undefined;
+ customizer = typeof customizer == 'function'
+ ? (length--, customizer)
+ : undefined;
- if (isCommon) {
- result = srcValue;
- }
- if ((result !== undefined || (isSrcArr && !(key in object))) &&
- (isCommon || (result === result ? (result !== value) : (value === value)))) {
- object[key] = result;
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
}
}
+ return object;
});
- return object;
}
- module.exports = baseMerge;
+ module.e = createAssigner;
/***/ },
-/* 37 */
-/***/ function(module, exports) {
+/* 114 */
+/***/ function(module, exports, __webpack_require__) {
/**
- * A specialized version of `_.forEach` for arrays without support for callback
- * shorthands and `this` binding.
+ * Creates a base function for methods like `_.forIn`.
*
* @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
*/
- function arrayEach(array, iteratee) {
- var index = -1,
- length = array.length;
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
}
- }
- return array;
+ return object;
+ };
}
- module.exports = arrayEach;
+ module.e = createBaseFor;
/***/ },
-/* 38 */
+/* 115 */
/***/ function(module, exports, __webpack_require__) {
- var arrayCopy = __webpack_require__(39),
- isArguments = __webpack_require__(40),
- isArray = __webpack_require__(46),
- isArrayLike = __webpack_require__(41),
- isPlainObject = __webpack_require__(51),
- isTypedArray = __webpack_require__(58),
- toPlainObject = __webpack_require__(59);
+ var baseProperty = __webpack_require__(102);
/**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
*
* @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates values with source counterparts.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
*/
- function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
- var length = stackA.length,
- srcValue = source[key];
-
- while (length--) {
- if (stackA[length] == srcValue) {
- object[key] = stackB[length];
- return;
- }
- }
- var value = object[key],
- result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
- isCommon = result === undefined;
-
- if (isCommon) {
- result = srcValue;
- if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {
- result = isArray(value)
- ? value
- : (isArrayLike(value) ? arrayCopy(value) : []);
- }
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- result = isArguments(value)
- ? toPlainObject(value)
- : (isPlainObject(value) ? value : {});
- }
- else {
- isCommon = false;
- }
- }
- // Add the source value to the stack of traversed objects and associate
- // it with its merged value.
- stackA.push(srcValue);
- stackB.push(result);
-
- if (isCommon) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);
- } else if (result === result ? (result !== value) : (value === value)) {
- object[key] = result;
- }
- }
+ var getLength = baseProperty('length');
- module.exports = baseMergeDeep;
+ module.e = getLength;
/***/ },
-/* 39 */
-/***/ function(module, exports) {
+/* 116 */
+/***/ function(module, exports, __webpack_require__) {
+ /** Built-in value references. */
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+
/**
- * Copies the values of `source` to `array`.
+ * Creates an array of the own symbol properties of `object`.
*
* @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
*/
- function arrayCopy(source, array) {
- var index = -1,
- length = source.length;
-
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
- }
+ var getSymbols = getOwnPropertySymbols || function() {
+ return [];
+ };
- module.exports = arrayCopy;
+ module.e = getSymbols;
/***/ },
-/* 40 */
+/* 117 */
/***/ function(module, exports, __webpack_require__) {
- var isArrayLike = __webpack_require__(41),
- isObjectLike = __webpack_require__(45);
+ var Map = __webpack_require__(3),
+ Set = __webpack_require__(82),
+ WeakMap = __webpack_require__(85);
- /** Used for native method references. */
- var objectProto = Object.prototype;
+ /** `Object#toString` result references. */
+ var mapTag = '[object Map]',
+ objectTag = '[object Object]',
+ setTag = '[object Set]',
+ weakMapTag = '[object WeakMap]';
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- /** Native method references. */
- var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = Function.prototype.toString;
/**
- * Checks if `value` is classified as an `arguments` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
*/
- function isArguments(value) {
- return isObjectLike(value) && isArrayLike(value) &&
- hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
- }
+ var objectToString = objectProto.toString;
- module.exports = isArguments;
-
-
-/***/ },
-/* 41 */
-/***/ function(module, exports, __webpack_require__) {
-
- var getLength = __webpack_require__(42),
- isLength = __webpack_require__(44);
+ /** Used to detect maps, sets, and weakmaps. */
+ var mapCtorString = Map ? funcToString.call(Map) : '',
+ setCtorString = Set ? funcToString.call(Set) : '',
+ weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
/**
- * Checks if `value` is array-like.
+ * Gets the `toStringTag` of `value`.
*
* @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
*/
- function isArrayLike(value) {
- return value != null && isLength(getLength(value));
+ function getTag(value) {
+ return objectToString.call(value);
+ }
+
+ // Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
+ if ((Map && getTag(new Map) != mapTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = objectToString.call(value),
+ Ctor = result == objectTag ? value.constructor : null,
+ ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case mapCtorString: return mapTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
}
- module.exports = isArrayLike;
+ module.e = getTag;
/***/ },
-/* 42 */
+/* 118 */
/***/ function(module, exports, __webpack_require__) {
- var baseProperty = __webpack_require__(43);
+ var hashHas = __webpack_require__(42);
/**
- * Gets the "length" property value of `object`.
- *
- * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
- * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ * Removes `key` and its value from the hash.
*
* @private
- * @param {Object} object The object to query.
- * @returns {*} Returns the "length" value.
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
- var getLength = baseProperty('length');
+ function hashDelete(hash, key) {
+ return hashHas(hash, key) && delete hash[key];
+ }
- module.exports = getLength;
+ module.e = hashDelete;
/***/ },
-/* 43 */
-/***/ function(module, exports) {
+/* 119 */
+/***/ function(module, exports, __webpack_require__) {
+ var nativeCreate = __webpack_require__(14);
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
/**
- * The base implementation of `_.property` without support for deep paths.
+ * Gets the hash value for `key`.
*
* @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
- */
- function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
+ * @param {Object} hash The hash to query.
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(hash, key) {
+ if (nativeCreate) {
+ var result = hash[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
}
- module.exports = baseProperty;
+ module.e = hashGet;
/***/ },
-/* 44 */
-/***/ function(module, exports) {
+/* 120 */
+/***/ function(module, exports, __webpack_require__) {
- /**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
- */
- var MAX_SAFE_INTEGER = 9007199254740991;
+ var nativeCreate = __webpack_require__(14);
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ * Sets the hash `key` to `value`.
*
* @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
*/
- function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ function hashSet(hash, key, value) {
+ hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
}
- module.exports = isLength;
+ module.e = hashSet;
/***/ },
-/* 45 */
-/***/ function(module, exports) {
+/* 121 */
+/***/ function(module, exports, __webpack_require__) {
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
/**
- * Checks if `value` is object-like.
+ * Initializes an array clone.
*
* @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
*/
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
+ function initCloneArray(array) {
+ var length = array.length,
+ result = array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
}
- module.exports = isObjectLike;
+ module.e = initCloneArray;
/***/ },
-/* 46 */
+/* 122 */
/***/ function(module, exports, __webpack_require__) {
- var getNative = __webpack_require__(47),
- isLength = __webpack_require__(44),
- isObjectLike = __webpack_require__(45);
+ var cloneArrayBuffer = __webpack_require__(40),
+ cloneMap = __webpack_require__(106),
+ cloneRegExp = __webpack_require__(107),
+ cloneSet = __webpack_require__(108),
+ cloneSymbol = __webpack_require__(109),
+ cloneTypedArray = __webpack_require__(110);
/** `Object#toString` result references. */
- var arrayTag = '[object Array]';
-
- /** Used for native method references. */
- var objectProto = Object.prototype;
-
- /**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objToString = objectProto.toString;
+ var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
- /* Native method references for those with the same name as other `lodash` methods. */
- var nativeIsArray = getNative(Array, 'isArray');
+ var arrayBufferTag = '[object ArrayBuffer]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
/**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
+ * Initializes an object clone based on its `toStringTag`.
*
- * _.isArray([1, 2, 3]);
- * // => true
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
- * _.isArray(function() { return arguments; }());
- * // => false
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
*/
- var isArray = nativeIsArray || function(value) {
- return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
- };
+ function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return cloneMap(object);
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
- module.exports = isArray;
+ case setTag:
+ return cloneSet(object);
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+ }
+
+ module.e = initCloneByTag;
/***/ },
-/* 47 */
+/* 123 */
/***/ function(module, exports, __webpack_require__) {
- var isNative = __webpack_require__(48);
+ var baseCreate = __webpack_require__(92),
+ isPrototype = __webpack_require__(23);
+
+ /** Built-in value references. */
+ var getPrototypeOf = Object.getPrototypeOf;
/**
- * Gets the native function at `key` of `object`.
+ * Initializes an object clone.
*
* @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
*/
- function getNative(object, key) {
- var value = object == null ? undefined : object[key];
- return isNative(value) ? value : undefined;
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototypeOf(object))
+ : {};
}
- module.exports = getNative;
+ module.e = initCloneObject;
/***/ },
-/* 48 */
+/* 124 */
/***/ function(module, exports, __webpack_require__) {
- var isFunction = __webpack_require__(49),
- isObjectLike = __webpack_require__(45);
-
- /** Used to detect host constructors (Safari > 5). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
- /** Used for native method references. */
- var objectProto = Object.prototype;
-
- /** Used to resolve the decompiled source of functions. */
- var fnToString = Function.prototype.toString;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
-
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' +
- fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
- );
+ var eq = __webpack_require__(15),
+ isArrayLike = __webpack_require__(25),
+ isIndex = __webpack_require__(22),
+ isObject = __webpack_require__(2);
/**
- * Checks if `value` is a native function.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
- * @example
+ * Checks if the given arguments are from an iteratee call.
*
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
*/
- function isNative(value) {
- if (value == null) {
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
return false;
}
- if (isFunction(value)) {
- return reIsNative.test(fnToString.call(value));
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)) {
+ return eq(object[index], value);
}
- return isObjectLike(value) && reIsHostCtor.test(value);
+ return false;
}
- module.exports = isNative;
+ module.e = isIterateeCall;
/***/ },
-/* 49 */
+/* 125 */
/***/ function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(50);
-
- /** `Object#toString` result references. */
- var funcTag = '[object Function]';
-
- /** Used for native method references. */
- var objectProto = Object.prototype;
-
- /**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objToString = objectProto.toString;
-
/**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
+ * Converts `iterator` to an array.
*
- * _.isFunction(/abc/);
- * // => false
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
*/
- function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in older versions of Chrome and Safari which return 'function' for regexes
- // and Safari 8 which returns 'object' for typed array constructors.
- return isObject(value) && objToString.call(value) == funcTag;
+ function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
}
- module.exports = isFunction;
+ module.e = iteratorToArray;
/***/ },
-/* 50 */
-/***/ function(module, exports) {
+/* 126 */
+/***/ function(module, exports, __webpack_require__) {
+ var Hash = __webpack_require__(79),
+ Map = __webpack_require__(3);
+
/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
+ * Removes all key-value entries from the map.
*
- * _.isObject(1);
- * // => false
- */
- function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': Map ? new Map : [],
+ 'string': new Hash
+ };
}
- module.exports = isObject;
+ module.e = mapClear;
/***/ },
-/* 51 */
+/* 127 */
/***/ function(module, exports, __webpack_require__) {
- var baseForIn = __webpack_require__(52),
- isArguments = __webpack_require__(40),
- isObjectLike = __webpack_require__(45);
-
- /** `Object#toString` result references. */
- var objectTag = '[object Object]';
-
- /** Used for native method references. */
- var objectProto = Object.prototype;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
+ var Map = __webpack_require__(3),
+ assocDelete = __webpack_require__(36),
+ hashDelete = __webpack_require__(118),
+ isKeyable = __webpack_require__(13);
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objToString = objectProto.toString;
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapDelete(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
+ }
+ return Map ? data.map['delete'](key) : assocDelete(data.map, key);
+ }
+
+ module.e = mapDelete;
+
+
+/***/ },
+/* 128 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Map = __webpack_require__(3),
+ assocGet = __webpack_require__(37),
+ hashGet = __webpack_require__(119),
+ isKeyable = __webpack_require__(13);
/**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * **Note:** This method assumes objects created by the `Object` constructor
- * have no inherited enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
+ * Gets the map value for `key`.
*
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
- function isPlainObject(value) {
- var Ctor;
-
- // Exit early for non `Object` objects.
- if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) ||
- (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
- return false;
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapGet(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashGet(typeof key == 'string' ? data.string : data.hash, key);
}
- // IE < 9 iterates inherited properties before own properties. If the first
- // iterated property is an object's own property then there are no inherited
- // enumerable properties.
- var result;
- // In most environments an object's own properties are iterated before
- // its inherited properties. If the last iterated property is an object's
- // own property then there are no inherited enumerable properties.
- baseForIn(value, function(subValue, key) {
- result = key;
- });
- return result === undefined || hasOwnProperty.call(value, result);
+ return Map ? data.map.get(key) : assocGet(data.map, key);
}
- module.exports = isPlainObject;
+ module.e = mapGet;
/***/ },
-/* 52 */
+/* 129 */
/***/ function(module, exports, __webpack_require__) {
- var baseFor = __webpack_require__(53),
- keysIn = __webpack_require__(56);
+ var Map = __webpack_require__(3),
+ assocHas = __webpack_require__(38),
+ hashHas = __webpack_require__(42),
+ isKeyable = __webpack_require__(13);
/**
- * The base implementation of `_.forIn` without support for callback
- * shorthands and `this` binding.
+ * Checks if a map value for `key` exists.
*
* @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForIn(object, iteratee) {
- return baseFor(object, iteratee, keysIn);
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapHas(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashHas(typeof key == 'string' ? data.string : data.hash, key);
+ }
+ return Map ? data.map.has(key) : assocHas(data.map, key);
}
- module.exports = baseForIn;
+ module.e = mapHas;
/***/ },
-/* 53 */
+/* 130 */
/***/ function(module, exports, __webpack_require__) {
- var createBaseFor = __webpack_require__(54);
+ var Map = __webpack_require__(3),
+ assocSet = __webpack_require__(39),
+ hashSet = __webpack_require__(120),
+ isKeyable = __webpack_require__(13);
/**
- * The base implementation of `baseForIn` and `baseForOwn` which iterates
- * over `object` properties returned by `keysFunc` invoking `iteratee` for
- * each property. Iteratee functions may exit iteration early by explicitly
- * returning `false`.
+ * Sets the map `key` to `value`.
*
* @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseFor = createBaseFor();
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache object.
+ */
+ function mapSet(key, value) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
+ } else if (Map) {
+ data.map.set(key, value);
+ } else {
+ assocSet(data.map, key, value);
+ }
+ return this;
+ }
- module.exports = baseFor;
+ module.e = mapSet;
/***/ },
-/* 54 */
+/* 131 */
/***/ function(module, exports, __webpack_require__) {
- var toObject = __webpack_require__(55);
-
/**
- * Creates a base function for `_.forIn` or `_.forInRight`.
+ * Converts `map` to an array.
*
* @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the converted array.
*/
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var iterable = toObject(object),
- props = keysFunc(object),
- length = props.length,
- index = fromRight ? length : -1;
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
- while ((fromRight ? index-- : ++index < length)) {
- var key = props[index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
}
- module.exports = createBaseFor;
+ module.e = mapToArray;
/***/ },
-/* 55 */
+/* 132 */
/***/ function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(50);
-
/**
- * Converts `value` to an object if it's not one.
+ * Converts `set` to an array.
*
* @private
- * @param {*} value The value to process.
- * @returns {Object} Returns the object.
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the converted array.
*/
- function toObject(value) {
- return isObject(value) ? value : Object(value);
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
}
- module.exports = toObject;
+ module.e = setToArray;
/***/ },
-/* 56 */
+/* 133 */
/***/ function(module, exports, __webpack_require__) {
- var isArguments = __webpack_require__(40),
- isArray = __webpack_require__(46),
- isIndex = __webpack_require__(57),
- isLength = __webpack_require__(44),
- isObject = __webpack_require__(50);
-
- /** Used for native method references. */
- var objectProto = Object.prototype;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
-
/**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
+ * Removes all key-value entries from the stack.
*
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ * @private
+ * @name clear
+ * @memberOf Stack
*/
- function keysIn(object) {
- if (object == null) {
- return [];
- }
- if (!isObject(object)) {
- object = Object(object);
- }
- var length = object.length;
- length = (length && isLength(length) &&
- (isArray(object) || isArguments(object)) && length) || 0;
-
- var Ctor = object.constructor,
- index = -1,
- isProto = typeof Ctor == 'function' && Ctor.prototype === object,
- result = Array(length),
- skipIndexes = length > 0;
+ function stackClear() {
+ this.__data__ = { 'array': [], 'map': null };
+ }
- while (++index < length) {
- result[index] = (index + '');
- }
- for (var key in object) {
- if (!(skipIndexes && isIndex(key, length)) &&
- !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
+ module.e = stackClear;
+
+
+/***/ },
+/* 134 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assocDelete = __webpack_require__(36);
+
+ /**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function stackDelete(key) {
+ var data = this.__data__,
+ array = data.array;
+
+ return array ? assocDelete(array, key) : data.map['delete'](key);
}
- module.exports = keysIn;
+ module.e = stackDelete;
/***/ },
-/* 57 */
-/***/ function(module, exports) {
+/* 135 */
+/***/ function(module, exports, __webpack_require__) {
- /** Used to detect unsigned integer values. */
- var reIsUint = /^\d+$/;
-
- /**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
- */
- var MAX_SAFE_INTEGER = 9007199254740991;
+ var assocGet = __webpack_require__(37);
/**
- * Checks if `value` is a valid array-like index.
+ * Gets the stack value for `key`.
*
* @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
*/
- function isIndex(value, length) {
- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return value > -1 && value % 1 == 0 && value < length;
+ function stackGet(key) {
+ var data = this.__data__,
+ array = data.array;
+
+ return array ? assocGet(array, key) : data.map.get(key);
}
- module.exports = isIndex;
+ module.e = stackGet;
/***/ },
-/* 58 */
+/* 136 */
/***/ function(module, exports, __webpack_require__) {
- var isLength = __webpack_require__(44),
- isObjectLike = __webpack_require__(45);
+ var assocHas = __webpack_require__(38);
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- weakMapTag = '[object WeakMap]';
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ var data = this.__data__,
+ array = data.array;
- var arrayBufferTag = '[object ArrayBuffer]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
+ return array ? assocHas(array, key) : data.map.has(key);
+ }
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
- typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
- typedArrayTags[dateTag] = typedArrayTags[errorTag] =
- typedArrayTags[funcTag] = typedArrayTags[mapTag] =
- typedArrayTags[numberTag] = typedArrayTags[objectTag] =
- typedArrayTags[regexpTag] = typedArrayTags[setTag] =
- typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+ module.e = stackHas;
+
+
+/***/ },
+/* 137 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var MapCache = __webpack_require__(80),
+ assocSet = __webpack_require__(39);
- /** Used for native method references. */
- var objectProto = Object.prototype;
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objToString = objectProto.toString;
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache object.
+ */
+ function stackSet(key, value) {
+ var data = this.__data__,
+ array = data.array;
+
+ if (array) {
+ if (array.length < (LARGE_ARRAY_SIZE - 1)) {
+ assocSet(array, key, value);
+ } else {
+ data.array = null;
+ data.map = new MapCache(array);
+ }
+ }
+ var map = data.map;
+ if (map) {
+ map.set(key, value);
+ }
+ return this;
+ }
+ module.e = stackSet;
+
+
+/***/ },
+/* 138 */
+/***/ function(module, exports, __webpack_require__) {
+
/**
- * Checks if `value` is classified as a typed array.
+ * Creates a function that returns `value`.
*
* @static
* @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new function.
* @example
*
- * _.isTypedArray(new Uint8Array);
- * // => true
+ * var object = { 'user': 'fred' };
+ * var getter = _.constant(object);
*
- * _.isTypedArray([]);
- * // => false
+ * getter() === object;
+ * // => true
*/
- function isTypedArray(value) {
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
+ function constant(value) {
+ return function() {
+ return value;
+ };
}
- module.exports = isTypedArray;
+ module.e = constant;
/***/ },
-/* 59 */
+/* 139 */
/***/ function(module, exports, __webpack_require__) {
- var baseCopy = __webpack_require__(60),
- keysIn = __webpack_require__(56);
+ /* WEBPACK VAR INJECTION */(function(module) {var constant = __webpack_require__(138),
+ root = __webpack_require__(1);
+
+ /** Used to determine if values are of the language type `Object`. */
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
+
+ /** Detect free variable `exports`. */
+ var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
+ ? exports
+ : undefined;
+
+ /** Detect free variable `module`. */
+ var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
+ ? module
+ : undefined;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = (freeModule && freeModule.exports === freeExports)
+ ? freeExports
+ : undefined;
+
+ /** Built-in value references. */
+ var Buffer = moduleExports ? root.Buffer : undefined;
/**
- * Converts `value` to a plain object flattening inherited enumerable
- * properties of `value` to own properties of the plain object.
+ * Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
+ * _.isBuffer(new Buffer(2));
+ * // => true
*
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
*/
- function toPlainObject(value) {
- return baseCopy(value, keysIn(value));
- }
+ var isBuffer = !Buffer ? constant(false) : function(value) {
+ return value instanceof Buffer;
+ };
- module.exports = toPlainObject;
-
+ module.e = isBuffer;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(48)(module)))
/***/ },
-/* 60 */
-/***/ function(module, exports) {
+/* 140 */
+/***/ function(module, exports, __webpack_require__) {
- /**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property names to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @returns {Object} Returns `object`.
- */
- function baseCopy(source, props, object) {
- object || (object = {});
+ var isFunction = __webpack_require__(16),
+ isHostObject = __webpack_require__(21),
+ isObjectLike = __webpack_require__(7);
- var index = -1,
- length = props.length;
+ /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
- while (++index < length) {
- var key = props[index];
- object[key] = source[key];
- }
- return object;
- }
+ /** Used to detect host constructors (Safari > 5). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
- module.exports = baseCopy;
-
-
-/***/ },
-/* 61 */
-/***/ function(module, exports, __webpack_require__) {
-
- var getNative = __webpack_require__(47),
- isArrayLike = __webpack_require__(41),
- isObject = __webpack_require__(50),
- shimKeys = __webpack_require__(62);
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- /* Native method references for those with the same name as other `lodash` methods. */
- var nativeKeys = getNative(Object, 'keys');
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = Function.prototype.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
/**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
- * for more details.
+ * Checks if `value` is a native function.
*
* @static
* @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
* @example
*
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
+ * _.isNative(Array.prototype.push);
+ * // => true
*
- * _.keys('hi');
- * // => ['0', '1']
+ * _.isNative(_);
+ * // => false
*/
- var keys = !nativeKeys ? shimKeys : function(object) {
- var Ctor = object == null ? undefined : object.constructor;
- if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
- (typeof object != 'function' && isArrayLike(object))) {
- return shimKeys(object);
+ function isNative(value) {
+ if (value == null) {
+ return false;
}
- return isObject(object) ? nativeKeys(object) : [];
- };
+ if (isFunction(value)) {
+ return reIsNative.test(funcToString.call(value));
+ }
+ return isObjectLike(value) &&
+ (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
+ }
- module.exports = keys;
+ module.e = isNative;
/***/ },
-/* 62 */
+/* 141 */
/***/ function(module, exports, __webpack_require__) {
- var isArguments = __webpack_require__(40),
- isArray = __webpack_require__(46),
- isIndex = __webpack_require__(57),
- isLength = __webpack_require__(44),
- keysIn = __webpack_require__(56);
+ var isHostObject = __webpack_require__(21),
+ isObjectLike = __webpack_require__(7);
- /** Used for native method references. */
+ /** `Object#toString` result references. */
+ var objectTag = '[object Object]';
+
+ /** Used for built-in method references. */
var objectProto = Object.prototype;
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = Function.prototype.toString;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
/**
- * A fallback implementation of `Object.keys` which creates an array of the
- * own enumerable property names of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
*/
- function shimKeys(object) {
- var props = keysIn(object),
- propsLength = props.length,
- length = propsLength && object.length;
+ var objectToString = objectProto.toString;
- var allowIndexes = !!length && isLength(length) &&
- (isArray(object) || isArguments(object));
-
- var index = -1,
- result = [];
+ /** Built-in value references. */
+ var getPrototypeOf = Object.getPrototypeOf;
- while (++index < propsLength) {
- var key = props[index];
- if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
- result.push(key);
- }
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ if (!isObjectLike(value) ||
+ objectToString.call(value) != objectTag || isHostObject(value)) {
+ return false;
+ }
+ var proto = getPrototypeOf(value);
+ if (proto === null) {
+ return true;
}
- return result;
+ var Ctor = proto.constructor;
+ return (typeof Ctor == 'function' &&
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
}
- module.exports = shimKeys;
+ module.e = isPlainObject;
/***/ },
-/* 63 */
+/* 142 */
/***/ function(module, exports, __webpack_require__) {
- var bindCallback = __webpack_require__(64),
- isIterateeCall = __webpack_require__(66),
- restParam = __webpack_require__(67);
+ var isArray = __webpack_require__(4),
+ isObjectLike = __webpack_require__(7);
+
+ /** `Object#toString` result references. */
+ var stringTag = '[object String]';
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
/**
- * Creates a `_.assign`, `_.defaults`, or `_.merge` function.
+ * Checks if `value` is classified as a `String` primitive or object.
*
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
*/
- function createAssigner(assigner) {
- return restParam(function(object, sources) {
- var index = -1,
- length = object == null ? 0 : sources.length,
- customizer = length > 2 ? sources[length - 2] : undefined,
- guard = length > 2 ? sources[2] : undefined,
- thisArg = length > 1 ? sources[length - 1] : undefined;
-
- if (typeof customizer == 'function') {
- customizer = bindCallback(customizer, thisArg, 5);
- length -= 2;
- } else {
- customizer = typeof thisArg == 'function' ? thisArg : undefined;
- length -= (customizer ? 1 : 0);
- }
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined : customizer;
- length = 1;
- }
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, customizer);
- }
- }
- return object;
- });
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
}
- module.exports = createAssigner;
+ module.e = isString;
/***/ },
-/* 64 */
+/* 143 */
/***/ function(module, exports, __webpack_require__) {
- var identity = __webpack_require__(65);
+ var baseFlatten = __webpack_require__(93),
+ basePick = __webpack_require__(101),
+ rest = __webpack_require__(47);
/**
- * A specialized version of `baseCallback` which only supports `this` binding
- * and specifying the number of arguments to provide to `func`.
+ * Creates an object composed of the picked `object` properties.
*
- * @private
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {number} [argCount] The number of arguments to provide to `func`.
- * @returns {Function} Returns the callback.
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [props] The property names to pick, specified
+ * individually or in arrays.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
*/
- function bindCallback(func, thisArg, argCount) {
- if (typeof func != 'function') {
- return identity;
- }
- if (thisArg === undefined) {
- return func;
- }
- switch (argCount) {
- case 1: return function(value) {
- return func.call(thisArg, value);
- };
- case 3: return function(value, index, collection) {
- return func.call(thisArg, value, index, collection);
- };
- case 4: return function(accumulator, value, index, collection) {
- return func.call(thisArg, accumulator, value, index, collection);
- };
- case 5: return function(value, other, key, object, source) {
- return func.call(thisArg, value, other, key, object, source);
- };
- }
- return function() {
- return func.apply(thisArg, arguments);
- };
- }
+ var pick = rest(function(object, props) {
+ return object == null ? {} : basePick(object, baseFlatten(props, 1));
+ });
- module.exports = bindCallback;
+ module.e = pick;
/***/ },
-/* 65 */
-/***/ function(module, exports) {
+/* 144 */
+/***/ function(module, exports, __webpack_require__) {
+ var toNumber = __webpack_require__(145);
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308;
+
/**
- * This method returns the first argument provided to it.
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
* @memberOf _
- * @category Utility
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
* @example
*
- * var object = { 'user': 'fred' };
+ * _.toInteger(3);
+ * // => 3
*
- * _.identity(object) === object;
- * // => true
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3');
+ * // => 3
*/
- function identity(value) {
- return value;
+ function toInteger(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ var remainder = value % 1;
+ return value === value ? (remainder ? value - remainder : value) : 0;
}
- module.exports = identity;
+ module.e = toInteger;
/***/ },
-/* 66 */
+/* 145 */
/***/ function(module, exports, __webpack_require__) {
- var isArrayLike = __webpack_require__(41),
- isIndex = __webpack_require__(57),
- isObject = __webpack_require__(50);
+ var isFunction = __webpack_require__(16),
+ isObject = __webpack_require__(2);
+
+ /** Used as references for various `Number` constants. */
+ var NAN = 0 / 0;
+
+ /** Used to match leading and trailing whitespace. */
+ var reTrim = /^\s+|\s+$/g;
+
+ /** Used to detect bad signed hexadecimal string values. */
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+ /** Used to detect binary string values. */
+ var reIsBinary = /^0b[01]+$/i;
+
+ /** Used to detect octal string values. */
+ var reIsOctal = /^0o[0-7]+$/i;
+
+ /** Built-in method references without a dependency on `root`. */
+ var freeParseInt = parseInt;
/**
- * Checks if the provided arguments are from an iteratee call.
+ * Converts `value` to a number.
*
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3);
+ * // => 3
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3');
+ * // => 3
*/
- function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
+ function toNumber(value) {
+ if (isObject(value)) {
+ var other = isFunction(value.valueOf) ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
}
- var type = typeof index;
- if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)) {
- var other = object[index];
- return value === value ? (value === other) : (other !== other);
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
}
- return false;
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
}
- module.exports = isIterateeCall;
+ module.e = toNumber;
/***/ },
-/* 67 */
-/***/ function(module, exports) {
+/* 146 */
+/***/ function(module, exports, __webpack_require__) {
- /** Used as the `TypeError` message for "Functions" methods. */
- var FUNC_ERROR_TEXT = 'Expected a function';
-
- /* Native method references for those with the same name as other `lodash` methods. */
- var nativeMax = Math.max;
+ var copyObject = __webpack_require__(20),
+ keysIn = __webpack_require__(46);
/**
- * Creates a function that invokes `func` with the `this` binding of the
- * created function and arguments from `start` and beyond provided as an array.
- *
- * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).
+ * Converts `value` to a plain object flattening inherited enumerable
+ * properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
- * @category Function
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
* @example
*
- * var say = _.restParam(function(what, names) {
- * return what + ' ' + _.initial(names).join(', ') +
- * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
- * });
+ * function Foo() {
+ * this.b = 2;
+ * }
*
- * say('hello', 'fred', 'barney', 'pebbles');
- * // => 'hello fred, barney, & pebbles'
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
*/
- function restParam(func, start) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- rest = Array(length);
-
- while (++index < length) {
- rest[index] = args[start + index];
- }
- switch (start) {
- case 0: return func.call(this, rest);
- case 1: return func.call(this, args[0], rest);
- case 2: return func.call(this, args[0], args[1], rest);
- }
- var otherArgs = Array(start + 1);
- index = -1;
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = rest;
- return func.apply(this, otherArgs);
- };
+ function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
}
- module.exports = restParam;
+ module.e = toPlainObject;
/***/ },
-/* 68 */
-/***/ function(module, exports) {
+/* 147 */
+/***/ function(module, exports, __webpack_require__) {
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- exports["default"] = (function () {
- var events = {};
-
- function getEvent(eventName) {
- if (!events[eventName]) {
- events[eventName] = {
- subscribers: []
- };
- }
- return events[eventName];
- }
-
- function clearEvents() {
- events = {};
- }
-
- function publishSubscription(subscription, data) {
- if (subscription.async) {
- setTimeout(function () {
- subscription.callback(data);
- }, 4);
- } else {
- subscription.callback(data);
- }
- }
-
- function _subscribe(event, callback, async) {
- var subscription;
-
- if (typeof callback === "function") {
- subscription = {
- callback: callback,
- async: async
- };
- } else {
- subscription = callback;
- if (!subscription.callback) {
- throw "Callback was not specified on options";
- }
- }
-
- getEvent(event).subscribers.push(subscription);
- }
-
- return {
- subscribe: function subscribe(event, callback, async) {
- return _subscribe(event, callback, async);
- },
- publish: function publish(eventName, data) {
- var event = getEvent(eventName),
- subscribers = event.subscribers;
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
+ 'use strict';
- event.subscribers = subscribers.filter(function (subscriber) {
- publishSubscription(subscriber, data);
- return !subscriber.once;
- });
- },
- once: function once(event, callback, async) {
- _subscribe(event, {
- callback: callback,
- async: async,
- once: true
- });
- },
- unsubscribe: function unsubscribe(eventName, callback) {
- var event;
+ // Shimming starts here.
+ (function() {
+ // Utils.
+ var logging = __webpack_require__(0).log;
+ var browserDetails = __webpack_require__(0).browserDetails;
+ // Export to the adapter global object visible in the browser.
+ module.e.browserDetails = browserDetails;
+ module.e.extractVersion = __webpack_require__(0).extractVersion;
+ module.e.disableLog = __webpack_require__(0).disableLog;
+
+ // Uncomment if you do not want any logging at all including the switch
+ // statement below. Can also be turned off in the browser via
+ // adapter.disableLog(true) but then logging from the switch statement below
+ // will still appear.
+ //require('./utils').disableLog(true);
+
+ // Browser shims.
+ var chromeShim = __webpack_require__(148) || null;
+ var edgeShim = __webpack_require__(151) || null;
+ var firefoxShim = __webpack_require__(152) || null;
+
+ // Shim browser if found.
+ switch (browserDetails.browser) {
+ case 'chrome':
+ if (!chromeShim || !chromeShim.shimPeerConnection) {
+ logging('Chrome shim is not included in this adapter release.');
+ return;
+ }
+ logging('adapter.js shimming chrome!');
+ // Export to the adapter global object visible in the browser.
+ module.e.browserShim = chromeShim;
+
+ chromeShim.shimGetUserMedia();
+ chromeShim.shimSourceObject();
+ chromeShim.shimPeerConnection();
+ chromeShim.shimOnTrack();
+ break;
+ case 'edge':
+ if (!edgeShim || !edgeShim.shimPeerConnection) {
+ logging('MS edge shim is not included in this adapter release.');
+ return;
+ }
+ logging('adapter.js shimming edge!');
+ // Export to the adapter global object visible in the browser.
+ module.e.browserShim = edgeShim;
- if (eventName) {
- event = getEvent(eventName);
- if (event && callback) {
- event.subscribers = event.subscribers.filter(function (subscriber) {
- return subscriber.callback !== callback;
- });
- } else {
- event.subscribers = [];
- }
- } else {
- clearEvents();
- }
- }
- };
+ edgeShim.shimPeerConnection();
+ break;
+ case 'firefox':
+ if (!firefoxShim || !firefoxShim.shimPeerConnection) {
+ logging('Firefox shim is not included in this adapter release.');
+ return;
+ }
+ logging('adapter.js shimming firefox!');
+ // Export to the adapter global object visible in the browser.
+ module.e.browserShim = firefoxShim;
+
+ firefoxShim.shimGetUserMedia();
+ firefoxShim.shimSourceObject();
+ firefoxShim.shimPeerConnection();
+ firefoxShim.shimOnTrack();
+ break;
+ default:
+ logging('Unsupported browser!');
+ }
})();
-
- module.exports = exports["default"];
+
/***/ },
-/* 69 */
+/* 148 */
/***/ function(module, exports, __webpack_require__) {
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
'use strict';
+ var logging = __webpack_require__(0).log;
+ var browserDetails = __webpack_require__(0).browserDetails;
+
+ var chromeShim = {
+ shimOnTrack: function() {
+ if (typeof window === 'object' && window.RTCPeerConnection && !('ontrack' in
+ window.RTCPeerConnection.prototype)) {
+ Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {
+ get: function() { return this._ontrack; },
+ set: function(f) {
+ var self = this;
+ if (this._ontrack) {
+ this.removeEventListener('track', this._ontrack);
+ this.removeEventListener('addstream', this._ontrackpoly);
+ }
+ this.addEventListener('track', this._ontrack = f);
+ this.addEventListener('addstream', this._ontrackpoly = function(e) {
+ // onaddstream does not fire when a track is added to an existing stream.
+ // but stream.onaddtrack is implemented so we use that
+ e.stream.addEventListener('addtrack', function(te) {
+ var event = new Event('track');
+ event.track = te.track;
+ event.receiver = {track: te.track};
+ event.streams = [e.stream];
+ self.dispatchEvent(event);
+ });
+ e.stream.getTracks().forEach(function(track) {
+ var event = new Event('track');
+ event.track = track;
+ event.receiver = {track: track};
+ event.streams = [e.stream];
+ this.dispatchEvent(event);
+ }.bind(this));
+ }.bind(this));
+ }
+ });
+ }
+ },
+
+ shimSourceObject: function() {
+ if (typeof window === 'object') {
+ if (window.HTMLMediaElement &&
+ !('srcObject' in window.HTMLMediaElement.prototype)) {
+ // Shim the srcObject property, once, when HTMLMediaElement is found.
+ Object.defineProperty(window.HTMLMediaElement.prototype, 'srcObject', {
+ get: function() {
+ return this._srcObject;
+ },
+ set: function(stream) {
+ var self = this;
+ // Use _srcObject as a private property for this shim
+ this._srcObject = stream;
+ if (this.src) {
+ URL.revokeObjectURL(this.src);
+ }
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- var merge = __webpack_require__(35);
+ if (!stream) {
+ this.src = '';
+ return;
+ }
+ this.src = URL.createObjectURL(stream);
+ // We need to recreate the blob url when a track is added or removed.
+ // Doing it manually since we want to avoid a recursion.
+ stream.addEventListener('addtrack', function() {
+ if (self.src) {
+ URL.revokeObjectURL(self.src);
+ }
+ self.src = URL.createObjectURL(stream);
+ });
+ stream.addEventListener('removetrack', function() {
+ if (self.src) {
+ URL.revokeObjectURL(self.src);
+ }
+ self.src = URL.createObjectURL(stream);
+ });
+ }
+ });
+ }
+ }
+ },
- var streamRef, loadedDataHandler;
+ shimPeerConnection: function() {
+ // The RTCPeerConnection object.
+ window.RTCPeerConnection = function(pcConfig, pcConstraints) {
+ // Translate iceTransportPolicy to iceTransports,
+ // see https://code.google.com/p/webrtc/issues/detail?id=4869
+ logging('PeerConnection');
+ if (pcConfig && pcConfig.iceTransportPolicy) {
+ pcConfig.iceTransports = pcConfig.iceTransportPolicy;
+ }
- /**
- * Wraps browser-specific getUserMedia
- * @param {Object} constraints
- * @param {Object} success Callback
- * @param {Object} failure Callback
- */
- function getUserMedia(constraints, success, failure) {
- if (typeof navigator.getUserMedia !== 'undefined') {
- navigator.getUserMedia(constraints, function (stream) {
- streamRef = stream;
- var videoSrc = window.URL && window.URL.createObjectURL(stream) || stream;
- success.apply(null, [videoSrc]);
- }, failure);
- } else {
- failure(new TypeError("getUserMedia not available"));
- }
- }
+ var pc = new webkitRTCPeerConnection(pcConfig, pcConstraints); // jscs:ignore requireCapitalizedConstructors
+ var origGetStats = pc.getStats.bind(pc);
+ pc.getStats = function(selector, successCallback, errorCallback) { // jshint ignore: line
+ var self = this;
+ var args = arguments;
+
+ // If selector is a function then we are in the old style stats so just
+ // pass back the original getStats format to avoid breaking old users.
+ if (arguments.length > 0 && typeof selector === 'function') {
+ return origGetStats(selector, successCallback);
+ }
+
+ var fixChromeStats_ = function(response) {
+ var standardReport = {};
+ var reports = response.result();
+ reports.forEach(function(report) {
+ var standardStats = {
+ id: report.id,
+ timestamp: report.timestamp,
+ type: report.type
+ };
+ report.names().forEach(function(name) {
+ standardStats[name] = report.stat(name);
+ });
+ standardReport[standardStats.id] = standardStats;
+ });
- function loadedData(video, callback) {
- var attempts = 10;
+ return standardReport;
+ };
- function checkVideo() {
- if (attempts > 0) {
- if (video.videoWidth > 0 && video.videoHeight > 0) {
- if (true) {
- console.log(video.videoWidth + "px x " + video.videoHeight + "px");
- }
- callback();
- } else {
- window.setTimeout(checkVideo, 500);
- }
- } else {
- callback('Unable to play video stream. Is webcam working?');
+ if (arguments.length >= 2) {
+ var successCallbackWrapper_ = function(response) {
+ args[1](fixChromeStats_(response));
+ };
+
+ return origGetStats.apply(this, [successCallbackWrapper_, arguments[0]]);
}
- attempts--;
- }
- checkVideo();
- }
- /**
- * Tries to attach the camera-stream to a given video-element
- * and calls the callback function when the content is ready
- * @param {Object} constraints
- * @param {Object} video
- * @param {Object} callback
- */
- function initCamera(constraints, video, callback) {
- getUserMedia(constraints, function (src) {
- video.src = src;
- if (loadedDataHandler) {
- video.removeEventListener("loadeddata", loadedDataHandler, false);
+ // promise-support
+ return new Promise(function(resolve, reject) {
+ if (args.length === 1 && selector === null) {
+ origGetStats.apply(self, [
+ function(response) {
+ resolve.apply(null, [fixChromeStats_(response)]);
+ }, reject]);
+ } else {
+ origGetStats.apply(self, [resolve, reject]);
+ }
+ });
+ };
+
+ return pc;
+ };
+ window.RTCPeerConnection.prototype = webkitRTCPeerConnection.prototype;
+
+ // wrap static methods. Currently just generateCertificate.
+ if (webkitRTCPeerConnection.generateCertificate) {
+ Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {
+ get: function() {
+ if (arguments.length) {
+ return webkitRTCPeerConnection.generateCertificate.apply(null,
+ arguments);
+ } else {
+ return webkitRTCPeerConnection.generateCertificate;
+ }
+ }
+ });
+ }
+
+ // add promise support
+ ['createOffer', 'createAnswer'].forEach(function(method) {
+ var nativeMethod = webkitRTCPeerConnection.prototype[method];
+ webkitRTCPeerConnection.prototype[method] = function() {
+ var self = this;
+ if (arguments.length < 1 || (arguments.length === 1 &&
+ typeof(arguments[0]) === 'object')) {
+ var opts = arguments.length === 1 ? arguments[0] : undefined;
+ return new Promise(function(resolve, reject) {
+ nativeMethod.apply(self, [resolve, reject, opts]);
+ });
+ } else {
+ return nativeMethod.apply(this, arguments);
}
- loadedDataHandler = loadedData.bind(null, video, callback);
- video.addEventListener('loadeddata', loadedDataHandler, false);
- video.play();
- }, function (e) {
- callback(e);
+ };
});
- }
-
- /**
- * Normalizes the incoming constraints to satisfy the current browser
- * @param config
- * @param cb Callback which is called whenever constraints are created
- * @returns {*}
- */
- function normalizeConstraints(config, cb) {
- var constraints = {
- audio: false,
- video: true
- },
- videoConstraints = merge({
- width: 640,
- height: 480,
- minAspectRatio: 0,
- maxAspectRatio: 100,
- facing: "environment"
- }, config);
- if (typeof MediaStreamTrack !== 'undefined' && typeof MediaStreamTrack.getSources !== 'undefined') {
- MediaStreamTrack.getSources(function (sourceInfos) {
- var videoSourceId;
- for (var i = 0; i < sourceInfos.length; ++i) {
- var sourceInfo = sourceInfos[i];
- if (sourceInfo.kind === "video" && sourceInfo.facing === videoConstraints.facing) {
- videoSourceId = sourceInfo.id;
+ ['setLocalDescription', 'setRemoteDescription',
+ 'addIceCandidate'].forEach(function(method) {
+ var nativeMethod = webkitRTCPeerConnection.prototype[method];
+ webkitRTCPeerConnection.prototype[method] = function() {
+ var args = arguments;
+ var self = this;
+ return new Promise(function(resolve, reject) {
+ nativeMethod.apply(self, [args[0],
+ function() {
+ resolve();
+ if (args.length >= 2) {
+ args[1].apply(null, []);
}
- }
- constraints.video = {
- mandatory: {
- minWidth: videoConstraints.width,
- minHeight: videoConstraints.height,
- minAspectRatio: videoConstraints.minAspectRatio,
- maxAspectRatio: videoConstraints.maxAspectRatio
- },
- optional: [{
- sourceId: videoSourceId
- }]
- };
- return cb(constraints);
+ },
+ function(err) {
+ reject(err);
+ if (args.length >= 3) {
+ args[2].apply(null, [err]);
+ }
+ }]
+ );
});
+ };
+ });
+ },
+
+ // Attach a media stream to an element.
+ attachMediaStream: function(element, stream) {
+ logging('DEPRECATED, attachMediaStream will soon be removed.');
+ if (browserDetails.version >= 43) {
+ element.srcObject = stream;
+ } else if (typeof element.src !== 'undefined') {
+ element.src = URL.createObjectURL(stream);
} else {
- constraints.video = {
- mediaSource: "camera",
- width: { min: videoConstraints.width, max: videoConstraints.width },
- height: { min: videoConstraints.height, max: videoConstraints.height },
- require: ["width", "height"]
- };
- return cb(constraints);
+ logging('Error attaching stream to element.');
}
- }
+ },
- /**
- * Requests the back-facing camera of the user. The callback is called
- * whenever the stream is ready to be consumed, or if an error occures.
- * @param {Object} video
- * @param {Object} callback
- */
- function _request(video, videoConstraints, callback) {
- normalizeConstraints(videoConstraints, function (constraints) {
- initCamera(constraints, video, callback);
- });
+ reattachMediaStream: function(to, from) {
+ logging('DEPRECATED, reattachMediaStream will soon be removed.');
+ if (browserDetails.version >= 43) {
+ to.srcObject = from.srcObject;
+ } else {
+ to.src = from.src;
+ }
+ }
}
- exports['default'] = {
- request: function request(video, constraints, callback) {
- _request(video, constraints, callback);
- },
- release: function release() {
- var tracks = streamRef && streamRef.getVideoTracks();
- if (tracks && tracks.length) {
- tracks[0].stop();
- }
- streamRef = null;
- }
+
+ // Expose public methods.
+ module.e = {
+ shimOnTrack: chromeShim.shimOnTrack,
+ shimSourceObject: chromeShim.shimSourceObject,
+ shimPeerConnection: chromeShim.shimPeerConnection,
+ shimGetUserMedia: __webpack_require__(149),
+ attachMediaStream: chromeShim.attachMediaStream,
+ reattachMediaStream: chromeShim.reattachMediaStream
};
- module.exports = exports['default'];
+
/***/ },
-/* 70 */
+/* 149 */
/***/ function(module, exports, __webpack_require__) {
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
'use strict';
+ var logging = __webpack_require__(0).log;
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var _commonImage_debug = __webpack_require__(19);
-
- var _commonImage_debug2 = _interopRequireDefault(_commonImage_debug);
-
- function contains(codeResult, list) {
- if (list) {
- return list.some(function (item) {
- return Object.keys(item).every(function (key) {
- return item[key] === codeResult[key];
- });
+ // Expose public methods.
+ module.e = function() {
+ var constraintsToChrome_ = function(c) {
+ if (typeof c !== 'object' || c.mandatory || c.optional) {
+ return c;
+ }
+ var cc = {};
+ Object.keys(c).forEach(function(key) {
+ if (key === 'require' || key === 'advanced' || key === 'mediaSource') {
+ return;
+ }
+ var r = (typeof c[key] === 'object') ? c[key] : {ideal: c[key]};
+ if (r.exact !== undefined && typeof r.exact === 'number') {
+ r.min = r.max = r.exact;
+ }
+ var oldname_ = function(prefix, name) {
+ if (prefix) {
+ return prefix + name.charAt(0).toUpperCase() + name.slice(1);
+ }
+ return (name === 'deviceId') ? 'sourceId' : name;
+ };
+ if (r.ideal !== undefined) {
+ cc.optional = cc.optional || [];
+ var oc = {};
+ if (typeof r.ideal === 'number') {
+ oc[oldname_('min', key)] = r.ideal;
+ cc.optional.push(oc);
+ oc = {};
+ oc[oldname_('max', key)] = r.ideal;
+ cc.optional.push(oc);
+ } else {
+ oc[oldname_('', key)] = r.ideal;
+ cc.optional.push(oc);
+ }
+ }
+ if (r.exact !== undefined && typeof r.exact !== 'number') {
+ cc.mandatory = cc.mandatory || {};
+ cc.mandatory[oldname_('', key)] = r.exact;
+ } else {
+ ['min', 'max'].forEach(function(mix) {
+ if (r[mix] !== undefined) {
+ cc.mandatory = cc.mandatory || {};
+ cc.mandatory[oldname_(mix, key)] = r[mix];
+ }
});
+ }
+ });
+ if (c.advanced) {
+ cc.optional = (cc.optional || []).concat(c.advanced);
}
- return false;
- }
+ return cc;
+ };
- function passesFilter(codeResult, filter) {
- if (typeof filter === 'function') {
- return filter(codeResult);
+ var getUserMedia_ = function(constraints, onSuccess, onError) {
+ if (constraints.audio) {
+ constraints.audio = constraintsToChrome_(constraints.audio);
}
- return true;
- }
+ if (constraints.video) {
+ constraints.video = constraintsToChrome_(constraints.video);
+ }
+ logging('chrome: ' + JSON.stringify(constraints));
+ return navigator.webkitGetUserMedia(constraints, onSuccess, onError);
+ };
+ navigator.getUserMedia = getUserMedia_;
- exports['default'] = {
- create: function create(config) {
- var canvas = document.createElement("canvas"),
- ctx = canvas.getContext("2d"),
- results = [],
- capacity = config.capacity || 20,
- capture = config.capture === true;
+ // Returns the result of getUserMedia as a Promise.
+ var getUserMediaPromise_ = function(constraints) {
+ return new Promise(function(resolve, reject) {
+ navigator.getUserMedia(constraints, resolve, reject);
+ });
+ }
- function matchesConstraints(codeResult) {
- return capacity && codeResult && !contains(codeResult, config.blacklist) && passesFilter(codeResult, config.filter);
- }
+ if (!navigator.mediaDevices) {
+ navigator.mediaDevices = {getUserMedia: getUserMediaPromise_,
+ enumerateDevices: function() {
+ return new Promise(function(resolve) {
+ var kinds = {audio: 'audioinput', video: 'videoinput'};
+ return MediaStreamTrack.getSources(function(devices) {
+ resolve(devices.map(function(device) {
+ return {label: device.label,
+ kind: kinds[device.kind],
+ deviceId: device.id,
+ groupId: ''};
+ }));
+ });
+ });
+ }};
+ }
- return {
- addResult: function addResult(data, imageSize, codeResult) {
- var result = {};
+ // A shim for getUserMedia method on the mediaDevices object.
+ // TODO(KaptenJansson) remove once implemented in Chrome stable.
+ if (!navigator.mediaDevices.getUserMedia) {
+ navigator.mediaDevices.getUserMedia = function(constraints) {
+ return getUserMediaPromise_(constraints);
+ };
+ } else {
+ // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia
+ // function which returns a Promise, it does not accept spec-style
+ // constraints.
+ var origGetUserMedia = navigator.mediaDevices.getUserMedia.
+ bind(navigator.mediaDevices);
+ navigator.mediaDevices.getUserMedia = function(c) {
+ if (c) {
+ logging('spec: ' + JSON.stringify(c)); // whitespace for alignment
+ c.audio = constraintsToChrome_(c.audio);
+ c.video = constraintsToChrome_(c.video);
+ logging('chrome: ' + JSON.stringify(c));
+ }
+ return origGetUserMedia(c);
+ }.bind(this);
+ }
- if (matchesConstraints(codeResult)) {
- capacity--;
- result.codeResult = codeResult;
- if (capture) {
- canvas.width = imageSize.x;
- canvas.height = imageSize.y;
- _commonImage_debug2['default'].drawImage(data, imageSize, ctx);
- result.frame = canvas.toDataURL();
- }
- results.push(result);
- }
- },
- getResults: function getResults() {
- return results;
- }
- };
- }
+ // Dummy devicechange event methods.
+ // TODO(KaptenJansson) remove once implemented in Chrome stable.
+ if (typeof navigator.mediaDevices.addEventListener === 'undefined') {
+ navigator.mediaDevices.addEventListener = function() {
+ logging('Dummy mediaDevices.addEventListener called.');
+ };
+ }
+ if (typeof navigator.mediaDevices.removeEventListener === 'undefined') {
+ navigator.mediaDevices.removeEventListener = function() {
+ logging('Dummy mediaDevices.removeEventListener called.');
+ };
+ }
};
- module.exports = exports['default'];
+
/***/ },
-/* 71 */
+/* 150 */
/***/ function(module, exports, __webpack_require__) {
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
'use strict';
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- var config = undefined;
+ // SDP helpers.
+ var SDPUtils = {};
- if (true) {
- config = __webpack_require__(72);
- } else if (ENV.node) {
- config = require('./config.node.js');
- } else {
- config = require('./config.prod.js');
- }
+ // Generate an alphanumeric identifier for cname or mids.
+ // TODO: use UUIDs instead? https://gist.github.com/jed/982883
+ SDPUtils.generateIdentifier = function() {
+ return Math.random().toString(36).substr(2, 10);
+ };
- exports['default'] = config;
- module.exports = exports['default'];
-
-/***/ },
-/* 72 */
-/***/ function(module, exports) {
-
- "use strict";
+ // The RTCP CNAME used by all peerconnections from the same JS.
+ SDPUtils.localCName = SDPUtils.generateIdentifier();
- module.exports = {
- inputStream: {
- name: "Live",
- type: "LiveStream",
- constraints: {
- width: 640,
- height: 480,
- minAspectRatio: 0,
- maxAspectRatio: 100,
- facing: "environment" // or user
- },
- area: {
- top: "0%",
- right: "0%",
- left: "0%",
- bottom: "0%"
- },
- singleChannel: false // true: only the red color-channel is read
- },
- locate: true,
- numOfWorkers: 0,
- decoder: {
- readers: ['code_128_reader'],
- debug: {
- drawBoundingBox: false,
- showFrequency: false,
- drawScanline: false,
- showPattern: false
- }
- },
- locator: {
- halfSample: true,
- patchSize: "medium", // x-small, small, medium, large, x-large
- debug: {
- showCanvas: false,
- showPatches: false,
- showFoundPatches: false,
- showSkeleton: false,
- showLabels: false,
- showPatchLabels: false,
- showRemainingPatchLabels: false,
- boxFromPatches: {
- showTransformed: false,
- showTransformedBox: false,
- showBB: false
- }
- }
+
+ // Splits SDP into lines, dealing with both CRLF and LF.
+ SDPUtils.splitLines = function(blob) {
+ return blob.trim().split('\n').map(function(line) {
+ return line.trim();
+ });
+ };
+ // Splits SDP into sessionpart and mediasections. Ensures CRLF.
+ SDPUtils.splitSections = function(blob) {
+ var parts = blob.split('\r\nm=');
+ return parts.map(function(part, index) {
+ return (index > 0 ? 'm=' + part : part).trim() + '\r\n';
+ });
+ };
+
+ // Returns lines that start with a certain prefix.
+ SDPUtils.matchPrefix = function(blob, prefix) {
+ return SDPUtils.splitLines(blob).filter(function(line) {
+ return line.indexOf(prefix) === 0;
+ });
+ };
+
+ // Parses an ICE candidate line. Sample input:
+ // candidate:702786350 2 udp 41819902 8.8.8.8 60769 typ relay raddr 8.8.8.8 rport 55996"
+ SDPUtils.parseCandidate = function(line) {
+ var parts;
+ // Parse both variants.
+ if (line.indexOf('a=candidate:') === 0) {
+ parts = line.substring(12).split(' ');
+ } else {
+ parts = line.substring(10).split(' ');
+ }
+
+ var candidate = {
+ foundation: parts[0],
+ component: parts[1],
+ protocol: parts[2].toLowerCase(),
+ priority: parseInt(parts[3], 10),
+ ip: parts[4],
+ port: parseInt(parts[5], 10),
+ // skip parts[6] == 'typ'
+ type: parts[7]
+ };
+
+ for (var i = 8; i < parts.length; i += 2) {
+ switch (parts[i]) {
+ case 'raddr':
+ candidate.relatedAddress = parts[i + 1];
+ break;
+ case 'rport':
+ candidate.relatedPort = parseInt(parts[i + 1], 10);
+ break;
+ case 'tcptype':
+ candidate.tcpType = parts[i + 1];
+ break;
+ default: // Unknown extensions are silently ignored.
+ break;
}
+ }
+ return candidate;
+ };
+
+ // Translates a candidate object into SDP candidate attribute.
+ SDPUtils.writeCandidate = function(candidate) {
+ var sdp = [];
+ sdp.push(candidate.foundation);
+ sdp.push(candidate.component);
+ sdp.push(candidate.protocol.toUpperCase());
+ sdp.push(candidate.priority);
+ sdp.push(candidate.ip);
+ sdp.push(candidate.port);
+
+ var type = candidate.type;
+ sdp.push('typ');
+ sdp.push(type);
+ if (type !== 'host' && candidate.relatedAddress &&
+ candidate.relatedPort) {
+ sdp.push('raddr');
+ sdp.push(candidate.relatedAddress); // was: relAddr
+ sdp.push('rport');
+ sdp.push(candidate.relatedPort); // was: relPort
+ }
+ if (candidate.tcpType && candidate.protocol.toLowerCase() === 'tcp') {
+ sdp.push('tcptype');
+ sdp.push(candidate.tcpType);
+ }
+ return 'candidate:' + sdp.join(' ');
};
-
-/***/ },
-/* 73 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
+ // Parses an rtpmap line, returns RTCRtpCoddecParameters. Sample input:
+ // a=rtpmap:111 opus/48000/2
+ SDPUtils.parseRtpMap = function(line) {
+ var parts = line.substr(9).split(' ');
+ var parsed = {
+ payloadType: parseInt(parts.shift(), 10) // was: id
+ };
+
+ parts = parts[0].split('/');
+
+ parsed.name = parts[0];
+ parsed.clockRate = parseInt(parts[1], 10); // was: clockrate
+ parsed.numChannels = parts.length === 3 ? parseInt(parts[2], 10) : 1; // was: channels
+ return parsed;
+ };
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ // Generate an a=rtpmap line from RTCRtpCodecCapability or RTCRtpCodecParameters.
+ SDPUtils.writeRtpMap = function(codec) {
+ var pt = codec.payloadType;
+ if (codec.preferredPayloadType !== undefined) {
+ pt = codec.preferredPayloadType;
+ }
+ return 'a=rtpmap:' + pt + ' ' + codec.name + '/' + codec.clockRate +
+ (codec.numChannels !== 1 ? '/' + codec.numChannels : '') + '\r\n';
+ };
+
+ // Parses an ftmp line, returns dictionary. Sample input:
+ // a=fmtp:96 vbr=on;cng=on
+ // Also deals with vbr=on; cng=on
+ SDPUtils.parseFmtp = function(line) {
+ var parsed = {};
+ var kv;
+ var parts = line.substr(line.indexOf(' ') + 1).split(';');
+ for (var j = 0; j < parts.length; j++) {
+ kv = parts[j].trim().split('=');
+ parsed[kv[0].trim()] = kv[1];
+ }
+ return parsed;
+ };
+
+ // Generates an a=ftmp line from RTCRtpCodecCapability or RTCRtpCodecParameters.
+ SDPUtils.writeFtmp = function(codec) {
+ var line = '';
+ var pt = codec.payloadType;
+ if (codec.preferredPayloadType !== undefined) {
+ pt = codec.preferredPayloadType;
+ }
+ if (codec.parameters && codec.parameters.length) {
+ var params = [];
+ Object.keys(codec.parameters).forEach(function(param) {
+ params.push(param + '=' + codec.parameters[param]);
+ });
+ line += 'a=fmtp:' + pt + ' ' + params.join(';') + '\r\n';
+ }
+ return line;
+ };
- var _image_loader = __webpack_require__(74);
+ // Parses an rtcp-fb line, returns RTCPRtcpFeedback object. Sample input:
+ // a=rtcp-fb:98 nack rpsi
+ SDPUtils.parseRtcpFb = function(line) {
+ var parts = line.substr(line.indexOf(' ') + 1).split(' ');
+ return {
+ type: parts.shift(),
+ parameter: parts.join(' ')
+ };
+ };
+ // Generate a=rtcp-fb lines from RTCRtpCodecCapability or RTCRtpCodecParameters.
+ SDPUtils.writeRtcpFb = function(codec) {
+ var lines = '';
+ var pt = codec.payloadType;
+ if (codec.preferredPayloadType !== undefined) {
+ pt = codec.preferredPayloadType;
+ }
+ if (codec.rtcpFeedback && codec.rtcpFeedback.length) {
+ // FIXME: special handling for trr-int?
+ codec.rtcpFeedback.forEach(function(fb) {
+ lines += 'a=rtcp-fb:' + pt + ' ' + fb.type + ' ' + fb.parameter +
+ '\r\n';
+ });
+ }
+ return lines;
+ };
+
+ // Parses an RFC 5576 ssrc media attribute. Sample input:
+ // a=ssrc:3735928559 cname:something
+ SDPUtils.parseSsrcMedia = function(line) {
+ var sp = line.indexOf(' ');
+ var parts = {
+ ssrc: line.substr(7, sp - 7),
+ };
+ var colon = line.indexOf(':', sp);
+ if (colon > -1) {
+ parts.attribute = line.substr(sp + 1, colon - sp - 1);
+ parts.value = line.substr(colon + 1);
+ } else {
+ parts.attribute = line.substr(sp + 1);
+ }
+ return parts;
+ };
+
+ // Extracts DTLS parameters from SDP media section or sessionpart.
+ // FIXME: for consistency with other functions this should only
+ // get the fingerprint line as input. See also getIceParameters.
+ SDPUtils.getDtlsParameters = function(mediaSection, sessionpart) {
+ var lines = SDPUtils.splitLines(mediaSection);
+ lines = lines.concat(SDPUtils.splitLines(sessionpart)); // Search in session part, too.
+ var fpLine = lines.filter(function(line) {
+ return line.indexOf('a=fingerprint:') === 0;
+ })[0].substr(14);
+ // Note: a=setup line is ignored since we use the 'auto' role.
+ var dtlsParameters = {
+ role: 'auto',
+ fingerprints: [{
+ algorithm: fpLine.split(' ')[0],
+ value: fpLine.split(' ')[1]
+ }]
+ };
+ return dtlsParameters;
+ };
- var _image_loader2 = _interopRequireDefault(_image_loader);
+ // Serializes DTLS parameters to SDP.
+ SDPUtils.writeDtlsParameters = function(params, setupType) {
+ var sdp = 'a=setup:' + setupType + '\r\n';
+ params.fingerprints.forEach(function(fp) {
+ sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n';
+ });
+ return sdp;
+ };
+ // Parses ICE information from SDP media section or sessionpart.
+ // FIXME: for consistency with other functions this should only
+ // get the ice-ufrag and ice-pwd lines as input.
+ SDPUtils.getIceParameters = function(mediaSection, sessionpart) {
+ var lines = SDPUtils.splitLines(mediaSection);
+ lines = lines.concat(SDPUtils.splitLines(sessionpart)); // Search in session part, too.
+ var iceParameters = {
+ usernameFragment: lines.filter(function(line) {
+ return line.indexOf('a=ice-ufrag:') === 0;
+ })[0].substr(12),
+ password: lines.filter(function(line) {
+ return line.indexOf('a=ice-pwd:') === 0;
+ })[0].substr(10)
+ };
+ return iceParameters;
+ };
- var InputStream = {};
- InputStream.createVideoStream = function (video) {
- var that = {},
- _config = null,
- _eventNames = ['canrecord', 'ended'],
- _eventHandlers = {},
- _calculatedWidth,
- _calculatedHeight,
- _topRight = { x: 0, y: 0 },
- _canvasSize = { x: 0, y: 0 };
+ // Serializes ICE parameters to SDP.
+ SDPUtils.writeIceParameters = function(params) {
+ return 'a=ice-ufrag:' + params.usernameFragment + '\r\n' +
+ 'a=ice-pwd:' + params.password + '\r\n';
+ };
- function initSize() {
- var width = video.videoWidth,
- height = video.videoHeight;
+ // Parses the SDP media section and returns RTCRtpParameters.
+ SDPUtils.parseRtpParameters = function(mediaSection) {
+ var description = {
+ codecs: [],
+ headerExtensions: [],
+ fecMechanisms: [],
+ rtcp: []
+ };
+ var lines = SDPUtils.splitLines(mediaSection);
+ var mline = lines[0].split(' ');
+ for (var i = 3; i < mline.length; i++) { // find all codecs from mline[3..]
+ var pt = mline[i];
+ var rtpmapline = SDPUtils.matchPrefix(
+ mediaSection, 'a=rtpmap:' + pt + ' ')[0];
+ if (rtpmapline) {
+ var codec = SDPUtils.parseRtpMap(rtpmapline);
+ var fmtps = SDPUtils.matchPrefix(
+ mediaSection, 'a=fmtp:' + pt + ' ');
+ // Only the first a=fmtp: is considered.
+ codec.parameters = fmtps.length ? SDPUtils.parseFmtp(fmtps[0]) : {};
+ codec.rtcpFeedback = SDPUtils.matchPrefix(
+ mediaSection, 'a=rtcp-fb:' + pt + ' ')
+ .map(SDPUtils.parseRtcpFb);
+ description.codecs.push(codec);
+ }
+ }
+ // FIXME: parse headerExtensions, fecMechanisms and rtcp.
+ return description;
+ };
- _calculatedWidth = _config.size ? width / height > 1 ? _config.size : Math.floor(width / height * _config.size) : width;
- _calculatedHeight = _config.size ? width / height > 1 ? Math.floor(height / width * _config.size) : _config.size : height;
+ // Generates parts of the SDP media section describing the capabilities / parameters.
+ SDPUtils.writeRtpDescription = function(kind, caps) {
+ var sdp = '';
- _canvasSize.x = _calculatedWidth;
- _canvasSize.y = _calculatedHeight;
+ // Build the mline.
+ sdp += 'm=' + kind + ' ';
+ sdp += caps.codecs.length > 0 ? '9' : '0'; // reject if no codecs.
+ sdp += ' UDP/TLS/RTP/SAVPF ';
+ sdp += caps.codecs.map(function(codec) {
+ if (codec.preferredPayloadType !== undefined) {
+ return codec.preferredPayloadType;
}
+ return codec.payloadType;
+ }).join(' ') + '\r\n';
- that.getRealWidth = function () {
- return video.videoWidth;
- };
-
- that.getRealHeight = function () {
- return video.videoHeight;
- };
+ sdp += 'c=IN IP4 0.0.0.0\r\n';
+ sdp += 'a=rtcp:9 IN IP4 0.0.0.0\r\n';
- that.getWidth = function () {
- return _calculatedWidth;
- };
+ // Add a=rtpmap lines for each codec. Also fmtp and rtcp-fb.
+ caps.codecs.forEach(function(codec) {
+ sdp += SDPUtils.writeRtpMap(codec);
+ sdp += SDPUtils.writeFtmp(codec);
+ sdp += SDPUtils.writeRtcpFb(codec);
+ });
+ // FIXME: add headerExtensions, fecMechanismÅŸ and rtcp.
+ sdp += 'a=rtcp-mux\r\n';
+ return sdp;
+ };
- that.getHeight = function () {
- return _calculatedHeight;
- };
+ SDPUtils.writeSessionBoilerplate = function() {
+ // FIXME: sess-id should be an NTP timestamp.
+ return 'v=0\r\n' +
+ 'o=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\n' +
+ 's=-\r\n' +
+ 't=0 0\r\n';
+ };
- that.setWidth = function (width) {
- _calculatedWidth = width;
- };
+ SDPUtils.writeMediaSection = function(transceiver, caps, type, stream) {
+ var sdp = SDPUtils.writeRtpDescription(transceiver.kind, caps);
- that.setHeight = function (height) {
- _calculatedHeight = height;
- };
+ // Map ICE parameters (ufrag, pwd) to SDP.
+ sdp += SDPUtils.writeIceParameters(
+ transceiver.iceGatherer.getLocalParameters());
- that.setInputStream = function (config) {
- _config = config;
- video.src = typeof config.src !== 'undefined' ? config.src : '';
- };
+ // Map DTLS parameters to SDP.
+ sdp += SDPUtils.writeDtlsParameters(
+ transceiver.dtlsTransport.getLocalParameters(),
+ type === 'offer' ? 'actpass' : 'active');
- that.ended = function () {
- return video.ended;
- };
+ sdp += 'a=mid:' + transceiver.mid + '\r\n';
- that.getConfig = function () {
- return _config;
- };
+ if (transceiver.rtpSender && transceiver.rtpReceiver) {
+ sdp += 'a=sendrecv\r\n';
+ } else if (transceiver.rtpSender) {
+ sdp += 'a=sendonly\r\n';
+ } else if (transceiver.rtpReceiver) {
+ sdp += 'a=recvonly\r\n';
+ } else {
+ sdp += 'a=inactive\r\n';
+ }
- that.setAttribute = function (name, value) {
- video.setAttribute(name, value);
- };
+ // FIXME: for RTX there might be multiple SSRCs. Not implemented in Edge yet.
+ if (transceiver.rtpSender) {
+ var msid = 'msid:' + stream.id + ' ' +
+ transceiver.rtpSender.track.id + '\r\n';
+ sdp += 'a=' + msid;
+ sdp += 'a=ssrc:' + transceiver.sendSsrc + ' ' + msid;
+ }
+ // FIXME: this should be written by writeRtpDescription.
+ sdp += 'a=ssrc:' + transceiver.sendSsrc + ' cname:' +
+ SDPUtils.localCName + '\r\n';
+ return sdp;
+ };
+
+ // Gets the direction from the mediaSection or the sessionpart.
+ SDPUtils.getDirection = function(mediaSection, sessionpart) {
+ // Look for sendrecv, sendonly, recvonly, inactive, default to sendrecv.
+ var lines = SDPUtils.splitLines(mediaSection);
+ for (var i = 0; i < lines.length; i++) {
+ switch (lines[i]) {
+ case 'a=sendrecv':
+ case 'a=sendonly':
+ case 'a=recvonly':
+ case 'a=inactive':
+ return lines[i].substr(2);
+ }
+ }
+ if (sessionpart) {
+ return SDPUtils.getDirection(sessionpart);
+ }
+ return 'sendrecv';
+ };
- that.pause = function () {
- video.pause();
- };
+ // Expose public methods.
+ module.e = SDPUtils;
+
+
+/***/ },
+/* 151 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
+ 'use strict';
- that.play = function () {
- video.play();
- };
+ var SDPUtils = __webpack_require__(150);
+ var logging = __webpack_require__(0).log;
+ var browserDetails = __webpack_require__(0).browserDetails;
+
+ var edgeShim = {
+ shimPeerConnection: function() {
+ if (window.RTCIceGatherer) {
+ // ORTC defines an RTCIceCandidate object but no constructor.
+ // Not implemented in Edge.
+ if (!window.RTCIceCandidate) {
+ window.RTCIceCandidate = function(args) {
+ return args;
+ };
+ }
+ // ORTC does not have a session description object but
+ // other browsers (i.e. Chrome) that will support both PC and ORTC
+ // in the future might have this defined already.
+ if (!window.RTCSessionDescription) {
+ window.RTCSessionDescription = function(args) {
+ return args;
+ };
+ }
+ }
- that.setCurrentTime = function (time) {
- if (_config.type !== "LiveStream") {
- video.currentTime = time;
+ window.RTCPeerConnection = function(config) {
+ var self = this;
+
+ var _eventTarget = document.createDocumentFragment();
+ ['addEventListener', 'removeEventListener', 'dispatchEvent'].forEach(
+ function(method) {
+ self[method] = _eventTarget[method].bind(_eventTarget);
+ });
+
+ this.onicecandidate = null;
+ this.onaddstream = null;
+ this.ontrack = null;
+ this.onremovestream = null;
+ this.onsignalingstatechange = null;
+ this.oniceconnectionstatechange = null;
+ this.onnegotiationneeded = null;
+ this.ondatachannel = null;
+
+ this.localStreams = [];
+ this.remoteStreams = [];
+ this.getLocalStreams = function() { return self.localStreams; };
+ this.getRemoteStreams = function() { return self.remoteStreams; };
+
+ this.localDescription = new RTCSessionDescription({
+ type: '',
+ sdp: ''
+ });
+ this.remoteDescription = new RTCSessionDescription({
+ type: '',
+ sdp: ''
+ });
+ this.signalingState = 'stable';
+ this.iceConnectionState = 'new';
+ this.iceGatheringState = 'new';
+
+ this.iceOptions = {
+ gatherPolicy: 'all',
+ iceServers: []
+ };
+ if (config && config.iceTransportPolicy) {
+ switch (config.iceTransportPolicy) {
+ case 'all':
+ case 'relay':
+ this.iceOptions.gatherPolicy = config.iceTransportPolicy;
+ break;
+ case 'none':
+ // FIXME: remove once implementation and spec have added this.
+ throw new TypeError('iceTransportPolicy "none" not supported');
}
- };
+ }
+ if (config && config.iceServers) {
+ // Edge does not like
+ // 1) stun:
+ // 2) turn: that does not have all of turn:host:port?transport=udp
+ this.iceOptions.iceServers = config.iceServers.filter(function(server) {
+ if (server && server.urls) {
+ server.urls = server.urls.filter(function(url) {
+ return url.indexOf('transport=udp') !== -1;
+ })[0];
+ return true;
+ }
+ return false;
+ });
+ }
- that.addEventListener = function (event, f, bool) {
- if (_eventNames.indexOf(event) !== -1) {
- if (!_eventHandlers[event]) {
- _eventHandlers[event] = [];
- }
- _eventHandlers[event].push(f);
- } else {
- video.addEventListener(event, f, bool);
- }
- };
+ // per-track iceGathers, iceTransports, dtlsTransports, rtpSenders, ...
+ // everything that is needed to describe a SDP m-line.
+ this.transceivers = [];
- that.clearEventHandlers = function () {
- _eventNames.forEach(function (eventName) {
- var handlers = _eventHandlers[eventName];
- if (handlers && handlers.length > 0) {
- handlers.forEach(function (handler) {
- video.removeEventListener(eventName, handler);
- });
- }
- });
+ // since the iceGatherer is currently created in createOffer but we
+ // must not emit candidates until after setLocalDescription we buffer
+ // them in this array.
+ this._localIceCandidatesBuffer = [];
};
- that.trigger = function (eventName, args) {
- var j,
- handlers = _eventHandlers[eventName];
-
- if (eventName === 'canrecord') {
- initSize();
+ window.RTCPeerConnection.prototype._emitBufferedCandidates = function() {
+ var self = this;
+ var sections = SDPUtils.splitSections(self.localDescription.sdp);
+ // FIXME: need to apply ice candidates in a way which is async but in-order
+ this._localIceCandidatesBuffer.forEach(function(event) {
+ var end = !event.candidate || Object.keys(event.candidate).length == 0;
+ if (end) {
+ for (var j = 1; j < sections.length; j++) {
+ sections[j] += 'a=end-of-candidates\r\n';
+ }
+ } else {
+ sections[event.candidate.sdpMLineIndex + 1] +=
+ 'a=' + event.candidate.candidate + '\r\n';
}
- if (handlers && handlers.length > 0) {
- for (j = 0; j < handlers.length; j++) {
- handlers[j].apply(that, args);
- }
+ self.dispatchEvent(event);
+ if (self.onicecandidate !== null) {
+ self.onicecandidate(event);
}
+ if (!event.candidate) {
+ self.iceGatheringState = 'complete';
+ }
+ });
+ this._localIceCandidatesBuffer = [];
+ this.localDescription.sdp = sections.join('');
};
- that.setTopRight = function (topRight) {
- _topRight.x = topRight.x;
- _topRight.y = topRight.y;
- };
-
- that.getTopRight = function () {
- return _topRight;
- };
-
- that.setCanvasSize = function (size) {
- _canvasSize.x = size.x;
- _canvasSize.y = size.y;
- };
-
- that.getCanvasSize = function () {
- return _canvasSize;
+ window.RTCPeerConnection.prototype.addStream = function(stream) {
+ // Clone is necessary for local demos mostly, attaching directly
+ // to two different senders does not work (build 10547).
+ this.localStreams.push(stream.clone());
+ this._maybeFireNegotiationNeeded();
};
- that.getFrame = function () {
- return video;
+ window.RTCPeerConnection.prototype.removeStream = function(stream) {
+ var idx = this.localStreams.indexOf(stream);
+ if (idx > -1) {
+ this.localStreams.splice(idx, 1);
+ this._maybeFireNegotiationNeeded();
+ }
};
- return that;
- };
+ // Determines the intersection of local and remote capabilities.
+ window.RTCPeerConnection.prototype._getCommonCapabilities =
+ function(localCapabilities, remoteCapabilities) {
+ var commonCapabilities = {
+ codecs: [],
+ headerExtensions: [],
+ fecMechanisms: []
+ };
+ localCapabilities.codecs.forEach(function(lCodec) {
+ for (var i = 0; i < remoteCapabilities.codecs.length; i++) {
+ var rCodec = remoteCapabilities.codecs[i];
+ if (lCodec.name.toLowerCase() === rCodec.name.toLowerCase() &&
+ lCodec.clockRate === rCodec.clockRate &&
+ lCodec.numChannels === rCodec.numChannels) {
+ // push rCodec so we reply with offerer payload type
+ commonCapabilities.codecs.push(rCodec);
+
+ // FIXME: also need to determine intersection between
+ // .rtcpFeedback and .parameters
+ break;
+ }
+ }
+ });
- InputStream.createLiveStream = function (video) {
- video.setAttribute("autoplay", true);
- var that = InputStream.createVideoStream(video);
+ localCapabilities.headerExtensions.forEach(function(lHeaderExtension) {
+ for (var i = 0; i < remoteCapabilities.headerExtensions.length; i++) {
+ var rHeaderExtension = remoteCapabilities.headerExtensions[i];
+ if (lHeaderExtension.uri === rHeaderExtension.uri) {
+ commonCapabilities.headerExtensions.push(rHeaderExtension);
+ break;
+ }
+ }
+ });
- that.ended = function () {
- return false;
+ // FIXME: fecMechanisms
+ return commonCapabilities;
};
- return that;
- };
-
- InputStream.createImageStream = function () {
- var that = {};
- var _config = null;
-
- var width = 0,
- height = 0,
- frameIdx = 0,
- paused = true,
- loaded = false,
- imgArray = null,
- size = 0,
- offset = 1,
- baseUrl = null,
- ended = false,
- calculatedWidth,
- calculatedHeight,
- _eventNames = ['canrecord', 'ended'],
- _eventHandlers = {},
- _topRight = { x: 0, y: 0 },
- _canvasSize = { x: 0, y: 0 };
-
- function loadImages() {
- loaded = false;
- _image_loader2['default'].load(baseUrl, function (imgs) {
- imgArray = imgs;
- width = imgs[0].width;
- height = imgs[0].height;
- calculatedWidth = _config.size ? width / height > 1 ? _config.size : Math.floor(width / height * _config.size) : width;
- calculatedHeight = _config.size ? width / height > 1 ? Math.floor(height / width * _config.size) : _config.size : height;
- _canvasSize.x = calculatedWidth;
- _canvasSize.y = calculatedHeight;
- loaded = true;
- frameIdx = 0;
- setTimeout(function () {
- publishEvent("canrecord", []);
- }, 0);
- }, offset, size, _config.sequence);
- }
-
- function publishEvent(eventName, args) {
- var j,
- handlers = _eventHandlers[eventName];
-
- if (handlers && handlers.length > 0) {
- for (j = 0; j < handlers.length; j++) {
- handlers[j].apply(that, args);
- }
+ // Create ICE gatherer, ICE transport and DTLS transport.
+ window.RTCPeerConnection.prototype._createIceAndDtlsTransports =
+ function(mid, sdpMLineIndex) {
+ var self = this;
+ var iceGatherer = new RTCIceGatherer(self.iceOptions);
+ var iceTransport = new RTCIceTransport(iceGatherer);
+ iceGatherer.onlocalcandidate = function(evt) {
+ var event = new Event('icecandidate');
+ event.candidate = {sdpMid: mid, sdpMLineIndex: sdpMLineIndex};
+
+ var cand = evt.candidate;
+ var end = !cand || Object.keys(cand).length === 0;
+ // Edge emits an empty object for RTCIceCandidateComplete‥
+ if (end) {
+ // polyfill since RTCIceGatherer.state is not implemented in Edge 10547 yet.
+ if (iceGatherer.state === undefined) {
+ iceGatherer.state = 'completed';
+ }
+
+ // Emit a candidate with type endOfCandidates to make the samples work.
+ // Edge requires addIceCandidate with this empty candidate to start checking.
+ // The real solution is to signal end-of-candidates to the other side when
+ // getting the null candidate but some apps (like the samples) don't do that.
+ event.candidate.candidate =
+ 'candidate:1 1 udp 1 0.0.0.0 9 typ endOfCandidates';
+ } else {
+ // RTCIceCandidate doesn't have a component, needs to be added
+ cand.component = iceTransport.component === 'RTCP' ? 2 : 1;
+ event.candidate.candidate = SDPUtils.writeCandidate(cand);
}
- }
-
- that.trigger = publishEvent;
-
- that.getWidth = function () {
- return calculatedWidth;
- };
- that.getHeight = function () {
- return calculatedHeight;
+ var complete = self.transceivers.every(function(transceiver) {
+ return transceiver.iceGatherer &&
+ transceiver.iceGatherer.state === 'completed';
+ });
+ // update .localDescription with candidate and (potentially) end-of-candidates.
+ // To make this harder, the gatherer might emit candidates before localdescription
+ // is set. To make things worse, gather.getLocalCandidates still errors in
+ // Edge 10547 when no candidates have been gathered yet.
+ if (self.localDescription && self.localDescription.type !== '') {
+ var sections = SDPUtils.splitSections(self.localDescription.sdp);
+ sections[sdpMLineIndex + 1] += (!end ? 'a=' + event.candidate.candidate :
+ 'a=end-of-candidates') + '\r\n';
+ self.localDescription.sdp = sections.join('');
+ }
+
+ // Emit candidate if localDescription is set.
+ // Also emits null candidate when all gatherers are complete.
+ switch(self.iceGatheringState) {
+ case 'new':
+ self._localIceCandidatesBuffer.push(event);
+ if (complete) {
+ self._localIceCandidatesBuffer.push(new Event('icecandidate'));
+ }
+ break;
+ case 'gathering':
+ self._emitBufferedCandidates();
+ self.dispatchEvent(event);
+ if (self.onicecandidate !== null) {
+ self.onicecandidate(event);
+ }
+ if (complete) {
+ self.dispatchEvent(new Event('icecandidate'));
+ if (self.onicecandidate !== null) {
+ self.onicecandidate(new Event('icecandidate'));
+ }
+ self.iceGatheringState = 'complete';
+ }
+ break;
+ case 'complete':
+ // should not happen... currently!
+ break;
+ }
+ };
+ iceTransport.onicestatechange = function() {
+ self._updateConnectionState();
+ };
+
+ var dtlsTransport = new RTCDtlsTransport(iceTransport);
+ dtlsTransport.ondtlsstatechange = function() {
+ self._updateConnectionState();
+ };
+ dtlsTransport.onerror = function() {
+ // onerror does not set state to failed by itself.
+ dtlsTransport.state = 'failed';
+ self._updateConnectionState();
+ };
+
+ return {
+ iceGatherer: iceGatherer,
+ iceTransport: iceTransport,
+ dtlsTransport: dtlsTransport
+ };
};
- that.setWidth = function (newWidth) {
- calculatedWidth = newWidth;
+ // Start the RTP Sender and Receiver for a transceiver.
+ window.RTCPeerConnection.prototype._transceive = function(transceiver,
+ send, recv) {
+ var params = this._getCommonCapabilities(transceiver.localCapabilities,
+ transceiver.remoteCapabilities);
+ if (send && transceiver.rtpSender) {
+ params.encodings = [{
+ ssrc: transceiver.sendSsrc
+ }];
+ params.rtcp = {
+ cname: SDPUtils.localCName,
+ ssrc: transceiver.recvSsrc
+ };
+ transceiver.rtpSender.send(params);
+ }
+ if (recv && transceiver.rtpReceiver) {
+ params.encodings = [{
+ ssrc: transceiver.recvSsrc
+ }];
+ params.rtcp = {
+ cname: transceiver.cname,
+ ssrc: transceiver.sendSsrc
+ };
+ transceiver.rtpReceiver.receive(params);
+ }
};
- that.setHeight = function (newHeight) {
- calculatedHeight = newHeight;
- };
+ window.RTCPeerConnection.prototype.setLocalDescription =
+ function(description) {
+ var self = this;
+ if (description.type === 'offer') {
+ if (!this._pendingOffer) {
+ } else {
+ this.transceivers = this._pendingOffer;
+ delete this._pendingOffer;
+ }
+ } else if (description.type === 'answer') {
+ var sections = SDPUtils.splitSections(self.remoteDescription.sdp);
+ var sessionpart = sections.shift();
+ sections.forEach(function(mediaSection, sdpMLineIndex) {
+ var transceiver = self.transceivers[sdpMLineIndex];
+ var iceGatherer = transceiver.iceGatherer;
+ var iceTransport = transceiver.iceTransport;
+ var dtlsTransport = transceiver.dtlsTransport;
+ var localCapabilities = transceiver.localCapabilities;
+ var remoteCapabilities = transceiver.remoteCapabilities;
+ var rejected = mediaSection.split('\n', 1)[0]
+ .split(' ', 2)[1] === '0';
+
+ if (!rejected) {
+ var remoteIceParameters = SDPUtils.getIceParameters(mediaSection,
+ sessionpart);
+ iceTransport.start(iceGatherer, remoteIceParameters, 'controlled');
+
+ var remoteDtlsParameters = SDPUtils.getDtlsParameters(mediaSection,
+ sessionpart);
+ dtlsTransport.start(remoteDtlsParameters);
+
+ // Calculate intersection of capabilities.
+ var params = self._getCommonCapabilities(localCapabilities,
+ remoteCapabilities);
+
+ // Start the RTCRtpSender. The RTCRtpReceiver for this transceiver
+ // has already been started in setRemoteDescription.
+ self._transceive(transceiver,
+ params.codecs.length > 0,
+ false);
+ }
+ });
+ }
- that.getRealWidth = function () {
- return width;
- };
+ this.localDescription = {
+ type: description.type,
+ sdp: description.sdp
+ };
+ switch (description.type) {
+ case 'offer':
+ this._updateSignalingState('have-local-offer');
+ break;
+ case 'answer':
+ this._updateSignalingState('stable');
+ break;
+ default:
+ throw new TypeError('unsupported type "' + description.type + '"');
+ }
- that.getRealHeight = function () {
- return height;
+ // If a success callback was provided, emit ICE candidates after it has been
+ // executed. Otherwise, emit callback after the Promise is resolved.
+ var hasCallback = arguments.length > 1 &&
+ typeof arguments[1] === 'function';
+ if (hasCallback) {
+ var cb = arguments[1];
+ window.setTimeout(function() {
+ cb();
+ if (self.iceGatheringState === 'new') {
+ self.iceGatheringState = 'gathering';
+ }
+ self._emitBufferedCandidates();
+ }, 0);
+ }
+ var p = Promise.resolve();
+ p.then(function() {
+ if (!hasCallback) {
+ if (self.iceGatheringState === 'new') {
+ self.iceGatheringState = 'gathering';
+ }
+ // Usually candidates will be emitted earlier.
+ window.setTimeout(self._emitBufferedCandidates.bind(self), 500);
+ }
+ });
+ return p;
};
- that.setInputStream = function (stream) {
- _config = stream;
- if (stream.sequence === false) {
- baseUrl = stream.src;
- size = 1;
- } else {
- baseUrl = stream.src;
- size = stream.length;
- }
- loadImages();
+ window.RTCPeerConnection.prototype.setRemoteDescription =
+ function(description) {
+ var self = this;
+ var stream = new MediaStream();
+ var receiverList = [];
+ var sections = SDPUtils.splitSections(description.sdp);
+ var sessionpart = sections.shift();
+ sections.forEach(function(mediaSection, sdpMLineIndex) {
+ var lines = SDPUtils.splitLines(mediaSection);
+ var mline = lines[0].substr(2).split(' ');
+ var kind = mline[0];
+ var rejected = mline[1] === '0';
+ var direction = SDPUtils.getDirection(mediaSection, sessionpart);
+
+ var transceiver;
+ var iceGatherer;
+ var iceTransport;
+ var dtlsTransport;
+ var rtpSender;
+ var rtpReceiver;
+ var sendSsrc;
+ var recvSsrc;
+ var localCapabilities;
+
+ var track;
+ // FIXME: ensure the mediaSection has rtcp-mux set.
+ var remoteCapabilities = SDPUtils.parseRtpParameters(mediaSection);
+ var remoteIceParameters;
+ var remoteDtlsParameters;
+ if (!rejected) {
+ remoteIceParameters = SDPUtils.getIceParameters(mediaSection,
+ sessionpart);
+ remoteDtlsParameters = SDPUtils.getDtlsParameters(mediaSection,
+ sessionpart);
+ }
+ var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:')[0].substr(6);
+
+ var cname;
+ // Gets the first SSRC. Note that with RTX there might be multiple SSRCs.
+ var remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:')
+ .map(function(line) {
+ return SDPUtils.parseSsrcMedia(line);
+ })
+ .filter(function(obj) {
+ return obj.attribute === 'cname';
+ })[0];
+ if (remoteSsrc) {
+ recvSsrc = parseInt(remoteSsrc.ssrc, 10);
+ cname = remoteSsrc.value;
+ }
+
+ if (description.type === 'offer') {
+ var transports = self._createIceAndDtlsTransports(mid, sdpMLineIndex);
+
+ localCapabilities = RTCRtpReceiver.getCapabilities(kind);
+ sendSsrc = (2 * sdpMLineIndex + 2) * 1001;
+
+ rtpReceiver = new RTCRtpReceiver(transports.dtlsTransport, kind);
+
+ track = rtpReceiver.track;
+ receiverList.push([track, rtpReceiver]);
+ // FIXME: not correct when there are multiple streams but that is
+ // not currently supported in this shim.
+ stream.addTrack(track);
+
+ // FIXME: look at direction.
+ if (self.localStreams.length > 0 &&
+ self.localStreams[0].getTracks().length >= sdpMLineIndex) {
+ // FIXME: actually more complicated, needs to match types etc
+ var localtrack = self.localStreams[0].getTracks()[sdpMLineIndex];
+ rtpSender = new RTCRtpSender(localtrack, transports.dtlsTransport);
+ }
+
+ self.transceivers[sdpMLineIndex] = {
+ iceGatherer: transports.iceGatherer,
+ iceTransport: transports.iceTransport,
+ dtlsTransport: transports.dtlsTransport,
+ localCapabilities: localCapabilities,
+ remoteCapabilities: remoteCapabilities,
+ rtpSender: rtpSender,
+ rtpReceiver: rtpReceiver,
+ kind: kind,
+ mid: mid,
+ cname: cname,
+ sendSsrc: sendSsrc,
+ recvSsrc: recvSsrc
+ };
+ // Start the RTCRtpReceiver now. The RTPSender is started in setLocalDescription.
+ self._transceive(self.transceivers[sdpMLineIndex],
+ false,
+ direction === 'sendrecv' || direction === 'sendonly');
+ } else if (description.type === 'answer' && !rejected) {
+ transceiver = self.transceivers[sdpMLineIndex];
+ iceGatherer = transceiver.iceGatherer;
+ iceTransport = transceiver.iceTransport;
+ dtlsTransport = transceiver.dtlsTransport;
+ rtpSender = transceiver.rtpSender;
+ rtpReceiver = transceiver.rtpReceiver;
+ sendSsrc = transceiver.sendSsrc;
+ //recvSsrc = transceiver.recvSsrc;
+ localCapabilities = transceiver.localCapabilities;
+
+ self.transceivers[sdpMLineIndex].recvSsrc = recvSsrc;
+ self.transceivers[sdpMLineIndex].remoteCapabilities =
+ remoteCapabilities;
+ self.transceivers[sdpMLineIndex].cname = cname;
+
+ iceTransport.start(iceGatherer, remoteIceParameters, 'controlling');
+ dtlsTransport.start(remoteDtlsParameters);
+
+ self._transceive(transceiver,
+ direction === 'sendrecv' || direction === 'recvonly',
+ direction === 'sendrecv' || direction === 'sendonly');
+
+ if (rtpReceiver &&
+ (direction === 'sendrecv' || direction === 'sendonly')) {
+ track = rtpReceiver.track;
+ receiverList.push([track, rtpReceiver]);
+ stream.addTrack(track);
+ } else {
+ // FIXME: actually the receiver should be created later.
+ delete transceiver.rtpReceiver;
+ }
+ }
+ });
+
+ this.remoteDescription = {
+ type: description.type,
+ sdp: description.sdp
+ };
+ switch (description.type) {
+ case 'offer':
+ this._updateSignalingState('have-remote-offer');
+ break;
+ case 'answer':
+ this._updateSignalingState('stable');
+ break;
+ default:
+ throw new TypeError('unsupported type "' + description.type + '"');
+ }
+ if (stream.getTracks().length) {
+ self.remoteStreams.push(stream);
+ window.setTimeout(function() {
+ var event = new Event('addstream');
+ event.stream = stream;
+ self.dispatchEvent(event);
+ if (self.onaddstream !== null) {
+ window.setTimeout(function() {
+ self.onaddstream(event);
+ }, 0);
+ }
+
+ receiverList.forEach(function(item) {
+ var track = item[0];
+ var receiver = item[1];
+ var event = new Event('track');
+ event.track = track;
+ event.receiver = receiver;
+ event.streams = [stream];
+ self.dispatchEvent(event);
+ if (self.ontrack !== null) {
+ window.setTimeout(function() {
+ self.ontrack(event);
+ }, 0);
+ }
+ });
+ }, 0);
+ }
+ if (arguments.length > 1 && typeof arguments[1] === 'function') {
+ window.setTimeout(arguments[1], 0);
+ }
+ return Promise.resolve();
};
- that.ended = function () {
- return ended;
+ window.RTCPeerConnection.prototype.close = function() {
+ this.transceivers.forEach(function(transceiver) {
+ /* not yet
+ if (transceiver.iceGatherer) {
+ transceiver.iceGatherer.close();
+ }
+ */
+ if (transceiver.iceTransport) {
+ transceiver.iceTransport.stop();
+ }
+ if (transceiver.dtlsTransport) {
+ transceiver.dtlsTransport.stop();
+ }
+ if (transceiver.rtpSender) {
+ transceiver.rtpSender.stop();
+ }
+ if (transceiver.rtpReceiver) {
+ transceiver.rtpReceiver.stop();
+ }
+ });
+ // FIXME: clean up tracks, local streams, remote streams, etc
+ this._updateSignalingState('closed');
};
- that.setAttribute = function () {};
-
- that.getConfig = function () {
- return _config;
+ // Update the signaling state.
+ window.RTCPeerConnection.prototype._updateSignalingState =
+ function(newState) {
+ this.signalingState = newState;
+ var event = new Event('signalingstatechange');
+ this.dispatchEvent(event);
+ if (this.onsignalingstatechange !== null) {
+ this.onsignalingstatechange(event);
+ }
};
- that.pause = function () {
- paused = true;
+ // Determine whether to fire the negotiationneeded event.
+ window.RTCPeerConnection.prototype._maybeFireNegotiationNeeded =
+ function() {
+ // Fire away (for now).
+ var event = new Event('negotiationneeded');
+ this.dispatchEvent(event);
+ if (this.onnegotiationneeded !== null) {
+ this.onnegotiationneeded(event);
+ }
};
- that.play = function () {
- paused = false;
- };
+ // Update the connection state.
+ window.RTCPeerConnection.prototype._updateConnectionState =
+ function() {
+ var self = this;
+ var newState;
+ var states = {
+ 'new': 0,
+ closed: 0,
+ connecting: 0,
+ checking: 0,
+ connected: 0,
+ completed: 0,
+ failed: 0
+ };
+ this.transceivers.forEach(function(transceiver) {
+ states[transceiver.iceTransport.state]++;
+ states[transceiver.dtlsTransport.state]++;
+ });
+ // ICETransport.completed and connected are the same for this purpose.
+ states['connected'] += states['completed'];
+
+ newState = 'new';
+ if (states['failed'] > 0) {
+ newState = 'failed';
+ } else if (states['connecting'] > 0 || states['checking'] > 0) {
+ newState = 'connecting';
+ } else if (states['disconnected'] > 0) {
+ newState = 'disconnected';
+ } else if (states['new'] > 0) {
+ newState = 'new';
+ } else if (states['connecting'] > 0 || states['completed'] > 0) {
+ newState = 'connected';
+ }
- that.setCurrentTime = function (time) {
- frameIdx = time;
+ if (newState !== self.iceConnectionState) {
+ self.iceConnectionState = newState;
+ var event = new Event('iceconnectionstatechange');
+ this.dispatchEvent(event);
+ if (this.oniceconnectionstatechange !== null) {
+ this.oniceconnectionstatechange(event);
+ }
+ }
};
- that.addEventListener = function (event, f) {
- if (_eventNames.indexOf(event) !== -1) {
- if (!_eventHandlers[event]) {
- _eventHandlers[event] = [];
- }
- _eventHandlers[event].push(f);
+ window.RTCPeerConnection.prototype.createOffer = function() {
+ var self = this;
+ if (this._pendingOffer) {
+ throw new Error('createOffer called while there is a pending offer.');
+ }
+ var offerOptions;
+ if (arguments.length === 1 && typeof arguments[0] !== 'function') {
+ offerOptions = arguments[0];
+ } else if (arguments.length === 3) {
+ offerOptions = arguments[2];
+ }
+
+ var tracks = [];
+ var numAudioTracks = 0;
+ var numVideoTracks = 0;
+ // Default to sendrecv.
+ if (this.localStreams.length) {
+ numAudioTracks = this.localStreams[0].getAudioTracks().length;
+ numVideoTracks = this.localStreams[0].getVideoTracks().length;
+ }
+ // Determine number of audio and video tracks we need to send/recv.
+ if (offerOptions) {
+ // Reject Chrome legacy constraints.
+ if (offerOptions.mandatory || offerOptions.optional) {
+ throw new TypeError(
+ 'Legacy mandatory/optional constraints not supported.');
}
- };
+ if (offerOptions.offerToReceiveAudio !== undefined) {
+ numAudioTracks = offerOptions.offerToReceiveAudio;
+ }
+ if (offerOptions.offerToReceiveVideo !== undefined) {
+ numVideoTracks = offerOptions.offerToReceiveVideo;
+ }
+ }
+ if (this.localStreams.length) {
+ // Push local streams.
+ this.localStreams[0].getTracks().forEach(function(track) {
+ tracks.push({
+ kind: track.kind,
+ track: track,
+ wantReceive: track.kind === 'audio' ?
+ numAudioTracks > 0 : numVideoTracks > 0
+ });
+ if (track.kind === 'audio') {
+ numAudioTracks--;
+ } else if (track.kind === 'video') {
+ numVideoTracks--;
+ }
+ });
+ }
+ // Create M-lines for recvonly streams.
+ while (numAudioTracks > 0 || numVideoTracks > 0) {
+ if (numAudioTracks > 0) {
+ tracks.push({
+ kind: 'audio',
+ wantReceive: true
+ });
+ numAudioTracks--;
+ }
+ if (numVideoTracks > 0) {
+ tracks.push({
+ kind: 'video',
+ wantReceive: true
+ });
+ numVideoTracks--;
+ }
+ }
- that.setTopRight = function (topRight) {
- _topRight.x = topRight.x;
- _topRight.y = topRight.y;
+ var sdp = SDPUtils.writeSessionBoilerplate();
+ var transceivers = [];
+ tracks.forEach(function(mline, sdpMLineIndex) {
+ // For each track, create an ice gatherer, ice transport, dtls transport,
+ // potentially rtpsender and rtpreceiver.
+ var track = mline.track;
+ var kind = mline.kind;
+ var mid = SDPUtils.generateIdentifier();
+
+ var transports = self._createIceAndDtlsTransports(mid, sdpMLineIndex);
+
+ var localCapabilities = RTCRtpSender.getCapabilities(kind);
+ var rtpSender;
+ var rtpReceiver;
+
+ // generate an ssrc now, to be used later in rtpSender.send
+ var sendSsrc = (2 * sdpMLineIndex + 1) * 1001;
+ if (track) {
+ rtpSender = new RTCRtpSender(track, transports.dtlsTransport);
+ }
+
+ if (mline.wantReceive) {
+ rtpReceiver = new RTCRtpReceiver(transports.dtlsTransport, kind);
+ }
+
+ transceivers[sdpMLineIndex] = {
+ iceGatherer: transports.iceGatherer,
+ iceTransport: transports.iceTransport,
+ dtlsTransport: transports.dtlsTransport,
+ localCapabilities: localCapabilities,
+ remoteCapabilities: null,
+ rtpSender: rtpSender,
+ rtpReceiver: rtpReceiver,
+ kind: kind,
+ mid: mid,
+ sendSsrc: sendSsrc,
+ recvSsrc: null
+ };
+ var transceiver = transceivers[sdpMLineIndex];
+ sdp += SDPUtils.writeMediaSection(transceiver,
+ transceiver.localCapabilities, 'offer', self.localStreams[0]);
+ });
+
+ this._pendingOffer = transceivers;
+ var desc = new RTCSessionDescription({
+ type: 'offer',
+ sdp: sdp
+ });
+ if (arguments.length && typeof arguments[0] === 'function') {
+ window.setTimeout(arguments[0], 0, desc);
+ }
+ return Promise.resolve(desc);
};
- that.getTopRight = function () {
- return _topRight;
+ window.RTCPeerConnection.prototype.createAnswer = function() {
+ var self = this;
+ var answerOptions;
+ if (arguments.length === 1 && typeof arguments[0] !== 'function') {
+ answerOptions = arguments[0];
+ } else if (arguments.length === 3) {
+ answerOptions = arguments[2];
+ }
+
+ var sdp = SDPUtils.writeSessionBoilerplate();
+ this.transceivers.forEach(function(transceiver) {
+ // Calculate intersection of capabilities.
+ var commonCapabilities = self._getCommonCapabilities(
+ transceiver.localCapabilities,
+ transceiver.remoteCapabilities);
+
+ sdp += SDPUtils.writeMediaSection(transceiver, commonCapabilities,
+ 'answer', self.localStreams[0]);
+ });
+
+ var desc = new RTCSessionDescription({
+ type: 'answer',
+ sdp: sdp
+ });
+ if (arguments.length && typeof arguments[0] === 'function') {
+ window.setTimeout(arguments[0], 0, desc);
+ }
+ return Promise.resolve(desc);
};
- that.setCanvasSize = function (canvasSize) {
- _canvasSize.x = canvasSize.x;
- _canvasSize.y = canvasSize.y;
+ window.RTCPeerConnection.prototype.addIceCandidate = function(candidate) {
+ var mLineIndex = candidate.sdpMLineIndex;
+ if (candidate.sdpMid) {
+ for (var i = 0; i < this.transceivers.length; i++) {
+ if (this.transceivers[i].mid === candidate.sdpMid) {
+ mLineIndex = i;
+ break;
+ }
+ }
+ }
+ var transceiver = this.transceivers[mLineIndex];
+ if (transceiver) {
+ var cand = Object.keys(candidate.candidate).length > 0 ?
+ SDPUtils.parseCandidate(candidate.candidate) : {};
+ // Ignore Chrome's invalid candidates since Edge does not like them.
+ if (cand.protocol === 'tcp' && cand.port === 0) {
+ return;
+ }
+ // Ignore RTCP candidates, we assume RTCP-MUX.
+ if (cand.component !== '1') {
+ return;
+ }
+ // A dirty hack to make samples work.
+ if (cand.type === 'endOfCandidates') {
+ cand = {};
+ }
+ transceiver.iceTransport.addRemoteCandidate(cand);
+
+ // update the remoteDescription.
+ var sections = SDPUtils.splitSections(this.remoteDescription.sdp);
+ sections[mLineIndex + 1] += (cand.type ? candidate.candidate.trim()
+ : 'a=end-of-candidates') + '\r\n';
+ this.remoteDescription.sdp = sections.join('');
+ }
+ if (arguments.length > 1 && typeof arguments[1] === 'function') {
+ window.setTimeout(arguments[1], 0);
+ }
+ return Promise.resolve();
};
- that.getCanvasSize = function () {
- return _canvasSize;
+ window.RTCPeerConnection.prototype.getStats = function() {
+ var promises = [];
+ this.transceivers.forEach(function(transceiver) {
+ ['rtpSender', 'rtpReceiver', 'iceGatherer', 'iceTransport',
+ 'dtlsTransport'].forEach(function(method) {
+ if (transceiver[method]) {
+ promises.push(transceiver[method].getStats());
+ }
+ });
+ });
+ var cb = arguments.length > 1 && typeof arguments[1] === 'function' &&
+ arguments[1];
+ return new Promise(function(resolve) {
+ var results = {};
+ Promise.all(promises).then(function(res) {
+ res.forEach(function(result) {
+ Object.keys(result).forEach(function(id) {
+ results[id] = result[id];
+ });
+ });
+ if (cb) {
+ window.setTimeout(cb, 0, results);
+ }
+ resolve(results);
+ });
+ });
};
+ },
- that.getFrame = function () {
- var frame;
+ // Attach a media stream to an element.
+ attachMediaStream: function(element, stream) {
+ logging('DEPRECATED, attachMediaStream will soon be removed.');
+ element.srcObject = stream;
+ },
- if (!loaded) {
- return null;
- }
- if (!paused) {
- frame = imgArray[frameIdx];
- if (frameIdx < size - 1) {
- frameIdx++;
- } else {
- setTimeout(function () {
- ended = true;
- publishEvent("ended", []);
- }, 0);
- }
- }
- return frame;
- };
+ reattachMediaStream: function(to, from) {
+ logging('DEPRECATED, reattachMediaStream will soon be removed.');
+ to.srcObject = from.srcObject;
+ }
+ }
- return that;
- };
+ // Expose public methods.
+ module.e = {
+ shimPeerConnection: edgeShim.shimPeerConnection,
+ attachMediaStream: edgeShim.attachMediaStream,
+ reattachMediaStream: edgeShim.reattachMediaStream
+ }
- exports['default'] = InputStream;
- module.exports = exports['default'];
+
/***/ },
-/* 74 */
+/* 152 */
/***/ function(module, exports, __webpack_require__) {
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var ImageLoader = {};
- ImageLoader.load = function (directory, callback, offset, size, sequence) {
- var htmlImagesSrcArray = new Array(size),
- htmlImagesArray = new Array(htmlImagesSrcArray.length),
- i,
- img,
- num;
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
+ 'use strict';
- if (sequence === false) {
- htmlImagesSrcArray[0] = directory;
- } else {
- for (i = 0; i < htmlImagesSrcArray.length; i++) {
- num = offset + i;
- htmlImagesSrcArray[i] = directory + "image-" + ("00" + num).slice(-3) + ".jpg";
- }
+ var logging = __webpack_require__(0).log;
+ var browserDetails = __webpack_require__(0).browserDetails;
+
+ var firefoxShim = {
+ shimOnTrack: function() {
+ if (typeof window === 'object' && window.RTCPeerConnection && !('ontrack' in
+ window.RTCPeerConnection.prototype)) {
+ Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {
+ get: function() { return this._ontrack; },
+ set: function(f) {
+ var self = this;
+ if (this._ontrack) {
+ this.removeEventListener('track', this._ontrack);
+ this.removeEventListener('addstream', this._ontrackpoly);
+ }
+ this.addEventListener('track', this._ontrack = f);
+ this.addEventListener('addstream', this._ontrackpoly = function(e) {
+ e.stream.getTracks().forEach(function(track) {
+ var event = new Event('track');
+ event.track = track;
+ event.receiver = {track: track};
+ event.streams = [e.stream];
+ this.dispatchEvent(event);
+ }.bind(this));
+ }.bind(this));
+ }
+ });
+ }
+ },
+
+ shimSourceObject: function() {
+ // Firefox has supported mozSrcObject since FF22, unprefixed in 42.
+ if (typeof window === 'object') {
+ if (window.HTMLMediaElement &&
+ !('srcObject' in window.HTMLMediaElement.prototype)) {
+ // Shim the srcObject property, once, when HTMLMediaElement is found.
+ Object.defineProperty(window.HTMLMediaElement.prototype, 'srcObject', {
+ get: function() {
+ return this.mozSrcObject;
+ },
+ set: function(stream) {
+ this.mozSrcObject = stream;
+ }
+ });
+ }
}
- htmlImagesArray.notLoaded = [];
- htmlImagesArray.addImage = function (image) {
- htmlImagesArray.notLoaded.push(image);
- };
- htmlImagesArray.loaded = function (loadedImg) {
- var notloadedImgs = htmlImagesArray.notLoaded;
- for (var x = 0; x < notloadedImgs.length; x++) {
- if (notloadedImgs[x] === loadedImg) {
- notloadedImgs.splice(x, 1);
- for (var y = 0; y < htmlImagesSrcArray.length; y++) {
- var imgName = htmlImagesSrcArray[y].substr(htmlImagesSrcArray[y].lastIndexOf("/"));
- if (loadedImg.src.lastIndexOf(imgName) !== -1) {
- htmlImagesArray[y] = loadedImg;
- break;
- }
+ },
+
+ shimPeerConnection: function() {
+ // The RTCPeerConnection object.
+ if (!window.RTCPeerConnection) {
+ window.RTCPeerConnection = function(pcConfig, pcConstraints) {
+ if (browserDetails.version < 38) {
+ // .urls is not supported in FF < 38.
+ // create RTCIceServers with a single url.
+ if (pcConfig && pcConfig.iceServers) {
+ var newIceServers = [];
+ for (var i = 0; i < pcConfig.iceServers.length; i++) {
+ var server = pcConfig.iceServers[i];
+ if (server.hasOwnProperty('urls')) {
+ for (var j = 0; j < server.urls.length; j++) {
+ var newServer = {
+ url: server.urls[j]
+ };
+ if (server.urls[j].indexOf('turn') === 0) {
+ newServer.username = server.username;
+ newServer.credential = server.credential;
+ }
+ newIceServers.push(newServer);
}
- break;
+ } else {
+ newIceServers.push(pcConfig.iceServers[i]);
+ }
+ }
+ pcConfig.iceServers = newIceServers;
+ }
+ }
+ return new mozRTCPeerConnection(pcConfig, pcConstraints); // jscs:ignore requireCapitalizedConstructors
+ };
+ window.RTCPeerConnection.prototype = mozRTCPeerConnection.prototype;
+
+ // wrap static methods. Currently just generateCertificate.
+ if (mozRTCPeerConnection.generateCertificate) {
+ Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {
+ get: function() {
+ if (arguments.length) {
+ return mozRTCPeerConnection.generateCertificate.apply(null,
+ arguments);
+ } else {
+ return mozRTCPeerConnection.generateCertificate;
}
+ }
+ });
+ }
+
+ window.RTCSessionDescription = mozRTCSessionDescription;
+ window.RTCIceCandidate = mozRTCIceCandidate;
+ }
+ },
+
+ shimGetUserMedia: function() {
+ // getUserMedia constraints shim.
+ var getUserMedia_ = function(constraints, onSuccess, onError) {
+ var constraintsToFF37_ = function(c) {
+ if (typeof c !== 'object' || c.require) {
+ return c;
}
- if (notloadedImgs.length === 0) {
- if (true) {
- console.log("Images loaded");
+ var require = [];
+ Object.keys(c).forEach(function(key) {
+ if (key === 'require' || key === 'advanced' || key === 'mediaSource') {
+ return;
+ }
+ var r = c[key] = (typeof c[key] === 'object') ?
+ c[key] : {ideal: c[key]};
+ if (r.min !== undefined ||
+ r.max !== undefined || r.exact !== undefined) {
+ require.push(key);
+ }
+ if (r.exact !== undefined) {
+ if (typeof r.exact === 'number') {
+ r. min = r.max = r.exact;
+ } else {
+ c[key] = r.exact;
}
- callback.apply(null, [htmlImagesArray]);
+ delete r.exact;
+ }
+ if (r.ideal !== undefined) {
+ c.advanced = c.advanced || [];
+ var oc = {};
+ if (typeof r.ideal === 'number') {
+ oc[key] = {min: r.ideal, max: r.ideal};
+ } else {
+ oc[key] = r.ideal;
+ }
+ c.advanced.push(oc);
+ delete r.ideal;
+ if (!Object.keys(r).length) {
+ delete c[key];
+ }
+ }
+ });
+ if (require.length) {
+ c.require = require;
+ }
+ return c;
+ };
+ if (browserDetails.version < 38) {
+ logging('spec: ' + JSON.stringify(constraints));
+ if (constraints.audio) {
+ constraints.audio = constraintsToFF37_(constraints.audio);
}
+ if (constraints.video) {
+ constraints.video = constraintsToFF37_(constraints.video);
+ }
+ logging('ff37: ' + JSON.stringify(constraints));
+ }
+ return navigator.mozGetUserMedia(constraints, onSuccess, onError);
};
- for (i = 0; i < htmlImagesSrcArray.length; i++) {
- img = new Image();
- htmlImagesArray.addImage(img);
- addOnloadHandler(img, htmlImagesArray);
- img.src = htmlImagesSrcArray[i];
+ navigator.getUserMedia = getUserMedia_;
+
+ // Returns the result of getUserMedia as a Promise.
+ var getUserMediaPromise_ = function(constraints) {
+ return new Promise(function(resolve, reject) {
+ navigator.getUserMedia(constraints, resolve, reject);
+ });
+ }
+
+ // Shim for mediaDevices on older versions.
+ if (!navigator.mediaDevices) {
+ navigator.mediaDevices = {getUserMedia: getUserMediaPromise_,
+ addEventListener: function() { },
+ removeEventListener: function() { }
+ };
+ }
+ navigator.mediaDevices.enumerateDevices =
+ navigator.mediaDevices.enumerateDevices || function() {
+ return new Promise(function(resolve) {
+ var infos = [
+ {kind: 'audioinput', deviceId: 'default', label: '', groupId: ''},
+ {kind: 'videoinput', deviceId: 'default', label: '', groupId: ''}
+ ];
+ resolve(infos);
+ });
+ };
+
+ if (browserDetails.version < 41) {
+ // Work around http://bugzil.la/1169665
+ var orgEnumerateDevices =
+ navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);
+ navigator.mediaDevices.enumerateDevices = function() {
+ return orgEnumerateDevices().then(undefined, function(e) {
+ if (e.name === 'NotFoundError') {
+ return [];
+ }
+ throw e;
+ });
+ };
}
- };
+ },
- function addOnloadHandler(img, htmlImagesArray) {
- img.onload = function () {
- htmlImagesArray.loaded(this);
- };
+ // Attach a media stream to an element.
+ attachMediaStream: function(element, stream) {
+ logging('DEPRECATED, attachMediaStream will soon be removed.');
+ element.srcObject = stream;
+ },
+
+ reattachMediaStream: function(to, from) {
+ logging('DEPRECATED, reattachMediaStream will soon be removed.');
+ to.srcObject = from.srcObject;
+ }
}
- exports["default"] = ImageLoader;
- module.exports = exports["default"];
+ // Expose public methods.
+ module.e = {
+ shimOnTrack: firefoxShim.shimOnTrack,
+ shimSourceObject: firefoxShim.shimSourceObject,
+ shimPeerConnection: firefoxShim.shimPeerConnection,
+ shimGetUserMedia: __webpack_require__(153),
+ attachMediaStream: firefoxShim.attachMediaStream,
+ reattachMediaStream: firefoxShim.reattachMediaStream
+ }
+
/***/ },
-/* 75 */
+/* 153 */
/***/ function(module, exports, __webpack_require__) {
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- var _commonCv_utils = __webpack_require__(5);
-
- var _commonCv_utils2 = _interopRequireDefault(_commonCv_utils);
-
- var FrameGrabber = {};
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
+ 'use strict';
- FrameGrabber.create = function (inputStream, canvas) {
- var _that = {},
- _streamConfig = inputStream.getConfig(),
- _video_size = _commonCv_utils2["default"].imageRef(inputStream.getRealWidth(), inputStream.getRealHeight()),
- _canvasSize = inputStream.getCanvasSize(),
- _size = _commonCv_utils2["default"].imageRef(inputStream.getWidth(), inputStream.getHeight()),
- topRight = inputStream.getTopRight(),
- _sx = topRight.x,
- _sy = topRight.y,
- _canvas,
- _ctx = null,
- _data = null;
+ var logging = __webpack_require__(0).log;
+ var browserDetails = __webpack_require__(0).browserDetails;
- _canvas = canvas ? canvas : document.createElement("canvas");
- _canvas.width = _canvasSize.x;
- _canvas.height = _canvasSize.y;
- _ctx = _canvas.getContext("2d");
- _data = new Uint8Array(_size.x * _size.y);
- if (true) {
- console.log("FrameGrabber", JSON.stringify({
- size: _size,
- topRight: topRight,
- videoSize: _video_size,
- canvasSize: _canvasSize
- }));
+ // Expose public methods.
+ module.e = function() {
+ // getUserMedia constraints shim.
+ var getUserMedia_ = function(constraints, onSuccess, onError) {
+ var constraintsToFF37_ = function(c) {
+ if (typeof c !== 'object' || c.require) {
+ return c;
+ }
+ var require = [];
+ Object.keys(c).forEach(function(key) {
+ if (key === 'require' || key === 'advanced' || key === 'mediaSource') {
+ return;
+ }
+ var r = c[key] = (typeof c[key] === 'object') ?
+ c[key] : {ideal: c[key]};
+ if (r.min !== undefined ||
+ r.max !== undefined || r.exact !== undefined) {
+ require.push(key);
+ }
+ if (r.exact !== undefined) {
+ if (typeof r.exact === 'number') {
+ r. min = r.max = r.exact;
+ } else {
+ c[key] = r.exact;
+ }
+ delete r.exact;
+ }
+ if (r.ideal !== undefined) {
+ c.advanced = c.advanced || [];
+ var oc = {};
+ if (typeof r.ideal === 'number') {
+ oc[key] = {min: r.ideal, max: r.ideal};
+ } else {
+ oc[key] = r.ideal;
+ }
+ c.advanced.push(oc);
+ delete r.ideal;
+ if (!Object.keys(r).length) {
+ delete c[key];
+ }
+ }
+ });
+ if (require.length) {
+ c.require = require;
+ }
+ return c;
+ };
+ if (browserDetails.version < 38) {
+ logging('spec: ' + JSON.stringify(constraints));
+ if (constraints.audio) {
+ constraints.audio = constraintsToFF37_(constraints.audio);
+ }
+ if (constraints.video) {
+ constraints.video = constraintsToFF37_(constraints.video);
+ }
+ logging('ff37: ' + JSON.stringify(constraints));
}
+ return navigator.mozGetUserMedia(constraints, onSuccess, onError);
+ };
- /**
- * Uses the given array as frame-buffer
- */
- _that.attachData = function (data) {
- _data = data;
- };
+ navigator.getUserMedia = getUserMedia_;
- /**
- * Returns the used frame-buffer
- */
- _that.getData = function () {
- return _data;
- };
+ // Returns the result of getUserMedia as a Promise.
+ var getUserMediaPromise_ = function(constraints) {
+ return new Promise(function(resolve, reject) {
+ navigator.getUserMedia(constraints, resolve, reject);
+ });
+ }
- /**
- * Fetches a frame from the input-stream and puts into the frame-buffer.
- * The image-data is converted to gray-scale and then half-sampled if configured.
- */
- _that.grab = function () {
- var doHalfSample = _streamConfig.halfSample,
- frame = inputStream.getFrame(),
- ctxData;
- if (frame) {
- _ctx.drawImage(frame, 0, 0, _canvasSize.x, _canvasSize.y);
- ctxData = _ctx.getImageData(_sx, _sy, _size.x, _size.y).data;
- if (doHalfSample) {
- _commonCv_utils2["default"].grayAndHalfSampleFromCanvasData(ctxData, _size, _data);
- } else {
- _commonCv_utils2["default"].computeGray(ctxData, _data, _streamConfig);
- }
- return true;
- } else {
- return false;
- }
+ // Shim for mediaDevices on older versions.
+ if (!navigator.mediaDevices) {
+ navigator.mediaDevices = {getUserMedia: getUserMediaPromise_,
+ addEventListener: function() { },
+ removeEventListener: function() { }
};
+ }
+ navigator.mediaDevices.enumerateDevices =
+ navigator.mediaDevices.enumerateDevices || function() {
+ return new Promise(function(resolve) {
+ var infos = [
+ {kind: 'audioinput', deviceId: 'default', label: '', groupId: ''},
+ {kind: 'videoinput', deviceId: 'default', label: '', groupId: ''}
+ ];
+ resolve(infos);
+ });
+ };
- _that.getSize = function () {
- return _size;
+ if (browserDetails.version < 41) {
+ // Work around http://bugzil.la/1169665
+ var orgEnumerateDevices =
+ navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);
+ navigator.mediaDevices.enumerateDevices = function() {
+ return orgEnumerateDevices().then(undefined, function(e) {
+ if (e.name === 'NotFoundError') {
+ return [];
+ }
+ throw e;
+ });
};
-
- return _that;
- };
-
- exports["default"] = FrameGrabber;
- module.exports = exports["default"];
+ }
+ }
+
+
+/***/ },
+/* 154 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = __webpack_require__(49);
+
/***/ }
/******/ ])
});
;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9teU1vZHVsZURlZmluaXRpb24iLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGU1YjcyOWQ1MDg0NzllNjNiZjFkIiwid2VicGFjazovLy9EOi93b3JrL3F1YWdnYUpTL3NyYy9xdWFnZ2EuanMiLCJ3ZWJwYWNrOi8vL0Q6L3dvcmsvcXVhZ2dhSlMvc3JjL2NvbW1vbi90eXBlZGVmcy5qcyIsIndlYnBhY2s6Ly8vRDovd29yay9xdWFnZ2FKUy9zcmMvY29tbW9uL2ltYWdlX3dyYXBwZXIuanMiLCJ3ZWJwYWNrOi8vL0Q6L3dvcmsvcXVhZ2dhSlMvc3JjL2NvbW1vbi9zdWJJbWFnZS5qcyIsIndlYnBhY2s6Ly8vRDovd29yay9xdWFnZ2FKUy9zcmMvY29tbW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RTdHJlYW0udHlwZSA9PT0gXCJJbWFnZVN0cmVhbVwiKSB7XHJcbiAgICAgICAgICAgICAgICAkdmlld3BvcnQuYXBwZW5kQ2hpbGQoX2NhbnZhc0NvbnRhaW5lci5kb20uaW1hZ2UpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIF9jYW52YXNDb250YWluZXIuY3R4LmltYWdlID0gX2NhbnZhc0NvbnRhaW5lci5kb20uaW1hZ2UuZ2V0Q29udGV4dChcIjJkXCIpO1xyXG4gICAgICAgIF9jYW52YXNDb250YWluZXIuZG9tLmltYWdlLndpZHRoID0gX2lucHV0U3RyZWFtLmdldENhbnZhc1NpemUoKS54O1xyXG4gICAgICAgIF9jYW52YXNDb250YWluZXIuZG9tLmltYWdlLmhlaWdodCA9IF9pbnB1dFN0cmVhbS5nZXRDYW52YXNTaXplKCkueTtcclxuXHJcbiAgICAgICAgX2NhbnZhc0NvbnRhaW5lci5kb20ub3ZlcmxheSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXCJjYW52YXMuZHJhd2luZ0J1ZmZlclwiKTtcclxuICAgICAgICBpZiAoIV9jYW52YXNDb250YWluZXIuZG9tLm92ZXJsYXkpIHtcclxuICAgICAgICAgICAgX2NhbnZhc0NvbnRhaW5lci5kb20ub3ZlcmxheSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJjYW52YXNcIik7XHJcbiAgICAgICAgICAgIF9jYW52YXNDb250YWluZXIuZG9tLm92ZXJsYXkuY2xhc3NOYW1lID0gXCJkcmF3aW5nQnVmZmVyXCI7XHJcbiAgICAgICAgICAgIGlmICgkdmlld3BvcnQpIHtcclxuICAgICAgICAgICAgICAgICR2aWV3cG9ydC5hcHBlbmRDaGlsZChfY2FudmFzQ29udGFpbmVyLmRvbS5vdmVybGF5KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB2YXIgY2xlYXJGaXggPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiYnJcIik7XHJcbiAgICAgICAgICAgIGNsZWFyRml4LnNldEF0dHJpYnV0ZShcImNsZWFyXCIsIFwiYWxsXCIpO1xyXG4gICAgICAgICAgICBpZiAoJHZpZXdwb3J0KSB7XHJcbiAgICAgICAgICAgICAgICAkdmlld3BvcnQuYXBwZW5kQ2hpbGQoY2xlYXJGaXgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIF9jYW52YXNDb250YWluZXIuY3R4Lm92ZXJsYXkgPSBfY2FudmFzQ29udGFpbmVyLmRvbS5vdmVybGF5LmdldENvbnRleHQoXCIyZFwiKTtcclxuICAgICAgICBfY2FudmFzQ29udGFpbmVyLmRvbS5vdmVybGF5LndpZHRoID0gX2lucHV0U3RyZWFtLmdldENhbnZhc1NpemUoKS54O1xyXG4gICAgICAgIF9jYW52YXNDb250YWluZXIuZG9tLm92ZXJsYXkuaGVpZ2h0ID0gX2lucHV0U3RyZWFtLmdldENhbnZhc1NpemUoKS55O1xyXG4gICAgfVxyXG59XHJcblxyXG5mdW5jdGlvbiBpbml0QnVmZmVycyhpbWFnZVdyYXBwZXIpIHtcclxuICAgIGlmIChpbWFnZVdyYXBwZXIpIHtcclxuICAgICAgICBfaW5wdXRJbWFnZVdyYXBwZXIgPSBpbWFnZVdyYXBwZXI7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAgIF9pbnB1dEltYWdlV3JhcHBlciA9IG5ldyBJbWFnZVdyYXBwZXIoe1xyXG4gICAgICAgICAgICB4OiBfaW5wdXRTdHJlYW0uZ2V0V2lkdGgoKSxcclxuICAgICAgICAgICAgeTogX2lucHV0U3RyZWFtLmdldEhlaWdodCgpXHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgaWYgKEVOVi5kZXZlbG9wbWVudCkge1xyXG4gICAgICAgIGNvbnNvbGUubG9nKF9pbnB1dEltYWdlV3JhcHBlci5zaXplKTtcclxuICAgIH1cclxuICA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4gMCkge1xyXG4gICAgICAgICAgICBhdmFpbGFibGVXb3JrZXIgPSBfd29ya2VyUG9vbC5maWx0ZXIoZnVuY3Rpb24od29ya2VyVGhyZWFkKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gIXdvcmtlclRocmVhZC5idXN5O1xyXG4gICAgICAgICAgICB9KVswXTtcclxuICAgICAgICAgICAgaWYgKGF2YWlsYWJsZVdvcmtlcikge1xyXG4gICAgICAgICAgICAgICAgX2ZyYW1lZ3JhYmJlci5hdHRhY2hEYXRhKGF2YWlsYWJsZVdvcmtlci5pbWFnZURhdGEpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuOyAvLyBhbGwgd29ya2VycyBhcmUgYnVzeVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgX2ZyYW1lZ3JhYmJlci5hdHRhY2hEYXRhKF9pbnB1dEltYWdlV3JhcHBlci5kYXRhKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKF9mcmFtZWdyYWJiZXIuZ3JhYigpKSB7XHJcbiAgICAgICAgICAgIGlmIChhdmFpbGFibGVXb3JrZXIpIHtcclxuICAgICAgICAgICAgICAgIGF2YWlsYWJsZVdvcmtlci5idXN5ID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIGF2YWlsYWJsZVdvcmtlci53b3JrZXIucG9zdE1lc3NhZ2Uoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNtZDogJ3Byb2Nlc3MnLFxyXG4gICAgICAgICAgICAgICAgICAgIGltYWdlRGF0YTogYXZhaWxhYmxlV29ya2VyLmltYWdlRGF0YVxyXG4gICAgICAgICAgICAgICAgfSwgW2F2YWlsYWJsZVdvcmtlci5pbWFnZURhdGEuYnVmZmVyXSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBsb2NhdGVBbmREZWNvZGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgbG9jYXRlQW5kRGVjb2RlKCk7XHJcbiAgICB9XHJcbn1cclxuXHJcbmZ1bmN0aW9uIHN0YXJ0Q29udGludW91c1VwZGF0ZSgpIHtcclxuICAgIHZhciBuZXh0ID0gbnVsbCxcclxuICAgICAgICBkZWxheSA9IDEwMDAgLyAoX2NvbmZpZy5mcmVxdWVuY3kgfHwgNjApO1xyXG5cclxuICAgIF9zdG9wcGVkID0gZmFsc2U7XHJcbiAgICAoZnVuY3Rpb24gZnJhbWUodGltZXN0YW1wKSB7XHJcbiAgICAgICAgbmV4dCA9IG5leHQgfHwgdGltZXN0YW1wO1xyXG4gICAgICAgIGlmICghX3N0b3BwZWQpIHtcclxuICAgICAgICAgICAgaWYgKHRpbWVzdGFtcCA+PSBuZXh0KSB7XHJcbiAgICAgICAgICAgICAgICBuZXh0ICs9IGRlbGF5O1xyXG4gICAgICAgICAgICAgICAgdXBkYXRlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgd2luZG93LnJlcXVlc3RBbmltRnJhbWUoZnJhbWUpO1xyXG4gICAgICAgIH1cclxuICAgIH0ocGVyZm9ybWFuY2Uubm93KCkpKTtcclxufVxyXG5cclxuZnVuY3Rpb24gc3RhcnQoKSB7XHJcbiAgICBpZiAoX29uVUlUaHJlYWQgJiYgX2NvbmZpZy5pbnB1dFN0cmVhbS50eXBlID09PSBcIkxpdmVTdHJlYW1cIikge1xyXG4gICAgICAgIHN0YXJ0Q29udGludW91c1VwZGF0ZSgpO1xyXG4gICAgfSBlbHNlIHtcclxuICAgICAgICB1cGRhdGUoKTtcclxuICAgIH1cclxufVxyXG5cclxuZnVuY3Rpb24gaW5pdFdvcmtlcihjYikge1xyXG4gICAgdmFyIGJsb2JVUkwsXHJcbiAgICAgICAgd29ya2VyVGhyZWFkID0ge1xyXG4gICAgICAgICAgICB3b3JrZXI6IHVuZGVmaW5lZCxcclxuICAgICAgICAgICAgaW1hZ2VEYXRhOiBuZXcgVWludDhBcnJheShfaW5wdXRTdHJlYW0uZ2V0V2lkdGgoKSAqIF9pbnB1dFN0cmVhbS5nZXRIZWlnaHQoKSksXHJcbiAgICAgICAgICAgIGJ1c3k6IHRydWVcclxuICAgICAgICB9O1xyXG5cclxuICAgIGJsb2JVUkwgPSBnZW5lcmF0ZVdvcmtlckJsb2IoKTtcclxuICAgIHdvcmtlclRocmVhZC53b3JrZXIgPSBuZXcgV29ya2VyKGJsb2JVUkwpO1xyXG5cclxuICAgIHdvcmtlclRocmVhZC53b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24oZSkge1xyXG4gICAgICAgIGlmIChlLmRhdGEuZXZlbnQgPT09ICdpbml0aWFsaXplZCcpIHtcclxuICAgICAgICAgICAgVVJMLnJldm9rZU9iamVjdFVSTChibG9iVVJMKTtcclxuICAgICAgICAgICAgd29ya2VyVGhyZWFkLmJ1c3kgPSBmYWxzZTtcclxuICAgICAgICAgICAgd29ya2VyVGhyZWFkLmltYWdlRGF0YSA9IG5ldyBVaW50OEFycmF5KGUuZGF0YS5pbWFnZURhdGEpO1xyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50KSB7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIldvcmtlciBpbml0aWFsaXplZFwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gY2Iod29ya2VyVGhyZWFkKTtcclxuICAgICAgICB9IGVsc2UgaWYgKGUuZGF0YS5ldmVudCA9PT0gJ3Byb2Nlc3NlZCcpIHtcclxuICAgICAgICAgICAgd29ya2VyVGhyZWFkLmltYWdlRGF0YSA9IG5ldyBVaW50OEFycmF5KGUuZGF0YS5pbWFnZURhdGEpO1xyXG4gICAgICAgICAgICB3b3JrZXJUaHJlYWQuYnVzeSA9IGZhbHNlO1xyXG4gICAgICAgICAgICBwdWJsaXNoUmVzdW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ICAgICAgfSk7XHJcbiAgICAgICAgX3dvcmtlclBvb2wgPSBfd29ya2VyUG9vbC5zbGljZSgwLCBpbmNyZWFzZUJ5KTtcclxuICAgICAgICByZXR1cm4gY2IgJiYgY2IoKTtcclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBpbmNyZWFzZUJ5OyBpKyspIHtcclxuICAgICAgICAgICAgaW5pdFdvcmtlcih3b3JrZXJJbml0aWFsaXplZCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiB3b3JrZXJJbml0aWFsaXplZCh3b3JrZXJUaHJlYWQpIHtcclxuICAgICAgICAgICAgX3dvcmtlclBvb2wucHVzaCh3b3JrZXJUaHJlYWQpO1xyXG4gICAgICAgICAgICBpZiAoX3dvcmtlclBvb2wubGVuZ3RoID49IGNhcGFjaXR5KXtcclxuICAgICAgICAgICAgICAgIGNiICYmIGNiKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIGluaXQ6IGZ1bmN0aW9uKGNvbmZpZywgY2IsIGltYWdlV3JhcHBlcikge1xyXG4gICAgICAgIF9jb25maWcgPSBtZXJnZSh7fSwgQ29uZmlnLCBjb25maWcpO1xyXG4gICAgICAgIGlmIChpbWFnZVdyYXBwZXIpIHtcclxuICAgICAgICAgICAgX29uVUlUaHJlYWQgPSBmYWxzZTtcclxuICAgICAgICAgICAgaW5pdGlhbGl6ZURhdGEoaW1hZ2VXcmFwcGVyKTtcclxuICAgICAgICAgICAgcmV0dXJuIGNiKCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaW5pdElucHV0U3RyZWFtKGNiKTtcclxuICAgICAgICB9XHJcbiAgICB9LFxyXG4gICAgc3RhcnQ6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgIHN0YXJ0KCk7XHJcbi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AgICB9LFxyXG4gICAgcmVnaXN0ZXJSZXN1bHRDb2xsZWN0b3I6IGZ1bmN0aW9uKHJlc3VsdENvbGxlY3Rvcikge1xyXG4gICAgICAgIGlmIChyZXN1bHRDb2xsZWN0b3IgJiYgdHlwZW9mIHJlc3VsdENvbGxlY3Rvci5hZGRSZXN1bHQgPT09ICdmdW5jdGlvbicpIHtcclxuICAgICAgICAgICAgX3Jlc3VsdENvbGxlY3RvciA9IHJlc3VsdENvbGxlY3RvcjtcclxuICAgICAgICB9XHJcbiAgICB9LFxyXG4gICAgY2FudmFzOiBfY2FudmFzQ29udGFpbmVyLFxyXG4gICAgZGVjb2RlU2luZ2xlOiBmdW5jdGlvbihjb25maWcsIHJlc3VsdENhbGxiYWNrKSB7XHJcbiAgICAgICAgY29uZmlnID0gbWVyZ2Uoe1xyXG4gICAgICAgICAgICBpbnB1dFN0cmVhbToge1xyXG4gICAgICAgICAgICAgICAgdHlwZTogXCJJbWFnZVN0cmVhbVwiLFxyXG4gICAgICAgICAgICAgICAgc2VxdWVuY2U6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgc2l6ZTogODAwLFxyXG4gICAgICAgICAgICAgICAgc3JjOiBjb25maWcuc3JjXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIG51bU9mV29ya2VyczogKEVOVi5kZXZlbG9wbWVudCAmJiBjb25maWcuZGVidWcpID8gMCA6IDEsXHJcbiAgICAgICAgICAgIGxvY2F0b3I6IHtcclxuICAgICAgICAgICAgICAgIGhhbGZTYW1wbGU6IGZhbHNlXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LCBjb25maWcpO1xyXG4gICAgICAgIHRoaXMuaW5pdChjb25maWcsIGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICBFdmVudHMub25jZShcInByb2Nlc3NlZFwiLCBmdW5jdGlvbihyZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgIF9zdG9wcGVkID0gdHJ1ZTtcclxuICAgICA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3IgKCBreSA9IC1rU2l6ZTsga3kgPD0ga1NpemU7IGt5KyspIHtcclxuICAgICAgICAgICAgICAgIGZvciAoIGt4ID0gLWtTaXplOyBreCA8PSBrU2l6ZTsga3grKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjY3UgKz0ga2VybmVsW2t5ICsga1NpemVdW2t4ICsga1NpemVdICogdGhpcy5nZXRTYWZlKHggKyBreCwgeSArIGt5KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0aGlzLmRhdGFbeSAqIHRoaXMuc2l6ZS54ICsgeF0gPSBhY2N1O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufTtcclxuXHJcbkltYWdlV3JhcHBlci5wcm90b3R5cGUubW9tZW50cyA9IGZ1bmN0aW9uKGxhYmVsY291bnQpIHtcclxuICAgIHZhciBkYXRhID0gdGhpcy5kYXRhLFxyXG4gICAgICAgIHgsXHJcbiAgICAgICAgeSxcclxuICAgICAgICBoZWlnaHQgPSB0aGlzLnNpemUueSxcclxuICAgICAgICB3aWR0aCA9IHRoaXMuc2l6ZS54LFxyXG4gICAgICAgIHZhbCxcclxuICAgICAgICB5c3EsXHJcbiAgICAgICAgbGFiZWxzdW0gPSBbXSxcclxuICAgICAgICBpLFxyXG4gICAgICAgIGxhYmVsLFxyXG4gICAgICAgIG11MTEsXHJcbiAgICAgICAgbXUwMixcclxuICAgICAgICBtdTIwLFxyXG4gICAgICAgIHhfLFxyXG4gICAgICAgIHlfLFxyXG4gICAgICAgIHRtcCxcclxuICAgICAgICByZXN1bHQgPSBbXSxcclxuICAgICAgICBQSSA9IE1hdGguUEksXHJcbiAgICAgICAgUElfNCA9IFBJIC8gNDtcclxuXHJcbiAgICBpZiAobGFiZWxjb3VudCA8PSAwKSB7XHJcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IGxhYmVsY291bnQ7IGkrKykge1xyXG4gICAgICAgIGxhYmVsc3VtW2ldID0ge1xyXG4gICAgICAgICAgICBtMDA6IDAsXHJcbiAgICAgICAgICAgIG0wMTogMCxcclxuICAgICAgICAgICAgbTEwOiAwLFxyXG4gICAgICAgICAgICBtMTE6IDAsXHJcbiAgICAgICAgICAgIG0wMjogMCxcclxuICAgICAgICAgICAgbTIwOiAwLFxyXG4gICAgICAgICAgICB0aGV0YTogMCxcclxuICAgICAgICAgICAgcmFkOiAwXHJcbiAgICAgICAgfTtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCB5ID0gMDsgeSA8IGhlaWdodDsgeSsrKSB7XHJcbiAgICAgICAgeXNxID0geSAqIHk7XHJcbiAgICAgICAgZm9yICggeCA9IDA7IHggPCB3aWR0aDsgeCsrKSB7XHJcbiAgICAgICAgICAgIHZhbCA9IGRhdGFbeSAqIHdpZHRoICsgeF07XHJcbiAgICAgICAgICAgIGlmICh2YWwgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbCA9IGxhYmVsc3VtW3ZhbCAtIDFdO1xyXG4gICAgICAgICAgICAgICAgbGFiZWwubTAwICs9IDE7XHJcbiAgICAgICAgICAgICAgICBsYWJlbC5tMDEgKz0geTtcclxuICAgICAgICAgICAgICAgIGxhYmVsLm0xMCArPSB4O1xyXG4gICAgICAgICAgICAgICAgbGFiZWwubTExICs9IHggKiB5O1xyXG4gICAgICAgICAgICAgICAgbGFiZWwubTAyICs9IHlzcTtcclxuICAgICAgICAgICAgICAgIGxhYmVsLm0yMCArPSB4ICogeDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IGxhYmVsY291bnQ7IGkrKykge1xyXG4gICAgICAgIGxhYmVsID0gbGFiZWxzdW1baV07XHJcbiAgICAgICAgaWYgKCFpc05hTihsYWJlbC5tMDApICYmIGxhYmVsLm0wMCAhPT0gMCkge1xyXG4gICAgICAgICAgICB4XyA9IGxhYmVsLm0xMCAvIGxhYmVsLm0wMDtcclxuICAgICAgICAgICAgeV8gPSBsYWJlbC5tMDEgLyBsYWJlbC5tMDA7XHJcbiAgICAgICAgICAgIG11MTEgPSBsYWJlbC5tMTEgLyBsYWJlbC5tMDAgLSB4XyAqIHlfO1xyXG4gICAgICAgICAgICBtdTAyID0gbGFiZWwubTAyIC8gbGFiZWwubTAwIC0geV8gKiB5XztcclxuICAgICAgICAgICAgbXUyMCA9IGxhYmVsLm0yMCAvIGxhYmVsLm0wMCAtIHhfICogeF87XHJcbiAgICAgICAgICAgIHRtcCA9IChtdTAyIC0gbXUyMCkgLyAoMiAqIG11MTEpO1xyXG4gICAgICAgICAgICB0bXAgPSAwLjUgKiBNYXRoLmF0YW4odG1wKSArIChtdTExID49IDAgPyBQSV80IDogLVBJXzQgKSArIFBJO1xyXG4gICAgICAgICAgICBsYWJlbC50aGV0YSA9ICh0bXAgKiAxODAgLyBQSSArIDkwKSAlIDE4MCAtIDkwO1xyXG4gICAgICAgICAgICBpZiAobGFiZWwudGhldGEgPCAwKSB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbC50aGV0YSArPSAxODA7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGFiZWwucmFkID0gdG1wID4gUEkgPyB0bXAgLSBQSSA6IHRtcDtcclxuICAgICAgICAgICAgbGFiZWwudmVjID0gdmVjMi5jbG9uZShbTWF0aC5jb3ModG1wKSwgTWF0aC5zaW4odG1wKV0pO1xyXG4gICAgICAgICAgICByZXN1bHQucHVzaChsYWJlbCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiByZXN1bHQ7XHJcbn07XHJcblxyXG4vKipcclxuICogRGlzcGxheXMgdGhlIHtJbWFnZVdyYXBwZXJ9IGluIGEgZ2l2ZW4gY2FudmFzXHJcbiAqIEBwYXJhbSBjYW52YXMge0NhbnZhc30gVGhlIGNhbnZhcyBlbGVtZW50IHRvIHdyaX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ICAgICAgdmFyIHZldCA9IFswXSwgcDEsIHAyLCBwMTIsIGssIG0xLCBtMiwgbTEyLFxyXG4gICAgICAgICAgICBtYXggPSAoMSA8PCBiaXRzUGVyUGl4ZWwpIC0gMTtcclxuXHJcbiAgICAgICAgaGlzdCA9IENWVXRpbHMuY29tcHV0ZUhpc3RvZ3JhbShpbWFnZVdyYXBwZXIsIGJpdHNQZXJQaXhlbCk7XHJcbiAgICAgICAgZm9yICggayA9IDE7IGsgPCBtYXg7IGsrKykge1xyXG4gICAgICAgICAgICBwMSA9IHB4KDAsIGspO1xyXG4gICAgICAgICAgICBwMiA9IHB4KGsgKyAxLCBtYXgpO1xyXG4gICAgICAgICAgICBwMTIgPSBwMSAqIHAyO1xyXG4gICAgICAgICAgICBpZiAocDEyID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICBwMTIgPSAxO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIG0xID0gbXgoMCwgaykgKiBwMjtcclxuICAgICAgICAgICAgbTIgPSBteChrICsgMSwgbWF4KSAqIHAxO1xyXG4gICAgICAgICAgICBtMTIgPSBtMSAtIG0yO1xyXG4gICAgICAgICAgICB2ZXRba10gPSBtMTIgKiBtMTIgLyBwMTI7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBBcnJheUhlbHBlci5tYXhJbmRleCh2ZXQpO1xyXG4gICAgfVxyXG5cclxuICAgIHRocmVzaG9sZCA9IGRldGVybWluZVRocmVzaG9sZCgpO1xyXG4gICAgcmV0dXJuIHRocmVzaG9sZCA8PCBiaXRTaGlmdDtcclxufTtcclxuXHJcbkNWVXRpbHMub3RzdVRocmVzaG9sZCA9IGZ1bmN0aW9uKGltYWdlV3JhcHBlciwgdGFyZ2V0V3JhcHBlcikge1xyXG4gICAgdmFyIHRocmVzaG9sZCA9IENWVXRpbHMuZGV0ZXJtaW5lT3RzdVRocmVzaG9sZChpbWFnZVdyYXBwZXIpO1xyXG5cclxuICAgIENWVXRpbHM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b2ludChwb2ludHNbaV0sIGksIHByb3BlcnR5KTtcclxuICAgICAgICBpZiAoIWFkZFRvQ2x1c3Rlcihwb2ludCkpIHtcclxuICAgICAgICAgICAgY2x1c3RlcnMucHVzaChDbHVzdGVyMi5jcmVhdGUocG9pbnQsIHRocmVzaG9sZCkpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBjbHVzdGVycztcclxufTtcclxuXHJcbkNWVXRpbHMuVHJhY2VyID0ge1xyXG4gICAgdHJhY2U6IGZ1bmN0aW9uKHBvaW50cywgdmVjKSB7XHJcbiAgICAgICAgdmFyIGl0ZXJhdGlvbiwgbWF4SXRlcmF0aW9ucyA9IDEwLCB0b3AgPSBbXSwgcmVzdWx0ID0gW10sIGNlbnRlclBvcyA9IDAsIGN1cnJlbnRQb3MgPSAwO1xyXG5cclxuICAgICAgICBmdW5jdGlvbiB0cmFjZShpZHgsIGZvcndhcmQpIHtcclxuICAgICAgICAgICAgdmFyIGZyb20sIHRvLCB0b0lkeCwgcHJlZGljdGVkUG9zLCB0aHJlc2hvbGRYID0gMSwgdGhyZXNob2xkWSA9IE1hdGguYWJzKHZlY1sxXSAvIDEwKSwgZm91bmQgPSBmYWxzZTtcclxuXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIG1hdGNoKHBvcywgcHJlZGljdGVkKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAocG9zLnggPiAocHJlZGljdGVkLnggLSB0aHJlc2hvbGRYKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAmJiBwb3MueCA8IChwcmVkaWN0ZWQueCArIHRocmVzaG9sZFgpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICYmIHBvcy55ID4gKHByZWRpY3RlZC55IC0gdGhyZXNob2xkWSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgJiYgcG9zLnkgPCAocHJlZGljdGVkLnkgKyB0aHJlc2hvbGRZKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8vIGNoZWNrIGlmIHRoZSBuZXh0IGluZGV4IGlzIHdpdGhpbiB0aGUgdmVjIHNwZWNpZmljYXRpb25zXHJcbiAgICAgICAgICAgIC8vIGlmIG5vdCwgY2hlY2sgYXMgbG9uZyBhcyB0aGUgdGhyZXNob2xkIGlzIG1ldFxyXG5cclxuICAgICAgICAgICAgZnJvbSA9IHBvaW50c1tpZHhdO1xyXG4gICAgICAgICAgICBpZiAoZm9yd2FyZCkge1xyXG4gICAgICAgICAgICAgICAgcHJlZGljdGVkUG9zID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIHg6IGZyb20ueCArIHZlY1swXSxcclxuICAgICAgICAgICAgICAgICAgICB5OiBmcm9tLnkgKyB2ZWNbMV1cclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBwcmVkaWN0ZWRQb3MgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgeDogZnJvbS54IC0gdmVjWzBdLFxyXG4gICAgICAgICAgICAgICAgICAgIHk6IGZyb20ueSAtIHZlY1sxXVxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgdG9JZHggPSBmb3J3YXJkID8gaWR4ICsgMSA6IGlkeCAtIDE7XHJcbiAgICAgICAgICAgIHRvID0gcG9pbnRzW3RvSWR4XTtcclxuICAgICAgICAgICAgd2hpbGUgKHRvICYmICggZm91bmQgPSBtYXRjaCh0bywgcHJlZGljdGVkUG9zKSkgIT09IHRydWUgJiYgKE1hdGguYWJzKHRvLnkgLSBmcm9tLnkpIDwgdmVjWzFdKSkge1xyXG4gICAgICAgICAgICAgICAgdG9JZHggPSBmb3J3YXJkID8gdG9JZHggKyAxIDogdG9JZHggLSAxO1xyXG4gICAgICAgICAgICAgICAgdG8gPSBwb2ludHNbdG9JZHhdO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gZm91bmQgPyB0b0lkeCA6IG51bGw7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmb3IgKCBpdGVyYXRpb24gPSAwOyBpdGVyYXRpb24gPCBtYXhJdGVyYXRpb25zOyBpdGVyYXRpb24rKykge1xyXG4gICAgICAgICAgICAvLyByYW5kb21seSBzZWxlY3QgcG9pbnQgdG8gc3RhcnQgd2l0aFxyXG4gICAgICAgICAgICBjZW50ZXJQb3MgPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiBwb2ludHMubGVuZ3RoKTtcclxuXHJcbiAgICAgICAgICAgIC8vIHRyYWNlIGZvcndhcmRcclxuICAgICAgICAgICAgdG9wID0gW107XHJcbiAgICAgICAgICAgIGN1cnJlbnRQb3MgPSBjZW50ZXJQb3M7XHJcbiAgICAgICAgICAgIHRvcC5wdXNoKHBvaW50c1tjdXJyZW50UG9zXSk7XHJcbiAgICAgICAgICAgIHdoaWxlICgoIGN1cnJlbnRQb3MgPSB0cmFjZShjdXJyZW50UG9zLCB0cnVlKSkgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIHRvcC5wdXNoKHBvaW50c1tjdXJyZW50UG9zXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKGNlbnRlclBvcyA+IDApIHtcclxuICAgICAgICAgICAgICAgIGN1cnJlbnRQb3MgPSBjZW50ZXJQb3M7XHJcbiAgICAgICAgICAgICAgICB3aGlsZSAoKCBjdXJyZW50UG9zID0gdHJhY2UoY3VycmVudFBvcywgZmFsc2UpKSAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRvcC5wdXNoKHBvaW50c1tjdXJyZW50UG9zXSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh0b3AubGVuZ3RoID4gcmVzdWx0Lmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gdG9wO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiByZXN1bHQ7XHJcbiAgICB9XHJcbn07XHJcblxyXG5DVlV0aWxzLkRJTEFURSA9IDE7XHJcbkNWVXRpbHMuRVJPREUgPSAyO1xyXG5cclxuQ1ZVdGlscy5kaWxhdGUgPSBmdW5jdGlvbihpbkltYWdlV3JhcHBlciwgb3V0SW1hZ2VXcmFwcGVyKSB7XHJcbiAgICB2YXIgdixcclxuICAgICAgICB1LFxyXG4gICAgICAgIGluSW1hZ2VEYXRhID0gaW5JbWFnZVdyYXBwZXIuZGF0YSxcclxuICAgICAgICBvdXRJbWFnZURhdGEgPSBvdXRJbWFnZVdyYXBwZXIuZGF0YSxcclxuICAgICAgICBoZWlnaHQgPSBpbkltYWdlV3JhcHBlci5zaXplLnksXHJcbiAgICAgICAgd2lkdGggPSBpbkltYWdlV3JhcHBlci5zaXplLngsXHJcbiAgICAgICAgc3VtLFxyXG4gICAgICAgIHlTdGFydDEsXHJcbiAgICAgICAgeVN0YXJ0MixcclxuICAgICAgICB4U3RhcnQxLFxyXG4gICAgICAgIHhTdGFydDI7XHJcblxyXG4gICAgZm9yICggdiA9IDE7IHYgPCBoZWlnaHQgLSAxOyB2KyspIHtcclxuICAgICAgICBmb3IgKCB1ID0gMTsgdSA8IHdpZHRoIC0gMTsgdSsrKSB7XHJcbiAgICAgICAgICAgIHlTdGFydDEgPSB2IC0gMTtcclxuICAgICAgICAgICAgeVN0YXJ0MiA9IHYgKyAxO1xyXG4gICAgICAgICAgICB4U3RhcnQxID0gdSAtIDE7XHJcbiAgICAgICAgICAgIHhTdGFydDIgPSB1ICsgMTtcclxuICAgICAgICAgICAgc3VtID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Gxpc3QsIHRvcCwgc2NvcmVGdW5jKSB7XHJcbiAgICB2YXIgaSwgbWluSWR4ID0gMCwgbWluID0gMCwgcXVldWUgPSBbXSwgc2NvcmUsIGhpdCwgcG9zO1xyXG5cclxuICAgIGZvciAoIGkgPSAwOyBpIDwgdG9wOyBpKyspIHtcclxuICAgICAgICBxdWV1ZVtpXSA9IHtcclxuICAgICAgICAgICAgc2NvcmU6IDAsXHJcbiAgICAgICAgICAgIGl0ZW06IG51bGxcclxuICAgICAgICB9O1xyXG4gICAgfVxyXG5cclxuICAgIGZvciAoIGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIHNjb3JlID0gc2NvcmVGdW5jLmFwcGx5KHRoaXMsIFtsaXN0W2ldXSk7XHJcbiAgICAgICAgaWYgKHNjb3JlID4gbWluKSB7XHJcbiAgICAgICAgICAgIGhpdCA9IHF1ZXVlW21pbklkeF07XHJcbiAgICAgICAgICAgIGhpdC5zY29yZSA9IHNjb3JlO1xyXG4gICAgICAgICAgICBoaXQuaXRlbSA9IGxpc3RbaV07XHJcbiAgICAgICAgICAgIG1pbiA9IE51bWJlci5NQVhfVkFMVUU7XHJcbiAgICAgICAgICAgIGZvciAoIHBvcyA9IDA7IHBvcyA8IHRvcDsgcG9zKyspIHtcclxuICAgICAgICAgICAgICAgIGlmIChxdWV1ZVtwb3NdLnNjb3JlIDwgbWluKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbWluID0gcXVldWVbcG9zXS5zY29yZTtcclxuICAgICAgICAgICAgICAgICAgICBtaW5JZHggPSBwb3M7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHF1ZXVlO1xyXG59O1xyXG5cclxuQ1ZVdGlscy5ncmF5QXJyYXlGcm9tSW1hZ2UgPSBmdW5jdGlvbihodG1sSW1hZ2UsIG9mZnNldFgsIGN0eCwgY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BvdXRXaWR0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIG91dEFycmF5W291dEltZ0lkeF0gPSBNYXRoLmZsb29yKChcclxuICAgICAgICAgICAgICAgICgwLjI5OSAqIGNhbnZhc0RhdGFbdG9wUm93SWR4ICogNCArIDBdICtcclxuICAgICAgICAgICAgICAgICAwLjU4NyAqIGNhbnZhc0RhdGFbdG9wUm93SWR4ICogNCArIDFdICtcclxuICAgICAgICAgICAgICAgICAwLjExNCAqIGNhbnZhc0RhdGFbdG9wUm93SWR4ICogNCArIDJdKSArXHJcbiAgICAgICAgICAgICAgICAoMC4yOTkgKiBjYW52YXNEYXRhWyh0b3BSb3dJZHggKyAxKSAqIDQgKyAwXSArXHJcbiAgICAgICAgICAgICAgICAgMC41ODcgKiBjYW52YXNEYXRhWyh0b3BSb3dJZHggKyAxKSAqIDQgKyAxXSArXHJcbiAgICAgICAgICAgICAgICAgMC4xMTQgKiBjYW52YXNEYXRhWyh0b3BSb3dJZHggKyAxKSAqIDQgKyAyXSkgK1xyXG4gICAgICAgICAgICAgICAgKDAuMjk5ICogY2FudmFzRGF0YVsoYm90dG9tUm93SWR4KSAqIDQgKyAwXSArXHJcbiAgICAgICAgICAgICAgICAgMC41ODcgKiBjYW52YXNEYXRhWyhib3R0b21Sb3dJZHgpICogNCArIDFdICtcclxuICAgICAgICAgICAgICAgICAwLjExNCAqIGNhbnZhc0RhdGFbKGJvdHRvbVJvd0lkeCkgKiA0ICsgMl0pICtcclxuICAgICAgICAgICAgICAgICgwLjI5OSAqIGNhbnZhc0RhdGFbKGJvdHRvbVJvd0lkeCArIDEpICogNCArIDBdICtcclxuICAgICAgICAgICAgICAgICAwLjU4NyAqIGNhbnZhc0RhdGFbKGJvdHRvbVJvd0lkeCArIDEpICogNCArIDFdICtcclxuICAgICAgICAgICAgICAgICAwLjExNCAqIGNhbnZhc0RhdGFbKGJvdHRvbVJvd0lkeCArIDEpICogNCArIDJdKSkgLyA0KTtcclxuICAgICAgICAgICAgb3V0SW1nSWR4Kys7XHJcbiAgICAgICAgICAgIHRvcFJvd0lkeCA9IHRvcFJvd0lkeCArIDI7XHJcbiAgICAgICAgICAgIGJvdHRvbVJvd0lkeCA9IGJvdHRvbVJvd0lkeCArIDI7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRvcFJvd0lkeCA9IHRvcFJvd0lkeCArIGluV2lkdGg7XHJcbiAgICAgICAgYm90dG9tUm93SWR4ID0gYm90dG9tUm93SWR4ICsgaW5XaWR0aDtcclxuICAgIH1cclxufTtcclxuXHJcbkNWVXRpbHMuY29tcHV0ZUdyYXkgPSBmdW5jdGlvbihpbWFnZURhdGEsIG91dEFycmF5LCBjb25maWcpIHtcclxuICAgIHZhciBsID0gKGltYWdlRGF0YS5sZW5ndGggLyA0KSB8IDAsXHJcbiAgICAgICAgaSxcclxuICAgICAgICBzaW5nbGVDaGFubmVsID0gY29uZmlnICYmIGNvbmZpZy5zaW5nbGVDaGFubmVsID09PSB0cnVlO1xyXG5cclxuICAgIGlmIChzaW5nbGVDaGFubmVsKSB7XHJcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGw7IGkrKykge1xyXG4gICAgICAgICAgICBvdXRBcnJheVtpXSA9IGltYWdlRGF0YVtpICogNCArIDBdO1xyXG4gICAgICAgIH1cclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGw7IGkrKykge1xyXG4gICAgICAgICAgICBvdXRBcnJheVtpXSA9IE1hdGguZmxvb3IoXHJcbiAgICAgICAgICAgICAgICAwLjI5OSAqIGltYWdlRGF0YVtpICogNCArIDBdICsgMC41ODcgKiBpbWFnZURhdGFbaSAqIDQgKyAxXSArIDAuMTE0ICogaW1hZ2VEYXRhW2kgKiA0ICsgMl0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufTtcclxuXHJcbkNWVXRpbHMubG9hZEltYWdlQXJyYXkgPSBmdW5jdGlvbihzcmMsIGNhbGxiYWNrLCBjYW52YXMpIH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ICAgIH1cclxufTtcclxuXHJcbkNWVXRpbHMuaHN2MnJnYiA9IGZ1bmN0aW9uKGhzdiwgcmdiKSB7XHJcbiAgICB2YXIgaCA9IGhzdlswXSxcclxuICAgICAgICBzID0gaHN2WzFdLFxyXG4gICAgICAgIHYgPSBoc3ZbMl0sXHJcbiAgICAgICAgYyA9IHYgKiBzLFxyXG4gICAgICAgIHggPSBjICogKDEgLSBNYXRoLmFicygoaCAvIDYwKSAlIDIgLSAxKSksXHJcbiAgICAgICAgbSA9IHYgLSBjLFxyXG4gICAgICAgIHIgPSAwLFxyXG4gICAgICAgIGcgPSAwLFxyXG4gICAgICAgIGIgPSAwO1xyXG5cclxuICAgIHJnYiA9IHJnYiB8fCBbMCwgMCwgMF07XHJcblxyXG4gICAgaWYgKGggPCA2MCkge1xyXG4gICAgICAgIHIgPSBjO1xyXG4gICAgICAgIGcgPSB4O1xyXG4gICAgfSBlbHNlIGlmIChoIDwgMTIwKSB7XHJcbiAgICAgICAgciA9IHg7XHJcbiAgICAgICAgZyA9IGM7XHJcbiAgICB9IGVsc2UgaWYgKGggPCAxODApIHtcclxuICAgICAgICBnID0gYztcclxuICAgICAgICBiID0geDtcclxuICAgIH0gZWxzZSBpZiAoaCA8IDI0MCkge1xyXG4gICAgICAgIGcgPSB4O1xyXG4gICAgICAgIGIgPSBjO1xyXG4gICAgfSBlbHNlIGlmIChoIDwgMzAwKSB7XHJcbiAgICAgICAgciA9IHg7XHJcbiAgICAgICAgYiA9IGM7XHJcbiAgICB9IGVsc2UgaWYgKGggPCAzNjApIHtcclxuICAgICAgICByID0gYztcclxuICAgICAgICBiID0geDtcclxuICAgIH1cclxuICAgIHJnYlswXSA9ICgociArIG0pICogMjU1KSB8IDA7XHJcbiAgICByZ2JbMV0gPSAoKGcgKyBtKSAqIDI1NSkgfCAwO1xyXG4gICAgcmdiWzJdID0gKChiICsgbSkgKiAyNTUpIHwgMDtcclxuICAgIHJldHVybiByZ2I7XHJcbn07XHJcblxyXG5DVlV0aWxzLl9jb21wdXRlRGl2aXNvcnMgPSBmdW5jdGlvbihuKSB7XHJcbiAgICB2YXIgbGFyZ2VEaXZpc29ycyA9IFtdLFxyXG4gICAgICAgIGRpdmlzb3JzID0gW10sXHJcbiAgICAgICAgaTtcclxuXHJcbiAgICBmb3IgKGkgPSAxOyBpIDwgTWF0aC5zcXJ0KG4pICsgMTsgaSsrKSB7XHJcbiAgICAgICAgaWYgKG4gJSBpID09PSAwKSB7XHJcbiAgICAgICAgICAgIGRpdmlzb3JzLnB1c2goaSk7XHJcbiAgICAgICAgICAgIGlmIChpICE9PSBuIC8gaSkge1xyXG4gICAgICAgICAgICAgICAgbGFyZ2VEaXZpc29ycy51bnNoaWZ0KE1hdGguZmxvb3IobiAvIGkpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBkaXZpc29ycy5jb25jYXQobGFyZ2VEaXZpc29ycyk7XHJcbn07XHJcblxyXG5DVlV0aWxzLl9jb21wdXRlSW50ZXJzZWN0aW9uID0gZnVuY3Rpb24oYXJyMSwgYXJyMikge1xyXG4gICAgdmFyIGkgPSAwLFxyXG4gICAgICAgIGogPSAwLFxyXG4gICAgICAgIHJlc3VsdCA9IFtdO1xyXG5cclxuICAgIHdoaWxlIChpIDwgYXJyMS5sZW5ndGggJiYgaiA8IGFycjIubGVuZ3RoKSB7XHJcbiAgICAgICAgaWYgKGFycjFbaV0gPT09IGFycjJbal0pIHtcclxuICAgICAgICAgICAgcmVzdWx0LnB1c2goYXJyMVtpXSk7XHJcbiAgICAgICAgICAgIGkrKztcclxuICAgICAgICAgICAgaisrO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoYXJyMVtpXSA+IGFycjJbal0pIHtcclxuICAgICAgICAgICAgaisrO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGkrKztcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gcmVzdWx0O1xy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xuICAgICAgICAgICAgY2VudGVyID0ge1xyXG4gICAgICAgICAgICAgICAgcmFkOiAwLFxyXG4gICAgICAgICAgICAgICAgdmVjOiB2ZWMyLmNsb25lKFswLCAwXSlcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgcG9pbnRNYXAgPSB7fTtcclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaW5pdCgpIHtcclxuICAgICAgICAgICAgYWRkKHBvaW50KTtcclxuICAgICAgICAgICAgdXBkYXRlQ2VudGVyKCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBhZGQocG9pbnRUb0FkZCkge1xyXG4gICAgICAgICAgICBwb2ludE1hcFtwb2ludFRvQWRkLmlkXSA9IHBvaW50VG9BZGQ7XHJcbiAgICAgICAgICAgIHBvaW50cy5wdXNoKHBvaW50VG9BZGQpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gdXBkYXRlQ2VudGVyKCkge1xyXG4gICAgICAgICAgICB2YXIgaSwgc3VtID0gMDtcclxuICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCBwb2ludHMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIHN1bSArPSBwb2ludHNbaV0ucmFkO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNlbnRlci5yYWQgPSBzdW0gLyBwb2ludHMubGVuZ3RoO1xyXG4gICAgICAgICAgICBjZW50ZXIudmVjID0gdmVjMi5jbG9uZShbTWF0aC5jb3MoY2VudGVyLnJhZCksIE1hdGguc2luKGNlbnRlci5yYWQpXSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpbml0KCk7XHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIGFkZDogZnVuY3Rpb24ocG9pbnRUb0FkZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKCFwb2ludE1hcFtwb2ludFRvQWRkLmlkXSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGFkZChwb2ludFRvQWRkKTtcclxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVDZW50ZXIoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZml0czogZnVuY3Rpb24ob3RoZXJQb2ludCkge1xyXG4gICAgICAgICAgICAgICAgLy8gY2hlY2sgY29zaW5lIHNpbWlsYXJpdHkgdG8gY2VudGVyLWFuZ2xlXHJcbiAgICAgICAgICAgICAgICB2YXIgc2ltaWxhcml0eSA9IE1hdGguYWJzKHZlYzIuZG90KG90aGVyUG9pbnQucG9pbnQudmVjLCBjZW50ZXIudmVjKSk7XHJcbiAgICAgICAgICAgICAgICBpZiAoc2ltaWxhcml0eSA+IHRocmVzaG9sZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXRQb2ludHM6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHBvaW50cztcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZ2V0Q2VudGVyOiBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBjZW50ZXI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG4gICAgfSxcclxuICAgIGNyZWF0ZVBvaW50OiBmdW5jdGlvbihuZXdQb2ludCwgaWQsIHByb3BlcnR5KSB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgcmFkOiBuZXdQb2ludFtwcm9wZXJ0eV0sXHJcbiAgICAgICAgICAgIHBvaW50OiBuZXdQb2ludCxcclxuICAgICAgICAgICAgaWQ6IGlkXHJcbiAgICAgICAgfTtcclxuICAgIH1cclxufTtcclxuXG5cblxu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zb3VyY2UgbWF0cml4XG4gKiBAcmV0dXJucyB7bWF0NH0gb3V0XG4gKi9cbm1hdDQudHJhbnNwb3NlID0gZnVuY3Rpb24ob3V0LCBhKSB7XG4gICAgLy8gSWYgd2UgYXJlIHRyYW5zcG9zaW5nIG91cnNlbHZlcyB3ZSBjYW4gc2tpcCBhIGZldyBzdGVwcyBidXQgaGF2ZSB0byBjYWNoZSBzb21lIHZhbHVlc1xuICAgIGlmIChvdXQgPT09IGEpIHtcbiAgICAgICAgdmFyIGEwMSA9IGFbMV0sIGEwMiA9IGFbMl0sIGEwMyA9IGFbM10sXG4gICAgICAgICAgICBhMTIgPSBhWzZdLCBhMTMgPSBhWzddLFxuICAgICAgICAgICAgYTIzID0gYVsxMV07XG5cbiAgICAgICAgb3V0WzFdID0gYVs0XTtcbiAgICAgICAgb3V0WzJdID0gYVs4XTtcbiAgICAgICAgb3V0WzNdID0gYVsxMl07XG4gICAgICAgIG91dFs0XSA9IGEwMTtcbiAgICAgICAgb3V0WzZdID0gYVs5XTtcbiAgICAgICAgb3V0WzddID0gYVsxM107XG4gICAgICAgIG91dFs4XSA9IGEwMjtcbiAgICAgICAgb3V0WzldID0gYTEyO1xuICAgICAgICBvdXRbMTFdID0gYVsxNF07XG4gICAgICAgIG91dFsxMl0gPSBhMDM7XG4gICAgICAgIG91dFsxM10gPSBhMTM7XG4gICAgICAgIG91dFsxNF0gPSBhMjM7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgb3V0WzBdID0gYVswXTtcbiAgICAgICAgb3V0WzFdID0gYVs0XTtcbiAgICAgICAgb3V0WzJdID0gYVs4XTtcbiAgICAgICAgb3V0WzNdID0gYVsxMl07XG4gICAgICAgIG91dFs0XSA9IGFbMV07XG4gICAgICAgIG91dFs1XSA9IGFbNV07XG4gICAgICAgIG91dFs2XSA9IGFbOV07XG4gICAgICAgIG91dFs3XSA9IGFbMTNdO1xuICAgICAgICBvdXRbOF0gPSBhWzJdO1xuICAgICAgICBvdXRbOV0g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CBhMjIsIGEyMztcblxuICAgIGlmIChhID09PSBvdXQpIHtcbiAgICAgICAgb3V0WzEyXSA9IGFbMF0gKiB4ICsgYVs0XSAqIHkgKyBhWzhdICogeiArIGFbMTJdO1xuICAgICAgICBvdXRbMTNdID0gYVsxXSAqIHggKyBhWzVdICogeSArIGFbOV0gKiB6ICsgYVsxM107XG4gICAgICAgIG91dFsxNF0gPSBhWzJdICogeCArIGFbNl0gKiB5ICsgYVsxMF0gKiB6ICsgYVsxNF07XG4gICAgICAgIG91dFsxNV0gPSBhWzNdICogeCArIGFbN10gKiB5ICsgYVsxMV0gKiB6ICsgYVsxNV07XG4gICAgfSBlbHNlIHtcbiAgICAgICAgYTAwID0gYVswXTsgYTAxID0gYVsxXTsgYTAyID0gYVsyXTsgYTAzID0gYVszXTtcbiAgICAgICAgYTEwID0gYVs0XTsgYTExID0gYVs1XTsgYTEyID0gYVs2XTsgYTEzID0gYVs3XTtcbiAgICAgICAgYTIwID0gYVs4XTsgYTIxID0gYVs5XTsgYTIyID0gYVsxMF07IGEyMyA9IGFbMTFdO1xuXG4gICAgICAgIG91dFswXSA9IGEwMDsgb3V0WzFdID0gYTAxOyBvdXRbMl0gPSBhMDI7IG91dFszXSA9IGEwMztcbiAgICAgICAgb3V0WzRdID0gYTEwOyBvdXRbNV0gPSBhMTE7IG91dFs2XSA9IGExMjsgb3V0WzddID0gYTEzO1xuICAgICAgICBvdXRbOF0gPSBhMjA7IG91dFs5XSA9IGEyMTsgb3V0WzEwXSA9IGEyMjsgb3V0WzExXSA9IGEyMztcblxuICAgICAgICBvdXRbMTJdID0gYTAwICogeCArIGExMCAqIHkgKyBhMjAgKiB6ICsgYVsxMl07XG4gICAgICAgIG91dFsxM10gPSBhMDEgKiB4ICsgYTExICogeSArIGEyMSAqIHogKyBhWzEzXTtcbiAgICAgICAgb3V0WzE0XSA9IGEwMiAqIHggKyBhMTIgKiB5ICsgYTIyICogeiArIGFbMTRdO1xuICAgICAgICBvdXRbMTVdID0gY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cgPSBxWzNdLFxuICAgICAgICB4MiA9IHggKyB4LFxuICAgICAgICB5MiA9IHkgKyB5LFxuICAgICAgICB6MiA9IHogKyB6LFxuXG4gICAgICAgIHh4ID0geCAqIHgyLFxuICAgICAgICB4eSA9IHggKiB5MixcbiAgICAgICAgeHogPSB4ICogejIsXG4gICAgICAgIHl5ID0geSAqIHkyLFxuICAgICAgICB5eiA9IHkgKiB6MixcbiAgICAgICAgenogPSB6ICogejIsXG4gICAgICAgIHd4ID0gdyAqIHgyLFxuICAgICAgICB3eSA9IHcgKiB5MixcbiAgICAgICAgd3ogPSB3ICogejIsXG4gICAgICAgIHN4ID0gc1swXSxcbiAgICAgICAgc3kgPSBzWzFdLFxuICAgICAgICBzeiA9IHNbMl07XG5cbiAgICBvdXRbMF0gPSAoMSAtICh5eSArIHp6KSkgKiBzeDtcbiAgICBvdXRbMV0gPSAoeHkgKyB3eikgKiBzeDtcbiAgICBvdXRbMl0gPSAoeHogLSB3eSkgKiBzeDtcbiAgICBvdXRbM10gPSAwO1xuICAgIG91dFs0XSA9ICh4eSAtIHd6KSAqIHN5O1xuICAgIG91dFs1XSA9ICgxIC0gKHh4ICsgenopKSAqIHN5O1xuICAgIG91dFs2XSA9ICh5eiArIHd4KSAqIHN5O1xuICAgIG91dFs3XSA9IDA7XG4gICAgb3V0WzhdID0gKHh6ICsgd3kpICogc3o7XG4gICAgb3V0WzldID0gKHl6IC0gd3gpICogc3o7XG4gICAgb3V0WzEwXSA9ICgxIC0gKHh4ICsgeXkpKSAqIHN6O1xuICAgIG91dFsxMV0gPSAwO1xuICAgIG91dFsxMl0gPSB2WzBdO1xuICAgIG91dFsxM10gPSB2WzFdO1xuICAgIG91dFsxNF0gPSB2WzJdO1xuICAgIG91dFsxNV0gPSAxO1xuICAgIFxuICAgIHJldHVybiBvdXQ7XG59O1xuXG4vKipcbiAqIENyZWF0ZXMgYSBtYXRyaXggZnJvbSBhIHF1YXRlcm5pb24gcm90YXRpb24sIHZlY3RvciB0c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geSA9IHFbMV0sIHogPSBxWzJdLCB3ID0gcVszXSxcbiAgICAgIHgyID0geCArIHgsXG4gICAgICB5MiA9IHkgKyB5LFxuICAgICAgejIgPSB6ICsgeixcblxuICAgICAgeHggPSB4ICogeDIsXG4gICAgICB4eSA9IHggKiB5MixcbiAgICAgIHh6ID0geCAqIHoyLFxuICAgICAgeXkgPSB5ICogeTIsXG4gICAgICB5eiA9IHkgKiB6MixcbiAgICAgIHp6ID0geiAqIHoyLFxuICAgICAgd3ggPSB3ICogeDIsXG4gICAgICB3eSA9IHcgKiB5MixcbiAgICAgIHd6ID0gdyAqIHoyLFxuICAgICAgXG4gICAgICBzeCA9IHNbMF0sXG4gICAgICBzeSA9IHNbMV0sXG4gICAgICBzeiA9IHNbMl0sXG5cbiAgICAgIG94ID0gb1swXSxcbiAgICAgIG95ID0gb1sxXSxcbiAgICAgIG96ID0gb1syXTtcbiAgICAgIFxuICBvdXRbMF0gPSAoMSAtICh5eSArIHp6KSkgKiBzeDtcbiAgb3V0WzFdID0gKHh5ICsgd3opICogc3g7XG4gIG91dFsyXSA9ICh4eiAtIHd5KSAqIHN4O1xuICBvdXRbM10gPSAwO1xuICBvdXRbNF0gPSAoeHkgLSB3eikgKiBzeTtcbiAgb3V0WzVdID0gKDEgLSAoeHggKyB6eikpICogc3k7XG4gIG91dFs2XSA9ICh5eiArIHd4KSAqIHN5O1xuICBvdXRbN10gPSAwO1xuICBvdXRbOF0gPSAoeHogKyB3eSkgKiBzejtcbiAgb3V0WzldID0gKHl6IC0gd3gpICogc3o7XG4gIG91dFsxMF0gPSAoMSAtICh4eCArIHl5KSkgKiBzejtcbiAgb3V0WzExXSA9IDA7XG4gIG91dFsxMl0gPSB2WzBdICsgb3ggLSAob3V0WzBdICogb3ggKyBvdXRbNF0gKiBveSArIG91dFs4XSAqIG96KTtcbiAgb3V0WzEzXSA9IHZbMV0gKyBveSAtIChvdXRbMV0gKiBveCArIG91dFs1XSAqIG95ICsgb3V0WzldICogb3opO1xuICBvdXRbMTRdID0gdlsyXSArIG96IC0gKG91dFsyXSAqIG94ICsgb3V0WzZdICogb3kgKyBvdXRbMTBdICogb3opO1xuICBvdXRbMTVdID0gMTtcbiAgICAgICAgXG4gIHJldHVybiBvdXQ7XG59O1xuXG5tYXQ0LmZyb21RdWF0ID0gZnVuY3Rpb24gKG91dCwgcSkge1xuICAgIHZhciB4ID0gcVswXSwgeSA9IHFbMV0sIHogPSBxWzJdLCB3ID0gcVszXSxcbiAgICAgICAgeDIgPSB4ICsgeCxcbiAgICAgICAgeTIgPSB5ICsgeSxcbiAgICAgICAgejIgPSB6ICsgeixcblxuICAgICAgICB4eCA9IHggKiB4MixcbiAgICAgICAgeXggPSB5ICogeDIsXG4gICAgICAgIHl5ID0geSAqIHkyLFxuICAgICAgICB6eCA9IHogKiB4MixcbiAgICAgICAgenkgPSB6ICogeTIsXG4gICAgICAgIHp6ID0geiAqIHoyLFxuICAgICAgICB3eCA9IHcgKiB4MixcbiAgICAgICAgd3kgPSB3ICogeTIsXG4gICAgICAgIHd6ID0gdyAqIHoyO1xuXG4gICAgb3V0WzBdID0gMSAtIHl5IC0geno7XG4gICAgb3V0WzFdID0geXggKyB3ejtcbiAgICBvdXRbMl0gPSB6eCAtIHd5O1xuICAgIG91dFszXSA9IDA7XG5cbiAgICBvdXRbNF0gPSB5eCAtIHd6O1xuICAgIG91dFs1XSA9IDEgLSB4eCAtIHp6O1xuICAgIG91dFs2XSA9IHp5ICsgd3g7XG4gICAgb3V0WzddID0gMDtcblxuICAgIG91dFs4XSA9IHp4ICsgd3k7XG4gICAgb3V0WzldID0genkgLSB3eDtcbiAgICBvdXRbMTBdID0gMSAtIHh4IC0geXk7XG4gICAgb3V0WzExXSA9IDA7XG5cbiAgICBvdXRbMTJdID0gMDtcbiAgICBvdXRbMTNdID0gMDtcbiAgICBvdXRbMTRdID0gMDtcbiAgICBvdXRbMTVdID0gMTtcblxuICAgIHJldHVybiBvdXQ7XG59O1xuXG4vKipcbiAqIE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uICAgIGlmIChNYXRoLmFicyhleWV4IC0gY2VudGVyeCkgPCBnbE1hdHJpeC5FUFNJTE9OICYmXG4gICAgICAgIE1hdGguYWJzKGV5ZXkgLSBjZW50ZXJ5KSA8IGdsTWF0cml4LkVQU0lMT04gJiZcbiAgICAgICAgTWF0aC5hYnMoZXlleiAtIGNlbnRlcnopIDwgZ2xNYXRyaXguRVBTSUxPTikge1xuICAgICAgICByZXR1cm4gbWF0NC5pZGVudGl0eShvdXQpO1xuICAgIH1cblxuICAgIHowID0gZXlleCAtIGNlbnRlcng7XG4gICAgejEgPSBleWV5IC0gY2VudGVyeTtcbiAgICB6MiA9IGV5ZXogLSBjZW50ZXJ6O1xuXG4gICAgbGVuID0gMSAvIE1hdGguc3FydCh6MCAqIHowICsgejEgKiB6MSArIHoyICogejIpO1xuICAgIHowICo9IGxlbjtcbiAgICB6MSAqPSBsZW47XG4gICAgejIgKj0gbGVuO1xuXG4gICAgeDAgPSB1cHkgKiB6MiAtIHVweiAqIHoxO1xuICAgIHgxID0gdXB6ICogejAgLSB1cHggKiB6MjtcbiAgICB4MiA9IHVweCAqIHoxIC0gdXB5ICogejA7XG4gICAgbGVuID0gTWF0aC5zcXJ0KHgwICogeDAgKyB4MSAqIHgxICsgeDIgKiB4Mik7XG4gICAgaWYgKCFsZW4pIHtcbiAgICAgICAgeDAgPSAwO1xuICAgICAgICB4MSA9IDA7XG4gICAgICAgIHgyID0gMDtcbiAgICB9IGVsc2Uge1xuICAgICAgICBsZW4gPSAxIC8gbGVuO1xuICAgICAgICB4MCAqPSBsZW47XG4gICAgICAgIHgxICo9IGxlbjtcbiAgICAgICAgeDIgKj0gbGVuO1xuICAgIH1cblxuICAgIHkwID0gejEgKiB4MiAtIHoyICogeDE7XG4gICAgeTEgPSB6MiAqIHgwIC0gejAgKiB4MjtcbiAgICB5MiA9IHowICogeDEgLSB6MSAqIHgwO1xuXG4gICAgbGVuID0gTWF0aC5zcXJ0KHkwICogeTAgKyB5MSAqIHkxICs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VsxXSArICcsICcgKyBhWzJdICsgJywgJyArIGFbM10gKyAnLCAnICtcbiAgICAgICAgICAgICAgICAgICAgYVs0XSArICcsICcgKyBhWzVdICsgJywgJyArIGFbNl0gKyAnLCAnICsgYVs3XSArICcsICcgK1xuICAgICAgICAgICAgICAgICAgICBhWzhdICsgJywgJyArIGFbOV0gKyAnLCAnICsgYVsxMF0gKyAnLCAnICsgYVsxMV0gKyAnLCAnICsgXG4gICAgICAgICAgICAgICAgICAgIGFbMTJdICsgJywgJyArIGFbMTNdICsgJywgJyArIGFbMTRdICsgJywgJyArIGFbMTVdICsgJyknO1xufTtcblxuLyoqXG4gKiBSZXR1cm5zIEZyb2Jlbml1cyBub3JtIG9mIGEgbWF0NFxuICpcbiAqIEBwYXJhbSB7bWF0NH0gYSB0aGUgbWF0cml4IHRvIGNhbGN1bGF0ZSBGcm9iZW5pdXMgbm9ybSBvZlxuICogQHJldHVybnMge051bWJlcn0gRnJvYmVuaXVzIG5vcm1cbiAqL1xubWF0NC5mcm9iID0gZnVuY3Rpb24gKGEpIHtcbiAgICByZXR1cm4oTWF0aC5zcXJ0KE1hdGgucG93KGFbMF0sIDIpICsgTWF0aC5wb3coYVsxXSwgMikgKyBNYXRoLnBvdyhhWzJdLCAyKSArIE1hdGgucG93KGFbM10sIDIpICsgTWF0aC5wb3coYVs0XSwgMikgKyBNYXRoLnBvdyhhWzVdLCAyKSArIE1hdGgucG93KGFbNl0sIDIpICsgTWF0aC5wb3coYVs3XSwgMikgKyBNYXRoLnBvdyhhWzhdLCAyKSArIE1hdGgucG93KGFbOV0sIDIpICsgTWF0aC5wb3coYVsxMF0sIDIpICsgTWF0aC5wb3coYVsxMV0sIDIpICsgTWF0aC5wb3coYVsxMl0sIDIpICsgTWF0aC5wb3coYVsxM10sIDIpICsgTWF0aC5wb3coYVsxNF0sIDIpICsgTWF0aC5wb3coYVsxNV0sIDIpICkpXG59O1xuXG5cbm1vZHVsZS5leHBvcnRzID0gbWF0NDtcblxuXG5c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gICBmb3IgKGk7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgIGogPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiBpKTtcclxuICAgICAgICAgICAgeCA9IGFycltpXTtcclxuICAgICAgICAgICAgYXJyW2ldID0gYXJyW2pdO1xyXG4gICAgICAgICAgICBhcnJbal0gPSB4O1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gYXJyO1xyXG4gICAgfSxcclxuXHJcbiAgICB0b1BvaW50TGlzdDogZnVuY3Rpb24oYXJyKSB7XHJcbiAgICAgICAgdmFyIGksIGosIHJvdyA9IFtdLCByb3dzID0gW107XHJcbiAgICAgICAgZm9yICggaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgcm93ID0gW107XHJcbiAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgYXJyW2ldLmxlbmd0aDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICByb3dbal0gPSBhcnJbaV1bal07XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcm93c1tpXSA9IFwiW1wiICsgcm93LmpvaW4oXCIsXCIpICsgXCJdXCI7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBcIltcIiArIHJvd3Muam9pbihcIixcXHJcXG5cIikgKyBcIl1cIjtcclxuICAgIH0sXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiByZXR1cm5zIHRoZSBlbGVtZW50cyB3aGljaCdzIHNjb3JlIGlzIGJpZ2dlciB0aGFuIHRoZSB0aHJlc2hvbGRcclxuICAgICAqIEByZXR1cm4ge0FycmF5fSB0aGUgcmVkdWNlZCBhcnJheVxyXG4gICAgICovXHJcbiAgICB0aHJlc2hvbGQ6IGZ1bmN0aW9uKGFyciwgdGhyZXNob2xkLCBzY29yZUZ1bmMpIHtcclxuICAgICAgICB2YXIgaSwgcXVldWUgPSBbXTtcclxuICAgICAgICBmb3IgKCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBpZiAoc2NvcmVGdW5jLmFwcGx5KGFyciwgW2FycltpXV0pID49IHRocmVzaG9sZCkge1xyXG4gICAgICAgICAgICAgICAgcXVldWUucHVzaChhcnJbaV0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBxdWV1ZTtcclxuICAgIH0sXHJcblxyXG4gICAgbWF4SW5kZXg6IGZ1bmN0aW9uKGFycikge1xyXG4gICAgICAgIHZhciBpLCBtYXggPSAwO1xyXG4gICAgICAgIGZvciAoIGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChhcnJbaV0gPiBhcnJbbWF4XSkge1xyXG4gICAgICAgICAgICAgICAgbWF4ID0gaTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gbWF4O1xyXG4gICAgfSxcclxuXHJcbiAgICBtYXg6IGZ1bmN0aW9uKGFycikge1xyXG4gICAgICAgIHZhciBpLCBtYXggPSAwO1xyXG4gICAgICAgIGZvciAoIGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChhcnJbaV0gPiBtYXgpIHtcclxuICAgICAgICAgICAgICAgIG1heCA9IGFycltpXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gbWF4O1xyXG4gICAgfSxcclxuXHJcbiAgICBzdW06IGZ1bmN0aW9uKGFycikge1xyXG4gICAgICAgIHZhciBsZW5ndGggPSBhcnIubGVuZ3RoLFxyXG4gICAgICAgICAgICBzdW0gPSAwO1xyXG5cclxuICAgICAgICB3aGlsZSAobGVuZ3RoLS0pIHtcclxuICAgICAgICAgICAgc3VtICs9IGFycltsZW5ndGhdO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gc3Vt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YnVnLmJveEZyb21QYXRjaGVzLnNob3dUcmFuc2Zvcm1lZCkge1xyXG4gICAgICAgICAgICBJbWFnZURlYnVnLmRyYXdQYXRoKHBhdGNoLmJveCwge3g6IDAsIHk6IDF9LCBfY2FudmFzQ29udGFpbmVyLmN0eC5iaW5hcnksIHtjb2xvcjogJyM5OWZmMDAnLCBsaW5lV2lkdGg6IDJ9KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgLy8gZmluZCBib3VuZGluZyBib3hcclxuICAgIGZvciAoIGkgPSAwOyBpIDwgcGF0Y2hlcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIHBhdGNoID0gcGF0Y2hlc1tpXTtcclxuICAgICAgICBmb3IgKCBqID0gMDsgaiA8IDQ7IGorKykge1xyXG4gICAgICAgICAgICBpZiAocGF0Y2guYm94W2pdWzBdIDwgbWlueCkge1xyXG4gICAgICAgICAgICAgICAgbWlueCA9IHBhdGNoLmJveFtqXVswXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAocGF0Y2guYm94W2pdWzBdID4gbWF4eCkge1xyXG4gICAgICAgICAgICAgICAgbWF4eCA9IHBhdGNoLmJveFtqXVswXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAocGF0Y2guYm94W2pdWzFdIDwgbWlueSkge1xyXG4gICAgICAgICAgICAgICAgbWlueSA9IHBhdGNoLmJveFtqXVsxXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAocGF0Y2guYm94W2pdWzFdID4gbWF4eSkge1xyXG4gICAgICAgICAgICAgICAgbWF4eSA9IHBhdGNoLmJveFtqXVsxXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBib3ggPSBbW21pbngsIG1pbnldLCBbbWF4eCwgbWlueV0sIFttYXh4LCBtYXh5XSwgW21pbngsIG1heHldXTtcclxuXHJcbiAgICBpZiAoRU5WLmR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ZSgpIHtcclxuICAgIENWVXRpbHMub3RzdVRocmVzaG9sZChfY3VycmVudEltYWdlV3JhcHBlciwgX2JpbmFyeUltYWdlV3JhcHBlcik7XHJcbiAgICBfYmluYXJ5SW1hZ2VXcmFwcGVyLnplcm9Cb3JkZXIoKTtcclxuICAgIGlmIChfY29uZmlnLnNob3dDYW52YXMpIHtcclxuICAgICAgICBfYmluYXJ5SW1hZ2VXcmFwcGVyLnNob3coX2NhbnZhc0NvbnRhaW5lci5kb20uYmluYXJ5LCAyNTUpO1xyXG4gICAgfVxyXG59XHJcblxyXG4vKipcclxuICogSXRlcmF0ZSBvdmVyIHRoZSBlbnRpcmUgaW1hZ2VcclxuICogZXh0cmFjdCBwYXRjaGVzXHJcbiAqL1xyXG5mdW5jdGlvbiBmaW5kUGF0Y2hlcygpIHtcclxuICAgIHZhciBpLFxyXG4gICAgICAgIGosXHJcbiAgICAgICAgeCxcclxuICAgICAgICB5LFxyXG4gICAgICAgIG1vbWVudHMsXHJcbiAgICAgICAgcGF0Y2hlc0ZvdW5kID0gW10sXHJcbiAgICAgICAgcmFzdGVyaXplcixcclxuICAgICAgICByYXN0ZXJSZXN1bHQsXHJcbiAgICAgICAgcGF0Y2g7XHJcbiAgICBmb3IgKGkgPSAwOyBpIDwgX251bVBhdGNoZXMueDsgaSsrKSB7XHJcbiAgICAgICAgZm9yIChqID0gMDsgaiA8IF9udW1QYXRjaGVzLnk7IGorKykge1xyXG4gICAgICAgICAgICB4ID0gX3N1YkltYWdlV3JhcHBlci5zaXplLnggKiBpO1xyXG4gICAgICAgICAgICB5ID0gX3N1YkltYWdlV3JhcHBlci5zaXplLnkgKiBqO1xyXG5cclxuICAgICAgICAgICAgLy8gc2VwZXJhdGUgcGFydHNcclxuICAgICAgICAgICAgc2tlbGV0b25pemUoeCwgeSk7XHJcblxyXG4gICAgICAgICAgICAvLyBSYXN0ZXJpemUsIGZpbmQgaW5kaXZpZHVhbCBiYXJzXHJcbiAgICAgICAgICAgIF9za2Vs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dW0gPSBfcGF0Y2hMYWJlbEdyaWQuZGF0YS5sZW5ndGg7XHJcbiAgICAgICAgcGF0Y2hlcy5sZW5ndGggPSAwO1xyXG4gICAgICAgIHdoaWxlIChzdW0tLSkge1xyXG4gICAgICAgICAgICBpZiAoX3BhdGNoTGFiZWxHcmlkLmRhdGFbc3VtXSA9PT0gdG9wTGFiZWxzW2ldLmxhYmVsKSB7XHJcbiAgICAgICAgICAgICAgICBwYXRjaCA9IF9pbWFnZVRvUGF0Y2hHcmlkLmRhdGFbc3VtXTtcclxuICAgICAgICAgICAgICAgIHBhdGNoZXMucHVzaChwYXRjaCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgYm94ID0gYm94RnJvbVBhdGNoZXMocGF0Y2hlcyk7XHJcbiAgICAgICAgaWYgKGJveCkge1xyXG4gICAgICAgICAgICBib3hlcy5wdXNoKGJveCk7XHJcblxyXG4gICAgICAgICAgICAvLyBkcmF3IHBhdGNoLWxhYmVscyBpZiByZXF1ZXN0ZWRcclxuICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCAmJiBfY29uZmlnLmRlYnVnLnNob3dSZW1haW5pbmdQYXRjaExhYmVscykge1xyXG4gICAgICAgICAgICAgICAgZm9yICggaiA9IDA7IGogPCBwYXRjaGVzLmxlbmd0aDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcGF0Y2ggPSBwYXRjaGVzW2pdO1xyXG4gICAgICAgICAgICAgICAgICAgIGhzdlswXSA9ICh0b3BMYWJlbHNbaV0ubGFiZWwgLyAobWF4TGFiZWwgKyAxKSkgKiAzNjA7XHJcbiAgICAgICAgICAgICAgICAgICAgQ1ZVdGlscy5oc3YycmdiKGhzdiwgcmdiKTtcclxuICAgICAgICAgICAgICAgICAgICBJbWFnZURlYnVnLmRyYXdSZWN0KHBhdGNoLnBvcywgX3N1YkltYWdlV3JhcHBlci5zaXplLCBfY2FudmFzQ29udGFpbmVyLmN0eC5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ggPj0gMikge1xyXG4gICAgICAgIC8vIG9ubHkgY29sbGVjdCBtb21lbnRzIHdoaWNoJ3MgYXJlYSBjb3ZlcnMgYXQgbGVhc3QgbWluQ29tcG9uZW50V2VpZ2h0IHBpeGVscy5cclxuICAgICAgICBmb3IgKCBrID0gMDsgayA8IG1vbWVudHMubGVuZ3RoOyBrKyspIHtcclxuICAgICAgICAgICAgaWYgKG1vbWVudHNba10ubTAwID4gbWluQ29tcG9uZW50V2VpZ2h0KSB7XHJcbiAgICAgICAgICAgICAgICBlbGlnaWJsZU1vbWVudHMucHVzaChtb21lbnRzW2tdKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gaWYgYXQgbGVhc3QgMiBtb21lbnRzIGFyZSBmb3VuZCB3aGljaCBoYXZlIGF0IGxlYXN0IG1pbkNvbXBvbmVudFdlaWdodHMgY292ZXJlZFxyXG4gICAgICAgIGlmIChlbGlnaWJsZU1vbWVudHMubGVuZ3RoID49IDIpIHtcclxuICAgICAgICAgICAgbWF0Y2hpbmdNb21lbnRzID0gc2ltaWxhck1vbWVudHMoZWxpZ2libGVNb21lbnRzKTtcclxuICAgICAgICAgICAgYXZnID0gMDtcclxuICAgICAgICAgICAgLy8gZGV0ZXJtaW5lIHRoZSBzaW1pbGFyaXR5IG9mIHRoZSBtb21lbnRzXHJcbiAgICAgICAgICAgIGZvciAoIGsgPSAwOyBrIDwgbWF0Y2hpbmdNb21lbnRzLmxlbmd0aDsgaysrKSB7XHJcbiAgICAgICAgICAgICAgICBhdmcgKz0gbWF0Y2hpbmdNb21lbnRzW2tdLnJhZDtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gT25seSB0d28gb2YgdGhlIG1vbWVudHMgYXJlIGFsbG93ZWQgbm90IHRvIGZpdCBpbnRvIHRoZSBlcXVhdGlvblxyXG4gICAgICAgICAgICAvLyBhZGQgdGhlIHBhdGNoIHRvIHRoZSBzZXRcclxuICAgICAgICAgICAgaWYgKG1hdGNoaW5nTW9tZW50cy5sZW5ndGggPiAxXHJcbiAgICAgICAgICAgICAgICAgICAgJiYgbWF0Y2hpbmdNb21lbnRzLmxlbmd0aCA+PSAoZWxpZ2libGVNb21lbnRzLmxlbmd0aCAvIDQpICogM1xyXG4gICAgICAgICAgICAgICAgICAgICYmIG1hdGNoaW5nTW9tZW50cy5sZW5ndGggPiBtb21lbnRzLmxlbmd0aCAvIDQpIHtcclxuICAgICAgICAgICAgICAgIGF2ZyAvPSBtYXRjaGluZ01vbWVudHMubGVuZ3RoO1xyXG4gICAgICAgICAgICAgICAgcGF0Y2ggPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaW5kZXg6IHBhdGNoUG9zWzFdICogX251bVBhdGNoZXMueCArIHBhdGNoUG9zWzBdLFxyXG4gICAgICAgICAgICAgICAgICAgIHBvczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB4OiB4LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB5OiB5XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBib3g6IFtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmVjMi5jbG9uZShbeCwgeV0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB2ZWMyLmNsb25lKFt4ICsgX3N1YkltYWdlV3JhcHBlci5zaXplLngsIHldKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmVjMi5jbG9uZShbeCArIF9zdWJJbWFnZVdyYXBwZXIuc2l6ZS54LCB5ICsgX3N1YkltYWdlV3JhcHBlci5zaXplLnldKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmVjMi5jbG9uZShbeCwgeSArIF9zdWJJbWFnZVdyYXBwZXIuc2l6ZS55XSlcclxuICAgICAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICAgICAgICAgIG1vbWVudHM6IG1hdGNoaW5nTW9tZW50cyxcclxuICAgICAgICAgICAgICAg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XRjaExhYmVsR3JpZC5zaXplLnggKyB4O1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGNvbnRpbnVlIGlmIHBhdGNoIGVtcHR5XHJcbiAgICAgICAgICAgICAgICBpZiAoX3BhdGNoR3JpZC5kYXRhW2lkeF0gPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBfcGF0Y2hMYWJlbEdyaWQuZGF0YVtpZHhdID0gTnVtYmVyLk1BWF9WQUxVRTtcclxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoX3BhdGNoTGFiZWxHcmlkLmRhdGFbaWR4XSA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNpbWlsYXJpdHkgPSBNYXRoLmFicyh2ZWMyLmRvdChfaW1hZ2VUb1BhdGNoR3JpZC5kYXRhW2lkeF0udmVjLCBjdXJyZW50UGF0Y2gudmVjKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNpbWlsYXJpdHkgPiB0aHJlc2hvbGQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdHJhY2UoaWR4KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgLy8gcHJlcGFyZSBmb3IgZmluZGluZyB0aGUgcmlnaHQgcGF0Y2hlc1xyXG4gICAgQXJyYXlIZWxwZXIuaW5pdChfcGF0Y2hHcmlkLmRhdGEsIDApO1xyXG4gICAgQXJyYXlIZWxwZXIuaW5pdChfcGF0Y2hMYWJlbEdyaWQuZGF0YSwgMCk7XHJcbiAgICBBcnJheUhlbHBlci5pbml0KF9pbWFnZVRvUGF0Y2hHcmlkLmRhdGEsIG51bGwpO1xyXG5cclxuICAgIGZvciAoIGogPSAwOyBqIDwgcGF0Y2hlc0ZvdW5kLmxlbmd0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gICAgZmlyc3RWZXJ0ZXg6IG51bGwsXHJcbiAgICAgICAgICAgIGluc2lkZUNvbnRvdXJzOiBudWxsLFxyXG4gICAgICAgICAgICBuZXh0cGVlcjogbnVsbCxcclxuICAgICAgICAgICAgcHJldnBlZXI6IG51bGxcclxuICAgICAgICB9O1xyXG4gICAgfSxcclxuICAgIENPTlRPVVJfRElSOiB7XHJcbiAgICAgICAgQ1dfRElSOiAwLFxyXG4gICAgICAgIENDV19ESVI6IDEsXHJcbiAgICAgICAgVU5LTk9XTl9ESVI6IDJcclxuICAgIH0sXHJcbiAgICBESVI6IHtcclxuICAgICAgICBPVVRTSURFX0VER0U6IC0zMjc2NyxcclxuICAgICAgICBJTlNJREVfRURHRTogLTMyNzY2XHJcbiAgICB9LFxyXG4gICAgY3JlYXRlOiBmdW5jdGlvbihpbWFnZVdyYXBwZXIsIGxhYmVsV3JhcHBlcikge1xyXG4gICAgICAgIHZhciBpbWFnZURhdGEgPSBpbWFnZVdyYXBwZXIuZGF0YSxcclxuICAgICAgICAgICAgbGFiZWxEYXRhID0gbGFiZWxXcmFwcGVyLmRhdGEsXHJcbiAgICAgICAgICAgIHdpZHRoID0gaW1hZ2VXcmFwcGVyLnNpemUueCxcclxuICAgICAgICAgICAgaGVpZ2h0ID0gaW1hZ2VXcmFwcGVyLnNpemUueSxcclxuICAgICAgICAgICAgdHJhY2VyID0gVHJhY2VyLmNyZWF0ZShpbWFnZVdyYXBwZXIsIGxhYmVsV3JhcHBlcik7XHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIHJhc3Rlcml6ZTogZnVuY3Rpb24oZGVwdGhsYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgdmFyIGNvbG9yLFxyXG4gICAgICAgICAgICAgICAgICAgIGJjLFxyXG4gICAgICAgICAgICAgICAgICAgIGxjLFxyXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsaW5kZXgsXHJcbiAgICAgICAgICAgICAgICAgICAgY3gsXHJcbiAgICAgICAgICAgICAgICAgICAgY3ksXHJcbiAgICAgICAgICAgICAgICAgICAgY29sb3JNYXAgPSBbXSxcclxuICAgICAgICAgICAgICAgICAgICB2ZXJ0ZXgsXHJcbiAgICAgICAgICAgICAgICAgICAgcCxcclxuICAgICAgICAgICAgICAgICAgICBjYyxcclxuICAgICAgICAgICAgICAgICAgICBzYyxcclxuICAgICAgICAgICAgICAgICAgICBwb3MsXHJcbiAgICAgICAgICAgICAgICAgICAgY29ubmVjdGVkQ291bnQgPSAwLFxyXG4gICAgICAgICAgICAgICAgICAgIGk7XHJcblxyXG4gICAgICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCA0MDA7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yTWFwW2ldID0gMDtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBjb2xvck1hcFswXSA9IGltYWdlRGF0YVswXTtcclxuICAgICAgICAgICAgICAgIGNjID0gbnVsbDtcclxuICAgICAgICAgICAgICAgIGZvciAoIGN5ID0gMTsgY3kgPCBoZWlnaHQgLSAxOyBjeSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGFiZWxpbmRleCA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgYmMgPSBjb2xvck1hcFswXTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKCBjeCA9IDE7IGN4IDwgd2lkdGggLSAxOyBjeCsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvcyA9IGN5ICogd2lkdGggKyBjeDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxhYmVsRGF0YVtwb3NdID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvciA9IGltYWdlRGF0YVtwb3NdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbG9yICE9PSBiYykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYWJlbGluZGV4ID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxjID0gY29ubmVjdGVkQ291bnQgKyAxO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvck1hcFtsY10gPSBjb2xvcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmMgPSBjb2xvcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmVydGV4ID0gdHJhY2VyLmNvbnRvdXJUcmFjaW5nKGN5LCBjeCwgbGMsIGNvbG9yLCBSYXN0ZXJpemVyLkRJUi5PVVRTSURFX0VER0UpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodmVydGV4ICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25uZWN0ZWRDb3VudCsrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxpbmRleCA9IGxjO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IFJhc3Rlcml6ZXIuY3JlYXRlQ29udG91cjJEKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmRpciA9IFJhc3Rlcml6ZXIuQ09OVE9VUl9ESVIuQ1dfRElSO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5pbmRleCA9IGxhYmVsaW5kZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmZpcnN0VmVydGV4ID0gdmVydGV4O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5uZXh0cGVlciA9IGNjO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5pbnNpZGVDb250b3VycyA9IG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2MgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYy5wcmV2cGVlciA9IHA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYyA9IHA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ZXJ0ZXggPSB0cmFjZXJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jb250b3VyVHJhY2luZyhjeSwgY3gsIFJhc3Rlcml6ZXIuRElSLklOU0lERV9FREdFLCBjb2xvciwgbGFiZWxpbmRleCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2ZXJ0ZXggIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBSYXN0ZXJpemVyLmNyZWF0ZUNvbnRvdXIyRCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5maXJzdFZlcnRleCA9IHZlcnRleDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuaW5zaWRlQ29udG91cnMgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlcHRobGFiZWwgPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmRpciA9IFJhc3Rlcml6ZXIuQ09OVE9VUl9ESVIuQ0NXX0RJUjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5kaXIgPSBSYXN0ZXJpemVyLkNPTlRPVVJfRElSLkNXX0RJUjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuaW5kZXggPSBkZXB0aGxhYmVsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2MgPSBjYztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgoc2MgIT09IG51bGwpICYmIHNjLmluZGV4ICE9PSBsYWJlbGluZGV4KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2MgPSBzYy5uZXh0cGVlcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzYyAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAubmV4dHBlZXIgPSBzYy5pbnNpZGVDb250b3VycztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2MuaW5zaWRlQ29udG91cnMgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2MuaW5zaWRlQ29udG91cnMucHJldnBlZXIgPSBwO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzYy5pbnNpZGVDb250b3VycyA9IHA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsRGF0YVtwb3NdID0gbGFiZWxpbmRleDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChsYWJlbERhdGFbcG9zXSA9PT0gUmFzdGVyaXplci5ESVIuT1VUU0lERV9FREdFXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgbGFiZWxEYXRhW3Bvc10gPT09IFJhc3Rlcml6ZXIuRElSLklOU0lERV9FREdFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbGluZGV4ID0gMDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYWJlbERhdGFbcG9zXSA9PT0gUmFzdGVyaXplci5ESVIuSU5TSURFX0VER0UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYyA9IGltYWdlRGF0YVtwb3NdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYyA9IGNvbG9yTWFwWzBdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxpbmRleCA9IGxhYmVsRGF0YVtwb3NdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmMgPSBjb2xvck1hcFtsYWJlbGluZGV4XTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHNjID0gY2M7XHJcbiAgICAgICAgICAgICAgICB3aGlsZSAoc2MgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICBzYy5pbmRleCA9IGRlcHRobGFiZWw7XHJcbiAgICAgICAgICAgICAgICAgICAgc2MgPSBzYy5uZXh0cGVlcjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgY2M6IGNjLFxyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50OiBjb25uZWN0ZWRDb3VudFxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZGVidWc6IHtcclxuICAgICAgICAgICAgICAgIGRyYXdDb250b3VyOiBmdW5jdGlvbihjYW52YXMsIGZpcnN0Q29udG91cikge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBjdHggPSBjYW52YXMuZ2V0Q29udGV4dChcIjJkXCIpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwcSA9IGZpcnN0Q29udG91cixcclxuICAgICAgICAgICAgICAgICAgICAgICAgaXEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHA7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGN0eC5zdHJva2VTdHlsZSA9IFwicmVkXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgY3R4LmZpbGxTdHlsZSA9IFwicmVkXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgY3R4LmxpbmVXaWR0aCA9IDE7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChwcSAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpcSA9IHBxLmluc2lkZUNvbnRvdXJzO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlxID0gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChwcSAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXEgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBpcTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlxID0gaXEubmV4dHBlZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gcHE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcSA9IHBxLm5leHRwZWVyO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBxICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXEgPSBwcS5pbnNpZGVDb250b3VycztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXEgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKHEuZGlyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgUmFzdGVyaXplci5DT05UT1VSX0RJUi5DV19ESVI6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdHguc3Ryb2tlU3R5bGUgPSBcInJlZFwiO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgUmFzdGVyaXplci5DT05UT1VSX0RJUi5DQ1dfRElSOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R4LnN0cm9rZVN0eWxlID0gXCJibHVlXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBSYXN0ZXJpemVyLkNPTlRPVVJfRElSLlVOS05PV05fRElSOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R4LnN0cm9rZVN0eWxlID0gXCJncmVlblwiO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBxLmZpcnN0VmVydGV4O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjdHguYmVnaW5QYXRoKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5tb3ZlVG8ocC54LCBwLnkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkbyB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID0gcC5uZXh0O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R4LmxpbmVUbyhwLngsIHAueSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKHAgIT09IHEuZmlyc3RWZXJ0ZXgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjdHguc3Ryb2tlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgIH1cclxufTtcclxuXHJcbmV4cG9ydCBkZWZhdWx0IFJhc3Rlcml6ZXI7XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIEQ6L3dvcmsvcXVhZ2dhSlMvc3JjL2xvY2F0b3IvcmFzdGVyaXplci5qc1xuICoqLyIsIi8qKlxyXG4gKiBodHRwOi8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gICAgICAgICAgICAgICBpZiAoKGltYWdlRGF0YVtwb3NdID09PSBjb2xvcikgJiYgKChsYWJlbERhdGFbcG9zXSA9PT0gMCkgfHwgKGxhYmVsRGF0YVtwb3NdID09PSBsYWJlbCkpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGFiZWxEYXRhW3Bvc10gPSBsYWJlbDtcclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50LmN5ID0geTtcclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50LmN4ID0geDtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxhYmVsRGF0YVtwb3NdID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsRGF0YVtwb3NdID0gZWRnZWxhYmVsO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50LmRpciA9IChjdXJyZW50LmRpciArIDEpICUgODtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiB2ZXJ0ZXgyRCh4LCB5LCBkaXIpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgIGRpcjogZGlyLFxyXG4gICAgICAgICAgICAgICAgeDogeCxcclxuICAgICAgICAgICAgICAgIHk6IHksXHJcbiAgICAgICAgICAgICAgICBuZXh0OiBudWxsLFxyXG4gICAgICAgICAgICAgICAgcHJldjogbnVsbFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gY29udG91clRyYWNpbmcoc3ksIHN4LCBsYWJlbCwgY29sb3IsIGVkZ2VsYWJlbCkge1xyXG4gICAgICAgICAgICB2YXIgRnYgPSBudWxsLFxyXG4gICAgICAgICAgICAgICAgQ3YsXHJcbiAgICAgICAgICAgICAgICBQLFxyXG4gICAgICAgICAgICAgICAgbGRpcixcclxuICAgICAgICAgICAgICAgIGN1cnJlbnQgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY3g6IHN4LFxyXG4gICAgICAgICAgICAgICAgICAgIGN5OiBzeSxcclxuICAgICAgICAgICAgICAgICAgICBkaXI6IDBcclxuICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICBpZiAodHJhY2UoY3VycmVudCwgY29sb3IsIGxhYmVsLCBlZGdlbGFiZWwpKSB7XHJcbiAgICAgICAgICAgICAgICBGdiA9IHZlcnRleDJEKHN4LCBzeSwgY3VycmVudC5kaXIpO1xyXG4gICAgICAgICAgICAgICAgQ3YgPSBGdjtcclxuICAgICAgICAgICAgICAgIGxkaXIgPSBjdXJyZW50LmRpcjtcclxuICAgICAgICAgICAgICAgIFAgPSB2ZXJ0ZXgyRChjdXJyZW50LmN4LCBjdXJyZW50LmN5LCAwKTtcclxuICAgICAgICAgICAgICAgIFAucHJldiA9IEN2O1xyXG4gICAgICAgICAgICAgICAgQ3YubmV4dCA9IFA7XHJcbiAgICAgICAgICAgICAgICBQLm5leHQgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgQ3YgPSBQO1xyXG4gICAgICAgICAgICAgICAgZG8ge1xyXG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnQuZGlyID0gKGN1cnJlbnQuZGlyICsgNikgJSA4O1xyXG4gICAgICAgICAgICAgICAgICAgIHRyYWNlKGN1cnJlbnQsIGNvbG9yLCBsYWJlbCwgZWRnZWxhYmVsKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAobGRpciAhPT0gY3VycmVudC5kaXIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ3YuZGlyID0gY3VycmVudC5kaXI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFAgPSB2ZXJ0ZXgyRChjdXJyZW50LmN4LCBjdXJyZW50LmN5LCAwKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgUC5wcmV2ID0gQ3Y7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEN2Lm5leHQgPSBQO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBQLm5leHQgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBDdiA9IFA7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ3YuZGlyID0gbGRpcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ3YueCA9IGN1cnJlbnQuY3g7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEN2LnkgPSBjdXJyZW50LmN5O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBsZGlyID0gY3VycmVudC5kaXI7XHJcbiAgICAgICAgICAgICAgICB9IHdoaWxlIChjdXJyZW50LmN4ICE9PSBzeCB8fCBjdXJyZW50LmN5ICE9PSBzeSk7XHJcbiAgICAgICAgICAgICAgICBGdi5wcmV2ID0gQ3YucHJldjtcclxuICAgICAgICAgICAgICAgIEN2LnByZXYubmV4dCA9IEZ2O1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBGdjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIHRyYWNlOiBmdW5jdGlvbihjdXJyZW50LCBjb2xvciwgbGFiZWwsIGVkZ2VsYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRyYWNlKGN1cnJlbnQsIGNvbG9yLCBsYWJlbCwgZWRnZWxhYmVsKTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgY29udG91clRyYWNpbmc6IGZ1bmN0aW9uKHN5LCBzeCwgbGFiZWwsIGNvbG9yLCBlZGdlbGFiZ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cclxuXHJcbiAgICAgICAgZm9yICggdiA9IDE7ICh2IHwgMCkgPCAoKHNpemUgLSAxKSB8IDApOyB2ID0gKHYgKyAxKSB8IDApIHtcclxuICAgICAgICAgICAgb2Zmc2V0ID0gKG9mZnNldCArIHNpemUpIHwgMDtcclxuICAgICAgICAgICAgZm9yICggdSA9IDE7ICh1IHwgMCkgPCAoKHNpemUgLSAxKSB8IDApOyB1ID0gKHUgKyAxKSB8IDApIHtcclxuICAgICAgICAgICAgICAgIHlTdGFydDEgPSAob2Zmc2V0IC0gc2l6ZSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgeVN0YXJ0MiA9IChvZmZzZXQgKyBzaXplKSB8IDA7XHJcbiAgICAgICAgICAgICAgICB4U3RhcnQxID0gKHUgLSAxKSB8IDA7XHJcbiAgICAgICAgICAgICAgICB4U3RhcnQyID0gKHUgKyAxKSB8IDA7XHJcbiAgICAgICAgICAgICAgICBzdW0gPSAoKGltYWdlc1soaW5JbWFnZVB0ciArIHlTdGFydDEgKyB4U3RhcnQxKSB8IDBdIHwgMClcclxuICAgICAgICAgICAgICAgICAgICArIChpbWFnZXNbKGluSW1hZ2VQdHIgKyB5U3RhcnQxICsgeFN0YXJ0MikgfCAwXSB8IDApXHJcbiAgICAgICAgICAgICAgICAgICAgKyAoaW1hZ2VzWyhpbkltYWdlUHRyICsgb2Zmc2V0ICsgdSkgfCAwXSB8IDApXHJcbiAgICAgICAgICAgICAgICAgICAgKyAoaW1hZ2VzWyhpbkltYWdlUHRyICsgeVN0YXJ0MiArIHhTdGFydDEpIHwgMF0gfCAwKVxyXG4gICAgICAgICAgICAgICAgICAgICsgKGltYWdlc1soaW5JbWFnZVB0ciArIHlTdGFydDIgKyB4U3RhcnQyKSB8IDBdIHwgMCkpIHwgMDtcclxuICAgICAgICAgICAgICAgIGlmICgoc3VtIHwgMCkgPT0gKDUgfCAwKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGltYWdlc1sob3V0SW1hZ2VQdHIgKyB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0ciwgdmFsdWUpIHtcclxuICAgICAgICBpbWFnZVB0ciA9IGltYWdlUHRyIHwgMDtcclxuICAgICAgICB2YWx1ZSA9IHZhbHVlIHwgMDtcclxuXHJcbiAgICAgICAgdmFyIGxlbmd0aCA9IDA7XHJcblxyXG4gICAgICAgIGxlbmd0aCA9IGltdWwoc2l6ZSwgc2l6ZSkgfCAwO1xyXG5cclxuICAgICAgICB3aGlsZSAoKGxlbmd0aCB8IDApID4gMCkge1xyXG4gICAgICAgICAgICBsZW5ndGggPSAobGVuZ3RoIC0gMSkgfCAwO1xyXG4gICAgICAgICAgICBpbWFnZXNbKGltYWdlUHRyICsgbGVuZ3RoKSB8IDBdID0gdmFsdWU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGRpbGF0ZShpbkltYWdlUHRyLCBvdXRJbWFnZVB0cikge1xyXG4gICAgICAgIGluSW1hZ2VQdHIgPSBpbkltYWdlUHRyIHwgMDtcclxuICAgICAgICBvdXRJbWFnZVB0ciA9IG91dEltYWdlUHRyIHwgMDtcclxuXHJcbiAgICAgICAgdmFyIHYgPSAwLFxyXG4gICAgICAgICAgICB1ID0gMCxcclxuICAgICAgICAgICAgc3VtID0gMCxcclxuICAgICAgICAgICAgeVN0YXJ0MSA9IDAsXHJcbiAgICAgICAgICAgIHlTdGFydDIgPSAwLFxyXG4gICAgICAgICAgICB4U3RhcnQxID0gMCxcclxuICAgICAgICAgICAgeFN0YXJ0MiA9IDAsXHJcbiAgICAgICAgICAgIG9mZnNldCA9IDA7XHJcblxyXG4gICAgICAgIGZvciAoIHYgPSAxOyAodiB8IDApIDwgKChzaXplIC0gMSkgfCAwKTsgdiA9ICh2ICsgMSkgfCAwKSB7XHJcbiAgICAgICAgICAgIG9mZnNldCA9IChvZmZzZXQgKyBzaXplKSB8IDA7XHJcbiAgICAgICAgICAgIGZvciAoIHUgPSAxOyAodSB8IDApIDwgKChzaXplIC0gMSkgfCAwKTsgdSA9ICh1ICsgMSkgfCAwKSB7XHJcbiAgICAgICAgICAgICAgICB5U3RhcnQxID0gKG9mZnNldCAtIHNpemUpIHwgMDtcclxuICAgICAgICAgICAgICAgIHlTdGFydDIgPSAob2Zmc2V0ICsgc2l6ZSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgeFN0YXJ0MSA9ICh1IC0gMSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgeFN0YXJ0MiA9ICh1ICsgMSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgc3VtID0gKChpbWFnZXNbKGluSW1hZ2VQdHIgKyB5U3RhcnQxICsgeFN0YXJ0MSkgfCAwXSB8IDApXHJcbiAgICAgICAgICAgICAgICAgICAgKyAoaW1hZ2VzWyhpbkltYWdlUHRyICsgeVN0YXJ0MSArIHhTdGFydDIpIHwgMF0gfCAwKVxyXG4gICAgICAgICAgICAgICAgICAgICsgKGltYWdlc1soaW5JbWFnZVB0ciArIG9mZnNldCArIHUpIHwgMF0gfCAwKVxyXG4gICAgICAgICAgICAgICAgICAgICsgKGltYWdlc1soaW5JbWFnZVB0ciArIHlTdGFydDIgKyB4U3RhcnQxKSB8IDBdIHwgMClcclxuICAgICAgICAgICAgICAgICAgICArIChpbWFnZXNbKGluSW1hZ2VQdHIgKyB5U3RhcnQyICsgeFN0YXJ0MikgfCAwXSB8IDApKSB8IDA7XHJcbiAgICAgICAgICAgICAgICBpZiAoKHN1bSB8IDApID4gKDAgfCAwKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGltYWdlc1sob3V0SW1hZ2VQdHIgKyBvZmZzZXQgKyB1KSB8IDBdID0gMTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaW1hZ2VzWyhvdXRJbWFnZVB0ciArIG9mZnNldCArIHUpIHwgMF0gPSAwO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybjtccl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6IG51bGwsXHJcbiAgICAgICAgICAgICAgICAgICAgcGF0dGVybjogbnVsbCxcclxuICAgICAgICAgICAgICAgICAgICBvdmVybGF5OiBudWxsXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZG9tOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZnJlcXVlbmN5OiBudWxsLFxyXG4gICAgICAgICAgICAgICAgICAgIHBhdHRlcm46IG51bGwsXHJcbiAgICAgICAgICAgICAgICAgICAgb3ZlcmxheTogbnVsbFxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBfYmFyY29kZVJlYWRlcnMgPSBbXTtcclxuXHJcbiAgICAgICAgaW5pdENhbnZhcygpO1xyXG4gICAgICAgIGluaXRSZWFkZXJzKCk7XHJcbiAgICAgICAgaW5pdENvbmZpZygpO1xyXG5cclxuICAgICAgICBmdW5jdGlvbiBpbml0Q2FudmFzKCkge1xyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50ICYmIHR5cGVvZiBkb2N1bWVudCAhPT0gJ3VuZGVmaW5lZCcpIHtcclxuICAgICAgICAgICAgICAgIHZhciAkZGVidWcgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKFwiI2RlYnVnLmRldGVjdGlvblwiKTtcclxuICAgICAgICAgICAgICAgIF9jYW52YXMuZG9tLmZyZXF1ZW5jeSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXCJjYW52YXMuZnJlcXVlbmN5XCIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFfY2FudmFzLmRvbS5mcmVxdWVuY3kpIHtcclxuICAgICAgICAgICAgICAgICAgICBfY2FudmFzLmRvbS5mcmVxdWVuY3kgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiY2FudmFzXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIF9jYW52YXMuZG9tLmZyZXF1ZW5jeS5jbGFzc05hbWUgPSBcImZyZXF1ZW5jeVwiO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgkZGVidWcpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGRlYnVnLmFwcGVuZENoaWxkKF9jYW52YXMuZG9tLmZyZXF1ZW5jeSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgX2NhbnZhcy5jdHguZnJlcXVlbmN5ID0gX2NhbnZhcy5kb20uZnJlcXVlbmN5LmdldENvbnRleHQoXCIyZFwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICBfY2FudmFzLmRvbS5wYXR0ZXJuID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcImNhbnZhcy5wYXR0ZXJuQnVmZmVyXCIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFfY2FudmFzLmRvbS5wYXR0ZXJuKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgX2NhbnZhcy5kb20ucGF0dGVybiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJjYW52YXNcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgX2NhbnZhcy5kb20ucGF0dGVybi5jbGFzc05hbWUgPSBcInBhdHRlcm5CdWZmZXJcIjtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoJGRlYnVnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRkZWJ1Zy5hcHBlbmRDaGlsZChfY2FudmFzLmRvbS5wYXR0ZXJuKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBfY2FudmFzLmN0eC5wYXR0ZXJuID0gX2NhbnZhcy5kb20ucGF0dGVybi5nZXRDb250ZXh0KFwiMmRcIik7XHJcblxyXG4gICAgICAgICAgICAgICAgX2NhbnZhcy5kb20ub3ZlcmxheSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXCJjYW52YXMuZHJhd2luZ0J1ZmZlclwiKTtcclxuICAgICAgICAgICAgICAgIGlmIChfY2FudmFzLmRvbS5vdmVybGF5KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgX2NhbnZhcy5jdHgub3ZlcmxheSA9IF9jYW52YXMuZG9tLm92ZXJsYXkuZ2V0Q29udGV4dChcIjJkXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBpbml0UmVhZGVycygpIHtcclxuICAgICAgICAgICAgY29uZmlnLnJlYWRlcnMuZm9yRWFjaChmdW5jdGlvbihyZWFkZXJDb25maWcpIHtcclxuICAgICAgICAgICAgICAgIHZhciByZWFkZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiA9IHt9O1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcmVhZGVyQ29uZmlnID09PSAnb2JqZWN0Jykge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlYWRlciA9IHJlYWRlckNvbmZpZy5mb3JtYXQ7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiA9IHJlYWRlckNvbmZpZy5jb25maWc7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiByZWFkZXJDb25maWcgPT09ICdzdHJpbmcnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVhZGVyID0gcmVhZGVyQ29uZmlnO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiQmVmb3JlIHJlZ2lzdGVyaW5nIHJlYWRlcjogXCIsIHJlYWRlcik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBfYmFyY29kZVJlYWRlcnMucHVzaChuZXcgUkVBREVSU1tyZWFkZXJdKGNvbmZpZ3VyYXRpb24pKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQpIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiUmVnaXN0ZXJlZCBSZWFkZXJzOiBcIiArIF9iYXJjb2RlUmVhZGVyc1xyXG4gICAgICAgICAgICAgICAgICAgIC5tYXAoKHJlYWRlcikgPT4gSlNPTi5zdHJpbmdpZnkoe2Zvcm1hdDogcmVhZGVyLkZPUk1BVCwgY29uZmlnOiByZWFkZXIuY29uZmlnfSkpXHJcbiAgICAgICAgICAgICAgICAgICAgLmpvaW4oJywgJykpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBpbml0Q29uZmlnKCkge1xyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50ICYmIHR5cGVvZiBkb2N1bWVudCAhPT0gJ3VuZGVmaW5lZCcpIHtcclxuICAgICAgICAgICAgICAgIHZhciBpLFxyXG4gICAgICAgICAgICAgICAgICAgIHZpcyA9IFt7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGU6IF9jYW52YXMuZG9tLmZyZXF1ZW5jeSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcDogY29uZmlnLmRlYnVnLnNob3dGcmVxdWVuY3lcclxuICAgICAgICAgICAgICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGU6IF9jYW52YXMuZG9tLnBhdHRlcm4sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3A6IGNvbmZpZy5kZWJ1Zy5zaG93UGF0dGVyblxyXG4gICAgICAgICAgICAgICAgICAgIH1dO1xyXG5cclxuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCB2aXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAodmlzW2ldLnByb3AgPT09IHRydWUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmlzW2ldLm5vZGUuc3R5bGUuZGlzcGxheSA9IFwiYmxvY2tcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2aXNbaV0ubm9kZS5zdHlsZS5kaXNwbGF5ID0gXCJub25lXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKipcclxuICAgICAgICAgKiBleHRlbmQgdGhlIGxpbmUgb24gYm90aCBlbmRzXHJcbiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gbGluZVxyXG4gICAgICAgICAqIEBwYXJhbSB7TnVtYmVyfSBhbmdsZVxyXG4gICAgICAgICAqL1xyXG4gICAgICAgIGZ1bmN0aW9uIGdldEV4dGVuZGVkTGluZShsaW5lLCBhbmdsZSwgZXh0KSB7XHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIGV4dGVuZExpbmUoYW1vdW50KSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgZXh0ZW5zaW9uID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIHk6IGFtb3VudCAqIE1hdGguc2luKGFuZ2xlKSxcclxuICAgICAgICAgICAgICAgICAgICB4OiBhbW91bnQgKiBNYXRoLmNvcyhhbmdsZSlcclxuICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICAgICAgbGluZVswXS55IC09IGV4dGVuc2lvbi55O1xyXG4gICAgICAgICAgICAgICAgbGluZVswXS54IC09IGV4dGVuc2lvbi54O1xyXG4gICAgICAgICAgICAgICAgbGluZVsxXS55ICs9IGV4dGVuc2lvbi55O1xyXG4gICAgICAgICAgICAgICAgbGluZVsxXS54ICs9IGV4dGVuc2lvbi54O1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBjaGVjayBpZiBpbnNpZGUgaW1hZ2VcclxuICAgICAgICAgICAgZXh0ZW5kTGluZShleHQpO1xyXG4gICAgICAgICAgICB3aGlsZSAoZXh0ID4gMSAmJiAoIWlucHV0SW1hZ2VXcmFwcGVyLmluSW1hZ2VXaXRoQm9yZGVyKGxpbmVbMF0sIDApXHJcbiAgICAgICAgICAgICAgICAgICAgfHwgIWlucHV0SW1hZ2VXcmFwcGVyLmluSW1hZ2VXaXRoQm9yZGVyKGxpbmVbMV0sIDApKSkge1xyXG4gICAgICAgICAgICAgICAgZXh0IC09IE1hdGguY2VpbChleHQgLyAyKTtcclxuICAgICAgICAgICAgICAgIGV4dGVuZExpbmUoLWV4dCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGxpbmU7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBnZXRMaW5lKGJveCkge1xyXG4gICAgICAgICAgICByZXR1cm4gW3tcclxuICAgICAgICAgICAgICAgIHg6IChib3hbMV1bMF0gLSBib3hbMF1bMF0pIC8gMiArIGJveFswXVswXSxcclxuICAgICAgICAgICAgICAgIHk6IChib3hbMV1bMV0gLSBib3hbMF1bMV0pIC8gMiArIGJveFswXVsxXVxyXG4gICAgICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgICAgICB4OiAoYm94WzNdWzBdIC0gYm94WzJdWzBdKSAvIDIgKyBib3hbMl1bMF0sXHJcbiAgICAgICAgICAgICAgICB5OiAoYm94WzNdWzFdIC0gYm94WzJdWzFdKSAvIDIgKyBib3hbMl1bMV1cclxuICAgICAgICAgICAgfV07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiB0cnlEZWNvZGUobGluZSkge1xyXG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0gbnVsbCxcclxuICAgICAgICAgICAgICAgIGksXHJcbiAgICAgICAgICAgICAgICBiYXJjb2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cm4gbnVsbDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgY29kZVJlc3VsdDogcmVzdWx0LFxyXG4gICAgICAgICAgICAgICAgYmFyY29kZUxpbmU6IGJhcmNvZGVMaW5lXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKipcclxuICAgICAgICAgKiBUaGlzIG1ldGhvZCBzbGljZXMgdGhlIGdpdmVuIGFyZWEgYXBhcnQgYW5kIHRyaWVzIHRvIGRldGVjdCBhIGJhcmNvZGUtcGF0dGVyblxyXG4gICAgICAgICAqIGZvciBlYWNoIHNsaWNlLiBJdCByZXR1cm5zIHRoZSBkZWNvZGVkIGJhcmNvZGUsIG9yIG51bGwgaWYgbm90aGluZyB3YXMgZm91bmRcclxuICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBib3hcclxuICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBsaW5lXHJcbiAgICAgICAgICogQHBhcmFtIHtOdW1iZXJ9IGxpbmVBbmdsZVxyXG4gICAgICAgICAqL1xyXG4gICAgICAgIGZ1bmN0aW9uIHRyeURlY29kZUJydXRlRm9yY2UoYm94LCBsaW5lLCBsaW5lQW5nbGUpIHtcclxuICAgICAgICAgICAgdmFyIHNpZGVMZW5ndGggPSBNYXRoLnNxcnQoTWF0aC5wb3coYm94WzFdWzBdIC0gYm94WzBdWzBdLCAyKSArIE1hdGgucG93KChib3hbMV1bMV0gLSBib3hbMF1bMV0pLCAyKSksXHJcbiAgICAgICAgICAgICAgICBpLFxyXG4gICAgICAgICAgICAgICAgc2xpY2VzID0gMTYsXHJcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBudWxsLFxyXG4gICAgICAgICAgICAgICAgZGlyLFxyXG4gICAgICAgICAgICAgICAgZXh0ZW5zaW9uLFxyXG4gICAgICAgICAgICAgICAgeGRpciA9IE1hdGguc2luKGxpbmVBbmdsZSksXHJcbiAgICAgICAgICAgICAgICB5ZGlyID0gTWF0aC5jb3MobGluZUFuZ2xlKTtcclxuXHJcbiAgICAgICAgICAgIGZvciAoIGkgPSAxOyBpIDwgc2xpY2VzICYmIHJlc3VsdCA9PT0gbnVsbDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBtb3ZlIGxpbmUgcGVycGVuZGljdWxhciB0byBhbmdsZVxyXG4gICAgICAgICAgICAgICAgZGlyID0gc2lkZUxlbmd0aCAvIHNsaWNlcyAqIGkgKiAoaSAlIDIgPT09IDAgPyAtMSA6IDEpO1xyXG4gICAgICAgICAgICAgICAgZXh0ZW5zaW9uID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIHk6IGRpciAqIHhkaXIsXHJcbiAgICAgICAgICAgICAgICAgICAgeDogZGlyICogeWRpclxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgIGxpbmVbMF0ueSArPSBleHRlbnNpb24ueDtcclxuICAgICAgICAgICAgICAgIGxpbmVbMF0ueCAtPSBleHRlbnNpb24ueTtcclxuICAgICAgICAgICAgICAgIGxpbmVbMV0ueSArPSBleHRlbnNpb24ueDtcclxuICAgICAgICAgICAgICAgIGxpbmVbMV0ueCAtPSBleHRlbnNpb24ueTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXN1bHQgPSB0cnlEZWNvZGUobGluZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGdldExpbmVMZW5ndGgobGluZSkge1xyXG4gICAgICAgICAgICByZXR1cm4gTWF0aC5zcXJ0KFxyXG4gICAgICAgICAgICAgICAgTWF0aC5wb3coTWF0aC5hYnMobGluZVsxXS55IC0gbGluZVswXS55KSwgMikgK1xyXG4gICAgICAgICAgICAgICAgTWF0aC5wb3coTWF0aC5hYnMobGluZVsxXS54IC0gbGluZVswXS54KSwgMikpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLyoqXHJcbiAgICAgICAgICogV2l0aCB0aGUgaGVscCBvZiB0aGUgY29uZmlndXJlZCByZWFkZXJzIChDb2RlMTI4IG9yIEVBTikgdGhpcyBmdW5jdGlvbiB0cmllcyB0byBkZXRlY3QgYVxyXG4gICAgICAgICAqIHZhbGlkIGJhcmNvZGUgcGF0dGVybiB3aXRoaW4gdGhlIGdpdmVuIGFyZWEuXHJcbiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGJveCBUaGUgYXJlYSB0byBzZWFyY2ggaW5cclxuICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSB0aGUgcmVzdWx0IHtjb2RlUmVzdWx0LCBsaW5lLCBhbmdsZSwgcGF0dGVybiwgdGhyZXNob2xkfVxyXG4gICAgICAgICAqL1xyXG4gICAgICAgIGZ1bmN0aW9uIGRlY29kZUZyb21Cb3VuZGluZ0JveChib3gpIHtcclxuICAgICAgICAgICAgdmFyIGxpbmUsXHJcbiAgICAgICAgICAgICAgICBsaW5lQW5nbGUsXHJcbiAgICAgICAgICAgICAgICBjdHggPSBfY2FudmFzLmN0eC5vdmVybGF5LFxyXG4gICAgICAgICAgICAgICAgcmVzdWx0LFxyXG4gICAgICAgICAgICAgICAgbGluZUxlbmd0aDtcclxuXHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQpIHtcclxuICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGVidWcuZHJhd0JvdW5kaW5nQm94ICYmIGN0eCkge1xyXG4gICAgICAgICAgICAgICAgICAgIEltYWdlRGVidWcuZHJhd1BhdGgoYm94LCB7eDogMCwgeTogMX0sIGN0eCwge2NvbG9yOiBcImJsdWVcIiwgbGluZVdpZHRoOiAyfSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGxpbmUgPSBnZXRMaW5lKGJveCk7XHJcbiAgICAgICAgICAgIGxpbmVMZW5ndGggPSBnZXRMaW5lTGVuZ3RoKGxpbmUpO1xyXG4gICAgICAgICAgICBsaW5lQW5nbGUgPSBNYXRoLmF0YW4yKGxpbmVbMV0ueSAtIGxpbmVbMF0ueSwgbGluZVsxXS54IC0gbGluZVswXS54KTtcclxuICAgICAgICAgICAgbGluZSA9IGdldEV4dGVuZGVkTGluZShsaW5lLCBsaW5lQW5nbGUsIE1hdGguZmxvb3IobGluZUxlbmd0aCAqIDAuMSkpO1xyXG4gICAgICAgICAgICBpZiAobGluZSA9PT0gbnVsbCl7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmVzdWx0ID0gdHJ5RGVjb2RlKGxpbmUpO1xyXG4gICAgICAgICAgICBpZiAocmVzdWx0ID09PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICByZXN1bHQgPSB0cnlEZWNvZGVCcnV0ZUZvcmNlKGJveCwgbGluZSwgbGluZUFuZ2xlKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKHJlc3VsdCA9PT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQgJiYgcmVzdWx0ICYmIGNvbmZpZy5kZWJ1Zy5kcmF3U2NhbmxpbmUgJiYgY3R4KSB7XHJcbiAgICAgICAgICAgICAgICBJbWFnZURlYnVnLmRyYXdQYXRoKGxpbmUsIHt4OiAneCcsIHk6ICd5J30sIGN0eCwge2NvbG9yOiAncmVkJywgbGluZVdpZHRoOiAzfSk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBjb2RlUmVzdWx0OiByZXN1bHQuY29kZVJlc3VsdCxcclxuICAgICAgICAgICAgICAgIGxpbmU6IGxpbmUsXHJcbiAgICAgICAgICAgICAgICBhbmdsZTogbGluZUFuZ2xlLFxyXG4gICAgICAgICAgICAgICAgcGF0dGVybjogcmVzdWx0LmJhcmNvZGVMaW5lLmxpbmUsXHJcbiAgICAgICAgICAgICAgICB0aHJlc2hvbGQ6IHJlc3VsdC5iYXJjb2RlTGluZS50aHJlc2hvbGRcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIGRlY29kZUZyb21Cb3VuZGluZ0JveDogZnVuY3Rpb24oYm94KSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVjb2RlRnJvbUJvdW5kaW5nQm94KGJveCk7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGRlY29kZUZyb21Cb3VuZGluZ0JveGVzOiBmdW5jdGlvbihib3hlcykge1xyXG4gICAgICAgICAgICAgICAgdmFyIGksIHJlc3VsdCxcclxuICAgICAgICAgICAgICAgICAgICBiYXJjb2RlcyA9IFtdLFxyXG4gICAgICAgICAgICAgICAgICAgIG11bHRpcGxlID0gY29uZmlnLm11bHRpcGxlO1xyXG5cclxuICAgICAgICAgICAgICAgIGZvciAoIGkgPSAwOyBpIDwgYm94ZXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCBib3ggPSBib3hlc1tpXTtcclxuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSBkZWNvZGVGcm9tQm91bmRpbmdCb3goYm94KSB8fCB7fTtcclxuICAgICAgICAgICAgICAgICAgICByZXN1bHQuYm94ID0gYm94O1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAobXVsdGlwbGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmFyY29kZXMucHVzaChyZXN1bHQpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzdWx0LmNvZGVSZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKG11bHRpcGxlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmFyY29kZXNcclxuICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzZXRSZWFkZXJzOiBmdW5jdGlvbihyZWFkZXJzKSB7XHJcbiAgICAgICAgICAgICAgICBjb25maWcucmVhZGVycyA9IHJlYWRlcnM7XHJcbiAgICAgICAgICAgICAgICBfYmFyY29kZVJlYWRlcnMubGVuZ3RoID0gMDtcclxuICAgICAgICAgICAgICAgIGluaXRSZWFkZXJzKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG4gICAgfVxyXG59O1xyXG5cblxuXG4vKiogV0VCUEFDSyBGT09URVIgKipcbiAqKiBEOi93b3JrL3F1YWdnYUpTL3NyYy9kZWNvZGVyL2JhcmNvZGVfZGVjb2Rlci5qc1xuICoqLyIsImltcG9ydCBDVlV0aWxzIGZyb20gJy4uL2NvbW1vbi9jdl91dGlscyc7XHJcbmltcG9ydCBJbWFnZVdyYXBwZXIgZnJvbSAnLi4vY29tbW9uL2ltYWdlX3dyYXBwZXInO1xyXG5cclxudmFyIEJyZXNlbmhhbSA9IHt9O1xyXG5cclxudmFyIFNsb3BlID0ge1xyXG4gICAgRElSOiB7XHJcbiAgICAgICAgVVA6IDEsXHJcbiAgICAgICAgRE9XTjogLTFcclxuICAgIH1cclxufTtcclxuLyoqXHJcbiAqIFNjYW5zIGEgbGluZSBvZiB0aGUgZ2l2ZW4gaW1hZ2UgZnJvbSBwb2ludCBwMSB0byBwMiBhbmQgcmV0dXJucyBhIHJlc3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iByZWFkKGEsIGIpIHtcclxuICAgICAgICB2YWwgPSBpbWFnZURhdGFbYiAqIHdpZHRoICsgYV07XHJcbiAgICAgICAgc3VtICs9IHZhbDtcclxuICAgICAgICBtaW4gPSB2YWwgPCBtaW4gPyB2YWwgOiBtaW47XHJcbiAgICAgICAgbWF4ID0gdmFsID4gbWF4ID8gdmFsIDogbWF4O1xyXG4gICAgICAgIGxpbmUucHVzaCh2YWwpO1xyXG4gICAgfVxyXG5cclxuICAgIGlmIChzdGVlcCkge1xyXG4gICAgICAgIHRtcCA9IHgwO1xyXG4gICAgICAgIHgwID0geTA7XHJcbiAgICAgICAgeTAgPSB0bXA7XHJcblxyXG4gICAgICAgIHRtcCA9IHgxO1xyXG4gICAgICAgIHgxID0geTE7XHJcbiAgICAgICAgeTEgPSB0bXA7XHJcbiAgICB9XHJcbiAgICBpZiAoeDAgPiB4MSkge1xyXG4gICAgICAgIHRtcCA9IHgwO1xyXG4gICAgICAgIHgwID0geDE7XHJcbiAgICAgICAgeDEgPSB0bXA7XHJcblxyXG4gICAgICAgIHRtcCA9IHkwO1xyXG4gICAgICAgIHkwID0geTE7XHJcbiAgICAgICAgeTEgPSB0bXA7XHJcbiAgICB9XHJcbiAgICBkZWx0YXggPSB4MSAtIHgwO1xyXG4gICAgZGVsdGF5ID0gTWF0aC5hYnMoeTEgLSB5MCk7XHJcbiAgICBlcnJvciA9IChkZWx0YXggLyAyKSB8IDA7XHJcbiAgICB5ID0geTA7XHJcbiAgICB5c3RlcCA9IHkwIDwgeTEgPyAxIDogLTE7XHJcbiAgICBmb3IgKCB4ID0geDA7IHggPCB4MTsgeCsrKSB7XHJcbiAgICAgICAgaWYgKHN0ZWVwKXtcclxuICAgICAgICAgICAgcmVhZCh5LCB4KTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZWFkKHgsIHkpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlcnJvciA9IGVycm9yIC0gZGVsdGF5O1xyXG4gICAgIC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xyXG4gKi9cclxuQnJlc2VuaGFtLnRvQmluYXJ5TGluZSA9IGZ1bmN0aW9uKHJlc3VsdCkge1xyXG4gICAgdmFyIG1pbiA9IHJlc3VsdC5taW4sXHJcbiAgICAgICAgbWF4ID0gcmVzdWx0Lm1heCxcclxuICAgICAgICBsaW5lID0gcmVzdWx0LmxpbmUsXHJcbiAgICAgICAgc2xvcGUsXHJcbiAgICAgICAgc2xvcGUyLFxyXG4gICAgICAgIGNlbnRlciA9IG1pbiArIChtYXggLSBtaW4pIC8gMixcclxuICAgICAgICBleHRyZW1hID0gW10sXHJcbiAgICAgICAgY3VycmVudERpcixcclxuICAgICAgICBkaXIsXHJcbiAgICAgICAgdGhyZXNob2xkID0gKG1heCAtIG1pbikgLyAxMixcclxuICAgICAgICByVGhyZXNob2xkID0gLXRocmVzaG9sZCxcclxuICAgICAgICBpLFxyXG4gICAgICAgIGo7XHJcblxyXG4gICAgLy8gMS4gZmluZCBleHRyZW1hXHJcbiAgICBjdXJyZW50RGlyID0gbGluZVswXSA+IGNlbnRlciA/IFNsb3BlLkRJUi5VUCA6IFNsb3BlLkRJUi5ET1dOO1xyXG4gICAgZXh0cmVtYS5wdXNoKHtcclxuICAgICAgICBwb3M6IDAsXHJcbiAgICAgICAgdmFsOiBsaW5lWzBdXHJcbiAgICB9KTtcclxuICAgIGZvciAoIGkgPSAwOyBpIDwgbGluZS5sZW5ndGggLSAyOyBpKyspIHtcclxuICAgICAgICBzbG9wZSA9IChsaW5lW2kgKyAxXSAtIGxpbmVbaV0pO1xyXG4gICAgICAgIHNsb3BlMiA9IChsaW5lW2kgKyAyXSAtIGxpbmVbaSArIDFdKTtcclxuICAgICAgICBpZiAoKHNsb3BlICsgc2xvcGUyKSA8IHJUaHJlc2hvbGQgJiYgbGluZVtpICsgMV0gPCAoY2VudGVyICogMS41KSkge1xyXG4gICAgICAgICAgICBkaXIgPSBTbG9wZS5ESVIuRE9XTjtcclxuICAgICAgICB9IGVsc2UgaWYgKChzbG9wZSArIHNsb3BlMikgPiB0aHJlc2hvbGQgJiYgbGluZVtpICsgMV0gPiAoY2VudGVyICogMC41KSkge1xyXG4gICAgICAgICAgICBkaXIgPSBTbG9wZS5ESVIuVVA7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgZGlyID0gY3VycmVudERpcjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChjdXJyZW50RGlyICE9PSBkaXIpIHtcclxuICAgICAgICAgICAgZXh0cmVtYS5wdXNoKHtcclxuICAgICAgICAgICAgICAgIHBvczogaSxcclxuICAgICAgICAgICAgICAgIHZhbDogbGluZVtpXVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgY3VycmVudERpciA9IGRpcjtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICBleHRyZW1hLnB1c2goe1xyXG4gICAgICAgIHBvczogbGluZS5sZW5ndGgsXHJcbiAgICAgICAgdmFsOiBsaW5lW2xpbmUubGVuZ3RoIC0gMV1cclxuICAgIH0pO1xyXG5cclxuICAgIGZvciAoIGogPSBleHRyZW1hWzBdLnBvczsgaiA8IGV4dHJlbWFbMV0ucG9zOyBqKyspIHtcclxuICAgICAgICBsaW5lW2pdID0gbGluZVtqXSA+IGNlbnRlciA/IDAgOiAxO1xyXG4gICAgfVxyXG5cclxuICAgIC8vIGl0ZXJhdGUgb3ZlciBleHRyZW1hIGFuZCBjb252ZXJ0IHRvIGJpbmFyeSBiYXNlZCBvbiBhdmcgYmV0d2VlbiBtaW5tYXhcclxuICAgIGZvciAoIGkgPSAxOyBpIDwgZXh0cmVtYS5sZW5ndGggLSAxOyBpKyspIHtcclxuICAgICAgICBpZiAoZXh0cmVtYVtpICsgMV0udmFsID4gZXh0cmVtYVtpXS52YWwpIHtcclxuICAgICAgICAgICAgdGhyZXNob2xkID0gKGV4dHJlbWFbaV0udmFsICsgKChleHRyZW1hW2kgKyAxXS52YWwgLSBleHRyZW1hW2ldLnZhbCkgLyAzKSAqIDIpIHwgMDtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aHJlc2hvbGQgPSAoZXh0cmVtYVtpICsgMV0udmFsICsgKChleHRyZW1hW2ldLnZhbCAtIGV4dHJlbWFbaSArIDFdLnZhbCkgLyAzKSkgfCAwO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZm9yICggaiA9IGV4dHJlbWFbaV0ucG9zOyBqIDwgZXh0cmVtYVtpICsgMV0ucG9zOyBqKyspIHtcclxuICAgICAgICAgICAgbGluZVtqXSA9IGxpbmVbal0gPiB0aHJlc2hvbGQgPyAwIDogMTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHtcclxuICAgICAgICBsaW5lOiBsaW5lLFxyXG4gICAgICAgIHRocmVzaG9sZDogdGhyZXNob2xkXHJcbiAgICB9O1xyXG59O1xyXG5cclxuLyoqXHJcbiAqIFVzZWQgZm9yIGRldmVsb3BtZW50IG9ubHlcclxuICovXHJcbkJyZXNlbmhhbS5kZWJ1ZyA9IHtcclxuICAgIHByaW50RnJlcXVlbmN5OiBmdW5jdGlvbihsaW5lLCBjYW52YXMpIHtcclxuICAgICAgICB2YXIgaSxcclxuICAgICAgICAgICAgY3R4ID0gY2FudmFzLmdldENvbnRleHQoXCIyZFwiKTtcclxuICAgICAgICBjYW52YXMud2lkdGggPSBsaW5lLmxlbmd0aDtcclxuICAgICAgICBjYW52YXMuaGVpZ2h0ID0gMjU2O1xyXG5cclxuICAgICAgICBjdHguYmVnaW5QYXRoKCk7XHJcbiAgICAgICAgY3R4LnN0cm9rZVN0eWxlID0gXCJibHVlXCI7XHJcbiAgICAgICAgZm9yICggaSA9IDA7IGkgPCBsaW5lLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGN0eC5tb3ZlVG8oaSwgMjU1KTtcclxuICAgICAgICAgICAgY3R4LmxpbmVUbyhpLCAyNTUgLSBsaW5lW2ldKTtcclxuICAgICAgICB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W5kOiBzdGFydFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29kZSxcclxuICAgICAgICBlcnJvcixcclxuICAgICAgICBub3JtYWxpemVkO1xyXG5cclxuICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKGNvdW50ZXJQb3MgPT09IGNvdW50ZXIubGVuZ3RoIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgbm9ybWFsaXplZCA9IHNlbGYuX25vcm1hbGl6ZShjb3VudGVyKTtcclxuICAgICAgICAgICAgICAgIGlmIChub3JtYWxpemVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb2RlID0gMDsgY29kZSA8IHNlbGYuQ09ERV9QQVRURVJOLmxlbmd0aDsgY29kZSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yID0gc2VsZi5fbWF0Y2hQYXR0ZXJuKG5vcm1hbGl6ZWQsIHNlbGYuQ09ERV9QQVRURVJOW2NvZGVdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yIDwgYmVzdE1hdGNoLmVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guY29kZSA9IGNvZGU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZXJyb3IgPSBlcnJvcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZW5kID0gaTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYmVzdE1hdGNoO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY291bnRlclBvcysrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10gPSAxO1xyXG4gICAgICAgICAgICBpc1doaXRlID0gIWlzV2hpdGU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIG51bGw7XHJcbn07XHJcblxyXG5Db2RlMTI4UmVhZGVyLnByb3RvdHlwZS5fZmluZFN0YXJ0ID0gZnVuY3Rpb24oKSB7XHJcbiAgICB2YXIgY291bnRlciA9IFswLCAwLCAwLCAwLCAwLCAwXSxcclxuICAgICAgICBpLFxyXG4gICAgICAgIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIG9mZnNldCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93KSxcclxuICAgICAgICBpc1doaXRlID0gZmFsc2UsXHJcbiAgICAgICAgY291bnRlclBvcyA9IDAsXHJcbiAgICAgICAgYmVzdE1hdGNoID0ge1xyXG4gICAgICAgICAgICBlcnJvcjogTnVtYmVyLk1BWF9WQUxVRSxcclxuICAgICAgICAgICAgY29kZTogLTEsXHJcbiAgICAgICAgICAgIHN0YXJ0OiAwLFxyXG4gICAgICAgICAgICBlbmQ6IDBcclxuICAgICAgICB9LFxyXG4gICAgICAgIGNvZGUsXHJcbiAgICAgICAgZXJyb3IsXHJcbiAgICAgICAgaixcclxuICAgICAgICBzdW0sXHJcbiAgICAgICAgbm9ybWFsaXplZDtcclxuXHJcbiAgICBmb3IgKCBpID0gb2Zmc2V0OyBpIDwgc2VsZi5fcm93Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgaWYgKHNlbGYuX3Jvd1tpXSBeIGlzV2hpdGUpIHtcclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSsrO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChjb3VudGVyUG9zID09PSBjb3VudGVyLmxlbmd0aCAtIDEpIHtcclxuICAgICAgICAgICAgICAgIHN1bSA9IDA7XHJcbiAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IGNvdW50ZXIubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBzdW0gKz0gY291bnRlcltqXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWQgPSBzZWxmLl9ub3JtYWxpemUoY291bnRlcik7XHJcbiAgICAgICAgICAgICAgICBpZiAobm9ybWFsaXplZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAoY29kZSA9IHNlbGYuU1RBUlRfQ09ERV9BOyBjb2RlIDw9IHNlbGYuU1RBUlRfQ09ERV9DOyBjb2RlKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSBzZWxmLl9tYXRjaFBhdHRlcm4obm9ybWFsaXplZCwgc2VsZi5DT0RFX1BBVFRFUk5bY29kZV0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IgPCBiZXN0TWF0Y2guZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5jb2RlID0gY29kZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lcnJvciA9IGVycm9yO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChiZXN0TWF0Y2guZXJyb3IgPCBzZWxmLkFWR19DT0RFX0VSUk9SKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5zdGFydCA9IGkgLSBzdW07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lbmQgPSBpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYmVzdE1hdGNoO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IDQ7IGorKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbal0gPSBjb3VudGVyW2ogKyAyXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGNvdW50ZXJbNF0gPSAwO1xyXG4gICAgICAgICAgICAgICAgY291bnRlcls1XSA9IDA7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zLS07XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbnVsbDtcclxufTtcclxuXHJcbkNvZGUxMjhSZWFkZXIucHJvdG90eXBlLl9kZWNvZGUgPSBmdW5jdGlvbigpIHtcclxuICAgIHZhciBzZWxmID0gdGhpcyxcclxuICAgICAgICBzdGFydEluZm8gPSBzZWxmLl9maW5kU3RhcnQoKSxcclxuICAgICAgICBjb2RlID0gbnVsbCxcclxuICAgICAgICBkb25lID0gZmFsc2UsXHJcbiAgICAgICAgcmVzdWx0ID0gW10sXHJcbiAgICAgICAgbXVsdGlwbGllciA9IDAsXHJcbiAgICAgICAgY2hlY2tzdW0gPSAwLFxyXG4gICAgICAgIGNvZGVzZXQsXHJcbiAgICAgICAgcmF3UmVzdWx0ID0gW10sXHJcbiAgICAgICAgZGVjb2RlZENvZGVzID0gW10sXHJcbiAgICAgICAgc2hpZnROZXh0ID0gZmFsc2UsXHJcbiAgICAgICAgdW5zaGlmdCxcclxuICAgICAgICByZ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gICAgICAgICAgICByZW1vdmVMYXN0Q2hhcmFjdGVyID0gdHJ1ZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKGNvZGUuY29kZSAhPT0gc2VsZi5TVE9QX0NPREUpIHtcclxuICAgICAgICAgICAgICAgIHJhd1Jlc3VsdC5wdXNoKGNvZGUuY29kZSk7XHJcbiAgICAgICAgICAgICAgICBtdWx0aXBsaWVyKys7XHJcbiAgICAgICAgICAgICAgICBjaGVja3N1bSArPSBtdWx0aXBsaWVyICogY29kZS5jb2RlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGRlY29kZWRDb2Rlcy5wdXNoKGNvZGUpO1xyXG5cclxuICAgICAgICAgICAgc3dpdGNoIChjb2Rlc2V0KSB7XHJcbiAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0E6XHJcbiAgICAgICAgICAgICAgICBpZiAoY29kZS5jb2RlIDwgNjQpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChTdHJpbmcuZnJvbUNoYXJDb2RlKDMyICsgY29kZS5jb2RlKSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNvZGUuY29kZSA8IDk2KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goU3RyaW5nLmZyb21DaGFyQ29kZShjb2RlLmNvZGUgLSA2NCkpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY29kZS5jb2RlICE9PSBzZWxmLlNUT1BfQ09ERSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZW1vdmVMYXN0Q2hhcmFjdGVyID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoY29kZS5jb2RlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfU0hJRlQ6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNoaWZ0TmV4dCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQjpcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZXNldCA9IHNlbGYuQ09ERV9CO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9DOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0M7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5TVE9QX0NPREU6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQjpcclxuICAgICAgICAgICAgICAgIGlmIChjb2RlLmNvZGUgPCA5Nikge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKFN0cmluZy5mcm9tQ2hhckNvZGUoMzIgKyBjb2RlLmNvZGUpKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvZGUuY29kZSAhPT0gc2VsZi5TVE9QX0NPREUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3ZlTGFzdENoYXJhY3RlciA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGNvZGUuY29kZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX1NISUZUOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzaGlmdE5leHQgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0E7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0E6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQzpcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZXNldCA9IHNlbGYuQ09ERV9DO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuU1RPUF9DT0RFOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0M6XHJcbiAgICAgICAgICAgICAgICBpZiAoY29kZS5jb2RlIDwgMTAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goY29kZS5jb2RlIDwgMTAgPyBcIjBcIiArIGNvZGUuY29kZSA6IGNvZGUuY29kZSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb2RlLmNvZGUgIT09IHNlbGYuU1RPUF9DT0RFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZUxhc3RDaGFyYWN0ZXIgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChjb2RlLmNvZGUpIHtcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9BOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0E7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0I6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLlNUT1BfQ09ERTpcclxuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgZG9uZSA9IHRydWU7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmICh1bnNoaWZ0KSB7XHJcbiAgICAgICAgICAgIGNvZGVzZXQgPSBjb2Rlc2V0ID09PSBzZWxmLkNPREVfQSA/IHNlbGYuQ09ERV9CIDogc2VsZi5DT0RFX0E7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGlmIChjb2RlID09PSBudWxsKSB7XHJcbiAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICB9XHJcblxyXG4gICAgY29kZS5lbmQgPSBzZWxmLl9uZXh0VW5z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H1cclxuICAgIHJldHVybiBsaW5lLmxlbmd0aDtcclxufTtcclxuXHJcbkJhcmNvZGVSZWFkZXIucHJvdG90eXBlLl9ub3JtYWxpemUgPSBmdW5jdGlvbihjb3VudGVyLCBtb2R1bG8pIHtcclxuICAgIHZhciBpLFxyXG4gICAgICAgIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIHN1bSA9IDAsXHJcbiAgICAgICAgcmF0aW8sXHJcbiAgICAgICAgbnVtT25lcyA9IDAsXHJcbiAgICAgICAgbm9ybWFsaXplZCA9IFtdLFxyXG4gICAgICAgIG5vcm0gPSAwO1xyXG5cclxuICAgIGlmICghbW9kdWxvKSB7XHJcbiAgICAgICAgbW9kdWxvID0gc2VsZi5NT0RVTE87XHJcbiAgICB9XHJcbiAgICBmb3IgKGkgPSAwOyBpIDwgY291bnRlci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGlmIChjb3VudGVyW2ldID09PSAxKSB7XHJcbiAgICAgICAgICAgIG51bU9uZXMrKztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBzdW0gKz0gY291bnRlcltpXTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByYXRpbyA9IHN1bSAvIChtb2R1bG8gLSBudW1PbmVzKTtcclxuICAgIGlmIChyYXRpbyA+IDEuMCkge1xyXG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBjb3VudGVyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIG5vcm0gPSBjb3VudGVyW2ldID09PSAxID8gY291bnRlcltpXSA6IGNvdW50ZXJbaV0gLyByYXRpbztcclxuICAgICAgICAgICAgbm9ybWFsaXplZC5wdXNoKG5vcm0pO1xyXG4gICAgICAgIH1cclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgcmF0aW8gPSAoc3VtICsgbnVtT25lcykgLyBtb2R1bG87XHJcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvdW50ZXIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgbm9ybSA9IGNvdW50ZXJbaV0gLyByYXRpbztcclxuICAgICAgICAgICAgbm9ybWFsaXplZC5wdXNoKG5vcm0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBub3JtYWxpemVkO1xyXG59O1xyXG5cclxuQmFyY29kZVJlYWRlci5wcm90b3R5cGUuX21hdGNoVHJhY2UgPSBmdW5jdGlvbihjbXBDb3VudGVyLCBlcHNpbG9uKSB7XHJcbiAgICB2YXIgY291bnRlciA9IFtdLFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgb2Zmc2V0ID0gc2VsZi5fbmV4dFNldChzZWxmLl9yb3cpLFxyXG4gICAgICAgIGlzV2hpdGUgPSAhc2VsZi5fcm93W29mZnNldF0sXHJcbiAgICAgICAgY291bnRlclBvcyA9IDAsXHJcbiAgICAgICAgYmVzdE1hdGNoID0ge1xyXG4gICAgICAgICAgICBlcnJvcjogTnVtYmVyLk1BWF9WQUxVRSxcclxuICAgICAgICAgICAgY29kZTogLTEsXHJcbiAgICAgICAgICAgIHN0YXJ0OiAwXHJcbiAgICAgICAgfSxcclxuICAgICAgICBlcnJvcjtcclxuXHJcbiAgICBpZiAoY21wQ291bnRlcikge1xyXG4gICAgICAgIGZvciAoIGkgPSAwOyBpIDwgY21wQ291bnRlci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBjb3VudGVyLnB1c2goMCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgaWYgKHNlbGYuX3Jvd1tpXSBeIGlzV2hpdGUpIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10rKztcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGlmIChjb3VudGVyUG9zID09PSBjb3VudGVyLmxlbmd0aCAtIDEpIHtcclxuICAgICAgICAgICAgICAgICAgICBlcnJvciA9IHNlbGYuX21hdGNoUGF0dGVybihjb3VudGVyLCBjbXBDb3VudGVyKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yIDwgZXBzaWxvbikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guc3RhcnQgPSBpIC0gb2Zmc2V0O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZW5kID0gaTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmNvdW50ZXIgPSBjb3VudGVyO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYmVzdE1hdGNoO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlclBvcysrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgICAgICBpc1doaXRlID0gIWlzV2hpdGU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAgIGNvdW50ZXIucHVzaCgwKTtcclxuICAgICAgICBmb3IgKCBpID0gb2Zmc2V0OyBpIDwgc2VsZi5fcm93Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLl9yb3dbaV0gXiBpc1doaXRlKSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgIC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LFxyXG4gICAgICAgIGlzV2hpdGUgPSAhc2VsZi5fcm93W29mZnNldF0sXHJcbiAgICAgICAgY291bnRlclBvcyA9IDAsXHJcbiAgICAgICAgYmVzdE1hdGNoID0ge1xyXG4gICAgICAgICAgICBlcnJvcjogTnVtYmVyLk1BWF9WQUxVRSxcclxuICAgICAgICAgICAgY29kZTogLTEsXHJcbiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCxcclxuICAgICAgICAgICAgZW5kOiBzdGFydFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29kZSxcclxuICAgICAgICBlcnJvcixcclxuICAgICAgICBub3JtYWxpemVkO1xyXG5cclxuICAgIGlmICghY29kZXJhbmdlKSB7XHJcbiAgICAgICAgY29kZXJhbmdlID0gc2VsZi5DT0RFX1BBVFRFUk4ubGVuZ3RoO1xyXG4gICAgfVxyXG5cclxuICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKGNvdW50ZXJQb3MgPT09IGNvdW50ZXIubGVuZ3RoIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgbm9ybWFsaXplZCA9IHNlbGYuX25vcm1hbGl6ZShjb3VudGVyKTtcclxuICAgICAgICAgICAgICAgIGlmIChub3JtYWxpemVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb2RlID0gMDsgY29kZSA8IGNvZGVyYW5nZTsgY29kZSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yID0gc2VsZi5fbWF0Y2hQYXR0ZXJuKG5vcm1hbGl6ZWQsIHNlbGYuQ09ERV9QQVRURVJOW2NvZGVdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yIDwgYmVzdE1hdGNoLmVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guY29kZSA9IGNvZGU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZXJyb3IgPSBlcnJvcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZW5kID0gaTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoYmVzdE1hdGNoLmVycm9yID4gc2VsZi5BVkdfQ09ERV9FUlJPUikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJlc3RNYXRjaDtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MrKztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdID0gMTtcclxuICAgICAgICAgICAgaXNXaGl0ZSA9ICFpc1doaXRlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBudWxsO1xyXG59O1xyXG5cclxuRUFOUmVhZGVyLnByb3RvdHlwZS5fZmluZFBhdHRlcm4gPSBmdW5jdGlvbihwYXR0ZXJuLCBvZmZzZXQsIGlzV2hpdGUsIHRyeUhhcmRlciwgZXBzaWxvbikge1xyXG4gICAgdmFyIGNvdW50ZXIgPSBbXSxcclxuICAgICAgICBzZWxmID0gdGhpcyxcclxuICAgICAgICBpLFxyXG4gICAgICAgIGNvdW50ZXJQb3MgPSAwLFxyXG4gICAgICAgIGJlc3RNYXRjaCA9IHtcclxuICAgICAgICAgICAgZXJyb3I6IE51bWJlci5NQVhfVkFMVUUsXHJcbiAgICAgICAgICAgIGNvZGU6IC0xLFxyXG4gICAgICAgICAgICBzdGFydDogMCxcclxuICAgICAgICAgICAgZW5kOiAwXHJcbiAgICAgICAgfSxcclxuICAgICAgICBlcnJvcixcclxuICAgICAgICBqLFxyXG4gICAgICAgIHN1bSxcclxuICAgICAgICBub3JtYWxpemVkO1xyXG5cclxuICAgIGlmICghb2Zmc2V0KSB7XHJcbiAgICAgICAgb2Zmc2V0ID0gc2VsZi5fbmV4dFNldChzZWxmLl9yb3cpO1xyXG4gICAgfVxyXG5cclxuICAgIGlmIChpc1doaXRlID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICBpc1doaXRlID0gZmFsc2U7XHJcbiAgICB9XHJcblxyXG4gICAgaWYgKHRyeUhhcmRlciA9PT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgdHJ5SGFyZGVyID0gdHJ1ZTtcclxuICAgIH1cclxuXHJcbiAgICBpZiAoIGVwc2lsb24gPT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgIGVwc2lsb24gPSBzZWxmLkFWR19DT0RFX0VSUk9SO1xyXG4gICAgfVxyXG5cclxuICAgIGZvciAoIGkgPSAwOyBpIDwgcGF0dGVybi5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGNvdW50ZXJbaV0gPSAwO1xyXG4gICAgfVxyXG5cclxuICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKGNvdW50ZXJQb3MgPT09IGNvdW50ZXIubGVuZ3RoIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgc3VtID0gMDtcclxuICAgICAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgY291bnRlci5sZW5ndGg7IGorKykge1xyXG4gICAgICAgICAgICAgICAgICAgIHN1bSArPSBjb3VudGVyW2pdO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbm9ybWFsaXplZCA9IHNlbGYuX25vcm1hbGl6ZShjb3VudGVyKTtcclxuICAgICAgICAgICAgICAgIGlmIChub3JtYWxpemVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSBzZWxmLl9tYXRjaFBhdHRlcm4obm9ybWFsaXplZCwgcGF0dGVybik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvciA8IGVwc2lsb24pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVycm9yID0gZXJyb3I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5zdGFydCA9IGkgLSBzdW07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lbmQgPSBpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYmVzdE1hdGNoO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmICh0cnlIYXJkZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IGNvdW50ZXIubGVuZ3RoIC0gMjsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbal0gPSBjb3VudGVyW2ogKyAyXTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyLmxlbmd0aCAtIDJdID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXIubGVuZ3RoIC0gMV0gPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MtLTtcclxuICAgICAgICA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3VudGVycyA9IGZ1bmN0aW9uKHN0YXJ0LCBjb3VudGVyKSB7XHJcbiAgICB2YXIgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgbnVtQ291bnRlcnMgPSBjb3VudGVyLmxlbmd0aCxcclxuICAgICAgICBlbmQgPSBzZWxmLl9yb3cubGVuZ3RoLFxyXG4gICAgICAgIGlzV2hpdGUgPSAhc2VsZi5fcm93W3N0YXJ0XSxcclxuICAgICAgICBpLFxyXG4gICAgICAgIGNvdW50ZXJQb3MgPSAwO1xyXG5cclxuICAgIEFycmF5SGVscGVyLmluaXQoY291bnRlciwgMCk7XHJcblxyXG4gICAgZm9yICggaSA9IHN0YXJ0OyBpIDwgZW5kOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgY291bnRlclBvcysrO1xyXG4gICAgICAgICAgICBpZiAoY291bnRlclBvcyA9PT0gbnVtQ291bnRlcnMpIHtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgICAgICBpc1doaXRlID0gIWlzV2hpdGU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIGNvdW50ZXI7XHJcbn07XHJcblxyXG5Db2RlMzlSZWFkZXIucHJvdG90eXBlLl9kZWNvZGUgPSBmdW5jdGlvbigpIHtcclxuICAgIHZhciBzZWxmID0gdGhpcyxcclxuICAgICAgICBjb3VudGVycyA9IFswLCAwLCAwLCAwLCAwLCAwLCAwLCAwLCAwXSxcclxuICAgICAgICByZXN1bHQgPSBbXSxcclxuICAgICAgICBzdGFydCA9IHNlbGY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iAzKSB7XHJcbiAgICAgICAgbWF4TmFycm93V2lkdGggPSBzZWxmLl9maW5kTmV4dFdpZHRoKGNvdW50ZXJzLCBtYXhOYXJyb3dXaWR0aCk7XHJcbiAgICAgICAgbnVtV2lkZUJhcnMgPSAwO1xyXG4gICAgICAgIHBhdHRlcm4gPSAwO1xyXG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBudW1Db3VudGVyczsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChjb3VudGVyc1tpXSA+IG1heE5hcnJvd1dpZHRoKSB7XHJcbiAgICAgICAgICAgICAgICBwYXR0ZXJuIHw9IDEgPDwgKG51bUNvdW50ZXJzIC0gMSAtIGkpO1xyXG4gICAgICAgICAgICAgICAgbnVtV2lkZUJhcnMrKztcclxuICAgICAgICAgICAgICAgIHdpZGVCYXJXaWR0aCArPSBjb3VudGVyc1tpXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKG51bVdpZGVCYXJzID09PSAzKSB7XHJcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBudW1Db3VudGVycyAmJiBudW1XaWRlQmFycyA+IDA7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvdW50ZXJzW2ldID4gbWF4TmFycm93V2lkdGgpIHtcclxuICAgICAgICAgICAgICAgICAgICBudW1XaWRlQmFycy0tO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgoY291bnRlcnNbaV0gKiAyKSA+PSB3aWRlQmFyV2lkdGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gcGF0dGVybjtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gLTE7XHJcbn07XHJcblxyXG5Db2RlMzlSZWFkZXIucHJ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ICAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQ6IHBhdHRlcm5TdGFydCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZDogaVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBwYXR0ZXJuU3RhcnQgKz0gY291bnRlclswXSArIGNvdW50ZXJbMV07XHJcbiAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IDc7IGorKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbal0gPSBjb3VudGVyW2ogKyAyXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGNvdW50ZXJbN10gPSAwO1xyXG4gICAgICAgICAgICAgICAgY291bnRlcls4XSA9IDA7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zLS07XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbnVsbDtcclxufTtcclxuXHJcbmV4cG9ydCBkZWZhdWx0IENvZGUzOVJlYWRlcjtcclxuXG5cblxuLyoqIFdFQlBBQ0sgRk9PVEVSICoqXG4gKiogRDovd29yay9xdWFnZ2FKUy9zcmMvcmVhZGVyL2NvZGVfMzlfcmVhZGVyLmpzXG4gKiovIiwiaW1wb3J0IENvZGUzOVJlYWRlciBmcm9tICcuL2NvZGVfMzlfcmVhZGVyJztcclxuXHJcbmZ1bmN0aW9uIENvZGUzOVZJTlJlYWRlcigpIH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ICAgcmV0dXJuIG51bGw7XHJcbiAgICB9XHJcbiAgICBuZXh0U3RhcnQgPSBzdGFydC5zdGFydENvdW50ZXI7XHJcblxyXG4gICAgZG8ge1xyXG4gICAgICAgIHBhdHRlcm4gPSBzZWxmLl90b1BhdHRlcm4obmV4dFN0YXJ0KTtcclxuICAgICAgICBpZiAocGF0dGVybiA8IDApIHtcclxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGRlY29kZWRDaGFyID0gc2VsZi5fcGF0dGVyblRvQ2hhcihwYXR0ZXJuKTtcclxuICAgICAgICBpZiAoZGVjb2RlZENoYXIgPCAwKXtcclxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJlc3VsdC5wdXNoKGRlY29kZWRDaGFyKTtcclxuICAgICAgICBuZXh0U3RhcnQgKz0gODtcclxuICAgICAgICBpZiAocmVzdWx0Lmxlbmd0aCA+IDEgJiYgc2VsZi5faXNTdGFydEVuZChwYXR0ZXJuKSkge1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICB9IHdoaWxlIChuZXh0U3RhcnQgPCBzZWxmLl9jb3VudGVycy5sZW5ndGgpO1xyXG5cclxuICAgIC8vIHZlcmlmeSBlbmRcclxuICAgIGlmICgocmVzdWx0Lmxlbmd0aCAtIDIpIDwgc2VsZi5NSU5fRU5DT0RFRF9DSEFSUyB8fCAhc2VsZi5faXNTdGFydEVuZChwYXR0ZXJuKSkge1xyXG4gICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgfVxyXG5cclxuICAgIC8vIHZlcmlmeSBlbmQgd2hpdGUgc3BhY2VcclxuICAgIGlmICghc2VsZi5fdmVyaWZ5V2hpdGVzcGFjZShzdGFydC5zdGFydENvdW50ZXIsIG5leHRTdGFydCAtIDgpKXtcclxuICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgIH1cclxuXHJcbiAgICBpZiA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ZW5kQ291bnRlcikgLyAyLjApKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBmYWxzZTtcclxufTtcclxuXHJcbkNvZGFiYXJSZWFkZXIucHJvdG90eXBlLl9jYWxjdWxhdGVQYXR0ZXJuTGVuZ3RoID0gZnVuY3Rpb24ob2Zmc2V0KSB7XHJcbiAgICB2YXIgaSxcclxuICAgICAgICBzdW0gPSAwO1xyXG5cclxuICAgIGZvciAoaSA9IG9mZnNldDsgaSA8IG9mZnNldCArIDc7IGkrKykge1xyXG4gICAgICAgIHN1bSArPSB0aGlzLl9jb3VudGVyc1tpXTtcclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gc3VtO1xyXG59O1xyXG5cclxuQ29kYWJhclJlYWRlci5wcm90b3R5cGUuX3RocmVzaG9sZFJlc3VsdFBhdHRlcm4gPSBmdW5jdGlvbihyZXN1bHQsIHN0YXJ0Q291bnRlcil7XHJcbiAgICB2YXIgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgY2F0ZWdvcml6YXRpb24gPSB7XHJcbiAgICAgICAgICAgIHNwYWNlOiB7XHJcbiAgICAgICAgICAgICAgICBuYXJyb3c6IHsgc2l6ZTogMCwgY291bnRzOiAwLCBtaW46IDAsIG1heDogTnVtYmVyLk1BWF9WQUxVRX0sXHJcbiAgICAgICAgICAgICAgICB3aWRlOiB7c2l6ZTogMCwgY291bnRzOiAwLCBtaW46IDAsIG1heDogTnVtYmVyLk1BWF9WQUxVRX1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYmFyOiB7XHJcbiAgICAgICAgICAgICAgICBuYXJyb3c6IHsgc2l6ZTogMCwgY291bnRzOiAwLCBtaW46IDAsIG1heDogTnVtYmVyLk1BWF9WQUxVRX0sXHJcbiAgICAgICAgICAgICAgICB3aWRlOiB7IHNpemU6IDAsIGNvdW50czogMCwgbWluOiAwLCBtYXg6IE51bWJlci5NQVhfVkFMVUV9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGtpbmQsXHJcbiAgICAgICAgY2F0LFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgaixcclxuICAgICAgICBwb3MgPSBzdGFydENvdW50ZXIsXHJcbiAgICAgICAgcGF0dGVybjtcclxuXHJcbiAgICBmb3IgKGkgPSAwOyBpIDwgcmVzdWx0Lmxlbmd0aDsgaSsrKXtcclxuICAgICAgICBwYXR0ZXJuID0gc2VsZi5fY2hhclRvUGF0dGVybihyZXN1bHRbaV0pO1xyXG4gICAgICAgIGZvciAoaiA9IDY7IGogPj0gMDsgai0tKSB7XHJcbiAgICAgICAgICAgIGtpbmQgPSAoaiAmIDEpID09PSAyID8gY2F0ZWdvcml6YXRpb24uYmFyIDogY2F0ZWdvcml6YXRpb24uc3BhY2U7XHJcbiAgICAgICAgICAgIGNhdCA9IChwYXR0ZXJuICYgMSkgPT09IDEgPyBraW5kLndpZGUgOiBraW5kLm5hcnJvdztcclxuICAgICAgICAgICAgY2F0LnNpemUgKz0gc2VsZi5fY291bnRlcnNbcG9zICsgal07XHJcbiAgICAgICAgICAgIGNhdC5jb3VudHMrKztcclxuICAgICAgICAgICAgcGF0dGVybiA+Pj0gMTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcG9zICs9IDg7XHJcbiAgICB9XHJcblxyXG4gICAgW1wic3BhY2VcIiwgXCJiYXJcIl0uZm9yRWFjaChmdW5jdGlvbihrZXkpIHtcclxuICAgICAgICB2YXIgbmV3a2luZCA9IGNhdGVnb3JpemF0aW9uW2tleV07XHJcbiAgICAgICAgbmV3a2luZC53aWRlLm1pbiA9XHJcbiAgICAgICAgICAgIE1hdGguZmxvb3IoKG5ld2tpbmQubmFycm93LnNpemUgLyBuZXdraW5kLm5hcnJvdy5jb3VudHMgKyBuZXdraW5kLndpZGUuc2l6ZSAvIG5ld2tpbmQud2lkZS5jb3VudHMpIC8gMik7XHJcbiAgICAgICA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HNlbGYuQUxQSEFCRVRbaV0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiAtMTtcclxufTtcclxuXHJcbkNvZGFiYXJSZWFkZXIucHJvdG90eXBlLl9jb21wdXRlQWx0ZXJuYXRpbmdUaHJlc2hvbGQgPSBmdW5jdGlvbihvZmZzZXQsIGVuZCkge1xyXG4gICAgdmFyIGksXHJcbiAgICAgICAgbWluID0gTnVtYmVyLk1BWF9WQUxVRSxcclxuICAgICAgICBtYXggPSAwLFxyXG4gICAgICAgIGNvdW50ZXI7XHJcblxyXG4gICAgZm9yIChpID0gb2Zmc2V0OyBpIDwgZW5kOyBpICs9IDIpe1xyXG4gICAgICAgIGNvdW50ZXIgPSB0aGlzLl9jb3VudGVyc1tpXTtcclxuICAgICAgICBpZiAoY291bnRlciA+IG1heCkge1xyXG4gICAgICAgICAgICBtYXggPSBjb3VudGVyO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoY291bnRlciA8IG1pbikge1xyXG4gICAgICAgICAgICBtaW4gPSBjb3VudGVyO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gKChtaW4gKyBtYXgpIC8gMi4wKSB8IDA7XHJcbn07XHJcblxyXG5Db2RhYmFyUmVhZGVyLnByb3RvdHlwZS5fdG9QYXR0ZXJuID0gZnVuY3Rpb24ob2Zmc2V0KSB7XHJcbiAgICB2YXIgbnVtQ291bnRlcnMgPSA3LFxyXG4gICAgICAgIGVuZCA9IG9mZnNldCArIG51bUNvdW50ZXJzLFxyXG4gICAgICAgIGJhclRocmVzaG9sZCxcclxuICAgICAgICBzcGFjZVRocmVzaG9sZCxcclxuICAgICAgICBiaXRtYXNrID0gMSA8PCAobnVtQ291bnRlcnMgLSAxKSxcclxuICAgICAgICBwYXR0ZXJuID0gMCxcclxuICAgICAgICBpLFxyXG4gICAgICAgIHRocmVzaG9sZDtcclxuXHJcbiAgICBpZiAoZW5kID4gdGhpcy5fY291bnRl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IHN1bSA9IDA7XHJcblxyXG4gICAgZm9yIChpID0gc3RhcnQ7IGkgPCBlbmQ7IGkrKykge1xyXG4gICAgICAgIHN1bSArPSB0aGlzLl9jb3VudGVyc1tpXTtcclxuICAgIH1cclxuICAgIHJldHVybiBzdW07XHJcbn07XHJcblxyXG5Db2RhYmFyUmVhZGVyLnByb3RvdHlwZS5fZmluZFN0YXJ0ID0gZnVuY3Rpb24oKSB7XHJcbiAgICB2YXIgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgaSxcclxuICAgICAgICBwYXR0ZXJuLFxyXG4gICAgICAgIHN0YXJ0ID0gc2VsZi5fbmV4dFVuc2V0KHNlbGYuX3JvdyksXHJcbiAgICAgICAgZW5kO1xyXG5cclxuICAgIGZvciAoaSA9IDE7IGkgPCB0aGlzLl9jb3VudGVycy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIHBhdHRlcm4gPSBzZWxmLl90b1BhdHRlcm4oaSk7XHJcbiAgICAgICAgaWYgKHBhdHRlcm4gIT09IC0xICYmIHNlbGYuX2lzU3RhcnRFbmQocGF0dGVybikpIHtcclxuICAgICAgICAgICAgLy8gVE9ETzogTG9vayBmb3Igd2hpdGVzcGFjZSBhaGVhZFxyXG4gICAgICAgICAgICBzdGFydCArPSBzZWxmLl9zdW1Db3VudGVycygwLCBpKTtcclxuICAgICAgICAgICAgZW5kID0gc3RhcnQgKyBzZWxmLl9zdW1Db3VudGVycyhpLCBpICsgOCk7XHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBzdGFydDogc3RhcnQsXHJcbiAgICAgICAgICAgICAgICBlbmQ6IGVuZCxcclxuICAgICAgICAgICAgICAgIHN0YXJ0Q291bnRlcjogaSxcclxuICAgICAgICAgICAgICAgIGVuZENvdW50ZXI6IGkgKyA4XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59O1xyXG5cclxuZXhwb3J0IGRlZmF1bHQgQ29kY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pbyA9IFsxLCAxXTtcclxuICAgIGlmIChvcHRzLm5vcm1hbGl6ZUJhclNwYWNlV2lkdGgpIHtcclxuICAgICAgICB0aGlzLlNJTkdMRV9DT0RFX0VSUk9SID0gMC4zODtcclxuICAgICAgICB0aGlzLkFWR19DT0RFX0VSUk9SID0gMC4wOTtcclxuICAgIH1cclxufVxyXG5cclxuZnVuY3Rpb24gZ2V0RGVmYXVsQ29uZmlnKCkge1xyXG4gICAgdmFyIGNvbmZpZyA9IHt9O1xyXG5cclxuICAgIE9iamVjdC5rZXlzKEkyb2Y1UmVhZGVyLkNPTkZJR19LRVlTKS5mb3JFYWNoKGZ1bmN0aW9uKGtleSkge1xyXG4gICAgICAgIGNvbmZpZ1trZXldID0gSTJvZjVSZWFkZXIuQ09ORklHX0tFWVNba2V5XS5kZWZhdWx0O1xyXG4gICAgfSk7XHJcbiAgICByZXR1cm4gY29uZmlnO1xyXG59XHJcblxyXG52YXIgTiA9IDEsXHJcbiAgICBXID0gMyxcclxuICAgIHByb3BlcnRpZXMgPSB7XHJcbiAgICAgICAgTU9EVUxPOiB7dmFsdWU6IDEwfSxcclxuICAgICAgICBTVEFSVF9QQVRURVJOOiB7dmFsdWU6IFtOICogMi41LCBOICogMi41LCBOICogMi41LCBOICogMi41XX0sXHJcbiAgICAgICAgU1RPUF9QQVRURVJOOiB7dmFsdWU6IFtOICogMiwgTiAqIDIsIFcgKiAyXX0sXHJcbiAgICAgICAgQ09ERV9QQVRURVJOOiB7dmFsdWU6IFtcclxuICAgICAgICAgICAgW04sIE4sIFcsIFcsIE5dLFxyXG4gICAgICAgICAgICBbVywgTiwgTiwgTiwgV10sXHJcbiAgICAgICAgICAgIFtOLCBXLCBOLCBOLCBXXSxcclxuICAgICAgICAgICAgW1csIFcsIE4sIE4sIE5dLFxyXG4gICAgICAgICAgICBbTiwgTiwgVywgTiwgV10sXHJcbiAgICAgICAgICAgIFtXLCBOLCBXLCBOLCBOXSxcclxuICAgICAgICAgICAgW04sIFcsI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B7XHJcbiAgICB2YXIgY291bnRlciA9IFtdLFxyXG4gICAgICAgIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgY291bnRlclBvcyA9IDAsXHJcbiAgICAgICAgYmVzdE1hdGNoID0ge1xyXG4gICAgICAgICAgICBlcnJvcjogTnVtYmVyLk1BWF9WQUxVRSxcclxuICAgICAgICAgICAgY29kZTogLTEsXHJcbiAgICAgICAgICAgIHN0YXJ0OiAwLFxyXG4gICAgICAgICAgICBlbmQ6IDBcclxuICAgICAgICB9LFxyXG4gICAgICAgIGVycm9yLFxyXG4gICAgICAgIGosXHJcbiAgICAgICAgc3VtLFxyXG4gICAgICAgIG5vcm1hbGl6ZWQsXHJcbiAgICAgICAgZXBzaWxvbiA9IHNlbGYuQVZHX0NPREVfRVJST1I7XHJcblxyXG4gICAgaXNXaGl0ZSA9IGlzV2hpdGUgfHwgZmFsc2U7XHJcbiAgICB0cnlIYXJkZXIgPSB0cnlIYXJkZXIgfHwgZmFsc2U7XHJcblxyXG4gICAgaWYgKCFvZmZzZXQpIHtcclxuICAgICAgICBvZmZzZXQgPSBzZWxmLl9uZXh0U2V0KHNlbGYuX3Jvdyk7XHJcbiAgICB9XHJcblxyXG4gICAgZm9yICggaSA9IDA7IGkgPCBwYXR0ZXJuLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgY291bnRlcltpXSA9IDA7XHJcbiAgICB9XHJcblxyXG4gICAgZm9yICggaSA9IG9mZnNldDsgaSA8IHNlbGYuX3Jvdy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGlmIChzZWxmLl9yb3dbaV0gXiBpc1doaXRlKSB7XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10rKztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBpZiAoY291bnRlclBvcyA9PT0gY291bnRlci5sZW5ndGggLSAxKSB7XHJcbiAgICAgICAgICAgICAgICBzdW0gPSAwO1xyXG4gICAgICAgICAgICAgICAgZm9yICggaiA9IDA7IGogPCBjb3VudGVyLmxlbmd0aDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc3VtICs9IGNvdW50ZXJbal07XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBub3JtYWxpemVkID0gc2VsZi5fbm9ybWFsaXplKGNvdW50ZXIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKG5vcm1hbGl6ZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBlcnJvciA9IHNlbGYuX21hdGNoUGF0dGVybihub3JtYWxpemVkLCBwYXR0ZXJuKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yIDwgZXBzaWxvbikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZXJyb3IgPSBlcnJvcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLnN0YXJ0ID0gaSAtIHN1bTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVuZCA9IGk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBiZXN0TWF0Y2g7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKHRyeUhhcmRlcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBjb3VudGVyLmxlbmd0aCAtIDI7IGorKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudGVyW2pdID0gY291bnRlcltqICsgMl07XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbY291bnRlci5sZW5ndGggLSAyXSA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyLmxlbmd0aCAtIDFdID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBjb3VudGVyUG9zLS07XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY291bnRlclBvcysrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10gPSAxO1xyXG4gICAgICAgICAgICBpc1doaXRlID0gIWlzV2hpdGU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIG51bGw7XHJcbn07XHJcblxyXG5JMm9mNVJlYWRlci5wcm90b3R5cGUuX2ZpbmRTdGFydCA9IGZ1bmN0aW9uKCkge1xyXG4gICAgdmFyIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIGxlYWRpbmdXaGl0ZXNwYWNlU3RhcnQsXHJcbiAgICAgICAgb2Zmc2V0ID0gc2VsZi5fbmV4dFNldChzZWxmLl9yb3cpLFxyXG4gICAgICAgIHN0YXJ0SW5mbyxcclxuICAgICAgICBuYXJyb3dCYXJXaWR0aCA9IDE7XHJcblxyXG4gICAgd2hpbGUgKCFzdGFydEluZm8pIHtcclxuICAgICAgICBzdGFydEluZm8gPSBzZWxmLl9maW5kUGF0dGVybihzZWxmLlNUQVJUX1BBVFRFUk4sIG9mZnNldCwgZmFsc2UsIHRydWUpO1xyXG4gICAgICAgIGlmICghc3RhcnRJbmZvKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgIH1cclxuICAgICAgICBuYXJyb3dCYXJXaWR0aCA9IE1hdGguZmxvb3IoKHN0YXJ0SW5mby5lbmQgLSBzdGFydEluZm8uc3RhcnQpIC8gNCk7XHJcbiAgICAgICAgbGVhZGluZ1doaXRlc3BhY2VTdGFydCA9IHN0YXJ0SW5mby5zdGFydCAtIG5hcnJvd0JhcldpZHRoICogMTA7XHJcbiAgIC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l9kZWNvZGVDb2RlID0gZnVuY3Rpb24oY291bnRlcikge1xyXG4gICAgdmFyIGosXHJcbiAgICAgICAgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgc3VtID0gMCxcclxuICAgICAgICBub3JtYWxpemVkLFxyXG4gICAgICAgIGVycm9yLFxyXG4gICAgICAgIGVwc2lsb24gPSBzZWxmLkFWR19DT0RFX0VSUk9SLFxyXG4gICAgICAgIGNvZGUsXHJcbiAgICAgICAgYmVzdE1hdGNoID0ge1xyXG4gICAgICAgICAgICBlcnJvcjogTnVtYmVyLk1BWF9WQUxVRSxcclxuICAgICAgICAgICAgY29kZTogLTEsXHJcbiAgICAgICAgICAgIHN0YXJ0OiAwLFxyXG4gICAgICAgICAgICBlbmQ6IDBcclxuICAgICAgICB9O1xyXG5cclxuICAgIGZvciAoIGogPSAwOyBqIDwgY291bnRlci5sZW5ndGg7IGorKykge1xyXG4gICAgICAgIHN1bSArPSBjb3VudGVyW2pdO1xyXG4gICAgfVxyXG4gICAgbm9ybWFsaXplZCA9IHNlbGYuX25vcm1hbGl6ZShjb3VudGVyKTtcclxuICAgIGlmIChub3JtYWxpemVkKSB7XHJcbiAgICAgICAgZm9yIChjb2RlID0gMDsgY29kZSA8IHNlbGYuQ09ERV9QQVRURVJOLmxlbmd0aDsgY29kZSsrKSB7XHJcbiAgICAgICAgICAgIGVycm9yID0gc2VsZi5fbWF0Y2hQYXR0ZXJuKG5vcm1hbGl6ZWQsIHNlbGYuQ09ERV9QQVRURVJOW2NvZGVdKTtcclxuICAgICAgICAgICAgaWYgKGVycm9yIDwgYmVzdE1hdGNoLmVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICBiZXN0TWF0Y2guY29kZSA9IGNvZGU7XHJcbiAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZXJyb3IgPSBlcnJvcjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoYmVzdE1hdGNoLmVycm9yIDwgZXBzaWxvbikge1xyXG4gICAgICAgICAgICByZXR1cm4gYmVzdE1hdGNoO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBudWxsO1xyXG59O1xyXG5cclxuSTJvZjVSZWFkZXIucHJvdG90eXBlLl9kZWNvZGVQYXlsb2FkID0gZnVuY3Rpb24oY291bnRlcnMsIHJlc3VsdCwgZGVjb2RlZENvZGVzKSB7XHJcbiAgICB2YXIgaSxcclxuICAgICAgICBzZWxmID0gdGhpcyxcclxuICAgICAgICBwb3MgPSAwLFxyXG4gICAgICAgIGNvdW50ZXJMZW5ndGggPSBjb3VudGVycy5sZW5ndGgsXHJcbiAgICAgICAgY291bnRlclBhaXIgPSBbWzAsIDAsIDAsIDAsIDBdLCBbMCwgMCwgMCwgMCwgMF1dLFxyXG4gICAgICAgIGNvZGVzO1xyXG5cclxuICAgIHdoaWxlIChwb3MgPCBjb3VudGVyTGVuZ3RoKSB7XHJcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IDU7IGkrKykge1xyXG4gICAgICAgICAgICBjb3VudGVyUGFpclswXVtpXSA9IGNvdW50ZXJzW3Bvc10gKiB0aGlzLmJhclNwYWNlUmF0aW9bMF07XHJcbiAgICAgICAgICAgIGNvdW50ZXJQYWlyWzFdW2ldID0gY291bnRlcnNbcG9zICsgMV0gKiB0aGlzLmJhclNwYWNlUmF0aW9bMV07XHJcbiAgICAgICAgICAgIHBvcyArPSAyO1xyXG4gICAgICAgIH1cclxuICAgICAgICBjb2RlcyA9IHNlbGYuX2RlY29kZVBhaXIoY291bnRlclBhaXIpO1xyXG4gICAgICAgIGlmICghY29kZXMpIHtcclxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBjb2Rlcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICByZXN1bHQucHVzaChjb2Rlc1tpXS5jb2RlICsgXCJcIik7XHJcbiAgICAgICAgICAgIGR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iAgICAgICAgICAgIHN1YnNjcmlwdGlvbiA9IHtcclxuICAgICAgICAgICAgICAgIGNhbGxiYWNrOiBjYWxsYmFjayxcclxuICAgICAgICAgICAgICAgIGFzeW5jOiBhc3luY1xyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHN1YnNjcmlwdGlvbiA9IGNhbGxiYWNrO1xyXG4gICAgICAgICAgICBpZiAoIXN1YnNjcmlwdGlvbi5jYWxsYmFjaykge1xyXG4gICAgICAgICAgICAgICAgdGhyb3cgXCJDYWxsYmFjayB3YXMgbm90IHNwZWNpZmllZCBvbiBvcHRpb25zXCI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGdldEV2ZW50KGV2ZW50KS5zdWJzY3JpYmVycy5wdXNoKHN1YnNjcmlwdGlvbik7XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHtcclxuICAgICAgICBzdWJzY3JpYmU6IGZ1bmN0aW9uKGV2ZW50LCBjYWxsYmFjaywgYXN5bmMpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHN1YnNjcmliZShldmVudCwgY2FsbGJhY2ssIGFzeW5jKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIHB1Ymxpc2g6IGZ1bmN0aW9uKGV2ZW50TmFtZSwgZGF0YSkge1xyXG4gICAgICAgICAgICB2YXIgZXZlbnQgPSBnZXRFdmVudChldmVudE5hbWUpLFxyXG4gICAgICAgICAgICAgICAgc3Vic2NyaWJlcnMgPSBldmVudC5zdWJzY3JpYmVycztcclxuXHJcbiAgICAgICAgICAgIGV2ZW50LnN1YnNjcmliZXJzID0gc3Vic2NyaWJlcnMuZmlsdGVyKGZ1bmN0aW9uKHN1YnNjcmliZXIpIHtcclxuICAgICAgICAgICAgICAgIHB1Ymxpc2hTdWJzY3JpcHRpb24oc3Vic2NyaWJlciwgZGF0YSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gIXN1YnNjcmliZXIub25jZTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBvbmNlOiBmdW5jdGlvbihldmVudCwgY2FsbGJhY2ssIGFzeW5jKSB7XHJcbiAgICAgICAgICAgIHN1YnNjcmliZShldmVudCwge1xyXG4gICAgICAgICAgICAgICAgY2FsbGJhY2s6IGNhbGxiYWNrLFxyXG4gICAgICAgICAgICAgICAgYXN5bmM6IGFzeW5jLFxyXG4gICAgICAgICAgICAgICAgb25jZTogdHJ1ZVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIHVuc3Vic2NyaWJlOiBmdW5jdGlvbihldmVudE5hbWUsIGNhbGxiYWNrKSB7XHJcbiAgICAgICAgICAgIHZhciBldmVudDtcclxuXHJcbiAgICAgICAgICAgIGlmIChldmVudE5hbWUpIHtcclxuICAgICAgICAgICAgICAgIGV2ZW50ID0gZ2V0RXZlbnQoZXZlbnROYW1lKTtcclxuICAgICAgICAgICAgICAgIGlmIChldmVudCAmJiBjYWxsYmFjaykge1xyXG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnN1YnNjcmliZXJzID0gZXZlbnQuc3Vic2NyaWJlcnMuZmlsdGVyKGZ1bmN0aW9uKHN1YnNjcmliZXIpe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3Vic2NyaWJlci5jYWxsYmFjayAhPT0gY2FsbGJhY2s7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnN1YnNjcmliZXJzID0gW107XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjbGVhckV2ZW50cygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxufSkoKTtcclxuXG5c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gICAgICAgICAgYXVkaW86IGZhbHNlLFxyXG4gICAgICAgICAgICB2aWRlbzogdHJ1ZVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgdmlkZW9Db25zdHJhaW50cyA9IG1lcmdlKHtcclxuICAgICAgICAgICAgd2lkdGg6IDY0MCxcclxuICAgICAgICAgICAgaGVpZ2h0OiA0ODAsXHJcbiAgICAgICAgICAgIG1pbkFzcGVjdFJhdGlvOiAwLFxyXG4gICAgICAgICAgICBtYXhBc3BlY3RSYXRpbzogMTAwLFxyXG4gICAgICAgICAgICBmYWNpbmc6IFwiZW52aXJvbm1lbnRcIlxyXG4gICAgICAgIH0sIGNvbmZpZyk7XHJcblxyXG4gICAgaWYgKCB0eXBlb2YgTWVkaWFTdHJlYW1UcmFjayAhPT0gJ3VuZGVmaW5lZCcgJiYgdHlwZW9mIE1lZGlhU3RyZWFtVHJhY2suZ2V0U291cmNlcyAhPT0gJ3VuZGVmaW5lZCcpIHtcclxuICAgICAgICBNZWRpYVN0cmVhbVRyYWNrLmdldFNvdXJjZXMoZnVuY3Rpb24oc291cmNlSW5mb3MpIHtcclxuICAgICAgICAgICAgdmFyIHZpZGVvU291cmNlSWQ7XHJcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc291cmNlSW5mb3MubGVuZ3RoOyArK2kpIHtcclxuICAgICAgICAgICAgICAgIHZhciBzb3VyY2VJbmZvID0gc291cmNlSW5mb3NbaV07XHJcbiAgICAgICAgICAgICAgICBpZiAoc291cmNlSW5mby5raW5kID09PSBcInZpZGVvXCIgJiYgc291cmNlSW5mby5mYWNpbmcgPT09IHZpZGVvQ29uc3RyYWludHMuZmFjaW5nKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmlkZW9Tb3VyY2VJZCA9IHNvdXJjZUluZm8uaWQ7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY29uc3RyYWludHMudmlkZW8gPSB7XHJcbiAgICAgICAgICAgICAgICBtYW5kYXRvcnk6IHtcclxuICAgICAgICAgICAgICAgICAgICBtaW5XaWR0aDogdmlkZW9Db25zdHJhaW50cy53aWR0aCxcclxuICAgICAgICAgICAgICAgICAgICBtaW5IZWlnaHQ6IHZpZGVvQ29uc3RyYWludHMuaGVpZ2h0LFxyXG4gICAgICAgICAgICAgICAgICAgIG1pbkFzcGVjdFJhdGlvOiB2aWRlb0NvbnN0cmFpbnRzLm1pbkFzcGVjdFJhdGlvLFxyXG4gICAgICAgICAgICAgICAgICAgIG1heEFzcGVjdFJhdGlvOiB2aWRlb0NvbnN0cmFpbnRzLm1heEFzcGVjdFJhdGlvXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgb3B0aW9uYWw6IFt7XHJcbiAgICAgICAgICAgICAgICAgICAgc291cmNlSWQ6IHZpZGVvU291cmNlSWRcclxuICAgICAgICAgICAgICAgIH1dXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHJldHVybiBjYihjb25zdHJhaW50cyk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAgIGNvbnN0cmFpbnRzLnZpZGVvID0ge1xyXG4gICAgICAgICAgICBtZWRpYVNvdXJjZTogXCJjYW1lcmFcIixcclxuICAgICAgICAgICAgd2lkdGg6IHsgbWluOiB2aWRlb0NvbnN0cmFpbnRzLndpZHRoLCBtYXg6IHZpZGVvQ29uc3RyYWludHMud2lkdGggfSxcclxuICAgICAgICAgICAgaGVpZ2h0OiB7IG1pbjogdmlkZW9Db25zdHJhaW50cy5oZWlnaHQsIG1heDogdmlkZW9Db25zdHJhaW50cy5oZWlnaHQgfSxcclxuICAgICAgICAgICAgcmVxdWlyZTogW1wid2lkdGhcIiwgXCJoZWlnaHRcIl1cclxuICAgICAgICB9O1xyXG4gICAgICAgIHJldHVybiBjYihjb25zdHJhaW50cyk7XHJcbiAgICB9XHJcbn1cclxuXHJcbi8qKlxyX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mNhcHR1cmUgPT09IHRydWU7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIG1hdGNoZXNDb25zdHJhaW50cyhjb2RlUmVzdWx0KSB7XHJcbiAgICAgICAgICAgIHJldHVybiBjYXBhY2l0eVxyXG4gICAgICAgICAgICAgICAgJiYgY29kZVJlc3VsdFxyXG4gICAgICAgICAgICAgICAgJiYgIWNvbnRhaW5zKGNvZGVSZXN1bHQsIGNvbmZpZy5ibGFja2xpc3QpXHJcbiAgICAgICAgICAgICAgICAmJiBwYXNzZXNGaWx0ZXIoY29kZVJlc3VsdCwgY29uZmlnLmZpbHRlcik7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICBhZGRSZXN1bHQ6IGZ1bmN0aW9uKGRhdGEsIGltYWdlU2l6ZSwgY29kZVJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHt9O1xyXG5cclxuICAgICAgICAgICAgICAgIGlmIChtYXRjaGVzQ29uc3RyYWludHMoY29kZVJlc3VsdCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBjYXBhY2l0eS0tO1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5jb2RlUmVzdWx0ID0gY29kZVJlc3VsdDtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY2FwdHVyZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYW52YXMud2lkdGggPSBpbWFnZVNpemUueDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FudmFzLmhlaWdodCA9IGltYWdlU2l6ZS55O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBJbWFnZURlYnVnLmRyYXdJbWFnZShkYXRhLCBpbWFnZVNpemUsIGN0eCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdC5mcmFtZSA9IGNhbnZhcy50b0RhdGFVUkwoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0cy5wdXNoKHJlc3VsdCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGdldFJlc3VsdHM6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdHM7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG4gICAgfVxyXG59O1xyXG5cblxuXG4vKiogV0VCUEFDSyBGT09URVIgKipcbiAqKiBEOi93b3JrL3F1YWdnYUpTL3NyYy9hbmFseXRpY3MvcmVzdWx0X2NvbGxlY3Rvci5qc1xuICoqLyIsImxldCBjb25maWc7XHJcblxyXG5pZiAoRU5WLmRldmVsb3BtZW50KXtcclxuICAgIGNvbmZpZyA9IHJlcXVpcmUoJy4vY29uZmlnLmRldi5qcycpO1xyXG59IGVsc2UgaWYgKEVOVi5ub2RlKSB7XHJcbiAgICBjb25maWcgPSByZXF1aXJlKCcuL2NvbmZpZy5ub2RlLmpzJyk7XHJcbn0gZWxzZSB7XHJcbiAgICBjb25maWcgPSByZXF1aXJlKCcuL2NvbmZpZy5wcm9kLmpzJyk7XHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IGNvbmZpZztcclxuXG5cblxuLyoqIFdFQlBBQ0sgRk9PVEVSICoqXG4gKiogRDovd29yay9xdWFnZ2FKUy9zcmMvY29uZmlnL2NvbmZpZy5qc1xuICoqLyIsIm1vZHVsZS5leHBvcnRzID0ge1xyXG4gICAgaW5wdXRTdHJlYW06IHtcclxuICAgICAgICBuYW1lOiBcIkxpdmVcIixcclxuICAgICAgICB0eXBlOiBcIkxpdmVTdHJlYW1cIixcclxuICAgICAgICBjb25zdHJhaW50czoge1xyXG4gICAgICAgICAgICB3aWR0aDogNjQwLFxyXG4gICAgICAgICAgICBoZWlnaHQ6IDQ4MCxcclxuICAgICAgICAgICAgbWluQXNwZWN0UmF0aW86IDAsXHJcbiAgICAgICAgICAgIG1heEFzcGVjdFJhdGlvOiAxMDAsXHJcbiAgICAgICAgICAgIGZhY2luZzogXCJlbnZpcm9ubWVudFwiIC8vIG9yIHVzZXJcclxuICAgICAgICB9LFxyXG4gICAgICAgIGFyZWE6IHtcclxuICAgICAgICAgICAgdG9wOiBcIjAlXCIsXHJcbiAgICAgICAgICAgIHJpZ2h0OiBcIjAlXCIsXHJcbiAgICAgICAgICAgIGxlZnQ6IFwiMCVcIixcclxuICAgICAgICAgICAgYm90dG9tOiBcIjAlXCJcclxuICAgICAgICB9LFxyXG4gICAgICAgIHNpbmdsZUNoYW5uZWw6IGZhbHNlIC8vIHRydWU6IG9ubHkgdGhlIHJlZCBjb2xvci1jaGFubmVsIGlzIHJlYWRcclxuICAgIH0sXHJcbiAgICBsb2NhdGU6IHRydWUsXHJcbiAgICBudW1PZldvcmtlcnM6IDAsXHJcbiAgICBkZWNvZGVyOiB7XHJcbiAgICAgICAgcmVhZGVyczogW1xyXG4gICAgICAgICAgICAnY29kZV8xMjhfcmVhZGVyJ1xyXG4gICAgICAgIF0sXHJcbiAgICAgICAgZGVidWc6IHtcclxuICAgICAgICAgICAgZHJhd0JvdW5kaW5nQm94OiBmYWxzZSxcclxuICAgICAgICAgICAgc2hvd0ZyZXF1ZW5jeTogZmFsc2UsXHJcbiAgICAgICAgICAgIGRyYXdTY2FubGluZTogZmFsc2UsXHJcbiAgICAgICAgICAgIHNob3dQYXR0ZXJuOiBmYWxzZVxyXG4gICAgICAgIH1cclxuICAgIH0sXHJcbiAgICBsb2NhdG9yOiB7XHJcbiAgICAgICAgaGFsZlNhbXBsZTogdHJ1ZSxcclxuICAgICAgICBwYXRjaFNpemU6IFwibWVkaXVtXCIsIC8vIHgtc21hbGwsIHNtYWxsLCBtZWRpdW0sIGxhcmdlLCB4LWxhcmdlXHJcbiAgICAgICAgZGVidWc6IHtcclxuICAgICAgICAgICAgc2hvd0NhbnZhczogZmFsc2UsXHJcbiAgICAgICAgICAgIHNob3dQYXR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IHtcclxuICAgICAgICB2aWRlby5wbGF5KCk7XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQuc2V0Q3VycmVudFRpbWUgPSBmdW5jdGlvbih0aW1lKSB7XHJcbiAgICAgICAgaWYgKF9jb25maWcudHlwZSAhPT0gXCJMaXZlU3RyZWFtXCIpIHtcclxuICAgICAgICAgICAgdmlkZW8uY3VycmVudFRpbWUgPSB0aW1lO1xyXG4gICAgICAgIH1cclxuICAgIH07XHJcblxyXG4gICAgdGhhdC5hZGRFdmVudExpc3RlbmVyID0gZnVuY3Rpb24oZXZlbnQsIGYsIGJvb2wpIHtcclxuICAgICAgICBpZiAoX2V2ZW50TmFtZXMuaW5kZXhPZihldmVudCkgIT09IC0xKSB7XHJcbiAgICAgICAgICAgIGlmICghX2V2ZW50SGFuZGxlcnNbZXZlbnRdKSB7XHJcbiAgICAgICAgICAgICAgICBfZXZlbnRIYW5kbGVyc1tldmVudF0gPSBbXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBfZXZlbnRIYW5kbGVyc1tldmVudF0ucHVzaChmKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB2aWRlby5hZGRFdmVudExpc3RlbmVyKGV2ZW50LCBmLCBib29sKTtcclxuICAgICAgICB9XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQuY2xlYXJFdmVudEhhbmRsZXJzID0gZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgX2V2ZW50TmFtZXMuZm9yRWFjaChmdW5jdGlvbihldmVudE5hbWUpIHtcclxuICAgICAgICAgICAgdmFyIGhhbmRsZXJzID0gX2V2ZW50SGFuZGxlcnNbZXZlbnROYW1lXTtcclxuICAgICAgICAgICAgaWYgKGhhbmRsZXJzICYmIGhhbmRsZXJzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgIGhhbmRsZXJzLmZvckVhY2goZnVuY3Rpb24oaGFuZGxlcikge1xyXG4gICAgICAgICAgICAgICAgIC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ICAgICAgIF9jYW52YXNTaXplLnkgPSBjYW52YXNTaXplLnk7XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQuZ2V0Q2FudmFzU2l6ZSA9IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgIHJldHVybiBfY2FudmFzU2l6ZTtcclxuICAgIH07XHJcblxyXG4gICAgdGhhdC5nZXRGcmFtZSA9IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgIHZhciBmcmFtZTtcclxuXHJcbiAgICAgICAgaWYgKCFsb2FkZWQpe1xyXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKCFwYXVzZWQpIHtcclxuICAgICAgICAgICAgZnJhbWUgPSBpbWdBcnJheVtmcmFtZUlkeF07XHJcbiAgICAgICAgICAgIGlmIChmcmFtZUlkeCA8IChzaXplIC0gMSkpIHtcclxuICAgICAgICAgICAgICAgIGZyYW1lSWR4Kys7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGVuZGVkID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICBwdWJsaXNoRXZlbnQoXCJlbmRlZFwiLCBbXSk7XHJcbiAgICAgICAgICAgICAgICB9LCAwKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gZnJhbWU7XHJcbiAgICB9O1xyXG5cclxuICAgIHJldHVybiB0aGF0O1xyXG59O1xyXG5cclxuZXhwb3J0IGRlZmF1bHQgSW5wdXRTdHJlYW07XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIEQ6L3dvcmsvcXVhZ2dhSlMvc3JjL2lucHV0L2lucHV0X3N0cmVhbS5qc1xuICoqLyIsInZhciBJbWFnZUxvYWRlciA9IHt9O1xyXG5JbWFnZUxvYWRlci5sb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ggPSAwOyB4IDwgbm90bG9hZGVkSW1ncy5sZW5ndGg7IHgrKykge1xyXG4gICAgICAgICAgICBpZiAobm90bG9hZGVkSW1nc1t4XSA9PT0gbG9hZGVkSW1nKSB7XHJcbiAgICAgICAgICAgICAgICBub3Rsb2FkZWRJbWdzLnNwbGljZSh4LCAxKTtcclxuICAgICAgICAgICAgICAgIGZvciAodmFyIHkgPSAwOyB5IDwgaHRtbEltYWdlc1NyY0FycmF5Lmxlbmd0aDsgeSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGltZ05hbWUgPSBodG1sSW1hZ2VzU3JjQXJyYXlbeV0uc3Vic3RyKGh0bWxJbWFnZXNTcmNBcnJheVt5XS5sYXN0SW5kZXhPZihcIi9cIikpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChsb2FkZWRJbWcuc3JjLmxhc3RJbmRleE9mKGltZ05hbWUpICE9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sSW1hZ2VzQXJyYXlbeV0gPSBsb2FkZWRJbWc7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChub3Rsb2FkZWRJbWdzLmxlbmd0aCA9PT0gMCkge1xyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50KSB7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIkltYWdlcyBsb2FkZWRcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY2FsbGJhY2suYXBwbHkobnVsbCwgW2h0bWxJbWFnZXNBcnJheV0pO1xyXG4gICAgICAgIH1cclxuICAgIH07XHJcblxyXG4gICAgZm9yICggaSA9IDA7IGkgPCBodG1sSW1hZ2VzU3JjQ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UZyb21DYW52YXNEYXRhKGN0eERhdGEsIF9zaXplLCBfZGF0YSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBDVlV0aWxzLmNvbXB1dGVHcmF5KGN0eERhdGEsIF9kYXRhLCBfc3RyZWFtQ29uZmlnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxuXHJcbiAgICBfdGhhdC5nZXRTaXplID0gZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgcmV0dXJuIF9zaXplO1xyXG4gICAgfTtcclxuXHJcbiAgICByZXR1cm4gX3RoYXQ7XHJcbn07XHJcblxyXG5leHBvcnQgZGVmYXVsdCBGcmFtZUdyYWJiZXI7XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIEQ6L3dvcmsvcXVhZ2dhSlMvc3JjL2lucHV0L2ZyYW1lX2dyYWJiZXIuanNcbiAqKi8iXSwic291cmNlUm9vdCI6IiJ9
\ No newline at end of file
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9teU1vZHVsZURlZmluaXRpb24iLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDRmZWMzMTc3OGM4OGVkZDFiYzRlIiwid2VicGFjazovLy8uL34vd2VicnRjLWFkYXB0ZXIvc3JjL2pzL3V0aWxzLmpzIiwid2VicGFjazovLy8uL34vbG9kYXNoL19yb290LmpzIiwid2VicGFjazovLy8uL34vbG9kYXNoL2lzT2JqZWN0LmpzIiwid2VicGFjazovLy8uL34vbG9kYXNoL19NYXAuanMiLCJ3ZWJwYWNrOi8vLy4vfi9sb2Rhc2gvaXNBcnJheS5qc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HJcbiAgICAgICAgZXJyb3IgPSAwLFxyXG4gICAgICAgIHNpbmdsZUVycm9yID0gMCxcclxuICAgICAgICBtb2R1bG8gPSB0aGlzLk1PRFVMTyxcclxuICAgICAgICBtYXhTaW5nbGVFcnJvciA9IHRoaXMuU0lOR0xFX0NPREVfRVJST1IgfHwgMTtcclxuXHJcbiAgICBmb3IgKGkgPSAwOyBpIDwgY291bnRlci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIHNpbmdsZUVycm9yID0gTWF0aC5hYnMoY29kZVtpXSAtIGNvdW50ZXJbaV0pO1xyXG4gICAgICAgIGlmIChzaW5nbGVFcnJvciA+IG1heFNpbmdsZUVycm9yKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBOdW1iZXIuTUFYX1ZBTFVFO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlcnJvciArPSBzaW5nbGVFcnJvcjtcclxuICAgIH1cclxuICAgIHJldHVybiBlcnJvciAvIG1vZHVsbztcclxufTtcclxuXHJcbkJhcmNvZGVSZWFkZXIucHJvdG90eXBlLl9uZXh0U2V0ID0gZnVuY3Rpb24obGluZSwgb2Zmc2V0KSB7XHJcbiAgICB2YXIgaTtcclxuXHJcbiAgICBvZmZzZXQgPSBvZmZzZXQgfHwgMDtcclxuICAgIGZvciAoaSA9IG9mZnNldDsgaSA8IGxpbmUubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAobGluZVtpXSkge1xyXG4gICAgICAgICAgICByZXR1cm4gaTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbGluZS5sZW5ndGg7XHJcbn07XHJcblxyXG5CYXJjb2RlUmVhZGVyLnByb3RvdHlwZS5fbm9ybWFsaXplID0gZnVuY3Rpb24oY291bnRlciwgbW9kdWxvKSB7XHJcbiAgICB2YXIgaSxcclxuICAgICAgICBzZWxmID0gdGhpcyxcclxuICAgICAgICBzdW0gPSAwLFxyXG4gICAgICAgIHJhdGlvLFxyXG4gICAgICAgIG51bU9uZXMgPSAwLFxyXG4gICAgICAgIG5vcm1hbGl6ZWQgPSBbXSxcclxuICAgICAgICBub3JtID0gMDtcclxuXHJcbiAgICBpZiAoIW1vZHVsbykge1xyXG4gICAgICAgIG1vZHVsbyA9IHNlbGYuTU9EVUxPO1xyXG4gICAgfVxyXG4gICAgZm9yIChpID0gMDsgaSA8IGNvdW50ZXIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAoY291bnRlcltpXSA9PT0gMSkge1xyXG4gICAgICAgICAgICBudW1PbmVzKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgc3VtICs9IGNvdW50ZXJbaV07XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmF0aW8gPSBzdW0gLyAobW9kdWxvIC0gbnVtT25lcyk7XHJcbiAgICBpZiAocmF0aW8gPiAxLjApIHtcclxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY291bnRlci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBub3JtID0gY291bnRlcltpXSA9PT0gMSA/IGNvdW50ZXJbaV0gOiBjb3VudGVyW2ldIC8gcmF0aW87XHJcbiAgICAgICAgICAgIG5vcm1hbGl6ZWQucHVzaChub3JtKTtcclxuICAgICAgICB9XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAgIHJhdGlvID0gKHN1bSArIG51bU9uZXMpIC8gbW9kdWxvO1xyXG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBjb3VudGVyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIG5vcm0gPSBjb3VudGVyW2ldIC8gcmF0aW87XHJcbiAgICAgICAgICAgIG5vcm1hbGl6ZWQucHVzaChub3JtKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbm9ybWFsaXplZDtcclxufTtcclxuXHJcbkJhcmNvZGVSZWFkZXIucHJvdG90eXBlLl9tYXRjaFRyYWNlID0gZnVuY3Rpb24oY21wQ291bnRlciwgZXBzaWxvbikge1xyXG4gICAgdmFyIGNvdW50ZXIgPSBbXSxcclxuICAgICAgICBpLFxyXG4gICAgICAgIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIG9mZnNldCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93KSxcclxuICAgICAgICBpc1doaXRlID0gIXNlbGYuX3Jvd1tvZmZzZXRdLFxyXG4gICAgICAgIGNvdW50ZXJQb3MgPSAwLFxyXG4gICAgICAgIGJlc3RNYXRjaCA9IHtcclxuICAgICAgICAgICAgZXJyb3I6IE51bWJlci5NQVhfVkFMVUUsXHJcbiAgICAgICAgICAgIGNvZGU6IC0xLFxyXG4gICAgICAgICAgICBzdGFydDogMFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZXJyb3I7XHJcblxyXG4gICAgaWYgKGNtcENvdW50ZXIpIHtcclxuICAgICAgICBmb3IgKCBpID0gMDsgaSA8IGNtcENvdW50ZXIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgY291bnRlci5wdXNoKDApO1xyXG4gICAgICAgIH1cclxuICAgICAgICBmb3IgKCBpID0gb2Zmc2V0OyBpIDwgc2VsZi5fcm93Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLl9yb3dbaV0gXiBpc1doaXRlKSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoY291bnRlclBvcyA9PT0gY291bnRlci5sZW5ndGggLSAxKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSBzZWxmLl9tYXRjaFBhdHRlcm4oY291bnRlciwgY21wQ291bnRlcik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvciA8IGVwc2lsb24pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLnN0YXJ0ID0gaSAtIG9mZnNldDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVuZCA9IGk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5jb3VudGVyID0gY291bnRlcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJlc3RNYXRjaDtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MrKztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10gPSAxO1xyXG4gICAgICAgICAgICAgICAgaXNXaGl0ZSA9ICFpc1doaXRlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSBlbHNlIHtcclxuICAgICAgICBjb3VudGVyLnB1c2goMCk7XHJcbiAgICAgICAgZm9yICggaSA9IG9mZnNldDsgaSA8IHNlbGYuX3Jvdy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSsrO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY291bnRlclBvcysrO1xyXG4gICAgICAgICAgICAgICAgY291bnRlci5wdXNoKDApO1xyXG4gICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgICAgICBpc1doaXRlID0gIWlzV2hpdGU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgLy8gaWYgY21wQ291bnRlciB3YXM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AgICAgIHJldHVybiBhcnI7XHJcbiAgICB9LFxyXG5cclxuICAgIHRvUG9pbnRMaXN0OiBmdW5jdGlvbihhcnIpIHtcclxuICAgICAgICB2YXIgaSwgaiwgcm93ID0gW10sIHJvd3MgPSBbXTtcclxuICAgICAgICBmb3IgKCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICByb3cgPSBbXTtcclxuICAgICAgICAgICAgZm9yICggaiA9IDA7IGogPCBhcnJbaV0ubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgIHJvd1tqXSA9IGFycltpXVtqXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByb3dzW2ldID0gXCJbXCIgKyByb3cuam9pbihcIixcIikgKyBcIl1cIjtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIFwiW1wiICsgcm93cy5qb2luKFwiLFxcclxcblwiKSArIFwiXVwiO1xyXG4gICAgfSxcclxuXHJcbiAgICAvKipcclxuICAgICAqIHJldHVybnMgdGhlIGVsZW1lbnRzIHdoaWNoJ3Mgc2NvcmUgaXMgYmlnZ2VyIHRoYW4gdGhlIHRocmVzaG9sZFxyXG4gICAgICogQHJldHVybiB7QXJyYXl9IHRoZSByZWR1Y2VkIGFycmF5XHJcbiAgICAgKi9cclxuICAgIHRocmVzaG9sZDogZnVuY3Rpb24oYXJyLCB0aHJlc2hvbGQsIHNjb3JlRnVuYykge1xyXG4gICAgICAgIHZhciBpLCBxdWV1ZSA9IFtdO1xyXG4gICAgICAgIGZvciAoIGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChzY29yZUZ1bmMuYXBwbHkoYXJyLCBbYXJyW2ldXSkgPj0gdGhyZXNob2xkKSB7XHJcbiAgICAgICAgICAgICAgICBxdWV1ZS5wdXNoKGFycltpXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHF1ZXVlO1xyXG4gICAgfSxcclxuXHJcbiAgICBtYXhJbmRleDogZnVuY3Rpb24oYXJyKSB7XHJcbiAgICAgICAgdmFyIGksIG1heCA9IDA7XHJcbiAgICAgICAgZm9yICggaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgaWYgKGFycltpXSA+IGFyclttYXhdKSB7XHJcbiAgICAgICAgICAgICAgICBtYXggPSBpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBtYXg7XHJcbiAgICB9LFxyXG5cclxuICAgIG1heDogZnVuY3Rpb24oYXJyKSB7XHJcbiAgICAgICAgdmFyIGksIG1heCA9IDA7XHJcbiAgICAgICAgZm9yICggaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgaWYgKGFycltpXSA+IG1heCkge1xyXG4gICAgICAgICAgICAgICAgbWF4ID0gYXJyW2ldO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBtYXg7XHJcbiAgICB9LFxyXG5cclxuICAgIHN1bTogZnVuY3Rpb24oYXJyKSB7XHJcbiAgICAgICAgdmFyIGxlbmd0aCA9IGFyci5sZW5ndGgsXHJcbiAgICAgICAgICAgIHN1bSA9IDA7XHJcblxyXG4gICAgICAgIHdoaWxlIChsZW5ndGgtLSkge1xyXG4gICAgICAgICAgICBzdW0gKz0gYXJyW2xlbmd0aF07XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBzdW07XHJcbiAgICB9XHJcbn07XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIC4vc3JjL2NvbW1vbi9hcnJheV9oZWxwZXIuanNcbiAqKi8iLCJleHBvcnQgZGVmYXVsdCB7XHJcbiAgICBkcmF3UmVjdDogZnVuY3Rpb24ocG9zLCBzaXplLCBjdHgsIHN0eWxlKX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xyXG5cclxuICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKGNvdW50ZXJQb3MgPT09IGNvdW50ZXIubGVuZ3RoIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgbm9ybWFsaXplZCA9IHNlbGYuX25vcm1hbGl6ZShjb3VudGVyKTtcclxuICAgICAgICAgICAgICAgIGlmIChub3JtYWxpemVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb2RlID0gMDsgY29kZSA8IGNvZGVyYW5nZTsgY29kZSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yID0gc2VsZi5fbWF0Y2hQYXR0ZXJuKG5vcm1hbGl6ZWQsIHNlbGYuQ09ERV9QQVRURVJOW2NvZGVdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yIDwgYmVzdE1hdGNoLmVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guY29kZSA9IGNvZGU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZXJyb3IgPSBlcnJvcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZW5kID0gaTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoYmVzdE1hdGNoLmVycm9yID4gc2VsZi5BVkdfQ09ERV9FUlJPUikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJlc3RNYXRjaDtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MrKztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdID0gMTtcclxuICAgICAgICAgICAgaXNXaGl0ZSA9ICFpc1doaXRlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBudWxsO1xyXG59O1xyXG5cclxuRUFOUmVhZGVyLnByb3RvdHlwZS5fZmluZFBhdHRlcm4gPSBmdW5jdGlvbihwYXR0ZXJuLCBvZmZzZXQsIGlzV2hpdGUsIHRyeUhhcmRlciwgZXBzaWxvbikge1xyXG4gICAgdmFyIGNvdW50ZXIgPSBbXSxcclxuICAgICAgICBzZWxmID0gdGhpcyxcclxuICAgICAgICBpLFxyXG4gICAgICAgIGNvdW50ZXJQb3MgPSAwLFxyXG4gICAgICAgIGJlc3RNYXRjaCA9IHtcclxuICAgICAgICAgICAgZXJyb3I6IE51bWJlci5NQVhfVkFMVUUsXHJcbiAgICAgICAgICAgIGNvZGU6IC0xLFxyXG4gICAgICAgICAgICBzdGFydDogMCxcclxuICAgICAgICAgICAgZW5kOiAwXHJcbiAgICAgICAgfSxcclxuICAgICAgICBlcnJvcixcclxuICAgICAgICBqLFxyXG4gICAgICAgIHN1bSxcclxuICAgICAgICBub3JtYWxpemVkO1xyXG5cclxuICAgIGlmICghb2Zmc2V0KSB7XHJcbiAgICAgICAgb2Zmc2V0ID0gc2VsZi5fbmV4dFNldChzZWxmLl9yb3cpO1xyXG4gICAgfVxyXG5cclxuICAgIGlmIChpc1doaXRlID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICBpc1doaXRlID0gZmFsc2U7XHJcbiAgICB9XHJcblxyXG4gICAgaWYgKHRyeUhhcmRlciA9PT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgdHJ5SGFyZGVyID0gdHJ1ZTtcclxuICAgIH1cclxuXHJcbiAgICBpZiAoIGVwc2lsb24gPT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgIGVwc2lsb24gPSBzZWxmLkFWR19DT0RFX0VSUk9SO1xyXG4gICAgfVxyXG5cclxuICAgIGZvciAoIGkgPSAwOyBpIDwgcGF0dGVybi5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGNvdW50ZXJbaV0gPSAwO1xyXG4gICAgfVxyXG5cclxuICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKGNvdW50ZXJQb3MgPT09IGNvdW50ZXIubGVuZ3RoIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgc3VtID0gMDtcclxuICAgICAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgY291bnRlci5sZW5ndGg7IGorKykge1xyXG4gICAgICAgICAgICAgICAgICAgIHN1bSArPSBjb3VudGVyW2pdO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbm9ybWFsaXplZCA9IHNlbGYuX25vcm1hbGl6ZShjb3VudGVyKTtcclxuICAgICAgICAgICAgICAgIGlmIChub3JtYWxpemVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSBzZWxmLl9tYXRjaFBhdHRlcm4obm9ybWFsaXplZCwgcGF0dGVybik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvciA8IGVwc2lsb24pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVycm9yID0gZXJyb3I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5zdGFydCA9IGkgLSBzdW07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lbmQgPSBpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYmVzdE1hdGNoO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmICh0cnlIYXJkZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IGNvdW50ZXIubGVuZ3RoIC0gMjsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbal0gPSBjb3VudGVyW2ogKyAyXTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyLmxlbmd0aCAtIDJdID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXIubGVuZ3RoIC0gMV0gPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MtLTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbnVsbDtcclxufTtcclxuXHJcbkVBTlJlYWRlci5wcm90b3R5cGUuX2ZpbmRTdGFydCA9IGZ1bmN0aW9uKCkge1xyXG4gICAgdmFyIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIGxlYWRpbmdXaGl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nVlLCBmYWxzZSk7XHJcbiAgICBpZiAoY29kZSA9PT0gbnVsbCkge1xyXG4gICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgfVxyXG4gICAgZGVjb2RlZENvZGVzLnB1c2goY29kZSk7XHJcblxyXG4gICAgZm9yICggaSA9IDA7IGkgPCA2OyBpKyspIHtcclxuICAgICAgICBjb2RlID0gc2VsZi5fZGVjb2RlQ29kZShjb2RlLmVuZCwgc2VsZi5DT0RFX0dfU1RBUlQpO1xyXG4gICAgICAgIGlmICghY29kZSkge1xyXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICB9XHJcbiAgICAgICAgZGVjb2RlZENvZGVzLnB1c2goY29kZSk7XHJcbiAgICAgICAgcmVzdWx0LnB1c2goY29kZS5jb2RlKTtcclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gY29kZTtcclxufTtcclxuXHJcbkVBTlJlYWRlci5wcm90b3R5cGUuX2RlY29kZSA9IGZ1bmN0aW9uKCkge1xyXG4gICAgdmFyIHN0YXJ0SW5mbyxcclxuICAgICAgICBzZWxmID0gdGhpcyxcclxuICAgICAgICBjb2RlLFxyXG4gICAgICAgIHJlc3VsdCA9IFtdLFxyXG4gICAgICAgIGRlY29kZWRDb2RlcyA9IFtdO1xyXG5cclxuICAgIHN0YXJ0SW5mbyA9IHNlbGYuX2ZpbmRTdGFydCgpO1xyXG4gICAgaWYgKCFzdGFydEluZm8pIHtcclxuICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgIH1cclxuICAgIGNvZGUgPSB7XHJcbiAgICAgICAgY29kZTogc3RhcnRJbmZvLmNvZGUsXHJcbiAgICAgICAgc3RhcnQ6IHN0YXJ0SW5mby5zdGFydCxcclxuICAgICAgICBlbmQ6IHN0YXJ0SW5mby5lbmRcclxuICAgIH07XHJcbiAgICBkZWNvZGVkQ29kZXMucHVzaChjb2RlKTtcclxuICAgIGNvZGUgPSBzZWxmLl9kZWNvZGVQYXlsb2FkKGNvZGUsI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XHJcblxyXG4gICAgZnVuY3Rpb24gcHgoaW5pdCwgZW5kKSB7XHJcbiAgICAgICAgdmFyIHN1bSA9IDAsIGk7XHJcbiAgICAgICAgZm9yICggaSA9IGluaXQ7IGkgPD0gZW5kOyBpKyspIHtcclxuICAgICAgICAgICAgc3VtICs9IGhpc3RbaV07XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBzdW07XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gbXgoaW5pdCwgZW5kKSB7XHJcbiAgICAgICAgdmFyIGksIHN1bSA9IDA7XHJcblxyXG4gICAgICAgIGZvciAoIGkgPSBpbml0OyBpIDw9IGVuZDsgaSsrKSB7XHJcbiAgICAgICAgICAgIHN1bSArPSBpICogaGlzdFtpXTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBzdW07XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gZGV0ZXJtaW5lVGhyZXNob2xkKCkge1xyXG4gICAgICAgIHZhciB2ZXQgPSBbMF0sIHAxLCBwMiwgcDEyLCBrLCBtMSwgbTIsIG0xMixcclxuICAgICAgICAgICAgbWF4ID0gKDEgPDwgYml0c1BlclBpeGVsKSAtIDE7XHJcblxyXG4gICAgICAgIGhpc3QgPSBjb21wdXRlSGlzdG9ncmFtKGltYWdlV3JhcHBlciwgYml0c1BlclBpeGVsKTtcclxuICAgICAgICBmb3IgKCBrID0gMTsgayA8IG1heDsgaysrKSB7XHJcbiAgICAgICAgICAgIHAxID0gcHgoMCwgayk7XHJcbiAgICAgICAgICAgIHAyID0gcHgoayArIDEsIG1heCk7XHJcbiAgICAgICAgICAgIHAxMiA9IHAxICogcDI7XHJcbiAgICAgICAgICAgIGlmIChwMTIgPT09IDApIHtcclxuICAgICAgICAgICAgICAgIHAxMiA9IDE7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbTEgPSBteCgwLCBrKSAqIHAyO1xyXG4gICAgICAgICAgICBtMiA9IG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A9IDEsIHRocmVzaG9sZFkgPSBNYXRoLmFicyh2ZWNbMV0gLyAxMCksIGZvdW5kID0gZmFsc2U7XHJcblxyXG4gICAgICAgICAgICBmdW5jdGlvbiBtYXRjaChwb3MsIHByZWRpY3RlZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHBvcy54ID4gKHByZWRpY3RlZC54IC0gdGhyZXNob2xkWClcclxuICAgICAgICAgICAgICAgICAgICAgICAgJiYgcG9zLnggPCAocHJlZGljdGVkLnggKyB0aHJlc2hvbGRYKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAmJiBwb3MueSA+IChwcmVkaWN0ZWQueSAtIHRocmVzaG9sZFkpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICYmIHBvcy55IDwgKHByZWRpY3RlZC55ICsgdGhyZXNob2xkWSkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBjaGVjayBpZiB0aGUgbmV4dCBpbmRleCBpcyB3aXRoaW4gdGhlIHZlYyBzcGVjaWZpY2F0aW9uc1xyXG4gICAgICAgICAgICAvLyBpZiBub3QsIGNoZWNrIGFzIGxvbmcgYXMgdGhlIHRocmVzaG9sZCBpcyBtZXRcclxuXHJcbiAgICAgICAgICAgIGZyb20gPSBwb2ludHNbaWR4XTtcclxuICAgICAgICAgICAgaWYgKGZvcndhcmQpIHtcclxuICAgICAgICAgICAgICAgIHByZWRpY3RlZFBvcyA9IHtcclxuICAgICAgICAgICAgICAgICAgICB4OiBmcm9tLnggKyB2ZWNbMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgeTogZnJvbS55ICsgdmVjWzFdXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcHJlZGljdGVkUG9zID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIHg6IGZyb20ueCAtIHZlY1swXSxcclxuICAgICAgICAgICAgICAgICAgICB5OiBmcm9tLnkgLSB2ZWNbMV1cclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIHRvSWR4ID0gZm9yd2FyZCA/IGlkeCArIDEgOiBpZHggLSAxO1xyXG4gICAgICAgICAgICB0byA9IHBvaW50c1t0b0lkeF07XHJcbiAgICAgICAgICAgIHdoaWxlICh0byAmJiAoIGZvdW5kID0gbWF0Y2godG8sIHByZWRpY3RlZFBvcykpICE9PSB0cnVlICYmIChNYXRoLmFicyh0by55IC0gZnJvbS55KSA8IHZlY1sxXSkpIHtcclxuICAgICAgICAgICAgICAgIHRvSWR4ID0gZm9yd2FyZCA/IHRvSWR4ICsgMSA6IHRvSWR4IC0gMTtcclxuICAgICAgICAgICAgICAgIHRvID0gcG9pbnRzW3RvSWR4XTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmV0dXJuIGZvdW5kID8gdG9JZHggOiBudWxsO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZm9yICggaXRlcmF0aW9uID0gMDsgaXRlcmF0aW9uIDwgbWF4SXRlcmF0aW9uczsgaXRlcmF0aW9uKyspIHtcclxuICAgICAgICAgICAgLy8gcmFuZG9tbHkgc2VsZWN0IHBvaW50IHRvIHN0YXJ0IHdpdGhcclxuICAgICAgICAgICAgY2VudGVyUG9zID0gTWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpICogcG9pbnRzLmxlbmd0aCk7XHJcblxyXG4gICAgICAgICAgICAvLyB0cmFjZSBmb3J3YXJkXHJcbiAgICAgICAgICAgIHRvcCA9IFtdO1xyXG4gICAgICAgICAgICBjdXJyZW50UG9zID0gY2VudGVyUG9zO1xyXG4gICAgICAgICAgICB0b3AucHVzaChwb2ludHNbY3VycmVudFBvc10pO1xyXG4gICAgICAgICAgICB3aGlsZSAoKCBjdXJyZW50UG9zID0gdHJhY2UoY3VycmVudFBvcywgdHJ1ZSkpICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICB0b3AucHVzaChwb2ludHNbY3VycmVudFBvc10pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChjZW50ZXJQb3MgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBjdXJyZW50UG9zID0gY2VudGVyUG9zO1xyXG4gICAgICAgICAgICAgICAgd2hpbGUgKCggY3VycmVudFBvcyA9IHRyYWNlKGN1cnJlbnRQb3MsIGZhbHNlKSkgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICB0b3AucHVzaChwb2ludHNbY3VycmVudFBvc10pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAodG9wLmxlbmd0aCA+IHJlc3VsdC5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRvcDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gcmVzdWx0O1xyXG4gICAgfVxyXG59O1xyXG5cclxuZXhwb3J0IGNvbnN0IERJTEFURSA9IDE7XHJcbmV4cG9ydCBjb25zdCBFUk9ERSA9IDI7XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gZGlsYXRlKGluSW1hZ2VXcmFwcGVyLCBvdXRJbWFnZVdyYXBwZXIpIHtcclxuICAgIHZhciB2LFxyXG4gICAgICAgIHUsXHJcbiAgICAgICAgaW5JbWFnZURhdGEgPSBpbkltYWdlV3JhcHBlci5kYXRhLFxyXG4gICAgICAgIG91dEltYWdlRGF0YSA9IG91dEltYWdlV3JhcHBlci5kYXRhLFxyXG4gICAgICAgIGhlaWdodCA9IGluSW1hZ2VXcmFwcGVyLnNpemUueSxcclxuICAgICAgICB3aWR0aCA9IGluSW1hZ2VXcmFwcGVyLnNpemUueCxcclxuICAgICAgICBzdW0sXHJcbiAgICAgICAgeVN0YXJ0MSxcclxuICAgICAgICB5U3RhcnQyLFxyXG4gICAgICAgIHhTdGFydDEsXHJcbiAgICAgICAgeFN0YXJ0MjtcclxuXHJcbiAgICBmb3IgKCB2ID0gMTsgdiA8IGhlaWdodCAtIDE7IHYrKykge1xyXG4gICAgICAgIGZvciAoIHUgPSAxOyB1IDwgd2lkdGggLSAxOyB1KyspIHtcclxuICAgICAgICAgICAgeVN0YXJ0MSA9IHYgLSAxO1xyXG4gICAgICAgICAgICB5U3RhcnQyID0gdiArIDE7XHJcbiAgICAgICAgICAgIHhTdGFydDEgPSB1IC0gMTtcclxuICAgICAgICAgICAgeFN0YXJ0MiA9IHUgKyAxO1xyXG4gICAgICAgICAgICBzdW0gPSBpbkltYWdlRGF0YVt5U3RhcnQxICogd2lkdGggKyB4U3RhcnQxXSArIGluSW1hZ2VEYXRhW3lTdGFydDEgKiB3aWR0aCArIHhTdGFydDJdICtcclxuICAgICAgICAgICAgaW5JbWFnZURhdGFbdiAqIHdpZHRoICsgdV0gK1xyXG4gICAgICAgICAgICBpbkltYWdlRGF0YVt5U3RhcnQyICogd2lkdGggKyB4U3RhcnQxXSArIGluSW1hZ2VEYXRhW3lTdGFydDIgKiB3aWR0aCArIHhTdGFydDJdO1xyXG4gICAgICAgICAgICBvdXRJbWFnZURhdGFbdiAqIHdpZHRoICsgdV0gPSBzdW0gPiAwID8gMSA6IDA7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59O1xyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIGVyb2RlKGluSW1hZ2VXcmFwcGVyLCBvdXRJbWFnZVdyYXBwZXIpIHtcclxuICAgIHZhciB2LFxyXG4gICAgICAgIHUsXHJcbiAgICAgICAgaW5JbWFnZURhdGEgPSBpbkltYWdlV3JhcHBlci5kYXRhLFxyXG4gICAgICAgIG91dEltYWdlRGF0YSA9IG91dEltYWdlV3JhcHBlci5kYXRhLFxyXG4gICAgICAgIGhlaWdodCA9IGluSW1hZ2VXcmFwcGVyLnNpemUueSxcclxuICAgICAgICB3aWR0aCA9IGluSW1hZ2VXcmFwcGVyLnNpemUueCxcclxuICAgICAgICBzdW0sXHJcbiAgICAgICAgeVN0YXJ0MSxcclxuICAgICAgICB5U3RhcnQyLFxyXG4gICAgICAgIHhTdGFydDEsXHJcbiAgICAgICAgeFN0YXJ0MjtcclxuXHJcbiAgICBmb3IgKCB2ID0gMTsgdiA8IGhlaWdodCAtIDE7IHYrKykge1xyXG4gICAgICAgIGZvciAoIHUgPSAxOyB1IDwgd2lkdGggLSAxOyB1KyspIHtcclxuICAgICAgICAgICAgeVN0YXJ0MSA9IHYgLSAxO1xyXG4gICAgICAgICAgICB5U3RhcnQyID0gdiArIDE7XHJcbiAgICAgICAgICAgIHhTdGFydDEgPSB1IC0gMTtcclxuICAgICAgICAgICAgeFN0YXJ0MiA9IHUgKyAxO1xyXG4gICAgICAgICAgICBzdW0gPSBpbkltYWdlRGF0YVt5U3RhcnQxICogd2lkdGggKyB4U3RhcnQxXSArIGluSW1hZ2VEYXRhW3lTdGFydDEgKiB3aWR0aCArIHhTdGFydDJdICtcclxuICAgICAgICAgICAgaW5JbWFnZURhdGFbdiAqIHdpZHRoICsgdV0gK1xyXG4gICAgICAgICAgICBpbkltYWdlRGF0YVt5U3RhcnQyICogd2lkdGggKyB4U3RhcnQxXSArIGluSW1hZ2VEYXRhW3lTdGFydDIgKiB3aWR0aCArIHhTdGFydDJdO1xyXG4gICAgICAgICAgICBvdXRJbWFnZURhdGFbdiAqIHdpZHRoICsgdV0gPSBzdW0gPT09IDUgPyAxIDogMDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn07XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gc3VidHJhY3QoYUltYWdlV3JhcHBlciwgYkltYWdlV3JhcHBlciwgcmVzdWx0SW1hZ2VXcmFwcGV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RvcFJvd0lkeCArIDFdICsgaW5JbWdbYm90dG9tUm93SWR4XSArIGluSW1nW2JvdHRvbVJvd0lkeCArIDFdKSAvIDQpO1xyXG4gICAgICAgICAgICBvdXRJbWdJZHgrKztcclxuICAgICAgICAgICAgdG9wUm93SWR4ID0gdG9wUm93SWR4ICsgMjtcclxuICAgICAgICAgICAgYm90dG9tUm93SWR4ID0gYm90dG9tUm93SWR4ICsgMjtcclxuICAgICAgICB9XHJcbiAgICAgICAgdG9wUm93SWR4ID0gdG9wUm93SWR4ICsgaW5XaWR0aDtcclxuICAgICAgICBib3R0b21Sb3dJZHggPSBib3R0b21Sb3dJZHggKyBpbldpZHRoO1xyXG4gICAgfVxyXG59O1xyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIGhzdjJyZ2IoaHN2LCByZ2IpIHtcclxuICAgIHZhciBoID0gaHN2WzBdLFxyXG4gICAgICAgIHMgPSBoc3ZbMV0sXHJcbiAgICAgICAgdiA9IGhzdlsyXSxcclxuICAgICAgICBjID0gdiAqIHMsXHJcbiAgICAgICAgeCA9IGMgKiAoMSAtIE1hdGguYWJzKChoIC8gNjApICUgMiAtIDEpKSxcclxuICAgICAgICBtID0gdiAtIGMsXHJcbiAgICAgICAgciA9IDAsXHJcbiAgICAgICAgZyA9IDAsXHJcbiAgICAgICAgYiA9IDA7XHJcblxyXG4gICAgcmdiID0gcmdiIHx8IFswLCAwLCAwXTtcclxuXHJcbiAgICBpZiAoaCA8IDYwKSB7XHJcbiAgICAgICAgciA9IGM7XHJcbiAgICAgICAgZyA9IHg7XHJcbiAgICB9IGVsc2UgaWYgKGggPCAxMjApIHtcclxuICAgICAgICByID0geDtcclxuICAgICAgICBnID0gYztcclxuICAgIH0gZWxzZSBpZiAoaCA8IDE4MCkge1xyXG4gICAgICAgIGcgPSBjO1xyXG4gICAgICAgIGIgPSB4O1xyXG4gICAgfSBlbHNlIGlmIChoIDwgMjQwKSB7XHJcbiAgICAgICAgZyA9IHg7XHJcbiAgICAgICAgYiA9IGM7XHJcbiAgICB9IGVsc2UgaWYgKGggPCAzMDApIHtcclxuICAgICAgICByID0geDtcclxuICAgICAgICBiID0gYztcclxuICAgIH0gZWxzZSBpZiAoaCA8IDM2MCkge1xyXG4gICAgICAgIHIgPSBjO1xyXG4gICAgICAgIGIgPSB4O1xyXG4gICAgfVxyXG4gICAgcmdiWzBdID0gKChyICsgbSkgKiAyNTUpIHwgMDtcclxuICAgIHJnYlsxXSA9ICgoZyArIG0pICogMjU1KSB8IDA7XHJcbiAgICByZ2JbMl0gPSAoKGIgKyBtKSAqIDI1NSkgfCAwO1xyXG4gICAgcmV0dXJuIHJnYjtcclxufTtcclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBfY29tcHV0ZURpdmlzb3JzKG4pIHtcclxuICAgIHZhciBsYXJnZURpdmlzb3JzID0gW10sXHJcbiAgICAgICAgZGl2aXNvcnMgPSBbXSxcclxuICAgICAgICBpO1xyXG5cclxuICAgIGZvciAoaSA9IDE7IGkgPCBNYXRoLnNxcnQobikgKyAxOyBpKyspIHtcclxuICAgICAgICBpZiAobiAlIGkgPT09IDApIHtcclxuICAgICAgICAgICAgZGl2aXNvcnMucHVzaChpKTtcclxuICAgICAgICAgICAgaWYgKGkgIT09IG4gLyBpKSB7XHJcbiAgICAgICAgICAgICAgICBsYXJnZURpdmlzb3JzLnVuc2hpZnQoTWF0aC5mbG9vcihuIC8gaSkpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIGRpdmlzb3JzLmNvbmNhdChsYXJnZURpdmlzb3JzKTtcclxufTtcclxuXHJcbmZ1bmN0aW9uIF9jb21wdXRlSW50ZXJzZWN0aW9uKGFycjEsIGFycjIpIHtcclxuICAgIHZhciBpID0gMCxcclxuICAgICAgICBqID0gMCxcclxuICAgICAgICByZXN1bHQgPSBbXTtcclxuXHJcbiAgICB3aGlsZSAoaSA8IGFycjEubGVuZ3RoICYmIGogPCBhcnIyLmxlbmd0aCkge1xyXG4gICAgICAgIGlmIChhcnIxW2ldID09PSBhcnIyW2pdKSB7XHJcbiAgICAgICAgICAgIHJlc3VsdC5wdXNoKGFycjFbaV0pO1xyXG4gICAgICAgICAgICBpKys7XHJcbiAgICAgICAgICAgIGorKztcclxuICAgICAgICB9IGVsc2UgaWYgKGFycjFbaV0gPiBhcnIyW2pdKSB7XHJcbiAgICAgICAgICAgIGorKztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBpKys7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIHJlc3VsdDtcclxufTtcclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBjYWxjdWxhdGVQYXRjaFNpemUocGF0Y2hTaXplLCBpbWdTaXplKSB7XHJcbiAgICB2YXIgZGl2aXNvcnNYID0gX2NvbXB1dGVEaXZpc29ycyhpbWdTaXplLngpLFxyXG4gICAgICAgIGRpdmlzb3JzWSA9IF9jb21wdXRlRGl2aXNvcnMoaW1nU2l6ZS55KSxcclxuICAgICAgICB3aWRlU2lkZSA9IE1hdGgubWF4KGltZ1NpemUueCwgaW1nU2l6ZS55KSxcclxuICAgICAgICBjb21tb24gPSBfY29tcHV0ZUludGVyc2VjdGlvbihkaXZpc29yc1gsIGRpdmlzb3JzWSksXHJcbiAgICAgICAgbnJPZlBhdGNoZXNMaXN0ID0gWzgsIDEwLCAxNSwgMjAsIDMyLCA2MCwgODBdLFxyXG4gICAgICAgIG5yT2ZQYXRjaGVzTWFwID0ge1xyXG4gICAgICAgICAgICBcIngtc21hbGxcIjogNSxcclxuICAgICAgICAgICAgXCJzbWFsbFwiOiA0LFxyXG4gICAgICAgICAgICBcIm1lZGl1bVwiOiAzLFxyXG4gICAgICAgICAgICBcImxhcmdlXCI6IDIsXHJcbiAgICAgICAgICAgIFwieC1sYXJnZVwiOiAxXHJcbiAgICAgICAgfSxcclxuICAgICAgICBuck9mUGF0Y2hlc0lkeCA9IG5yT2ZQYX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XG4gICAgcmV0dXJuIGRpbWVuc2lvbjtcclxufTtcclxuXHJcbmV4cG9ydCBjb25zdCBfZGltZW5zaW9uc0NvbnZlcnRlcnMgPSB7XHJcbiAgICB0b3A6IGZ1bmN0aW9uKGRpbWVuc2lvbiwgY29udGV4dCkge1xyXG4gICAgICAgIGlmIChkaW1lbnNpb24udW5pdCA9PT0gXCIlXCIpIHtcclxuICAgICAgICAgICAgcmV0dXJuIE1hdGguZmxvb3IoY29udGV4dC5oZWlnaHQgKiAoZGltZW5zaW9uLnZhbHVlIC8gMTAwKSk7XHJcbiAgICAgICAgfVxyXG4gICAgfSxcclxuICAgIHJpZ2h0OiBmdW5jdGlvbihkaW1lbnNpb24sIGNvbnRleHQpIHtcclxuICAgICAgICBpZiAoZGltZW5zaW9uLnVuaXQgPT09IFwiJVwiKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBNYXRoLmZsb29yKGNvbnRleHQud2lkdGggLSAoY29udGV4dC53aWR0aCAqIChkaW1lbnNpb24udmFsdWUgLyAxMDApKSk7XHJcbiAgICAgICAgfVxyXG4gICAgfSxcclxuICAgIGJvdHRvbTogZnVuY3Rpb24oZGltZW5zaW9uLCBjb250ZXh0KSB7XHJcbiAgICAgICAgaWYgKGRpbWVuc2lvbi51bml0ID09PSBcIiVcIikge1xyXG4gICAgICAgICAgICByZXR1cm4gTWF0aC5mbG9vcihjb250ZXh0LmhlaWdodCAtIChjb250ZXh0LmhlaWdodCAqIChkaW1lbnNpb24udmFsdWUgLyAxMDApKSk7XHJcbiAgICAgICAgfVxyXG4gICAgfSxcclxuICAgIGxlZnQ6IGZ1bmN0aW9uKGRpbWVuc2lvbiwgY29udGV4dCkge1xyXG4gICAgICAgIGlmIChkaW1lbnNpb24udW5pdCA9PT0gXCIlXCIpIHtcclxuICAgICAgICAgICAgcmV0dXJuIE1hdGguZmxvb3IoY29udGV4dC53aWR0aCAqIChkaW1lbnNpb24udmFsdWUgLyAxMDApKTtcclxuICAgICAgICB9XHJcbi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Tsga3kgPD0ga1NpemU7IGt5KyspIHtcclxuICAgICAgICAgICAgICAgIGZvciAoIGt4ID0gLWtTaXplOyBreCA8PSBrU2l6ZTsga3grKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjY3UgKz0ga2VybmVsW2t5ICsga1NpemVdW2t4ICsga1NpemVdICogdGhpcy5nZXRTYWZlKHggKyBreCwgeSArIGt5KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0aGlzLmRhdGFbeSAqIHRoaXMuc2l6ZS54ICsgeF0gPSBhY2N1O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufTtcclxuXHJcbkltYWdlV3JhcHBlci5wcm90b3R5cGUubW9tZW50cyA9IGZ1bmN0aW9uKGxhYmVsY291bnQpIHtcclxuICAgIHZhciBkYXRhID0gdGhpcy5kYXRhLFxyXG4gICAgICAgIHgsXHJcbiAgICAgICAgeSxcclxuICAgICAgICBoZWlnaHQgPSB0aGlzLnNpemUueSxcclxuICAgICAgICB3aWR0aCA9IHRoaXMuc2l6ZS54LFxyXG4gICAgICAgIHZhbCxcclxuICAgICAgICB5c3EsXHJcbiAgICAgICAgbGFiZWxzdW0gPSBbXSxcclxuICAgICAgICBpLFxyXG4gICAgICAgIGxhYmVsLFxyXG4gICAgICAgIG11MTEsXHJcbiAgICAgICAgbXUwMixcclxuICAgICAgICBtdTIwLFxyXG4gICAgICAgIHhfLFxyXG4gICAgICAgIHlfLFxyXG4gICAgICAgIHRtcCxcclxuICAgICAgICByZXN1bHQgPSBbXSxcclxuICAgICAgICBQSSA9IE1hdGguUEksXHJcbiAgICAgICAgUElfNCA9IFBJIC8gNDtcclxuXHJcbiAgICBpZiAobGFiZWxjb3VudCA8PSAwKSB7XHJcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IGxhYmVsY291bnQ7IGkrKykge1xyXG4gICAgICAgIGxhYmVsc3VtW2ldID0ge1xyXG4gICAgICAgICAgICBtMDA6IDAsXHJcbiAgICAgICAgICAgIG0wMTogMCxcclxuICAgICAgICAgICAgbTEwOiAwLFxyXG4gICAgICAgICAgICBtMTE6IDAsXHJcbiAgICAgICAgICAgIG0wMjogMCxcclxuICAgICAgICAgICAgbTIwOiAwLFxyXG4gICAgICAgICAgICB0aGV0YTogMCxcclxuICAgICAgICAgICAgcmFkOiAwXHJcbiAgICAgICAgfTtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCB5ID0gMDsgeSA8IGhlaWdodDsgeSsrKSB7XHJcbiAgICAgICAgeXNxID0geSAqIHk7XHJcbiAgICAgICAgZm9yICggeCA9IDA7IHggPCB3aWR0aDsgeCsrKSB7XHJcbiAgICAgICAgICAgIHZhbCA9IGRhdGFbeSAqIHdpZHRoICsgeF07XHJcbiAgICAgICAgICAgIGlmICh2YWwgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbCA9IGxhYmVsc3VtW3ZhbCAtIDFdO1xyXG4gICAgICAgICAgICAgICAgbGFiZWwubTAwICs9IDE7XHJcbiAgICAgICAgICAgICAgICBsYWJlbC5tMDEgKz0geTtcclxuICAgICAgICAgICAgICAgIGxhYmVsLm0xMCArPSB4O1xyXG4gICAgICAgICAgICAgICAgbGFiZWwubTExICs9IHggKiB5O1xyXG4gICAgICAgICAgICAgICAgbGFiZWwubTAyICs9IHlzcTtcclxuICAgICAgICAgICAgICAgIGxhYmVsLm0yMCArPSB4ICogeDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IGxhYmVsY291bnQ7IGkrKykge1xyXG4gICAgICAgIGxhYmVsID0gbGFiZWxzdW1baV07XHJcbiAgICAgICAgaWYgKCFpc05hTihsYWJlbC5tMDApICYmIGxhYmVsLm0wMCAhPT0gMCkge1xyXG4gICAgICAgICAgICB4XyA9IGxhYmVsLm0xMCAvIGxhYmVsLm0wMDtcclxuICAgICAgICAgICAgeV8gPSBsYWJlbC5tMDEgLyBsYWJlbC5tMDA7XHJcbiAgICAgICAgICAgIG11MTEgPSBsYWJlbC5tMTEgLyBsYWJlbC5tMDAgLSB4XyAqIHlfO1xyXG4gICAgICAgICAgICBtdTAyID0gbGFiZWwubTAyIC8gbGFiZWwubTAwIC0geV8gKiB5XztcclxuICAgICAgICAgICAgbXUyMCA9IGxhYmVsLm0yMCAvIGxhYmVsLm0wMCAtIHhfICogeF87XHJcbiAgICAgICAgICAgIHRtcCA9IChtdTAyIC0gbXUyMCkgLyAoMiAqIG11MTEpO1xyXG4gICAgICAgICAgICB0bXAgPSAwLjUgKiBNYXRoLmF0YW4odG1wKSArIChtdTExID49IDAgPyBQSV80IDogLVBJXzQgKSArIFBJO1xyXG4gICAgICAgICAgICBsYWJlbC50aGV0YSA9ICh0bXAgKiAxODAgLyBQSSArIDkwKSAlIDE4MCAtIDkwO1xyXG4gICAgICAgICAgICBpZiAobGFiZWwudGhldGEgPCAwKSB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbC50aGV0YSArPSAxODA7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGFiZWwucmFkID0gdG1wID4gUEkgPyB0bXAgLSBQSSA6IHRtcDtcclxuICAgICAgICAgICAgbGFiZWwudmVjID0gdmVjMi5jbG9uZShbTWF0aC5jb3ModG1wKSwgTWF0aC5zaW4odG1wKV0pO1xyXG4gICAgICAgICAgICByZXN1bHQucHVzaChsYWJlbCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiByZXN1bHQ7XHJcbn07XHJcblxyXG4vKipcclxuICogRGlzcGxheXMgdGhlIHtJbWFnZVdyYXBwZXJ9IGluIGEgZ2l2ZW4gY2FudmFzXHJcbiAqIEBwYXJhbSBjYW52YXMge0NhbnZhc30gVGhlIGNhbnZhcyBlbGVtZW50IHRvIHdyaXRlIHRvXHJcbiAqIEBwYX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AgdmFyIGksXHJcbiAgICAgICAgICAgICAgICB5LFxyXG4gICAgICAgICAgICAgICAgeDtcclxuXHJcbiAgICAgICAgICAgIGZvciAoIGkgPSAwOyBpIDwgNzsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICB5ID0gY3VycmVudC5jeSArIHNlYXJjaERpcmVjdGlvbnNbY3VycmVudC5kaXJdWzBdO1xyXG4gICAgICAgICAgICAgICAgeCA9IGN1cnJlbnQuY3ggKyBzZWFyY2hEaXJlY3Rpb25zW2N1cnJlbnQuZGlyXVsxXTtcclxuICAgICAgICAgICAgICAgIHBvcyA9IHkgKiB3aWR0aCArIHg7XHJcbiAgICAgICAgICAgICAgICBpZiAoKGltYWdlRGF0YVtwb3NdID09PSBjb2xvcikgJiYgKChsYWJlbERhdGFbcG9zXSA9PT0gMCkgfHwgKGxhYmVsRGF0YVtwb3NdID09PSBsYWJlbCkpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGFiZWxEYXRhW3Bvc10gPSBsYWJlbDtcclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50LmN5ID0geTtcclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50LmN4ID0geDtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxhYmVsRGF0YVtwb3NdID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsRGF0YVtwb3NdID0gZWRnZWxhYmVsO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50LmRpciA9IChjdXJyZW50LmRpciArIDEpICUgODtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiB2ZXJ0ZXgyRCh4LCB5LCBkaXIpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgIGRpcjogZGlyLFxyXG4gICAgICAgICAgICAgICAgeDogeCxcclxuICAgICAgICAgICAgICAgIHk6IHksXHJcbiAgICAgICAgICAgICAgICBuZXh0OiBudWxsLFxyXG4gICAgICAgICAgICAgICAgcHJldjogbnVsbFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gY29udG91clRyYWNpbmcoc3ksIHN4LCBsYWJlbCwgY29sb3IsIGVkZ2VsYWJlbCkge1xyXG4gICAgICAgICAgICB2YXIgRnYgPSBudWxsLFxyXG4gICAgICAgICAgICAgICAgQ3YsXHJcbiAgICAgICAgICAgICAgICBQLFxyXG4gICAgICAgICAgICAgICAgbGRpcixcclxuICAgICAgICAgICAgICAgIGN1cnJlbnQgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY3g6IHN4LFxyXG4gICAgICAgICAgICAgICAgICAgIGN5OiBzeSxcclxuICAgICAgICAgICAgICAgICAgICBkaXI6IDBcclxuICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICBpZiAodHJhY2UoY3VycmVudCwgY29sb3IsIGxhYmVsLCBlZGdlbGFiZWwpKSB7XHJcbiAgICAgICAgICAgICAgICBGdiA9IHZlcnRleDJEKHN4LCBzeSwgY3VycmVudC5kaXIpO1xyXG4gICAgICAgICAgICAgICAgQ3YgPSBGdjtcclxuICAgICAgICAgICAgICAgIGxkaXIgPSBjdXJyZW50LmRpcjtcclxuICAgICAgICAgICAgICAgIFAgPSB2ZXJ0ZXgyRChjdXJyZW50LmN4LCBjdXJyZW50LmN5LCAwKTtcclxuICAgICAgICAgICAgICAgIFAucHJldiA9IEN2O1xyXG4gICAgICAgICAgICAgICAgQ3YubmV4dCA9IFA7XHJcbiAgICAgICAgICAgICAgICBQLm5leHQgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgQ3YgPSBQO1xyXG4gICAgICAgICAgICAgICAgZG8ge1xyXG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnQuZGlyID0gKGN1cnJlbnQuZGlyICsgNikgJSA4O1xyXG4gICAgICAgICAgICAgICAgICAgIHRyYWNlKGN1cnJlbnQsIGNvbG9yLCBsYWJlbCwgZWRnZWxhYmVsKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAobGRpciAhPT0gY3VycmVudC5kaXIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ3YuZGlyID0gY3VycmVudC5kaXI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFAgPSB2ZXJ0ZXgyRChjdXJyZW50LmN4LCBjdXJyZW50LmN5LCAwKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgUC5wcmV2ID0gQ3Y7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEN2Lm5leHQgPSBQO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBQLm5leHQgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBDdiA9IFA7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ3YuZGlyID0gbGRpcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ3YueCA9IGN1cnJlbnQuY3g7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEN2LnkgPSBjdXJyZW50LmN5O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBsZGlyID0gY3VycmVudC5kaXI7XHJcbiAgICAgICAgICAgICAgICB9IHdoaWxlIChjdXJyZW50LmN4ICE9PSBzeCB8fCBjdXJyZW50LmN5ICE9PSBzeSk7XHJcbiAgICAgICAgICAgICAgICBGdi5wcmV2ID0gQ3YucHJldjtcclxuICAgICAgICAgICAgICAgIEN2LnByZXYubmV4dCA9IEZ2O1xyXG4gICAgICAgICAgICB9XHJcb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gZnVuY3Rpb24oc3RhcnQsIGNvdW50ZXIpIHtcclxuICAgIHZhciBzZWxmID0gdGhpcyxcclxuICAgICAgICBudW1Db3VudGVycyA9IGNvdW50ZXIubGVuZ3RoLFxyXG4gICAgICAgIGVuZCA9IHNlbGYuX3Jvdy5sZW5ndGgsXHJcbiAgICAgICAgaXNXaGl0ZSA9ICFzZWxmLl9yb3dbc3RhcnRdLFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgY291bnRlclBvcyA9IDA7XHJcblxyXG4gICAgQXJyYXlIZWxwZXIuaW5pdChjb3VudGVyLCAwKTtcclxuXHJcbiAgICBmb3IgKCBpID0gc3RhcnQ7IGkgPCBlbmQ7IGkrKykge1xyXG4gICAgICAgIGlmIChzZWxmLl9yb3dbaV0gXiBpc1doaXRlKSB7XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10rKztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgIGlmIChjb3VudGVyUG9zID09PSBudW1Db3VudGVycykge1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdID0gMTtcclxuICAgICAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gY291bnRlcjtcclxufTtcclxuXHJcbkNvZGUzOVJlYWRlci5wcm90b3R5cGUuX2RlY29kZSA9IGZ1bmN0aW9uKCkge1xyXG4gICAgdmFyIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIGNvdW50ZXJzID0gWzAsIDAsIDAsIDAsIDAsIDAsIDAsIDAsIDBdLFxyXG4gICAgICAgIHJlc3VsdCA9IFtdLFxyXG4gICAgICAgIHN0YXJ0ID0gc2VsZi5fZmluZFN0YXJ0KCksXHJcbiAgICAgICAgZGVjb2RlZENoYXIsXHJcbiAgICAgICAgbGFzdFN0YXJ0LFxyXG4gICAgICAgIHBhdHRlcm4sXHJcbiAgICAgICAgbmV4dFN0YXJ0O1xyXG5cclxuICAgIGlmICghc3RhcnQpIHtcclxuICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgIH1cclxuICAgIG5leHRTdGFydCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93LCBzdGFydC5lbmQpO1xyXG5cclxuICAgIGRvIHtcclxuICAgICAgICBjb3VudGVycyA9IHNlbGYuX3RvQ291bnRlcnMobmV4dFN0YXJ0LCBjb3VudGVycyk7XHJcbiAgICAgICAgcGF0dGVybiA9IHNlbGYuX3RvUGF0dGVybihjb3VudGVycyk7XHJcbiAgICAgICAgaWYgKHBhdHRlcm4gPCAwKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgIH1cclxuICAgICAgICBkZWNvZGVkQ2hhciA9IHNlbGYuX3BhdHRlcm5Ub0NoYXIocGF0dGVybik7XHJcbiAgICAgICAgaWYgKGRlY29kZWRDaGFyIDwgMCl7XHJcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXN1bHQucHVzaChkZWNvZGVkQ2hhcik7XHJcbiAgICAgICAgbGFzdFN0YXJ0ID0gbmV4dFN0YXJ0O1xyXG4gICAgICAgIG5leHRTdGFydCArPSBBcnJheUhlbHBlci5zdW0oY291bnRlcnMpO1xyXG4gICAgICAgIG5leHRTdGFydCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93LCBuZXh0U3RhcnQpO1xyXG4gICAgfSB3aGlsZSAoZGVjb2RlZENoYXIgIT09ICcqJyk7XHJcbiAgICByZXN1bHQucG9wKCk7XHJcblxyXG4gICAgaWYgKCFyZXN1bHQubGVuZ3RoKSB7XHJcbiAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICB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JBQ1RFUl9FTkNPRElOR1MubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5DSEFSQUNURVJfRU5DT0RJTkdTW2ldID09PSBwYXR0ZXJuKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBTdHJpbmcuZnJvbUNoYXJDb2RlKHNlbGYuQUxQSEFCRVRbaV0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiAtMTtcclxufTtcclxuXHJcbkNvZGUzOVJlYWRlci5wcm90b3R5cGUuX2ZpbmROZXh0V2lkdGggPSBmdW5jdGlvbihjb3VudGVycywgY3VycmVudCkge1xyXG4gICAgdmFyIGksXHJcbiAgICAgICAgbWluV2lkdGggPSBOdW1iZXIuTUFYX1ZBTFVFO1xyXG5cclxuICAgIGZvciAoaSA9IDA7IGkgPCBjb3VudGVycy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGlmIChjb3VudGVyc1tpXSA8IG1pbldpZHRoICYmIGNvdW50ZXJzW2ldID4gY3VycmVudCkge1xyXG4gICAgICAgICAgICBtaW5XaWR0aCA9IGNvdW50ZXJzW2ldO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gbWluV2lkdGg7XHJcbn07XHJcblxyXG5Db2RlMzlSZWFkZXIucHJvdG90eXBlLl90b1BhdHRlcm4gPSBmdW5jdGlvbihjb3VudGVycykge1xyXG4gICAgdmFyIG51bUNvdW50ZXJzID0gY291bnRlcnMubGVuZ3RoLFxyXG4gICAgICAgIG1heE5hcnJvd1dpZHRoID0gMCxcclxuICAgICAgICBudW1XaWRlQmFycyA9IG51bUNvdW50ZXJzLFxyXG4gICAgICAgIHdpZGVCYXJXaWR0aCA9IDAsXHJcbiAgICAgICAgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgcGF0dGVybixcclxuICAgICAgICBpO1xyXG5cclxuICAgIHdoaWxlIChudW1XaWRlQmFycyA+IDMpIHtcclxuICAgICAgICBtYXhOYXJyb3dXaWR0aCA9IHNlbGYuX2ZpbmROZXh0V2lkdGgoY291bnRlcnMsIG1heE5hcnJvd1dpZHRoKTtcclxuICAgICAgICBudW1XaWRlQmFycyA9IDA7XHJcbiAgICAgICAgcGF0dGVybiA9IDA7XHJcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IG51bUNvdW50ZXJzOyBpKyspIHtcclxuICAgICAgICAgICAgaWYgKGNvdW50ZXJzW2ldID4gbWF4TmFycm93V2lkdGgpIHtcclxuICAgICAgICAgICAgICAgIHBhdHRlcm4gfD0gMSA8PCAobnVtQ291bnRlcnMgLSAxIC0gaSk7XHJcbiAgICAgICAgICAgICAgICBudW1XaWRlQmFycysrO1xyXG4gICAgICAgICAgICAgICAgd2lkZUJhcldpZHRoICs9IGNvdW50ZXJzW2ldO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAobnVtV2lkZUJhcnMgPT09IDMpIHtcclxuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IG51bUNvdW50ZXJzICYmIG51bVdpZGVCYXJzID4gMDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoY291bnRlcnNbaV0gPiBtYXhOYXJyb3dXaWR0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIG51bVdpZGVCYXJzLS07XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKChjb3VudGVyc1tpXSAqIDIpID49IHdpZGVCYXJXaWR0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBwYXR0ZXJuO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiAtMTtcclxufTtcclxuXHJcbkNvZGUzOVJlYWRlci5wcm90b3R5cGUuX2ZpbmRTdGFydCA9IGZ1bmN0aW9uKCkge1xyXG4gICAgdmFyIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIG9mZnNldCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93KSxcclxuICAgICAgICBwYXR0ZXJuU3RhcnQgPSBvZmZzZXQsXHJcbiAgICAgICAgY291bnRlciA9IFswLCAwLCAwLCAwLCAwLCAwLCAwLCAwLCAwXSxcclxuICAgICAgICBjb3VudGVyUG9zID0gMCxcclxuICAgICAgICBpc1doaXRlID0gZmFsc2UsXHJcbiAgICAgICAgaSxcclxuICAgICAgICBqLFxyXG4gICAgICAgIHdoaXRlU3BhY2VNdXN0U3RhcnQ7XHJcblxyXG4gICAgZm9yICggaSA9IG9mZnNldDsgaSA8IHNlbGYuX3Jvdy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGlmIChzZWxmLl9yb3dbaV0gXiBpc1doaXRlKSB7XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10rKztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBpZiAoY291bnRlclBvcyA9PT0gY291bnRlci5sZW5ndGggLSAxKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBmaW5kIHN0YXJ0IHBhdHRlcm5cclxuICAgICAgICAgICAgICAgIGlmIChzZWxmLl90b1BhdHRlcm4oY291bnRlcikgPT09IHNlbGYuQVNURVJJU0spIHtcclxuICAgICAgICAgICAgICAgICAgICB3aGl0ZVNwYWNlTXVzdFN0YXJ0ID0gTWF0aC5mbG9vcihNYXRoLm1heCgwLCBwYXR0ZXJuU3RhcnQgLSAoKGkgLSBwYXR0ZXJuU3RhcnQpIC8gNCkpKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5fbWF0Y2hSYW5nZSh3aGl0ZVNwYWNlTXVzdFN0YXJ0LCBwYXR0ZXJuU3RhcnQsIDApKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydDogcGF0dGVyblN0YXJ0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kOiBpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIHBhdHRlcm5TdGFydCArPSBjb3VudGVyWzBdICsgY291bnRlclsxXTtcclxuICAgICAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgNzsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlcltqXSA9IGNvdW50ZXJbaiArIDJdO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgY291bnRlcls3XSA9IDA7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyWzhdID0gMDtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MtLTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MrKztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdID0gMTtcclxuICAgICAgICAgICAgaXNXaGl0ZSA9ICFpc1doaXRlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBudWxsO1xyXG59O1xyXG5cclxuZXhwb3J0IGRlZmF1bHQgQ29kZTM5UmVhZGVyO1xyXG5cblxuXG4vKiogV0VCUEFDSyBGT09URVIgKipcbiAqKiAuL3NyYy9yZWFkZXIvY29kZV8zOV9yZWFkZXIuanNcbiAqKi8iLCJtb2R1bGUuZXhwb3J0cyA9IGRvdFxuXG4vKipcbiAqIENhbGN1bGF0ZXMgdGhlIGRvdCBwcm9kdWN0IG9mIHR3byB2ZWMyJ3NcbiAqXG4gKiBAcGFyYW0ge3ZlYzJ9IGEgdGhlIGZpcnN0IG9wZXJhbmRcbiAqIEBwYXJhbSB7dmV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b250YWluZXIuZG9tLmltYWdlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBfY2FudmFzQ29udGFpbmVyLmN0eC5pbWFnZSA9IF9jYW52YXNDb250YWluZXIuZG9tLmltYWdlLmdldENvbnRleHQoXCIyZFwiKTtcclxuICAgICAgICBfY2FudmFzQ29udGFpbmVyLmRvbS5pbWFnZS53aWR0aCA9IF9pbnB1dFN0cmVhbS5nZXRDYW52YXNTaXplKCkueDtcclxuICAgICAgICBfY2FudmFzQ29udGFpbmVyLmRvbS5pbWFnZS5oZWlnaHQgPSBfaW5wdXRTdHJlYW0uZ2V0Q2FudmFzU2l6ZSgpLnk7XHJcblxyXG4gICAgICAgIF9jYW52YXNDb250YWluZXIuZG9tLm92ZXJsYXkgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKFwiY2FudmFzLmRyYXdpbmdCdWZmZXJcIik7XHJcbiAgICAgICAgaWYgKCFfY2FudmFzQ29udGFpbmVyLmRvbS5vdmVybGF5KSB7XHJcbiAgICAgICAgICAgIF9jYW52YXNDb250YWluZXIuZG9tLm92ZXJsYXkgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiY2FudmFzXCIpO1xyXG4gICAgICAgICAgICBfY2FudmFzQ29udGFpbmVyLmRvbS5vdmVybGF5LmNsYXNzTmFtZSA9IFwiZHJhd2luZ0J1ZmZlclwiO1xyXG4gICAgICAgICAgICBpZiAoJHZpZXdwb3J0KSB7XHJcbiAgICAgICAgICAgICAgICAkdmlld3BvcnQuYXBwZW5kQ2hpbGQoX2NhbnZhc0NvbnRhaW5lci5kb20ub3ZlcmxheSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgdmFyIGNsZWFyRml4ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImJyXCIpO1xyXG4gICAgICAgICAgICBjbGVhckZpeC5zZXRBdHRyaWJ1dGUoXCJjbGVhclwiLCBcImFsbFwiKTtcclxuICAgICA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1bmN0aW9uKHdvcmtlclRocmVhZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuICF3b3JrZXJUaHJlYWQuYnVzeTtcclxuICAgICAgICAgICAgfSlbMF07XHJcbiAgICAgICAgICAgIGlmIChhdmFpbGFibGVXb3JrZXIpIHtcclxuICAgICAgICAgICAgICAgIF9mcmFtZWdyYWJiZXIuYXR0YWNoRGF0YShhdmFpbGFibGVXb3JrZXIuaW1hZ2VEYXRhKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjsgLy8gYWxsIHdvcmtlcnMgYXJlIGJ1c3lcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIF9mcmFtZWdyYWJiZXIuYXR0YWNoRGF0YShfaW5wdXRJbWFnZVdyYXBwZXIuZGF0YSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChfZnJhbWVncmFiYmVyLmdyYWIoKSkge1xyXG4gICAgICAgICAgICBpZiAoYXZhaWxhYmxlV29ya2VyKSB7XHJcbiAgICAgICAgICAgICAgICBhdmFpbGFibGVXb3JrZXIuYnVzeSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICBhdmFpbGFibGVXb3JrZXIud29ya2VyLnBvc3RNZXNzYWdlKHtcclxuICAgICAgICAgICAgICAgICAgICBjbWQ6ICdwcm9jZXNzJyxcclxuICAgICAgICAgICAgICAgICAgICBpbWFnZURhdGE6IGF2YWlsYWJsZVdvcmtlci5pbWFnZURhdGFcclxuICAgICAgICAgICAgICAgIH0sIFthdmFpbGFibGVXb3JrZXIuaW1hZ2VEYXRhLmJ1ZmZlcl0pO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgbG9jYXRlQW5kRGVjb2RlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAgIGxvY2F0Z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VyUG9vbC5zbGljZSgwLCBpbmNyZWFzZUJ5KTtcclxuICAgICAgICByZXR1cm4gY2IgJiYgY2IoKTtcclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBpbmNyZWFzZUJ5OyBpKyspIHtcclxuICAgICAgICAgICAgaW5pdFdvcmtlcih3b3JrZXJJbml0aWFsaXplZCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiB3b3JrZXJJbml0aWFsaXplZCh3b3JrZXJUaHJlYWQpIHtcclxuICAgICAgICAgICAgX3dvcmtlclBvb2wucHVzaCh3b3JrZXJUaHJlYWQpO1xyXG4gICAgICAgICAgICBpZiAoX3dvcmtlclBvb2wubGVuZ3RoID49IGNhcGFjaXR5KXtcclxuICAgICAgICAgICAgICAgIGNiICYmIGNiKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIGluaXQ6IGZ1bmN0aW9uKGNvbmZpZywgY2IsIGltYWdlV3JhcHBlcikge1xyXG4gICAgICAgIF9jb25maWcgPSBtZXJnZSh7fSwgQ29uZmlnLCBjb25maWcpO1xyXG4gICAgICAgIGlmIChpbWFnZVdyYXBwZXIpIHtcclxuICAgICAgICAgICAgX29uVUlUaHJlYWQgPSBmYWxzZTtcclxuICAgICAgICAgICAgaW5pdGlhbGl6ZURhdGEoaW1hZ2VXcmFwcGVyKTtcclxuICAgICAgICAgICAgcmV0dXJuIGNiKCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaW5pdElucHV0U3RyZWFtKGNiKTtcclxuICAgICAgICB9XHJcbiAgICB9LFxyXG4gICAgc3RhcnQ6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgIHN0YXJ0KCk7XHJcbiAgICB9LFxyXG4gICAgc3RvcDogZnVuY3Rpb24oKSB7XHJcbiAgIC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6IGZ1bmN0aW9uKHJlc3VsdENvbGxlY3Rvcikge1xyXG4gICAgICAgIGlmIChyZXN1bHRDb2xsZWN0b3IgJiYgdHlwZW9mIHJlc3VsdENvbGxlY3Rvci5hZGRSZXN1bHQgPT09ICdmdW5jdGlvbicpIHtcclxuICAgICAgICAgICAgX3Jlc3VsdENvbGxlY3RvciA9IHJlc3VsdENvbGxlY3RvcjtcclxuICAgICAgICB9XHJcbiAgICB9LFxyXG4gICAgY2FudmFzOiBfY2FudmFzQ29udGFpbmVyLFxyXG4gICAgZGVjb2RlU2luZ2xlOiBmdW5jdGlvbihjb25maWcsIHJlc3VsdENhbGxiYWNrKSB7XHJcbiAgICAgICAgY29uZmlnID0gbWVyZ2Uoe1xyXG4gICAgICAgICAgICBpbnB1dFN0cmVhbToge1xyXG4gICAgICAgICAgICAgICAgdHlwZTogXCJJbWFnZVN0cmVhbVwiLFxyXG4gICAgICAgICAgICAgICAgc2VxdWVuY2U6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgc2l6ZTogODAwLFxyXG4gICAgICAgICAgICAgICAgc3JjOiBjb25maWcuc3JjXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIG51bU9mV29ya2VyczogKEVOVi5kZXZlbG9wbWVudCAmJiBjb25maWcuZGVidWcpID8gMCA6IDEsXHJcbiAgICAgICAgICAgIGxvY2F0b3I6IHtcclxuICAgICAgICAgICAgICAgIGhhbGZTYW1wbGU6IGZhbHNlXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LCBjb25maWcpO1xyXG4gICAgICAgIHRoaXMuaW5pdChjb25maWcsICgpID0+IHtcclxuICAgICAgICAgICAgRXZlbnRzLm9uY2UoXCJwcm9jZXNzZWRcIiwgKHJlc3VsdCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5zdG9wKCk7XHJcbiAgICAgICAgICAgICAgICByZXN1bHRDYWxsYmFjay5jYWxsKG51bGwsIHJlc3VsdCk7XHJcbiAgIC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hciBjYW52YXMgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiY2FudmFzXCIpLFxyXG4gICAgICAgICAgICBjdHggPSBjYW52YXMuZ2V0Q29udGV4dChcIjJkXCIpLFxyXG4gICAgICAgICAgICByZXN1bHRzID0gW10sXHJcbiAgICAgICAgICAgIGNhcGFjaXR5ID0gY29uZmlnLmNhcGFjaXR5IHx8IDIwLFxyXG4gICAgICAgICAgICBjYXB0dXJlID0gY29uZmlnLmNhcHR1cmUgPT09IHRydWU7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIG1hdGNoZXNDb25zdHJhaW50cyhjb2RlUmVzdWx0KSB7XHJcbiAgICAgICAgICAgIHJldHVybiBjYXBhY2l0eVxyXG4gICAgICAgICAgICAgICAgJiYgY29kZVJlc3VsdFxyXG4gICAgICAgICAgICAgICAgJiYgIWNvbnRhaW5zKGNvZGVSZXN1bHQsIGNvbmZpZy5ibGFja2xpc3QpXHJcbiAgICAgICAgICAgICAgICAmJiBwYXNzZXNGaWx0ZXIoY29kZVJlc3VsdCwgY29uZmlnLmZpbHRlcik7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICBhZGRSZXN1bHQ6IGZ1bmN0aW9uKGRhdGEsIGltYWdlU2l6ZSwgY29kZVJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHt9O1xyXG5cclxuICAgICAgICAgICAgICAgIGlmIChtYXRjaGVzQ29uc3RyYWludHMoY29kZVJlc3VsdCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBjYXBhY2l0eS0tO1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5jb2RlUmVzdWx0ID0gY29kZVJlc3VsdDtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY2FwdHVyZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYW52YXMud2lkdGggPSBpbWFnZVNpemUueDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FudmFzLmhlaWdodCA9IGltYWdlU2l6ZS55O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBJbWFnZURlYnVnLmRyYXdJbWFnZShkYXRhLCBpbWFnZVNpemUsIGN0eCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdC5mcmFtZSA9IGNhbnZhcy50b0RhdGFVUkwoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0cy5wdXNoKHJlc3VsdCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGdldFJlc3VsdHM6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdHM7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG4gICAgfVxyXG59O1xyXG5cblxuXG4vKiogV0VCUEFDSyBGT09URVIgKipcbiAqKiAuL3NyYy9hbmFseXRpY3MvcmVzdWx0X2NvbGxlY3Rvci5qc1xuICoqLyIsImNvbnN0IHZlYzIgPSB7XHJcbiAgICBjbG9uZTogcmVxdWlyZSgnZ2wtdmVjMi9jbG9uZScpLFxyXG4gICAgZG90OiByZXF1aXJlKCdnbC12ZWMyL2RvdCcpXHJcbn1cclxuICAgIC8qKlxyXG4gICAgICogQ3JlYXRlcyBhIGNsdXN0ZXIgZm9yIGdyb3VwaW5nIHNpbWlsYXIgb3JpZW50YXRpb25zIG9mIGRhdGFwb2ludHNcclxuICAgICAqL1xyXG5leHBvcnQgZGVmYXVsdCB7XHJcbiAgICBjcmVhdGU6IGZ1bmN0aW9uKHBvaW50LCB0aHJlc2hvbGQpIHtcclxuICAgICAgICB2YXIgcG9pbnRzID0gW10sXHJcbiAgICAgICAgICAgIGNlbnRlciA9IHtcclxuICAgICAgICAgICAgICAgIHJhZDogMCxcclxuICAgICAgICAgICAgICAgIHZlYzogdmVjMi5jbG9uZShbMCwgMF0pXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHBvaW50TWFwID0ge307XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGluaXQoKSB7XHJcbiAgICAgICAgICAgIGFkZChwb2ludCk7XHJcbiAgICAgICAgICAgIHVwZGF0ZUNlbnRlcigpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gYWRkKHBvaW50VG9BZGQpIHtcclxuICAgICAgICAgICAgcG9pbnRNYXBbcG9pbnRUb0FkZC5pZF0gPSBwb2ludFRvQWRkO1xyXG4gICAgICAgICAgICBwb2ludHMucHVzaChwb2ludFRvQWRkKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHVwZGF0ZUNlbnRlcigpIHtcclxuICAgICAgICAgICAgdmFyIGksIHN1bSA9IDA7XHJcbiAgICAgICAgICAgIGZvciAoIGkgPSAwOyBpIDwgcG9pbnRzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBzdW0gKz0gcG9pbnRzW2ldLnJhZDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjZW50ZXIucmFkID0gc3VtIC8gcG9pbnRzLmxlbmd0aDtcclxuICAgICAgICAgICAgY2VudGVyLnZlYyA9IHZlYzIuY2xvbmUoW01hdGguY29zKGNlbnRlci5yYWQpLCBNYXRoLnNpbihjZW50ZXIucmFkKV0pO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaW5pdCgpO1xyXG5cclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICBhZGQ6IGZ1bmN0aW9uKHBvaW50VG9BZGQpIHtcclxuICAgICAgICAgICAgICAgIGlmICghcG9pbnRNYXBbcG9pbnRUb0FkZC5pZF0pIHtcclxuICAgICAgICAgICAgICAgICAgICBhZGQocG9pbnRUb0FkZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlQ2VudGVyKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGZpdHM6IGZ1bmN0aW9uKG90aGVyUG9pbnQpIHtcclxuICAgICAgICAgICAgICAgIC8vIGNoZWNrIGNvc2luZSBzaW1pbGFyaXR5IHRvIGNlbnRlci1hbmdsZVxyXG4gICAgICAgICAgICAgICAgdmFyIHNpbWlsYXJpdHkgPSBNYXRoLmFicyh2ZWMyLmRvdChvdGhlclBvaW50LnBvaW50LnZlYywgY2VudGVyLnZlYykpO1xyXG4gICAgICAgICAgICAgICAgaWYgKHNpbWlsYXJpdHkgPiB0aHJlc2hvbGQpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZ2V0UG9pbnRzOiBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBwb2ludHM7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGdldENlbnRlcjogZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gY2VudGVyO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgIH0sXHJcbiAgICBjcmVhdGVQb2ludDogZnVuY3Rpb24obmV3UG9pbnQsIGlkLCBwcm9wZXJ0eSkge1xyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIHJhZDogbmV3UG9pbnRbcHJvcGVydHldLFxyXG4gICAgICAgICAgICBwb2ludDogbmV3UG9pbnQsXHJcbiAgICAgICAgICAgIGlkOiBpZFxyXG4gICAgICAgIH07XHJcbiAgICB9XHJcbn07XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIC4vc3JjL2NvbW1vbi9jbHVzdGVyLmpzXG4g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hbGxiYWNrOiBjYWxsYmFjayxcclxuICAgICAgICAgICAgICAgIGFzeW5jOiBhc3luY1xyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHN1YnNjcmlwdGlvbiA9IGNhbGxiYWNrO1xyXG4gICAgICAgICAgICBpZiAoIXN1YnNjcmlwdGlvbi5jYWxsYmFjaykge1xyXG4gICAgICAgICAgICAgICAgdGhyb3cgXCJDYWxsYmFjayB3YXMgbm90IHNwZWNpZmllZCBvbiBvcHRpb25zXCI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGdldEV2ZW50KGV2ZW50KS5zdWJzY3JpYmVycy5wdXNoKHN1YnNjcmlwdGlvbik7XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHtcclxuICAgICAgICBzdWJzY3JpYmU6IGZ1bmN0aW9uKGV2ZW50LCBjYWxsYmFjaywgYXN5bmMpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHN1YnNjcmliZShldmVudCwgY2FsbGJhY2ssIGFzeW5jKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIHB1Ymxpc2g6IGZ1bmN0aW9uKGV2ZW50TmFtZSwgZGF0YSkge1xyXG4gICAgICAgICAgICB2YXIgZXZlbnQgPSBnZXRFdmVudChldmVudE5hbWUpLFxyXG4gICAgICAgICAgICAgICAgc3Vic2NyaWJlcnMgPSBldmVudC5zdWJzY3JpYmVycztcclxuXHJcbiAgICAgICAgICAgIGV2ZW50LnN1YnNjcmliZXJzID0gc3Vic2NyaWJlcnMuZmlsdGVyKGZ1bmN0aW9uKHN1YnNjcmliZXIpIHtcclxuICAgICAgICAgICAgICAgIHB1Ymxpc2hTdWJzY3JpcHRpb24oc3Vic2NyaWJlciwgZGF0YSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gIXN1YnNjcmliZXIub25jZTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBvbmNlOiBmdW5jdGlvbihldmVudCwgY2FsbGJhY2ssIGFzeW5jKSB7XHJcbiAgICAgICAgICAgIHN1YnNjcmliZShldmVudCwge1xyXG4gICAgICAgICAgICAgICAgY2FsbGJhY2s6IGNhbGxiYWNrLFxyXG4gICAgICAgICAgICAgICAgYXN5bmM6IGFzeW5jLFxyXG4gICAgICAgICAgICAgICAgb25jZTogdHJ1ZVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIHVuc3Vic2NyaWJlOiBmdW5jdGlvbihldmVudE5hbWUsIGNhbGxiYWNrKSB7XHJcbiAgICAgICAgICAgIHZhciBldmVudDtcclxuXHJcbiAgICAgICAgICAgIGlmIChldmVudE5hbWUpIHtcclxuICAgICAgICAgICAgICAgIGV2ZW50ID0gZ2V0RXZlbnQoZXZlbnROYW1lKTtcclxuICAgICAgICAgICAgICAgIGlmIChldmVudCAmJiBjYWxsYmFjaykge1xyXG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnN1YnNjcmliZXJzID0gZXZlbnQuc3Vic2NyaWJlcnMuZmlsdGVyKGZ1bmN0aW9uKHN1YnNjcmliZXIpe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3Vic2NyaWJlci5jYWxsYmFjayAhPT0gY2FsbGJhY2s7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnN1YnNjcmliZXJzID0gW107XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjbGVhckV2ZW50cygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxufSkoKTtcclxuXG5cblxuLyoqIFdFQlBBQ0sgRk9PVEVSICoqXG4gKiogLi9zcmMvY29tbW9uL2V2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6IFwiMzg3NDU5ODM0NTczODc1OTgzNzU5ODM3NTk4MzRcIlxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgYXJlYToge1xyXG4gICAgICAgICAgICB0b3A6IFwiMCVcIixcclxuICAgICAgICAgICAgcmlnaHQ6IFwiMCVcIixcclxuICAgICAgICAgICAgbGVmdDogXCIwJVwiLFxyXG4gICAgICAgICAgICBib3R0b206IFwiMCVcIlxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgc2luZ2xlQ2hhbm5lbDogZmFsc2UgLy8gdHJ1ZTogb25seSB0aGUgcmVkIGNvbG9yLWNoYW5uZWwgaXMgcmVhZFxyXG4gICAgfSxcclxuICAgIGxvY2F0ZTogdHJ1ZSxcclxuICAgIG51bU9mV29ya2VyczogMCxcclxuICAgIGRlY29kZXI6IHtcclxuICAgICAgICByZWFkZXJzOiBbXHJcbiAgICAgICAgICAgICdjb2RlXzEyOF9yZWFkZXInXHJcbiAgICAgICAgXSxcclxuICAgICAgICBkZWJ1Zzoge1xyXG4gICAgICAgICAgICBkcmF3Qm91bmRpbmdCb3g6IGZhbHNlLFxyXG4gICAgICAgICAgICBzaG93RnJlcXVlbmN5OiBmYWxzZSxcclxuICAgICAgICAgICAgZHJhd1NjYW5saW5lOiBmYWxzZSxcclxuICAgICAgICAgICAgc2hvd1BhdHRlcm46IGZhbHNlXHJcbiAgICAgICAgfVxyXG4gICAgfSxcclxuICAgIGxvY2F0b3I6IHtcclxuICAgICAgICBoYWxmU2FtcGxlOiB0cnVlLFxyXG4gICAgICAgIHBhdGNoU2l6ZTogXCJtZWRpdW1cIiwgLy8geC1zbWFsbCwgc21hbGwsIG1lZGl1bSwgbGFyZ2UsIHgtbGFyZ2VcclxuICAgICAgICBkZWJ1Zzoge1xyXG4gICAgICAgICAgICBzaG93Q2FudmFzOiBmYWxzZSxcclxuICAgICAgICAgICAgc2hvd1BhdGNoZXM6IGZhbHNlLFxyXG4gICAgICAgICAgICBzaG93Rm91bmRQYXRjaGVzOiBmYWxzZSxcclxuICAgICAgICAgICAgc2hvd1NrZWxldG9uOiBmYWxzZSxcclxuICAgICAgICAgICAgc2hvd0xhYmVsczogZmFsc2UsXHJcbiAgICAgICAgICAgIHNob3dQYXRjaExhYmVsczogZmFsc2UsXHJcbiAgICAgICAgICAgIHNob3dSZW1haW5pbmdQYXRjaExhYmVsczogZmFsc2UsXHJcbiAgICAgICAgICAgIGJveEZyb21QYXRjaGVzOiB7XHJcbiAgICAgICAgICAgICAgICBzaG93VHJhbnNmb3JtZWQ6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgc2hvd1RyYW5zZm9ybWVkQm94OiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIHNob3dCQjogZmFsc2VcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxufTtcclxuXG5cblxuLyoqIFdFQlBBQ0sgRk9PVEVSICoqXG4gKiogLi9zcmMvY29uZmlnL2NvbmZpZy5kZXYuanNcbiAqKi8iLCJsZXQgY29uZmlnO1xyXG5cclxuaWYgKEVOVi5kZXZlbG9wbWVudCl7XHJcbiAgICBjb25maWcgPSByZXF1aXJlKCcuL2NvbmZpZy5kZXYuanMnKTtcclxufSBlbHNlIGlmIChFTlYubm9kZSkge1xyXG4gICAgY29uZmlnID0gcmVxdWlyZSgnLi9jb25maWcubm9kZS5qcycpO1xyXG59IGVsc2Uge1xyXG4gICAgY29uZmlnID0gcmVxdWlyZSgnLi9jb25maWcucHJvZC5qcycpO1xyXG59XHJcblxyXG5leHBvcnQgZGVmYXVsdCBjb25maWc7XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIC4vc3JjL2NvbmZpZy9jb25maWcuanNcbiAqKi8iLCJpbXBvcnQgQnJlc2VuaGFtIGZyb20gJy4vYnJlc2VuaGFtJztcclxuaW1wb3J0IEltYWdlRGVidWcgZnJvbSAnLi4vY29tbW9uL2ltYWdlX2RlYnVnJztcclxuaW1wb3J0IENvZGUxM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vZjVSZWFkZXJcclxufTtcclxuZXhwb3J0IGRlZmF1bHQge1xyXG4gICAgY3JlYXRlOiBmdW5jdGlvbihjb25maWcsIGlucHV0SW1hZ2VXcmFwcGVyKSB7XHJcbiAgICAgICAgdmFyIF9jYW52YXMgPSB7XHJcbiAgICAgICAgICAgICAgICBjdHg6IHtcclxuICAgICAgICAgICAgICAgICAgICBmcmVxdWVuY3k6IG51bGwsXHJcbiAgICAgICAgICAgICAgICAgICAgcGF0dGVybjogbnVsbCxcclxuICAgICAgICAgICAgICAgICAgICBvdmVybGF5OiBudWxsXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZG9tOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZnJlcXVlbmN5OiBudWxsLFxyXG4gICAgICAgICAgICAgICAgICAgIHBhdHRlcm46IG51bGwsXHJcbiAgICAgICAgICAgICAgICAgICAgb3ZlcmxheTogbnVsbFxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBfYmFyY29kZVJlYWRlcnMgPSBbXTtcclxuXHJcbiAgICAgICAgaW5pdENhbnZhcygpO1xyXG4gICAgICAgIGluaXRSZWFkZXJzKCk7XHJcbiAgICAgICAgaW5pdENvbmZpZygpO1xyXG5cclxuICAgICAgICBmdW5jdGlvbiBpbml0Q2FudmFzKCkge1xyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50ICYmIHR5cGVvZiBkb2N1bWVudCAhPT0gJ3VuZGVmaW5lZCcpIHtcclxuICAgICAgICAgICAgICAgIHZhciAkZGVidWcgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKFwiI2RlYnVnLmRldGVjdGlvblwiKTtcclxuICAgICAgICAgICAgICAgIF9jYW52YXMuZG9tLmZyZXF1ZW5jeSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXCJjYW52YXMuZnJlcXVlbmN5XCIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFfY2FudmFzLmRvbS5mcmVxdWVuY3kpIHtcclxuICAgICAgICAgICAgICAgICAgICBfY2FudmFzLmRvbS5mcmVxdWVuY3kgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiY2FudmFzXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIF9jYW52YXMuZG9tLmZyZXF1ZW5jeS5jbGFzc05hbWUgPSBcImZyZXF1ZW5jeVwiO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgkZGVidWcpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGRlYnVnLmFwcGVuZENoaWxkKF9jYW52YXMuZG9tLmZyZXF1ZW5jeSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgX2NhbnZhcy5jdHguZnJlcXVlbmN5ID0gX2NhbnZhcy5kb20uZnJlcXVlbmN5LmdldENvbnRleHQoXCIyZFwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICBfY2FudmFzLmRvbS5wYXR0ZXJuID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcImNhbnZhcy5wYXR0ZXJuQnVmZmVyXCIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFfY2FudmFzLmRvbS5wYXR0ZXJuKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgX2NhbnZhcy5kb20ucGF0dGVybiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJjYW52YXNcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgX2NhbnZhcy5kb20ucGF0dGVybi5jbGFzc05hbWUgPSBcInBhdHRlcm5CdWZmZXJcIjtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoJGRlYnVnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRkZWJ1Zy5hcHBlbmRDaGlsZChfY2FudmFzLmRvbS5wYXR0ZXJuKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBfY2FudmFzLmN0eC5wYXR0ZXJuID0gX2NhbnZhcy5kb20ucGF0dGVybi5nZXRDb250ZXh0KFwiMmRcIik7XHJcblxyXG4gICAgICAgICAgICAgICAgX2NhbnZhcy5kb20ub3ZlcmxheSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXCJjYW52YXMuZHJhd2luZ0J1ZmZlclwiKTtcclxuICAgICAgICAgICAgICAgIGlmIChfY2FudmFzLmRvbS5vdmVybGF5KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgX2NhbnZhcy5jdHgub3ZlcmxheSA9IF9jYW52YXMuZG9tLm92ZXJsYXkuZ2V0Q29udGV4dChcIjJkXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBpbml0UmVhZGVycygpIHtcclxuICAgICAgICAgICAgY29uZmlnLnJlYWRlcnMuZm9yRWFjaChmdW5jdGlvbihyZWFkZXJDb25maWcpIHtcclxuICAgICAgICAgICAgICAgIHZhciByZWFkZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiA9IHt9O1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcmVhZGVyQ29uZmlnID09PSAnb2JqZWN0Jykge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlYWRlciA9IHJlYWRlckNvbmZpZy5mb3JtYXQ7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiA9IHJlYWRlckNvbmZpZy5jb25maWc7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiByZWFkZXJDb25maWcgPT09ICdzdHJpbmcnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVhZGVyID0gcmVhZGVyQ29uZmlnO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiQmVmb3JlIHJlZ2lzdGVyaW5nIHJlYWRlcjogXCIsIHJlYWRlcik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBfYmFyY29kZVJlYWRlcnMucHVzaChuZXcgUkVBREVSU1tyZWFkZXJdKGNvbmZpZ3VyYXRpb24pKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQpIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiUmVnaXN0ZXJlZCBSZWFkZXJzOiBcIiArIF9iYXJjb2RlUmVhZGVyc1xyXG4gICAgICAgICAgICAgICAgICAgIC5tYXAoKHJlYWRlcikgPT4gSlNPTi5zdHJpbmdpZnkoe2Zvcm1hdDogcmVhZGVyLkZPUk1BVCwgY29uZmlnOiByZWFkZXIuY29uZmlnfSkpXHJcbiAgICAgICAgICAgICAgICAgICAgLmpvaW4oJywgJykpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBpbml0Q29uZmlnKCkge1xyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50ICYmIHR5cGVvZiBkb2N1bWVudCAhPT0gJ3VuZGVmaW5lZCcpIHtcclxuICAgICAgICAgICAgICAgIHZhciBpLFxyXG4gICAgICAgICAgICAgICAgICAgIHZpcyA9IFt7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGU6IF9jYW52YXMuZG9tLmZyZXF1ZW5jeSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcDogY29uZmlnLmRlYnVnLnNob3dGcmVxdWVuY3lcclxuICAgICAgICAgICAgICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGU6IF9jYW52YXMuZG9tLnBhdHRlcm4sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3A6IGNvbmZpZy5kZWJ1Zy5zaG93UGF0dGVyblxyXG4gICAgICAgICAgICAgICAgICAgIH1dO1xyXG5cclxuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCB2aXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAodmlzW2ldLnByb3AgPT09IHRydWUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmlzW2ldLm5vZGUuc3R5bGUuZGlzcGxheSA9IFwiYmxvY2tcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2aXNbaV0ubm9kZS5zdHlsZS5kaXNwbGF5ID0gXCJub25lXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKipcclxuICAgICAgICAgKiBleHRlbmQgdGhlIGxpbmUgb24gYm90aCBlbmRzXHJcbiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gbGluZVxyXG4gICAgICAgICAqIEBwYXJhbSB7TnVtYmVyfSBhbmdsZVxyXG4gICAgICAgICAqL1xyXG4gICAgICAgIGZ1bmN0aW9uIGdldEV4dGVuZGVkTGluZShsaW5lLCBhbmdsZSwgZXh0KSB7XHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIGV4dGVuZExpbmUoYW1vdW50KSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgZXh0ZW5zaW9uID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIHk6IGFtb3VudCAqIE1hdGguc2luKGFuZ2xlKSxcclxuICAgICAgICAgICAgICAgICAgICB4OiBhbW91bnQgKiBNYXRoLmNvcyhhbmdsZSlcclxuICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICAgICAgbGluZVswXS55IC09IGV4dGVuc2lvbi55O1xyXG4gICAgICAgICAgICAgICAgbGluZVswXS54IC09IGV4dGVuc2lvbi54O1xyXG4gICAgICAgICAgICAgICAgbGluZVsxXS55ICs9IGV4dGVuc2lvbi55O1xyXG4gICAgICAgICAgICAgICAgbGluZVsxXS54ICs9IGV4dGVuc2lvbi54O1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBjaGVjayBpZiBpbnNpZGUgaW1hZ2VcclxuICAgICAgICAgICAgZXh0ZW5kTGluZShleHQpO1xyXG4gICAgICAgICAgICB3aGlsZSAoZXh0ID4gMSAmJiAoIWlucHV0SW1hZ2VXcmFwcGVyLmluSW1hZ2VXaXRoQm9yZGVyKGxpbmVbMF0sIDApXHJcbiAgICAgICAgICAgICAgICAgICAgfHwgIWlucHV0SW1hZ2VXcmFwcGVyLmluSW1hZ2VXaXRoQm9yZGVyKGxpbmVbMV0sIDApKSkge1xyXG4gICAgICAgICAgICAgICAgZXh0IC09IE1hdGguY2VpbChleHQgLyAyKTtcclxuICAgICAgICAgICAgICAgIGV4dGVuZExpbmUoLWV4dCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGxpbmU7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBnZXRMaW5lKGJveCkge1xyXG4gICAgICAgICAgICByZXR1cm4gW3tcclxuICAgICAgICAgICAgICAgIHg6IChib3hbMV1bMF0gLSBib3hbMF1bMF0pIC8gMiArIGJveFswXVswXSxcclxuICAgICAgICAgICAgICAgIHk6IChib3hbMV1bMV0gLSBib3hbMF1bMV0pIC8gMiArIGJveFswXVsxXVxyXG4gICAgICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgICAgICB4OiAoYm94WzNdWzBdIC0gYm94WzJdWzBdKSAvIDIgKyBib3hbMl1bMF0sXHJcbiAgICAgICAgICAgICAgICB5OiAoYm94WzNdWzFdIC0gYm94WzJdWzFdKSAvIDIgKyBib3hbMl1bMV1cclxuICAgICAgICAgICAgfV07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiB0cnlEZWNvZGUobGluZSkge1xyXG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0gbnVsbCxcclxuICAgICAgICAgICAgICAgIGksXHJcbiAgICAgICAgICAgICAgICBiYXJjb2RlTGluZSA9IEJyZXNlbmhhbS5nZXRCYXJjb2RlTGluZShpbnB1dEltYWdlV3JhcHBlciwgbGluZVswXSwgbGluZVsxXSk7XHJcblxyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50ICYmIGNvbmZpZy5kZWJ1Zy5zaG93RnJlcXVlbmN5KSB7XHJcbiAgICAgICAgICAgICAgICBJbWFnZURlYnVnLmRyYXdQYXRoKGxpbmUsIHt4OiAneCcsIHk6ICd5J30sIF9jYW52YXMuY3R4Lm92ZXJsYXksIHtjb2xvcjogJ3JlZCcsIGxpbmVXaWR0aDogM30pO1xyXG4gICAgICAgICAgICAgICAgQnJlc2VuaGFtLmRlYnVnLnByaW50RnJlcXVlbmN5KGJhcmNvZGVMaW5lLmxpbmUsIF9jYW52YXMuZG9tLmZyZXF1ZW5jeSk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIEJyZXNlbmhhbS50b0JpbmFyeUxpbmUoYmFyY29kZUxpbmUpO1xyXG5cclxuICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCAmJiBjb25maWcuZGVidWcuc2hvd1BhdHRlcm4pIHtcclxuICAgICAgICAgICAgICAgIEJyZXNlbmhhbS5kZWJ1Zy5wcmludFBhdHRlcm4oYmFyY29kZUxpbmUubGluZSwgX2NhbnZhcy5kb20ucGF0dGVybik7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGZvciAoIGkgPSAwOyBpIDwgX2JhcmNvZGVSZWFkZXJzLmxlbmd0aCAmJiByZXN1bHQgPT09IG51bGw7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gX2JhcmNvZGVSZWFkZXJzW2ldLmRlY29kZVBhdHRlcm4oYmFyY29kZUxpbmUubGluZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHJlc3VsdCA9PT0gbnVsbCl7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgY29kZVJlc3VsdDogcmVzdWx0LFxyXG4gICAgICAgICAgICAgICAgYmFyY29kZUxpbmU6IGJhcmNvZGVMaW5lXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKipcclxuICAgICAgICAgKiBUaGlzIG1ldGhvZCBzbGljZXMgdGhlIGdpdmVuIGFyZWEgYXBhcnQgYW5kIHRyaWVzIHRvIGRldGVjdCBhIGJhcmNvZGUtcGF0dGVyblxyXG4gICAgICAgICAqIGZvciBlYWNoIHNsaWNlLiBJdCByZXR1cm5zIHRoZSBkZWNvZGVkIGJhcmNvZGUsIG9yIG51bGwgaWYgbm90aGluZyB3YXMgZm91bmRcclxuICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBib3hcclxuICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBsaW5lXHJcbiAgICAgICAgICogQHBhcmFtIHtOdW1iZXJ9IGxpbmVBbmdsZVxyXG4gICAgICAgICAqL1xyXG4gICAgICAgIGZ1bmN0aW9uIHRyeURlY29kZUJydXRlRm9yY2UoYm94LCBsaW5lLCBsaW5lQW5nbGUpIHtcclxuICAgICAgICAgICAgdmFyIHNpZGVMZW5ndGggPSBNYXRoLnNxcnQoTWF0aC5wb3coYm94WzFdWzBdIC0gYm94WzBdWzBdLCAyKSArIE1hdGgucG93KChib3hbMV1bMV0gLSBib3hbMF1bMV0pLCAyKSksXHJcbiAgICAgICAgICAgICAgICBpLFxyXG4gICAgICAgICAgICAgICAgc2xpY2VzID0gMTYsXHJcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBudWxsLFxyXG4gICAgICAgICAgICAgICAgZGlyLFxyXG4gICAgICAgICAgICAgICAgZXh0ZW5zaW9uLFxyXG4gICAgICAgICAgICAgICAgeGRpciA9IE1hdGguc2luKGxpbmVBbmdsZSksXHJcbiAgICAgICAgICAgICAgICB5ZGlyID0gTWF0aC5jb3MobGluZUFuZ2xlKTtcclxuXHJcbiAgICAgICAgICAgIGZvciAoIGkgPSAxOyBpIDwgc2xpY2VzICYmIHJlc3VsdCA9PT0gbnVsbDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBtb3ZlIGxpbmUgcGVycGVuZGljdWxhciB0byBhbmdsZVxyXG4gICAgICAgICAgICAgICAgZGlyID0gc2lkZUxlbmd0aCAvIHNsaWNlcyAqIGkgKiAoaSAlIDIgPT09IDAgPyAtMSA6IDEpO1xyXG4gICAgICAgICAgICAgICAgZXh0ZW5zaW9uID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIHk6IGRpciAqIHhkaXIsXHJcbiAgICAgICAgICAgICAgICAgICAgeDogZGlyICogeWRpclxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgIGxpbmVbMF0ueSArPSBleHRlbnNpb24ueDtcclxuICAgICAgICAgICAgICAgIGxpbmVbMF0ueCAtPSBleHRlbnNpb24ueTtcclxuICAgICAgICAgICAgICAgIGxpbmVbMV0ueSArPSBleHRlbnNpb24ueDtcclxuICAgICAgICAgICAgICAgIGxpbmVbMV0ueCAtPSBleHRlbnNpb24ueTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXN1bHQgPSB0cnlEZWNvZGUobGluZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGdldExpbmVMZW5ndGgobGluZSkge1xyXG4gICAgICAgICAgICByZXR1cm4gTWF0aC5zcXJ0KFxyXG4gICAgICAgICAgICAgICAgTWF0aC5wb3coTWF0aC5hYnMobGluZVsxXS55IC0gbGluZVswXS55KSwgMikgK1xyXG4gICAgICAgICAgICAgICAgTWF0aC5wb3coTWF0aC5hYnMobGluZVsxXS54IC0gbGluZVswXS54KSwgMikpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLyoqXHJcbiAgICAgICAgICogV2l0aCB0aGUgaGVscCBvZiB0aGUgY29uZmlndXJlZCByZWFkZXJzIChDb2RlMTI4IG9yIEVBTikgdGhpcyBmdW5jdGlvbiB0cmllcyB0byBkZXRlY3QgYVxyXG4gICAgICAgICAqIHZhbGlkIGJhcmNvZGUgcGF0dGVybiB3aXRoaW4gdGhlIGdpdmVuIGFyZWEuXHJcbiAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGJveCBUaGUgYXJlYSB0byBzZWFyY2ggaW5cclxuICAgICAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSB0aGUgcmVzdWx0IHtjb2RlUmVzdWx0LCBsaW5lLCBhbmdsZSwgcGF0dGVybiwgdGhyZXNob2xkfVxyXG4gICAgICAgICAqL1xyXG4gICAgICAgIGZ1bmN0aW9uIGRlY29kZUZyb21Cb3VuZGluZ0JveChib3gpIHtcclxuICAgICAgICAgICAgdmFyIGxpbmUsXHJcbiAgICAgICAgICAgICAgICBsaW5lQW5nbGUsXHJcbiAgICAgICAgICAgICAgICBjdHggPSBfY2FudmFzLmN0eC5vdmVybGF5LFxyXG4gICAgICAgICAgICAgICAgcmVzdWx0LFxyXG4gICAgICAgICAgICAgICAgbGluZUxlbmd0aDtcclxuXHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQpIHtcclxuICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGVidWcuZHJhd0JvdW5kaW5nQm94ICYmIGN0eCkge1xyXG4gICAgICAgICAgICAgICAgICAgIEltYWdlRGVidWcuZHJhd1BhdGgoYm94LCB7eDogMCwgeTogMX0sIGN0eCwge2NvbG9yOiBcImJsdWVcIiwgbGluZVdpZHRoOiAyfSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGxpbmUgPSBnZXRMaW5lKGJveCk7XHJcbiAgICAgICAgICAgIGxpbmVMZW5ndGggPSBnZXRMaW5lTGVuZ3RoKGxpbmUpO1xyXG4gICAgICAgICAgICBsaW5lQW5nbGUgPSBNYXRoLmF0YW4yKGxpbmVbMV0ueSAtIGxpbmVbMF0ueSwgbGluZVsxXS54IC0gbGluZVswXS54KTtcclxuICAgICAgICAgICAgbGluZSA9IGdldEV4dGVuZGVkTGluZShsaW5lLCBsaW5lQW5nbGUsIE1hdGguZmxvb3IobGluZUxlbmd0aCAqIDAuMSkpO1xyXG4gICAgICAgICAgICBpZiAobGluZSA9PT0gbnVsbCl7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmVzdWx0ID0gdHJ5RGVjb2RlKGxpbmUpO1xyXG4gICAgICAgICAgICBpZiAocmVzdWx0ID09PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICByZXN1bHQgPSB0cnlEZWNvZGVCcnV0ZUZvcmNlKGJveCwgbGluZSwgbGluZUFuZ2xlKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKHJlc3VsdCA9PT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQgJiYgcmVzdWx0ICYmIGNvbmZpZy5kZWJ1Zy5kcmF3U2NhbmxpbmUgJiYgY3R4KSB7XHJcbiAgICAgICAgICAgICAgICBJbWFnZURlYnVnLmRyYXdQYXRoKGxpbmUsIHt4OiAneCcsIHk6ICd5J30sIGN0eCwge2NvbG9yOiAncmVkJywgbGluZVdpZHRoOiAzfSk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBjb2RlUmVzdWx0OiByZXN1bHQuY29kZVJlc3VsdCxcclxuICAgICAgICAgICAgICAgIGxpbmU6IGxpbmUsXHJcbiAgICAgICAgICAgICAgICBhbmdsZTogbGluZUFuZ2xlLFxyXG4gICAgICAgICAgICAgICAgcGF0dGVybjogcmVzdWx0LmJhcmNvZGVMaW5lLmxpbmUsXHJcbiAgICAgICAgICAgICAgICB0aHJlc2hvbGQ6IHJlc3VsdC5iYXJjb2RlTGluZS50aHJlc2hvbGRcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIGRlY29kZUZyb21Cb3VuZGluZ0JveDogZnVuY3Rpb24oYm94KSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVjb2RlRnJvbUJvdW5kaW5nQm94KGJveCk7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGRlY29kZUZyb21Cb3VuZGluZ0JveGVzOiBmdW5jdGlvbihib3hlcykge1xyXG4gICAgICAgICAgICAgICAgdmFyIGksIHJlc3VsdCxcclxuICAgICAgICAgICAgICAgICAgICBiYXJjb2RlcyA9IFtdLFxyXG4gICAgICAgICAgICAgICAgICAgIG11bHRpcGxlID0gY29uZmlnLm11bHRpcGxlO1xyXG5cclxuICAgICAgICAgICAgICAgIGZvciAoIGkgPSAwOyBpIDwgYm94ZXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCBib3ggPSBib3hlc1tpXTtcclxuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSBkZWNvZGVGcm9tQm91bmRpbmdCb3goYm94KSB8fCB7fTtcclxuICAgICAgICAgICAgICAgICAgICByZXN1bHQuYm94ID0gYm94O1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAobXVsdGlwbGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmFyY29kZXMucHVzaChyZXN1bHQpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzdWx0LmNvZGVSZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKG11bHRpcGxlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmFyY29kZXNcclxuICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzZXRSZWFkZXJzOiBmdW5jdGlvbihyZWFkZXJzKSB7XHJcbiAgICAgICAgICAgICAgICBjb25maWcucmVhZGVycyA9IHJlYWRlcnM7XHJcbiAgICAgICAgICAgICAgICBfYmFyY29kZVJlYWRlcnMubGVuZ3RoID0gMDtcclxuICAgICAgICAgICAgICAgIGluaXRSZWFkZXJzKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG4gICAgfVxyXG59O1xyXG5cblxuXG4vKiogV0VCUEFDSyBGT09URVIgKipcbiAqKiAuL3NyYy9kZWNvZGVyL2JhcmNvZGVfZGVjb2Rlci5qc1xuICoqLyIsImltcG9ydCBJbWFnZVdyYXBwZXIgZnJvbSAnLi4vY29tbW9uL2ltYWdlX3dyYXBwZXInO1xyXG5cclxudmFyIEJyZXNlbmhhbSA9IHt9O1xyXG5cclxudmFyIFNsb3BlID0ge1xyXG4gICAgRElSOiB7XHJcbiAgICAgICAgVVA6IDEsXHJcbiAgICAgICAgRE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VhZCh5LCB4KTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZWFkKHgsIHkpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlcnJvciA9IGVycm9yIC0gZGVsdGF5O1xyXG4gICAgICAgIGlmIChlcnJvciA8IDApIHtcclxuICAgICAgICAgICAgeSA9IHkgKyB5c3RlcDtcclxuICAgICAgICAgICAgZXJyb3IgPSBlcnJvciArIGRlbHRheDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHtcclxuICAgICAgICBsaW5lOiBsaW5lLFxyXG4gICAgICAgIG1pbjogbWluLFxyXG4gICAgICAgIG1heDogbWF4XHJcbiAgICB9O1xyXG59O1xyXG5cclxuLyoqXHJcbiAqIENvbnZlcnRzIHRoZSByZXN1bHQgZnJvbSBnZXRCYXJjb2RlTGluZSBpbnRvIGEgYmluYXJ5IHJlcHJlc2VudGF0aW9uXHJcbiAqIGFsc28gY29uc2lkZXJpbmcgdGhlIGZyZXF1ZW5jeSBhbmQgc2xvcGUgb2YgdGhlIHNpZ25hbCBmb3IgbW9yZSByb2J1c3QgcmVzdWx0c1xyXG4gKiBAcGFyYW0ge09iamVjdH0gcmVzdWx0IHtsaW5lLCBtaW4sIG1heH1cclxuICovXHJcbkJyZXNlbmhhbS50b0JpbmFyeUxpbmUgPSBmdW5jdGlvbihyZXN1bHQpIHtcclxuICAgIHZhciBtaW4gPSByZXN1bHQubWluLFxyXG4gICAgICAgIG1heCA9IHJlc3VsdC5tYXgsXHJcbiAgICAgICAgbGluZSA9IHJlc3VsdC5saW5lLFxyXG4gICAgICAgIHNsb3BlLFxyXG4gICAgICAgIHNsb3BlMixcclxuICAgICAgICBjZW50ZXIgPSBtaW4gKyAobWF4IC0gbWluKSAvIDIsXHJcbiAgICAgICAgZXh0cmVtYSA9IFtdLFxyXG4gICAgICAgIGN1cnJlbnREaXIsXHJcbiAgICAgICAgZGlyLFxyXG4gICAgICAgIHRocmVzaG9sZCA9IChtYXggLSBtaW4pIC8gMTIsXHJcbiAgICAgICAgclRocmVzaG9sZCA9IC10aHJlc2hvbGQsXHJcbiAgICAgICAgaSxcclxuICAgICAgICBqO1xyXG5cclxuICAgIC8vIDEuIGZpbmQgZXh0cmVtYVxyXG4gICAgY3VycmVudERpciA9IGxpbmVbMF0gPiBjZW50ZXIgPyBTbG9wZS5ESVIuVVAgOiBTbG9wZS5ESVIuRE9XTjtcclxuICAgIGV4dHJlbWEucHVzaCh7XHJcbiAgICAgICAgcG9zOiAwLFxyXG4gICAgICAgIHZhbDogbGluZVswXVxyXG4gICAgfSk7XHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IGxpbmUubGVuZ3RoIC0gMjsgaSsrKSB7XHJcbiAgICAgICAgc2xvcGUgPSAobGluZVtpICsgMV0gLSBsaW5lW2ldKTtcclxuICAgICAgICBzbG9wZTIgPSAobGluZVtpICsgMl0gLSBsaW5lW2kgKyAxXSk7XHJcbiAgICAgICAgaWYgKChzbG9wZSArIHNsb3BlMikgPCByVGhyZXNob2xkICYmIGxpbmVbaSArIDFdIDwgKGNlbnRlciAqIDEuNSkpIHtcclxuICAgICAgICAgICAgZGlyID0gU2xvcGUuRElSLkRPV047XHJcbiAgICAgICAgfSBlbHNlIGlmICgoc2xvcGUgKyBzbG9wZTIpID4gdGhyZXNob2xkICYmIGxpbmVbaSArIDFdID4gKGNlbnRlciAqIDAuNSkpIHtcclxuICAgICAgICAgICAgZGlyID0gU2xvcGUuRElSLlVQO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGRpciA9IGN1cnJlbnREaXI7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAoY3VycmVudERpciAhPT0gZGlyKSB7XHJcbiAgICAgICAgICAgIGV4dHJlbWEucHVzaCh7XHJcbiAgICAgICAgICAgICAgICBwb3M6IGksXHJcbiAgICAgICAgICAgICAgICB2YWw6IGxpbmVbaV1cclxuICAgICAgICAgICAgfSk7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md0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChsaW5lW2ldID09PSAxKSB7XHJcbiAgICAgICAgICAgICAgICBjdHguZmlsbFJlY3QoaSwgMCwgMSwgMTAwKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxufTtcclxuXHJcbmV4cG9ydCBkZWZhdWx0IEJyZXNlbmhhbTtcclxuXG5cblxuLyoqIFdFQlBBQ0sgRk9PVEVSICoqXG4gKiogLi9zcmMvZGVjb2Rlci9icmVzZW5oYW0uanNcbiAqKi8iLCJpbXBvcnQge21lcmdlLCBwaWNrfSBmcm9tICdsb2Rhc2gnO1xyXG5cclxudmFyIHN0cmVhbVJlZixcclxuICAgIGxvYWRlZERhdGFIYW5kbGVyO1xyXG5cclxuZnVuY3Rpb24gd2FpdEZvclZpZGVvKHZpZGVvKSB7XHJcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xyXG4gICAgICAgIGxldCBhdHRlbXB0cyA9IDEwO1xyXG5cclxuICAgICAgICBmdW5jdGlvbiBjaGVja1ZpZGVvKCkge1xyXG4gICAgICAgICAgICBpZiAoYXR0ZW1wdHMgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAodmlkZW8udmlkZW9XaWR0aCA+IDAgJiYgdmlkZW8udmlkZW9IZWlnaHQgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyh2aWRlby52aWRlb1dpZHRoICsgXCJweCB4IFwiICsgdmlkZW8udmlkZW9IZWlnaHQgKyBcInB4XCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKCk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5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ZXZpY2VJZDogdmlkZW9Tb3VyY2UuaWR9fSkpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUoY29uc3RyYWludHMpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUobWVyZ2Uoe30sIGNvbnN0cmFpbnRzLCB7dmlkZW86IHtmYWNpbmdNb2RlOiBmYWNpbmd9fSkpO1xyXG59XHJcblxyXG5mdW5jdGlvbiBwaWNrQ29uc3RyYWludHModmlkZW9Db25zdHJhaW50cykge1xyXG4gICAgY29uc3QgY29uc3RyYWludHMgPSB7XHJcbiAgICAgICAgYXVkaW86IGZhbHNlLFxyXG4gICAgICAgIHZpZGVvOiBkZXByZWNhdGVkQ29uc3RyYWludHModmlkZW9Db25zdHJhaW50cylcclxuICAgIH07XHJcbiAgICByZXR1cm4gYXBwbHlDYW1lcmFGYWNpbmcoY29uc3RyYWludHMudmlkZW8uZmFjaW5nTW9kZSwgY29uc3RyYWludHMpO1xyXG59XHJcblxyXG5leHBvcnQgZGVmYXVsdCB7XHJcbiAgICByZXF1ZXN0OiBmdW5jdGlvbih2aWRlbywgdmlkZW9Db25zdHJhaW50cykge1xyXG4gICAgICAgIHJldHVybiBwaWNrQ29uc3RyYWludHModmlkZW9Db25zdHJhaW50cylcclxuICAgICAgICAgICAgLnRoZW4oaW5pdENhbWVyYS5iaW5kKG51bGwsIHZpZGVvKSk7XHJcbiAgICB9LFxyXG4gICAgcmVsZWFzZTogZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgdmFyIHRyYWNrcyA9IHN0cmVhbVJlZiAmJiBzdHJlYW1SZWYuZ2V0VmlkZW9UcmFja3MoKTtcclxuICAgICAgICBpZiAodHJhY2tzICYmIHRyYWNrcy5sZW5ndGgpIHtcclxuICAgICAgICAgICAgdHJhY2tzWzBdLnN0b3AoKTtcclxuICAgICAgICB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AgIGh0bWxJbWFnZXNBcnJheS5ub3RMb2FkZWQucHVzaChpbWFnZSk7XHJcbiAgICB9O1xyXG4gICAgaHRtbEltYWdlc0FycmF5LmxvYWRlZCA9IGZ1bmN0aW9uKGxvYWRlZEltZykge1xyXG4gICAgICAgIHZhciBub3Rsb2FkZWRJbWdzID0gaHRtbEltYWdlc0FycmF5Lm5vdExvYWRlZDtcclxuICAgICAgICBmb3IgKHZhciB4ID0gMDsgeCA8IG5vdGxvYWRlZEltZ3MubGVuZ3RoOyB4KyspIHtcclxuICAgICAgICAgICAgaWYgKG5vdGxvYWRlZEltZ3NbeF0gPT09IGxvYWRlZEltZykge1xyXG4gICAgICAgICAgICAgICAgbm90bG9hZGVkSW1ncy5zcGxpY2UoeCwgMSk7XHJcbiAgICAgICAgICAgICAgICBmb3IgKHZhciB5ID0gMDsgeSA8IGh0bWxJbWFnZXNTcmNBcnJheS5sZW5ndGg7IHkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBpbWdOYW1lID0gaHRtbEltYWdlc1NyY0FycmF5W3ldLnN1YnN0cihodG1sSW1hZ2VzU3JjQXJyYXlbeV0ubGFzdEluZGV4T2YoXCIvXCIpKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAobG9hZGVkSW1nLnNyYy5sYXN0SW5kZXhPZihpbWdOYW1lKSAhPT0gLTEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbEltYWdlc0FycmF5W3ldID0gbG9hZGVkSW1nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAobm90bG9hZGVkSW1ncy5sZW5ndGggPT09IDApIHtcclxuICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCkge1xyXG4gICAgICAgICAgIC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VvLnNldEF0dHJpYnV0ZShuYW1lLCB2YWx1ZSk7XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQucGF1c2UgPSBmdW5jdGlvbigpIHtcclxuICAgICAgICB2aWRlby5wYXVzZSgpO1xyXG4gICAgfTtcclxuXHJcbiAgICB0aGF0LnBsYXkgPSBmdW5jdGlvbigpIHtcclxuICAgICAgICB2aWRlby5wbGF5KCk7XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQuc2V0Q3VycmVudFRpbWUgPSBmdW5jdGlvbih0aW1lKSB7XHJcbiAgICAgICAgaWYgKF9jb25maWcudHlwZSAhPT0gXCJMaXZlU3RyZWFtXCIpIHtcclxuICAgICAgICAgICAgdmlkZW8uY3VycmVudFRpbWUgPSB0aW1lO1xyXG4gICAgICAgIH1cclxuICAgIH07XHJcblxyXG4gICAgdGhhdC5hZGRFdmVudExpc3RlbmVyID0gZnVuY3Rpb24oZXZlbnQsIGYsIGJvb2wpIHtcclxuICAgICAgICBpZiAoX2V2ZW50TmFtZXMuaW5kZXhPZihldmVudCkgIT09IC0xKSB7XHJcbiAgICAgICAgICAgIGlmICghX2V2ZW50SGFuZGxlcnNbZXZlbnRdKSB7XHJcbiAgICAgICAgICAgICAgICBfZXZlbnRIYW5kbGVyc1tldmVudF0gPSBbXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBfZXZlbnRIYW5kbGVyc1tldmVudF0ucHVzaChmKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB2aWRlby5hZGRFdmVudExpc3RlbmVyKGV2ZW50LCBmLCBib29sKTtcclxuICAgICAgICB9XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQuY2xlYXJFdmVudEhhbmRsZXJzID0gZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgX2V2ZW50TmFtZXMuZm9yRWFjaChmdW5jdGlvbihldmVudE5hbWUpIHtcclxuICAgICAgICAgICAgdmFyIGhhbmRsZXJzID0gX2V2ZW50SGFuZGxlcnNbZXZlbnROYW1lXTtcclxuICAgICAgICAgICAgaWYgKGhhbmRsZXJzICYmIGhhbmRsZXJzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgIGhhbmRsZXJzLmZvckVhY2goZnVuY3Rpb24oaGFuZGxlcikge1xyXG4gICAgICAgICAgICAgICAgICAgIHZpZGVvLnJlbW92ZUV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCBoYW5kbGVyKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQudHJpZ2dlciA9IGZ1bmN0aW9uKGV2ZW50TmFtZSwgYXJncykge1xyXG4gICAgICAgIHZhciBqLFxyXG4gICAgICAgICAgICBoYW5kbGVycyA9IF9ldmVudEhhbmRsZXJzW2V2ZW50TmFtZV07XHJcblxyXG4gICAgICAgIGlmIChldmVudE5hbWUgPT09ICdjYW5yZWNvcmQnKSB7XHJcbiAgICAgICAgICAgIGluaXRTaXplKCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChoYW5kbGVycyAmJiBoYW5kbGVycy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgaGFuZGxlcnMubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgIGhhbmRsZXJzW2pdLmFwcGx5KHRoYXQsIGFyZ3MpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxuXHJcbiAgICB0aGF0LnNldFRvcFJpZ2h0ID0gZnVuY3Rpb24odG9wUmlnaHQpIHtcclxuICAgICAgICBfdG9wUmlnaHQueCA9IHRvcFJpZ2h0Lng7XHJcbiAgICAgICAgX3RvcFJpZ2h0LnkgPSB0b3BSaWdodC55O1xyXG4gICAgfTtcclxuXHJcbiAgICB0aGF0LmdldFRvcFJpZ2h0ID0gZnVuY3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KCkge1xyXG4gICAgICAgIHJldHVybiBfdG9wUmlnaHQ7XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQuc2V0Q2FudmFzU2l6ZSA9IGZ1bmN0aW9uKGNhbnZhc1NpemUpIHtcclxuICAgICAgICBfY2FudmFzU2l6ZS54ID0gY2FudmFzU2l6ZS54O1xyXG4gICAgICAgIF9jYW52YXNTaXplLnkgPSBjYW52YXNTaXplLnk7XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQuZ2V0Q2FudmFzU2l6ZSA9IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgIHJldHVybiBfY2FudmFzU2l6ZTtcclxuICAgIH07XHJcblxyXG4gICAgdGhhdC5nZXRGcmFtZSA9IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgIHZhciBmcmFtZTtcclxuXHJcbiAgICAgICAgaWYgKCFsb2FkZWQpe1xyXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKCFwYXVzZWQpIHtcclxuICAgICAgICAgICAgZnJhbWUgPSBpbWdBcnJheVtmcmFtZUlkeF07XHJcbiAgICAgICAgICAgIGlmIChmcmFtZUlkeCA8IChzaXplIC0gMSkpIHtcclxuICAgICAgICAgICAgICAgIGZyYW1lSWR4Kys7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGVuZGVkID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICBwdWJsaXNoRXZlbnQoXCJlbmRlZFwiLCBbXSk7XHJcbiAgICAgICAgICAgICAgICB9LCAwKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gZnJhbWU7XHJcbiAgICB9O1xyXG5cclxuICAgIHJldHVybiB0aGF0O1xyXG59O1xyXG5cclxuZXhwb3J0IGRlZmF1b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WlueCA9IHBhdGNoLmJveFtqXVswXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAocGF0Y2guYm94W2pdWzBdID4gbWF4eCkge1xyXG4gICAgICAgICAgICAgICAgbWF4eCA9IHBhdGNoLmJveFtqXVswXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAocGF0Y2guYm94W2pdWzFdIDwgbWlueSkge1xyXG4gICAgICAgICAgICAgICAgbWlueSA9IHBhdGNoLmJveFtqXVsxXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAocGF0Y2guYm94W2pdWzFdID4gbWF4eSkge1xyXG4gICAgICAgICAgICAgICAgbWF4eSA9IHBhdGNoLmJveFtqXVsxXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBib3ggPSBbW21pbngsIG1pbnldLCBbbWF4eCwgbWlueV0sIFttYXh4LCBtYXh5XSwgW21pbngsIG1heHldXTtcclxuXHJcbiAgICBpZiAoRU5WLmRldmVsb3BtZW50ICYmIF9jb25maWcuZGVidWcuYm94RnJvbVBhdGNoZXMuc2hvd1RyYW5zZm9ybWVkQm94KSB7XHJcbiAgICAgICAgSW1hZ2VEZWJ1Zy5kcmF3UGF0aChib3gsIHt4OiAwLCB5OiAxfSwgX2NhbnZhc0NvbnRhaW5lci5jdHguYmluYXJ5LCB7Y29sb3I6ICcjZmYwMDAwJywgbGluZVdpZHRoOiAyfSk7XHJcbiAgICB9XHJcblxyXG4gICAgc2NhbGUgPSBfY29uZmlnLmhhbGZTYW1wbGUgPyAyIDogMTtcclxuICAgIC8vIHJldmVyc2Ugcm90YXRpb247XHJcbiAgICB0cmFuc01hdCA9IG1hdDIuaW52ZXJ0KHRyYW5zTWF0LCB0cmFuc01hdCk7XHJcbiAgICBmb3IgKCBqID0gMDsgaiA8IDQ7IGorKykge1xyXG4gICAgICAgIHZlYzIudHJhbnNmb3JtTWF0Mihib3hbal0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gICAgeSxcclxuICAgICAgICBtb21lbnRzLFxyXG4gICAgICAgIHBhdGNoZXNGb3VuZCA9IFtdLFxyXG4gICAgICAgIHJhc3Rlcml6ZXIsXHJcbiAgICAgICAgcmFzdGVyUmVzdWx0LFxyXG4gICAgICAgIHBhdGNoO1xyXG4gICAgZm9yIChpID0gMDsgaSA8IF9udW1QYXRjaGVzLng7IGkrKykge1xyXG4gICAgICAgIGZvciAoaiA9IDA7IGogPCBfbnVtUGF0Y2hlcy55OyBqKyspIHtcclxuICAgICAgICAgICAgeCA9IF9zdWJJbWFnZVdyYXBwZXIuc2l6ZS54ICogaTtcclxuICAgICAgICAgICAgeSA9IF9zdWJJbWFnZVdyYXBwZXIuc2l6ZS55ICogajtcclxuXHJcbiAgICAgICAgICAgIC8vIHNlcGVyYXRlIHBhcnRzXHJcbiAgICAgICAgICAgIHNrZWxldG9uaXplKHgsIHkpO1xyXG5cclxuICAgICAgICAgICAgLy8gUmFzdGVyaXplLCBmaW5kIGluZGl2aWR1YWwgYmFyc1xyXG4gICAgICAgICAgICBfc2tlbEltYWdlV3JhcHBlci56ZXJvQm9yZGVyKCk7XHJcbiAgICAgICAgICAgIEFycmF5SGVscGVyLmluaXQoX2xhYmVsSW1hZ2VXcmFwcGVyLmRhdGEsIDApO1xyXG4gICAgICAgICAgICByYXN0ZXJpemVyID0gUmFzdGVyaXplci5jcmVhdGUoX3NrZWxJbWFnZVdyYXBwZXIsIF9sYWJlbEltYWdlV3JhcHBlcik7XHJcbiAgICAgICAgICAgIHJhc3RlclJlc3VsdCA9IHJhc3Rlcml6ZXIucmFzdGVyaXplKDApO1xyXG5cclxuICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCAmJiBfY29uZmlnLmRlYnVnLnNob3dMYWJlbHMpIHtcclxuICAgICAgICAgICAgICAgIF9sYWJlbEltYWdlV3JhcHBlci5vdmVybGF5KF9jYW52YXNDb250YWluZXIuZG9tLmJpbmFyeSwgTWF0aC5mbG9vcigzNjA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G9wTGFiZWxzID0gbGFiZWxIaXN0LmZpbHRlcihmdW5jdGlvbihlbCkge1xyXG4gICAgICAgIHJldHVybiBlbC52YWwgPj0gNTtcclxuICAgIH0pO1xyXG5cclxuICAgIHJldHVybiB0b3BMYWJlbHM7XHJcbn1cclxuXHJcbi8qKlxyXG4gKlxyXG4gKi9cclxuZnVuY3Rpb24gZmluZEJveGVzKHRvcExhYmVscywgbWF4TGFiZWwpIHtcclxuICAgIHZhciBpLFxyXG4gICAgICAgIGosXHJcbiAgICAgICAgc3VtLFxyXG4gICAgICAgIHBhdGNoZXMgPSBbXSxcclxuICAgICAgICBwYXRjaCxcclxuICAgICAgICBib3gsXHJcbiAgICAgICAgYm94ZXMgPSBbXSxcclxuICAgICAgICBoc3YgPSBbMCwgMSwgMV0sXHJcbiAgICAgICAgcmdiID0gWzAsIDAsIDBdO1xyXG5cclxuICAgIGZvciAoIGkgPSAwOyBpIDwgdG9wTGFiZWxzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgc3VtID0gX3BhdGNoTGFiZWxHcmlkLmRhdGEubGVuZ3RoO1xyXG4gICAgICAgIHBhdGNoZXMubGVuZ3RoID0gMDtcclxuICAgICAgICB3aGlsZSAoc3VtLS0pIHtcclxuICAgICAgICAgICAgaWYgKF9wYXRjaExhYmVsR3JpZC5kYXRhW3N1bV0gPT09IHRvcExhYmVsc1tpXS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgcGF0Y2ggPSBfaW1hZ2VUb1BhdGNoR3JpZC5kYXRhW3N1bV07XHJcbiAgICAgICAgICAgICAgICBwYXRjaGVzLnB1c2gocGF0Y2gpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGJveCA9IGJveEZyb21QYXRjaGVzKHBhdGNoZXMpO1xyXG4gICAgICAgIGlmIChib3gpIHtcclxuICAgICAgICAgICAgYm94ZXMucHVzaChib3gpO1xyXG5cclxuICAgICAgICAgICAgLy8gZHJhdyBwYXRjaC1sYWJlbHMgaWYgcmVxdWVzdGVkXHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQgJiYgX2NvbmZpZy5kZWJ1Zy5zaG93UmVtYWluaW5nUGF0Y2hMYWJlbHMpIHtcclxuICAgICAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgcGF0Y2hlcy5sZW5ndGg7IGorKykge1xyXG4gICAgICAgICAgICAgICAgICAgIHBhdGNoID0gcGF0Y2hlc1tqXTtcclxuICAgICAgICAgICAgICAgICAgICBoc3ZbMF0gPSAodG9wTGFiZWxzW2ldLmxhYmVsIC8gKG1heExhYmVsICsgMSkpICogMzYwO1xyXG4gICAgICAgICAgICAgICAgICAgIGhzdjJyZ2IoaHN2LCByZ2IpO1xyXG4gICAgICAgICAgICAgICAgICAgIEltYWdlRGVidWcuZHJhd1JlY3QocGF0Y2gucG9zLCBfc3ViSW1hZ2VXcmFwcGVyLnNpemUsIF9jYW52YXNDb250YWluZXIuY3R4LmJpbmFyeSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge2NvbG9yOiBcInJnYihcIiArIHJnYi5qb2luKFwiLFwiKSArIFwiKVwiLCBsaW5lV2lkdGg6IDJ9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBib3hlcztcclxufVxyXG5cclxuLyoqXHJcbiAqIEZpbmQgc2ltaWxhciBtb21lbnRzICh2aWEgY2x1c3RlcilcclxuICogQHBhcmFtIHtPYmplY3R9IG1vbWVudHNcclxuICovXHJcbmZ1bmN0aW9uIHNpbWlsYXJNb21lbnRzKG1vbWVudHMpIHtcclxuICAgIHZhciBjbHVzdGVycyA9IGNsdXN0ZXIobW9tZW50cywgMC45MCk7XHJcbiAgICB2YXIgdG9wQ2x1c3RlciA9IHRvcEdlbmVyaWMoY2x1c3RlcnMsIDEsIGZ1bmN0aW9uKGUpIHtcclxuICAgICAgICByZX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RzID0gc2ltaWxhck1vbWVudHMoZWxpZ2libGVNb21lbnRzKTtcclxuICAgICAgICAgICAgYXZnID0gMDtcclxuICAgICAgICAgICAgLy8gZGV0ZXJtaW5lIHRoZSBzaW1pbGFyaXR5IG9mIHRoZSBtb21lbnRzXHJcbiAgICAgICAgICAgIGZvciAoIGsgPSAwOyBrIDwgbWF0Y2hpbmdNb21lbnRzLmxlbmd0aDsgaysrKSB7XHJcbiAgICAgICAgICAgICAgICBhdmcgKz0gbWF0Y2hpbmdNb21lbnRzW2tdLnJhZDtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gT25seSB0d28gb2YgdGhlIG1vbWVudHMgYXJlIGFsbG93ZWQgbm90IHRvIGZpdCBpbnRvIHRoZSBlcXVhdGlvblxyXG4gICAgICAgICAgICAvLyBhZGQgdGhlIHBhdGNoIHRvIHRoZSBzZXRcclxuICAgICAgICAgICAgaWYgKG1hdGNoaW5nTW9tZW50cy5sZW5ndGggPiAxXHJcbiAgICAgICAgICAgICAgICAgICAgJiYgbWF0Y2hpbmdNb21lbnRzLmxlbmd0aCA+PSAoZWxpZ2libGVNb21lbnRzLmxlbmd0aCAvIDQpICogM1xyXG4gICAgICAgICAgICAgICAgICAgICYmIG1hdGNoaW5nTW9tZW50cy5sZW5ndGggPiBtb21lbnRzLmxlbmd0aCAvIDQpIHtcclxuICAgICAgICAgICAgICAgIGF2ZyAvPSBtYXRjaGluZ01vbWVudHMubGVuZ3RoO1xyXG4gICAgICAgICAgICAgICAgcGF0Y2ggPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaW5kZXg6IHBhdGNoUG9zWzFdICogX251bVBhdGNoZXMueCArIHBhdGNoUG9zWzBdLFxyXG4gICAgICAgICAgICAgICAgICAgIHBvczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB4OiB4LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB5OiB5XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBib3g6IFtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmVjMi5jbG9uZShbeCwgeV0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB2ZWMyLmNsb25lKFt4ICsgX3N1YkltYWdlV3JhcHBlci5zaXplLngsIHldKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmVjMi5jbG9uZShbeCArIF9zdWJJbWFnZVdyYXBwZXIuc2l6ZS54LCB5ICsgX3N1YkltYWdlV3JhcHBlci5zaXplLnldKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmVjMi5jbG9uZShbeCwgeSArIF9zdWJJbWFnZVdyYXBwZXIuc2l6ZS55XSlcclxuICAgICAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICAgICAgICAgIG1vbWVudHM6IG1hdGNoaW5nTW9tZW50cyxcclxuICAgICAgICAgICAgICAgICAgICByYWQ6IGF2ZyxcclxuICAgICAgICAgICAgICAgICAgICB2ZWM6IHZlYzIuY2xvbmUoW01hdGguY29zKGF2ZyksIE1hdGguc2luKGF2ZyldKVxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgIHBhdGNoZXNGb3VuZC5wdXNoKHBhdGNoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBwYXRjaGVzRm91bmQ7XHJcbn1cclxuXHJcbi8qKlxyXG4gKiBmaW5kcyBwYXRjaGVzIHdoaWNoIGFyZSBjb25uZWN0ZWQgYW5kIHNoYXJlIHRoZSBzYW1lIG9yaWVudGF0aW9uXHJcbiAqIEBwYXJhbSB7T2JqZWN0fSBwYXRjaGVzRm91bmRcclxuICovXHJcbmZ1bmN0aW9uIHJhc3Rlcml6ZUFuZ3VsYXJTaW1pbGFyaXR5KHBhdGNoZXNGb3VuZCkge1xyXG4gICAgdmFyIGxhYmVsID0gMCxcclxuICAgICAgICB0aHJlc2hvbGQgPSAwLjk1LFxyXG4gICAgICAgIGN1cnJJZHggPSAwLFxyXG4gICAgICAgIGosXHJcbiAgICAgICAgcGF0Y2gsXHJcbiAgICAgICAgaHN2ID0gWzAsIDEsIDFdLFxyXG4gICAgICAgIHJnYiA9IFswLCAwLCAwXTtcclxuXHJcbiAgICBmdW5jdGlvbiBub3RZZXRQcm9jZXNzZWQoKSB7XHJcbiAgICAgICAgdmFyIGk7XHJcbiAgICAgICAgZm9yICggaSA9IDA7IGkgPCBfcGF0Y2hMYWJlbEdyaWQuZGF0YS5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBpZiAoX3BhdGNoTGFiZWxHcmlkLmRhdGFbaV0gPT09IDAgJiYgX3BhdGNoR3JpZC5kYXRhW2ldID09PSAxKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gaTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gX3BhdGNoTGFiZWxHcmlkLmxlbmd0aDtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiB0cmFjZShjdXJyZW50SWR4KSB7XHJcbiAgICAgICAgdmFyIHgsXHJcbiAgICAgICAgICAgIHksXHJcbiAgICAgICAgICAgIGN1cnJlbnRQYXRjaCxcclxuICAgICAgICAgICAgaWR4LFxyXG4gICAgICAgICAgICBkaXIsXHJcbiAgICAgICAgICAgIGN1cnJlbnQgPSB7XHJcbiAgICAgICAgICAgICAgICB4OiBjdXJyZW50SWR4ICUgX3BhdGNoTGFiZWxHcmlkLnNpemUueCxcclxuICAgICAgICAgICAgICAgIHk6IChjdXJyZW50SWR4IC8gX3BhdGNoTGFiZWxHcmlkLnNpemUueCkgfCAwXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNpbWlsYXJpdHk7XHJcblxyXG4gICAgICAgIGlmIChjdXJyZW50SWR4IDwgX3BhdGNoTGFiZWxHcmlkLmRhdGEubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgIGN1cnJlb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5kZXZlbG9wbWVudCAmJiBfY29uZmlnLmRlYnVnLnNob3dQYXRjaExhYmVscykge1xyXG4gICAgICAgIGZvciAoIGogPSAwOyBqIDwgX3BhdGNoTGFiZWxHcmlkLmRhdGEubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgaWYgKF9wYXRjaExhYmVsR3JpZC5kYXRhW2pdID4gMCAmJiBfcGF0Y2hMYWJlbEdyaWQuZGF0YVtqXSA8PSBsYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgcGF0Y2ggPSBfaW1hZ2VUb1BhdGNoR3JpZC5kYXRhW2pdO1xyXG4gICAgICAgICAgICAgICAgaHN2WzBdID0gKF9wYXRjaExhYmVsR3JpZC5kYXRhW2pdIC8gKGxhYmVsICsgMSkpICogMzYwO1xyXG4gICAgICAgICAgICAgICAgaHN2MnJnYihoc3YsIHJnYik7XHJcbiAgICAgICAgICAgICAgICBJbWFnZURlYnVnLmRyYXdSZWN0KHBhdGNoLnBvcywgX3N1YkltYWdlV3JhcHBlci5zaXplLCBfY2FudmFzQ29udGFpbmVyLmN0eC5iaW5hcnksXHJcbiAgICAgICAgICAgICAgICAgICAge2NvbG9yOiBcInJnYihcIiArIHJnYi5qb2luKFwiLFwiKSArIFwiKVwiLCBsaW5lV2lkdGg6IDJ9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gbGFiZWw7XHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIGluaXQ6IGZ1bmN0aW9uKGlucHV0SW1hZ2VXcmFwcGVyLCBjb25maWcpIHtcclxuICAgICAgICBfY29uZmlnID0gY29uZmlnO1xyXG4gICAgICAgIF9pbnB1dEltYWdlV3JhcHBlciA9IGlucHV0SW1hZ2VXcmFwcGVyO1xyXG5cclxuICAgICAgICBpbml0QnVmZmVycygpO1xyXG4gICAgICAgIGluaXRDYW52YXMoKTtcclxuICAgIH0sXHJcblxyXG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K1xyXG4gICAgICAgICAgICB3aWR0aCArIFwiIClhbmQgaGVpZ2h0IChcIiArIGhlaWdodCArXHJcbiAgICAgICAgICAgIFwiKSBtdXN0IGEgbXVsdGlwbGUgb2YgXCIgKyBwYXRjaFNpemUueCk7XHJcbiAgICB9XHJcbn07XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIC4vc3JjL2xvY2F0b3IvYmFyY29kZV9sb2NhdG9yLmpzXG4gKiovIiwiaW1wb3J0IFRyYWNlciBmcm9tICcuL3RyYWNlcic7XHJcblxyXG4vKipcclxuICogaHR0cDovL3d3dy5jb2RlcHJvamVjdC5jb20vVGlwcy80MDcxNzIvQ29ubmVjdGVkLUNvbXBvbmVudC1MYWJlbGluZy1hbmQtVmVjdG9yaXphdGlvblxyXG4gKi9cclxudmFyIFJhc3Rlcml6ZXIgPSB7XHJcbiAgICBjcmVhdGVDb250b3VyMkQ6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIGRpcjogbnVsbCxcclxuICAgICAgICAgICAgaW5kZXg6IG51bGwsXHJcbiAgICAgICAgICAgIGZpcnN0VmVydGV4OiBudWxsLFxyXG4gICAgICAgICAgICBpbnNpZGVDb250b3VyczogbnVsbCxcclxuICAgICAgICAgICAgbmV4dHBlZXI6IG51bGwsXHJcbiAgICAgICAgICAgIHByZXZwZWVyOiBudWxsXHJcbiAgICAgICAgfTtcclxuICAgIH0sXHJcbiAgICBDT05UT1VSX0RJUjoge1xyXG4gICAgICAgIENXX0RJUjogMCxcclxuICAgICAgICBDQ1dfRElSOiAxLFxyXG4gICAgICAgIFVOS05PV05fRElSOiAyXHJcbiAgICB9LFxyXG4gICAgRElSOiB7XHJcbiAgICAgICAgT1VUU0lERV9FREdFOiAtMzI3NjcsXHJcbiAgICAgICAgSU5TSURFX0VER0U6IC0zMjc2NlxyXG4gICAgfSxcclxuICAgIGNyZWF0ZTogZnVuY3Rpb24oaW1hZ2VXcmFwcGVyLCBsYWJlbFdyYXBwZXIpIHtcclxuICAgICAgICB2YXIgaW1hZ2VEYXRhID0gaW1hZ2VXcmFwcGVyLmRhdGEsXHJcbiAgICAgICAgICAgIGxhYmVsRGF0YSA9IGxhYmVsV3JhcHBlci5kYXRhLFxyXG4gICAgICAgICAgICB3aWR0aCA9IGltYWdlV3JhcHBlci5zaXplLngsXHJcbiAgICAgICAgICAgIGhlaWdodCA9IGltYWdlV3JhcHBlci5zaXplLnksXHJcbiAgICAgICAgICAgIHRyYWNlciA9IFRyYWNlci5jcmVhdGUoaW1hZ2VXcmFwcGVyLCBsYWJlbFdyYXBwZXIpO1xyXG5cclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICByYXN0ZXJpemU6IGZ1bmN0aW9uKGRlcHRobGFiZWwpIHtcclxuICAgICAgICAgICAgICAgIHZhciBjb2xvcixcclxuICAgICAgICAgICAgICAgICAgICBiYyxcclxuICAgICAgICAgICAgICAgICAgICBsYyxcclxuICAgICAgICAgICAgICAgICAgICBsYWJlbGluZGV4LFxyXG4gICAgICAgICAgICAgICAgICAgIGN4LFxyXG4gICAgICAgICAgICAgICAgICAgIGN5LFxyXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yTWFwID0gW10sXHJcbiAgICAgICAgICAgICAgICAgICAgdmVydGV4LFxyXG4gICAgICAgICAgICAgICAgICAgIHAsXHJcbiAgICAgICAgICAgICAgICAgICAgY2MsXHJcbiAgICAgICAgICAgICAgICAgICAgc2MsXHJcbiAgICAgICAgICAgICAgICAgICAgcG9zLFxyXG4gICAgICAgICAgICAgICAgICAgIGNvbm5lY3RlZENvdW50ID0gMCxcclxuICAgICAgICAgICAgICAgICAgICBpO1xyXG5cclxuICAgICAgICAgICAgICAgIGZvciAoIGkgPSAwOyBpIDwgNDAwOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBjb2xvck1hcFtpXSA9IDA7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgY29sb3JNYXBbMF0gPSBpbWFnZURhdGFbMF07XHJcbiAgICAgICAgICAgICAgICBjYyA9IG51bGw7XHJcbiAgICAgICAgICAgICAgICBmb3IgKCBjeSA9IDE7IGN5IDwgaGVpZ2h0IC0gMTsgY3krKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsaW5kZXggPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGJjID0gY29sb3JNYXBbMF07XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yICggY3ggPSAxOyBjeCA8IHdpZHRoIC0gMTsgY3grKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBwb3MgPSBjeSAqIHdpZHRoICsgY3g7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYWJlbERhdGFbcG9zXSA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3IgPSBpbWFnZURhdGFbcG9zXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb2xvciAhPT0gYmMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGFiZWxpbmRleCA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYyA9IGNvbm5lY3RlZENvdW50ICsgMTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3JNYXBbbGNdID0gY29sb3I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJjID0gY29sb3I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZlcnRleCA9IHRyYWNlci5jb250b3VyVHJhY2luZyhjeSwgY3gsIGxjLCBjb2xvciwgUmFzdGVyaXplci5ESVIuT1VUU0lERV9FREdFKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZlcnRleCAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29ubmVjdGVkQ291bnQrKztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsaW5kZXggPSBsYztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBSYXN0ZXJpemVyLmNyZWF0ZUNvbnRvdXIyRCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5kaXIgPSBSYXN0ZXJpemVyLkNPTlRPVVJfRElSLkNXX0RJUjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuaW5kZXggPSBsYWJlbGluZGV4O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5maXJzdFZlcnRleCA9IHZlcnRleDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAubmV4dHBlZXIgPSBjYztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuaW5zaWRlQ29udG91cnMgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNjICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2MucHJldnBlZXIgPSBwO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2MgPSBwO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmVydGV4ID0gdHJhY2VyXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuY29udG91clRyYWNpbmcoY3ksIGN4LCBSYXN0ZXJpemVyLkRJUi5JTlNJREVfRURHRSwgY29sb3IsIGxhYmVsaW5kZXgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodmVydGV4ICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID0gUmFzdGVyaXplci5jcmVhdGVDb250b3VyMkQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuZmlyc3RWZXJ0ZXggPSB2ZXJ0ZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmluc2lkZUNvbnRvdXJzID0gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZXB0aGxhYmVsID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5kaXIgPSBSYXN0ZXJpemVyLkNPTlRPVVJfRElSLkNDV19ESVI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuZGlyID0gUmFzdGVyaXplci5DT05UT1VSX0RJUi5DV19ESVI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmluZGV4ID0gZGVwdGhsYWJlbDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjID0gY2M7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoKHNjICE9PSBudWxsKSAmJiBzYy5pbmRleCAhPT0gbGFiZWxpbmRleCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjID0gc2MubmV4dHBlZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2MgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLm5leHRwZWVyID0gc2MuaW5zaWRlQ29udG91cnM7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjLmluc2lkZUNvbnRvdXJzICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjLmluc2lkZUNvbnRvdXJzLnByZXZwZWVyID0gcDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2MuaW5zaWRlQ29udG91cnMgPSBwO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbERhdGFbcG9zXSA9IGxhYmVsaW5kZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobGFiZWxEYXRhW3Bvc10gPT09IFJhc3Rlcml6ZXIuRElSLk9VVFNJREVfRURHRVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGxhYmVsRGF0YVtwb3NdID09PSBSYXN0ZXJpemVyLkRJUi5JTlNJREVfRURHRSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxpbmRleCA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGFiZWxEYXRhW3Bvc10gPT09IFJhc3Rlcml6ZXIuRElSLklOU0lERV9FREdFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmMgPSBpbWFnZURhdGFbcG9zXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmMgPSBjb2xvck1hcFswXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsaW5kZXggPSBsYWJlbERhdGFbcG9zXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJjID0gY29sb3JNYXBbbGFiZWxpbmRleF07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzYyA9IGNjO1xyXG4gICAgICAgICAgICAgICAgd2hpbGUgKHNjICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2MuaW5kZXggPSBkZXB0aGxhYmVsO1xyXG4gICAgICAgICAgICAgICAgICAgIHNjID0gc2MubmV4dHBlZXI7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGNjOiBjYyxcclxuICAgICAgICAgICAgICAgICAgICBjb3VudDogY29ubmVjdGVkQ291bnRcclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGRlYnVnOiB7XHJcbiAgICAgICAgICAgICAgICBkcmF3Q29udG91cjogZnVuY3Rpb24oY2FudmFzLCBmaXJzdENvbnRvdXIpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgY3R4ID0gY2FudmFzLmdldENvbnRleHQoXCIyZFwiKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcHEgPSBmaXJzdENvbnRvdXIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlxLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBxLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBjdHguc3Ryb2tlU3R5bGUgPSBcInJlZFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIGN0eC5maWxsU3R5bGUgPSBcInJlZFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIGN0eC5saW5lV2lkdGggPSAxO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAocHEgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaXEgPSBwcS5pbnNpZGVDb250b3VycztcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpcSA9IG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICB3aGlsZSAocHEgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlxICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gaXE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpcSA9IGlxLm5leHRwZWVyO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IHBxO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHEgPSBwcS5uZXh0cGVlcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcSAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlxID0gcHEuaW5zaWRlQ29udG91cnM7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlxID0gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChxLmRpcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFJhc3Rlcml6ZXIuQ09OVE9VUl9ESVIuQ1dfRElSOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R4LnN0cm9rZVN0eWxlID0gXCJyZWRcIjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFJhc3Rlcml6ZXIuQ09OVE9VUl9ESVIuQ0NXX0RJUjpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5zdHJva2VTdHlsZSA9IFwiYmx1ZVwiO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgUmFzdGVyaXplci5DT05UT1VSX0RJUi5VTktOT1dOX0RJUjpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5zdHJva2VTdHlsZSA9IFwiZ3JlZW5cIjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwID0gcS5maXJzdFZlcnRleDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY3R4LmJlZ2luUGF0aCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjdHgubW92ZVRvKHAueCwgcC55KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IHAubmV4dDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5saW5lVG8ocC54LCBwLnkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlIChwICE9PSBxLmZpcnN0VmVydGV4KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY3R4LnN0cm9rZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH07XHJcbiAgICB9XHJcbn07XHJcblxyXG5leHBvcnQgZGVmYXVsdCBSYXN0ZXJpemVyO1xyXG5cblxuXG4vKiogV0VCUEFDSyBGT09URVIgKipcbiAqKiAuL3NyYy9sb2NhdG9yL3Jhc3Rlcml6ZXIuanNcbiAqKi8iLCIvKiBAcHJlc2VydmUgQVNNIEJFR0lOICovXHJcbi8qIGVzbGludC1kaXNhYmxlIGVxZXFlcSovXHJcbmZ1bmN0aW9uIFNrZWxldG9uaXplcihzdGRsaWIsIGZvcmVpZ24sIGJ1ZmZlcikge1xyXG4gICAgXCJ1c2UgYXNtXCI7XHJcblxyXG4gICAgdmFyIGltYWdlcyA9IG5ldyBzdGRsaWIuVWludDhBcnJheShidWZmZXIpLFxyXG4gICAgICAgIHNpemUgPSBmb3JlaWduLnNpemUgfCAwLFxyXG4gICAgICAgIGltdWwgPSBzdGRsaWIuTWF0aC5pbXVsO1xyXG5cclxuICAgIGZ1bmN0aW9uIGVyb2RlKGluSW1hZ2VQdHIsIG91dEltYWdlUHRyKSB7XHJcbiAgICAgICAgaW5JbWFnZVB0ciA9IGluSW1hZ2VQdHIgfCAwO1xyXG4gICAgICAgIG91dEltYWdlUHRyID0gb3V0SW1hZ2VQdHIgfCAwO1xyXG5cclxuICAgICAgICB2YXIgdiA9IDAsXHJcbiAgICAgICAgICAgIHUgPSAwLFxyXG4gICAgICAgICAgICBzdW0gPSAwLFxyXG4gICAgICAgICAgICB5U3RhcnQxID0gMCxcclxuICAgICAgICAgICAgeVN0YXJ0MiA9IDAsXHJcbiAgICAgICAgICAgIHhTdGFydDEgPSAwLFxyXG4gICAgICAgICAgICB4U3RhcnQyID0gMCxcclxuICAgICAgICAgICAgb2Zmc2V0ID0gMDtcclxuXHJcbiAgICAgICAgZm9yICggdiA9IDE7ICh2IHwgMCkgPCAoKHNpemUgLSAxKSB8IDApOyB2ID0gKHYgKyAxKSB8IDApIHtcclxuICAgICAgICAgICAgb2Zmc2V0ID0gKG9mZnNldCArIHNpemUpIHwgMDtcclxuICAgICAgICAgICAgZm9yICggdSA9IDE7ICh1IHwgMCkgPCAoKHNpemUgLSAxKSB8IDApOyB1ID0gKHUgKyAxKSB8IDApIHtcclxuICAgICAgICAgICAgICAgIHlTdGFydDEgPSAob2Zmc2V0IC0gc2l6ZSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgeVN0YXJ0MiA9IChvZmZzZXQgKyBzaXplKSB8IDA7XHJcbiAgICAgICAgICAgICAgICB4U3RhcnQxID0gKHUgLSAxKSB8IDA7XHJcbiAgICAgICAgICAgICAgICB4U3RhcnQyID0gKHUgKyAxKSB8IDA7XHJcbiAgICAgICAgICAgICAgICBzdW0gPSAoKGltYWdlc1soaW5JbWFnZVB0ciArIHlTdGFydDEgKyB4U3RhcnQxKSB8IDBdIHwgMClcclxuICAgICAgICAgICAgICAgICAgICArIChpbWFnZXNbKGluSW1hZ2VQdHIgKyB5U3RhcnQxICsgeFN0YXJ0MikgfCAwXSB8IDApXHJcbiAgICAgICAgICAgICAgICAgICAgKyAoaW1hZ2VzWyhpbkltYWdlUHRyICsgb2Zmc2V0ICsgdSkgfCAwXSB8IDApXHJcbiAgICAgICAgICAgICAgICAgICAgKyAoaW1hZ2VzWyhpbkltYWdlUHRyICsgeVN0YXJ0MiAr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bGVuZ3RoID0gKGxlbmd0aCAtIDEpIHwgMDtcclxuICAgICAgICAgICAgc3VtID0gKChzdW0gfCAwKSArIChpbWFnZXNbKGltYWdlUHRyICsgbGVuZ3RoKSB8IDBdIHwgMCkpIHwgMDtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiAoc3VtIHwgMCk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gaW5pdChpbWFnZVB0ciwgdmFsdWUpIHtcclxuICAgICAgICBpbWFnZVB0ciA9IGltYWdlUHRyIHwgMDtcclxuICAgICAgICB2YWx1ZSA9IHZhbHVlIHwgMDtcclxuXHJcbiAgICAgICAgdmFyIGxlbmd0aCA9IDA7XHJcblxyXG4gICAgICAgIGxlbmd0aCA9IGltdWwoc2l6ZSwgc2l6ZSkgfCAwO1xyXG5cclxuICAgICAgICB3aGlsZSAoKGxlbmd0aCB8IDApID4gMCkge1xyXG4gICAgICAgICAgICBsZW5ndGggPSAobGVuZ3RoIC0gMSkgfCAwO1xyXG4gICAgICAgICAgICBpbWFnZXNbKGltYWdlUHRyICsgbGVuZ3RoKSB8IDBdID0gdmFsdWU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGRpbGF0ZShpbkltYWdlUHRyLCBvdXRJbWFnZVB0cikge1xyXG4gICAgICAgIGluSW1hZ2VQdHIgPSBpbkltYWdlUHRyIHwgMDtcclxuICAgICAgICBvdXRJbWFnZVB0ciA9IG91dEltYWdlUHRyIHwgMDtcclxuXHJcbiAgICAgICAgdmFyIHYgPSAwLFxyXG4gICAgICAgICAgICB1ID0gMCxcclxuICAgICAgICAgICAgc3VtID0gMCxcclxuICAgICAgICAgICAgeVN0YXJ0MSA9IDAsXHJcbiAgICAgICAgICAgIHlTdGFydDIgPSAwLFxyXG4gICAgICAgICAgICB4U3RhcnQxID0gMCxcclxuICAgICAgICAgICAgeFN0YXJ0MiA9IDAsXHJcbiAgICAgICAgICAgIG9mZnNldCA9IDA7XHJcblxyXG4gICAgICAgIGZvciAoIHYgPSAxOyAodiB8IDApIDwgKChzaXplIC0gMSkgfCAwKTsgdiA9ICh2ICsgMSkgfCAwKSB7XHJcbiAgICAgICAgICAgIG9mZnNldCA9IChvZmZzZXQgKyBzaXplKSB8IDA7XHJcbiAgICAgICAgICAgIGZvciAoIHUgPSAxOyAodSB8IDApIDwgKChzaXplIC0gMSkgfCAwKTsgdSA9ICh1ICsgMSkgfCAwKSB7XHJcbiAgICAgICAgICAgICAgICB5U3RhcnQxID0gKG9mZnNldCAtIHNpemUpIHwgMDtcclxuICAgICAgICAgICAgICAgIHlTdGFydDIgPSAob2Zmc2V0ICsgc2l6ZSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgeFN0YXJ0MSA9ICh1IC0gMSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgeFN0YXJ0MiA9ICh1ICsgMSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgc3VtID0gKChpbWFnZXNbKGluSW1hZ2VQdHIgKyB5U3RhcnQxICsgeFN0YXJ0MSkgfCAwXSB8IDApXHJcbiAgICAgICAgICAgICAgICAgICAgKyAoaW1hZ2VzWyhpbkltYWdlUHRyICsgeVN0YXJ0MSArIHhTdGFydDIpIHwgMF0gfCAwKVxyXG4gICAgICAgICAgICAgICAgICAgICsgKGltYWdlc1soaW5JbWFnZVB0ciArIG9mZnNldCArIHUpIHwgMF0gfCAwKVxyXG4gICAgICAgICAgICAgICAgICAgICsgKGltYWdlc1soaW5JbWFnZVB0ciArIHlTdGFydDIgKyB4U3RhcnQxKSB8IDBdIHwgMClcclxuICAgICAgICAgICAgICAgICAgICArIChpbWFnZXNbKGluSW1hZ2VQdHIgKyB5U3RhcnQyICsgeFN0YXJ0MikgfCAwXSB8IDApKSB8IDA7XHJcbiAgICAgICAgICAgICAgICBpZiAoKHN1bSB8IDApID4gKDAgfCAwKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGltYWdlc1sob3V0SW1h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cnJvdzogeyBzaXplOiAwLCBjb3VudHM6IDAsIG1pbjogMCwgbWF4OiBOdW1iZXIuTUFYX1ZBTFVFfSxcclxuICAgICAgICAgICAgICAgIHdpZGU6IHtzaXplOiAwLCBjb3VudHM6IDAsIG1pbjogMCwgbWF4OiBOdW1iZXIuTUFYX1ZBTFVFfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBiYXI6IHtcclxuICAgICAgICAgICAgICAgIG5hcnJvdzogeyBzaXplOiAwLCBjb3VudHM6IDAsIG1pbjogMCwgbWF4OiBOdW1iZXIuTUFYX1ZBTFVFfSxcclxuICAgICAgICAgICAgICAgIHdpZGU6IHsgc2l6ZTogMCwgY291bnRzOiAwLCBtaW46IDAsIG1heDogTnVtYmVyLk1BWF9WQUxVRX1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAga2luZCxcclxuICAgICAgICBjYXQsXHJcbiAgICAgICAgaSxcclxuICAgICAgICBqLFxyXG4gICAgICAgIHBvcyA9IHN0YXJ0Q291bnRlcixcclxuICAgICAgICBwYXR0ZXJuO1xyXG5cclxuICAgIGZvciAoaSA9IDA7IGkgPCByZXN1bHQubGVuZ3RoOyBpKyspe1xyXG4gICAgICAgIHBhdHRlcm4gPSBzZWxmLl9jaGFyVG9QYXR0ZXJuKHJlc3VsdFtpXSk7XHJcbiAgICAgICAgZm9yIChqID0gNjsgaiA+PSAwOyBqLS0pIHtcclxuICAgICAgICAgICAga2luZCA9IChqICYgMSkgPT09IDIgPyBjYXRlZ29yaXphdGlvbi5iYXIgOiBjYXRlZ29yaXphdGlvbi5zcGFjZTtcclxuICAgICAgICAgICAgY2F0ID0gKHBhdHRlcm4gJiAxKSA9PT0gMSA/IGtpbmQud2lkZSA6IGtpbmQubmFycm93O1xyXG4gICAgICAgICAgICBjYXQuc2l6ZSArPSBzZWxmLl9jb3VudGVyc1twb3MgKyBqXTtcclxuICAgICAgICAgICAgY2F0LmNvdW50cysrO1xyXG4gICAgICAgICAgICBwYXR0ZXJuID4+PSAxO1xyXG4gICAgICAgIH1cclxuICAgICAgICBwb3MgKz0gODtcclxuICAgIH1cclxuXHJcbiAgICBbXCJzcGFjZVwiLCBcImJhclwiXS5mb3JFYWNoKGZ1bmN0aW9uKGtleSkge1xyXG4gICAgICAgIHZhciBuZXdraW5kID0gY2F0ZWdvcml6YXRpb25ba2V5XTtcclxuICAgICAgICBuZXdraW5kLndpZGUubWluID1cclxuICAgICAgICAgICAgTWF0aC5mbG9vcigobmV3a2luZC5uYXJyb3cuc2l6ZSAvIG5ld2tpbmQubmFycm93LmNvdW50cyArIG5ld2tpbmQud2lkZS5zaXplIC8gbmV3a2luZC53aWRlLmNvdW50cykgLyAyKTtcclxuICAgICAgICBuZXdraW5kLm5hcnJvdy5tYXggPSBNYXRoLmNlaWwobmV3a2luZC53aWRlLm1pbik7XHJcbiAgICAgICAgbmV3a2luZC53aWRlLm1heCA9IE1hdGguY2VpbCgobmV3a2luZC53aWRlLnNpemUgKiBzZWxmLk1BWF9BQ0NFUFRBQkxFICsgc2VsZi5QQURESU5HKSAvIG5ld2tpbmQud2lkZS5jb3VudHMpO1xyXG4gICAgfSk7XHJcblxyXG4gICAgcmV0dXJuIGNhdGVnb3JpemF0aW9uO1xyXG59O1xyXG5cclxuQ29kYWJhclJlYWRlci5wcm90b3R5cGUuX2NoYXJUb1BhdHRlcm4gPSBmdW5jdGlvbihjaGFyKSB7XHJcbiAgICB2YXIgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgY2hhckNvZGUgPSBjaGFyLmNoYXJDb2RlQXQoMCksXHJcbiAgICAgICAgaTtcclxuXHJcbiAgICBmb3IgKGkgPSAwOyBpIDwgc2VsZi5BTFBIQUJFVC5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGlmIChzZWxmLkFMUEhBQkVUW2ldID09PSBjaGFyQ29kZSl7XHJcbiAgICAgICAgICAgIHJldHVybiBzZWxmLkNIQVJBQ1RFUl9FTkNPRElOR1NbaV07XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIDB4MDtcclxufTtcclxuXHJcbkNvZGFiYXJSZWFkZXIucHJvdG90eXBlLl92YWxpZGF0ZVJlc3VsdCA9IGZ1bmN0aW9uKHJlc3VsdCwgc3RhcnRDb3VudGVyKSB7XHJcbiAgICB2YXIgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgdGhyZXNob2xkcyA9IHNlbGYuX3RocmVzaG9sZFJlc3VsdFBhdHRlcm4ocmVzdWx0LCBzdGFydENvdW50ZXIpLFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgaixcclxuICAgICAgICBraW5kLFxyXG4gICAgICAgIGNhdCxcclxuICAgICAgICBzaXplLFxyXG4gICAgICAgIHBvcyA9IHN0YXJ0Q291bnRlcixcclxuICAgICAgICBwYXR0ZXJuO1xyXG5cclxuICAgIGZvciAoaSA9IDA7IGkgPCByZXN1bHQubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBwYXR0ZXJuID0gc2VsZi5fY2hhclRvUGF0dGVybihyZXN1bHRbaV0pO1xyXG4gICAgICAgIGZvciAoaiA9IDY7IGogPj0gMDsgai0tKSB7XHJcbiAgICAgICAgICAgIGtpbmQgPSAoaiAmIDEpID09PSAwID8gdGhyZXNob2xkcy5iYXIgOiB0aHJlc2hvbGRzLnNwYWNlO1xyXG4gICAgICAgICAgICBjYXQgPSAocGF0dGVybiAmIDEpID09PSAxID8ga2luZC53aWRlIDoga2luZC5uYXJyb3c7XHJcbiAgICAgICAgICAgIHNpemUgPSBzZWxmLl9jb3VudGVyc1twb3MgKyBqXTtcclxuICAgICAgICAgICAgaWYgKHNpemUgPCBjYXQubWluIHx8IHNpemUgPiBjYXQubWF4KSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcGF0dGVybiA+Pj0gMTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcG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kgLyAyLjApIHwgMDtcclxufTtcclxuXHJcbkNvZGFiYXJSZWFkZXIucHJvdG90eXBlLl90b1BhdHRlcm4gPSBmdW5jdGlvbihvZmZzZXQpIHtcclxuICAgIHZhciBudW1Db3VudGVycyA9IDcsXHJcbiAgICAgICAgZW5kID0gb2Zmc2V0ICsgbnVtQ291bnRlcnMsXHJcbiAgICAgICAgYmFyVGhyZXNob2xkLFxyXG4gICAgICAgIHNwYWNlVGhyZXNob2xkLFxyXG4gICAgICAgIGJpdG1hc2sgPSAxIDw8IChudW1Db3VudGVycyAtIDEpLFxyXG4gICAgICAgIHBhdHRlcm4gPSAwLFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgdGhyZXNob2xkO1xyXG5cclxuICAgIGlmIChlbmQgPiB0aGlzLl9jb3VudGVycy5sZW5ndGgpIHtcclxuICAgICAgICByZXR1cm4gLTE7XHJcbiAgICB9XHJcblxyXG4gICAgYmFyVGhyZXNob2xkID0gdGhpcy5fY29tcHV0ZUFsdGVybmF0aW5nVGhyZXNob2xkKG9mZnNldCwgZW5kKTtcclxuICAgIHNwYWNlVGhyZXNob2xkID0gdGhpcy5fY29tcHV0ZUFsdGVybmF0aW5nVGhyZXNob2xkKG9mZnNldCArIDEsIGVuZCk7XHJcblxyXG4gICAgZm9yIChpID0gMDsgaSA8IG51bUNvdW50ZXJzOyBpKyspe1xyXG4gICAgICAgIHRocmVzaG9sZCA9IChpICYgMSkgPT09IDAgPyBiYXJUaHJlc2hvbGQgOiBzcGFjZVRocmVzaG9sZDtcclxuICAgICAgICBpZiAodGhpcy5fY291bnRlcnNbb2Zmc2V0ICsgaV0gPiB0aHJlc2hvbGQpIHtcclxuICAgICAgICAgICAgcGF0dGVybiB8PSBiaXRtYXNrO1xyXG4gICAgICAgIH1cclxuICAgICAgICBiaXRtYXNrID4+PSAxO1xyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiBwYXR0ZXJuO1xyXG59O1xyXG5cclxuQ29kYWJhclJlYWRlci5wc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2V0OyBpIDwgc2VsZi5fcm93Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgaWYgKHNlbGYuX3Jvd1tpXSBeIGlzV2hpdGUpIHtcclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSsrO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChjb3VudGVyUG9zID09PSBjb3VudGVyLmxlbmd0aCAtIDEpIHtcclxuICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWQgPSBzZWxmLl9ub3JtYWxpemUoY291bnRlcik7XHJcbiAgICAgICAgICAgICAgICBpZiAobm9ybWFsaXplZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAoY29kZSA9IDA7IGNvZGUgPCBzZWxmLkNPREVfUEFUVEVSTi5sZW5ndGg7IGNvZGUrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvciA9IHNlbGYuX21hdGNoUGF0dGVybihub3JtYWxpemVkLCBzZWxmLkNPREVfUEFUVEVSTltjb2RlXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnJvciA8IGJlc3RNYXRjaC5lcnJvcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmNvZGUgPSBjb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVycm9yID0gZXJyb3I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVuZCA9IGk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJlc3RNYXRjaDtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MrKztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdID0gMTtcclxuICAgICAgICAgICAgaXNXaGl0ZSA9ICFpc1doaXRlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBudWxsO1xyXG59O1xyXG5cclxuQ29kZTEyOFJlYWRlci5wcm90b3R5cGUuX2ZpbmRTdGFydCA9IGZ1bmN0aW9uKCkge1xyXG4gICAgdmFyIGNvdW50ZXIgPSBbMCwgMCwgMCwgMCwgMCwgMF0sXHJcbiAgICAgICAgaSxcclxuICAgICAgICBzZWxmID0gdGhpcyxcclxuICAgICAgICBvZmZzZXQgPSBzZWxmLl9uZXh0U2V0KHNlbGYuX3JvdyksXHJcbiAgICAgICAgaXNXaGl0ZSA9IGZhbHNlLFxyXG4gICAgICAgIGNvdW50ZXJQb3MgPSAwLFxyXG4gICAgICAgIGJlc3RNYXRjaCA9IHtcclxuICAgICAgICAgICAgZXJyb3I6IE51bWJlci5NQVhfVkFMVUUsXHJcbiAgICAgICAgICAgIGNvZGU6IC0xLFxyXG4gICAgICAgICAgICBzdGFydDogMCxcclxuICAgICAgICAgICAgZW5kOiAwXHJcbiAgICAgICAgfSxcclxuICAgICAgICBjb2RlLFxyXG4gICAgICAgIGVycm9yLFxyXG4gICAgICAgIGosXHJcbiAgICAgICAgc3VtLFxyXG4gICAgICAgIG5vcm1hbGl6ZWQ7XHJcblxyXG4gICAgZm9yICggaSA9IG9mZnNldDsgaSA8IHNlbGYuX3Jvdy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGlmIChzZWxmLl9yb3dbaV0gXiBpc1doaXRlKSB7XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10rKztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBpZiAoY291bnRlclBvcyA9PT0gY291bnRlci5sZW5ndGggLSAxKSB7XHJcbiAgICAgICAgICAgICAgICBzdW0gPSAwO1xyXG4gICAgICAgICAgICAgICAgZm9yICggaiA9IDA7IGogPCBjb3VudGVyLmxlbmd0aDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc3VtICs9IGNvdW50ZXJbal07XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBub3JtYWxpemVkID0gc2VsZi5fbm9ybWFsaXplKGNvdW50ZXIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKG5vcm1hbGl6ZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGNvZGUgPSBzZWxmLlNUQVJUX0NPREVfQTsgY29kZSA8PSBzZWxmLlNUQVJUX0NPREVfQzsgY29kZSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yID0gc2VsZi5fbWF0Y2hQYXR0ZXJuKG5vcm1hbGl6ZWQsIHNlbGYuQ09ERV9QQVRURVJOW2NvZGVdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yIDwgYmVzdE1hdGNoLmVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guY29kZSA9IGNvZGU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZXJyb3IgPSBlcnJvcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAoYmVzdE1hdGNoLmVycm9yIDwgc2VsZi5BVkdfQ09ERV9FUlJPUikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guc3RhcnQgPSBpIC0gc3VtO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZW5kID0gaTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJlc3RNYXRjaDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgZm9yICggaiA9IDA7IGogPCA0OyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBjb3VudGVyW2pdID0gY291bnRlcltqICsgMl07XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyWzRdID0gMDtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJbNV0gPSAwO1xyXG4gICAgICAgICAgICAgICAgY291bnRlclBvcy0tO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY291bnRlclBvcysrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10gPSAxO1xyXG4gICAgICAgICAgICBpc1doaXRlID0gIWlzV2hpdGU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIG51bGw7XHJcbn07XHJcblxyXG5Db2RlMTI4UmVhZGVyLnByb3RvdHlwZS5fZGVjb2RlID0gZnVuY3Rpb24oKSB7XHJcbiAgICB2YXIgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgc3RhcnRJbmZvID0gc2VsZi5fZmluZFN0YXJ0KCksXHJcbiAgICAgICAgY29kZSA9IG51bGwsXHJcbiAgICAgICAgZG9uZSA9IGZhbHNlLFxyXG4gICAgICAgIHJlc3VsdCA9IFtdLFxyXG4gICAgICAgIG11bHRpcGxpZXIgPSAwLFxyXG4gICAgICAgIGNoZWNrc3VtID0gMCxcclxuICAgICAgICBjb2Rlc2V0LFxyXG4gICAgICAgIHJhd1Jlc3VsdCA9IFtdLFxyXG4gICAgICAgIGRlY29kZWRDb2RlcyA9IFtdLFxyXG4gICAgICAgIHNoaWZ0TmV4dCA9IGZhbHNlLFxyXG4gICAgICAgIHVuc2hpZnQsXHJcbiAgICAgICAgcmVtb3ZlTGFzdENoYXJhY3RlciA9IHRydWU7XHJcblxyXG4gICAgaWYgKHN0YXJ0SW5mbyA9PT0gbnVsbCkge1xyXG4gICAgICAgIHJldHVybiBudWxsO1xyXG4gICA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1RPUF9DT0RFKSB7XHJcbiAgICAgICAgICAgICAgICByYXdSZXN1bHQucHVzaChjb2RlLmNvZGUpO1xyXG4gICAgICAgICAgICAgICAgbXVsdGlwbGllcisrO1xyXG4gICAgICAgICAgICAgICAgY2hlY2tzdW0gKz0gbXVsdGlwbGllciAqIGNvZGUuY29kZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBkZWNvZGVkQ29kZXMucHVzaChjb2RlKTtcclxuXHJcbiAgICAgICAgICAgIHN3aXRjaCAoY29kZXNldCkge1xyXG4gICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9BOlxyXG4gICAgICAgICAgICAgICAgaWYgKGNvZGUuY29kZSA8IDY0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goU3RyaW5nLmZyb21DaGFyQ29kZSgzMiArIGNvZGUuY29kZSkpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb2RlLmNvZGUgPCA5Nikge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKFN0cmluZy5mcm9tQ2hhckNvZGUoY29kZS5jb2RlIC0gNjQpKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvZGUuY29kZSAhPT0gc2VsZi5TVE9QX0NPREUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3ZlTGFzdENoYXJhY3RlciA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGNvZGUuY29kZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX1NISUZUOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzaGlmdE5leHQgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0I6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQzpcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZXNldCA9IHNlbGYuQ09ERV9DO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuU1RPUF9DT0RFOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0I6XHJcbiAgICAgICAgICAgICAgICBpZiAoY29kZS5jb2RlIDwgOTYpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChTdHJpbmcuZnJvbUNoYXJDb2RlKDMyICsgY29kZS5jb2RlKSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb2RlLmNvZGUgIT09IHNlbGYuU1RPUF9DT0RFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZUxhc3RDaGFyYWN0ZXIgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChjb2RlLmNvZGUpIHtcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9TSElGVDpcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2hpZnROZXh0ID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZXNldCA9IHNlbGYuQ09ERV9BO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9BOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0E7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0M6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQztcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLlNUT1BfQ09ERTpcclxuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9DOlxyXG4gICAgICAgICAgICAgICAgaWYgKGNvZGUuY29kZSA8IDEwMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKGNvZGUuY29kZSA8IDEwID8gXCIwXCIgKyBjb2RlLmNvZGUgOiBjb2RlLmNvZGUpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY29kZS5jb2RlICE9PSBzZWxmLlNUT1BfQ09ERSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZW1vdmVMYXN0Q2hhcmFjdGVyID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoY29kZS5jb2RlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQTpcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZXNldCA9IHNlbGYuQ09ERV9BO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9COlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5TVE9QX0NPREU6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGRvbmUgPSB0cnVlO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodW5zaGlmdCkge1xyXG4gICAgICAgICAgICBjb2Rlc2V0ID0gY29kZXNldCA9PT0gc2VsZi5DT0RFX0EgPyBzZWxmLkNPREVfQiA6IHNlbGYuQ09ERV9BO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBpZiAoY29kZSA9PT0gbnVsbCkge1xyXG4gICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgfVxyXG5cclxuICAgIGNvZGUuZW5kID0gc2VsZi5fbmV4dFVuc2V0KHNlbGYuX3JvdywgY29kZS5lbmQpO1xyXG4gICAgaWYgKCFzZWxmLl92ZXJpZnlUcmFpbGluZ1doaXRlc3BhY2UoY29kZSkpe1xyXG4gICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgfVxyXG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AwLjA5O1xyXG4gICAgfVxyXG59XHJcblxyXG5mdW5jdGlvbiBnZXREZWZhdWxDb25maWcoKSB7XHJcbiAgICB2YXIgY29uZmlnID0ge307XHJcblxyXG4gICAgT2JqZWN0LmtleXMoSTJvZjVSZWFkZXIuQ09ORklHX0tFWVMpLmZvckVhY2goZnVuY3Rpb24oa2V5KSB7XHJcbiAgICAgICAgY29uZmlnW2tleV0gPSBJMm9mNVJlYWRlci5DT05GSUdfS0VZU1trZXldLmRlZmF1bHQ7XHJcbiAgICB9KTtcclxuICAgIHJldHVybiBjb25maWc7XHJcbn1cclxuXHJcbnZhciBOID0gMSxcclxuICAgIFcgPSAzLFxyXG4gICAgcHJvcGVydGllcyA9IHtcclxuICAgICAgICBNT0RVTE86IHt2YWx1ZTogMTB9LFxyXG4gICAgICAgIFNUQVJUX1BBVFRFUk46IHt2YWx1ZTogW04gKiAyLjUsIE4gKiAyLjUsIE4gKiAyLjUsIE4gKiAyLjVdfSxcclxuICAgICAgICBTVE9QX1BBVFRFUk46IHt2YWx1ZTogW04gKiAyLCBOICogMiwgVyAqIDJdfSxcclxuICAgICAgICBDT0RFX1BBVFRFUk46IHt2YWx1ZTogW1xyXG4gICAgICAgICAgICBbTiwgTiwgVywgVywgTl0sXHJcbiAgICAgICAgICAgIFtXLCBOLCBOLCBOLCBXXSxcclxuICAgICAgICAgICAgW04sIFcsIE4sIE4sIFddLFxyXG4gICAgICAgICAgICBbVywgVywgTiwgTiwgTl0sXHJcbiAgICAgICAgICAgIFtOLCBOLCBXLCBOLCBXXSxcclxuICAgICAgICAgICAgW1csIE4sIFcsIE4sIE5dLFxyXG4gICAgICAgICAgICBbTiwgVywgVywgTiwgTl0sXHJcbiAgICAgICAgICAgIFtOLCBOLCBOLCBXLCBXXSxcclxuICAgICAgICAgICAgW1csIE4sIE4sIFcsIE5dLFxyXG4gICAgICAgICAgICBbTiwgVywgTiwgVywgTl1cclxuICAgICAgICBdfSxcclxuICAgICAgICBTSU5HTEVfQ09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XG4gICAgICAgICAgICBjb2RlOiAtMSxcclxuICAgICAgICAgICAgc3RhcnQ6IDAsXHJcbiAgICAgICAgICAgIGVuZDogMFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZXJyb3IsXHJcbiAgICAgICAgaixcclxuICAgICAgICBzdW0sXHJcbiAgICAgICAgbm9ybWFsaXplZCxcclxuICAgICAgICBlcHNpbG9uID0gc2VsZi5BVkdfQ09ERV9FUlJPUjtcclxuXHJcbiAgICBpc1doaXRlID0gaXNXaGl0ZSB8fCBmYWxzZTtcclxuICAgIHRyeUhhcmRlciA9IHRyeUhhcmRlciB8fCBmYWxzZTtcclxuXHJcbiAgICBpZiAoIW9mZnNldCkge1xyXG4gICAgICAgIG9mZnNldCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93KTtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IHBhdHRlcm4ubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBjb3VudGVyW2ldID0gMDtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gb2Zmc2V0OyBpIDwgc2VsZi5fcm93Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgaWYgKHNlbGYuX3Jvd1tpXSBeIGlzV2hpdGUpIHtcclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSsrO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChjb3VudGVyUG9zID09PSBjb3VudGVyLmxlbmd0aCAtIDEpIHtcclxuICAgICAgICAgICAgICAgIHN1bSA9IDA7XHJcbiAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IGNvdW50ZXIubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBzdW0gKz0gY291bnRlcltqXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWQgPSBzZWxmLl9ub3JtYWxpemUoY291bnRlcik7XHJcbiAgICAgICAgICAgICAgICBpZiAobm9ybWFsaXplZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGVycm9yID0gc2VsZi5fbWF0Y2hQYXR0ZXJuKG5vcm1hbGl6ZWQsIHBhdHRlcm4pO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IgPCBlcHNpbG9uKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lcnJvciA9IGVycm9yO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guc3RhcnQgPSBpIC0gc3VtO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZW5kID0gaTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJlc3RNYXRjaDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAodHJ5SGFyZGVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGNvdW50ZXIubGVuZ3RoIC0gMjsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbal0gPSBjb3VudGVyW2ogKyAyXTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyLmxlbmd0aCAtIDJdID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXIubGVuZ3RoIC0gMV0gPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MtLTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zKys7XHJc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Glvbihjb3VudGVycywgcmVzdWx0LCBkZWNvZGVkQ29kZXMpIHtcclxuICAgIHZhciBpLFxyXG4gICAgICAgIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIHBvcyA9IDAsXHJcbiAgICAgICAgY291bnRlckxlbmd0aCA9IGNvdW50ZXJzLmxlbmd0aCxcclxuICAgICAgICBjb3VudGVyUGFpciA9IFtbMCwgMCwgMCwgMCwgMF0sIFswLCAwLCAwLCAwLCAwXV0sXHJcbiAgICAgICAgY29kZXM7XHJcblxyXG4gICAgd2hpbGUgKHBvcyA8IGNvdW50ZXJMZW5ndGgpIHtcclxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgNTsgaSsrKSB7XHJcbiAgICAgICAgICAgIGNvdW50ZXJQYWlyWzBdW2ldID0gY291bnRlcnNbcG9zXSAqIHRoaXMuYmFyU3BhY2VSYXRpb1swXTtcclxuICAgICAgICAgICAgY291bnRlclBhaXJbMV1baV0gPSBjb3VudGVyc1twb3MgKyAxXSAqIHRoaXMuYmFyU3BhY2VSYXRpb1sxXTtcclxuICAgICAgICAgICAgcG9zICs9IDI7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGNvZGVzID0gc2VsZi5fZGVjb2RlUGFpcihjb3VudGVyUGFpcik7XHJcbiAgICAgICAgaWYgKCFjb2Rlcykge1xyXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICB9XHJcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvZGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIHJlc3VsdC5wdXNoKGNvZGVzW2ldLmNvZGUgKyBcIlwiKTtcclxuICAgICAgICAgICAgZGVjb2RlZENvZGVzLnB1c2goY29kZXNbaV0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBjb2RlcztcclxufTtcclxuXHJcbkkyb2Y1UmVhZGVyLnByb3RvdHlwZS5fdmVyaWZ5Q291bnRlckxlbmd0aCA9I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iAgICAgICAgICBzZXQ6IGZ1bmN0aW9uKHN0cmVhbSkge1xuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuICAgICAgICAgICAgLy8gVXNlIF9zcmNPYmplY3QgYXMgYSBwcml2YXRlIHByb3BlcnR5IGZvciB0aGlzIHNoaW1cbiAgICAgICAgICAgIHRoaXMuX3NyY09iamVjdCA9IHN0cmVhbTtcbiAgICAgICAgICAgIGlmICh0aGlzLnNyYykge1xuICAgICAgICAgICAgICBVUkwucmV2b2tlT2JqZWN0VVJMKHRoaXMuc3JjKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFzdHJlYW0pIHtcbiAgICAgICAgICAgICAgdGhpcy5zcmMgPSAnJztcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5zcmMgPSBVUkwuY3JlYXRlT2JqZWN0VVJMKHN0cmVhbSk7XG4gICAgICAgICAgICAvLyBXZSBuZWVkIHRvIHJlY3JlYXRlIHRoZSBibG9iIHVybCB3aGVuIGEgdHJhY2sgaXMgYWRkZWQgb3IgcmVtb3ZlZC5cbiAgICAgICAgICAgIC8vIERvaW5nIGl0IG1hbnVhbGx5IHNpbmNlIHdlIHdhbnQgdG8gYXZvaWQgYSByZWN1cnNpb24uXG4gICAgICAgICAgICBzdHJlYW0uYWRkRXZlbnRMaXN0ZW5lcignYWRkdHJhY2snLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgaWYgKHNlbGYuc3JjKSB7XG4gICAgICAgICAgICAgICAgVVJMLnJldm9rZU9iamVjdFVSTChzZWxmLnNyYyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgc2VsZi5zcmMgPSBVUkwuY3JlYXRlT2JqZWN0VVJMKHN0cmVhbSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHN0cmVhbS5hZGRFdmVudExpc3RlbmVyKCdyZW1vdmV0cmFjaycsI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yRWFjaChmdW5jdGlvbihuYW1lKSB7XG4gICAgICAgICAgICAgIHN0YW5kYXJkU3RhdHNbbmFtZV0gPSByZXBvcnQuc3RhdChuYW1lKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgc3RhbmRhcmRSZXBvcnRbc3RhbmRhcmRTdGF0cy5pZF0gPSBzdGFuZGFyZFN0YXRzO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgcmV0dXJuIHN0YW5kYXJkUmVwb3J0O1xuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID49IDIpIHtcbiAgICAgICAgICB2YXIgc3VjY2Vzc0NhbGxiYWNrV3JhcHBlcl8gPSBmdW5jdGlvbihyZXNwb25zZSkge1xuICAgICAgICAgICAgYXJnc1sxXShmaXhDaHJvbWVTdGF0c18ocmVzcG9uc2UpKTtcbiAgICAgICAgICB9O1xuXG4gICAgICAgICAgcmV0dXJuIG9yaWdHZXRTdGF0cy5hcHBseSh0aGlzLCBbc3VjY2Vzc0NhbGxiYWNrV3JhcHBlcl8sIGFyZ3VtZW50c1swXV0pO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gcHJvbWlzZS1zdXBwb3J0XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbihyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPT09IDEgJiYgc2VsZWN0b3IgPT09IG51bGwpIHtcbiAgICAgICAgICAgIG9yaWdHZXRTdGF0cy5hcHBseShzZWxmLCBbXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24ocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmUuYXBwbHkobnVsbCwgW2ZpeENocm9tZVN0YXRzXyhyZXNwb25zZSldKTtcbiAgICAgICAgICAgICAgICB9LCByZWplY3RdKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgb3JpZ0dldF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ICAgICAgIHIubWluID0gci5tYXggPSByLmV4YWN0O1xuICAgICAgfVxuICAgICAgdmFyIG9sZG5hbWVfID0gZnVuY3Rpb24ocHJlZml4LCBuYW1lKSB7XG4gICAgICAgIGlmIChwcmVmaXgpIHtcbiAgICAgICAgICByZXR1cm4gcHJlZml4ICsgbmFtZS5jaGFyQXQoMCkudG9VcHBlckNhc2UoKSArIG5hbWUuc2xpY2UoMSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIChuYW1lID09PSAnZGV2aWNlSWQnKSA/ICdzb3VyY2VJZCcgOiBuYW1lO1xuICAgICAgfTtcbiAgICAgIGlmIChyLmlkZWFsICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgY2Mub3B0aW9uYWwgPSBjYy5vcHRpb25hbCB8fCBbXTtcbiAgICAgICAgdmFyIG9jID0ge307XG4gICAgICAgIGlmICh0eXBlb2Ygci5pZGVhbCA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICBvY1tvbGRuYW1lXygnbWluJywga2V5KV0gPSByLmlkZWFsO1xuICAgICAgICAgIGNjLm9wdGlvbmFsLnB1c2gob2MpO1xuICAgICAgICAgIG9jID0ge307XG4gICAgICAgICAgb2Nbb2xkbmFtZV8oJ21heCcsIGtleSldID0gci5pZGVhbDtcbiAgICAgICAgICBjYy5vcHRpb25hbC5wdXNoKG9jKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBvY1tvbGRuYW1lXygnJywga2V5KV0gPSByLmlkZWFsO1xuICAgICAgICAgIGNjLm9wdGlvbmFsLnB1c2gob2MpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAoci5leGFjdCAhPT0gdW5kZWZpbmVkICYmIHR5cGVvZiByLmV4YWN0ICE9PSAnbnVtYmVyJykge1xuICAgICAgICBjYy5tYW5kYXRvcnkgPSBjYy5tYW5kYXRvcnkgfHwge307XG4gICAgICAgIGNjLm1hbmRhdG9yeVtvbGRuYW1lXygnJywga2V5KV0gP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EV2ZW50KCdhZGRzdHJlYW0nKTtcbiAgICAgICAgICBldmVudC5zdHJlYW0gPSBzdHJlYW07XG4gICAgICAgICAgc2VsZi5kaXNwYXRjaEV2ZW50KGV2ZW50KTtcbiAgICAgICAgICBpZiAoc2VsZi5vbmFkZHN0cmVhbSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgd2luZG93LnNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgIHNlbGYub25hZGRzdHJlYW0oZXZlbnQpO1xuICAgICAgICAgICAgfSwgMCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmVjZWl2ZXJMaXN0LmZvckVhY2goZnVuY3Rpb24oaXRlbSkge1xuICAgICAgICAgICAgdmFyIHRyYWNrID0gaXRlbVswXTtcbiAgICAgICAgICAgIHZhciByZWNlaXZlciA9IGl0ZW1bMV07XG4gICAgICAgICAgICB2YXIgZXZlbnQgPSBuZXcgRXZlbnQoJ3RyYWNrJyk7XG4gICAgICAgICAgICBldmVudC50cmFjayA9IHRyYWNrO1xuICAgICAgICAgICAgZXZlbnQucmVjZWl2ZXIgPSByZWNlaXZlcjtcbiAgICAgICAgICAgIGV2ZW50LnN0cmVhbXMgPSBbc3RyZWFtXTtcbiAgICAgICAgICAgIHNlbGYuZGlzcGF0Y2hFdmVudChldmVudCk7XG4gICAgICAgICAgICBpZiAoc2VsZi5vbnRyYWNrICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgd2luZG93LnNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICBzZWxmLm9udHJhY2soZXZlbnQpO1xuICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICB9LCAwKTtcbiAgICAgIH1cbiAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID4gMSAmJiB0eXBlb2YgYXJndW1lbnRzWzFdID09PSAnZnVuY3Rpb24nKSB7XG4gICA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dCBzdXBwb3J0ZWQuJyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG9mZmVyT3B0aW9ucy5vZmZlclRvUmVjZWl2ZUF1ZGlvICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBudW1BdWRpb1RyYWNrcyA9IG9mZmVyT3B0aW9ucy5vZmZlclRvUmVjZWl2ZUF1ZGlvO1xuICAgICAgICB9XG4gICAgICAgIGlmIChvZmZlck9wdGlvbnMub2ZmZXJUb1JlY2VpdmVWaWRlbyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgbnVtVmlkZW9UcmFja3MgPSBvZmZlck9wdGlvbnMub2ZmZXJUb1JlY2VpdmVWaWRlbztcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKHRoaXMubG9jYWxTdHJlYW1zLmxlbmd0aCkge1xuICAgICAgICAvLyBQdXNoIGxvY2FsIHN0cmVhbXMuXG4gICAgICAgIHRoaXMubG9jYWxTdHJlYW1zWzBdLmdldFRyYWNrcygpLmZvckVhY2goZnVuY3Rpb24odHJhY2spIHtcbiAgICAgICAgICB0cmFja3MucHVzaCh7XG4gICAgICAgICAgICBraW5kOiB0cmFjay5raW5kLFxuICAgICAgICAgICAgdHJhY2s6IHRyYWNrLFxuICAgICAgICAgICAgd2FudFJlY2VpdmU6IHRyYWNrLmtpbmQgPT09ICdhdWRpbycgP1xuICAgICAgICAgICAgICAgIG51bUF1ZGlvVHJhY2tzID4gMCA6IG51bVZpZGVvVHJhY2tzID4gMFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIGlmICh0cmFjay5raW5kID09PSAnYXVkaW8nKSB7XG4gICAgICAgICAgICBudW1BdWRpb1RyYWNrcy0tO1xuICAgICAgICAgIH0gZWxzZSBpZiAodHJhY2sua2luZCA9PT0gJ3ZpZGVvJykge1xuICAgICAgICAgICAgbnVtVmlkZW9UcmFja3MtLTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgICAgLy8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AgIH07XG5cbiAgICB3aW5kb3cuUlRDUGVlckNvbm5lY3Rpb24ucHJvdG90eXBlLmdldFN0YXRzID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgcHJvbWlzZXMgPSBbXTtcbiAgICAgIHRoaXMudHJhbnNjZWl2ZXJzLmZvckVhY2goZnVuY3Rpb24odHJhbnNjZWl2ZXIpIHtcbiAgICAgICAgWydydHBTZW5kZXInLCAncnRwUmVjZWl2ZXInLCAnaWNlR2F0aGVyZXInLCAnaWNlVHJhbnNwb3J0JyxcbiAgICAgICAgICAgICdkdGxzVHJhbnNwb3J0J10uZm9yRWFjaChmdW5jdGlvbihtZXRob2QpIHtcbiAgICAgICAgICBpZiAodHJhbnNjZWl2ZXJbbWV0aG9kXSkge1xuICAgICAgICAgICAgcHJvbWlzZXMucHVzaCh0cmFuc2NlaXZlclttZXRob2RdLmdldFN0YXRzKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICAgIHZhciBjYiA9IGFyZ3VtZW50cy5sZW5ndGggPiAxICYmIHR5cGVvZiBhcmd1bWVudHNbMV0gPT09ICdmdW5jdGlvbicgJiZcbiAgICAgICAgICBhcmd1bWVudHNbMV07XG4gICAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24ocmVzb2x2ZSkge1xuICAgICAgICB2YXIgcmVzdWx0cyA9IHt9O1xuICAgICAgICBQcm9taXNlLmFsbChwcm9taXNlcykudGhlbihmdW5jdGlvbihyZXMpIHtcbiAgICAgICAgICByZXMuZm9yRWFjaChmdW5jdGlvbihyZXN1bHQpIHtcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKHJlc3VsdCkuZm9yRWFjaChmdW5jdGlvbihpZCkge1xuICAgICAgICAgICAgICByZXN1bHRzW2lkXSA9IHJlc3VsdFtpZF07XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICBpZiAoY2IpIHtcbiAgICAgICAgICAgIHd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2VTZXJ2ZXJzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgIHZhciBzZXJ2ZXIgPSBwY0NvbmZpZy5pY2VTZXJ2ZXJzW2ldO1xuICAgICAgICAgICAgICBpZiAoc2VydmVyLmhhc093blByb3BlcnR5KCd1cmxzJykpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IHNlcnZlci51cmxzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgbmV3U2VydmVyID0ge1xuICAgICAgICAgICAgICAgICAgICB1cmw6IHNlcnZlci51cmxzW2pdXG4gICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgaWYgKHNlcnZlci51cmxzW2pdLmluZGV4T2YoJ3R1cm4nKSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBuZXdTZXJ2ZXIudXNlcm5hbWUgPSBzZXJ2ZXIudXNlcm5hbWU7XG4gICAgICAgICAgICAgICAgICAgIG5ld1NlcnZlci5jcmVkZW50aWFsID0gc2VydmVyLmNyZWRlbnRpYWw7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBuZXdJY2VTZXJ2ZXJzLnB1c2gobmV3U2VydmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbmV3SWNlU2VydmVycy5wdXNoKHBjQ29uZmlnLmljZVNlcnZlcnNbaV0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwY0NvbmZpZy5pY2VTZXJ2ZXJzID0gbmV3SWNlU2VydmVycztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG5ldyBtb3pSVENQZWVyQ29ubmVjdGlvbihwY0NvbmZpZywgcGNDb25zdHJhaW50cyk7IC8vIGpzY3M6aWdub3JlIHJlcXVpcmVDYXBpdGFsaXplZENvbnN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gICAgdmFyIGdldFVzZXJNZWRpYV8gPSBmdW5jdGlvbihjb25zdHJhaW50cywgb25TdWNjZXNzLCBvbkVycm9yKSB7XG4gICAgICB2YXIgY29uc3RyYWludHNUb0ZGMzdfID0gZnVuY3Rpb24oYykge1xuICAgICAgICBpZiAodHlwZW9mIGMgIT09ICdvYmplY3QnIHx8IGMucmVxdWlyZSkge1xuICAgICAgICAgIHJldHVybiBjO1xuICAgICAgICB9XG4gICAgICAgIHZhciByZXF1aXJlID0gW107XG4gICAgICAgIE9iamVjdC5rZXlzKGMpLmZvckVhY2goZnVuY3Rpb24oa2V5KSB7XG4gICAgICAgICAgaWYgKGtleSA9PT0gJ3JlcXVpcmUnIHx8IGtleSA9PT0gJ2FkdmFuY2VkJyB8fCBrZXkgPT09ICdtZWRpYVNvdXJjZScpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9XG4gICAgICAgICAgdmFyIHIgPSBjW2tleV0gPSAodHlwZW9mIGNba2V5XSA9PT0gJ29iamVjdCcpID9cbiAgICAgICAgICAgICAgY1trZXldIDoge2lkZWFsOiBjW2tleV19O1xuICAgICAgICAgIGlmIChyLm1pbiAhPT0gdW5kZWZpbmVkIHx8XG4gICAgICAgICAgICAgIHIubWF4ICE9PSB1bmRlZmluZWQgfHwgci5leGFjdCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICByZXF1aXJlLnB1c2goa2V5KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHIuZXhhY3QgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiByLmV4YWN0ID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICByLiBtaW4gPSByLm1heCA9IHIuZXhhY3Q7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjW2tleV0gPSByLmV4YWN0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGVsZXRlIHIuZXhhY3Q7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyLmlkZWFsICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGMuYWR2YW5jZWQgPSBjLmFkdmFuY2VkIHx8IFtdO1xuICAgICAgICAgICAgdmFyIG9jID0ge307XG4gICAgICAgICAgICBpZiAodHlwZW9mIHIuaWRlYWwgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgIG9jW2tleV0gPSB7bWluOiByLmlkZWFsLCBtYXg6IHIuaWRlYWx9O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgb2Nba2V5XSA9IHIuaWRlYWw7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjLmFkdmFuY2VkLnB1c2gob2MpO1xuICAgICAgICAgICAgZGVsZXRlIHIuaWRlYWw7XG4gICAgICAgICAgICBpZiAoIU9iamVjdC5rZXlzKHIpLmxlbmd0aCkge1xuICAgICAgICAgICAgICBkZWxldGUgY1trZXldO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlmIChyZXF1aXJlLmxlbmd0aCkge1xuICAgICAgICAgIGMucmVxdWlyZSA9IHJlcXVpcmU7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGM7XG4gICAgICB9O1xuICAgICAgaWYgKGJyb3dzZXJEZXRhaWxzLnZlcnNpb24gPCAzOCkge1xuICAgICAgICBsb2dnaW5nKCdzcGVjOiAnICsgSlNPTi5zdHJpbmdpZnkoY29uc3RyYWludHMpKTtcbiAgICAgICAgaWYgKGNvbnN0cmFpbnRzLmF1ZGlvKSB7XG4gICAgICAgICAgY29uc3RyYWludHMuYXVkaW8gPSBjb25zdHJhaW50c1RvRkYzN18oY29uc3RyYWludHMuYXVkaW8pO1xuICAgICAgICB9XG4gICAgICAgIGlmIChjb25zdHJhaW50cy52aWRlbykge1xuICAgICAgICAgIGNvbnN0cmFpbnRzLnZpZGVvID0gY29uc3RyYWludHNUb0ZG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gICAgICB2YXIgciA9IGNba2V5XSA9ICh0eXBlb2YgY1trZXldID09PSAnb2JqZWN0JykgP1xuICAgICAgICAgICAgY1trZXldIDoge2lkZWFsOiBjW2tleV19O1xuICAgICAgICBpZiAoci5taW4gIT09IHVuZGVmaW5lZCB8fFxuICAgICAgICAgICAgci5tYXggIT09IHVuZGVmaW5lZCB8fCByLmV4YWN0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICByZXF1aXJlLnB1c2goa2V5KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoci5leGFjdCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZiByLmV4YWN0ID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgci4gbWluID0gci5tYXggPSByLmV4YWN0O1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjW2tleV0gPSByLmV4YWN0O1xuICAgICAgICAgIH1cbiAgICAgICAgICBkZWxldGUgci5leGFjdDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoci5pZGVhbCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgYy5hZHZhbmNlZCA9IGMuYWR2YW5jZWQgfHwgW107XG4gICAgICAgICAgdmFyIG9jID0ge307XG4gICAgICAgICAgaWYgKHR5cGVvZiByLmlkZWFsID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgb2Nba2V5XSA9IHttaW46IHIuaWRlYWwsIG1heDogci5pZGVhbH07XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG9jW2tleV0gPSByLmlkZWFsO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjLmFkdmFuY2VkLnB1c2gob2MpO1xuICAgICAgICAgIGRlbGV0ZSByLmlkZWFsO1xuICAgICAgICAgIGlmICghT2JqZWN0LmtleXMocikubGVuZ3RoKSB7XG4gICAgICAgICAgICBkZWxldGUgY1trZXldO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfS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uICAgIG5hdmlnYXRvci5tZWRpYURldmljZXMuZW51bWVyYXRlRGV2aWNlcyA9IGZ1bmN0aW9uKCkge1xuICAgICAgcmV0dXJuIG9yZ0VudW1lcmF0ZURldmljZXMoKS50aGVuKHVuZGVmaW5lZCwgZnVuY3Rpb24oZSkge1xuICAgICAgICBpZiAoZS5uYW1lID09PSAnTm90Rm91bmRFcnJvcicpIHtcbiAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIH1cbiAgICAgICAgdGhyb3cgZTtcbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cblxuXG5cbi8qKioqKioqKioqKioqKioqKlxuICoqIFdFQlBBQ0sgRk9PVEVSXG4gKiogLi9+L3dlYnJ0Yy1hZGFwdGVyL3NyYy9qcy9maXJlZm94L2dldHVzZXJtZWRpYS5qc1xuICoqIG1vZHVsZSBpZCA9IDE1M1xuICoqIG1vZHVsZSBjaHVua3MgPSAwXG4gKiovIl0sInNvdXJjZVJvb3QiOiIifQ==
\ No newline at end of file
diff --git a/dist/quagga.min.js b/dist/quagga.min.js
index c75c2b6d..ff07195a 100644
--- a/dist/quagga.min.js
+++ b/dist/quagga.min.js
@@ -1,3 +1,3 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(e.toString()):"object"==typeof exports?exports.Quagga=e(e.toString()):t.Quagga=e(e.toString())}(this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="/",e(0)}([function(t,e,n){t.exports=n(1)},function(e,n,r){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}function a(t){l(t),S=k["default"].create(at.decoder,D)}function i(t){var e;if("VideoStream"===at.inputStream.type)e=document.createElement("video"),w=$["default"].createVideoStream(e);else if("ImageStream"===at.inputStream.type)w=$["default"].createImageStream();else if("LiveStream"===at.inputStream.type){var n=u();n&&(e=n.querySelector("video"),e||(e=document.createElement("video"),n.appendChild(e))),w=$["default"].createLiveStream(e),G["default"].request(e,at.inputStream.constraints,function(e){return e?t(e):void w.trigger("canrecord")})}w.setAttribute("preload","auto"),w.setAttribute("autoplay",!0),w.setInputStream(at.inputStream),w.addEventListener("canrecord",c.bind(void 0,t))}function u(){var t=at.inputStream.target;if(t&&t.nodeName&&1===t.nodeType)return t;var e="string"==typeof t?t:"#interactive.viewport";return document.querySelector(e)}function c(t){j["default"].checkImageConstraints(w,at.locator),s(at),C=tt["default"].create(w,nt.dom.image),A(at.numOfWorkers,function(){0===at.numOfWorkers&&a(),f(t)})}function f(t){w.play(),t()}function s(){if("undefined"!=typeof document){var t=u();if(nt.dom.image=document.querySelector("canvas.imgBuffer"),nt.dom.image||(nt.dom.image=document.createElement("canvas"),nt.dom.image.className="imgBuffer",t&&"ImageStream"===at.inputStream.type&&t.appendChild(nt.dom.image)),nt.ctx.image=nt.dom.image.getContext("2d"),nt.dom.image.width=w.getCanvasSize().x,nt.dom.image.height=w.getCanvasSize().y,nt.dom.overlay=document.querySelector("canvas.drawingBuffer"),!nt.dom.overlay){nt.dom.overlay=document.createElement("canvas"),nt.dom.overlay.className="drawingBuffer",t&&t.appendChild(nt.dom.overlay);var e=document.createElement("br");e.setAttribute("clear","all"),t&&t.appendChild(e)}nt.ctx.overlay=nt.dom.overlay.getContext("2d"),nt.dom.overlay.width=w.getCanvasSize().x,nt.dom.overlay.height=w.getCanvasSize().y}}function l(t){D=t?t:new N["default"]({x:w.getWidth(),y:w.getHeight()}),T=[V.vec2.clone([0,0]),V.vec2.clone([0,D.size.y]),V.vec2.clone([D.size.x,D.size.y]),V.vec2.clone([D.size.x,0])],j["default"].init(D,at.locator)}function d(){return at.locate?j["default"].locate():[[V.vec2.clone(T[0]),V.vec2.clone(T[1]),V.vec2.clone(T[2]),V.vec2.clone(T[3])]]}function h(t){function e(t){for(var e=t.length;e--;)t[e][0]+=a,t[e][1]+=i}function n(t){t[0].x+=a,t[0].y+=i,t[1].x+=a,t[1].y+=i}var r,o=w.getTopRight(),a=o.x,i=o.y;if(0!==a||0!==i){if(t.barcodes)for(r=0;r0)for(r=0;r0){if(t=rt.filter(function(t){return!t.busy})[0],!t)return;C.attachData(t.imageData)}else C.attachData(D.data);C.grab()&&(t?(t.busy=!0,t.worker.postMessage({cmd:"process",imageData:t.imageData},[t.imageData.buffer])):m())}else m()}function y(){var t=null,e=1e3/(at.frequency||60);O=!1,function n(r){t=t||r,O||(r>=t&&(t+=e,_()),window.requestAnimFrame(n))}(performance.now())}function x(){ot&&"LiveStream"===at.inputStream.type?y():_()}function M(t){var e,n={worker:void 0,imageData:new Uint8Array(w.getWidth()*w.getHeight()),busy:!0};e=R(),n.worker=new Worker(e),n.worker.onmessage=function(r){return"initialized"===r.data.event?(URL.revokeObjectURL(e),n.busy=!1,n.imageData=new Uint8Array(r.data.imageData),t(n)):void("processed"===r.data.event?(n.imageData=new Uint8Array(r.data.imageData),n.busy=!1,g(r.data.result,n.imageData)):"error"===r.data.event)},n.worker.postMessage({cmd:"init",size:{x:w.getWidth(),y:w.getHeight()},imageData:n.imageData,config:at},[n.imageData.buffer])}function b(t){function e(t){self.postMessage({event:"processed",imageData:o.data,result:t},[o.data.buffer])}function n(){self.postMessage({event:"initialized",imageData:o.data},[o.data.buffer])}if(t){var r=t();if(!r)return void self.postMessage({event:"error",message:"Quagga could not be created"})}var o;self.onmessage=function(t){if("init"===t.data.cmd){var a=t.data.config;a.numOfWorkers=0,o=new r.ImageWrapper({x:t.data.size.x,y:t.data.size.y},new Uint8Array(t.data.imageData)),r.init(a,n,o),r.onProcessed(e)}else"process"===t.data.cmd?(o.data=new Uint8Array(t.data.imageData),r.start()):"setReaders"===t.data.cmd&&r.setReaders(t.data.readers)}}function R(){var e,n;return"undefined"!=typeof t&&(n=t),e=new Blob(["("+b.toString()+")("+n+");"],{type:"text/javascript"}),window.URL.createObjectURL(e)}function E(t){S?S.setReaders(t):ot&&rt.length>0&&rt.forEach(function(e){e.worker.postMessage({cmd:"setReaders",readers:t})})}function A(t,e){var n=t-rt.length;if(0===n)return e&&e();if(0>n){var r=rt.slice(n);return r.forEach(function(t){t.worker.terminate()}),rt=rt.slice(0,n),e&&e()}for(var o=function(n){rt.push(n),rt.length>=t&&e&&e()},a=0;n>a;a++)M(o)}Object.defineProperty(n,"__esModule",{value:!0});var w,C,O,D,T,S,P,I=r(2),z=(o(I),r(3)),N=o(z),L=r(18),j=o(L),U=r(23),k=o(U),q=r(68),W=o(q),F=r(69),G=o(F),Y=r(19),B=o(Y),V=r(7),H=r(70),X=o(H),Q=r(71),K=o(Q),Z=r(73),$=o(Z),J=r(75),tt=o(J),et=r(35),nt={ctx:{image:null,overlay:null},dom:{image:null,overlay:null}},rt=[],ot=!0,at={};n["default"]={init:function(t,e,n){return at=et({},K["default"],t),n?(ot=!1,a(n),e()):void i(e)},start:function(){x()},stop:function(){O=!0,A(0),"LiveStream"===at.inputStream.type&&(G["default"].release(),w.clearEventHandlers())},pause:function(){O=!0},onDetected:function(t){W["default"].subscribe("detected",t)},offDetected:function(t){W["default"].unsubscribe("detected",t)},onProcessed:function(t){W["default"].subscribe("processed",t)},offProcessed:function(t){W["default"].unsubscribe("processed",t)},setReaders:function(t){E(t)},registerResultCollector:function(t){t&&"function"==typeof t.addResult&&(P=t)},canvas:nt,decodeSingle:function(t,e){t=et({inputStream:{type:"ImageStream",sequence:!1,size:800,src:t.src},numOfWorkers:1,locator:{halfSample:!1}},t),this.init(t,function(){W["default"].once("processed",function(t){O=!0,e.call(null,t)},!0),x()})},ImageWrapper:N["default"],ImageDebug:B["default"],ResultCollector:X["default"]},e.exports=n["default"]},function(t,e){"use strict";"undefined"!=typeof window&&(window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}(),navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL),Math.imul=Math.imul||function(t,e){var n=t>>>16&65535,r=65535&t,o=e>>>16&65535,a=65535&e;return r*a+(n*a+r*o<<16>>>0)|0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n,r){e?this.data=e:n?(this.data=new n(t.x*t.y),n===Array&&r&&s["default"].init(this.data,0)):(this.data=new Uint8Array(t.x*t.y),Uint8Array===Array&&r&&s["default"].init(this.data,0)),this.size=t}Object.defineProperty(e,"__esModule",{value:!0});var a=n(4),i=r(a),u=n(5),c=r(u),f=n(17),s=r(f),l=n(7);o.prototype.inImageWithBorder=function(t,e){return t.x>=e&&t.y>=e&&t.xn;n++)for(r=0;o>r;r++)t.data[r*a+n]=this.data[(e.y+r)*this.size.x+e.x+n]},o.prototype.copyTo=function(t){for(var e=this.data.length,n=this.data,r=t.data;e--;)r[e]=n[e]},o.prototype.get=function(t,e){return this.data[e*this.size.x+t]},o.prototype.getSafe=function(t,e){var n;if(!this.indexMapping){for(this.indexMapping={x:[],y:[]},n=0;nt;t++)r[t]=r[(n-1)*e+t]=0;for(t=1;n-1>t;t++)r[t*e]=r[t*e+(e-1)]=0},o.prototype.invert=function(){for(var t=this.data,e=t.length;e--;)t[e]=t[e]?0:1},o.prototype.convolve=function(t){var e,n,r,o,a=t.length/2|0,i=0;for(n=0;n=o;o++)for(r=-a;a>=r;r++)i+=t[o+a][r+a]*this.getSafe(e+r,n+o);this.data[n*this.size.x+e]=i}},o.prototype.moments=function(t){var e,n,r,o,a,i,u,c,f,s,d,h,p=this.data,v=this.size.y,g=this.size.x,m=[],_=[],y=Math.PI,x=y/4;if(0>=t)return _;for(a=0;t>a;a++)m[a]={m00:0,m01:0,m10:0,m11:0,m02:0,m20:0,theta:0,rad:0};for(n=0;v>n;n++)for(o=n*n,e=0;g>e;e++)r=p[n*g+e],r>0&&(i=m[r-1],i.m00+=1,i.m01+=n,i.m10+=e,i.m11+=e*n,i.m02+=o,i.m20+=e*e);for(a=0;t>a;a++)i=m[a],isNaN(i.m00)||0===i.m00||(s=i.m10/i.m00,d=i.m01/i.m00,u=i.m11/i.m00-s*d,c=i.m02/i.m00-d*d,f=i.m20/i.m00-s*s,h=(c-f)/(2*u),h=.5*Math.atan(h)+(u>=0?x:-x)+y,i.theta=(180*h/y+90)%180-90,i.theta<0&&(i.theta+=180),i.rad=h>y?h-y:h,i.vec=l.vec2.clone([Math.cos(h),Math.sin(h)]),_.push(i));return _},o.prototype.show=function(t,e){var n,r,o,a,i,u,c;for(e||(e=1),n=t.getContext("2d"),t.width=this.size.x,t.height=this.size.y,r=n.getImageData(0,0,t.width,t.height),o=r.data,a=0,c=0;ce||e>360)&&(e=360);for(var r=[0,1,1],o=[0,0,0],a=[255,255,255],i=[0,0,0],u=[],f=t.getContext("2d"),s=f.getImageData(n.x,n.y,this.size.x,this.size.y),l=s.data,d=this.data.length;d--;)r[0]=this.data[d]*e,u=r[0]<=0?a:r[0]>=360?i:c["default"].hsv2rgb(r,o),l[4*d+0]=u[0],l[4*d+1]=u[1],l[4*d+2]=u[2],l[4*d+3]=255;f.putImageData(s,n.x,n.y)},e["default"]=o,t.exports=e["default"]},function(t,e){"use strict";function n(t,e,n){n||(n={data:null,size:e}),this.data=n.data,this.originalSize=n.size,this.I=n,this.from=t,this.size=e}Object.defineProperty(e,"__esModule",{value:!0}),n.prototype.show=function(t,e){var n,r,o,a,i,u,c;for(e||(e=1),n=t.getContext("2d"),t.width=this.size.x,t.height=this.size.y,r=n.getImageData(0,0,t.width,t.height),o=r.data,a=0,i=0;i0?Math.floor(this.x+.5):Math.floor(this.x-.5),this.y=this.y>0?Math.floor(this.y+.5):Math.floor(this.y-.5),this}};return n},f.computeIntegralImage2=function(t,e){var n,r,o=t.data,a=t.size.x,i=t.size.y,u=e.data,c=0,f=0,s=0,l=0,d=0;for(s=a,c=0,r=1;i>r;r++)c+=o[f],u[s]+=c,f+=a,s+=a;for(f=0,s=1,c=0,n=1;a>n;n++)c+=o[f],u[s]+=c,f++,s++;for(r=1;i>r;r++)for(f=r*a+1,s=(r-1)*a+1,l=r*a,d=(r-1)*a,n=1;a>n;n++)u[f]+=o[f]+u[s]+u[l]-u[d],f++,s++,l++,d++},f.computeIntegralImage=function(t,e){for(var n=t.data,r=t.size.x,o=t.size.y,a=e.data,i=0,u=0;r>u;u++)i+=n[u],a[u]=i;for(var c=1;o>c;c++){i=0;for(var f=0;r>f;f++)i+=n[c*r+f],a[c*r+f]=i+a[(c-1)*r+f]}},f.thresholdImage=function(t,e,n){n||(n=t);for(var r=t.data,o=r.length,a=n.data;o--;)a[o]=r[o]>o]++;return i},f.sharpenLine=function(t){var e,n,r=t.length,o=t[0],a=t[1];for(e=1;r-1>e;e++)n=t[e+1],t[e-1]=2*a-o-n&255,o=a,a=n;return t},f.determineOtsuThreshold=function(t,e){function n(t,e){var n,r=0;for(n=t;e>=n;n++)r+=a[n];return r}function r(t,e){var n,r=0;for(n=t;e>=n;n++)r+=n*a[n];return r}function o(){var o,i,c,s,l,d,h,p=[0],v=(1<s;s++)o=n(0,s),i=n(s+1,v),c=o*i,0===c&&(c=1),l=r(0,s)*i,d=r(s+1,v)*o,h=l-d,p[s]=h*h/c;return u["default"].maxIndex(p)}e||(e=8);var a,i,c=8-e;return i=o(),i<=r;r++)for(o=0;h>o;o++)d[r*h+o]=0,d[(p-1-r)*h+o]=0;for(r=m;p-m>r;r++)for(o=0;m>=o;o++)d[r*h+o]=0,d[r*h+(h-1-o)]=0;for(r=m+1;p-m-1>r;r++)for(o=m+1;h-m>o;o++)a=v[(r-m-1)*h+(o-m-1)],i=v[(r-m-1)*h+(o+m)],u=v[(r+m)*h+(o-m-1)],c=v[(r+m)*h+(o+m)],g=c-u-i+a,s=g/_,d[r*h+o]=l[r*h+o]>s+5?0:1},f.cluster=function(t,e,n){function r(t){var e=!1;for(i=0;ie.x-f&&t.xe.y-s&&t.yn;n++){for(i=Math.floor(Math.random()*t.length),o=[],u=i,o.push(t[u]);null!==(u=s(u,!0));)o.push(t[u]);if(i>0)for(u=i;null!==(u=s(u,!1));)o.push(t[u]);o.length>a.length&&(a=o)}return a}},f.DILATE=1,f.ERODE=2,f.dilate=function(t,e){var n,r,o,a,i,u,c,f=t.data,s=e.data,l=t.size.y,d=t.size.x;for(n=1;l-1>n;n++)for(r=1;d-1>r;r++)a=n-1,i=n+1,u=r-1,c=r+1,o=f[a*d+u]+f[a*d+c]+f[n*d+r]+f[i*d+u]+f[i*d+c],s[n*d+r]=o>0?1:0},f.erode=function(t,e){var n,r,o,a,i,u,c,f=t.data,s=e.data,l=t.size.y,d=t.size.x;for(n=1;l-1>n;n++)for(r=1;d-1>r;r++)a=n-1,i=n+1,u=r-1,c=r+1,o=f[a*d+u]+f[a*d+c]+f[n*d+r]+f[i*d+u]+f[i*d+c],s[n*d+r]=5===o?1:0},f.subtract=function(t,e,n){n||(n=t);for(var r=t.data.length,o=t.data,a=e.data,i=n.data;r--;)i[r]=o[r]-a[r]},f.bitwiseOr=function(t,e,n){n||(n=t);for(var r=t.data.length,o=t.data,a=e.data,i=n.data;r--;)i[r]=o[r]||a[r]},f.countNonZero=function(t){for(var e=t.data.length,n=t.data,r=0;e--;)r+=n[e];return r},f.topGeneric=function(t,e,n){var r,o,a,i,u=0,c=0,f=[];for(r=0;e>r;r++)f[r]={score:0,item:null};for(r=0;rc)for(a=f[u],a.score=o,a.item=t[r],c=Number.MAX_VALUE,i=0;e>i;i++)f[i].scorea;){for(r=0;u>r;r++)n[c]=Math.floor((.299*t[4*o+0]+.587*t[4*o+1]+.114*t[4*o+2]+(.299*t[4*(o+1)+0]+.587*t[4*(o+1)+1]+.114*t[4*(o+1)+2])+(.299*t[4*a+0]+.587*t[4*a+1]+.114*t[4*a+2])+(.299*t[4*(a+1)+0]+.587*t[4*(a+1)+1]+.114*t[4*(a+1)+2]))/4),c++,o+=2,a+=2;o+=f,a+=f}},f.computeGray=function(t,e,n){var r,o=t.length/4|0,a=n&&n.singleChannel===!0;if(a)for(r=0;o>r;r++)e[r]=t[4*r+0];else for(r=0;o>r;r++)e[r]=Math.floor(.299*t[4*r+0]+.587*t[4*r+1]+.114*t[4*r+2])},f.loadImageArray=function(t,e,n){n||(n=document.createElement("canvas"));var r=new Image;r.callback=e,r.onload=function(){n.width=this.width,n.height=this.height;var t=n.getContext("2d");t.drawImage(this,0,0);var e=new Uint8Array(this.width*this.height);t.drawImage(this,0,0);var r=t.getImageData(0,0,this.width,this.height).data;f.computeGray(r,e),this.callback(e,{x:this.width,y:this.height},this)},r.src=t},f.halfSample=function(t,e){for(var n=t.data,r=t.size.x,o=e.data,a=0,i=r,u=n.length,c=r/2,f=0;u>i;){for(var s=0;c>s;s++)o[f]=Math.floor((n[a]+n[a+1]+n[i]+n[i+1])/4),f++,a+=2,i+=2;a+=r,i+=r}},f.hsv2rgb=function(t,e){var n=t[0],r=t[1],o=t[2],a=o*r,i=a*(1-Math.abs(n/60%2-1)),u=o-a,c=0,f=0,s=0;return e=e||[0,0,0],60>n?(c=a,f=i):120>n?(c=i,f=a):180>n?(f=a,s=i):240>n?(f=i,s=a):300>n?(c=i,s=a):360>n&&(c=a,s=i),e[0]=255*(c+u)|0,e[1]=255*(f+u)|0,e[2]=255*(s+u)|0,e},f._computeDivisors=function(t){var e,n=[],r=[];for(e=1;ee[r]?r++:n++;return o},f.calculatePatchSize=function(t,e){function n(t){for(var e=0,n=t[Math.floor(t.length/2)];e0&&(n=Math.abs(t[e]-d)>Math.abs(t[e-1]-d)?t[e-1]:t[e]),d/nc[s-1]/c[s]?{x:n,y:n}:null}var r,o=this._computeDivisors(e.x),a=this._computeDivisors(e.y),i=Math.max(e.x,e.y),u=this._computeIntersection(o,a),c=[8,10,15,20,32,60,80],f={"x-small":5,small:4,medium:3,large:2,"x-large":1},s=f[t]||f.medium,l=c[s],d=Math.floor(i/l);return r=n(u),r||(r=n(this._computeDivisors(i)),r||(r=n(this._computeDivisors(d*l)))),r},f._parseCSSDimensionValues=function(t){var e={value:parseFloat(t),unit:(t.indexOf("%")===t.length-1,"%")};return e},f._dimensionsConverters={top:function(t,e){return"%"===t.unit?Math.floor(e.height*(t.value/100)):void 0},right:function(t,e){return"%"===t.unit?Math.floor(e.width-e.width*(t.value/100)):void 0},bottom:function(t,e){return"%"===t.unit?Math.floor(e.height-e.height*(t.value/100)):void 0},left:function(t,e){return"%"===t.unit?Math.floor(e.width*(t.value/100)):void 0}},f.computeImageArea=function(t,e,n){var r={width:t,height:e},o=Object.keys(n).reduce(function(t,e){var o=n[e],a=f._parseCSSDimensionValues(o),i=f._dimensionsConverters[e](a,r);return t[e]=i,t},{});return{sx:o.left,sy:o.top,sw:o.right-o.left,sh:o.bottom-o.top}},e["default"]=f,t.exports=e["default"]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7);e["default"]={create:function(t,e){function n(){o(t),a()}function o(t){c[t.id]=t,i.push(t)}function a(){var t,e=0;for(t=0;te?!0:!1},getPoints:function(){return i},getCenter:function(){return u}}},createPoint:function(t,e,n){return{rad:t[n],point:t,id:e}}},t.exports=e["default"]},function(t,e,n){e.glMatrix=n(8),e.mat2=n(9),e.mat2d=n(10),e.mat3=n(11),e.mat4=n(12),e.quat=n(13),e.vec2=n(16),e.vec3=n(14),e.vec4=n(15)},function(t,e){var n={};n.EPSILON=1e-6,n.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,n.RANDOM=Math.random,n.setMatrixArrayType=function(t){GLMAT_ARRAY_TYPE=t};var r=Math.PI/180;n.toRadian=function(t){return t*r},t.exports=n},function(t,e,n){var r=n(8),o={};o.create=function(){var t=new r.ARRAY_TYPE(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},o.clone=function(t){var e=new r.ARRAY_TYPE(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},o.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},o.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},o.transpose=function(t,e){if(t===e){var n=e[1];t[1]=e[2],t[2]=n}else t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3];return t},o.invert=function(t,e){var n=e[0],r=e[1],o=e[2],a=e[3],i=n*a-o*r;return i?(i=1/i,t[0]=a*i,t[1]=-r*i,t[2]=-o*i,t[3]=n*i,t):null},o.adjoint=function(t,e){var n=e[0];return t[0]=e[3],t[1]=-e[1],t[2]=-e[2],t[3]=n,t},o.determinant=function(t){return t[0]*t[3]-t[2]*t[1]},o.multiply=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=n[0],c=n[1],f=n[2],s=n[3];return t[0]=r*u+a*c,t[1]=o*u+i*c,t[2]=r*f+a*s,t[3]=o*f+i*s,t},o.mul=o.multiply,o.rotate=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c+a*u,t[1]=o*c+i*u,t[2]=r*-u+a*c,t[3]=o*-u+i*c,t},o.scale=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=n[0],c=n[1];return t[0]=r*u,t[1]=o*u,t[2]=a*c,t[3]=i*c,t},o.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=-n,t[3]=r,t},o.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t},o.str=function(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},o.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2))},o.LDU=function(t,e,n,r){return t[2]=r[2]/r[0],n[0]=r[0],n[1]=r[1],n[3]=r[3]-t[2]*n[1],[t,e,n]},t.exports=o},function(t,e,n){var r=n(8),o={};o.create=function(){var t=new r.ARRAY_TYPE(6);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},o.clone=function(t){var e=new r.ARRAY_TYPE(6);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},o.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},o.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},o.invert=function(t,e){var n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],u=e[5],c=n*a-r*o;return c?(c=1/c,t[0]=a*c,t[1]=-r*c,t[2]=-o*c,t[3]=n*c,t[4]=(o*u-a*i)*c,t[5]=(r*i-n*u)*c,t):null},o.determinant=function(t){return t[0]*t[3]-t[1]*t[2]},o.multiply=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=e[4],c=e[5],f=n[0],s=n[1],l=n[2],d=n[3],h=n[4],p=n[5];return t[0]=r*f+a*s,t[1]=o*f+i*s,t[2]=r*l+a*d,t[3]=o*l+i*d,t[4]=r*h+a*p+u,t[5]=o*h+i*p+c,t},o.mul=o.multiply,o.rotate=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=e[4],c=e[5],f=Math.sin(n),s=Math.cos(n);return t[0]=r*s+a*f,t[1]=o*s+i*f,t[2]=r*-f+a*s,t[3]=o*-f+i*s,t[4]=u,t[5]=c,t},o.scale=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=e[4],c=e[5],f=n[0],s=n[1];return t[0]=r*f,t[1]=o*f,t[2]=a*s,t[3]=i*s,t[4]=u,t[5]=c,t},o.translate=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=e[4],c=e[5],f=n[0],s=n[1];return t[0]=r,t[1]=o,t[2]=a,t[3]=i,t[4]=r*f+a*s+u,t[5]=o*f+i*s+c,t},o.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=-n,t[3]=r,t[4]=0,t[5]=0,t},o.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t[4]=0,t[5]=0,t},o.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=e[0],t[5]=e[1],t},o.str=function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},o.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+1)},t.exports=o},function(t,e,n){var r=n(8),o={};o.create=function(){var t=new r.ARRAY_TYPE(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},o.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},o.clone=function(t){var e=new r.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},o.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},o.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},o.transpose=function(t,e){if(t===e){var n=e[1],r=e[2],o=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=o}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},o.invert=function(t,e){var n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],u=e[5],c=e[6],f=e[7],s=e[8],l=s*i-u*f,d=-s*a+u*c,h=f*a-i*c,p=n*l+r*d+o*h;return p?(p=1/p,t[0]=l*p,t[1]=(-s*r+o*f)*p,t[2]=(u*r-o*i)*p,t[3]=d*p,t[4]=(s*n-o*c)*p,t[5]=(-u*n+o*a)*p,t[6]=h*p,t[7]=(-f*n+r*c)*p,t[8]=(i*n-r*a)*p,t):null},o.adjoint=function(t,e){var n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],u=e[5],c=e[6],f=e[7],s=e[8];return t[0]=i*s-u*f,t[1]=o*f-r*s,t[2]=r*u-o*i,t[3]=u*c-a*s,t[4]=n*s-o*c,t[5]=o*a-n*u,t[6]=a*f-i*c,t[7]=r*c-n*f,t[8]=n*i-r*a,t},o.determinant=function(t){var e=t[0],n=t[1],r=t[2],o=t[3],a=t[4],i=t[5],u=t[6],c=t[7],f=t[8];return e*(f*a-i*c)+n*(-f*o+i*u)+r*(c*o-a*u)},o.multiply=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=e[4],c=e[5],f=e[6],s=e[7],l=e[8],d=n[0],h=n[1],p=n[2],v=n[3],g=n[4],m=n[5],_=n[6],y=n[7],x=n[8];return t[0]=d*r+h*i+p*f,t[1]=d*o+h*u+p*s,t[2]=d*a+h*c+p*l,t[3]=v*r+g*i+m*f,t[4]=v*o+g*u+m*s,t[5]=v*a+g*c+m*l,t[6]=_*r+y*i+x*f,t[7]=_*o+y*u+x*s,t[8]=_*a+y*c+x*l,t},o.mul=o.multiply,o.translate=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=e[4],c=e[5],f=e[6],s=e[7],l=e[8],d=n[0],h=n[1];return t[0]=r,t[1]=o,t[2]=a,t[3]=i,t[4]=u,t[5]=c,t[6]=d*r+h*i+f,t[7]=d*o+h*u+s,t[8]=d*a+h*c+l,t},o.rotate=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=e[4],c=e[5],f=e[6],s=e[7],l=e[8],d=Math.sin(n),h=Math.cos(n);return t[0]=h*r+d*i,t[1]=h*o+d*u,t[2]=h*a+d*c,t[3]=h*i-d*r,t[4]=h*u-d*o,t[5]=h*c-d*a,t[6]=f,t[7]=s,t[8]=l,t},o.scale=function(t,e,n){var r=n[0],o=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},o.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},o.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},o.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},o.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},o.fromQuat=function(t,e){var n=e[0],r=e[1],o=e[2],a=e[3],i=n+n,u=r+r,c=o+o,f=n*i,s=r*i,l=r*u,d=o*i,h=o*u,p=o*c,v=a*i,g=a*u,m=a*c;return t[0]=1-l-p,t[3]=s-m,t[6]=d+g,t[1]=s+m,t[4]=1-f-p,t[7]=h-v,t[2]=d-g,t[5]=h+v,t[8]=1-f-l,t},o.normalFromMat4=function(t,e){var n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],u=e[5],c=e[6],f=e[7],s=e[8],l=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],_=n*u-r*i,y=n*c-o*i,x=n*f-a*i,M=r*c-o*u,b=r*f-a*u,R=o*f-a*c,E=s*v-l*p,A=s*g-d*p,w=s*m-h*p,C=l*g-d*v,O=l*m-h*v,D=d*m-h*g,T=_*D-y*O+x*C+M*w-b*A+R*E;return T?(T=1/T,t[0]=(u*D-c*O+f*C)*T,t[1]=(c*w-i*D-f*A)*T,t[2]=(i*O-u*w+f*E)*T,t[3]=(o*O-r*D-a*C)*T,t[4]=(n*D-o*w+a*A)*T,t[5]=(r*w-n*O-a*E)*T,t[6]=(v*R-g*b+m*M)*T,t[7]=(g*x-p*R-m*y)*T,t[8]=(p*b-v*x+m*_)*T,t):null},o.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},o.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},t.exports=o},function(t,e,n){var r=n(8),o={};o.create=function(){var t=new r.ARRAY_TYPE(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},o.clone=function(t){var e=new r.ARRAY_TYPE(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},o.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},o.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},o.transpose=function(t,e){if(t===e){var n=e[1],r=e[2],o=e[3],a=e[6],i=e[7],u=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=o,t[13]=i,t[14]=u}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t},o.invert=function(t,e){var n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],u=e[5],c=e[6],f=e[7],s=e[8],l=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],_=n*u-r*i,y=n*c-o*i,x=n*f-a*i,M=r*c-o*u,b=r*f-a*u,R=o*f-a*c,E=s*v-l*p,A=s*g-d*p,w=s*m-h*p,C=l*g-d*v,O=l*m-h*v,D=d*m-h*g,T=_*D-y*O+x*C+M*w-b*A+R*E;return T?(T=1/T,t[0]=(u*D-c*O+f*C)*T,t[1]=(o*O-r*D-a*C)*T,t[2]=(v*R-g*b+m*M)*T,t[3]=(d*b-l*R-h*M)*T,t[4]=(c*w-i*D-f*A)*T,t[5]=(n*D-o*w+a*A)*T,t[6]=(g*x-p*R-m*y)*T,t[7]=(s*R-d*x+h*y)*T,t[8]=(i*O-u*w+f*E)*T,t[9]=(r*w-n*O-a*E)*T,t[10]=(p*b-v*x+m*_)*T,t[11]=(l*x-s*b-h*_)*T,t[12]=(u*A-i*C-c*E)*T,t[13]=(n*C-r*A+o*E)*T,t[14]=(v*y-p*M-g*_)*T,t[15]=(s*M-l*y+d*_)*T,t):null},o.adjoint=function(t,e){var n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],u=e[5],c=e[6],f=e[7],s=e[8],l=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15];return t[0]=u*(d*m-h*g)-l*(c*m-f*g)+v*(c*h-f*d),t[1]=-(r*(d*m-h*g)-l*(o*m-a*g)+v*(o*h-a*d)),t[2]=r*(c*m-f*g)-u*(o*m-a*g)+v*(o*f-a*c),t[3]=-(r*(c*h-f*d)-u*(o*h-a*d)+l*(o*f-a*c)),t[4]=-(i*(d*m-h*g)-s*(c*m-f*g)+p*(c*h-f*d)),t[5]=n*(d*m-h*g)-s*(o*m-a*g)+p*(o*h-a*d),t[6]=-(n*(c*m-f*g)-i*(o*m-a*g)+p*(o*f-a*c)),t[7]=n*(c*h-f*d)-i*(o*h-a*d)+s*(o*f-a*c),t[8]=i*(l*m-h*v)-s*(u*m-f*v)+p*(u*h-f*l),t[9]=-(n*(l*m-h*v)-s*(r*m-a*v)+p*(r*h-a*l)),t[10]=n*(u*m-f*v)-i*(r*m-a*v)+p*(r*f-a*u),t[11]=-(n*(u*h-f*l)-i*(r*h-a*l)+s*(r*f-a*u)),t[12]=-(i*(l*g-d*v)-s*(u*g-c*v)+p*(u*d-c*l)),t[13]=n*(l*g-d*v)-s*(r*g-o*v)+p*(r*d-o*l),t[14]=-(n*(u*g-c*v)-i*(r*g-o*v)+p*(r*c-o*u)),t[15]=n*(u*d-c*l)-i*(r*d-o*l)+s*(r*c-o*u),t},o.determinant=function(t){var e=t[0],n=t[1],r=t[2],o=t[3],a=t[4],i=t[5],u=t[6],c=t[7],f=t[8],s=t[9],l=t[10],d=t[11],h=t[12],p=t[13],v=t[14],g=t[15],m=e*i-n*a,_=e*u-r*a,y=e*c-o*a,x=n*u-r*i,M=n*c-o*i,b=r*c-o*u,R=f*p-s*h,E=f*v-l*h,A=f*g-d*h,w=s*v-l*p,C=s*g-d*p,O=l*g-d*v;return m*O-_*C+y*w+x*A-M*E+b*R},o.multiply=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=e[4],c=e[5],f=e[6],s=e[7],l=e[8],d=e[9],h=e[10],p=e[11],v=e[12],g=e[13],m=e[14],_=e[15],y=n[0],x=n[1],M=n[2],b=n[3];return t[0]=y*r+x*u+M*l+b*v,t[1]=y*o+x*c+M*d+b*g,t[2]=y*a+x*f+M*h+b*m,t[3]=y*i+x*s+M*p+b*_,y=n[4],x=n[5],M=n[6],b=n[7],t[4]=y*r+x*u+M*l+b*v,t[5]=y*o+x*c+M*d+b*g,t[6]=y*a+x*f+M*h+b*m,t[7]=y*i+x*s+M*p+b*_,y=n[8],x=n[9],M=n[10],b=n[11],t[8]=y*r+x*u+M*l+b*v,t[9]=y*o+x*c+M*d+b*g,t[10]=y*a+x*f+M*h+b*m,t[11]=y*i+x*s+M*p+b*_,y=n[12],x=n[13],M=n[14],b=n[15],t[12]=y*r+x*u+M*l+b*v,t[13]=y*o+x*c+M*d+b*g,t[14]=y*a+x*f+M*h+b*m,t[15]=y*i+x*s+M*p+b*_,t},o.mul=o.multiply,o.translate=function(t,e,n){var r,o,a,i,u,c,f,s,l,d,h,p,v=n[0],g=n[1],m=n[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*m+e[12],t[13]=e[1]*v+e[5]*g+e[9]*m+e[13],t[14]=e[2]*v+e[6]*g+e[10]*m+e[14],t[15]=e[3]*v+e[7]*g+e[11]*m+e[15]):(r=e[0],o=e[1],a=e[2],i=e[3],u=e[4],c=e[5],f=e[6],s=e[7],l=e[8],d=e[9],h=e[10],p=e[11],t[0]=r,t[1]=o,t[2]=a,t[3]=i,t[4]=u,t[5]=c,t[6]=f,t[7]=s,t[8]=l,t[9]=d,t[10]=h,t[11]=p,t[12]=r*v+u*g+l*m+e[12],t[13]=o*v+c*g+d*m+e[13],t[14]=a*v+f*g+h*m+e[14],t[15]=i*v+s*g+p*m+e[15]),
-t},o.scale=function(t,e,n){var r=n[0],o=n[1],a=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},o.rotate=function(t,e,n,o){var a,i,u,c,f,s,l,d,h,p,v,g,m,_,y,x,M,b,R,E,A,w,C,O,D=o[0],T=o[1],S=o[2],P=Math.sqrt(D*D+T*T+S*S);return Math.abs(P)c?(a.cross(t,e,o),a.length(t)<1e-6&&a.cross(t,n,o),a.normalize(t,t),u.setAxisAngle(r,t,Math.PI),r):c>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(a.cross(t,o,i),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+c,u.normalize(r,r))}}(),u.setAxes=function(){var t=o.create();return function(e,n,r,o){return t[0]=r[0],t[3]=r[1],t[6]=r[2],t[1]=o[0],t[4]=o[1],t[7]=o[2],t[2]=-n[0],t[5]=-n[1],t[8]=-n[2],u.normalize(e,u.fromMat3(e,t))}}(),u.clone=i.clone,u.fromValues=i.fromValues,u.copy=i.copy,u.set=i.set,u.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},u.setAxisAngle=function(t,e,n){n=.5*n;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t},u.add=i.add,u.multiply=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3],u=n[0],c=n[1],f=n[2],s=n[3];return t[0]=r*s+i*u+o*f-a*c,t[1]=o*s+i*c+a*u-r*f,t[2]=a*s+i*f+r*c-o*u,t[3]=i*s-r*u-o*c-a*f,t},u.mul=u.multiply,u.scale=i.scale,u.rotateX=function(t,e,n){n*=.5;var r=e[0],o=e[1],a=e[2],i=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c+i*u,t[1]=o*c+a*u,t[2]=a*c-o*u,t[3]=i*c-r*u,t},u.rotateY=function(t,e,n){n*=.5;var r=e[0],o=e[1],a=e[2],i=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c-a*u,t[1]=o*c+i*u,t[2]=a*c+r*u,t[3]=i*c-o*u,t},u.rotateZ=function(t,e,n){n*=.5;var r=e[0],o=e[1],a=e[2],i=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c+o*u,t[1]=o*c-r*u,t[2]=a*c+i*u,t[3]=i*c-a*u,t},u.calculateW=function(t,e){var n=e[0],r=e[1],o=e[2];return t[0]=n,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),t},u.dot=i.dot,u.lerp=i.lerp,u.slerp=function(t,e,n,r){var o,a,i,u,c,f=e[0],s=e[1],l=e[2],d=e[3],h=n[0],p=n[1],v=n[2],g=n[3];return a=f*h+s*p+l*v+d*g,0>a&&(a=-a,h=-h,p=-p,v=-v,g=-g),1-a>1e-6?(o=Math.acos(a),i=Math.sin(o),u=Math.sin((1-r)*o)/i,c=Math.sin(r*o)/i):(u=1-r,c=r),t[0]=u*f+c*h,t[1]=u*s+c*p,t[2]=u*l+c*v,t[3]=u*d+c*g,t},u.sqlerp=function(){var t=u.create(),e=u.create();return function(n,r,o,a,i,c){return u.slerp(t,r,i,c),u.slerp(e,o,a,c),u.slerp(n,t,e,2*c*(1-c)),n}}(),u.invert=function(t,e){var n=e[0],r=e[1],o=e[2],a=e[3],i=n*n+r*r+o*o+a*a,u=i?1/i:0;return t[0]=-n*u,t[1]=-r*u,t[2]=-o*u,t[3]=a*u,t},u.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},u.length=i.length,u.len=u.length,u.squaredLength=i.squaredLength,u.sqrLen=u.squaredLength,u.normalize=i.normalize,u.fromMat3=function(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var o=0;e[4]>e[0]&&(o=1),e[8]>e[3*o+o]&&(o=2);var a=(o+1)%3,i=(o+2)%3;n=Math.sqrt(e[3*o+o]-e[3*a+a]-e[3*i+i]+1),t[o]=.5*n,n=.5/n,t[3]=(e[3*a+i]-e[3*i+a])*n,t[a]=(e[3*a+o]+e[3*o+a])*n,t[i]=(e[3*i+o]+e[3*o+i])*n}return t},u.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},t.exports=u},function(t,e,n){var r=n(8),o={};o.create=function(){var t=new r.ARRAY_TYPE(3);return t[0]=0,t[1]=0,t[2]=0,t},o.clone=function(t){var e=new r.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},o.fromValues=function(t,e,n){var o=new r.ARRAY_TYPE(3);return o[0]=t,o[1]=e,o[2]=n,o},o.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},o.set=function(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t},o.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},o.subtract=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},o.sub=o.subtract,o.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t},o.mul=o.multiply,o.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t},o.div=o.divide,o.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},o.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},o.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},o.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t},o.distance=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return Math.sqrt(n*n+r*r+o*o)},o.dist=o.distance,o.squaredDistance=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return n*n+r*r+o*o},o.sqrDist=o.squaredDistance,o.length=function(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)},o.len=o.length,o.squaredLength=function(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r},o.sqrLen=o.squaredLength,o.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},o.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},o.normalize=function(t,e){var n=e[0],r=e[1],o=e[2],a=n*n+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t},o.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},o.cross=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=n[0],u=n[1],c=n[2];return t[0]=o*c-a*u,t[1]=a*i-r*c,t[2]=r*u-o*i,t},o.lerp=function(t,e,n,r){var o=e[0],a=e[1],i=e[2];return t[0]=o+r*(n[0]-o),t[1]=a+r*(n[1]-a),t[2]=i+r*(n[2]-i),t},o.hermite=function(t,e,n,r,o,a){var i=a*a,u=i*(2*a-3)+1,c=i*(a-2)+a,f=i*(a-1),s=i*(3-2*a);return t[0]=e[0]*u+n[0]*c+r[0]*f+o[0]*s,t[1]=e[1]*u+n[1]*c+r[1]*f+o[1]*s,t[2]=e[2]*u+n[2]*c+r[2]*f+o[2]*s,t},o.bezier=function(t,e,n,r,o,a){var i=1-a,u=i*i,c=a*a,f=u*i,s=3*a*u,l=3*c*i,d=c*a;return t[0]=e[0]*f+n[0]*s+r[0]*l+o[0]*d,t[1]=e[1]*f+n[1]*s+r[1]*l+o[1]*d,t[2]=e[2]*f+n[2]*s+r[2]*l+o[2]*d,t},o.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI,o=2*r.RANDOM()-1,a=Math.sqrt(1-o*o)*e;return t[0]=Math.cos(n)*a,t[1]=Math.sin(n)*a,t[2]=o*e,t},o.transformMat4=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=n[3]*r+n[7]*o+n[11]*a+n[15];return i=i||1,t[0]=(n[0]*r+n[4]*o+n[8]*a+n[12])/i,t[1]=(n[1]*r+n[5]*o+n[9]*a+n[13])/i,t[2]=(n[2]*r+n[6]*o+n[10]*a+n[14])/i,t},o.transformMat3=function(t,e,n){var r=e[0],o=e[1],a=e[2];return t[0]=r*n[0]+o*n[3]+a*n[6],t[1]=r*n[1]+o*n[4]+a*n[7],t[2]=r*n[2]+o*n[5]+a*n[8],t},o.transformQuat=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=n[0],u=n[1],c=n[2],f=n[3],s=f*r+u*a-c*o,l=f*o+c*r-i*a,d=f*a+i*o-u*r,h=-i*r-u*o-c*a;return t[0]=s*f+h*-i+l*-c-d*-u,t[1]=l*f+h*-u+d*-i-s*-c,t[2]=d*f+h*-c+s*-u-l*-i,t},o.rotateX=function(t,e,n,r){var o=[],a=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],a[0]=o[0],a[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),a[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},o.rotateY=function(t,e,n,r){var o=[],a=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],a[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),a[1]=o[1],a[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},o.rotateZ=function(t,e,n,r){var o=[],a=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],a[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),a[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),a[2]=o[2],t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},o.forEach=function(){var t=o.create();return function(e,n,r,o,a,i){var u,c;for(n||(n=3),r||(r=0),c=o?Math.min(o*n+r,e.length):e.length,u=r;c>u;u+=n)t[0]=e[u],t[1]=e[u+1],t[2]=e[u+2],a(t,t,i),e[u]=t[0],e[u+1]=t[1],e[u+2]=t[2];return e}}(),o.angle=function(t,e){var n=o.fromValues(t[0],t[1],t[2]),r=o.fromValues(e[0],e[1],e[2]);o.normalize(n,n),o.normalize(r,r);var a=o.dot(n,r);return a>1?0:Math.acos(a)},o.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},t.exports=o},function(t,e,n){var r=n(8),o={};o.create=function(){var t=new r.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},o.clone=function(t){var e=new r.ARRAY_TYPE(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},o.fromValues=function(t,e,n,o){var a=new r.ARRAY_TYPE(4);return a[0]=t,a[1]=e,a[2]=n,a[3]=o,a},o.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},o.set=function(t,e,n,r,o){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t},o.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t},o.subtract=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t},o.sub=o.subtract,o.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t},o.mul=o.multiply,o.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t},o.div=o.divide,o.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},o.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},o.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},o.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t},o.distance=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(n*n+r*r+o*o+a*a)},o.dist=o.distance,o.squaredDistance=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2],a=e[3]-t[3];return n*n+r*r+o*o+a*a},o.sqrDist=o.squaredDistance,o.length=function(t){var e=t[0],n=t[1],r=t[2],o=t[3];return Math.sqrt(e*e+n*n+r*r+o*o)},o.len=o.length,o.squaredLength=function(t){var e=t[0],n=t[1],r=t[2],o=t[3];return e*e+n*n+r*r+o*o},o.sqrLen=o.squaredLength,o.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},o.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},o.normalize=function(t,e){var n=e[0],r=e[1],o=e[2],a=e[3],i=n*n+r*r+o*o+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=n*i,t[1]=r*i,t[2]=o*i,t[3]=a*i),t},o.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},o.lerp=function(t,e,n,r){var o=e[0],a=e[1],i=e[2],u=e[3];return t[0]=o+r*(n[0]-o),t[1]=a+r*(n[1]-a),t[2]=i+r*(n[2]-i),t[3]=u+r*(n[3]-u),t},o.random=function(t,e){return e=e||1,t[0]=r.RANDOM(),t[1]=r.RANDOM(),t[2]=r.RANDOM(),t[3]=r.RANDOM(),o.normalize(t,t),o.scale(t,t,e),t},o.transformMat4=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=e[3];return t[0]=n[0]*r+n[4]*o+n[8]*a+n[12]*i,t[1]=n[1]*r+n[5]*o+n[9]*a+n[13]*i,t[2]=n[2]*r+n[6]*o+n[10]*a+n[14]*i,t[3]=n[3]*r+n[7]*o+n[11]*a+n[15]*i,t},o.transformQuat=function(t,e,n){var r=e[0],o=e[1],a=e[2],i=n[0],u=n[1],c=n[2],f=n[3],s=f*r+u*a-c*o,l=f*o+c*r-i*a,d=f*a+i*o-u*r,h=-i*r-u*o-c*a;return t[0]=s*f+h*-i+l*-c-d*-u,t[1]=l*f+h*-u+d*-i-s*-c,t[2]=d*f+h*-c+s*-u-l*-i,t[3]=e[3],t},o.forEach=function(){var t=o.create();return function(e,n,r,o,a,i){var u,c;for(n||(n=4),r||(r=0),c=o?Math.min(o*n+r,e.length):e.length,u=r;c>u;u+=n)t[0]=e[u],t[1]=e[u+1],t[2]=e[u+2],t[3]=e[u+3],a(t,t,i),e[u]=t[0],e[u+1]=t[1],e[u+2]=t[2],e[u+3]=t[3];return e}}(),o.str=function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},t.exports=o},function(t,e,n){var r=n(8),o={};o.create=function(){var t=new r.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},o.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},o.fromValues=function(t,e){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=e,n},o.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},o.set=function(t,e,n){return t[0]=e,t[1]=n,t},o.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},o.subtract=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},o.sub=o.subtract,o.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},o.mul=o.multiply,o.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},o.div=o.divide,o.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},o.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},o.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},o.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},o.distance=function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)},o.dist=o.distance,o.squaredDistance=function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r},o.sqrDist=o.squaredDistance,o.length=function(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)},o.len=o.length,o.squaredLength=function(t){var e=t[0],n=t[1];return e*e+n*n},o.sqrLen=o.squaredLength,o.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},o.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},o.normalize=function(t,e){var n=e[0],r=e[1],o=n*n+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o),t},o.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},o.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},o.lerp=function(t,e,n,r){var o=e[0],a=e[1];return t[0]=o+r*(n[0]-o),t[1]=a+r*(n[1]-a),t},o.random=function(t,e){e=e||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},o.transformMat2=function(t,e,n){var r=e[0],o=e[1];return t[0]=n[0]*r+n[2]*o,t[1]=n[1]*r+n[3]*o,t},o.transformMat2d=function(t,e,n){var r=e[0],o=e[1];return t[0]=n[0]*r+n[2]*o+n[4],t[1]=n[1]*r+n[3]*o+n[5],t},o.transformMat3=function(t,e,n){var r=e[0],o=e[1];return t[0]=n[0]*r+n[3]*o+n[6],t[1]=n[1]*r+n[4]*o+n[7],t},o.transformMat4=function(t,e,n){var r=e[0],o=e[1];return t[0]=n[0]*r+n[4]*o+n[12],t[1]=n[1]*r+n[5]*o+n[13],t},o.forEach=function(){var t=o.create();return function(e,n,r,o,a,i){var u,c;for(n||(n=2),r||(r=0),c=o?Math.min(o*n+r,e.length):e.length,u=r;c>u;u+=n)t[0]=e[u],t[1]=e[u+1],a(t,t,i),e[u]=t[0],e[u+1]=t[1];return e}}(),o.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},t.exports=o},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={init:function(t,e){for(var n=t.length;n--;)t[n]=e},shuffle:function(t){var e,n,r=t.length-1;for(r;r>=0;r--)e=Math.floor(Math.random()*r),n=t[r],t[r]=t[e],t[e]=n;return t},toPointList:function(t){var e,n,r=[],o=[];for(e=0;e=e&&o.push(t[r]);return o},maxIndex:function(t){var e,n=0;for(e=0;et[n]&&(n=e);return n},max:function n(t){var e,n=0;for(e=0;en&&(n=t[e]);return n},sum:function r(t){for(var e=t.length,r=0;e--;)r+=t[e];return r}},t.exports=e["default"]},function(t,e,n){(function(r){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}function a(){var t;m=g.halfSample?new D["default"]({x:w.size.x/2|0,y:w.size.y/2|0}):w,A=S["default"].calculatePatchSize(g.patchSize,m.size),G.x=m.size.x/A.x|0,G.y=m.size.y/A.y|0,E=new D["default"](m.size,void 0,Uint8Array,!1),x=new D["default"](A,void 0,Array,!0),t=new ArrayBuffer(65536),y=new D["default"](A,new Uint8Array(t,0,A.x*A.y)),_=new D["default"](A,new Uint8Array(t,A.x*A.y*3,A.x*A.y),void 0,!0),C=q["default"]("undefined"!=typeof window?window:"undefined"!=typeof self?self:r,{size:A.x},t),R=new D["default"]({x:m.size.x/y.size.x|0,y:m.size.y/y.size.y|0},void 0,Array,!0),M=new D["default"](R.size,void 0,void 0,!0),b=new D["default"](R.size,void 0,Int32Array,!0)}function i(){g.useWorker||"undefined"==typeof document||(F.dom.binary=document.createElement("canvas"),F.dom.binary.className="binaryBuffer",F.ctx.binary=F.dom.binary.getContext("2d"),F.dom.binary.width=E.size.x,F.dom.binary.height=E.size.y)}function u(t){var e,n,r,o,a,i,u,c=E.size.x,f=E.size.y,s=-E.size.x,l=-E.size.y;for(e=0,n=0;ne&&(e+=180),e=(180-e)*Math.PI/180,a=W.mat2.clone([Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e)]),n=0;nr;r++)W.vec2.transformMat2(o.box[r],o.box[r],a);for(n=0;nr;r++)o.box[r][0]s&&(s=o.box[r][0]),o.box[r][1]l&&(l=o.box[r][1]);for(i=[[c,f],[s,f],[s,l],[c,l]],u=g.halfSample?2:1,a=W.mat2.invert(a,a),r=0;4>r;r++)W.vec2.transformMat2(i[r],i[r],a);for(r=0;4>r;r++)W.vec2.scale(i[r],i[r],u);return i}function c(){S["default"].otsuThreshold(m,E),E.zeroBorder(),g.showCanvas&&E.show(F.dom.binary,255)}function f(){var t,e,n,r,o,a,i,u=[];for(t=0;te;e++)r.push(0);for(n=b.data.length;n--;)b.data[n]>0&&r[b.data[n]-1]++;return r=r.map(function(t,e){return{val:t,label:e+1}}),r.sort(function(t,e){return e.val-t.val}),o=r.filter(function(t){return t.val>=5})}function l(t,e){var n,r,o,a,i=[],c=[];for(n=0;n=2){for(o=0;os&&c.push(t[o]);if(c.length>=2){for(i=d(c),a=0,o=0;o1&&i.length>=c.length/4*3&&i.length>t.length/4&&(a/=i.length,u={index:e[1]*G.x+e[0],pos:{x:n,y:r},box:[W.vec2.clone([n,r]),W.vec2.clone([n+y.size.x,r]),W.vec2.clone([n+y.size.x,r+y.size.y]),W.vec2.clone([n,r+y.size.y])],moments:i,rad:a,vec:W.vec2.clone([Math.cos(a),Math.sin(a)])},f.push(u))}}return f}function v(t){function e(){var t;for(t=0;ti&&n(u)):b.data[u]=Number.MAX_VALUE}var r,o,a=0,i=.95,u=0;for(I["default"].init(M.data,0),I["default"].init(b.data,0),I["default"].init(R.data,null),r=0;rr?null:(e=s(r),0===e.length?null:n=l(e,r))},checkImageConstraints:function(t,e){var n,r,o,a=t.getWidth(),i=t.getHeight(),u=e.halfSample?.5:1;if(t.getConfig().area&&(o=S["default"].computeImageArea(a,i,t.getConfig().area),t.setTopRight({x:o.sx,y:o.sy}),t.setCanvasSize({x:a,y:i}),a=o.sw,i=o.sh),r={x:Math.floor(a*u),y:Math.floor(i*u)},n=S["default"].calculatePatchSize(e.patchSize,r),t.setWidth(Math.floor(Math.floor(r.x/n.x)*(1/u)*n.x)),t.setHeight(Math.floor(Math.floor(r.y/n.y)*(1/u)*n.y)),t.getWidth()%n.x===0&&t.getHeight()%n.y===0)return!0;throw new Error("Image dimensions do not comply with the current settings: Width ("+a+" )and height ("+i+") must a multiple of "+n.x)}},t.exports=e["default"]}).call(e,function(){return this}())},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={drawRect:function(t,e,n,r){n.strokeStyle=r.color,n.fillStyle=r.color,n.lineWidth=1,n.beginPath(),n.strokeRect(t.x,t.y,e.x,e.y)},drawPath:function(t,e,n,r){n.strokeStyle=r.color,n.fillStyle=r.color,n.lineWidth=r.lineWidth,n.beginPath(),n.moveTo(t[0][e.x],t[0][e.y]);for(var o=1;o_;_++)y[_]=0;for(y[0]=n[0],v=null,d=1;u-1>d;d++)for(s=0,a=y[0],l=1;o-1>l;l++)if(m=d*o+l,0===r[m])if(e=n[m],e!==a){if(0===s)f=x+1,y[f]=e,a=e,h=c.contourTracing(d,l,f,e,i.DIR.OUTSIDE_EDGE),null!==h&&(x++,s=f,p=i.createContour2D(),p.dir=i.CONTOUR_DIR.CW_DIR,p.index=s,p.firstVertex=h,p.nextpeer=v,p.insideContours=null,null!==v&&(v.prevpeer=p),v=p);else if(h=c.contourTracing(d,l,i.DIR.INSIDE_EDGE,e,s),null!==h){for(p=i.createContour2D(),p.firstVertex=h,p.insideContours=null,0===t?p.dir=i.CONTOUR_DIR.CCW_DIR:p.dir=i.CONTOUR_DIR.CW_DIR,p.index=t,g=v;null!==g&&g.index!==s;)g=g.nextpeer;null!==g&&(p.nextpeer=g.insideContours,null!==g.insideContours&&(g.insideContours.prevpeer=p),g.insideContours=p)}}else r[m]=s;else r[m]===i.DIR.OUTSIDE_EDGE||r[m]===i.DIR.INSIDE_EDGE?(s=0,a=r[m]===i.DIR.INSIDE_EDGE?n[m]:y[0]):(s=r[m],a=y[s]);for(g=v;null!==g;)g.index=t,g=g.nextpeer;return{cc:v,count:x}},debug:{drawContour:function(t,e){var n,r,o,a=t.getContext("2d"),u=e;for(a.strokeStyle="red",a.fillStyle="red",a.lineWidth=1,n=null!==u?u.insideContours:null;null!==u;){switch(null!==n?(r=n,n=n.nextpeer):(r=u,u=u.nextpeer,n=null!==u?u.insideContours:null),r.dir){case i.CONTOUR_DIR.CW_DIR:a.strokeStyle="red";break;case i.CONTOUR_DIR.CCW_DIR:a.strokeStyle="blue";break;case i.CONTOUR_DIR.UNKNOWN_DIR:a.strokeStyle="green"}o=r.firstVertex,a.beginPath(),a.moveTo(o.x,o.y);do o=o.next,a.lineTo(o.x,o.y);while(o!==r.firstVertex);a.stroke()}}}}}};e["default"]=i,t.exports=e["default"]},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={searchDirections:[[0,1],[1,1],[1,0],[1,-1],[0,-1],[-1,-1],[-1,0],[-1,1]],create:function(t,e){function n(t,e,n,r){var o,s,l;for(o=0;7>o;o++){if(s=t.cy+c[t.dir][0],l=t.cx+c[t.dir][1],a=s*f+l,i[a]===e&&(0===u[a]||u[a]===n))return u[a]=n,t.cy=s,t.cx=l,!0;0===u[a]&&(u[a]=r),t.dir=(t.dir+1)%8}return!1}function r(t,e,n){return{dir:n,x:t,y:e,next:null,prev:null}}function o(t,e,o,a,i){var u,c,f,s=null,l={cx:e,cy:t,dir:0};if(n(l,a,o,i)){s=r(e,t,l.dir),u=s,f=l.dir,c=r(l.cx,l.cy,0),c.prev=u,u.next=c,c.next=null,u=c;do l.dir=(l.dir+6)%8,n(l,a,o,i),f!==l.dir?(u.dir=l.dir,c=r(l.cx,l.cy,0),c.prev=u,u.next=c,c.next=null,u=c):(u.dir=f,u.x=l.cx,u.y=l.cy),f=l.dir;while(l.cx!==e||l.cy!==t);s.prev=u.prev,u.prev.next=s}return s}var a,i=t.data,u=e.data,c=this.searchDirections,f=t.size.x;return{trace:function(t,e,r,o){return n(t,e,r,o)},contourTracing:function(t,e,n,r,a){return o(t,e,n,r,a)}}}};e["default"]=n,t.exports=e["default"]},function(module, exports) {"use strict";Object.defineProperty(exports, "__esModule", {value: true});function Skeletonizer(stdlib, foreign, buffer) {"use asm";var images=new stdlib.Uint8Array(buffer),size=foreign.size|0,imul=stdlib.Math.imul;function erode(inImagePtr, outImagePtr) {inImagePtr=inImagePtr|0;outImagePtr=outImagePtr|0;var v=0,u=0,sum=0,yStart1=0,yStart2=0,xStart1=0,xStart2=0,offset=0;for (v=1; (v|0)<(size - 1|0); v=v+1|0) {offset=offset+size|0;for (u=1; (u|0)<(size - 1|0); u=u+1|0) {yStart1=offset - size|0;yStart2=offset+size|0;xStart1=u - 1|0;xStart2=u+1|0;sum=(images[inImagePtr+yStart1+xStart1|0]|0)+(images[inImagePtr+yStart1+xStart2|0]|0)+(images[inImagePtr+offset+u|0]|0)+(images[inImagePtr+yStart2+xStart1|0]|0)+(images[inImagePtr+yStart2+xStart2|0]|0)|0;if ((sum|0) == (5|0)) {images[outImagePtr+offset+u|0]=1;} else {images[outImagePtr+offset+u|0]=0;}}}return;}function subtract(aImagePtr, bImagePtr, outImagePtr) {aImagePtr=aImagePtr|0;bImagePtr=bImagePtr|0;outImagePtr=outImagePtr|0;var length=0;length=imul(size, size)|0;while ((length|0)>0) {length=length - 1|0;images[outImagePtr+length|0]=(images[aImagePtr+length|0]|0) - (images[bImagePtr+length|0]|0)|0;}}function bitwiseOr(aImagePtr, bImagePtr, outImagePtr) {aImagePtr=aImagePtr|0;bImagePtr=bImagePtr|0;outImagePtr=outImagePtr|0;var length=0;length=imul(size, size)|0;while ((length|0)>0) {length=length - 1|0;images[outImagePtr+length|0]=images[aImagePtr+length|0]|0|(images[bImagePtr+length|0]|0)|0;}}function countNonZero(imagePtr) {imagePtr=imagePtr|0;var sum=0,length=0;length=imul(size, size)|0;while ((length|0)>0) {length=length - 1|0;sum=(sum|0)+(images[imagePtr+length|0]|0)|0;}return sum|0;}function init(imagePtr, value) {imagePtr=imagePtr|0;value=value|0;var length=0;length=imul(size, size)|0;while ((length|0)>0) {length=length - 1|0;images[imagePtr+length|0]=value;}}function dilate(inImagePtr, outImagePtr) {inImagePtr=inImagePtr|0;outImagePtr=outImagePtr|0;var v=0,u=0,sum=0,yStart1=0,yStart2=0,xStart1=0,xStart2=0,offset=0;for (v=1; (v|0)<(size - 1|0); v=v+1|0) {offset=offset+size|0;for (u=1; (u|0)<(size - 1|0); u=u+1|0) {yStart1=offset - size|0;yStart2=offset+size|0;xStart1=u - 1|0;xStart2=u+1|0;sum=(images[inImagePtr+yStart1+xStart1|0]|0)+(images[inImagePtr+yStart1+xStart2|0]|0)+(images[inImagePtr+offset+u|0]|0)+(images[inImagePtr+yStart2+xStart1|0]|0)+(images[inImagePtr+yStart2+xStart2|0]|0)|0;if ((sum|0)>(0|0)) {images[outImagePtr+offset+u|0]=1;} else {images[outImagePtr+offset+u|0]=0;}}}return;}function memcpy(srcImagePtr, dstImagePtr) {srcImagePtr=srcImagePtr|0;dstImagePtr=dstImagePtr|0;var length=0;length=imul(size, size)|0;while ((length|0)>0) {length=length - 1|0;images[dstImagePtr+length|0]=images[srcImagePtr+length|0]|0;}}function zeroBorder(imagePtr) {imagePtr=imagePtr|0;var x=0,y=0;for (x=0; (x|0)<(size - 1|0); x=x+1|0) {images[imagePtr+x|0]=0;images[imagePtr+y|0]=0;y=y+size - 1|0;images[imagePtr+y|0]=0;y=y+1|0;}for (x=0; (x|0)<(size|0); x=x+1|0) {images[imagePtr+y|0]=0;y=y+1|0;}}function skeletonize() {var subImagePtr=0,erodedImagePtr=0,tempImagePtr=0,skelImagePtr=0,sum=0,done=0;erodedImagePtr=imul(size, size)|0;tempImagePtr=erodedImagePtr+erodedImagePtr|0;skelImagePtr=tempImagePtr+erodedImagePtr|0;init(skelImagePtr, 0);zeroBorder(subImagePtr);do {erode(subImagePtr, erodedImagePtr);dilate(erodedImagePtr, tempImagePtr);subtract(subImagePtr, tempImagePtr, tempImagePtr);bitwiseOr(skelImagePtr, tempImagePtr, skelImagePtr);memcpy(erodedImagePtr, subImagePtr);sum=countNonZero(subImagePtr)|0;done=(sum|0) == 0|0;} while (!done);}return {skeletonize: skeletonize};}exports["default"]=Skeletonizer;module.exports=exports["default"]; },function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(24),a=r(o),i=n(19),u=(r(i),n(25)),c=r(u),f=n(27),s=r(f),l=n(28),d=r(l),h=n(29),p=r(h),v=n(30),g=r(v),m=n(31),_=r(m),y=n(32),x=r(y),M=n(33),b=r(M),R=n(34),E=r(R),A={code_128_reader:c["default"],ean_reader:s["default"],ean_8_reader:x["default"],code_39_reader:d["default"],code_39_vin_reader:p["default"],codabar_reader:g["default"],upc_reader:_["default"],upc_e_reader:b["default"],i2of5_reader:E["default"]};e["default"]={create:function(t,e){function n(){}function r(){t.readers.forEach(function(t){var e,n={};"object"==typeof t?(e=t.format,n=t.config):"string"==typeof t&&(e=t),h.push(new A[e](n))})}function o(){}function i(t,n,r){function o(e){var r={y:e*Math.sin(n),x:e*Math.cos(n)};t[0].y-=r.y,t[0].x-=r.x,t[1].y+=r.y,t[1].x+=r.x}for(o(r);r>1&&(!e.inImageWithBorder(t[0],0)||!e.inImageWithBorder(t[1],0));)r-=Math.ceil(r/2),o(-r);return t}function u(t){return[{x:(t[1][0]-t[0][0])/2+t[0][0],y:(t[1][1]-t[0][1])/2+t[0][1]},{x:(t[3][0]-t[2][0])/2+t[2][0],y:(t[3][1]-t[2][1])/2+t[2][1]}]}function c(t){var n,r=null,o=a["default"].getBarcodeLine(e,t[0],t[1]);for(a["default"].toBinaryLine(o),n=0;nr&&null===f;r++)o=i/u*r*(r%2===0?-1:1),a={y:o*s,x:o*l},e[0].y+=a.x,e[0].x-=a.y,e[1].y+=a.x,e[1].x-=a.y,f=c(e);return f}function s(t){return Math.sqrt(Math.pow(Math.abs(t[1].y-t[0].y),2)+Math.pow(Math.abs(t[1].x-t[0].x),2))}function l(t){var e,n,r,o;d.ctx.overlay;return e=u(t),o=s(e),n=Math.atan2(e[1].y-e[0].y,e[1].x-e[0].x),e=i(e,n,Math.floor(.1*o)),null===e?null:(r=c(e),null===r&&(r=f(t,e,n)),null===r?null:{codeResult:r.codeResult,line:e,angle:n,pattern:r.barcodeLine.line,threshold:r.barcodeLine.threshold})}var d={ctx:{frequency:null,pattern:null,overlay:null},dom:{frequency:null,pattern:null,overlay:null}},h=[];return n(),r(),o(),{decodeFromBoundingBox:function(t){return l(t)},decodeFromBoundingBoxes:function(e){var n,r,o=[],a=t.multiple;for(n=0;nl?l:M,b=l>b?l:b,m.push(l)}var o,a,i,u,c,f,s,l,d=0|e.x,h=0|e.y,p=0|n.x,v=0|n.y,g=Math.abs(v-h)>Math.abs(p-d),m=[],_=t.data,y=t.size.x,x=0,M=255,b=0;for(g&&(f=d,d=h,h=f,f=p,p=v,v=f),d>p&&(f=d,d=p,p=f,f=h,h=v,v=f),o=p-d,a=Math.abs(v-h),i=o/2|0,c=h,u=v>h?1:-1,s=d;p>s;s++)g?r(c,s):r(s,c),i-=a,0>i&&(c+=u,i+=o);return{line:m,min:M,max:b}},c.toOtsuBinaryLine=function(t){var e=t.line,n=new u["default"]({x:e.length-1,y:1},e),r=a["default"].determineOtsuThreshold(n,5);return e=a["default"].sharpenLine(e),a["default"].thresholdImage(n,r),{line:e,threshold:r}},c.toBinaryLine=function(t){var e,n,r,o,a,i,u=t.min,c=t.max,s=t.line,l=u+(c-u)/2,d=[],h=(c-u)/12,p=-h;for(r=s[0]>l?f.DIR.UP:f.DIR.DOWN,d.push({pos:0,val:s[0]}),a=0;ae+n&&s[a+1]<1.5*l?f.DIR.DOWN:e+n>h&&s[a+1]>.5*l?f.DIR.UP:r,r!==o&&(d.push({pos:a,val:s[a]}),r=o);for(d.push({pos:s.length,val:s[s.length-1]}),i=d[0].pos;il?0:1;for(a=1;ad[a].val?d[a].val+(d[a+1].val-d[a].val)/3*2|0:d[a+1].val+(d[a].val-d[a+1].val)/3|0,i=d[a].pos;ih?0:1;return{line:s,threshold:h}},c.debug={printFrequency:function(t,e){var n,r=e.getContext("2d");for(e.width=t.length,e.height=256,r.beginPath(),r.strokeStyle="blue",n=0;nr;r++)i[r]=i[r+2];i[4]=0,i[5]=0,s--}else s++;i[s]=1,f=!f}return null},o.prototype._decode=function(){var t,e,n=this,r=n._findStart(),o=null,a=!1,i=[],u=0,c=0,f=[],s=[],l=!1,d=!0;if(null===r)return null;switch(o={code:r.code,start:r.start,end:r.end},s.push(o),c=o.code,o.code){case n.START_CODE_A:t=n.CODE_A;break;case n.START_CODE_B:t=n.CODE_B;break;case n.START_CODE_C:t=n.CODE_C;break;default:return null}for(;!a;){if(e=l,l=!1,o=n._decodeCode(o.end),null!==o)switch(o.code!==n.STOP_CODE&&(d=!0),o.code!==n.STOP_CODE&&(f.push(o.code),u++,c+=u*o.code),s.push(o),t){case n.CODE_A:if(o.code<64)i.push(String.fromCharCode(32+o.code));else if(o.code<96)i.push(String.fromCharCode(o.code-64));else switch(o.code!==n.STOP_CODE&&(d=!1),o.code){case n.CODE_SHIFT:l=!0,t=n.CODE_B;break;case n.CODE_B:t=n.CODE_B;break;case n.CODE_C:t=n.CODE_C;break;case n.STOP_CODE:a=!0}break;case n.CODE_B:if(o.code<96)i.push(String.fromCharCode(32+o.code));else switch(o.code!==n.STOP_CODE&&(d=!1),o.code){case n.CODE_SHIFT:l=!0,t=n.CODE_A;break;case n.CODE_A:t=n.CODE_A;break;case n.CODE_C:t=n.CODE_C;break;case n.STOP_CODE:a=!0}break;case n.CODE_C:if(o.code<100)i.push(o.code<10?"0"+o.code:o.code);else switch(o.code!==n.STOP_CODE&&(d=!1),o.code){case n.CODE_A:t=n.CODE_A;break;case n.CODE_B:t=n.CODE_B;break;case n.STOP_CODE:a=!0}}else a=!0;e&&(t=t===n.CODE_A?n.CODE_B:n.CODE_A)}return null===o?null:(o.end=n._nextUnset(n._row,o.end),n._verifyTrailingWhitespace(o)?(c-=u*f[f.length-1],c%103!==f[f.length-1]?null:i.length?(d&&i.splice(i.length-1,1),{code:i.join(""),start:r.start,end:o.end,codeset:t,startInfo:r,decodedCodes:s,endInfo:o}):null):null)},i["default"].prototype._verifyTrailingWhitespace=function(t){var e,n=this;return e=t.end+(t.end-t.start)/2,ei)return Number.MAX_VALUE;r+=o}return r/a},n.prototype._nextSet=function(t,e){var n;for(e=e||0,n=e;n1)for(n=0;nr?(f.start=n-i,f.end=n,f.counter=o,f):null;c++,o[c]=1,u=!u}}else for(o.push(0),n=i;nt?0:t,r=t;e>r;r++)if(this._row[r]!==n)return!1;return!0},n.prototype._fillCounters=function(t,e,n){var r,o=this,a=0,i=[];for(n="undefined"!=typeof n?n:!0,t="undefined"!=typeof t?t:o._nextUnset(o._row),e=e||o._row.length,i[a]=0,r=t;e>r;r++)o._row[r]^n?i[a]++:(a++,i[a]=1,n=!n);return i},Object.defineProperty(n.prototype,"FORMAT",{value:"unknown",writeable:!1}),n.DIRECTION={FORWARD:1,REVERSE:-1},n.Exception={StartNotFoundException:"Start-Info was not found!",CodeNotFoundException:"Code could not be found!",PatternNotFoundException:"Pattern could not be found!"},n.CONFIG_KEYS={},e["default"]=n,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){i["default"].call(this,t)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(26),i=r(a),u={CODE_L_START:{value:0},MODULO:{value:7},CODE_G_START:{value:10},START_PATTERN:{value:[1/3*7,1/3*7,1/3*7]},STOP_PATTERN:{value:[1/3*7,1/3*7,1/3*7]},MIDDLE_PATTERN:{value:[.2*7,.2*7,.2*7,.2*7,.2*7]},CODE_PATTERN:{value:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2],[1,1,2,3],[1,2,2,2],[2,2,1,2],[1,1,4,1],[2,3,1,1],[1,3,2,1],[4,1,1,1],[2,1,3,1],[3,1,2,1],[2,1,1,3]]},CODE_FREQUENCY:{value:[0,11,13,14,19,25,28,21,22,26]},SINGLE_CODE_ERROR:{value:.67},AVG_CODE_ERROR:{value:.27},FORMAT:{value:"ean_13",writeable:!1}};o.prototype=Object.create(i["default"].prototype,u),o.prototype.constructor=o,o.prototype._decodeCode=function(t,e){var n,r,o,a,i=[0,0,0,0],u=this,c=t,f=!u._row[c],s=0,l={error:Number.MAX_VALUE,code:-1,start:t,end:t};for(e||(e=u.CODE_PATTERN.length),n=c;nr;r++)o=u._matchPattern(a,u.CODE_PATTERN[r]),ou.AVG_CODE_ERROR?null:l}}else s++;i[s]=1,f=!f}return null},o.prototype._findPattern=function(t,e,n,r,o){var a,i,u,c,f,s=[],l=this,d=0,h={error:Number.MAX_VALUE,code:-1,start:0,end:0};for(e||(e=l._nextSet(l._row)),void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===o&&(o=l.AVG_CODE_ERROR),a=0;ai))return h.error=i,h.start=a-c,h.end=a,h;if(!r)return null;for(u=0;u=0&&n._matchRange(t,e.start,0))return e;r=e.end,e=null}},o.prototype._verifyTrailingWhitespace=function(t){var e,n=this;return e=t.end+(t.end-t.start),er;r++){if(t=a._decodeCode(t.end),!t)return null;t.code>=a.CODE_G_START?(t.code=t.code-a.CODE_G_START,i|=1<<5-r):i|=0<<5-r,e.push(t.code),n.push(t)}if(o=a._calculateFirstDigit(i),null===o)return null;if(e.unshift(o),t=a._findPattern(a.MIDDLE_PATTERN,t.end,!0,!1),null===t)return null;for(n.push(t),r=0;6>r;r++){if(t=a._decodeCode(t.end,a.CODE_G_START),!t)return null;n.push(t),e.push(t.code)}return t},o.prototype._decode=function(){var t,e,n=this,r=[],o=[];return(t=n._findStart())?(e={code:t.code,start:t.start,end:t.end},o.push(e),(e=n._decodePayload(e,r,o))&&(e=n._findEnd(e.end,!1))?(o.push(e),n._checksum(r)?{code:r.join(""),start:t.start,end:e.end,codeset:"",startInfo:t,decodedCodes:o}:null):null):null},o.prototype._checksum=function(t){var e,n=0;for(e=t.length-2;e>=0;e-=2)n+=t[e];for(n*=3,e=t.length-1;e>=0;e-=2)n+=t[e];return n%10===0},e["default"]=o,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){i["default"].call(this)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(26),i=r(a),u=n(17),c=r(u),f={ALPHABETH_STRING:{value:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%"},ALPHABET:{value:[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,45,46,32,42,36,47,43,37]},CHARACTER_ENCODINGS:{value:[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,148,168,162,138,42]},ASTERISK:{value:148},FORMAT:{value:"code_39",writeable:!1}};o.prototype=Object.create(i["default"].prototype,f),o.prototype.constructor=o,o.prototype._toCounters=function(t,e){var n,r=this,o=e.length,a=r._row.length,i=!r._row[t],u=0;for(c["default"].init(e,0),n=t;a>n;n++)if(r._row[n]^i)e[u]++;else{if(u++,u===o)break;e[u]=1,i=!i}return e},o.prototype._decode=function(){var t,e,n,r,o=this,a=[0,0,0,0,0,0,0,0,0],i=[],u=o._findStart();if(!u)return null;r=o._nextSet(o._row,u.end);do{if(a=o._toCounters(r,a),n=o._toPattern(a),0>n)return null;if(t=o._patternToChar(n),0>t)return null;i.push(t),e=r,r+=c["default"].sum(a),r=o._nextSet(o._row,r)}while("*"!==t);return i.pop(),i.length&&o._verifyTrailingWhitespace(e,r,a)?{code:i.join(""),start:u.start,end:r,startInfo:u,decodedCodes:i}:null},o.prototype._verifyTrailingWhitespace=function(t,e,n){var r,o=c["default"].sum(n);return r=e-t-o,3*r>=o?!0:!1},o.prototype._patternToChar=function(t){var e,n=this;for(e=0;ee&&(r=t[n]);return r},o.prototype._toPattern=function(t){for(var e,n,r=t.length,o=0,a=r,i=0,u=this;a>3;){for(o=u._findNextWidth(t,o),a=0,e=0,n=0;r>n;n++)t[n]>o&&(e|=1<n&&a>0;n++)if(t[n]>o&&(a--,2*t[n]>=i))return-1;return e}}return-1},o.prototype._findStart=function(){var t,e,n,r=this,o=r._nextSet(r._row),a=o,i=[0,0,0,0,0,0,0,0,0],u=0,c=!1;for(t=o;te;e++)i[e]=i[e+2];i[7]=0,i[8]=0,u--}else u++;i[u]=1,c=!c}return null},e["default"]=o,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){i["default"].call(this)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(28),i=r(a),u={IOQ:/[IOQ]/g,AZ09:/[A-Z0-9]{17}/};o.prototype=Object.create(i["default"].prototype),o.prototype.constructor=o,o.prototype._decode=function(){var t=i["default"].prototype._decode.apply(this);if(!t)return null;var e=t.code;return e?(e=e.replace(u.IOQ,""),e.match(u.AZ09)&&this._checkChecksum(e)?(t.code=e,t):null):null},o.prototype._checkChecksum=function(t){return!!t},e["default"]=o,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){i["default"].call(this),this._counters=[]}Object.defineProperty(e,"__esModule",{value:!0});var a=n(26),i=r(a),u={ALPHABETH_STRING:{value:"0123456789-$:/.+ABCD"},ALPHABET:{value:[48,49,50,51,52,53,54,55,56,57,45,36,58,47,46,43,65,66,67,68]},CHARACTER_ENCODINGS:{value:[3,6,9,96,18,66,33,36,48,72,12,24,69,81,84,21,26,41,11,14]},START_END:{value:[26,41,11,14]},MIN_ENCODED_CHARS:{value:4},MAX_ACCEPTABLE:{value:2},PADDING:{value:1.5},FORMAT:{value:"codabar",writeable:!1}};o.prototype=Object.create(i["default"].prototype,u),o.prototype.constructor=o,o.prototype._decode=function(){var t,e,n,r,o,a=this,i=[];if(this._counters=a._fillCounters(),t=a._findStart(),!t)return null;r=t.startCounter;do{if(n=a._toPattern(r),0>n)return null;if(e=a._patternToChar(n),0>e)return null;if(i.push(e),r+=8,i.length>1&&a._isStartEnd(n))break}while(ra._counters.length?a._counters.length:r,o=t.start+a._sumCounters(t.startCounter,r-8),{code:i.join(""),start:t.start,end:o,startInfo:t,decodedCodes:i}):null},o.prototype._verifyWhitespace=function(t,e){return(0>=t-1||this._counters[t-1]>=this._calculatePatternLength(t)/2)&&(e+8>=this._counters.length||this._counters[e+7]>=this._calculatePatternLength(e)/2)?!0:!1},o.prototype._calculatePatternLength=function(t){var e,n=0;for(e=t;t+7>e;e++)n+=this._counters[e];return n},o.prototype._thresholdResultPattern=function(t,e){var n,r,o,a,i,u=this,c={space:{narrow:{size:0,counts:0,min:0,max:Number.MAX_VALUE},wide:{size:0,counts:0,min:0,max:Number.MAX_VALUE}},bar:{narrow:{size:0,counts:0,min:0,max:Number.MAX_VALUE},wide:{size:0,counts:0,min:0,max:Number.MAX_VALUE}}},f=e;for(o=0;o=0;a--)n=2===(1&a)?c.bar:c.space,r=1===(1&i)?n.wide:n.narrow,r.size+=u._counters[f+a],r.counts++,i>>=1;f+=8}return["space","bar"].forEach(function(t){var e=c[t];e.wide.min=Math.floor((e.narrow.size/e.narrow.counts+e.wide.size/e.wide.counts)/2),e.narrow.max=Math.ceil(e.wide.min),e.wide.max=Math.ceil((e.wide.size*u.MAX_ACCEPTABLE+u.PADDING)/e.wide.counts)}),c},o.prototype._charToPattern=function(t){var e,n=this,r=t.charCodeAt(0);for(e=0;e=0;r--){if(o=0===(1&r)?f.bar:f.space,a=1===(1&u)?o.wide:o.narrow,i=c._counters[s+r],ia.max)return!1;u>>=1}s+=8}return!0},o.prototype._patternToChar=function(t){var e,n=this;for(e=0;en;n+=2)r=this._counters[n],r>a&&(a=r),o>r&&(o=r);return(o+a)/2|0},o.prototype._toPattern=function(t){var e,n,r,o,a=7,i=t+a,u=1<this._counters.length)return-1;for(e=this._computeAlternatingThreshold(t,i),n=this._computeAlternatingThreshold(t+1,i),r=0;a>r;r++)o=0===(1&r)?e:n,this._counters[t+r]>o&&(c|=u),u>>=1;return c},o.prototype._isStartEnd=function(t){var e;for(e=0;en;n++)r+=this._counters[n];return r},o.prototype._findStart=function(){var t,e,n,r=this,o=r._nextUnset(r._row);for(t=1;tr;r++){if(t=o._decodeCode(t.end,o.CODE_G_START),!t)return null;e.push(t.code),n.push(t)}if(t=o._findPattern(o.MIDDLE_PATTERN,t.end,!0,!1),null===t)return null;for(n.push(t),r=0;4>r;r++){if(t=o._decodeCode(t.end,o.CODE_G_START),!t)return null;n.push(t),e.push(t.code)}return t},e["default"]=o,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){i["default"].call(this)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(27),i=r(a),u={CODE_FREQUENCY:{value:[[56,52,50,49,44,38,35,42,41,37],[7,11,13,14,19,25,28,21,22,26]]},STOP_PATTERN:{value:[1/6*7,1/6*7,1/6*7,1/6*7,1/6*7,1/6*7]},FORMAT:{value:"upc_e",writeable:!1}};o.prototype=Object.create(i["default"].prototype,u),o.prototype.constructor=o,o.prototype._decodePayload=function(t,e,n){var r,o=this,a=0;for(r=0;6>r;r++){if(t=o._decodeCode(t.end),!t)return null;t.code>=o.CODE_G_START&&(t.code=t.code-o.CODE_G_START,a|=1<<5-r),e.push(t.code),n.push(t)}return o._determineParity(a,e)?t:null},o.prototype._determineParity=function(t,e){var n,r;for(r=0;r=n?e.concat(t.slice(1,3)).concat([n,0,0,0,0]).concat(t.slice(3,6)):3===n?e.concat(t.slice(1,4)).concat([0,0,0,0,0]).concat(t.slice(4,6)):4===n?e.concat(t.slice(1,5)).concat([0,0,0,0,0,t[5]]):e.concat(t.slice(1,6)).concat([0,0,0,0,n]),e.push(t[t.length-1]),e},o.prototype._checksum=function(t){return i["default"].prototype._checksum.call(this,this._convertToUPCA(t))},o.prototype._findEnd=function(t,e){return e=!0,i["default"].prototype._findEnd.call(this,t,e)},o.prototype._verifyTrailingWhitespace=function(t){var e,n=this;return e=t.end+(t.end-t.start)/2,ea))return d.error=a,d.start=o-u,d.end=o,d;if(!r)return null;for(i=0;i=0&&n._matchRange(t,e.start,0))return e;r=e.end,e=null}},o.prototype._verifyTrailingWhitespace=function(t){var e,n=this;return e=t.end+(t.end-t.start)/2,ei;){for(r=0;5>r;r++)c[0][r]=t[i]*this.barSpaceRatio[0],c[1][r]=t[i+1]*this.barSpaceRatio[1],i+=2;if(o=a._decodePair(c),!o)return null;for(r=0;r-1&&t%1==0&&r>=t}var r=9007199254740991;t.exports=n},function(t,e){function n(t){return!!t&&"object"==typeof t}t.exports=n},function(t,e,n){var r=n(47),o=n(44),a=n(45),i="[object Array]",u=Object.prototype,c=u.toString,f=r(Array,"isArray"),s=f||function(t){return a(t)&&o(t.length)&&c.call(t)==i};t.exports=s},function(t,e,n){function r(t,e){var n=null==t?void 0:t[e];return o(n)?n:void 0}var o=n(48);t.exports=r},function(t,e,n){function r(t){return null==t?!1:o(t)?s.test(c.call(t)):a(t)&&i.test(t)}var o=n(49),a=n(45),i=/^\[object .+?Constructor\]$/,u=Object.prototype,c=Function.prototype.toString,f=u.hasOwnProperty,s=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},function(t,e,n){function r(t){return o(t)&&u.call(t)==a}var o=n(50),a="[object Function]",i=Object.prototype,u=i.toString;t.exports=r},function(t,e){function n(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function r(t){var e;if(!i(t)||s.call(t)!=u||a(t)||!f.call(t,"constructor")&&(e=t.constructor,"function"==typeof e&&!(e instanceof e)))return!1;var n;return o(t,function(t,e){n=e}),void 0===n||f.call(t,n)}var o=n(52),a=n(40),i=n(45),u="[object Object]",c=Object.prototype,f=c.hasOwnProperty,s=c.toString;t.exports=r},function(t,e,n){function r(t,e){return o(t,e,a)}var o=n(53),a=n(56);t.exports=r},function(t,e,n){var r=n(54),o=r();t.exports=o},function(t,e,n){function r(t){return function(e,n,r){for(var a=o(e),i=r(e),u=i.length,c=t?u:-1;t?c--:++c0;++r-1&&t%1==0&&e>t}var r=/^\d+$/,o=9007199254740991;t.exports=n},function(t,e,n){function r(t){return a(t)&&o(t.length)&&!!D[S.call(t)]}var o=n(44),a=n(45),i="[object Arguments]",u="[object Array]",c="[object Boolean]",f="[object Date]",s="[object Error]",l="[object Function]",d="[object Map]",h="[object Number]",p="[object Object]",v="[object RegExp]",g="[object Set]",m="[object String]",_="[object WeakMap]",y="[object ArrayBuffer]",x="[object Float32Array]",M="[object Float64Array]",b="[object Int8Array]",R="[object Int16Array]",E="[object Int32Array]",A="[object Uint8Array]",w="[object Uint8ClampedArray]",C="[object Uint16Array]",O="[object Uint32Array]",D={};D[x]=D[M]=D[b]=D[R]=D[E]=D[A]=D[w]=D[C]=D[O]=!0,D[i]=D[u]=D[y]=D[c]=D[f]=D[s]=D[l]=D[d]=D[h]=D[p]=D[v]=D[g]=D[m]=D[_]=!1;var T=Object.prototype,S=T.toString;t.exports=r},function(t,e,n){function r(t){return o(t,a(t))}var o=n(60),a=n(56);t.exports=r},function(t,e){function n(t,e,n){n||(n={});for(var r=-1,o=e.length;++r2?n[i-2]:void 0,c=i>2?n[2]:void 0,f=i>1?n[i-1]:void 0;for("function"==typeof u?(u=o(u,f,5),i-=2):(u="function"==typeof f?f:void 0,i-=u?1:0),c&&a(n[0],n[1],c)&&(u=3>i?void 0:u,i=1);++r0?t.videoWidth>0&&t.videoHeight>0?e():window.setTimeout(n,500):e("Unable to play video stream. Is webcam working?"),r--}var r=10;n()}function a(t,e,n){r(t,function(t){e.src=t,f&&e.removeEventListener("loadeddata",f,!1),f=o.bind(null,e,n),e.addEventListener("loadeddata",f,!1),e.play()},function(t){n(t)})}function i(t,e){var n={audio:!1,video:!0},r=s({width:640,height:480,minAspectRatio:0,maxAspectRatio:100,facing:"environment"},t);return"undefined"==typeof MediaStreamTrack||"undefined"==typeof MediaStreamTrack.getSources?(n.video={mediaSource:"camera",width:{min:r.width,max:r.width},height:{min:r.height,max:r.height},require:["width","height"]},e(n)):void MediaStreamTrack.getSources(function(t){for(var o,a=0;a1?a.size:Math.floor(e/o*a.size):e,r=a.size?e/o>1?Math.floor(o/e*a.size):a.size:o,f.x=n,f.y=r}var n,r,o={},a=null,i=["canrecord","ended"],u={},c={x:0,y:0},f={x:0,y:0};return o.getRealWidth=function(){return t.videoWidth},o.getRealHeight=function(){return t.videoHeight},o.getWidth=function(){return n},o.getHeight=function(){return r},o.setWidth=function(t){n=t},o.setHeight=function(t){r=t},o.setInputStream=function(e){a=e,t.src="undefined"!=typeof e.src?e.src:""},o.ended=function(){return t.ended},o.getConfig=function(){return a},o.setAttribute=function(e,n){t.setAttribute(e,n)},o.pause=function(){t.pause()},o.play=function(){t.play()},o.setCurrentTime=function(e){"LiveStream"!==a.type&&(t.currentTime=e)},o.addEventListener=function(e,n,r){-1!==i.indexOf(e)?(u[e]||(u[e]=[]),u[e].push(n)):t.addEventListener(e,n,r)},o.clearEventHandlers=function(){i.forEach(function(e){var n=u[e];n&&n.length>0&&n.forEach(function(n){t.removeEventListener(e,n)})})},o.trigger=function(t,n){var r,a=u[t];if("canrecord"===t&&e(),a&&a.length>0)for(r=0;r1?i.size:Math.floor(u/c*i.size):u,r=i.size?u/c>1?Math.floor(c/u*i.size):i.size:c,x.x=n,x.y=r,l=!0,f=0,setTimeout(function(){e("canrecord",[])},0)},p,h,i.sequence)}function e(t,e){var n,r=_[t];if(r&&r.length>0)for(n=0;nf?f++:setTimeout(function(){g=!0,e("ended",[])},0)),t):null},o},e["default"]=i,t.exports=e["default"]},function(t,e,n){"use strict";function r(t,e){t.onload=function(){e.loaded(this)}}Object.defineProperty(e,"__esModule",{value:!0});var o={};o.load=function(t,e,n,o,a){var i,u,c,f=new Array(o),s=new Array(f.length);if(a===!1)f[0]=t;else for(i=0;i=n&&parseInt(r[n],10)},detectBrowser:function(){var e={};if(e.browser=null,e.version=null,e.minVersion=null,"undefined"==typeof window||!window.navigator)return e.browser="Not a browser.",e;if(navigator.mozGetUserMedia)e.browser="firefox",e.version=this.extractVersion(navigator.userAgent,/Firefox\/([0-9]+)\./,1),e.minVersion=31;else if(navigator.webkitGetUserMedia&&window.webkitRTCPeerConnection)e.browser="chrome",e.version=this.extractVersion(navigator.userAgent,/Chrom(e|ium)\/([0-9]+)\./,2),e.minVersion=38;else{if(!navigator.mediaDevices||!navigator.userAgent.match(/Edge\/(\d+).(\d+)$/))return e.browser="Not a supported browser.",e;e.browser="edge",e.version=this.extractVersion(navigator.userAgent,/Edge\/(\d+).(\d+)$/,2),e.minVersion=10547}return e.versiona)return Number.MAX_VALUE;r+=o}return r/i},r.prototype._nextSet=function(e,t){var n;for(t=t||0,n=t;n1)for(n=0;nr?(u.start=n-a,u.end=n,u.counter=o,u):null;s++,o[s]=1,c=!c}}else for(o.push(0),n=a;ne?0:e,r=e;t>r;r++)if(this._row[r]!==n)return!1;return!0},r.prototype._fillCounters=function(e,t,n){var r,o=this,i=0,a=[];for(n="undefined"!=typeof n?n:!0,e="undefined"!=typeof e?e:o._nextUnset(o._row),t=t||o._row.length,a[i]=0,r=e;t>r;r++)o._row[r]^n?a[i]++:(i++,a[i]=1,n=!n);return a},Object.defineProperty(r.prototype,"FORMAT",{value:"unknown",writeable:!1}),r.DIRECTION={FORWARD:1,REVERSE:-1},r.Exception={StartNotFoundException:"Start-Info was not found!",CodeNotFoundException:"Code could not be found!",PatternNotFoundException:"Pattern could not be found!"},r.CONFIG_KEYS={},t.a=r},function(e,t,n){function r(e){var t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t}e.e=r},function(e,t,n){function r(e){return!!e&&"object"==typeof e}e.e=r},function(e,t,n){t.a={init:function(e,t){for(var n=e.length;n--;)e[n]=t},shuffle:function(e){var t,n,r=e.length-1;for(r;r>=0;r--)t=Math.floor(Math.random()*r),n=e[r],e[r]=e[t],e[t]=n;return e},toPointList:function(e){var t,n,r=[],o=[];for(t=0;t=t&&o.push(e[r]);return o},maxIndex:function(e){var t,n=0;for(t=0;te[n]&&(n=t);return n},max:function r(e){var t,r=0;for(t=0;tr&&(r=e[t]);return r},sum:function o(e){for(var t=e.length,o=0;t--;)o+=e[t];return o}}},function(e,t,n){t.a={drawRect:function(e,t,n,r){n.strokeStyle=r.color,n.fillStyle=r.color,n.lineWidth=1,n.beginPath(),n.strokeRect(e.x,e.y,t.x,t.y)},drawPath:function(e,t,n,r){n.strokeStyle=r.color,n.fillStyle=r.color,n.lineWidth=r.lineWidth,n.beginPath(),n.moveTo(e[0][t.x],e[0][t.y]);for(var o=1;or;r++)o=c._matchPattern(i,c.CODE_PATTERN[r]),oc.AVG_CODE_ERROR?null:d}}else f++;a[f]=1,u=!u}return null},r.prototype._findPattern=function(e,t,n,r,o){var i,a,c,s,u,f=[],d=this,l=0,p={error:Number.MAX_VALUE,code:-1,start:0,end:0};for(t||(t=d._nextSet(d._row)),void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===o&&(o=d.AVG_CODE_ERROR),i=0;ia))return p.error=a,p.start=i-s,p.end=i,p;if(!r)return null;for(c=0;c=0&&n._matchRange(e,t.start,0))return t;r=t.end,t=null}},r.prototype._verifyTrailingWhitespace=function(e){var t,n=this;return t=e.end+(e.end-e.start),tr;r++){if(e=i._decodeCode(e.end),!e)return null;e.code>=i.CODE_G_START?(e.code=e.code-i.CODE_G_START,a|=1<<5-r):a|=0<<5-r,t.push(e.code),n.push(e)}if(o=i._calculateFirstDigit(a),null===o)return null;if(t.unshift(o),e=i._findPattern(i.MIDDLE_PATTERN,e.end,!0,!1),null===e)return null;for(n.push(e),r=0;6>r;r++){if(e=i._decodeCode(e.end,i.CODE_G_START),!e)return null;n.push(e),t.push(e.code)}return e},r.prototype._decode=function(){var e,t,n=this,r=[],o=[];return(e=n._findStart())?(t={code:e.code,start:e.start,end:e.end},o.push(t),(t=n._decodePayload(t,r,o))&&(t=n._findEnd(t.end,!1))?(o.push(t),n._checksum(r)?{code:r.join(""),start:e.start,end:t.end,codeset:"",startInfo:e,decodedCodes:o}:null):null):null},r.prototype._checksum=function(e){var t,n=0;for(t=e.length-2;t>=0;t-=2)n+=e[t];for(n*=3,t=e.length-1;t>=0;t-=2)n+=e[t];return n%10===0},t.a=r},function(e,t,n){function r(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}var o=n(15);e.e=r},function(e,t,n){function r(e,t){var n=e[t];return o(n)?n:void 0}var o=n(140);e.e=r},function(e,t,n){function r(e){var t=typeof e;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=e||null==e}e.e=r},function(e,t,n){var r=n(12),o=r(Object,"create");e.e=o},function(e,t,n){function r(e,t){return e===t||e!==e&&t!==t}e.e=r},function(e,t,n){function r(e){var t=o(e)?s.call(e):"";return t==i||t==a}var o=n(2),i="[object Function]",a="[object GeneratorFunction]",c=Object.prototype,s=c.toString;e.e=r},function(e,t,n){function r(e,t){var n={x:e,y:t,toVec2:function(){return w.clone([this.x,this.y])},toVec3:function(){return C.clone([this.x,this.y,1])},round:function(){return this.x=this.x>0?Math.floor(this.x+.5):Math.floor(this.x-.5),this.y=this.y>0?Math.floor(this.y+.5):Math.floor(this.y-.5),this}};return n}function o(e,t,n){n||(n=e);for(var r=e.data,o=r.length,i=n.data;o--;)i[o]=r[o]>o]++;return a}function a(e,t){function n(e,t){var n,r=0;for(n=e;t>=n;n++)r+=a[n];return r}function r(e,t){var n,r=0;for(n=e;t>=n;n++)r+=n*a[n];return r}function o(){var o,c,s,u,f,d,l,p=[0],h=(1<u;u++)o=n(0,u),c=n(u+1,h),s=o*c,0===s&&(s=1),f=r(0,u)*c,d=r(u+1,h)*o,l=f-d,p[u]=l*l/s;return _.a.maxIndex(p)}t||(t=8);var a,c,s=8-t;return c=o(),c<r;r++)u[r]={score:0,item:null};for(r=0;rs)for(i=u[c],i.score=o,i.item=e[r],s=Number.MAX_VALUE,a=0;t>a;a++)u[a].scorei;){for(r=0;c>r;r++)n[s]=Math.floor((.299*e[4*o+0]+.587*e[4*o+1]+.114*e[4*o+2]+(.299*e[4*(o+1)+0]+.587*e[4*(o+1)+1]+.114*e[4*(o+1)+2])+(.299*e[4*i+0]+.587*e[4*i+1]+.114*e[4*i+2])+(.299*e[4*(i+1)+0]+.587*e[4*(i+1)+1]+.114*e[4*(i+1)+2]))/4),s++,o+=2,i+=2;o+=u,i+=u}}function d(e,t,n){var r,o=e.length/4|0,i=n&&n.singleChannel===!0;if(i)for(r=0;o>r;r++)t[r]=e[4*r+0];else for(r=0;o>r;r++)t[r]=Math.floor(.299*e[4*r+0]+.587*e[4*r+1]+.114*e[4*r+2])}function l(e,t){for(var n=e.data,r=e.size.x,o=t.data,i=0,a=r,c=n.length,s=r/2,u=0;c>a;){for(var f=0;s>f;f++)o[u]=Math.floor((n[i]+n[i+1]+n[a]+n[a+1])/4),u++,i+=2,a+=2;i+=r,a+=r}}function p(e,t){var n=e[0],r=e[1],o=e[2],i=o*r,a=i*(1-Math.abs(n/60%2-1)),c=o-i,s=0,u=0,f=0;return t=t||[0,0,0],60>n?(s=i,u=a):120>n?(s=a,u=i):180>n?(u=i,f=a):240>n?(u=a,f=i):300>n?(s=a,f=i):360>n&&(s=i,f=a),t[0]=255*(s+c)|0,t[1]=255*(u+c)|0,t[2]=255*(f+c)|0,t}function h(e){var t,n=[],r=[];for(t=1;tt[r]?r++:n++;return o}function g(e,t){function n(e){for(var t=0,n=e[Math.floor(e.length/2)];t0&&(n=Math.abs(e[t]-l)>Math.abs(e[t-1]-l)?e[t-1]:e[t]),l/ns[f-1]/s[f]?{x:n,y:n}:null}var r,o=h(t.x),i=h(t.y),a=Math.max(t.x,t.y),c=v(o,i),s=[8,10,15,20,32,60,80],u={"x-small":5,small:4,medium:3,large:2,"x-large":1},f=u[e]||u.medium,d=s[f],l=Math.floor(a/d);return r=n(c),r||(r=n(h(a)),r||(r=n(h(l*d)))),r}function m(e){var t={value:parseFloat(e),unit:(e.indexOf("%")===e.length-1,"%")};return t}function y(e,t,n){var r={width:e,height:t},o=Object.keys(n).reduce(function(e,t){var o=n[t],i=m(o),a=E[t](i,r);return e[t]=a,e},{});return{sx:o.left,sy:o.top,sw:o.right-o.left,sh:o.bottom-o.top}}var b=n(51),_=n(8);t.f=r,t.c=c,t.d=s,t.e=u,t.i=f,t.j=d,t.g=l,t.a=p,t.b=g,t.h=y;var w={clone:n(6)},C={clone:n(78)},E={top:function(e,t){return"%"===e.unit?Math.floor(t.height*(e.value/100)):void 0},right:function(e,t){return"%"===e.unit?Math.floor(t.width-t.width*(e.value/100)):void 0},bottom:function(e,t){return"%"===e.unit?Math.floor(t.height-t.height*(e.value/100)):void 0},left:function(e,t){return"%"===e.unit?Math.floor(t.width*(e.value/100)):void 0}}},function(e,t,n){function r(e,t,n,r){t?this.data=t:n?(this.data=new n(e.x*e.y),n===Array&&r&&a.a.init(this.data,0)):(this.data=new Uint8Array(e.x*e.y),Uint8Array===Array&&r&&a.a.init(this.data,0)),this.size=e}var o=n(53),i=n(17),a=n(8),c={clone:n(6)};r.prototype.inImageWithBorder=function(e,t){return e.x>=t&&e.y>=t&&e.xn;n++)for(r=0;o>r;r++)e.data[r*i+n]=this.data[(t.y+r)*this.size.x+t.x+n]},r.prototype.copyTo=function(e){for(var t=this.data.length,n=this.data,r=e.data;t--;)r[t]=n[t]},r.prototype.get=function(e,t){return this.data[t*this.size.x+e]},r.prototype.getSafe=function(e,t){var n;if(!this.indexMapping){for(this.indexMapping={x:[],y:[]},n=0;ne;e++)r[e]=r[(n-1)*t+e]=0;for(e=1;n-1>e;e++)r[e*t]=r[e*t+(t-1)]=0},r.prototype.invert=function(){for(var e=this.data,t=e.length;t--;)e[t]=e[t]?0:1},r.prototype.convolve=function(e){var t,n,r,o,i=e.length/2|0,a=0;for(n=0;n=o;o++)for(r=-i;i>=r;r++)a+=e[o+i][r+i]*this.getSafe(t+r,n+o);this.data[n*this.size.x+t]=a}},r.prototype.moments=function(e){var t,n,r,o,i,a,s,u,f,d,l,p,h=this.data,v=this.size.y,g=this.size.x,m=[],y=[],b=Math.PI,_=b/4;if(0>=e)return y;for(i=0;e>i;i++)m[i]={m00:0,m01:0,m10:0,m11:0,m02:0,m20:0,theta:0,rad:0};for(n=0;v>n;n++)for(o=n*n,t=0;g>t;t++)r=h[n*g+t],r>0&&(a=m[r-1],a.m00+=1,a.m01+=n,a.m10+=t,a.m11+=t*n,a.m02+=o,a.m20+=t*t);for(i=0;e>i;i++)a=m[i],isNaN(a.m00)||0===a.m00||(d=a.m10/a.m00,l=a.m01/a.m00,s=a.m11/a.m00-d*l,u=a.m02/a.m00-l*l,f=a.m20/a.m00-d*d,p=(u-f)/(2*s),p=.5*Math.atan(p)+(s>=0?_:-_)+b,a.theta=(180*p/b+90)%180-90,a.theta<0&&(a.theta+=180),a.rad=p>b?p-b:p,a.vec=c.clone([Math.cos(p),Math.sin(p)]),y.push(a));return y},r.prototype.show=function(e,t){var n,r,o,i,a,c,s;for(t||(t=1),n=e.getContext("2d"),e.width=this.size.x,e.height=this.size.y,r=n.getImageData(0,0,e.width,e.height),o=r.data,i=0,s=0;st||t>360)&&(t=360);for(var r=[0,1,1],o=[0,0,0],a=[255,255,255],c=[0,0,0],s=[],u=e.getContext("2d"),f=u.getImageData(n.x,n.y,this.size.x,this.size.y),d=f.data,l=this.data.length;l--;)r[0]=this.data[l]*t,s=r[0]<=0?a:r[0]>=360?c:i.a.bind()(r,o),d[4*l+0]=s[0],d[4*l+1]=s[1],d[4*l+2]=s[2],d[4*l+3]=255;u.putImageData(f,n.x,n.y)},t.a=r},function(e,t,n){function r(e,t,n,r){var o=-1,i=e.length;for(r&&i&&(n=e[++o]);++o-1&&e%1==0&&t>e}var o=9007199254740991,i=/^(?:0|[1-9]\d*)$/;e.e=r},function(e,t,n){function r(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||o;return e===n}var o=Object.prototype;e.e=r},function(e,t,n){function r(e){return o(e)&&c.call(e,"callee")&&(!u.call(e,"callee")||s.call(e)==i)}var o=n(26),i="[object Arguments]",a=Object.prototype,c=a.hasOwnProperty,s=a.toString,u=a.propertyIsEnumerable;e.e=r},function(e,t,n){function r(e){return null!=e&&a(o(e))&&!i(e)}var o=n(115),i=n(16),a=n(27);e.e=r},function(e,t,n){function r(e){return i(e)&&o(e)}var o=n(25),i=n(7);e.e=r},function(e,t,n){function r(e){return"number"==typeof e&&e>-1&&e%1==0&&o>=e}var o=9007199254740991;e.e=r},function(e,t,n){var r=n(99),o=n(113),i=o(function(e,t,n){r(e,t,n)});e.e=i},function(e,t,n){var r={searchDirections:[[0,1],[1,1],[1,0],[1,-1],[0,-1],[-1,-1],[-1,0],[-1,1]],create:function(e,t){function n(e,t,n,r){var o,f,d;for(o=0;7>o;o++){if(f=e.cy+s[e.dir][0],d=e.cx+s[e.dir][1],i=f*u+d,a[i]===t&&(0===c[i]||c[i]===n))return c[i]=n,e.cy=f,e.cx=d,!0;0===c[i]&&(c[i]=r),e.dir=(e.dir+1)%8}return!1}function r(e,t,n){return{dir:n,x:e,y:t,next:null,prev:null}}function o(e,t,o,i,a){var c,s,u,f=null,d={cx:t,cy:e,dir:0};if(n(d,i,o,a)){f=r(t,e,d.dir),c=f,u=d.dir,s=r(d.cx,d.cy,0),s.prev=c,c.next=s,s.next=null,c=s;do d.dir=(d.dir+6)%8,n(d,i,o,a),u!==d.dir?(c.dir=d.dir,s=r(d.cx,d.cy,0),s.prev=c,c.next=s,s.next=null,c=s):(c.dir=u,c.x=d.cx,c.y=d.cy),u=d.dir;while(d.cx!==t||d.cy!==e);f.prev=c.prev,c.prev.next=f}return f}var i,a=e.data,c=t.data,s=this.searchDirections,u=e.size.x;return{trace:function(e,t,r,o){return n(e,t,r,o)},contourTracing:function(e,t,n,r,i){return o(e,t,n,r,i)}}}};t.a=r},function(e,t,n){function r(){o.a.call(this)}var o=n(5),i=n(8),a={ALPHABETH_STRING:{value:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%"},ALPHABET:{value:[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,45,46,32,42,36,47,43,37]},CHARACTER_ENCODINGS:{value:[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,148,168,162,138,42]},ASTERISK:{value:148},FORMAT:{value:"code_39",writeable:!1}};r.prototype=Object.create(o.a.prototype,a),r.prototype.constructor=r,r.prototype._toCounters=function(e,t){var n,r=this,o=t.length,a=r._row.length,c=!r._row[e],s=0;for(i.a.init(t,0),n=e;a>n;n++)if(r._row[n]^c)t[s]++;else{if(s++,s===o)break;t[s]=1,c=!c}return t},r.prototype._decode=function(){var e,t,n,r,o=this,a=[0,0,0,0,0,0,0,0,0],c=[],s=o._findStart();if(!s)return null;r=o._nextSet(o._row,s.end);do{if(a=o._toCounters(r,a),n=o._toPattern(a),0>n)return null;if(e=o._patternToChar(n),0>e)return null;c.push(e),t=r,r+=i.a.sum(a),r=o._nextSet(o._row,r)}while("*"!==e);return c.pop(),c.length&&o._verifyTrailingWhitespace(t,r,a)?{code:c.join(""),start:s.start,end:r,startInfo:s,decodedCodes:c}:null},r.prototype._verifyTrailingWhitespace=function(e,t,n){var r,o=i.a.sum(n);return r=t-e-o,3*r>=o},r.prototype._patternToChar=function(e){var t,n=this;for(t=0;tt&&(r=e[n]);return r},r.prototype._toPattern=function(e){for(var t,n,r=e.length,o=0,i=r,a=0,c=this;i>3;){for(o=c._findNextWidth(e,o),i=0,t=0,n=0;r>n;n++)e[n]>o&&(t|=1<n&&i>0;n++)if(e[n]>o&&(i--,2*e[n]>=a))return-1;return t}}return-1},r.prototype._findStart=function(){var e,t,n,r=this,o=r._nextSet(r._row),i=o,a=[0,0,0,0,0,0,0,0,0],c=0,s=!1;for(e=o;et;t++)a[t]=a[t+2];a[7]=0,a[8]=0,c--}else c++;a[c]=1,s=!s}return null},t.a=r},function(e,t,n){function r(e,t){return e[0]*t[0]+e[1]*t[1]}e.e=r},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++tn)return!1;var r=e.length-1;return n==r?e.pop():a.call(e,n,1),!0}var o=n(11),i=Array.prototype,a=i.splice;e.e=r},function(e,t,n){function r(e,t){var n=o(e,t);return 0>n?void 0:e[n][1]}var o=n(11);e.e=r},function(e,t,n){function r(e,t){return o(e,t)>-1}var o=n(11);e.e=r},function(e,t,n){function r(e,t,n){var r=o(e,t);0>r?e.push([t,n]):e[r][1]=n}var o=n(11);e.e=r},function(e,t,n){function r(e){var t=new e.constructor(e.byteLength);return new o(t).set(new o(e)),t}var o=n(84);e.e=r},function(e,t,n){function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n0)for(r=0;r0){if(e=Y.filter(function(e){return!e.busy})[0],!e)return;M.attachData(e.imageData)}else M.attachData(k.data);M.grab()&&(e?(e.busy=!0,e.worker.postMessage({cmd:"process",imageData:e.imageData},[e.imageData.buffer])):g())}else g()}function y(){var e=null,t=1e3/(J.frequency||60);j=!1,function n(r){e=e||r,j||(r>=e&&(e+=t,m()),window.requestAnimFrame(n))}(performance.now())}function b(){K&&"LiveStream"===J.inputStream.type?y():m()}function _(e){var t,n={worker:void 0,imageData:new Uint8Array(A.getWidth()*A.getHeight()),busy:!0};t=C(),n.worker=new Worker(t),n.worker.onmessage=function(r){return"initialized"===r.data.event?(URL.revokeObjectURL(t),n.busy=!1,n.imageData=new Uint8Array(r.data.imageData),e(n)):void("processed"===r.data.event?(n.imageData=new Uint8Array(r.data.imageData),n.busy=!1,v(r.data.result,n.imageData)):"error"===r.data.event)},n.worker.postMessage({cmd:"init",size:{x:A.getWidth(),y:A.getHeight()},imageData:n.imageData,config:J},[n.imageData.buffer])}function w(e){function t(e){self.postMessage({event:"processed",imageData:o.data,result:e},[o.data.buffer])}function n(){self.postMessage({event:"initialized",imageData:o.data},[o.data.buffer])}if(e){var r=e()["default"];if(!r)return void self.postMessage({event:"error",message:"Quagga could not be created"})}var o;self.onmessage=function(e){if("init"===e.data.cmd){var i=e.data.config;i.numOfWorkers=0,o=new r.ImageWrapper({x:e.data.size.x,y:e.data.size.y},new Uint8Array(e.data.imageData)),r.init(i,n,o),r.onProcessed(t)}else"process"===e.data.cmd?(o.data=new Uint8Array(e.data.imageData),r.start()):"setReaders"===e.data.cmd&&r.setReaders(e.data.readers)}}function C(){var t,n;return"undefined"!=typeof e&&(n=e),t=new Blob(["("+w.toString()+")("+n+");"],{type:"text/javascript"}),window.URL.createObjectURL(t)}function E(e){z?z.setReaders(e):K&&Y.length>0&&Y.forEach(function(t){t.worker.postMessage({cmd:"setReaders",readers:e})})}function R(e,t){var n=e-Y.length;if(0===n)return t&&t();if(0>n){var r=Y.slice(n);return r.forEach(function(e){e.worker.terminate()}),Y=Y.slice(0,n),t&&t()}for(var o=function(n){Y.push(n),Y.length>=e&&t&&t()},i=0;n>i;i++)_(o)}var S=r(28),T=S&&S.__esModule?function(){return S["default"]}:function(){return S};Object.defineProperty(T,"a",{get:T});var x=r(54),O=x&&x.__esModule?function(){return x["default"]}:function(){return x};Object.defineProperty(O,"a",{get:O});var D=r(147),P=D&&D.__esModule?function(){return D["default"]}:function(){return D};Object.defineProperty(P,"a",{get:P});var A,M,j,k,I,z,L,N=r(18),U=r(63),F=r(57),G=r(52),B=r(59),W=r(9),V=r(50),H=r(55),q=r(62),X=r(60),$={clone:r(6)},Q={ctx:{image:null,overlay:null},dom:{image:null,overlay:null}},Y=[],K=!0,J={};n["default"]={init:function(e,t,n){return J=T.a.bind()({},H.a,e),n?(K=!1,o(n),t()):void i(t)},start:function(){b()},stop:function(){j=!0,R(0),"LiveStream"===J.inputStream.type&&(B.a.release(),A.clearEventHandlers())},pause:function(){j=!0},onDetected:function(e){G.a.subscribe("detected",e)},offDetected:function(e){G.a.unsubscribe("detected",e)},onProcessed:function(e){G.a.subscribe("processed",e)},offProcessed:function(e){G.a.unsubscribe("processed",e)},setReaders:function(e){E(e)},registerResultCollector:function(e){e&&"function"==typeof e.addResult&&(L=e)},canvas:Q,decodeSingle:function(e,t){var n=this;e=T.a.bind()({inputStream:{type:"ImageStream",sequence:!1,size:800,src:e.src},numOfWorkers:1,locator:{halfSample:!1}},e),this.init(e,function(){G.a.once("processed",function(e){n.stop(),t.call(null,e)},!0),b()})},ImageWrapper:N.a,ImageDebug:W.a,ResultCollector:V.a}},function(e,t,n){function r(e,t){return t?t.some(function(t){return Object.keys(t).every(function(n){return t[n]===e[n]})}):!1}function o(e,t){return"function"==typeof t?t(e):!0}var i=n(9);t.a={create:function(e){function t(t){return s&&t&&!r(t,e.blacklist)&&o(t,e.filter)}var n=document.createElement("canvas"),a=n.getContext("2d"),c=[],s=e.capacity||20,u=e.capture===!0;
+return{addResult:function(e,r,o){var f={};t(o)&&(s--,f.codeResult=o,u&&(n.width=r.x,n.height=r.y,i.a.drawImage(e,r,a),f.frame=n.toDataURL()),c.push(f))},getResults:function(){return c}}}}},function(e,t,n){var r={clone:n(6),dot:n(31)};t.a={create:function(e,t){function n(){o(e),i()}function o(e){s[e.id]=e,a.push(e)}function i(){var e,t=0;for(e=0;et},getPoints:function(){return a},getCenter:function(){return c}}},createPoint:function(e,t,n){return{rad:e[n],point:e,id:t}}}},function(e,t,n){t.a=function(){function e(e){return o[e]||(o[e]={subscribers:[]}),o[e]}function t(){o={}}function n(e,t){e.async?setTimeout(function(){e.callback(t)},4):e.callback(t)}function r(t,n,r){var o;if("function"==typeof n)o={callback:n,async:r};else if(o=n,!o.callback)throw"Callback was not specified on options";e(t).subscribers.push(o)}var o={};return{subscribe:function(e,t,n){return r(e,t,n)},publish:function(t,r){var o=e(t),i=o.subscribers;o.subscribers=i.filter(function(e){return n(e,r),!e.once})},once:function(e,t,n){r(e,{callback:t,async:n,once:!0})},unsubscribe:function(n,r){var o;n?(o=e(n),o&&r?o.subscribers=o.subscribers.filter(function(e){return e.callback!==r}):o.subscribers=[]):t()}}}()},function(e,t,n){function r(e,t,n){n||(n={data:null,size:t}),this.data=n.data,this.originalSize=n.size,this.I=n,this.from=e,this.size=t}r.prototype.show=function(e,t){var n,r,o,i,a,c,s;for(t||(t=1),n=e.getContext("2d"),e.width=this.size.x,e.height=this.size.y,r=n.getImageData(0,0,e.width,e.height),o=r.data,i=0,a=0;a>>16&65535,r=65535&e,o=t>>>16&65535,i=65535&t;return r*i+(n*i+r*o<<16>>>0)|0}},function(e,t,n){var r=void 0;r=n(56),t.a=r},function(e,t,n){e.e={inputStream:{name:"Live",type:"LiveStream",constraints:{width:640,height:480,facingMode:"environment"},area:{top:"0%",right:"0%",left:"0%",bottom:"0%"},singleChannel:!1},locate:!0,numOfWorkers:4,decoder:{readers:["code_128_reader"]},locator:{halfSample:!0,patchSize:"medium"}}},function(e,t,n){var r=n(58),o=(n(9),n(67)),i=n(10),a=n(30),c=n(68),s=n(66),u=n(72),f=n(69),d=n(71),l=n(70),p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},h={code_128_reader:o.a,ean_reader:i.a,ean_8_reader:f.a,code_39_reader:a.a,code_39_vin_reader:c.a,codabar_reader:s.a,upc_reader:u.a,upc_e_reader:d.a,i2of5_reader:l.a};t.a={create:function(e,t){function n(){}function o(){e.readers.forEach(function(e){var t,n={};"object"===("undefined"==typeof e?"undefined":p(e))?(t=e.format,n=e.config):"string"==typeof e&&(t=e),v.push(new h[t](n))})}function i(){}function a(e,n,r){function o(t){var r={y:t*Math.sin(n),x:t*Math.cos(n)};e[0].y-=r.y,e[0].x-=r.x,e[1].y+=r.y,e[1].x+=r.x}for(o(r);r>1&&(!t.inImageWithBorder(e[0],0)||!t.inImageWithBorder(e[1],0));)r-=Math.ceil(r/2),o(-r);return e}function c(e){return[{x:(e[1][0]-e[0][0])/2+e[0][0],y:(e[1][1]-e[0][1])/2+e[0][1]},{x:(e[3][0]-e[2][0])/2+e[2][0],y:(e[3][1]-e[2][1])/2+e[2][1]}]}function s(e){var n,o=null,i=r.a.getBarcodeLine(t,e[0],e[1]);for(r.a.toBinaryLine(i),n=0;nr&&null===u;r++)o=a/c*r*(r%2===0?-1:1),i={y:o*f,x:o*d},t[0].y+=i.x,t[0].x-=i.y,t[1].y+=i.x,t[1].x-=i.y,u=s(t);return u}function f(e){return Math.sqrt(Math.pow(Math.abs(e[1].y-e[0].y),2)+Math.pow(Math.abs(e[1].x-e[0].x),2))}function d(e){var t,n,r,o;l.ctx.overlay;return t=c(e),o=f(t),n=Math.atan2(t[1].y-t[0].y,t[1].x-t[0].x),t=a(t,n,Math.floor(.1*o)),null===t?null:(r=s(t),null===r&&(r=u(e,t,n)),null===r?null:{codeResult:r.codeResult,line:t,angle:n,pattern:r.barcodeLine.line,threshold:r.barcodeLine.threshold})}var l={ctx:{frequency:null,pattern:null,overlay:null},dom:{frequency:null,pattern:null,overlay:null}},v=[];return n(),o(),i(),{decodeFromBoundingBox:function(e){return d(e)},decodeFromBoundingBoxes:function(t){var n,r,o=[],i=e.multiple;for(n=0;nd?d:w,C=d>C?d:C,m.push(d)}var o,i,a,c,s,u,f,d,l=0|t.x,p=0|t.y,h=0|n.x,v=0|n.y,g=Math.abs(v-p)>Math.abs(h-l),m=[],y=e.data,b=e.size.x,_=0,w=255,C=0;for(g&&(u=l,l=p,p=u,u=h,h=v,v=u),l>h&&(u=l,l=h,h=u,u=p,p=v,v=u),o=h-l,i=Math.abs(v-p),a=o/2|0,s=p,c=v>p?1:-1,f=l;h>f;f++)g?r(s,f):r(f,s),a-=i,0>a&&(s+=c,a+=o);return{line:m,min:w,max:C}},r.toBinaryLine=function(e){var t,n,r,i,a,c,s=e.min,u=e.max,f=e.line,d=s+(u-s)/2,l=[],p=(u-s)/12,h=-p;for(r=f[0]>d?o.DIR.UP:o.DIR.DOWN,l.push({pos:0,val:f[0]}),a=0;at+n&&f[a+1]<1.5*d?o.DIR.DOWN:t+n>p&&f[a+1]>.5*d?o.DIR.UP:r,r!==i&&(l.push({pos:a,val:f[a]}),r=i);for(l.push({pos:f.length,val:f[f.length-1]}),c=l[0].pos;cd?0:1;for(a=1;al[a].val?l[a].val+(l[a+1].val-l[a].val)/3*2|0:l[a+1].val+(l[a].val-l[a+1].val)/3|0,c=l[a].pos;cp?0:1;return{line:f,threshold:p}},r.debug={printFrequency:function(e,t){var n,r=t.getContext("2d");for(t.width=e.length,t.height=256,r.beginPath(),r.strokeStyle="blue",n=0;n0?e.videoWidth>0&&e.videoHeight>0?t():window.setTimeout(r,500):n("Unable to play video stream. Is webcam working?"),o--}var o=10;r()})}function o(e,t){return navigator.mediaDevices.getUserMedia(t).then(function(t){return new Promise(function(n,r){l=t,e.src=window.URL.createObjectURL(t),e.onloadedmetadata=function(t){e.play(),n()}})}).then(r.bind(null,e))}function i(e){var t=u.a.bind()(e,["width","height","facingMode","aspectRatio","deviceId"]);return"undefined"!=typeof e.minAspectRatio&&e.minAspectRatio>0&&(t.aspectRatio=e.minAspectRatio,console.log("WARNING: Constraint 'minAspectRatio' is deprecated; Use 'aspectRatio' instead")),"undefined"!=typeof e.facing&&(t.facingMode=e.facing,console.log("WARNING: Constraint 'facing' is deprecated. Use 'facingMode' instead'")),t}function a(e,t){return"undefined"==typeof t.video.deviceId&&e?"undefined"!=typeof MediaStreamTrack&&"undefined"!=typeof MediaStreamTrack.getSources?new Promise(function(n,r){MediaStreamTrack.getSources(function(r){var o=r.filter(function(t){return"video"===t.kind&&t.facing===e})[0];return n(o?d.a.bind()({},t,{video:{deviceId:o.id}}):t)})}):Promise.resolve(d.a.bind()({},t,{video:{facingMode:e}})):Promise.resolve(t)}function c(e){var t={audio:!1,video:i(e)};return a(t.video.facingMode,t)}var s=n(143),u=s&&s.__esModule?function(){return s["default"]}:function(){return s};Object.defineProperty(u,"a",{get:u});var f=n(28),d=f&&f.__esModule?function(){return f["default"]}:function(){return f};Object.defineProperty(d,"a",{get:d});var l;t.a={request:function(e,t){return c(t).then(o.bind(null,e))},release:function(){var e=l&&l.getVideoTracks();e&&e.length&&e[0].stop(),l=null}}},function(e,t,n){var r=n(17),o={};o.create=function(e,t){var n,o={},i=e.getConfig(),a=(r.f.bind()(e.getRealWidth(),e.getRealHeight()),e.getCanvasSize()),c=r.f.bind()(e.getWidth(),e.getHeight()),s=e.getTopRight(),u=s.x,f=s.y,d=null,l=null;return n=t?t:document.createElement("canvas"),n.width=a.x,n.height=a.y,d=n.getContext("2d"),l=new Uint8Array(c.x*c.y),o.attachData=function(e){l=e},o.getData=function(){return l},o.grab=function(){var t,n=i.halfSample,o=e.getFrame();return o?(d.drawImage(o,0,0,a.x,a.y),t=d.getImageData(u,f,c.x,c.y).data,n?r.i.bind()(t,c,l):r.j.bind()(t,l,i),!0):!1},o.getSize=function(){return c},o},t.a=o},function(e,t,n){function r(e,t){e.onload=function(){t.loaded(this)}}var o={};o.load=function(e,t,n,o,i){var a,c,s,u=new Array(o),f=new Array(u.length);if(i===!1)u[0]=e;else for(a=0;a1?i.size:Math.floor(t/o*i.size):t,r=i.size?t/o>1?Math.floor(o/t*i.size):i.size:o,u.x=n,u.y=r}var n,r,o={},i=null,a=["canrecord","ended"],c={},s={x:0,y:0},u={x:0,y:0};return o.getRealWidth=function(){return e.videoWidth},o.getRealHeight=function(){return e.videoHeight},o.getWidth=function(){return n},o.getHeight=function(){return r},o.setWidth=function(e){n=e},o.setHeight=function(e){r=e},o.setInputStream=function(t){i=t,e.src="undefined"!=typeof t.src?t.src:""},o.ended=function(){return e.ended},o.getConfig=function(){return i},o.setAttribute=function(t,n){e.setAttribute(t,n)},o.pause=function(){e.pause()},o.play=function(){e.play()},o.setCurrentTime=function(t){"LiveStream"!==i.type&&(e.currentTime=t)},o.addEventListener=function(t,n,r){-1!==a.indexOf(t)?(c[t]||(c[t]=[]),c[t].push(n)):e.addEventListener(t,n,r)},o.clearEventHandlers=function(){a.forEach(function(t){var n=c[t];n&&n.length>0&&n.forEach(function(n){e.removeEventListener(t,n)})})},o.trigger=function(e,n){var r,i=c[e];if("canrecord"===e&&t(),i&&i.length>0)for(r=0;r1?a.size:Math.floor(c/s*a.size):c,o=a.size?c/s>1?Math.floor(s/c*a.size):a.size:s,_.x=n,_.y=o,d=!0,u=0,setTimeout(function(){t("canrecord",[])},0)},h,p,a.sequence)}function t(e,t){var n,r=y[e];if(r&&r.length>0)for(n=0;nu?u++:setTimeout(function(){g=!0,t("ended",[])},0)),e):null},i},t.a=o},function(e,t,n){(function(e){function r(){var t;v=h.halfSample?new T.a({x:R.size.x/2|0,y:R.size.y/2|0}):R,E=x.b.bind()(h.patchSize,v.size),I.x=v.size.x/E.x|0,I.y=v.size.y/E.y|0,C=new T.a(v.size,void 0,Uint8Array,!1),y=new T.a(E,void 0,Array,!0),t=new ArrayBuffer(65536),m=new T.a(E,new Uint8Array(t,0,E.x*E.y)),g=new T.a(E,new Uint8Array(t,E.x*E.y*3,E.x*E.y),void 0,!0),S=A.a.bind()("undefined"!=typeof window?window:"undefined"!=typeof self?self:e,{size:E.x},t),w=new T.a({x:v.size.x/m.size.x|0,y:v.size.y/m.size.y|0},void 0,Array,!0),b=new T.a(w.size,void 0,void 0,!0),_=new T.a(w.size,void 0,Int32Array,!0)}function o(){h.useWorker||"undefined"==typeof document||(k.dom.binary=document.createElement("canvas"),k.dom.binary.className="binaryBuffer",k.ctx.binary=k.dom.binary.getContext("2d"),k.dom.binary.width=C.size.x,k.dom.binary.height=C.size.y)}function i(e){var t,n,r,o,i,a,c,s=C.size.x,u=C.size.y,f=-C.size.x,d=-C.size.y;for(t=0,n=0;nt&&(t+=180),t=(180-t)*Math.PI/180,i=j.copy(j.create(),[Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t)]),n=0;nr;r++)M.transformMat2(o.box[r],o.box[r],i);for(n=0;nr;r++)o.box[r][0]f&&(f=o.box[r][0]),o.box[r][1]d&&(d=o.box[r][1]);for(a=[[s,u],[f,u],[f,d],[s,d]],c=h.halfSample?2:1,i=j.invert(i,i),r=0;4>r;r++)M.transformMat2(a[r],a[r],i);for(r=0;4>r;r++)M.scale(a[r],a[r],c);return a}function a(){x.c.bind()(v,C),C.zeroBorder(),h.showCanvas&&C.show(k.dom.binary,255)}function c(){var e,t,n,r,o,i,a,c=[];for(e=0;et;t++)r.push(0);for(n=_.data.length;n--;)_.data[n]>0&&r[_.data[n]-1]++;return r=r.map(function(e,t){return{val:e,label:t+1}}),r.sort(function(e,t){return t.val-e.val}),o=r.filter(function(e){return e.val>=5})}function u(e,t){var n,r,o,a,c=[],s=[];for(n=0;n=2){for(o=0;od&&s.push(e[o]);if(s.length>=2){for(a=f(s),i=0,o=0;o1&&a.length>=s.length/4*3&&a.length>e.length/4&&(i/=a.length,c={index:t[1]*I.x+t[0],pos:{x:n,y:r},box:[M.clone([n,r]),M.clone([n+m.size.x,r]),M.clone([n+m.size.x,r+m.size.y]),M.clone([n,r+m.size.y])],moments:a,rad:i,vec:M.clone([Math.cos(i),Math.sin(i)])},u.push(c))}}return u}function p(e){function t(){var e;for(e=0;e<_.data.length;e++)if(0===_.data[e]&&1===b.data[e])return e;return _.length}function n(e){var t,r,o,c,s,u,f={x:e%_.size.x,y:e/_.size.x|0};if(e<_.data.length)for(o=w.data[e],_.data[e]=i,s=0;sa&&n(c)):_.data[c]=Number.MAX_VALUE}var r,o,i=0,a=.95,c=0;for(O.a.init(b.data,0),O.a.init(_.data,0),O.a.init(w.data,null),r=0;rr?null:(t=s(r),0===t.length?null:n=u(t,r))},checkImageConstraints:function(e,t){var n,r,o,i=e.getWidth(),a=e.getHeight(),c=t.halfSample?.5:1;if(e.getConfig().area&&(o=x.h.bind()(i,a,e.getConfig().area),e.setTopRight({x:o.sx,y:o.sy}),e.setCanvasSize({x:i,y:a}),i=o.sw,a=o.sh),r={x:Math.floor(i*c),y:Math.floor(a*c)},n=x.b.bind()(t.patchSize,r),e.setWidth(Math.floor(Math.floor(r.x/n.x)*(1/c)*n.x)),e.setHeight(Math.floor(Math.floor(r.y/n.y)*(1/c)*n.y)),e.getWidth()%n.x===0&&e.getHeight()%n.y===0)return!0;throw new Error("Image dimensions do not comply with the current settings: Width ("+i+" )and height ("+a+") must a multiple of "+n.x)}}}).call(t,function(){return this}())},function(e,t,n){var r=n(29),o={createContour2D:function(){return{dir:null,index:null,firstVertex:null,insideContours:null,nextpeer:null,prevpeer:null}},CONTOUR_DIR:{CW_DIR:0,CCW_DIR:1,UNKNOWN_DIR:2},DIR:{OUTSIDE_EDGE:-32767,INSIDE_EDGE:-32766},create:function(e,t){var n=e.data,i=t.data,a=e.size.x,c=e.size.y,s=r.a.create(e,t);return{rasterize:function(e){var t,r,u,f,d,l,p,h,v,g,m,y,b=[],_=0;for(y=0;400>y;y++)b[y]=0;for(b[0]=n[0],v=null,l=1;c-1>l;l++)for(f=0,r=b[0],d=1;a-1>d;d++)if(m=l*a+d,0===i[m])if(t=n[m],t!==r){if(0===f)u=_+1,b[u]=t,r=t,p=s.contourTracing(l,d,u,t,o.DIR.OUTSIDE_EDGE),null!==p&&(_++,f=u,h=o.createContour2D(),h.dir=o.CONTOUR_DIR.CW_DIR,h.index=f,h.firstVertex=p,h.nextpeer=v,h.insideContours=null,null!==v&&(v.prevpeer=h),v=h);else if(p=s.contourTracing(l,d,o.DIR.INSIDE_EDGE,t,f),null!==p){for(h=o.createContour2D(),h.firstVertex=p,h.insideContours=null,0===e?h.dir=o.CONTOUR_DIR.CCW_DIR:h.dir=o.CONTOUR_DIR.CW_DIR,h.index=e,g=v;null!==g&&g.index!==f;)g=g.nextpeer;null!==g&&(h.nextpeer=g.insideContours,null!==g.insideContours&&(g.insideContours.prevpeer=h),g.insideContours=h)}}else i[m]=f;else i[m]===o.DIR.OUTSIDE_EDGE||i[m]===o.DIR.INSIDE_EDGE?(f=0,r=i[m]===o.DIR.INSIDE_EDGE?n[m]:b[0]):(f=i[m],r=b[f]);for(g=v;null!==g;)g.index=e,g=g.nextpeer;return{cc:v,count:_}},debug:{drawContour:function(e,t){var n,r,i,a=e.getContext("2d"),c=t;for(a.strokeStyle="red",a.fillStyle="red",a.lineWidth=1,n=null!==c?c.insideContours:null;null!==c;){switch(null!==n?(r=n,n=n.nextpeer):(r=c,c=c.nextpeer,n=null!==c?c.insideContours:null),r.dir){case o.CONTOUR_DIR.CW_DIR:a.strokeStyle="red";break;case o.CONTOUR_DIR.CCW_DIR:a.strokeStyle="blue";break;case o.CONTOUR_DIR.UNKNOWN_DIR:a.strokeStyle="green"}i=r.firstVertex,a.beginPath(),a.moveTo(i.x,i.y);do i=i.next,a.lineTo(i.x,i.y);while(i!==r.firstVertex);a.stroke()}}}}}};t.a=o},function(module, exports, __webpack_require__) {function Skeletonizer(stdlib, foreign, buffer) {"use asm";var images=new stdlib.Uint8Array(buffer),size=foreign.size|0,imul=stdlib.Math.imul;function erode(inImagePtr, outImagePtr) {inImagePtr=inImagePtr|0;outImagePtr=outImagePtr|0;var v=0,u=0,sum=0,yStart1=0,yStart2=0,xStart1=0,xStart2=0,offset=0;for (v=1; (v|0)<(size - 1|0); v=v+1|0) {offset=offset+size|0;for (u=1; (u|0)<(size - 1|0); u=u+1|0) {yStart1=offset - size|0;yStart2=offset+size|0;xStart1=u - 1|0;xStart2=u+1|0;sum=(images[inImagePtr+yStart1+xStart1|0]|0)+(images[inImagePtr+yStart1+xStart2|0]|0)+(images[inImagePtr+offset+u|0]|0)+(images[inImagePtr+yStart2+xStart1|0]|0)+(images[inImagePtr+yStart2+xStart2|0]|0)|0;if ((sum|0) == (5|0)) {images[outImagePtr+offset+u|0]=1;} else {images[outImagePtr+offset+u|0]=0;}}}return;}function subtract(aImagePtr, bImagePtr, outImagePtr) {aImagePtr=aImagePtr|0;bImagePtr=bImagePtr|0;outImagePtr=outImagePtr|0;var length=0;length=imul(size, size)|0;while ((length|0)>0) {length=length - 1|0;images[outImagePtr+length|0]=(images[aImagePtr+length|0]|0) - (images[bImagePtr+length|0]|0)|0;}}function bitwiseOr(aImagePtr, bImagePtr, outImagePtr) {aImagePtr=aImagePtr|0;bImagePtr=bImagePtr|0;outImagePtr=outImagePtr|0;var length=0;length=imul(size, size)|0;while ((length|0)>0) {length=length - 1|0;images[outImagePtr+length|0]=images[aImagePtr+length|0]|0|(images[bImagePtr+length|0]|0)|0;}}function countNonZero(imagePtr) {imagePtr=imagePtr|0;var sum=0,length=0;length=imul(size, size)|0;while ((length|0)>0) {length=length - 1|0;sum=(sum|0)+(images[imagePtr+length|0]|0)|0;}return sum|0;}function init(imagePtr, value) {imagePtr=imagePtr|0;value=value|0;var length=0;length=imul(size, size)|0;while ((length|0)>0) {length=length - 1|0;images[imagePtr+length|0]=value;}}function dilate(inImagePtr, outImagePtr) {inImagePtr=inImagePtr|0;outImagePtr=outImagePtr|0;var v=0,u=0,sum=0,yStart1=0,yStart2=0,xStart1=0,xStart2=0,offset=0;for (v=1; (v|0)<(size - 1|0); v=v+1|0) {offset=offset+size|0;for (u=1; (u|0)<(size - 1|0); u=u+1|0) {yStart1=offset - size|0;yStart2=offset+size|0;xStart1=u - 1|0;xStart2=u+1|0;sum=(images[inImagePtr+yStart1+xStart1|0]|0)+(images[inImagePtr+yStart1+xStart2|0]|0)+(images[inImagePtr+offset+u|0]|0)+(images[inImagePtr+yStart2+xStart1|0]|0)+(images[inImagePtr+yStart2+xStart2|0]|0)|0;if ((sum|0)>(0|0)) {images[outImagePtr+offset+u|0]=1;} else {images[outImagePtr+offset+u|0]=0;}}}return;}function memcpy(srcImagePtr, dstImagePtr) {srcImagePtr=srcImagePtr|0;dstImagePtr=dstImagePtr|0;var length=0;length=imul(size, size)|0;while ((length|0)>0) {length=length - 1|0;images[dstImagePtr+length|0]=images[srcImagePtr+length|0]|0;}}function zeroBorder(imagePtr) {imagePtr=imagePtr|0;var x=0,y=0;for (x=0; (x|0)<(size - 1|0); x=x+1|0) {images[imagePtr+x|0]=0;images[imagePtr+y|0]=0;y=y+size - 1|0;images[imagePtr+y|0]=0;y=y+1|0;}for (x=0; (x|0)<(size|0); x=x+1|0) {images[imagePtr+y|0]=0;y=y+1|0;}}function skeletonize() {var subImagePtr=0,erodedImagePtr=0,tempImagePtr=0,skelImagePtr=0,sum=0,done=0;erodedImagePtr=imul(size, size)|0;tempImagePtr=erodedImagePtr+erodedImagePtr|0;skelImagePtr=tempImagePtr+erodedImagePtr|0;init(skelImagePtr, 0);zeroBorder(subImagePtr);do {erode(subImagePtr, erodedImagePtr);dilate(erodedImagePtr, tempImagePtr);subtract(subImagePtr, tempImagePtr, tempImagePtr);bitwiseOr(skelImagePtr, tempImagePtr, skelImagePtr);memcpy(erodedImagePtr, subImagePtr);sum=countNonZero(subImagePtr)|0;done=(sum|0) == 0|0;} while (!done);}return {skeletonize: skeletonize};} exports["a"]=Skeletonizer; },function(e,t,n){function r(){o.a.call(this),this._counters=[]}var o=n(5),i={ALPHABETH_STRING:{value:"0123456789-$:/.+ABCD"},ALPHABET:{value:[48,49,50,51,52,53,54,55,56,57,45,36,58,47,46,43,65,66,67,68]},CHARACTER_ENCODINGS:{value:[3,6,9,96,18,66,33,36,48,72,12,24,69,81,84,21,26,41,11,14]},START_END:{value:[26,41,11,14]},MIN_ENCODED_CHARS:{value:4},MAX_ACCEPTABLE:{value:2},PADDING:{value:1.5},FORMAT:{value:"codabar",writeable:!1}};r.prototype=Object.create(o.a.prototype,i),r.prototype.constructor=r,r.prototype._decode=function(){var e,t,n,r,o,i=this,a=[];if(this._counters=i._fillCounters(),e=i._findStart(),!e)return null;r=e.startCounter;do{if(n=i._toPattern(r),0>n)return null;if(t=i._patternToChar(n),0>t)return null;if(a.push(t),r+=8,a.length>1&&i._isStartEnd(n))break}while(ri._counters.length?i._counters.length:r,o=e.start+i._sumCounters(e.startCounter,r-8),{code:a.join(""),start:e.start,end:o,startInfo:e,decodedCodes:a}):null},r.prototype._verifyWhitespace=function(e,t){return(0>=e-1||this._counters[e-1]>=this._calculatePatternLength(e)/2)&&(t+8>=this._counters.length||this._counters[t+7]>=this._calculatePatternLength(t)/2)},r.prototype._calculatePatternLength=function(e){var t,n=0;for(t=e;e+7>t;t++)n+=this._counters[t];return n},r.prototype._thresholdResultPattern=function(e,t){var n,r,o,i,a,c=this,s={space:{narrow:{size:0,counts:0,min:0,max:Number.MAX_VALUE},wide:{size:0,counts:0,min:0,max:Number.MAX_VALUE}},bar:{narrow:{size:0,counts:0,min:0,max:Number.MAX_VALUE},wide:{size:0,counts:0,min:0,max:Number.MAX_VALUE}}},u=t;for(o=0;o=0;i--)n=2===(1&i)?s.bar:s.space,r=1===(1&a)?n.wide:n.narrow,r.size+=c._counters[u+i],r.counts++,a>>=1;u+=8}return["space","bar"].forEach(function(e){var t=s[e];t.wide.min=Math.floor((t.narrow.size/t.narrow.counts+t.wide.size/t.wide.counts)/2),t.narrow.max=Math.ceil(t.wide.min),t.wide.max=Math.ceil((t.wide.size*c.MAX_ACCEPTABLE+c.PADDING)/t.wide.counts)}),s},r.prototype._charToPattern=function(e){var t,n=this,r=e.charCodeAt(0);for(t=0;t=0;r--){if(o=0===(1&r)?u.bar:u.space,i=1===(1&c)?o.wide:o.narrow,a=s._counters[f+r],ai.max)return!1;c>>=1}f+=8}return!0},r.prototype._patternToChar=function(e){var t,n=this;for(t=0;tn;n+=2)r=this._counters[n],r>i&&(i=r),o>r&&(o=r);return(o+i)/2|0},r.prototype._toPattern=function(e){var t,n,r,o,i=7,a=e+i,c=1<this._counters.length)return-1;for(t=this._computeAlternatingThreshold(e,a),n=this._computeAlternatingThreshold(e+1,a),r=0;i>r;r++)o=0===(1&r)?t:n,this._counters[e+r]>o&&(s|=c),c>>=1;return s},r.prototype._isStartEnd=function(e){var t;for(t=0;tn;n++)r+=this._counters[n];return r},r.prototype._findStart=function(){var e,t,n,r=this,o=r._nextUnset(r._row);for(e=1;er;r++)a[r]=a[r+2];a[4]=0,a[5]=0,f--}else f++;a[f]=1,u=!u}return null},r.prototype._decode=function(){var e,t,n=this,r=n._findStart(),o=null,i=!1,a=[],c=0,s=0,u=[],f=[],d=!1,l=!0;if(null===r)return null;switch(o={code:r.code,start:r.start,end:r.end},f.push(o),s=o.code,o.code){case n.START_CODE_A:e=n.CODE_A;break;case n.START_CODE_B:e=n.CODE_B;break;case n.START_CODE_C:e=n.CODE_C;break;default:return null}for(;!i;){if(t=d,d=!1,o=n._decodeCode(o.end),null!==o)switch(o.code!==n.STOP_CODE&&(l=!0),o.code!==n.STOP_CODE&&(u.push(o.code),c++,s+=c*o.code),f.push(o),e){case n.CODE_A:if(o.code<64)a.push(String.fromCharCode(32+o.code));else if(o.code<96)a.push(String.fromCharCode(o.code-64));else switch(o.code!==n.STOP_CODE&&(l=!1),o.code){case n.CODE_SHIFT:d=!0,e=n.CODE_B;break;case n.CODE_B:e=n.CODE_B;break;case n.CODE_C:e=n.CODE_C;break;case n.STOP_CODE:i=!0}break;case n.CODE_B:if(o.code<96)a.push(String.fromCharCode(32+o.code));else switch(o.code!==n.STOP_CODE&&(l=!1),o.code){case n.CODE_SHIFT:d=!0,e=n.CODE_A;break;case n.CODE_A:e=n.CODE_A;break;case n.CODE_C:e=n.CODE_C;break;case n.STOP_CODE:i=!0}break;case n.CODE_C:if(o.code<100)a.push(o.code<10?"0"+o.code:o.code);else switch(o.code!==n.STOP_CODE&&(l=!1),o.code){case n.CODE_A:e=n.CODE_A;break;case n.CODE_B:e=n.CODE_B;break;case n.STOP_CODE:i=!0}}else i=!0;t&&(e=e===n.CODE_A?n.CODE_B:n.CODE_A)}return null===o?null:(o.end=n._nextUnset(n._row,o.end),n._verifyTrailingWhitespace(o)?(s-=c*u[u.length-1],s%103!==u[u.length-1]?null:a.length?(l&&a.splice(a.length-1,1),{code:a.join(""),start:r.start,end:o.end,codeset:e,startInfo:r,decodedCodes:f,endInfo:o}):null):null)},o.a.prototype._verifyTrailingWhitespace=function(e){var t,n=this;return t=e.end+(e.end-e.start)/2,tr;r++){if(e=o._decodeCode(e.end,o.CODE_G_START),!e)return null;t.push(e.code),n.push(e)}if(e=o._findPattern(o.MIDDLE_PATTERN,e.end,!0,!1),null===e)return null;for(n.push(e),r=0;4>r;r++){if(e=o._decodeCode(e.end,o.CODE_G_START),!e)return null;n.push(e),t.push(e.code)}return e},t.a=r},function(e,t,n){function r(e){e=a.a.bind()(o(),e),c.a.call(this,e),this.barSpaceRatio=[1,1],e.normalizeBarSpaceWidth&&(this.SINGLE_CODE_ERROR=.38,this.AVG_CODE_ERROR=.09)}function o(){var e={};return Object.keys(r.CONFIG_KEYS).forEach(function(t){e[t]=r.CONFIG_KEYS[t]["default"]}),e}var i=n(28),a=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(a,"a",{get:a});var c=n(5),s=1,u=3,f={MODULO:{value:10},START_PATTERN:{value:[2.5*s,2.5*s,2.5*s,2.5*s]},STOP_PATTERN:{value:[2*s,2*s,2*u]},CODE_PATTERN:{value:[[s,s,u,u,s],[u,s,s,s,u],[s,u,s,s,u],[u,u,s,s,s],[s,s,u,s,u],[u,s,u,s,s],[s,u,u,s,s],[s,s,s,u,u],[u,s,s,u,s],[s,u,s,u,s]]},SINGLE_CODE_ERROR:{value:.78,writable:!0},AVG_CODE_ERROR:{value:.38,writable:!0},MAX_CORRECTION_FACTOR:{value:5},FORMAT:{value:"i2of5"}};r.prototype=Object.create(c.a.prototype,f),r.prototype.constructor=r,r.prototype._matchPattern=function(e,t){if(this.config.normalizeBarSpaceWidth){var n,r=[0,0],o=[0,0],i=[0,0],a=this.MAX_CORRECTION_FACTOR,s=1/a;for(n=0;ni))return l.error=i,l.start=o-c,l.end=o,l;if(!r)return null;for(a=0;a=0&&n._matchRange(e,t.start,0))return t;r=t.end,t=null}},r.prototype._verifyTrailingWhitespace=function(e){var t,n=this;return t=e.end+(e.end-e.start)/2,ta;){for(r=0;5>r;r++)s[0][r]=e[a]*this.barSpaceRatio[0],s[1][r]=e[a+1]*this.barSpaceRatio[1],a+=2;if(o=i._decodePair(s),!o)return null;for(r=0;rr;r++){if(e=o._decodeCode(e.end),!e)return null;e.code>=o.CODE_G_START&&(e.code=e.code-o.CODE_G_START,i|=1<<5-r),t.push(e.code),n.push(e)}return o._determineParity(i,t)?e:null},r.prototype._determineParity=function(e,t){var n,r;for(r=0;r=n?t.concat(e.slice(1,3)).concat([n,0,0,0,0]).concat(e.slice(3,6)):3===n?t.concat(e.slice(1,4)).concat([0,0,0,0,0]).concat(e.slice(4,6)):4===n?t.concat(e.slice(1,5)).concat([0,0,0,0,0,e[5]]):t.concat(e.slice(1,6)).concat([0,0,0,0,n]),t.push(e[e.length-1]),t},r.prototype._checksum=function(e){return o.a.prototype._checksum.call(this,this._convertToUPCA(e))},r.prototype._findEnd=function(e,t){return t=!0,o.a.prototype._findEnd.call(this,e,t)},r.prototype._verifyTrailingWhitespace=function(e){var t,n=this;return t=e.end+(e.end-e.start)/2,t0&&c(d)&&(n||a(d)||i(d))?t>1?r(d,t-1,n,s):o(s,d):n||(s[s.length]=d)}return s}var o=n(89),i=n(24),a=n(4),c=n(26);e.e=r},function(e,t,n){var r=n(114),o=r();e.e=o},function(e,t,n){function r(e,t){return e&&o(e,t,i)}var o=n(94),i=n(45);e.e=r},function(e,t,n){function r(e,t){return i.call(e,t)||"object"==typeof e&&t in e&&null===a(e)}var o=Object.prototype,i=o.hasOwnProperty,a=Object.getPrototypeOf;e.e=r},function(e,t,n){function r(e){return o(Object(e))}var o=Object.keys;e.e=r},function(e,t,n){function r(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}var o=n(81),i=n(125),a=Object.prototype,c=o?o.enumerate:void 0,s=a.propertyIsEnumerable;c&&!s.call({valueOf:1},"valueOf")&&(r=function(e){return i(c(e))}),e.e=r},function(e,t,n){function r(e,t,n,l,p){if(e!==t){var h=s(t)||f(t)?void 0:d(t);i(h||t,function(i,s){if(h&&(s=i,i=t[s]),u(i))p||(p=new o),c(e,t,s,n,r,l,p);else{var f=l?l(e[s],i,s+"",e,t,p):void 0;void 0===f&&(f=i),a(e,s,f)}})}}var o=n(32),i=n(33),a=n(34),c=n(100),s=n(4),u=n(2),f=n(44),d=n(46);e.e=r},function(e,t,n){function r(e,t,n,r,v,g,m){var y=e[n],b=t[n],_=m.get(b);if(_)return void o(e,n,_);var w=g?g(y,b,n+"",e,t,m):void 0,C=void 0===w;C&&(w=b,s(b)||p(b)?s(y)?w=y:u(y)?w=a(y):(C=!1,w=i(b,!g)):l(b)||c(b)?c(y)?w=h(y):!d(y)||r&&f(y)?(C=!1,w=i(b,!g)):w=y:C=!1),m.set(b,w),C&&v(w,b,r,g,m),m["delete"](b),o(e,n,w)}var o=n(34),i=n(91),a=n(41),c=n(24),s=n(4),u=n(26),f=n(16),d=n(2),l=n(141),p=n(44),h=n(146);e.e=r},function(e,t,n){function r(e,t){return e=Object(e),o(t,function(t,n){return n in e&&(t[n]=e[n]),t},{})}var o=n(19);e.e=r},function(e,t,n){function r(e){return function(t){return null==t?void 0:t[e]}}e.e=r},function(e,t,n){function r(e,t){for(var n=-1,r=Array(e);++n1?n[i-1]:void 0,c=i>2?n[2]:void 0;for(a="function"==typeof a?(i--,a):void 0,c&&o(n[0],n[1],c)&&(a=3>i?void 0:a,i=1),t=Object(t);++re?-1:1;return t*a}var n=e%1;return e===e?n?e-n:e:0}var o=n(145),i=1/0,a=1.7976931348623157e308;e.e=r},function(e,t,n){function r(e){if(i(e)){var t=o(e.valueOf)?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(c,"");var n=u.test(e);return n||f.test(e)?d(e.slice(2),n?2:8):s.test(e)?a:+e}var o=n(16),i=n(2),a=NaN,c=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,f=/^0o[0-7]+$/i,d=parseInt;e.e=r},function(e,t,n){function r(e){return o(e,i(e))}var o=n(20),i=n(46);e.e=r},function(e,t,n){"use strict";!function(){var t=n(0).log,r=n(0).browserDetails;e.e.browserDetails=r,e.e.extractVersion=n(0).extractVersion,e.e.disableLog=n(0).disableLog;var o=n(148)||null,i=n(151)||null,a=n(152)||null;switch(r.browser){case"chrome":if(!o||!o.shimPeerConnection)return void t("Chrome shim is not included in this adapter release.");t("adapter.js shimming chrome!"),e.e.browserShim=o,o.shimGetUserMedia(),o.shimSourceObject(),o.shimPeerConnection(),o.shimOnTrack();break;case"edge":if(!i||!i.shimPeerConnection)return void t("MS edge shim is not included in this adapter release.");t("adapter.js shimming edge!"),e.e.browserShim=i,i.shimPeerConnection();break;case"firefox":if(!a||!a.shimPeerConnection)return void t("Firefox shim is not included in this adapter release.");t("adapter.js shimming firefox!"),e.e.browserShim=a,a.shimGetUserMedia(),a.shimSourceObject(),a.shimPeerConnection(),a.shimOnTrack();break;default:t("Unsupported browser!")}}()},function(e,t,n){"use strict";var r=n(0).log,o=n(0).browserDetails,i={shimOnTrack:function(){"object"!=typeof window||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){var t=this;this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(e){e.stream.addEventListener("addtrack",function(n){var r=new Event("track");r.track=n.track,r.receiver={track:n.track},r.streams=[e.stream],t.dispatchEvent(r)}),e.stream.getTracks().forEach(function(t){var n=new Event("track");n.track=t,n.receiver={track:t},n.streams=[e.stream],this.dispatchEvent(n)}.bind(this))}.bind(this))}})},shimSourceObject:function(){"object"==typeof window&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this._srcObject},set:function(e){var t=this;return this._srcObject=e,this.src&&URL.revokeObjectURL(this.src),e?(this.src=URL.createObjectURL(e),e.addEventListener("addtrack",function(){t.src&&URL.revokeObjectURL(t.src),t.src=URL.createObjectURL(e)}),void e.addEventListener("removetrack",function(){t.src&&URL.revokeObjectURL(t.src),t.src=URL.createObjectURL(e)})):void(this.src="")}}))},shimPeerConnection:function(){window.RTCPeerConnection=function(e,t){r("PeerConnection"),e&&e.iceTransportPolicy&&(e.iceTransports=e.iceTransportPolicy);var n=new webkitRTCPeerConnection(e,t),o=n.getStats.bind(n);return n.getStats=function(e,t,n){var r=this,i=arguments;if(arguments.length>0&&"function"==typeof e)return o(e,t);var a=function(e){var t={},n=e.result();return n.forEach(function(e){var n={id:e.id,timestamp:e.timestamp,type:e.type};e.names().forEach(function(t){n[t]=e.stat(t)}),t[n.id]=n}),t};if(arguments.length>=2){var c=function(e){i[1](a(e))};return o.apply(this,[c,arguments[0]])}return new Promise(function(t,n){1===i.length&&null===e?o.apply(r,[function(e){t.apply(null,[a(e)])},n]):o.apply(r,[t,n])})},n},window.RTCPeerConnection.prototype=webkitRTCPeerConnection.prototype,webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function(){return arguments.length?webkitRTCPeerConnection.generateCertificate.apply(null,arguments):webkitRTCPeerConnection.generateCertificate}}),["createOffer","createAnswer"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var n=1===arguments.length?arguments[0]:void 0;return new Promise(function(r,o){t.apply(e,[r,o,n])})}return t.apply(this,arguments)}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=arguments,n=this;return new Promise(function(r,o){t.apply(n,[e[0],function(){r(),e.length>=2&&e[1].apply(null,[])},function(t){o(t),e.length>=3&&e[2].apply(null,[t])}])})}})},attachMediaStream:function(e,t){r("DEPRECATED, attachMediaStream will soon be removed."),o.version>=43?e.srcObject=t:"undefined"!=typeof e.src?e.src=URL.createObjectURL(t):r("Error attaching stream to element.")},reattachMediaStream:function(e,t){r("DEPRECATED, reattachMediaStream will soon be removed."),o.version>=43?e.srcObject=t.srcObject:e.src=t.src}};e.e={shimOnTrack:i.shimOnTrack,shimSourceObject:i.shimSourceObject,shimPeerConnection:i.shimPeerConnection,shimGetUserMedia:n(149),attachMediaStream:i.attachMediaStream,reattachMediaStream:i.reattachMediaStream}},function(e,t,n){"use strict";var r=n(0).log;e.e=function(){var e=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;
+var t={};return Object.keys(e).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];var i={};"number"==typeof r.ideal?(i[o("min",n)]=r.ideal,t.optional.push(i),i={},i[o("max",n)]=r.ideal,t.optional.push(i)):(i[o("",n)]=r.ideal,t.optional.push(i))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=r.exact):["min","max"].forEach(function(e){void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=r[e])})}}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},t=function(t,n,o){return t.audio&&(t.audio=e(t.audio)),t.video&&(t.video=e(t.video)),r("chrome: "+JSON.stringify(t)),navigator.webkitGetUserMedia(t,n,o)};navigator.getUserMedia=t;var n=function(e){return new Promise(function(t,n){navigator.getUserMedia(e,t,n)})};if(navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:n,enumerateDevices:function(){return new Promise(function(e){var t={audio:"audioinput",video:"videoinput"};return MediaStreamTrack.getSources(function(n){e(n.map(function(e){return{label:e.label,kind:t[e.kind],deviceId:e.id,groupId:""}}))})})}}),navigator.mediaDevices.getUserMedia){var o=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(t){return t&&(r("spec: "+JSON.stringify(t)),t.audio=e(t.audio),t.video=e(t.video),r("chrome: "+JSON.stringify(t))),o(t)}.bind(this)}else navigator.mediaDevices.getUserMedia=function(e){return n(e)};"undefined"==typeof navigator.mediaDevices.addEventListener&&(navigator.mediaDevices.addEventListener=function(){r("Dummy mediaDevices.addEventListener called.")}),"undefined"==typeof navigator.mediaDevices.removeEventListener&&(navigator.mediaDevices.removeEventListener=function(){r("Dummy mediaDevices.removeEventListener called.")})}},function(e,t,n){"use strict";var r={};r.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},r.localCName=r.generateIdentifier(),r.splitLines=function(e){return e.trim().split("\n").map(function(e){return e.trim()})},r.splitSections=function(e){var t=e.split("\r\nm=");return t.map(function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"})},r.matchPrefix=function(e,t){return r.splitLines(e).filter(function(e){return 0===e.indexOf(t)})},r.parseCandidate=function(e){var t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");for(var n={foundation:t[0],component:t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],port:parseInt(t[5],10),type:t[7]},r=8;r-1?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},r.getDtlsParameters=function(e,t){var n=r.splitLines(e);n=n.concat(r.splitLines(t));var o=n.filter(function(e){return 0===e.indexOf("a=fingerprint:")})[0].substr(14),i={role:"auto",fingerprints:[{algorithm:o.split(" ")[0],value:o.split(" ")[1]}]};return i},r.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},r.getIceParameters=function(e,t){var n=r.splitLines(e);n=n.concat(r.splitLines(t));var o={usernameFragment:n.filter(function(e){return 0===e.indexOf("a=ice-ufrag:")})[0].substr(12),password:n.filter(function(e){return 0===e.indexOf("a=ice-pwd:")})[0].substr(10)};return o},r.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},r.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(e),o=n[0].split(" "),i=3;i0?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=t.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach(function(e){n+=r.writeRtpMap(e),n+=r.writeFtmp(e),n+=r.writeRtcpFb(e)}),n+="a=rtcp-mux\r\n"},r.writeSessionBoilerplate=function(){return"v=0\r\no=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},r.writeMediaSection=function(e,t,n,o){var i=r.writeRtpDescription(e.kind,t);if(i+=r.writeIceParameters(e.iceGatherer.getLocalParameters()),i+=r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),i+="a=mid:"+e.mid+"\r\n",i+=e.rtpSender&&e.rtpReceiver?"a=sendrecv\r\n":e.rtpSender?"a=sendonly\r\n":e.rtpReceiver?"a=recvonly\r\n":"a=inactive\r\n",e.rtpSender){var a="msid:"+o.id+" "+e.rtpSender.track.id+"\r\n";i+="a="+a,i+="a=ssrc:"+e.sendSsrc+" "+a}return i+="a=ssrc:"+e.sendSsrc+" cname:"+r.localCName+"\r\n"},r.getDirection=function(e,t){for(var n=r.splitLines(e),o=0;o-1&&(this.localStreams.splice(t,1),this._maybeFireNegotiationNeeded())},window.RTCPeerConnection.prototype._getCommonCapabilities=function(e,t){var n={codecs:[],headerExtensions:[],fecMechanisms:[]};return e.codecs.forEach(function(e){for(var r=0;r0,!1)}})}switch(this.localDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-local-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}var i=arguments.length>1&&"function"==typeof arguments[1];if(i){var a=arguments[1];window.setTimeout(function(){a(),"new"===t.iceGatheringState&&(t.iceGatheringState="gathering"),t._emitBufferedCandidates()},0)}var c=Promise.resolve();return c.then(function(){i||("new"===t.iceGatheringState&&(t.iceGatheringState="gathering"),window.setTimeout(t._emitBufferedCandidates.bind(t),500))}),c},window.RTCPeerConnection.prototype.setRemoteDescription=function(e){var t=this,n=new MediaStream,o=[],i=r.splitSections(e.sdp),a=i.shift();switch(i.forEach(function(i,c){var s,u,f,d,l,p,h,v,g,m,y,b,_=r.splitLines(i),w=_[0].substr(2).split(" "),C=w[0],E="0"===w[1],R=r.getDirection(i,a),S=r.parseRtpParameters(i);E||(y=r.getIceParameters(i,a),b=r.getDtlsParameters(i,a));var T,x=r.matchPrefix(i,"a=mid:")[0].substr(6),O=r.matchPrefix(i,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];if(O&&(v=parseInt(O.ssrc,10),T=O.value),"offer"===e.type){var D=t._createIceAndDtlsTransports(x,c);if(g=RTCRtpReceiver.getCapabilities(C),h=1001*(2*c+2),p=new RTCRtpReceiver(D.dtlsTransport,C),m=p.track,o.push([m,p]),n.addTrack(m),t.localStreams.length>0&&t.localStreams[0].getTracks().length>=c){var P=t.localStreams[0].getTracks()[c];l=new RTCRtpSender(P,D.dtlsTransport)}t.transceivers[c]={iceGatherer:D.iceGatherer,iceTransport:D.iceTransport,dtlsTransport:D.dtlsTransport,localCapabilities:g,remoteCapabilities:S,rtpSender:l,rtpReceiver:p,kind:C,mid:x,cname:T,sendSsrc:h,recvSsrc:v},t._transceive(t.transceivers[c],!1,"sendrecv"===R||"sendonly"===R)}else"answer"!==e.type||E||(s=t.transceivers[c],u=s.iceGatherer,f=s.iceTransport,d=s.dtlsTransport,l=s.rtpSender,p=s.rtpReceiver,h=s.sendSsrc,g=s.localCapabilities,t.transceivers[c].recvSsrc=v,t.transceivers[c].remoteCapabilities=S,t.transceivers[c].cname=T,f.start(u,y,"controlling"),d.start(b),t._transceive(s,"sendrecv"===R||"recvonly"===R,"sendrecv"===R||"sendonly"===R),!p||"sendrecv"!==R&&"sendonly"!==R?delete s.rtpReceiver:(m=p.track,o.push([m,p]),n.addTrack(m)))}),this.remoteDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-remote-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}return n.getTracks().length&&(t.remoteStreams.push(n),window.setTimeout(function(){var e=new Event("addstream");e.stream=n,t.dispatchEvent(e),null!==t.onaddstream&&window.setTimeout(function(){t.onaddstream(e)},0),o.forEach(function(e){var r=e[0],o=e[1],i=new Event("track");i.track=r,i.receiver=o,i.streams=[n],t.dispatchEvent(i),null!==t.ontrack&&window.setTimeout(function(){t.ontrack(i)},0)})},0)),arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.close=function(){this.transceivers.forEach(function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()}),this._updateSignalingState("closed")},window.RTCPeerConnection.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this.dispatchEvent(t),null!==this.onsignalingstatechange&&this.onsignalingstatechange(t)},window.RTCPeerConnection.prototype._maybeFireNegotiationNeeded=function(){var e=new Event("negotiationneeded");this.dispatchEvent(e),null!==this.onnegotiationneeded&&this.onnegotiationneeded(e)},window.RTCPeerConnection.prototype._updateConnectionState=function(){var e,t=this,n={"new":0,closed:0,connecting:0,checking:0,connected:0,completed:0,failed:0};if(this.transceivers.forEach(function(e){n[e.iceTransport.state]++,n[e.dtlsTransport.state]++}),n.connected+=n.completed,e="new",n.failed>0?e="failed":n.connecting>0||n.checking>0?e="connecting":n.disconnected>0?e="disconnected":n["new"]>0?e="new":(n.connecting>0||n.completed>0)&&(e="connected"),e!==t.iceConnectionState){t.iceConnectionState=e;var r=new Event("iceconnectionstatechange");this.dispatchEvent(r),null!==this.oniceconnectionstatechange&&this.oniceconnectionstatechange(r)}},window.RTCPeerConnection.prototype.createOffer=function(){var e=this;if(this._pendingOffer)throw new Error("createOffer called while there is a pending offer.");var t;1===arguments.length&&"function"!=typeof arguments[0]?t=arguments[0]:3===arguments.length&&(t=arguments[2]);var n=[],o=0,i=0;if(this.localStreams.length&&(o=this.localStreams[0].getAudioTracks().length,i=this.localStreams[0].getVideoTracks().length),t){if(t.mandatory||t.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==t.offerToReceiveAudio&&(o=t.offerToReceiveAudio),void 0!==t.offerToReceiveVideo&&(i=t.offerToReceiveVideo)}for(this.localStreams.length&&this.localStreams[0].getTracks().forEach(function(e){n.push({kind:e.kind,track:e,wantReceive:"audio"===e.kind?o>0:i>0}),"audio"===e.kind?o--:"video"===e.kind&&i--});o>0||i>0;)o>0&&(n.push({kind:"audio",wantReceive:!0}),o--),i>0&&(n.push({kind:"video",wantReceive:!0}),i--);var a=r.writeSessionBoilerplate(),c=[];n.forEach(function(t,n){var o,i,s=t.track,u=t.kind,f=r.generateIdentifier(),d=e._createIceAndDtlsTransports(f,n),l=RTCRtpSender.getCapabilities(u),p=1001*(2*n+1);s&&(o=new RTCRtpSender(s,d.dtlsTransport)),t.wantReceive&&(i=new RTCRtpReceiver(d.dtlsTransport,u)),c[n]={iceGatherer:d.iceGatherer,iceTransport:d.iceTransport,dtlsTransport:d.dtlsTransport,localCapabilities:l,remoteCapabilities:null,rtpSender:o,rtpReceiver:i,kind:u,mid:f,sendSsrc:p,recvSsrc:null};var h=c[n];a+=r.writeMediaSection(h,h.localCapabilities,"offer",e.localStreams[0])}),this._pendingOffer=c;var s=new RTCSessionDescription({type:"offer",sdp:a});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,s),Promise.resolve(s)},window.RTCPeerConnection.prototype.createAnswer=function(){var e,t=this;1===arguments.length&&"function"!=typeof arguments[0]?e=arguments[0]:3===arguments.length&&(e=arguments[2]);var n=r.writeSessionBoilerplate();this.transceivers.forEach(function(e){var o=t._getCommonCapabilities(e.localCapabilities,e.remoteCapabilities);n+=r.writeMediaSection(e,o,"answer",t.localStreams[0])});var o=new RTCSessionDescription({type:"answer",sdp:n});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,o),Promise.resolve(o)},window.RTCPeerConnection.prototype.addIceCandidate=function(e){var t=e.sdpMLineIndex;if(e.sdpMid)for(var n=0;n0?r.parseCandidate(e.candidate):{};if("tcp"===i.protocol&&0===i.port)return;if("1"!==i.component)return;"endOfCandidates"===i.type&&(i={}),o.iceTransport.addRemoteCandidate(i);var a=r.splitSections(this.remoteDescription.sdp);a[t+1]+=(i.type?e.candidate.trim():"a=end-of-candidates")+"\r\n",this.remoteDescription.sdp=a.join("")}return arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.getStats=function(){var e=[];this.transceivers.forEach(function(t){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(n){t[n]&&e.push(t[n].getStats())})});var t=arguments.length>1&&"function"==typeof arguments[1]&&arguments[1];return new Promise(function(n){var r={};Promise.all(e).then(function(e){e.forEach(function(e){Object.keys(e).forEach(function(t){r[t]=e[t]})}),t&&window.setTimeout(t,0,r),n(r)})})}},attachMediaStream:function(e,t){o("DEPRECATED, attachMediaStream will soon be removed."),e.srcObject=t},reattachMediaStream:function(e,t){o("DEPRECATED, reattachMediaStream will soon be removed."),e.srcObject=t.srcObject}});e.e={shimPeerConnection:i.shimPeerConnection,attachMediaStream:i.attachMediaStream,reattachMediaStream:i.reattachMediaStream}},function(e,t,n){"use strict";var r=n(0).log,o=n(0).browserDetails,i={shimOnTrack:function(){"object"!=typeof window||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(e){e.stream.getTracks().forEach(function(t){var n=new Event("track");n.track=t,n.receiver={track:t},n.streams=[e.stream],this.dispatchEvent(n)}.bind(this))}.bind(this))}})},shimSourceObject:function(){"object"==typeof window&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(e){this.mozSrcObject=e}}))},shimPeerConnection:function(){window.RTCPeerConnection||(window.RTCPeerConnection=function(e,t){if(o.version<38&&e&&e.iceServers){for(var n=[],r=0;r= pos && parseInt(match[pos], 10);
+ },
+
+ /**
+ * Browser detector.
+ * @return {object} result containing browser, version and minVersion
+ * properties.
+ */
+ detectBrowser: function() {
+ // Returned result object.
+ var result = {};
+ result.browser = null;
+ result.version = null;
+ result.minVersion = null;
+
+ if (typeof window === 'undefined' || !window.navigator) {
+ result.browser = 'Not a browser.';
+ return result;
+ } else if (navigator.mozGetUserMedia) {
+ // Firefox.
+ result.browser = 'firefox';
+ result.version = this.extractVersion(navigator.userAgent,
+ /Firefox\/([0-9]+)\./, 1);
+ result.minVersion = 31;
+ } else if (navigator.webkitGetUserMedia && window.webkitRTCPeerConnection) {
+ // Chrome, Chromium, WebView, Opera and other WebKit browsers.
+ result.browser = 'chrome';
+ result.version = this.extractVersion(navigator.userAgent,
+ /Chrom(e|ium)\/([0-9]+)\./, 2);
+ result.minVersion = 38;
+ } else if(navigator.mediaDevices &&
+ navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)) {
+ // Edge.
+ result.browser = 'edge';
+ result.version = this.extractVersion(navigator.userAgent,
+ /Edge\/(\d+).(\d+)$/, 2);
+ result.minVersion = 10547;
+ } else {
+ result.browser = 'Not a supported browser.';
+ return result;
+ }
- var _commonImage_wrapper2 = _interopRequireDefault(_commonImage_wrapper);
+ // Warn if version is less than minVersion.
+ if (result.version < result.minVersion) {
+ utils.log('Browser: ' + result.browser + ' Version: ' + result.version +
+ ' < minimum supported version: ' + result.minVersion +
+ '\n some things might not work!');
+ }
- var _locatorBarcode_locator = __webpack_require__(9);
+ return result;
+ }
+ };
- var _locatorBarcode_locator2 = _interopRequireDefault(_locatorBarcode_locator);
+ // Export.
+ module.e = {
+ log: utils.log,
+ disableLog: utils.disableLog,
+ browserDetails: utils.detectBrowser(),
+ extractVersion: utils.extractVersion
+ };
+
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(module, global) {var checkGlobal = __webpack_require__(103);
- var _decoderBarcode_decoder = __webpack_require__(14);
+ /** Used to determine if values are of the language type `Object`. */
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
- var _decoderBarcode_decoder2 = _interopRequireDefault(_decoderBarcode_decoder);
+ /** Detect free variable `exports`. */
+ var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
+ ? exports
+ : undefined;
- var _commonEvents = __webpack_require__(59);
+ /** Detect free variable `module`. */
+ var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
+ ? module
+ : undefined;
- var _commonEvents2 = _interopRequireDefault(_commonEvents);
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
- var _inputCamera_access = __webpack_require__(60);
+ /** Detect free variable `self`. */
+ var freeSelf = checkGlobal(objectTypes[typeof self] && self);
- var _inputCamera_access2 = _interopRequireDefault(_inputCamera_access);
+ /** Detect free variable `window`. */
+ var freeWindow = checkGlobal(objectTypes[typeof window] && window);
- var _commonImage_debug = __webpack_require__(10);
+ /** Detect `this` as the global object. */
+ var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
- var _commonImage_debug2 = _interopRequireDefault(_commonImage_debug);
+ /**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+ var root = freeGlobal ||
+ ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
+ freeSelf || thisGlobal || Function('return this')();
- var _glMatrix = __webpack_require__(7);
+ module.e = root;
- var _analyticsResult_collector = __webpack_require__(61);
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(48)(module), (function() { return this; }())))
+
+/***/ },
+/* 2 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
- var _analyticsResult_collector2 = _interopRequireDefault(_analyticsResult_collector);
+ module.e = isObject;
+
+
+/***/ },
+/* 3 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getNative = __webpack_require__(12),
+ root = __webpack_require__(1);
- var _configConfig = __webpack_require__(62);
+ /* Built-in method references that are verified to be native. */
+ var Map = getNative(root, 'Map');
- var _configConfig2 = _interopRequireDefault(_configConfig);
+ module.e = Map;
+
+
+/***/ },
+/* 4 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @type {Function}
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
- var _input_stream = __webpack_require__(64);
+ module.e = isArray;
+
+
+/***/ },
+/* 5 */
+/***/ function(module, exports) {
+
+ 'use strict';
- var _input_stream2 = _interopRequireDefault(_input_stream);
+ exports.__esModule = true;
+ function BarcodeReader(config) {
+ this._row = [];
+ this.config = config || {};
+ return this;
+ }
- var _frame_grabber = __webpack_require__(66);
+ BarcodeReader.prototype._nextUnset = function (line, start) {
+ var i;
- var _frame_grabber2 = _interopRequireDefault(_frame_grabber);
+ if (start === undefined) {
+ start = 0;
+ }
+ for (i = start; i < line.length; i++) {
+ if (!line[i]) {
+ return i;
+ }
+ }
+ return line.length;
+ };
- var merge = __webpack_require__(26);
+ BarcodeReader.prototype._matchPattern = function (counter, code) {
+ var i,
+ error = 0,
+ singleError = 0,
+ modulo = this.MODULO,
+ maxSingleError = this.SINGLE_CODE_ERROR || 1;
- var _inputStream,
- _framegrabber,
- _stopped,
- _canvasContainer = {
- ctx: {
- image: null,
- overlay: null
- },
- dom: {
- image: null,
- overlay: null
+ for (i = 0; i < counter.length; i++) {
+ singleError = Math.abs(code[i] - counter[i]);
+ if (singleError > maxSingleError) {
+ return Number.MAX_VALUE;
+ }
+ error += singleError;
}
- },
- _inputImageWrapper,
- _boxSize,
- _decoder,
- _workerPool = [],
- _onUIThread = true,
- _resultCollector,
- _config = {};
+ return error / modulo;
+ };
- function initializeData(imageWrapper) {
- initBuffers(imageWrapper);
- _decoder = _decoderBarcode_decoder2['default'].create(_config.decoder, _inputImageWrapper);
- }
+ BarcodeReader.prototype._nextSet = function (line, offset) {
+ var i;
- function initInputStream(cb) {
- var video;
- if (_config.inputStream.type === "VideoStream") {
- video = document.createElement("video");
- _inputStream = _input_stream2['default'].createVideoStream(video);
- } else if (_config.inputStream.type === "ImageStream") {
- _inputStream = _input_stream2['default'].createImageStream();
- } else if (_config.inputStream.type === "LiveStream") {
- var $viewport = getViewPort();
- if ($viewport) {
- video = $viewport.querySelector("video");
- if (!video) {
- video = document.createElement("video");
- $viewport.appendChild(video);
- }
+ offset = offset || 0;
+ for (i = offset; i < line.length; i++) {
+ if (line[i]) {
+ return i;
}
- _inputStream = _input_stream2['default'].createLiveStream(video);
- _inputCamera_access2['default'].request(video, _config.inputStream.constraints, function (err) {
- if (!err) {
- _inputStream.trigger("canrecord");
- } else {
- return cb(err);
- }
- });
}
+ return line.length;
+ };
- _inputStream.setAttribute("preload", "auto");
- _inputStream.setAttribute("autoplay", true);
- _inputStream.setInputStream(_config.inputStream);
- _inputStream.addEventListener("canrecord", canRecord.bind(undefined, cb));
- }
+ BarcodeReader.prototype._normalize = function (counter, modulo) {
+ var i,
+ self = this,
+ sum = 0,
+ ratio,
+ numOnes = 0,
+ normalized = [],
+ norm = 0;
- function getViewPort() {
- var target = _config.inputStream.target;
- // Check if target is already a DOM element
- if (target && target.nodeName && target.nodeType === 1) {
- return target;
+ if (!modulo) {
+ modulo = self.MODULO;
+ }
+ for (i = 0; i < counter.length; i++) {
+ if (counter[i] === 1) {
+ numOnes++;
+ } else {
+ sum += counter[i];
+ }
+ }
+ ratio = sum / (modulo - numOnes);
+ if (ratio > 1.0) {
+ for (i = 0; i < counter.length; i++) {
+ norm = counter[i] === 1 ? counter[i] : counter[i] / ratio;
+ normalized.push(norm);
+ }
} else {
- // Use '#interactive.viewport' as a fallback selector (backwards compatibility)
- var selector = typeof target === 'string' ? target : '#interactive.viewport';
- return document.querySelector(selector);
+ ratio = (sum + numOnes) / modulo;
+ for (i = 0; i < counter.length; i++) {
+ norm = counter[i] / ratio;
+ normalized.push(norm);
+ }
}
- }
+ return normalized;
+ };
- function canRecord(cb) {
- _locatorBarcode_locator2['default'].checkImageConstraints(_inputStream, _config.locator);
- initCanvas(_config);
- _framegrabber = _frame_grabber2['default'].create(_inputStream, _canvasContainer.dom.image);
+ BarcodeReader.prototype._matchTrace = function (cmpCounter, epsilon) {
+ var counter = [],
+ i,
+ self = this,
+ offset = self._nextSet(self._row),
+ isWhite = !self._row[offset],
+ counterPos = 0,
+ bestMatch = {
+ error: Number.MAX_VALUE,
+ code: -1,
+ start: 0
+ },
+ error;
- adjustWorkerPool(_config.numOfWorkers, function () {
- if (_config.numOfWorkers === 0) {
- initializeData();
+ if (cmpCounter) {
+ for (i = 0; i < cmpCounter.length; i++) {
+ counter.push(0);
}
- ready(cb);
- });
- }
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ if (counterPos === counter.length - 1) {
+ error = self._matchPattern(counter, cmpCounter);
- function ready(cb) {
- _inputStream.play();
- cb();
- }
-
- function initCanvas() {
- if (typeof document !== "undefined") {
- var $viewport = getViewPort();
- _canvasContainer.dom.image = document.querySelector("canvas.imgBuffer");
- if (!_canvasContainer.dom.image) {
- _canvasContainer.dom.image = document.createElement("canvas");
- _canvasContainer.dom.image.className = "imgBuffer";
- if ($viewport && _config.inputStream.type === "ImageStream") {
- $viewport.appendChild(_canvasContainer.dom.image);
+ if (error < epsilon) {
+ bestMatch.start = i - offset;
+ bestMatch.end = i;
+ bestMatch.counter = counter;
+ return bestMatch;
+ } else {
+ return null;
+ }
+ } else {
+ counterPos++;
+ }
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
}
}
- _canvasContainer.ctx.image = _canvasContainer.dom.image.getContext("2d");
- _canvasContainer.dom.image.width = _inputStream.getCanvasSize().x;
- _canvasContainer.dom.image.height = _inputStream.getCanvasSize().y;
-
- _canvasContainer.dom.overlay = document.querySelector("canvas.drawingBuffer");
- if (!_canvasContainer.dom.overlay) {
- _canvasContainer.dom.overlay = document.createElement("canvas");
- _canvasContainer.dom.overlay.className = "drawingBuffer";
- if ($viewport) {
- $viewport.appendChild(_canvasContainer.dom.overlay);
- }
- var clearFix = document.createElement("br");
- clearFix.setAttribute("clear", "all");
- if ($viewport) {
- $viewport.appendChild(clearFix);
+ } else {
+ counter.push(0);
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ counterPos++;
+ counter.push(0);
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
}
}
- _canvasContainer.ctx.overlay = _canvasContainer.dom.overlay.getContext("2d");
- _canvasContainer.dom.overlay.width = _inputStream.getCanvasSize().x;
- _canvasContainer.dom.overlay.height = _inputStream.getCanvasSize().y;
- }
- }
-
- function initBuffers(imageWrapper) {
- if (imageWrapper) {
- _inputImageWrapper = imageWrapper;
- } else {
- _inputImageWrapper = new _commonImage_wrapper2['default']({
- x: _inputStream.getWidth(),
- y: _inputStream.getHeight()
- });
- }
-
- if (false) {
- console.log(_inputImageWrapper.size);
- }
- _boxSize = [_glMatrix.vec2.clone([0, 0]), _glMatrix.vec2.clone([0, _inputImageWrapper.size.y]), _glMatrix.vec2.clone([_inputImageWrapper.size.x, _inputImageWrapper.size.y]), _glMatrix.vec2.clone([_inputImageWrapper.size.x, 0])];
- _locatorBarcode_locator2['default'].init(_inputImageWrapper, _config.locator);
- }
-
- function getBoundingBoxes() {
- if (_config.locate) {
- return _locatorBarcode_locator2['default'].locate();
- } else {
- return [[_glMatrix.vec2.clone(_boxSize[0]), _glMatrix.vec2.clone(_boxSize[1]), _glMatrix.vec2.clone(_boxSize[2]), _glMatrix.vec2.clone(_boxSize[3])]];
}
- }
- function transformResult(result) {
- var topRight = _inputStream.getTopRight(),
- xOffset = topRight.x,
- yOffset = topRight.y,
- i;
+ // if cmpCounter was not given
+ bestMatch.start = offset;
+ bestMatch.end = self._row.length - 1;
+ bestMatch.counter = counter;
+ return bestMatch;
+ };
- if (xOffset === 0 && yOffset === 0) {
- return;
- }
+ BarcodeReader.prototype.decodePattern = function (pattern) {
+ var self = this,
+ result;
- if (result.barcodes) {
- for (i = 0; i < result.barcodes.length; i++) {
- transformResult(result.barcodes[i]);
+ self._row = pattern;
+ result = self._decode();
+ if (result === null) {
+ self._row.reverse();
+ result = self._decode();
+ if (result) {
+ result.direction = BarcodeReader.DIRECTION.REVERSE;
+ result.start = self._row.length - result.start;
+ result.end = self._row.length - result.end;
}
+ } else {
+ result.direction = BarcodeReader.DIRECTION.FORWARD;
}
-
- if (result.line && result.line.length === 2) {
- moveLine(result.line);
+ if (result) {
+ result.format = self.FORMAT;
}
+ return result;
+ };
- if (result.box) {
- moveBox(result.box);
- }
+ BarcodeReader.prototype._matchRange = function (start, end, value) {
+ var i;
- if (result.boxes && result.boxes.length > 0) {
- for (i = 0; i < result.boxes.length; i++) {
- moveBox(result.boxes[i]);
+ start = start < 0 ? 0 : start;
+ for (i = start; i < end; i++) {
+ if (this._row[i] !== value) {
+ return false;
}
}
+ return true;
+ };
- function moveBox(box) {
- var corner = box.length;
+ BarcodeReader.prototype._fillCounters = function (offset, end, isWhite) {
+ var self = this,
+ counterPos = 0,
+ i,
+ counters = [];
- while (corner--) {
- box[corner][0] += xOffset;
- box[corner][1] += yOffset;
- }
- }
+ isWhite = typeof isWhite !== 'undefined' ? isWhite : true;
+ offset = typeof offset !== 'undefined' ? offset : self._nextUnset(self._row);
+ end = end || self._row.length;
- function moveLine(line) {
- line[0].x += xOffset;
- line[0].y += yOffset;
- line[1].x += xOffset;
- line[1].y += yOffset;
+ counters[counterPos] = 0;
+ for (i = offset; i < end; i++) {
+ if (self._row[i] ^ isWhite) {
+ counters[counterPos]++;
+ } else {
+ counterPos++;
+ counters[counterPos] = 1;
+ isWhite = !isWhite;
+ }
}
- }
+ return counters;
+ };
- function addResult(result, imageData) {
- if (!imageData || !_resultCollector) {
- return;
- }
+ Object.defineProperty(BarcodeReader.prototype, "FORMAT", {
+ value: 'unknown',
+ writeable: false
+ });
- if (result.barcodes) {
- result.barcodes.filter(function (barcode) {
- return barcode.codeResult;
- }).forEach(function (barcode) {
- return addResult(barcode, imageData);
- });
- } else if (result.codeResult) {
- _resultCollector.addResult(imageData, _inputStream.getCanvasSize(), result.codeResult);
- }
- }
+ BarcodeReader.DIRECTION = {
+ FORWARD: 1,
+ REVERSE: -1
+ };
- function hasCodeResult(result) {
- return result && (result.barcodes ? result.barcodes.some(function (barcode) {
- return barcode.codeResult;
- }) : result.codeResult);
- }
+ BarcodeReader.Exception = {
+ StartNotFoundException: "Start-Info was not found!",
+ CodeNotFoundException: "Code could not be found!",
+ PatternNotFoundException: "Pattern could not be found!"
+ };
- function publishResult(result, imageData) {
- var resultToPublish = result && (result.barcodes || result);
+ BarcodeReader.CONFIG_KEYS = {};
- if (result && _onUIThread) {
- transformResult(result);
- addResult(result, imageData);
- }
+ exports.default = BarcodeReader;
+
+/***/ },
+/* 6 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = clone
- _commonEvents2['default'].publish("processed", resultToPublish);
- if (hasCodeResult(result)) {
- _commonEvents2['default'].publish("detected", resultToPublish);
- }
+ /**
+ * Creates a new vec2 initialized with values from an existing vector
+ *
+ * @param {vec2} a vector to clone
+ * @returns {vec2} a new 2D vector
+ */
+ function clone(a) {
+ var out = new Float32Array(2)
+ out[0] = a[0]
+ out[1] = a[1]
+ return out
}
-
- function locateAndDecode() {
- var result, boxes;
-
- boxes = getBoundingBoxes();
- if (boxes) {
- result = _decoder.decodeFromBoundingBoxes(boxes);
- result = result || {};
- result.boxes = boxes;
- publishResult(result, _inputImageWrapper.data);
- } else {
- publishResult();
- }
+
+/***/ },
+/* 7 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
}
- function update() {
- var availableWorker;
+ module.e = isObjectLike;
+
+
+/***/ },
+/* 8 */
+/***/ function(module, exports) {
+
+ "use strict";
- if (_onUIThread) {
- if (_workerPool.length > 0) {
- availableWorker = _workerPool.filter(function (workerThread) {
- return !workerThread.busy;
- })[0];
- if (availableWorker) {
- _framegrabber.attachData(availableWorker.imageData);
- } else {
- return; // all workers are busy
- }
- } else {
- _framegrabber.attachData(_inputImageWrapper.data);
- }
- if (_framegrabber.grab()) {
- if (availableWorker) {
- availableWorker.busy = true;
- availableWorker.worker.postMessage({
- cmd: 'process',
- imageData: availableWorker.imageData
- }, [availableWorker.imageData.buffer]);
- } else {
- locateAndDecode();
- }
+ exports.__esModule = true;
+ exports.default = {
+ init: function init(arr, val) {
+ var l = arr.length;
+ while (l--) {
+ arr[l] = val;
}
- } else {
- locateAndDecode();
- }
- }
+ },
- function startContinuousUpdate() {
- var next = null,
- delay = 1000 / (_config.frequency || 60);
+ /**
+ * Shuffles the content of an array
+ * @return {Array} the array itself shuffled
+ */
+ shuffle: function shuffle(arr) {
+ var i = arr.length - 1,
+ j,
+ x;
+ for (i; i >= 0; i--) {
+ j = Math.floor(Math.random() * i);
+ x = arr[i];
+ arr[i] = arr[j];
+ arr[j] = x;
+ }
+ return arr;
+ },
- _stopped = false;
- (function frame(timestamp) {
- next = next || timestamp;
- if (!_stopped) {
- if (timestamp >= next) {
- next += delay;
- update();
+ toPointList: function toPointList(arr) {
+ var i,
+ j,
+ row = [],
+ rows = [];
+ for (i = 0; i < arr.length; i++) {
+ row = [];
+ for (j = 0; j < arr[i].length; j++) {
+ row[j] = arr[i][j];
}
- window.requestAnimFrame(frame);
+ rows[i] = "[" + row.join(",") + "]";
}
- })(performance.now());
- }
-
- function _start() {
- if (_onUIThread && _config.inputStream.type === "LiveStream") {
- startContinuousUpdate();
- } else {
- update();
- }
- }
-
- function initWorker(cb) {
- var blobURL,
- workerThread = {
- worker: undefined,
- imageData: new Uint8Array(_inputStream.getWidth() * _inputStream.getHeight()),
- busy: true
- };
+ return "[" + rows.join(",\r\n") + "]";
+ },
- blobURL = generateWorkerBlob();
- workerThread.worker = new Worker(blobURL);
+ /**
+ * returns the elements which's score is bigger than the threshold
+ * @return {Array} the reduced array
+ */
+ threshold: function threshold(arr, _threshold, scoreFunc) {
+ var i,
+ queue = [];
+ for (i = 0; i < arr.length; i++) {
+ if (scoreFunc.apply(arr, [arr[i]]) >= _threshold) {
+ queue.push(arr[i]);
+ }
+ }
+ return queue;
+ },
- workerThread.worker.onmessage = function (e) {
- if (e.data.event === 'initialized') {
- URL.revokeObjectURL(blobURL);
- workerThread.busy = false;
- workerThread.imageData = new Uint8Array(e.data.imageData);
- if (false) {
- console.log("Worker initialized");
+ maxIndex: function maxIndex(arr) {
+ var i,
+ max = 0;
+ for (i = 0; i < arr.length; i++) {
+ if (arr[i] > arr[max]) {
+ max = i;
}
- return cb(workerThread);
- } else if (e.data.event === 'processed') {
- workerThread.imageData = new Uint8Array(e.data.imageData);
- workerThread.busy = false;
- publishResult(e.data.result, workerThread.imageData);
- } else if (e.data.event === 'error') {
- if (false) {
- console.log("Worker error: " + e.data.message);
+ }
+ return max;
+ },
+
+ max: function max(arr) {
+ var i,
+ max = 0;
+ for (i = 0; i < arr.length; i++) {
+ if (arr[i] > max) {
+ max = arr[i];
}
}
- };
+ return max;
+ },
- workerThread.worker.postMessage({
- cmd: 'init',
- size: { x: _inputStream.getWidth(), y: _inputStream.getHeight() },
- imageData: workerThread.imageData,
- config: _config
- }, [workerThread.imageData.buffer]);
- }
+ sum: function sum(arr) {
+ var length = arr.length,
+ sum = 0;
- function workerInterface(factory) {
- /* eslint-disable no-undef*/
- if (factory) {
- var Quagga = factory();
- if (!Quagga) {
- self.postMessage({ 'event': 'error', message: 'Quagga could not be created' });
- return;
+ while (length--) {
+ sum += arr[length];
}
+ return sum;
}
- var imageWrapper;
+ };
+
+/***/ },
+/* 9 */
+/***/ function(module, exports) {
+
+ "use strict";
- self.onmessage = function (e) {
- if (e.data.cmd === 'init') {
- var config = e.data.config;
- config.numOfWorkers = 0;
- imageWrapper = new Quagga.ImageWrapper({
- x: e.data.size.x,
- y: e.data.size.y
- }, new Uint8Array(e.data.imageData));
- Quagga.init(config, ready, imageWrapper);
- Quagga.onProcessed(onProcessed);
- } else if (e.data.cmd === 'process') {
- imageWrapper.data = new Uint8Array(e.data.imageData);
- Quagga.start();
- } else if (e.data.cmd === 'setReaders') {
- Quagga.setReaders(e.data.readers);
+ exports.__esModule = true;
+ exports.default = {
+ drawRect: function drawRect(pos, size, ctx, style) {
+ ctx.strokeStyle = style.color;
+ ctx.fillStyle = style.color;
+ ctx.lineWidth = 1;
+ ctx.beginPath();
+ ctx.strokeRect(pos.x, pos.y, size.x, size.y);
+ },
+ drawPath: function drawPath(path, def, ctx, style) {
+ ctx.strokeStyle = style.color;
+ ctx.fillStyle = style.color;
+ ctx.lineWidth = style.lineWidth;
+ ctx.beginPath();
+ ctx.moveTo(path[0][def.x], path[0][def.y]);
+ for (var j = 1; j < path.length; j++) {
+ ctx.lineTo(path[j][def.x], path[j][def.y]);
}
- };
-
- function onProcessed(result) {
- self.postMessage({
- 'event': 'processed',
- imageData: imageWrapper.data,
- result: result
- }, [imageWrapper.data.buffer]);
- }
+ ctx.closePath();
+ ctx.stroke();
+ },
+ drawImage: function drawImage(imageData, size, ctx) {
+ var canvasData = ctx.getImageData(0, 0, size.x, size.y),
+ data = canvasData.data,
+ imageDataPos = imageData.length,
+ canvasDataPos = data.length,
+ value;
- function ready() {
- // eslint-disable-line
- self.postMessage({ 'event': 'initialized', imageData: imageWrapper.data }, [imageWrapper.data.buffer]);
+ if (canvasDataPos / imageDataPos !== 4) {
+ return false;
+ }
+ while (imageDataPos--) {
+ value = imageData[imageDataPos];
+ data[--canvasDataPos] = 255;
+ data[--canvasDataPos] = value;
+ data[--canvasDataPos] = value;
+ data[--canvasDataPos] = value;
+ }
+ ctx.putImageData(canvasData, 0, 0);
+ return true;
}
+ };
+
+/***/ },
+/* 10 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
- /* eslint-enable */
- }
+ exports.__esModule = true;
- function generateWorkerBlob() {
- var blob, factorySource;
+ var _barcode_reader = __webpack_require__(5);
- /* jshint ignore:start */
- if (typeof __factorySource__ !== 'undefined') {
- factorySource = __factorySource__; // eslint-disable-line no-undef
- }
- /* jshint ignore:end */
+ var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
- blob = new Blob(['(' + workerInterface.toString() + ')(' + factorySource + ');'], { type: 'text/javascript' });
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- return window.URL.createObjectURL(blob);
+ function EANReader(opts) {
+ _barcode_reader2.default.call(this, opts);
}
- function _setReaders(readers) {
- if (_decoder) {
- _decoder.setReaders(readers);
- } else if (_onUIThread && _workerPool.length > 0) {
- _workerPool.forEach(function (workerThread) {
- workerThread.worker.postMessage({ cmd: 'setReaders', readers: readers });
- });
- }
- }
+ var properties = {
+ CODE_L_START: { value: 0 },
+ MODULO: { value: 7 },
+ CODE_G_START: { value: 10 },
+ START_PATTERN: { value: [1 / 3 * 7, 1 / 3 * 7, 1 / 3 * 7] },
+ STOP_PATTERN: { value: [1 / 3 * 7, 1 / 3 * 7, 1 / 3 * 7] },
+ MIDDLE_PATTERN: { value: [1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7] },
+ CODE_PATTERN: { value: [[3, 2, 1, 1], [2, 2, 2, 1], [2, 1, 2, 2], [1, 4, 1, 1], [1, 1, 3, 2], [1, 2, 3, 1], [1, 1, 1, 4], [1, 3, 1, 2], [1, 2, 1, 3], [3, 1, 1, 2], [1, 1, 2, 3], [1, 2, 2, 2], [2, 2, 1, 2], [1, 1, 4, 1], [2, 3, 1, 1], [1, 3, 2, 1], [4, 1, 1, 1], [2, 1, 3, 1], [3, 1, 2, 1], [2, 1, 1, 3]] },
+ CODE_FREQUENCY: { value: [0, 11, 13, 14, 19, 25, 28, 21, 22, 26] },
+ SINGLE_CODE_ERROR: { value: 0.67 },
+ AVG_CODE_ERROR: { value: 0.27 },
+ FORMAT: { value: "ean_13", writeable: false }
+ };
- function adjustWorkerPool(capacity, cb) {
- var increaseBy = capacity - _workerPool.length;
- if (increaseBy === 0) {
- return cb && cb();
- }
- if (increaseBy < 0) {
- var workersToTerminate = _workerPool.slice(increaseBy);
- workersToTerminate.forEach(function (workerThread) {
- workerThread.worker.terminate();
- if (false) {
- console.log("Worker terminated!");
- }
- });
- _workerPool = _workerPool.slice(0, increaseBy);
- return cb && cb();
- } else {
- var workerInitialized = function workerInitialized(workerThread) {
- _workerPool.push(workerThread);
- if (_workerPool.length >= capacity) {
- cb && cb();
- }
- };
+ EANReader.prototype = Object.create(_barcode_reader2.default.prototype, properties);
+ EANReader.prototype.constructor = EANReader;
- for (var i = 0; i < increaseBy; i++) {
- initWorker(workerInitialized);
- }
+ EANReader.prototype._decodeCode = function (start, coderange) {
+ var counter = [0, 0, 0, 0],
+ i,
+ self = this,
+ offset = start,
+ isWhite = !self._row[offset],
+ counterPos = 0,
+ bestMatch = {
+ error: Number.MAX_VALUE,
+ code: -1,
+ start: start,
+ end: start
+ },
+ code,
+ error,
+ normalized;
+
+ if (!coderange) {
+ coderange = self.CODE_PATTERN.length;
}
- }
- exports['default'] = {
- init: function init(config, cb, imageWrapper) {
- _config = merge({}, _configConfig2['default'], config);
- if (imageWrapper) {
- _onUIThread = false;
- initializeData(imageWrapper);
- return cb();
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
} else {
- initInputStream(cb);
- }
- },
- start: function start() {
- _start();
- },
- stop: function stop() {
- _stopped = true;
- adjustWorkerPool(0);
- if (_config.inputStream.type === "LiveStream") {
- _inputCamera_access2['default'].release();
- _inputStream.clearEventHandlers();
- }
- },
- pause: function pause() {
- _stopped = true;
- },
- onDetected: function onDetected(callback) {
- _commonEvents2['default'].subscribe("detected", callback);
- },
- offDetected: function offDetected(callback) {
- _commonEvents2['default'].unsubscribe("detected", callback);
- },
- onProcessed: function onProcessed(callback) {
- _commonEvents2['default'].subscribe("processed", callback);
- },
- offProcessed: function offProcessed(callback) {
- _commonEvents2['default'].unsubscribe("processed", callback);
- },
- setReaders: function setReaders(readers) {
- _setReaders(readers);
- },
- registerResultCollector: function registerResultCollector(resultCollector) {
- if (resultCollector && typeof resultCollector.addResult === 'function') {
- _resultCollector = resultCollector;
- }
- },
- canvas: _canvasContainer,
- decodeSingle: function decodeSingle(config, resultCallback) {
- config = merge({
- inputStream: {
- type: "ImageStream",
- sequence: false,
- size: 800,
- src: config.src
- },
- numOfWorkers: false ? 0 : 1,
- locator: {
- halfSample: false
+ if (counterPos === counter.length - 1) {
+ normalized = self._normalize(counter);
+ if (normalized) {
+ for (code = 0; code < coderange; code++) {
+ error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
+ if (error < bestMatch.error) {
+ bestMatch.code = code;
+ bestMatch.error = error;
+ }
+ }
+ bestMatch.end = i;
+ if (bestMatch.error > self.AVG_CODE_ERROR) {
+ return null;
+ }
+ return bestMatch;
+ }
+ } else {
+ counterPos++;
}
- }, config);
- this.init(config, function () {
- _commonEvents2['default'].once("processed", function (result) {
- _stopped = true;
- resultCallback.call(null, result);
- }, true);
- _start();
- });
- },
- ImageWrapper: _commonImage_wrapper2['default'],
- ImageDebug: _commonImage_debug2['default'],
- ResultCollector: _analyticsResult_collector2['default']
- };
- module.exports = exports['default'];
-
-/***/ },
-/* 2 */
-/***/ function(module, exports) {
-
- /*
- * typedefs.js
- * Normalizes browser-specific prefixes
- */
-
- 'use strict';
-
- if (typeof window !== 'undefined') {
- window.requestAnimFrame = (function () {
- return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function ( /* function FrameRequestCallback */callback) {
- window.setTimeout(callback, 1000 / 60);
- };
- })();
-
- navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
- window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
- }
- Math.imul = Math.imul || function (a, b) {
- var ah = a >>> 16 & 0xffff,
- al = a & 0xffff,
- bh = b >>> 16 & 0xffff,
- bl = b & 0xffff;
- // the shift by 0 fixes the sign on the high part
- // the final |0 converts the unsigned value into a signed value
- return al * bl + (ah * bl + al * bh << 16 >>> 0) | 0;
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
+ }
+ }
+ return null;
};
-
-/***/ },
-/* 3 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
+ EANReader.prototype._findPattern = function (pattern, offset, isWhite, tryHarder, epsilon) {
+ var counter = [],
+ self = this,
+ i,
+ counterPos = 0,
+ bestMatch = {
+ error: Number.MAX_VALUE,
+ code: -1,
+ start: 0,
+ end: 0
+ },
+ error,
+ j,
+ sum,
+ normalized;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ if (!offset) {
+ offset = self._nextSet(self._row);
+ }
- var _subImage = __webpack_require__(4);
+ if (isWhite === undefined) {
+ isWhite = false;
+ }
- var _subImage2 = _interopRequireDefault(_subImage);
+ if (tryHarder === undefined) {
+ tryHarder = true;
+ }
- var _commonCv_utils = __webpack_require__(5);
+ if (epsilon === undefined) {
+ epsilon = self.AVG_CODE_ERROR;
+ }
- var _commonCv_utils2 = _interopRequireDefault(_commonCv_utils);
+ for (i = 0; i < pattern.length; i++) {
+ counter[i] = 0;
+ }
- var _commonArray_helper = __webpack_require__(8);
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ if (counterPos === counter.length - 1) {
+ sum = 0;
+ for (j = 0; j < counter.length; j++) {
+ sum += counter[j];
+ }
+ normalized = self._normalize(counter);
+ if (normalized) {
+ error = self._matchPattern(normalized, pattern);
- var _commonArray_helper2 = _interopRequireDefault(_commonArray_helper);
+ if (error < epsilon) {
+ bestMatch.error = error;
+ bestMatch.start = i - sum;
+ bestMatch.end = i;
+ return bestMatch;
+ }
+ }
+ if (tryHarder) {
+ for (j = 0; j < counter.length - 2; j++) {
+ counter[j] = counter[j + 2];
+ }
+ counter[counter.length - 2] = 0;
+ counter[counter.length - 1] = 0;
+ counterPos--;
+ } else {
+ return null;
+ }
+ } else {
+ counterPos++;
+ }
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
+ }
+ }
+ return null;
+ };
- var _glMatrix = __webpack_require__(7);
+ EANReader.prototype._findStart = function () {
+ var self = this,
+ leadingWhitespaceStart,
+ offset = self._nextSet(self._row),
+ startInfo;
- /**
- * Represents a basic image combining the data and size.
- * In addition, some methods for manipulation are contained.
- * @param size {x,y} The size of the image in pixel
- * @param data {Array} If given, a flat array containing the pixel data
- * @param ArrayType {Type} If given, the desired DataType of the Array (may be typed/non-typed)
- * @param initialize {Boolean} Indicating if the array should be initialized on creation.
- * @returns {ImageWrapper}
- */
- function ImageWrapper(size, data, ArrayType, initialize) {
- if (!data) {
- if (ArrayType) {
- this.data = new ArrayType(size.x * size.y);
- if (ArrayType === Array && initialize) {
- _commonArray_helper2['default'].init(this.data, 0);
- }
- } else {
- this.data = new Uint8Array(size.x * size.y);
- if (Uint8Array === Array && initialize) {
- _commonArray_helper2['default'].init(this.data, 0);
+ while (!startInfo) {
+ startInfo = self._findPattern(self.START_PATTERN, offset);
+ if (!startInfo) {
+ return null;
+ }
+ leadingWhitespaceStart = startInfo.start - (startInfo.end - startInfo.start);
+ if (leadingWhitespaceStart >= 0) {
+ if (self._matchRange(leadingWhitespaceStart, startInfo.start, 0)) {
+ return startInfo;
}
}
- } else {
- this.data = data;
+ offset = startInfo.end;
+ startInfo = null;
}
- this.size = size;
- }
-
- /**
- * tests if a position is within the image with a given offset
- * @param imgRef {x, y} The location to test
- * @param border Number the padding value in pixel
- * @returns {Boolean} true if location inside the image's border, false otherwise
- * @see cvd/image.h
- */
- ImageWrapper.prototype.inImageWithBorder = function (imgRef, border) {
- return imgRef.x >= border && imgRef.y >= border && imgRef.x < this.size.x - border && imgRef.y < this.size.y - border;
};
- /**
- * Performs bilinear sampling
- * @param inImg Image to extract sample from
- * @param x the x-coordinate
- * @param y the y-coordinate
- * @returns the sampled value
- * @see cvd/vision.h
- */
- ImageWrapper.sample = function (inImg, x, y) {
- var lx = Math.floor(x);
- var ly = Math.floor(y);
- var w = inImg.size.x;
- var base = ly * inImg.size.x + lx;
- var a = inImg.data[base + 0];
- var b = inImg.data[base + 1];
- var c = inImg.data[base + w];
- var d = inImg.data[base + w + 1];
- var e = a - b;
- x -= lx;
- y -= ly;
-
- var result = Math.floor(x * (y * (e - c + d) - e) + y * (c - a) + a);
- return result;
- };
+ EANReader.prototype._verifyTrailingWhitespace = function (endInfo) {
+ var self = this,
+ trailingWhitespaceEnd;
- /**
- * Initializes a given array. Sets each element to zero.
- * @param array {Array} The array to initialize
- */
- ImageWrapper.clearArray = function (array) {
- var l = array.length;
- while (l--) {
- array[l] = 0;
+ trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start);
+ if (trailingWhitespaceEnd < self._row.length) {
+ if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
+ return endInfo;
+ }
}
+ return null;
};
- /**
- * Creates a {SubImage} from the current image ({this}).
- * @param from {ImageRef} The position where to start the {SubImage} from. (top-left corner)
- * @param size {ImageRef} The size of the resulting image
- * @returns {SubImage} A shared part of the original image
- */
- ImageWrapper.prototype.subImage = function (from, size) {
- return new _subImage2['default'](from, size, this);
+ EANReader.prototype._findEnd = function (offset, isWhite) {
+ var self = this,
+ endInfo = self._findPattern(self.STOP_PATTERN, offset, isWhite, false);
+
+ return endInfo !== null ? self._verifyTrailingWhitespace(endInfo) : null;
};
- /**
- * Creates an {ImageWrapper) and copies the needed underlying image-data area
- * @param imageWrapper {ImageWrapper} The target {ImageWrapper} where the data should be copied
- * @param from {ImageRef} The location where to copy from (top-left location)
- */
- ImageWrapper.prototype.subImageAsCopy = function (imageWrapper, from) {
- var sizeY = imageWrapper.size.y,
- sizeX = imageWrapper.size.x;
- var x, y;
- for (x = 0; x < sizeX; x++) {
- for (y = 0; y < sizeY; y++) {
- imageWrapper.data[y * sizeX + x] = this.data[(from.y + y) * this.size.x + from.x + x];
+ EANReader.prototype._calculateFirstDigit = function (codeFrequency) {
+ var i,
+ self = this;
+
+ for (i = 0; i < self.CODE_FREQUENCY.length; i++) {
+ if (codeFrequency === self.CODE_FREQUENCY[i]) {
+ return i;
}
}
+ return null;
};
- ImageWrapper.prototype.copyTo = function (imageWrapper) {
- var length = this.data.length,
- srcData = this.data,
- dstData = imageWrapper.data;
+ EANReader.prototype._decodePayload = function (code, result, decodedCodes) {
+ var i,
+ self = this,
+ codeFrequency = 0x0,
+ firstDigit;
- while (length--) {
- dstData[length] = srcData[length];
+ for (i = 0; i < 6; i++) {
+ code = self._decodeCode(code.end);
+ if (!code) {
+ return null;
+ }
+ if (code.code >= self.CODE_G_START) {
+ code.code = code.code - self.CODE_G_START;
+ codeFrequency |= 1 << 5 - i;
+ } else {
+ codeFrequency |= 0 << 5 - i;
+ }
+ result.push(code.code);
+ decodedCodes.push(code);
}
- };
- /**
- * Retrieves a given pixel position from the image
- * @param x {Number} The x-position
- * @param y {Number} The y-position
- * @returns {Number} The grayscale value at the pixel-position
- */
- ImageWrapper.prototype.get = function (x, y) {
- return this.data[y * this.size.x + x];
- };
+ firstDigit = self._calculateFirstDigit(codeFrequency);
+ if (firstDigit === null) {
+ return null;
+ }
+ result.unshift(firstDigit);
- /**
- * Retrieves a given pixel position from the image
- * @param x {Number} The x-position
- * @param y {Number} The y-position
- * @returns {Number} The grayscale value at the pixel-position
- */
- ImageWrapper.prototype.getSafe = function (x, y) {
- var i;
+ code = self._findPattern(self.MIDDLE_PATTERN, code.end, true, false);
+ if (code === null) {
+ return null;
+ }
+ decodedCodes.push(code);
- if (!this.indexMapping) {
- this.indexMapping = {
- x: [],
- y: []
- };
- for (i = 0; i < this.size.x; i++) {
- this.indexMapping.x[i] = i;
- this.indexMapping.x[i + this.size.x] = i;
- }
- for (i = 0; i < this.size.y; i++) {
- this.indexMapping.y[i] = i;
- this.indexMapping.y[i + this.size.y] = i;
+ for (i = 0; i < 6; i++) {
+ code = self._decodeCode(code.end, self.CODE_G_START);
+ if (!code) {
+ return null;
}
+ decodedCodes.push(code);
+ result.push(code.code);
}
- return this.data[this.indexMapping.y[y + this.size.y] * this.size.x + this.indexMapping.x[x + this.size.x]];
- };
- /**
- * Sets a given pixel position in the image
- * @param x {Number} The x-position
- * @param y {Number} The y-position
- * @param value {Number} The grayscale value to set
- * @returns {ImageWrapper} The Image itself (for possible chaining)
- */
- ImageWrapper.prototype.set = function (x, y, value) {
- this.data[y * this.size.x + x] = value;
- return this;
+ return code;
};
- /**
- * Sets the border of the image (1 pixel) to zero
- */
- ImageWrapper.prototype.zeroBorder = function () {
- var i,
- width = this.size.x,
- height = this.size.y,
- data = this.data;
- for (i = 0; i < width; i++) {
- data[i] = data[(height - 1) * width + i] = 0;
+ EANReader.prototype._decode = function () {
+ var startInfo,
+ self = this,
+ code,
+ result = [],
+ decodedCodes = [];
+
+ startInfo = self._findStart();
+ if (!startInfo) {
+ return null;
}
- for (i = 1; i < height - 1; i++) {
- data[i * width] = data[i * width + (width - 1)] = 0;
+ code = {
+ code: startInfo.code,
+ start: startInfo.start,
+ end: startInfo.end
+ };
+ decodedCodes.push(code);
+ code = self._decodePayload(code, result, decodedCodes);
+ if (!code) {
+ return null;
+ }
+ code = self._findEnd(code.end, false);
+ if (!code) {
+ return null;
}
- };
- /**
- * Inverts a binary image in place
- */
- ImageWrapper.prototype.invert = function () {
- var data = this.data,
- length = data.length;
+ decodedCodes.push(code);
- while (length--) {
- data[length] = data[length] ? 0 : 1;
+ // Checksum
+ if (!self._checksum(result)) {
+ return null;
}
+
+ return {
+ code: result.join(""),
+ start: startInfo.start,
+ end: code.end,
+ codeset: "",
+ startInfo: startInfo,
+ decodedCodes: decodedCodes
+ };
};
- ImageWrapper.prototype.convolve = function (kernel) {
- var x,
- y,
- kx,
- ky,
- kSize = kernel.length / 2 | 0,
- accu = 0;
- for (y = 0; y < this.size.y; y++) {
- for (x = 0; x < this.size.x; x++) {
- accu = 0;
- for (ky = -kSize; ky <= kSize; ky++) {
- for (kx = -kSize; kx <= kSize; kx++) {
- accu += kernel[ky + kSize][kx + kSize] * this.getSafe(x + kx, y + ky);
- }
- }
- this.data[y * this.size.x + x] = accu;
- }
- }
- };
-
- ImageWrapper.prototype.moments = function (labelcount) {
- var data = this.data,
- x,
- y,
- height = this.size.y,
- width = this.size.x,
- val,
- ysq,
- labelsum = [],
- i,
- label,
- mu11,
- mu02,
- mu20,
- x_,
- y_,
- tmp,
- result = [],
- PI = Math.PI,
- PI_4 = PI / 4;
+ EANReader.prototype._checksum = function (result) {
+ var sum = 0,
+ i;
- if (labelcount <= 0) {
- return result;
+ for (i = result.length - 2; i >= 0; i -= 2) {
+ sum += result[i];
}
-
- for (i = 0; i < labelcount; i++) {
- labelsum[i] = {
- m00: 0,
- m01: 0,
- m10: 0,
- m11: 0,
- m02: 0,
- m20: 0,
- theta: 0,
- rad: 0
- };
+ sum *= 3;
+ for (i = result.length - 1; i >= 0; i -= 2) {
+ sum += result[i];
}
+ return sum % 10 === 0;
+ };
- for (y = 0; y < height; y++) {
- ysq = y * y;
- for (x = 0; x < width; x++) {
- val = data[y * width + x];
- if (val > 0) {
- label = labelsum[val - 1];
- label.m00 += 1;
- label.m01 += y;
- label.m10 += x;
- label.m11 += x * y;
- label.m02 += ysq;
- label.m20 += x * x;
- }
- }
- }
+ exports.default = EANReader;
+
+/***/ },
+/* 11 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var eq = __webpack_require__(15);
- for (i = 0; i < labelcount; i++) {
- label = labelsum[i];
- if (!isNaN(label.m00) && label.m00 !== 0) {
- x_ = label.m10 / label.m00;
- y_ = label.m01 / label.m00;
- mu11 = label.m11 / label.m00 - x_ * y_;
- mu02 = label.m02 / label.m00 - y_ * y_;
- mu20 = label.m20 / label.m00 - x_ * x_;
- tmp = (mu02 - mu20) / (2 * mu11);
- tmp = 0.5 * Math.atan(tmp) + (mu11 >= 0 ? PI_4 : -PI_4) + PI;
- label.theta = (tmp * 180 / PI + 90) % 180 - 90;
- if (label.theta < 0) {
- label.theta += 180;
- }
- label.rad = tmp > PI ? tmp - PI : tmp;
- label.vec = _glMatrix.vec2.clone([Math.cos(tmp), Math.sin(tmp)]);
- result.push(label);
- }
+ /**
+ * Gets the index at which the first occurrence of `key` is found in `array`
+ * of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
}
+ }
+ return -1;
+ }
- return result;
- };
+ module.e = assocIndexOf;
+
+
+/***/ },
+/* 12 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isNative = __webpack_require__(139);
/**
- * Displays the {ImageWrapper} in a given canvas
- * @param canvas {Canvas} The canvas element to write to
- * @param scale {Number} Scale which is applied to each pixel-value
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
*/
- ImageWrapper.prototype.show = function (canvas, scale) {
- var ctx, frame, data, current, pixel, x, y;
-
- if (!scale) {
- scale = 1.0;
- }
- ctx = canvas.getContext('2d');
- canvas.width = this.size.x;
- canvas.height = this.size.y;
- frame = ctx.getImageData(0, 0, canvas.width, canvas.height);
- data = frame.data;
- current = 0;
- for (y = 0; y < this.size.y; y++) {
- for (x = 0; x < this.size.x; x++) {
- pixel = y * this.size.x + x;
- current = this.get(x, y) * scale;
- data[pixel * 4 + 0] = current;
- data[pixel * 4 + 1] = current;
- data[pixel * 4 + 2] = current;
- data[pixel * 4 + 3] = 255;
- }
- }
- //frame.data = data;
- ctx.putImageData(frame, 0, 0);
- };
+ function getNative(object, key) {
+ var value = object[key];
+ return isNative(value) ? value : undefined;
+ }
+ module.e = getNative;
+
+
+/***/ },
+/* 13 */
+/***/ function(module, exports, __webpack_require__) {
+
/**
- * Displays the {SubImage} in a given canvas
- * @param canvas {Canvas} The canvas element to write to
- * @param scale {Number} Scale which is applied to each pixel-value
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
- ImageWrapper.prototype.overlay = function (canvas, scale, from) {
- if (!scale || scale < 0 || scale > 360) {
- scale = 360;
- }
- var hsv = [0, 1, 1];
- var rgb = [0, 0, 0];
- var whiteRgb = [255, 255, 255];
- var blackRgb = [0, 0, 0];
- var result = [];
- var ctx = canvas.getContext('2d');
- var frame = ctx.getImageData(from.x, from.y, this.size.x, this.size.y);
- var data = frame.data;
- var length = this.data.length;
- while (length--) {
- hsv[0] = this.data[length] * scale;
- result = hsv[0] <= 0 ? whiteRgb : hsv[0] >= 360 ? blackRgb : _commonCv_utils2['default'].hsv2rgb(hsv, rgb);
- data[length * 4 + 0] = result[0];
- data[length * 4 + 1] = result[1];
- data[length * 4 + 2] = result[2];
- data[length * 4 + 3] = 255;
- }
- ctx.putImageData(frame, from.x, from.y);
- };
+ function isKeyable(value) {
+ var type = typeof value;
+ return type == 'number' || type == 'boolean' ||
+ (type == 'string' && value != '__proto__') || value == null;
+ }
- exports['default'] = ImageWrapper;
- module.exports = exports['default'];
+ module.e = isKeyable;
+
/***/ },
-/* 4 */
-/***/ function(module, exports) {
+/* 14 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getNative = __webpack_require__(12);
+
+ /* Built-in method references that are verified to be native. */
+ var nativeCreate = getNative(Object, 'create');
+
+ module.e = nativeCreate;
+
+
+/***/ },
+/* 15 */
+/***/ function(module, exports, __webpack_require__) {
/**
- * Construct representing a part of another {ImageWrapper}. Shares data
- * between the parent and the child.
- * @param from {ImageRef} The position where to start the {SubImage} from. (top-left corner)
- * @param size {ImageRef} The size of the resulting image
- * @param I {ImageWrapper} The {ImageWrapper} to share from
- * @returns {SubImage} A shared part of the original image
+ * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
*/
- 'use strict';
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- function SubImage(from, size, I) {
- if (!I) {
- I = {
- data: null,
- size: size
- };
- }
- this.data = I.data;
- this.originalSize = I.size;
- this.I = I;
+ module.e = eq;
+
+
+/***/ },
+/* 16 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(2);
- this.from = from;
- this.size = size;
- }
+ /** `Object#toString` result references. */
+ var funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]';
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
/**
- * Displays the {SubImage} in a given canvas
- * @param canvas {Canvas} The canvas element to write to
- * @param scale {Number} Scale which is applied to each pixel-value
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
*/
- SubImage.prototype.show = function (canvas, scale) {
- var ctx, frame, data, current, y, x, pixel;
-
- if (!scale) {
- scale = 1.0;
- }
- ctx = canvas.getContext('2d');
- canvas.width = this.size.x;
- canvas.height = this.size.y;
- frame = ctx.getImageData(0, 0, canvas.width, canvas.height);
- data = frame.data;
- current = 0;
- for (y = 0; y < this.size.y; y++) {
- for (x = 0; x < this.size.x; x++) {
- pixel = y * this.size.x + x;
- current = this.get(x, y) * scale;
- data[pixel * 4 + 0] = current;
- data[pixel * 4 + 1] = current;
- data[pixel * 4 + 2] = current;
- data[pixel * 4 + 3] = 255;
- }
- }
- frame.data = data;
- ctx.putImageData(frame, 0, 0);
- };
-
- /**
- * Retrieves a given pixel position from the {SubImage}
- * @param x {Number} The x-position
- * @param y {Number} The y-position
- * @returns {Number} The grayscale value at the pixel-position
- */
- SubImage.prototype.get = function (x, y) {
- return this.data[(this.from.y + y) * this.originalSize.x + this.from.x + x];
- };
-
- /**
- * Updates the underlying data from a given {ImageWrapper}
- * @param image {ImageWrapper} The updated image
- */
- SubImage.prototype.updateData = function (image) {
- this.originalSize = image.size;
- this.data = image.data;
- };
+ var objectToString = objectProto.toString;
/**
- * Updates the position of the shared area
- * @param from {x,y} The new location
- * @returns {SubImage} returns {this} for possible chaining
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
*/
- SubImage.prototype.updateFrom = function (from) {
- this.from = from;
- return this;
- };
+ function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+ }
- exports['default'] = SubImage;
- module.exports = exports['default'];
+ module.e = isFunction;
+
/***/ },
-/* 5 */
+/* 17 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var _cluster = __webpack_require__(6);
+ exports.__esModule = true;
+ exports._dimensionsConverters = exports.ERODE = exports.DILATE = exports.Tracer = undefined;
+ exports.imageRef = imageRef;
+ exports.computeIntegralImage2 = computeIntegralImage2;
+ exports.computeIntegralImage = computeIntegralImage;
+ exports.thresholdImage = thresholdImage;
+ exports.computeHistogram = computeHistogram;
+ exports.sharpenLine = sharpenLine;
+ exports.determineOtsuThreshold = determineOtsuThreshold;
+ exports.otsuThreshold = otsuThreshold;
+ exports.computeBinaryImage = computeBinaryImage;
+ exports.cluster = cluster;
+ exports.dilate = dilate;
+ exports.erode = erode;
+ exports.subtract = subtract;
+ exports.bitwiseOr = bitwiseOr;
+ exports.countNonZero = countNonZero;
+ exports.topGeneric = topGeneric;
+ exports.grayArrayFromImage = grayArrayFromImage;
+ exports.grayArrayFromContext = grayArrayFromContext;
+ exports.grayAndHalfSampleFromCanvasData = grayAndHalfSampleFromCanvasData;
+ exports.computeGray = computeGray;
+ exports.loadImageArray = loadImageArray;
+ exports.halfSample = halfSample;
+ exports.hsv2rgb = hsv2rgb;
+ exports._computeDivisors = _computeDivisors;
+ exports.calculatePatchSize = calculatePatchSize;
+ exports._parseCSSDimensionValues = _parseCSSDimensionValues;
+ exports.computeImageArea = computeImageArea;
+
+ var _cluster = __webpack_require__(53);
var _cluster2 = _interopRequireDefault(_cluster);
@@ -1140,24 +1245,29 @@ module.exports =
var _array_helper2 = _interopRequireDefault(_array_helper);
- var _glMatrix = __webpack_require__(7);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var CVUtils = {};
+ var vec2 = {
+ clone: __webpack_require__(6)
+ };
+ var vec3 = {
+ clone: __webpack_require__(77)
+ };
/**
* @param x x-coordinate
* @param y y-coordinate
* @return ImageReference {x,y} Coordinate
*/
- CVUtils.imageRef = function (x, y) {
+ function imageRef(x, y) {
var that = {
x: x,
y: y,
toVec2: function toVec2() {
- return _glMatrix.vec2.clone([this.x, this.y]);
+ return vec2.clone([this.x, this.y]);
},
toVec3: function toVec3() {
- return _glMatrix.vec3.clone([this.x, this.y, 1]);
+ return vec3.clone([this.x, this.y, 1]);
},
round: function round() {
this.x = this.x > 0.0 ? Math.floor(this.x + 0.5) : Math.floor(this.x - 0.5);
@@ -1172,7 +1282,7 @@ module.exports =
* Computes an integral image of a given grayscale image.
* @param imageDataContainer {ImageDataContainer} the image to be integrated
*/
- CVUtils.computeIntegralImage2 = function (imageWrapper, integralWrapper) {
+ function computeIntegralImage2(imageWrapper, integralWrapper) {
var imageData = imageWrapper.data;
var width = imageWrapper.size.x;
var height = imageWrapper.size.y;
@@ -1220,7 +1330,7 @@ module.exports =
}
};
- CVUtils.computeIntegralImage = function (imageWrapper, integralWrapper) {
+ function computeIntegralImage(imageWrapper, integralWrapper) {
var imageData = imageWrapper.data;
var width = imageWrapper.size.x;
var height = imageWrapper.size.y;
@@ -1242,7 +1352,7 @@ module.exports =
}
};
- CVUtils.thresholdImage = function (imageWrapper, threshold, targetWrapper) {
+ function thresholdImage(imageWrapper, threshold, targetWrapper) {
if (!targetWrapper) {
targetWrapper = imageWrapper;
}
@@ -1255,7 +1365,7 @@ module.exports =
}
};
- CVUtils.computeHistogram = function (imageWrapper, bitsPerPixel) {
+ function computeHistogram(imageWrapper, bitsPerPixel) {
if (!bitsPerPixel) {
bitsPerPixel = 8;
}
@@ -1271,7 +1381,7 @@ module.exports =
return hist;
};
- CVUtils.sharpenLine = function (line) {
+ function sharpenLine(line) {
var i,
length = line.length,
left = line[0],
@@ -1288,7 +1398,7 @@ module.exports =
return line;
};
- CVUtils.determineOtsuThreshold = function (imageWrapper, bitsPerPixel) {
+ function determineOtsuThreshold(imageWrapper, bitsPerPixel) {
if (!bitsPerPixel) {
bitsPerPixel = 8;
}
@@ -1327,7 +1437,7 @@ module.exports =
m12,
max = (1 << bitsPerPixel) - 1;
- hist = CVUtils.computeHistogram(imageWrapper, bitsPerPixel);
+ hist = computeHistogram(imageWrapper, bitsPerPixel);
for (k = 1; k < max; k++) {
p1 = px(0, k);
p2 = px(k + 1, max);
@@ -1340,23 +1450,23 @@ module.exports =
m12 = m1 - m2;
vet[k] = m12 * m12 / p12;
}
- return _array_helper2['default'].maxIndex(vet);
+ return _array_helper2.default.maxIndex(vet);
}
threshold = determineThreshold();
return threshold << bitShift;
};
- CVUtils.otsuThreshold = function (imageWrapper, targetWrapper) {
- var threshold = CVUtils.determineOtsuThreshold(imageWrapper);
+ function otsuThreshold(imageWrapper, targetWrapper) {
+ var threshold = determineOtsuThreshold(imageWrapper);
- CVUtils.thresholdImage(imageWrapper, threshold, targetWrapper);
+ thresholdImage(imageWrapper, threshold, targetWrapper);
return threshold;
};
// local thresholding
- CVUtils.computeBinaryImage = function (imageWrapper, integralWrapper, targetWrapper) {
- CVUtils.computeIntegralImage(imageWrapper, integralWrapper);
+ function computeBinaryImage(imageWrapper, integralWrapper, targetWrapper) {
+ computeIntegralImage(imageWrapper, integralWrapper);
if (!targetWrapper) {
targetWrapper = imageWrapper;
@@ -1406,7 +1516,7 @@ module.exports =
}
};
- CVUtils.cluster = function (points, threshold, property) {
+ function cluster(points, threshold, property) {
var i,
k,
cluster,
@@ -1431,15 +1541,15 @@ module.exports =
// iterate over each cloud
for (i = 0; i < points.length; i++) {
- point = _cluster2['default'].createPoint(points[i], i, property);
+ point = _cluster2.default.createPoint(points[i], i, property);
if (!addToCluster(point)) {
- clusters.push(_cluster2['default'].create(point, threshold));
+ clusters.push(_cluster2.default.create(point, threshold));
}
}
return clusters;
};
- CVUtils.Tracer = {
+ var Tracer = exports.Tracer = {
trace: function trace(points, vec) {
var iteration,
maxIterations = 10,
@@ -1517,10 +1627,10 @@ module.exports =
}
};
- CVUtils.DILATE = 1;
- CVUtils.ERODE = 2;
+ var DILATE = exports.DILATE = 1;
+ var ERODE = exports.ERODE = 2;
- CVUtils.dilate = function (inImageWrapper, outImageWrapper) {
+ function dilate(inImageWrapper, outImageWrapper) {
var v,
u,
inImageData = inImageWrapper.data,
@@ -1545,7 +1655,7 @@ module.exports =
}
};
- CVUtils.erode = function (inImageWrapper, outImageWrapper) {
+ function erode(inImageWrapper, outImageWrapper) {
var v,
u,
inImageData = inImageWrapper.data,
@@ -1570,7 +1680,7 @@ module.exports =
}
};
- CVUtils.subtract = function (aImageWrapper, bImageWrapper, resultImageWrapper) {
+ function subtract(aImageWrapper, bImageWrapper, resultImageWrapper) {
if (!resultImageWrapper) {
resultImageWrapper = aImageWrapper;
}
@@ -1584,7 +1694,7 @@ module.exports =
}
};
- CVUtils.bitwiseOr = function (aImageWrapper, bImageWrapper, resultImageWrapper) {
+ function bitwiseOr(aImageWrapper, bImageWrapper, resultImageWrapper) {
if (!resultImageWrapper) {
resultImageWrapper = aImageWrapper;
}
@@ -1598,7 +1708,7 @@ module.exports =
}
};
- CVUtils.countNonZero = function (imageWrapper) {
+ function countNonZero(imageWrapper) {
var length = imageWrapper.data.length,
data = imageWrapper.data,
sum = 0;
@@ -1609,7 +1719,7 @@ module.exports =
return sum;
};
- CVUtils.topGeneric = function (list, top, scoreFunc) {
+ function topGeneric(list, top, scoreFunc) {
var i,
minIdx = 0,
min = 0,
@@ -1644,18 +1754,18 @@ module.exports =
return queue;
};
- CVUtils.grayArrayFromImage = function (htmlImage, offsetX, ctx, array) {
+ function grayArrayFromImage(htmlImage, offsetX, ctx, array) {
ctx.drawImage(htmlImage, offsetX, 0, htmlImage.width, htmlImage.height);
var ctxData = ctx.getImageData(offsetX, 0, htmlImage.width, htmlImage.height).data;
- CVUtils.computeGray(ctxData, array);
+ computeGray(ctxData, array);
};
- CVUtils.grayArrayFromContext = function (ctx, size, offset, array) {
+ function grayArrayFromContext(ctx, size, offset, array) {
var ctxData = ctx.getImageData(offset.x, offset.y, size.x, size.y).data;
- CVUtils.computeGray(ctxData, array);
+ computeGray(ctxData, array);
};
- CVUtils.grayAndHalfSampleFromCanvasData = function (canvasData, size, outArray) {
+ function grayAndHalfSampleFromCanvasData(canvasData, size, outArray) {
var topRowIdx = 0;
var bottomRowIdx = size.x;
var endIdx = Math.floor(canvasData.length / 4);
@@ -1676,7 +1786,7 @@ module.exports =
}
};
- CVUtils.computeGray = function (imageData, outArray, config) {
+ function computeGray(imageData, outArray, config) {
var l = imageData.length / 4 | 0,
i,
singleChannel = config && config.singleChannel === true;
@@ -1692,7 +1802,7 @@ module.exports =
}
};
- CVUtils.loadImageArray = function (src, callback, canvas) {
+ function loadImageArray(src, callback, canvas) {
if (!canvas) {
canvas = document.createElement('canvas');
}
@@ -1706,7 +1816,7 @@ module.exports =
var array = new Uint8Array(this.width * this.height);
ctx.drawImage(this, 0, 0);
var data = ctx.getImageData(0, 0, this.width, this.height).data;
- CVUtils.computeGray(data, array);
+ computeGray(data, array);
this.callback(array, {
x: this.width,
y: this.height
@@ -1719,7 +1829,7 @@ module.exports =
* @param inImg {ImageWrapper} input image to be sampled
* @param outImg {ImageWrapper} to be stored in
*/
- CVUtils.halfSample = function (inImgWrapper, outImgWrapper) {
+ function halfSample(inImgWrapper, outImgWrapper) {
var inImg = inImgWrapper.data;
var inWidth = inImgWrapper.size.x;
var outImg = outImgWrapper.data;
@@ -1740,7 +1850,7 @@ module.exports =
}
};
- CVUtils.hsv2rgb = function (hsv, rgb) {
+ function hsv2rgb(hsv, rgb) {
var h = hsv[0],
s = hsv[1],
v = hsv[2],
@@ -1778,7 +1888,7 @@ module.exports =
return rgb;
};
- CVUtils._computeDivisors = function (n) {
+ function _computeDivisors(n) {
var largeDivisors = [],
divisors = [],
i;
@@ -1794,7 +1904,7 @@ module.exports =
return divisors.concat(largeDivisors);
};
- CVUtils._computeIntersection = function (arr1, arr2) {
+ function _computeIntersection(arr1, arr2) {
var i = 0,
j = 0,
result = [];
@@ -1813,11 +1923,11 @@ module.exports =
return result;
};
- CVUtils.calculatePatchSize = function (patchSize, imgSize) {
- var divisorsX = this._computeDivisors(imgSize.x),
- divisorsY = this._computeDivisors(imgSize.y),
+ function calculatePatchSize(patchSize, imgSize) {
+ var divisorsX = _computeDivisors(imgSize.x),
+ divisorsY = _computeDivisors(imgSize.y),
wideSide = Math.max(imgSize.x, imgSize.y),
- common = this._computeIntersection(divisorsX, divisorsY),
+ common = _computeIntersection(divisorsX, divisorsY),
nrOfPatchesList = [8, 10, 15, 20, 32, 60, 80],
nrOfPatchesMap = {
"x-small": 5,
@@ -1853,15 +1963,15 @@ module.exports =
optimalPatchSize = findPatchSizeForDivisors(common);
if (!optimalPatchSize) {
- optimalPatchSize = findPatchSizeForDivisors(this._computeDivisors(wideSide));
+ optimalPatchSize = findPatchSizeForDivisors(_computeDivisors(wideSide));
if (!optimalPatchSize) {
- optimalPatchSize = findPatchSizeForDivisors(this._computeDivisors(desiredPatchSize * nrOfPatches));
+ optimalPatchSize = findPatchSizeForDivisors(_computeDivisors(desiredPatchSize * nrOfPatches));
}
}
return optimalPatchSize;
};
- CVUtils._parseCSSDimensionValues = function (value) {
+ function _parseCSSDimensionValues(value) {
var dimension = {
value: parseFloat(value),
unit: value.indexOf("%") === value.length - 1 ? "%" : "%"
@@ -1870,7 +1980,7 @@ module.exports =
return dimension;
};
- CVUtils._dimensionsConverters = {
+ var _dimensionsConverters = exports._dimensionsConverters = {
top: function top(dimension, context) {
if (dimension.unit === "%") {
return Math.floor(context.height * (dimension.value / 100));
@@ -1893,13 +2003,13 @@ module.exports =
}
};
- CVUtils.computeImageArea = function (inputWidth, inputHeight, area) {
+ function computeImageArea(inputWidth, inputHeight, area) {
var context = { width: inputWidth, height: inputHeight };
var parsedArea = Object.keys(area).reduce(function (result, key) {
var value = area[key],
- parsed = CVUtils._parseCSSDimensionValues(value),
- calculated = CVUtils._dimensionsConverters[key](parsed, context);
+ parsed = _parseCSSDimensionValues(value),
+ calculated = _dimensionsConverters[key](parsed, context);
result[key] = calculated;
return result;
@@ -1912,2565 +2022,4979 @@ module.exports =
sh: parsedArea.bottom - parsedArea.top
};
};
-
- exports['default'] = CVUtils;
- module.exports = exports['default'];
/***/ },
-/* 6 */
+/* 18 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
+ exports.__esModule = true;
- var _glMatrix = __webpack_require__(7);
+ var _subImage = __webpack_require__(55);
- /**
- * Creates a cluster for grouping similar orientations of datapoints
- */
- exports['default'] = {
- create: function create(point, threshold) {
- var points = [],
- center = {
- rad: 0,
- vec: _glMatrix.vec2.clone([0, 0])
- },
- pointMap = {};
+ var _subImage2 = _interopRequireDefault(_subImage);
- function init() {
- _add(point);
- updateCenter();
- }
+ var _cv_utils = __webpack_require__(17);
- function _add(pointToAdd) {
- pointMap[pointToAdd.id] = pointToAdd;
- points.push(pointToAdd);
- }
+ var _array_helper = __webpack_require__(8);
- function updateCenter() {
- var i,
- sum = 0;
- for (i = 0; i < points.length; i++) {
- sum += points[i].rad;
+ var _array_helper2 = _interopRequireDefault(_array_helper);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var vec2 = {
+ clone: __webpack_require__(6)
+ };
+
+ /**
+ * Represents a basic image combining the data and size.
+ * In addition, some methods for manipulation are contained.
+ * @param size {x,y} The size of the image in pixel
+ * @param data {Array} If given, a flat array containing the pixel data
+ * @param ArrayType {Type} If given, the desired DataType of the Array (may be typed/non-typed)
+ * @param initialize {Boolean} Indicating if the array should be initialized on creation.
+ * @returns {ImageWrapper}
+ */
+ function ImageWrapper(size, data, ArrayType, initialize) {
+ if (!data) {
+ if (ArrayType) {
+ this.data = new ArrayType(size.x * size.y);
+ if (ArrayType === Array && initialize) {
+ _array_helper2.default.init(this.data, 0);
+ }
+ } else {
+ this.data = new Uint8Array(size.x * size.y);
+ if (Uint8Array === Array && initialize) {
+ _array_helper2.default.init(this.data, 0);
}
- center.rad = sum / points.length;
- center.vec = _glMatrix.vec2.clone([Math.cos(center.rad), Math.sin(center.rad)]);
}
+ } else {
+ this.data = data;
+ }
+ this.size = size;
+ }
- init();
+ /**
+ * tests if a position is within the image with a given offset
+ * @param imgRef {x, y} The location to test
+ * @param border Number the padding value in pixel
+ * @returns {Boolean} true if location inside the image's border, false otherwise
+ * @see cvd/image.h
+ */
+ ImageWrapper.prototype.inImageWithBorder = function (imgRef, border) {
+ return imgRef.x >= border && imgRef.y >= border && imgRef.x < this.size.x - border && imgRef.y < this.size.y - border;
+ };
- return {
- add: function add(pointToAdd) {
- if (!pointMap[pointToAdd.id]) {
- _add(pointToAdd);
- updateCenter();
- }
- },
- fits: function fits(otherPoint) {
- // check cosine similarity to center-angle
- var similarity = Math.abs(_glMatrix.vec2.dot(otherPoint.point.vec, center.vec));
- if (similarity > threshold) {
- return true;
- }
- return false;
- },
- getPoints: function getPoints() {
- return points;
- },
- getCenter: function getCenter() {
- return center;
- }
- };
- },
- createPoint: function createPoint(newPoint, id, property) {
- return {
- rad: newPoint[property],
- point: newPoint,
- id: id
- };
+ /**
+ * Performs bilinear sampling
+ * @param inImg Image to extract sample from
+ * @param x the x-coordinate
+ * @param y the y-coordinate
+ * @returns the sampled value
+ * @see cvd/vision.h
+ */
+ ImageWrapper.sample = function (inImg, x, y) {
+ var lx = Math.floor(x);
+ var ly = Math.floor(y);
+ var w = inImg.size.x;
+ var base = ly * inImg.size.x + lx;
+ var a = inImg.data[base + 0];
+ var b = inImg.data[base + 1];
+ var c = inImg.data[base + w];
+ var d = inImg.data[base + w + 1];
+ var e = a - b;
+ x -= lx;
+ y -= ly;
+
+ var result = Math.floor(x * (y * (e - c + d) - e) + y * (c - a) + a);
+ return result;
+ };
+
+ /**
+ * Initializes a given array. Sets each element to zero.
+ * @param array {Array} The array to initialize
+ */
+ ImageWrapper.clearArray = function (array) {
+ var l = array.length;
+ while (l--) {
+ array[l] = 0;
}
};
- module.exports = exports['default'];
-
-/***/ },
-/* 7 */
-/***/ function(module, exports) {
-
- module.exports = require("gl-matrix");
-
-/***/ },
-/* 8 */
-/***/ function(module, exports) {
-
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports["default"] = {
- init: function init(arr, val) {
- var l = arr.length;
- while (l--) {
- arr[l] = val;
- }
- },
+ /**
+ * Creates a {SubImage} from the current image ({this}).
+ * @param from {ImageRef} The position where to start the {SubImage} from. (top-left corner)
+ * @param size {ImageRef} The size of the resulting image
+ * @returns {SubImage} A shared part of the original image
+ */
+ ImageWrapper.prototype.subImage = function (from, size) {
+ return new _subImage2.default(from, size, this);
+ };
- /**
- * Shuffles the content of an array
- * @return {Array} the array itself shuffled
- */
- shuffle: function shuffle(arr) {
- var i = arr.length - 1,
- j,
- x;
- for (i; i >= 0; i--) {
- j = Math.floor(Math.random() * i);
- x = arr[i];
- arr[i] = arr[j];
- arr[j] = x;
+ /**
+ * Creates an {ImageWrapper) and copies the needed underlying image-data area
+ * @param imageWrapper {ImageWrapper} The target {ImageWrapper} where the data should be copied
+ * @param from {ImageRef} The location where to copy from (top-left location)
+ */
+ ImageWrapper.prototype.subImageAsCopy = function (imageWrapper, from) {
+ var sizeY = imageWrapper.size.y,
+ sizeX = imageWrapper.size.x;
+ var x, y;
+ for (x = 0; x < sizeX; x++) {
+ for (y = 0; y < sizeY; y++) {
+ imageWrapper.data[y * sizeX + x] = this.data[(from.y + y) * this.size.x + from.x + x];
}
- return arr;
- },
+ }
+ };
- toPointList: function toPointList(arr) {
- var i,
- j,
- row = [],
- rows = [];
- for (i = 0; i < arr.length; i++) {
- row = [];
- for (j = 0; j < arr[i].length; j++) {
- row[j] = arr[i][j];
- }
- rows[i] = "[" + row.join(",") + "]";
- }
- return "[" + rows.join(",\r\n") + "]";
- },
-
- /**
- * returns the elements which's score is bigger than the threshold
- * @return {Array} the reduced array
- */
- threshold: function threshold(arr, _threshold, scoreFunc) {
- var i,
- queue = [];
- for (i = 0; i < arr.length; i++) {
- if (scoreFunc.apply(arr, [arr[i]]) >= _threshold) {
- queue.push(arr[i]);
- }
- }
- return queue;
- },
+ ImageWrapper.prototype.copyTo = function (imageWrapper) {
+ var length = this.data.length,
+ srcData = this.data,
+ dstData = imageWrapper.data;
- maxIndex: function maxIndex(arr) {
- var i,
- max = 0;
- for (i = 0; i < arr.length; i++) {
- if (arr[i] > arr[max]) {
- max = i;
- }
- }
- return max;
- },
+ while (length--) {
+ dstData[length] = srcData[length];
+ }
+ };
- max: function max(arr) {
- var i,
- max = 0;
- for (i = 0; i < arr.length; i++) {
- if (arr[i] > max) {
- max = arr[i];
- }
- }
- return max;
- },
+ /**
+ * Retrieves a given pixel position from the image
+ * @param x {Number} The x-position
+ * @param y {Number} The y-position
+ * @returns {Number} The grayscale value at the pixel-position
+ */
+ ImageWrapper.prototype.get = function (x, y) {
+ return this.data[y * this.size.x + x];
+ };
- sum: function sum(arr) {
- var length = arr.length,
- sum = 0;
+ /**
+ * Retrieves a given pixel position from the image
+ * @param x {Number} The x-position
+ * @param y {Number} The y-position
+ * @returns {Number} The grayscale value at the pixel-position
+ */
+ ImageWrapper.prototype.getSafe = function (x, y) {
+ var i;
- while (length--) {
- sum += arr[length];
+ if (!this.indexMapping) {
+ this.indexMapping = {
+ x: [],
+ y: []
+ };
+ for (i = 0; i < this.size.x; i++) {
+ this.indexMapping.x[i] = i;
+ this.indexMapping.x[i + this.size.x] = i;
+ }
+ for (i = 0; i < this.size.y; i++) {
+ this.indexMapping.y[i] = i;
+ this.indexMapping.y[i + this.size.y] = i;
}
- return sum;
}
+ return this.data[this.indexMapping.y[y + this.size.y] * this.size.x + this.indexMapping.x[x + this.size.x]];
};
- module.exports = exports["default"];
-
-/***/ },
-/* 9 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(global) {'use strict';
-
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var _commonImage_wrapper = __webpack_require__(3);
-
- var _commonImage_wrapper2 = _interopRequireDefault(_commonImage_wrapper);
- var _commonCv_utils = __webpack_require__(5);
-
- var _commonCv_utils2 = _interopRequireDefault(_commonCv_utils);
+ /**
+ * Sets a given pixel position in the image
+ * @param x {Number} The x-position
+ * @param y {Number} The y-position
+ * @param value {Number} The grayscale value to set
+ * @returns {ImageWrapper} The Image itself (for possible chaining)
+ */
+ ImageWrapper.prototype.set = function (x, y, value) {
+ this.data[y * this.size.x + x] = value;
+ return this;
+ };
- var _commonArray_helper = __webpack_require__(8);
+ /**
+ * Sets the border of the image (1 pixel) to zero
+ */
+ ImageWrapper.prototype.zeroBorder = function () {
+ var i,
+ width = this.size.x,
+ height = this.size.y,
+ data = this.data;
+ for (i = 0; i < width; i++) {
+ data[i] = data[(height - 1) * width + i] = 0;
+ }
+ for (i = 1; i < height - 1; i++) {
+ data[i * width] = data[i * width + (width - 1)] = 0;
+ }
+ };
- var _commonArray_helper2 = _interopRequireDefault(_commonArray_helper);
+ /**
+ * Inverts a binary image in place
+ */
+ ImageWrapper.prototype.invert = function () {
+ var data = this.data,
+ length = data.length;
- var _commonImage_debug = __webpack_require__(10);
+ while (length--) {
+ data[length] = data[length] ? 0 : 1;
+ }
+ };
- var _commonImage_debug2 = _interopRequireDefault(_commonImage_debug);
+ ImageWrapper.prototype.convolve = function (kernel) {
+ var x,
+ y,
+ kx,
+ ky,
+ kSize = kernel.length / 2 | 0,
+ accu = 0;
+ for (y = 0; y < this.size.y; y++) {
+ for (x = 0; x < this.size.x; x++) {
+ accu = 0;
+ for (ky = -kSize; ky <= kSize; ky++) {
+ for (kx = -kSize; kx <= kSize; kx++) {
+ accu += kernel[ky + kSize][kx + kSize] * this.getSafe(x + kx, y + ky);
+ }
+ }
+ this.data[y * this.size.x + x] = accu;
+ }
+ }
+ };
- var _rasterizer = __webpack_require__(11);
+ ImageWrapper.prototype.moments = function (labelcount) {
+ var data = this.data,
+ x,
+ y,
+ height = this.size.y,
+ width = this.size.x,
+ val,
+ ysq,
+ labelsum = [],
+ i,
+ label,
+ mu11,
+ mu02,
+ mu20,
+ x_,
+ y_,
+ tmp,
+ result = [],
+ PI = Math.PI,
+ PI_4 = PI / 4;
- var _rasterizer2 = _interopRequireDefault(_rasterizer);
+ if (labelcount <= 0) {
+ return result;
+ }
- var _tracer = __webpack_require__(12);
+ for (i = 0; i < labelcount; i++) {
+ labelsum[i] = {
+ m00: 0,
+ m01: 0,
+ m10: 0,
+ m11: 0,
+ m02: 0,
+ m20: 0,
+ theta: 0,
+ rad: 0
+ };
+ }
- var _tracer2 = _interopRequireDefault(_tracer);
+ for (y = 0; y < height; y++) {
+ ysq = y * y;
+ for (x = 0; x < width; x++) {
+ val = data[y * width + x];
+ if (val > 0) {
+ label = labelsum[val - 1];
+ label.m00 += 1;
+ label.m01 += y;
+ label.m10 += x;
+ label.m11 += x * y;
+ label.m02 += ysq;
+ label.m20 += x * x;
+ }
+ }
+ }
- var _skeletonizer2 = __webpack_require__(13);
+ for (i = 0; i < labelcount; i++) {
+ label = labelsum[i];
+ if (!isNaN(label.m00) && label.m00 !== 0) {
+ x_ = label.m10 / label.m00;
+ y_ = label.m01 / label.m00;
+ mu11 = label.m11 / label.m00 - x_ * y_;
+ mu02 = label.m02 / label.m00 - y_ * y_;
+ mu20 = label.m20 / label.m00 - x_ * x_;
+ tmp = (mu02 - mu20) / (2 * mu11);
+ tmp = 0.5 * Math.atan(tmp) + (mu11 >= 0 ? PI_4 : -PI_4) + PI;
+ label.theta = (tmp * 180 / PI + 90) % 180 - 90;
+ if (label.theta < 0) {
+ label.theta += 180;
+ }
+ label.rad = tmp > PI ? tmp - PI : tmp;
+ label.vec = vec2.clone([Math.cos(tmp), Math.sin(tmp)]);
+ result.push(label);
+ }
+ }
- var _skeletonizer3 = _interopRequireDefault(_skeletonizer2);
+ return result;
+ };
- var _glMatrix = __webpack_require__(7);
+ /**
+ * Displays the {ImageWrapper} in a given canvas
+ * @param canvas {Canvas} The canvas element to write to
+ * @param scale {Number} Scale which is applied to each pixel-value
+ */
+ ImageWrapper.prototype.show = function (canvas, scale) {
+ var ctx, frame, data, current, pixel, x, y;
- var _config,
- _currentImageWrapper,
- _skelImageWrapper,
- _subImageWrapper,
- _labelImageWrapper,
- _patchGrid,
- _patchLabelGrid,
- _imageToPatchGrid,
- _binaryImageWrapper,
- _patchSize,
- _canvasContainer = {
- ctx: {
- binary: null
- },
- dom: {
- binary: null
+ if (!scale) {
+ scale = 1.0;
}
- },
- _numPatches = { x: 0, y: 0 },
- _inputImageWrapper,
- _skeletonizer;
-
- function initBuffers() {
- var skeletonImageData;
-
- if (_config.halfSample) {
- _currentImageWrapper = new _commonImage_wrapper2['default']({
- x: _inputImageWrapper.size.x / 2 | 0,
- y: _inputImageWrapper.size.y / 2 | 0
- });
- } else {
- _currentImageWrapper = _inputImageWrapper;
+ ctx = canvas.getContext('2d');
+ canvas.width = this.size.x;
+ canvas.height = this.size.y;
+ frame = ctx.getImageData(0, 0, canvas.width, canvas.height);
+ data = frame.data;
+ current = 0;
+ for (y = 0; y < this.size.y; y++) {
+ for (x = 0; x < this.size.x; x++) {
+ pixel = y * this.size.x + x;
+ current = this.get(x, y) * scale;
+ data[pixel * 4 + 0] = current;
+ data[pixel * 4 + 1] = current;
+ data[pixel * 4 + 2] = current;
+ data[pixel * 4 + 3] = 255;
+ }
}
+ //frame.data = data;
+ ctx.putImageData(frame, 0, 0);
+ };
- _patchSize = _commonCv_utils2['default'].calculatePatchSize(_config.patchSize, _currentImageWrapper.size);
-
- _numPatches.x = _currentImageWrapper.size.x / _patchSize.x | 0;
- _numPatches.y = _currentImageWrapper.size.y / _patchSize.y | 0;
-
- _binaryImageWrapper = new _commonImage_wrapper2['default'](_currentImageWrapper.size, undefined, Uint8Array, false);
-
- _labelImageWrapper = new _commonImage_wrapper2['default'](_patchSize, undefined, Array, true);
+ /**
+ * Displays the {SubImage} in a given canvas
+ * @param canvas {Canvas} The canvas element to write to
+ * @param scale {Number} Scale which is applied to each pixel-value
+ */
+ ImageWrapper.prototype.overlay = function (canvas, scale, from) {
+ if (!scale || scale < 0 || scale > 360) {
+ scale = 360;
+ }
+ var hsv = [0, 1, 1];
+ var rgb = [0, 0, 0];
+ var whiteRgb = [255, 255, 255];
+ var blackRgb = [0, 0, 0];
+ var result = [];
+ var ctx = canvas.getContext('2d');
+ var frame = ctx.getImageData(from.x, from.y, this.size.x, this.size.y);
+ var data = frame.data;
+ var length = this.data.length;
+ while (length--) {
+ hsv[0] = this.data[length] * scale;
+ result = hsv[0] <= 0 ? whiteRgb : hsv[0] >= 360 ? blackRgb : (0, _cv_utils.hsv2rgb)(hsv, rgb);
+ data[length * 4 + 0] = result[0];
+ data[length * 4 + 1] = result[1];
+ data[length * 4 + 2] = result[2];
+ data[length * 4 + 3] = 255;
+ }
+ ctx.putImageData(frame, from.x, from.y);
+ };
- skeletonImageData = new ArrayBuffer(64 * 1024);
- _subImageWrapper = new _commonImage_wrapper2['default'](_patchSize, new Uint8Array(skeletonImageData, 0, _patchSize.x * _patchSize.y));
- _skelImageWrapper = new _commonImage_wrapper2['default'](_patchSize, new Uint8Array(skeletonImageData, _patchSize.x * _patchSize.y * 3, _patchSize.x * _patchSize.y), undefined, true);
- _skeletonizer = (0, _skeletonizer3['default'])(typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : global, {
- size: _patchSize.x
- }, skeletonImageData);
+ exports.default = ImageWrapper;
+
+/***/ },
+/* 19 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array.length;
- _imageToPatchGrid = new _commonImage_wrapper2['default']({
- x: _currentImageWrapper.size.x / _subImageWrapper.size.x | 0,
- y: _currentImageWrapper.size.y / _subImageWrapper.size.y | 0
- }, undefined, Array, true);
- _patchGrid = new _commonImage_wrapper2['default'](_imageToPatchGrid.size, undefined, undefined, true);
- _patchLabelGrid = new _commonImage_wrapper2['default'](_imageToPatchGrid.size, undefined, Int32Array, true);
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
}
- function initCanvas() {
- if (_config.useWorker || typeof document === 'undefined') {
- return;
- }
- _canvasContainer.dom.binary = document.createElement("canvas");
- _canvasContainer.dom.binary.className = "binaryBuffer";
- if (false) {
- document.querySelector("#debug").appendChild(_canvasContainer.dom.binary);
- }
- _canvasContainer.ctx.binary = _canvasContainer.dom.binary.getContext("2d");
- _canvasContainer.dom.binary.width = _binaryImageWrapper.size.x;
- _canvasContainer.dom.binary.height = _binaryImageWrapper.size.y;
- }
+ module.e = arrayReduce;
+
+
+/***/ },
+/* 20 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var copyObjectWith = __webpack_require__(110);
/**
- * Creates a bounding box which encloses all the given patches
- * @returns {Array} The minimal bounding box
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property names to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @returns {Object} Returns `object`.
*/
- function boxFromPatches(patches) {
- var overAvg,
- i,
- j,
- patch,
- transMat,
- minx = _binaryImageWrapper.size.x,
- miny = _binaryImageWrapper.size.y,
- maxx = -_binaryImageWrapper.size.x,
- maxy = -_binaryImageWrapper.size.y,
- box,
- scale;
-
- // draw all patches which are to be taken into consideration
- overAvg = 0;
- for (i = 0; i < patches.length; i++) {
- patch = patches[i];
- overAvg += patch.rad;
- if (false) {
- _commonImage_debug2['default'].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "red" });
- }
- }
+ function copyObject(source, props, object) {
+ return copyObjectWith(source, props, object);
+ }
- overAvg /= patches.length;
- overAvg = (overAvg * 180 / Math.PI + 90) % 180 - 90;
- if (overAvg < 0) {
- overAvg += 180;
- }
+ module.e = copyObject;
+
+
+/***/ },
+/* 21 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+ function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+ }
- overAvg = (180 - overAvg) * Math.PI / 180;
- transMat = _glMatrix.mat2.clone([Math.cos(overAvg), Math.sin(overAvg), -Math.sin(overAvg), Math.cos(overAvg)]);
+ module.e = isHostObject;
+
+
+/***/ },
+/* 22 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /** Used as references for various `Number` constants. */
+ var MAX_SAFE_INTEGER = 9007199254740991;
- // iterate over patches and rotate by angle
- for (i = 0; i < patches.length; i++) {
- patch = patches[i];
- for (j = 0; j < 4; j++) {
- _glMatrix.vec2.transformMat2(patch.box[j], patch.box[j], transMat);
- }
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
- if (false) {
- _commonImage_debug2['default'].drawPath(patch.box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#99ff00', lineWidth: 2 });
- }
- }
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+ }
- // find bounding box
- for (i = 0; i < patches.length; i++) {
- patch = patches[i];
- for (j = 0; j < 4; j++) {
- if (patch.box[j][0] < minx) {
- minx = patch.box[j][0];
- }
- if (patch.box[j][0] > maxx) {
- maxx = patch.box[j][0];
- }
- if (patch.box[j][1] < miny) {
- miny = patch.box[j][1];
- }
- if (patch.box[j][1] > maxy) {
- maxy = patch.box[j][1];
- }
- }
- }
+ module.e = isIndex;
+
+
+/***/ },
+/* 23 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- box = [[minx, miny], [maxx, miny], [maxx, maxy], [minx, maxy]];
+ /**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
- if (false) {
- _commonImage_debug2['default'].drawPath(box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#ff0000', lineWidth: 2 });
- }
+ return value === proto;
+ }
- scale = _config.halfSample ? 2 : 1;
- // reverse rotation;
- transMat = _glMatrix.mat2.invert(transMat, transMat);
- for (j = 0; j < 4; j++) {
- _glMatrix.vec2.transformMat2(box[j], box[j], transMat);
- }
+ module.e = isPrototype;
+
+
+/***/ },
+/* 24 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isArrayLikeObject = __webpack_require__(26);
- if (false) {
- _commonImage_debug2['default'].drawPath(box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#ff0000', lineWidth: 2 });
- }
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]';
- for (j = 0; j < 4; j++) {
- _glMatrix.vec2.scale(box[j], box[j], scale);
- }
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- return box;
- }
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * Creates a binary image of the current image
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
*/
- function binarizeImage() {
- _commonCv_utils2['default'].otsuThreshold(_currentImageWrapper, _binaryImageWrapper);
- _binaryImageWrapper.zeroBorder();
- if (_config.showCanvas) {
- _binaryImageWrapper.show(_canvasContainer.dom.binary, 255);
- }
- }
+ var objectToString = objectProto.toString;
+
+ /** Built-in value references. */
+ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
- * Iterate over the entire image
- * extract patches
- */
- function findPatches() {
- var i,
- j,
- x,
- y,
- moments,
- patchesFound = [],
- rasterizer,
- rasterResult,
- patch;
- for (i = 0; i < _numPatches.x; i++) {
- for (j = 0; j < _numPatches.y; j++) {
- x = _subImageWrapper.size.x * i;
- y = _subImageWrapper.size.y * j;
-
- // seperate parts
- skeletonize(x, y);
-
- // Rasterize, find individual bars
- _skelImageWrapper.zeroBorder();
- _commonArray_helper2['default'].init(_labelImageWrapper.data, 0);
- rasterizer = _rasterizer2['default'].create(_skelImageWrapper, _labelImageWrapper);
- rasterResult = rasterizer.rasterize(0);
-
- if (false) {
- _labelImageWrapper.overlay(_canvasContainer.dom.binary, Math.floor(360 / rasterResult.count), { x: x, y: y });
- }
-
- // calculate moments from the skeletonized patch
- moments = _labelImageWrapper.moments(rasterResult.count);
-
- // extract eligible patches
- patchesFound = patchesFound.concat(describePatch(moments, [i, j], x, y));
- }
- }
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ function isArguments(value) {
+ // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+ }
- if (false) {
- for (i = 0; i < patchesFound.length; i++) {
- patch = patchesFound[i];
- _commonImage_debug2['default'].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "#99ff00", lineWidth: 2 });
- }
- }
+ module.e = isArguments;
+
+
+/***/ },
+/* 25 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getLength = __webpack_require__(114),
+ isFunction = __webpack_require__(16),
+ isLength = __webpack_require__(27);
- return patchesFound;
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(getLength(value)) && !isFunction(value);
}
+ module.e = isArrayLike;
+
+
+/***/ },
+/* 26 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isArrayLike = __webpack_require__(25),
+ isObjectLike = __webpack_require__(7);
+
/**
- * Finds those connected areas which contain at least 6 patches
- * and returns them ordered DESC by the number of contained patches
- * @param {Number} maxLabel
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
*/
- function findBiggestConnectedAreas(maxLabel) {
- var i,
- sum,
- labelHist = [],
- topLabels = [];
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
- for (i = 0; i < maxLabel; i++) {
- labelHist.push(0);
- }
- sum = _patchLabelGrid.data.length;
- while (sum--) {
- if (_patchLabelGrid.data[sum] > 0) {
- labelHist[_patchLabelGrid.data[sum] - 1]++;
- }
- }
+ module.e = isArrayLikeObject;
+
+
+/***/ },
+/* 27 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /** Used as references for various `Number` constants. */
+ var MAX_SAFE_INTEGER = 9007199254740991;
- labelHist = labelHist.map(function (val, idx) {
- return {
- val: val,
- label: idx + 1
- };
- });
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
- labelHist.sort(function (a, b) {
- return b.val - a.val;
- });
+ module.e = isLength;
+
+
+/***/ },
+/* 28 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseMerge = __webpack_require__(98),
+ createAssigner = __webpack_require__(112);
- // extract top areas with at least 6 patches present
- topLabels = labelHist.filter(function (el) {
- return el.val >= 5;
- });
+ /**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable properties of source objects into the destination
+ * object. Source properties that resolve to `undefined` are skipped if a
+ * destination value exists. Array and plain object properties are merged
+ * recursively.Other objects and value types are overridden by assignment.
+ * Source objects are applied from left to right. Subsequent sources
+ * overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var users = {
+ * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
+ * };
+ *
+ * var ages = {
+ * 'data': [{ 'age': 36 }, { 'age': 40 }]
+ * };
+ *
+ * _.merge(users, ages);
+ * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
+ */
+ var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+ });
- return topLabels;
- }
+ module.e = merge;
+
+
+/***/ },
+/* 29 */
+/***/ function(module, exports) {
+
+ "use strict";
+ exports.__esModule = true;
/**
- *
+ * http://www.codeproject.com/Tips/407172/Connected-Component-Labeling-and-Vectorization
*/
- function findBoxes(topLabels, maxLabel) {
- var i,
- j,
- sum,
- patches = [],
- patch,
- box,
- boxes = [],
- hsv = [0, 1, 1],
- rgb = [0, 0, 0];
+ var Tracer = {
+ searchDirections: [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]],
+ create: function create(imageWrapper, labelWrapper) {
+ var imageData = imageWrapper.data,
+ labelData = labelWrapper.data,
+ searchDirections = this.searchDirections,
+ width = imageWrapper.size.x,
+ pos;
- for (i = 0; i < topLabels.length; i++) {
- sum = _patchLabelGrid.data.length;
- patches.length = 0;
- while (sum--) {
- if (_patchLabelGrid.data[sum] === topLabels[i].label) {
- patch = _imageToPatchGrid.data[sum];
- patches.push(patch);
- }
- }
- box = boxFromPatches(patches);
- if (box) {
- boxes.push(box);
+ function _trace(current, color, label, edgelabel) {
+ var i, y, x;
- // draw patch-labels if requested
- if (false) {
- for (j = 0; j < patches.length; j++) {
- patch = patches[j];
- hsv[0] = topLabels[i].label / (maxLabel + 1) * 360;
- _commonCv_utils2['default'].hsv2rgb(hsv, rgb);
- _commonImage_debug2['default'].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "rgb(" + rgb.join(",") + ")", lineWidth: 2 });
+ for (i = 0; i < 7; i++) {
+ y = current.cy + searchDirections[current.dir][0];
+ x = current.cx + searchDirections[current.dir][1];
+ pos = y * width + x;
+ if (imageData[pos] === color && (labelData[pos] === 0 || labelData[pos] === label)) {
+ labelData[pos] = label;
+ current.cy = y;
+ current.cx = x;
+ return true;
+ } else {
+ if (labelData[pos] === 0) {
+ labelData[pos] = edgelabel;
+ }
+ current.dir = (current.dir + 1) % 8;
}
}
+ return false;
}
- }
- return boxes;
- }
- /**
- * Find similar moments (via cluster)
- * @param {Object} moments
- */
- function similarMoments(moments) {
- var clusters = _commonCv_utils2['default'].cluster(moments, 0.90);
- var topCluster = _commonCv_utils2['default'].topGeneric(clusters, 1, function (e) {
- return e.getPoints().length;
- });
- var points = [],
- result = [];
- if (topCluster.length === 1) {
- points = topCluster[0].item.getPoints();
- for (var i = 0; i < points.length; i++) {
- result.push(points[i].point);
+ function vertex2D(x, y, dir) {
+ return {
+ dir: dir,
+ x: x,
+ y: y,
+ next: null,
+ prev: null
+ };
}
- }
- return result;
- }
-
- function skeletonize(x, y) {
- _binaryImageWrapper.subImageAsCopy(_subImageWrapper, _commonCv_utils2['default'].imageRef(x, y));
- _skeletonizer.skeletonize();
-
- // Show skeleton if requested
- if (false) {
- _skelImageWrapper.overlay(_canvasContainer.dom.binary, 360, _commonCv_utils2['default'].imageRef(x, y));
- }
- }
- /**
- * Extracts and describes those patches which seem to contain a barcode pattern
- * @param {Array} moments
- * @param {Object} patchPos,
- * @param {Number} x
- * @param {Number} y
- * @returns {Array} list of patches
- */
- function describePatch(moments, patchPos, x, y) {
- var k,
- avg,
- eligibleMoments = [],
- matchingMoments,
- patch,
- patchesFound = [],
- minComponentWeight = Math.ceil(_patchSize.x / 3);
+ function _contourTracing(sy, sx, label, color, edgelabel) {
+ var Fv = null,
+ Cv,
+ P,
+ ldir,
+ current = {
+ cx: sx,
+ cy: sy,
+ dir: 0
+ };
- if (moments.length >= 2) {
- // only collect moments which's area covers at least minComponentWeight pixels.
- for (k = 0; k < moments.length; k++) {
- if (moments[k].m00 > minComponentWeight) {
- eligibleMoments.push(moments[k]);
+ if (_trace(current, color, label, edgelabel)) {
+ Fv = vertex2D(sx, sy, current.dir);
+ Cv = Fv;
+ ldir = current.dir;
+ P = vertex2D(current.cx, current.cy, 0);
+ P.prev = Cv;
+ Cv.next = P;
+ P.next = null;
+ Cv = P;
+ do {
+ current.dir = (current.dir + 6) % 8;
+ _trace(current, color, label, edgelabel);
+ if (ldir !== current.dir) {
+ Cv.dir = current.dir;
+ P = vertex2D(current.cx, current.cy, 0);
+ P.prev = Cv;
+ Cv.next = P;
+ P.next = null;
+ Cv = P;
+ } else {
+ Cv.dir = ldir;
+ Cv.x = current.cx;
+ Cv.y = current.cy;
+ }
+ ldir = current.dir;
+ } while (current.cx !== sx || current.cy !== sy);
+ Fv.prev = Cv.prev;
+ Cv.prev.next = Fv;
}
+ return Fv;
}
- // if at least 2 moments are found which have at least minComponentWeights covered
- if (eligibleMoments.length >= 2) {
- matchingMoments = similarMoments(eligibleMoments);
- avg = 0;
- // determine the similarity of the moments
- for (k = 0; k < matchingMoments.length; k++) {
- avg += matchingMoments[k].rad;
- }
-
- // Only two of the moments are allowed not to fit into the equation
- // add the patch to the set
- if (matchingMoments.length > 1 && matchingMoments.length >= eligibleMoments.length / 4 * 3 && matchingMoments.length > moments.length / 4) {
- avg /= matchingMoments.length;
- patch = {
- index: patchPos[1] * _numPatches.x + patchPos[0],
- pos: {
- x: x,
- y: y
- },
- box: [_glMatrix.vec2.clone([x, y]), _glMatrix.vec2.clone([x + _subImageWrapper.size.x, y]), _glMatrix.vec2.clone([x + _subImageWrapper.size.x, y + _subImageWrapper.size.y]), _glMatrix.vec2.clone([x, y + _subImageWrapper.size.y])],
- moments: matchingMoments,
- rad: avg,
- vec: _glMatrix.vec2.clone([Math.cos(avg), Math.sin(avg)])
- };
- patchesFound.push(patch);
+ return {
+ trace: function trace(current, color, label, edgelabel) {
+ return _trace(current, color, label, edgelabel);
+ },
+ contourTracing: function contourTracing(sy, sx, label, color, edgelabel) {
+ return _contourTracing(sy, sx, label, color, edgelabel);
}
- }
+ };
}
- return patchesFound;
- }
+ };
- /**
- * finds patches which are connected and share the same orientation
- * @param {Object} patchesFound
- */
- function rasterizeAngularSimilarity(patchesFound) {
- var label = 0,
- threshold = 0.95,
- currIdx = 0,
- j,
- patch,
- hsv = [0, 1, 1],
- rgb = [0, 0, 0];
+ exports.default = Tracer;
+
+/***/ },
+/* 30 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
- function notYetProcessed() {
- var i;
- for (i = 0; i < _patchLabelGrid.data.length; i++) {
- if (_patchLabelGrid.data[i] === 0 && _patchGrid.data[i] === 1) {
- return i;
- }
- }
- return _patchLabelGrid.length;
- }
+ exports.__esModule = true;
- function trace(currentIdx) {
- var x,
- y,
- currentPatch,
- idx,
- dir,
- current = {
- x: currentIdx % _patchLabelGrid.size.x,
- y: currentIdx / _patchLabelGrid.size.x | 0
- },
- similarity;
+ var _barcode_reader = __webpack_require__(5);
- if (currentIdx < _patchLabelGrid.data.length) {
- currentPatch = _imageToPatchGrid.data[currentIdx];
- // assign label
- _patchLabelGrid.data[currentIdx] = label;
- for (dir = 0; dir < _tracer2['default'].searchDirections.length; dir++) {
- y = current.y + _tracer2['default'].searchDirections[dir][0];
- x = current.x + _tracer2['default'].searchDirections[dir][1];
- idx = y * _patchLabelGrid.size.x + x;
+ var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
- // continue if patch empty
- if (_patchGrid.data[idx] === 0) {
- _patchLabelGrid.data[idx] = Number.MAX_VALUE;
- continue;
- }
+ var _array_helper = __webpack_require__(8);
- if (_patchLabelGrid.data[idx] === 0) {
- similarity = Math.abs(_glMatrix.vec2.dot(_imageToPatchGrid.data[idx].vec, currentPatch.vec));
- if (similarity > threshold) {
- trace(idx);
- }
- }
- }
- }
- }
+ var _array_helper2 = _interopRequireDefault(_array_helper);
- // prepare for finding the right patches
- _commonArray_helper2['default'].init(_patchGrid.data, 0);
- _commonArray_helper2['default'].init(_patchLabelGrid.data, 0);
- _commonArray_helper2['default'].init(_imageToPatchGrid.data, null);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- for (j = 0; j < patchesFound.length; j++) {
- patch = patchesFound[j];
- _imageToPatchGrid.data[patch.index] = patch;
- _patchGrid.data[patch.index] = 1;
- }
+ function Code39Reader() {
+ _barcode_reader2.default.call(this);
+ }
- // rasterize the patches found to determine area
- _patchGrid.zeroBorder();
+ var properties = {
+ ALPHABETH_STRING: { value: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%" },
+ ALPHABET: { value: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 45, 46, 32, 42, 36, 47, 43, 37] },
+ CHARACTER_ENCODINGS: { value: [0x034, 0x121, 0x061, 0x160, 0x031, 0x130, 0x070, 0x025, 0x124, 0x064, 0x109, 0x049, 0x148, 0x019, 0x118, 0x058, 0x00D, 0x10C, 0x04C, 0x01C, 0x103, 0x043, 0x142, 0x013, 0x112, 0x052, 0x007, 0x106, 0x046, 0x016, 0x181, 0x0C1, 0x1C0, 0x091, 0x190, 0x0D0, 0x085, 0x184, 0x0C4, 0x094, 0x0A8, 0x0A2, 0x08A, 0x02A] },
+ ASTERISK: { value: 0x094 },
+ FORMAT: { value: "code_39", writeable: false }
+ };
- while ((currIdx = notYetProcessed()) < _patchLabelGrid.data.length) {
- label++;
- trace(currIdx);
- }
+ Code39Reader.prototype = Object.create(_barcode_reader2.default.prototype, properties);
+ Code39Reader.prototype.constructor = Code39Reader;
- // draw patch-labels if requested
- if (false) {
- for (j = 0; j < _patchLabelGrid.data.length; j++) {
- if (_patchLabelGrid.data[j] > 0 && _patchLabelGrid.data[j] <= label) {
- patch = _imageToPatchGrid.data[j];
- hsv[0] = _patchLabelGrid.data[j] / (label + 1) * 360;
- _commonCv_utils2['default'].hsv2rgb(hsv, rgb);
- _commonImage_debug2['default'].drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "rgb(" + rgb.join(",") + ")", lineWidth: 2 });
+ Code39Reader.prototype._toCounters = function (start, counter) {
+ var self = this,
+ numCounters = counter.length,
+ end = self._row.length,
+ isWhite = !self._row[start],
+ i,
+ counterPos = 0;
+
+ _array_helper2.default.init(counter, 0);
+
+ for (i = start; i < end; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ counterPos++;
+ if (counterPos === numCounters) {
+ break;
+ } else {
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
}
}
}
- return label;
- }
-
- exports['default'] = {
- init: function init(inputImageWrapper, config) {
- _config = config;
- _inputImageWrapper = inputImageWrapper;
-
- initBuffers();
- initCanvas();
- },
+ return counter;
+ };
- locate: function locate() {
- var patchesFound, topLabels, boxes;
+ Code39Reader.prototype._decode = function () {
+ var self = this,
+ counters = [0, 0, 0, 0, 0, 0, 0, 0, 0],
+ result = [],
+ start = self._findStart(),
+ decodedChar,
+ lastStart,
+ pattern,
+ nextStart;
- if (_config.halfSample) {
- _commonCv_utils2['default'].halfSample(_inputImageWrapper, _currentImageWrapper);
- }
+ if (!start) {
+ return null;
+ }
+ nextStart = self._nextSet(self._row, start.end);
- binarizeImage();
- patchesFound = findPatches();
- // return unless 5% or more patches are found
- if (patchesFound.length < _numPatches.x * _numPatches.y * 0.05) {
+ do {
+ counters = self._toCounters(nextStart, counters);
+ pattern = self._toPattern(counters);
+ if (pattern < 0) {
return null;
}
-
- // rasterrize area by comparing angular similarity;
- var maxLabel = rasterizeAngularSimilarity(patchesFound);
- if (maxLabel < 1) {
+ decodedChar = self._patternToChar(pattern);
+ if (decodedChar < 0) {
return null;
}
+ result.push(decodedChar);
+ lastStart = nextStart;
+ nextStart += _array_helper2.default.sum(counters);
+ nextStart = self._nextSet(self._row, nextStart);
+ } while (decodedChar !== '*');
+ result.pop();
- // search for area with the most patches (biggest connected area)
- topLabels = findBiggestConnectedAreas(maxLabel);
- if (topLabels.length === 0) {
- return null;
- }
+ if (!result.length) {
+ return null;
+ }
- boxes = findBoxes(topLabels, maxLabel);
- return boxes;
- },
+ if (!self._verifyTrailingWhitespace(lastStart, nextStart, counters)) {
+ return null;
+ }
- checkImageConstraints: function checkImageConstraints(inputStream, config) {
- var patchSize,
- width = inputStream.getWidth(),
- height = inputStream.getHeight(),
- halfSample = config.halfSample ? 0.5 : 1,
- size,
- area;
+ return {
+ code: result.join(""),
+ start: start.start,
+ end: nextStart,
+ startInfo: start,
+ decodedCodes: result
+ };
+ };
- // calculate width and height based on area
- if (inputStream.getConfig().area) {
- area = _commonCv_utils2['default'].computeImageArea(width, height, inputStream.getConfig().area);
- inputStream.setTopRight({ x: area.sx, y: area.sy });
- inputStream.setCanvasSize({ x: width, y: height });
- width = area.sw;
- height = area.sh;
- }
+ Code39Reader.prototype._verifyTrailingWhitespace = function (lastStart, nextStart, counters) {
+ var trailingWhitespaceEnd,
+ patternSize = _array_helper2.default.sum(counters);
- size = {
- x: Math.floor(width * halfSample),
- y: Math.floor(height * halfSample)
- };
+ trailingWhitespaceEnd = nextStart - lastStart - patternSize;
+ if (trailingWhitespaceEnd * 3 >= patternSize) {
+ return true;
+ }
+ return false;
+ };
- patchSize = _commonCv_utils2['default'].calculatePatchSize(config.patchSize, size);
- if (false) {
- console.log("Patch-Size: " + JSON.stringify(patchSize));
+ Code39Reader.prototype._patternToChar = function (pattern) {
+ var i,
+ self = this;
+
+ for (i = 0; i < self.CHARACTER_ENCODINGS.length; i++) {
+ if (self.CHARACTER_ENCODINGS[i] === pattern) {
+ return String.fromCharCode(self.ALPHABET[i]);
}
+ }
+ return -1;
+ };
- inputStream.setWidth(Math.floor(Math.floor(size.x / patchSize.x) * (1 / halfSample) * patchSize.x));
- inputStream.setHeight(Math.floor(Math.floor(size.y / patchSize.y) * (1 / halfSample) * patchSize.y));
+ Code39Reader.prototype._findNextWidth = function (counters, current) {
+ var i,
+ minWidth = Number.MAX_VALUE;
- if (inputStream.getWidth() % patchSize.x === 0 && inputStream.getHeight() % patchSize.y === 0) {
- return true;
+ for (i = 0; i < counters.length; i++) {
+ if (counters[i] < minWidth && counters[i] > current) {
+ minWidth = counters[i];
}
-
- throw new Error("Image dimensions do not comply with the current settings: Width (" + width + " )and height (" + height + ") must a multiple of " + patchSize.x);
}
+
+ return minWidth;
};
- module.exports = exports['default'];
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
-
-/***/ },
-/* 10 */
-/***/ function(module, exports) {
-
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports["default"] = {
- drawRect: function drawRect(pos, size, ctx, style) {
- ctx.strokeStyle = style.color;
- ctx.fillStyle = style.color;
- ctx.lineWidth = 1;
- ctx.beginPath();
- ctx.strokeRect(pos.x, pos.y, size.x, size.y);
- },
- drawPath: function drawPath(path, def, ctx, style) {
- ctx.strokeStyle = style.color;
- ctx.fillStyle = style.color;
- ctx.lineWidth = style.lineWidth;
- ctx.beginPath();
- ctx.moveTo(path[0][def.x], path[0][def.y]);
- for (var j = 1; j < path.length; j++) {
- ctx.lineTo(path[j][def.x], path[j][def.y]);
+ Code39Reader.prototype._toPattern = function (counters) {
+ var numCounters = counters.length,
+ maxNarrowWidth = 0,
+ numWideBars = numCounters,
+ wideBarWidth = 0,
+ self = this,
+ pattern,
+ i;
+
+ while (numWideBars > 3) {
+ maxNarrowWidth = self._findNextWidth(counters, maxNarrowWidth);
+ numWideBars = 0;
+ pattern = 0;
+ for (i = 0; i < numCounters; i++) {
+ if (counters[i] > maxNarrowWidth) {
+ pattern |= 1 << numCounters - 1 - i;
+ numWideBars++;
+ wideBarWidth += counters[i];
+ }
}
- ctx.closePath();
- ctx.stroke();
- },
- drawImage: function drawImage(imageData, size, ctx) {
- var canvasData = ctx.getImageData(0, 0, size.x, size.y),
- data = canvasData.data,
- imageDataPos = imageData.length,
- canvasDataPos = data.length,
- value;
- if (canvasDataPos / imageDataPos !== 4) {
- return false;
+ if (numWideBars === 3) {
+ for (i = 0; i < numCounters && numWideBars > 0; i++) {
+ if (counters[i] > maxNarrowWidth) {
+ numWideBars--;
+ if (counters[i] * 2 >= wideBarWidth) {
+ return -1;
+ }
+ }
+ }
+ return pattern;
}
- while (imageDataPos--) {
- value = imageData[imageDataPos];
- data[--canvasDataPos] = 255;
- data[--canvasDataPos] = value;
- data[--canvasDataPos] = value;
- data[--canvasDataPos] = value;
+ }
+ return -1;
+ };
+
+ Code39Reader.prototype._findStart = function () {
+ var self = this,
+ offset = self._nextSet(self._row),
+ patternStart = offset,
+ counter = [0, 0, 0, 0, 0, 0, 0, 0, 0],
+ counterPos = 0,
+ isWhite = false,
+ i,
+ j,
+ whiteSpaceMustStart;
+
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ if (counterPos === counter.length - 1) {
+ // find start pattern
+ if (self._toPattern(counter) === self.ASTERISK) {
+ whiteSpaceMustStart = Math.floor(Math.max(0, patternStart - (i - patternStart) / 4));
+ if (self._matchRange(whiteSpaceMustStart, patternStart, 0)) {
+ return {
+ start: patternStart,
+ end: i
+ };
+ }
+ }
+
+ patternStart += counter[0] + counter[1];
+ for (j = 0; j < 7; j++) {
+ counter[j] = counter[j + 2];
+ }
+ counter[7] = 0;
+ counter[8] = 0;
+ counterPos--;
+ } else {
+ counterPos++;
+ }
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
}
- ctx.putImageData(canvasData, 0, 0);
- return true;
}
+ return null;
};
- module.exports = exports["default"];
+
+ exports.default = Code39Reader;
/***/ },
-/* 11 */
+/* 31 */
/***/ function(module, exports, __webpack_require__) {
- "use strict";
+ module.e = dot
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
+ /**
+ * Calculates the dot product of two vec2's
+ *
+ * @param {vec2} a the first operand
+ * @param {vec2} b the second operand
+ * @returns {Number} dot product of a and b
+ */
+ function dot(a, b) {
+ return a[0] * b[0] + a[1] * b[1]
+ }
+
+/***/ },
+/* 32 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var stackClear = __webpack_require__(132),
+ stackDelete = __webpack_require__(133),
+ stackGet = __webpack_require__(134),
+ stackHas = __webpack_require__(135),
+ stackSet = __webpack_require__(136);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function Stack(values) {
+ var index = -1,
+ length = values ? values.length : 0;
- var _tracer = __webpack_require__(12);
+ this.clear();
+ while (++index < length) {
+ var entry = values[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
- var _tracer2 = _interopRequireDefault(_tracer);
+ // Add functions to the `Stack` cache.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+ module.e = Stack;
+
+
+/***/ },
+/* 33 */
+/***/ function(module, exports, __webpack_require__) {
+
/**
- * http://www.codeproject.com/Tips/407172/Connected-Component-Labeling-and-Vectorization
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
*/
- var Rasterizer = {
- createContour2D: function createContour2D() {
- return {
- dir: null,
- index: null,
- firstVertex: null,
- insideContours: null,
- nextpeer: null,
- prevpeer: null
- };
- },
- CONTOUR_DIR: {
- CW_DIR: 0,
- CCW_DIR: 1,
- UNKNOWN_DIR: 2
- },
- DIR: {
- OUTSIDE_EDGE: -32767,
- INSIDE_EDGE: -32766
- },
- create: function create(imageWrapper, labelWrapper) {
- var imageData = imageWrapper.data,
- labelData = labelWrapper.data,
- width = imageWrapper.size.x,
- height = imageWrapper.size.y,
- tracer = _tracer2["default"].create(imageWrapper, labelWrapper);
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array.length;
- return {
- rasterize: function rasterize(depthlabel) {
- var color,
- bc,
- lc,
- labelindex,
- cx,
- cy,
- colorMap = [],
- vertex,
- p,
- cc,
- sc,
- pos,
- connectedCount = 0,
- i;
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
- for (i = 0; i < 400; i++) {
- colorMap[i] = 0;
- }
+ module.e = arrayEach;
+
+
+/***/ },
+/* 34 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var eq = __webpack_require__(15);
- colorMap[0] = imageData[0];
- cc = null;
- for (cy = 1; cy < height - 1; cy++) {
- labelindex = 0;
- bc = colorMap[0];
- for (cx = 1; cx < width - 1; cx++) {
- pos = cy * width + cx;
- if (labelData[pos] === 0) {
- color = imageData[pos];
- if (color !== bc) {
- if (labelindex === 0) {
- lc = connectedCount + 1;
- colorMap[lc] = color;
- bc = color;
- vertex = tracer.contourTracing(cy, cx, lc, color, Rasterizer.DIR.OUTSIDE_EDGE);
- if (vertex !== null) {
- connectedCount++;
- labelindex = lc;
- p = Rasterizer.createContour2D();
- p.dir = Rasterizer.CONTOUR_DIR.CW_DIR;
- p.index = labelindex;
- p.firstVertex = vertex;
- p.nextpeer = cc;
- p.insideContours = null;
- if (cc !== null) {
- cc.prevpeer = p;
- }
- cc = p;
- }
- } else {
- vertex = tracer.contourTracing(cy, cx, Rasterizer.DIR.INSIDE_EDGE, color, labelindex);
- if (vertex !== null) {
- p = Rasterizer.createContour2D();
- p.firstVertex = vertex;
- p.insideContours = null;
- if (depthlabel === 0) {
- p.dir = Rasterizer.CONTOUR_DIR.CCW_DIR;
- } else {
- p.dir = Rasterizer.CONTOUR_DIR.CW_DIR;
- }
- p.index = depthlabel;
- sc = cc;
- while (sc !== null && sc.index !== labelindex) {
- sc = sc.nextpeer;
- }
- if (sc !== null) {
- p.nextpeer = sc.insideContours;
- if (sc.insideContours !== null) {
- sc.insideContours.prevpeer = p;
- }
- sc.insideContours = p;
- }
- }
- }
- } else {
- labelData[pos] = labelindex;
- }
- } else if (labelData[pos] === Rasterizer.DIR.OUTSIDE_EDGE || labelData[pos] === Rasterizer.DIR.INSIDE_EDGE) {
- labelindex = 0;
- if (labelData[pos] === Rasterizer.DIR.INSIDE_EDGE) {
- bc = imageData[pos];
- } else {
- bc = colorMap[0];
- }
- } else {
- labelindex = labelData[pos];
- bc = colorMap[labelindex];
- }
- }
- }
- sc = cc;
- while (sc !== null) {
- sc.index = depthlabel;
- sc = sc.nextpeer;
- }
- return {
- cc: cc,
- count: connectedCount
- };
- },
- debug: {
- drawContour: function drawContour(canvas, firstContour) {
- var ctx = canvas.getContext("2d"),
- pq = firstContour,
- iq,
- q,
- p;
+ /**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (typeof key == 'number' && value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
- ctx.strokeStyle = "red";
- ctx.fillStyle = "red";
- ctx.lineWidth = 1;
+ module.e = assignMergeValue;
+
+
+/***/ },
+/* 35 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var eq = __webpack_require__(15);
- if (pq !== null) {
- iq = pq.insideContours;
- } else {
- iq = null;
- }
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- while (pq !== null) {
- if (iq !== null) {
- q = iq;
- iq = iq.nextpeer;
- } else {
- q = pq;
- pq = pq.nextpeer;
- if (pq !== null) {
- iq = pq.insideContours;
- } else {
- iq = null;
- }
- }
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- switch (q.dir) {
- case Rasterizer.CONTOUR_DIR.CW_DIR:
- ctx.strokeStyle = "red";
- break;
- case Rasterizer.CONTOUR_DIR.CCW_DIR:
- ctx.strokeStyle = "blue";
- break;
- case Rasterizer.CONTOUR_DIR.UNKNOWN_DIR:
- ctx.strokeStyle = "green";
- break;
- }
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
- p = q.firstVertex;
- ctx.beginPath();
- ctx.moveTo(p.x, p.y);
- do {
- p = p.next;
- ctx.lineTo(p.x, p.y);
- } while (p !== q.firstVertex);
- ctx.stroke();
- }
- }
- }
- };
- }
- };
+ module.e = assignValue;
+
+
+/***/ },
+/* 36 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assocIndexOf = __webpack_require__(11);
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype;
+
+ /** Built-in value references. */
+ var splice = arrayProto.splice;
+
+ /**
+ * Removes `key` and its value from the associative array.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function assocDelete(array, key) {
+ var index = assocIndexOf(array, key);
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = array.length - 1;
+ if (index == lastIndex) {
+ array.pop();
+ } else {
+ splice.call(array, index, 1);
+ }
+ return true;
+ }
- exports["default"] = Rasterizer;
- module.exports = exports["default"];
+ module.e = assocDelete;
+
/***/ },
-/* 12 */
-/***/ function(module, exports) {
+/* 37 */
+/***/ function(module, exports, __webpack_require__) {
+ var assocIndexOf = __webpack_require__(11);
+
/**
- * http://www.codeproject.com/Tips/407172/Connected-Component-Labeling-and-Vectorization
+ * Gets the associative array value for `key`.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
*/
- "use strict";
+ function assocGet(array, key) {
+ var index = assocIndexOf(array, key);
+ return index < 0 ? undefined : array[index][1];
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var Tracer = {
- searchDirections: [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]],
- create: function create(imageWrapper, labelWrapper) {
- var imageData = imageWrapper.data,
- labelData = labelWrapper.data,
- searchDirections = this.searchDirections,
- width = imageWrapper.size.x,
- pos;
+ module.e = assocGet;
+
+
+/***/ },
+/* 38 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assocIndexOf = __webpack_require__(11);
- function _trace(current, color, label, edgelabel) {
- var i, y, x;
+ /**
+ * Checks if an associative array value for `key` exists.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function assocHas(array, key) {
+ return assocIndexOf(array, key) > -1;
+ }
- for (i = 0; i < 7; i++) {
- y = current.cy + searchDirections[current.dir][0];
- x = current.cx + searchDirections[current.dir][1];
- pos = y * width + x;
- if (imageData[pos] === color && (labelData[pos] === 0 || labelData[pos] === label)) {
- labelData[pos] = label;
- current.cy = y;
- current.cx = x;
- return true;
- } else {
- if (labelData[pos] === 0) {
- labelData[pos] = edgelabel;
- }
- current.dir = (current.dir + 1) % 8;
- }
- }
- return false;
- }
-
- function vertex2D(x, y, dir) {
- return {
- dir: dir,
- x: x,
- y: y,
- next: null,
- prev: null
- };
- }
+ module.e = assocHas;
+
+
+/***/ },
+/* 39 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assocIndexOf = __webpack_require__(11);
- function _contourTracing(sy, sx, label, color, edgelabel) {
- var Fv = null,
- Cv,
- P,
- ldir,
- current = {
- cx: sx,
- cy: sy,
- dir: 0
- };
+ /**
+ * Sets the associative array `key` to `value`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ */
+ function assocSet(array, key, value) {
+ var index = assocIndexOf(array, key);
+ if (index < 0) {
+ array.push([key, value]);
+ } else {
+ array[index][1] = value;
+ }
+ }
- if (_trace(current, color, label, edgelabel)) {
- Fv = vertex2D(sx, sy, current.dir);
- Cv = Fv;
- ldir = current.dir;
- P = vertex2D(current.cx, current.cy, 0);
- P.prev = Cv;
- Cv.next = P;
- P.next = null;
- Cv = P;
- do {
- current.dir = (current.dir + 6) % 8;
- _trace(current, color, label, edgelabel);
- if (ldir !== current.dir) {
- Cv.dir = current.dir;
- P = vertex2D(current.cx, current.cy, 0);
- P.prev = Cv;
- Cv.next = P;
- P.next = null;
- Cv = P;
- } else {
- Cv.dir = ldir;
- Cv.x = current.cx;
- Cv.y = current.cy;
- }
- ldir = current.dir;
- } while (current.cx !== sx || current.cy !== sy);
- Fv.prev = Cv.prev;
- Cv.prev.next = Fv;
- }
- return Fv;
- }
+ module.e = assocSet;
+
+
+/***/ },
+/* 40 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Uint8Array = __webpack_require__(83);
- return {
- trace: function trace(current, color, label, edgelabel) {
- return _trace(current, color, label, edgelabel);
- },
- contourTracing: function contourTracing(sy, sx, label, color, edgelabel) {
- return _contourTracing(sy, sx, label, color, edgelabel);
- }
- };
- }
- };
+ /**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+ function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+ }
- exports["default"] = Tracer;
- module.exports = exports["default"];
+ module.e = cloneArrayBuffer;
+
/***/ },
-/* 13 */
-/***/ function(module, exports) {
+/* 41 */
+/***/ function(module, exports, __webpack_require__) {
- /* @preserve ASM BEGIN */
- /* eslint-disable eqeqeq*/
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- function Skeletonizer(stdlib, foreign, buffer) {
- "use asm";
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
- var images = new stdlib.Uint8Array(buffer),
- size = foreign.size | 0,
- imul = stdlib.Math.imul;
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
- function erode(inImagePtr, outImagePtr) {
- inImagePtr = inImagePtr | 0;
- outImagePtr = outImagePtr | 0;
+ module.e = copyArray;
+
+
+/***/ },
+/* 42 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var nativeCreate = __webpack_require__(14);
- var v = 0,
- u = 0,
- sum = 0,
- yStart1 = 0,
- yStart2 = 0,
- xStart1 = 0,
- xStart2 = 0,
- offset = 0;
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- for (v = 1; (v | 0) < (size - 1 | 0); v = v + 1 | 0) {
- offset = offset + size | 0;
- for (u = 1; (u | 0) < (size - 1 | 0); u = u + 1 | 0) {
- yStart1 = offset - size | 0;
- yStart2 = offset + size | 0;
- xStart1 = u - 1 | 0;
- xStart2 = u + 1 | 0;
- sum = (images[inImagePtr + yStart1 + xStart1 | 0] | 0) + (images[inImagePtr + yStart1 + xStart2 | 0] | 0) + (images[inImagePtr + offset + u | 0] | 0) + (images[inImagePtr + yStart2 + xStart1 | 0] | 0) + (images[inImagePtr + yStart2 + xStart2 | 0] | 0) | 0;
- if ((sum | 0) == (5 | 0)) {
- images[outImagePtr + offset + u | 0] = 1;
- } else {
- images[outImagePtr + offset + u | 0] = 0;
- }
- }
- }
- return;
- }
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- function subtract(aImagePtr, bImagePtr, outImagePtr) {
- aImagePtr = aImagePtr | 0;
- bImagePtr = bImagePtr | 0;
- outImagePtr = outImagePtr | 0;
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @param {Object} hash The hash to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(hash, key) {
+ return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
+ }
- var length = 0;
+ module.e = hashHas;
+
+
+/***/ },
+/* 43 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseTimes = __webpack_require__(102),
+ isArguments = __webpack_require__(24),
+ isArray = __webpack_require__(4),
+ isLength = __webpack_require__(27),
+ isString = __webpack_require__(141);
- length = imul(size, size) | 0;
+ /**
+ * Creates an array of index keys for `object` values of arrays,
+ * `arguments` objects, and strings, otherwise `null` is returned.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array|null} Returns index keys, else `null`.
+ */
+ function indexKeys(object) {
+ var length = object ? object.length : undefined;
+ if (isLength(length) &&
+ (isArray(object) || isString(object) || isArguments(object))) {
+ return baseTimes(length, String);
+ }
+ return null;
+ }
- while ((length | 0) > 0) {
- length = length - 1 | 0;
- images[outImagePtr + length | 0] = (images[aImagePtr + length | 0] | 0) - (images[bImagePtr + length | 0] | 0) | 0;
- }
- }
+ module.e = indexKeys;
+
+
+/***/ },
+/* 44 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isLength = __webpack_require__(27),
+ isObjectLike = __webpack_require__(7);
- function bitwiseOr(aImagePtr, bImagePtr, outImagePtr) {
- aImagePtr = aImagePtr | 0;
- bImagePtr = bImagePtr | 0;
- outImagePtr = outImagePtr | 0;
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
- var length = 0;
+ var arrayBufferTag = '[object ArrayBuffer]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
- length = imul(size, size) | 0;
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dateTag] = typedArrayTags[errorTag] =
+ typedArrayTags[funcTag] = typedArrayTags[mapTag] =
+ typedArrayTags[numberTag] = typedArrayTags[objectTag] =
+ typedArrayTags[regexpTag] = typedArrayTags[setTag] =
+ typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
- while ((length | 0) > 0) {
- length = length - 1 | 0;
- images[outImagePtr + length | 0] = images[aImagePtr + length | 0] | 0 | (images[bImagePtr + length | 0] | 0) | 0;
- }
- }
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- function countNonZero(imagePtr) {
- imagePtr = imagePtr | 0;
+ /**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
- var sum = 0,
- length = 0;
+ /**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+ function isTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
+ }
- length = imul(size, size) | 0;
+ module.e = isTypedArray;
+
+
+/***/ },
+/* 45 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseHas = __webpack_require__(95),
+ baseKeys = __webpack_require__(96),
+ indexKeys = __webpack_require__(43),
+ isArrayLike = __webpack_require__(25),
+ isIndex = __webpack_require__(22),
+ isPrototype = __webpack_require__(23);
- while ((length | 0) > 0) {
- length = length - 1 | 0;
- sum = (sum | 0) + (images[imagePtr + length | 0] | 0) | 0;
- }
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ function keys(object) {
+ var isProto = isPrototype(object);
+ if (!(isProto || isArrayLike(object))) {
+ return baseKeys(object);
+ }
+ var indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
- return sum | 0;
+ for (var key in object) {
+ if (baseHas(object, key) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(isProto && key == 'constructor')) {
+ result.push(key);
}
+ }
+ return result;
+ }
- function init(imagePtr, value) {
- imagePtr = imagePtr | 0;
- value = value | 0;
+ module.e = keys;
+
+
+/***/ },
+/* 46 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseKeysIn = __webpack_require__(97),
+ indexKeys = __webpack_require__(43),
+ isIndex = __webpack_require__(22),
+ isPrototype = __webpack_require__(23);
- var length = 0;
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- length = imul(size, size) | 0;
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- while ((length | 0) > 0) {
- length = length - 1 | 0;
- images[imagePtr + length | 0] = value;
- }
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ function keysIn(object) {
+ var index = -1,
+ isProto = isPrototype(object),
+ props = baseKeysIn(object),
+ propsLength = props.length,
+ indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
+
+ while (++index < propsLength) {
+ var key = props[index];
+ if (!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
}
+ }
+ return result;
+ }
- function dilate(inImagePtr, outImagePtr) {
- inImagePtr = inImagePtr | 0;
- outImagePtr = outImagePtr | 0;
+ module.e = keysIn;
+
+
+/***/ },
+/* 47 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var apply = __webpack_require__(87),
+ toInteger = __webpack_require__(143);
- var v = 0,
- u = 0,
- sum = 0,
- yStart1 = 0,
- yStart2 = 0,
- xStart1 = 0,
- xStart2 = 0,
- offset = 0;
+ /** Used as the `TypeError` message for "Functions" methods. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
- for (v = 1; (v | 0) < (size - 1 | 0); v = v + 1 | 0) {
- offset = offset + size | 0;
- for (u = 1; (u | 0) < (size - 1 | 0); u = u + 1 | 0) {
- yStart1 = offset - size | 0;
- yStart2 = offset + size | 0;
- xStart1 = u - 1 | 0;
- xStart2 = u + 1 | 0;
- sum = (images[inImagePtr + yStart1 + xStart1 | 0] | 0) + (images[inImagePtr + yStart1 + xStart2 | 0] | 0) + (images[inImagePtr + offset + u | 0] | 0) + (images[inImagePtr + yStart2 + xStart1 | 0] | 0) + (images[inImagePtr + yStart2 + xStart2 | 0] | 0) | 0;
- if ((sum | 0) > (0 | 0)) {
- images[outImagePtr + offset + u | 0] = 1;
- } else {
- images[outImagePtr + offset + u | 0] = 0;
- }
- }
- }
- return;
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeMax = Math.max;
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as an array.
+ *
+ * **Note:** This method is based on the [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+ function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ switch (start) {
+ case 0: return func.call(this, array);
+ case 1: return func.call(this, args[0], array);
+ case 2: return func.call(this, args[0], args[1], array);
+ }
+ var otherArgs = Array(start + 1);
+ index = -1;
+ while (++index < start) {
+ otherArgs[index] = args[index];
}
+ otherArgs[start] = array;
+ return apply(func, this, otherArgs);
+ };
+ }
- function memcpy(srcImagePtr, dstImagePtr) {
- srcImagePtr = srcImagePtr | 0;
- dstImagePtr = dstImagePtr | 0;
+ module.e = rest;
+
+
+/***/ },
+/* 48 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = function(module) {
+ if(!module.webpackPolyfill) {
+ module.deprecate = function() {};
+ module.paths = [];
+ // module.parent = undefined by default
+ module.children = [];
+ Object.defineProperty(module, "exports", {
+ enumerable: true,
+ configurable: false,
+ get: function() { return module.e; },
+ set: function(v) { return module.e = v; }
+ });
+ Object.defineProperty(module, "loaded", {
+ enumerable: true,
+ configurable: false,
+ get: function() { return module.l; }
+ });
+ Object.defineProperty(module, "id", {
+ enumerable: true,
+ configurable: false,
+ get: function() { return module.i; }
+ });
+ module.webpackPolyfill = 1;
+ }
+ return module;
+ }
+
+
+/***/ },
+/* 49 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
- var length = 0;
+ exports.__esModule = true;
- length = imul(size, size) | 0;
+ var _merge2 = __webpack_require__(28);
- while ((length | 0) > 0) {
- length = length - 1 | 0;
- images[dstImagePtr + length | 0] = images[srcImagePtr + length | 0] | 0;
- }
- }
+ var _merge3 = _interopRequireDefault(_merge2);
- function zeroBorder(imagePtr) {
- imagePtr = imagePtr | 0;
+ var _typedefs = __webpack_require__(56);
- var x = 0,
- y = 0;
+ var _typedefs2 = _interopRequireDefault(_typedefs);
- for (x = 0; (x | 0) < (size - 1 | 0); x = x + 1 | 0) {
- images[imagePtr + x | 0] = 0;
- images[imagePtr + y | 0] = 0;
- y = y + size - 1 | 0;
- images[imagePtr + y | 0] = 0;
- y = y + 1 | 0;
- }
- for (x = 0; (x | 0) < (size | 0); x = x + 1 | 0) {
- images[imagePtr + y | 0] = 0;
- y = y + 1 | 0;
- }
- }
+ var _webrtcAdapter = __webpack_require__(146);
- function skeletonize() {
- var subImagePtr = 0,
- erodedImagePtr = 0,
- tempImagePtr = 0,
- skelImagePtr = 0,
- sum = 0,
- done = 0;
+ var _webrtcAdapter2 = _interopRequireDefault(_webrtcAdapter);
- erodedImagePtr = imul(size, size) | 0;
- tempImagePtr = erodedImagePtr + erodedImagePtr | 0;
- skelImagePtr = tempImagePtr + erodedImagePtr | 0;
+ var _image_wrapper = __webpack_require__(18);
- // init skel-image
- init(skelImagePtr, 0);
- zeroBorder(subImagePtr);
+ var _image_wrapper2 = _interopRequireDefault(_image_wrapper);
- do {
- erode(subImagePtr, erodedImagePtr);
- dilate(erodedImagePtr, tempImagePtr);
- subtract(subImagePtr, tempImagePtr, tempImagePtr);
- bitwiseOr(skelImagePtr, tempImagePtr, skelImagePtr);
- memcpy(erodedImagePtr, subImagePtr);
- sum = countNonZero(subImagePtr) | 0;
- done = (sum | 0) == 0 | 0;
- } while (!done);
- }
+ var _barcode_locator = __webpack_require__(62);
- return {
- skeletonize: skeletonize
- };
- }
-
- exports["default"] = Skeletonizer;
-
- /* eslint-enable eqeqeq*/
- /* @preserve ASM END */
- module.exports = exports["default"];
-
-/***/ },
-/* 14 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ var _barcode_locator2 = _interopRequireDefault(_barcode_locator);
- var _bresenham = __webpack_require__(15);
+ var _barcode_decoder = __webpack_require__(59);
- var _bresenham2 = _interopRequireDefault(_bresenham);
+ var _barcode_decoder2 = _interopRequireDefault(_barcode_decoder);
- var _commonImage_debug = __webpack_require__(10);
+ var _events = __webpack_require__(54);
- var _commonImage_debug2 = _interopRequireDefault(_commonImage_debug);
+ var _events2 = _interopRequireDefault(_events);
- var _readerCode_128_reader = __webpack_require__(16);
+ var _camera_access = __webpack_require__(61);
- var _readerCode_128_reader2 = _interopRequireDefault(_readerCode_128_reader);
+ var _camera_access2 = _interopRequireDefault(_camera_access);
- var _readerEan_reader = __webpack_require__(18);
+ var _image_debug = __webpack_require__(9);
- var _readerEan_reader2 = _interopRequireDefault(_readerEan_reader);
+ var _image_debug2 = _interopRequireDefault(_image_debug);
- var _readerCode_39_reader = __webpack_require__(19);
+ var _result_collector = __webpack_require__(52);
- var _readerCode_39_reader2 = _interopRequireDefault(_readerCode_39_reader);
+ var _result_collector2 = _interopRequireDefault(_result_collector);
- var _readerCode_39_vin_reader = __webpack_require__(20);
+ var _config2 = __webpack_require__(57);
- var _readerCode_39_vin_reader2 = _interopRequireDefault(_readerCode_39_vin_reader);
+ var _config3 = _interopRequireDefault(_config2);
- var _readerCodabar_reader = __webpack_require__(21);
+ var _input_stream = __webpack_require__(51);
- var _readerCodabar_reader2 = _interopRequireDefault(_readerCodabar_reader);
+ var _input_stream2 = _interopRequireDefault(_input_stream);
- var _readerUpc_reader = __webpack_require__(22);
+ var _frame_grabber = __webpack_require__(50);
- var _readerUpc_reader2 = _interopRequireDefault(_readerUpc_reader);
+ var _frame_grabber2 = _interopRequireDefault(_frame_grabber);
- var _readerEan_8_reader = __webpack_require__(23);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _readerEan_8_reader2 = _interopRequireDefault(_readerEan_8_reader);
+ // eslint-disable-line no-unused-vars
- var _readerUpc_e_reader = __webpack_require__(24);
+ var vec2 = {
+ clone: __webpack_require__(6)
+ }; // eslint-disable-line no-unused-vars
- var _readerUpc_e_reader2 = _interopRequireDefault(_readerUpc_e_reader);
- var _readerI2of5_reader = __webpack_require__(25);
+ var _inputStream,
+ _framegrabber,
+ _stopped,
+ _canvasContainer = {
+ ctx: {
+ image: null,
+ overlay: null
+ },
+ dom: {
+ image: null,
+ overlay: null
+ }
+ },
+ _inputImageWrapper,
+ _boxSize,
+ _decoder,
+ _workerPool = [],
+ _onUIThread = true,
+ _resultCollector,
+ _config = {};
- var _readerI2of5_reader2 = _interopRequireDefault(_readerI2of5_reader);
+ function initializeData(imageWrapper) {
+ initBuffers(imageWrapper);
+ _decoder = _barcode_decoder2.default.create(_config.decoder, _inputImageWrapper);
+ }
- var READERS = {
- code_128_reader: _readerCode_128_reader2['default'],
- ean_reader: _readerEan_reader2['default'],
- ean_8_reader: _readerEan_8_reader2['default'],
- code_39_reader: _readerCode_39_reader2['default'],
- code_39_vin_reader: _readerCode_39_vin_reader2['default'],
- codabar_reader: _readerCodabar_reader2['default'],
- upc_reader: _readerUpc_reader2['default'],
- upc_e_reader: _readerUpc_e_reader2['default'],
- i2of5_reader: _readerI2of5_reader2['default']
- };
- exports['default'] = {
- create: function create(config, inputImageWrapper) {
- var _canvas = {
- ctx: {
- frequency: null,
- pattern: null,
- overlay: null
- },
- dom: {
- frequency: null,
- pattern: null,
- overlay: null
+ function initInputStream(cb) {
+ var video;
+ if (_config.inputStream.type === "VideoStream") {
+ video = document.createElement("video");
+ _inputStream = _input_stream2.default.createVideoStream(video);
+ } else if (_config.inputStream.type === "ImageStream") {
+ _inputStream = _input_stream2.default.createImageStream();
+ } else if (_config.inputStream.type === "LiveStream") {
+ var $viewport = getViewPort();
+ if ($viewport) {
+ video = $viewport.querySelector("video");
+ if (!video) {
+ video = document.createElement("video");
+ $viewport.appendChild(video);
}
- },
- _barcodeReaders = [];
-
- initCanvas();
- initReaders();
- initConfig();
-
- function initCanvas() {
- if (false) {
- var $debug = document.querySelector("#debug.detection");
- _canvas.dom.frequency = document.querySelector("canvas.frequency");
- if (!_canvas.dom.frequency) {
- _canvas.dom.frequency = document.createElement("canvas");
- _canvas.dom.frequency.className = "frequency";
- if ($debug) {
- $debug.appendChild(_canvas.dom.frequency);
- }
- }
- _canvas.ctx.frequency = _canvas.dom.frequency.getContext("2d");
+ }
+ _inputStream = _input_stream2.default.createLiveStream(video);
+ _camera_access2.default.request(video, _config.inputStream.constraints).then(function () {
+ _inputStream.trigger("canrecord");
+ }).catch(function (err) {
+ return cb(err);
+ });
+ }
- _canvas.dom.pattern = document.querySelector("canvas.patternBuffer");
- if (!_canvas.dom.pattern) {
- _canvas.dom.pattern = document.createElement("canvas");
- _canvas.dom.pattern.className = "patternBuffer";
- if ($debug) {
- $debug.appendChild(_canvas.dom.pattern);
- }
- }
- _canvas.ctx.pattern = _canvas.dom.pattern.getContext("2d");
+ _inputStream.setAttribute("preload", "auto");
+ _inputStream.setAttribute("autoplay", true);
+ _inputStream.setInputStream(_config.inputStream);
+ _inputStream.addEventListener("canrecord", canRecord.bind(undefined, cb));
+ }
- _canvas.dom.overlay = document.querySelector("canvas.drawingBuffer");
- if (_canvas.dom.overlay) {
- _canvas.ctx.overlay = _canvas.dom.overlay.getContext("2d");
- }
- }
- }
+ function getViewPort() {
+ var target = _config.inputStream.target;
+ // Check if target is already a DOM element
+ if (target && target.nodeName && target.nodeType === 1) {
+ return target;
+ } else {
+ // Use '#interactive.viewport' as a fallback selector (backwards compatibility)
+ var selector = typeof target === 'string' ? target : '#interactive.viewport';
+ return document.querySelector(selector);
+ }
+ }
- function initReaders() {
- config.readers.forEach(function (readerConfig) {
- var reader,
- configuration = {};
+ function canRecord(cb) {
+ _barcode_locator2.default.checkImageConstraints(_inputStream, _config.locator);
+ initCanvas(_config);
+ _framegrabber = _frame_grabber2.default.create(_inputStream, _canvasContainer.dom.image);
- if (typeof readerConfig === 'object') {
- reader = readerConfig.format;
- configuration = readerConfig.config;
- } else if (typeof readerConfig === 'string') {
- reader = readerConfig;
- }
- if (false) {
- console.log("Before registering reader: ", reader);
- }
- _barcodeReaders.push(new READERS[reader](configuration));
- });
- if (false) {
- console.log("Registered Readers: " + _barcodeReaders.map(function (reader) {
- return JSON.stringify({ format: reader.FORMAT, config: reader.config });
- }).join(', '));
- }
+ adjustWorkerPool(_config.numOfWorkers, function () {
+ if (_config.numOfWorkers === 0) {
+ initializeData();
}
+ ready(cb);
+ });
+ }
- function initConfig() {
- if (false) {
- var i,
- vis = [{
- node: _canvas.dom.frequency,
- prop: config.debug.showFrequency
- }, {
- node: _canvas.dom.pattern,
- prop: config.debug.showPattern
- }];
+ function ready(cb) {
+ _inputStream.play();
+ cb();
+ }
- for (i = 0; i < vis.length; i++) {
- if (vis[i].prop === true) {
- vis[i].node.style.display = "block";
- } else {
- vis[i].node.style.display = "none";
- }
- }
+ function initCanvas() {
+ if (typeof document !== "undefined") {
+ var $viewport = getViewPort();
+ _canvasContainer.dom.image = document.querySelector("canvas.imgBuffer");
+ if (!_canvasContainer.dom.image) {
+ _canvasContainer.dom.image = document.createElement("canvas");
+ _canvasContainer.dom.image.className = "imgBuffer";
+ if ($viewport && _config.inputStream.type === "ImageStream") {
+ $viewport.appendChild(_canvasContainer.dom.image);
}
}
+ _canvasContainer.ctx.image = _canvasContainer.dom.image.getContext("2d");
+ _canvasContainer.dom.image.width = _inputStream.getCanvasSize().x;
+ _canvasContainer.dom.image.height = _inputStream.getCanvasSize().y;
- /**
- * extend the line on both ends
- * @param {Array} line
- * @param {Number} angle
- */
- function getExtendedLine(line, angle, ext) {
- function extendLine(amount) {
- var extension = {
- y: amount * Math.sin(angle),
- x: amount * Math.cos(angle)
- };
-
- line[0].y -= extension.y;
- line[0].x -= extension.x;
- line[1].y += extension.y;
- line[1].x += extension.x;
+ _canvasContainer.dom.overlay = document.querySelector("canvas.drawingBuffer");
+ if (!_canvasContainer.dom.overlay) {
+ _canvasContainer.dom.overlay = document.createElement("canvas");
+ _canvasContainer.dom.overlay.className = "drawingBuffer";
+ if ($viewport) {
+ $viewport.appendChild(_canvasContainer.dom.overlay);
}
-
- // check if inside image
- extendLine(ext);
- while (ext > 1 && (!inputImageWrapper.inImageWithBorder(line[0], 0) || !inputImageWrapper.inImageWithBorder(line[1], 0))) {
- ext -= Math.ceil(ext / 2);
- extendLine(-ext);
+ var clearFix = document.createElement("br");
+ clearFix.setAttribute("clear", "all");
+ if ($viewport) {
+ $viewport.appendChild(clearFix);
}
- return line;
- }
-
- function getLine(box) {
- return [{
- x: (box[1][0] - box[0][0]) / 2 + box[0][0],
- y: (box[1][1] - box[0][1]) / 2 + box[0][1]
- }, {
- x: (box[3][0] - box[2][0]) / 2 + box[2][0],
- y: (box[3][1] - box[2][1]) / 2 + box[2][1]
- }];
}
+ _canvasContainer.ctx.overlay = _canvasContainer.dom.overlay.getContext("2d");
+ _canvasContainer.dom.overlay.width = _inputStream.getCanvasSize().x;
+ _canvasContainer.dom.overlay.height = _inputStream.getCanvasSize().y;
+ }
+ }
- function tryDecode(line) {
- var result = null,
- i,
- barcodeLine = _bresenham2['default'].getBarcodeLine(inputImageWrapper, line[0], line[1]);
+ function initBuffers(imageWrapper) {
+ if (imageWrapper) {
+ _inputImageWrapper = imageWrapper;
+ } else {
+ _inputImageWrapper = new _image_wrapper2.default({
+ x: _inputStream.getWidth(),
+ y: _inputStream.getHeight()
+ });
+ }
- if (false) {
- _commonImage_debug2['default'].drawPath(line, { x: 'x', y: 'y' }, _canvas.ctx.overlay, { color: 'red', lineWidth: 3 });
- _bresenham2['default'].debug.printFrequency(barcodeLine.line, _canvas.dom.frequency);
- }
+ if (false) {
+ console.log(_inputImageWrapper.size);
+ }
+ _boxSize = [vec2.clone([0, 0]), vec2.clone([0, _inputImageWrapper.size.y]), vec2.clone([_inputImageWrapper.size.x, _inputImageWrapper.size.y]), vec2.clone([_inputImageWrapper.size.x, 0])];
+ _barcode_locator2.default.init(_inputImageWrapper, _config.locator);
+ }
- _bresenham2['default'].toBinaryLine(barcodeLine);
+ function getBoundingBoxes() {
+ if (_config.locate) {
+ return _barcode_locator2.default.locate();
+ } else {
+ return [[vec2.clone(_boxSize[0]), vec2.clone(_boxSize[1]), vec2.clone(_boxSize[2]), vec2.clone(_boxSize[3])]];
+ }
+ }
- if (false) {
- _bresenham2['default'].debug.printPattern(barcodeLine.line, _canvas.dom.pattern);
- }
+ function transformResult(result) {
+ var topRight = _inputStream.getTopRight(),
+ xOffset = topRight.x,
+ yOffset = topRight.y,
+ i;
- for (i = 0; i < _barcodeReaders.length && result === null; i++) {
- result = _barcodeReaders[i].decodePattern(barcodeLine.line);
- }
- if (result === null) {
- return null;
- }
- return {
- codeResult: result,
- barcodeLine: barcodeLine
- };
+ if (xOffset === 0 && yOffset === 0) {
+ return;
+ }
+
+ if (result.barcodes) {
+ for (i = 0; i < result.barcodes.length; i++) {
+ transformResult(result.barcodes[i]);
}
+ }
- /**
- * This method slices the given area apart and tries to detect a barcode-pattern
- * for each slice. It returns the decoded barcode, or null if nothing was found
- * @param {Array} box
- * @param {Array} line
- * @param {Number} lineAngle
- */
- function tryDecodeBruteForce(box, line, lineAngle) {
- var sideLength = Math.sqrt(Math.pow(box[1][0] - box[0][0], 2) + Math.pow(box[1][1] - box[0][1], 2)),
- i,
- slices = 16,
- result = null,
- dir,
- extension,
- xdir = Math.sin(lineAngle),
- ydir = Math.cos(lineAngle);
+ if (result.line && result.line.length === 2) {
+ moveLine(result.line);
+ }
- for (i = 1; i < slices && result === null; i++) {
- // move line perpendicular to angle
- dir = sideLength / slices * i * (i % 2 === 0 ? -1 : 1);
- extension = {
- y: dir * xdir,
- x: dir * ydir
- };
- line[0].y += extension.x;
- line[0].x -= extension.y;
- line[1].y += extension.x;
- line[1].x -= extension.y;
+ if (result.box) {
+ moveBox(result.box);
+ }
- result = tryDecode(line);
- }
- return result;
+ if (result.boxes && result.boxes.length > 0) {
+ for (i = 0; i < result.boxes.length; i++) {
+ moveBox(result.boxes[i]);
}
+ }
- function getLineLength(line) {
- return Math.sqrt(Math.pow(Math.abs(line[1].y - line[0].y), 2) + Math.pow(Math.abs(line[1].x - line[0].x), 2));
+ function moveBox(box) {
+ var corner = box.length;
+
+ while (corner--) {
+ box[corner][0] += xOffset;
+ box[corner][1] += yOffset;
}
+ }
- /**
- * With the help of the configured readers (Code128 or EAN) this function tries to detect a
- * valid barcode pattern within the given area.
- * @param {Object} box The area to search in
- * @returns {Object} the result {codeResult, line, angle, pattern, threshold}
- */
- function _decodeFromBoundingBox(box) {
- var line,
- lineAngle,
- ctx = _canvas.ctx.overlay,
- result,
- lineLength;
+ function moveLine(line) {
+ line[0].x += xOffset;
+ line[0].y += yOffset;
+ line[1].x += xOffset;
+ line[1].y += yOffset;
+ }
+ }
- if (false) {
- if (config.debug.drawBoundingBox && ctx) {
- _commonImage_debug2['default'].drawPath(box, { x: 0, y: 1 }, ctx, { color: "blue", lineWidth: 2 });
- }
- }
+ function addResult(result, imageData) {
+ if (!imageData || !_resultCollector) {
+ return;
+ }
- line = getLine(box);
- lineLength = getLineLength(line);
- lineAngle = Math.atan2(line[1].y - line[0].y, line[1].x - line[0].x);
- line = getExtendedLine(line, lineAngle, Math.floor(lineLength * 0.1));
- if (line === null) {
- return null;
- }
+ if (result.barcodes) {
+ result.barcodes.filter(function (barcode) {
+ return barcode.codeResult;
+ }).forEach(function (barcode) {
+ return addResult(barcode, imageData);
+ });
+ } else if (result.codeResult) {
+ _resultCollector.addResult(imageData, _inputStream.getCanvasSize(), result.codeResult);
+ }
+ }
- result = tryDecode(line);
- if (result === null) {
- result = tryDecodeBruteForce(box, line, lineAngle);
+ function hasCodeResult(result) {
+ return result && (result.barcodes ? result.barcodes.some(function (barcode) {
+ return barcode.codeResult;
+ }) : result.codeResult);
+ }
+
+ function publishResult(result, imageData) {
+ var resultToPublish = result && (result.barcodes || result);
+
+ if (result && _onUIThread) {
+ transformResult(result);
+ addResult(result, imageData);
+ }
+
+ _events2.default.publish("processed", resultToPublish);
+ if (hasCodeResult(result)) {
+ _events2.default.publish("detected", resultToPublish);
+ }
+ }
+
+ function locateAndDecode() {
+ var result, boxes;
+
+ boxes = getBoundingBoxes();
+ if (boxes) {
+ result = _decoder.decodeFromBoundingBoxes(boxes);
+ result = result || {};
+ result.boxes = boxes;
+ publishResult(result, _inputImageWrapper.data);
+ } else {
+ publishResult();
+ }
+ }
+
+ function update() {
+ var availableWorker;
+
+ if (_onUIThread) {
+ if (_workerPool.length > 0) {
+ availableWorker = _workerPool.filter(function (workerThread) {
+ return !workerThread.busy;
+ })[0];
+ if (availableWorker) {
+ _framegrabber.attachData(availableWorker.imageData);
+ } else {
+ return; // all workers are busy
+ }
+ } else {
+ _framegrabber.attachData(_inputImageWrapper.data);
}
+ if (_framegrabber.grab()) {
+ if (availableWorker) {
+ availableWorker.busy = true;
+ availableWorker.worker.postMessage({
+ cmd: 'process',
+ imageData: availableWorker.imageData
+ }, [availableWorker.imageData.buffer]);
+ } else {
+ locateAndDecode();
+ }
+ }
+ } else {
+ locateAndDecode();
+ }
+ }
- if (result === null) {
- return null;
+ function startContinuousUpdate() {
+ var next = null,
+ delay = 1000 / (_config.frequency || 60);
+
+ _stopped = false;
+ (function frame(timestamp) {
+ next = next || timestamp;
+ if (!_stopped) {
+ if (timestamp >= next) {
+ next += delay;
+ update();
}
+ window.requestAnimFrame(frame);
+ }
+ })(performance.now());
+ }
+ function _start() {
+ if (_onUIThread && _config.inputStream.type === "LiveStream") {
+ startContinuousUpdate();
+ } else {
+ update();
+ }
+ }
+
+ function initWorker(cb) {
+ var blobURL,
+ workerThread = {
+ worker: undefined,
+ imageData: new Uint8Array(_inputStream.getWidth() * _inputStream.getHeight()),
+ busy: true
+ };
+
+ blobURL = generateWorkerBlob();
+ workerThread.worker = new Worker(blobURL);
+
+ workerThread.worker.onmessage = function (e) {
+ if (e.data.event === 'initialized') {
+ URL.revokeObjectURL(blobURL);
+ workerThread.busy = false;
+ workerThread.imageData = new Uint8Array(e.data.imageData);
+ if (false) {
+ console.log("Worker initialized");
+ }
+ return cb(workerThread);
+ } else if (e.data.event === 'processed') {
+ workerThread.imageData = new Uint8Array(e.data.imageData);
+ workerThread.busy = false;
+ publishResult(e.data.result, workerThread.imageData);
+ } else if (e.data.event === 'error') {
if (false) {
- _commonImage_debug2['default'].drawPath(line, { x: 'x', y: 'y' }, ctx, { color: 'red', lineWidth: 3 });
+ console.log("Worker error: " + e.data.message);
}
+ }
+ };
- return {
- codeResult: result.codeResult,
- line: line,
- angle: lineAngle,
- pattern: result.barcodeLine.line,
- threshold: result.barcodeLine.threshold
- };
+ workerThread.worker.postMessage({
+ cmd: 'init',
+ size: { x: _inputStream.getWidth(), y: _inputStream.getHeight() },
+ imageData: workerThread.imageData,
+ config: _config
+ }, [workerThread.imageData.buffer]);
+ }
+
+ function workerInterface(factory) {
+ /* eslint-disable no-undef*/
+ if (factory) {
+ var Quagga = factory().default;
+ if (!Quagga) {
+ self.postMessage({ 'event': 'error', message: 'Quagga could not be created' });
+ return;
}
+ }
+ var imageWrapper;
- return {
- decodeFromBoundingBox: function decodeFromBoundingBox(box) {
- return _decodeFromBoundingBox(box);
- },
- decodeFromBoundingBoxes: function decodeFromBoundingBoxes(boxes) {
+ self.onmessage = function (e) {
+ if (e.data.cmd === 'init') {
+ var config = e.data.config;
+ config.numOfWorkers = 0;
+ imageWrapper = new Quagga.ImageWrapper({
+ x: e.data.size.x,
+ y: e.data.size.y
+ }, new Uint8Array(e.data.imageData));
+ Quagga.init(config, ready, imageWrapper);
+ Quagga.onProcessed(onProcessed);
+ } else if (e.data.cmd === 'process') {
+ imageWrapper.data = new Uint8Array(e.data.imageData);
+ Quagga.start();
+ } else if (e.data.cmd === 'setReaders') {
+ Quagga.setReaders(e.data.readers);
+ }
+ };
+
+ function onProcessed(result) {
+ self.postMessage({
+ 'event': 'processed',
+ imageData: imageWrapper.data,
+ result: result
+ }, [imageWrapper.data.buffer]);
+ }
+
+ function ready() {
+ // eslint-disable-line
+ self.postMessage({ 'event': 'initialized', imageData: imageWrapper.data }, [imageWrapper.data.buffer]);
+ }
+
+ /* eslint-enable */
+ }
+
+ function generateWorkerBlob() {
+ var blob, factorySource;
+
+ /* jshint ignore:start */
+ if (typeof __factorySource__ !== 'undefined') {
+ factorySource = __factorySource__; // eslint-disable-line no-undef
+ }
+ /* jshint ignore:end */
+
+ blob = new Blob(['(' + workerInterface.toString() + ')(' + factorySource + ');'], { type: 'text/javascript' });
+
+ return window.URL.createObjectURL(blob);
+ }
+
+ function _setReaders(readers) {
+ if (_decoder) {
+ _decoder.setReaders(readers);
+ } else if (_onUIThread && _workerPool.length > 0) {
+ _workerPool.forEach(function (workerThread) {
+ workerThread.worker.postMessage({ cmd: 'setReaders', readers: readers });
+ });
+ }
+ }
+
+ function adjustWorkerPool(capacity, cb) {
+ var increaseBy = capacity - _workerPool.length;
+ if (increaseBy === 0) {
+ return cb && cb();
+ }
+ if (increaseBy < 0) {
+ var workersToTerminate = _workerPool.slice(increaseBy);
+ workersToTerminate.forEach(function (workerThread) {
+ workerThread.worker.terminate();
+ if (false) {
+ console.log("Worker terminated!");
+ }
+ });
+ _workerPool = _workerPool.slice(0, increaseBy);
+ return cb && cb();
+ } else {
+ var workerInitialized = function workerInitialized(workerThread) {
+ _workerPool.push(workerThread);
+ if (_workerPool.length >= capacity) {
+ cb && cb();
+ }
+ };
+
+ for (var i = 0; i < increaseBy; i++) {
+ initWorker(workerInitialized);
+ }
+ }
+ }
+
+ exports.default = {
+ init: function init(config, cb, imageWrapper) {
+ _config = (0, _merge3.default)({}, _config3.default, config);
+ if (imageWrapper) {
+ _onUIThread = false;
+ initializeData(imageWrapper);
+ return cb();
+ } else {
+ initInputStream(cb);
+ }
+ },
+ start: function start() {
+ _start();
+ },
+ stop: function stop() {
+ _stopped = true;
+ adjustWorkerPool(0);
+ if (_config.inputStream.type === "LiveStream") {
+ _camera_access2.default.release();
+ _inputStream.clearEventHandlers();
+ }
+ },
+ pause: function pause() {
+ _stopped = true;
+ },
+ onDetected: function onDetected(callback) {
+ _events2.default.subscribe("detected", callback);
+ },
+ offDetected: function offDetected(callback) {
+ _events2.default.unsubscribe("detected", callback);
+ },
+ onProcessed: function onProcessed(callback) {
+ _events2.default.subscribe("processed", callback);
+ },
+ offProcessed: function offProcessed(callback) {
+ _events2.default.unsubscribe("processed", callback);
+ },
+ setReaders: function setReaders(readers) {
+ _setReaders(readers);
+ },
+ registerResultCollector: function registerResultCollector(resultCollector) {
+ if (resultCollector && typeof resultCollector.addResult === 'function') {
+ _resultCollector = resultCollector;
+ }
+ },
+ canvas: _canvasContainer,
+ decodeSingle: function decodeSingle(config, resultCallback) {
+ var _this = this;
+
+ config = (0, _merge3.default)({
+ inputStream: {
+ type: "ImageStream",
+ sequence: false,
+ size: 800,
+ src: config.src
+ },
+ numOfWorkers: false ? 0 : 1,
+ locator: {
+ halfSample: false
+ }
+ }, config);
+ this.init(config, function () {
+ _events2.default.once("processed", function (result) {
+ _this.stop();
+ resultCallback.call(null, result);
+ }, true);
+ _start();
+ });
+ },
+ ImageWrapper: _image_wrapper2.default,
+ ImageDebug: _image_debug2.default,
+ ResultCollector: _result_collector2.default
+ };
+
+/***/ },
+/* 50 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ var CVUtils = __webpack_require__(17),
+ Ndarray = __webpack_require__(154),
+ Interp2D = __webpack_require__(155).d2;
+
+ var FrameGrabber = {};
+
+ FrameGrabber.create = function (inputStream) {
+ var _that = {},
+ _streamConfig = inputStream.getConfig(),
+ _video_size = CVUtils.imageRef(inputStream.getRealWidth(), inputStream.getRealHeight()),
+ _canvasSize = inputStream.getCanvasSize(),
+ _size = CVUtils.imageRef(inputStream.getWidth(), inputStream.getHeight()),
+ _topRight = inputStream.getTopRight(),
+ _data = new Uint8Array(_size.x * _size.y),
+ _grayData = new Uint8Array(_video_size.x * _video_size.y),
+ _canvasData = new Uint8Array(_canvasSize.x * _canvasSize.y),
+ _grayImageArray = Ndarray(_grayData, [_video_size.y, _video_size.x]).transpose(1, 0),
+ _canvasImageArray = Ndarray(_canvasData, [_canvasSize.y, _canvasSize.x]).transpose(1, 0),
+ _targetImageArray = _canvasImageArray.hi(_topRight.x + _size.x, _topRight.y + _size.y).lo(_topRight.x, _topRight.y),
+ _stepSizeX = _video_size.x / _canvasSize.x,
+ _stepSizeY = _video_size.y / _canvasSize.y;
+
+ console.log("FrameGrabber", JSON.stringify({
+ videoSize: _grayImageArray.shape,
+ canvasSize: _canvasImageArray.shape,
+ stepSize: [_stepSizeX, _stepSizeY],
+ size: _targetImageArray.shape,
+ topRight: _topRight
+ }));
+
+ /**
+ * Uses the given array as frame-buffer
+ */
+ _that.attachData = function (data) {
+ _data = data;
+ };
+
+ /**
+ * Returns the used frame-buffer
+ */
+ _that.getData = function () {
+ return _data;
+ };
+
+ /**
+ * Fetches a frame from the input-stream and puts into the frame-buffer.
+ * The image-data is converted to gray-scale and then half-sampled if configured.
+ */
+ _that.grab = function () {
+ var frame = inputStream.getFrame();
+
+ if (frame) {
+ this.scaleAndCrop(frame);
+ return true;
+ } else {
+ return false;
+ }
+ };
+
+ _that.scaleAndCrop = function (frame) {
+ var x, y;
+
+ // 1. compute full-sized gray image
+ CVUtils.computeGray(frame.data, _grayData);
+
+ // 2. interpolate
+ for (y = 0; y < _canvasSize.y; y++) {
+ for (x = 0; x < _canvasSize.x; x++) {
+ _canvasImageArray.set(x, y, Interp2D(_grayImageArray, x * _stepSizeX, y * _stepSizeY) | 0);
+ }
+ }
+
+ // targetImageArray must be equal to targetSize
+ if (_targetImageArray.shape[0] !== _size.x || _targetImageArray.shape[1] !== _size.y) {
+ throw new Error("Shapes do not match!");
+ }
+
+ // 3. crop
+ for (y = 0; y < _size.y; y++) {
+ for (x = 0; x < _size.x; x++) {
+ _data[y * _size.x + x] = _targetImageArray.get(x, y);
+ }
+ }
+ }, _that.getSize = function () {
+ return _size;
+ };
+
+ return _that;
+ };
+
+ module.e = FrameGrabber;
+
+/***/ },
+/* 51 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var GetPixels = __webpack_require__(153);
+
+ var InputStream = {};
+
+ InputStream.createImageStream = function () {
+ var that = {};
+ var _config = null;
+
+ var width = 0,
+ height = 0,
+ frameIdx = 0,
+ paused = true,
+ loaded = false,
+ frame = null,
+ baseUrl,
+ ended = false,
+ size,
+ calculatedWidth,
+ calculatedHeight,
+ _eventNames = ['canrecord', 'ended'],
+ _eventHandlers = {},
+ _topRight = { x: 0, y: 0 },
+ _canvasSize = { x: 0, y: 0 };
+
+ function loadImages() {
+ loaded = false;
+ GetPixels(baseUrl, function (err, pixels) {
+ if (err) {
+ console.log(err);
+ exit(1);
+ }
+ loaded = true;
+ console.log(pixels.shape);
+ frame = pixels;
+ width = pixels.shape[0];
+ height = pixels.shape[1];
+ calculatedWidth = _config.size ? width / height > 1 ? _config.size : Math.floor(width / height * _config.size) : width;
+ calculatedHeight = _config.size ? width / height > 1 ? Math.floor(height / width * _config.size) : _config.size : height;
+
+ _canvasSize.x = calculatedWidth;
+ _canvasSize.y = calculatedHeight;
+
+ setTimeout(function () {
+ publishEvent("canrecord", []);
+ }, 0);
+ });
+ }
+
+ function publishEvent(eventName, args) {
+ var j,
+ handlers = _eventHandlers[eventName];
+
+ if (handlers && handlers.length > 0) {
+ for (j = 0; j < handlers.length; j++) {
+ handlers[j].apply(that, args);
+ }
+ }
+ }
+
+ that.trigger = publishEvent;
+
+ that.getWidth = function () {
+ return calculatedWidth;
+ };
+
+ that.getHeight = function () {
+ return calculatedHeight;
+ };
+
+ that.setWidth = function (width) {
+ calculatedWidth = width;
+ };
+
+ that.setHeight = function (height) {
+ calculatedHeight = height;
+ };
+
+ that.getRealWidth = function () {
+ return width;
+ };
+
+ that.getRealHeight = function () {
+ return height;
+ };
+
+ that.setInputStream = function (stream) {
+ _config = stream;
+ baseUrl = _config.src;
+ size = 1;
+ loadImages();
+ };
+
+ that.ended = function () {
+ return ended;
+ };
+
+ that.setAttribute = function () {};
+
+ that.getConfig = function () {
+ return _config;
+ };
+
+ that.pause = function () {
+ paused = true;
+ };
+
+ that.play = function () {
+ paused = false;
+ };
+
+ that.setCurrentTime = function (time) {
+ frameIdx = time;
+ };
+
+ that.addEventListener = function (event, f) {
+ if (_eventNames.indexOf(event) !== -1) {
+ if (!_eventHandlers[event]) {
+ _eventHandlers[event] = [];
+ }
+ _eventHandlers[event].push(f);
+ }
+ };
+
+ that.setTopRight = function (topRight) {
+ _topRight.x = topRight.x;
+ _topRight.y = topRight.y;
+ };
+
+ that.getTopRight = function () {
+ return _topRight;
+ };
+
+ that.setCanvasSize = function (size) {
+ _canvasSize.x = size.x;
+ _canvasSize.y = size.y;
+ };
+
+ that.getCanvasSize = function () {
+ return _canvasSize;
+ };
+
+ that.getFrame = function () {
+ if (!loaded) {
+ return null;
+ }
+ return frame;
+ };
+
+ return that;
+ };
+
+ module.e = InputStream;
+
+/***/ },
+/* 52 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ exports.__esModule = true;
+
+ var _image_debug = __webpack_require__(9);
+
+ var _image_debug2 = _interopRequireDefault(_image_debug);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function contains(codeResult, list) {
+ if (list) {
+ return list.some(function (item) {
+ return Object.keys(item).every(function (key) {
+ return item[key] === codeResult[key];
+ });
+ });
+ }
+ return false;
+ }
+
+ function passesFilter(codeResult, filter) {
+ if (typeof filter === 'function') {
+ return filter(codeResult);
+ }
+ return true;
+ }
+
+ exports.default = {
+ create: function create(config) {
+ var canvas = document.createElement("canvas"),
+ ctx = canvas.getContext("2d"),
+ results = [],
+ capacity = config.capacity || 20,
+ capture = config.capture === true;
+
+ function matchesConstraints(codeResult) {
+ return capacity && codeResult && !contains(codeResult, config.blacklist) && passesFilter(codeResult, config.filter);
+ }
+
+ return {
+ addResult: function addResult(data, imageSize, codeResult) {
+ var result = {};
+
+ if (matchesConstraints(codeResult)) {
+ capacity--;
+ result.codeResult = codeResult;
+ if (capture) {
+ canvas.width = imageSize.x;
+ canvas.height = imageSize.y;
+ _image_debug2.default.drawImage(data, imageSize, ctx);
+ result.frame = canvas.toDataURL();
+ }
+ results.push(result);
+ }
+ },
+ getResults: function getResults() {
+ return results;
+ }
+ };
+ }
+ };
+
+/***/ },
+/* 53 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ exports.__esModule = true;
+ var vec2 = {
+ clone: __webpack_require__(6),
+ dot: __webpack_require__(31)
+ };
+ /**
+ * Creates a cluster for grouping similar orientations of datapoints
+ */
+ exports.default = {
+ create: function create(point, threshold) {
+ var points = [],
+ center = {
+ rad: 0,
+ vec: vec2.clone([0, 0])
+ },
+ pointMap = {};
+
+ function init() {
+ _add(point);
+ updateCenter();
+ }
+
+ function _add(pointToAdd) {
+ pointMap[pointToAdd.id] = pointToAdd;
+ points.push(pointToAdd);
+ }
+
+ function updateCenter() {
+ var i,
+ sum = 0;
+ for (i = 0; i < points.length; i++) {
+ sum += points[i].rad;
+ }
+ center.rad = sum / points.length;
+ center.vec = vec2.clone([Math.cos(center.rad), Math.sin(center.rad)]);
+ }
+
+ init();
+
+ return {
+ add: function add(pointToAdd) {
+ if (!pointMap[pointToAdd.id]) {
+ _add(pointToAdd);
+ updateCenter();
+ }
+ },
+ fits: function fits(otherPoint) {
+ // check cosine similarity to center-angle
+ var similarity = Math.abs(vec2.dot(otherPoint.point.vec, center.vec));
+ if (similarity > threshold) {
+ return true;
+ }
+ return false;
+ },
+ getPoints: function getPoints() {
+ return points;
+ },
+ getCenter: function getCenter() {
+ return center;
+ }
+ };
+ },
+ createPoint: function createPoint(newPoint, id, property) {
+ return {
+ rad: newPoint[property],
+ point: newPoint,
+ id: id
+ };
+ }
+ };
+
+/***/ },
+/* 54 */
+/***/ function(module, exports) {
+
+ "use strict";
+
+ exports.__esModule = true;
+
+ exports.default = function () {
+ var events = {};
+
+ function getEvent(eventName) {
+ if (!events[eventName]) {
+ events[eventName] = {
+ subscribers: []
+ };
+ }
+ return events[eventName];
+ }
+
+ function clearEvents() {
+ events = {};
+ }
+
+ function publishSubscription(subscription, data) {
+ if (subscription.async) {
+ setTimeout(function () {
+ subscription.callback(data);
+ }, 4);
+ } else {
+ subscription.callback(data);
+ }
+ }
+
+ function _subscribe(event, callback, async) {
+ var subscription;
+
+ if (typeof callback === "function") {
+ subscription = {
+ callback: callback,
+ async: async
+ };
+ } else {
+ subscription = callback;
+ if (!subscription.callback) {
+ throw "Callback was not specified on options";
+ }
+ }
+
+ getEvent(event).subscribers.push(subscription);
+ }
+
+ return {
+ subscribe: function subscribe(event, callback, async) {
+ return _subscribe(event, callback, async);
+ },
+ publish: function publish(eventName, data) {
+ var event = getEvent(eventName),
+ subscribers = event.subscribers;
+
+ event.subscribers = subscribers.filter(function (subscriber) {
+ publishSubscription(subscriber, data);
+ return !subscriber.once;
+ });
+ },
+ once: function once(event, callback, async) {
+ _subscribe(event, {
+ callback: callback,
+ async: async,
+ once: true
+ });
+ },
+ unsubscribe: function unsubscribe(eventName, callback) {
+ var event;
+
+ if (eventName) {
+ event = getEvent(eventName);
+ if (event && callback) {
+ event.subscribers = event.subscribers.filter(function (subscriber) {
+ return subscriber.callback !== callback;
+ });
+ } else {
+ event.subscribers = [];
+ }
+ } else {
+ clearEvents();
+ }
+ }
+ };
+ }();
+
+/***/ },
+/* 55 */
+/***/ function(module, exports) {
+
+ 'use strict';
+
+ exports.__esModule = true;
+ /**
+ * Construct representing a part of another {ImageWrapper}. Shares data
+ * between the parent and the child.
+ * @param from {ImageRef} The position where to start the {SubImage} from. (top-left corner)
+ * @param size {ImageRef} The size of the resulting image
+ * @param I {ImageWrapper} The {ImageWrapper} to share from
+ * @returns {SubImage} A shared part of the original image
+ */
+ function SubImage(from, size, I) {
+ if (!I) {
+ I = {
+ data: null,
+ size: size
+ };
+ }
+ this.data = I.data;
+ this.originalSize = I.size;
+ this.I = I;
+
+ this.from = from;
+ this.size = size;
+ }
+
+ /**
+ * Displays the {SubImage} in a given canvas
+ * @param canvas {Canvas} The canvas element to write to
+ * @param scale {Number} Scale which is applied to each pixel-value
+ */
+ SubImage.prototype.show = function (canvas, scale) {
+ var ctx, frame, data, current, y, x, pixel;
+
+ if (!scale) {
+ scale = 1.0;
+ }
+ ctx = canvas.getContext('2d');
+ canvas.width = this.size.x;
+ canvas.height = this.size.y;
+ frame = ctx.getImageData(0, 0, canvas.width, canvas.height);
+ data = frame.data;
+ current = 0;
+ for (y = 0; y < this.size.y; y++) {
+ for (x = 0; x < this.size.x; x++) {
+ pixel = y * this.size.x + x;
+ current = this.get(x, y) * scale;
+ data[pixel * 4 + 0] = current;
+ data[pixel * 4 + 1] = current;
+ data[pixel * 4 + 2] = current;
+ data[pixel * 4 + 3] = 255;
+ }
+ }
+ frame.data = data;
+ ctx.putImageData(frame, 0, 0);
+ };
+
+ /**
+ * Retrieves a given pixel position from the {SubImage}
+ * @param x {Number} The x-position
+ * @param y {Number} The y-position
+ * @returns {Number} The grayscale value at the pixel-position
+ */
+ SubImage.prototype.get = function (x, y) {
+ return this.data[(this.from.y + y) * this.originalSize.x + this.from.x + x];
+ };
+
+ /**
+ * Updates the underlying data from a given {ImageWrapper}
+ * @param image {ImageWrapper} The updated image
+ */
+ SubImage.prototype.updateData = function (image) {
+ this.originalSize = image.size;
+ this.data = image.data;
+ };
+
+ /**
+ * Updates the position of the shared area
+ * @param from {x,y} The new location
+ * @returns {SubImage} returns {this} for possible chaining
+ */
+ SubImage.prototype.updateFrom = function (from) {
+ this.from = from;
+ return this;
+ };
+
+ exports.default = SubImage;
+
+/***/ },
+/* 56 */
+/***/ function(module, exports) {
+
+ 'use strict';
+
+ /*
+ * typedefs.js
+ * Normalizes browser-specific prefixes
+ */
+
+ if (typeof window !== 'undefined') {
+ window.requestAnimFrame = function () {
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function ( /* function FrameRequestCallback */callback) {
+ window.setTimeout(callback, 1000 / 60);
+ };
+ }();
+ }
+ Math.imul = Math.imul || function (a, b) {
+ var ah = a >>> 16 & 0xffff,
+ al = a & 0xffff,
+ bh = b >>> 16 & 0xffff,
+ bl = b & 0xffff;
+ // the shift by 0 fixes the sign on the high part
+ // the final |0 converts the unsigned value into a signed value
+ return al * bl + (ah * bl + al * bh << 16 >>> 0) | 0;
+ };
+
+/***/ },
+/* 57 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ exports.__esModule = true;
+ var config = void 0;
+
+ if (false) {
+ config = require('./config.dev.js');
+ } else if (true) {
+ config = __webpack_require__(58);
+ } else {
+ config = require('./config.prod.js');
+ }
+
+ exports.default = config;
+
+/***/ },
+/* 58 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ module.e = {
+ inputStream: {
+ type: "ImageStream",
+ sequence: false,
+ size: 800,
+ area: {
+ top: "0%",
+ right: "0%",
+ left: "0%",
+ bottom: "0%"
+ },
+ singleChannel: false // true: only the red color-channel is read
+ },
+ locate: true,
+ numOfWorkers: 0,
+ decoder: {
+ readers: ['code_128_reader']
+ },
+ locator: {
+ halfSample: true,
+ patchSize: "medium" // x-small, small, medium, large, x-large
+ }
+ };
+
+/***/ },
+/* 59 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ exports.__esModule = true;
+
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
+
+ var _bresenham = __webpack_require__(60);
+
+ var _bresenham2 = _interopRequireDefault(_bresenham);
+
+ var _image_debug = __webpack_require__(9);
+
+ var _image_debug2 = _interopRequireDefault(_image_debug);
+
+ var _code_128_reader = __webpack_require__(66);
+
+ var _code_128_reader2 = _interopRequireDefault(_code_128_reader);
+
+ var _ean_reader = __webpack_require__(10);
+
+ var _ean_reader2 = _interopRequireDefault(_ean_reader);
+
+ var _code_39_reader = __webpack_require__(30);
+
+ var _code_39_reader2 = _interopRequireDefault(_code_39_reader);
+
+ var _code_39_vin_reader = __webpack_require__(67);
+
+ var _code_39_vin_reader2 = _interopRequireDefault(_code_39_vin_reader);
+
+ var _codabar_reader = __webpack_require__(65);
+
+ var _codabar_reader2 = _interopRequireDefault(_codabar_reader);
+
+ var _upc_reader = __webpack_require__(71);
+
+ var _upc_reader2 = _interopRequireDefault(_upc_reader);
+
+ var _ean_8_reader = __webpack_require__(68);
+
+ var _ean_8_reader2 = _interopRequireDefault(_ean_8_reader);
+
+ var _upc_e_reader = __webpack_require__(70);
+
+ var _upc_e_reader2 = _interopRequireDefault(_upc_e_reader);
+
+ var _i2of5_reader = __webpack_require__(69);
+
+ var _i2of5_reader2 = _interopRequireDefault(_i2of5_reader);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var READERS = {
+ code_128_reader: _code_128_reader2.default,
+ ean_reader: _ean_reader2.default,
+ ean_8_reader: _ean_8_reader2.default,
+ code_39_reader: _code_39_reader2.default,
+ code_39_vin_reader: _code_39_vin_reader2.default,
+ codabar_reader: _codabar_reader2.default,
+ upc_reader: _upc_reader2.default,
+ upc_e_reader: _upc_e_reader2.default,
+ i2of5_reader: _i2of5_reader2.default
+ };
+ exports.default = {
+ create: function create(config, inputImageWrapper) {
+ var _canvas = {
+ ctx: {
+ frequency: null,
+ pattern: null,
+ overlay: null
+ },
+ dom: {
+ frequency: null,
+ pattern: null,
+ overlay: null
+ }
+ },
+ _barcodeReaders = [];
+
+ initCanvas();
+ initReaders();
+ initConfig();
+
+ function initCanvas() {
+ if (false) {
+ var $debug = document.querySelector("#debug.detection");
+ _canvas.dom.frequency = document.querySelector("canvas.frequency");
+ if (!_canvas.dom.frequency) {
+ _canvas.dom.frequency = document.createElement("canvas");
+ _canvas.dom.frequency.className = "frequency";
+ if ($debug) {
+ $debug.appendChild(_canvas.dom.frequency);
+ }
+ }
+ _canvas.ctx.frequency = _canvas.dom.frequency.getContext("2d");
+
+ _canvas.dom.pattern = document.querySelector("canvas.patternBuffer");
+ if (!_canvas.dom.pattern) {
+ _canvas.dom.pattern = document.createElement("canvas");
+ _canvas.dom.pattern.className = "patternBuffer";
+ if ($debug) {
+ $debug.appendChild(_canvas.dom.pattern);
+ }
+ }
+ _canvas.ctx.pattern = _canvas.dom.pattern.getContext("2d");
+
+ _canvas.dom.overlay = document.querySelector("canvas.drawingBuffer");
+ if (_canvas.dom.overlay) {
+ _canvas.ctx.overlay = _canvas.dom.overlay.getContext("2d");
+ }
+ }
+ }
+
+ function initReaders() {
+ config.readers.forEach(function (readerConfig) {
+ var reader,
+ configuration = {};
+
+ if ((typeof readerConfig === 'undefined' ? 'undefined' : _typeof(readerConfig)) === 'object') {
+ reader = readerConfig.format;
+ configuration = readerConfig.config;
+ } else if (typeof readerConfig === 'string') {
+ reader = readerConfig;
+ }
+ if (false) {
+ console.log("Before registering reader: ", reader);
+ }
+ _barcodeReaders.push(new READERS[reader](configuration));
+ });
+ if (false) {
+ console.log("Registered Readers: " + _barcodeReaders.map(function (reader) {
+ return JSON.stringify({ format: reader.FORMAT, config: reader.config });
+ }).join(', '));
+ }
+ }
+
+ function initConfig() {
+ if (false) {
+ var i,
+ vis = [{
+ node: _canvas.dom.frequency,
+ prop: config.debug.showFrequency
+ }, {
+ node: _canvas.dom.pattern,
+ prop: config.debug.showPattern
+ }];
+
+ for (i = 0; i < vis.length; i++) {
+ if (vis[i].prop === true) {
+ vis[i].node.style.display = "block";
+ } else {
+ vis[i].node.style.display = "none";
+ }
+ }
+ }
+ }
+
+ /**
+ * extend the line on both ends
+ * @param {Array} line
+ * @param {Number} angle
+ */
+ function getExtendedLine(line, angle, ext) {
+ function extendLine(amount) {
+ var extension = {
+ y: amount * Math.sin(angle),
+ x: amount * Math.cos(angle)
+ };
+
+ line[0].y -= extension.y;
+ line[0].x -= extension.x;
+ line[1].y += extension.y;
+ line[1].x += extension.x;
+ }
+
+ // check if inside image
+ extendLine(ext);
+ while (ext > 1 && (!inputImageWrapper.inImageWithBorder(line[0], 0) || !inputImageWrapper.inImageWithBorder(line[1], 0))) {
+ ext -= Math.ceil(ext / 2);
+ extendLine(-ext);
+ }
+ return line;
+ }
+
+ function getLine(box) {
+ return [{
+ x: (box[1][0] - box[0][0]) / 2 + box[0][0],
+ y: (box[1][1] - box[0][1]) / 2 + box[0][1]
+ }, {
+ x: (box[3][0] - box[2][0]) / 2 + box[2][0],
+ y: (box[3][1] - box[2][1]) / 2 + box[2][1]
+ }];
+ }
+
+ function tryDecode(line) {
+ var result = null,
+ i,
+ barcodeLine = _bresenham2.default.getBarcodeLine(inputImageWrapper, line[0], line[1]);
+
+ if (false) {
+ _image_debug2.default.drawPath(line, { x: 'x', y: 'y' }, _canvas.ctx.overlay, { color: 'red', lineWidth: 3 });
+ _bresenham2.default.debug.printFrequency(barcodeLine.line, _canvas.dom.frequency);
+ }
+
+ _bresenham2.default.toBinaryLine(barcodeLine);
+
+ if (false) {
+ _bresenham2.default.debug.printPattern(barcodeLine.line, _canvas.dom.pattern);
+ }
+
+ for (i = 0; i < _barcodeReaders.length && result === null; i++) {
+ result = _barcodeReaders[i].decodePattern(barcodeLine.line);
+ }
+ if (result === null) {
+ return null;
+ }
+ return {
+ codeResult: result,
+ barcodeLine: barcodeLine
+ };
+ }
+
+ /**
+ * This method slices the given area apart and tries to detect a barcode-pattern
+ * for each slice. It returns the decoded barcode, or null if nothing was found
+ * @param {Array} box
+ * @param {Array} line
+ * @param {Number} lineAngle
+ */
+ function tryDecodeBruteForce(box, line, lineAngle) {
+ var sideLength = Math.sqrt(Math.pow(box[1][0] - box[0][0], 2) + Math.pow(box[1][1] - box[0][1], 2)),
+ i,
+ slices = 16,
+ result = null,
+ dir,
+ extension,
+ xdir = Math.sin(lineAngle),
+ ydir = Math.cos(lineAngle);
+
+ for (i = 1; i < slices && result === null; i++) {
+ // move line perpendicular to angle
+ dir = sideLength / slices * i * (i % 2 === 0 ? -1 : 1);
+ extension = {
+ y: dir * xdir,
+ x: dir * ydir
+ };
+ line[0].y += extension.x;
+ line[0].x -= extension.y;
+ line[1].y += extension.x;
+ line[1].x -= extension.y;
+
+ result = tryDecode(line);
+ }
+ return result;
+ }
+
+ function getLineLength(line) {
+ return Math.sqrt(Math.pow(Math.abs(line[1].y - line[0].y), 2) + Math.pow(Math.abs(line[1].x - line[0].x), 2));
+ }
+
+ /**
+ * With the help of the configured readers (Code128 or EAN) this function tries to detect a
+ * valid barcode pattern within the given area.
+ * @param {Object} box The area to search in
+ * @returns {Object} the result {codeResult, line, angle, pattern, threshold}
+ */
+ function _decodeFromBoundingBox(box) {
+ var line,
+ lineAngle,
+ ctx = _canvas.ctx.overlay,
+ result,
+ lineLength;
+
+ if (false) {
+ if (config.debug.drawBoundingBox && ctx) {
+ _image_debug2.default.drawPath(box, { x: 0, y: 1 }, ctx, { color: "blue", lineWidth: 2 });
+ }
+ }
+
+ line = getLine(box);
+ lineLength = getLineLength(line);
+ lineAngle = Math.atan2(line[1].y - line[0].y, line[1].x - line[0].x);
+ line = getExtendedLine(line, lineAngle, Math.floor(lineLength * 0.1));
+ if (line === null) {
+ return null;
+ }
+
+ result = tryDecode(line);
+ if (result === null) {
+ result = tryDecodeBruteForce(box, line, lineAngle);
+ }
+
+ if (result === null) {
+ return null;
+ }
+
+ if (false) {
+ _image_debug2.default.drawPath(line, { x: 'x', y: 'y' }, ctx, { color: 'red', lineWidth: 3 });
+ }
+
+ return {
+ codeResult: result.codeResult,
+ line: line,
+ angle: lineAngle,
+ pattern: result.barcodeLine.line,
+ threshold: result.barcodeLine.threshold
+ };
+ }
+
+ return {
+ decodeFromBoundingBox: function decodeFromBoundingBox(box) {
+ return _decodeFromBoundingBox(box);
+ },
+ decodeFromBoundingBoxes: function decodeFromBoundingBoxes(boxes) {
var i,
result,
barcodes = [],
multiple = config.multiple;
- for (i = 0; i < boxes.length; i++) {
- var box = boxes[i];
- result = _decodeFromBoundingBox(box) || {};
- result.box = box;
+ for (i = 0; i < boxes.length; i++) {
+ var box = boxes[i];
+ result = _decodeFromBoundingBox(box) || {};
+ result.box = box;
+
+ if (multiple) {
+ barcodes.push(result);
+ } else if (result.codeResult) {
+ return result;
+ }
+ }
+
+ if (multiple) {
+ return {
+ barcodes: barcodes
+ };
+ }
+ },
+ setReaders: function setReaders(readers) {
+ config.readers = readers;
+ _barcodeReaders.length = 0;
+ initReaders();
+ }
+ };
+ }
+ };
+
+/***/ },
+/* 60 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ exports.__esModule = true;
+
+ var _image_wrapper = __webpack_require__(18);
+
+ var _image_wrapper2 = _interopRequireDefault(_image_wrapper);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var Bresenham = {};
+
+ var Slope = {
+ DIR: {
+ UP: 1,
+ DOWN: -1
+ }
+ };
+ /**
+ * Scans a line of the given image from point p1 to p2 and returns a result object containing
+ * gray-scale values (0-255) of the underlying pixels in addition to the min
+ * and max values.
+ * @param {Object} imageWrapper
+ * @param {Object} p1 The start point {x,y}
+ * @param {Object} p2 The end point {x,y}
+ * @returns {line, min, max}
+ */
+ Bresenham.getBarcodeLine = function (imageWrapper, p1, p2) {
+ var x0 = p1.x | 0,
+ y0 = p1.y | 0,
+ x1 = p2.x | 0,
+ y1 = p2.y | 0,
+ steep = Math.abs(y1 - y0) > Math.abs(x1 - x0),
+ deltax,
+ deltay,
+ error,
+ ystep,
+ y,
+ tmp,
+ x,
+ line = [],
+ imageData = imageWrapper.data,
+ width = imageWrapper.size.x,
+ sum = 0,
+ val,
+ min = 255,
+ max = 0;
+
+ function read(a, b) {
+ val = imageData[b * width + a];
+ sum += val;
+ min = val < min ? val : min;
+ max = val > max ? val : max;
+ line.push(val);
+ }
+
+ if (steep) {
+ tmp = x0;
+ x0 = y0;
+ y0 = tmp;
+
+ tmp = x1;
+ x1 = y1;
+ y1 = tmp;
+ }
+ if (x0 > x1) {
+ tmp = x0;
+ x0 = x1;
+ x1 = tmp;
+
+ tmp = y0;
+ y0 = y1;
+ y1 = tmp;
+ }
+ deltax = x1 - x0;
+ deltay = Math.abs(y1 - y0);
+ error = deltax / 2 | 0;
+ y = y0;
+ ystep = y0 < y1 ? 1 : -1;
+ for (x = x0; x < x1; x++) {
+ if (steep) {
+ read(y, x);
+ } else {
+ read(x, y);
+ }
+ error = error - deltay;
+ if (error < 0) {
+ y = y + ystep;
+ error = error + deltax;
+ }
+ }
+
+ return {
+ line: line,
+ min: min,
+ max: max
+ };
+ };
+
+ /**
+ * Converts the result from getBarcodeLine into a binary representation
+ * also considering the frequency and slope of the signal for more robust results
+ * @param {Object} result {line, min, max}
+ */
+ Bresenham.toBinaryLine = function (result) {
+ var min = result.min,
+ max = result.max,
+ line = result.line,
+ slope,
+ slope2,
+ center = min + (max - min) / 2,
+ extrema = [],
+ currentDir,
+ dir,
+ threshold = (max - min) / 12,
+ rThreshold = -threshold,
+ i,
+ j;
+
+ // 1. find extrema
+ currentDir = line[0] > center ? Slope.DIR.UP : Slope.DIR.DOWN;
+ extrema.push({
+ pos: 0,
+ val: line[0]
+ });
+ for (i = 0; i < line.length - 2; i++) {
+ slope = line[i + 1] - line[i];
+ slope2 = line[i + 2] - line[i + 1];
+ if (slope + slope2 < rThreshold && line[i + 1] < center * 1.5) {
+ dir = Slope.DIR.DOWN;
+ } else if (slope + slope2 > threshold && line[i + 1] > center * 0.5) {
+ dir = Slope.DIR.UP;
+ } else {
+ dir = currentDir;
+ }
+
+ if (currentDir !== dir) {
+ extrema.push({
+ pos: i,
+ val: line[i]
+ });
+ currentDir = dir;
+ }
+ }
+ extrema.push({
+ pos: line.length,
+ val: line[line.length - 1]
+ });
+
+ for (j = extrema[0].pos; j < extrema[1].pos; j++) {
+ line[j] = line[j] > center ? 0 : 1;
+ }
+
+ // iterate over extrema and convert to binary based on avg between minmax
+ for (i = 1; i < extrema.length - 1; i++) {
+ if (extrema[i + 1].val > extrema[i].val) {
+ threshold = extrema[i].val + (extrema[i + 1].val - extrema[i].val) / 3 * 2 | 0;
+ } else {
+ threshold = extrema[i + 1].val + (extrema[i].val - extrema[i + 1].val) / 3 | 0;
+ }
+
+ for (j = extrema[i].pos; j < extrema[i + 1].pos; j++) {
+ line[j] = line[j] > threshold ? 0 : 1;
+ }
+ }
+
+ return {
+ line: line,
+ threshold: threshold
+ };
+ };
+
+ /**
+ * Used for development only
+ */
+ Bresenham.debug = {
+ printFrequency: function printFrequency(line, canvas) {
+ var i,
+ ctx = canvas.getContext("2d");
+ canvas.width = line.length;
+ canvas.height = 256;
+
+ ctx.beginPath();
+ ctx.strokeStyle = "blue";
+ for (i = 0; i < line.length; i++) {
+ ctx.moveTo(i, 255);
+ ctx.lineTo(i, 255 - line[i]);
+ }
+ ctx.stroke();
+ ctx.closePath();
+ },
+
+ printPattern: function printPattern(line, canvas) {
+ var ctx = canvas.getContext("2d"),
+ i;
+
+ canvas.width = line.length;
+ ctx.fillColor = "black";
+ for (i = 0; i < line.length; i++) {
+ if (line[i] === 1) {
+ ctx.fillRect(i, 0, 1, 100);
+ }
+ }
+ }
+ };
+
+ exports.default = Bresenham;
+
+/***/ },
+/* 61 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ exports.__esModule = true;
+
+ var _pick2 = __webpack_require__(142);
+
+ var _pick3 = _interopRequireDefault(_pick2);
+
+ var _merge2 = __webpack_require__(28);
+
+ var _merge3 = _interopRequireDefault(_merge2);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var streamRef, loadedDataHandler;
+
+ function waitForVideo(video) {
+ return new Promise(function (resolve, reject) {
+ var attempts = 10;
+
+ function checkVideo() {
+ if (attempts > 0) {
+ if (video.videoWidth > 0 && video.videoHeight > 0) {
+ if (false) {
+ console.log(video.videoWidth + "px x " + video.videoHeight + "px");
+ }
+ resolve();
+ } else {
+ window.setTimeout(checkVideo, 500);
+ }
+ } else {
+ reject('Unable to play video stream. Is webcam working?');
+ }
+ attempts--;
+ }
+ checkVideo();
+ });
+ }
+
+ /**
+ * Tries to attach the camera-stream to a given video-element
+ * and calls the callback function when the content is ready
+ * @param {Object} constraints
+ * @param {Object} video
+ */
+ function initCamera(video, constraints) {
+ return navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {
+ return new Promise(function (resolve, reject) {
+ streamRef = stream;
+ video.src = window.URL.createObjectURL(stream);
+ video.onloadedmetadata = function (e) {
+ video.play();
+ resolve();
+ };
+ });
+ }).then(waitForVideo.bind(null, video));
+ }
+
+ function deprecatedConstraints(videoConstraints) {
+ var normalized = (0, _pick3.default)(videoConstraints, ["width", "height", "facingMode", "aspectRatio", "deviceId"]);
+
+ if (typeof videoConstraints["minAspectRatio"] !== 'undefined' && videoConstraints["minAspectRatio"] > 0) {
+ normalized["aspectRatio"] = videoConstraints["minAspectRatio"];
+ console.log("WARNING: Constraint 'minAspectRatio' is deprecated; Use 'aspectRatio' instead");
+ }
+ if (typeof videoConstraints["facing"] !== 'undefined') {
+ normalized["facingMode"] = videoConstraints["facing"];
+ console.log("WARNING: Constraint 'facing' is deprecated. Use 'facingMode' instead'");
+ }
+ return normalized;
+ }
+
+ function applyCameraFacing(facing, constraints) {
+ if (typeof constraints.video.deviceId !== 'undefined' || !facing) {
+ return Promise.resolve(constraints);
+ }
+ if (typeof MediaStreamTrack !== 'undefined' && typeof MediaStreamTrack.getSources !== 'undefined') {
+ return new Promise(function (resolve, reject) {
+ MediaStreamTrack.getSources(function (sourceInfos) {
+ var videoSource = sourceInfos.filter(function (sourceInfo) {
+ return sourceInfo.kind === "video" && sourceInfo.facing === facing;
+ })[0];
+ if (videoSource) {
+ return resolve((0, _merge3.default)({}, constraints, { video: { deviceId: videoSource.id } }));
+ }
+ return resolve(constraints);
+ });
+ });
+ }
+ return Promise.resolve((0, _merge3.default)({}, constraints, { video: { facingMode: facing } }));
+ }
+
+ function pickConstraints(videoConstraints) {
+ var constraints = {
+ audio: false,
+ video: deprecatedConstraints(videoConstraints)
+ };
+ return applyCameraFacing(constraints.video.facingMode, constraints);
+ }
+
+ exports.default = {
+ request: function request(video, videoConstraints) {
+ return pickConstraints(videoConstraints).then(initCamera.bind(null, video));
+ },
+ release: function release() {
+ var tracks = streamRef && streamRef.getVideoTracks();
+ if (tracks && tracks.length) {
+ tracks[0].stop();
+ }
+ streamRef = null;
+ }
+ };
+
+/***/ },
+/* 62 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {'use strict';
+
+ exports.__esModule = true;
+
+ var _image_wrapper = __webpack_require__(18);
+
+ var _image_wrapper2 = _interopRequireDefault(_image_wrapper);
+
+ var _cv_utils = __webpack_require__(17);
+
+ var _array_helper = __webpack_require__(8);
+
+ var _array_helper2 = _interopRequireDefault(_array_helper);
+
+ var _image_debug = __webpack_require__(9);
+
+ var _image_debug2 = _interopRequireDefault(_image_debug);
+
+ var _rasterizer = __webpack_require__(63);
+
+ var _rasterizer2 = _interopRequireDefault(_rasterizer);
+
+ var _tracer = __webpack_require__(29);
+
+ var _tracer2 = _interopRequireDefault(_tracer);
+
+ var _skeletonizer2 = __webpack_require__(64);
+
+ var _skeletonizer3 = _interopRequireDefault(_skeletonizer2);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var vec2 = {
+ clone: __webpack_require__(6),
+ dot: __webpack_require__(31),
+ scale: __webpack_require__(75),
+ transformMat2: __webpack_require__(76)
+ };
+ var mat2 = {
+ copy: __webpack_require__(72),
+ create: __webpack_require__(73),
+ invert: __webpack_require__(74)
+ };
+
+ var _config,
+ _currentImageWrapper,
+ _skelImageWrapper,
+ _subImageWrapper,
+ _labelImageWrapper,
+ _patchGrid,
+ _patchLabelGrid,
+ _imageToPatchGrid,
+ _binaryImageWrapper,
+ _patchSize,
+ _canvasContainer = {
+ ctx: {
+ binary: null
+ },
+ dom: {
+ binary: null
+ }
+ },
+ _numPatches = { x: 0, y: 0 },
+ _inputImageWrapper,
+ _skeletonizer;
+
+ function initBuffers() {
+ var skeletonImageData;
+
+ if (_config.halfSample) {
+ _currentImageWrapper = new _image_wrapper2.default({
+ x: _inputImageWrapper.size.x / 2 | 0,
+ y: _inputImageWrapper.size.y / 2 | 0
+ });
+ } else {
+ _currentImageWrapper = _inputImageWrapper;
+ }
+
+ _patchSize = (0, _cv_utils.calculatePatchSize)(_config.patchSize, _currentImageWrapper.size);
+
+ _numPatches.x = _currentImageWrapper.size.x / _patchSize.x | 0;
+ _numPatches.y = _currentImageWrapper.size.y / _patchSize.y | 0;
+
+ _binaryImageWrapper = new _image_wrapper2.default(_currentImageWrapper.size, undefined, Uint8Array, false);
+
+ _labelImageWrapper = new _image_wrapper2.default(_patchSize, undefined, Array, true);
+
+ skeletonImageData = new ArrayBuffer(64 * 1024);
+ _subImageWrapper = new _image_wrapper2.default(_patchSize, new Uint8Array(skeletonImageData, 0, _patchSize.x * _patchSize.y));
+ _skelImageWrapper = new _image_wrapper2.default(_patchSize, new Uint8Array(skeletonImageData, _patchSize.x * _patchSize.y * 3, _patchSize.x * _patchSize.y), undefined, true);
+ _skeletonizer = (0, _skeletonizer3.default)(typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : global, {
+ size: _patchSize.x
+ }, skeletonImageData);
+
+ _imageToPatchGrid = new _image_wrapper2.default({
+ x: _currentImageWrapper.size.x / _subImageWrapper.size.x | 0,
+ y: _currentImageWrapper.size.y / _subImageWrapper.size.y | 0
+ }, undefined, Array, true);
+ _patchGrid = new _image_wrapper2.default(_imageToPatchGrid.size, undefined, undefined, true);
+ _patchLabelGrid = new _image_wrapper2.default(_imageToPatchGrid.size, undefined, Int32Array, true);
+ }
+
+ function initCanvas() {
+ if (_config.useWorker || typeof document === 'undefined') {
+ return;
+ }
+ _canvasContainer.dom.binary = document.createElement("canvas");
+ _canvasContainer.dom.binary.className = "binaryBuffer";
+ if (false) {
+ document.querySelector("#debug").appendChild(_canvasContainer.dom.binary);
+ }
+ _canvasContainer.ctx.binary = _canvasContainer.dom.binary.getContext("2d");
+ _canvasContainer.dom.binary.width = _binaryImageWrapper.size.x;
+ _canvasContainer.dom.binary.height = _binaryImageWrapper.size.y;
+ }
+
+ /**
+ * Creates a bounding box which encloses all the given patches
+ * @returns {Array} The minimal bounding box
+ */
+ function boxFromPatches(patches) {
+ var overAvg,
+ i,
+ j,
+ patch,
+ transMat,
+ minx = _binaryImageWrapper.size.x,
+ miny = _binaryImageWrapper.size.y,
+ maxx = -_binaryImageWrapper.size.x,
+ maxy = -_binaryImageWrapper.size.y,
+ box,
+ scale;
+
+ // draw all patches which are to be taken into consideration
+ overAvg = 0;
+ for (i = 0; i < patches.length; i++) {
+ patch = patches[i];
+ overAvg += patch.rad;
+ if (false) {
+ _image_debug2.default.drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "red" });
+ }
+ }
+
+ overAvg /= patches.length;
+ overAvg = (overAvg * 180 / Math.PI + 90) % 180 - 90;
+ if (overAvg < 0) {
+ overAvg += 180;
+ }
+
+ overAvg = (180 - overAvg) * Math.PI / 180;
+ transMat = mat2.copy(mat2.create(), [Math.cos(overAvg), Math.sin(overAvg), -Math.sin(overAvg), Math.cos(overAvg)]);
+
+ // iterate over patches and rotate by angle
+ for (i = 0; i < patches.length; i++) {
+ patch = patches[i];
+ for (j = 0; j < 4; j++) {
+ vec2.transformMat2(patch.box[j], patch.box[j], transMat);
+ }
+
+ if (false) {
+ _image_debug2.default.drawPath(patch.box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#99ff00', lineWidth: 2 });
+ }
+ }
+
+ // find bounding box
+ for (i = 0; i < patches.length; i++) {
+ patch = patches[i];
+ for (j = 0; j < 4; j++) {
+ if (patch.box[j][0] < minx) {
+ minx = patch.box[j][0];
+ }
+ if (patch.box[j][0] > maxx) {
+ maxx = patch.box[j][0];
+ }
+ if (patch.box[j][1] < miny) {
+ miny = patch.box[j][1];
+ }
+ if (patch.box[j][1] > maxy) {
+ maxy = patch.box[j][1];
+ }
+ }
+ }
+
+ box = [[minx, miny], [maxx, miny], [maxx, maxy], [minx, maxy]];
+
+ if (false) {
+ _image_debug2.default.drawPath(box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#ff0000', lineWidth: 2 });
+ }
+
+ scale = _config.halfSample ? 2 : 1;
+ // reverse rotation;
+ transMat = mat2.invert(transMat, transMat);
+ for (j = 0; j < 4; j++) {
+ vec2.transformMat2(box[j], box[j], transMat);
+ }
+
+ if (false) {
+ _image_debug2.default.drawPath(box, { x: 0, y: 1 }, _canvasContainer.ctx.binary, { color: '#ff0000', lineWidth: 2 });
+ }
+
+ for (j = 0; j < 4; j++) {
+ vec2.scale(box[j], box[j], scale);
+ }
+
+ return box;
+ }
+
+ /**
+ * Creates a binary image of the current image
+ */
+ function binarizeImage() {
+ (0, _cv_utils.otsuThreshold)(_currentImageWrapper, _binaryImageWrapper);
+ _binaryImageWrapper.zeroBorder();
+ if (_config.showCanvas) {
+ _binaryImageWrapper.show(_canvasContainer.dom.binary, 255);
+ }
+ }
+
+ /**
+ * Iterate over the entire image
+ * extract patches
+ */
+ function findPatches() {
+ var i,
+ j,
+ x,
+ y,
+ moments,
+ patchesFound = [],
+ rasterizer,
+ rasterResult,
+ patch;
+ for (i = 0; i < _numPatches.x; i++) {
+ for (j = 0; j < _numPatches.y; j++) {
+ x = _subImageWrapper.size.x * i;
+ y = _subImageWrapper.size.y * j;
+
+ // seperate parts
+ skeletonize(x, y);
+
+ // Rasterize, find individual bars
+ _skelImageWrapper.zeroBorder();
+ _array_helper2.default.init(_labelImageWrapper.data, 0);
+ rasterizer = _rasterizer2.default.create(_skelImageWrapper, _labelImageWrapper);
+ rasterResult = rasterizer.rasterize(0);
+
+ if (false) {
+ _labelImageWrapper.overlay(_canvasContainer.dom.binary, Math.floor(360 / rasterResult.count), { x: x, y: y });
+ }
+
+ // calculate moments from the skeletonized patch
+ moments = _labelImageWrapper.moments(rasterResult.count);
+
+ // extract eligible patches
+ patchesFound = patchesFound.concat(describePatch(moments, [i, j], x, y));
+ }
+ }
+
+ if (false) {
+ for (i = 0; i < patchesFound.length; i++) {
+ patch = patchesFound[i];
+ _image_debug2.default.drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "#99ff00", lineWidth: 2 });
+ }
+ }
+
+ return patchesFound;
+ }
+
+ /**
+ * Finds those connected areas which contain at least 6 patches
+ * and returns them ordered DESC by the number of contained patches
+ * @param {Number} maxLabel
+ */
+ function findBiggestConnectedAreas(maxLabel) {
+ var i,
+ sum,
+ labelHist = [],
+ topLabels = [];
+
+ for (i = 0; i < maxLabel; i++) {
+ labelHist.push(0);
+ }
+ sum = _patchLabelGrid.data.length;
+ while (sum--) {
+ if (_patchLabelGrid.data[sum] > 0) {
+ labelHist[_patchLabelGrid.data[sum] - 1]++;
+ }
+ }
+
+ labelHist = labelHist.map(function (val, idx) {
+ return {
+ val: val,
+ label: idx + 1
+ };
+ });
+
+ labelHist.sort(function (a, b) {
+ return b.val - a.val;
+ });
+
+ // extract top areas with at least 6 patches present
+ topLabels = labelHist.filter(function (el) {
+ return el.val >= 5;
+ });
+
+ return topLabels;
+ }
+
+ /**
+ *
+ */
+ function findBoxes(topLabels, maxLabel) {
+ var i,
+ j,
+ sum,
+ patches = [],
+ patch,
+ box,
+ boxes = [],
+ hsv = [0, 1, 1],
+ rgb = [0, 0, 0];
+
+ for (i = 0; i < topLabels.length; i++) {
+ sum = _patchLabelGrid.data.length;
+ patches.length = 0;
+ while (sum--) {
+ if (_patchLabelGrid.data[sum] === topLabels[i].label) {
+ patch = _imageToPatchGrid.data[sum];
+ patches.push(patch);
+ }
+ }
+ box = boxFromPatches(patches);
+ if (box) {
+ boxes.push(box);
+
+ // draw patch-labels if requested
+ if (false) {
+ for (j = 0; j < patches.length; j++) {
+ patch = patches[j];
+ hsv[0] = topLabels[i].label / (maxLabel + 1) * 360;
+ (0, _cv_utils.hsv2rgb)(hsv, rgb);
+ _image_debug2.default.drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "rgb(" + rgb.join(",") + ")", lineWidth: 2 });
+ }
+ }
+ }
+ }
+ return boxes;
+ }
+
+ /**
+ * Find similar moments (via cluster)
+ * @param {Object} moments
+ */
+ function similarMoments(moments) {
+ var clusters = (0, _cv_utils.cluster)(moments, 0.90);
+ var topCluster = (0, _cv_utils.topGeneric)(clusters, 1, function (e) {
+ return e.getPoints().length;
+ });
+ var points = [],
+ result = [];
+ if (topCluster.length === 1) {
+ points = topCluster[0].item.getPoints();
+ for (var i = 0; i < points.length; i++) {
+ result.push(points[i].point);
+ }
+ }
+ return result;
+ }
+
+ function skeletonize(x, y) {
+ _binaryImageWrapper.subImageAsCopy(_subImageWrapper, (0, _cv_utils.imageRef)(x, y));
+ _skeletonizer.skeletonize();
+
+ // Show skeleton if requested
+ if (false) {
+ _skelImageWrapper.overlay(_canvasContainer.dom.binary, 360, (0, _cv_utils.imageRef)(x, y));
+ }
+ }
+
+ /**
+ * Extracts and describes those patches which seem to contain a barcode pattern
+ * @param {Array} moments
+ * @param {Object} patchPos,
+ * @param {Number} x
+ * @param {Number} y
+ * @returns {Array} list of patches
+ */
+ function describePatch(moments, patchPos, x, y) {
+ var k,
+ avg,
+ eligibleMoments = [],
+ matchingMoments,
+ patch,
+ patchesFound = [],
+ minComponentWeight = Math.ceil(_patchSize.x / 3);
+
+ if (moments.length >= 2) {
+ // only collect moments which's area covers at least minComponentWeight pixels.
+ for (k = 0; k < moments.length; k++) {
+ if (moments[k].m00 > minComponentWeight) {
+ eligibleMoments.push(moments[k]);
+ }
+ }
+
+ // if at least 2 moments are found which have at least minComponentWeights covered
+ if (eligibleMoments.length >= 2) {
+ matchingMoments = similarMoments(eligibleMoments);
+ avg = 0;
+ // determine the similarity of the moments
+ for (k = 0; k < matchingMoments.length; k++) {
+ avg += matchingMoments[k].rad;
+ }
+
+ // Only two of the moments are allowed not to fit into the equation
+ // add the patch to the set
+ if (matchingMoments.length > 1 && matchingMoments.length >= eligibleMoments.length / 4 * 3 && matchingMoments.length > moments.length / 4) {
+ avg /= matchingMoments.length;
+ patch = {
+ index: patchPos[1] * _numPatches.x + patchPos[0],
+ pos: {
+ x: x,
+ y: y
+ },
+ box: [vec2.clone([x, y]), vec2.clone([x + _subImageWrapper.size.x, y]), vec2.clone([x + _subImageWrapper.size.x, y + _subImageWrapper.size.y]), vec2.clone([x, y + _subImageWrapper.size.y])],
+ moments: matchingMoments,
+ rad: avg,
+ vec: vec2.clone([Math.cos(avg), Math.sin(avg)])
+ };
+ patchesFound.push(patch);
+ }
+ }
+ }
+ return patchesFound;
+ }
+
+ /**
+ * finds patches which are connected and share the same orientation
+ * @param {Object} patchesFound
+ */
+ function rasterizeAngularSimilarity(patchesFound) {
+ var label = 0,
+ threshold = 0.95,
+ currIdx = 0,
+ j,
+ patch,
+ hsv = [0, 1, 1],
+ rgb = [0, 0, 0];
+
+ function notYetProcessed() {
+ var i;
+ for (i = 0; i < _patchLabelGrid.data.length; i++) {
+ if (_patchLabelGrid.data[i] === 0 && _patchGrid.data[i] === 1) {
+ return i;
+ }
+ }
+ return _patchLabelGrid.length;
+ }
+
+ function trace(currentIdx) {
+ var x,
+ y,
+ currentPatch,
+ idx,
+ dir,
+ current = {
+ x: currentIdx % _patchLabelGrid.size.x,
+ y: currentIdx / _patchLabelGrid.size.x | 0
+ },
+ similarity;
+
+ if (currentIdx < _patchLabelGrid.data.length) {
+ currentPatch = _imageToPatchGrid.data[currentIdx];
+ // assign label
+ _patchLabelGrid.data[currentIdx] = label;
+ for (dir = 0; dir < _tracer2.default.searchDirections.length; dir++) {
+ y = current.y + _tracer2.default.searchDirections[dir][0];
+ x = current.x + _tracer2.default.searchDirections[dir][1];
+ idx = y * _patchLabelGrid.size.x + x;
+
+ // continue if patch empty
+ if (_patchGrid.data[idx] === 0) {
+ _patchLabelGrid.data[idx] = Number.MAX_VALUE;
+ continue;
+ }
+
+ if (_patchLabelGrid.data[idx] === 0) {
+ similarity = Math.abs(vec2.dot(_imageToPatchGrid.data[idx].vec, currentPatch.vec));
+ if (similarity > threshold) {
+ trace(idx);
+ }
+ }
+ }
+ }
+ }
+
+ // prepare for finding the right patches
+ _array_helper2.default.init(_patchGrid.data, 0);
+ _array_helper2.default.init(_patchLabelGrid.data, 0);
+ _array_helper2.default.init(_imageToPatchGrid.data, null);
+
+ for (j = 0; j < patchesFound.length; j++) {
+ patch = patchesFound[j];
+ _imageToPatchGrid.data[patch.index] = patch;
+ _patchGrid.data[patch.index] = 1;
+ }
+
+ // rasterize the patches found to determine area
+ _patchGrid.zeroBorder();
+
+ while ((currIdx = notYetProcessed()) < _patchLabelGrid.data.length) {
+ label++;
+ trace(currIdx);
+ }
+
+ // draw patch-labels if requested
+ if (false) {
+ for (j = 0; j < _patchLabelGrid.data.length; j++) {
+ if (_patchLabelGrid.data[j] > 0 && _patchLabelGrid.data[j] <= label) {
+ patch = _imageToPatchGrid.data[j];
+ hsv[0] = _patchLabelGrid.data[j] / (label + 1) * 360;
+ (0, _cv_utils.hsv2rgb)(hsv, rgb);
+ _image_debug2.default.drawRect(patch.pos, _subImageWrapper.size, _canvasContainer.ctx.binary, { color: "rgb(" + rgb.join(",") + ")", lineWidth: 2 });
+ }
+ }
+ }
+
+ return label;
+ }
+
+ exports.default = {
+ init: function init(inputImageWrapper, config) {
+ _config = config;
+ _inputImageWrapper = inputImageWrapper;
+
+ initBuffers();
+ initCanvas();
+ },
+
+ locate: function locate() {
+ var patchesFound, topLabels, boxes;
+
+ if (_config.halfSample) {
+ (0, _cv_utils.halfSample)(_inputImageWrapper, _currentImageWrapper);
+ }
+
+ binarizeImage();
+ patchesFound = findPatches();
+ // return unless 5% or more patches are found
+ if (patchesFound.length < _numPatches.x * _numPatches.y * 0.05) {
+ return null;
+ }
+
+ // rasterrize area by comparing angular similarity;
+ var maxLabel = rasterizeAngularSimilarity(patchesFound);
+ if (maxLabel < 1) {
+ return null;
+ }
+
+ // search for area with the most patches (biggest connected area)
+ topLabels = findBiggestConnectedAreas(maxLabel);
+ if (topLabels.length === 0) {
+ return null;
+ }
+
+ boxes = findBoxes(topLabels, maxLabel);
+ return boxes;
+ },
+
+ checkImageConstraints: function checkImageConstraints(inputStream, config) {
+ var patchSize,
+ width = inputStream.getWidth(),
+ height = inputStream.getHeight(),
+ halfSample = config.halfSample ? 0.5 : 1,
+ size,
+ area;
+
+ // calculate width and height based on area
+ if (inputStream.getConfig().area) {
+ area = (0, _cv_utils.computeImageArea)(width, height, inputStream.getConfig().area);
+ inputStream.setTopRight({ x: area.sx, y: area.sy });
+ inputStream.setCanvasSize({ x: width, y: height });
+ width = area.sw;
+ height = area.sh;
+ }
+
+ size = {
+ x: Math.floor(width * halfSample),
+ y: Math.floor(height * halfSample)
+ };
+
+ patchSize = (0, _cv_utils.calculatePatchSize)(config.patchSize, size);
+ if (false) {
+ console.log("Patch-Size: " + JSON.stringify(patchSize));
+ }
+
+ inputStream.setWidth(Math.floor(Math.floor(size.x / patchSize.x) * (1 / halfSample) * patchSize.x));
+ inputStream.setHeight(Math.floor(Math.floor(size.y / patchSize.y) * (1 / halfSample) * patchSize.y));
+
+ if (inputStream.getWidth() % patchSize.x === 0 && inputStream.getHeight() % patchSize.y === 0) {
+ return true;
+ }
+
+ throw new Error("Image dimensions do not comply with the current settings: Width (" + width + " )and height (" + height + ") must a multiple of " + patchSize.x);
+ }
+ };
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 63 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ exports.__esModule = true;
+
+ var _tracer = __webpack_require__(29);
+
+ var _tracer2 = _interopRequireDefault(_tracer);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ /**
+ * http://www.codeproject.com/Tips/407172/Connected-Component-Labeling-and-Vectorization
+ */
+ var Rasterizer = {
+ createContour2D: function createContour2D() {
+ return {
+ dir: null,
+ index: null,
+ firstVertex: null,
+ insideContours: null,
+ nextpeer: null,
+ prevpeer: null
+ };
+ },
+ CONTOUR_DIR: {
+ CW_DIR: 0,
+ CCW_DIR: 1,
+ UNKNOWN_DIR: 2
+ },
+ DIR: {
+ OUTSIDE_EDGE: -32767,
+ INSIDE_EDGE: -32766
+ },
+ create: function create(imageWrapper, labelWrapper) {
+ var imageData = imageWrapper.data,
+ labelData = labelWrapper.data,
+ width = imageWrapper.size.x,
+ height = imageWrapper.size.y,
+ tracer = _tracer2.default.create(imageWrapper, labelWrapper);
+
+ return {
+ rasterize: function rasterize(depthlabel) {
+ var color,
+ bc,
+ lc,
+ labelindex,
+ cx,
+ cy,
+ colorMap = [],
+ vertex,
+ p,
+ cc,
+ sc,
+ pos,
+ connectedCount = 0,
+ i;
+
+ for (i = 0; i < 400; i++) {
+ colorMap[i] = 0;
+ }
+
+ colorMap[0] = imageData[0];
+ cc = null;
+ for (cy = 1; cy < height - 1; cy++) {
+ labelindex = 0;
+ bc = colorMap[0];
+ for (cx = 1; cx < width - 1; cx++) {
+ pos = cy * width + cx;
+ if (labelData[pos] === 0) {
+ color = imageData[pos];
+ if (color !== bc) {
+ if (labelindex === 0) {
+ lc = connectedCount + 1;
+ colorMap[lc] = color;
+ bc = color;
+ vertex = tracer.contourTracing(cy, cx, lc, color, Rasterizer.DIR.OUTSIDE_EDGE);
+ if (vertex !== null) {
+ connectedCount++;
+ labelindex = lc;
+ p = Rasterizer.createContour2D();
+ p.dir = Rasterizer.CONTOUR_DIR.CW_DIR;
+ p.index = labelindex;
+ p.firstVertex = vertex;
+ p.nextpeer = cc;
+ p.insideContours = null;
+ if (cc !== null) {
+ cc.prevpeer = p;
+ }
+ cc = p;
+ }
+ } else {
+ vertex = tracer.contourTracing(cy, cx, Rasterizer.DIR.INSIDE_EDGE, color, labelindex);
+ if (vertex !== null) {
+ p = Rasterizer.createContour2D();
+ p.firstVertex = vertex;
+ p.insideContours = null;
+ if (depthlabel === 0) {
+ p.dir = Rasterizer.CONTOUR_DIR.CCW_DIR;
+ } else {
+ p.dir = Rasterizer.CONTOUR_DIR.CW_DIR;
+ }
+ p.index = depthlabel;
+ sc = cc;
+ while (sc !== null && sc.index !== labelindex) {
+ sc = sc.nextpeer;
+ }
+ if (sc !== null) {
+ p.nextpeer = sc.insideContours;
+ if (sc.insideContours !== null) {
+ sc.insideContours.prevpeer = p;
+ }
+ sc.insideContours = p;
+ }
+ }
+ }
+ } else {
+ labelData[pos] = labelindex;
+ }
+ } else if (labelData[pos] === Rasterizer.DIR.OUTSIDE_EDGE || labelData[pos] === Rasterizer.DIR.INSIDE_EDGE) {
+ labelindex = 0;
+ if (labelData[pos] === Rasterizer.DIR.INSIDE_EDGE) {
+ bc = imageData[pos];
+ } else {
+ bc = colorMap[0];
+ }
+ } else {
+ labelindex = labelData[pos];
+ bc = colorMap[labelindex];
+ }
+ }
+ }
+ sc = cc;
+ while (sc !== null) {
+ sc.index = depthlabel;
+ sc = sc.nextpeer;
+ }
+ return {
+ cc: cc,
+ count: connectedCount
+ };
+ },
+ debug: {
+ drawContour: function drawContour(canvas, firstContour) {
+ var ctx = canvas.getContext("2d"),
+ pq = firstContour,
+ iq,
+ q,
+ p;
+
+ ctx.strokeStyle = "red";
+ ctx.fillStyle = "red";
+ ctx.lineWidth = 1;
+
+ if (pq !== null) {
+ iq = pq.insideContours;
+ } else {
+ iq = null;
+ }
+
+ while (pq !== null) {
+ if (iq !== null) {
+ q = iq;
+ iq = iq.nextpeer;
+ } else {
+ q = pq;
+ pq = pq.nextpeer;
+ if (pq !== null) {
+ iq = pq.insideContours;
+ } else {
+ iq = null;
+ }
+ }
+
+ switch (q.dir) {
+ case Rasterizer.CONTOUR_DIR.CW_DIR:
+ ctx.strokeStyle = "red";
+ break;
+ case Rasterizer.CONTOUR_DIR.CCW_DIR:
+ ctx.strokeStyle = "blue";
+ break;
+ case Rasterizer.CONTOUR_DIR.UNKNOWN_DIR:
+ ctx.strokeStyle = "green";
+ break;
+ }
- if (multiple) {
- barcodes.push(result);
- } else if (result.codeResult) {
- return result;
+ p = q.firstVertex;
+ ctx.beginPath();
+ ctx.moveTo(p.x, p.y);
+ do {
+ p = p.next;
+ ctx.lineTo(p.x, p.y);
+ } while (p !== q.firstVertex);
+ ctx.stroke();
}
}
-
- if (multiple) {
- return {
- barcodes: barcodes
- };
- }
- },
- setReaders: function setReaders(readers) {
- config.readers = readers;
- _barcodeReaders.length = 0;
- initReaders();
}
};
}
};
- module.exports = exports['default'];
+
+ exports.default = Rasterizer;
/***/ },
-/* 15 */
-/***/ function(module, exports, __webpack_require__) {
+/* 64 */
+/***/ function(module, exports) {
- 'use strict';
-
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var _commonCv_utils = __webpack_require__(5);
+ "use strict";
- var _commonCv_utils2 = _interopRequireDefault(_commonCv_utils);
+ exports.__esModule = true;
+ /* @preserve ASM BEGIN */
+ /* eslint-disable eqeqeq*/
+ function Skeletonizer(stdlib, foreign, buffer) {
+ "use asm";
- var _commonImage_wrapper = __webpack_require__(3);
+ var images = new stdlib.Uint8Array(buffer),
+ size = foreign.size | 0,
+ imul = stdlib.Math.imul;
- var _commonImage_wrapper2 = _interopRequireDefault(_commonImage_wrapper);
+ function erode(inImagePtr, outImagePtr) {
+ inImagePtr = inImagePtr | 0;
+ outImagePtr = outImagePtr | 0;
- var Bresenham = {};
+ var v = 0,
+ u = 0,
+ sum = 0,
+ yStart1 = 0,
+ yStart2 = 0,
+ xStart1 = 0,
+ xStart2 = 0,
+ offset = 0;
- var Slope = {
- DIR: {
- UP: 1,
- DOWN: -1
+ for (v = 1; (v | 0) < (size - 1 | 0); v = v + 1 | 0) {
+ offset = offset + size | 0;
+ for (u = 1; (u | 0) < (size - 1 | 0); u = u + 1 | 0) {
+ yStart1 = offset - size | 0;
+ yStart2 = offset + size | 0;
+ xStart1 = u - 1 | 0;
+ xStart2 = u + 1 | 0;
+ sum = (images[inImagePtr + yStart1 + xStart1 | 0] | 0) + (images[inImagePtr + yStart1 + xStart2 | 0] | 0) + (images[inImagePtr + offset + u | 0] | 0) + (images[inImagePtr + yStart2 + xStart1 | 0] | 0) + (images[inImagePtr + yStart2 + xStart2 | 0] | 0) | 0;
+ if ((sum | 0) == (5 | 0)) {
+ images[outImagePtr + offset + u | 0] = 1;
+ } else {
+ images[outImagePtr + offset + u | 0] = 0;
+ }
+ }
+ }
+ return;
}
- };
- /**
- * Scans a line of the given image from point p1 to p2 and returns a result object containing
- * gray-scale values (0-255) of the underlying pixels in addition to the min
- * and max values.
- * @param {Object} imageWrapper
- * @param {Object} p1 The start point {x,y}
- * @param {Object} p2 The end point {x,y}
- * @returns {line, min, max}
- */
- Bresenham.getBarcodeLine = function (imageWrapper, p1, p2) {
- var x0 = p1.x | 0,
- y0 = p1.y | 0,
- x1 = p2.x | 0,
- y1 = p2.y | 0,
- steep = Math.abs(y1 - y0) > Math.abs(x1 - x0),
- deltax,
- deltay,
- error,
- ystep,
- y,
- tmp,
- x,
- line = [],
- imageData = imageWrapper.data,
- width = imageWrapper.size.x,
- sum = 0,
- val,
- min = 255,
- max = 0;
- function read(a, b) {
- val = imageData[b * width + a];
- sum += val;
- min = val < min ? val : min;
- max = val > max ? val : max;
- line.push(val);
- }
+ function subtract(aImagePtr, bImagePtr, outImagePtr) {
+ aImagePtr = aImagePtr | 0;
+ bImagePtr = bImagePtr | 0;
+ outImagePtr = outImagePtr | 0;
- if (steep) {
- tmp = x0;
- x0 = y0;
- y0 = tmp;
+ var length = 0;
- tmp = x1;
- x1 = y1;
- y1 = tmp;
- }
- if (x0 > x1) {
- tmp = x0;
- x0 = x1;
- x1 = tmp;
+ length = imul(size, size) | 0;
- tmp = y0;
- y0 = y1;
- y1 = tmp;
- }
- deltax = x1 - x0;
- deltay = Math.abs(y1 - y0);
- error = deltax / 2 | 0;
- y = y0;
- ystep = y0 < y1 ? 1 : -1;
- for (x = x0; x < x1; x++) {
- if (steep) {
- read(y, x);
- } else {
- read(x, y);
- }
- error = error - deltay;
- if (error < 0) {
- y = y + ystep;
- error = error + deltax;
+ while ((length | 0) > 0) {
+ length = length - 1 | 0;
+ images[outImagePtr + length | 0] = (images[aImagePtr + length | 0] | 0) - (images[bImagePtr + length | 0] | 0) | 0;
}
}
- return {
- line: line,
- min: min,
- max: max
- };
- };
-
- Bresenham.toOtsuBinaryLine = function (result) {
- var line = result.line,
- image = new _commonImage_wrapper2['default']({ x: line.length - 1, y: 1 }, line),
- threshold = _commonCv_utils2['default'].determineOtsuThreshold(image, 5);
-
- line = _commonCv_utils2['default'].sharpenLine(line);
- _commonCv_utils2['default'].thresholdImage(image, threshold);
-
- return {
- line: line,
- threshold: threshold
- };
- };
+ function bitwiseOr(aImagePtr, bImagePtr, outImagePtr) {
+ aImagePtr = aImagePtr | 0;
+ bImagePtr = bImagePtr | 0;
+ outImagePtr = outImagePtr | 0;
- /**
- * Converts the result from getBarcodeLine into a binary representation
- * also considering the frequency and slope of the signal for more robust results
- * @param {Object} result {line, min, max}
- */
- Bresenham.toBinaryLine = function (result) {
- var min = result.min,
- max = result.max,
- line = result.line,
- slope,
- slope2,
- center = min + (max - min) / 2,
- extrema = [],
- currentDir,
- dir,
- threshold = (max - min) / 12,
- rThreshold = -threshold,
- i,
- j;
+ var length = 0;
- // 1. find extrema
- currentDir = line[0] > center ? Slope.DIR.UP : Slope.DIR.DOWN;
- extrema.push({
- pos: 0,
- val: line[0]
- });
- for (i = 0; i < line.length - 2; i++) {
- slope = line[i + 1] - line[i];
- slope2 = line[i + 2] - line[i + 1];
- if (slope + slope2 < rThreshold && line[i + 1] < center * 1.5) {
- dir = Slope.DIR.DOWN;
- } else if (slope + slope2 > threshold && line[i + 1] > center * 0.5) {
- dir = Slope.DIR.UP;
- } else {
- dir = currentDir;
- }
+ length = imul(size, size) | 0;
- if (currentDir !== dir) {
- extrema.push({
- pos: i,
- val: line[i]
- });
- currentDir = dir;
+ while ((length | 0) > 0) {
+ length = length - 1 | 0;
+ images[outImagePtr + length | 0] = images[aImagePtr + length | 0] | 0 | (images[bImagePtr + length | 0] | 0) | 0;
}
}
- extrema.push({
- pos: line.length,
- val: line[line.length - 1]
- });
- for (j = extrema[0].pos; j < extrema[1].pos; j++) {
- line[j] = line[j] > center ? 0 : 1;
- }
+ function countNonZero(imagePtr) {
+ imagePtr = imagePtr | 0;
- // iterate over extrema and convert to binary based on avg between minmax
- for (i = 1; i < extrema.length - 1; i++) {
- if (extrema[i + 1].val > extrema[i].val) {
- threshold = extrema[i].val + (extrema[i + 1].val - extrema[i].val) / 3 * 2 | 0;
- } else {
- threshold = extrema[i + 1].val + (extrema[i].val - extrema[i + 1].val) / 3 | 0;
- }
+ var sum = 0,
+ length = 0;
- for (j = extrema[i].pos; j < extrema[i + 1].pos; j++) {
- line[j] = line[j] > threshold ? 0 : 1;
+ length = imul(size, size) | 0;
+
+ while ((length | 0) > 0) {
+ length = length - 1 | 0;
+ sum = (sum | 0) + (images[imagePtr + length | 0] | 0) | 0;
}
+
+ return sum | 0;
}
- return {
- line: line,
- threshold: threshold
- };
- };
+ function init(imagePtr, value) {
+ imagePtr = imagePtr | 0;
+ value = value | 0;
- /**
- * Used for development only
- */
- Bresenham.debug = {
- printFrequency: function printFrequency(line, canvas) {
- var i,
- ctx = canvas.getContext("2d");
- canvas.width = line.length;
- canvas.height = 256;
+ var length = 0;
- ctx.beginPath();
- ctx.strokeStyle = "blue";
- for (i = 0; i < line.length; i++) {
- ctx.moveTo(i, 255);
- ctx.lineTo(i, 255 - line[i]);
+ length = imul(size, size) | 0;
+
+ while ((length | 0) > 0) {
+ length = length - 1 | 0;
+ images[imagePtr + length | 0] = value;
}
- ctx.stroke();
- ctx.closePath();
- },
+ }
- printPattern: function printPattern(line, canvas) {
- var ctx = canvas.getContext("2d"),
- i;
+ function dilate(inImagePtr, outImagePtr) {
+ inImagePtr = inImagePtr | 0;
+ outImagePtr = outImagePtr | 0;
- canvas.width = line.length;
- ctx.fillColor = "black";
- for (i = 0; i < line.length; i++) {
- if (line[i] === 1) {
- ctx.fillRect(i, 0, 1, 100);
+ var v = 0,
+ u = 0,
+ sum = 0,
+ yStart1 = 0,
+ yStart2 = 0,
+ xStart1 = 0,
+ xStart2 = 0,
+ offset = 0;
+
+ for (v = 1; (v | 0) < (size - 1 | 0); v = v + 1 | 0) {
+ offset = offset + size | 0;
+ for (u = 1; (u | 0) < (size - 1 | 0); u = u + 1 | 0) {
+ yStart1 = offset - size | 0;
+ yStart2 = offset + size | 0;
+ xStart1 = u - 1 | 0;
+ xStart2 = u + 1 | 0;
+ sum = (images[inImagePtr + yStart1 + xStart1 | 0] | 0) + (images[inImagePtr + yStart1 + xStart2 | 0] | 0) + (images[inImagePtr + offset + u | 0] | 0) + (images[inImagePtr + yStart2 + xStart1 | 0] | 0) + (images[inImagePtr + yStart2 + xStart2 | 0] | 0) | 0;
+ if ((sum | 0) > (0 | 0)) {
+ images[outImagePtr + offset + u | 0] = 1;
+ } else {
+ images[outImagePtr + offset + u | 0] = 0;
+ }
}
}
+ return;
}
- };
- exports['default'] = Bresenham;
- module.exports = exports['default'];
-
-/***/ },
-/* 16 */
-/***/ function(module, exports, __webpack_require__) {
-
- "use strict";
+ function memcpy(srcImagePtr, dstImagePtr) {
+ srcImagePtr = srcImagePtr | 0;
+ dstImagePtr = dstImagePtr | 0;
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
+ var length = 0;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ length = imul(size, size) | 0;
- var _barcode_reader = __webpack_require__(17);
+ while ((length | 0) > 0) {
+ length = length - 1 | 0;
+ images[dstImagePtr + length | 0] = images[srcImagePtr + length | 0] | 0;
+ }
+ }
- var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
+ function zeroBorder(imagePtr) {
+ imagePtr = imagePtr | 0;
- function Code128Reader() {
- _barcode_reader2["default"].call(this);
- }
+ var x = 0,
+ y = 0;
- var properties = {
- CODE_SHIFT: { value: 98 },
- CODE_C: { value: 99 },
- CODE_B: { value: 100 },
- CODE_A: { value: 101 },
- START_CODE_A: { value: 103 },
- START_CODE_B: { value: 104 },
- START_CODE_C: { value: 105 },
- STOP_CODE: { value: 106 },
- MODULO: { value: 11 },
- CODE_PATTERN: { value: [[2, 1, 2, 2, 2, 2], [2, 2, 2, 1, 2, 2], [2, 2, 2, 2, 2, 1], [1, 2, 1, 2, 2, 3], [1, 2, 1, 3, 2, 2], [1, 3, 1, 2, 2, 2], [1, 2, 2, 2, 1, 3], [1, 2, 2, 3, 1, 2], [1, 3, 2, 2, 1, 2], [2, 2, 1, 2, 1, 3], [2, 2, 1, 3, 1, 2], [2, 3, 1, 2, 1, 2], [1, 1, 2, 2, 3, 2], [1, 2, 2, 1, 3, 2], [1, 2, 2, 2, 3, 1], [1, 1, 3, 2, 2, 2], [1, 2, 3, 1, 2, 2], [1, 2, 3, 2, 2, 1], [2, 2, 3, 2, 1, 1], [2, 2, 1, 1, 3, 2], [2, 2, 1, 2, 3, 1], [2, 1, 3, 2, 1, 2], [2, 2, 3, 1, 1, 2], [3, 1, 2, 1, 3, 1], [3, 1, 1, 2, 2, 2], [3, 2, 1, 1, 2, 2], [3, 2, 1, 2, 2, 1], [3, 1, 2, 2, 1, 2], [3, 2, 2, 1, 1, 2], [3, 2, 2, 2, 1, 1], [2, 1, 2, 1, 2, 3], [2, 1, 2, 3, 2, 1], [2, 3, 2, 1, 2, 1], [1, 1, 1, 3, 2, 3], [1, 3, 1, 1, 2, 3], [1, 3, 1, 3, 2, 1], [1, 1, 2, 3, 1, 3], [1, 3, 2, 1, 1, 3], [1, 3, 2, 3, 1, 1], [2, 1, 1, 3, 1, 3], [2, 3, 1, 1, 1, 3], [2, 3, 1, 3, 1, 1], [1, 1, 2, 1, 3, 3], [1, 1, 2, 3, 3, 1], [1, 3, 2, 1, 3, 1], [1, 1, 3, 1, 2, 3], [1, 1, 3, 3, 2, 1], [1, 3, 3, 1, 2, 1], [3, 1, 3, 1, 2, 1], [2, 1, 1, 3, 3, 1], [2, 3, 1, 1, 3, 1], [2, 1, 3, 1, 1, 3], [2, 1, 3, 3, 1, 1], [2, 1, 3, 1, 3, 1], [3, 1, 1, 1, 2, 3], [3, 1, 1, 3, 2, 1], [3, 3, 1, 1, 2, 1], [3, 1, 2, 1, 1, 3], [3, 1, 2, 3, 1, 1], [3, 3, 2, 1, 1, 1], [3, 1, 4, 1, 1, 1], [2, 2, 1, 4, 1, 1], [4, 3, 1, 1, 1, 1], [1, 1, 1, 2, 2, 4], [1, 1, 1, 4, 2, 2], [1, 2, 1, 1, 2, 4], [1, 2, 1, 4, 2, 1], [1, 4, 1, 1, 2, 2], [1, 4, 1, 2, 2, 1], [1, 1, 2, 2, 1, 4], [1, 1, 2, 4, 1, 2], [1, 2, 2, 1, 1, 4], [1, 2, 2, 4, 1, 1], [1, 4, 2, 1, 1, 2], [1, 4, 2, 2, 1, 1], [2, 4, 1, 2, 1, 1], [2, 2, 1, 1, 1, 4], [4, 1, 3, 1, 1, 1], [2, 4, 1, 1, 1, 2], [1, 3, 4, 1, 1, 1], [1, 1, 1, 2, 4, 2], [1, 2, 1, 1, 4, 2], [1, 2, 1, 2, 4, 1], [1, 1, 4, 2, 1, 2], [1, 2, 4, 1, 1, 2], [1, 2, 4, 2, 1, 1], [4, 1, 1, 2, 1, 2], [4, 2, 1, 1, 1, 2], [4, 2, 1, 2, 1, 1], [2, 1, 2, 1, 4, 1], [2, 1, 4, 1, 2, 1], [4, 1, 2, 1, 2, 1], [1, 1, 1, 1, 4, 3], [1, 1, 1, 3, 4, 1], [1, 3, 1, 1, 4, 1], [1, 1, 4, 1, 1, 3], [1, 1, 4, 3, 1, 1], [4, 1, 1, 1, 1, 3], [4, 1, 1, 3, 1, 1], [1, 1, 3, 1, 4, 1], [1, 1, 4, 1, 3, 1], [3, 1, 1, 1, 4, 1], [4, 1, 1, 1, 3, 1], [2, 1, 1, 4, 1, 2], [2, 1, 1, 2, 1, 4], [2, 1, 1, 2, 3, 2], [2, 3, 3, 1, 1, 1, 2]] },
- SINGLE_CODE_ERROR: { value: 1 },
- AVG_CODE_ERROR: { value: 0.5 },
- FORMAT: { value: "code_128", writeable: false }
- };
+ for (x = 0; (x | 0) < (size - 1 | 0); x = x + 1 | 0) {
+ images[imagePtr + x | 0] = 0;
+ images[imagePtr + y | 0] = 0;
+ y = y + size - 1 | 0;
+ images[imagePtr + y | 0] = 0;
+ y = y + 1 | 0;
+ }
+ for (x = 0; (x | 0) < (size | 0); x = x + 1 | 0) {
+ images[imagePtr + y | 0] = 0;
+ y = y + 1 | 0;
+ }
+ }
- Code128Reader.prototype = Object.create(_barcode_reader2["default"].prototype, properties);
- Code128Reader.prototype.constructor = Code128Reader;
+ function skeletonize() {
+ var subImagePtr = 0,
+ erodedImagePtr = 0,
+ tempImagePtr = 0,
+ skelImagePtr = 0,
+ sum = 0,
+ done = 0;
- Code128Reader.prototype._decodeCode = function (start) {
- var counter = [0, 0, 0, 0, 0, 0],
- i,
- self = this,
- offset = start,
- isWhite = !self._row[offset],
- counterPos = 0,
- bestMatch = {
- error: Number.MAX_VALUE,
- code: -1,
- start: start,
- end: start
- },
- code,
- error,
- normalized;
+ erodedImagePtr = imul(size, size) | 0;
+ tempImagePtr = erodedImagePtr + erodedImagePtr | 0;
+ skelImagePtr = tempImagePtr + erodedImagePtr | 0;
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- if (counterPos === counter.length - 1) {
- normalized = self._normalize(counter);
- if (normalized) {
- for (code = 0; code < self.CODE_PATTERN.length; code++) {
- error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
- if (error < bestMatch.error) {
- bestMatch.code = code;
- bestMatch.error = error;
- }
- }
- bestMatch.end = i;
- return bestMatch;
- }
- } else {
- counterPos++;
- }
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
+ // init skel-image
+ init(skelImagePtr, 0);
+ zeroBorder(subImagePtr);
+
+ do {
+ erode(subImagePtr, erodedImagePtr);
+ dilate(erodedImagePtr, tempImagePtr);
+ subtract(subImagePtr, tempImagePtr, tempImagePtr);
+ bitwiseOr(skelImagePtr, tempImagePtr, skelImagePtr);
+ memcpy(erodedImagePtr, subImagePtr);
+ sum = countNonZero(subImagePtr) | 0;
+ done = (sum | 0) == 0 | 0;
+ } while (!done);
}
- return null;
- };
+ return {
+ skeletonize: skeletonize
+ };
+ }
+ /* @preserve ASM END */
+ exports.default = Skeletonizer;
+ /* eslint-enable eqeqeq*/
+
+/***/ },
+/* 65 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
- Code128Reader.prototype._findStart = function () {
- var counter = [0, 0, 0, 0, 0, 0],
- i,
- self = this,
- offset = self._nextSet(self._row),
- isWhite = false,
- counterPos = 0,
- bestMatch = {
- error: Number.MAX_VALUE,
- code: -1,
- start: 0,
- end: 0
- },
- code,
- error,
- j,
- sum,
- normalized;
+ exports.__esModule = true;
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- if (counterPos === counter.length - 1) {
- sum = 0;
- for (j = 0; j < counter.length; j++) {
- sum += counter[j];
- }
- normalized = self._normalize(counter);
- if (normalized) {
- for (code = self.START_CODE_A; code <= self.START_CODE_C; code++) {
- error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
- if (error < bestMatch.error) {
- bestMatch.code = code;
- bestMatch.error = error;
- }
- }
- if (bestMatch.error < self.AVG_CODE_ERROR) {
- bestMatch.start = i - sum;
- bestMatch.end = i;
- return bestMatch;
- }
- }
+ var _barcode_reader = __webpack_require__(5);
- for (j = 0; j < 4; j++) {
- counter[j] = counter[j + 2];
- }
- counter[4] = 0;
- counter[5] = 0;
- counterPos--;
- } else {
- counterPos++;
- }
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
- }
- return null;
+ var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function CodabarReader() {
+ _barcode_reader2.default.call(this);
+ this._counters = [];
+ }
+
+ var properties = {
+ ALPHABETH_STRING: { value: "0123456789-$:/.+ABCD" },
+ ALPHABET: { value: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 45, 36, 58, 47, 46, 43, 65, 66, 67, 68] },
+ CHARACTER_ENCODINGS: { value: [0x003, 0x006, 0x009, 0x060, 0x012, 0x042, 0x021, 0x024, 0x030, 0x048, 0x00c, 0x018, 0x045, 0x051, 0x054, 0x015, 0x01A, 0x029, 0x00B, 0x00E] },
+ START_END: { value: [0x01A, 0x029, 0x00B, 0x00E] },
+ MIN_ENCODED_CHARS: { value: 4 },
+ MAX_ACCEPTABLE: { value: 2.0 },
+ PADDING: { value: 1.5 },
+ FORMAT: { value: "codabar", writeable: false }
};
- Code128Reader.prototype._decode = function () {
+ CodabarReader.prototype = Object.create(_barcode_reader2.default.prototype, properties);
+ CodabarReader.prototype.constructor = CodabarReader;
+
+ CodabarReader.prototype._decode = function () {
var self = this,
- startInfo = self._findStart(),
- code = null,
- done = false,
result = [],
- multiplier = 0,
- checksum = 0,
- codeset,
- rawResult = [],
- decodedCodes = [],
- shiftNext = false,
- unshift,
- removeLastCharacter = true;
+ start,
+ decodedChar,
+ pattern,
+ nextStart,
+ end;
- if (startInfo === null) {
+ this._counters = self._fillCounters();
+ start = self._findStart();
+ if (!start) {
return null;
}
- code = {
- code: startInfo.code,
- start: startInfo.start,
- end: startInfo.end
- };
- decodedCodes.push(code);
- checksum = code.code;
- switch (code.code) {
- case self.START_CODE_A:
- codeset = self.CODE_A;
- break;
- case self.START_CODE_B:
- codeset = self.CODE_B;
- break;
- case self.START_CODE_C:
- codeset = self.CODE_C;
- break;
- default:
- return null;
- }
-
- while (!done) {
- unshift = shiftNext;
- shiftNext = false;
- code = self._decodeCode(code.end);
- if (code !== null) {
- if (code.code !== self.STOP_CODE) {
- removeLastCharacter = true;
- }
-
- if (code.code !== self.STOP_CODE) {
- rawResult.push(code.code);
- multiplier++;
- checksum += multiplier * code.code;
- }
- decodedCodes.push(code);
+ nextStart = start.startCounter;
- switch (codeset) {
- case self.CODE_A:
- if (code.code < 64) {
- result.push(String.fromCharCode(32 + code.code));
- } else if (code.code < 96) {
- result.push(String.fromCharCode(code.code - 64));
- } else {
- if (code.code !== self.STOP_CODE) {
- removeLastCharacter = false;
- }
- switch (code.code) {
- case self.CODE_SHIFT:
- shiftNext = true;
- codeset = self.CODE_B;
- break;
- case self.CODE_B:
- codeset = self.CODE_B;
- break;
- case self.CODE_C:
- codeset = self.CODE_C;
- break;
- case self.STOP_CODE:
- done = true;
- break;
- }
- }
- break;
- case self.CODE_B:
- if (code.code < 96) {
- result.push(String.fromCharCode(32 + code.code));
- } else {
- if (code.code !== self.STOP_CODE) {
- removeLastCharacter = false;
- }
- switch (code.code) {
- case self.CODE_SHIFT:
- shiftNext = true;
- codeset = self.CODE_A;
- break;
- case self.CODE_A:
- codeset = self.CODE_A;
- break;
- case self.CODE_C:
- codeset = self.CODE_C;
- break;
- case self.STOP_CODE:
- done = true;
- break;
- }
- }
- break;
- case self.CODE_C:
- if (code.code < 100) {
- result.push(code.code < 10 ? "0" + code.code : code.code);
- } else {
- if (code.code !== self.STOP_CODE) {
- removeLastCharacter = false;
- }
- switch (code.code) {
- case self.CODE_A:
- codeset = self.CODE_A;
- break;
- case self.CODE_B:
- codeset = self.CODE_B;
- break;
- case self.STOP_CODE:
- done = true;
- break;
- }
- }
- break;
- }
- } else {
- done = true;
+ do {
+ pattern = self._toPattern(nextStart);
+ if (pattern < 0) {
+ return null;
}
- if (unshift) {
- codeset = codeset === self.CODE_A ? self.CODE_B : self.CODE_A;
+ decodedChar = self._patternToChar(pattern);
+ if (decodedChar < 0) {
+ return null;
}
- }
-
- if (code === null) {
- return null;
- }
+ result.push(decodedChar);
+ nextStart += 8;
+ if (result.length > 1 && self._isStartEnd(pattern)) {
+ break;
+ }
+ } while (nextStart < self._counters.length);
- code.end = self._nextUnset(self._row, code.end);
- if (!self._verifyTrailingWhitespace(code)) {
+ // verify end
+ if (result.length - 2 < self.MIN_ENCODED_CHARS || !self._isStartEnd(pattern)) {
return null;
}
- checksum -= multiplier * rawResult[rawResult.length - 1];
- if (checksum % 103 !== rawResult[rawResult.length - 1]) {
+ // verify end white space
+ if (!self._verifyWhitespace(start.startCounter, nextStart - 8)) {
return null;
}
- if (!result.length) {
+ if (!self._validateResult(result, start.startCounter)) {
return null;
}
- // remove last code from result (checksum)
- if (removeLastCharacter) {
- result.splice(result.length - 1, 1);
- }
+ nextStart = nextStart > self._counters.length ? self._counters.length : nextStart;
+ end = start.start + self._sumCounters(start.startCounter, nextStart - 8);
return {
code: result.join(""),
- start: startInfo.start,
- end: code.end,
- codeset: codeset,
- startInfo: startInfo,
- decodedCodes: decodedCodes,
- endInfo: code
+ start: start.start,
+ end: end,
+ startInfo: start,
+ decodedCodes: result
};
};
- _barcode_reader2["default"].prototype._verifyTrailingWhitespace = function (endInfo) {
+ CodabarReader.prototype._verifyWhitespace = function (startCounter, endCounter) {
+ if (startCounter - 1 <= 0 || this._counters[startCounter - 1] >= this._calculatePatternLength(startCounter) / 2.0) {
+ if (endCounter + 8 >= this._counters.length || this._counters[endCounter + 7] >= this._calculatePatternLength(endCounter) / 2.0) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ CodabarReader.prototype._calculatePatternLength = function (offset) {
+ var i,
+ sum = 0;
+
+ for (i = offset; i < offset + 7; i++) {
+ sum += this._counters[i];
+ }
+
+ return sum;
+ };
+
+ CodabarReader.prototype._thresholdResultPattern = function (result, startCounter) {
var self = this,
- trailingWhitespaceEnd;
+ categorization = {
+ space: {
+ narrow: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE },
+ wide: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE }
+ },
+ bar: {
+ narrow: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE },
+ wide: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE }
+ }
+ },
+ kind,
+ cat,
+ i,
+ j,
+ pos = startCounter,
+ pattern;
- trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
- if (trailingWhitespaceEnd < self._row.length) {
- if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
- return endInfo;
+ for (i = 0; i < result.length; i++) {
+ pattern = self._charToPattern(result[i]);
+ for (j = 6; j >= 0; j--) {
+ kind = (j & 1) === 2 ? categorization.bar : categorization.space;
+ cat = (pattern & 1) === 1 ? kind.wide : kind.narrow;
+ cat.size += self._counters[pos + j];
+ cat.counts++;
+ pattern >>= 1;
}
+ pos += 8;
}
- return null;
- };
- exports["default"] = Code128Reader;
- module.exports = exports["default"];
-
-/***/ },
-/* 17 */
-/***/ function(module, exports) {
-
- 'use strict';
+ ["space", "bar"].forEach(function (key) {
+ var newkind = categorization[key];
+ newkind.wide.min = Math.floor((newkind.narrow.size / newkind.narrow.counts + newkind.wide.size / newkind.wide.counts) / 2);
+ newkind.narrow.max = Math.ceil(newkind.wide.min);
+ newkind.wide.max = Math.ceil((newkind.wide.size * self.MAX_ACCEPTABLE + self.PADDING) / newkind.wide.counts);
+ });
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- function BarcodeReader(config) {
- this._row = [];
- this.config = config || {};
- return this;
- }
+ return categorization;
+ };
- BarcodeReader.prototype._nextUnset = function (line, start) {
- var i;
+ CodabarReader.prototype._charToPattern = function (char) {
+ var self = this,
+ charCode = char.charCodeAt(0),
+ i;
- if (start === undefined) {
- start = 0;
- }
- for (i = start; i < line.length; i++) {
- if (!line[i]) {
- return i;
+ for (i = 0; i < self.ALPHABET.length; i++) {
+ if (self.ALPHABET[i] === charCode) {
+ return self.CHARACTER_ENCODINGS[i];
}
}
- return line.length;
+ return 0x0;
};
- BarcodeReader.prototype._matchPattern = function (counter, code) {
- var i,
- error = 0,
- singleError = 0,
- modulo = this.MODULO,
- maxSingleError = this.SINGLE_CODE_ERROR || 1;
+ CodabarReader.prototype._validateResult = function (result, startCounter) {
+ var self = this,
+ thresholds = self._thresholdResultPattern(result, startCounter),
+ i,
+ j,
+ kind,
+ cat,
+ size,
+ pos = startCounter,
+ pattern;
- for (i = 0; i < counter.length; i++) {
- singleError = Math.abs(code[i] - counter[i]);
- if (singleError > maxSingleError) {
- return Number.MAX_VALUE;
+ for (i = 0; i < result.length; i++) {
+ pattern = self._charToPattern(result[i]);
+ for (j = 6; j >= 0; j--) {
+ kind = (j & 1) === 0 ? thresholds.bar : thresholds.space;
+ cat = (pattern & 1) === 1 ? kind.wide : kind.narrow;
+ size = self._counters[pos + j];
+ if (size < cat.min || size > cat.max) {
+ return false;
+ }
+ pattern >>= 1;
}
- error += singleError;
+ pos += 8;
}
- return error / modulo;
+ return true;
};
- BarcodeReader.prototype._nextSet = function (line, offset) {
- var i;
+ CodabarReader.prototype._patternToChar = function (pattern) {
+ var i,
+ self = this;
- offset = offset || 0;
- for (i = offset; i < line.length; i++) {
- if (line[i]) {
- return i;
+ for (i = 0; i < self.CHARACTER_ENCODINGS.length; i++) {
+ if (self.CHARACTER_ENCODINGS[i] === pattern) {
+ return String.fromCharCode(self.ALPHABET[i]);
}
}
- return line.length;
+ return -1;
};
- BarcodeReader.prototype._normalize = function (counter, modulo) {
+ CodabarReader.prototype._computeAlternatingThreshold = function (offset, end) {
var i,
- self = this,
- sum = 0,
- ratio,
- numOnes = 0,
- normalized = [],
- norm = 0;
+ min = Number.MAX_VALUE,
+ max = 0,
+ counter;
- if (!modulo) {
- modulo = self.MODULO;
- }
- for (i = 0; i < counter.length; i++) {
- if (counter[i] === 1) {
- numOnes++;
- } else {
- sum += counter[i];
- }
- }
- ratio = sum / (modulo - numOnes);
- if (ratio > 1.0) {
- for (i = 0; i < counter.length; i++) {
- norm = counter[i] === 1 ? counter[i] : counter[i] / ratio;
- normalized.push(norm);
+ for (i = offset; i < end; i += 2) {
+ counter = this._counters[i];
+ if (counter > max) {
+ max = counter;
}
- } else {
- ratio = (sum + numOnes) / modulo;
- for (i = 0; i < counter.length; i++) {
- norm = counter[i] / ratio;
- normalized.push(norm);
+ if (counter < min) {
+ min = counter;
}
}
- return normalized;
+
+ return (min + max) / 2.0 | 0;
};
- BarcodeReader.prototype._matchTrace = function (cmpCounter, epsilon) {
- var counter = [],
+ CodabarReader.prototype._toPattern = function (offset) {
+ var numCounters = 7,
+ end = offset + numCounters,
+ barThreshold,
+ spaceThreshold,
+ bitmask = 1 << numCounters - 1,
+ pattern = 0,
i,
- self = this,
- offset = self._nextSet(self._row),
- isWhite = !self._row[offset],
- counterPos = 0,
- bestMatch = {
- error: Number.MAX_VALUE,
- code: -1,
- start: 0
- },
- error;
+ threshold;
- if (cmpCounter) {
- for (i = 0; i < cmpCounter.length; i++) {
- counter.push(0);
- }
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- if (counterPos === counter.length - 1) {
- error = self._matchPattern(counter, cmpCounter);
+ if (end > this._counters.length) {
+ return -1;
+ }
- if (error < epsilon) {
- bestMatch.start = i - offset;
- bestMatch.end = i;
- bestMatch.counter = counter;
- return bestMatch;
- } else {
- return null;
- }
- } else {
- counterPos++;
- }
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
- }
- } else {
- counter.push(0);
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- counterPos++;
- counter.push(0);
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
+ barThreshold = this._computeAlternatingThreshold(offset, end);
+ spaceThreshold = this._computeAlternatingThreshold(offset + 1, end);
+
+ for (i = 0; i < numCounters; i++) {
+ threshold = (i & 1) === 0 ? barThreshold : spaceThreshold;
+ if (this._counters[offset + i] > threshold) {
+ pattern |= bitmask;
}
+ bitmask >>= 1;
}
- // if cmpCounter was not given
- bestMatch.start = offset;
- bestMatch.end = self._row.length - 1;
- bestMatch.counter = counter;
- return bestMatch;
+ return pattern;
};
- BarcodeReader.prototype.decodePattern = function (pattern) {
- var self = this,
- result;
+ CodabarReader.prototype._isStartEnd = function (pattern) {
+ var i;
- self._row = pattern;
- result = self._decode();
- if (result === null) {
- self._row.reverse();
- result = self._decode();
- if (result) {
- result.direction = BarcodeReader.DIRECTION.REVERSE;
- result.start = self._row.length - result.start;
- result.end = self._row.length - result.end;
+ for (i = 0; i < this.START_END.length; i++) {
+ if (this.START_END[i] === pattern) {
+ return true;
}
- } else {
- result.direction = BarcodeReader.DIRECTION.FORWARD;
- }
- if (result) {
- result.format = self.FORMAT;
}
- return result;
+ return false;
};
- BarcodeReader.prototype._matchRange = function (start, end, value) {
- var i;
+ CodabarReader.prototype._sumCounters = function (start, end) {
+ var i,
+ sum = 0;
- start = start < 0 ? 0 : start;
for (i = start; i < end; i++) {
- if (this._row[i] !== value) {
- return false;
- }
+ sum += this._counters[i];
}
- return true;
+ return sum;
};
- BarcodeReader.prototype._fillCounters = function (offset, end, isWhite) {
+ CodabarReader.prototype._findStart = function () {
var self = this,
- counterPos = 0,
i,
- counters = [];
-
- isWhite = typeof isWhite !== 'undefined' ? isWhite : true;
- offset = typeof offset !== 'undefined' ? offset : self._nextUnset(self._row);
- end = end || self._row.length;
+ pattern,
+ start = self._nextUnset(self._row),
+ end;
- counters[counterPos] = 0;
- for (i = offset; i < end; i++) {
- if (self._row[i] ^ isWhite) {
- counters[counterPos]++;
- } else {
- counterPos++;
- counters[counterPos] = 1;
- isWhite = !isWhite;
+ for (i = 1; i < this._counters.length; i++) {
+ pattern = self._toPattern(i);
+ if (pattern !== -1 && self._isStartEnd(pattern)) {
+ // TODO: Look for whitespace ahead
+ start += self._sumCounters(0, i);
+ end = start + self._sumCounters(i, i + 8);
+ return {
+ start: start,
+ end: end,
+ startCounter: i,
+ endCounter: i + 8
+ };
}
}
- return counters;
- };
-
- Object.defineProperty(BarcodeReader.prototype, "FORMAT", {
- value: 'unknown',
- writeable: false
- });
-
- BarcodeReader.DIRECTION = {
- FORWARD: 1,
- REVERSE: -1
- };
-
- BarcodeReader.Exception = {
- StartNotFoundException: "Start-Info was not found!",
- CodeNotFoundException: "Code could not be found!",
- PatternNotFoundException: "Pattern could not be found!"
};
- BarcodeReader.CONFIG_KEYS = {};
-
- exports['default'] = BarcodeReader;
- module.exports = exports['default'];
+ exports.default = CodabarReader;
/***/ },
-/* 18 */
+/* 66 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ exports.__esModule = true;
- var _barcode_reader = __webpack_require__(17);
+ var _barcode_reader = __webpack_require__(5);
var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
- function EANReader(opts) {
- _barcode_reader2["default"].call(this, opts);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function Code128Reader() {
+ _barcode_reader2.default.call(this);
}
var properties = {
- CODE_L_START: { value: 0 },
- MODULO: { value: 7 },
- CODE_G_START: { value: 10 },
- START_PATTERN: { value: [1 / 3 * 7, 1 / 3 * 7, 1 / 3 * 7] },
- STOP_PATTERN: { value: [1 / 3 * 7, 1 / 3 * 7, 1 / 3 * 7] },
- MIDDLE_PATTERN: { value: [1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7, 1 / 5 * 7] },
- CODE_PATTERN: { value: [[3, 2, 1, 1], [2, 2, 2, 1], [2, 1, 2, 2], [1, 4, 1, 1], [1, 1, 3, 2], [1, 2, 3, 1], [1, 1, 1, 4], [1, 3, 1, 2], [1, 2, 1, 3], [3, 1, 1, 2], [1, 1, 2, 3], [1, 2, 2, 2], [2, 2, 1, 2], [1, 1, 4, 1], [2, 3, 1, 1], [1, 3, 2, 1], [4, 1, 1, 1], [2, 1, 3, 1], [3, 1, 2, 1], [2, 1, 1, 3]] },
- CODE_FREQUENCY: { value: [0, 11, 13, 14, 19, 25, 28, 21, 22, 26] },
- SINGLE_CODE_ERROR: { value: 0.67 },
- AVG_CODE_ERROR: { value: 0.27 },
- FORMAT: { value: "ean_13", writeable: false }
+ CODE_SHIFT: { value: 98 },
+ CODE_C: { value: 99 },
+ CODE_B: { value: 100 },
+ CODE_A: { value: 101 },
+ START_CODE_A: { value: 103 },
+ START_CODE_B: { value: 104 },
+ START_CODE_C: { value: 105 },
+ STOP_CODE: { value: 106 },
+ MODULO: { value: 11 },
+ CODE_PATTERN: { value: [[2, 1, 2, 2, 2, 2], [2, 2, 2, 1, 2, 2], [2, 2, 2, 2, 2, 1], [1, 2, 1, 2, 2, 3], [1, 2, 1, 3, 2, 2], [1, 3, 1, 2, 2, 2], [1, 2, 2, 2, 1, 3], [1, 2, 2, 3, 1, 2], [1, 3, 2, 2, 1, 2], [2, 2, 1, 2, 1, 3], [2, 2, 1, 3, 1, 2], [2, 3, 1, 2, 1, 2], [1, 1, 2, 2, 3, 2], [1, 2, 2, 1, 3, 2], [1, 2, 2, 2, 3, 1], [1, 1, 3, 2, 2, 2], [1, 2, 3, 1, 2, 2], [1, 2, 3, 2, 2, 1], [2, 2, 3, 2, 1, 1], [2, 2, 1, 1, 3, 2], [2, 2, 1, 2, 3, 1], [2, 1, 3, 2, 1, 2], [2, 2, 3, 1, 1, 2], [3, 1, 2, 1, 3, 1], [3, 1, 1, 2, 2, 2], [3, 2, 1, 1, 2, 2], [3, 2, 1, 2, 2, 1], [3, 1, 2, 2, 1, 2], [3, 2, 2, 1, 1, 2], [3, 2, 2, 2, 1, 1], [2, 1, 2, 1, 2, 3], [2, 1, 2, 3, 2, 1], [2, 3, 2, 1, 2, 1], [1, 1, 1, 3, 2, 3], [1, 3, 1, 1, 2, 3], [1, 3, 1, 3, 2, 1], [1, 1, 2, 3, 1, 3], [1, 3, 2, 1, 1, 3], [1, 3, 2, 3, 1, 1], [2, 1, 1, 3, 1, 3], [2, 3, 1, 1, 1, 3], [2, 3, 1, 3, 1, 1], [1, 1, 2, 1, 3, 3], [1, 1, 2, 3, 3, 1], [1, 3, 2, 1, 3, 1], [1, 1, 3, 1, 2, 3], [1, 1, 3, 3, 2, 1], [1, 3, 3, 1, 2, 1], [3, 1, 3, 1, 2, 1], [2, 1, 1, 3, 3, 1], [2, 3, 1, 1, 3, 1], [2, 1, 3, 1, 1, 3], [2, 1, 3, 3, 1, 1], [2, 1, 3, 1, 3, 1], [3, 1, 1, 1, 2, 3], [3, 1, 1, 3, 2, 1], [3, 3, 1, 1, 2, 1], [3, 1, 2, 1, 1, 3], [3, 1, 2, 3, 1, 1], [3, 3, 2, 1, 1, 1], [3, 1, 4, 1, 1, 1], [2, 2, 1, 4, 1, 1], [4, 3, 1, 1, 1, 1], [1, 1, 1, 2, 2, 4], [1, 1, 1, 4, 2, 2], [1, 2, 1, 1, 2, 4], [1, 2, 1, 4, 2, 1], [1, 4, 1, 1, 2, 2], [1, 4, 1, 2, 2, 1], [1, 1, 2, 2, 1, 4], [1, 1, 2, 4, 1, 2], [1, 2, 2, 1, 1, 4], [1, 2, 2, 4, 1, 1], [1, 4, 2, 1, 1, 2], [1, 4, 2, 2, 1, 1], [2, 4, 1, 2, 1, 1], [2, 2, 1, 1, 1, 4], [4, 1, 3, 1, 1, 1], [2, 4, 1, 1, 1, 2], [1, 3, 4, 1, 1, 1], [1, 1, 1, 2, 4, 2], [1, 2, 1, 1, 4, 2], [1, 2, 1, 2, 4, 1], [1, 1, 4, 2, 1, 2], [1, 2, 4, 1, 1, 2], [1, 2, 4, 2, 1, 1], [4, 1, 1, 2, 1, 2], [4, 2, 1, 1, 1, 2], [4, 2, 1, 2, 1, 1], [2, 1, 2, 1, 4, 1], [2, 1, 4, 1, 2, 1], [4, 1, 2, 1, 2, 1], [1, 1, 1, 1, 4, 3], [1, 1, 1, 3, 4, 1], [1, 3, 1, 1, 4, 1], [1, 1, 4, 1, 1, 3], [1, 1, 4, 3, 1, 1], [4, 1, 1, 1, 1, 3], [4, 1, 1, 3, 1, 1], [1, 1, 3, 1, 4, 1], [1, 1, 4, 1, 3, 1], [3, 1, 1, 1, 4, 1], [4, 1, 1, 1, 3, 1], [2, 1, 1, 4, 1, 2], [2, 1, 1, 2, 1, 4], [2, 1, 1, 2, 3, 2], [2, 3, 3, 1, 1, 1, 2]] },
+ SINGLE_CODE_ERROR: { value: 1 },
+ AVG_CODE_ERROR: { value: 0.5 },
+ FORMAT: { value: "code_128", writeable: false }
};
- EANReader.prototype = Object.create(_barcode_reader2["default"].prototype, properties);
- EANReader.prototype.constructor = EANReader;
+ Code128Reader.prototype = Object.create(_barcode_reader2.default.prototype, properties);
+ Code128Reader.prototype.constructor = Code128Reader;
- EANReader.prototype._decodeCode = function (start, coderange) {
- var counter = [0, 0, 0, 0],
+ Code128Reader.prototype._decodeCode = function (start) {
+ var counter = [0, 0, 0, 0, 0, 0],
i,
self = this,
offset = start,
@@ -4486,143 +7010,267 @@ module.exports =
error,
normalized;
- if (!coderange) {
- coderange = self.CODE_PATTERN.length;
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ if (counterPos === counter.length - 1) {
+ normalized = self._normalize(counter);
+ if (normalized) {
+ for (code = 0; code < self.CODE_PATTERN.length; code++) {
+ error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
+ if (error < bestMatch.error) {
+ bestMatch.code = code;
+ bestMatch.error = error;
+ }
+ }
+ bestMatch.end = i;
+ return bestMatch;
+ }
+ } else {
+ counterPos++;
+ }
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
+ }
}
+ return null;
+ };
+
+ Code128Reader.prototype._findStart = function () {
+ var counter = [0, 0, 0, 0, 0, 0],
+ i,
+ self = this,
+ offset = self._nextSet(self._row),
+ isWhite = false,
+ counterPos = 0,
+ bestMatch = {
+ error: Number.MAX_VALUE,
+ code: -1,
+ start: 0,
+ end: 0
+ },
+ code,
+ error,
+ j,
+ sum,
+ normalized;
for (i = offset; i < self._row.length; i++) {
if (self._row[i] ^ isWhite) {
counter[counterPos]++;
} else {
if (counterPos === counter.length - 1) {
+ sum = 0;
+ for (j = 0; j < counter.length; j++) {
+ sum += counter[j];
+ }
normalized = self._normalize(counter);
if (normalized) {
- for (code = 0; code < coderange; code++) {
+ for (code = self.START_CODE_A; code <= self.START_CODE_C; code++) {
error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
if (error < bestMatch.error) {
bestMatch.code = code;
bestMatch.error = error;
}
}
- bestMatch.end = i;
- if (bestMatch.error > self.AVG_CODE_ERROR) {
- return null;
+ if (bestMatch.error < self.AVG_CODE_ERROR) {
+ bestMatch.start = i - sum;
+ bestMatch.end = i;
+ return bestMatch;
+ }
+ }
+
+ for (j = 0; j < 4; j++) {
+ counter[j] = counter[j + 2];
+ }
+ counter[4] = 0;
+ counter[5] = 0;
+ counterPos--;
+ } else {
+ counterPos++;
+ }
+ counter[counterPos] = 1;
+ isWhite = !isWhite;
+ }
+ }
+ return null;
+ };
+
+ Code128Reader.prototype._decode = function () {
+ var self = this,
+ startInfo = self._findStart(),
+ code = null,
+ done = false,
+ result = [],
+ multiplier = 0,
+ checksum = 0,
+ codeset,
+ rawResult = [],
+ decodedCodes = [],
+ shiftNext = false,
+ unshift,
+ removeLastCharacter = true;
+
+ if (startInfo === null) {
+ return null;
+ }
+ code = {
+ code: startInfo.code,
+ start: startInfo.start,
+ end: startInfo.end
+ };
+ decodedCodes.push(code);
+ checksum = code.code;
+ switch (code.code) {
+ case self.START_CODE_A:
+ codeset = self.CODE_A;
+ break;
+ case self.START_CODE_B:
+ codeset = self.CODE_B;
+ break;
+ case self.START_CODE_C:
+ codeset = self.CODE_C;
+ break;
+ default:
+ return null;
+ }
+
+ while (!done) {
+ unshift = shiftNext;
+ shiftNext = false;
+ code = self._decodeCode(code.end);
+ if (code !== null) {
+ if (code.code !== self.STOP_CODE) {
+ removeLastCharacter = true;
+ }
+
+ if (code.code !== self.STOP_CODE) {
+ rawResult.push(code.code);
+ multiplier++;
+ checksum += multiplier * code.code;
+ }
+ decodedCodes.push(code);
+
+ switch (codeset) {
+ case self.CODE_A:
+ if (code.code < 64) {
+ result.push(String.fromCharCode(32 + code.code));
+ } else if (code.code < 96) {
+ result.push(String.fromCharCode(code.code - 64));
+ } else {
+ if (code.code !== self.STOP_CODE) {
+ removeLastCharacter = false;
+ }
+ switch (code.code) {
+ case self.CODE_SHIFT:
+ shiftNext = true;
+ codeset = self.CODE_B;
+ break;
+ case self.CODE_B:
+ codeset = self.CODE_B;
+ break;
+ case self.CODE_C:
+ codeset = self.CODE_C;
+ break;
+ case self.STOP_CODE:
+ done = true;
+ break;
+ }
+ }
+ break;
+ case self.CODE_B:
+ if (code.code < 96) {
+ result.push(String.fromCharCode(32 + code.code));
+ } else {
+ if (code.code !== self.STOP_CODE) {
+ removeLastCharacter = false;
+ }
+ switch (code.code) {
+ case self.CODE_SHIFT:
+ shiftNext = true;
+ codeset = self.CODE_A;
+ break;
+ case self.CODE_A:
+ codeset = self.CODE_A;
+ break;
+ case self.CODE_C:
+ codeset = self.CODE_C;
+ break;
+ case self.STOP_CODE:
+ done = true;
+ break;
+ }
+ }
+ break;
+ case self.CODE_C:
+ if (code.code < 100) {
+ result.push(code.code < 10 ? "0" + code.code : code.code);
+ } else {
+ if (code.code !== self.STOP_CODE) {
+ removeLastCharacter = false;
+ }
+ switch (code.code) {
+ case self.CODE_A:
+ codeset = self.CODE_A;
+ break;
+ case self.CODE_B:
+ codeset = self.CODE_B;
+ break;
+ case self.STOP_CODE:
+ done = true;
+ break;
+ }
}
- return bestMatch;
- }
- } else {
- counterPos++;
+ break;
}
- counter[counterPos] = 1;
- isWhite = !isWhite;
+ } else {
+ done = true;
+ }
+ if (unshift) {
+ codeset = codeset === self.CODE_A ? self.CODE_B : self.CODE_A;
}
- }
- return null;
- };
-
- EANReader.prototype._findPattern = function (pattern, offset, isWhite, tryHarder, epsilon) {
- var counter = [],
- self = this,
- i,
- counterPos = 0,
- bestMatch = {
- error: Number.MAX_VALUE,
- code: -1,
- start: 0,
- end: 0
- },
- error,
- j,
- sum,
- normalized;
-
- if (!offset) {
- offset = self._nextSet(self._row);
}
- if (isWhite === undefined) {
- isWhite = false;
+ if (code === null) {
+ return null;
}
- if (tryHarder === undefined) {
- tryHarder = true;
+ code.end = self._nextUnset(self._row, code.end);
+ if (!self._verifyTrailingWhitespace(code)) {
+ return null;
}
- if (epsilon === undefined) {
- epsilon = self.AVG_CODE_ERROR;
+ checksum -= multiplier * rawResult[rawResult.length - 1];
+ if (checksum % 103 !== rawResult[rawResult.length - 1]) {
+ return null;
}
- for (i = 0; i < pattern.length; i++) {
- counter[i] = 0;
+ if (!result.length) {
+ return null;
}
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- if (counterPos === counter.length - 1) {
- sum = 0;
- for (j = 0; j < counter.length; j++) {
- sum += counter[j];
- }
- normalized = self._normalize(counter);
- if (normalized) {
- error = self._matchPattern(normalized, pattern);
-
- if (error < epsilon) {
- bestMatch.error = error;
- bestMatch.start = i - sum;
- bestMatch.end = i;
- return bestMatch;
- }
- }
- if (tryHarder) {
- for (j = 0; j < counter.length - 2; j++) {
- counter[j] = counter[j + 2];
- }
- counter[counter.length - 2] = 0;
- counter[counter.length - 1] = 0;
- counterPos--;
- } else {
- return null;
- }
- } else {
- counterPos++;
- }
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
+ // remove last code from result (checksum)
+ if (removeLastCharacter) {
+ result.splice(result.length - 1, 1);
}
- return null;
- };
- EANReader.prototype._findStart = function () {
- var self = this,
- leadingWhitespaceStart,
- offset = self._nextSet(self._row),
- startInfo;
-
- while (!startInfo) {
- startInfo = self._findPattern(self.START_PATTERN, offset);
- if (!startInfo) {
- return null;
- }
- leadingWhitespaceStart = startInfo.start - (startInfo.end - startInfo.start);
- if (leadingWhitespaceStart >= 0) {
- if (self._matchRange(leadingWhitespaceStart, startInfo.start, 0)) {
- return startInfo;
- }
- }
- offset = startInfo.end;
- startInfo = null;
- }
+ return {
+ code: result.join(""),
+ start: startInfo.start,
+ end: code.end,
+ codeset: codeset,
+ startInfo: startInfo,
+ decodedCodes: decodedCodes,
+ endInfo: code
+ };
};
- EANReader.prototype._verifyTrailingWhitespace = function (endInfo) {
+ _barcode_reader2.default.prototype._verifyTrailingWhitespace = function (endInfo) {
var self = this,
trailingWhitespaceEnd;
- trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start);
+ trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
if (trailingWhitespaceEnd < self._row.length) {
if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
return endInfo;
@@ -4631,347 +7279,267 @@ module.exports =
return null;
};
- EANReader.prototype._findEnd = function (offset, isWhite) {
- var self = this,
- endInfo = self._findPattern(self.STOP_PATTERN, offset, isWhite, false);
-
- return endInfo !== null ? self._verifyTrailingWhitespace(endInfo) : null;
- };
-
- EANReader.prototype._calculateFirstDigit = function (codeFrequency) {
- var i,
- self = this;
-
- for (i = 0; i < self.CODE_FREQUENCY.length; i++) {
- if (codeFrequency === self.CODE_FREQUENCY[i]) {
- return i;
- }
- }
- return null;
- };
+ exports.default = Code128Reader;
+
+/***/ },
+/* 67 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
- EANReader.prototype._decodePayload = function (code, result, decodedCodes) {
- var i,
- self = this,
- codeFrequency = 0x0,
- firstDigit;
+ exports.__esModule = true;
- for (i = 0; i < 6; i++) {
- code = self._decodeCode(code.end);
- if (!code) {
- return null;
- }
- if (code.code >= self.CODE_G_START) {
- code.code = code.code - self.CODE_G_START;
- codeFrequency |= 1 << 5 - i;
- } else {
- codeFrequency |= 0 << 5 - i;
- }
- result.push(code.code);
- decodedCodes.push(code);
- }
+ var _code_39_reader = __webpack_require__(30);
- firstDigit = self._calculateFirstDigit(codeFrequency);
- if (firstDigit === null) {
- return null;
- }
- result.unshift(firstDigit);
+ var _code_39_reader2 = _interopRequireDefault(_code_39_reader);
- code = self._findPattern(self.MIDDLE_PATTERN, code.end, true, false);
- if (code === null) {
- return null;
- }
- decodedCodes.push(code);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- for (i = 0; i < 6; i++) {
- code = self._decodeCode(code.end, self.CODE_G_START);
- if (!code) {
- return null;
- }
- decodedCodes.push(code);
- result.push(code.code);
- }
+ function Code39VINReader() {
+ _code_39_reader2.default.call(this);
+ }
- return code;
+ var patterns = {
+ IOQ: /[IOQ]/g,
+ AZ09: /[A-Z0-9]{17}/
};
- EANReader.prototype._decode = function () {
- var startInfo,
- self = this,
- code,
- result = [],
- decodedCodes = [];
+ Code39VINReader.prototype = Object.create(_code_39_reader2.default.prototype);
+ Code39VINReader.prototype.constructor = Code39VINReader;
- startInfo = self._findStart();
- if (!startInfo) {
+ // Cribbed from:
+ // https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/client/result/VINResultParser.java
+ Code39VINReader.prototype._decode = function () {
+ var result = _code_39_reader2.default.prototype._decode.apply(this);
+ if (!result) {
return null;
}
- code = {
- code: startInfo.code,
- start: startInfo.start,
- end: startInfo.end
- };
- decodedCodes.push(code);
- code = self._decodePayload(code, result, decodedCodes);
+
+ var code = result.code;
+
if (!code) {
return null;
}
- code = self._findEnd(code.end, false);
- if (!code) {
+
+ code = code.replace(patterns.IOQ, '');
+
+ if (!code.match(patterns.AZ09)) {
+ if (false) {
+ console.log('Failed AZ09 pattern code:', code);
+ }
return null;
}
- decodedCodes.push(code);
-
- // Checksum
- if (!self._checksum(result)) {
+ if (!this._checkChecksum(code)) {
return null;
}
- return {
- code: result.join(""),
- start: startInfo.start,
- end: code.end,
- codeset: "",
- startInfo: startInfo,
- decodedCodes: decodedCodes
- };
+ result.code = code;
+ return result;
};
-
- EANReader.prototype._checksum = function (result) {
- var sum = 0,
- i;
-
- for (i = result.length - 2; i >= 0; i -= 2) {
- sum += result[i];
- }
- sum *= 3;
- for (i = result.length - 1; i >= 0; i -= 2) {
- sum += result[i];
- }
- return sum % 10 === 0;
+
+ Code39VINReader.prototype._checkChecksum = function (code) {
+ // TODO
+ return !!code;
};
- exports["default"] = EANReader;
- module.exports = exports["default"];
+ exports.default = Code39VINReader;
/***/ },
-/* 19 */
+/* 68 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
-
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ "use strict";
- var _barcode_reader = __webpack_require__(17);
+ exports.__esModule = true;
- var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
+ var _ean_reader = __webpack_require__(10);
- var _commonArray_helper = __webpack_require__(8);
+ var _ean_reader2 = _interopRequireDefault(_ean_reader);
- var _commonArray_helper2 = _interopRequireDefault(_commonArray_helper);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- function Code39Reader() {
- _barcode_reader2['default'].call(this);
+ function EAN8Reader() {
+ _ean_reader2.default.call(this);
}
var properties = {
- ALPHABETH_STRING: { value: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%" },
- ALPHABET: { value: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 45, 46, 32, 42, 36, 47, 43, 37] },
- CHARACTER_ENCODINGS: { value: [0x034, 0x121, 0x061, 0x160, 0x031, 0x130, 0x070, 0x025, 0x124, 0x064, 0x109, 0x049, 0x148, 0x019, 0x118, 0x058, 0x00D, 0x10C, 0x04C, 0x01C, 0x103, 0x043, 0x142, 0x013, 0x112, 0x052, 0x007, 0x106, 0x046, 0x016, 0x181, 0x0C1, 0x1C0, 0x091, 0x190, 0x0D0, 0x085, 0x184, 0x0C4, 0x094, 0x0A8, 0x0A2, 0x08A, 0x02A] },
- ASTERISK: { value: 0x094 },
- FORMAT: { value: "code_39", writeable: false }
+ FORMAT: { value: "ean_8", writeable: false }
};
- Code39Reader.prototype = Object.create(_barcode_reader2['default'].prototype, properties);
- Code39Reader.prototype.constructor = Code39Reader;
-
- Code39Reader.prototype._toCounters = function (start, counter) {
- var self = this,
- numCounters = counter.length,
- end = self._row.length,
- isWhite = !self._row[start],
- i,
- counterPos = 0;
+ EAN8Reader.prototype = Object.create(_ean_reader2.default.prototype, properties);
+ EAN8Reader.prototype.constructor = EAN8Reader;
- _commonArray_helper2['default'].init(counter, 0);
+ EAN8Reader.prototype._decodePayload = function (code, result, decodedCodes) {
+ var i,
+ self = this;
- for (i = start; i < end; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- counterPos++;
- if (counterPos === numCounters) {
- break;
- } else {
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
+ for (i = 0; i < 4; i++) {
+ code = self._decodeCode(code.end, self.CODE_G_START);
+ if (!code) {
+ return null;
}
+ result.push(code.code);
+ decodedCodes.push(code);
}
- return counter;
- };
-
- Code39Reader.prototype._decode = function () {
- var self = this,
- counters = [0, 0, 0, 0, 0, 0, 0, 0, 0],
- result = [],
- start = self._findStart(),
- decodedChar,
- lastStart,
- pattern,
- nextStart;
-
- if (!start) {
+ code = self._findPattern(self.MIDDLE_PATTERN, code.end, true, false);
+ if (code === null) {
return null;
}
- nextStart = self._nextSet(self._row, start.end);
+ decodedCodes.push(code);
- do {
- counters = self._toCounters(nextStart, counters);
- pattern = self._toPattern(counters);
- if (pattern < 0) {
- return null;
- }
- decodedChar = self._patternToChar(pattern);
- if (decodedChar < 0) {
+ for (i = 0; i < 4; i++) {
+ code = self._decodeCode(code.end, self.CODE_G_START);
+ if (!code) {
return null;
}
- result.push(decodedChar);
- lastStart = nextStart;
- nextStart += _commonArray_helper2['default'].sum(counters);
- nextStart = self._nextSet(self._row, nextStart);
- } while (decodedChar !== '*');
- result.pop();
-
- if (!result.length) {
- return null;
- }
-
- if (!self._verifyTrailingWhitespace(lastStart, nextStart, counters)) {
- return null;
+ decodedCodes.push(code);
+ result.push(code.code);
}
- return {
- code: result.join(""),
- start: start.start,
- end: nextStart,
- startInfo: start,
- decodedCodes: result
- };
+ return code;
};
- Code39Reader.prototype._verifyTrailingWhitespace = function (lastStart, nextStart, counters) {
- var trailingWhitespaceEnd,
- patternSize = _commonArray_helper2['default'].sum(counters);
+ exports.default = EAN8Reader;
+
+/***/ },
+/* 69 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
- trailingWhitespaceEnd = nextStart - lastStart - patternSize;
- if (trailingWhitespaceEnd * 3 >= patternSize) {
- return true;
- }
- return false;
- };
+ exports.__esModule = true;
- Code39Reader.prototype._patternToChar = function (pattern) {
- var i,
- self = this;
+ var _merge2 = __webpack_require__(28);
- for (i = 0; i < self.CHARACTER_ENCODINGS.length; i++) {
- if (self.CHARACTER_ENCODINGS[i] === pattern) {
- return String.fromCharCode(self.ALPHABET[i]);
- }
- }
- return -1;
- };
+ var _merge3 = _interopRequireDefault(_merge2);
- Code39Reader.prototype._findNextWidth = function (counters, current) {
- var i,
- minWidth = Number.MAX_VALUE;
+ var _barcode_reader = __webpack_require__(5);
- for (i = 0; i < counters.length; i++) {
- if (counters[i] < minWidth && counters[i] > current) {
- minWidth = counters[i];
- }
+ var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function I2of5Reader(opts) {
+ opts = (0, _merge3.default)(getDefaulConfig(), opts);
+ _barcode_reader2.default.call(this, opts);
+ this.barSpaceRatio = [1, 1];
+ if (opts.normalizeBarSpaceWidth) {
+ this.SINGLE_CODE_ERROR = 0.38;
+ this.AVG_CODE_ERROR = 0.09;
}
+ }
- return minWidth;
+ function getDefaulConfig() {
+ var config = {};
+
+ Object.keys(I2of5Reader.CONFIG_KEYS).forEach(function (key) {
+ config[key] = I2of5Reader.CONFIG_KEYS[key].default;
+ });
+ return config;
+ }
+
+ var N = 1,
+ W = 3,
+ properties = {
+ MODULO: { value: 10 },
+ START_PATTERN: { value: [N * 2.5, N * 2.5, N * 2.5, N * 2.5] },
+ STOP_PATTERN: { value: [N * 2, N * 2, W * 2] },
+ CODE_PATTERN: { value: [[N, N, W, W, N], [W, N, N, N, W], [N, W, N, N, W], [W, W, N, N, N], [N, N, W, N, W], [W, N, W, N, N], [N, W, W, N, N], [N, N, N, W, W], [W, N, N, W, N], [N, W, N, W, N]] },
+ SINGLE_CODE_ERROR: { value: 0.78, writable: true },
+ AVG_CODE_ERROR: { value: 0.38, writable: true },
+ MAX_CORRECTION_FACTOR: { value: 5 },
+ FORMAT: { value: "i2of5" }
};
- Code39Reader.prototype._toPattern = function (counters) {
- var numCounters = counters.length,
- maxNarrowWidth = 0,
- numWideBars = numCounters,
- wideBarWidth = 0,
- self = this,
- pattern,
- i;
+ I2of5Reader.prototype = Object.create(_barcode_reader2.default.prototype, properties);
+ I2of5Reader.prototype.constructor = I2of5Reader;
- while (numWideBars > 3) {
- maxNarrowWidth = self._findNextWidth(counters, maxNarrowWidth);
- numWideBars = 0;
- pattern = 0;
- for (i = 0; i < numCounters; i++) {
- if (counters[i] > maxNarrowWidth) {
- pattern |= 1 << numCounters - 1 - i;
- numWideBars++;
- wideBarWidth += counters[i];
- }
+ I2of5Reader.prototype._matchPattern = function (counter, code) {
+ if (this.config.normalizeBarSpaceWidth) {
+ var i,
+ counterSum = [0, 0],
+ codeSum = [0, 0],
+ correction = [0, 0],
+ correctionRatio = this.MAX_CORRECTION_FACTOR,
+ correctionRatioInverse = 1 / correctionRatio;
+
+ for (i = 0; i < counter.length; i++) {
+ counterSum[i % 2] += counter[i];
+ codeSum[i % 2] += code[i];
}
+ correction[0] = codeSum[0] / counterSum[0];
+ correction[1] = codeSum[1] / counterSum[1];
- if (numWideBars === 3) {
- for (i = 0; i < numCounters && numWideBars > 0; i++) {
- if (counters[i] > maxNarrowWidth) {
- numWideBars--;
- if (counters[i] * 2 >= wideBarWidth) {
- return -1;
- }
- }
- }
- return pattern;
+ correction[0] = Math.max(Math.min(correction[0], correctionRatio), correctionRatioInverse);
+ correction[1] = Math.max(Math.min(correction[1], correctionRatio), correctionRatioInverse);
+ this.barSpaceRatio = correction;
+ for (i = 0; i < counter.length; i++) {
+ counter[i] *= this.barSpaceRatio[i % 2];
}
}
- return -1;
+ return _barcode_reader2.default.prototype._matchPattern.call(this, counter, code);
};
- Code39Reader.prototype._findStart = function () {
- var self = this,
- offset = self._nextSet(self._row),
- patternStart = offset,
- counter = [0, 0, 0, 0, 0, 0, 0, 0, 0],
- counterPos = 0,
- isWhite = false,
+ I2of5Reader.prototype._findPattern = function (pattern, offset, isWhite, tryHarder) {
+ var counter = [],
+ self = this,
i,
+ counterPos = 0,
+ bestMatch = {
+ error: Number.MAX_VALUE,
+ code: -1,
+ start: 0,
+ end: 0
+ },
+ error,
j,
- whiteSpaceMustStart;
+ sum,
+ normalized,
+ epsilon = self.AVG_CODE_ERROR;
+
+ isWhite = isWhite || false;
+ tryHarder = tryHarder || false;
+
+ if (!offset) {
+ offset = self._nextSet(self._row);
+ }
+
+ for (i = 0; i < pattern.length; i++) {
+ counter[i] = 0;
+ }
+
+ for (i = offset; i < self._row.length; i++) {
+ if (self._row[i] ^ isWhite) {
+ counter[counterPos]++;
+ } else {
+ if (counterPos === counter.length - 1) {
+ sum = 0;
+ for (j = 0; j < counter.length; j++) {
+ sum += counter[j];
+ }
+ normalized = self._normalize(counter);
+ if (normalized) {
+ error = self._matchPattern(normalized, pattern);
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- if (counterPos === counter.length - 1) {
- // find start pattern
- if (self._toPattern(counter) === self.ASTERISK) {
- whiteSpaceMustStart = Math.floor(Math.max(0, patternStart - (i - patternStart) / 4));
- if (self._matchRange(whiteSpaceMustStart, patternStart, 0)) {
- return {
- start: patternStart,
- end: i
- };
+ if (error < epsilon) {
+ bestMatch.error = error;
+ bestMatch.start = i - sum;
+ bestMatch.end = i;
+ return bestMatch;
}
}
-
- patternStart += counter[0] + counter[1];
- for (j = 0; j < 7; j++) {
- counter[j] = counter[j + 2];
+ if (tryHarder) {
+ for (j = 0; j < counter.length - 2; j++) {
+ counter[j] = counter[j + 2];
+ }
+ counter[counter.length - 2] = 0;
+ counter[counter.length - 1] = 0;
+ counterPos--;
+ } else {
+ return null;
}
- counter[7] = 0;
- counter[8] = 0;
- counterPos--;
} else {
counterPos++;
}
@@ -4982,405 +7550,330 @@ module.exports =
return null;
};
- exports['default'] = Code39Reader;
- module.exports = exports['default'];
-
-/***/ },
-/* 20 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var _code_39_reader = __webpack_require__(19);
-
- var _code_39_reader2 = _interopRequireDefault(_code_39_reader);
-
- function Code39VINReader() {
- _code_39_reader2['default'].call(this);
- }
-
- var patterns = {
- IOQ: /[IOQ]/g,
- AZ09: /[A-Z0-9]{17}/
- };
-
- Code39VINReader.prototype = Object.create(_code_39_reader2['default'].prototype);
- Code39VINReader.prototype.constructor = Code39VINReader;
+ I2of5Reader.prototype._findStart = function () {
+ var self = this,
+ leadingWhitespaceStart,
+ offset = self._nextSet(self._row),
+ startInfo,
+ narrowBarWidth = 1;
- // Cribbed from:
- // https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/client/result/VINResultParser.java
- Code39VINReader.prototype._decode = function () {
- var result = _code_39_reader2['default'].prototype._decode.apply(this);
- if (!result) {
- return null;
+ while (!startInfo) {
+ startInfo = self._findPattern(self.START_PATTERN, offset, false, true);
+ if (!startInfo) {
+ return null;
+ }
+ narrowBarWidth = Math.floor((startInfo.end - startInfo.start) / 4);
+ leadingWhitespaceStart = startInfo.start - narrowBarWidth * 10;
+ if (leadingWhitespaceStart >= 0) {
+ if (self._matchRange(leadingWhitespaceStart, startInfo.start, 0)) {
+ return startInfo;
+ }
+ }
+ offset = startInfo.end;
+ startInfo = null;
}
+ };
- var code = result.code;
+ I2of5Reader.prototype._verifyTrailingWhitespace = function (endInfo) {
+ var self = this,
+ trailingWhitespaceEnd;
- if (!code) {
- return null;
+ trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
+ if (trailingWhitespaceEnd < self._row.length) {
+ if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
+ return endInfo;
+ }
}
+ return null;
+ };
- code = code.replace(patterns.IOQ, '');
+ I2of5Reader.prototype._findEnd = function () {
+ var self = this,
+ endInfo,
+ tmp;
- if (!code.match(patterns.AZ09)) {
- if (false) {
- console.log('Failed AZ09 pattern code:', code);
- }
- return null;
- }
+ self._row.reverse();
+ endInfo = self._findPattern(self.STOP_PATTERN);
+ self._row.reverse();
- if (!this._checkChecksum(code)) {
+ if (endInfo === null) {
return null;
}
- result.code = code;
- return result;
- };
+ // reverse numbers
+ tmp = endInfo.start;
+ endInfo.start = self._row.length - endInfo.end;
+ endInfo.end = self._row.length - tmp;
- Code39VINReader.prototype._checkChecksum = function (code) {
- // TODO
- return !!code;
+ return endInfo !== null ? self._verifyTrailingWhitespace(endInfo) : null;
};
- exports['default'] = Code39VINReader;
- module.exports = exports['default'];
-
-/***/ },
-/* 21 */
-/***/ function(module, exports, __webpack_require__) {
-
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
+ I2of5Reader.prototype._decodePair = function (counterPair) {
+ var i,
+ code,
+ codes = [],
+ self = this;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ for (i = 0; i < counterPair.length; i++) {
+ code = self._decodeCode(counterPair[i]);
+ if (!code) {
+ return null;
+ }
+ codes.push(code);
+ }
+ return codes;
+ };
- var _barcode_reader = __webpack_require__(17);
+ I2of5Reader.prototype._decodeCode = function (counter) {
+ var j,
+ self = this,
+ sum = 0,
+ normalized,
+ error,
+ epsilon = self.AVG_CODE_ERROR,
+ code,
+ bestMatch = {
+ error: Number.MAX_VALUE,
+ code: -1,
+ start: 0,
+ end: 0
+ };
- var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
+ for (j = 0; j < counter.length; j++) {
+ sum += counter[j];
+ }
+ normalized = self._normalize(counter);
+ if (normalized) {
+ for (code = 0; code < self.CODE_PATTERN.length; code++) {
+ error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
+ if (error < bestMatch.error) {
+ bestMatch.code = code;
+ bestMatch.error = error;
+ }
+ }
+ if (bestMatch.error < epsilon) {
+ return bestMatch;
+ }
+ }
+ return null;
+ };
- function CodabarReader() {
- _barcode_reader2["default"].call(this);
- this._counters = [];
- }
+ I2of5Reader.prototype._decodePayload = function (counters, result, decodedCodes) {
+ var i,
+ self = this,
+ pos = 0,
+ counterLength = counters.length,
+ counterPair = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0]],
+ codes;
- var properties = {
- ALPHABETH_STRING: { value: "0123456789-$:/.+ABCD" },
- ALPHABET: { value: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 45, 36, 58, 47, 46, 43, 65, 66, 67, 68] },
- CHARACTER_ENCODINGS: { value: [0x003, 0x006, 0x009, 0x060, 0x012, 0x042, 0x021, 0x024, 0x030, 0x048, 0x00c, 0x018, 0x045, 0x051, 0x054, 0x015, 0x01A, 0x029, 0x00B, 0x00E] },
- START_END: { value: [0x01A, 0x029, 0x00B, 0x00E] },
- MIN_ENCODED_CHARS: { value: 4 },
- MAX_ACCEPTABLE: { value: 2.0 },
- PADDING: { value: 1.5 },
- FORMAT: { value: "codabar", writeable: false }
+ while (pos < counterLength) {
+ for (i = 0; i < 5; i++) {
+ counterPair[0][i] = counters[pos] * this.barSpaceRatio[0];
+ counterPair[1][i] = counters[pos + 1] * this.barSpaceRatio[1];
+ pos += 2;
+ }
+ codes = self._decodePair(counterPair);
+ if (!codes) {
+ return null;
+ }
+ for (i = 0; i < codes.length; i++) {
+ result.push(codes[i].code + "");
+ decodedCodes.push(codes[i]);
+ }
+ }
+ return codes;
};
- CodabarReader.prototype = Object.create(_barcode_reader2["default"].prototype, properties);
- CodabarReader.prototype.constructor = CodabarReader;
+ I2of5Reader.prototype._verifyCounterLength = function (counters) {
+ return counters.length % 10 === 0;
+ };
- CodabarReader.prototype._decode = function () {
- var self = this,
+ I2of5Reader.prototype._decode = function () {
+ var startInfo,
+ endInfo,
+ self = this,
+ code,
result = [],
- start,
- decodedChar,
- pattern,
- nextStart,
- end;
+ decodedCodes = [],
+ counters;
- this._counters = self._fillCounters();
- start = self._findStart();
- if (!start) {
+ startInfo = self._findStart();
+ if (!startInfo) {
return null;
}
- nextStart = start.startCounter;
-
- do {
- pattern = self._toPattern(nextStart);
- if (pattern < 0) {
- return null;
- }
- decodedChar = self._patternToChar(pattern);
- if (decodedChar < 0) {
- return null;
- }
- result.push(decodedChar);
- nextStart += 8;
- if (result.length > 1 && self._isStartEnd(pattern)) {
- break;
- }
- } while (nextStart < self._counters.length);
-
- // verify end
- if (result.length - 2 < self.MIN_ENCODED_CHARS || !self._isStartEnd(pattern)) {
+ decodedCodes.push(startInfo);
+
+ endInfo = self._findEnd();
+ if (!endInfo) {
return null;
}
- // verify end white space
- if (!self._verifyWhitespace(start.startCounter, nextStart - 8)) {
+ counters = self._fillCounters(startInfo.end, endInfo.start, false);
+ if (!self._verifyCounterLength(counters)) {
return null;
}
-
- if (!self._validateResult(result, start.startCounter)) {
+ code = self._decodePayload(counters, result, decodedCodes);
+ if (!code) {
+ return null;
+ }
+ if (result.length % 2 !== 0 || result.length < 6) {
return null;
}
- nextStart = nextStart > self._counters.length ? self._counters.length : nextStart;
- end = start.start + self._sumCounters(start.startCounter, nextStart - 8);
-
+ decodedCodes.push(endInfo);
return {
code: result.join(""),
- start: start.start,
- end: end,
- startInfo: start,
- decodedCodes: result
+ start: startInfo.start,
+ end: endInfo.end,
+ startInfo: startInfo,
+ decodedCodes: decodedCodes
};
};
- CodabarReader.prototype._verifyWhitespace = function (startCounter, endCounter) {
- if (startCounter - 1 <= 0 || this._counters[startCounter - 1] >= this._calculatePatternLength(startCounter) / 2.0) {
- if (endCounter + 8 >= this._counters.length || this._counters[endCounter + 7] >= this._calculatePatternLength(endCounter) / 2.0) {
- return true;
- }
- }
- return false;
- };
-
- CodabarReader.prototype._calculatePatternLength = function (offset) {
- var i,
- sum = 0;
-
- for (i = offset; i < offset + 7; i++) {
- sum += this._counters[i];
+ I2of5Reader.CONFIG_KEYS = {
+ normalizeBarSpaceWidth: {
+ 'type': 'boolean',
+ 'default': false,
+ 'description': 'If true, the reader tries to normalize the' + 'width-difference between bars and spaces'
}
-
- return sum;
};
- CodabarReader.prototype._thresholdResultPattern = function (result, startCounter) {
- var self = this,
- categorization = {
- space: {
- narrow: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE },
- wide: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE }
- },
- bar: {
- narrow: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE },
- wide: { size: 0, counts: 0, min: 0, max: Number.MAX_VALUE }
- }
- },
- kind,
- cat,
- i,
- j,
- pos = startCounter,
- pattern;
-
- for (i = 0; i < result.length; i++) {
- pattern = self._charToPattern(result[i]);
- for (j = 6; j >= 0; j--) {
- kind = (j & 1) === 2 ? categorization.bar : categorization.space;
- cat = (pattern & 1) === 1 ? kind.wide : kind.narrow;
- cat.size += self._counters[pos + j];
- cat.counts++;
- pattern >>= 1;
- }
- pos += 8;
- }
+ exports.default = I2of5Reader;
+
+/***/ },
+/* 70 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
- ["space", "bar"].forEach(function (key) {
- var newkind = categorization[key];
- newkind.wide.min = Math.floor((newkind.narrow.size / newkind.narrow.counts + newkind.wide.size / newkind.wide.counts) / 2);
- newkind.narrow.max = Math.ceil(newkind.wide.min);
- newkind.wide.max = Math.ceil((newkind.wide.size * self.MAX_ACCEPTABLE + self.PADDING) / newkind.wide.counts);
- });
+ exports.__esModule = true;
- return categorization;
- };
+ var _ean_reader = __webpack_require__(10);
- CodabarReader.prototype._charToPattern = function (char) {
- var self = this,
- charCode = char.charCodeAt(0),
- i;
+ var _ean_reader2 = _interopRequireDefault(_ean_reader);
- for (i = 0; i < self.ALPHABET.length; i++) {
- if (self.ALPHABET[i] === charCode) {
- return self.CHARACTER_ENCODINGS[i];
- }
- }
- return 0x0;
- };
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- CodabarReader.prototype._validateResult = function (result, startCounter) {
- var self = this,
- thresholds = self._thresholdResultPattern(result, startCounter),
- i,
- j,
- kind,
- cat,
- size,
- pos = startCounter,
- pattern;
+ function UPCEReader() {
+ _ean_reader2.default.call(this);
+ }
- for (i = 0; i < result.length; i++) {
- pattern = self._charToPattern(result[i]);
- for (j = 6; j >= 0; j--) {
- kind = (j & 1) === 0 ? thresholds.bar : thresholds.space;
- cat = (pattern & 1) === 1 ? kind.wide : kind.narrow;
- size = self._counters[pos + j];
- if (size < cat.min || size > cat.max) {
- return false;
- }
- pattern >>= 1;
- }
- pos += 8;
- }
- return true;
+ var properties = {
+ CODE_FREQUENCY: { value: [[56, 52, 50, 49, 44, 38, 35, 42, 41, 37], [7, 11, 13, 14, 19, 25, 28, 21, 22, 26]] },
+ STOP_PATTERN: { value: [1 / 6 * 7, 1 / 6 * 7, 1 / 6 * 7, 1 / 6 * 7, 1 / 6 * 7, 1 / 6 * 7] },
+ FORMAT: { value: "upc_e", writeable: false }
};
- CodabarReader.prototype._patternToChar = function (pattern) {
- var i,
- self = this;
-
- for (i = 0; i < self.CHARACTER_ENCODINGS.length; i++) {
- if (self.CHARACTER_ENCODINGS[i] === pattern) {
- return String.fromCharCode(self.ALPHABET[i]);
- }
- }
- return -1;
- };
+ UPCEReader.prototype = Object.create(_ean_reader2.default.prototype, properties);
+ UPCEReader.prototype.constructor = UPCEReader;
- CodabarReader.prototype._computeAlternatingThreshold = function (offset, end) {
+ UPCEReader.prototype._decodePayload = function (code, result, decodedCodes) {
var i,
- min = Number.MAX_VALUE,
- max = 0,
- counter;
+ self = this,
+ codeFrequency = 0x0;
- for (i = offset; i < end; i += 2) {
- counter = this._counters[i];
- if (counter > max) {
- max = counter;
+ for (i = 0; i < 6; i++) {
+ code = self._decodeCode(code.end);
+ if (!code) {
+ return null;
}
- if (counter < min) {
- min = counter;
+ if (code.code >= self.CODE_G_START) {
+ code.code = code.code - self.CODE_G_START;
+ codeFrequency |= 1 << 5 - i;
}
+ result.push(code.code);
+ decodedCodes.push(code);
+ }
+ if (!self._determineParity(codeFrequency, result)) {
+ return null;
}
- return (min + max) / 2.0 | 0;
+ return code;
};
- CodabarReader.prototype._toPattern = function (offset) {
- var numCounters = 7,
- end = offset + numCounters,
- barThreshold,
- spaceThreshold,
- bitmask = 1 << numCounters - 1,
- pattern = 0,
- i,
- threshold;
-
- if (end > this._counters.length) {
- return -1;
- }
-
- barThreshold = this._computeAlternatingThreshold(offset, end);
- spaceThreshold = this._computeAlternatingThreshold(offset + 1, end);
+ UPCEReader.prototype._determineParity = function (codeFrequency, result) {
+ var i, nrSystem;
- for (i = 0; i < numCounters; i++) {
- threshold = (i & 1) === 0 ? barThreshold : spaceThreshold;
- if (this._counters[offset + i] > threshold) {
- pattern |= bitmask;
+ for (nrSystem = 0; nrSystem < this.CODE_FREQUENCY.length; nrSystem++) {
+ for (i = 0; i < this.CODE_FREQUENCY[nrSystem].length; i++) {
+ if (codeFrequency === this.CODE_FREQUENCY[nrSystem][i]) {
+ result.unshift(nrSystem);
+ result.push(i);
+ return true;
+ }
}
- bitmask >>= 1;
}
-
- return pattern;
+ return false;
};
- CodabarReader.prototype._isStartEnd = function (pattern) {
- var i;
+ UPCEReader.prototype._convertToUPCA = function (result) {
+ var upca = [result[0]],
+ lastDigit = result[result.length - 2];
- for (i = 0; i < this.START_END.length; i++) {
- if (this.START_END[i] === pattern) {
- return true;
- }
+ if (lastDigit <= 2) {
+ upca = upca.concat(result.slice(1, 3)).concat([lastDigit, 0, 0, 0, 0]).concat(result.slice(3, 6));
+ } else if (lastDigit === 3) {
+ upca = upca.concat(result.slice(1, 4)).concat([0, 0, 0, 0, 0]).concat(result.slice(4, 6));
+ } else if (lastDigit === 4) {
+ upca = upca.concat(result.slice(1, 5)).concat([0, 0, 0, 0, 0, result[5]]);
+ } else {
+ upca = upca.concat(result.slice(1, 6)).concat([0, 0, 0, 0, lastDigit]);
}
- return false;
+
+ upca.push(result[result.length - 1]);
+ return upca;
};
- CodabarReader.prototype._sumCounters = function (start, end) {
- var i,
- sum = 0;
+ UPCEReader.prototype._checksum = function (result) {
+ return _ean_reader2.default.prototype._checksum.call(this, this._convertToUPCA(result));
+ };
- for (i = start; i < end; i++) {
- sum += this._counters[i];
- }
- return sum;
+ UPCEReader.prototype._findEnd = function (offset, isWhite) {
+ isWhite = true;
+ return _ean_reader2.default.prototype._findEnd.call(this, offset, isWhite);
};
- CodabarReader.prototype._findStart = function () {
+ UPCEReader.prototype._verifyTrailingWhitespace = function (endInfo) {
var self = this,
- i,
- pattern,
- start = self._nextUnset(self._row),
- end;
-
- for (i = 1; i < this._counters.length; i++) {
- pattern = self._toPattern(i);
- if (pattern !== -1 && self._isStartEnd(pattern)) {
- // TODO: Look for whitespace ahead
- start += self._sumCounters(0, i);
- end = start + self._sumCounters(i, i + 8);
- return {
- start: start,
- end: end,
- startCounter: i,
- endCounter: i + 8
- };
+ trailingWhitespaceEnd;
+
+ trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
+ if (trailingWhitespaceEnd < self._row.length) {
+ if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
+ return endInfo;
}
}
};
- exports["default"] = CodabarReader;
- module.exports = exports["default"];
+ exports.default = UPCEReader;
/***/ },
-/* 22 */
+/* 71 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ exports.__esModule = true;
- var _ean_reader = __webpack_require__(18);
+ var _ean_reader = __webpack_require__(10);
var _ean_reader2 = _interopRequireDefault(_ean_reader);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
function UPCReader() {
- _ean_reader2["default"].call(this);
+ _ean_reader2.default.call(this);
}
var properties = {
FORMAT: { value: "upc_a", writeable: false }
};
- UPCReader.prototype = Object.create(_ean_reader2["default"].prototype, properties);
+ UPCReader.prototype = Object.create(_ean_reader2.default.prototype, properties);
UPCReader.prototype.constructor = UPCReader;
UPCReader.prototype._decode = function () {
- var result = _ean_reader2["default"].prototype._decode.call(this);
+ var result = _ean_reader2.default.prototype._decode.call(this);
if (result && result.code && result.code.length === 13 && result.code.charAt(0) === "0") {
result.code = result.code.substring(1);
@@ -5389,2492 +7882,4548 @@ module.exports =
return null;
};
- exports["default"] = UPCReader;
- module.exports = exports["default"];
+ exports.default = UPCReader;
/***/ },
-/* 23 */
+/* 72 */
/***/ function(module, exports, __webpack_require__) {
- "use strict";
+ module.e = copy
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
+ /**
+ * Copy the values from one mat2 to another
+ *
+ * @alias mat2.copy
+ * @param {mat2} out the receiving matrix
+ * @param {mat2} a the source matrix
+ * @returns {mat2} out
+ */
+ function copy(out, a) {
+ out[0] = a[0]
+ out[1] = a[1]
+ out[2] = a[2]
+ out[3] = a[3]
+ return out
+ }
+
+
+/***/ },
+/* 73 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = create
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ /**
+ * Creates a new identity mat2
+ *
+ * @alias mat2.create
+ * @returns {mat2} a new 2x2 matrix
+ */
+ function create() {
+ var out = new Float32Array(4)
+ out[0] = 1
+ out[1] = 0
+ out[2] = 0
+ out[3] = 1
+ return out
+ }
+
+
+/***/ },
+/* 74 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = invert
- var _ean_reader = __webpack_require__(18);
+ /**
+ * Inverts a mat2
+ *
+ * @alias mat2.invert
+ * @param {mat2} out the receiving matrix
+ * @param {mat2} a the source matrix
+ * @returns {mat2} out
+ */
+ function invert(out, a) {
+ var a0 = a[0]
+ var a1 = a[1]
+ var a2 = a[2]
+ var a3 = a[3]
+ var det = a0 * a3 - a2 * a1
+
+ if (!det) return null
+ det = 1.0 / det
+
+ out[0] = a3 * det
+ out[1] = -a1 * det
+ out[2] = -a2 * det
+ out[3] = a0 * det
+
+ return out
+ }
+
+
+/***/ },
+/* 75 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = scale
- var _ean_reader2 = _interopRequireDefault(_ean_reader);
+ /**
+ * Scales a vec2 by a scalar number
+ *
+ * @param {vec2} out the receiving vector
+ * @param {vec2} a the vector to scale
+ * @param {Number} b amount to scale the vector by
+ * @returns {vec2} out
+ */
+ function scale(out, a, b) {
+ out[0] = a[0] * b
+ out[1] = a[1] * b
+ return out
+ }
+
+/***/ },
+/* 76 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = transformMat2
- function EAN8Reader() {
- _ean_reader2["default"].call(this);
+ /**
+ * Transforms the vec2 with a mat2
+ *
+ * @param {vec2} out the receiving vector
+ * @param {vec2} a the vector to transform
+ * @param {mat2} m matrix to transform with
+ * @returns {vec2} out
+ */
+ function transformMat2(out, a, m) {
+ var x = a[0],
+ y = a[1]
+ out[0] = m[0] * x + m[2] * y
+ out[1] = m[1] * x + m[3] * y
+ return out
}
+
+/***/ },
+/* 77 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = clone;
- var properties = {
- FORMAT: { value: "ean_8", writeable: false }
- };
+ /**
+ * Creates a new vec3 initialized with values from an existing vector
+ *
+ * @param {vec3} a vector to clone
+ * @returns {vec3} a new 3D vector
+ */
+ function clone(a) {
+ var out = new Float32Array(3)
+ out[0] = a[0]
+ out[1] = a[1]
+ out[2] = a[2]
+ return out
+ }
+
+/***/ },
+/* 78 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var nativeCreate = __webpack_require__(14);
- EAN8Reader.prototype = Object.create(_ean_reader2["default"].prototype, properties);
- EAN8Reader.prototype.constructor = EAN8Reader;
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- EAN8Reader.prototype._decodePayload = function (code, result, decodedCodes) {
- var i,
- self = this;
+ /**
+ * Creates an hash object.
+ *
+ * @private
+ * @constructor
+ * @returns {Object} Returns the new hash object.
+ */
+ function Hash() {}
- for (i = 0; i < 4; i++) {
- code = self._decodeCode(code.end, self.CODE_G_START);
- if (!code) {
- return null;
- }
- result.push(code.code);
- decodedCodes.push(code);
- }
+ // Avoid inheriting from `Object.prototype` when possible.
+ Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
- code = self._findPattern(self.MIDDLE_PATTERN, code.end, true, false);
- if (code === null) {
- return null;
- }
- decodedCodes.push(code);
+ module.e = Hash;
+
+
+/***/ },
+/* 79 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var mapClear = __webpack_require__(125),
+ mapDelete = __webpack_require__(126),
+ mapGet = __webpack_require__(127),
+ mapHas = __webpack_require__(128),
+ mapSet = __webpack_require__(129);
- for (i = 0; i < 4; i++) {
- code = self._decodeCode(code.end, self.CODE_G_START);
- if (!code) {
- return null;
- }
- decodedCodes.push(code);
- result.push(code.code);
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function MapCache(values) {
+ var index = -1,
+ length = values ? values.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = values[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ // Add functions to the `MapCache`.
+ MapCache.prototype.clear = mapClear;
+ MapCache.prototype['delete'] = mapDelete;
+ MapCache.prototype.get = mapGet;
+ MapCache.prototype.has = mapHas;
+ MapCache.prototype.set = mapSet;
+
+ module.e = MapCache;
+
+
+/***/ },
+/* 80 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var root = __webpack_require__(1);
+
+ /** Built-in value references. */
+ var Reflect = root.Reflect;
+
+ module.e = Reflect;
+
+
+/***/ },
+/* 81 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getNative = __webpack_require__(12),
+ root = __webpack_require__(1);
+
+ /* Built-in method references that are verified to be native. */
+ var Set = getNative(root, 'Set');
+
+ module.e = Set;
+
+
+/***/ },
+/* 82 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var root = __webpack_require__(1);
+
+ /** Built-in value references. */
+ var Symbol = root.Symbol;
+
+ module.e = Symbol;
+
+
+/***/ },
+/* 83 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var root = __webpack_require__(1);
+
+ /** Built-in value references. */
+ var Uint8Array = root.Uint8Array;
+
+ module.e = Uint8Array;
+
+
+/***/ },
+/* 84 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getNative = __webpack_require__(12),
+ root = __webpack_require__(1);
+
+ /* Built-in method references that are verified to be native. */
+ var WeakMap = getNative(root, 'WeakMap');
+
+ module.e = WeakMap;
+
+
+/***/ },
+/* 85 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Adds the key-value `pair` to `map`.
+ *
+ * @private
+ * @param {Object} map The map to modify.
+ * @param {Array} pair The key-value pair to add.
+ * @returns {Object} Returns `map`.
+ */
+ function addMapEntry(map, pair) {
+ // Don't return `Map#set` because it doesn't return the map instance in IE 11.
+ map.set(pair[0], pair[1]);
+ return map;
+ }
+
+ module.e = addMapEntry;
+
+
+/***/ },
+/* 86 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Adds `value` to `set`.
+ *
+ * @private
+ * @param {Object} set The set to modify.
+ * @param {*} value The value to add.
+ * @returns {Object} Returns `set`.
+ */
+ function addSetEntry(set, value) {
+ set.add(value);
+ return set;
+ }
+
+ module.e = addSetEntry;
+
+
+/***/ },
+/* 87 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+ function apply(func, thisArg, args) {
+ var length = args.length;
+ switch (length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+ }
+
+ module.e = apply;
+
+
+/***/ },
+/* 88 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
+
+ module.e = arrayPush;
+
+
+/***/ },
+/* 89 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var copyObject = __webpack_require__(20),
+ keys = __webpack_require__(45);
+
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
+
+ module.e = baseAssign;
+
+
+/***/ },
+/* 90 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Stack = __webpack_require__(32),
+ arrayEach = __webpack_require__(33),
+ assignValue = __webpack_require__(35),
+ baseAssign = __webpack_require__(89),
+ baseForOwn = __webpack_require__(94),
+ cloneBuffer = __webpack_require__(104),
+ copyArray = __webpack_require__(41),
+ copySymbols = __webpack_require__(111),
+ getTag = __webpack_require__(116),
+ initCloneArray = __webpack_require__(120),
+ initCloneByTag = __webpack_require__(121),
+ initCloneObject = __webpack_require__(122),
+ isArray = __webpack_require__(4),
+ isBuffer = __webpack_require__(138),
+ isHostObject = __webpack_require__(21),
+ isObject = __webpack_require__(2);
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
+ cloneableTags[dateTag] = cloneableTags[float32Tag] =
+ cloneableTags[float64Tag] = cloneableTags[int8Tag] =
+ cloneableTags[int16Tag] = cloneableTags[int32Tag] =
+ cloneableTags[mapTag] = cloneableTags[numberTag] =
+ cloneableTags[objectTag] = cloneableTags[regexpTag] =
+ cloneableTags[setTag] = cloneableTags[stringTag] =
+ cloneableTags[symbolTag] = cloneableTags[uint8Tag] =
+ cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] =
+ cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @param {boolean} [isFull] Specify a clone including symbols.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
+ var result;
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ if (isHostObject(value)) {
+ return object ? value : {};
+ }
+ result = initCloneObject(isFunc ? {} : value);
+ if (!isDeep) {
+ result = baseAssign(result, value);
+ return isFull ? copySymbols(value, result) : result;
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, isDeep);
}
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
- return code;
- };
+ // Recursively populate clone (susceptible to call stack limits).
+ (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
+ assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
+ });
+ return (isFull && !isArr) ? copySymbols(value, result) : result;
+ }
- exports["default"] = EAN8Reader;
- module.exports = exports["default"];
+ module.e = baseClone;
+
/***/ },
-/* 24 */
+/* 91 */
/***/ function(module, exports, __webpack_require__) {
- "use strict";
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
+ var isObject = __webpack_require__(2);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ /** Built-in value references. */
+ var objectCreate = Object.create;
- var _ean_reader = __webpack_require__(18);
-
- var _ean_reader2 = _interopRequireDefault(_ean_reader);
-
- function UPCEReader() {
- _ean_reader2["default"].call(this);
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ function baseCreate(proto) {
+ return isObject(proto) ? objectCreate(proto) : {};
}
- var properties = {
- CODE_FREQUENCY: { value: [[56, 52, 50, 49, 44, 38, 35, 42, 41, 37], [7, 11, 13, 14, 19, 25, 28, 21, 22, 26]] },
- STOP_PATTERN: { value: [1 / 6 * 7, 1 / 6 * 7, 1 / 6 * 7, 1 / 6 * 7, 1 / 6 * 7, 1 / 6 * 7] },
- FORMAT: { value: "upc_e", writeable: false }
- };
+ module.e = baseCreate;
+
+
+/***/ },
+/* 92 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var arrayPush = __webpack_require__(88),
+ isArguments = __webpack_require__(24),
+ isArray = __webpack_require__(4),
+ isArrayLikeObject = __webpack_require__(26);
- UPCEReader.prototype = Object.create(_ean_reader2["default"].prototype, properties);
- UPCEReader.prototype.constructor = UPCEReader;
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, isStrict, result) {
+ result || (result = []);
- UPCEReader.prototype._decodePayload = function (code, result, decodedCodes) {
- var i,
- self = this,
- codeFrequency = 0x0;
+ var index = -1,
+ length = array.length;
- for (i = 0; i < 6; i++) {
- code = self._decodeCode(code.end);
- if (!code) {
- return null;
- }
- if (code.code >= self.CODE_G_START) {
- code.code = code.code - self.CODE_G_START;
- codeFrequency |= 1 << 5 - i;
- }
- result.push(code.code);
- decodedCodes.push(code);
- }
- if (!self._determineParity(codeFrequency, result)) {
- return null;
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && isArrayLikeObject(value) &&
+ (isStrict || isArray(value) || isArguments(value))) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
}
+ }
+ return result;
+ }
- return code;
- };
-
- UPCEReader.prototype._determineParity = function (codeFrequency, result) {
- var i, nrSystem;
-
- for (nrSystem = 0; nrSystem < this.CODE_FREQUENCY.length; nrSystem++) {
- for (i = 0; i < this.CODE_FREQUENCY[nrSystem].length; i++) {
- if (codeFrequency === this.CODE_FREQUENCY[nrSystem][i]) {
- result.unshift(nrSystem);
- result.push(i);
- return true;
- }
- }
- }
- return false;
- };
+ module.e = baseFlatten;
+
+
+/***/ },
+/* 93 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var createBaseFor = __webpack_require__(113);
- UPCEReader.prototype._convertToUPCA = function (result) {
- var upca = [result[0]],
- lastDigit = result[result.length - 2];
+ /**
+ * The base implementation of `baseForIn` and `baseForOwn` which iterates
+ * over `object` properties returned by `keysFunc` invoking `iteratee` for
+ * each property. Iteratee functions may exit iteration early by explicitly
+ * returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
- if (lastDigit <= 2) {
- upca = upca.concat(result.slice(1, 3)).concat([lastDigit, 0, 0, 0, 0]).concat(result.slice(3, 6));
- } else if (lastDigit === 3) {
- upca = upca.concat(result.slice(1, 4)).concat([0, 0, 0, 0, 0]).concat(result.slice(4, 6));
- } else if (lastDigit === 4) {
- upca = upca.concat(result.slice(1, 5)).concat([0, 0, 0, 0, 0, result[5]]);
- } else {
- upca = upca.concat(result.slice(1, 6)).concat([0, 0, 0, 0, lastDigit]);
- }
+ module.e = baseFor;
+
+
+/***/ },
+/* 94 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseFor = __webpack_require__(93),
+ keys = __webpack_require__(45);
- upca.push(result[result.length - 1]);
- return upca;
- };
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
- UPCEReader.prototype._checksum = function (result) {
- return _ean_reader2["default"].prototype._checksum.call(this, this._convertToUPCA(result));
- };
+ module.e = baseForOwn;
+
+
+/***/ },
+/* 95 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- UPCEReader.prototype._findEnd = function (offset, isWhite) {
- isWhite = true;
- return _ean_reader2["default"].prototype._findEnd.call(this, offset, isWhite);
- };
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- UPCEReader.prototype._verifyTrailingWhitespace = function (endInfo) {
- var self = this,
- trailingWhitespaceEnd;
+ /** Built-in value references. */
+ var getPrototypeOf = Object.getPrototypeOf;
- trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
- if (trailingWhitespaceEnd < self._row.length) {
- if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
- return endInfo;
- }
- }
- };
+ /**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHas(object, key) {
+ // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
+ // that are composed entirely of index properties, return `false` for
+ // `hasOwnProperty` checks of them.
+ return hasOwnProperty.call(object, key) ||
+ (typeof object == 'object' && key in object && getPrototypeOf(object) === null);
+ }
- exports["default"] = UPCEReader;
- module.exports = exports["default"];
+ module.e = baseHas;
+
/***/ },
-/* 25 */
+/* 96 */
/***/ function(module, exports, __webpack_require__) {
- 'use strict';
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeKeys = Object.keys;
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
+ /**
+ * The base implementation of `_.keys` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ return nativeKeys(Object(object));
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ module.e = baseKeys;
+
+
+/***/ },
+/* 97 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Reflect = __webpack_require__(80),
+ iteratorToArray = __webpack_require__(124);
- var _barcode_reader = __webpack_require__(17);
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- var _barcode_reader2 = _interopRequireDefault(_barcode_reader);
+ /** Built-in value references. */
+ var enumerate = Reflect ? Reflect.enumerate : undefined,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable;
- var merge = __webpack_require__(26);
+ /**
+ * The base implementation of `_.keysIn` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeysIn(object) {
+ object = object == null ? object : Object(object);
- function I2of5Reader(opts) {
- opts = merge(getDefaulConfig(), opts);
- _barcode_reader2['default'].call(this, opts);
- this.barSpaceRatio = [1, 1];
- if (opts.normalizeBarSpaceWidth) {
- this.SINGLE_CODE_ERROR = 0.38;
- this.AVG_CODE_ERROR = 0.09;
- }
+ var result = [];
+ for (var key in object) {
+ result.push(key);
+ }
+ return result;
}
- function getDefaulConfig() {
- var config = {};
-
- Object.keys(I2of5Reader.CONFIG_KEYS).forEach(function (key) {
- config[key] = I2of5Reader.CONFIG_KEYS[key]['default'];
- });
- return config;
+ // Fallback for IE < 9 with es6-shim.
+ if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
+ baseKeysIn = function(object) {
+ return iteratorToArray(enumerate(object));
+ };
}
- var N = 1,
- W = 3,
- properties = {
- MODULO: { value: 10 },
- START_PATTERN: { value: [N * 2.5, N * 2.5, N * 2.5, N * 2.5] },
- STOP_PATTERN: { value: [N * 2, N * 2, W * 2] },
- CODE_PATTERN: { value: [[N, N, W, W, N], [W, N, N, N, W], [N, W, N, N, W], [W, W, N, N, N], [N, N, W, N, W], [W, N, W, N, N], [N, W, W, N, N], [N, N, N, W, W], [W, N, N, W, N], [N, W, N, W, N]] },
- SINGLE_CODE_ERROR: { value: 0.78, writable: true },
- AVG_CODE_ERROR: { value: 0.38, writable: true },
- MAX_CORRECTION_FACTOR: { value: 5 },
- FORMAT: { value: "i2of5" }
- };
-
- I2of5Reader.prototype = Object.create(_barcode_reader2['default'].prototype, properties);
- I2of5Reader.prototype.constructor = I2of5Reader;
-
- I2of5Reader.prototype._matchPattern = function (counter, code) {
- if (this.config.normalizeBarSpaceWidth) {
- var i,
- counterSum = [0, 0],
- codeSum = [0, 0],
- correction = [0, 0],
- correctionRatio = this.MAX_CORRECTION_FACTOR,
- correctionRatioInverse = 1 / correctionRatio;
-
- for (i = 0; i < counter.length; i++) {
- counterSum[i % 2] += counter[i];
- codeSum[i % 2] += code[i];
- }
- correction[0] = codeSum[0] / counterSum[0];
- correction[1] = codeSum[1] / counterSum[1];
-
- correction[0] = Math.max(Math.min(correction[0], correctionRatio), correctionRatioInverse);
- correction[1] = Math.max(Math.min(correction[1], correctionRatio), correctionRatioInverse);
- this.barSpaceRatio = correction;
- for (i = 0; i < counter.length; i++) {
- counter[i] *= this.barSpaceRatio[i % 2];
- }
- }
- return _barcode_reader2['default'].prototype._matchPattern.call(this, counter, code);
- };
-
- I2of5Reader.prototype._findPattern = function (pattern, offset, isWhite, tryHarder) {
- var counter = [],
- self = this,
- i,
- counterPos = 0,
- bestMatch = {
- error: Number.MAX_VALUE,
- code: -1,
- start: 0,
- end: 0
- },
- error,
- j,
- sum,
- normalized,
- epsilon = self.AVG_CODE_ERROR;
+ module.e = baseKeysIn;
+
+
+/***/ },
+/* 98 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Stack = __webpack_require__(32),
+ arrayEach = __webpack_require__(33),
+ assignMergeValue = __webpack_require__(34),
+ baseMergeDeep = __webpack_require__(99),
+ isArray = __webpack_require__(4),
+ isObject = __webpack_require__(2),
+ isTypedArray = __webpack_require__(44),
+ keysIn = __webpack_require__(46);
- isWhite = isWhite || false;
- tryHarder = tryHarder || false;
+ /**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged counterparts.
+ */
+ function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ var props = (isArray(source) || isTypedArray(source))
+ ? undefined
+ : keysIn(source);
- if (!offset) {
- offset = self._nextSet(self._row);
+ arrayEach(props || source, function(srcValue, key) {
+ if (props) {
+ key = srcValue;
+ srcValue = source[key];
+ }
+ if (isObject(srcValue)) {
+ stack || (stack = new Stack);
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
}
+ else {
+ var newValue = customizer
+ ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ : undefined;
- for (i = 0; i < pattern.length; i++) {
- counter[i] = 0;
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
}
+ });
+ }
- for (i = offset; i < self._row.length; i++) {
- if (self._row[i] ^ isWhite) {
- counter[counterPos]++;
- } else {
- if (counterPos === counter.length - 1) {
- sum = 0;
- for (j = 0; j < counter.length; j++) {
- sum += counter[j];
- }
- normalized = self._normalize(counter);
- if (normalized) {
- error = self._matchPattern(normalized, pattern);
+ module.e = baseMerge;
+
+
+/***/ },
+/* 99 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assignMergeValue = __webpack_require__(34),
+ baseClone = __webpack_require__(90),
+ copyArray = __webpack_require__(41),
+ isArguments = __webpack_require__(24),
+ isArray = __webpack_require__(4),
+ isArrayLikeObject = __webpack_require__(26),
+ isFunction = __webpack_require__(16),
+ isObject = __webpack_require__(2),
+ isPlainObject = __webpack_require__(140),
+ isTypedArray = __webpack_require__(44),
+ toPlainObject = __webpack_require__(145);
- if (error < epsilon) {
- bestMatch.error = error;
- bestMatch.start = i - sum;
- bestMatch.end = i;
- return bestMatch;
- }
- }
- if (tryHarder) {
- for (j = 0; j < counter.length - 2; j++) {
- counter[j] = counter[j + 2];
- }
- counter[counter.length - 2] = 0;
- counter[counter.length - 1] = 0;
- counterPos--;
- } else {
- return null;
- }
- } else {
- counterPos++;
- }
- counter[counterPos] = 1;
- isWhite = !isWhite;
- }
- }
- return null;
- };
+ /**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged counterparts.
+ */
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = object[key],
+ srcValue = source[key],
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
- I2of5Reader.prototype._findStart = function () {
- var self = this,
- leadingWhitespaceStart,
- offset = self._nextSet(self._row),
- startInfo,
- narrowBarWidth = 1;
+ var isCommon = newValue === undefined;
- while (!startInfo) {
- startInfo = self._findPattern(self.START_PATTERN, offset, false, true);
- if (!startInfo) {
- return null;
- }
- narrowBarWidth = Math.floor((startInfo.end - startInfo.start) / 4);
- leadingWhitespaceStart = startInfo.start - narrowBarWidth * 10;
- if (leadingWhitespaceStart >= 0) {
- if (self._matchRange(leadingWhitespaceStart, startInfo.start, 0)) {
- return startInfo;
- }
- }
- offset = startInfo.end;
- startInfo = null;
+ if (isCommon) {
+ newValue = srcValue;
+ if (isArray(srcValue) || isTypedArray(srcValue)) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else {
+ isCommon = false;
+ newValue = baseClone(srcValue, !customizer);
+ }
}
- };
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ isCommon = false;
+ newValue = baseClone(srcValue, !customizer);
+ }
+ else {
+ newValue = objValue;
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ stack.set(srcValue, newValue);
- I2of5Reader.prototype._verifyTrailingWhitespace = function (endInfo) {
- var self = this,
- trailingWhitespaceEnd;
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ }
+ stack['delete'](srcValue);
+ assignMergeValue(object, key, newValue);
+ }
- trailingWhitespaceEnd = endInfo.end + (endInfo.end - endInfo.start) / 2;
- if (trailingWhitespaceEnd < self._row.length) {
- if (self._matchRange(endInfo.end, trailingWhitespaceEnd, 0)) {
- return endInfo;
- }
+ module.e = baseMergeDeep;
+
+
+/***/ },
+/* 100 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var arrayReduce = __webpack_require__(19);
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property names.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} props The property names to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, props) {
+ object = Object(object);
+ return arrayReduce(props, function(result, key) {
+ if (key in object) {
+ result[key] = object[key];
}
- return null;
- };
+ return result;
+ }, {});
+ }
- I2of5Reader.prototype._findEnd = function () {
- var self = this,
- endInfo,
- tmp;
+ module.e = basePick;
+
+
+/***/ },
+/* 101 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
- self._row.reverse();
- endInfo = self._findPattern(self.STOP_PATTERN);
- self._row.reverse();
+ module.e = baseProperty;
+
+
+/***/ },
+/* 102 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
- if (endInfo === null) {
- return null;
- }
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
- // reverse numbers
- tmp = endInfo.start;
- endInfo.start = self._row.length - endInfo.end;
- endInfo.end = self._row.length - tmp;
+ module.e = baseTimes;
+
+
+/***/ },
+/* 103 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+ function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+ }
- return endInfo !== null ? self._verifyTrailingWhitespace(endInfo) : null;
- };
+ module.e = checkGlobal;
+
+
+/***/ },
+/* 104 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+ function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var result = new buffer.constructor(buffer.length);
+ buffer.copy(result);
+ return result;
+ }
- I2of5Reader.prototype._decodePair = function (counterPair) {
- var i,
- code,
- codes = [],
- self = this;
+ module.e = cloneBuffer;
+
+
+/***/ },
+/* 105 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var addMapEntry = __webpack_require__(85),
+ arrayReduce = __webpack_require__(19),
+ mapToArray = __webpack_require__(130);
- for (i = 0; i < counterPair.length; i++) {
- code = self._decodeCode(counterPair[i]);
- if (!code) {
- return null;
- }
- codes.push(code);
- }
- return codes;
- };
+ /**
+ * Creates a clone of `map`.
+ *
+ * @private
+ * @param {Object} map The map to clone.
+ * @returns {Object} Returns the cloned map.
+ */
+ function cloneMap(map) {
+ return arrayReduce(mapToArray(map), addMapEntry, new map.constructor);
+ }
+
+ module.e = cloneMap;
+
+
+/***/ },
+/* 106 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+ function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+ }
+
+ module.e = cloneRegExp;
+
+
+/***/ },
+/* 107 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var addSetEntry = __webpack_require__(86),
+ arrayReduce = __webpack_require__(19),
+ setToArray = __webpack_require__(131);
+
+ /**
+ * Creates a clone of `set`.
+ *
+ * @private
+ * @param {Object} set The set to clone.
+ * @returns {Object} Returns the cloned set.
+ */
+ function cloneSet(set) {
+ return arrayReduce(setToArray(set), addSetEntry, new set.constructor);
+ }
- I2of5Reader.prototype._decodeCode = function (counter) {
- var j,
- self = this,
- sum = 0,
- normalized,
- error,
- epsilon = self.AVG_CODE_ERROR,
- code,
- bestMatch = {
- error: Number.MAX_VALUE,
- code: -1,
- start: 0,
- end: 0
- };
+ module.e = cloneSet;
+
+
+/***/ },
+/* 108 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Symbol = __webpack_require__(82);
- for (j = 0; j < counter.length; j++) {
- sum += counter[j];
- }
- normalized = self._normalize(counter);
- if (normalized) {
- for (code = 0; code < self.CODE_PATTERN.length; code++) {
- error = self._matchPattern(normalized, self.CODE_PATTERN[code]);
- if (error < bestMatch.error) {
- bestMatch.code = code;
- bestMatch.error = error;
- }
- }
- if (bestMatch.error < epsilon) {
- return bestMatch;
- }
- }
- return null;
- };
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
- I2of5Reader.prototype._decodePayload = function (counters, result, decodedCodes) {
- var i,
- self = this,
- pos = 0,
- counterLength = counters.length,
- counterPair = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0]],
- codes;
+ /**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+ function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+ }
- while (pos < counterLength) {
- for (i = 0; i < 5; i++) {
- counterPair[0][i] = counters[pos] * this.barSpaceRatio[0];
- counterPair[1][i] = counters[pos + 1] * this.barSpaceRatio[1];
- pos += 2;
- }
- codes = self._decodePair(counterPair);
- if (!codes) {
- return null;
- }
- for (i = 0; i < codes.length; i++) {
- result.push(codes[i].code + "");
- decodedCodes.push(codes[i]);
- }
- }
- return codes;
- };
+ module.e = cloneSymbol;
+
+
+/***/ },
+/* 109 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var cloneArrayBuffer = __webpack_require__(40);
- I2of5Reader.prototype._verifyCounterLength = function (counters) {
- return counters.length % 10 === 0;
- };
+ /**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+ function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+ }
- I2of5Reader.prototype._decode = function () {
- var startInfo,
- endInfo,
- self = this,
- code,
- result = [],
- decodedCodes = [],
- counters;
+ module.e = cloneTypedArray;
+
+
+/***/ },
+/* 110 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var assignValue = __webpack_require__(35);
- startInfo = self._findStart();
- if (!startInfo) {
- return null;
- }
- decodedCodes.push(startInfo);
+ /**
+ * This function is like `copyObject` except that it accepts a function to
+ * customize copied values.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property names to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObjectWith(source, props, object, customizer) {
+ object || (object = {});
- endInfo = self._findEnd();
- if (!endInfo) {
- return null;
- }
+ var index = -1,
+ length = props.length;
- counters = self._fillCounters(startInfo.end, endInfo.start, false);
- if (!self._verifyCounterLength(counters)) {
- return null;
- }
- code = self._decodePayload(counters, result, decodedCodes);
- if (!code) {
- return null;
- }
- if (result.length % 2 !== 0 || result.length < 6) {
- return null;
- }
+ while (++index < length) {
+ var key = props[index];
- decodedCodes.push(endInfo);
- return {
- code: result.join(""),
- start: startInfo.start,
- end: endInfo.end,
- startInfo: startInfo,
- decodedCodes: decodedCodes
- };
- };
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : source[key];
- I2of5Reader.CONFIG_KEYS = {
- normalizeBarSpaceWidth: {
- 'type': 'boolean',
- 'default': false,
- 'description': 'If true, the reader tries to normalize the' + 'width-difference between bars and spaces'
- }
- };
+ assignValue(object, key, newValue);
+ }
+ return object;
+ }
- exports['default'] = I2of5Reader;
- module.exports = exports['default'];
+ module.e = copyObjectWith;
+
/***/ },
-/* 26 */
+/* 111 */
/***/ function(module, exports, __webpack_require__) {
- var baseMerge = __webpack_require__(27),
- createAssigner = __webpack_require__(54);
+ var copyObject = __webpack_require__(20),
+ getSymbols = __webpack_require__(115);
/**
- * Recursively merges own enumerable properties of the source object(s), that
- * don't resolve to `undefined` into the destination object. Subsequent sources
- * overwrite property assignments of previous sources. If `customizer` is
- * provided it's invoked to produce the merged values of the destination and
- * source properties. If `customizer` returns `undefined` merging is handled
- * by the method instead. The `customizer` is bound to `thisArg` and invoked
- * with five arguments: (objectValue, sourceValue, key, object, source).
+ * Copies own symbol properties of `source` to `object`.
*
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
- * @example
- *
- * var users = {
- * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
- * };
- *
- * var ages = {
- * 'data': [{ 'age': 36 }, { 'age': 40 }]
- * };
- *
- * _.merge(users, ages);
- * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
- *
- * // using a customizer callback
- * var object = {
- * 'fruits': ['apple'],
- * 'vegetables': ['beet']
- * };
- *
- * var other = {
- * 'fruits': ['banana'],
- * 'vegetables': ['carrot']
- * };
- *
- * _.merge(object, other, function(a, b) {
- * if (_.isArray(a)) {
- * return a.concat(b);
- * }
- * });
- * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
*/
- var merge = createAssigner(baseMerge);
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
- module.exports = merge;
+ module.e = copySymbols;
/***/ },
-/* 27 */
+/* 112 */
/***/ function(module, exports, __webpack_require__) {
- var arrayEach = __webpack_require__(28),
- baseMergeDeep = __webpack_require__(29),
- isArray = __webpack_require__(37),
- isArrayLike = __webpack_require__(32),
- isObject = __webpack_require__(41),
- isObjectLike = __webpack_require__(36),
- isTypedArray = __webpack_require__(49),
- keys = __webpack_require__(52);
+ var isIterateeCall = __webpack_require__(123),
+ rest = __webpack_require__(47);
/**
- * The base implementation of `_.merge` without support for argument juggling,
- * multiple sources, and `this` binding `customizer` functions.
+ * Creates a function like `_.assign`.
*
* @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates values with source counterparts.
- * @returns {Object} Returns `object`.
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
*/
- function baseMerge(object, source, customizer, stackA, stackB) {
- if (!isObject(object)) {
- return object;
- }
- var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),
- props = isSrcArr ? undefined : keys(source);
+ function createAssigner(assigner) {
+ return rest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
- arrayEach(props || source, function(srcValue, key) {
- if (props) {
- key = srcValue;
- srcValue = source[key];
- }
- if (isObjectLike(srcValue)) {
- stackA || (stackA = []);
- stackB || (stackB = []);
- baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
- }
- else {
- var value = object[key],
- result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
- isCommon = result === undefined;
+ customizer = typeof customizer == 'function'
+ ? (length--, customizer)
+ : undefined;
- if (isCommon) {
- result = srcValue;
- }
- if ((result !== undefined || (isSrcArr && !(key in object))) &&
- (isCommon || (result === result ? (result !== value) : (value === value)))) {
- object[key] = result;
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
}
}
+ return object;
});
- return object;
}
- module.exports = baseMerge;
+ module.e = createAssigner;
/***/ },
-/* 28 */
-/***/ function(module, exports) {
+/* 113 */
+/***/ function(module, exports, __webpack_require__) {
/**
- * A specialized version of `_.forEach` for arrays without support for callback
- * shorthands and `this` binding.
+ * Creates a base function for methods like `_.forIn`.
*
* @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
*/
- function arrayEach(array, iteratee) {
- var index = -1,
- length = array.length;
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
}
- }
- return array;
+ return object;
+ };
}
- module.exports = arrayEach;
+ module.e = createBaseFor;
+
+
+/***/ },
+/* 114 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseProperty = __webpack_require__(101);
+
+ /**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+ var getLength = baseProperty('length');
+
+ module.e = getLength;
+
+
+/***/ },
+/* 115 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /** Built-in value references. */
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+
+ /**
+ * Creates an array of the own symbol properties of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbols = getOwnPropertySymbols || function() {
+ return [];
+ };
+
+ module.e = getSymbols;
/***/ },
-/* 29 */
+/* 116 */
/***/ function(module, exports, __webpack_require__) {
- var arrayCopy = __webpack_require__(30),
- isArguments = __webpack_require__(31),
- isArray = __webpack_require__(37),
- isArrayLike = __webpack_require__(32),
- isPlainObject = __webpack_require__(42),
- isTypedArray = __webpack_require__(49),
- toPlainObject = __webpack_require__(50);
+ var Map = __webpack_require__(3),
+ Set = __webpack_require__(81),
+ WeakMap = __webpack_require__(84);
+
+ /** `Object#toString` result references. */
+ var mapTag = '[object Map]',
+ objectTag = '[object Object]',
+ setTag = '[object Set]',
+ weakMapTag = '[object WeakMap]';
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = Function.prototype.toString;
/**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var mapCtorString = Map ? funcToString.call(Map) : '',
+ setCtorString = Set ? funcToString.call(Set) : '',
+ weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
+
+ /**
+ * Gets the `toStringTag` of `value`.
*
* @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates values with source counterparts.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
*/
- function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
- var length = stackA.length,
- srcValue = source[key];
-
- while (length--) {
- if (stackA[length] == srcValue) {
- object[key] = stackB[length];
- return;
- }
- }
- var value = object[key],
- result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
- isCommon = result === undefined;
+ function getTag(value) {
+ return objectToString.call(value);
+ }
- if (isCommon) {
- result = srcValue;
- if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {
- result = isArray(value)
- ? value
- : (isArrayLike(value) ? arrayCopy(value) : []);
- }
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- result = isArguments(value)
- ? toPlainObject(value)
- : (isPlainObject(value) ? value : {});
- }
- else {
- isCommon = false;
+ // Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
+ if ((Map && getTag(new Map) != mapTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = objectToString.call(value),
+ Ctor = result == objectTag ? value.constructor : null,
+ ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case mapCtorString: return mapTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
}
- }
- // Add the source value to the stack of traversed objects and associate
- // it with its merged value.
- stackA.push(srcValue);
- stackB.push(result);
-
- if (isCommon) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);
- } else if (result === result ? (result !== value) : (value === value)) {
- object[key] = result;
- }
+ return result;
+ };
}
- module.exports = baseMergeDeep;
+ module.e = getTag;
/***/ },
-/* 30 */
-/***/ function(module, exports) {
+/* 117 */
+/***/ function(module, exports, __webpack_require__) {
+ var hashHas = __webpack_require__(42);
+
/**
- * Copies the values of `source` to `array`.
+ * Removes `key` and its value from the hash.
*
* @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
- function arrayCopy(source, array) {
- var index = -1,
- length = source.length;
-
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
+ function hashDelete(hash, key) {
+ return hashHas(hash, key) && delete hash[key];
}
- module.exports = arrayCopy;
+ module.e = hashDelete;
/***/ },
-/* 31 */
+/* 118 */
/***/ function(module, exports, __webpack_require__) {
- var isArrayLike = __webpack_require__(32),
- isObjectLike = __webpack_require__(36);
+ var nativeCreate = __webpack_require__(14);
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
- /** Used for native method references. */
+ /** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
- /** Native method references. */
- var propertyIsEnumerable = objectProto.propertyIsEnumerable;
-
/**
- * Checks if `value` is classified as an `arguments` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
+ * Gets the hash value for `key`.
*
- * _.isArguments([1, 2, 3]);
- * // => false
+ * @private
+ * @param {Object} hash The hash to query.
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
*/
- function isArguments(value) {
- return isObjectLike(value) && isArrayLike(value) &&
- hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
+ function hashGet(hash, key) {
+ if (nativeCreate) {
+ var result = hash[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
}
- module.exports = isArguments;
+ module.e = hashGet;
/***/ },
-/* 32 */
+/* 119 */
/***/ function(module, exports, __webpack_require__) {
- var getLength = __webpack_require__(33),
- isLength = __webpack_require__(35);
+ var nativeCreate = __webpack_require__(14);
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
- * Checks if `value` is array-like.
+ * Sets the hash `key` to `value`.
*
* @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
*/
- function isArrayLike(value) {
- return value != null && isLength(getLength(value));
+ function hashSet(hash, key, value) {
+ hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
}
- module.exports = isArrayLike;
+ module.e = hashSet;
/***/ },
-/* 33 */
+/* 120 */
/***/ function(module, exports, __webpack_require__) {
- var baseProperty = __webpack_require__(34);
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
- /**
- * Gets the "length" property value of `object`.
- *
- * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
- * that affects Safari on at least iOS 8.1-8.3 ARM64.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {*} Returns the "length" value.
- */
- var getLength = baseProperty('length');
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
- module.exports = getLength;
-
-
-/***/ },
-/* 34 */
-/***/ function(module, exports) {
-
/**
- * The base implementation of `_.property` without support for deep paths.
+ * Initializes an array clone.
*
* @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
*/
- function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
+ function initCloneArray(array) {
+ var length = array.length,
+ result = array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
}
- module.exports = baseProperty;
+ module.e = initCloneArray;
/***/ },
-/* 35 */
-/***/ function(module, exports) {
+/* 121 */
+/***/ function(module, exports, __webpack_require__) {
- /**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
- */
- var MAX_SAFE_INTEGER = 9007199254740991;
+ var cloneArrayBuffer = __webpack_require__(40),
+ cloneMap = __webpack_require__(105),
+ cloneRegExp = __webpack_require__(106),
+ cloneSet = __webpack_require__(107),
+ cloneSymbol = __webpack_require__(108),
+ cloneTypedArray = __webpack_require__(109);
+
+ /** `Object#toString` result references. */
+ var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
/**
- * Checks if `value` is a valid array-like length.
+ * Initializes an object clone based on its `toStringTag`.
*
- * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
*/
- function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return cloneMap(object);
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return cloneSet(object);
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
}
- module.exports = isLength;
+ module.e = initCloneByTag;
/***/ },
-/* 36 */
-/***/ function(module, exports) {
+/* 122 */
+/***/ function(module, exports, __webpack_require__) {
+ var baseCreate = __webpack_require__(91),
+ isPrototype = __webpack_require__(23);
+
+ /** Built-in value references. */
+ var getPrototypeOf = Object.getPrototypeOf;
+
/**
- * Checks if `value` is object-like.
+ * Initializes an object clone.
*
* @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
*/
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototypeOf(object))
+ : {};
}
- module.exports = isObjectLike;
+ module.e = initCloneObject;
/***/ },
-/* 37 */
+/* 123 */
/***/ function(module, exports, __webpack_require__) {
- var getNative = __webpack_require__(38),
- isLength = __webpack_require__(35),
- isObjectLike = __webpack_require__(36);
-
- /** `Object#toString` result references. */
- var arrayTag = '[object Array]';
-
- /** Used for native method references. */
- var objectProto = Object.prototype;
-
- /**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objToString = objectProto.toString;
-
- /* Native method references for those with the same name as other `lodash` methods. */
- var nativeIsArray = getNative(Array, 'isArray');
+ var eq = __webpack_require__(15),
+ isArrayLike = __webpack_require__(25),
+ isIndex = __webpack_require__(22),
+ isObject = __webpack_require__(2);
/**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
+ * Checks if the given arguments are from an iteratee call.
*
- * _.isArray(function() { return arguments; }());
- * // => false
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
*/
- var isArray = nativeIsArray || function(value) {
- return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
- };
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
- module.exports = isArray;
+ module.e = isIterateeCall;
/***/ },
-/* 38 */
+/* 124 */
/***/ function(module, exports, __webpack_require__) {
- var isNative = __webpack_require__(39);
-
/**
- * Gets the native function at `key` of `object`.
+ * Converts `iterator` to an array.
*
* @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
*/
- function getNative(object, key) {
- var value = object == null ? undefined : object[key];
- return isNative(value) ? value : undefined;
+ function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
}
- module.exports = getNative;
+ module.e = iteratorToArray;
/***/ },
-/* 39 */
+/* 125 */
/***/ function(module, exports, __webpack_require__) {
- var isFunction = __webpack_require__(40),
- isObjectLike = __webpack_require__(36);
-
- /** Used to detect host constructors (Safari > 5). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
- /** Used for native method references. */
- var objectProto = Object.prototype;
+ var Hash = __webpack_require__(78),
+ Map = __webpack_require__(3);
- /** Used to resolve the decompiled source of functions. */
- var fnToString = Function.prototype.toString;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
-
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' +
- fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
- );
-
- /**
- * Checks if `value` is a native function.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
- * @example
- *
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
- */
- function isNative(value) {
- if (value == null) {
- return false;
- }
- if (isFunction(value)) {
- return reIsNative.test(fnToString.call(value));
- }
- return isObjectLike(value) && reIsHostCtor.test(value);
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': Map ? new Map : [],
+ 'string': new Hash
+ };
}
- module.exports = isNative;
+ module.e = mapClear;
/***/ },
-/* 40 */
+/* 126 */
/***/ function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(41);
-
- /** `Object#toString` result references. */
- var funcTag = '[object Function]';
-
- /** Used for native method references. */
- var objectProto = Object.prototype;
-
- /**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objToString = objectProto.toString;
+ var Map = __webpack_require__(3),
+ assocDelete = __webpack_require__(36),
+ hashDelete = __webpack_require__(117),
+ isKeyable = __webpack_require__(13);
/**
- * Checks if `value` is classified as a `Function` object.
+ * Removes `key` and its value from the map.
*
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
- function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in older versions of Chrome and Safari which return 'function' for regexes
- // and Safari 8 which returns 'object' for typed array constructors.
- return isObject(value) && objToString.call(value) == funcTag;
+ function mapDelete(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
+ }
+ return Map ? data.map['delete'](key) : assocDelete(data.map, key);
}
- module.exports = isFunction;
+ module.e = mapDelete;
/***/ },
-/* 41 */
-/***/ function(module, exports) {
+/* 127 */
+/***/ function(module, exports, __webpack_require__) {
+ var Map = __webpack_require__(3),
+ assocGet = __webpack_require__(37),
+ hashGet = __webpack_require__(118),
+ isKeyable = __webpack_require__(13);
+
/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
+ * Gets the map value for `key`.
*
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(1);
- * // => false
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
*/
- function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
+ function mapGet(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashGet(typeof key == 'string' ? data.string : data.hash, key);
+ }
+ return Map ? data.map.get(key) : assocGet(data.map, key);
}
- module.exports = isObject;
+ module.e = mapGet;
/***/ },
-/* 42 */
+/* 128 */
/***/ function(module, exports, __webpack_require__) {
- var baseForIn = __webpack_require__(43),
- isArguments = __webpack_require__(31),
- isObjectLike = __webpack_require__(36);
-
- /** `Object#toString` result references. */
- var objectTag = '[object Object]';
-
- /** Used for native method references. */
- var objectProto = Object.prototype;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
-
- /**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objToString = objectProto.toString;
+ var Map = __webpack_require__(3),
+ assocHas = __webpack_require__(38),
+ hashHas = __webpack_require__(42),
+ isKeyable = __webpack_require__(13);
/**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * **Note:** This method assumes objects created by the `Object` constructor
- * have no inherited enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
+ * Checks if a map value for `key` exists.
*
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
- function isPlainObject(value) {
- var Ctor;
-
- // Exit early for non `Object` objects.
- if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) ||
- (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
- return false;
+ function mapHas(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashHas(typeof key == 'string' ? data.string : data.hash, key);
}
- // IE < 9 iterates inherited properties before own properties. If the first
- // iterated property is an object's own property then there are no inherited
- // enumerable properties.
- var result;
- // In most environments an object's own properties are iterated before
- // its inherited properties. If the last iterated property is an object's
- // own property then there are no inherited enumerable properties.
- baseForIn(value, function(subValue, key) {
- result = key;
- });
- return result === undefined || hasOwnProperty.call(value, result);
+ return Map ? data.map.has(key) : assocHas(data.map, key);
}
- module.exports = isPlainObject;
+ module.e = mapHas;
/***/ },
-/* 43 */
+/* 129 */
/***/ function(module, exports, __webpack_require__) {
- var baseFor = __webpack_require__(44),
- keysIn = __webpack_require__(47);
+ var Map = __webpack_require__(3),
+ assocSet = __webpack_require__(39),
+ hashSet = __webpack_require__(119),
+ isKeyable = __webpack_require__(13);
/**
- * The base implementation of `_.forIn` without support for callback
- * shorthands and `this` binding.
+ * Sets the map `key` to `value`.
*
* @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache object.
*/
- function baseForIn(object, iteratee) {
- return baseFor(object, iteratee, keysIn);
+ function mapSet(key, value) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
+ } else if (Map) {
+ data.map.set(key, value);
+ } else {
+ assocSet(data.map, key, value);
+ }
+ return this;
}
- module.exports = baseForIn;
+ module.e = mapSet;
/***/ },
-/* 44 */
+/* 130 */
/***/ function(module, exports, __webpack_require__) {
- var createBaseFor = __webpack_require__(45);
-
/**
- * The base implementation of `baseForIn` and `baseForOwn` which iterates
- * over `object` properties returned by `keysFunc` invoking `iteratee` for
- * each property. Iteratee functions may exit iteration early by explicitly
- * returning `false`.
+ * Converts `map` to an array.
*
* @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the converted array.
*/
- var baseFor = createBaseFor();
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+ }
- module.exports = baseFor;
+ module.e = mapToArray;
/***/ },
-/* 45 */
+/* 131 */
/***/ function(module, exports, __webpack_require__) {
- var toObject = __webpack_require__(46);
-
/**
- * Creates a base function for `_.forIn` or `_.forInRight`.
+ * Converts `set` to an array.
*
* @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the converted array.
*/
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var iterable = toObject(object),
- props = keysFunc(object),
- length = props.length,
- index = fromRight ? length : -1;
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
- while ((fromRight ? index-- : ++index < length)) {
- var key = props[index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
}
- module.exports = createBaseFor;
+ module.e = setToArray;
/***/ },
-/* 46 */
+/* 132 */
/***/ function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(41);
-
/**
- * Converts `value` to an object if it's not one.
+ * Removes all key-value entries from the stack.
*
* @private
- * @param {*} value The value to process.
- * @returns {Object} Returns the object.
+ * @name clear
+ * @memberOf Stack
*/
- function toObject(value) {
- return isObject(value) ? value : Object(value);
+ function stackClear() {
+ this.__data__ = { 'array': [], 'map': null };
}
- module.exports = toObject;
+ module.e = stackClear;
/***/ },
-/* 47 */
+/* 133 */
/***/ function(module, exports, __webpack_require__) {
- var isArguments = __webpack_require__(31),
- isArray = __webpack_require__(37),
- isIndex = __webpack_require__(48),
- isLength = __webpack_require__(35),
- isObject = __webpack_require__(41);
-
- /** Used for native method references. */
- var objectProto = Object.prototype;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
+ var assocDelete = __webpack_require__(36);
/**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
+ * Removes `key` and its value from the stack.
*
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
- function keysIn(object) {
- if (object == null) {
- return [];
- }
- if (!isObject(object)) {
- object = Object(object);
- }
- var length = object.length;
- length = (length && isLength(length) &&
- (isArray(object) || isArguments(object)) && length) || 0;
-
- var Ctor = object.constructor,
- index = -1,
- isProto = typeof Ctor == 'function' && Ctor.prototype === object,
- result = Array(length),
- skipIndexes = length > 0;
+ function stackDelete(key) {
+ var data = this.__data__,
+ array = data.array;
- while (++index < length) {
- result[index] = (index + '');
- }
- for (var key in object) {
- if (!(skipIndexes && isIndex(key, length)) &&
- !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
+ return array ? assocDelete(array, key) : data.map['delete'](key);
}
- module.exports = keysIn;
+ module.e = stackDelete;
/***/ },
-/* 48 */
-/***/ function(module, exports) {
+/* 134 */
+/***/ function(module, exports, __webpack_require__) {
- /** Used to detect unsigned integer values. */
- var reIsUint = /^\d+$/;
-
- /**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
- */
- var MAX_SAFE_INTEGER = 9007199254740991;
+ var assocGet = __webpack_require__(37);
/**
- * Checks if `value` is a valid array-like index.
+ * Gets the stack value for `key`.
*
* @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
*/
- function isIndex(value, length) {
- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return value > -1 && value % 1 == 0 && value < length;
+ function stackGet(key) {
+ var data = this.__data__,
+ array = data.array;
+
+ return array ? assocGet(array, key) : data.map.get(key);
}
- module.exports = isIndex;
+ module.e = stackGet;
/***/ },
-/* 49 */
+/* 135 */
/***/ function(module, exports, __webpack_require__) {
- var isLength = __webpack_require__(35),
- isObjectLike = __webpack_require__(36);
+ var assocHas = __webpack_require__(38);
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- weakMapTag = '[object WeakMap]';
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ var data = this.__data__,
+ array = data.array;
- var arrayBufferTag = '[object ArrayBuffer]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
+ return array ? assocHas(array, key) : data.map.has(key);
+ }
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
- typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
- typedArrayTags[dateTag] = typedArrayTags[errorTag] =
- typedArrayTags[funcTag] = typedArrayTags[mapTag] =
- typedArrayTags[numberTag] = typedArrayTags[objectTag] =
- typedArrayTags[regexpTag] = typedArrayTags[setTag] =
- typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+ module.e = stackHas;
+
+
+/***/ },
+/* 136 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var MapCache = __webpack_require__(79),
+ assocSet = __webpack_require__(39);
- /** Used for native method references. */
- var objectProto = Object.prototype;
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache object.
*/
- var objToString = objectProto.toString;
+ function stackSet(key, value) {
+ var data = this.__data__,
+ array = data.array;
+
+ if (array) {
+ if (array.length < (LARGE_ARRAY_SIZE - 1)) {
+ assocSet(array, key, value);
+ } else {
+ data.array = null;
+ data.map = new MapCache(array);
+ }
+ }
+ var map = data.map;
+ if (map) {
+ map.set(key, value);
+ }
+ return this;
+ }
+ module.e = stackSet;
+
+
+/***/ },
+/* 137 */
+/***/ function(module, exports, __webpack_require__) {
+
/**
- * Checks if `value` is classified as a typed array.
+ * Creates a function that returns `value`.
*
* @static
* @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new function.
* @example
*
- * _.isTypedArray(new Uint8Array);
- * // => true
+ * var object = { 'user': 'fred' };
+ * var getter = _.constant(object);
*
- * _.isTypedArray([]);
- * // => false
+ * getter() === object;
+ * // => true
*/
- function isTypedArray(value) {
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
+ function constant(value) {
+ return function() {
+ return value;
+ };
}
- module.exports = isTypedArray;
+ module.e = constant;
/***/ },
-/* 50 */
+/* 138 */
/***/ function(module, exports, __webpack_require__) {
- var baseCopy = __webpack_require__(51),
- keysIn = __webpack_require__(47);
+ /* WEBPACK VAR INJECTION */(function(module) {var constant = __webpack_require__(137),
+ root = __webpack_require__(1);
+
+ /** Used to determine if values are of the language type `Object`. */
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
+
+ /** Detect free variable `exports`. */
+ var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
+ ? exports
+ : undefined;
+
+ /** Detect free variable `module`. */
+ var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
+ ? module
+ : undefined;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = (freeModule && freeModule.exports === freeExports)
+ ? freeExports
+ : undefined;
+
+ /** Built-in value references. */
+ var Buffer = moduleExports ? root.Buffer : undefined;
/**
- * Converts `value` to a plain object flattening inherited enumerable
- * properties of `value` to own properties of the plain object.
+ * Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
+ * _.isBuffer(new Buffer(2));
+ * // => true
*
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
*/
- function toPlainObject(value) {
- return baseCopy(value, keysIn(value));
- }
+ var isBuffer = !Buffer ? constant(false) : function(value) {
+ return value instanceof Buffer;
+ };
- module.exports = toPlainObject;
-
+ module.e = isBuffer;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(48)(module)))
/***/ },
-/* 51 */
-/***/ function(module, exports) {
+/* 139 */
+/***/ function(module, exports, __webpack_require__) {
+ var isFunction = __webpack_require__(16),
+ isHostObject = __webpack_require__(21),
+ isObjectLike = __webpack_require__(7);
+
+ /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+ /** Used to detect host constructors (Safari > 5). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = Function.prototype.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
/**
- * Copies properties of `source` to `object`.
+ * Checks if `value` is a native function.
*
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property names to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @returns {Object} Returns `object`.
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
*/
- function baseCopy(source, props, object) {
- object || (object = {});
-
- var index = -1,
- length = props.length;
-
- while (++index < length) {
- var key = props[index];
- object[key] = source[key];
+ function isNative(value) {
+ if (value == null) {
+ return false;
}
- return object;
+ if (isFunction(value)) {
+ return reIsNative.test(funcToString.call(value));
+ }
+ return isObjectLike(value) &&
+ (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
}
- module.exports = baseCopy;
+ module.e = isNative;
/***/ },
-/* 52 */
+/* 140 */
/***/ function(module, exports, __webpack_require__) {
- var getNative = __webpack_require__(38),
- isArrayLike = __webpack_require__(32),
- isObject = __webpack_require__(41),
- shimKeys = __webpack_require__(53);
+ var isHostObject = __webpack_require__(21),
+ isObjectLike = __webpack_require__(7);
- /* Native method references for those with the same name as other `lodash` methods. */
- var nativeKeys = getNative(Object, 'keys');
+ /** `Object#toString` result references. */
+ var objectTag = '[object Object]';
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = Function.prototype.toString;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
/**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
- * for more details.
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /** Built-in value references. */
+ var getPrototypeOf = Object.getPrototypeOf;
+
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
* @example
*
* function Foo() {
* this.a = 1;
- * this.b = 2;
* }
*
- * Foo.prototype.c = 3;
+ * _.isPlainObject(new Foo);
+ * // => false
*
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
*
- * _.keys('hi');
- * // => ['0', '1']
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
*/
- var keys = !nativeKeys ? shimKeys : function(object) {
- var Ctor = object == null ? undefined : object.constructor;
- if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
- (typeof object != 'function' && isArrayLike(object))) {
- return shimKeys(object);
+ function isPlainObject(value) {
+ if (!isObjectLike(value) ||
+ objectToString.call(value) != objectTag || isHostObject(value)) {
+ return false;
}
- return isObject(object) ? nativeKeys(object) : [];
- };
+ var proto = getPrototypeOf(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = proto.constructor;
+ return (typeof Ctor == 'function' &&
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+ }
- module.exports = keys;
+ module.e = isPlainObject;
/***/ },
-/* 53 */
+/* 141 */
/***/ function(module, exports, __webpack_require__) {
- var isArguments = __webpack_require__(31),
- isArray = __webpack_require__(37),
- isIndex = __webpack_require__(48),
- isLength = __webpack_require__(35),
- keysIn = __webpack_require__(47);
+ var isArray = __webpack_require__(4),
+ isObjectLike = __webpack_require__(7);
- /** Used for native method references. */
+ /** `Object#toString` result references. */
+ var stringTag = '[object String]';
+
+ /** Used for built-in method references. */
var objectProto = Object.prototype;
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
+ /**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
/**
- * A fallback implementation of `Object.keys` which creates an array of the
- * own enumerable property names of `object`.
+ * Checks if `value` is classified as a `String` primitive or object.
*
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
*/
- function shimKeys(object) {
- var props = keysIn(object),
- propsLength = props.length,
- length = propsLength && object.length;
-
- var allowIndexes = !!length && isLength(length) &&
- (isArray(object) || isArguments(object));
-
- var index = -1,
- result = [];
-
- while (++index < propsLength) {
- var key = props[index];
- if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
- result.push(key);
- }
- }
- return result;
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
}
- module.exports = shimKeys;
+ module.e = isString;
/***/ },
-/* 54 */
+/* 142 */
/***/ function(module, exports, __webpack_require__) {
- var bindCallback = __webpack_require__(55),
- isIterateeCall = __webpack_require__(57),
- restParam = __webpack_require__(58);
+ var baseFlatten = __webpack_require__(92),
+ basePick = __webpack_require__(100),
+ rest = __webpack_require__(47);
/**
- * Creates a `_.assign`, `_.defaults`, or `_.merge` function.
+ * Creates an object composed of the picked `object` properties.
*
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [props] The property names to pick, specified
+ * individually or in arrays.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
*/
- function createAssigner(assigner) {
- return restParam(function(object, sources) {
- var index = -1,
- length = object == null ? 0 : sources.length,
- customizer = length > 2 ? sources[length - 2] : undefined,
- guard = length > 2 ? sources[2] : undefined,
- thisArg = length > 1 ? sources[length - 1] : undefined;
-
- if (typeof customizer == 'function') {
- customizer = bindCallback(customizer, thisArg, 5);
- length -= 2;
- } else {
- customizer = typeof thisArg == 'function' ? thisArg : undefined;
- length -= (customizer ? 1 : 0);
- }
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined : customizer;
- length = 1;
- }
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, customizer);
- }
- }
- return object;
- });
- }
+ var pick = rest(function(object, props) {
+ return object == null ? {} : basePick(object, baseFlatten(props, 1));
+ });
- module.exports = createAssigner;
+ module.e = pick;
/***/ },
-/* 55 */
+/* 143 */
/***/ function(module, exports, __webpack_require__) {
- var identity = __webpack_require__(56);
+ var toNumber = __webpack_require__(144);
- /**
- * A specialized version of `baseCallback` which only supports `this` binding
- * and specifying the number of arguments to provide to `func`.
- *
- * @private
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {number} [argCount] The number of arguments to provide to `func`.
- * @returns {Function} Returns the callback.
- */
- function bindCallback(func, thisArg, argCount) {
- if (typeof func != 'function') {
- return identity;
- }
- if (thisArg === undefined) {
- return func;
- }
- switch (argCount) {
- case 1: return function(value) {
- return func.call(thisArg, value);
- };
- case 3: return function(value, index, collection) {
- return func.call(thisArg, value, index, collection);
- };
- case 4: return function(accumulator, value, index, collection) {
- return func.call(thisArg, accumulator, value, index, collection);
- };
- case 5: return function(value, other, key, object, source) {
- return func.call(thisArg, value, other, key, object, source);
- };
- }
- return function() {
- return func.apply(thisArg, arguments);
- };
- }
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308;
- module.exports = bindCallback;
-
-
-/***/ },
-/* 56 */
-/***/ function(module, exports) {
-
/**
- * This method returns the first argument provided to it.
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
* @memberOf _
- * @category Utility
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
* @example
*
- * var object = { 'user': 'fred' };
+ * _.toInteger(3);
+ * // => 3
*
- * _.identity(object) === object;
- * // => true
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3');
+ * // => 3
*/
- function identity(value) {
- return value;
+ function toInteger(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ var remainder = value % 1;
+ return value === value ? (remainder ? value - remainder : value) : 0;
}
- module.exports = identity;
+ module.e = toInteger;
/***/ },
-/* 57 */
+/* 144 */
/***/ function(module, exports, __webpack_require__) {
- var isArrayLike = __webpack_require__(32),
- isIndex = __webpack_require__(48),
- isObject = __webpack_require__(41);
+ var isFunction = __webpack_require__(16),
+ isObject = __webpack_require__(2);
+
+ /** Used as references for various `Number` constants. */
+ var NAN = 0 / 0;
+
+ /** Used to match leading and trailing whitespace. */
+ var reTrim = /^\s+|\s+$/g;
+
+ /** Used to detect bad signed hexadecimal string values. */
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+ /** Used to detect binary string values. */
+ var reIsBinary = /^0b[01]+$/i;
+
+ /** Used to detect octal string values. */
+ var reIsOctal = /^0o[0-7]+$/i;
+
+ /** Built-in method references without a dependency on `root`. */
+ var freeParseInt = parseInt;
/**
- * Checks if the provided arguments are from an iteratee call.
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
*
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
+ * _.toNumber(3);
+ * // => 3
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3');
+ * // => 3
*/
- function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
+ function toNumber(value) {
+ if (isObject(value)) {
+ var other = isFunction(value.valueOf) ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
}
- var type = typeof index;
- if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)) {
- var other = object[index];
- return value === value ? (value === other) : (other !== other);
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
}
- return false;
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
}
- module.exports = isIterateeCall;
+ module.e = toNumber;
/***/ },
-/* 58 */
-/***/ function(module, exports) {
+/* 145 */
+/***/ function(module, exports, __webpack_require__) {
- /** Used as the `TypeError` message for "Functions" methods. */
- var FUNC_ERROR_TEXT = 'Expected a function';
-
- /* Native method references for those with the same name as other `lodash` methods. */
- var nativeMax = Math.max;
+ var copyObject = __webpack_require__(20),
+ keysIn = __webpack_require__(46);
/**
- * Creates a function that invokes `func` with the `this` binding of the
- * created function and arguments from `start` and beyond provided as an array.
- *
- * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).
+ * Converts `value` to a plain object flattening inherited enumerable
+ * properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
- * @category Function
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
* @example
*
- * var say = _.restParam(function(what, names) {
- * return what + ' ' + _.initial(names).join(', ') +
- * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
- * });
+ * function Foo() {
+ * this.b = 2;
+ * }
*
- * say('hello', 'fred', 'barney', 'pebbles');
- * // => 'hello fred, barney, & pebbles'
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
*/
- function restParam(func, start) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- rest = Array(length);
-
- while (++index < length) {
- rest[index] = args[start + index];
- }
- switch (start) {
- case 0: return func.call(this, rest);
- case 1: return func.call(this, args[0], rest);
- case 2: return func.call(this, args[0], args[1], rest);
- }
- var otherArgs = Array(start + 1);
- index = -1;
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = rest;
- return func.apply(this, otherArgs);
- };
+ function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
}
- module.exports = restParam;
+ module.e = toPlainObject;
/***/ },
-/* 59 */
-/***/ function(module, exports) {
+/* 146 */
+/***/ function(module, exports, __webpack_require__) {
- "use strict";
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
+ 'use strict';
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
+ // Shimming starts here.
+ (function() {
+ // Utils.
+ var logging = __webpack_require__(0).log;
+ var browserDetails = __webpack_require__(0).browserDetails;
+ // Export to the adapter global object visible in the browser.
+ module.e.browserDetails = browserDetails;
+ module.e.extractVersion = __webpack_require__(0).extractVersion;
+ module.e.disableLog = __webpack_require__(0).disableLog;
+
+ // Uncomment if you do not want any logging at all including the switch
+ // statement below. Can also be turned off in the browser via
+ // adapter.disableLog(true) but then logging from the switch statement below
+ // will still appear.
+ //require('./utils').disableLog(true);
+
+ // Browser shims.
+ var chromeShim = __webpack_require__(147) || null;
+ var edgeShim = __webpack_require__(150) || null;
+ var firefoxShim = __webpack_require__(151) || null;
+
+ // Shim browser if found.
+ switch (browserDetails.browser) {
+ case 'chrome':
+ if (!chromeShim || !chromeShim.shimPeerConnection) {
+ logging('Chrome shim is not included in this adapter release.');
+ return;
+ }
+ logging('adapter.js shimming chrome!');
+ // Export to the adapter global object visible in the browser.
+ module.e.browserShim = chromeShim;
+
+ chromeShim.shimGetUserMedia();
+ chromeShim.shimSourceObject();
+ chromeShim.shimPeerConnection();
+ chromeShim.shimOnTrack();
+ break;
+ case 'edge':
+ if (!edgeShim || !edgeShim.shimPeerConnection) {
+ logging('MS edge shim is not included in this adapter release.');
+ return;
+ }
+ logging('adapter.js shimming edge!');
+ // Export to the adapter global object visible in the browser.
+ module.e.browserShim = edgeShim;
- exports["default"] = (function () {
- var events = {};
+ edgeShim.shimPeerConnection();
+ break;
+ case 'firefox':
+ if (!firefoxShim || !firefoxShim.shimPeerConnection) {
+ logging('Firefox shim is not included in this adapter release.');
+ return;
+ }
+ logging('adapter.js shimming firefox!');
+ // Export to the adapter global object visible in the browser.
+ module.e.browserShim = firefoxShim;
+
+ firefoxShim.shimGetUserMedia();
+ firefoxShim.shimSourceObject();
+ firefoxShim.shimPeerConnection();
+ firefoxShim.shimOnTrack();
+ break;
+ default:
+ logging('Unsupported browser!');
+ }
+ })();
+
+
+/***/ },
+/* 147 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
+ 'use strict';
+ var logging = __webpack_require__(0).log;
+ var browserDetails = __webpack_require__(0).browserDetails;
+
+ var chromeShim = {
+ shimOnTrack: function() {
+ if (typeof window === 'object' && window.RTCPeerConnection && !('ontrack' in
+ window.RTCPeerConnection.prototype)) {
+ Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {
+ get: function() { return this._ontrack; },
+ set: function(f) {
+ var self = this;
+ if (this._ontrack) {
+ this.removeEventListener('track', this._ontrack);
+ this.removeEventListener('addstream', this._ontrackpoly);
+ }
+ this.addEventListener('track', this._ontrack = f);
+ this.addEventListener('addstream', this._ontrackpoly = function(e) {
+ // onaddstream does not fire when a track is added to an existing stream.
+ // but stream.onaddtrack is implemented so we use that
+ e.stream.addEventListener('addtrack', function(te) {
+ var event = new Event('track');
+ event.track = te.track;
+ event.receiver = {track: te.track};
+ event.streams = [e.stream];
+ self.dispatchEvent(event);
+ });
+ e.stream.getTracks().forEach(function(track) {
+ var event = new Event('track');
+ event.track = track;
+ event.receiver = {track: track};
+ event.streams = [e.stream];
+ this.dispatchEvent(event);
+ }.bind(this));
+ }.bind(this));
+ }
+ });
+ }
+ },
+
+ shimSourceObject: function() {
+ if (typeof window === 'object') {
+ if (window.HTMLMediaElement &&
+ !('srcObject' in window.HTMLMediaElement.prototype)) {
+ // Shim the srcObject property, once, when HTMLMediaElement is found.
+ Object.defineProperty(window.HTMLMediaElement.prototype, 'srcObject', {
+ get: function() {
+ return this._srcObject;
+ },
+ set: function(stream) {
+ var self = this;
+ // Use _srcObject as a private property for this shim
+ this._srcObject = stream;
+ if (this.src) {
+ URL.revokeObjectURL(this.src);
+ }
- function getEvent(eventName) {
- if (!events[eventName]) {
- events[eventName] = {
- subscribers: []
- };
- }
- return events[eventName];
+ if (!stream) {
+ this.src = '';
+ return;
+ }
+ this.src = URL.createObjectURL(stream);
+ // We need to recreate the blob url when a track is added or removed.
+ // Doing it manually since we want to avoid a recursion.
+ stream.addEventListener('addtrack', function() {
+ if (self.src) {
+ URL.revokeObjectURL(self.src);
+ }
+ self.src = URL.createObjectURL(stream);
+ });
+ stream.addEventListener('removetrack', function() {
+ if (self.src) {
+ URL.revokeObjectURL(self.src);
+ }
+ self.src = URL.createObjectURL(stream);
+ });
+ }
+ });
+ }
}
+ },
- function clearEvents() {
- events = {};
- }
+ shimPeerConnection: function() {
+ // The RTCPeerConnection object.
+ window.RTCPeerConnection = function(pcConfig, pcConstraints) {
+ // Translate iceTransportPolicy to iceTransports,
+ // see https://code.google.com/p/webrtc/issues/detail?id=4869
+ logging('PeerConnection');
+ if (pcConfig && pcConfig.iceTransportPolicy) {
+ pcConfig.iceTransports = pcConfig.iceTransportPolicy;
+ }
- function publishSubscription(subscription, data) {
- if (subscription.async) {
- setTimeout(function () {
- subscription.callback(data);
- }, 4);
- } else {
- subscription.callback(data);
+ var pc = new webkitRTCPeerConnection(pcConfig, pcConstraints); // jscs:ignore requireCapitalizedConstructors
+ var origGetStats = pc.getStats.bind(pc);
+ pc.getStats = function(selector, successCallback, errorCallback) { // jshint ignore: line
+ var self = this;
+ var args = arguments;
+
+ // If selector is a function then we are in the old style stats so just
+ // pass back the original getStats format to avoid breaking old users.
+ if (arguments.length > 0 && typeof selector === 'function') {
+ return origGetStats(selector, successCallback);
+ }
+
+ var fixChromeStats_ = function(response) {
+ var standardReport = {};
+ var reports = response.result();
+ reports.forEach(function(report) {
+ var standardStats = {
+ id: report.id,
+ timestamp: report.timestamp,
+ type: report.type
+ };
+ report.names().forEach(function(name) {
+ standardStats[name] = report.stat(name);
+ });
+ standardReport[standardStats.id] = standardStats;
+ });
+
+ return standardReport;
+ };
+
+ if (arguments.length >= 2) {
+ var successCallbackWrapper_ = function(response) {
+ args[1](fixChromeStats_(response));
+ };
+
+ return origGetStats.apply(this, [successCallbackWrapper_, arguments[0]]);
}
- }
- function _subscribe(event, callback, async) {
- var subscription;
+ // promise-support
+ return new Promise(function(resolve, reject) {
+ if (args.length === 1 && selector === null) {
+ origGetStats.apply(self, [
+ function(response) {
+ resolve.apply(null, [fixChromeStats_(response)]);
+ }, reject]);
+ } else {
+ origGetStats.apply(self, [resolve, reject]);
+ }
+ });
+ };
- if (typeof callback === "function") {
- subscription = {
- callback: callback,
- async: async
- };
+ return pc;
+ };
+ window.RTCPeerConnection.prototype = webkitRTCPeerConnection.prototype;
+
+ // wrap static methods. Currently just generateCertificate.
+ if (webkitRTCPeerConnection.generateCertificate) {
+ Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {
+ get: function() {
+ if (arguments.length) {
+ return webkitRTCPeerConnection.generateCertificate.apply(null,
+ arguments);
+ } else {
+ return webkitRTCPeerConnection.generateCertificate;
+ }
+ }
+ });
+ }
+
+ // add promise support
+ ['createOffer', 'createAnswer'].forEach(function(method) {
+ var nativeMethod = webkitRTCPeerConnection.prototype[method];
+ webkitRTCPeerConnection.prototype[method] = function() {
+ var self = this;
+ if (arguments.length < 1 || (arguments.length === 1 &&
+ typeof(arguments[0]) === 'object')) {
+ var opts = arguments.length === 1 ? arguments[0] : undefined;
+ return new Promise(function(resolve, reject) {
+ nativeMethod.apply(self, [resolve, reject, opts]);
+ });
} else {
- subscription = callback;
- if (!subscription.callback) {
- throw "Callback was not specified on options";
- }
+ return nativeMethod.apply(this, arguments);
}
+ };
+ });
- getEvent(event).subscribers.push(subscription);
+ ['setLocalDescription', 'setRemoteDescription',
+ 'addIceCandidate'].forEach(function(method) {
+ var nativeMethod = webkitRTCPeerConnection.prototype[method];
+ webkitRTCPeerConnection.prototype[method] = function() {
+ var args = arguments;
+ var self = this;
+ return new Promise(function(resolve, reject) {
+ nativeMethod.apply(self, [args[0],
+ function() {
+ resolve();
+ if (args.length >= 2) {
+ args[1].apply(null, []);
+ }
+ },
+ function(err) {
+ reject(err);
+ if (args.length >= 3) {
+ args[2].apply(null, [err]);
+ }
+ }]
+ );
+ });
+ };
+ });
+ },
+
+ // Attach a media stream to an element.
+ attachMediaStream: function(element, stream) {
+ logging('DEPRECATED, attachMediaStream will soon be removed.');
+ if (browserDetails.version >= 43) {
+ element.srcObject = stream;
+ } else if (typeof element.src !== 'undefined') {
+ element.src = URL.createObjectURL(stream);
+ } else {
+ logging('Error attaching stream to element.');
}
+ },
- return {
- subscribe: function subscribe(event, callback, async) {
- return _subscribe(event, callback, async);
- },
- publish: function publish(eventName, data) {
- var event = getEvent(eventName),
- subscribers = event.subscribers;
-
- event.subscribers = subscribers.filter(function (subscriber) {
- publishSubscription(subscriber, data);
- return !subscriber.once;
- });
- },
- once: function once(event, callback, async) {
- _subscribe(event, {
- callback: callback,
- async: async,
- once: true
- });
- },
- unsubscribe: function unsubscribe(eventName, callback) {
- var event;
+ reattachMediaStream: function(to, from) {
+ logging('DEPRECATED, reattachMediaStream will soon be removed.');
+ if (browserDetails.version >= 43) {
+ to.srcObject = from.srcObject;
+ } else {
+ to.src = from.src;
+ }
+ }
+ }
- if (eventName) {
- event = getEvent(eventName);
- if (event && callback) {
- event.subscribers = event.subscribers.filter(function (subscriber) {
- return subscriber.callback !== callback;
- });
- } else {
- event.subscribers = [];
- }
- } else {
- clearEvents();
- }
- }
- };
- })();
- module.exports = exports["default"];
+ // Expose public methods.
+ module.e = {
+ shimOnTrack: chromeShim.shimOnTrack,
+ shimSourceObject: chromeShim.shimSourceObject,
+ shimPeerConnection: chromeShim.shimPeerConnection,
+ shimGetUserMedia: __webpack_require__(148),
+ attachMediaStream: chromeShim.attachMediaStream,
+ reattachMediaStream: chromeShim.reattachMediaStream
+ };
+
/***/ },
-/* 60 */
+/* 148 */
/***/ function(module, exports, __webpack_require__) {
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
'use strict';
+ var logging = __webpack_require__(0).log;
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- var merge = __webpack_require__(26);
-
- var streamRef, loadedDataHandler;
-
- /**
- * Wraps browser-specific getUserMedia
- * @param {Object} constraints
- * @param {Object} success Callback
- * @param {Object} failure Callback
- */
- function getUserMedia(constraints, success, failure) {
- if (typeof navigator.getUserMedia !== 'undefined') {
- navigator.getUserMedia(constraints, function (stream) {
- streamRef = stream;
- var videoSrc = window.URL && window.URL.createObjectURL(stream) || stream;
- success.apply(null, [videoSrc]);
- }, failure);
- } else {
- failure(new TypeError("getUserMedia not available"));
+ // Expose public methods.
+ module.e = function() {
+ var constraintsToChrome_ = function(c) {
+ if (typeof c !== 'object' || c.mandatory || c.optional) {
+ return c;
}
- }
-
- function loadedData(video, callback) {
- var attempts = 10;
-
- function checkVideo() {
- if (attempts > 0) {
- if (video.videoWidth > 0 && video.videoHeight > 0) {
- if (false) {
- console.log(video.videoWidth + "px x " + video.videoHeight + "px");
- }
- callback();
- } else {
- window.setTimeout(checkVideo, 500);
- }
+ var cc = {};
+ Object.keys(c).forEach(function(key) {
+ if (key === 'require' || key === 'advanced' || key === 'mediaSource') {
+ return;
+ }
+ var r = (typeof c[key] === 'object') ? c[key] : {ideal: c[key]};
+ if (r.exact !== undefined && typeof r.exact === 'number') {
+ r.min = r.max = r.exact;
+ }
+ var oldname_ = function(prefix, name) {
+ if (prefix) {
+ return prefix + name.charAt(0).toUpperCase() + name.slice(1);
+ }
+ return (name === 'deviceId') ? 'sourceId' : name;
+ };
+ if (r.ideal !== undefined) {
+ cc.optional = cc.optional || [];
+ var oc = {};
+ if (typeof r.ideal === 'number') {
+ oc[oldname_('min', key)] = r.ideal;
+ cc.optional.push(oc);
+ oc = {};
+ oc[oldname_('max', key)] = r.ideal;
+ cc.optional.push(oc);
} else {
- callback('Unable to play video stream. Is webcam working?');
+ oc[oldname_('', key)] = r.ideal;
+ cc.optional.push(oc);
}
- attempts--;
+ }
+ if (r.exact !== undefined && typeof r.exact !== 'number') {
+ cc.mandatory = cc.mandatory || {};
+ cc.mandatory[oldname_('', key)] = r.exact;
+ } else {
+ ['min', 'max'].forEach(function(mix) {
+ if (r[mix] !== undefined) {
+ cc.mandatory = cc.mandatory || {};
+ cc.mandatory[oldname_(mix, key)] = r[mix];
+ }
+ });
+ }
+ });
+ if (c.advanced) {
+ cc.optional = (cc.optional || []).concat(c.advanced);
}
- checkVideo();
- }
+ return cc;
+ };
- /**
- * Tries to attach the camera-stream to a given video-element
- * and calls the callback function when the content is ready
- * @param {Object} constraints
- * @param {Object} video
- * @param {Object} callback
- */
- function initCamera(constraints, video, callback) {
- getUserMedia(constraints, function (src) {
- video.src = src;
- if (loadedDataHandler) {
- video.removeEventListener("loadeddata", loadedDataHandler, false);
- }
- loadedDataHandler = loadedData.bind(null, video, callback);
- video.addEventListener('loadeddata', loadedDataHandler, false);
- video.play();
- }, function (e) {
- callback(e);
- });
- }
+ var getUserMedia_ = function(constraints, onSuccess, onError) {
+ if (constraints.audio) {
+ constraints.audio = constraintsToChrome_(constraints.audio);
+ }
+ if (constraints.video) {
+ constraints.video = constraintsToChrome_(constraints.video);
+ }
+ logging('chrome: ' + JSON.stringify(constraints));
+ return navigator.webkitGetUserMedia(constraints, onSuccess, onError);
+ };
+ navigator.getUserMedia = getUserMedia_;
- /**
- * Normalizes the incoming constraints to satisfy the current browser
- * @param config
- * @param cb Callback which is called whenever constraints are created
- * @returns {*}
- */
- function normalizeConstraints(config, cb) {
- var constraints = {
- audio: false,
- video: true
- },
- videoConstraints = merge({
- width: 640,
- height: 480,
- minAspectRatio: 0,
- maxAspectRatio: 100,
- facing: "environment"
- }, config);
+ // Returns the result of getUserMedia as a Promise.
+ var getUserMediaPromise_ = function(constraints) {
+ return new Promise(function(resolve, reject) {
+ navigator.getUserMedia(constraints, resolve, reject);
+ });
+ }
- if (typeof MediaStreamTrack !== 'undefined' && typeof MediaStreamTrack.getSources !== 'undefined') {
- MediaStreamTrack.getSources(function (sourceInfos) {
- var videoSourceId;
- for (var i = 0; i < sourceInfos.length; ++i) {
- var sourceInfo = sourceInfos[i];
- if (sourceInfo.kind === "video" && sourceInfo.facing === videoConstraints.facing) {
- videoSourceId = sourceInfo.id;
- }
- }
- constraints.video = {
- mandatory: {
- minWidth: videoConstraints.width,
- minHeight: videoConstraints.height,
- minAspectRatio: videoConstraints.minAspectRatio,
- maxAspectRatio: videoConstraints.maxAspectRatio
- },
- optional: [{
- sourceId: videoSourceId
- }]
- };
- return cb(constraints);
+ if (!navigator.mediaDevices) {
+ navigator.mediaDevices = {getUserMedia: getUserMediaPromise_,
+ enumerateDevices: function() {
+ return new Promise(function(resolve) {
+ var kinds = {audio: 'audioinput', video: 'videoinput'};
+ return MediaStreamTrack.getSources(function(devices) {
+ resolve(devices.map(function(device) {
+ return {label: device.label,
+ kind: kinds[device.kind],
+ deviceId: device.id,
+ groupId: ''};
+ }));
});
- } else {
- constraints.video = {
- mediaSource: "camera",
- width: { min: videoConstraints.width, max: videoConstraints.width },
- height: { min: videoConstraints.height, max: videoConstraints.height },
- require: ["width", "height"]
- };
- return cb(constraints);
- }
- }
+ });
+ }};
+ }
- /**
- * Requests the back-facing camera of the user. The callback is called
- * whenever the stream is ready to be consumed, or if an error occures.
- * @param {Object} video
- * @param {Object} callback
- */
- function _request(video, videoConstraints, callback) {
- normalizeConstraints(videoConstraints, function (constraints) {
- initCamera(constraints, video, callback);
- });
- }
+ // A shim for getUserMedia method on the mediaDevices object.
+ // TODO(KaptenJansson) remove once implemented in Chrome stable.
+ if (!navigator.mediaDevices.getUserMedia) {
+ navigator.mediaDevices.getUserMedia = function(constraints) {
+ return getUserMediaPromise_(constraints);
+ };
+ } else {
+ // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia
+ // function which returns a Promise, it does not accept spec-style
+ // constraints.
+ var origGetUserMedia = navigator.mediaDevices.getUserMedia.
+ bind(navigator.mediaDevices);
+ navigator.mediaDevices.getUserMedia = function(c) {
+ if (c) {
+ logging('spec: ' + JSON.stringify(c)); // whitespace for alignment
+ c.audio = constraintsToChrome_(c.audio);
+ c.video = constraintsToChrome_(c.video);
+ logging('chrome: ' + JSON.stringify(c));
+ }
+ return origGetUserMedia(c);
+ }.bind(this);
+ }
- exports['default'] = {
- request: function request(video, constraints, callback) {
- _request(video, constraints, callback);
- },
- release: function release() {
- var tracks = streamRef && streamRef.getVideoTracks();
- if (tracks && tracks.length) {
- tracks[0].stop();
- }
- streamRef = null;
- }
+ // Dummy devicechange event methods.
+ // TODO(KaptenJansson) remove once implemented in Chrome stable.
+ if (typeof navigator.mediaDevices.addEventListener === 'undefined') {
+ navigator.mediaDevices.addEventListener = function() {
+ logging('Dummy mediaDevices.addEventListener called.');
+ };
+ }
+ if (typeof navigator.mediaDevices.removeEventListener === 'undefined') {
+ navigator.mediaDevices.removeEventListener = function() {
+ logging('Dummy mediaDevices.removeEventListener called.');
+ };
+ }
};
- module.exports = exports['default'];
+
/***/ },
-/* 61 */
+/* 149 */
/***/ function(module, exports, __webpack_require__) {
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
'use strict';
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
+ // SDP helpers.
+ var SDPUtils = {};
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ // Generate an alphanumeric identifier for cname or mids.
+ // TODO: use UUIDs instead? https://gist.github.com/jed/982883
+ SDPUtils.generateIdentifier = function() {
+ return Math.random().toString(36).substr(2, 10);
+ };
- var _commonImage_debug = __webpack_require__(10);
+ // The RTCP CNAME used by all peerconnections from the same JS.
+ SDPUtils.localCName = SDPUtils.generateIdentifier();
- var _commonImage_debug2 = _interopRequireDefault(_commonImage_debug);
- function contains(codeResult, list) {
- if (list) {
- return list.some(function (item) {
- return Object.keys(item).every(function (key) {
- return item[key] === codeResult[key];
- });
- });
- }
- return false;
- }
+ // Splits SDP into lines, dealing with both CRLF and LF.
+ SDPUtils.splitLines = function(blob) {
+ return blob.trim().split('\n').map(function(line) {
+ return line.trim();
+ });
+ };
+ // Splits SDP into sessionpart and mediasections. Ensures CRLF.
+ SDPUtils.splitSections = function(blob) {
+ var parts = blob.split('\r\nm=');
+ return parts.map(function(part, index) {
+ return (index > 0 ? 'm=' + part : part).trim() + '\r\n';
+ });
+ };
- function passesFilter(codeResult, filter) {
- if (typeof filter === 'function') {
- return filter(codeResult);
+ // Returns lines that start with a certain prefix.
+ SDPUtils.matchPrefix = function(blob, prefix) {
+ return SDPUtils.splitLines(blob).filter(function(line) {
+ return line.indexOf(prefix) === 0;
+ });
+ };
+
+ // Parses an ICE candidate line. Sample input:
+ // candidate:702786350 2 udp 41819902 8.8.8.8 60769 typ relay raddr 8.8.8.8 rport 55996"
+ SDPUtils.parseCandidate = function(line) {
+ var parts;
+ // Parse both variants.
+ if (line.indexOf('a=candidate:') === 0) {
+ parts = line.substring(12).split(' ');
+ } else {
+ parts = line.substring(10).split(' ');
+ }
+
+ var candidate = {
+ foundation: parts[0],
+ component: parts[1],
+ protocol: parts[2].toLowerCase(),
+ priority: parseInt(parts[3], 10),
+ ip: parts[4],
+ port: parseInt(parts[5], 10),
+ // skip parts[6] == 'typ'
+ type: parts[7]
+ };
+
+ for (var i = 8; i < parts.length; i += 2) {
+ switch (parts[i]) {
+ case 'raddr':
+ candidate.relatedAddress = parts[i + 1];
+ break;
+ case 'rport':
+ candidate.relatedPort = parseInt(parts[i + 1], 10);
+ break;
+ case 'tcptype':
+ candidate.tcpType = parts[i + 1];
+ break;
+ default: // Unknown extensions are silently ignored.
+ break;
}
- return true;
- }
+ }
+ return candidate;
+ };
+
+ // Translates a candidate object into SDP candidate attribute.
+ SDPUtils.writeCandidate = function(candidate) {
+ var sdp = [];
+ sdp.push(candidate.foundation);
+ sdp.push(candidate.component);
+ sdp.push(candidate.protocol.toUpperCase());
+ sdp.push(candidate.priority);
+ sdp.push(candidate.ip);
+ sdp.push(candidate.port);
+
+ var type = candidate.type;
+ sdp.push('typ');
+ sdp.push(type);
+ if (type !== 'host' && candidate.relatedAddress &&
+ candidate.relatedPort) {
+ sdp.push('raddr');
+ sdp.push(candidate.relatedAddress); // was: relAddr
+ sdp.push('rport');
+ sdp.push(candidate.relatedPort); // was: relPort
+ }
+ if (candidate.tcpType && candidate.protocol.toLowerCase() === 'tcp') {
+ sdp.push('tcptype');
+ sdp.push(candidate.tcpType);
+ }
+ return 'candidate:' + sdp.join(' ');
+ };
- exports['default'] = {
- create: function create(config) {
- var canvas = document.createElement("canvas"),
- ctx = canvas.getContext("2d"),
- results = [],
- capacity = config.capacity || 20,
- capture = config.capture === true;
+ // Parses an rtpmap line, returns RTCRtpCoddecParameters. Sample input:
+ // a=rtpmap:111 opus/48000/2
+ SDPUtils.parseRtpMap = function(line) {
+ var parts = line.substr(9).split(' ');
+ var parsed = {
+ payloadType: parseInt(parts.shift(), 10) // was: id
+ };
- function matchesConstraints(codeResult) {
- return capacity && codeResult && !contains(codeResult, config.blacklist) && passesFilter(codeResult, config.filter);
- }
+ parts = parts[0].split('/');
- return {
- addResult: function addResult(data, imageSize, codeResult) {
- var result = {};
+ parsed.name = parts[0];
+ parsed.clockRate = parseInt(parts[1], 10); // was: clockrate
+ parsed.numChannels = parts.length === 3 ? parseInt(parts[2], 10) : 1; // was: channels
+ return parsed;
+ };
- if (matchesConstraints(codeResult)) {
- capacity--;
- result.codeResult = codeResult;
- if (capture) {
- canvas.width = imageSize.x;
- canvas.height = imageSize.y;
- _commonImage_debug2['default'].drawImage(data, imageSize, ctx);
- result.frame = canvas.toDataURL();
- }
- results.push(result);
- }
- },
- getResults: function getResults() {
- return results;
- }
- };
+ // Generate an a=rtpmap line from RTCRtpCodecCapability or RTCRtpCodecParameters.
+ SDPUtils.writeRtpMap = function(codec) {
+ var pt = codec.payloadType;
+ if (codec.preferredPayloadType !== undefined) {
+ pt = codec.preferredPayloadType;
+ }
+ return 'a=rtpmap:' + pt + ' ' + codec.name + '/' + codec.clockRate +
+ (codec.numChannels !== 1 ? '/' + codec.numChannels : '') + '\r\n';
+ };
+
+ // Parses an ftmp line, returns dictionary. Sample input:
+ // a=fmtp:96 vbr=on;cng=on
+ // Also deals with vbr=on; cng=on
+ SDPUtils.parseFmtp = function(line) {
+ var parsed = {};
+ var kv;
+ var parts = line.substr(line.indexOf(' ') + 1).split(';');
+ for (var j = 0; j < parts.length; j++) {
+ kv = parts[j].trim().split('=');
+ parsed[kv[0].trim()] = kv[1];
+ }
+ return parsed;
+ };
+
+ // Generates an a=ftmp line from RTCRtpCodecCapability or RTCRtpCodecParameters.
+ SDPUtils.writeFtmp = function(codec) {
+ var line = '';
+ var pt = codec.payloadType;
+ if (codec.preferredPayloadType !== undefined) {
+ pt = codec.preferredPayloadType;
+ }
+ if (codec.parameters && codec.parameters.length) {
+ var params = [];
+ Object.keys(codec.parameters).forEach(function(param) {
+ params.push(param + '=' + codec.parameters[param]);
+ });
+ line += 'a=fmtp:' + pt + ' ' + params.join(';') + '\r\n';
+ }
+ return line;
+ };
+
+ // Parses an rtcp-fb line, returns RTCPRtcpFeedback object. Sample input:
+ // a=rtcp-fb:98 nack rpsi
+ SDPUtils.parseRtcpFb = function(line) {
+ var parts = line.substr(line.indexOf(' ') + 1).split(' ');
+ return {
+ type: parts.shift(),
+ parameter: parts.join(' ')
+ };
+ };
+ // Generate a=rtcp-fb lines from RTCRtpCodecCapability or RTCRtpCodecParameters.
+ SDPUtils.writeRtcpFb = function(codec) {
+ var lines = '';
+ var pt = codec.payloadType;
+ if (codec.preferredPayloadType !== undefined) {
+ pt = codec.preferredPayloadType;
+ }
+ if (codec.rtcpFeedback && codec.rtcpFeedback.length) {
+ // FIXME: special handling for trr-int?
+ codec.rtcpFeedback.forEach(function(fb) {
+ lines += 'a=rtcp-fb:' + pt + ' ' + fb.type + ' ' + fb.parameter +
+ '\r\n';
+ });
+ }
+ return lines;
+ };
+
+ // Parses an RFC 5576 ssrc media attribute. Sample input:
+ // a=ssrc:3735928559 cname:something
+ SDPUtils.parseSsrcMedia = function(line) {
+ var sp = line.indexOf(' ');
+ var parts = {
+ ssrc: line.substr(7, sp - 7),
+ };
+ var colon = line.indexOf(':', sp);
+ if (colon > -1) {
+ parts.attribute = line.substr(sp + 1, colon - sp - 1);
+ parts.value = line.substr(colon + 1);
+ } else {
+ parts.attribute = line.substr(sp + 1);
+ }
+ return parts;
+ };
+
+ // Extracts DTLS parameters from SDP media section or sessionpart.
+ // FIXME: for consistency with other functions this should only
+ // get the fingerprint line as input. See also getIceParameters.
+ SDPUtils.getDtlsParameters = function(mediaSection, sessionpart) {
+ var lines = SDPUtils.splitLines(mediaSection);
+ lines = lines.concat(SDPUtils.splitLines(sessionpart)); // Search in session part, too.
+ var fpLine = lines.filter(function(line) {
+ return line.indexOf('a=fingerprint:') === 0;
+ })[0].substr(14);
+ // Note: a=setup line is ignored since we use the 'auto' role.
+ var dtlsParameters = {
+ role: 'auto',
+ fingerprints: [{
+ algorithm: fpLine.split(' ')[0],
+ value: fpLine.split(' ')[1]
+ }]
+ };
+ return dtlsParameters;
+ };
+
+ // Serializes DTLS parameters to SDP.
+ SDPUtils.writeDtlsParameters = function(params, setupType) {
+ var sdp = 'a=setup:' + setupType + '\r\n';
+ params.fingerprints.forEach(function(fp) {
+ sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n';
+ });
+ return sdp;
+ };
+ // Parses ICE information from SDP media section or sessionpart.
+ // FIXME: for consistency with other functions this should only
+ // get the ice-ufrag and ice-pwd lines as input.
+ SDPUtils.getIceParameters = function(mediaSection, sessionpart) {
+ var lines = SDPUtils.splitLines(mediaSection);
+ lines = lines.concat(SDPUtils.splitLines(sessionpart)); // Search in session part, too.
+ var iceParameters = {
+ usernameFragment: lines.filter(function(line) {
+ return line.indexOf('a=ice-ufrag:') === 0;
+ })[0].substr(12),
+ password: lines.filter(function(line) {
+ return line.indexOf('a=ice-pwd:') === 0;
+ })[0].substr(10)
+ };
+ return iceParameters;
+ };
+
+ // Serializes ICE parameters to SDP.
+ SDPUtils.writeIceParameters = function(params) {
+ return 'a=ice-ufrag:' + params.usernameFragment + '\r\n' +
+ 'a=ice-pwd:' + params.password + '\r\n';
+ };
+
+ // Parses the SDP media section and returns RTCRtpParameters.
+ SDPUtils.parseRtpParameters = function(mediaSection) {
+ var description = {
+ codecs: [],
+ headerExtensions: [],
+ fecMechanisms: [],
+ rtcp: []
+ };
+ var lines = SDPUtils.splitLines(mediaSection);
+ var mline = lines[0].split(' ');
+ for (var i = 3; i < mline.length; i++) { // find all codecs from mline[3..]
+ var pt = mline[i];
+ var rtpmapline = SDPUtils.matchPrefix(
+ mediaSection, 'a=rtpmap:' + pt + ' ')[0];
+ if (rtpmapline) {
+ var codec = SDPUtils.parseRtpMap(rtpmapline);
+ var fmtps = SDPUtils.matchPrefix(
+ mediaSection, 'a=fmtp:' + pt + ' ');
+ // Only the first a=fmtp: is considered.
+ codec.parameters = fmtps.length ? SDPUtils.parseFmtp(fmtps[0]) : {};
+ codec.rtcpFeedback = SDPUtils.matchPrefix(
+ mediaSection, 'a=rtcp-fb:' + pt + ' ')
+ .map(SDPUtils.parseRtcpFb);
+ description.codecs.push(codec);
}
+ }
+ // FIXME: parse headerExtensions, fecMechanisms and rtcp.
+ return description;
};
- module.exports = exports['default'];
-
-/***/ },
-/* 62 */
-/***/ function(module, exports, __webpack_require__) {
-
- 'use strict';
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- var config = undefined;
+ // Generates parts of the SDP media section describing the capabilities / parameters.
+ SDPUtils.writeRtpDescription = function(kind, caps) {
+ var sdp = '';
- if (false) {
- config = require('./config.dev.js');
- } else if (true) {
- config = __webpack_require__(63);
- } else {
- config = require('./config.prod.js');
- }
+ // Build the mline.
+ sdp += 'm=' + kind + ' ';
+ sdp += caps.codecs.length > 0 ? '9' : '0'; // reject if no codecs.
+ sdp += ' UDP/TLS/RTP/SAVPF ';
+ sdp += caps.codecs.map(function(codec) {
+ if (codec.preferredPayloadType !== undefined) {
+ return codec.preferredPayloadType;
+ }
+ return codec.payloadType;
+ }).join(' ') + '\r\n';
- exports['default'] = config;
- module.exports = exports['default'];
-
-/***/ },
-/* 63 */
-/***/ function(module, exports) {
-
- "use strict";
+ sdp += 'c=IN IP4 0.0.0.0\r\n';
+ sdp += 'a=rtcp:9 IN IP4 0.0.0.0\r\n';
- module.exports = {
- inputStream: {
- type: "ImageStream",
- sequence: false,
- size: 800,
- area: {
- top: "0%",
- right: "0%",
- left: "0%",
- bottom: "0%"
- },
- singleChannel: false // true: only the red color-channel is read
- },
- locate: true,
- numOfWorkers: 0,
- decoder: {
- readers: ['code_128_reader']
- },
- locator: {
- halfSample: true,
- patchSize: "medium" // x-small, small, medium, large, x-large
+ // Add a=rtpmap lines for each codec. Also fmtp and rtcp-fb.
+ caps.codecs.forEach(function(codec) {
+ sdp += SDPUtils.writeRtpMap(codec);
+ sdp += SDPUtils.writeFtmp(codec);
+ sdp += SDPUtils.writeRtcpFb(codec);
+ });
+ // FIXME: add headerExtensions, fecMechanismÅŸ and rtcp.
+ sdp += 'a=rtcp-mux\r\n';
+ return sdp;
+ };
+
+ SDPUtils.writeSessionBoilerplate = function() {
+ // FIXME: sess-id should be an NTP timestamp.
+ return 'v=0\r\n' +
+ 'o=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\n' +
+ 's=-\r\n' +
+ 't=0 0\r\n';
+ };
+
+ SDPUtils.writeMediaSection = function(transceiver, caps, type, stream) {
+ var sdp = SDPUtils.writeRtpDescription(transceiver.kind, caps);
+
+ // Map ICE parameters (ufrag, pwd) to SDP.
+ sdp += SDPUtils.writeIceParameters(
+ transceiver.iceGatherer.getLocalParameters());
+
+ // Map DTLS parameters to SDP.
+ sdp += SDPUtils.writeDtlsParameters(
+ transceiver.dtlsTransport.getLocalParameters(),
+ type === 'offer' ? 'actpass' : 'active');
+
+ sdp += 'a=mid:' + transceiver.mid + '\r\n';
+
+ if (transceiver.rtpSender && transceiver.rtpReceiver) {
+ sdp += 'a=sendrecv\r\n';
+ } else if (transceiver.rtpSender) {
+ sdp += 'a=sendonly\r\n';
+ } else if (transceiver.rtpReceiver) {
+ sdp += 'a=recvonly\r\n';
+ } else {
+ sdp += 'a=inactive\r\n';
+ }
+
+ // FIXME: for RTX there might be multiple SSRCs. Not implemented in Edge yet.
+ if (transceiver.rtpSender) {
+ var msid = 'msid:' + stream.id + ' ' +
+ transceiver.rtpSender.track.id + '\r\n';
+ sdp += 'a=' + msid;
+ sdp += 'a=ssrc:' + transceiver.sendSsrc + ' ' + msid;
+ }
+ // FIXME: this should be written by writeRtpDescription.
+ sdp += 'a=ssrc:' + transceiver.sendSsrc + ' cname:' +
+ SDPUtils.localCName + '\r\n';
+ return sdp;
+ };
+
+ // Gets the direction from the mediaSection or the sessionpart.
+ SDPUtils.getDirection = function(mediaSection, sessionpart) {
+ // Look for sendrecv, sendonly, recvonly, inactive, default to sendrecv.
+ var lines = SDPUtils.splitLines(mediaSection);
+ for (var i = 0; i < lines.length; i++) {
+ switch (lines[i]) {
+ case 'a=sendrecv':
+ case 'a=sendonly':
+ case 'a=recvonly':
+ case 'a=inactive':
+ return lines[i].substr(2);
}
+ }
+ if (sessionpart) {
+ return SDPUtils.getDirection(sessionpart);
+ }
+ return 'sendrecv';
};
+
+ // Expose public methods.
+ module.e = SDPUtils;
+
/***/ },
-/* 64 */
+/* 150 */
/***/ function(module, exports, __webpack_require__) {
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
'use strict';
- var GetPixels = __webpack_require__(65);
-
- var InputStream = {};
+ var SDPUtils = __webpack_require__(149);
+ var logging = __webpack_require__(0).log;
+ var browserDetails = __webpack_require__(0).browserDetails;
+
+ var edgeShim = {
+ shimPeerConnection: function() {
+ if (window.RTCIceGatherer) {
+ // ORTC defines an RTCIceCandidate object but no constructor.
+ // Not implemented in Edge.
+ if (!window.RTCIceCandidate) {
+ window.RTCIceCandidate = function(args) {
+ return args;
+ };
+ }
+ // ORTC does not have a session description object but
+ // other browsers (i.e. Chrome) that will support both PC and ORTC
+ // in the future might have this defined already.
+ if (!window.RTCSessionDescription) {
+ window.RTCSessionDescription = function(args) {
+ return args;
+ };
+ }
+ }
- InputStream.createImageStream = function () {
- var that = {};
- var _config = null;
+ window.RTCPeerConnection = function(config) {
+ var self = this;
+
+ var _eventTarget = document.createDocumentFragment();
+ ['addEventListener', 'removeEventListener', 'dispatchEvent'].forEach(
+ function(method) {
+ self[method] = _eventTarget[method].bind(_eventTarget);
+ });
+
+ this.onicecandidate = null;
+ this.onaddstream = null;
+ this.ontrack = null;
+ this.onremovestream = null;
+ this.onsignalingstatechange = null;
+ this.oniceconnectionstatechange = null;
+ this.onnegotiationneeded = null;
+ this.ondatachannel = null;
+
+ this.localStreams = [];
+ this.remoteStreams = [];
+ this.getLocalStreams = function() { return self.localStreams; };
+ this.getRemoteStreams = function() { return self.remoteStreams; };
+
+ this.localDescription = new RTCSessionDescription({
+ type: '',
+ sdp: ''
+ });
+ this.remoteDescription = new RTCSessionDescription({
+ type: '',
+ sdp: ''
+ });
+ this.signalingState = 'stable';
+ this.iceConnectionState = 'new';
+ this.iceGatheringState = 'new';
+
+ this.iceOptions = {
+ gatherPolicy: 'all',
+ iceServers: []
+ };
+ if (config && config.iceTransportPolicy) {
+ switch (config.iceTransportPolicy) {
+ case 'all':
+ case 'relay':
+ this.iceOptions.gatherPolicy = config.iceTransportPolicy;
+ break;
+ case 'none':
+ // FIXME: remove once implementation and spec have added this.
+ throw new TypeError('iceTransportPolicy "none" not supported');
+ }
+ }
+ if (config && config.iceServers) {
+ // Edge does not like
+ // 1) stun:
+ // 2) turn: that does not have all of turn:host:port?transport=udp
+ this.iceOptions.iceServers = config.iceServers.filter(function(server) {
+ if (server && server.urls) {
+ server.urls = server.urls.filter(function(url) {
+ return url.indexOf('transport=udp') !== -1;
+ })[0];
+ return true;
+ }
+ return false;
+ });
+ }
- var width = 0,
- height = 0,
- frameIdx = 0,
- paused = true,
- loaded = false,
- frame = null,
- baseUrl,
- ended = false,
- size,
- calculatedWidth,
- calculatedHeight,
- _eventNames = ['canrecord', 'ended'],
- _eventHandlers = {},
- _topRight = { x: 0, y: 0 },
- _canvasSize = { x: 0, y: 0 };
+ // per-track iceGathers, iceTransports, dtlsTransports, rtpSenders, ...
+ // everything that is needed to describe a SDP m-line.
+ this.transceivers = [];
- function loadImages() {
- loaded = false;
- GetPixels(baseUrl, function (err, pixels) {
- if (err) {
- console.log(err);
- exit(1);
- }
- loaded = true;
- console.log(pixels.shape);
- frame = pixels;
- width = pixels.shape[0];
- height = pixels.shape[1];
- calculatedWidth = _config.size ? width / height > 1 ? _config.size : Math.floor(width / height * _config.size) : width;
- calculatedHeight = _config.size ? width / height > 1 ? Math.floor(height / width * _config.size) : _config.size : height;
+ // since the iceGatherer is currently created in createOffer but we
+ // must not emit candidates until after setLocalDescription we buffer
+ // them in this array.
+ this._localIceCandidatesBuffer = [];
+ };
- _canvasSize.x = calculatedWidth;
- _canvasSize.y = calculatedHeight;
+ window.RTCPeerConnection.prototype._emitBufferedCandidates = function() {
+ var self = this;
+ var sections = SDPUtils.splitSections(self.localDescription.sdp);
+ // FIXME: need to apply ice candidates in a way which is async but in-order
+ this._localIceCandidatesBuffer.forEach(function(event) {
+ var end = !event.candidate || Object.keys(event.candidate).length == 0;
+ if (end) {
+ for (var j = 1; j < sections.length; j++) {
+ sections[j] += 'a=end-of-candidates\r\n';
+ }
+ } else {
+ sections[event.candidate.sdpMLineIndex + 1] +=
+ 'a=' + event.candidate.candidate + '\r\n';
+ }
+ self.dispatchEvent(event);
+ if (self.onicecandidate !== null) {
+ self.onicecandidate(event);
+ }
+ if (!event.candidate) {
+ self.iceGatheringState = 'complete';
+ }
+ });
+ this._localIceCandidatesBuffer = [];
+ this.localDescription.sdp = sections.join('');
+ };
- setTimeout(function () {
- publishEvent("canrecord", []);
- }, 0);
- });
- }
+ window.RTCPeerConnection.prototype.addStream = function(stream) {
+ // Clone is necessary for local demos mostly, attaching directly
+ // to two different senders does not work (build 10547).
+ this.localStreams.push(stream.clone());
+ this._maybeFireNegotiationNeeded();
+ };
- function publishEvent(eventName, args) {
- var j,
- handlers = _eventHandlers[eventName];
+ window.RTCPeerConnection.prototype.removeStream = function(stream) {
+ var idx = this.localStreams.indexOf(stream);
+ if (idx > -1) {
+ this.localStreams.splice(idx, 1);
+ this._maybeFireNegotiationNeeded();
+ }
+ };
- if (handlers && handlers.length > 0) {
- for (j = 0; j < handlers.length; j++) {
- handlers[j].apply(that, args);
- }
+ // Determines the intersection of local and remote capabilities.
+ window.RTCPeerConnection.prototype._getCommonCapabilities =
+ function(localCapabilities, remoteCapabilities) {
+ var commonCapabilities = {
+ codecs: [],
+ headerExtensions: [],
+ fecMechanisms: []
+ };
+ localCapabilities.codecs.forEach(function(lCodec) {
+ for (var i = 0; i < remoteCapabilities.codecs.length; i++) {
+ var rCodec = remoteCapabilities.codecs[i];
+ if (lCodec.name.toLowerCase() === rCodec.name.toLowerCase() &&
+ lCodec.clockRate === rCodec.clockRate &&
+ lCodec.numChannels === rCodec.numChannels) {
+ // push rCodec so we reply with offerer payload type
+ commonCapabilities.codecs.push(rCodec);
+
+ // FIXME: also need to determine intersection between
+ // .rtcpFeedback and .parameters
+ break;
+ }
}
- }
+ });
- that.trigger = publishEvent;
+ localCapabilities.headerExtensions.forEach(function(lHeaderExtension) {
+ for (var i = 0; i < remoteCapabilities.headerExtensions.length; i++) {
+ var rHeaderExtension = remoteCapabilities.headerExtensions[i];
+ if (lHeaderExtension.uri === rHeaderExtension.uri) {
+ commonCapabilities.headerExtensions.push(rHeaderExtension);
+ break;
+ }
+ }
+ });
- that.getWidth = function () {
- return calculatedWidth;
+ // FIXME: fecMechanisms
+ return commonCapabilities;
};
- that.getHeight = function () {
- return calculatedHeight;
+ // Create ICE gatherer, ICE transport and DTLS transport.
+ window.RTCPeerConnection.prototype._createIceAndDtlsTransports =
+ function(mid, sdpMLineIndex) {
+ var self = this;
+ var iceGatherer = new RTCIceGatherer(self.iceOptions);
+ var iceTransport = new RTCIceTransport(iceGatherer);
+ iceGatherer.onlocalcandidate = function(evt) {
+ var event = new Event('icecandidate');
+ event.candidate = {sdpMid: mid, sdpMLineIndex: sdpMLineIndex};
+
+ var cand = evt.candidate;
+ var end = !cand || Object.keys(cand).length === 0;
+ // Edge emits an empty object for RTCIceCandidateComplete‥
+ if (end) {
+ // polyfill since RTCIceGatherer.state is not implemented in Edge 10547 yet.
+ if (iceGatherer.state === undefined) {
+ iceGatherer.state = 'completed';
+ }
+
+ // Emit a candidate with type endOfCandidates to make the samples work.
+ // Edge requires addIceCandidate with this empty candidate to start checking.
+ // The real solution is to signal end-of-candidates to the other side when
+ // getting the null candidate but some apps (like the samples) don't do that.
+ event.candidate.candidate =
+ 'candidate:1 1 udp 1 0.0.0.0 9 typ endOfCandidates';
+ } else {
+ // RTCIceCandidate doesn't have a component, needs to be added
+ cand.component = iceTransport.component === 'RTCP' ? 2 : 1;
+ event.candidate.candidate = SDPUtils.writeCandidate(cand);
+ }
+
+ var complete = self.transceivers.every(function(transceiver) {
+ return transceiver.iceGatherer &&
+ transceiver.iceGatherer.state === 'completed';
+ });
+ // update .localDescription with candidate and (potentially) end-of-candidates.
+ // To make this harder, the gatherer might emit candidates before localdescription
+ // is set. To make things worse, gather.getLocalCandidates still errors in
+ // Edge 10547 when no candidates have been gathered yet.
+ if (self.localDescription && self.localDescription.type !== '') {
+ var sections = SDPUtils.splitSections(self.localDescription.sdp);
+ sections[sdpMLineIndex + 1] += (!end ? 'a=' + event.candidate.candidate :
+ 'a=end-of-candidates') + '\r\n';
+ self.localDescription.sdp = sections.join('');
+ }
+
+ // Emit candidate if localDescription is set.
+ // Also emits null candidate when all gatherers are complete.
+ switch(self.iceGatheringState) {
+ case 'new':
+ self._localIceCandidatesBuffer.push(event);
+ if (complete) {
+ self._localIceCandidatesBuffer.push(new Event('icecandidate'));
+ }
+ break;
+ case 'gathering':
+ self._emitBufferedCandidates();
+ self.dispatchEvent(event);
+ if (self.onicecandidate !== null) {
+ self.onicecandidate(event);
+ }
+ if (complete) {
+ self.dispatchEvent(new Event('icecandidate'));
+ if (self.onicecandidate !== null) {
+ self.onicecandidate(new Event('icecandidate'));
+ }
+ self.iceGatheringState = 'complete';
+ }
+ break;
+ case 'complete':
+ // should not happen... currently!
+ break;
+ }
+ };
+ iceTransport.onicestatechange = function() {
+ self._updateConnectionState();
+ };
+
+ var dtlsTransport = new RTCDtlsTransport(iceTransport);
+ dtlsTransport.ondtlsstatechange = function() {
+ self._updateConnectionState();
+ };
+ dtlsTransport.onerror = function() {
+ // onerror does not set state to failed by itself.
+ dtlsTransport.state = 'failed';
+ self._updateConnectionState();
+ };
+
+ return {
+ iceGatherer: iceGatherer,
+ iceTransport: iceTransport,
+ dtlsTransport: dtlsTransport
+ };
};
- that.setWidth = function (width) {
- calculatedWidth = width;
+ // Start the RTP Sender and Receiver for a transceiver.
+ window.RTCPeerConnection.prototype._transceive = function(transceiver,
+ send, recv) {
+ var params = this._getCommonCapabilities(transceiver.localCapabilities,
+ transceiver.remoteCapabilities);
+ if (send && transceiver.rtpSender) {
+ params.encodings = [{
+ ssrc: transceiver.sendSsrc
+ }];
+ params.rtcp = {
+ cname: SDPUtils.localCName,
+ ssrc: transceiver.recvSsrc
+ };
+ transceiver.rtpSender.send(params);
+ }
+ if (recv && transceiver.rtpReceiver) {
+ params.encodings = [{
+ ssrc: transceiver.recvSsrc
+ }];
+ params.rtcp = {
+ cname: transceiver.cname,
+ ssrc: transceiver.sendSsrc
+ };
+ transceiver.rtpReceiver.receive(params);
+ }
};
- that.setHeight = function (height) {
- calculatedHeight = height;
- };
+ window.RTCPeerConnection.prototype.setLocalDescription =
+ function(description) {
+ var self = this;
+ if (description.type === 'offer') {
+ if (!this._pendingOffer) {
+ } else {
+ this.transceivers = this._pendingOffer;
+ delete this._pendingOffer;
+ }
+ } else if (description.type === 'answer') {
+ var sections = SDPUtils.splitSections(self.remoteDescription.sdp);
+ var sessionpart = sections.shift();
+ sections.forEach(function(mediaSection, sdpMLineIndex) {
+ var transceiver = self.transceivers[sdpMLineIndex];
+ var iceGatherer = transceiver.iceGatherer;
+ var iceTransport = transceiver.iceTransport;
+ var dtlsTransport = transceiver.dtlsTransport;
+ var localCapabilities = transceiver.localCapabilities;
+ var remoteCapabilities = transceiver.remoteCapabilities;
+ var rejected = mediaSection.split('\n', 1)[0]
+ .split(' ', 2)[1] === '0';
+
+ if (!rejected) {
+ var remoteIceParameters = SDPUtils.getIceParameters(mediaSection,
+ sessionpart);
+ iceTransport.start(iceGatherer, remoteIceParameters, 'controlled');
+
+ var remoteDtlsParameters = SDPUtils.getDtlsParameters(mediaSection,
+ sessionpart);
+ dtlsTransport.start(remoteDtlsParameters);
+
+ // Calculate intersection of capabilities.
+ var params = self._getCommonCapabilities(localCapabilities,
+ remoteCapabilities);
+
+ // Start the RTCRtpSender. The RTCRtpReceiver for this transceiver
+ // has already been started in setRemoteDescription.
+ self._transceive(transceiver,
+ params.codecs.length > 0,
+ false);
+ }
+ });
+ }
- that.getRealWidth = function () {
- return width;
- };
+ this.localDescription = {
+ type: description.type,
+ sdp: description.sdp
+ };
+ switch (description.type) {
+ case 'offer':
+ this._updateSignalingState('have-local-offer');
+ break;
+ case 'answer':
+ this._updateSignalingState('stable');
+ break;
+ default:
+ throw new TypeError('unsupported type "' + description.type + '"');
+ }
- that.getRealHeight = function () {
- return height;
+ // If a success callback was provided, emit ICE candidates after it has been
+ // executed. Otherwise, emit callback after the Promise is resolved.
+ var hasCallback = arguments.length > 1 &&
+ typeof arguments[1] === 'function';
+ if (hasCallback) {
+ var cb = arguments[1];
+ window.setTimeout(function() {
+ cb();
+ if (self.iceGatheringState === 'new') {
+ self.iceGatheringState = 'gathering';
+ }
+ self._emitBufferedCandidates();
+ }, 0);
+ }
+ var p = Promise.resolve();
+ p.then(function() {
+ if (!hasCallback) {
+ if (self.iceGatheringState === 'new') {
+ self.iceGatheringState = 'gathering';
+ }
+ // Usually candidates will be emitted earlier.
+ window.setTimeout(self._emitBufferedCandidates.bind(self), 500);
+ }
+ });
+ return p;
};
- that.setInputStream = function (stream) {
- _config = stream;
- baseUrl = _config.src;
- size = 1;
- loadImages();
+ window.RTCPeerConnection.prototype.setRemoteDescription =
+ function(description) {
+ var self = this;
+ var stream = new MediaStream();
+ var receiverList = [];
+ var sections = SDPUtils.splitSections(description.sdp);
+ var sessionpart = sections.shift();
+ sections.forEach(function(mediaSection, sdpMLineIndex) {
+ var lines = SDPUtils.splitLines(mediaSection);
+ var mline = lines[0].substr(2).split(' ');
+ var kind = mline[0];
+ var rejected = mline[1] === '0';
+ var direction = SDPUtils.getDirection(mediaSection, sessionpart);
+
+ var transceiver;
+ var iceGatherer;
+ var iceTransport;
+ var dtlsTransport;
+ var rtpSender;
+ var rtpReceiver;
+ var sendSsrc;
+ var recvSsrc;
+ var localCapabilities;
+
+ var track;
+ // FIXME: ensure the mediaSection has rtcp-mux set.
+ var remoteCapabilities = SDPUtils.parseRtpParameters(mediaSection);
+ var remoteIceParameters;
+ var remoteDtlsParameters;
+ if (!rejected) {
+ remoteIceParameters = SDPUtils.getIceParameters(mediaSection,
+ sessionpart);
+ remoteDtlsParameters = SDPUtils.getDtlsParameters(mediaSection,
+ sessionpart);
+ }
+ var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:')[0].substr(6);
+
+ var cname;
+ // Gets the first SSRC. Note that with RTX there might be multiple SSRCs.
+ var remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:')
+ .map(function(line) {
+ return SDPUtils.parseSsrcMedia(line);
+ })
+ .filter(function(obj) {
+ return obj.attribute === 'cname';
+ })[0];
+ if (remoteSsrc) {
+ recvSsrc = parseInt(remoteSsrc.ssrc, 10);
+ cname = remoteSsrc.value;
+ }
+
+ if (description.type === 'offer') {
+ var transports = self._createIceAndDtlsTransports(mid, sdpMLineIndex);
+
+ localCapabilities = RTCRtpReceiver.getCapabilities(kind);
+ sendSsrc = (2 * sdpMLineIndex + 2) * 1001;
+
+ rtpReceiver = new RTCRtpReceiver(transports.dtlsTransport, kind);
+
+ track = rtpReceiver.track;
+ receiverList.push([track, rtpReceiver]);
+ // FIXME: not correct when there are multiple streams but that is
+ // not currently supported in this shim.
+ stream.addTrack(track);
+
+ // FIXME: look at direction.
+ if (self.localStreams.length > 0 &&
+ self.localStreams[0].getTracks().length >= sdpMLineIndex) {
+ // FIXME: actually more complicated, needs to match types etc
+ var localtrack = self.localStreams[0].getTracks()[sdpMLineIndex];
+ rtpSender = new RTCRtpSender(localtrack, transports.dtlsTransport);
+ }
+
+ self.transceivers[sdpMLineIndex] = {
+ iceGatherer: transports.iceGatherer,
+ iceTransport: transports.iceTransport,
+ dtlsTransport: transports.dtlsTransport,
+ localCapabilities: localCapabilities,
+ remoteCapabilities: remoteCapabilities,
+ rtpSender: rtpSender,
+ rtpReceiver: rtpReceiver,
+ kind: kind,
+ mid: mid,
+ cname: cname,
+ sendSsrc: sendSsrc,
+ recvSsrc: recvSsrc
+ };
+ // Start the RTCRtpReceiver now. The RTPSender is started in setLocalDescription.
+ self._transceive(self.transceivers[sdpMLineIndex],
+ false,
+ direction === 'sendrecv' || direction === 'sendonly');
+ } else if (description.type === 'answer' && !rejected) {
+ transceiver = self.transceivers[sdpMLineIndex];
+ iceGatherer = transceiver.iceGatherer;
+ iceTransport = transceiver.iceTransport;
+ dtlsTransport = transceiver.dtlsTransport;
+ rtpSender = transceiver.rtpSender;
+ rtpReceiver = transceiver.rtpReceiver;
+ sendSsrc = transceiver.sendSsrc;
+ //recvSsrc = transceiver.recvSsrc;
+ localCapabilities = transceiver.localCapabilities;
+
+ self.transceivers[sdpMLineIndex].recvSsrc = recvSsrc;
+ self.transceivers[sdpMLineIndex].remoteCapabilities =
+ remoteCapabilities;
+ self.transceivers[sdpMLineIndex].cname = cname;
+
+ iceTransport.start(iceGatherer, remoteIceParameters, 'controlling');
+ dtlsTransport.start(remoteDtlsParameters);
+
+ self._transceive(transceiver,
+ direction === 'sendrecv' || direction === 'recvonly',
+ direction === 'sendrecv' || direction === 'sendonly');
+
+ if (rtpReceiver &&
+ (direction === 'sendrecv' || direction === 'sendonly')) {
+ track = rtpReceiver.track;
+ receiverList.push([track, rtpReceiver]);
+ stream.addTrack(track);
+ } else {
+ // FIXME: actually the receiver should be created later.
+ delete transceiver.rtpReceiver;
+ }
+ }
+ });
+
+ this.remoteDescription = {
+ type: description.type,
+ sdp: description.sdp
+ };
+ switch (description.type) {
+ case 'offer':
+ this._updateSignalingState('have-remote-offer');
+ break;
+ case 'answer':
+ this._updateSignalingState('stable');
+ break;
+ default:
+ throw new TypeError('unsupported type "' + description.type + '"');
+ }
+ if (stream.getTracks().length) {
+ self.remoteStreams.push(stream);
+ window.setTimeout(function() {
+ var event = new Event('addstream');
+ event.stream = stream;
+ self.dispatchEvent(event);
+ if (self.onaddstream !== null) {
+ window.setTimeout(function() {
+ self.onaddstream(event);
+ }, 0);
+ }
+
+ receiverList.forEach(function(item) {
+ var track = item[0];
+ var receiver = item[1];
+ var event = new Event('track');
+ event.track = track;
+ event.receiver = receiver;
+ event.streams = [stream];
+ self.dispatchEvent(event);
+ if (self.ontrack !== null) {
+ window.setTimeout(function() {
+ self.ontrack(event);
+ }, 0);
+ }
+ });
+ }, 0);
+ }
+ if (arguments.length > 1 && typeof arguments[1] === 'function') {
+ window.setTimeout(arguments[1], 0);
+ }
+ return Promise.resolve();
};
- that.ended = function () {
- return ended;
+ window.RTCPeerConnection.prototype.close = function() {
+ this.transceivers.forEach(function(transceiver) {
+ /* not yet
+ if (transceiver.iceGatherer) {
+ transceiver.iceGatherer.close();
+ }
+ */
+ if (transceiver.iceTransport) {
+ transceiver.iceTransport.stop();
+ }
+ if (transceiver.dtlsTransport) {
+ transceiver.dtlsTransport.stop();
+ }
+ if (transceiver.rtpSender) {
+ transceiver.rtpSender.stop();
+ }
+ if (transceiver.rtpReceiver) {
+ transceiver.rtpReceiver.stop();
+ }
+ });
+ // FIXME: clean up tracks, local streams, remote streams, etc
+ this._updateSignalingState('closed');
};
- that.setAttribute = function () {};
-
- that.getConfig = function () {
- return _config;
+ // Update the signaling state.
+ window.RTCPeerConnection.prototype._updateSignalingState =
+ function(newState) {
+ this.signalingState = newState;
+ var event = new Event('signalingstatechange');
+ this.dispatchEvent(event);
+ if (this.onsignalingstatechange !== null) {
+ this.onsignalingstatechange(event);
+ }
};
- that.pause = function () {
- paused = true;
+ // Determine whether to fire the negotiationneeded event.
+ window.RTCPeerConnection.prototype._maybeFireNegotiationNeeded =
+ function() {
+ // Fire away (for now).
+ var event = new Event('negotiationneeded');
+ this.dispatchEvent(event);
+ if (this.onnegotiationneeded !== null) {
+ this.onnegotiationneeded(event);
+ }
};
- that.play = function () {
- paused = false;
- };
+ // Update the connection state.
+ window.RTCPeerConnection.prototype._updateConnectionState =
+ function() {
+ var self = this;
+ var newState;
+ var states = {
+ 'new': 0,
+ closed: 0,
+ connecting: 0,
+ checking: 0,
+ connected: 0,
+ completed: 0,
+ failed: 0
+ };
+ this.transceivers.forEach(function(transceiver) {
+ states[transceiver.iceTransport.state]++;
+ states[transceiver.dtlsTransport.state]++;
+ });
+ // ICETransport.completed and connected are the same for this purpose.
+ states['connected'] += states['completed'];
+
+ newState = 'new';
+ if (states['failed'] > 0) {
+ newState = 'failed';
+ } else if (states['connecting'] > 0 || states['checking'] > 0) {
+ newState = 'connecting';
+ } else if (states['disconnected'] > 0) {
+ newState = 'disconnected';
+ } else if (states['new'] > 0) {
+ newState = 'new';
+ } else if (states['connecting'] > 0 || states['completed'] > 0) {
+ newState = 'connected';
+ }
- that.setCurrentTime = function (time) {
- frameIdx = time;
+ if (newState !== self.iceConnectionState) {
+ self.iceConnectionState = newState;
+ var event = new Event('iceconnectionstatechange');
+ this.dispatchEvent(event);
+ if (this.oniceconnectionstatechange !== null) {
+ this.oniceconnectionstatechange(event);
+ }
+ }
};
- that.addEventListener = function (event, f) {
- if (_eventNames.indexOf(event) !== -1) {
- if (!_eventHandlers[event]) {
- _eventHandlers[event] = [];
- }
- _eventHandlers[event].push(f);
+ window.RTCPeerConnection.prototype.createOffer = function() {
+ var self = this;
+ if (this._pendingOffer) {
+ throw new Error('createOffer called while there is a pending offer.');
+ }
+ var offerOptions;
+ if (arguments.length === 1 && typeof arguments[0] !== 'function') {
+ offerOptions = arguments[0];
+ } else if (arguments.length === 3) {
+ offerOptions = arguments[2];
+ }
+
+ var tracks = [];
+ var numAudioTracks = 0;
+ var numVideoTracks = 0;
+ // Default to sendrecv.
+ if (this.localStreams.length) {
+ numAudioTracks = this.localStreams[0].getAudioTracks().length;
+ numVideoTracks = this.localStreams[0].getVideoTracks().length;
+ }
+ // Determine number of audio and video tracks we need to send/recv.
+ if (offerOptions) {
+ // Reject Chrome legacy constraints.
+ if (offerOptions.mandatory || offerOptions.optional) {
+ throw new TypeError(
+ 'Legacy mandatory/optional constraints not supported.');
}
- };
+ if (offerOptions.offerToReceiveAudio !== undefined) {
+ numAudioTracks = offerOptions.offerToReceiveAudio;
+ }
+ if (offerOptions.offerToReceiveVideo !== undefined) {
+ numVideoTracks = offerOptions.offerToReceiveVideo;
+ }
+ }
+ if (this.localStreams.length) {
+ // Push local streams.
+ this.localStreams[0].getTracks().forEach(function(track) {
+ tracks.push({
+ kind: track.kind,
+ track: track,
+ wantReceive: track.kind === 'audio' ?
+ numAudioTracks > 0 : numVideoTracks > 0
+ });
+ if (track.kind === 'audio') {
+ numAudioTracks--;
+ } else if (track.kind === 'video') {
+ numVideoTracks--;
+ }
+ });
+ }
+ // Create M-lines for recvonly streams.
+ while (numAudioTracks > 0 || numVideoTracks > 0) {
+ if (numAudioTracks > 0) {
+ tracks.push({
+ kind: 'audio',
+ wantReceive: true
+ });
+ numAudioTracks--;
+ }
+ if (numVideoTracks > 0) {
+ tracks.push({
+ kind: 'video',
+ wantReceive: true
+ });
+ numVideoTracks--;
+ }
+ }
- that.setTopRight = function (topRight) {
- _topRight.x = topRight.x;
- _topRight.y = topRight.y;
+ var sdp = SDPUtils.writeSessionBoilerplate();
+ var transceivers = [];
+ tracks.forEach(function(mline, sdpMLineIndex) {
+ // For each track, create an ice gatherer, ice transport, dtls transport,
+ // potentially rtpsender and rtpreceiver.
+ var track = mline.track;
+ var kind = mline.kind;
+ var mid = SDPUtils.generateIdentifier();
+
+ var transports = self._createIceAndDtlsTransports(mid, sdpMLineIndex);
+
+ var localCapabilities = RTCRtpSender.getCapabilities(kind);
+ var rtpSender;
+ var rtpReceiver;
+
+ // generate an ssrc now, to be used later in rtpSender.send
+ var sendSsrc = (2 * sdpMLineIndex + 1) * 1001;
+ if (track) {
+ rtpSender = new RTCRtpSender(track, transports.dtlsTransport);
+ }
+
+ if (mline.wantReceive) {
+ rtpReceiver = new RTCRtpReceiver(transports.dtlsTransport, kind);
+ }
+
+ transceivers[sdpMLineIndex] = {
+ iceGatherer: transports.iceGatherer,
+ iceTransport: transports.iceTransport,
+ dtlsTransport: transports.dtlsTransport,
+ localCapabilities: localCapabilities,
+ remoteCapabilities: null,
+ rtpSender: rtpSender,
+ rtpReceiver: rtpReceiver,
+ kind: kind,
+ mid: mid,
+ sendSsrc: sendSsrc,
+ recvSsrc: null
+ };
+ var transceiver = transceivers[sdpMLineIndex];
+ sdp += SDPUtils.writeMediaSection(transceiver,
+ transceiver.localCapabilities, 'offer', self.localStreams[0]);
+ });
+
+ this._pendingOffer = transceivers;
+ var desc = new RTCSessionDescription({
+ type: 'offer',
+ sdp: sdp
+ });
+ if (arguments.length && typeof arguments[0] === 'function') {
+ window.setTimeout(arguments[0], 0, desc);
+ }
+ return Promise.resolve(desc);
};
- that.getTopRight = function () {
- return _topRight;
- };
+ window.RTCPeerConnection.prototype.createAnswer = function() {
+ var self = this;
+ var answerOptions;
+ if (arguments.length === 1 && typeof arguments[0] !== 'function') {
+ answerOptions = arguments[0];
+ } else if (arguments.length === 3) {
+ answerOptions = arguments[2];
+ }
- that.setCanvasSize = function (size) {
- _canvasSize.x = size.x;
- _canvasSize.y = size.y;
+ var sdp = SDPUtils.writeSessionBoilerplate();
+ this.transceivers.forEach(function(transceiver) {
+ // Calculate intersection of capabilities.
+ var commonCapabilities = self._getCommonCapabilities(
+ transceiver.localCapabilities,
+ transceiver.remoteCapabilities);
+
+ sdp += SDPUtils.writeMediaSection(transceiver, commonCapabilities,
+ 'answer', self.localStreams[0]);
+ });
+
+ var desc = new RTCSessionDescription({
+ type: 'answer',
+ sdp: sdp
+ });
+ if (arguments.length && typeof arguments[0] === 'function') {
+ window.setTimeout(arguments[0], 0, desc);
+ }
+ return Promise.resolve(desc);
};
- that.getCanvasSize = function () {
- return _canvasSize;
+ window.RTCPeerConnection.prototype.addIceCandidate = function(candidate) {
+ var mLineIndex = candidate.sdpMLineIndex;
+ if (candidate.sdpMid) {
+ for (var i = 0; i < this.transceivers.length; i++) {
+ if (this.transceivers[i].mid === candidate.sdpMid) {
+ mLineIndex = i;
+ break;
+ }
+ }
+ }
+ var transceiver = this.transceivers[mLineIndex];
+ if (transceiver) {
+ var cand = Object.keys(candidate.candidate).length > 0 ?
+ SDPUtils.parseCandidate(candidate.candidate) : {};
+ // Ignore Chrome's invalid candidates since Edge does not like them.
+ if (cand.protocol === 'tcp' && cand.port === 0) {
+ return;
+ }
+ // Ignore RTCP candidates, we assume RTCP-MUX.
+ if (cand.component !== '1') {
+ return;
+ }
+ // A dirty hack to make samples work.
+ if (cand.type === 'endOfCandidates') {
+ cand = {};
+ }
+ transceiver.iceTransport.addRemoteCandidate(cand);
+
+ // update the remoteDescription.
+ var sections = SDPUtils.splitSections(this.remoteDescription.sdp);
+ sections[mLineIndex + 1] += (cand.type ? candidate.candidate.trim()
+ : 'a=end-of-candidates') + '\r\n';
+ this.remoteDescription.sdp = sections.join('');
+ }
+ if (arguments.length > 1 && typeof arguments[1] === 'function') {
+ window.setTimeout(arguments[1], 0);
+ }
+ return Promise.resolve();
};
- that.getFrame = function () {
- if (!loaded) {
- return null;
- }
- return frame;
+ window.RTCPeerConnection.prototype.getStats = function() {
+ var promises = [];
+ this.transceivers.forEach(function(transceiver) {
+ ['rtpSender', 'rtpReceiver', 'iceGatherer', 'iceTransport',
+ 'dtlsTransport'].forEach(function(method) {
+ if (transceiver[method]) {
+ promises.push(transceiver[method].getStats());
+ }
+ });
+ });
+ var cb = arguments.length > 1 && typeof arguments[1] === 'function' &&
+ arguments[1];
+ return new Promise(function(resolve) {
+ var results = {};
+ Promise.all(promises).then(function(res) {
+ res.forEach(function(result) {
+ Object.keys(result).forEach(function(id) {
+ results[id] = result[id];
+ });
+ });
+ if (cb) {
+ window.setTimeout(cb, 0, results);
+ }
+ resolve(results);
+ });
+ });
};
+ },
- return that;
- };
+ // Attach a media stream to an element.
+ attachMediaStream: function(element, stream) {
+ logging('DEPRECATED, attachMediaStream will soon be removed.');
+ element.srcObject = stream;
+ },
+
+ reattachMediaStream: function(to, from) {
+ logging('DEPRECATED, reattachMediaStream will soon be removed.');
+ to.srcObject = from.srcObject;
+ }
+ }
+
+ // Expose public methods.
+ module.e = {
+ shimPeerConnection: edgeShim.shimPeerConnection,
+ attachMediaStream: edgeShim.attachMediaStream,
+ reattachMediaStream: edgeShim.reattachMediaStream
+ }
- module.exports = InputStream;
-
-/***/ },
-/* 65 */
-/***/ function(module, exports) {
- module.exports = require("get-pixels");
/***/ },
-/* 66 */
+/* 151 */
/***/ function(module, exports, __webpack_require__) {
- "use strict";
-
- var CVUtils = __webpack_require__(5),
- Ndarray = __webpack_require__(67),
- Interp2D = __webpack_require__(68).d2;
-
- var FrameGrabber = {};
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
+ 'use strict';
- FrameGrabber.create = function (inputStream) {
- var _that = {},
- _streamConfig = inputStream.getConfig(),
- _video_size = CVUtils.imageRef(inputStream.getRealWidth(), inputStream.getRealHeight()),
- _canvasSize = inputStream.getCanvasSize(),
- _size = CVUtils.imageRef(inputStream.getWidth(), inputStream.getHeight()),
- _topRight = inputStream.getTopRight(),
- _data = new Uint8Array(_size.x * _size.y),
- _grayData = new Uint8Array(_video_size.x * _video_size.y),
- _canvasData = new Uint8Array(_canvasSize.x * _canvasSize.y),
- _grayImageArray = Ndarray(_grayData, [_video_size.y, _video_size.x]).transpose(1, 0),
- _canvasImageArray = Ndarray(_canvasData, [_canvasSize.y, _canvasSize.x]).transpose(1, 0),
- _targetImageArray = _canvasImageArray.hi(_topRight.x + _size.x, _topRight.y + _size.y).lo(_topRight.x, _topRight.y),
- _stepSizeX = _video_size.x / _canvasSize.x,
- _stepSizeY = _video_size.y / _canvasSize.y;
+ var logging = __webpack_require__(0).log;
+ var browserDetails = __webpack_require__(0).browserDetails;
+
+ var firefoxShim = {
+ shimOnTrack: function() {
+ if (typeof window === 'object' && window.RTCPeerConnection && !('ontrack' in
+ window.RTCPeerConnection.prototype)) {
+ Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {
+ get: function() { return this._ontrack; },
+ set: function(f) {
+ var self = this;
+ if (this._ontrack) {
+ this.removeEventListener('track', this._ontrack);
+ this.removeEventListener('addstream', this._ontrackpoly);
+ }
+ this.addEventListener('track', this._ontrack = f);
+ this.addEventListener('addstream', this._ontrackpoly = function(e) {
+ e.stream.getTracks().forEach(function(track) {
+ var event = new Event('track');
+ event.track = track;
+ event.receiver = {track: track};
+ event.streams = [e.stream];
+ this.dispatchEvent(event);
+ }.bind(this));
+ }.bind(this));
+ }
+ });
+ }
+ },
+
+ shimSourceObject: function() {
+ // Firefox has supported mozSrcObject since FF22, unprefixed in 42.
+ if (typeof window === 'object') {
+ if (window.HTMLMediaElement &&
+ !('srcObject' in window.HTMLMediaElement.prototype)) {
+ // Shim the srcObject property, once, when HTMLMediaElement is found.
+ Object.defineProperty(window.HTMLMediaElement.prototype, 'srcObject', {
+ get: function() {
+ return this.mozSrcObject;
+ },
+ set: function(stream) {
+ this.mozSrcObject = stream;
+ }
+ });
+ }
+ }
+ },
+
+ shimPeerConnection: function() {
+ // The RTCPeerConnection object.
+ if (!window.RTCPeerConnection) {
+ window.RTCPeerConnection = function(pcConfig, pcConstraints) {
+ if (browserDetails.version < 38) {
+ // .urls is not supported in FF < 38.
+ // create RTCIceServers with a single url.
+ if (pcConfig && pcConfig.iceServers) {
+ var newIceServers = [];
+ for (var i = 0; i < pcConfig.iceServers.length; i++) {
+ var server = pcConfig.iceServers[i];
+ if (server.hasOwnProperty('urls')) {
+ for (var j = 0; j < server.urls.length; j++) {
+ var newServer = {
+ url: server.urls[j]
+ };
+ if (server.urls[j].indexOf('turn') === 0) {
+ newServer.username = server.username;
+ newServer.credential = server.credential;
+ }
+ newIceServers.push(newServer);
+ }
+ } else {
+ newIceServers.push(pcConfig.iceServers[i]);
+ }
+ }
+ pcConfig.iceServers = newIceServers;
+ }
+ }
+ return new mozRTCPeerConnection(pcConfig, pcConstraints); // jscs:ignore requireCapitalizedConstructors
+ };
+ window.RTCPeerConnection.prototype = mozRTCPeerConnection.prototype;
+
+ // wrap static methods. Currently just generateCertificate.
+ if (mozRTCPeerConnection.generateCertificate) {
+ Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {
+ get: function() {
+ if (arguments.length) {
+ return mozRTCPeerConnection.generateCertificate.apply(null,
+ arguments);
+ } else {
+ return mozRTCPeerConnection.generateCertificate;
+ }
+ }
+ });
+ }
- console.log("FrameGrabber", JSON.stringify({
- videoSize: _grayImageArray.shape,
- canvasSize: _canvasImageArray.shape,
- stepSize: [_stepSizeX, _stepSizeY],
- size: _targetImageArray.shape,
- topRight: _topRight
- }));
+ window.RTCSessionDescription = mozRTCSessionDescription;
+ window.RTCIceCandidate = mozRTCIceCandidate;
+ }
+ },
- /**
- * Uses the given array as frame-buffer
- */
- _that.attachData = function (data) {
- _data = data;
+ shimGetUserMedia: function() {
+ // getUserMedia constraints shim.
+ var getUserMedia_ = function(constraints, onSuccess, onError) {
+ var constraintsToFF37_ = function(c) {
+ if (typeof c !== 'object' || c.require) {
+ return c;
+ }
+ var require = [];
+ Object.keys(c).forEach(function(key) {
+ if (key === 'require' || key === 'advanced' || key === 'mediaSource') {
+ return;
+ }
+ var r = c[key] = (typeof c[key] === 'object') ?
+ c[key] : {ideal: c[key]};
+ if (r.min !== undefined ||
+ r.max !== undefined || r.exact !== undefined) {
+ require.push(key);
+ }
+ if (r.exact !== undefined) {
+ if (typeof r.exact === 'number') {
+ r. min = r.max = r.exact;
+ } else {
+ c[key] = r.exact;
+ }
+ delete r.exact;
+ }
+ if (r.ideal !== undefined) {
+ c.advanced = c.advanced || [];
+ var oc = {};
+ if (typeof r.ideal === 'number') {
+ oc[key] = {min: r.ideal, max: r.ideal};
+ } else {
+ oc[key] = r.ideal;
+ }
+ c.advanced.push(oc);
+ delete r.ideal;
+ if (!Object.keys(r).length) {
+ delete c[key];
+ }
+ }
+ });
+ if (require.length) {
+ c.require = require;
+ }
+ return c;
+ };
+ if (browserDetails.version < 38) {
+ logging('spec: ' + JSON.stringify(constraints));
+ if (constraints.audio) {
+ constraints.audio = constraintsToFF37_(constraints.audio);
+ }
+ if (constraints.video) {
+ constraints.video = constraintsToFF37_(constraints.video);
+ }
+ logging('ff37: ' + JSON.stringify(constraints));
+ }
+ return navigator.mozGetUserMedia(constraints, onSuccess, onError);
};
- /**
- * Returns the used frame-buffer
- */
- _that.getData = function () {
- return _data;
+ navigator.getUserMedia = getUserMedia_;
+
+ // Returns the result of getUserMedia as a Promise.
+ var getUserMediaPromise_ = function(constraints) {
+ return new Promise(function(resolve, reject) {
+ navigator.getUserMedia(constraints, resolve, reject);
+ });
+ }
+
+ // Shim for mediaDevices on older versions.
+ if (!navigator.mediaDevices) {
+ navigator.mediaDevices = {getUserMedia: getUserMediaPromise_,
+ addEventListener: function() { },
+ removeEventListener: function() { }
+ };
+ }
+ navigator.mediaDevices.enumerateDevices =
+ navigator.mediaDevices.enumerateDevices || function() {
+ return new Promise(function(resolve) {
+ var infos = [
+ {kind: 'audioinput', deviceId: 'default', label: '', groupId: ''},
+ {kind: 'videoinput', deviceId: 'default', label: '', groupId: ''}
+ ];
+ resolve(infos);
+ });
};
- /**
- * Fetches a frame from the input-stream and puts into the frame-buffer.
- * The image-data is converted to gray-scale and then half-sampled if configured.
- */
- _that.grab = function () {
- var frame = inputStream.getFrame();
-
- if (frame) {
- this.scaleAndCrop(frame);
- return true;
- } else {
- return false;
- }
- };
+ if (browserDetails.version < 41) {
+ // Work around http://bugzil.la/1169665
+ var orgEnumerateDevices =
+ navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);
+ navigator.mediaDevices.enumerateDevices = function() {
+ return orgEnumerateDevices().then(undefined, function(e) {
+ if (e.name === 'NotFoundError') {
+ return [];
+ }
+ throw e;
+ });
+ };
+ }
+ },
- _that.scaleAndCrop = function (frame) {
- var x, y;
+ // Attach a media stream to an element.
+ attachMediaStream: function(element, stream) {
+ logging('DEPRECATED, attachMediaStream will soon be removed.');
+ element.srcObject = stream;
+ },
- // 1. compute full-sized gray image
- CVUtils.computeGray(frame.data, _grayData);
+ reattachMediaStream: function(to, from) {
+ logging('DEPRECATED, reattachMediaStream will soon be removed.');
+ to.srcObject = from.srcObject;
+ }
+ }
- // 2. interpolate
- for (y = 0; y < _canvasSize.y; y++) {
- for (x = 0; x < _canvasSize.x; x++) {
- _canvasImageArray.set(x, y, Interp2D(_grayImageArray, x * _stepSizeX, y * _stepSizeY) | 0);
- }
- }
+ // Expose public methods.
+ module.e = {
+ shimOnTrack: firefoxShim.shimOnTrack,
+ shimSourceObject: firefoxShim.shimSourceObject,
+ shimPeerConnection: firefoxShim.shimPeerConnection,
+ shimGetUserMedia: __webpack_require__(152),
+ attachMediaStream: firefoxShim.attachMediaStream,
+ reattachMediaStream: firefoxShim.reattachMediaStream
+ }
+
+
+/***/ },
+/* 152 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
+ 'use strict';
- // targetImageArray must be equal to targetSize
- if (_targetImageArray.shape[0] !== _size.x || _targetImageArray.shape[1] !== _size.y) {
- throw new Error("Shapes do not match!");
- }
+ var logging = __webpack_require__(0).log;
+ var browserDetails = __webpack_require__(0).browserDetails;
- // 3. crop
- for (y = 0; y < _size.y; y++) {
- for (x = 0; x < _size.x; x++) {
- _data[y * _size.x + x] = _targetImageArray.get(x, y);
- }
- }
- }, _that.getSize = function () {
- return _size;
+ // Expose public methods.
+ module.e = function() {
+ // getUserMedia constraints shim.
+ var getUserMedia_ = function(constraints, onSuccess, onError) {
+ var constraintsToFF37_ = function(c) {
+ if (typeof c !== 'object' || c.require) {
+ return c;
+ }
+ var require = [];
+ Object.keys(c).forEach(function(key) {
+ if (key === 'require' || key === 'advanced' || key === 'mediaSource') {
+ return;
+ }
+ var r = c[key] = (typeof c[key] === 'object') ?
+ c[key] : {ideal: c[key]};
+ if (r.min !== undefined ||
+ r.max !== undefined || r.exact !== undefined) {
+ require.push(key);
+ }
+ if (r.exact !== undefined) {
+ if (typeof r.exact === 'number') {
+ r. min = r.max = r.exact;
+ } else {
+ c[key] = r.exact;
+ }
+ delete r.exact;
+ }
+ if (r.ideal !== undefined) {
+ c.advanced = c.advanced || [];
+ var oc = {};
+ if (typeof r.ideal === 'number') {
+ oc[key] = {min: r.ideal, max: r.ideal};
+ } else {
+ oc[key] = r.ideal;
+ }
+ c.advanced.push(oc);
+ delete r.ideal;
+ if (!Object.keys(r).length) {
+ delete c[key];
+ }
+ }
+ });
+ if (require.length) {
+ c.require = require;
+ }
+ return c;
};
+ if (browserDetails.version < 38) {
+ logging('spec: ' + JSON.stringify(constraints));
+ if (constraints.audio) {
+ constraints.audio = constraintsToFF37_(constraints.audio);
+ }
+ if (constraints.video) {
+ constraints.video = constraintsToFF37_(constraints.video);
+ }
+ logging('ff37: ' + JSON.stringify(constraints));
+ }
+ return navigator.mozGetUserMedia(constraints, onSuccess, onError);
+ };
- return _that;
- };
+ navigator.getUserMedia = getUserMedia_;
+
+ // Returns the result of getUserMedia as a Promise.
+ var getUserMediaPromise_ = function(constraints) {
+ return new Promise(function(resolve, reject) {
+ navigator.getUserMedia(constraints, resolve, reject);
+ });
+ }
+
+ // Shim for mediaDevices on older versions.
+ if (!navigator.mediaDevices) {
+ navigator.mediaDevices = {getUserMedia: getUserMediaPromise_,
+ addEventListener: function() { },
+ removeEventListener: function() { }
+ };
+ }
+ navigator.mediaDevices.enumerateDevices =
+ navigator.mediaDevices.enumerateDevices || function() {
+ return new Promise(function(resolve) {
+ var infos = [
+ {kind: 'audioinput', deviceId: 'default', label: '', groupId: ''},
+ {kind: 'videoinput', deviceId: 'default', label: '', groupId: ''}
+ ];
+ resolve(infos);
+ });
+ };
- module.exports = FrameGrabber;
+ if (browserDetails.version < 41) {
+ // Work around http://bugzil.la/1169665
+ var orgEnumerateDevices =
+ navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);
+ navigator.mediaDevices.enumerateDevices = function() {
+ return orgEnumerateDevices().then(undefined, function(e) {
+ if (e.name === 'NotFoundError') {
+ return [];
+ }
+ throw e;
+ });
+ };
+ }
+ }
+
/***/ },
-/* 67 */
+/* 153 */
/***/ function(module, exports) {
- module.exports = require("ndarray");
+ module.e = __WEBPACK_EXTERNAL_MODULE_153__;
/***/ },
-/* 68 */
+/* 154 */
+/***/ function(module, exports) {
+
+ module.e = __WEBPACK_EXTERNAL_MODULE_154__;
+
+/***/ },
+/* 155 */
/***/ function(module, exports) {
- module.exports = require("ndarray-linear-interpolate");
+ module.e = __WEBPACK_EXTERNAL_MODULE_155__;
+
+/***/ },
+/* 156 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.e = __webpack_require__(49);
+
/***/ }
-/******/ ]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XNDb250YWluZXIuZG9tLmltYWdlLndpZHRoID0gX2lucHV0U3RyZWFtLmdldENhbnZhc1NpemUoKS54O1xyXG4gICAgICAgIF9jYW52YXNDb250YWluZXIuZG9tLmltYWdlLmhlaWdodCA9IF9pbnB1dFN0cmVhbS5nZXRDYW52YXNTaXplKCkueTtcclxuXHJcbiAgICAgICAgX2NhbnZhc0NvbnRhaW5lci5kb20ub3ZlcmxheSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXCJjYW52YXMuZHJhd2luZ0J1ZmZlclwiKTtcclxuICAgICAgICBpZiAoIV9jYW52YXNDb250YWluZXIuZG9tLm92ZXJsYXkpIHtcclxuICAgICAgICAgICAgX2NhbnZhc0NvbnRhaW5lci5kb20ub3ZlcmxheSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJjYW52YXNcIik7XHJcbiAgICAgICAgICAgIF9jYW52YXNDb250YWluZXIuZG9tLm92ZXJsYXkuY2xhc3NOYW1lID0gXCJkcmF3aW5nQnVmZmVyXCI7XHJcbiAgICAgICAgICAgIGlmICgkdmlld3BvcnQpIHtcclxuICAgICAgICAgICAgICAgICR2aWV3cG9ydC5hcHBlbmRDaGlsZChfY2FudmFzQ29udGFpbmVyLmRvbS5vdmVybGF5KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB2YXIgY2xlYXJGaXggPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiYnJcIik7XHJcbiAgICAgICAgICAgIGNsZWFyRml4LnNldEF0dHJpYnV0ZShcImNsZWFyXCIsIFwiYWxsXCIpO1xyXG4gICAgICAgICAgICBpZiAoJHZpZXdwb3J0KSB7XHJcbiAgICAgICAgICAgICAgICAkdmlld3BvcnQuYXBwZW5kQ2hpbGQoY2xlYXJGaXgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIF9jYW52YXNDb250YWluZXIuY3R4Lm92ZXJsYXkgPSBfY2FudmFzQ29udG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mtlci5pbWFnZURhdGEpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuOyAvLyBhbGwgd29ya2VycyBhcmUgYnVzeVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgX2ZyYW1lZ3JhYmJlci5hdHRhY2hEYXRhKF9pbnB1dEltYWdlV3JhcHBlci5kYXRhKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKF9mcmFtZWdyYWJiZXIuZ3JhYigpKSB7XHJcbiAgICAgICAgICAgIGlmIChhdmFpbGFibGVXb3JrZXIpIHtcclxuICAgICAgICAgICAgICAgIGF2YWlsYWJsZVdvcmtlci5idXN5ID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIGF2YWlsYWJsZVdvcmtlci53b3JrZXIucG9zdE1lc3NhZ2Uoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNtZDogJ3Byb2Nlc3MnLFxyXG4gICAgICAgICAgICAgICAgICAgIGltYWdlRGF0YTogYXZhaWxhYmxlV29ya2VyLmltYWdlRGF0YVxyXG4gICAgICAgICAgICAgICAgfSwgW2F2YWlsYWJsZVdvcmtlci5pbWFnZURhdGEuYnVmZmVyXSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBsb2NhdGVBbmREZWNvZGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgbG9jYXRlQW5kRGVjb2RlKCk7XHJcbiAgICB9XHJcbn1cclxuXHJcbmZ1bmN0aW9uIHN0YXJ0Q29udGludW91c1VwZGF0ZSgpIHtcclxuICAgIHZhciBuZXh0ID0gbnVsbCxcclxuICAgICAgICBkZWxheSA9IDEwMDAgLyAoX2NvbmZpZy5mcmVxdWVuY3kgfHwgNjApO1xyXG5cclxuICAgIF9zdG9wcGVkID0gZmFsc2U7XHJ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XG5cclxuICAgIHdvcmtlclRocmVhZC53b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24oZSkge1xyXG4gICAgICAgIGlmIChlLmRhdGEuZXZlbnQgPT09ICdpbml0aWFsaXplZCcpIHtcclxuICAgICAgICAgICAgVVJMLnJldm9rZU9iamVjdFVSTChibG9iVVJMKTtcclxuICAgICAgICAgICAgd29ya2VyVGhyZWFkLmJ1c3kgPSBmYWxzZTtcclxuICAgICAgICAgICAgd29ya2VyVGhyZWFkLmltYWdlRGF0YSA9IG5ldyBVaW50OEFycmF5KGUuZGF0YS5pbWFnZURhdGEpO1xyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50KSB7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIldvcmtlciBpbml0aWFsaXplZFwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gY2Iod29ya2VyVGhyZWFkKTtcclxuICAgICAgICB9IGVsc2UgaWYgKGUuZGF0YS5ldmVudCA9PT0gJ3Byb2Nlc3NlZCcpIHtcclxuICAgICAgICAgICAgd29ya2VyVGhyZWFkLmltYWdlRGF0YSA9IG5ldyBVaW50OEFycmF5KGUuZGF0YS5pbWFnZURhdGEpO1xyXG4gICAgICAgICAgICB3b3JrZXJUaHJlYWQuYnVzeSA9IGZhbHNlO1xyXG4gICAgICAgICAgICBwdWJsaXNoUmVzdWx0KGUuZGF0YS5yZXN1bHQsIHdvcmtlclRocmVhZC5pbWFnZURhdGEpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoZS5kYXRhLmV2ZW50ID09PSAnZXJyb3InKSB7XHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQpIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiV29ya2VyIGVycm9yOiBcIiArIGUuZGF0YS5tZXNzYWdlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH07XHJcbl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mFzOiBfY2FudmFzQ29udGFpbmVyLFxyXG4gICAgZGVjb2RlU2luZ2xlOiBmdW5jdGlvbihjb25maWcsIHJlc3VsdENhbGxiYWNrKSB7XHJcbiAgICAgICAgY29uZmlnID0gbWVyZ2Uoe1xyXG4gICAgICAgICAgICBpbnB1dFN0cmVhbToge1xyXG4gICAgICAgICAgICAgICAgdHlwZTogXCJJbWFnZVN0cmVhbVwiLFxyXG4gICAgICAgICAgICAgICAgc2VxdWVuY2U6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgc2l6ZTogODAwLFxyXG4gICAgICAgICAgICAgICAgc3JjOiBjb25maWcuc3JjXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIG51bU9mV29ya2VyczogKEVOVi5kZXZlbG9wbWVudCAmJiBjb25maWcuZGVidWcpID8gMCA6IDEsXHJcbiAgICAgICAgICAgIGxvY2F0b3I6IHtcclxuICAgICAgICAgICAgICAgIGhhbGZTYW1wbGU6IGZhbHNlXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LCBjb25maWcpO1xyXG4gICAgICAgIHRoaXMuaW5pdChjb25maWcsIGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICBFdmVudHMub25jZShcInByb2Nlc3NlZFwiLCBmdW5jdGlvbihyZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgIF9zdG9wcGVkID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIHJlc3VsdENhbGxiYWNrLmNhbGwobnVsbCwgcmVzdWx0KTtcclxuICAgICAgICAgICAgfSwgdHJ1ZSk7XHJcbiAgICAgICAgICAgIHN0YXJ0KCk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9LFxyXG4gICAgSW1hZ2VXcmFwcGVyOiBJbWFnZVdyYXBwZXIsXHJcbiAgICBJbWFnZURlYnVnOiBJbWFnZURlYnVnLFxyXG4gICAgUmVzdWx0Q29sbGVjdG9yOiBSZXN1bHRDb2xsZWN0b3JcclxufTtcclxu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yBpKyspIHtcclxuICAgICAgICBkYXRhW2kgKiB3aWR0aF0gPSBkYXRhW2kgKiB3aWR0aCArICh3aWR0aCAtIDEpXSA9IDA7XHJcbiAgICB9XHJcbn07XHJcblxyXG4vKipcclxuICogSW52ZXJ0cyBhIGJpbmFyeSBpbWFnZSBpbiBwbGFjZVxyXG4gKi9cclxuSW1hZ2VXcmFwcGVyLnByb3RvdHlwZS5pbnZlcnQgPSBmdW5jdGlvbigpIHtcclxuICAgIHZhciBkYXRhID0gdGhpcy5kYXRhLCBsZW5ndGggPSBkYXRhLmxlbmd0aDtcclxuXHJcbiAgICB3aGlsZSAobGVuZ3RoLS0pIHtcclxuICAgICAgICBkYXRhW2xlbmd0aF0gPSBkYXRhW2xlbmd0aF0gPyAwIDogMTtcclxuICAgIH1cclxufTtcclxuXHJcbkltYWdlV3JhcHBlci5wcm90b3R5cGUuY29udm9sdmUgPSBmdW5jdGlvbihrZXJuZWwpIHtcclxuICAgIHZhciB4LCB5LCBreCwga3ksIGtTaXplID0gKGtlcm5lbC5sZW5ndGggLyAyKSB8IDAsIGFjY3UgPSAwO1xyXG4gICAgZm9yICggeSA9IDA7IHkgPCB0aGlzLnNpemUueTsgeSsrKSB7XHJcbiAgICAgICAgZm9yICggeCA9IDA7IHggPCB0aGlzLnNpemUueDsgeCsrKSB7XHJcbiAgICAgICAgICAgIGFjY3UgPSAwO1xyXG4gICAgICAgICAgICBmb3IgKCBreSA9IC1rU2l6ZTsga3kgPD0ga1NpemU7IGt5KyspIHtcclxuICAgICAgICAgICAgICAgIGZvciAoIGt4ID0gLWtTaXplOyBreCA8PSBrU2l6ZTsga3grKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjY3UgKz0ga2VybmVsW2t5ICsga1NpemVdW2t4ICsga1NpemVdICogdGhpcy5nZXRTYWZlKHggKyBreCwgeSArIGt5KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0aGlzLmRhdGFbeSAqIHRoaXMuc2l6ZS54ICsgeF0gPSBhY2N1O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufTtcclxuXHJcbkltYWdlV3JhcHBlci5wcm90b3R5cGUubW9tZW50cyA9IGZ1bmN0aW9uKGxhYmVsY291bnQpIHtcclxuICAgIHZhciBkYXRhID0gdGhpcy5kYXRhLFxyXG4gICAgICAgIHgsXHJcbiAgICAgICAgeSxcclxuICAgICAgICBoZWlnaHQgPSB0aGlzLnNpemUueSxcclxuICAgICAgICB3aWR0aCA9IHRoaXMuc2l6ZS54LFxyXG4gICAgICAgIHZhbCxcclxuICAgICAgICB5c3EsXHJcbiAgICAgICAgbGFiZWxzdW0gPSBbXSxcclxuICAgICAgICBpLFxyXG4gICAgICAgIGxhYmVsLFxyXG4gICAgICAgIG11MTEsXHJcbiAgICAgICAgbXUwMixcclxuICAgICAgICBtdTIwLFxyXG4gICAgICAgIHhfLFxyXG4gICAgICAgIHlfLFxyXG4gICAgICAgIHRtcCxcclxuICAgICAgICByZXN1bHQgPSBbXSxcclxuICAgICAgICBQSSA9IE1hdGguUEksXHJcbiAgICAgICAgUElfNCA9IFBJIC8gNDtcclxuXHJcbiAgICBpZiAobGFiZWxjb3VudCA8PSAwKSB7XHJcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IGxhYmVsY291bnQ7IGkrKykge1xyXG4gICAgICAgIGxhYmVsc3VtW2ldID0ge1xyXG4gICAgICAgICAgICBtMDA6IDAsXHJcbiAgICAgICAgICAgIG0wMTogMCxcclxuICAgICAgICAgICAgbTEwOiAwLFxyXG4gICAgICAgICAgICBtMTE6IDAsXHJcbiAgICAgICAgICAgIG0wMjogMCxcclxuICAgICAgICAgICAgbTIwOiAwLFxyXG4gICAgICAgICAgICB0aGV0YTogMCxcclxuICAgICAgICAgICAgcmFkOiAwXHJcbiAgICAgICAgfTtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCB5ID0gMDsgeSA8IGhlaWdodDsgeSsrKSB7XHJcbiAgICAgICAgeXNxID0geSAqIHk7XHJcbiAgICAgICAgZm9yICggeCA9IDA7IHggPCB3aWR0aDsgeCsrKSB7XHJcbiAgICAgICAgICAgIHZhbCA9IGRhdGFbeSAqIHdpZHRoICsgeF07XHJcbiAgICAgICAgICAgIGlmICh2YWwgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbCA9IGxhYmVsc3VtW3ZhbCAtIDFdO1xyXG4gICAgICAgICAgICAgICAgbGFiZWwubTAwICs9IDE7XHJcbiAgICAgICAgICAgICAgICBsYWJlbC5tMDEgKz0geTtcclxuICAgICAgICAgICAgICAgIGxhYmVsLm0xMCArPSB4O1xyXG4gICAgICAgICAgICAgICAgbGFiZWwubTExICs9IHggKiB5O1xyXG4gICAgICAgICAgICAgICAgbGFiZWwubTAyICs9IHlzcTtcclxuICAgICAgICAgICAgICAgIGxhYmVsLm0yMCArPSB4ICogeDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IGxhYmVsY291bnQ7IGkrKykge1xyXG4gICAgICAgIGxhYmVsID0gbGFiZWxzdW1baV07XHJcbiAgICAgICAgaWYgKCFpc05hTihsYWJlbC5tMDApICYmIGxhYmVsLm0wMCAhPT0gMCkge1xyXG4gICAgICAgICAgICB4XyA9IGxhYmVsLm0xMCAvIGxhYmVsLm0wMDtcclxuICAgICAgICAgICAgeV8gPSBsYWJlbC5tMDEgLyBsYWJlbC5tMDA7XHJcbiAgICAgICAgICAgIG11MTEgPSBsYWJlbC5tMTEgLyBsYWJlbC5tMDAgLSB4XyAqIHlfO1xyXG4gICAgICAgICAgICBtdTAyID0gbGFiZWwubTAyIC8gbGFiZWwubTAwIC0geV8gKiB5XztcclxuICAgICAgICAgICAgbXUyMCA9IGxhYmVsLm0yMCAvIGxhYmVsLm0wMCAtIHhfICogeF87XHJcbiAgICAgICAgICAgIHRtcCA9IChtdTAyIC0gbXUyMCkgLyAoMiAqIG11MTEpO1xyXG4gICAgICAgICAgICB0bXAgPSAwLjUgKiBNYXRoLmF0YW4odG1wKSArIChtdTExID49IDAgPyBQSV80IDogLVBJXzQgKSArIFBJO1xyXG4gICAgICAgICAgICBsYWJlbC50aGV0YSA9ICh0bXAgKiAxODAgLyBQSSArIDkwKSAlIDE4MCAtIDkwO1xyXG4gICAgICAgICAgICBpZiAobGFiZWwudGhldGEgPCAwKSB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbC50aGV0YSArPSAxODA7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGFiZWwucmFkID0gdG1wID4gUEkgPyB0bXAgLSBQSSA6IHRtcDtcclxuICAgICAgICAgICAgbGFiZWwudmVjID0gdmVjMi5jbG9uZShbTWF0aC5jb3ModG1wKSwgTWF0aC5zaW4odG1wKV0pO1xyXG4gICAgICAgICAgICByZXN1bHQucHVzaChsYWJlbCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiByZXN1bHQ7XHJcbn07XHJcblxyXG4vKipcclxuICogRGlzcGxheXMgdGhlIHtJbWFnZVdyYXBwZXJ9IGluIGEgZ2l2ZW4gY2FudmFzXHJcbiAqIEBwYXJhbSBjYW52YXMge0NhbnZhc30gVGhlIGNhbnZhcyBlbGVtZW50IHRvIHdyaXRlIHRvXHJcbiAqIEBwYXJhbSBzY2FsZSB7TnVtYmVyfSBTY2FsZSB3aGljaCBpcyBhcHBsaWVkIHRvIGVhY2ggcGl4ZWwtdmFsdWVcclxuICovXHJcbkltYWdlV3JhcHBlci5wcm90b3R5cGUuc2hvdyA9IGZ1bmN0aW9uKGNhbnZhcywgc2NhbGUpIHtcclxuICAgIHZhciBjdHgsXHJcbiAgICAgICAgZnJhbWUsXHJcbiAgICAgICAgZGF0YSxcclxuICAgICAgICBjdXJyZW50LFxyXG4gICAgICAgIHBpeGVsLFxyXG4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jKSB7XHJcbiAgICAgICAgdmFyIGl0ZXJhdGlvbiwgbWF4SXRlcmF0aW9ucyA9IDEwLCB0b3AgPSBbXSwgcmVzdWx0ID0gW10sIGNlbnRlclBvcyA9IDAsIGN1cnJlbnRQb3MgPSAwO1xyXG5cclxuICAgICAgICBmdW5jdGlvbiB0cmFjZShpZHgsIGZvcndhcmQpIHtcclxuICAgICAgICAgICAgdmFyIGZyb20sIHRvLCB0b0lkeCwgcHJlZGljdGVkUG9zLCB0aHJlc2hvbGRYID0gMSwgdGhyZXNob2xkWSA9IE1hdGguYWJzKHZlY1sxXSAvIDEwKSwgZm91bmQgPSBmYWxzZTtcclxuXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIG1hdGNoKHBvcywgcHJlZGljdGVkKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAocG9zLnggPiAocHJlZGljdGVkLnggLSB0aHJlc2hvbGRYKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAmJiBwb3MueCA8IChwcmVkaWN0ZWQueCArIHRocmVzaG9sZFgpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICYmIHBvcy55ID4gKHByZWRpY3RlZC55IC0gdGhyZXNob2xkWSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgJiYgcG9zLnkgPCAocHJlZGljdGVkLnkgKyB0aHJlc2hvbGRZKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8vIGNoZWNrIGlmIHRoZSBuZXh0IGluZGV4IGlzIHdpdGhpbiB0aGUgdmVjIHNwZWNpZmljYXRpb25zXHJcbiAgICAgICAgICAgIC8vIGlmIG5vdCwgY2hlY2sgYXMgbG9uZyBhcyB0aGUgdGhyZXNob2xkIGlzIG1ldFxyXG5cclxuICAgICAgICAgICAgZnJvbSA9IHBvaW50c1tpZHhdO1xyXG4gICAgICAgICAgICBpZiAoZm9yd2FyZCkge1xyXG4gICAgICAgICAgICAgICAgcHJlZGljdGVkUG9zID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIHg6IGZyb20ueCArIHZlY1swXSxcclxuICAgICAgICAgICAgICAgICAgICB5OiBmcm9tLnkgKyB2ZWNbMV1cclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBwcmVkaWN0ZWRQb3MgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgeDogZnJvbS54IC0gdmVjWzBdLFxyXG4gICAgICAgICAgICAgICAgICAgIHk6IGZyb20ueSAtIHZlY1sxXVxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgdG9JZHggPSBmb3J3YXJkID8gaWR4ICsgMSA6IGlkeCAtIDE7XHJcbiAgICAgICAgICAgIHRvID0gcG9pbnRzW3RvSWR4XTtcclxuICAgICAgICAgICAgd2hpbGUgKHRvICYmICggZm91bmQgPSBtYXRjaCh0bywgcHJlZGljdGVkUG9zKSkgIT09IHRydWUgJiYgKE1hdGguYWJzKHRvLnkgLSBmcm9tLnkpIDwgdmVjWzFdKSkge1xyXG4gICAgICAgICAgICAgICAgdG9JZHggPSBmb3J3YXJkID8gdG9JZHggKyAxIDogdG9JZHggLSAxO1xyXG4gICAgICAgICAgICAgICAgdG8gPSBwb2ludHNbdG9JZHhdO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gZm91bmQgPyB0b0lkeCA6IG51bGw7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmb3IgKCBpdGVyYXRpb24gPSAwOyBpdGVyYXRpb24gPCBtYXhJdGVyYXRpb25zOyBpdGVyYXRpb24rKykge1xyXG4gICAgICAgICAgICAvLyByYW5kb21seSBzZWxlY3QgcG9pbnQgdG8gc3RhcnQgd2l0aFxyXG4gICAgICAgICAgICBjZW50ZXJQb3MgPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiBwb2ludHMubGVuZ3RoKTtcclxuXHJcbiAgICAgICAgICAgIC8vIHRyYWNlIGZvcndhcmRcclxuICAgICAgICAgICAgdG9wID0gW107XHJcbiAgICAgICAgICAgIGN1cnJlbnRQb3MgPSBjZW50ZXJQb3M7XHJcbiAgICAgICAgICAgIHRvcC5wdXNoKHBvaW50c1tjdXJyZW50UG9zXSk7XHJcbiAgICAgICAgICAgIHdoaWxlICgoIGN1cnJlbnRQb3MgPSB0cmFjZShjdXJyZW50UG9zLCB0cnVlKSkgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIHRvcC5wdXNoKHBvaW50c1tjdXJyZW50UG9zXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKGNlbnRlclBvcyA+IDApIHtcclxuICAgICAgICAgICAgICAgIGN1cnJlbnRQb3MgPSBjZW50ZXJQb3M7XHJcbiAgICAgICAgICAgICAgICB3aGlsZSAoKCBjdXJyZW50UG9zID0gdHJhY2UoY3VycmVudFBvcywgZmFsc2UpKSAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRvcC5wdXNoKHBvaW50c1tjdXJyZW50UG9zXSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh0b3AubGVuZ3RoID4gcmVzdWx0Lmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gdG9wO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiByZXN1bHQ7XHJcbiAgICB9XHJcbn07XHJcblxyXG5DVlV0aWxzLkRJTEFURSA9IDE7XHJcbkNWVXRpbHMuRVJPREUgPSAyO1xyXG5cclx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AgICAgICAgICAgICAgICAoMC4yOTkgKiBjYW52YXNEYXRhWyh0b3BSb3dJZHggKyAxKSAqIDQgKyAwXSArXHJcbiAgICAgICAgICAgICAgICAgMC41ODcgKiBjYW52YXNEYXRhWyh0b3BSb3dJZHggKyAxKSAqIDQgKyAxXSArXHJcbiAgICAgICAgICAgICAgICAgMC4xMTQgKiBjYW52YXNEYXRhWyh0b3BSb3dJZHggKyAxKSAqIDQgKyAyXSkgK1xyXG4gICAgICAgICAgICAgICAgKDAuMjk5ICogY2FudmFzRGF0YVsoYm90dG9tUm93SWR4KSAqIDQgKyAwXSArXHJcbiAgICAgICAgICAgICAgICAgMC41ODcgKiBjYW52YXNEYXRhWyhib3R0b21Sb3dJZHgpICogNCArIDFdICtcclxuICAgICAgICAgICAgICAgICAwLjExNCAqIGNhbnZhc0RhdGFbKGJvdHRvbVJvd0lkeCkgKiA0ICsgMl0pICtcclxuICAgICAgICAgICAgICAgICgwLjI5OSAqIGNhbnZhc0RhdGFbKGJvdHRvbVJvd0lkeCArIDEpICogNCArIDBdICtcclxuICAgICAgICAgICAgICAgICAwLjU4NyAqIGNhbnZhc0RhdGFbKGJvdHRvbVJvd0lkeCArIDEpICogNCArIDFdICtcclxuICAgICAgICAgICAgICAgICAwLjExNCAqIGNhbnZhc0RhdGFbKGJvdHRvbVJvd0lkeCArIDEpICogNCArIDJdKSkgLyA0KTtcclxuICAgICAgICAgICAgb3V0SW1nSWR4Kys7XHJcbiAgICAgICAgICAgIHRvcFJvd0lkeCA9IHRvcFJvd0lkeCArIDI7XHJcbiAgICAgICAgICAgIGJvdHRvbVJvd0lkeCA9IGJvdHRvbVJvd0lkeCArIDI7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRvcFJvd0lkeCA9IHRvcFJvd0lkeCArIGluV2lkdGg7XHJcbiAgICAgICAgYm90dG9tUm93SWR4ID0gYm90dG9tUm93SWR4ICsgaW5XaWR0aDtcclxuICAgIH1cclxufTtcclxuXHJcbkNWVXRpbHMuY29tcHV0ZUdyYXkgPSBmdW5jdGlvbihpbWFnZURhdGEsIG91dEFycmF5LCBjb25maWcpIHtcclxuICAgIHZhciBsID0gKGltYWdlRGF0YS5sZW5ndGggLyA0KSB8IDAsXHJcbiAgICAgICAgaSxcclxuICAgICAgICBzaW5nbGVDaGFubmVsID0gY29uZmlnICYmIGNvbmZpZy5zaW5nbGVDaGFubmVsID09PSB0cnVlO1xyXG5cclxuICAgIGlmIChzaW5nbGVDaGFubmVsKSB7XHJcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGw7IGkrKykge1xyXG4gICAgICAgICAgICBvdXRBcnJheVtpXSA9IGltYWdlRGF0YVtpICogNCArIDBdO1xyXG4gICAgICAgIH1cclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGw7IGkrKykge1xyXG4gICAgICAgICAgICBvdXRBcnJheVtpXSA9IE1hdGguZmxvb3IoXHJcbiAgICAgICAgICAgICAgICAwLjI5OSAqIGltYWdlRGF0YVtpICogNCArIDBdICsgMC41ODcgKiBpbWFnZURhdGFbaSAqIDQgKyAxXSArIDAuMTE0ICogaW1hZ2VEYXRhW2kgKiA0ICsgMl0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufTtcclxuXHJcbkNWVXRpbHMubG9hZEltYWdlQXJyYXkgPSBmdW5jdGlvbihzcmMsIGNhbGxiYWNrLCBjYW52YXMpIHtcclxuICAgIGlmICghY2FudmFzKSB7XHJcbiAgICAgICAgY2FudmFzID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnY2FudmFzJyk7XHJcbiAgICB9XHJcbiAgICB2YXIgaW1nID0gbmV3IEltYWdlKCk7XHJcbiAgICBpbWcuY2FsbGJhY2sgPSBjYWxsYmFjaztcclxuICAgIGltZy5vbmxvYWQgPSBmdW5jdGlvbigpIHtcclxuICAgICAgICBjYW52YXMud2lkdGggPSB0aGlzLndpZHRoO1xyXG4gICAgICAgIGNhbnZhcy5oZWlnaH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AwLFxyXG4gICAgICAgIGcgPSAwLFxyXG4gICAgICAgIGIgPSAwO1xyXG5cclxuICAgIHJnYiA9IHJnYiB8fCBbMCwgMCwgMF07XHJcblxyXG4gICAgaWYgKGggPCA2MCkge1xyXG4gICAgICAgIHIgPSBjO1xyXG4gICAgICAgIGcgPSB4O1xyXG4gICAgfSBlbHNlIGlmIChoIDwgMTIwKSB7XHJcbiAgICAgICAgciA9IHg7XHJcbiAgICAgICAgZyA9IGM7XHJcbiAgICB9IGVsc2UgaWYgKGggPCAxODApIHtcclxuICAgICAgICBnID0gYztcclxuICAgICAgICBiID0geDtcclxuICAgIH0gZWxzZSBpZiAoaCA8IDI0MCkge1xyXG4gICAgICAgIGcgPSB4O1xyXG4gICAgICAgIGIgPSBjO1xyXG4gICAgfSBlbHNlIGlmIChoIDwgMzAwKSB7XHJcbiAgICAgICAgciA9IHg7XHJcbiAgICAgICAgYiA9IGM7XHJcbiAgICB9IGVsc2UgaWYgKGggPCAzNjApIHtcclxuICAgICAgICByID0gYztcclxuICAgICAgICBiID0geDtcclxuICAgIH1cclxuICAgIHJnYlswXSA9ICgociArIG0pICogMjU1KSB8IDA7XHJcbiAgICByZ2JbMV0gPSAoKGcgKyBtKSAqIDI1NSkgfCAwO1xyXG4gICAgcmdiWzJdID0gKChiICsgbSkgKiAyNTUpIHwgMDtcclxuICAgIHJldHVybiByZ2I7XHJcbn07XHJcblxyXG5DVlV0aWxzLl9jb21wdXRlRGl2aXNvcnMgPSBmdW5jdGlvbihuKSB7XHJcbiAgICB2YXIgbGFyZ2VEaXZpc29ycyA9IFtdLFxyXG4gICAgICAgIGRpdmlzb3JzID0gW10sXHJcbiAgICAgICAgaTtcclxuXHJcbiAgICBmb3IgKGkgPSAxOyBpIDwgTWF0aC5zcXJ0KG4pICsgMTsgaSsrKSB7XHJcbiAgICAgICAgaWYgKG4gJSBpID09PSAwKSB7XHJcbiAgICAgICAgICAgIGRpdmlzb3JzLnB1c2goaSk7XHJcbiAgICAgICAgICAgIGlmIChpICE9PSBuIC8gaSkge1xyXG4gICAgICAgICAgICAgICAgbGFyZ2VEaXZpc29ycy51bnNoaWZ0KE1hdGguZmxvb3IobiAvIGkpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBkaXZpc29ycy5jb25jYXQobGFyZ2VEaXZpc29ycyk7XHJcbn07XHJcblxyXG5DVlV0aWxzLl9jb21wdXRlSW50ZXJzZWN0aW9uID0gZnVuY3Rpb24oYXJyMSwgYXJyMikge1xyXG4gICAgdmFyIGkgPSAwLFxyXG4gICAgICAgIGogPSAwLFxyXG4gICAgICAgIHJlc3VsdCA9IFtdO1xyXG5cclxuICAgIHdoaWxlIChpIDwgYXJyMS5sZW5ndGggJiYgaiA8IGFycjIubGVuZ3RoKSB7XHJcbiAgICAgICAgaWYgKGFycjFbaV0gPT09IGFycjJbal0pIHtcclxuICAgICAgICAgICAgcmVzdWx0LnB1c2goYXJyMVtpXSk7XHJcbiAgICAgICAgICAgIGkrKztcclxuICAgICAgICAgICAgaisrO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoYXJyMVtpXSA+IGFycjJbal0pIHtcclxuICAgICAgICAgICAgaisrO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGkrKztcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gcmVzdWx0O1xyXG59O1xyXG5cclxuQ1ZVdGlscy5jYWxjdWxhdGVQYXRjaFNpemUgPSBmdW5jdGlvbihwYXRjaFNpemUsIGltZ1NpemUpIHtcclxuICAgIHZhciBkaXZpc29yc1ggPSB0aGlzLl9jb21wdXRlRGl2aXNvcnMoaW1nU2l6ZS54KSxcclxuICAgICAgICBkaXZpc29yc1kgPSB0aGlzLl9jb21wdXRlRGl2aXNvcnMoaW1nU2l6ZS55KSxcclxuICAgICAgICB3aWRlU2lkZSA9IE1hdGgubWF4KGltZ1NpemUueCwgaW1nU2l6ZS55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uICAgICAgICBmdW5jdGlvbiBhZGQocG9pbnRUb0FkZCkge1xyXG4gICAgICAgICAgICBwb2ludE1hcFtwb2ludFRvQWRkLmlkXSA9IHBvaW50VG9BZGQ7XHJcbiAgICAgICAgICAgIHBvaW50cy5wdXNoKHBvaW50VG9BZGQpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gdXBkYXRlQ2VudGVyKCkge1xyXG4gICAgICAgICAgICB2YXIgaSwgc3VtID0gMDtcclxuICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCBwb2ludHMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIHN1bSArPSBwb2ludHNbaV0ucmFkO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNlbnRlci5yYWQgPSBzdW0gLyBwb2ludHMubGVuZ3RoO1xyXG4gICAgICAgICAgICBjZW50ZXIudmVjID0gdmVjMi5jbG9uZShbTWF0aC5jb3MoY2VudGVyLnJhZCksIE1hdGguc2luKGNlbnRlci5yYWQpXSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpbml0KCk7XHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIGFkZDogZnVuY3Rpb24ocG9pbnRUb0FkZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKCFwb2ludE1hcFtwb2ludFRvQWRkLmlkXSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGFkZChwb2ludFRvQWRkKTtcclxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVDZW50ZXIoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZml0czogZnVuY3Rpb24ob3RoZXJQb2ludCkge1xyXG4gICAgICAgICAgICAgICAgLy8gY2hlY2sgY29zaW5lIHNpbWlsYXJpdHkgdG8gY2VudGVyLWFuZ2xlXHJcbiAgICAgICAgICAgICAgICB2YXIgc2ltaWxhcml0eSA9IE1hdGguYWJzKHZlYzIuZG90KG90aGVyUG9pbnQucG9pbnQudmVjLCBjZW50ZXIudmVjKSk7XHJcbiAgICAgICAgICAgICAgICBpZiAoc2ltaWxhcml0eSA+IHRocmVzaG9sZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXRQb2ludHM6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHBvaW50cztcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZ2V0Q2VudGVyOiBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBjZW50ZXI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG4gICAgfSxcclxuICAgIGNyZWF0ZVBvaW50OiBmdW5jdGlvbihuZXdQb2ludCwgaWQsIHByb3BlcnR5KSB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgcmFkOiBuZXdQb2ludFtwcm9wZXJ0eV0sXHJcbiAgICAgICAgICAgIHBvaW50OiBuZXdQb2ludCxcclxuICAgICAgICAgICAgaWQ6IGlkXHJcbiAgICAgICAgfTtcclxuICAgIH1cclxufTtcclxuXG5cblxuLyoqIFdFQlBBQ0sgRk9PVEVSICoqXG4gKiogRDovd29yay9xdWFnZ2FKUy9zcmMvY29tbW9uL2NsdXN0ZXIuanNcbiAqKi8iLCJtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoXCJnbC1tYXRyaXhcIik7XG5cblxuLyoqKioqKioqKioqKioqKioqXG4gKiogV0VCUEFDSyBGT09URVJcbiAqKiBleHRlcm5hbCBcImdsLW1hdHJpeFwiXG4gKiogbW9kdWxlIGlkID0gN1xuICoqIG1vZHVsZSBjaHVua3MgPSAwXG4gKiovIiwiZXhwb3J0IGRlZmF1bHQge1xyXG4gICAgaW5pdDogZnVuY3Rpb24oYXJyLCB2YWwpIHtcclxuICAgICAgICB2YXIgbCA9IGFyci5sZW5ndGg7XHJcbiAgICAgICAgd2hpbGUgKGwtLSkge1xyXG4gICAgICAgICAgICBhcnJbbF0gPSB2YWw7XHJcbiAgICAgICAgfVxyXG4gICAgfSxcclxuXHJcbiAgICAvKipcclxuICAgICAqIFNodWZmbGVzIHRoZSBjb250ZW50IG9mIGFuIGFycmF5XHJcbiAgICAgKiBAcmV0dXJuIHtBcnJheX0gdGhlIGFycmF5IGl0c2VsZiBzaHVmZmxlZFxyXG4gICAgICovXHJcbiAgICBzaHVmZmxlOiBmdW5jdGlvbihhcnIpIHtcclxuICAgICAgICB2YXIgaSA9IGFyci5sZW5ndGggLSAxLCBqLCB4O1xyXG4gICAgICAgIGZvciAoaTsgaSA+PSAwOyBpLS0pIHtcclxuICAgICAgICAgICAgaiA9IE1hdGguZmxvb3IoTWF0aC5yYW5kb20oKSAqIGkpO1xyXG4gICAgICAgICAgICB4ID0gYXJyW2ldO1xyXG4gICAgICAgICAgICBhcnJbaV0gPSBhcnJbal07XHJcbiAgICAgICAgICAgIGFycltqXSA9IHg7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBhcnI7XHJcbiAgICB9LFxyXG5cclxuICAgIHRvUG9pbnRMaXN0OiBmdW5jdGlvbihhcnIpIHtcclxuICAgICAgICB2YXIgaSwgaiwgcm93ID0gW10sIHJvd3MgPSBbXTtcclxuICAgICAgICBmb3IgKCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICByb3cgPSBbXTtcclxuICAgICAgICAgICAgZm9yICggaiA9IDA7IGogPCBhcnJbaV0ubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgIHJvd1tqXSA9IGFycltpXVtqXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByb3dzW2ldID0gXCJbXCIgKyByb3cuam9pbihcIixcIikgKyBcIl1cIjtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIFwiW1wiICsgcm93cy5qb2luKFwiLFxcclxcblwiKSArIFwiXVwiO1xyXG4gICAgfSxcclxuXHJcbiAgICAvKipcclxuICAgICAqIHJldHVybnMgdGhlIGVsZW1lbnRzIHdoaWNoJ3Mgc2NvcmUgaXMgYmlnZ2VyIHRoYW4gdGhlIHRocmVzaG9sZFxyXG4gICAgICogQHJldHVybiB7QXJyYXl9IHRoZSByZWR1Y2VkIGFycmF5XHJcbiAgICAgKi9cclxuICAgIHRocmVzaG9sZDogZnVuY3Rpb24oYXJyLCB0aHJlc2hvbGQsIHNjb3JlRnVuYykge1xyXG4gICAgICAgIHZhciBpLCBxdWV1ZSA9IFtdO1xyXG4gICAgICAgIGZvciAoIGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChzY29yZUZ1bmMuYXBwbHkoYXJyLCBbYXJyW2ldXSkgPj0gdGhyZXNob2xkKSB7XHJcbiAgICAgICAgICAgICAgICBxdWV1ZS5wdXNoKGFycltpXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHF1ZXVlO1xyXG4gICAgfSxcclxuXHJcbiAgICBtYXhJbmRleDogZnVuY3Rpb24oYXJyKSB7XHJcbiAgICAgICAgdmFyIGksIG1heCA9IDA7XHJcbiAgICAgICAgZm9yICggaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgaWYgKGFycltpXSA+IGFyclttYXhdKSB7XHJcbiAgICAgICAgICAgICAgICBtYXggPSBpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBtYXg7XHJcbiAgICB9LFxyXG5cclxuICAgIG1heDogZnVuY3Rpb24oYXJyKSB7XHJcbiAgICAgICAgdmFy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yA9IGxhYmVsSGlzdC5maWx0ZXIoZnVuY3Rpb24oZWwpIHtcclxuICAgICAgICByZXR1cm4gZWwudmFsID49IDU7XHJcbiAgICB9KTtcclxuXHJcbiAgICByZXR1cm4gdG9wTGFiZWxzO1xyXG59XHJcblxyXG4vKipcclxuICpcclxuICovXHJcbmZ1bmN0aW9uIGZpbmRCb3hlcyh0b3BMYWJlbHMsIG1heExhYmVsKSB7XHJcbiAgICB2YXIgaSxcclxuICAgICAgICBqLFxyXG4gICAgICAgIHN1bSxcclxuICAgICAgICBwYXRjaGVzID0gW10sXHJcbiAgICAgICAgcGF0Y2gsXHJcbiAgICAgICAgYm94LFxyXG4gICAgICAgIGJveGVzID0gW10sXHJcbiAgICAgICAgaHN2ID0gWzAsIDEsIDFdLFxyXG4gICAgICAgIHJnYiA9IFswLCAwLCAwXTtcclxuXHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IHRvcExhYmVscy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIHN1bSA9IF9wYXRjaExhYmVsR3JpZC5kYXRhLmxlbmd0aDtcclxuICAgICAgICBwYXRjaGVzLmxlbmd0aCA9IDA7XHJcbiAgICAgICAgd2hpbGUgKHN1bS0tKSB7XHJcbiAgICAgICAgICAgIGlmIChfcGF0Y2hMYWJlbEdyaWQuZGF0YVtzdW1dID09PSB0b3BMYWJlbHNbaV0ubGFiZWwpIHtcclxuICAgICAgICAgICAgICAgIHBhdGNoID0gX2ltYWdlVG9QYXRjaEdyaWQuZGF0YVtzdW1dO1xyXG4gICAgICAgICAgICAgICAgcGF0Y2hlcy5wdXNoKHBhdGNoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBib3ggPSBib3hGcm9tUGF0Y2hlcyhwYXRjaGVzKTtcclxuICAgICAgICBpZiAoYm94KSB7XHJcbiAgICAgICAgICAgIGJveGVzLnB1c2goYm94KTtcclxuXHJcbiAgICAgICAgICAgIC8vIGRyYXcgcGF0Y2gtbGFiZWxzIGlmIHJlcXVlc3RlZFxyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50ICYmIF9jb25maWcuZGVidWcuc2hvd1JlbWFpbmluZ1BhdGNoTGFiZWxzKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IHBhdGNoZXMubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBwYXRjaCA9IHBhdGNoZXNbal07XHJcbiAgICAgICAgICAgICAgICAgICAgaHN2WzBdID0gKHRvcExhYmVsc1tpXS5sYWJlbCAvIChtYXhMYWJlbCArIDEpKSAqIDM2MDtcclxuICAgICAgICAgICAgICAgICAgICBDVlV0aWxzLmhzdjJyZ2IoaHN2LCByZ2IpO1xyXG4gICAgICAgICAgICAgICAgICAgIEltYWdlRGVidWcuZHJhd1JlY3QocGF0Y2gucG9zLCBfc3ViSW1hZ2VXcmFwcGVyLnNpemUsIF9jYW52YXNDb250YWluZXIuY3R4LmJpbmFyeSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge2NvbG9yOiBcInJnYihcIiArIHJnYi5qb2luKFwiLFwiKSArIFwiKVwiLCBsaW5lV2lkdGg6IDJ9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBib3hlcztcclxufVxyXG5cclxuLyoqXHJcbiAqIEZpbmQgc2ltaWxhciBtb21lbnRzICh2aWEgY2x1c3RlcilcclxuICogQHBhcmFtIHtPYmplY3R9IG1vbWVudHNcclxuICovXHJcbmZ1bmN0aW9uIHNpbWlsYXJNb21lbnRzKG1vbWVudHMpIHtcclxuICAgIHZhciBjbHVzdGVycyA9IENWVXRpbHMuY2x1c3Rlcihtb21lbnRzLCAwLjkwKTtcclxuICAgIHZhciB0b3BDbHVzdGVyID0gQ1ZVdGlscy50b3BHZW5lcmljKGNsdXN0ZXJzLCAxLCBmdW5jdGlvbihlKSB7X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Mikge1xyXG4gICAgICAgICAgICBtYXRjaGluZ01vbWVudHMgPSBzaW1pbGFyTW9tZW50cyhlbGlnaWJsZU1vbWVudHMpO1xyXG4gICAgICAgICAgICBhdmcgPSAwO1xyXG4gICAgICAgICAgICAvLyBkZXRlcm1pbmUgdGhlIHNpbWlsYXJpdHkgb2YgdGhlIG1vbWVudHNcclxuICAgICAgICAgICAgZm9yICggayA9IDA7IGsgPCBtYXRjaGluZ01vbWVudHMubGVuZ3RoOyBrKyspIHtcclxuICAgICAgICAgICAgICAgIGF2ZyArPSBtYXRjaGluZ01vbWVudHNba10ucmFkO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBPbmx5IHR3byBvZiB0aGUgbW9tZW50cyBhcmUgYWxsb3dlZCBub3QgdG8gZml0IGludG8gdGhlIGVxdWF0aW9uXHJcbiAgICAgICAgICAgIC8vIGFkZCB0aGUgcGF0Y2ggdG8gdGhlIHNldFxyXG4gICAgICAgICAgICBpZiAobWF0Y2hpbmdNb21lbnRzLmxlbmd0aCA+IDFcclxuICAgICAgICAgICAgICAgICAgICAmJiBtYXRjaGluZ01vbWVudHMubGVuZ3RoID49IChlbGlnaWJsZU1vbWVudHMubGVuZ3RoIC8gNCkgKiAzXHJcbiAgICAgICAgICAgICAgICAgICAgJiYgbWF0Y2hpbmdNb21lbnRzLmxlbmd0aCA+IG1vbWVudHMubGVuZ3RoIC8gNCkge1xyXG4gICAgICAgICAgICAgICAgYXZnIC89IG1hdGNoaW5nTW9tZW50cy5sZW5ndGg7XHJcbiAgICAgICAgICAgICAgICBwYXRjaCA9IHtcclxuICAgICAgICAgICAgICAgICAgICBpbmRleDogcGF0Y2hQb3NbMV0gKiBfbnVtUGF0Y2hlcy54ICsgcGF0Y2hQb3NbMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgcG9zOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHg6IHgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHk6IHlcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGJveDogW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2ZWMyLmNsb25lKFt4LCB5XSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZlYzIuY2xvbmUoW3ggKyBfc3ViSW1hZ2VXcmFwcGVyLnNpemUueCwgeV0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB2ZWMyLmNsb25lKFt4ICsgX3N1YkltYWdlV3JhcHBlci5zaXplLngsIHkgKyBfc3ViSW1hZ2VXcmFwcGVyLnNpemUueV0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB2ZWMyLmNsb25lKFt4LCB5ICsgX3N1YkltYWdlV3JhcHBlci5zaXplLnldKVxyXG4gICAgICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgICAgICAgICAgbW9tZW50czogbWF0Y2hpbmdNb21lbnRzLFxyXG4gICAgICAgICAgICAgICAgICAgIHJhZDogYXZnLFxyXG4gICAgICAgICAgICAgICAgICAgIHZlYzogdmVjMi5jbG9uZShbTWF0aC5jb3MoYXZnKSwgTWF0aC5zaW4oYXZnKV0pXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgcGF0Y2hlc0ZvdW5kLnB1c2gocGF0Y2gpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIHBhdGNoZXNGb3VuZDtcclxufVxyXG5cclxuLyoqXHJcbiAqIGZpbmRzIHBhdGNoZXMgd2hpY2ggYXJlIGNvbm5lY3RlZCBhbmQgc2hhcmUgdGhlIHNhbWUgb3JpZW50YXRpb25cclxuICogQHBhcmFtIHtPYmplY3R9IHBhdGNoZXNGb3VuZFxyXG4gKi9cclxuZnVuY3Rpb24gcmFzdGVyaXplQW5ndWxhclNpbWlsYXJpdHkocGF0Y2hlc0ZvdW5kKSB7XHJcbiAgICB2YXIgbGFiZWwgPSAwLFxyXG4gICAgICAgIHRocmVzaG9sZCA9IDAuOTUsXHJcbiAgICAgICAgY3VycklkeCA9IDAsXHJcbiAgICAgICAgaixcclxuICAgICAgICBwYXRjaCxcclxuICAgICAgICBoc3YgPSBbMCwgMSwgMV0sXHJcbiAgICAgICAgcmdiID0gWzAsIDAsIDBdO1xyXG5cclxuICAgIGZ1bmN0aW9uIG5vdFlldFByb2Nlc3NlZCgpIHtcclxuICAgICAgICB2YXIgaTtcclxuICAgICAgICBmb3IgKCBpID0gMDsgaSA8IF9wYXRjaExhYmVsR3JpZC5kYXRhLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChfcGF0Y2hMYWJlbEdyaWQuZGF0YVtpXSA9PT0gMCAmJiBfcGF0Y2hHcmlkLmRhdGFbaV0gPT09IDEpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBfcGF0Y2hMYWJlbEdyaWQubGVuZ3RoO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHRyYWNlKGN1cnJlbnRJZHgpIHtcclxuICAgICAgICB2YXIgeCxcclxuICAgICAgICAgICAgeSxcclxuICAgICAgICAgICAgY3VycmVudFBhdGNoLFxyXG4gICAgICAgICAgICBpZHgsXHJcbiAgICAgICAgICAgIGRpcixcclxuICAgICAgICAgICAgY3VycmVudCA9IHtcclxuICAgICAgICAgICAgICAgIHg6IGN1cnJlbnRJZHggJSBfcGF0Y2hMYWJlbEdyaWQuc2l6ZS54LFxyXG4gICAgICAgICAgICAgICAgeTogKGN1cnJlbnRJZHggLyBfcGF0Y2hMYWJlbEdyaWQuc2l6ZS54KSB8IDBcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgc2ltaWxhcml0eTtcclxuXHJcbiAgICAgICAgaWYgKGN1cnJlbnRJZHggPCBfcGF0Y2hMYWJlbEdyaWQuZGF0YS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgY3VycmVudFBhdGNoID0gX2ltYWdlVG9QYXRjaEdyaWQuZGF0YVtjdXJyZW50SWR4XTtcclxuICAgICAgICAgICAgLy8gYXNzaWduIGxhYmVsXHJcbiAgICAgICAgICAgIF9wYXRjaExhYmVsR3JpZC5kYXRhW2N1cnJlbnRJZHhdID0gbGFiZWw7XHJcbiAgICAgICAgICAgIGZvciAoIGRpciA9IDA7IGRpciA8IFRyYWNlci5zZWFyY2hEaXJlY3Rpb25zLmxlbmd0aDsgZGlyKyspIHtcclxuICAgICAgICAgICAgICAgIHkgPSBjdXJyZW50LnkgKyBUcmFjZXIuc2VhcmNoRGlyZWN0aW9uc1tkaXJdWzBdO1xyXG4gICAgICAgICAgICAgICAgeCA9IGN1cnJlbnQueCArIFRyYWNlci5zZWFyY2hEaXJlY3Rpb25zW2Rpcl1bMV07XHJcbiAgICAgICAgICAgICAgICBpZHggPSB5ICogX3BhdGNoTGFiZWxHcmlkLnNpemUueCArIHg7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gY29udGludWUgaWYgcGF0Y2ggZW1wdHlcclxuICAgICAgICAgICAgICAgIGlmIChfcGF0Y2hHcmlkLmRhdGFbaWR4XSA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIF9wYXRjaExhYmVsR3JpZC5kYXRhW2lkeF0gPSBOdW1iZXIuTUFYX1ZBTFVFO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmIChfcGF0Y2hMYWJlbEdyaWQuZGF0YVtpZHhdID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2ltaWxhcml0eSA9IE1hdGguYWJzKHZlYzIuZG90KF9pbWFnZVRvUGF0Y2hHcmlkLmRhdGFbaWR4XS52ZWMsIGN1cnJlbnRQYXRjaC52ZWMpKTtcclxuICAgICAgICA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XRJbWFnZURhdGEoY2FudmFzRGF0YSwgMCwgMCk7XHJcbiAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICB9XHJcbn07XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIEQ6L3dvcmsvcXVhZ2dhSlMvc3JjL2NvbW1vbi9pbWFnZV9kZWJ1Zy5qc1xuICoqLyIsImltcG9ydCBUcmFjZXIgZnJvbSAnLi90cmFjZXInO1xyXG5cclxuLyoqXHJcbiAqIGh0dHA6Ly93d3cuY29kZXByb2plY3QuY29tL1RpcHMvNDA3MTcyL0Nvbm5lY3RlZC1Db21wb25lbnQtTGFiZWxpbmctYW5kLVZlY3Rvcml6YXRpb25cclxuICovXHJcbnZhciBSYXN0ZXJpemVyID0ge1xyXG4gICAgY3JlYXRlQ29udG91cjJEOiBmdW5jdGlvbigpIHtcclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICBkaXI6IG51bGwsXHJcbiAgICAgICAgICAgIGluZGV4OiBudWxsLFxyXG4gICAgICAgICAgICBmaXJzdFZlcnRleDogbnVsbCxcclxuICAgICAgICAgICAgaW5zaWRlQ29udG91cnM6IG51bGwsXHJcbiAgICAgICAgICAgIG5leHRwZWVyOiBudWxsLFxyXG4gICAgICAgICAgICBwcmV2cGVlcjogbnVsbFxyXG4gICAgICAgIH07XHJcbiAgICB9LFxyXG4gICAgQ09OVE9VUl9ESVI6IHtcclxuICAgICAgICBDV19ESVI6IDAsXHJcbiAgICAgICAgQ0NXX0RJUjogMSxcclxuICAgICAgICBVTktOT1dOX0RJUjogMlxyXG4gICAgfSxcclxuICAgIERJUjoge1xyXG4gICAgICAgIE9VVFNJREVfRURHRTogLTMyNzY3LFxyXG4gICAgICAgIElOU0lERV9FREdFOiAtMzI3NjZcclxuICAgIH0sXHJcbiAgICBjcmVhdGU6IGZ1bmN0aW9uKGltYWdlV3JhcHBlciwgbGFiZWxXcmFwcGVyKSB7XHJcbiAgICAgICAgdmFyIGltYWdlRGF0YSA9IGltYWdlV3JhcHBlci5kYXRhLFxyXG4gICAgICAgICAgICBsYWJlbERhdGEgPSBsYWJlbFdyYXBwZXIuZGF0YSxcclxuICAgICAgICAgICAgd2lkdGggPSBpbWFnZVdyYXBwZXIuc2l6ZS54LFxyXG4gICAgICAgICAgICBoZWlnaHQgPSBpbWFnZVdyYXBwZXIuc2l6ZS55LFxyXG4gICAgICAgICAgICB0cmFjZXIgPSBUcmFjZXIuY3JlYXRlKGltYWdlV3JhcHBlciwgbGFiZWxXcmFwcGVyKTtcclxuXHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgcmFzdGVyaXplOiBmdW5jdGlvbihkZXB0aGxhYmVsKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgY29sb3IsXHJcbiAgICAgICAgICAgICAgICAgICAgYmMsXHJcbiAgICAgICAgICAgICAgICAgICAgbGMsXHJcbiAgICAgICAgICAgICAgICAgICAgbGFiZWxpbmRleCxcclxuICAgICAgICAgICAgICAgICAgICBjeCxcclxuICAgICAgICAgICAgICAgICAgICBjeSxcclxuICAgICAgICAgICAgICAgICAgICBjb2xvck1hcCA9IFtdLFxyXG4gICAgICAgICAgICAgICAgICAgIHZlcnRleCxcclxuICAgICAgICAgICAgICAgICAgICBwLFxyXG4gICAgICAgICAgICAgICAgICAgIGNjLFxyXG4gICAgICAgICAgICAgICAgICAgIHNjLFxyXG4gICAgICAgICAgICAgICAgICAgIHBvcyxcclxuICAgICAgICAgICAgICAgICAgICBjb25uZWN0ZWRDb3VudCA9IDAsXHJcbiAgICAgICAgICAgICAgICAgICAgaTtcclxuXHJcbiAgICAgICAgICAgICAgICBmb3IgKCBpID0gMDsgaSA8IDQwMDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29sb3JNYXBbaV0gPSAwO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGNvbG9yTWFwWzBdID0gaW1hZ2VEYXRhWzBdO1xyXG4gICAgICAgICAgICAgICAgY2MgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgZm9yICggY3kgPSAxOyBjeSA8IGhlaWdodCAtIDE7IGN5KyspIHtcclxuICAgICAgICAgICAgICAgICAgICBsYWJlbGluZGV4ID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBiYyA9IGNvbG9yTWFwWzBdO1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAoIGN4ID0gMTsgY3ggPCB3aWR0aCAtIDE7IGN4KyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcG9zID0gY3kgKiB3aWR0aCArIGN4O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobGFiZWxEYXRhW3Bvc10gPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yID0gaW1hZ2VEYXRhW3Bvc107XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29sb3IgIT09IGJjKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxhYmVsaW5kZXggPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGMgPSBjb25uZWN0ZWRDb3VudCArIDE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yTWFwW2xjXSA9IGNvbG9yO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYyA9IGNvbG9yO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ZXJ0ZXggPSB0cmFjZXIuY29udG91clRyYWNpbmcoY3ksIGN4LCBsYywgY29sb3IsIFJhc3Rlcml6ZXIuRElSLk9VVFNJREVfRURHRSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2ZXJ0ZXggIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbm5lY3RlZENvdW50Kys7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbGluZGV4ID0gbGM7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID0gUmFzdGVyaXplci5jcmVhdGVDb250b3VyMkQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuZGlyID0gUmFzdGVyaXplci5DT05UT1VSX0RJUi5DV19ESVI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmluZGV4ID0gbGFiZWxpbmRleDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuZmlyc3RWZXJ0ZXggPSB2ZXJ0ZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLm5leHRwZWVyID0gY2M7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmluc2lkZUNvbnRvdXJzID0gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjYyAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNjLnByZXZwZWVyID0gcDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNjID0gcDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZlcnRleCA9IHRyYWNlclxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmNvbnRvdXJUcmFjaW5nKGN5LCBjeCwgUmFzdGVyaXplci5ESVIuSU5TSURFX0VER0UsIGNvbG9yLCBsYWJlbGluZGV4KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZlcnRleCAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IFJhc3Rlcml6ZXIuY3JlYXRlQ29udG91cjJEKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmZpcnN0VmVydGV4ID0gdmVydGV4O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5pbnNpZGVDb250b3VycyA9IG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVwdGhsYWJlbCA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuZGlyID0gUmFzdGVyaXplci5DT05UT1VSX0RJUi5DQ1dfRElSO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmRpciA9IFJhc3Rlcml6ZXIuQ09OVE9VUl9ESVIuQ1dfRElSO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5pbmRleCA9IGRlcHRobGFiZWw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzYyA9IGNjO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKChzYyAhPT0gbnVsbCkgJiYgc2MuaW5kZXggIT09IGxhYmVsaW5kZXgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzYyA9IHNjLm5leHRwZWVyO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNjICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5uZXh0cGVlciA9IHNjLmluc2lkZUNvbnRvdXJzO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzYy5pbnNpZGVDb250b3VycyAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzYy5pbnNpZGVDb250b3Vycy5wcmV2cGVlciA9IHA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjLmluc2lkZUNvbnRvdXJzID0gcDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxEYXRhW3Bvc10gPSBsYWJlbGluZGV4O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGxhYmVsRGF0YVtwb3NdID09PSBSYXN0ZXJpemVyLkRJUi5PVVRTSURFX0VER0VcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCBsYWJlbERhdGFbcG9zXSA9PT0gUmFzdGVyaXplci5ESVIuSU5TSURFX0VER0UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsaW5kZXggPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxhYmVsRGF0YVtwb3NdID09PSBSYXN0ZXJpemVyLkRJUi5JTlNJREVfRURHRSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJjID0gaW1hZ2VEYXRhW3Bvc107XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJjID0gY29sb3JNYXBbMF07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbGluZGV4ID0gbGFiZWxEYXRhW3Bvc107XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYyA9IGNvbG9yTWFwW2xhYmVsaW5kZXhdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgc2MgPSBjYztcclxuICAgICAgICAgICAgICAgIHdoaWxlIChzYyAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNjLmluZGV4ID0gZGVwdGhsYWJlbDtcclxuICAgICAgICAgICAgICAgICAgICBzYyA9IHNjLm5leHRwZWVyO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgICAgICBjYzogY2MsXHJcbiAgICAgICAgICAgICAgICAgICAgY291bnQ6IGNvbm5lY3RlZENvdW50XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBkZWJ1Zzoge1xyXG4gICAgICAgICAgICAgICAgZHJhd0NvbnRvdXI6IGZ1bmN0aW9uKGNhbnZhcywgZmlyc3RDb250b3VyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGN0eCA9IGNhbnZhcy5nZXRDb250ZXh0KFwiMmRcIiksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBxID0gZmlyc3RDb250b3VyLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpcSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcDtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgY3R4LnN0cm9rZVN0eWxlID0gXCJyZWRcIjtcclxuICAgICAgICAgICAgICAgICAgICBjdHguZmlsbFN0eWxlID0gXCJyZWRcIjtcclxuICAgICAgICAgICAgICAgICAgICBjdHgubGluZVdpZHRoID0gMTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBxICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlxID0gcHEuaW5zaWRlQ29udG91cnM7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaXEgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHBxICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpcSAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IGlxO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXEgPSBpcS5uZXh0cGVlcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBwcTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBxID0gcHEubmV4dHBlZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHEgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpcSA9IHBxLmluc2lkZUNvbnRvdXJzO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpcSA9IG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAocS5kaXIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBSYXN0ZXJpemVyLkNPTlRPVVJfRElSLkNXX0RJUjpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5zdHJva2VTdHlsZSA9IFwicmVkXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBSYXN0ZXJpemVyLkNPTlRPVVJfRElSLkNDV19ESVI6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdHguc3Ryb2tlU3R5bGUgPSBcImJsdWVcIjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFJhc3Rlcml6ZXIuQ09OVE9VUl9ESVIuVU5LTk9XTl9ESVI6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdHguc3Ryb2tlU3R5bGUgPSBcImdyZWVuXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgcCA9IHEuZmlyc3RWZXJ0ZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5iZWdpblBhdGgoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY3R4Lm1vdmVUbyhwLngsIHAueSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBwLm5leHQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdHgubGluZVRvKHAueCwgcC55KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAocCAhPT0gcS5maXJzdFZlcnRleCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5zdHJva2UoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG4gICAgfVxyXG59O1xyXG5cclxuZXhwb3J0IGRlZmF1bHQgUmFzdGVyaXplcjtcclxuXG5cblxuLyoqIFdFQlBBQ0sgRk9PVEVSICoqXG4gKiogRDovd29yay9xdWFnZ2FKUy9zcmMvbG9jYXRvci9yYXN0ZXJpemVyLmpzXG4gKiovIiwiLyoqXHJcbiAqIGh0dHA6Ly93d3cuY29kZXByb2plY3QuY29tL1RpcHMvNDA3MTcyL0Nvbm5lY3RlZC1Db21wb25lbnQtTGFiZWxpbmctYW5kLVZlY3Rvcml6YXRpb25cclxuICovXHJcbnZhciBUcmFjZXIgPSB7XHJcbiAgICBzZWFyY2hEaXJlY3Rpb25zOiBbWzAsIDFdLCBbMSwgMV0sIFsxLCAwXSwgWzEsIC0xXSwgWzAsIC0xXSwgWy0xLCAtMV0sIFstMSwgMF0sIFstMSwgMV1dLFxyXG4gICAgY3JlYXRlOiBmdW5jdGlvbihpbWFnZVdyYXBwZXIsIGxhYmVsV3JhcHBlcikge1xyXG4gICAgICAgIHZhciBpbWFnZURhdGEgPSBpbWFnZVdyYXBwZXIuZGF0YSxcclxuICAgICAgICAgICAgbGFiZWxEYXRhID0gbGFiZWxXcmFwcGVyLmRhdGEsXHJcbiAgICAgICAgICAgIHNlYXJjaERpcmVjdGlvbnMgPSB0aGlzLnNlYXJjaERpcmVjdGlvbnMsXHJcbiAgICAgICAgICAgIHdpZHRoID0gaW1hZ2VXcmFwcGVyLnNpemUueCxcclxuICAgICAgICAgICAgcG9zO1xyXG5cclxuICAgICAgICBmdW5jdGlvbiB0cmFjZShjdXJyZW50LCBjb2xvciwgbGFiZWwsIGVkZ2VsYWJlbCkge1xyXG4gICAgICAgICAgICB2YXIgaSxcclxuICAgICAgICAgICAgICAgIHksXHJcbiAgICAgICAgICAgICAgICB4O1xyXG5cclxuICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCA3OyBpKyspIHtcclxuICAgICAgICAgICAgICAgIHkgPSBjdXJyZW50LmN5ICsgc2VhcmNoRGlyZWN0aW9uc1tjdXJyZW50LmRpcl1bMF07XHJcbiAgICAgICAgICAgICAgICB4ID0gY3VycmVudC5jeCArIHNlYXJjaERpcmVjdGlvbnNbY3VycmVudC5kaXJdWzFdO1xyXG4gICAgICAgICAgICAgICAgcG9zID0geSAqIHdpZHRoICsgeDtcclxuICAgICAgICAgICAgICAgIGlmICgoaW1hZ2VEYXRhW3Bvc10gPT09IGNvbG9yKSAmJiAoKGxhYmVsRGF0YVtwb3NdID09PSAwKSB8fCAobGFiZWxEYXRhW3Bvc10gPT09IGxhYmVsKSkpIHtcclxuICAgICAgICAgICAgICAgICAgICBsYWJlbERhdGFbcG9zXSA9IGxhYmVsO1xyXG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnQuY3kgPSB5O1xyXG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnQuY3ggPSB4O1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAobGFiZWxEYXRhW3Bvc10gPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxEYXRhW3Bvc10gPSBlZGdlbGFiZWw7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnQuZGlyID0gKGN1cnJlbnQuZGlyICsgMSkgJSA4O1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHZlcnRleDJEKHgsIHksIGRpcikge1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgZGlyOiBkaXIsXHJcbiAgICAgICAgICAgICAgICB4OiB4LFxyXG4gICAgICAgICAgICAgICAgeTogeSxcclxuICAgICAgICAgICAgICAgIG5leHQ6IG51bGwsXHJcbiAgICAgICAgICAgICAgICBwcmV2OiBudWxsXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBjb250b3VyVHJhY2luZyhzeSwgc3gsIGxhYmVsLCBjb2xvciwgZWRnZWxhYmVsKSB7XHJcbiAgICAgICAgICAgIHZhciBGdiA9IG51bGwsXHJcbiAgICAgICAgICAgICAgICBDdixcclxuICAgICAgICAgICAgICAgIFAsXHJcbiAgICAgICAgICAgICAgICBsZGlyLFxyXG4gICAgICAgICAgICAgICAgY3VycmVudCA9IHtcclxuICAgICAgICAgICAgICAgICAgICBjeDogc3gsXHJcbiAgICAgICAgICAgICAgICAgICAgY3k6IHN5LFxyXG4gICAgICAgICAgICAgICAgICAgIGRpcjogMFxyXG4gICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgIGlmICh0cmFjZShjdXJyZW50LCBjb2xvciwgbGFiZWwsIGVkZ2VsYWJlbCkpIHtcclxuICAgICAgICAgICAgICAgIEZ2ID0gdmVydGV4MkQoc3gsIHN5LCBjdXJyZW50LmRpcik7XHJcbiAgICAgICAgICAgICAgICBDdiA9IEZ2O1xyXG4gICAgICAgICAgICAgICAgbGRpciA9IGN1cnJlbnQuZGlyO1xyXG4gICAgICAgICAgICAgICAgUCA9IHZlcnRleDJEKGN1cnJlbnQuY3gsIGN1cnJlbnQuY3ksIDApO1xyXG4gICAgICAgICAgICAgICAgUC5wcmV2ID0gQ3Y7XHJcbiAgICAgICAgICAgICAgICBDdi5uZXh0ID0gUDtcclxuICAgICAgICAgICAgICAgIFAubmV4dCA9IG51bGw7XHJcbiAgICAgICAgICAgICAgICBDdiA9IFA7XHJcbiAgICAgICAgICAgICAgICBkbyB7XHJcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudC5kaXIgPSAoY3VycmVudC5kaXIgKyA2KSAlIDg7XHJcbiAgICAgICAgICAgICAgICAgICAgdHJhY2UoY3VycmVudCwgY29sb3IsIGxhYmVsLCBlZGdlbGFiZWwpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChsZGlyICE9PSBjdXJyZW50LmRpcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBDdi5kaXIgPSBjdXJyZW50LmRpcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgUCA9IHZlcnRleDJEKGN1cnJlbnQuY3gsIGN1cnJlbnQuY3ksIDApO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBQLnByZXYgPSBDdjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ3YubmV4dCA9IFA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFAubmV4dCA9IG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEN2ID0gUDtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBDdi5kaXIgPSBsZGlyO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBDdi54ID0gY3VycmVudC5jeDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ3YueSA9IGN1cnJlbnQuY3k7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGxkaXIgPSBjdXJyZW50LmRpcjtcclxu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ICAgICAgIHN1bSA9ICgoaW1hZ2VzWyhpbkltYWdlUHRyICsgeVN0YXJ0MSArIHhTdGFydDEpIHwgMF0gfCAwKVxyXG4gICAgICAgICAgICAgICAgICAgICsgKGltYWdlc1soaW5JbWFnZVB0ciArIHlTdGFydDEgKyB4U3RhcnQyKSB8IDBdIHwgMClcclxuICAgICAgICAgICAgICAgICAgICArIChpbWFnZXNbKGluSW1hZ2VQdHIgKyBvZmZzZXQgKyB1KSB8IDBdIHwgMClcclxuICAgICAgICAgICAgICAgICAgICArIChpbWFnZXNbKGluSW1hZ2VQdHIgKyB5U3RhcnQyICsgeFN0YXJ0MSkgfCAwXSB8IDApXHJcbiAgICAgICAgICAgICAgICAgICAgKyAoaW1hZ2VzWyhpbkltYWdlUHRyICsgeVN0YXJ0MiArIHhTdGFydDIpIHwgMF0gfCAwKSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgaWYgKChzdW0gfCAwKSA9PSAoNSB8IDApKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaW1hZ2VzWyhvdXRJbWFnZVB0ciArIG9mZnNldCArIHUpIHwgMF0gPSAxO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBpbWFnZXNbKG91dEltYWdlUHRyICsgb2Zmc2V0ICsgdSkgfCAwXSA9IDA7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHN1YnRyYWN0KGFJbWFnZVB0ciwgYkltYWdlUHRyLCBvdXRJbWFnZVB0cikge1xyXG4gICAgICAgIGFJbWFnZVB0ciA9IGFJbWFnZVB0ciB8IDA7XHJcbiAgICAgICAgYkltYWdlUHRyID0gYkltYWdlUHRyIHwgMDtcclxuICAgICAgICBvdXRJbWFnZVB0ciA9IG91dEltYWdlUHRyIHwgMDtcclxuXHJcbiAgIC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XHJcbiAgICAgICAgaW5JbWFnZVB0ciA9IGluSW1hZ2VQdHIgfCAwO1xyXG4gICAgICAgIG91dEltYWdlUHRyID0gb3V0SW1hZ2VQdHIgfCAwO1xyXG5cclxuICAgICAgICB2YXIgdiA9IDAsXHJcbiAgICAgICAgICAgIHUgPSAwLFxyXG4gICAgICAgICAgICBzdW0gPSAwLFxyXG4gICAgICAgICAgICB5U3RhcnQxID0gMCxcclxuICAgICAgICAgICAgeVN0YXJ0MiA9IDAsXHJcbiAgICAgICAgICAgIHhTdGFydDEgPSAwLFxyXG4gICAgICAgICAgICB4U3RhcnQyID0gMCxcclxuICAgICAgICAgICAgb2Zmc2V0ID0gMDtcclxuXHJcbiAgICAgICAgZm9yICggdiA9IDE7ICh2IHwgMCkgPCAoKHNpemUgLSAxKSB8IDApOyB2ID0gKHYgKyAxKSB8IDApIHtcclxuICAgICAgICAgICAgb2Zmc2V0ID0gKG9mZnNldCArIHNpemUpIHwgMDtcclxuICAgICAgICAgICAgZm9yICggdSA9IDE7ICh1IHwgMCkgPCAoKHNpemUgLSAxKSB8IDApOyB1ID0gKHUgKyAxKSB8IDApIHtcclxuICAgICAgICAgICAgICAgIHlTdGFydDEgPSAob2Zmc2V0IC0gc2l6ZSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgeVN0YXJ0MiA9IChvZmZzZXQgKyBzaXplKSB8IDA7XHJcbiAgICAgICAgICAgICAgICB4U3RhcnQxID0gKHUgLSAxKSB8IDA7XHJcbiAgICAgICAgICAgICAgICB4U3RhcnQyID0gKHUgKyAxKSB8IDA7XHJcbiAgICAgICAgICAgICAgICBzdW0gPSAoKGltYWdlc1soaW5JbWFnZVB0ciArIHlTdGFydDEgKyB4U3RhcnQxKSB8IDBdIHwgMClcclxuICAgICAgICAgICAgICAgICAgICArIChpbWFnZXNbKGluSW1hZ2VQdHIgKyB5U3RhcnQxICsgeFN0YXJ0MikgfCAwXSB8IDApXHJcbiAgICAgICAgICAgICAgICAgICAgKyAoaW1h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1soc3JjSW1hZ2VQdHIgKyBsZW5ndGgpIHwgMF0gfCAwKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gemVyb0JvcmRlcihpbWFnZVB0cikge1xyXG4gICAgICAgIGltYWdlUHRyID0gaW1hZ2VQdHIgfCAwO1xyXG5cclxuICAgICAgICB2YXIgeCA9IDAsXHJcbiAgICAgICAgICAgIHkgPSAwO1xyXG5cclxuICAgICAgICBmb3IgKCB4ID0gMDsgKHggfCAwKSA8ICgoc2l6ZSAtIDEpIHwgMCk7IHggPSAoeCArIDEpIHwgMCkge1xyXG4gICAgICAgICAgICBpbWFnZXNbKGltYWdlUHRyICsgeCkgfCAwXSA9IDA7XHJcbiAgICAgICAgICAgIGltYWdlc1soaW1hZ2VQdHIgKyB5KSB8IDBdID0gMDtcclxuICAgICAgICAgICAgeSA9ICgoeSArIHNpemUpIC0gMSkgfCAwO1xyXG4gICAgICAgICAgICBpbWFnZXNbKGltYWdlUHRyICsgeSkgfCAwXSA9IDA7XHJcbiAgICAgICAgICAgIHkgPSAoeSArIDEpIHwgMDtcclxuICAgICAgICB9XHJcbiAgICAgICAgZm9yICggeCA9IDA7ICh4IHwgMCkgPCAoc2l6ZSB8IDApOyB4ID0gKHggKyAxKSB8IDApIHtcclxuICAgICAgICAgICAgaW1hZ2VzWyhpbWFnZVB0ciArIHkpIHwgMF0gPSAwO1xyXG4gICAgICAgICAgICB5ID0gKHkgKyAxKSB8IDA7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHNrZWxldG9uaXplKCkge1xyXG4gICAgICAgIHZhciBzdWJJbWFnZVB0ciA9IDAsXHJcbiAgICAgICAgICAgIGVyb2RlZEltYWdlUHRyID0gMCxcclxuICAgICAgICAgICAgdGVtcEltYWdlUHRyID0gMCxcclxuICAgICAgICAgICAgc2tlbEltYWdlUHRyID0gMCxcclxuICAgICAgICAgICAgc3VtID0gMCxcclxuICAgIC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IEVBTlJlYWRlcixcclxuICAgIGVhbl84X3JlYWRlcjogRUFOOFJlYWRlcixcclxuICAgIGNvZGVfMzlfcmVhZGVyOiBDb2RlMzlSZWFkZXIsXHJcbiAgICBjb2RlXzM5X3Zpbl9yZWFkZXI6IENvZGUzOVZJTlJlYWRlcixcclxuICAgIGNvZGFiYXJfcmVhZGVyOiBDb2RhYmFyUmVhZGVyLFxyXG4gICAgdXBjX3JlYWRlcjogVVBDUmVhZGVyLFxyXG4gICAgdXBjX2VfcmVhZGVyOiBVUENFUmVhZGVyLFxyXG4gICAgaTJvZjVfcmVhZGVyOiBJMm9mNVJlYWRlclxyXG59O1xyXG5leHBvcnQgZGVmYXVsdCB7XHJcbiAgICBjcmVhdGU6IGZ1bmN0aW9uKGNvbmZpZywgaW5wdXRJbWFnZVdyYXBwZXIpIHtcclxuICAgICAgICB2YXIgX2NhbnZhcyA9IHtcclxuICAgICAgICAgICAgICAgIGN0eDoge1xyXG4gICAgICAgICAgICAgICAgICAgIGZyZXF1ZW5jeTogbnVsbCxcclxuICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuOiBudWxsLFxyXG4gICAgICAgICAgICAgICAgICAgIG92ZXJsYXk6IG51bGxcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBkb206IHtcclxuICAgICAgICAgICAgICAgICAgICBmcmVxdWVuY3k6IG51bGwsXHJcbiAgICAgICAgICAgICAgICAgICAgcGF0dGVybjogbnVsbCxcclxuICAgICAgICAgICAgICAgICAgICBvdmVybGF5OiBudWxsXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIF9iYXJjb2RlUmVhZGVycyA9IFtdO1xyXG5cclxuICAgICAgICBpbml0Q2FudmFzKCk7XHJcbiAgICAgICAgaW5pdFJlYWRlcnMoKTtcclxuICAgICAgICBpbml0Q29uZmlnKCk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGluaXRDYW52Y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AgICAgICAgICAgICBfY2FudmFzLmRvbS5wYXR0ZXJuID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImNhbnZhc1wiKTtcclxuICAgICAgICAgICAgICAgICAgICBfY2FudmFzLmRvbS5wYXR0ZXJuLmNsYXNzTmFtZSA9IFwicGF0dGVybkJ1ZmZlclwiO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgkZGVidWcpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGRlYnVnLmFwcGVuZENoaWxkKF9jYW52YXMuZG9tLnBhdHRlcm4pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIF9jYW52YXMuY3R4LnBhdHRlcm4gPSBfY2FudmFzLmRvbS5wYXR0ZXJuLmdldENvbnRleHQoXCIyZFwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICBfY2FudmFzLmRvbS5vdmVybGF5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcImNhbnZhcy5kcmF3aW5nQnVmZmVyXCIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKF9jYW52YXMuZG9tLm92ZXJsYXkpIHtcclxuICAgICAgICAgICAgICAgICAgICBfY2FudmFzLmN0eC5vdmVybGF5ID0gX2NhbnZhcy5kb20ub3ZlcmxheS5nZXRDb250ZXh0KFwiMmRcIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGluaXRSZWFkZXJzKCkge1xyXG4gICAgICAgICAgICBjb25maWcucmVhZGVycy5mb3JFYWNoKGZ1bmN0aW9uKHJlYWRlckNvbmZpZykge1xyXG4gICAgICAgICAgICAgICAgdmFyIHJlYWRlcixcclxuICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uID0ge307XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiByZWFkZXJDb25maWcgPT09ICdvYmplY3QnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVhZGVyID0gcmVhZGVyQ29uZmlnLmZvcm1hdDtcclxuICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uID0gcmVhZGVyQ29uZmlnLmNvbmZpZztcclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHJlYWRlckNvbmZpZyA9PT0gJ3N0cmluZycpIHtcclxuICAgICAgICAgICAgICAgICAgICByZWFkZXIgPSByZWFkZXJDb25maWc7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJCZWZvcmUgcmVnaXN0ZXJpbmcgcmVhZGVyOiBcIiwgcmVhZGVyKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIF9iYXJjb2RlUmVhZGVycy5wdXNoKG5ldyBSRUFERVJTW3JlYWRlcl0oY29uZmlndXJhdGlvbikpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCkge1xyXG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJSZWdpc3RlcmVkIFJlYWRlcnM6IFwiICsgX2JhcmNvZGVSZWFkZXJzXHJcbiAgICAgICAgICAgICAgICAgICAgLm1hcCgocmVhZGVyKSA9PiBKU09OLnN0cmluZ2lmeSh7Zm9ybWF0OiByZWFkZXIuRk9STUFULCBjb25maWc6IHJlYWRlci5jb25maWd9KSlcclxuICAgICAgICAgICAgICAgICAgICAuam9pbignLCAnKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGluaXRDb25maWcoKSB7XHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQgJiYgdHlwZW9mIGRvY3VtZW50ICE9PSAndW5kZWZpbmVkJykge1xyXG4gICAgICAgICAgICAgICAgdmFyIGksXHJcbiAgICAgICAgICAgICAgICAgICAgdmlzID0gW3tcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZTogX2NhbnZhcy5kb20uZnJlcXVlbmN5LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wOiBjb25maWcuZGVidWcuc2hvd0ZyZXF1ZW5jeVxyXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZTogX2NhbnZhcy5kb20ucGF0dGVybixcclxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcDogY29uZmlnLmRlYnVnLnNob3dQYXR0ZXJuXHJcbiAgICAgICAgICAgICAgICAgICAgfV07XHJcblxyXG4gICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHZpcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh2aXNbaV0ucHJvcCA9PT0gdHJ1ZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2aXNbaV0ubm9kZS5zdHlsZS5kaXNwbGF5ID0gXCJibG9ja1wiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZpc1tpXS5ub2RlLnN0eWxlLmRpc3BsYXkgPSBcIm5vbmVcIjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8qKlxyXG4gICAgICAgICAqIGV4dGVuZCB0aGUgbGluZSBvbiBib3RoIGVuZHNcclxuICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBsaW5lXHJcbiAgICAgICAgICogQHBhcmFtIHtOdW1iZXJ9IGFuZ2xlXHJcbiAgICAgICAgICovXHJcbiAgICAgICAgZnVuY3Rpb24gZ2V0RXh0ZW5kZWRMaW5lKGxpbmUsIGFuZ2xlLCBleHQpIHtcclxuICAgICAgICAgICAgZnVuY3Rpb24gZXh0ZW5kTGluZShhbW91bnQpIHtcclxuICAgICAgICAgICAgICAgIHZhciBleHRlbnNpb24gPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgeTogYW1vdW50ICogTWF0aC5zaW4oYW5nbGUpLFxyXG4gICAgICAgICAgICAgICAgICAgIHg6IGFtb3VudCAqIE1hdGguY29zKGFuZ2xlKVxyXG4gICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgICAgICBsaW5lWzBdLnkgLT0gZXh0ZW5zaW9uLnk7XHJcbiAgICAgICAgICAgICAgICBsaW5lWzBdLnggLT0gZXh0ZW5zaW9uLng7XHJcbiAgICAgICAgICAgICAgICBsaW5lWzFdLnkgKz0gZXh0ZW5zaW9uLnk7XHJcbiAgICAgICAgICAgICAgICBsaW5lWzFdLnggKz0gZXh0ZW5zaW9uLng7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8vIGNoZWNrIGlmIGluc2lkZSBpbWFnZVxyXG4gICAgICAgICAgICBleHRlbmRMaW5lKGV4dCk7XHJcbiAgICAgICAgICAgIHdoaWxlIChleHQgPiAxICYmICghaW5wdXRJbWFnZVdyYXBwZXIuaW5JbWFnZVdpdGhCb3JkZXIobGluZVswXSwgMClcclxuICAgICAgICAgICAgICAgICAgICB8fCAhaW5wdXRJbWFnZVdyYXBwZXIuaW5JbWFnZVdpdGhCb3JkZXIobGluZVsxXSwgMCkpKSB7XHJcbiAgICAgICAgICAgICAgICBleHQgLT0gTWF0aC5jZWlsKGV4dCAvIDIpO1xyXG4gICAgICAgICAgICAgICAgZXh0ZW5kTGluZSgtZXh0KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gbGluZTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGdldExpbmUoYm94KSB7XHJcbiAgICAgICAgICAgIHJldHVybiBbe1xyXG4gICAgICAgICAgICAgICAgeDogKGJveFsxXVswXSAtIGJveFswXVswXSkgLyAyICsgYm94WzBdWzBdLFxyXG4gICAgICAgICAgICAgICAgeTogKGJveFsxXVsxXSAtIGJveFswXVsxXSkgLyAyICsgYm94WzBdWzFdXHJcbiAgICAgICAgICAgIH0sIHtcclxuICAgICAgICAgICAgICAgIHg6IChib3hbM11bMF0gLSBib3hbMl1bMF0pIC8gMiArIGJveFsyXVswXSxcclxuICAgICAgICAgICAgICAgIHk6IChib3hbM11bMV0gLSBib3hbMl1bMV0pIC8gMiArIGJveFsyXVsxXVxyXG4gICAgICAgICAgICB9XTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHRyeURlY29kZShsaW5lKSB7XHJcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSBudWxsLFxyXG4gICAgICAgICAgICAgICAgaSxcclxuICAgICAgICAgICAgICAgIGJhcmNvZGVMaW5lID0gQnJlc2VuaGFtLmdldEJhcmNvZGVMaW5lKGlucHV0SW1hZ2VXcmFwcGVyLCBsaW5lWzBdLCBsaW5lWzFdKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQgJiYgY29uZmlnLmRlYnVnLnNob3dGcmVxdWVuY3kpIHtcclxuICAgICAgICAgICAgICAgIEltYWdlRGVidWcuZHJhd1BhdGgobGluZSwge3g6ICd4JywgeTogJ3knfSwgX2NhbnZhcy5jdHgub3ZlcmxheSwge2NvbG9yOiAncmVkJywgbGluZVdpZHRoOiAzfSk7XHJcbiAgICAgICAgICAgICAgICBCcmVzZW5oYW0uZGVidWcucHJpbnRGcmVxdWVuY3koYmFyY29kZUxpbmUubGluZSwgX2NhbnZhcy5kb20uZnJlcXVlbmN5KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgQnJlc2VuaGFtLnRvQmluYXJ5TGluZShiYXJjb2RlTGluZSk7XHJcblxyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50ICYmIGNvbmZpZy5kZWJ1Zy5zaG93UGF0dGVybikge1xyXG4gICAgICAgICAgICAgICAgQnJlc2VuaGFtLmRlYnVnLnByaW50UGF0dGVybihiYXJjb2RlTGluZS5saW5lLCBfY2FudmFzLmRvbS5wYXR0ZXJuKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCBfYmFyY29kZVJlYWRlcnMubGVuZ3RoICYmIHJlc3VsdCA9PT0gbnVsbDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBfYmFyY29kZVJlYWRlcnNbaV0uZGVjb2RlUGF0dGVybihiYXJjb2RlTGluZS5saW5lKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAocmVzdWx0ID09PSBudWxsKXtcclxuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBjb2RlUmVzdWx0OiByZXN1bHQsXHJcbiAgICAgICAgICAgICAgICBiYXJjb2RlTGluZTogYmFyY29kZUxpbmVcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8qKlxyXG4gICAgICAgICAqIFRoaXMgbWV0aG9kIHNsaWNlcyB0aGUgZ2l2ZW4gYXJlYSBhcGFydCBhbmQgdHJpZXMgdG8gZGV0ZWN0IGEgYmFyY29kZS1wYXR0ZXJuXHJcbiAgICAgICAgICogZm9yIGVhY2ggc2xpY2UuIEl0IHJldHVybnMgdGhlIGRlY29kZWQgYmFyY29kZSwgb3IgbnVsbCBpZiBub3RoaW5nIHdhcyBmb3VuZFxyXG4gICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGJveFxyXG4gICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGxpbmVcclxuICAgICAgICAgKiBAcGFyYW0ge051bWJlcn0gbGluZUFuZ2xlXHJcbiAgICAgICAgICovXHJcbiAgICAgICAgZnVuY3Rpb24gdHJ5RGVjb2RlQnJ1dGVGb3JjZShib3gsIGxpbmUsIGxpbmVBbmdsZSkge1xyXG4gICAgICAgICAgICB2YXIgc2lkZUxlbmd0aCA9IE1hdGguc3FydChNYXRoLnBvdyhib3hbMV1bMF0gLSBib3hbMF1bMF0sIDIpICsgTWF0aC5wb3coKGJveFsxXVsxXSAtIGJveFswXVsxXSksIDIpKSxcclxuICAgICAgICAgICAgICAgIGksXHJcbiAgICAgICAgICAgICAgICBzbGljZXMgPSAxNixcclxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IG51bGwsXHJcbiAgICAgICAgICAgICAgICBkaXIsXHJcbiAgICAgICAgICAgICAgICBleHRlbnNpb24sXHJcbiAgICAgICAgICAgICAgICB4ZGlyID0gTWF0aC5zaW4obGluZUFuZ2xlKSxcclxuICAgICAgICAgICAgICAgIHlkaXIgPSBNYXRoLmNvcyhsaW5lQW5nbGUpO1xyXG5cclxuICAgICAgICAgICAgZm9yICggaSA9IDE7IGkgPCBzbGljZXMgJiYgcmVzdWx0ID09PSBudWxsOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIC8vIG1vdmUgbGluZSBwZXJwZW5kaWN1bGFyIHRvIGFuZ2xlXHJcbiAgICAgICAgICAgICAgICBkaXIgPSBzaWRlTGVuZ3RoIC8gc2xpY2VzICogaSAqIChpICUgMiA9PT0gMCA/IC0xIDogMSk7XHJcbiAgICAgICAgICAgICAgICBleHRlbnNpb24gPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgeTogZGlyICogeGRpcixcclxuICAgICAgICAgICAgICAgICAgICB4OiBkaXIgKiB5ZGlyXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgbGluZVswXS55ICs9IGV4dGVuc2lvbi54O1xyXG4gICAgICAgICAgICAgICAgbGluZVswXS54IC09IGV4dGVuc2lvbi55O1xyXG4gICAgICAgICAgICAgICAgbGluZVsxXS55ICs9IGV4dGVuc2lvbi54O1xyXG4gICAgICAgICAgICAgICAgbGluZVsxXS54IC09IGV4dGVuc2lvbi55O1xyXG5cclxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRyeURlY29kZShsaW5lKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gZ2V0TGluZUxlbmd0aChsaW5lKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBNYXRoLnNxcnQoXHJcbiAgICAgICAgICAgICAgICBNYXRoLnBvdyhNYXRoLmFicyhsaW5lWzFdLnkgLSBsaW5lWzBdLnkpLCAyKSArXHJcbiAgICAgICAgICAgICAgICBNYXRoLnBvdyhNYXRoLmFicyhsaW5lWzFdLnggLSBsaW5lWzBdLngpLCAyKSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKipcclxuICAgICAgICAgKiBXaXRoIHRoZSBoZWxwIG9mIHRoZSBjb25maWd1cmVkIHJlYWRlcnMgKENvZGUxMjggb3IgRUFOKSB0aGlzIGZ1bmN0aW9uIHRyaWVzIHRvIGRldGVjdCBhXHJcbiAgICAgICAgICogdmFsaWQgYmFyY29kZSBwYXR0ZXJuIHdpdGhpbiB0aGUgZ2l2ZW4gYXJlYS5cclxuICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gYm94IFRoZSBhcmVhIHRvIHNlYXJjaCBpblxyXG4gICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IHRoZSByZXN1bHQge2NvZGVSZXN1bHQsIGxpbmUsIGFuZ2xlLCBwYXR0ZXJuLCB0aHJlc2hvbGR9XHJcbiAgICAgICAgICovXHJcbiAgICAgICAgZnVuY3Rpb24gZGVjb2RlRnJvbUJvdW5kaW5nQm94KGJveCkge1xyXG4gICAgICAgICAgICB2YXIgbGluZSxcclxuICAgICAgICAgICAgICAgIGxpbmVBbmdsZSxcclxuICAgICAgICAgICAgICAgIGN0eCA9IF9jYW52YXMuY3R4Lm92ZXJsYXksXHJcbiAgICAgICAgICAgICAgICByZXN1bHQsXHJcbiAgICAgICAgICAgICAgICBsaW5lTGVuZ3RoO1xyXG5cclxuICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kZWJ1Zy5kcmF3Qm91bmRpbmdCb3ggJiYgY3R4KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgSW1hZ2VEZWJ1Zy5kcmF3UGF0aChib3gsIHt4OiAwLCB5OiAxfSwgY3R4LCB7Y29sb3I6IFwiYmx1ZVwiLCBsaW5lV2lkdGg6IDJ9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgbGluZSA9IGdldExpbmUoYm94KTtcclxuICAgICAgICAgICAgbGluZUxlbmd0aCA9IGdldExpbmVMZW5ndGgobGluZSk7XHJcbiAgICAgICAgICAgIGxpbmVBbmdsZSA9IE1hdGguYXRhbjIobGluZVsxXS55IC0gbGluZVswXS55LCBsaW5lWzFdLnggLSBsaW5lWzBdLngpO1xyXG4gICAgICAgICAgICBsaW5lID0gZ2V0RXh0ZW5kZWRMaW5lKGxpbmUsIGxpbmVBbmdsZSwgTWF0aC5mbG9vcihsaW5lTGVuZ3RoICogMC4xKSk7XHJcbiAgICAgICAgICAgIGlmIChsaW5lID09PSBudWxsKXtcclxuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICByZXN1bHQgPSB0cnlEZWNvZGUobGluZSk7XHJcbiAgICAgICAgICAgIGlmIChyZXN1bHQgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRyeURlY29kZUJydXRlRm9yY2UoYm94LCBsaW5lLCBsaW5lQW5nbGUpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAocmVzdWx0ID09PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCAmJiByZXN1bHQgJiYgY29uZmlnLmRlYnVnLmRyYXdTY2FubGluZSAmJiBjdHgpIHtcclxuICAgICAgICAgICAgICAgIEltYWdlRGVidWcuZHJhd1BhdGgobGluZSwge3g6ICd4JywgeTogJ3knfSwgY3R4LCB7Y29sb3I6ICdyZWQnLCBsaW5lV2lkdGg6IDN9KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgIGNvZGVSZXN1bHQ6IHJlc3VsdC5jb2RlUmVzdWx0LFxyXG4gICAgICAgICAgICAgICAgbGluZTogbGluZSxcclxuICAgICAgICAgICAgICAgIGFuZ2xlOiBsaW5lQW5nbGUsXHJcbiAgICAgICAgICAgICAgICBwYXR0ZXJuOiByZXN1bHQuYmFyY29kZUxpbmUubGluZSxcclxuICAgICAgICAgICAgICAgIHRocmVzaG9sZDogcmVzdWx0LmJhcmNvZGVMaW5lLnRocmVzaG9sZFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgZGVjb2RlRnJvbUJvdW5kaW5nQm94OiBmdW5jdGlvbihib3gpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBkZWNvZGVGcm9tQm91bmRpbmdCb3goYm94KTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZGVjb2RlRnJvbUJvdW5kaW5nQm94ZXM6IGZ1bmN0aW9uKGJveGVzKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgaSwgcmVzdWx0LFxyXG4gICAgICAgICAgICAgICAgICAgIGJhcmNvZGVzID0gW10sXHJcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlwbGUgPSBjb25maWcubXVsdGlwbGU7XHJcblxyXG4gICAgICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCBib3hlcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGJveCA9IGJveGVzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IGRlY29kZUZyb21Cb3VuZGluZ0JveChib3gpIHx8IHt9O1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5ib3ggPSBib3g7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChtdWx0aXBsZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYXJjb2Rlcy5wdXNoKHJlc3VsdCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChyZXN1bHQuY29kZVJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiAobXVsdGlwbGUpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYXJjb2Rlc1xyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNldFJlYWRlcnM6IGZ1bmN0aW9uKHJlYWRlcnMpIHtcclxuICAgICAgICAgICAgICAgIGNvbmZpZy5yZWFkZXJzID0gcmVhZGVycztcclxuICAgICAgICAgICAgICAgIF9iYXJjb2RlUmVhZGVycy5sZW5ndGggPSAwO1xyXG4gICAgICAgICAgICAgICAgaW5pdFJlYWRlcnMoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICA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9IHAyLnggfCAwLFxyXG4gICAgICAgIHkxID0gcDIueSB8IDAsXHJcbiAgICAgICAgc3RlZXAgPSBNYXRoLmFicyh5MSAtIHkwKSA+IE1hdGguYWJzKHgxIC0geDApLFxyXG4gICAgICAgIGRlbHRheCxcclxuICAgICAgICBkZWx0YXksXHJcbiAgICAgICAgZXJyb3IsXHJcbiAgICAgICAgeXN0ZXAsXHJcbiAgICAgICAgeSxcclxuICAgICAgICB0bXAsXHJcbiAgICAgICAgeCxcclxuICAgICAgICBsaW5lID0gW10sXHJcbiAgICAgICAgaW1hZ2VEYXRhID0gaW1hZ2VXcmFwcGVyLmRhdGEsXHJcbiAgICAgICAgd2lkdGggPSBpbWFnZVdyYXBwZXIuc2l6ZS54LFxyXG4gICAgICAgIHN1bSA9IDAsXHJcbiAgICAgICAgdmFsLFxyXG4gICAgICAgIG1pbiA9IDI1NSxcclxuICAgICAgICBtYXggPSAwO1xyXG5cclxuICAgIGZ1bmN0aW9uIHJlYWQoYSwgYikge1xyXG4gICAgICAgIHZhbCA9IGltYWdlRGF0YVtiICogd2lkdGggKyBhXTtcclxuICAgICAgICBzdW0gKz0gdmFsO1xyXG4gICAgICAgIG1pbiA9IHZhbCA8IG1pbiA/IHZhbCA6IG1pbjtcclxuICAgICAgICBtYXggPSB2YWwgPiBtYXggPyB2YWwgOiBtYXg7XHJcbiAgICAgICAgbGluZS5wdXNoKHZhbCk7XHJcbiAgICB9XHJcblxyXG4gICAgaWYgKHN0ZWVwKSB7XHJcbiAgICAgICAgdG1wID0geDA7XHJcbiAgICAgICAgeDAgPSB5MDtcclxuICAgICAgICB5MCA9IHRtcDtcclxuXHJcbiAgICAgICAgdG1wID0geDE7XHJcbiAgICAgICAgeDEgPSB5MTtcclxuICAgICAgICB5MSA9IHRtcDtcclxuICAgIH1cclxuICAgIGlmICh4MCA+IHgxKSB7XHJcbiAgICAgICAgdG1wID0geDA7XHJcbiAgICAgICAgeDAgPSB4MTtcclxuICAgICAgICB4MSA9IHRtcDtcclxuXHJcbiAgICAgICAgdG1wID0geTA7XHJcbiAgICAgICAgeTAgPSB5MTtcclxuICAgICAgICB5MSA9IHRtcDtcclxuICAgIH1cclxuICAgIGRlbHRheCA9IHgxIC0geDA7XHJcbiAgICBkZWx0YXkgPSBNYXRoLmFicyh5MSAtIHkwKTtcclxuICAgIGVycm9yID0gKGRlbHRheCAvIDIpIHwgMDtcclxuICAgIHkgPSB5MDtcclxuICAgIHlzdGVwID0geTAgPCB5MSA/IDEgOiAtMTtcclxuICAgIGZvciAoIHggPSB4MDsgeCA8IHgxOyB4KyspIHtcclxuICAgICAgICBpZiAoc3RlZXApe1xyXG4gICAgICAgICAgICByZWFkKHksIHgpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHJlYWQoeCwgeSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVycm9yID0gZXJyb3IgLSBkZWx0YXk7XHJcbiAgICAgICAgaWYgKGVycm9yIDwgMCkge1xyXG4gICAgICAgICAgICB5ID0geSArIHlzdGVwO1xyXG4gICAgICAgICAgICBlcnJvciA9IGVycm9yICsgZGVsdGF4O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4ge1xyXG4gICAgICAgIGxpbmU6IGxpbmUsXHJcbiAgICAgICAgbWluOiBtaW4sXHJcbiAgICAgICAgbWF4OiBtYXhcclxuICAgIH07XHJcbn07XHJcblxyXG5CcmVzZW5oYW0udG9PdHN1QmluYXJ5TGluZSA9IGZ1bmN0aW9uKHJlc3VsdCkge1xyXG4gICAgdmFyIGxpbmUgPSByZXN1bHQubGluZSxcclxuICAgICAgICBpbWFnZSA9IG5ldyBJbWFnZVdyYXBwZXIoe3g6IGxpbmUubGVuZ3RoIC0gMSwgeTogMX0sIGxpbmUpLFxyXG4gICAgICAgIHRocmVzaG9sZCA9IENWVXRpbHMuZGV0ZXJtaW5lT3RzdVRocmVzaG9sZChpbWFnZSwgNSk7XHJcblxyXG4gICAgbGluZSA9IENWVXRpbHMuc2hhcnBlbkxpbmUobGluZSk7XHJcbiAgICBDVlV0aWxzLnRocmVzaG9sZEltYWdlKGltYWdlLCB0aHJlc2hvbGQpO1xyXG5cclxuICAgIHJldHVybiB7XHJcbiAgICAgICAgbGluZTogbGluZSxcclxuICAgICAgICB0aHJlc2hvbGQ6IHRocmVzaG9sZFxyXG4gICAgfTtcclxufTtcclxuXHJcbi8qKlxyXG4gKiBDb252ZXJ0cyB0aGUgcmVzdWx0IGZyb20gZ2V0QmFyY29kZUxpbmUgaW50byBhIGJpbmFyeSByZXByZXNlbnRhdGlvblxyXG4gKiBhbHNvIGNvbnNpZGVyaW5nIHRoZSBmcmVxdWVuY3kgYW5kIHNsb3BlIG9mIHRoZSBzaWduYWwgZm9yIG1vcmUgcm9idXN0IHJlc3VsdHNcclxuICogQHBhcmFtIHtPYmplY3R9IHJlc3VsdCB7bGluZSwgbWluLCBtYXh9XHJcbiAqL1xyXG5CcmVzZW5oYW0udG9CaW5hcnlMaW5lID0gZnVuY3Rpb24ocmVzdWx0KSB7XHJcbiAgICB2YXIgbWluID0gcmVzdWx0Lm1pbixcclxuICAgICAgICBtYXggPSByZXN1bHQubWF4LFxyXG4gICAgICAgIGxpbmUgPSByZXN1bHQubGluZSxcclxuICAgICAgICBzbG9wZSxcclxuICAgICAgICBzbG9wZTIsXHJcbiAgICAgICAgY2VudGVyID0gbWluICsgKG1heCAtIG1pbikgLyAyLFxyXG4gICAgICAgIGV4dHJlbWEgPSBbXSxcclxuICAgICAgICBjdXJyZW50RGlyLFxyXG4gICAgICAgIGRpcixcclxuICAgICAgICB0aHJlc2hvbGQgPSAobWF4IC0gbWluKSAvIDEyLFxyXG4gICAgICAgIHJUaHJlc2hvbGQgPSAtdGhyZXNob2xkLFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgajtcclxuXHJcbiAgICAvLyAxLiBmaW5kIGV4dHJlbWFcclxuICAgIGN1cnJlbnREaXIgPSBsaW5lWzBdID4gY2VudGVyID8gU2xvcGUuRElSLlVQIDogU2xvcGUuRElSLkRPV047XHJcbiAgICBleHRyZW1hLnB1c2goe1xyXG4gICAgICAgIHBvczogMCxcclxuICAgICAgICB2YWw6IGxpbmVbMF1cclxuICAgIH0pO1xyXG4gICAgZm9yICggaSA9IDA7IGkgPCBsaW5lLmxlbmd0aCAtIDI7IGkrKykge1xyXG4gICAgICAgIHNsb3BlID0gKGxpbmVbaSArIDFdIC0gbGluZVtpXSk7XHJcbiAgICAgICAgc2xvcGUyID0gKGxpbmVbaSArIDJdIC0gbGluZVtpICsgMV0pO1xyXG4gICAgICAgIGlmICgoc2xvcGUgKyBzbG9wZTIpIDwgclRocmVzaG9sZCAmJiBsaW5lW2kgKyAxXSA8IChjZW50ZXIgKiAxLjUpKSB7XHJcbiAgICAgICAgICAgIGRpciA9IFNsb3BlLkRJUi5ET1dOO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoKHNsb3BlICsgc2xvcGUyKSA+IHRocmVzaG9sZCAmJiBsaW5lW2kgKyAxXSA+IChjZW50ZXIgKiAwLjUpKSB7XHJcbiAgICAgICAgICAgIGRpciA9IFNsb3BlLkRJUi5VUDtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBkaXIgPSBjdXJyZW50RGlyO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKGN1cnJlbnREaXIgIT09IGRpcikge1xyXG4gICAgICAgICAgICBleHRyZW1hLnB1c2goe1xyXG4gICAgICAgICAgICAgICAgcG9zOiBpLFxyXG4gICAgICAgICAgICAgICAgdmFsOiBsaW5lW2ldXHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBjdXJyZW50RGlyID0gZGlyO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIGV4dHJlbWEucHVzaCh7XHJcbiAgICAgICAgcG9zOiBsaW5lLmxlbmd0aCxcclxuICAgICAgICB2YWw6IGxpbmVbbGluZS5sZW5ndGggLSAxXVx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4gKi9cclxuQnJlc2VuaGFtLmRlYnVnID0ge1xyXG4gICAgcHJpbnRGcmVxdWVuY3k6IGZ1bmN0aW9uKGxpbmUsIGNhbnZhcykge1xyXG4gICAgICAgIHZhciBpLFxyXG4gICAgICAgICAgICBjdHggPSBjYW52YXMuZ2V0Q29udGV4dChcIjJkXCIpO1xyXG4gICAgICAgIGNhbnZhcy53aWR0aCA9IGxpbmUubGVuZ3RoO1xyXG4gICAgICAgIGNhbnZhcy5oZWlnaHQgPSAyNTY7XHJcblxyXG4gICAgICAgIGN0eC5iZWdpblBhdGgoKTtcclxuICAgICAgICBjdHguc3Ryb2tlU3R5bGUgPSBcImJsdWVcIjtcclxuICAgICAgICBmb3IgKCBpID0gMDsgaSA8IGxpbmUubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgY3R4Lm1vdmVUbyhpLCAyNTUpO1xyXG4gICAgICAgICAgICBjdHgubGluZVRvKGksIDI1NSAtIGxpbmVbaV0pO1xyXG4gICAgICAgIH1cclxuICAgICAgICBjdHguc3Ryb2tlKCk7XHJcbiAgICAgICAgY3R4LmNsb3NlUGF0aCgpO1xyXG4gICAgfSxcclxuXHJcbiAgICBwcmludFBhdHRlcm46IGZ1bmN0aW9uKGxpbmUsIGNhbnZhcykge1xyXG4gICAgICAgIHZhciBjdHggPSBjYW52YXMuZ2V0Q29udGV4dChcIjJkXCIpLCBpO1xyXG5cclxuICAgICAgICBjYW52YXMud2lkdGggPSBsaW5lLmxlbmd0aDtcclxuICAgICAgICBjdHguZmlsbENvbG9yID0gXCJibGFja1wiO1xyXG4gICAgICAgIGZvciAoIGkgPSAwOyBpIDwgbGluZS5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBpZiAobGluZVtpXSA9PT0gMSkge1xyXG4gICAgICAgICAgICAgICAgY3R4LmZpbGxSZWN0KGksIDAsIDEsIDEwMCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbn07XHJcblxyX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vZGUgPSAwOyBjb2RlIDwgc2VsZi5DT0RFX1BBVFRFUk4ubGVuZ3RoOyBjb2RlKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSBzZWxmLl9tYXRjaFBhdHRlcm4obm9ybWFsaXplZCwgc2VsZi5DT0RFX1BBVFRFUk5bY29kZV0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IgPCBiZXN0TWF0Y2guZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5jb2RlID0gY29kZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lcnJvciA9IGVycm9yO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lbmQgPSBpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBiZXN0TWF0Y2g7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbnVsbDtcclxufTtcclxuXHJcbkNvZGUxMjhSZWFkZXIucHJvdG90eXBlLl9maW5kU3RhcnQgPSBmdW5jdGlvbigpIHtcclxuICAgIHZhciBjb3VudGVyID0gWzAsIDAsIDAsIDAsIDAsIDBdLFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgb2Zmc2V0ID0gc2VsZi5fbmV4dFNldChzZWxmLl9yb3cpLFxyXG4gICAgICAgIGlzV2hpdGUgPSBmYWxzZSxcclxuICAgICAgICBjb3VudGVyUG9zID0gMCxcclxuICAgICAgICBiZXN0TWF0Y2ggPSB7XHJcbiAgICAgICAgICAgIGVycm9yOiBOdW1iZXIuTUFYX1ZBTFVFLFxyXG4gICAgICAgICAgICBjb2RlOiAtMSxcclxuICAgICAgICAgICAgc3RhcnQ6IDAsXHJcbiAgICAgICAgICAgIGVuZDogMFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29kZSxcclxuICAgICAgICBlcnJvcixcclxuICAgICAgICBqLFxyXG4gICAgICAgIHN1bSxcclxuICAgICAgICBub3JtYWxpemVkO1xyXG5cclxuICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKGNvdW50ZXJQb3MgPT09IGNvdW50ZXIubGVuZ3RoIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgc3VtID0gMDtcclxuICAgICAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgY291bnRlci5sZW5ndGg7IGorKykge1xyXG4gICAgICAgICAgICAgICAgICAgIHN1bSArPSBjb3VudGVyW2pdO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbm9ybWFsaXplZCA9IHNlbGYuX25vcm1hbGl6ZShjb3VudGVyKTtcclxuICAgICAgICAgICAgICAgIGlmIChub3JtYWxpemVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb2RlID0gc2VsZi5TVEFSVF9DT0RFX0E7IGNvZGUgPD0gc2VsZi5TVEFSVF9DT0RFX0M7IGNvZGUrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvciA9IHNlbGYuX21hdGNoUGF0dGVybihub3JtYWxpemVkLCBzZWxmLkNPREVfUEFUVEVSTltjb2RlXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnJvciA8IGJlc3RNYXRjaC5lcnJvcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmNvZGUgPSBjb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVycm9yID0gZXJyb3I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGJlc3RNYXRjaC5lcnJvciA8IHNlbGYuQVZHX0NPREVfRVJST1IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLnN0YXJ0ID0gaSAtIHN1bTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVuZCA9IGk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBiZXN0TWF0Y2g7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgNDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlcltqXSA9IGNvdW50ZXJbaiArIDJdO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgY291bnRlcls0XSA9IDA7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyWzVdID0gMDtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MtLTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MrKztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdID0gMTtcclxuICAgICAgICAgICAgaXNXaGl0ZSA9ICFpc1doaXRlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBudWxsO1xyXG59O1xyXG5cclxuQ29kZTEyOFJlYWRlci5wcm90b3R5cGUuX2RlY29kZSA9IGZ1bmN0aW9uKCkge1xyXG4gICAgdmFyIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIHN0YXJ0SW5mbyA9IHNlbGYuX2ZpbmRTdGFydCgpLFxyXG4gICAgICAgIGNvZGUgPSBudWxsLFxyXG4gICAgICAgIGRvbmUgPSBmYWxzZSxcclxuICAgICAgICByZXN1bHQgPSBbXSxcclxuICAgICAgICBtdWx0aXBsaWVyID0gMCxcclxuICAgICAgICBjaGVja3N1bSA9IDAsXHJcbiAgICAgICAgY29kZXNldCxcclxuICAgICAgICByYXdSZXN1bHQgPSBbXSxcclxuICAgICAgICBkZWNvZGVkQ29kZXMgPSBbXSxcclxuICAgICAgICBzaGlmdE5leHQgPSBmYWxzZSxcclxuICAgICAgICB1bnNoaWZ0LFxyXG4gICAgICAgIHJlbW92ZUxhc3RDaGFyYWN0ZXIgPSB0cnVlO1xyXG5cclxuICAgIGlmIChzdGFydEluZm8gPT09IG51bGwpIHtcclxuICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgIH1cclxuICAgIGNvZGUgPSB7XHJcbiAgICAgICAgY29kZTogc3RhcnRJbmZvLmNvZGUsXHJcbiAgICAgICAgc3RhcnQ6IHN0YXJ0SW5mby5zdGFydCxcclxuICAgICAgICBlbmQ6IHN0YXJ0SW5mby5lbmRcclxuICAgIH07XHJcbiAgICBkZWNvZGVkQ29kZXMucHVzaChjb2RlKTtcclxuICAgIGNoZWNrc3VtID0gY29kZS5jb2RlO1xyXG4gICAgc3dpdGNoIChjb2RlLmNvZGUpIHtcclxuICAgIGNhc2Ugc2VsZi5TVEFSVF9DT0RFX0E6XHJcbiAgICAgICAgY29kZXNldCA9IHNlbGYuQ09ERV9BO1xyXG4gICAgICAgIGJyZWFrO1xyXG4gICAgY2FzZSBzZWxmLlNUQVJUX0NPREVfQjpcclxuICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0I7XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICBjYXNlIHNlbGYuU1RBUlRfQ09ERV9DOlxyXG4gICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQztcclxuICAgICAgICBicmVhaztcclxuICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICB9XHJcblxyXG4gICAgd2hpbGUgKCFkb25lKSB7XHJcbiAgICAgICAgdW5zaGlmdCA9IHNoaWZ0TmV4dDtcclxuICAgICAgICBzaGlmdE5leHQgPSBmYWxzZTtcclxuICAgICAgICBjb2RlID0gc2VsZi5fZGVjb2RlQ29kZShjb2RlLmVuZCk7XHJcbiAgICAgICAgaWYgKGNvZGUgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgaWYgKGNvZGUuY29kZSAhPT0gc2VsZi5TVE9QX0NPREUpIHtcclxuICAgICAgICAgICAgICAgIHJlbW92ZUxhc3RDaGFyYWN0ZXIgPSB0cnVlO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAoY29kZS5jb2RlICE9PSBzZWxmLlNUT1BfQ09ERSkge1xyXG4gICAgICAgICAgICAgICAgcmF3UmVzdWx0LnB1c2goY29kZS5jb2RlKTtcclxuICAgICAgICAgICAgICAgIG11bHRpcGxpZXIrKztcclxuICAgICAgICAgICAgICAgIGNoZWNrc3VtICs9IG11bHRpcGxpZXIgKiBjb2RlLmNvZGU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZGVjb2RlZENvZGVzLnB1c2goY29kZSk7XHJcblxyXG4gICAgICAgICAgICBzd2l0Y2ggKGNvZGVzZXQpIHtcclxuICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQTpcclxuICAgICAgICAgICAgICAgIGlmIChjb2RlLmNvZGUgPCA2NCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKFN0cmluZy5mcm9tQ2hhckNvZGUoMzIgKyBjb2RlLmNvZGUpKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29kZS5jb2RlIDwgOTYpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChTdHJpbmcuZnJvbUNoYXJDb2RlKGNvZGUuY29kZSAtIDY0KSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb2RlLmNvZGUgIT09IHNlbGYuU1RPUF9DT0RFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZUxhc3RDaGFyYWN0ZXIgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChjb2RlLmNvZGUpIHtcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9TSElGVDpcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2hpZnROZXh0ID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZXNldCA9IHNlbGYuQ09ERV9CO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9COlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0M6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQztcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLlNUT1BfQ09ERTpcclxuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9COlxyXG4gICAgICAgICAgICAgICAgaWYgKGNvZGUuY29kZSA8IDk2KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goU3RyaW5nLmZyb21DaGFyQ29kZSgzMiArIGNvZGUuY29kZSkpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY29kZS5jb2RlICE9PSBzZWxmLlNUT1BfQ09ERSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZW1vdmVMYXN0Q2hhcmFjdGVyID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoY29kZS5jb2RlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfU0hJRlQ6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNoaWZ0TmV4dCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQTpcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZXNldCA9IHNlbGYuQ09ERV9BO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9DOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0M7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5TVE9QX0NPREU6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQzpcclxuICAgICAgICAgICAgICAgIGlmIChjb2RlLmNvZGUgPCAxMDApIHtcclxuICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChjb2RlLmNvZGUgPCAxMCA/IFwiMFwiICsgY29kZS5jb2RlIDogY29kZS5jb2RlKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvZGUuY29kZSAhPT0gc2VsZi5TVE9QX0NPREUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3ZlTGFzdENoYXJhY3RlciA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGNvZGUuY29kZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0E6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQjpcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZXNldCA9IHNlbGYuQ09ERV9CO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuU1RPUF9DT0RFOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBkb25lID0gdHJ1ZTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKHVuc2hpZnQpIHtcclxuICAgICAgICAgICAgY29kZXNldCA9IGNvZGVzZXQgPT09IHNlbGYuQ09ERV9BID8gc2VsZi5DT0RFX0IgOiBzZWxmLkNPREVfQTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgaWYgKGNvZGUgPT09IG51bGwpIHtcclxuICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgIH1cclxuXHJcbiAgICBjb2RlLmVuZCA9IHNlbGYuX25leHRVbnNldChzZWxmLl9yb3csIGNvZGUuZW5kKTtcclxuICAgIGlmICghc2VsZi5fdmVyaWZ5VHJhaWxpbmdXaGl0ZXNwYWNlKGNvZGUpKXtcclxuICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgIH1cclxuXHJcbiAgICBjaGVja3N1bSAtPSBtdWx0aXBsaWVyICogcmF3UmVzdWx0W3Jhd1Jlc3VsdC5sZW5ndGggLSAxXTtcclxuICAgIGlmIChjaGVja3N1bSAlIDEwMyAhPT0gcmF3UmVzdWx0W3Jhd1Jlc3VsdC5sZW5ndGggLSAxXSkge1xyXG4gICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgfVxyXG5cclxuICAgIGlmICghcmVzdWx0Lmxlbmd0aCkge1xyXG4gICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgfVxyXG5cclxuICAgIC8vIHJlbW92ZSBsYXN0IGNvZGUgZnJvbSByZXN1bHQgKGNoZWNrc3VtKVxyXG4gICAgaWYgKHJlbW92ZUxhc3RDaGFyYWN0ZXIpIHtcclxuICAgICAg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IHN1bSArPSBjb3VudGVyW2ldO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJhdGlvID0gc3VtIC8gKG1vZHVsbyAtIG51bU9uZXMpO1xyXG4gICAgaWYgKHJhdGlvID4gMS4wKSB7XHJcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvdW50ZXIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgbm9ybSA9IGNvdW50ZXJbaV0gPT09IDEgPyBjb3VudGVyW2ldIDogY291bnRlcltpXSAvIHJhdGlvO1xyXG4gICAgICAgICAgICBub3JtYWxpemVkLnB1c2gobm9ybSk7XHJcbiAgICAgICAgfVxyXG4gICAgfSBlbHNlIHtcclxuICAgICAgICByYXRpbyA9IChzdW0gKyBudW1PbmVzKSAvIG1vZHVsbztcclxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY291bnRlci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBub3JtID0gY291bnRlcltpXSAvIHJhdGlvO1xyXG4gICAgICAgICAgICBub3JtYWxpemVkLnB1c2gobm9ybSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIG5vcm1hbGl6ZWQ7XHJcbn07XHJcblxyXG5CYXJjb2RlUmVhZGVyLnByb3RvdHlwZS5fbWF0Y2hUcmFjZSA9IGZ1bmN0aW9uKGNtcENvdW50ZXIsIGVwc2lsb24pIHtcclxuICAgIHZhciBjb3VudGVyID0gW10sXHJcbiAgICAgICAgaSxcclxuICAgICAgICBzZWxmID0gdGhpcyxcclxuICAgICAgICBvZmZzZXQgPSBzZWxmLl9uZXh0U2V0KHNlbGYuX3JvdyksXHJcbiAgICAgICAgaXNXaGl0ZSA9ICFzZWxmLl9yb3dbb2Zmc2V0XSxcclxuICAgICAgICBjb3VudGVyUG9zID0gMCxcclxuICAgICAgICBiZXN0TWF0Y2ggPSB7XHJcbiAgICAgICAgICAgIGVycm9yOiBOdW1iZXIuTUFYX1ZBTFVFLFxyXG4gICAgICAgICAgICBjb2RlOiAtMSxcclxuICAgICAgICAgICAgc3RhcnQ6IDBcclxuICAgICAgICB9LFxyXG4gICAgICAgIGVycm9yO1xyXG5cclxuICAgIGlmIChjbXBDb3VudGVyKSB7XHJcbiAgICAgICAgZm9yICggaSA9IDA7IGkgPCBjbXBDb3VudGVyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGNvdW50ZXIucHVzaCgwKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZm9yICggaSA9IG9mZnNldDsgaSA8IHNlbGYuX3Jvdy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSsrO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvdW50ZXJQb3MgPT09IGNvdW50ZXIubGVuZ3RoIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGVycm9yID0gc2VsZi5fbWF0Y2hQYXR0ZXJuKGNvdW50ZXIsIGNtcENvdW50ZXIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IgPCBlcHNpbG9uKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5zdGFydCA9IGkgLSBvZmZzZXQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lbmQgPSBpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guY291bnRlciA9IGNvdW50ZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBiZXN0TWF0Y2g7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdID0gMTtcclxuICAgICAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgY291bnRlci5wdXNoKDApO1xyXG4gICAgICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgaWYgKHNlbGYuX3Jvd1tpXSBeIGlzV2hpdGUpIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10rKztcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MrKztcclxuICAgICAgICAgICAgICAgIGNvdW50ZXIucHVzaCgwKTtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10gPSAxO1xyXG4gICAgICAgICAgICAgICAgaXNXaGl0ZSA9ICFpc1doaXRlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIC8vIGlmIGNtcENvdW50ZXIgd2FzIG5vdCBnaXZlblxyXG4gICAgYmVzdE1hdGNoLnN0YXJ0ID0gb2Zmc2V0O1xyXG4gICAgYmVzdE1hdGNoLmVuZCA9IHNlbGYuX3Jvdy5sZW5ndGggLSAxO1xyXG4gICAgYmVzdE1hdGNoLmNvdW50ZXIgPSBjb3VudGVyO1xyXG4gICAgcmV0dXJuIGJlc3RNYXRjaDtcclxufTtcclxuXHJcbkJhcmNvZGVSZWFkZXIucHJvdG90eXBlLmRlY29kZVBhdHRlcm4gPSBmdW5jdGlvbihwYXR0ZXJuKSB7XHJcbiAgICB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sgaSA8IHNlbGYuX3Jvdy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGlmIChzZWxmLl9yb3dbaV0gXiBpc1doaXRlKSB7XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10rKztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBpZiAoY291bnRlclBvcyA9PT0gY291bnRlci5sZW5ndGggLSAxKSB7XHJcbiAgICAgICAgICAgICAgICBub3JtYWxpemVkID0gc2VsZi5fbm9ybWFsaXplKGNvdW50ZXIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKG5vcm1hbGl6ZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGNvZGUgPSAwOyBjb2RlIDwgY29kZXJhbmdlOyBjb2RlKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSBzZWxmLl9tYXRjaFBhdHRlcm4obm9ybWFsaXplZCwgc2VsZi5DT0RFX1BBVFRFUk5bY29kZV0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IgPCBiZXN0TWF0Y2guZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5jb2RlID0gY29kZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lcnJvciA9IGVycm9yO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lbmQgPSBpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChiZXN0TWF0Y2guZXJyb3IgPiBzZWxmLkFWR19DT0RFX0VSUk9SKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYmVzdE1hdGNoO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY291bnRlclBvcysrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10gPSAxO1xyXG4gICAgICAgICAgICBpc1doaXRlID0gIWlzV2hpdGU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIG51bGw7XHJcbn07XHJcblxyXG5FQU5SZWFkZXIucHJvdG90eXBlLl9maW5kUGF0dGVybiA9IGZ1bmN0aW9uKHBhdHRlcm4sIG9mZnNldCwgaXNXaGl0ZSwgdHJ5SGFyZGVyLCBlcHNpbG9uKSB7XHJcbiAgICB2YXIgY291bnRlciA9IFtdLFxyXG4gICAgICAgIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgY291bnRlclBvcyA9IDAsXHJcbiAgICAgICAgYmVzdE1hdGNoID0ge1xyXG4gICAgICAgICAgICBlcnJvcjogTnVtYmVyLk1BWF9WQUxVRSxcclxuICAgICAgICAgICAgY29kZTogLTEsXHJcbiAgICAgICAgICAgIHN0YXJ0OiAwLFxyXG4gICAgICAgICAgICBlbmQ6IDBcclxuICAgICAgICB9LFxyXG4gICAgICAgIGVycm9yLFxyXG4gICAgICAgIGosXHJcbiAgICAgICAgc3VtLFxyXG4gICAgICAgIG5vcm1hbGl6ZWQ7XHJcblxyXG4gICAgaWYgKCFvZmZzZXQpIHtcclxuICAgICAgICBvZmZzZXQgPSBzZWxmLl9uZXh0U2V0KHNlbGYuX3Jvdyk7XHJcbiAgICB9XHJcblxyXG4gICAgaWYgKGlzV2hpdGUgPT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgIGlzV2hpdGUgPSBmYWxzZTtcclxuICAgIH1cclxuXHJcbiAgICBpZiAodHJ5SGFyZGVyID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICB0cnlIYXJkZXIgPSB0cnVlO1xyXG4gICAgfVxyXG5cclxuICAgIGlmICggZXBzaWxvbiA9PT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgZXBzaWxvbiA9IHNlbGYuQVZHX0NPREVfRVJST1I7XHJcbiAgICB9XHJcblxyXG4gICAgZm9yICggaSA9IDA7IGkgPCBwYXR0ZXJuLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgY291bnRlcltpXSA9IDA7XHJcbiAgICB9XHJcblxyXG4gICAgZm9yICggaSA9IG9mZnNldDsgaSA8IHNlbGYuX3Jvdy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGlmIChzZWxmLl9yb3dbaV0gXiBpc1doaXRlKSB7XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10rKztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBpZiAoY291bnRlclBvcyA9PT0gY291bnRlci5sZW5ndGggLSAxKSB7XHJcbiAgICAgICAgICAgICAgICBzdW0gPSAwO1xyXG4gICAgICAgICAgICAgICAgZm9yICggaiA9IDA7IGogPCBjb3VudGVyLmxlbmd0aDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc3VtICs9IGNvdW50ZXJbal07XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBub3JtYWxpemVkID0gc2VsZi5fbm9ybWFsaXplKGNvdW50ZXIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKG5vcm1hbGl6ZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBlcnJvciA9IHNlbGYuX21hdGNoUGF0dGVybihub3JtYWxpemVkLCBwYXR0ZXJuKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yIDwgZXBzaWxvbikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZXJyb3IgPSBlcnJvcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLnN0YXJ0ID0gaSAtIHN1bTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVuZCA9IGk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBiZXN0TWF0Y2g7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKHRyeUhhcmRlcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgY291bnRlci5sZW5ndGggLSAyOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY291bnRlcltqXSA9IGNvdW50ZXJbaiArIDJdO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXIubGVuZ3RoIC0gMl0gPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbY291bnRlci5sZW5ndGggLSAxXSA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlclBvcy0tO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MrKztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdID0gMTtcclxuICAgICAgICAgICAgaXNXaGl0ZSA9ICFpc1doaXRlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBudWxsO1xyXG59O1xyXG5cclxuRUFOUmVhZGVyLnByb3RvdHlwZS5fZmluZFN0YXJ0ID0gZnVuY3Rpb24oKSB7XHJcbiAgICB2YXIgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgbGVhZGluZ1doaXRlc3BhY2VTdGFydCxcclxuICAgICAgICBvZmZzZXQg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Vjb2RlZENvZGVzKSB7XHJcbiAgICB2YXIgaSxcclxuICAgICAgICBzZWxmID0gdGhpcyxcclxuICAgICAgICBjb2RlRnJlcXVlbmN5ID0gMHgwLFxyXG4gICAgICAgIGZpcnN0RGlnaXQ7XHJcblxyXG4gICAgZm9yICggaSA9IDA7IGkgPCA2OyBpKyspIHtcclxuICAgICAgICBjb2RlID0gc2VsZi5fZGVjb2RlQ29kZShjb2RlLmVuZCk7XHJcbiAgICAgICAgaWYgKCFjb2RlKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoY29kZS5jb2RlID49IHNlbGYuQ09ERV9HX1NUQVJUKSB7XHJcbiAgICAgICAgICAgIGNvZGUuY29kZSA9IGNvZGUuY29kZSAtIHNlbGYuQ09ERV9HX1NUQVJUO1xyXG4gICAgICAgICAgICBjb2RlRnJlcXVlbmN5IHw9IDEgPDwgKDUgLSBpKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBjb2RlRnJlcXVlbmN5IHw9IDAgPDwgKDUgLSBpKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmVzdWx0LnB1c2goY29kZS5jb2RlKTtcclxuICAgICAgICBkZWNvZGVkQ29kZXMucHVzaChjb2RlKTtcclxuICAgIH1cclxuXHJcbiAgICBmaXJzdERpZ2l0ID0gc2VsZi5fY2FsY3VsYXRlRmlyc3REaWdpdChjb2RlRnJlcXVlbmN5KTtcclxuICAgIGlmIChmaXJzdERpZ2l0ID09PSBudWxsKSB7XHJcbiAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICB9XHJcbiAgICByZXN1bHQudW5zaGlmdChmaXJzdERpZ2l0KTtcclxuXHJcbiAgICBjb2RlID0gc2VsZi5fZmluZFBhdHRlcm4oc2VsZi5NSURETEVfUEFUVEVSTiwgY29kZS5lbmQsIHRydWUsIGZhbHNlKTtcclxuICAgIGlmIChjb2RlID09PSBudWxsKSB7XH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2RlKSB7XHJcbiAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICB9XHJcbiAgICBjb2RlID0gc2VsZi5fZmluZEVuZChjb2RlLmVuZCwgZmFsc2UpO1xyXG4gICAgaWYgKCFjb2RlKXtcclxuICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgIH1cclxuXHJcbiAgICBkZWNvZGVkQ29kZXMucHVzaChjb2RlKTtcclxuXHJcbiAgICAvLyBDaGVja3N1bVxyXG4gICAgaWYgKCFzZWxmLl9jaGVja3N1bShyZXN1bHQpKSB7XHJcbiAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHtcclxuICAgICAgICBjb2RlOiByZXN1bHQuam9pbihcIlwiKSxcclxuICAgICAgICBzdGFydDogc3RhcnRJbmZvLnN0YXJ0LFxyXG4gICAgICAgIGVuZDogY29kZS5lbmQsXHJcbiAgICAgICAgY29kZXNldDogXCJcIixcclxuICAgICAgICBzdGFydEluZm86IHN0YXJ0SW5mbyxcclxuICAgICAgICBkZWNvZGVkQ29kZXM6IGRlY29kZWRDb2Rlc1xyXG4gICAgfTtcclxufTtcclxuXHJcbkVBTlJlYWRlci5wcm90b3R5cGUuX2NoZWNrc3VtID0gZnVuY3Rpb24ocmVzdWx0KSB7XHJcbiAgICB2YXIgc3VtID0gMCwgaTtcclxuXHJcbiAgICBmb3IgKCBpID0gcmVzdWx0Lmxlbmd0aCAtIDI7IGkgPj0gMDsgaSAtPSAyKSB7XHJcbiAgICAgICAgc3VtICs9IHJlc3VsdFtpXTtcclxuICAgIH1cclxuICAgIHN1bSAqPSAzO1xyXG4gICAgZm9yICggaSA9IHJlc3VsdC5sZW5ndGggLSAxOyBpID49IDA7IGkgLT0gMikge1xyXG4gICAgICAgIHN1bSArPSByZXN1bHRbaV07XHJcbiAgICB9XHJcbiAgICByZXR1cm4gc3VtICUgMTAgPT09IDA7XHJcbn07XHJcblxyXG5leHBvcnQgZGVmYXVsdCAoRUFO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ICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgIGlmIChjb3VudGVyUG9zID09PSBudW1Db3VudGVycykge1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdID0gMTtcclxuICAgICAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gY291bnRlcjtcclxufTtcclxuXHJcbkNvZGUzOVJlYWRlci5wcm90b3R5cGUuX2RlY29kZSA9IGZ1bmN0aW9uKCkge1xyXG4gICAgdmFyIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIGNvdW50ZXJzID0gWzAsIDAsIDAsIDAsIDAsIDAsIDAsIDAsIDBdLFxyXG4gICAgICAgIHJlc3VsdCA9IFtdLFxyXG4gICAgICAgIHN0YXJ0ID0gc2VsZi5fZmluZFN0YXJ0KCksXHJcbiAgICAgICAgZGVjb2RlZENoYXIsXHJcbiAgICAgICAgbGFzdFN0YXJ0LFxyXG4gICAgICAgIHBhdHRlcm4sXHJcbiAgICAgICAgbmV4dFN0YXJ0O1xyXG5cclxuICAgIGlmICghc3RhcnQpIHtcclxuICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgIH1cclxuICAgIG5leHRTdGFydCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93LCBzdGFydC5lbmQpO1xyXG5cclxuICAgIGRvIHtcclxuICAgICAgICBjb3VudGVycyA9IHNlbGYuX3RvQ291bnRlcnMobmV4dFN0YXJ0LCBjb3VudGVycyk7XHJcbiAgICAgICAgcGF0dGVybiA9IHNlbGYuX3RvUGF0dGVybihjb3VudGVycyk7XHJcbiAgICAgICAgaWYgKHBhdHRlcm4gPCAwKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gIC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pXSA8IG1pbldpZHRoICYmIGNvdW50ZXJzW2ldID4gY3VycmVudCkge1xyXG4gICAgICAgICAgICBtaW5XaWR0aCA9IGNvdW50ZXJzW2ldO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gbWluV2lkdGg7XHJcbn07XHJcblxyXG5Db2RlMzlSZWFkZXIucHJvdG90eXBlLl90b1BhdHRlcm4gPSBmdW5jdGlvbihjb3VudGVycykge1xyXG4gICAgdmFyIG51bUNvdW50ZXJzID0gY291bnRlcnMubGVuZ3RoLFxyXG4gICAgICAgIG1heE5hcnJvd1dpZHRoID0gMCxcclxuICAgICAgICBudW1XaWRlQmFycyA9IG51bUNvdW50ZXJzLFxyXG4gICAgICAgIHdpZGVCYXJXaWR0aCA9IDAsXHJcbiAgICAgICAgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgcGF0dGVybixcclxuICAgICAgICBpO1xyXG5cclxuICAgIHdoaWxlIChudW1XaWRlQmFycyA+IDMpIHtcclxuICAgICAgICBtYXhOYXJyb3dXaWR0aCA9IHNlbGYuX2ZpbmROZXh0V2lkdGgoY291bnRlcnMsIG1heE5hcnJvd1dpZHRoKTtcclxuICAgICAgICBudW1XaWRlQmFycyA9IDA7XHJcbiAgICAgICAgcGF0dGVybiA9IDA7XHJcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IG51bUNvdW50ZXJzOyBpKyspIHtcclxuICAgICAgICAgICAgaWYgKGNvdW50ZXJzW2ldID4gbWF4TmFycm93V2lkdGgpIHtcclxuICAgICAgICAgICAgICAgIHBhdHRlcm4gfD0gMSA8PCAobnVtQ291bnRlcnMgLSAxIC0gaSk7XHJcbiAgICAgICAgICAgICAgICBudW1XaWRlQmFycysrO1xyXG4gICAgICAgICAgICAgICAgd2lkZUJhcldpZHRoICs9IGNvdW50ZXJzW2ldO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAobnVtV2lkZUJhcnMgPT09IDMpIHtcclxuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IG51bUNvdW50ZXJzICYmIG51bVdpZGVCYXJzID4gMDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoY291bnRlcnNbaV0gPiBtYXhOYXJyb3dXaWR0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIG51bVdpZGVCYXJzLS07XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKChjb3VudGVyc1tpXSAqIDIpID49IHdpZGVCYXJXaWR0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBwYXR0ZXJuO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiAtMTtcclxufTtcclxuXHJcbkNvZGUzOVJlYWRlci5wcm90b3R5cGUuX2ZpbmRTdGFydCA9IGZ1bmN0aW9uKCkge1xyXG4gICAgdmFyIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIG9mZnNldCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93KSxcclxuICAgICAgICBwYXR0ZXJuU3RhcnQgPSBvZmZzZXQsXHJcbiAgICAgICAgY291bnRlciA9IFswLCAwLCAwLCAwLCAwLCAwLCAwLCAwLCAwXSxcclxuICAgICAgICBjb3VudGVyUG9zID0gMCxcclxuICAgICAgICBpc1doaXRlID0gZmFsc2UsXHJcbiAgICAgICAgaSxcclxuICAgICAgICBqLFxyXG4gICAgICAgIHdoaXRlU3BhY2VNdXN0U3RhcnQ7XHJcblxyXG4gICAgZm9yICggaSA9IG9mZnNldDsgaSA8IHNlbGYuX3Jvdy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGlmIChzZWxmLl9yb3dbaV0gXiBpc1doaXRlKSB7XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10rKztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBpZiAoY291bnRlclBvcyA9PT0gY291bnRlci5sZW5ndGggLSAxKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBmaW5kIHN0YXJ0IHBhdHRlcm5cclxuICAgICAgICAgICAgICAgIGlmIChzZWxmLl90b1BhdHRlcm4oY291bnRlcikgPT09IHNlbGYuQVNURVJJU0spIHtcclxuICAgICAgICAgICAgICAgICAgICB3aGl0ZVNwYWNlTXVzdFN0YXJ0ID0gTWF0aC5mbG9vcihNYXRoLm1heCgwLCBwYXR0ZXJuU3RhcnQgLSAoKGkgLSBwYXR0ZXJuU3RhcnQpIC8gNCkpKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5fbWF0Y2hSYW5nZSh3aGl0ZVNwYWNlTXVzdFN0YXJ0LCBwYXR0ZXJuU3RhcnQsIDApKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydDogcGF0dGVyblN0YXJ0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kOiBpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIHBhdHRlcm5TdGFydCArPSBjb3VudGVyWzBdICsgY291bnRlclsxXTtcclxuICAgICAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgNzsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlcltqXSA9IGNvdW50ZXJbaiArIDJdO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgY291bnRlcls3XSA9IDA7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyWzhdID0gMDtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MtLTtcclxu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c3VsdCwgc3RhcnRDb3VudGVyKXtcclxuICAgIHZhciBzZWxmID0gdGhpcyxcclxuICAgICAgICBjYXRlZ29yaXphdGlvbiA9IHtcclxuICAgICAgICAgICAgc3BhY2U6IHtcclxuICAgICAgICAgICAgICAgIG5hcnJvdzogeyBzaXplOiAwLCBjb3VudHM6IDAsIG1pbjogMCwgbWF4OiBOdW1iZXIuTUFYX1ZBTFVFfSxcclxuICAgICAgICAgICAgICAgIHdpZGU6IHtzaXplOiAwLCBjb3VudHM6IDAsIG1pbjogMCwgbWF4OiBOdW1iZXIuTUFYX1ZBTFVFfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBiYXI6IHtcclxuICAgICAgICAgICAgICAgIG5hcnJvdzogeyBzaXplOiAwLCBjb3VudHM6IDAsIG1pbjogMCwgbWF4OiBOdW1iZXIuTUFYX1ZBTFVFfSxcclxuICAgICAgICAgICAgICAgIHdpZGU6IHsgc2l6ZTogMCwgY291bnRzOiAwLCBtaW46IDAsIG1heDogTnVtYmVyLk1BWF9WQUxVRX1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAga2luZCxcclxuICAgICAgICBjYXQsXHJcbiAgICAgICAgaSxcclxuICAgICAgICBqLFxyXG4gICAgICAgIHBvcyA9IHN0YXJ0Q291bnRlcixcclxuICAgICAgICBwYXR0ZXJuO1xyXG5cclxuICAgIGZvciAoaSA9IDA7IGkgPCByZXN1bHQubGVuZ3RoOyBpKyspe1xyXG4gICAgICAgIHBhdHRlcm4gPSBzZWxmLl9jaGFyVG9QYXR0ZXJuKHJlc3VsdFtpXSk7XHJcbiAgICAgICAgZm9yIChqID0gNjsgaiA+PSAwOyBqLS0pIHtcclxuICAgICAgICAgICAga2luZCA9IChqICYgMSkgPT09IDIgPyBjYXRlZ29yaXphdGlvbi5iYXIgOiBjYXRlZ29yaXphdGlvbi5zcGFjZTtcclxuICAgICAgICAgICAgY2F0ID0gKHBhdHRlcm4gJiAxKSA9PT0gMSA/IGtpbmQud2lkZSA6IGtpbmQubmFycm93O1xyXG4gICAgICAgICAgICBjYXQuc2l6ZSArPSBzZWxmLl9jb3VudGVyc1twb3MgKyBqXTtcclxuICAgICAgICAgICAgY2F0LmNvdW50cysrO1xyXG4gICAgICAgICAgICBwYXR0ZXJuID4+PSAxO1xyXG4gICAgICAgIH1cclxuICAgICAgICBwb3MgKz0gODtcclxuICAgIH1cclxuXHJcbiAgICBbXCJzcGFjZVwiLCBcImJhclwiXS5mb3JFYWNoKGZ1bmN0aW9uKGtleSkge1xyXG4gICAgICAgIHZhciBuZXdraW5kID0gY2F0ZWdvcml6YXRpb25ba2V5XTtcclxuICAgICAgICBuZXdraW5kLndpZGUubWluID1cclxuICAgICAgICAgICAgTWF0aC5mbG9vcigobmV3a2luZC5uYXJyb3cuc2l6ZSAvIG5ld2tpbmQubmFycm93LmNvdW50cyArIG5ld2tpbmQud2lkZS5zaXplIC8gbmV3a2luZC53aWRlLmNvdW50cykgLyAyKTtcclxuICAgICAgICBuZXdraW5kLm5hcnJvdy5tYXggPSBNYXRoLmNlaWwobmV3a2luZC53aWRlLm1pbik7XHJcbiAgICAgICAgbmV3a2luZC53aWRlLm1heCA9IE1hdGguY2VpbCgobmV3a2luZC53aWRlLnNpemUgKiBzZWxmLk1BWF9BQ0NFUFRBQkxFICsgc2VsZi5QQURESU5HKSAvIG5ld2tpbmQud2lkZS5jb3VudHMpO1xyXG4gICAgfSk7XHJcblxyXG4gICAgcmV0dXJuIGNhdGVnb3JpemF0aW9uO1xyXG59O1xyXG5cclxuQ29kYWJhclJlYWRlci5wcm90b3R5cGUuX2NoYXJUb1BhdHRlcm4gPSBmdW5jdGlvbihjaGFyKSB7XHJcbiAgICB2YXIgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgY2hhckNvZGUgPSBjaGFyLmNoYXJDb2RlQXQoMCksXHJcbiAgICAgICAgaTtcclxuXHJcbiAgICBmb3IgKGkgPSAwOyBpIDwgc2VsZi5BTFBIQUJFVC5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGlmIChzZWxmLkFMUEhBQkVUW2ldID09PSBjaGFyQ29kZSl7XHJcbiAgICAgICAgICAgIHJldHVybiBzZWxmLkNIQVJBQ1RFUl9FTkNPRElOR1NbaV07XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIDB4MDtcclxufTtcclxuXHJcbkNvZGFiYXJSZWFkZXIucHJvdG90eXBlLl92YWxpZGF0ZVJlc3VsdCA9IGZ1bmN0aW9uKHJlc3VsdCwgc3RhcnRDb3VudGVyKSB7XHJcbiAgICB2YXIgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgdGhyZXNob2xkcyA9IHNlbGYuX3RocmVzaG9sZFJlc3VsdFBhdHRlcm4ocmVzdWx0LCBzdGFydENvdW50ZXIpLFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgaixcclxuICAgICAgICBraW5kLFxyXG4gICAgICAgIGNhdCxcclxuICAgICAgICBzaXplLFxyXG4gICAgICAgIHBvcyA9IHN0YXJ0Q291bnRlcixcclxuICAgICAgICBwYXR0ZXJuO1xyXG5cclxuICAgIGZvciAoaSA9IDA7IGkgPCByZXN1bHQubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBwYXR0ZXJuID0gc2VsZi5fY2hhclRvUGF0dGVybihyZXN1bHRbaV0pO1xyXG4gICAgICAgIGZvciAoaiA9IDY7IGogPj0gMDsgai0tKSB7XHJcbiAgICAgICAgICAgIGtpbmQgPSAoaiAmIDEpID09PSAwID8gdGhyZXNob2xkcy5iYXIgOiB0aHJlc2hvbGRzLnNwYWNlO1xyXG4gICAgICAgICAgICBjYXQgPSAocGF0dGVybiAmIDEpID09PSAxID8ga2luZC53aWRlIDoga2luZC5uYXJyb3c7XHJcbiAgICAgICAgICAgIHNpemUgPSBzZWxmLl9jb3VudGVyc1twb3MgKyBqXTtcclxuICAgICAgICAgICAgaWYgKHNpemUgPCBjYXQubWluIHx8IHNpem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AgfVxyXG4gICAgICAgIGlmIChjb3VudGVyIDwgbWluKSB7XHJcbiAgICAgICAgICAgIG1pbiA9IGNvdW50ZXI7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiAoKG1pbiArIG1heCkgLyAyLjApIHwgMDtcclxufTtcclxuXHJcbkNvZGFiYXJSZWFkZXIucHJvdG90eXBlLl90b1BhdHRlcm4gPSBmdW5jdGlvbihvZmZzZXQpIHtcclxuICAgIHZhciBudW1Db3VudGVycyA9IDcsXHJcbiAgICAgICAgZW5kID0gb2Zmc2V0ICsgbnVtQ291bnRlcnMsXHJcbiAgICAgICAgYmFyVGhyZXNob2xkLFxyXG4gICAgICAgIHNwYWNlVGhyZXNob2xkLFxyXG4gICAgICAgIGJpdG1hc2sgPSAxIDw8IChudW1Db3VudGVycyAtIDEpLFxyXG4gICAgICAgIHBhdHRlcm4gPSAwLFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgdGhyZXNob2xkO1xyXG5cclxuICAgIGlmIChlbmQgPiB0aGlzLl9jb3VudGVycy5sZW5ndGgpIHtcclxuICAgICAgICByZXR1cm4gLTE7XHJcbiAgICB9XHJcblxyXG4gICAgYmFyVGhyZXNob2xkID0gdGhpcy5fY29tcHV0ZUFsdGVybmF0aW5nVGhyZXNob2xkKG9mZnNldCwgZW5kKTtcclxuICAgIHNwYWNlVGhyZXNob2xkID0gdGhpcy5fY29tcHV0ZUFsdGVybmF0aW5nVGhyZXNob2xkKG9mZnNldCArIDEsIGVuZCk7XHJcblxyXG4gICAgZm9yIChpID0gMDsgaSA8IG51bUNvdW50ZXJzOyBpKyspe1xyXG4gICAgICAgIHRocmVzaG9sZCA9IChpICYgMSkgPT09IDAgPyBiYXJUaHJlc2hvbGQgOiBzcGFjZVRocmVzaG9sZDtcclxuICAgICAgICBpZiAodGhpcy5fY291bnRlcnNbb2Zmc2V0ICsgaV0gPiB0aHJlc2hvbGQpIHtcclxuICAgICAgICAgICAgcGF0dGVybiB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cGUuX2RlY29kZVBheWxvYWQgPSBmdW5jdGlvbihjb2RlLCByZXN1bHQsIGRlY29kZWRDb2Rlcykge1xyXG4gICAgdmFyIGksXHJcbiAgICAgICAgc2VsZiA9IHRoaXM7XHJcblxyXG4gICAgZm9yICggaSA9IDA7IGkgPCA0OyBpKyspIHtcclxuICAgICAgICBjb2RlID0gc2VsZi5fZGVjb2RlQ29kZShjb2RlLmVuZCwgc2VsZi5DT0RFX0dfU1RBUlQpO1xyXG4gICAgICAgIGlmICghY29kZSkge1xyXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmVzdWx0LnB1c2goY29kZS5jb2RlKTtcclxuICAgICAgICBkZWNvZGVkQ29kZXMucHVzaChjb2RlKTtcclxuICAgIH1cclxuXHJcbiAgICBjb2RlID0gc2VsZi5fZmluZFBhdHRlcm4oc2VsZi5NSURETEVfUEFUVEVSTiwgY29kZS5lbmQsIHRydWUsIGZhbHNlKTtcclxuICAgIGlmIChjb2RlID09PSBudWxsKSB7XHJcbiAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICB9XHJcbiAgICBkZWNvZGVkQ29kZXMucHVzaChjb2RlKTtcclxuXHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IDQ7IGkrKykge1xyXG4gICAgICAgIGNvZGUgPSBzZWxmLl9kZWNvZGVDb2RlKGNvZGUuZW5kLCBzZWxmLkNPREVfR19TVEFSVCk7XHJcbiAgICAgICAgaWYgKCFjb2RlKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgIH1cclxuICAgICAgICBkZWNvZGVkQ29kZXMucHVzaChjb2RlKTtcclxuICAgICAgICByZXN1bHQucHVzaChjb2RlLmNvZGUpO1xyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiBjb2RlO1xyXG59O1xyXG5cclxuZXhwb3J0IGRlZmF1bHQgRUFOOFJlYWRlcjtcclxuXG5cblxuLyoqIFdFQlBBQ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HJcbnZhciBOID0gMSxcclxuICAgIFcgPSAzLFxyXG4gICAgcHJvcGVydGllcyA9IHtcclxuICAgICAgICBNT0RVTE86IHt2YWx1ZTogMTB9LFxyXG4gICAgICAgIFNUQVJUX1BBVFRFUk46IHt2YWx1ZTogW04gKiAyLjUsIE4gKiAyLjUsIE4gKiAyLjUsIE4gKiAyLjVdfSxcclxuICAgICAgICBTVE9QX1BBVFRFUk46IHt2YWx1ZTogW04gKiAyLCBOICogMiwgVyAqIDJdfSxcclxuICAgICAgICBDT0RFX1BBVFRFUk46IHt2YWx1ZTogW1xyXG4gICAgICAgICAgICBbTiwgTiwgVywgVywgTl0sXHJcbiAgICAgICAgICAgIFtXLCBOLCBOLCBOLCBXXSxcclxuICAgICAgICAgICAgW04sIFcsIE4sIE4sIFddLFxyXG4gICAgICAgICAgICBbVywgVywgTiwgTiwgTl0sXHJcbiAgICAgICAgICAgIFtOLCBOLCBXLCBOLCBXXSxcclxuICAgICAgICAgICAgW1csIE4sIFcsIE4sIE5dLFxyXG4gICAgICAgICAgICBbTiwgVywgVywgTiwgTl0sXHJcbiAgICAgICAgICAgIFtOLCBOLCBOLCBXLCBXXSxcclxuICAgICAgICAgICAgW1csIE4sIE4sIFcsIE5dLFxyXG4gICAgICAgICAgICBbTiwgVywgTiwgVywgTl1cclxuICAgICAgICBdfSxcclxuICAgICAgICBTSU5HTEVfQ09ERV9FUlJPUjoge3ZhbHVlOiAwLjc4LCB3cml0YWJsZTogdHJ1ZX0sXHJcbiAgICAgICAgQVZHX0NPREVfRVJST1I6IHt2YWx1ZTogMC4zOCwgd3JpdGFibGU6IHRydWV9LFxyXG4gICAgICAgIE1BWF9DT1JSRUNUSU9OX0ZBQ1RPUjoge3ZhbHVlOiA1fSxcclxuICAgICAgICBGT1JNQVQ6IHt2YWx1ZTogXCJpMm9mNVwifVxyXG4gICAgfTtcclxuXHJcbkkyb2Y1UmVhZGVyLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoQmFyY29kZVJlYWRlci5wcm90b3R5cGUsIHByb3BlcnRpZXMpO1xyXG5JMm9mNVJlYWRlci5wcm90b3R5cGUuY29uc3RydWN0b3IgPSBJMm9mNVJlYWRlcjtcclxuXHJcbkkyb2Y1UmVhZGVyLnByb3RvdHlwZS5fbWF0Y2hQYXR0ZXJuID0gZnVuY3Rpb24oY291bnRlciwgY29kZSkge1xyXG4gICAgaWYgKHRoaXMuY29uZmlnLm5vcm1hbGl6ZUJhclNwYWNlV2lkdGgpIHtcclxuICAgICAgICB2YXIgaSxcclxuICAgICAgICAgICAgY291bnRlclN1bSA9IFswLCAwXSxcclxuICAgICAgICAgICAgY29kZVN1bSA9IFswLCAwXSxcclxuICAgICAgICAgICAgY29ycmVjdGlvbiA9IFswLCAwXSxcclxuICAgICAgICAgICAgY29ycmVjdGlvblJhdGlvID0gdGhpcy5NQVhfQ09SUkVDVElPTl9GQUNUT1IsXHJcbiAgICAgICAgICAgIGNvcnJlY3Rpb25SYXRpb0ludmVyc2UgPSAxIC8gY29ycmVjdGlvblJhdGlvO1xyXG5cclxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY291bnRlci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBjb3VudGVyU3VtW2kgJSAyXSArPSBjb3VudGVyW2ldO1xyXG4gICAgICAgICAgICBjb2RlU3VtW2kgJSAyXSArPSBjb2RlW2ldO1xyXG4gICAgICAgIH1cclxuICAgICAgICBjb3JyZWN0aW9uWzBdID0gY29kZVN1bVswXSAvIGNvdW50ZXJTdW1bMF07XHJcbiAgICAgICAgY29ycmVjdGlvblsxXSA9IGNvZGVTdW1bMV0gLyBjb3VudGVyU3VtWzFdO1xyXG5cclxuICAgICAgICBjb3JyZWN0aW9uWzBdID0gTWF0aC5tYXgoTWF0aC5taW4oY29ycmVjdGlvblswXSwgY29ycmVjdGlvblJhdGlvKSwgY29ycmVjdGlvblJhdGlvSW52ZXJzZSk7XHJcbiAgICAgICAgY29ycmVjdGlvblsxXSA9I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cmRlciB8fCBmYWxzZTtcclxuXHJcbiAgICBpZiAoIW9mZnNldCkge1xyXG4gICAgICAgIG9mZnNldCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93KTtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IHBhdHRlcm4ubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBjb3VudGVyW2ldID0gMDtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gb2Zmc2V0OyBpIDwgc2VsZi5fcm93Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgaWYgKHNlbGYuX3Jvd1tpXSBeIGlzV2hpdGUpIHtcclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSsrO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChjb3VudGVyUG9zID09PSBjb3VudGVyLmxlbmd0aCAtIDEpIHtcclxuICAgICAgICAgICAgICAgIHN1bSA9IDA7XHJcbiAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IGNvdW50ZXIubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBzdW0gKz0gY291bnRlcltqXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWQgPSBzZWxmLl9ub3JtYWxpemUoY291bnRlcik7XHJcbiAgICAgICAgICAgICAgICBpZiAobm9ybWFsaXplZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGVycm9yID0gc2VsZi5fbWF0Y2hQYXR0ZXJuKG5vcm1hbGl6ZWQsIHBhdHRlcm4pO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IgPCBlcHNpbG9uKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lcnJvciA9IGVycm9yO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guc3RhcnQgPSBpIC0gc3VtO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZW5kID0gaTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJlc3RNYXRjaDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAodHJ5SGFyZGVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGNvdW50ZXIubGVuZ3RoIC0gMjsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbal0gPSBjb3VudGVyW2ogKyAyXTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyLmxlbmd0aCAtIDJdID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXIubGVuZ3RoIC0gMV0gPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MtLTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbnVsbDtcclxufTtcclxuXHJcbkkyb2Y1UmVhZGVyLnByb3RvdHlwZS5fZmluZFN0YXJ0ID0gZnVuY3Rpb24oKSB7XHJcbiAgICB2YXIgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgbGVhZGluZ1doaXRlc3BhY2VTdGFydCxcclxuIC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hpdGVzcGFjZShlbmRJbmZvKSA6IG51bGw7XHJcbn07XHJcblxyXG5JMm9mNVJlYWRlci5wcm90b3R5cGUuX2RlY29kZVBhaXIgPSBmdW5jdGlvbihjb3VudGVyUGFpcikge1xyXG4gICAgdmFyIGksXHJcbiAgICAgICAgY29kZSxcclxuICAgICAgICBjb2RlcyA9IFtdLFxyXG4gICAgICAgIHNlbGYgPSB0aGlzO1xyXG5cclxuICAgIGZvciAoaSA9IDA7IGkgPCBjb3VudGVyUGFpci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGNvZGUgPSBzZWxmLl9kZWNvZGVDb2RlKGNvdW50ZXJQYWlyW2ldKTtcclxuICAgICAgICBpZiAoIWNvZGUpIHtcclxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGNvZGVzLnB1c2goY29kZSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gY29kZXM7XHJcbn07XHJcblxyXG5JMm9mNVJlYWRlci5wcm90b3R5cGUuX2RlY29kZUNvZGUgPSBmdW5jdGlvbihjb3VudGVyKSB7XHJcbiAgICB2YXIgaixcclxuICAgICAgICBzZWxmID0gdGhpcyxcclxuICAgICAgICBzdW0gPSAwLFxyXG4gICAgICAgIG5vcm1hbGl6ZWQsXHJcbiAgICAgICAgZXJyb3IsXHJcbiAgICAgICAgZXBzaWxvbiA9IHNlbGYuQVZHX0NPREVfRVJST1IsXHJcbiAgICAgICAgY29kZSxcclxuICAgICAgICBiZXN0TWF0Y2ggPSB7XHJcbiAgICAgICAgICAgIGVycm9yOiBOdW1iZXIuTUFYX1ZBTFVFLFxyXG4gICAgICAgICAgICBjb2RlOiAtMSxcclxuICAgICAgICAgICAgc3RhcnQ6IDAsXHJcbiAgICAgICAgICAgIGVuZDogMFxyXG4gICAgICAgIH07XHJcblxyXG4gICAgZm9yICggaiA9IDA7IGogPCBjb3VudGVyLmxlbmd0aDsgaisrKSB7XHJcbiAgICAgICAgc3V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JcbiAgICBmdW5jdGlvbiBwdWJsaXNoU3Vic2NyaXB0aW9uKHN1YnNjcmlwdGlvbiwgZGF0YSkge1xyXG4gICAgICAgIGlmIChzdWJzY3JpcHRpb24uYXN5bmMpIHtcclxuICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIHN1YnNjcmlwdGlvbi5jYWxsYmFjayhkYXRhKTtcclxuICAgICAgICAgICAgfSwgNCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgc3Vic2NyaXB0aW9uLmNhbGxiYWNrKGRhdGEpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBzdWJzY3JpYmUoZXZlbnQsIGNhbGxiYWNrLCBhc3luYykge1xyXG4gICAgICAgIHZhciBzdWJzY3JpcHRpb247XHJcblxyXG4gICAgICAgIGlmICggdHlwZW9mIGNhbGxiYWNrID09PSBcImZ1bmN0aW9uXCIpIHtcclxuICAgICAgICAgICAgc3Vic2NyaXB0aW9uID0ge1xyXG4gICAgICAgICAgICAgICAgY2FsbGJhY2s6IGNhbGxiYWNrLFxyXG4gICAgICAgICAgICAgICAgYXN5bmM6IGFzeW5jXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgc3Vic2NyaXB0aW9uID0gY2FsbGJhY2s7XHJcbiAgICAgICAgICAgIGlmICghc3Vic2NyaXB0aW9uLmNhbGxiYWNrKSB7XHJcbiAgICAgICAgICAgICAgICB0aHJvdyBcIkNhbGxiYWNrIHdhcyBub3Qgc3BlY2lmaWVkIG9uIG9wdGlvbnNcIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZ2V0RXZlbnQoZXZlbnQpLnN1YnNjcmliZXJzLnB1c2goc3Vic2NyaXB0aW9uKTtcclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4ge1xyXG4gICAgICAgIHN1YnNjcmliZTogZnVuY3Rpb24oZXZlbnQsIGNhbGxiYWNrLCBhc3luYykge1xyXG4gICAgICAgICAgICByZXR1cm4gc3Vic2NyaWJlKGV2ZW50LCBjYWxsYmFjaywgYXN5bmMpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgcHVibGlzaDogZnVuY3Rpb24oZXZlbnROYW1lLCBkYXRhKSB7XHJcbiAgICAgICAgICAgIHZhciBldmVudCA9IGdldEV2ZW50KGV2ZW50TmFtZSksXHJcbiAgICAgICAgICAgICAgICBzdWJzY3JpYmVycyA9IGV2ZW50LnN1YnNjcmliZXJzO1xyXG5cclxuICAgICAgICAgICAgZXZlbnQuc3Vic2NyaWJlcnMgPSBzdWJzY3JpYmVycy5maWx0ZXIoZnVuY3Rpb24oc3Vic2NyaWJlcikge1xyXG4gICAgICAgICAgICAgICAgcHVibGlzaFN1YnNjcmlwdGlvbihzdWJzY3JpYmVyLCBkYXRhKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiAhc3Vic2NyaWJlci5vbmNlO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIG9uY2U6IGZ1bmN0aW9uKGV2ZW50LCBjYWxsYmFjaywgYXN5bmMpIHtcclxuICAgICAgICAgICAgc3Vic2NyaWJlKGV2ZW50LCB7XHJcbiAgICAgICAgICAgICAgICBjYWxsYmFjazogY2FsbGJhY2ssXHJcbiAgICAgICAgICAgICAgICBhc3luYzogYXN5bmMsXHJcbiAgICAgICAgICAgICAgICBvbmNlOiB0cnVlXHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgdW5zdWJzY3JpYmU6IGZ1bmN0aW9uKGV2ZW50TmFtZSwgY2FsbGJhY2spIHtcclxuICAgICAgICAgICAgdmFyIGV2ZW50O1xyXG5cclxuICAgICAgICAgICAgaWYgKGV2ZW50TmFtZSkge1xyXG4gICAgICAgICAgICAgICAgZXZlbnQgPSB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FTdHJlYW1UcmFjay5nZXRTb3VyY2VzICE9PSAndW5kZWZpbmVkJykge1xyXG4gICAgICAgIE1lZGlhU3RyZWFtVHJhY2suZ2V0U291cmNlcyhmdW5jdGlvbihzb3VyY2VJbmZvcykge1xyXG4gICAgICAgICAgICB2YXIgdmlkZW9Tb3VyY2VJZDtcclxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBzb3VyY2VJbmZvcy5sZW5ndGg7ICsraSkge1xyXG4gICAgICAgICAgICAgICAgdmFyIHNvdXJjZUluZm8gPSBzb3VyY2VJbmZvc1tpXTtcclxuICAgICAgICAgICAgICAgIGlmIChzb3VyY2VJbmZvLmtpbmQgPT09IFwidmlkZW9cIiAmJiBzb3VyY2VJbmZvLmZhY2luZyA9PT0gdmlkZW9Db25zdHJhaW50cy5mYWNpbmcpIHtcclxuICAgICAgICAgICAgICAgICAgICB2aWRlb1NvdXJjZUlkID0gc291cmNlSW5mby5pZDtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb25zdHJhaW50cy52aWRlbyA9IHtcclxuICAgICAgICAgICAgICAgIG1hbmRhdG9yeToge1xyXG4gICAgICAgICAgICAgICAgICAgIG1pbldpZHRoOiB2aWRlb0NvbnN0cmFpbnRzLndpZHRoLFxyXG4gICAgICAgICAgICAgICAgICAgIG1pbkhlaWdodDogdmlkZW9Db25zdHJhaW50cy5oZWlnaHQsXHJcbiAgICAgICAgICAgICAgICAgICAgbWluQXNwZWN0UmF0aW86IHZpZGVvQ29uc3RyYWludHMubWluQXNwZWN0UmF0aW8sXHJcbiAgICAgICAgICAgICAgICAgICAgbWF4QXNwZWN0UmF0aW86IHZpZGVvQ29uc3RyYWludHMubWF4QXNwZWN0UmF0aW9cclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBvcHRpb25hbDogW3tcclxuICAgICAgICAgICAgICAgICAgICBzb3VyY2VJZDogdmlkZW9Tb3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AgICAgICAgICAgICB2YXIgcmVzdWx0ID0ge307XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoZXNDb25zdHJhaW50cyhjb2RlUmVzdWx0KSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNhcGFjaXR5LS07XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LmNvZGVSZXN1bHQgPSBjb2RlUmVzdWx0O1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjYXB0dXJlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbnZhcy53aWR0aCA9IGltYWdlU2l6ZS54O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYW52YXMuaGVpZ2h0ID0gaW1hZ2VTaXplLnk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEltYWdlRGVidWcuZHJhd0ltYWdlKGRhdGEsIGltYWdlU2l6ZSwgY3R4KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LmZyYW1lID0gY2FudmFzLnRvRGF0YVVSTCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXN1bHRzLnB1c2gocmVzdWx0KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZ2V0UmVzdWx0czogZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0cztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH07XHJcbiAgICB9XHJcbn07XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIEQ6L3dvcmsvcXVhZ2dhSlMvc3JjL2FuYWx5dGljcy9yZXN1bHRfY29sbGVjdG9yLmpzXG4gKiovIiwibGV0IGNvbmZpZztcclxuXHJcbmlmIChFTlYuZGV2ZWxvcG1lbnQpe1xyXG4gICAgY29uZmlnID0gcmVxdWlyZSgnLi9jb25maWcuZGV2Lmp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VcmwsIGZ1bmN0aW9uKGVyciwgcGl4ZWxzKSB7XHJcbiAgICAgICAgICAgIGlmIChlcnIpIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGVycik7XHJcbiAgICAgICAgICAgICAgICBleGl0KDEpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGxvYWRlZCA9IHRydWU7XHJcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKHBpeGVscy5zaGFwZSk7XHJcbiAgICAgICAgICAgIGZyYW1lID0gcGl4ZWxzO1xyXG4gICAgICAgICAgICB3aWR0aCA9IHBpeGVscy5zaGFwZVswXTtcclxuICAgICAgICAgICAgaGVpZ2h0ID0gcGl4ZWxzLnNoYXBlWzFdO1xyXG4gICAgICAgICAgICBjYWxjdWxhdGVkV2lkdGggPSBfY29uZmlnLnNpemUgPyB3aWR0aC9oZWlnaHQgPiAxID8gX2NvbmZpZy5zaXplIDogTWF0aC5mbG9vcigod2lkdGgvaGVpZ2h0KSAqIF9jb25maWcuc2l6ZSkgOiB3aWR0aDtcclxuICAgICAgICAgICAgY2FsY3VsYXRlZEhlaWdodCA9IF9jb25maWcuc2l6ZSA/IHdpZHRoL2hlaWdodCA+IDEgPyBNYXRoLmZsb29yKChoZWlnaHQvd2lkdGgpICogX2NvbmZpZy5zaXplKSA6IF9jb25maWcuc2l6ZSA6IGhlaWdodDtcclxuXHJcbiAgICAgICAgICAgIF9jYW52YXNTaXplLnggPSBjYWxjdWxhdGVkV2lkdGg7XHJcbiAgICAgICAgICAgIF9jYW52YXNTaXplLnkgPSBjYWxjdWxhdGVkSGVpZ2h0O1xyXG5cclxuICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIHB1Ymxpc2hFdmVudChcImNhbnJlY29yZFwiLCBbXSk7XHJcbiAgICAgICAgICAgIH0sIDApO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW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XplZCBncmF5IGltYWdlXHJcbiAgICAgICAgQ1ZVdGlscy5jb21wdXRlR3JheShmcmFtZS5kYXRhLCBfZ3JheURhdGEpO1xyXG5cclxuICAgICAgICAvLyAyLiBpbnRlcnBvbGF0ZVxyXG4gICAgICAgIGZvciAoeSA9IDA7IHkgPCBfY2FudmFzU2l6ZS55OyB5KyspIHtcclxuICAgICAgICAgICAgZm9yICh4ID0gMDsgeCA8IF9jYW52YXNTaXplLng7IHgrKykge1xyXG4gICAgICAgICAgICAgICAgX2NhbnZhc0ltYWdlQXJyYXkuc2V0KHgsIHksIChJbnRlcnAyRChfZ3JheUltYWdlQXJyYXksIHggKiBfc3RlcFNpemVYLCB5ICogX3N0ZXBTaXplWSkpIHwgMCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIHRhcmdldEltYWdlQXJyYXkgbXVzdCBiZSBlcXVhbCB0byB0YXJnZXRTaXplXHJcbiAgICAgICAgaWYgKF90YXJnZXRJbWFnZUFycmF5LnNoYXBlWzBdICE9PSBfc2l6ZS54IHx8XHJcbiAgICAgICAgICAgIF90YXJnZXRJbWFnZUFycmF5LnNoYXBlWzFdICE9PSBfc2l6ZS55KSB7XHJcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlNoYXBlcyBkbyBub3QgbWF0Y2ghXCIpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gMy4gY3JvcFxyXG4gICAgICAgIGZvciAoeSA9IDA7IHkgPCBfc2l6ZS55OyB5KyspIHtcclxuICAgICAgICAgICAgZm9yICh4ID0gMDsgeCA8IF9zaXplLng7IHgrKykge1xyXG4gICAgICAgICAgICAgICAgX2RhdGFbeSAqIF9zaXplLnggKyB4XSA9IF90YXJnZXRJbWFnZUFycmF5LmdldCh4LCB5KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0sXHJcblxyXG4gICAgX3RoYXQuZ2V0U2l6ZSA9IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgIHJldHVybiBfc2l6ZTtcclxuICAgIH07XHJcblxyXG4gICAgcmV0dXJuIF90aGF0O1xyXG59O1xyXG5cclxubW9kdWxlLmV4cG9ydHMgPSBGcmFtZUdyYWJiZXI7XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIEQ6L3dvcmsvcXVhZ2dhSlMvbGliL2ZyYW1lX2dyYWJiZXIuanNcbiAqKi8iLCJtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoXCJuZGFycmF5XCIpO1xuXG5cbi8qKioqKioqKioqKioqKioqKlxuICoqIFdFQlBBQ0sgRk9PVEVSXG4gKiogZXh0ZXJuYWwgXCJuZGFycmF5XCJcbiAqKiBtb2R1bGUgaWQgPSA2N1xuICoqIG1vZHVsZSBjaHVua3MgPSAwXG4gKiovIiwibW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKFwibmRhcnJheS1saW5lYXItaW50ZXJwb2xhdGVcIik7XG5cblxuLyoqKioqKioqKioqKioqKioqXG4gKiogV0VCUEFDSyBGT09URVJcbiAqKiBleHRlcm5hbCBcIm5kYXJyYXktbGluZWFyLWludGVycG9sYXRlXCJcbiAqKiBtb2R1bGUgaWQgPSA2OFxuICoqIG1vZHVsZSBjaHVua3MgPSAwXG4gKiovIl0sInNvdXJjZVJvb3QiOiIifQ==
\ No newline at end of file
+/******/ ])
+});
+;
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCAxMDVjNGEzODNlM2NkNDRmOGYzOCIsIndlYnBhY2s6Ly8vLi9+L3dlYnJ0Yy1hZGFwdGVyL3NyYy9qcy91dGlscy5qcyIsIndlYnBhY2s6Ly8vLi9+L2xvZGFza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vcm1hbGl6ZSA9IGZ1bmN0aW9uKGNvdW50ZXIsIG1vZHVsbykge1xyXG4gICAgdmFyIGksXHJcbiAgICAgICAgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgc3VtID0gMCxcclxuICAgICAgICByYXRpbyxcclxuICAgICAgICBudW1PbmVzID0gMCxcclxuICAgICAgICBub3JtYWxpemVkID0gW10sXHJcbiAgICAgICAgbm9ybSA9IDA7XHJcblxyXG4gICAgaWYgKCFtb2R1bG8pIHtcclxuICAgICAgICBtb2R1bG8gPSBzZWxmLk1PRFVMTztcclxuICAgIH1cclxuICAgIGZvciAoaSA9IDA7IGkgPCBjb3VudGVyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgaWYgKGNvdW50ZXJbaV0gPT09IDEpIHtcclxuICAgICAgICAgICAgbnVtT25lcysrO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHN1bSArPSBjb3VudGVyW2ldO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJhdGlvID0gc3VtIC8gKG1vZHVsbyAtIG51bU9uZXMpO1xyXG4gICAgaWYgKHJhdGlvID4gMS4wKSB7XHJcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvdW50ZXIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgbm9ybSA9IGNvdW50ZXJbaV0gPT09IDEgPyBjb3VudGVyW2ldIDogY291bnRlcltpXSAvIHJhdGlvO1xyXG4gICAgICAgICAgICBub3JtYWxpemVkLnB1c2gobm9ybSk7XHJcbiAgICAgICAgfVxyXG4gICAgfSBlbHNlIHtcclxuICAgICAgICByYXRpbyA9IChzdW0gKyBudW1PbmVzKSAvIG1vZHVsbztcclxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY291bnRlci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBub3JtID0gY291bnRlcltpXSAvIHJhdGlvO1xyXG4gICAgICAgICAgICBub3JtYWxpemVkLnB1c2gobm9ybSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIG5vcm1hbGl6ZWQ7XHJcbn07XHJcblxyXG5CYXJjb2RlUmVhZGVyLnByb3RvdHlwZS5fbWF0Y2hUcmFjZSA9IGZ1bmN0aW9uKGNtcENvdW50ZXIsIGVwc2lsb24pIHtcclxuICAgIHZhciBjb3VudGVyID0gW10sXHJcbiAgICAgICAgaSxcclxuICAgICAgICBzZWxmID0gdGhpcyxcclxuICAgICAgICBvZmZzZXQgPSBzZWxmLl9uZXh0U2V0KHNlbGYuX3JvdyksXHJcbiAgICAgICAgaXNXaGl0ZSA9ICFzZWxmLl9yb3dbb2Zmc2V0XSxcclxuICAgICAgICBjb3VudGVyUG9zID0gMCxcclxuICAgICAgICBiZXN0TWF0Y2ggPSB7XHJcbiAgICAgICAgICAgIGVycm9yOiBOdW1iZXIuTUFYX1ZBTFVFLFxyXG4gICAgICAgICAgICBjb2RlOiAtMSxcclxuICAgICAgICAgICAgc3RhcnQ6IDBcclxuICAgICAgICB9LFxyXG4gICAgICAgIGVycm9yO1xyXG5cclxuICAgIGlmIChjbXBDb3VudGVyKSB7XHJcbiAgICAgICAgZm9yICggaSA9IDA7IGkgPCBjbXBDb3VudGVyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGNvdW50ZXIucHVzaCgwKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZm9yICggaSA9IG9mZnNldDsgaSA8IHNlbGYuX3Jvdy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSsrO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvdW50ZXJQb3MgPT09IGNvdW50ZXIubGVuZ3RoIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGVycm9yID0gc2VsZi5fbWF0Y2hQYXR0ZXJuKGNvdW50ZXIsIGNtcENvdW50ZXIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IgPCBlcHNpbG9uKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5zdGFydCA9IGkgLSBvZmZzZXQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lbmQgPSBpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guY291bnRlciA9IGNvdW50ZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBiZXN0TWF0Y2g7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdID0gMTtcclxuICAgICAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgY291bnRlci5wdXNoKDApO1xyXG4gICAgICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgaWYgKHNlbGYuX3Jvd1tpXSBeIGlzV2hpdGUpIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10rKztcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MrKztcclxuICAgICAgICAgICAgICAgIGNvdW50ZXIucHVzaCgwKTtcclx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mb3IgKGk7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgIGogPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiBpKTtcclxuICAgICAgICAgICAgeCA9IGFycltpXTtcclxuICAgICAgICAgICAgYXJyW2ldID0gYXJyW2pdO1xyXG4gICAgICAgICAgICBhcnJbal0gPSB4O1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gYXJyO1xyXG4gICAgfSxcclxuXHJcbiAgICB0b1BvaW50TGlzdDogZnVuY3Rpb24oYXJyKSB7XHJcbiAgICAgICAgdmFyIGksIGosIHJvdyA9IFtdLCByb3dzID0gW107XHJcbiAgICAgICAgZm9yICggaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgcm93ID0gW107XHJcbiAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgYXJyW2ldLmxlbmd0aDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICByb3dbal0gPSBhcnJbaV1bal07XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcm93c1tpXSA9IFwiW1wiICsgcm93LmpvaW4oXCIsXCIpICsgXCJdXCI7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBcIltcIiArIHJvd3Muam9pbihcIixcXHJcXG5cIikgKyBcIl1cIjtcclxuICAgIH0sXHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiByZXR1cm5zIHRoZSBlbGVtZW50cyB3aGljaCdzIHNjb3JlIGlzIGJpZ2dlciB0aGFuIHRoZSB0aHJlc2hvbGRcclxuICAgICAqIEByZXR1cm4ge0FycmF5fSB0aGUgcmVkdWNlZCBhcnJheVxyXG4gICAgICovXHJcbiAgICB0aHJlc2hvbGQ6IGZ1bmN0aW9uKGFyciwgdGhyZXNob2xkLCBzY29yZUZ1bmMpIHtcclxuICAgICAgICB2YXIgaSwgcXVldWUgPSBbXTtcclxuICAgICAgICBmb3IgKCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBpZiAoc2NvcmVGdW5jLmFwcGx5KGFyciwgW2FycltpXV0pID49IHRocmVzaG9sZCkge1xyXG4gICAgICAgICAgICAgICAgcXVldWUucHVzaChhcnJbaV0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBxdWV1ZTtcclxuICAgIH0sXHJcblxyXG4gICAgbWF4SW5kZXg6IGZ1bmN0aW9uKGFycikge1xyXG4gICAgICAgIHZhciBpLCBtYXggPSAwO1xyXG4gICAgICAgIGZvciAoIGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChhcnJbaV0gPiBhcnJbbWF4XSkge1xyXG4gICAgICAgICAgICAgICAgbWF4ID0gaTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gbWF4O1xyXG4gICAgfSxcclxuXHJcbiAgICBtYXg6IGZ1bmN0aW9uKGFycikge1xyXG4gICAgICAgIHZhciBpLCBtYXggPSAwO1xyXG4gICAgICAgIGZvciAoIGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChhcnJbaV0gPiBtYXgpIHtcclxuICAgICAgICAgICAgICAgIG1heCA9IGFycltpXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gbWF4O1xyXG4gICAgfSxcclxuXHJcbiAgICBzdW06IGZ1bmN0aW9uKGFycikge1xyXG4gICAgICAgIHZhciBsZW5ndGggPSBhcnIubGVuZ3RoLFxyXG4gICAgICAgICAgICBzdW0gPSAwO1xyXG5cclxuICAgICAgICB3aGlsZSAobGVuZ3RoLS0pIHtcclxuICAgICAgICAgICAgc3VtICs9IGFycltsZW5ndGhdO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gc3VtO1x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uZDogc3RhcnRcclxuICAgICAgICB9LFxyXG4gICAgICAgIGNvZGUsXHJcbiAgICAgICAgZXJyb3IsXHJcbiAgICAgICAgbm9ybWFsaXplZDtcclxuXHJcbiAgICBpZiAoIWNvZGVyYW5nZSkge1xyXG4gICAgICAgIGNvZGVyYW5nZSA9IHNlbGYuQ09ERV9QQVRURVJOLmxlbmd0aDtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gb2Zmc2V0OyBpIDwgc2VsZi5fcm93Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgaWYgKHNlbGYuX3Jvd1tpXSBeIGlzV2hpdGUpIHtcclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSsrO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChjb3VudGVyUG9zID09PSBjb3VudGVyLmxlbmd0aCAtIDEpIHtcclxuICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWQgPSBzZWxmLl9ub3JtYWxpemUoY291bnRlcik7XHJcbiAgICAgICAgICAgICAgICBpZiAobm9ybWFsaXplZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAoY29kZSA9IDA7IGNvZGUgPCBjb2RlcmFuZ2U7IGNvZGUrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvciA9IHNlbGYuX21hdGNoUGF0dGVybihub3JtYWxpemVkLCBzZWxmLkNPREVfUEFUVEVSTltjb2RlXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnJvciA8IGJlc3RNYXRjaC5lcnJvcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmNvZGUgPSBjb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVycm9yID0gZXJyb3I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVuZCA9IGk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGJlc3RNYXRjaC5lcnJvciA+IHNlbGYuQVZHX0NPREVfRVJST1IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBiZXN0TWF0Y2g7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbnVsbDtcclxufTtcclxuXHJcbkVBTlJlYWRlci5wcm90b3R5cGUuX2ZpbmRQYXR0ZXJuID0gZnVuY3Rpb24ocGF0dGVybiwgb2Zmc2V0LCBpc1doaXRlLCB0cnlIYXJkZXIsIGVwc2lsb24pIHtcclxuICAgIHZhciBjb3VudGVyID0gW10sXHJcbiAgICAgICAgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgaSxcclxuICAgICAgICBjb3VudGVyUG9zID0gMCxcclxuICAgICAgICBiZXN0TWF0Y2ggPSB7XHJcbiAgICAgICAgICAgIGVycm9yOiBOdW1iZXIuTUFYX1ZBTFVFLFxyXG4gICAgICAgICAgICBjb2RlOiAtMSxcclxuICAgICAgICAgICAgc3RhcnQ6IDAsXHJcbiAgICAgICAgICAgIGVuZDogMFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZXJyb3IsXHJcbiAgICAgICAgaixcclxuICAgICAgICBzdW0sXHJcbiAgICAgICAgbm9ybWFsaXplZDtcclxuXHJcbiAgICBpZiAoIW9mZnNldCkge1xyXG4gICAgICAgIG9mZnNldCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93KTtcclxuICAgIH1cclxuXHJcbiAgICBpZiAoaXNXaGl0ZSA9PT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgaXNXaGl0ZSA9IGZhbHNlO1xyXG4gICAgfVxyXG5cclxuICAgIGlmICh0cnlIYXJkZXIgPT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgIHRyeUhhcmRlciA9IHRydWU7XHJcbiAgICB9XHJcblxyXG4gICAgaWYgKCBlcHNpbG9uID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICBlcHNpbG9uID0gc2VsZi5BVkdfQ09ERV9FUlJPUjtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gMDsgaSA8IHBhdHRlcm4ubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBjb3VudGVyW2ldID0gMDtcclxuICAgIH1cclxuXHJcbiAgICBmb3IgKCBpID0gb2Zmc2V0OyBpIDwgc2VsZi5fcm93Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgaWYgKHNlbGYuX3Jvd1tpXSBeIGlzV2hpdGUpIHtcclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSsrO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChjb3VudGVyUG9zID09PSBjb3VudGVyLmxlbmd0aCAtIDEpIHtcclxuICAgICAgICAgICAgICAgIHN1bSA9IDA7XHJcbiAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IGNvdW50ZXIubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBzdW0gKz0gY291bnRlcltqXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWQgPSBzZWxmLl9ub3JtYWxpemUoY291bnRlcik7XHJcbiAgICAgICAgICAgICAgICBpZiAobm9ybWFsaXplZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGVycm9yID0gc2VsZi5fbWF0Y2hQYXR0ZXJuKG5vcm1hbGl6ZWQsIHBhdHRlcm4pO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IgPCBlcHNpbG9uKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lcnJvciA9IGVycm9yO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guc3RhcnQgPSBpIC0gc3VtO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZW5kID0gaTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJlc3RNYXRjaDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAodHJ5SGFyZGVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yICggaiA9IDA7IGogPCBjb3VudGVyLmxlbmd0aCAtIDI7IGorKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudGVyW2pdID0gY291bnRlcltqICsgMl07XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbY291bnRlci5sZW5ndGggLSAyXSA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyLmxlbmd0aCAtIDFdID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBjb3VudGVyUG9zLS07XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY291bnRlclBvcysrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10gPSAxO1xyXG4gICAgICAgICA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Y3Rpb24ocG9pbnRzLCB2ZWMpIHtcclxuICAgICAgICB2YXIgaXRlcmF0aW9uLCBtYXhJdGVyYXRpb25zID0gMTAsIHRvcCA9IFtdLCByZXN1bHQgPSBbXSwgY2VudGVyUG9zID0gMCwgY3VycmVudFBvcyA9IDA7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHRyYWNlKGlkeCwgZm9yd2FyZCkge1xyXG4gICAgICAgICAgICB2YXIgZnJvbSwgdG8sIHRvSWR4LCBwcmVkaWN0ZWRQb3MsIHRocmVzaG9sZFggPSAxLCB0aHJlc2hvbGRZID0gTWF0aC5hYnModmVjWzFdIC8gMTApLCBmb3VuZCA9IGZhbHNlO1xyXG5cclxuICAgICAgICAgICAgZnVuY3Rpb24gbWF0Y2gocG9zLCBwcmVkaWN0ZWQpIHtcclxuICAgICAgICAgICAgICAgIGlmIChwb3MueCA+IChwcmVkaWN0ZWQueCAtIHRocmVzaG9sZFgpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICYmIHBvcy54IDwgKHByZWRpY3RlZC54ICsgdGhyZXNob2xkWClcclxuICAgICAgICAgICAgICAgICAgICAgICAgJiYgcG9zLnkgPiAocHJlZGljdGVkLnkgLSB0aHJlc2hvbGRZKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAmJiBwb3MueSA8IChwcmVkaWN0ZWQueSArIHRocmVzaG9sZFkpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gY2hlY2sgaWYgdGhlIG5leHQgaW5kZXggaXMgd2l0aGluIHRoZSB2ZWMgc3BlY2lmaWNhdGlvbnNcclxuICAgICAgICAgICAgLy8gaWYgbm90LCBjaGVjayBhcyBsb25nIGFzIHRoZSB0aHJlc2hvbGQgaXMgbWV0XHJcblxyXG4gICAgICAgICAgICBmcm9tID0gcG9pbnRzW2lkeF07XHJcbiAgICAgICAgICAgIGlmIChmb3J3YXJkKSB7XHJcbiAgICAgICAgICAgICAgICBwcmVkaWN0ZWRQb3MgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgeDogZnJvbS54ICsgdmVjWzBdLFxyXG4gICAgICAgICAgICAgICAgICAgIHk6IGZyb20ueSArIHZlY1sxXVxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHByZWRpY3RlZFBvcyA9IHtcclxuICAgICAgICAgICAgICAgICAgICB4OiBmcm9tLnggLSB2ZWNbMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgeTogZnJvbS55IC0gdmVjWzFdXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICB0b0lkeCA9IGZvcndhcmQgPyBpZHggKyAxIDogaWR4IC0gMTtcclxuICAgICAgICAgICAgdG8gPSBwb2ludHNbdG9JZHhdO1xyXG4gICAgICAgICAgICB3aGlsZSAodG8gJiYgKCBmb3VuZCA9IG1hdGNoKHRvLCBwcmVkaWN0ZWRQb3MpKSAhPT0gdHJ1ZSAmJiAoTWF0aC5hYnModG8ueSAtIGZyb20ueSkgPCB2ZWNbMV0pKSB7XHJcbiAgICAgICAgICAgICAgICB0b0lkeCA9IGZvcndhcmQgPyB0b0lkeCArIDEgOiB0b0lkeCAtIDE7XHJcbiAgICAgICAgICAgICAgICB0byA9IHBvaW50c1t0b0lkeF07XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIHJldHVybiBmb3VuZCA/IHRvSWR4IDogbnVsbDtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZvciAoIGl0ZXJhdGlvbiA9IDA7IGl0ZXJhdGlvbiA8IG1heEl0ZXJhdGlvbnM7IGl0ZXJhdGlvbisrKSB7XHJcbiAgICAgICAgICAgIC8vIHJhbmRvbWx5IHNlbGVjdCBwb2ludCB0byBzdGFydCB3aXRoXHJcbiAgICAgICAgICAgIGNlbnRlclBvcyA9IE1hdGguZmxvb3IoTWF0aC5yYW5kb20oKSAqIHBvaW50cy5sZW5ndGgpO1xyXG5cclxuICAgICAgICAgICAgLy8gdHJhY2UgZm9yd2FyZFxyXG4gICAgICAgICAgICB0b3AgPSBbXTtcclxuICAgICAgICAgICAgY3VycmVudFBvcyA9IGNlbnRlclBvcztcclxuICAgICAgICAgICAgdG9wLnB1c2gocG9pbnRzW2N1cnJlbnRQb3NdKTtcclxuICAgICAgICAgICAgd2hpbGUgKCggY3VycmVudFBvcyA9IHRyYWNlKGN1cnJlbnRQb3MsIHRydWUpKSAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgdG9wLnB1c2gocG9pbnRzW2N1cnJlbnRQb3NdKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoY2VudGVyUG9zID4gMCkge1xyXG4gICAgICAgICAgICAgICAgY3VycmVudFBvcyA9IGNlbnRlclBvcztcclxuICAgICAgICAgICAgICAgIHdoaWxlICgoIGN1cnJlbnRQb3MgPSB0cmFjZShjdXJyZW50UG9zLCBmYWxzZSkpICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdG9wLnB1c2gocG9pbnRzW2N1cnJlbnRQb3NdKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKHRvcC5sZW5ndGggPiByZXN1bHQubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICByZXN1bHQgPSB0b3A7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcclxuICAgIH1cclxufTtcclxuXHJcbmV4cG9ydCBjb25zdCBESUxBVEUgPSAxO1xyXG5leHBvc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B4U3RhcnQyXTtcclxuICAgICAgICAgICAgb3V0SW1hZ2VEYXRhW3YgKiB3aWR0aCArIHVdID0gc3VtID4gMCA/IDEgOiAwO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufTtcclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBlcm9kZShpbkltYWdlV3JhcHBlciwgb3V0SW1hZ2VXcmFwcGVyKSB7XHJcbiAgICB2YXIgdixcclxuICAgICAgICB1LFxyXG4gICAgICAgIGluSW1hZ2VEYXRhID0gaW5JbWFnZVdyYXBwZXIuZGF0YSxcclxuICAgICAgICBvdXRJbWFnZURhdGEgPSBvdXRJbWFnZVdyYXBwZXIuZGF0YSxcclxuICAgICAgICBoZWlnaHQgPSBpbkltYWdlV3JhcHBlci5zaXplLnksXHJcbiAgICAgICAgd2lkdGggPSBpbkltYWdlV3JhcHBlci5zaXplLngsXHJcbiAgICAgICAgc3VtLFxyXG4gICAgICAgIHlTdGFydDEsXHJcbiAgICAgICAgeVN0YXJ0MixcclxuICAgICAgICB4U3RhcnQxLFxyXG4gICAgICAgIHhTdGFydDI7XHJcblxyXG4gICAgZm9yICggdiA9IDE7IHYgPCBoZWlnaHQgLSAxOyB2KyspIHtcclxuICAgICAgICBmb3IgKCB1ID0gMTsgdSA8IHdpZHRoIC0gMTsgdSsrKSB7XHJcbiAgICAgICAgICAgIHlTdGFydDEgPSB2IC0gMTtcclxuICAgICAgICAgICAgeVN0YXJ0MiA9IHYgKyAxO1xyXG4gICAgICAgICAgICB4U3RhcnQxID0gdSAtIDE7XHJcbiAgICAgICAgICAgIHhTdGFydDIgPSB1ICsgMTtcclxuICAgICAgICAgICAgc3VtID0gaW5JbWFnZURhdGFbeVN0YXJ0MSAqIHdpZHRoICsgeFN0YXJ0MV0gKyBpbkltYWdlRGF0YVt5U3RhcnQxICogd2lkdGggKyB4U3RhcnQyXSArXHJcbiAgICAgICAgICAgIGluSW1hZ2VEYXRhW3YgKiB3aWR0aCArIHVdICtcclxuICAgICAgICA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bnZhc0RhdGFbKHRvcFJvd0lkeCArIDEpICogNCArIDBdICtcclxuICAgICAgICAgICAgICAgICAwLjU4NyAqIGNhbnZhc0RhdGFbKHRvcFJvd0lkeCArIDEpICogNCArIDFdICtcclxuICAgICAgICAgICAgICAgICAwLjExNCAqIGNhbnZhc0RhdGFbKHRvcFJvd0lkeCArIDEpICogNCArIDJdKSArXHJcbiAgICAgICAgICAgICAgICAoMC4yOTkgKiBjYW52YXNEYXRhWyhib3R0b21Sb3dJZHgpICogNCArIDBdICtcclxuICAgICAgICAgICAgICAgICAwLjU4NyAqIGNhbnZhc0RhdGFbKGJvdHRvbVJvd0lkeCkgKiA0ICsgMV0gK1xyXG4gICAgICAgICAgICAgICAgIDAuMTE0ICogY2FudmFzRGF0YVsoYm90dG9tUm93SWR4KSAqIDQgKyAyXSkgK1xyXG4gICAgICAgICAgICAgICAgKDAuMjk5ICogY2FudmFzRGF0YVsoYm90dG9tUm93SWR4ICsgMSkgKiA0ICsgMF0gK1xyXG4gICAgICAgICAgICAgICAgIDAuNTg3ICogY2FudmFzRGF0YVsoYm90dG9tUm93SWR4ICsgMSkgKiA0ICsgMV0gK1xyXG4gICAgICAgICAgICAgICAgIDAuMTE0ICogY2FudmFzRGF0YVsoYm90dG9tUm93SWR4ICsgMSkgKiA0ICsgMl0pKSAvIDQpO1xyXG4gICAgICAgICAgICBvdXRJbWdJZHgrKztcclxuICAgICAgICAgICAgdG9wUm93SWR4ID0gdG9wUm93SWR4ICsgMjtcclxuICAgICAgICAgICAgYm90dG9tUm93SWR4ID0gYm90dG9tUm93SWR4ICsgMjtcclxuICAgICAgICB9XHJcbiAgICAgICAgdG9wUm93SWR4ID0gdG9wUm93SWR4ICsgaW5XaWR0aDtcclxuICAgICAgICBib3R0b21Sb3dJZHggPSBib3R0b21Sb3dJZHggKyBpbldpZHRoO1xyXG4gICAgfVxyXG59O1xyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIGNvbXB1dGVHcmF5KGltYWdlRGF0Y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PSAwO1xyXG5cclxuICAgIHJnYiA9IHJnYiB8fCBbMCwgMCwgMF07XHJcblxyXG4gICAgaWYgKGggPCA2MCkge1xyXG4gICAgICAgIHIgPSBjO1xyXG4gICAgICAgIGcgPSB4O1xyXG4gICAgfSBlbHNlIGlmIChoIDwgMTIwKSB7XHJcbiAgICAgICAgciA9IHg7XHJcbiAgICAgICAgZyA9IGM7XHJcbiAgICB9IGVsc2UgaWYgKGggPCAxODApIHtcclxuICAgICAgICBnID0gYztcclxuICAgICAgICBiID0geDtcclxuICAgIH0gZWxzZSBpZiAoaCA8IDI0MCkge1xyXG4gICAgICAgIGcgPSB4O1xyXG4gICAgICAgIGIgPSBjO1xyXG4gICAgfSBlbHNlIGlmIChoIDwgMzAwKSB7XHJcbiAgICAgICAgciA9IHg7XHJcbiAgICAgICAgYiA9IGM7XHJcbiAgICB9IGVsc2UgaWYgKGggPCAzNjApIHtcclxuICAgICAgICByID0gYztcclxuICAgICAgICBiID0geDtcclxuICAgIH1cclxuICAgIHJnYlswXSA9ICgociArIG0pICogMjU1KSB8IDA7XHJcbiAgICByZ2JbMV0gPSAoKGcgKyBtKSAqIDI1NSkgfCAwO1xyXG4gICAgcmdiWzJdID0gKChiICsgbSkgKiAyNTUpIHwgMDtcclxuICAgIHJldHVybiByZ2I7XHJcbn07XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX2NvbXB1dGVEaXZpc29ycyhuKSB7XHJcbiAgICB2YXIgbGFyZ2VEaXZpc29ycyA9IFtdLFxyXG4gICAgICAgIGRpdmlzb3JzID0gW10sXHJcbiAgICAgICAgaTtcclxuXHJcbiAgICBmb3IgKGkgPSAxOyBpIDwgTWF0aC5zcXJ0KG4pICsgMTsgaSsrKSB7XHJcbiAgICAgICAgaWYgKG4gJSBpID09PSAwKSB7XHJcbiAgICAgICAgICAgIGRpdmlzb3JzLnB1c2goaSk7XHJcbiAgICAgICAgICAgIGlmIChpICE9PSBuIC8gaSkge1xyXG4gICAgICAgICAgICAgICAgbGFyZ2VEaXZpc29ycy51bnNoaWZ0KE1hdGguZmxvb3IobiAvIGkpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBkaXZpc29ycy5jb25jYXQobGFyZ2VEaXZpc29ycyk7XHJcbn07XHJcblxyXG5mdW5jdGlvbiBfY29tcHV0ZUludGVyc2VjdGlvbihhcnIxLCBhcnIyKSB7XHJcbiAgICB2YXIgaSA9IDAsXHJcbiAgICAgICAgaiA9IDAsXHJcbiAgICAgICAgcmVzdWx0ID0gW107XHJcblxyXG4gICAgd2hpbGUgKGkgPCBhcnIxLmxlbmd0aCAmJiBqIDwgYXJyMi5sZW5ndGgpIHtcclxuICAgICAgICBpZiAoYXJyMVtpXSA9PT0gYXJyMltqXSkge1xyXG4gICAgICAgICAgICByZXN1bHQucHVzaChhcnIxW2ldKTtcclxuICAgICAgICAgICAgaSsrO1xyXG4gICAgICAgICAgICBqKys7XHJcbiAgICAgICAgfSBlbHNlIGlmIChhcnIxW2ldID4gYXJyMltqXSkge1xyXG4gICAgICAgICAgICBqKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaSsrO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiByZXN1bHQ7XHJcbn07XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gY2FsY3VsYXRlUGF0Y2hTaXplKHBhdGNoU2l6ZSwgaW1nU2l6ZSkge1xyXG4gICAgdmFyIGRpdmlzb3JzWCA9IF9jb21wdXRlRGl2aXNvcnMoaW1nU2l6ZS54KSxcclxuICAgICAgICBkaXZpc29yc1kgPSBfY29tcHV0ZURpdmlzb3JzKGltZ1NpemUueSksXHJcbiAgICAgICAgd2lkZVNpZGUgPSBNYXRoLm1heChpbWdTaXplLngsIGltZ1NpemUueSksXHJcbiAgICAgICAgY29tbW9uID0gX2NvbXB1dGVJbnRlcnNlY3Rpb24oZGl2aXNvcnNYLCBkaXZpc29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ljYXRpbmcgaWYgdGhlIGFycmF5IHNob3VsZCBiZSBpbml0aWFsaXplZCBvbiBjcmVhdGlvbi5cclxuICogQHJldHVybnMge0ltYWdlV3JhcHBlcn1cclxuICovXHJcbmZ1bmN0aW9uIEltYWdlV3JhcHBlcihzaXplLCBkYXRhLCBBcnJheVR5cGUsIGluaXRpYWxpemUpIHtcclxuICAgIGlmICghZGF0YSkge1xyXG4gICAgICAgIGlmIChBcnJheVR5cGUpIHtcclxuICAgICAgICAgICAgdGhpcy5kYXRhID0gbmV3IEFycmF5VHlwZShzaXplLnggKiBzaXplLnkpO1xyXG4gICAgICAgICAgICBpZiAoQXJyYXlUeXBlID09PSBBcnJheSAmJiBpbml0aWFsaXplKSB7XHJcbiAgICAgICAgICAgICAgICBBcnJheUhlbHBlci5pbml0KHRoaXMuZGF0YSwgMCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLmRhdGEgPSBuZXcgVWludDhBcnJheShzaXplLnggKiBzaXplLnkpO1xyXG4gICAgICAgICAgICBpZiAoVWludDhBcnJheSA9PT0gQXJyYXkgJiYgaW5pdGlhbGl6ZSkge1xyXG4gICAgICAgICAgICAgICAgQXJyYXlIZWxwZXIuaW5pdCh0aGlzLmRhdGEsIDApO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSBlbHNlIHtcclxuICAgICAgICB0aGlzLmRhdGEgPSBkYXRhO1xyXG4gICAgfVxyXG4gICAgdGhpcy5zaXplID0gc2l6ZTtcclxufVxyXG5cclxuLyoqXHJcbiAqIHRlc3RzIGlmIGEgcG9zaXRpb24gaXMgd2l0aGluIHRoZSBpbWFnZSB3aXRoIGEgZ2l2ZW4gb2Zmc2V0XHJcbiAqIEBwYXJhbSBpbWdSZWYge3gsIHl9IFRoZSBsb2NhdGlvbiB0byB0ZXN0XHJcbiAqIEBwYXJhbSBib3JkZXIgTnVtYmVyIHRoZSBwYWR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Skge1xyXG4gICAgdmFyIGk7XHJcblxyXG4gICAgaWYgKCF0aGlzLmluZGV4TWFwcGluZykge1xyXG4gICAgICAgIHRoaXMuaW5kZXhNYXBwaW5nID0ge1xyXG4gICAgICAgICAgICB4OiBbXSxcclxuICAgICAgICAgICAgeTogW11cclxuICAgICAgICB9O1xyXG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCB0aGlzLnNpemUueDsgaSsrKSB7XHJcbiAgICAgICAgICAgIHRoaXMuaW5kZXhNYXBwaW5nLnhbaV0gPSBpO1xyXG4gICAgICAgICAgICB0aGlzLmluZGV4TWFwcGluZy54W2kgKyB0aGlzLnNpemUueF0gPSBpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgdGhpcy5zaXplLnk7IGkrKykge1xyXG4gICAgICAgICAgICB0aGlzLmluZGV4TWFwcGluZy55W2ldID0gaTtcclxuICAgICAgICAgICAgdGhpcy5pbmRleE1hcHBpbmcueVtpICsgdGhpcy5zaXplLnldID0gaTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gdGhpcy5kYXRhWyh0aGlzLmluZGV4TWFwcGluZy55W3kgKyB0aGlzLnNpemUueV0pICogdGhpcy5zaXplLnggKyB0aGlzLmluZGV4TWFwcGluZy54W3ggKyB0aGlzLnNpemUueF1dO1xyXG59O1xyXG5cclxuLyoqXHJcbiAqIFNldHMgYSBnaXZlbiBwaXhlbCBwb3NpdGlvbiBpbiB0aGUgaW1hZ2VcclxuICogQHBhcmFtIHgge051bWJlcn0gVGhlIHgtcG9zaXRpb25cclxuICogQHBhcmFtIHkge051bWJlcn0gVGhlIHktcG9zaXRpb25cclxuICogQHBhcmFtIHZhbHVlIHtOdW1iZXJ9IFRoZSBncmF5c2NhbGUgdmFsdWUgdG8gc2V0XHJcbiAqIEByZXR1cm5zIHtJbWFnZVdyYXBwZXJ9IFRoZSBJbWFnZSBpdHNlbGYgKGZvciBwb3NzaWJsZSBjaG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5JbWFnZVdyYXBwZXIucHJvdG90eXBlLmNvbnZvbHZlID0gZnVuY3Rpb24oa2VybmVsKSB7XHJcbiAgICB2YXIgeCwgeSwga3gsIGt5LCBrU2l6ZSA9IChrZXJuZWwubGVuZ3RoIC8gMikgfCAwLCBhY2N1ID0gMDtcclxuICAgIGZvciAoIHkgPSAwOyB5IDwgdGhpcy5zaXplLnk7IHkrKykge1xyXG4gICAgICAgIGZvciAoIHggPSAwOyB4IDwgdGhpcy5zaXplLng7IHgrKykge1xyXG4gICAgICAgICAgICBhY2N1ID0gMDtcclxuICAgICAgICAgICAgZm9yICgga3kgPSAta1NpemU7IGt5IDw9IGtTaXplOyBreSsrKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKCBreCA9IC1rU2l6ZTsga3ggPD0ga1NpemU7IGt4KyspIHtcclxuICAgICAgICAgICAgICAgICAgICBhY2N1ICs9IGtlcm5lbFtreSArIGtTaXplXVtreCArIGtTaXplXSAqIHRoaXMuZ2V0U2FmZSh4ICsga3gsIHkgKyBreSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgdGhpcy5kYXRhW3kgKiB0aGlzLnNpemUueCArIHhdID0gYWNjdTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn07XHJcblxyXG5JbWFnZVdyYXBwZXIucHJvdG90eXBlLm1vbWVudHMgPSBmdW5jdGlvbihsYWJlbGNvdW50KSB7XHJcbiAgICB2YXIgZGF0YSA9IHRoaXMuZGF0YSxcclxuICAgICAgICB4LFxyXG4gICAgICAgIHksXHJcbiAgICAgICAgaGVpZ2h0ID0gdGhpcy5zaXplLnksXHJcbiAgICAgICAgd2lkdGggPSB0aGlzLnNpemUueCxcclxuICAgICAgICB2YWwsXHJcbiAgICAgICAgeXNxLFxyXG4gICAgICAgIGxhYmVsc3VtID0gW10sXHJcbiAgICAgICAgaSxcclxuICAgICAgICBsYWJlbCxcclxuICAgICAgICBtdTExLFxyXG4gICAgICAgIG11MDIsXHJcbiAgICAgICAgbXUyMCxcclxuICAgICAgICB4XyxcclxuICAgICAgICB5XyxcclxuICAgICAgICB0bXAsXHJcbiAgICAgICAgcmVzdWx0ID0gW10sXHJcbiAgICAgICAgUEkgPSBNYXRoLlBJLFxyXG4gICAgICAgIFBJXzQgPSBQSSAvIDQ7XHJcblxyXG4gICAgaWYgKGxhYmVsY291bnQgPD0gMCkge1xyXG4gICAgICAgIHJldHVybiByZXN1bHQ7XHJcbiAgICB9XHJcblxyXG4gICAgZm9yICggaSA9IDA7IGkgPCBsYWJlbGNvdW50OyBpKyspIHtcclxuICAgICAgICBsYWJlbHN1bVtpXSA9IHtcclxuICAgICAgICAgICAgbTAwOiAwLFxyXG4gICAgICAgICAgICBtMDE6IDAsXHJcbiAgICAgICAgICAgIG0xMDogMCxcclxuICAgICAgICAgICAgbTExOiAwLFxyXG4gICAgICAgICAgICBtMDI6IDAsXHJcbiAgICAgICAgICAgIG0yMDogMCxcclxuICAgICAgICAgICAgdGhldGE6IDAsXHJcbiAgICAgICAgICAgIHJhZDogMFxyXG4gICAgICAgIH07XHJcbiAgICB9XHJcblxyXG4gICAgZm9yICggeSA9IDA7IHkgPCBoZWlnaHQ7IHkrKykge1xyXG4gICAgICAgIHlzcSA9IHkgKiB5O1xyXG4gICAgICAgIGZvciAoIHggPSAwOyB4IDwgd2lkdGg7IHgrKykge1xyXG4gICAgICAgICAgICB2YWwgPSBkYXRhW3kgKiB3aWR0aCArIHhdO1xyXG4gICAgICAgICAgICBpZiAodmFsID4gMCkge1xyXG4gICAgICAgICAgICAgICAgbGFiZWwgPSBsYWJlbHN1bVt2YWwgLSAxXTtcclxuICAgICAgICAgICAgICAgIGxhYmVsLm0wMCArPSAxO1xyXG4gICAgICAgICAgICAgICAgbGFiZWwubTAxICs9IHk7XHJcbiAgICAgICAgICAgICAgICBsYWJlbC5tMTAgKz0geDtcclxuICAgICAgICAgICAgICAgIGxhYmVsLm0xMSArPSB4ICogeTtcclxuICAgICAgICAgICAgICAgIGxhYmVsLm0wMiArPSB5c3E7XHJcbiAgICAgICAgICAgICAgICBsYWJlbC5tMjAgKz0geCAqIHg7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZm9yICggaSA9IDA7IGkgPCBsYWJlbGNvdW50OyBpKyspIHtcclxuICAgICAgICBsYWJlbCA9IGxhYmVsc3VtW2ldO1xyXG4gICAgICAgIGlmICghaXNOYU4obGFiZWwubTAwKSAmJiBsYWJlbC5tMDAgIT09IDApIHtcclxuICAgICAgICAgICAgeF8gPSBsYWJlbC5tMTAgLyBsYWJlbC5tMDA7XHJcbiAgICAgICAgICAgIHlfID0gbGFiZWwubTAxIC8gbGFiZWwubTAwO1xyXG4gICAgICAgICAgICBtdTExID0gbGFiZWwubTExIC8gbGFiZWwubTAwIC0geF8gKiB5XztcclxuICAgICAgICAgICAgbXUwMiA9IGxhYmVsLm0wMiAvIGxhYmVsLm0wMCAtIHlfICogeV87XHJcbiAgICAgICAgICAgIG11MjAgPSBsYWJlbC5tMjAgLyBsYWJlbC5tMDAgLSB4XyAqIHhfO1xyXG4gICAgICAgICAgICB0bXAgPSAobXUwMiAtIG11MjApIC8gKDIgKiBtdTExKTtcclxuICAgICAgICAgICAgdG1wID0gMC41ICogTWF0aC5hdGFuKHRtcCkgKyAobXUxMSA+PSAwID8gUElfNCA6IC1QSV80ICkgKyBQSTtcclxuICAgICAgICAgICAgbGFiZWwudGhldGEgPSAodG1wICogMTgwIC8gUEkgKyA5MCkgJSAxODAgLSA5MDtcclxuICAgICAgICAgICAgaWYgKGxhYmVsLnRoZXRhIDwgMCkge1xyXG4gICAgICAgICAgICAgICAgbGFiZWwudGhldGEgKz0gMTgwO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGxhYmVsLnJhZCA9IHRtcCA+IFBJID8gdG1wIC0gUEkgOiB0bXA7XHJcbiAgICAgICAgICAgIGxhYmVsLnZlYyA9I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XRhLFxyXG4gICAgICAgICAgICBsYWJlbERhdGEgPSBsYWJlbFdyYXBwZXIuZGF0YSxcclxuICAgICAgICAgICAgc2VhcmNoRGlyZWN0aW9ucyA9IHRoaXMuc2VhcmNoRGlyZWN0aW9ucyxcclxuICAgICAgICAgICAgd2lkdGggPSBpbWFnZVdyYXBwZXIuc2l6ZS54LFxyXG4gICAgICAgICAgICBwb3M7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHRyYWNlKGN1cnJlbnQsIGNvbG9yLCBsYWJlbCwgZWRnZWxhYmVsKSB7XHJcbiAgICAgICAgICAgIHZhciBpLFxyXG4gICAgICAgICAgICAgICAgeSxcclxuICAgICAgICAgICAgICAgIHg7XHJcblxyXG4gICAgICAgICAgICBmb3IgKCBpID0gMDsgaSA8IDc7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgeSA9IGN1cnJlbnQuY3kgKyBzZWFyY2hEaXJlY3Rpb25zW2N1cnJlbnQuZGlyXVswXTtcclxuICAgICAgICAgICAgICAgIHggPSBjdXJyZW50LmN4ICsgc2VhcmNoRGlyZWN0aW9uc1tjdXJyZW50LmRpcl1bMV07XHJcbiAgICAgICAgICAgICAgICBwb3MgPSB5ICogd2lkdGggKyB4O1xyXG4gICAgICAgICAgICAgICAgaWYgKChpbWFnZURhdGFbcG9zXSA9PT0gY29sb3IpICYmICgobGFiZWxEYXRhW3Bvc10gPT09IDApIHx8IChsYWJlbERhdGFbcG9zXSA9PT0gbGFiZWwpKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsRGF0YVtwb3NdID0gbGFiZWw7XHJcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudC5jeSA9IHk7XHJcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudC5jeCA9IHg7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChsYWJlbERhdGFbcG9zXSA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbERhdGFbcG9zXSA9IGVkZ2VsYWJlbDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudC5kaXIgPSAoY3VycmVudC5kaXIgKyAxKSAlIDg7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gdmVydGV4MkQoeCwgeSwgZGlyKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBkaXI6IGRpcixcclxuICAgICAgICAgICAgICAgIHg6IHgsXHJcbiAgICAgICAgICAgICAgICB5OiB5LFxyXG4gICAgICAgICAgICAgICAgbmV4dDogbnVsbCxcclxuICAgICAgICAgICAgICAgIHByZXY6IG51bGxcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGNvbnRvdXJUcmFjaW5nKHN5LCBzeCwgbGFiZWwsIGNvbG9yLCBlZGdlbGFiZWwpIHtcclxuICAgICAgICAgICAgdmFyIEZ2ID0gbnVsbCxcclxuICAgICAgICAgICAgICAgIEN2LFxyXG4gICAgICAgICAgICAgICAgUCxcclxuICAgICAgICAgICAgICAgIGxkaXIsXHJcbiAgICAgICAgICAgICAgICBjdXJyZW50ID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIGN4OiBzeCxcclxuICAgICAgICAgICAgICAgICAgICBjeTogc3ksXHJcbiAgICAgICAgICAgICAgICAgICAgZGlyOiAwXHJcbiAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgaWYgKHRyYWNlKGN1cnJlbnQsIGNvbG9yLCBsYWJlbCwgZWRnZWxhYmVsKSkge1xyXG4gICAgICAgICAgICAgICAgRnYgPSB2ZXJ0ZXgyRChzeCwgc3ksIGN1cnJlbnQuZGlyKTtcclxuICAgICAgICAgICAgICAgIEN2ID0gRnY7XHJcbiAgICAgICAgICAgICAgICBsZGlyID0gY3VycmVudC5kaXI7XHJcbiAgICAgICAgICAgICAgICBQID0gdmVydGV4MkQoY3VycmVudC5jeCwgY3VycmVudC5jeSwgMCk7XHJcbiAgICAgICAgICAgICAgICBQLnByZXYgPSBDdjtcclxuICAgICAgICAgICAgICAgIEN2Lm5leHQgPSBQO1xyXG4gICAgICAgICAgICAgICAgUC5uZXh0ID0gbnVsbDtcclxuICAgICAgICAgICAgICAgIEN2ID0gUDtcclxuICAgICAgICAgICAgICAgIGRvIHtcclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50LmRpciA9IChjdXJyZW50LmRpciArIDYpICUgODtcclxuICAgICAgICAgICAgICAgICAgICB0cmFjZShjdXJyZW50LCBjb2xvciwgbGFiZWwsIGVkZ2VsYWJlbCk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxkaXIgIT09IGN1cnJlbnQuZGlyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEN2LmRpciA9IGN1cnJlbnQuZGlyO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBQID0gdmVydGV4MkQoY3VycmVudC5jeCwgY3VycmVudC5jeSwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFAucHJldiA9IEN2O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBDdi5uZXh0ID0gUDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgUC5uZXh0ID0gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ3YgPSBQO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEN2LmRpciA9IGxkaXI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEN2LnggPSBjdXJyZW50LmN4O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBDdi55ID0gY3VycmVudC5jeTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgbGRpciA9IGN1cnJlbnQuZGlyO1xyXG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoY3VycmVudC5jeCAhPT0gc3ggfHwgY3VycmVudC5jeSAhPT0gc3kpO1xyXG4gICAgICAgICAgICAgICAgRnYucHJldiA9IEN2LnByZXY7XHJcbiAgICAgICAgICAgICAgICBDdi5wcmV2Lm5leHQgPSBGdjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gRnY7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICB0cmFjZTogZnVuY3Rpb24oY3VycmVudCwgY29sb3IsIGxhYmVsLCBlZGdlbGFiZWwpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB0cmFjZShjdXJyZW50LCBjb2xvciwgbGFiZWwsIGVkZ2VsYWJlbCk7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGNvbnRvdXJUcmFjaW5nOiBmdW5jdGlvbihzeSwgc3gsIGxhYmVsLCBjb2xvciwgZWRnZWxhYmVsKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gY29udG91clRyYWNpbmcoc3ksIHN4LCBsYWJlbCwgY29sb3IsIGVkZ2VsYWJlbCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG4gICAgfVxyXG59O1xyXG5cclxuZXhwb3J0IGRlZmF1bHQgKFRyYWNlcik7XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIC4vc3JjL2xvY2F0b3IvdHJhY2VyLmpzXG4gKiovIiwiaW1wb3J0IEJhcmNvZGVSZWFkZXIgZnJvbSAnLi9iYXJjb2RlX3JlYWRlcic7XHJcbmltcG9ydCBBcnJheUhlbHBlciBmcm9tICcuLi9jb21tb24vYXJ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ogMHgwOTR9LFxyXG4gICAgRk9STUFUOiB7dmFsdWU6IFwiY29kZV8zOVwiLCB3cml0ZWFibGU6IGZhbHNlfVxyXG59O1xyXG5cclxuQ29kZTM5UmVhZGVyLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoQmFyY29kZVJlYWRlci5wcm90b3R5cGUsIHByb3BlcnRpZXMpO1xyXG5Db2RlMzlSZWFkZXIucHJvdG90eXBlLmNvbnN0cnVjdG9yID0gQ29kZTM5UmVhZGVyO1xyXG5cclxuQ29kZTM5UmVhZGVyLnByb3RvdHlwZS5fdG9Db3VudGVycyA9IGZ1bmN0aW9uKHN0YXJ0LCBjb3VudGVyKSB7XHJcbiAgICB2YXIgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgbnVtQ291bnRlcnMgPSBjb3VudGVyLmxlbmd0aCxcclxuICAgICAgICBlbmQgPSBzZWxmLl9yb3cubGVuZ3RoLFxyXG4gICAgICAgIGlzV2hpdGUgPSAhc2VsZi5fcm93W3N0YXJ0XSxcclxuICAgICAgICBpLFxyXG4gICAgICAgIGNvdW50ZXJQb3MgPSAwO1xyXG5cclxuICAgIEFycmF5SGVscGVyLmluaXQoY291bnRlciwgMCk7XHJcblxyXG4gICAgZm9yICggaSA9IHN0YXJ0OyBpIDwgZW5kOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgY291bnRlclBvcysrO1xyXG4gICAgICAgICAgICBpZiAoY291bnRlclBvcyA9PT0gbnVtQ291bnRlcnMpIHtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgICAgICBpc1doaXRlID0gIWlzV2hpdGU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIGNvdW50ZXI7XHJcbn07XHJcblxyXG5Db2RlMzlSZWFkZXIucHJvdG90eXBlLl9kZWNvZGUgPSBmdW5jdGlvbigpIHtcclxuICAgIHZhciBzZWxmID0gdGhpcyxcclxuICAgICAgICBjb3VudGVycyA9IFswLCAwLCAwLCAwLCAwLCAwLCAwLCAwLCAwXSxcclxuICAgICAgICByZXN1bHQgPSBbXSxcclxuICAgICAgICBzdGFydCA9IHNlbGYuX2ZpbmRTdGFydCgpLFxyXG4gICAgICAgIGRlY29kZWRDaGFyLFxyXG4gICAgICAgIGxhc3RTdGFydCxcclxuICAgICAgICBwYXR0ZXJuLFxyXG4gICAgICAgIG5leHRTdGFydDtcclxuXHJcbiAgICBpZiAoIXN0YXJ0KSB7XHJcbiAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICB9XHJcbiAgICBuZXh0U3RhcnQgPSBzZWxmLl9uZXh0U2V0KHNlbGYuX3Jvdywgc3RhcnQuZW5kKTtcclxuXHJcbiAgICBkbyB7XHJcbiAgICAgICAgY291bnRlcnMgPSBzZWxmLl90b0NvdW50ZXJzKG5leHRTdGFydCwgY291bnRlcnMpO1xyXG4gICAgICAgIHBhdHRlcm4gPSBzZWxmLl90b1BhdHRlcm4oY291bnRlcnMpO1xyXG4gICAgICAgIGlmIChwYXR0ZXJuIDwgMCkge1xyXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICB9XHJcbiAgICAgICAgZGVjb2RlZENoYXIgPSBzZWxmLl9wYXR0ZXJuVG9DaGFyKHBhdHRlcm4pO1xyXG4gICAgICAgIGlmIChkZWNvZGVkQ2hhciA8IDApe1xyXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmVzdWx0LnB1c2goZGVjb2RlZENoYXIpO1xyXG4gICAgICAgIG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ID0gZnVuY3Rpb24oY291bnRlcnMpIHtcclxuICAgIHZhciBudW1Db3VudGVycyA9IGNvdW50ZXJzLmxlbmd0aCxcclxuICAgICAgICBtYXhOYXJyb3dXaWR0aCA9IDAsXHJcbiAgICAgICAgbnVtV2lkZUJhcnMgPSBudW1Db3VudGVycyxcclxuICAgICAgICB3aWRlQmFyV2lkdGggPSAwLFxyXG4gICAgICAgIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIHBhdHRlcm4sXHJcbiAgICAgICAgaTtcclxuXHJcbiAgICB3aGlsZSAobnVtV2lkZUJhcnMgPiAzKSB7XHJcbiAgICAgICAgbWF4TmFycm93V2lkdGggPSBzZWxmLl9maW5kTmV4dFdpZHRoKGNvdW50ZXJzLCBtYXhOYXJyb3dXaWR0aCk7XHJcbiAgICAgICAgbnVtV2lkZUJhcnMgPSAwO1xyXG4gICAgICAgIHBhdHRlcm4gPSAwO1xyXG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBudW1Db3VudGVyczsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChjb3VudGVyc1tpXSA+IG1heE5hcnJvd1dpZHRoKSB7XHJcbiAgICAgICAgICAgICAgICBwYXR0ZXJuIHw9IDEgPDwgKG51bUNvdW50ZXJzIC0gMSAtIGkpO1xyXG4gICAgICAgICAgICAgICAgbnVtV2lkZUJhcnMrKztcclxuICAgICAgICAgICAgICAgIHdpZGVCYXJXaWR0aCArPSBjb3VudGVyc1tpXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKG51bVdpZGVCYXJzID09PSAzKSB7XHJcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBudW1Db3VudGVycyAmJiBudW1XaWRlQmFycyA+IDA7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvdW50ZXJzW2ldID4gbWF4TmFycm93V2lkdGgpIHtcclxuICAgICAgICAgICAgICAgICAgICBudW1XaWRlQmFycy0tO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgoY291bnRlcnNbaV0gKiAyKSA+PSB3aWRlQmFyV2lkdGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC0xO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gcGF0dGVybjtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gLTE7XHJcbn07XHJcblxyXG5Db2RlMzlSZWFkZXIucHJvdG90eXBlLl9maW5kU3RhcnQgPSBmdW5jdGlvbigpIHtcclxuICAgIHZhciBzZWxmID0gdGhpcyxcclxuICAgICAgICBvZmZzZXQgPSBzZWxmLl9uZXh0U2V0KHNlbGYuX3JvdyksXHJcbiAgICAgICAgcGF0dGVyblN0YXJ0ID0gb2Zmc2V0LFxyXG4gICAgICAgIGNvdW50ZXIgPSBbMCwgMCwgMCwgMCwgMCwgMCwgMCwgMCwgMF0sXHJcbiAgICAgICAgY291bnRlclBvcyA9IDAsXHJcbiAgICAgICAgaXNXaGl0ZSA9IGZhbHNlLFxyXG4gICAgICAgIGksXHJcbiAgICAgICAgaixcclxuICAgICAgICB3aGl0ZVNwYWNlTXVzdFN0YXJ0O1xyXG5cclxuICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKGNvdW50ZXJQb3MgPT09IGNvdW50ZXIubGVuZ3RoIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgLy8gZmluZCBzdGFydCBwYXR0ZXJuXHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5fdG9QYXR0ZXJuKGNvdW50ZXIpID09PSBzZWxmLkFTVEVSSVNLKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgd2hpdGVTcGFjZU11c3RTdGFydCA9IE1hdGguZmxvb3IoTWF0aC5tYXgoMCwgcGF0dGVyblN0YXJ0IC0gKChpIC0gcGF0dGVyblN0YXJ0KSAvIDQpKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuX21hdGNoUmFuZ2Uod2hpdGVTcGFjZU11c3RTdGFydCwgcGF0dGVyblN0YXJ0LCAwKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQ6IHBhdHRlcm5TdGFydCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZDogaVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBwYXR0ZXJuU3RhcnQgKz0gY291bnRlclswXSArIGNvdW50ZXJbMV07XHJcbiAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IDc7IGorKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbal0gPSBjb3VudGVyW2ogKyAyXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGNvdW50ZXJbN10gPSAwO1xyXG4gICAgICAgICAgICAgICAgY291bnRlcls4XSA9IDA7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zLS07XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgIC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lV3JhcHBlci5kYXRhKTtcclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgcHVibGlzaFJlc3VsdCgpO1xyXG4gICAgfVxyXG59XHJcblxyXG5mdW5jdGlvbiB1cGRhdGUoKSB7XHJcbiAgICB2YXIgYXZhaWxhYmxlV29ya2VyO1xyXG5cclxuICAgIGlmIChfb25VSVRocmVhZCkge1xyXG4gICAgICAgIGlmIChfd29ya2VyUG9vbC5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIGF2YWlsYWJsZVdvcmtlciA9IF93b3JrZXJQb29sLmZpbHRlcihmdW5jdGlvbih3b3JrZXJUaHJlYWQpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiAhd29ya2VyVGhyZWFkLmJ1c3k7XHJcbiAgICAgICAgICAgIH0pWzBdO1xyXG4gICAgICAgICAgICBpZiAoYXZhaWxhYmxlV29ya2VyKSB7XHJcbiAgICAgICAgICAgICAgICBfZnJhbWVncmFiYmVyLmF0dGFjaERhdGEoYXZhaWxhYmxlV29ya2VyLmltYWdlRGF0YSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47IC8vIGFsbCB3b3JrZXJzIGFyZSBidXN5XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBfZnJhbWVncmFiYmVyLmF0dGFjaERhdGEoX2lucHV0SW1hZ2VXcmFwcGVyLmRhdGEpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoX2ZyYW1lZ3JhYmJlci5ncmFiKCkpIHtcclxuICAgICAgICAgICAgaWYgKGF2YWlsYWJsZVdvcmtlcikge1xyXG4gICAgICAgICAgICAgICAgYXZhaWxhYmxlV29ya2VyLmJ1c3kgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgYXZhaWxhYmxlV29ya2VyLndvcmtlci5wb3N0TWVzc2FnZSh7XHJcbiAgICAgICAgICAgICAgICAgICAgY21kOiAncHJvY2VzcycsXHJcbiAgICAgICAgICAgICAgICAgICAgaW1hZ2VEYXRhOiBhdmFpbGFibGVXb3JrZXIuaW1hZ2VEYXRhXHJcbiAgICAgICAgICAgICAgICB9LCBbYXZhaWxhYmxlV29ya2VyLmltYWdlRGF0YS5idWZmZXJdKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGxvY2F0ZUFuZERlY29kZSgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSBlbHNlIHtcclxuICAgICAgICBsb2NhdGVBbmREZWNvZGUoKTtcclxuICAgIH1cclxufVxyXG5cclxuZnVuY3Rpb24gc3RhcnRDb250aW51b3VzVXBkYXRlKCkge1xyXG4gICAgdmFyIG5leHQgPSBudWxsLFxyXG4gICAgICAgIGRlbGF5ID0gMTAwMCAvIChfY29uZmlnLmZyZXF1ZW5jeSB8fCA2MCk7XHJcblxyXG4gICAgX3N0b3BwZWQgPSBmYWxzZTtcclxuICAgIChmdW5jdGlvbiBmcmFtZSh0aW1lc3RhbXApIHtcclxuICAgICAgICBuZXh0ID0gbmV4dCB8fCB0aW1lc3RhbXA7XHJcbiAgICAgICAgaWYgKCFfc3RvcHBlZCkge1xyXG4gICAgICAgICAgICBpZiAodGltZXN0YW1wID49IG5leHQpIHtcclxuICAgICAgICAgICAgICAgIG5leHQgKz0gZGVsYXk7XHJcbiAgICAgICAgICAgICAgICB1cGRhdGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB3aW5kb3cucmVxdWVzdEFuaW1GcmFtZShmcmFtZSk7XHJcbiAgICAgICAgfVxyXG4gICAgfShwZXJmb3JtYW5jZS5ub3coKSkpO1xyXG59XHJcblxyXG5mdW5jdGlvbiBzdGFydCgpIHtcclxuICAgIGlmIChfb25VSVRocmVhZCAmJiBfY29uZmlnLmlucHV0U3RyZWFtLnR5cGUgPT09IFwiTGl2ZVN0cmVhbVwiKSB7XHJcbiAg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tlcnNUb1Rlcm1pbmF0ZS5mb3JFYWNoKGZ1bmN0aW9uKHdvcmtlclRocmVhZCkge1xyXG4gICAgICAgICAgICB3b3JrZXJUaHJlYWQud29ya2VyLnRlcm1pbmF0ZSgpO1xyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50KSB7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIldvcmtlciB0ZXJtaW5hdGVkIVwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIF93b3JrZXJQb29sID0gX3dvcmtlclBvb2wuc2xpY2UoMCwgaW5jcmVhc2VCeSk7XHJcbiAgICAgICAgcmV0dXJuIGNiICYmIGNiKCk7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgaW5jcmVhc2VCeTsgaSsrKSB7XHJcbiAgICAgICAgICAgIGluaXRXb3JrZXIod29ya2VySW5pdGlhbGl6ZWQpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gd29ya2VySW5pdGlhbGl6ZWQod29ya2VyVGhyZWFkKSB7XHJcbiAgICAgICAgICAgIF93b3JrZXJQb29sLnB1c2god29ya2VyVGhyZWFkKTtcclxuICAgICAgICAgICAgaWYgKF93b3JrZXJQb29sLmxlbmd0aCA+PSBjYXBhY2l0eSl7XHJcbiAgICAgICAgICAgICAgICBjYiAmJiBjYigpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59XHJcblxyXG5leHBvcnQgZGVmYXVsdCB7XHJcbiAgICBpbml0OiBmdW5jdGlvbihjb25maWcsIGNiLCBpbWFnZVdyYXBwZXIpIHtcclxuICAgICAgICBfY29uZmlnID0gbWVyZ2Uoe30sIENvbmZpZywgY29uZmlnKTtcclxuICAgICAgICBpZiAoaW1hZ2VXcmFwcGVyKSB7XHJcbiAgICAgICAgICAgIF9vblVJVGhyZW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B0cnVlLFxyXG4gICAgICAgIGxvYWRlZCA9IGZhbHNlLFxyXG4gICAgICAgIGZyYW1lID0gbnVsbCxcclxuICAgICAgICBiYXNlVXJsLFxyXG4gICAgICAgIGVuZGVkID0gZmFsc2UsXHJcbiAgICAgICAgc2l6ZSxcclxuICAgICAgICBjYWxjdWxhdGVkV2lkdGgsXHJcbiAgICAgICAgY2FsY3VsYXRlZEhlaWdodCxcclxuICAgICAgICBfZXZlbnROYW1lcyA9IFsnY2FucmVjb3JkJywgJ2VuZGVkJ10sXHJcbiAgICAgICAgX2V2ZW50SGFuZGxlcnMgPSB7fSxcclxuICAgICAgICBfdG9wUmlnaHQgPSB7eDogMCwgeTogMH0sXHJcbiAgICAgICAgX2NhbnZhc1NpemUgPSB7eDogMCwgeTogMH07XHJcblxyXG4gICAgZnVuY3Rpb24gbG9hZEltYWdlcygpIHtcclxuICAgICAgICBsb2FkZWQgPSBmYWxzZTtcclxuICAgICAgICBHZXRQaXhlbHMoYmFzZVVybCwgZnVuY3Rpb24oZXJyLCBwaXhlbHMpIHtcclxuICAgICAgICAgICAgaWYgKGVycikge1xyXG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coZXJyKTtcclxuICAgICAgICAgICAgICAgIGV4aXQoMSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbG9hZGVkID0gdHJ1ZTtcclxuICAgICAgICAgICAgY29uc29sZS5sb2cocGl4ZWxzLnNoYXBlKTtcclxuICAgICAgICAgICAgZnJhbWUgPSBwaXhlbHM7XHJcbiAgICAgICAgICAgIHdpZHRoID0gcGl4ZWxzLnNoYXBlWzBdO1xyXG4gICAgICAgICAgICBoZWlnaHQgPSBwaXhlbHMuc2hhcGVbMV07XHJcbiAgICAgICAgICAgIGNhbGN1bGF0ZWRXaWR0aCA9IF9jb25maWcuc2l6ZSA/IHdpZHRoL2hlaWdodCA+IDEgPyBfY29uZmlnLnNpemUgOiBNYXRoLmZsb29yKCh3aWR0aC9oZWlnaHQ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G4gICAgdGhhdC5wYXVzZSA9IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgIHBhdXNlZCA9IHRydWU7XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQucGxheSA9IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgIHBhdXNlZCA9IGZhbHNlO1xyXG4gICAgfTtcclxuXHJcbiAgICB0aGF0LnNldEN1cnJlbnRUaW1lID0gZnVuY3Rpb24odGltZSkge1xyXG4gICAgICAgIGZyYW1lSWR4ID0gdGltZTtcclxuICAgIH07XHJcblxyXG4gICAgdGhhdC5hZGRFdmVudExpc3RlbmVyID0gZnVuY3Rpb24oZXZlbnQsIGYpIHtcclxuICAgICAgICBpZiAoX2V2ZW50TmFtZXMuaW5kZXhPZihldmVudCkgIT09IC0xKSB7XHJcbiAgICAgICAgICAgIGlmICghX2V2ZW50SGFuZGxlcnNbZXZlbnRdKSB7XHJcbiAgICAgICAgICAgICAgICBfZXZlbnRIYW5kbGVyc1tldmVudF0gPSBbXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBfZXZlbnRIYW5kbGVyc1tldmVudF0ucHVzaChmKTtcclxuICAgICAgICB9XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQuc2V0VG9wUmlnaHQgPSBmdW5jdGlvbih0b3BSaWdodCkge1xyXG4gICAgICAgIF90b3BSaWdodC54ID0gdG9wUmlnaHQueDtcclxuICAgICAgICBfdG9wUmlnaHQueSA9IHRvcFJpZ2h0Lnk7XHJcbiAgICB9O1xyXG5cclxuICAgIHRoYXQuZ2V0VG9wUmlnaHQgPSBmdW5jdGlvbigpIHtcclxuICAgICAgICByZXR1cm4gX3RvcFJpZ2h0O1xyXG4gICAgfTtcclxuXHJcbiAgICB0aGF0LnNldENhbnZhc1NpemUgPSBmdW5jdGlvbihzaXplKSB7XHJcbiAgICAgICAgX2NhbnZhc1NpemUueCA9IHNpemUueDtcclxuICAgICAgICBfY2FudmFzU2l6ZS55ID0gc2l6ZS55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zdWx0LmNvZGVSZXN1bHQgPSBjb2RlUmVzdWx0O1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjYXB0dXJlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbnZhcy53aWR0aCA9IGltYWdlU2l6ZS54O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYW52YXMuaGVpZ2h0ID0gaW1hZ2VTaXplLnk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEltYWdlRGVidWcuZHJhd0ltYWdlKGRhdGEsIGltYWdlU2l6ZSwgY3R4KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LmZyYW1lID0gY2FudmFzLnRvRGF0YVVSTCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXN1bHRzLnB1c2gocmVzdWx0KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZ2V0UmVzdWx0czogZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0cztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH07XHJcbiAgICB9XHJcbn07XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIC4vc3JjL2FuYWx5dGljcy9yZXN1bHRfY29sbGVjdG9yLmpzXG4gKiovIiwiY29uc3QgdmVjMiA9IHtcclxuICAgIGNsb25lOiByZXF1aXJlKCdnbC12ZWMyL2Nsb25lJyksXHJcbiAgICBkb3Q6IHJlcXVpcmUoJ2dsLXZlYzIvZG90JylcclxufVxyXG4gICAgLyoqXHJcbiAgICAgKiBDcmVhdGVzIGEgY2x1c3RlciBmb3IgZ3JvdXBpbmcgc2ltaWxhciBvcmllbnRhdGlvbnMgb2YgZGF0YXBvaW50c1xyXG4gICAgICovXHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIGNyZWF0ZTogZnVuY3Rpb24ocG9pbnQsIHRocmVzaG9sZCkge1xyXG4gICAgICAgIHZhciBwb2ludHMgPSBbXSxcclxuICAgICAgICAgICAgY2VudGVyID0ge1xyXG4gICAgICAgICAgICAgICAgcmFkOiAwLFxyXG4gICAgICAgICAgICAgICAgdmVjOiB2ZWMyLmNsb25lKFswLCAwXSlcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgcG9pbnRNYXAgPSB7fTtcclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaW5pdCgpIHtcclxuICAgICAgICAgICAgYWRkKHBvaW50KTtcclxuICAgICAgICAgICAgdXBkYXRlQ2VudGVyKCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBhZGQocG9pbnRUb0FkZCkge1xyXG4gICAgICAgICAgICBwb2ludE1hcFtwb2ludFRvQWRkLmlkXSA9IHBvaW50VG9BZGQ7XHJcbiAgICAgICAgICAgIHBvaW50cy5wdXNoKHBvaW50VG9BZGQpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gdXBkYXRlQ2VudGVyKCkge1xyXG4gICAgICAgICAgICB2YXIgaSwgc3VtID0gMDtcclxuICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCBwb2ludHMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIHN1bSArPSBwb2ludHNbaV0ucmFkO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNlbnRlci5yYWQgPSBzdW0gLyBwb2ludHMubGVuZ3RoO1xyXG4gICAgICAgICAgICBjZW50ZXIudmVjID0gdmVjMi5jbG9uZShbTWF0aC5jb3MoY2VudGVyLnJhZCksIE1hdGguc2luKGNlbnRlci5yYWQpXSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpbml0KCk7XHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIGFkZDogZnVuY3Rpb24ocG9pbnRUb0FkZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKCFwb2ludE1hcFtwb2ludFRvQWRkLmlkXSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGFkZChwb2ludFRvQWRkKTtcclxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVDZW50ZXIoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZml0czogZnVuY3Rpb24ob3RoZXJQb2ludCkge1xyXG4gICAgICAgICAgICAgICAgLy8gY2hlY2sgY29zaW5lIHNpbWlsYXJpdHkgdG8gY2VudGVyLWFuZ2xlXHJcbiAgICAgICAgICAgICAgICB2YXIgc2ltaWxhcml0eSA9IE1hdGguYWJzKHZlYzIuZG90KG90aGVyUG9pbnQucG9pbnQudmVjLCBjZW50ZXIudmVjKSk7XHJcbiAgICAgICAgICAgICAgICBpZiAoc2ltaWxhcml0eSA+IHRocmVzaG9sZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXRQb2ludHM6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHBvaW50cztcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZ2V0Q2VudGVyOiBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBjZW50ZXI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG4gICAgfSxcclxuICAgIGNyZWF0ZVBvaW50OiBmdW5jdGlvbihuZXdQb2ludCwgaWQsIHByb3BlcnR5KSB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgcmFkOiBuZXdQb2ludFtwcm9wZXJ0eV0sXHJcbiAgICAgICAgICAgIHBvaW50OiBuZXdQb2ludCxcclxuICAgICAgICAgICAgaWQ6IGlkXHJcbiAgICAgICAgfTtcclxuICAgIH1cclxufTtcclxuXG5cblxuLyoqIFdFQlBBQ0sgRk9PVEVSICoqXG4gKiogLi9zcmMvY29tbW9uL2NsdXN0ZXIuanNcbiAqKi8iLCJleHBvcnQgZGVmYXVsdCAoZnVuY3Rpb24oKSB7XHJcbiAgICB2YXIgZXZlbnRzID0ge307XHJcblxyXG4gICAgZnVuY3Rpb24gZ2V0RXZlbnQoZXZlbnROYW1lKSB7XHJcbiAgICAgICAgaWYgKCFldmVudHNbZXZlbnROYW1lXSkge1xyXG4gICAgICAgICAgICBldmVudHNbZXZlbnROYW1lXSA9IHtcclxuICAgICAgICAgICAgICAgIHN1YnNjcmliZXJzOiBbXVxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gZXZlbnRzW2V2ZW50TmFtZV07XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gY2xlYXJFdmVudHMoKXtcclxuICAgICAgICBldmVudHMgPSB7fTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBwdWJsaXNoU3Vic2NyaXB0aW9uKHN1YnNjcmlwdGlvbiwgZGF0YSkge1xyXG4gICAgICAgIGlmIChzdWJzY3JpcHRpb24uYXN5bmMpIHtcclxuICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIHN1YnNjcmlwdGlvbi5jYWxsYmFjayhkYXRhKTtcclxuICAgICAgICAgICAgfSwgNCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgc3Vic2NyaXB0aW9uLmNhbGxiYWNrKGRhdGEpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBzdWJzY3JpYmUoZXZlbnQsIGNhbGxiYWNrLCBhc3luYykge1xyXG4gICAgICAgIHZhciBzdWJzY3JpcHRpb247XHJcblxyXG4gICAgICAgIGlmICggdHlwZW9mIGNhbGxiYWNrID09PSBcImZ1bmN0aW9uXCIpIHtcclxuICAgICAgICAgICAgc3Vic2NyaXB0aW9uID0ge1xyXG4gICAgICAgICAgICAgICAgY2FsbGJhY2s6IGNhbGxiYWNrLFxyXG4gICAgICAgICAgICAgICAgYXN5bmM6IGFzeW5jXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgc3Vic2NyaXB0aW9uID0gY2FsbGJhY2s7XHJcbiAgICAgICAgICAgIGlmICghc3Vic2NyaXB0aW9uLmNhbGxiYWNrKSB7XHJcbiAgICAgICAgICAgICAgICB0aHJvdyBcIkNhbGxiYWNrIHdhcyBub3Qgc3BlY2lmaWVkIG9uIG9wdGlvbnNcIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZ2V0RXZlbnQoZXZlbnQpLnN1YnNjcmliZXJzLnB1c2goc3Vic2NyaXB0aW9uKTtcclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4ge1xyXG4gICAgICAgIHN1YnNjcmliZTogZnVuY3Rpb24oZXZlbnQsIGNhbGxiYWNrLCBhc3luYykge1xyXG4gICAgICAgICAgICByZXR1cm4gc3Vic2NyaWJlKGV2ZW50LCBjYWxsYmFjaywgYXN5bmMpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgcHVibGlzaDogZnVuY3Rpb24oZXZlbnROYW1lLCBkYXRhKSB7XHJcbiAgICAgICAgICAgIHZhciBldmVudCA9IGdldEV2ZW50KGV2ZW50TmFtZSksXHJcbiAgICAgICAgICAgICAgICBzdWJzY3JpYmVycyA9IGV2ZW50LnN1YnNjcmliZXJzO1xyXG5cclxuICAgICAgICAgICAgZXZlbnQuc3Vic2NyaWJlcnMgPSBzdWJzY3JpYmVycy5maWx0ZXIoZnVuY3Rpb24oc3Vic2NyaWJlcikge1xyXG4gICAgICAgICAgICAgICAgcHVibGlzaFN1YnNjcmlwdGlvbihzdWJzY3JpYmVyLCBkYXRhKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiAhc3Vic2NyaWJlci5vbmNlO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIG9uY2U6IGZ1bmN0aW9uKGV2ZW50LCBjYWxsYmFjaywgYXN5bmMpIHtcclxuICAgICAgICAgICAgc3Vic2NyaWJlKGV2ZW50LCB7XHJcbiAgICAgICAgICAgICAgICBjYWxsYmFjazogY2FsbGJhY2ssXHJcbiAgICAgICAgICAgICAgICBhc3luYzogYXN5bmMsXHJcbiAgICAgICAgICAgICAgICBvbmNlOiB0cnVlXHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgdW5zdWJzY3JpYmU6IGZ1bmN0aW9uKGV2ZW50TmFtZSwgY2FsbGJhY2spIHtcclxuICAgICAgICAgICAgdmFyIGV2ZW50O1xyXG5cclxuICAgICAgICAgICAgaWYgKGV2ZW50TmFtZSkge1xyXG4gICAgICAgICAgICAgICAgZXZlbnQgPSBnZXRFdmVudChldmVudE5hbWUpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGV2ZW50ICYmIGNhbGxiYWNrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQuc3Vic2NyaWJlcnMgPSBldmVudC5zdWJzY3JpYmVycy5maWx0ZXIoZnVuY3Rpb24oc3Vic2NyaWJlcil7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzdWJzY3JpYmVyLmNhbGxiYWNrICE9PSBjYWxsYmFjaztcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQuc3Vic2NyaWJlcnMgPSBbXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNsZWFyRXZlbnRz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GUzOVZJTlJlYWRlcixcclxuICAgIGNvZGFiYXJfcmVhZGVyOiBDb2RhYmFyUmVhZGVyLFxyXG4gICAgdXBjX3JlYWRlcjogVVBDUmVhZGVyLFxyXG4gICAgdXBjX2VfcmVhZGVyOiBVUENFUmVhZGVyLFxyXG4gICAgaTJvZjVfcmVhZGVyOiBJMm9mNVJlYWRlclxyXG59O1xyXG5leHBvcnQgZGVmYXVsdCB7XHJcbiAgICBjcmVhdGU6IGZ1bmN0aW9uKGNvbmZpZywgaW5wdXRJbWFnZVdyYXBwZXIpIHtcclxuICAgICAgICB2YXIgX2NhbnZhcyA9IHtcclxuICAgICAgICAgICAgICAgIGN0eDoge1xyXG4gICAgICAgICAgICAgICAgICAgIGZyZXF1ZW5jeTogbnVsbCxcclxuICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuOiBudWxsLFxyXG4gICAgICAgICAgICAgICAgICAgIG92ZXJsYXk6IG51bGxcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBkb206IHtcclxuICAgICAgICAgICAgICAgICAgICBmcmVxdWVuY3k6IG51bGwsXHJcbiAgICAgICAgICAgICAgICAgICAgcGF0dGVybjogbnVsbCxcclxuICAgICAgICAgICAgICAgICAgICBvdmVybGF5OiBudWxsXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIF9iYXJjb2RlUmVhZGVycyA9IFtdO1xyXG5cclxuICAgICAgICBpbml0Q2FudmFzKCk7XHJcbiAgICAgICAgaW5pdFJlYWRlcnMoKTtcclxuICAgICAgICBpbml0Q29uZmlnKCk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGluaXRDYW52YXMoKSB7XHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQgJiYgdHlwZW9mIGRvY3VtZW50ICE9PSAndW5kZWZpbmVkJykge1xyXG4gICAgICAgICAgICAgICAgdmFyICRkZWJ1ZyA9IGRv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NzTmFtZSA9IFwicGF0dGVybkJ1ZmZlclwiO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgkZGVidWcpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGRlYnVnLmFwcGVuZENoaWxkKF9jYW52YXMuZG9tLnBhdHRlcm4pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIF9jYW52YXMuY3R4LnBhdHRlcm4gPSBfY2FudmFzLmRvbS5wYXR0ZXJuLmdldENvbnRleHQoXCIyZFwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICBfY2FudmFzLmRvbS5vdmVybGF5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcImNhbnZhcy5kcmF3aW5nQnVmZmVyXCIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKF9jYW52YXMuZG9tLm92ZXJsYXkpIHtcclxuICAgICAgICAgICAgICAgICAgICBfY2FudmFzLmN0eC5vdmVybGF5ID0gX2NhbnZhcy5kb20ub3ZlcmxheS5nZXRDb250ZXh0KFwiMmRcIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGluaXRSZWFkZXJzKCkge1xyXG4gICAgICAgICAgICBjb25maWcucmVhZGVycy5mb3JFYWNoKGZ1bmN0aW9uKHJlYWRlckNvbmZpZykge1xyXG4gICAgICAgICAgICAgICAgdmFyIHJlYWRlcixcclxuICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uID0ge307XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiByZWFkZXJDb25maWcgPT09ICdvYmplY3QnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVhZGVyID0gcmVhZGVyQ29uZmlnLmZvcm1hdDtcclxuICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uID0gcmVhZGVyQ29uZmlnLmNvbmZpZztcclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHJlYWRlckNvbmZpZyA9PT0gJ3N0cmluZycpIHtcclxuICAgICAgICAgICAgICAgICAgICByZWFkZXIgPSByZWFkZXJDb25maWc7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJCZWZvcmUgcmVnaXN0ZXJpbmcgcmVhZGVyOiBcIiwgcmVhZGVyKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIF9iYXJjb2RlUmVhZGVycy5wdXNoKG5ldyBSRUFERVJTW3JlYWRlcl0oY29uZmlndXJhdGlvbikpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCkge1xyXG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJSZWdpc3RlcmVkIFJlYWRlcnM6IFwiICsgX2JhcmNvZGVSZWFkZXJzXHJcbiAgICAgICAgICAgICAgICAgICAgLm1hcCgocmVhZGVyKSA9PiBKU09OLnN0cmluZ2lmeSh7Zm9ybWF0OiByZWFkZXIuRk9STUFULCBjb25maWc6IHJlYWRlci5jb25maWd9KSlcclxuICAgICAgICAgICAgICAgICAgICAuam9pbignLCAnKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGluaXRDb25maWcoKSB7XHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQgJiYgdHlwZW9mIGRvY3VtZW50ICE9PSAndW5kZWZpbmVkJykge1xyXG4gICAgICAgICAgICAgICAgdmFyIGksXHJcbiAgICAgICAgICAgICAgICAgICAgdmlzID0gW3tcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZTogX2NhbnZhcy5kb20uZnJlcXVlbmN5LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wOiBjb25maWcuZGVidWcuc2hvd0ZyZXF1ZW5jeVxyXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZTogX2NhbnZhcy5kb20ucGF0dGVybixcclxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcDogY29uZmlnLmRlYnVnLnNob3dQYXR0ZXJuXHJcbiAgICAgICAgICAgICAgICAgICAgfV07XHJcblxyXG4gICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHZpcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh2aXNbaV0ucHJvcCA9PT0gdHJ1ZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2aXNbaV0ubm9kZS5zdHlsZS5kaXNwbGF5ID0gXCJibG9ja1wiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZpc1tpXS5ub2RlLnN0eWxlLmRpc3BsYXkgPSBcIm5vbmVcIjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8qKlxyXG4gICAgICAgICAqIGV4dGVuZCB0aGUgbGluZSBvbiBib3RoIGVuZHNcclxuICAgICAgICAgKiBAcGFyYW0ge0FycmF5fSBsaW5lXHJcbiAgICAgICAgICogQHBhcmFtIHtOdW1iZXJ9IGFuZ2xlXHJcbiAgICAgICAgICovXHJcbiAgICAgICAgZnVuY3Rpb24gZ2V0RXh0ZW5kZWRMaW5lKGxpbmUsIGFuZ2xlLCBleHQpIHtcclxuICAgICAgICAgICAgZnVuY3Rpb24gZXh0ZW5kTGluZShhbW91bnQpIHtcclxuICAgICAgICAgICAgICAgIHZhciBleHRlbnNpb24gPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgeTogYW1vdW50ICogTWF0aC5zaW4oYW5nbGUpLFxyXG4gICAgICAgICAgICAgICAgICAgIHg6IGFtb3VudCAqIE1hdGguY29zKGFuZ2xlKVxyXG4gICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgICAgICBsaW5lWzBdLnkgLT0gZXh0ZW5zaW9uLnk7XHJcbiAgICAgICAgICAgICAgICBsaW5lWzBdLnggLT0gZXh0ZW5zaW9uLng7XHJcbiAgICAgICAgICAgICAgICBsaW5lWzFdLnkgKz0gZXh0ZW5zaW9uLnk7XHJcbiAgICAgICAgICAgICAgICBsaW5lWzFdLnggKz0gZXh0ZW5zaW9uLng7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8vIGNoZWNrIGlmIGluc2lkZSBpbWFnZVxyXG4gICAgICAgICAgICBleHRlbmRMaW5lKGV4dCk7XHJcbiAgICAgICAgICAgIHdoaWxlIChleHQgPiAxICYmICghaW5wdXRJbWFnZVdyYXBwZXIuaW5JbWFnZVdpdGhCb3JkZXIobGluZVswXSwgMClcclxuICAgICAgICAgICAgICAgICAgICB8fCAhaW5wdXRJbWFnZVdyYXBwZXIuaW5JbWFnZVdpdGhCb3JkZXIobGluZVsxXSwgMCkpKSB7XHJcbiAgICAgICAgICAgICAgICBleHQgLT0gTWF0aC5jZWlsKGV4dCAvIDIpO1xyXG4gICAgICAgICAgICAgICAgZXh0ZW5kTGluZSgtZXh0KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gbGluZTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGdldExpbmUoYm94KSB7XHJcbiAgICAgICAgICAgIHJldHVybiBbe1xyXG4gICAgICAgICAgICAgICAgeDogKGJveFsxXVswXSAtIGJveFswXVswXSkgLyAyICsgYm94WzBdWzBdLFxyXG4gICAgICAgICAgICAgICAgeTogKGJveFsxXVsxXSAtIGJveFswXVsxXSkgLyAyICsgYm94WzBdWzFdXHJcbiAgICAgICAgICAgIH0sIHtcclxuICAgICAgICAgICAgICAgIHg6IChib3hbM11bMF0gLSBib3hbMl1bMF0pIC8gMiArIGJveFsyXVswXSxcclxuICAgICAgICAgICAgICAgIHk6IChib3hbM11bMV0gLSBib3hbMl1bMV0pIC8gMiArIGJveFsyXVsxXVxyXG4gICAgICAgICAgICB9XTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHRyeURlY29kZShsaW5lKSB7XHJcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSBudWxsLFxyXG4gICAgICAgICAgICAgICAgaSxcclxuICAgICAgICAgICAgICAgIGJhcmNvZGVMaW5lID0gQnJlc2VuaGFtLmdldEJhcmNvZGVMaW5lKGlucHV0SW1hZ2VXcmFwcGVyLCBsaW5lWzBdLCBsaW5lWzFdKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChFTlYuZGV2ZWxvcG1lbnQgJiYgY29uZmlnLmRlYnVnLnNob3dGcmVxdWVuY3kpIHtcclxuICAgICAgICAgICAgICAgIEltYWdlRGVidWcuZHJhd1BhdGgobGluZSwge3g6ICd4JywgeTogJ3knfSwgX2NhbnZhcy5jdHgub3ZlcmxheSwge2NvbG9yOiAncmVkJywgbGluZVdpZHRoOiAzfSk7XHJcbiAgICAgICAgICAgICAgICBCcmVzZW5oYW0uZGVidWcucHJpbnRGcmVxdWVuY3koYmFyY29kZUxpbmUubGluZSwgX2NhbnZhcy5kb20uZnJlcXVlbmN5KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgQnJlc2VuaGFtLnRvQmluYXJ5TGluZShiYXJjb2RlTGluZSk7XHJcblxyXG4gICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50ICYmIGNvbmZpZy5kZWJ1Zy5zaG93UGF0dGVybikge1xyXG4gICAgICAgICAgICAgICAgQnJlc2VuaGFtLmRlYnVnLnByaW50UGF0dGVybihiYXJjb2RlTGluZS5saW5lLCBfY2FudmFzLmRvbS5wYXR0ZXJuKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCBfYmFyY29kZVJlYWRlcnMubGVuZ3RoICYmIHJlc3VsdCA9PT0gbnVsbDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBfYmFyY29kZVJlYWRlcnNbaV0uZGVjb2RlUGF0dGVybihiYXJjb2RlTGluZS5saW5lKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAocmVzdWx0ID09PSBudWxsKXtcclxuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBjb2RlUmVzdWx0OiByZXN1bHQsXHJcbiAgICAgICAgICAgICAgICBiYXJjb2RlTGluZTogYmFyY29kZUxpbmVcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8qKlxyXG4gICAgICAgICAqIFRoaXMgbWV0aG9kIHNsaWNlcyB0aGUgZ2l2ZW4gYXJlYSBhcGFydCBhbmQgdHJpZXMgdG8gZGV0ZWN0IGEgYmFyY29kZS1wYXR0ZXJuXHJcbiAgICAgICAgICogZm9yIGVhY2ggc2xpY2UuIEl0IHJldHVybnMgdGhlIGRlY29kZWQgYmFyY29kZSwgb3IgbnVsbCBpZiBub3RoaW5nIHdhcyBmb3VuZFxyXG4gICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGJveFxyXG4gICAgICAgICAqIEBwYXJhbSB7QXJyYXl9IGxpbmVcclxuICAgICAgICAgKiBAcGFyYW0ge051bWJlcn0gbGluZUFuZ2xlXHJcbiAgICAgICAgICovXHJcbiAgICAgICAgZnVuY3Rpb24gdHJ5RGVjb2RlQnJ1dGVGb3JjZShib3gsIGxpbmUsIGxpbmVBbmdsZSkge1xyXG4gICAgICAgICAgICB2YXIgc2lkZUxlbmd0aCA9IE1hdGguc3FydChNYXRoLnBvdyhib3hbMV1bMF0gLSBib3hbMF1bMF0sIDIpICsgTWF0aC5wb3coKGJveFsxXVsxXSAtIGJveFswXVsxXSksIDIpKSxcclxuICAgICAgICAgICAgICAgIGksXHJcbiAgICAgICAgICAgICAgICBzbGljZXMgPSAxNixcclxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IG51bGwsXHJcbiAgICAgICAgICAgICAgICBkaXIsXHJcbiAgICAgICAgICAgICAgICBleHRlbnNpb24sXHJcbiAgICAgICAgICAgICAgICB4ZGlyID0gTWF0aC5zaW4obGluZUFuZ2xlKSxcclxuICAgICAgICAgICAgICAgIHlkaXIgPSBNYXRoLmNvcyhsaW5lQW5nbGUpO1xyXG5cclxuICAgICAgICAgICAgZm9yICggaSA9IDE7IGkgPCBzbGljZXMgJiYgcmVzdWx0ID09PSBudWxsOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIC8vIG1vdmUgbGluZSBwZXJwZW5kaWN1bGFyIHRvIGFuZ2xlXHJcbiAgICAgICAgICAgICAgICBkaXIgPSBzaWRlTGVuZ3RoIC8gc2xpY2VzICogaSAqIChpICUgMiA9PT0gMCA/IC0xIDogMSk7XHJcbiAgICAgICAgICAgICAgICBleHRlbnNpb24gPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgeTogZGlyICogeGRpcixcclxuICAgICAgICAgICAgICAgICAgICB4OiBkaXIgKiB5ZGlyXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgbGluZVswXS55ICs9IGV4dGVuc2lvbi54O1xyXG4gICAgICAgICAgICAgICAgbGluZVswXS54IC09IGV4dGVuc2lvbi55O1xyXG4gICAgICAgICAgICAgICAgbGluZVsxXS55ICs9IGV4dGVuc2lvbi54O1xyXG4gICAgICAgICAgICAgICAgbGluZVsxXS54IC09IGV4dGVuc2lvbi55O1xyXG5cclxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRyeURlY29kZShsaW5lKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gZ2V0TGluZUxlbmd0aChsaW5lKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBNYXRoLnNxcnQoXHJcbiAgICAgICAgICAgICAgICBNYXRoLnBvdyhNYXRoLmFicyhsaW5lWzFdLnkgLSBsaW5lWzBdLnkpLCAyKSArXHJcbiAgICAgICAgICAgICAgICBNYXRoLnBvdyhNYXRoLmFicyhsaW5lWzFdLnggLSBsaW5lWzBdLngpLCAyKSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKipcclxuICAgICAgICAgKiBXaXRoIHRoZSBoZWxwIG9mIHRoZSBjb25maWd1cmVkIHJlYWRlcnMgKENvZGUxMjggb3IgRUFOKSB0aGlzIGZ1bmN0aW9uIHRyaWVzIHRvIGRldGVjdCBhXHJcbiAgICAgICAgICogdmFsaWQgYmFyY29kZSBwYXR0ZXJuIHdpdGhpbiB0aGUgZ2l2ZW4gYXJlYS5cclxuICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gYm94IFRoZSBhcmVhIHRvIHNlYXJjaCBpblxyXG4gICAgICAgICAqIEByZXR1cm5zIHtPYmplY3R9IHRoZSByZXN1bHQge2NvZGVSZXN1bHQsIGxpbmUsIGFuZ2xlLCBwYXR0ZXJuLCB0aHJlc2hvbGR9XHJcbiAgICAgICAgICovXHJcbiAgICAgICAgZnVuY3Rpb24gZGVjb2RlRnJvbUJvdW5kaW5nQm94KGJveCkge1xyXG4gICAgICAgICAgICB2YXIgbGluZSxcclxuICAgICAgICAgICAgICAgIGxpbmVBbmdsZSxcclxuICAgICAgICAgICAgICAgIGN0eCA9IF9jYW52YXMuY3R4Lm92ZXJsYXksXHJcbiAgICAgICAgICAgICAgICByZXN1bHQsXHJcbiAgICAgICAgICAgICAgICBsaW5lTGVuZ3RoO1xyXG5cclxuICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kZWJ1Zy5kcmF3Qm91bmRpbmdCb3ggJiYgY3R4KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgSW1hZ2VEZWJ1Zy5kcmF3UGF0aChib3gsIHt4OiAwLCB5OiAxfSwgY3R4LCB7Y29sb3I6IFwiYmx1ZVwiLCBsaW5lV2lkdGg6IDJ9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgbGluZSA9IGdldExpbmUoYm94KTtcclxuICAgICAgICAgICAgbGluZUxlbmd0aCA9IGdldExpbmVMZW5ndGgobGluZSk7XHJcbiAgICAgICAgICAgIGxpbmVBbmdsZSA9IE1hdGguYXRhbjIobGluZVsxXS55IC0gbGluZVswXS55LCBsaW5lWzFdLnggLSBsaW5lWzBdLngpO1xyXG4gICAgICAgICAgICBsaW5lID0gZ2V0RXh0ZW5kZWRMaW5lKGxpbmUsIGxpbmVBbmdsZSwgTWF0aC5mbG9vcihsaW5lTGVuZ3RoICogMC4xKSk7XHJcbiAgICAgICAgICAgIGlmIChsaW5lID09PSBudWxsKXtcclxuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICByZXN1bHQgPSB0cnlEZWNvZGUobGluZSk7XHJcbiAgICAgICAgICAgIGlmIChyZXN1bHQgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRyeURlY29kZUJydXRlRm9yY2UoYm94LCBsaW5lLCBsaW5lQW5nbGUpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAocmVzdWx0ID09PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCAmJiByZXN1bHQgJiYgY29uZmlnLmRlYnVnLmRyYXdTY2FubGluZSAmJiBjdHgpIHtcclxuICAgICAgICAgICAgICAgIEltYWdlRGVidWcuZHJhd1BhdGgobGluZSwge3g6ICd4JywgeTogJ3knfSwgY3R4LCB7Y29sb3I6ICdyZWQnLCBsaW5lV2lkdGg6IDN9KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgIGNvZGVSZXN1bHQ6IHJlc3VsdC5jb2RlUmVzdWx0LFxyXG4gICAgICAgICAgICAgICAgbGluZTogbGluZSxcclxuICAgICAgICAgICAgICAgIGFuZ2xlOiBsaW5lQW5nbGUsXHJcbiAgICAgICAgICAgICAgICBwYXR0ZXJuOiByZXN1bHQuYmFyY29kZUxpbmUubGluZSxcclxuICAgICAgICAgICAgICAgIHRocmVzaG9sZDogcmVzdWx0LmJhcmNvZGVMaW5lLnRocmVzaG9sZFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgZGVjb2RlRnJvbUJvdW5kaW5nQm94OiBmdW5jdGlvbihib3gpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBkZWNvZGVGcm9tQm91bmRpbmdCb3goYm94KTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZGVjb2RlRnJvbUJvdW5kaW5nQm94ZXM6IGZ1bmN0aW9uKGJveGVzKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgaSwgcmVzdWx0LFxyXG4gICAgICAgICAgICAgICAgICAgIGJhcmNvZGVzID0gW10sXHJcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlwbGUgPSBjb25maWcubXVsdGlwbGU7XHJcblxyXG4gICAgICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCBib3hlcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGJveCA9IGJveGVzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IGRlY29kZUZyb21Cb3VuZGluZ0JveChib3gpIHx8IHt9O1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5ib3ggPSBib3g7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChtdWx0aXBsZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYXJjb2Rlcy5wdXNoKHJlc3VsdCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChyZXN1bHQuY29kZVJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiAobXVsdGlwbGUpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiYXJjb2Rlc1xyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNldFJlYWRlcnM6IGZ1bmN0aW9uKHJlYWRlcnMpIHtcclxuICAgICAgICAgICAgICAgIGNvbmZpZy5yZWFkZXJzID0gcmVhZGVycztcclxuICAgICAgICAgICAgICAgIF9iYXJjb2RlUmVhZGVycy5sZW5ndGggPSAwO1xyXG4gICAgICAgICAgICAgICAgaW5pdFJlYWRlcnMoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH07XHJcbiAgICB9XHJcbn07XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIC4vc3JjL2RlY29kZXIvYmFyY29kZV9kZWNvZGVyLmpzXG4gKiovIiwiaW1wb3J0IEltYWdlV3Jh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SxcclxuICAgICAgICB0bXAsXHJcbiAgICAgICAgeCxcclxuICAgICAgICBsaW5lID0gW10sXHJcbiAgICAgICAgaW1hZ2VEYXRhID0gaW1hZ2VXcmFwcGVyLmRhdGEsXHJcbiAgICAgICAgd2lkdGggPSBpbWFnZVdyYXBwZXIuc2l6ZS54LFxyXG4gICAgICAgIHN1bSA9IDAsXHJcbiAgICAgICAgdmFsLFxyXG4gICAgICAgIG1pbiA9IDI1NSxcclxuICAgICAgICBtYXggPSAwO1xyXG5cclxuICAgIGZ1bmN0aW9uIHJlYWQoYSwgYikge1xyXG4gICAgICAgIHZhbCA9IGltYWdlRGF0YVtiICogd2lkdGggKyBhXTtcclxuICAgICAgICBzdW0gKz0gdmFsO1xyXG4gICAgICAgIG1pbiA9IHZhbCA8IG1pbiA/IHZhbCA6IG1pbjtcclxuICAgICAgICBtYXggPSB2YWwgPiBtYXggPyB2YWwgOiBtYXg7XHJcbiAgICAgICAgbGluZS5wdXNoKHZhbCk7XHJcbiAgICB9XHJcblxyXG4gICAgaWYgKHN0ZWVwKSB7XHJcbiAgICAgICAgdG1wID0geDA7XHJcbiAgICAgICAgeDAgPSB5MDtcclxuICAgICAgICB5MCA9IHRtcDtcclxuXHJcbiAgICAgICAgdG1wID0geDE7XHJcbiAgICAgICAgeDEgPSB5MTtcclxuICAgICAgICB5MSA9IHRtcDtcclxuICAgIH1cclxuICAgIGlmICh4MCA+IHgxKSB7XHJcbiAgICAgICAgdG1wID0geDA7XHJcbiAgICAgICAgeDAgPSB4MTtcclxuICAgICAgICB4MSA9IHRtcDtcclxuXHJcbiAgICAgICAgdG1wID0geTA7XHJcbiAgICAgICAgeTAgPSB5MTtcclxuICAgICAgICB5MSA9IHRtcDtcclxuICAgIH1cclxuICAgIGRlbHRheCA9IHgxIC0geDA7XHJcbiAgICBkZWx0YXkgPSBNYXRoLmFicyh5MSAtIHkwKTtcclxuICAgIGVycm9yID0gKGRlbHRheCAvIDIpIHwgMDtcclxuICAgIHkgPSB5MDtcclxuICAgIHlzdGVwID0geTAgPCB5MSA/IDEgOiAtMTtcclxuICAgIGZvciAoIHggPSB4MDsgeCA8IHgxOyB4KyspIHtcclxuICAgICAgICBpZiAoc3RlZXApe1xyXG4gICAgICAgICAgICByZWFkKHksIHgpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHJlYWQoeCwgeSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVycm9yID0gZXJyb3IgLSBkZWx0YXk7XHJcbiAgICAgICAgaWYgKGVycm9yIDwgMCkge1xyXG4gICAgICAgICAgICB5ID0geSArIHlzdGVwO1xyXG4gICAgICAgICAgICBlcnJvciA9IGVycm9yICsgZGVsdGF4O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4ge1xyXG4gICAgICAgIGxpbmU6IGxpbmUsXHJcbiAgICAgICAgbWluOiBtaW4sXHJcbiAgICAgICAgbWF4OiBtYXhcclxuICAgIH07XHJcbn07XHJcblxyXG4vKipcclxuICogQ29udmVydHMgdGhlIHJlc3VsdCBmcm9tIGdldEJhcmNvZGVMaW5lIGludG8gYSBiaW5hcnkgcmVwcmVzZW50YXRpb25cclxuICogYWxzbyBjb25zaWRlcmluZyB0aGUgZnJlcXVlbmN5IGFuZCBzbG9wZSBvZiB0aGUgc2lnbmFsIGZvciBtb3JlIHJvYnVzdCByZXN1bHRzXHJcbiAqIEBwYXJhbSB7T2JqZWN0fSByZXN1bHQge2xpbmUsIG1pbiwgbWF4fVxyXG4gKi9cclxuQnJlc2VuaGFtLnRvQmluYXJ5TGluZSA9IGZ1bmN0aW9uKHJlc3VsdCkge1xyXG4gICAgdmFyIG1pbiA9IHJlc3VsdC5taW4sXHJcbiAgICAgICAgbWF4ID0gcmVzdWx0Lm1heCxcclxuICAgICAgICBsaW5lID0gcmVzdWx0LmxpbmUsXHJcbiAgICAgICAgc2xvcGUsXHJcbiAgICAgICAgc2xvcGUyLFxyXG4gICAgICAgIGNlbnRlciA9IG1pbiArIChtYXggLSBtaW4pIC8gMixcclxuICAgICAgICBleHRyZW1hID0gW10sXHJcbiAgICAgICAgY3VycmVudERpcixcclxuICAgICAgICBkaXIsXHJcbiAgICAgICAgdGhyZXNob2xkID0gKG1heCAtIG1pbikgLyAxMixcclxuICAgICAgICByVGhyZXNob2xkID0gLXRocmVzaG9sZCxcclxuICAgICAgICBpLFxyXG4gICAgICAgIGo7XHJcblxyXG4gICAgLy8gMS4gZmluZCBleHRyZW1hXHJcbiAgICBjdXJyZW50RGlyID0gbGluZVswXSA+IGNlbnRlciA/IFNsb3BlLkRJUi5VUCA6IFNsb3BlLkRJUi5ET1dOO1xyXG4gICAgZXh0cmVtYS5wdXNoKHtcclxuICAgICAgICBwb3M6IDAsXHJcbiAgICAgICAgdmFsOiBsaW5lWzBdXHJcbiAgICB9KTtcclxuICAgIGZvciAoIGkgPSAwOyBpIDwgbGluZS5sZW5ndGggLSAyOyBpKyspIHtcclxuICAgICAgICBzbG9wZSA9IChsaW5lW2kgKyAxXSAtIGxpbmVbaV0pO1xyXG4gICAgICAgIHNsb3BlMiA9IChsaW5lW2kgKyAyXSAtIGxpbmVbaSArIDFdKTtcclxuICAgICAgICBpZiAoKHNsb3BlICsgc2xvcGUyKSA8IHJUaHJlc2hvbGQgJiYgbGluZVtpICsgMV0gPCAoY2VudGVyICogMS41KSkge1xyXG4gICAgICAgICAgICBkaXIgPSBTbG9wZS5ESVIuRE9XTjtcclxuICAgICAgICB9IGVsc2UgaWYgKChzbG9wZSArIHNsb3BlMikgPiB0aHJlc2hvbGQgJiYgbGluZVtpICsgMV0gPiAoY2VudGVyICogMC41KSkge1xyXG4gICAgICAgICAgICBkaXIgPSBTbG9wZS5ESVIuVVA7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgZGlyID0gY3VycmVudERpcjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChjdXJyZW50RGlyICE9PSBkaXIpIHtcclxuICAgICAgICAgICAgZXh0cmVtYS5wdXNoKHtcclxuICAgICAgICAgICAgICAgIHBvczogaSxcclxuICAgICAgICAgICAgICAgIHZhbDogbGluZVtpXVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgY3VycmVudERpciA9IGRpcjtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICBleHRyZW1hLnB1c2goe1xyXG4gICAgICAgIHBvczogbGluZS5sZW5ndGgsXHJcbiAgICAgICAgdmFsOiBsaW5lW2xpbmUubGVuZ3RoIC0gMV1cclxuICAgIH0pO1xyXG5cclxuICAgIGZvciAoIGogPSBleHRyZW1hWzBdLnBvczsgaiA8IGV4dHJlbWFbMV0ucG9zOyBqKyspIHtcclxuICAgICAgICBsaW5lW2pdID0gbGluZVtqXSA+IGNlbnRlciA/IDAgOiAxO1xyXG4gICAgfVxyXG5cclxuICAgIC8vIGl0ZXJhdGUgb3ZlciBleHRyZW1hIGFuZCBjb252ZXJ0IHRvIGJpbmFyeSBiYXNlZCBvbiBhdmcgYmV0d2VlbiBtaW5tYXhcclxuICAgIGZvciAoIGkgPSAxOyBpIDwgZXh0cmVtYS5sZW5ndGggLSAxOyBpKyspIHtcclxuICAgICAgICBpZiAoZXh0cmVtYVtpICsgMV0udmFsID4gZXh0cmVtYVtpXS52YWwpIHtcclxuICAgICAgICAgICAgdGhyZXNob2xkID0gKGV4dHJlbWFbaV0udmFsICsgKChleHRyZW1hW2kgKyAxXS52YWwgLSBleHRyZW1hW2ldLnZhbCkgLyAzKSAqIDIpIHwgMDtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aHJlc2hvbGQgPSAoZXh0cmVtYVtpICsgMV0udmFsICsgKChleHRyZW1hW2ldLnZhbCAtIGV4dHJlbWFbaSArIDFdLnZhbCkgLyAzKSkgfCAwO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZm9yICggaiA9IGV4dHJlbWFbaV0ucG9zOyBqIDwgZXh0cmVtYVtpICsgMV0ucG9zOyBqKyspIHtcclxuICAgICAgICAgICAgbGluZVtqXSA9IGxpbmVbal0gPiB0aHJlc2hvbGQgPyAwIDogMTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHtcclxuICAgICAgICBsaW5lOiBsaW5lLFxyXG4gICAgICAgIHRocmVzaG9sZDogdGhyZXNob2xkXHJcbiAgICB9O1xyXG59O1xyXG5cclxuLyoqXHJcbiAqIFVzZWQgZm9yIGRldmVsb3BtZW50IG9ubHlcclxuICovXHJcbkJyZXNlbmhhbS5kZWJ1ZyA9IHtcclxuICAgIHByaW50RnJlcXVlbmN5OiBmdW5jdGlvbihsaW5lLCBjYW52YXMpIHtcclxuICAgICAgICB2YXIgaSxcclxuICAgICAgICAgICAgY3R4ID0gY2FudmFzLmdldENvbnRleHQoXCIyZFwiKTtcclxuICAgICAgICBjYW52YXMud2lkdGggPSBsaW5lLmxlbmd0aDtcclxuICAgICAgICBjYW52YXMuaGVpZ2h0ID0gMjU2O1xyXG5cclxuICAgICAgICBjdHguYmVnaW5QYXRoKCk7XHJcbiAgICAgICAgY3R4LnN0cm9rZVN0eWxlID0gXCJibHVlXCI7XHJcbiAgICAgICAgZm9yICggaSA9IDA7IGkgPCBsaW5lLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGN0eC5tb3ZlVG8oaSwgMjU1KTtcclxuICAgICAgICAgICAgY3R4LmxpbmVUbyhpLCAyNTUgLSBsaW5lW2ldKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgY3R4LnN0cm9rZSgpO1xyXG4gICAgICAgIGN0eC5jbG9zZVBhdGgoKTtcclxuICAgIH0sXHJcblxyXG4gICAgcHJpbnRQYXR0ZXJuOiBmdW5jdGlvbihsaW5lLCBjYW52YXMpIHtcclxuICAgICAgICB2YXIgY3R4ID0gY2FudmFzLmdldENvbnRleHQoXCIyZFwiKSwgaTtcclxuXHJcbiAgICAgICAgY2FudmFzLndpZHRoID0gbGluZS5sZW5ndGg7XHJcbiAgICAgICAgY3R4LmZpbGxDb2xvciA9IFwiYmxhY2tcIjtcclxuICAgICAgICBmb3IgKCBpID0gMDsgaSA8IGxpbmUubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgaWYgKGxpbmVbaV0gPT09IDEpIHtcclxuICAgICAgICAgICAgICAgIGN0eC5maWxsUmVjdChpLCAwLCAxLCAxMDApO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59O1xyXG5cclxuZXhwb3J0IGRlZmF1bHQgQnJlc2VuaGFtO1xyXG5cblxuXG4vKiogV0VCUEFDSyBGT09URVIgKipcbiAqKiAuL3NyYy9kZWNvZGVyL2JyZXNlbmhhbS5qc1xuICoqLyIsImltcG9ydCB7bWVyZ2UsIHBpY2t9IGZyb20gJ2xvZGFzaCc7XHJcblxyXG52YXIgc3RyZWFtUmVmLFxyXG4gICAgbG9hZGVkRGF0YUhhbmRsZXI7XHJcblxyXG5mdW5jdGlvbiB3YWl0Rm9yVmlkZW8odmlkZW8pIHtcclxuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XHJcbiAgICAgICAgbGV0IGF0dGVtcHRzID0gMTA7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGNoZWNrVmlkZW8oKSB7XHJcbiAgICAgICAgICAgIGlmIChhdHRlbXB0cyA+IDApIHtcclxuICAgICAgICAgICAgICAgIGlmICh2aWRlby52aWRlb1dpZHRoID4gMCAmJiB2aWRlby52aWRlb0hlaWdodCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHZpZGVvLnZpZGVvV2lkdGggKyBcInB4IHggXCIgKyB2aWRlby52aWRlb0hlaWdodCArIFwicHhcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LnNldFRpbWVvdXQoY2hlY2tWaWRlbywgNTAwKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHJlamVjdCgnVW5hYmxlIHRvIHBsYXkgdmlkZW8gc3RyZWFtLiBJcyB3ZWJjYW0gd29ya2luZz8nKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBhdHRlbXB0cy0tO1xyXG4gICAgICAgIH1cclxuICAgICAgICBjaGVja1ZpZGVvKCk7XHJcbiAgICB9KTtcclxufVxyXG5cclxuLyoqXHJcbiAqIFRyaWVzIHRvIGF0dGFjaCB0aGUgY2FtZXJhLXN0cmVhbSB0byBhIGdpdmVuIHZpZGVvLWVsZW1lbnRcclxuICogYW5kIGNhbGxzIHRoZSBjYWxsYmFjayBmdW5jdGlvbiB3aGVuIHRoZSBjb250ZW50IGlzIHJlYWR5XHJcbiAqIEBwYXJhbSB7T2JqZWN0fSBjb25zdHJhaW50c1xyXG4gKiBAcGFyYW0ge09iamVjdH0gdmlkZW9cclxuICovXHJcbmZ1bmN0aW9uIGluaXRDYW1lcmEodmlkZW8sIGNvbnN0cmFpbnRzKSB7XHJcbiAgICByZXR1cm4gbmF2aWdhdG9yLm1lZGlhRGV2aWNlcy5nZXRVc2VyTWVkaWEoY29uc3RyYWludHMpXHJcbiAgICAudGhlbigoc3RyZWFtKSA9PiB7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcclxuICAgICAgICAgICAgc3RyZWFtUmVmID0gc3RyZWFtO1xyXG4gICAgICAgICAgICB2aWRlby5zcmMgPSB3aW5kb3cuVVJMLmNyZWF0ZU9iamVjdFVSTChzdHJlYW0pO1xyXG4gICAgICAgICA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bXCJmYWNpbmdcIl07XHJcbiAgICAgICAgY29uc29sZS5sb2coXCJXQVJOSU5HOiBDb25zdHJhaW50ICdmYWNpbmcnIGlzIGRlcHJlY2F0ZWQuIFVzZSAnZmFjaW5nTW9kZScgaW5zdGVhZCdcIik7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbm9ybWFsaXplZDtcclxufVxyXG5cclxuZnVuY3Rpb24gYXBwbHlDYW1lcmFGYWNpbmcoZmFjaW5nLCBjb25zdHJhaW50cykge1xyXG4gICAgaWYgKHR5cGVvZiBjb25zdHJhaW50cy52aWRlby5kZXZpY2VJZCAhPT0gJ3VuZGVmaW5lZCcgfHwgIWZhY2luZyl7XHJcbiAgICAgICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZShjb25zdHJhaW50cyk7XHJcbiAgICB9XHJcbiAgICBpZiAoIHR5cGVvZiBNZWRpYVN0cmVhbVRyYWNrICE9PSAndW5kZWZpbmVkJyAmJlxyXG4gICAgICAgICAgICB0eXBlb2YgTWVkaWFTdHJlYW1UcmFjay5nZXRTb3VyY2VzICE9PSAndW5kZWZpbmVkJykge1xyXG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XHJcbiAgICAgICAgICAgIE1lZGlhU3RyZWFtVHJhY2suZ2V0U291cmNlcygoc291cmNlSW5mb3MpID0+IHtcclxuICAgICAgICAgICAgICAgIGNvbnN0IHZpZGVvU291cmNlID0gc291cmNlSW5mb3MuZmlsdGVyKChzb3VyY2VJbmZvKSA9PiAoXHJcbiAgICAgICAgICAgICAgICAgICAgc291cmNlSW5mby5raW5kID09PSBcInZpZGVvXCIgJiYgc291cmNlSW5mby5mYWNpbmcgPT09IGZhY2luZ1xyXG4gICAgICAgICAgICAgICAgKSlbMF07XHJcbiAgICAgICAgICAgICAgICBpZiAodmlkZW9Tb3VyY2UpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZShtZXJnZS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YXRjaCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgYm94ID0gYm94RnJvbVBhdGNoZXMocGF0Y2hlcyk7XHJcbiAgICAgICAgaWYgKGJveCkge1xyXG4gICAgICAgICAgICBib3hlcy5wdXNoKGJveCk7XHJcblxyXG4gICAgICAgICAgICAvLyBkcmF3IHBhdGNoLWxhYmVscyBpZiByZXF1ZXN0ZWRcclxuICAgICAgICAgICAgaWYgKEVOVi5kZXZlbG9wbWVudCAmJiBfY29uZmlnLmRlYnVnLnNob3dSZW1haW5pbmdQYXRjaExhYmVscykge1xyXG4gICAgICAgICAgICAgICAgZm9yICggaiA9IDA7IGogPCBwYXRjaGVzLmxlbmd0aDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcGF0Y2ggPSBwYXRjaGVzW2pdO1xyXG4gICAgICAgICAgICAgICAgICAgIGhzdlswXSA9ICh0b3BMYWJlbHNbaV0ubGFiZWwgLyAobWF4TGFiZWwgKyAxKSkgKiAzNjA7XHJcbiAgICAgICAgICAgICAgICAgICAgaHN2MnJnYihoc3YsIHJnYik7XHJcbiAgICAgICAgICAgICAgICAgICAgSW1hZ2VEZWJ1Zy5kcmF3UmVjdChwYXRjaC5wb3MsIF9zdWJJbWFnZVdyYXBwZXIuc2l6ZSwgX2NhbnZhc0NvbnRhaW5lci5jdHguYmluYXJ5LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7Y29sb3I6IFwicmdiKFwiICsgcmdiLmpvaW4oXCIsXCIpICsgXCIpXCIsIGxpbmVXaWR0aDogMn0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIGJveGVzO1xyXG59XHJcblxyXG4vKipcclxuICogRmluZCBzaW1pbGFyIG1vbWVudHMgKHZpYSBjbHVzdGVyKVxyXG4gKiBAcGFyYW0ge09iamVjdH0gbW9tZW50c1xyXG4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BsZWFzdCAyIG1vbWVudHMgYXJlIGZvdW5kIHdoaWNoIGhhdmUgYXQgbGVhc3QgbWluQ29tcG9uZW50V2VpZ2h0cyBjb3ZlcmVkXHJcbiAgICAgICAgaWYgKGVsaWdpYmxlTW9tZW50cy5sZW5ndGggPj0gMikge1xyXG4gICAgICAgICAgICBtYXRjaGluZ01vbWVudHMgPSBzaW1pbGFyTW9tZW50cyhlbGlnaWJsZU1vbWVudHMpO1xyXG4gICAgICAgICAgICBhdmcgPSAwO1xyXG4gICAgICAgICAgICAvLyBkZXRlcm1pbmUgdGhlIHNpbWlsYXJpdHkgb2YgdGhlIG1vbWVudHNcclxuICAgICAgICAgICAgZm9yICggayA9IDA7IGsgPCBtYXRjaGluZ01vbWVudHMubGVuZ3RoOyBrKyspIHtcclxuICAgICAgICAgICAgICAgIGF2ZyArPSBtYXRjaGluZ01vbWVudHNba10ucmFkO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBPbmx5IHR3byBvZiB0aGUgbW9tZW50cyBhcmUgYWxsb3dlZCBub3QgdG8gZml0IGludG8gdGhlIGVxdWF0aW9uXHJcbiAgICAgICAgICAgIC8vIGFkZCB0aGUgcGF0Y2ggdG8gdGhlIHNldFxyXG4gICAgICAgICAgICBpZiAobWF0Y2hpbmdNb21lbnRzLmxlbmd0aCA+IDFcclxuICAgICAgICAgICAgICAgICAgICAmJiBtYXRjaGluZ01vbWVudHMubGVuZ3RoID49IChlbGlnaWJsZU1vbWVudHMubGVuZ3RoIC8gNCkgKiAzXHJcbiAgICAgICAgICAgICAgICAgICAgJiYgbWF0Y2hpbmdNb21lbnRzLmxlbmd0aCA+IG1vbWVudHMubGVuZ3RoIC8gNCkge1xyXG4gICAgICAgICAgICAgICAgYXZnIC89IG1hdGNoaW5nTW9tZW50cy5sZW5ndGg7XHJcbiAgICAgICAgICAgICAgICBwYXRjaCA9IHtcclxuICAgICAgICAgICAgICAgICAgICBpbmRleDogcGF0Y2hQb3NbMV0gKiBfbnVtUGF0Y2hlcy54ICsgcGF0Y2hQb3NbMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgcG9zOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHg6IHgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHk6IHlcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGJveDogW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2ZWMyLmNsb25lKFt4LCB5XSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZlYzIuY2xvbmUoW3ggKyBfc3ViSW1hZ2VXcmFwcGVyLnNpemUueCwgeV0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB2ZWMyLmNsb25lKFt4ICsgX3N1YkltYWdlV3JhcHBlci5zaXplLngsIHkgKyBfc3ViSW1hZ2VXcmFwcGVyLnNpemUueV0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB2ZWMyLmNsb25lKFt4LCB5ICsgX3N1YkltYWdlV3JhcHBlci5zaXplLnldKVxyXG4gICAgICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgICAgICAgICAgbW9tZW50czogbWF0Y2hpbmdNb21lbnRzLFxyXG4gICAgICAgICAgICAgICAgICAgIHJhZDogYXZnLFxyXG4gICAgICAgICAgICAgICAgICAgIHZlYzogdmVjMi5jbG9uZShbTWF0aC5jb3MoYXZnKSwgTWF0aC5zaW4oYXZnKV0pXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgcGF0Y2hlc0ZvdW5kLnB1c2gocGF0Y2gpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIHBhdGNoZXNGb3VuZDtcclxufVxyXG5cclxuLyoqXHJcbiAqIGZpbmRzIHBhdGNoZXMgd2hpY2ggYXJlIGNvbm5lY3RlZCBhbmQgc2hhcmUgdGhlIHNhbWUgb3JpZW50YXRpb25cclxuICogQHBhcmFtIHtPYmplY3R9IHBhdGNoZXNGb3VuZFxyXG4gKi9cclxuZnVuY3Rpb24gcmFzdGVyaXplQW5ndWxhclNpbWlsYXJpdHkocGF0Y2hlc0ZvdW5kKSB7XHJcbiAgICB2YXIgbGFiZWwgPSAwLFxyXG4gICAgICAgIHRocmVzaG9sZCA9IDAuOTUsXHJcbiAgICAgICAgY3VycklkeCA9IDAsXHJcbiAgICAgICAgaixcclxuICAgICAgICBwYXRjaCxcclxuICAgICAgICBoc3YgPSBbMCwgMSwgMV0sXHJcbiAgICAgICAgcmdiID0gWzAsIDAsIDBdO1xyXG5cclxuICAgIGZ1bmN0aW9uIG5vdFlldFByb2Nlc3NlZCgpIHtcclxuICAgICAgICB2YXIgaTtcclxuICAgICAgICBmb3IgKCBpID0gMDsgaSA8IF9wYXRjaExhYmVsR3JpZC5kYXRhLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChfcGF0Y2hMYWJlbEdyaWQuZGF0YVtpXSA9PT0gMCAmJiBfcGF0Y2hHcmlkLmRhdGFbaV0gPT09IDEpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBfcGF0Y2hMYWJlbEdyaWQubGVuZ3RoO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHRyYWNlKGN1cnJlbnRJZHgpIHtcclxuICAgICAgICB2YXIgeCxcclxuICAgICAgICAgICAgeSxcclxuICAgICAgICAgICAgY3VycmVudFBhdGNoLFxyXG4gICAgICAgICAgICBpZHgsXHJcbiAgICAgICAgICAgIGRpcixcclxuICAgICAgICAgICAgY3VycmVudCA9IHtcclxuICAgICAgICAgICAgICAgIHg6IGN1cnJlbnRJZHggJSBfcGF0Y2hMYWJlbEdyaWQuc2l6ZS54LFxyXG4gICAgICAgICAgICAgICAgeTogKGN1cnJlbnRJZHggLyBfcGF0Y2hMYWJlbEdyaWQuc2l6ZS54KSB8IDBcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgc2ltaWxhcml0eTtcclxuXHJcbiAgICAgICAgaWYgKGN1cnJlbnRJZHggPCBfcGF0Y2hMYWJlbEdyaWQuZGF0YS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgY3VycmVudFBhdGNoID0gX2ltYWdlVG9QYXRjaEdyaWQuZGF0YVtjdXJyZW50SWR4XTtcclxuICAgICAgICAgICAgLy8gYXNzaWduIGxhYmVsXHJcbiAgICAgICAgICAgIF9wYXRjaExhYmVsR3JpZC5kYXRhW2N1cnJlbnRJZHhdID0gbGFiZWw7XHJcbiAgICAgICAgICAgIGZvciAoIGRpciA9IDA7IGRpciA8IFRyYWNlci5zZWFyY2hEaXJlY3Rpb25zLmxlbmd0aDsgZGlyKyspIHtcclxuICAgICAgICAgICAgICAgIHkgPSBjdXJyZW50LnkgKyBUcmFjZXIuc2VhcmNoRGlyZWN0aW9uc1tkaXJdWzBdO1xyXG4gICAgICAgICAgICAgICAgeCA9IGN1cnJlbnQueCArIFRyYWNlci5zZWFyY2hEaXJlY3Rpb25zW2Rpcl1bMV07XHJcbiAgICAgICAgICAgICAgICBpZHggPSB5ICogX3BhdGNoTGFiZWxHcmlkLnNpemUueCArIHg7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gY29udGludWUgaWYgcGF0Y2ggZW1wdHlcclxuICAgICAgICAgICAgICAgIGlmIChfcGF0Y2hHcmlkLmRhdGFbaWR4XSA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIF9wYXRjaExhYmVsR3JpZC5kYXRhW2lkeF0gPSBOdW1iZXIuTUFYX1ZBTFVFO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmIChfcGF0Y2hMYWJlbEdyaWQuZGF0YVtpZHhdID09PSAwKS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gICAgICAgIF9jb25maWcgPSBjb25maWc7XHJcbiAgICAgICAgX2lucHV0SW1hZ2VXcmFwcGVyID0gaW5wdXRJbWFnZVdyYXBwZXI7XHJcblxyXG4gICAgICAgIGluaXRCdWZmZXJzKCk7XHJcbiAgICAgICAgaW5pdENhbnZhcygpO1xyXG4gICAgfSxcclxuXHJcbiAgICBsb2NhdGU6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgIHZhciBwYXRjaGVzRm91bmQsXHJcbiAgICAgICAgICAgIHRvcExhYmVscyxcclxuICAgICAgICAgICAgYm94ZXM7XHJcblxyXG4gICAgICAgIGlmIChfY29uZmlnLmhhbGZTYW1wbGUpIHtcclxuICAgICAgICAgICAgaGFsZlNhbXBsZShfaW5wdXRJbWFnZVdyYXBwZXIsIF9jdXJyZW50SW1hZ2VXcmFwcGVyKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGJpbmFyaXplSW1hZ2UoKTtcclxuICAgICAgICBwYXRjaGVzRm91bmQgPSBmaW5kUGF0Y2hlcygpO1xyXG4gICAgICAgIC8vIHJldHVybiB1bmxlc3MgNSUgb3IgbW9yZSBwYXRjaGVzIGFyZSBmb3VuZFxyXG4gICAgICAgIGlmIChwYXRjaGVzRm91bmQubGVuZ3RoIDwgX251bVBhdGNoZXMueCAqIF9udW1QYXRjaGVzLnkgKiAwLjA1KSB7XHJcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gcmFzdGVycml6ZSBhcmVhIGJ5IGNvbXBhcmluZyBhbmd1bGFyIHNpbWlsYXJpdHk7XHJcbiAgICAgICAgdmFyIG1heExhYmVsID0gcmFzdGVyaXplQW5ndWxhclNpbWlsYXJpdHkocGF0Y2hlc0ZvdW5kKTtcclxuICAgICAgICBpZiAobWF4TGFiZWwgPCAxKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy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O1xyXG4gICAgICAgICAgICBpbnB1dFN0cmVhbS5zZXRDYW52YXNTaXplKHt4OiB3aWR0aCwgeTogaGVpZ2h0fSk7XHJcbiAgICAgICAgICAgIHdpZHRoID0gYXJlYS5zdztcclxuICAgICAgICAgICAgaGVpZ2h0ID0gYXJlYS5zaDtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHNpemUgPSB7XHJcbiAgICAgICAgICAgIHg6IE1hdGguZmxvb3Iod2lkdGggKiBoYWxmU2FtcGxlKSxcclxuICAgICAgICAgICAgeTogTWF0aC5mbG9vcihoZWlnaHQgKiBoYWxmU2FtcGxlKVxyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIHBhdGNoU2l6ZSA9IGNhbGN1bGF0ZVBhdGNoU2l6ZShjb25maWcucGF0Y2hTaXplLCBzaXplKTtcclxuICAgICAgICBpZiAoRU5WLmRldmVsb3BtZW50KSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiUGF0Y2gtU2l6ZTogXCIgKyBKU09OLnN0cmluZ2lmeShwYXRjaFNpemUpKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlucHV0U3RyZWFtLnNldFdpZHRoKE1hdGguZmxvb3IoTWF0aC5mbG9vcihzaXplLnggLyBwYXRjaFNpemUueCkgKiAoMSAvIGhhbGZTYW1wbGUpICogcGF0Y2hTaXplLngpKTtcclxuICAgICAgICBpbnB1dFN0cmVhbS5zZXRIZWlnaHQoTWF0aC5mbG9vcihNYXRoLmZsb29yKHNpemUueSAvIHBhdGNoU2l6ZS55KSAqICgxIC8gaGFsZlNhbXBsZSkgKiBwYXRjaFNpemUueSkpO1xyXG5cclxuICAgICAgICBpZiAoKGlucHV0U3RyZWFtLmdldFdpZHRoKCkgJSBwYXRjaFNpemUueCkgPT09IDAgJiYgKGlucHV0U3RyZWFtLmdldEhlaWdodCgpICUgcGF0Y2hTaXplLnkpID09PSAwKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVl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VI6IDJcclxuICAgIH0sXHJcbiAgICBESVI6IHtcclxuICAgICAgICBPVVRTSURFX0VER0U6IC0zMjc2NyxcclxuICAgICAgICBJTlNJREVfRURHRTogLTMyNzY2XHJcbiAgICB9LFxyXG4gICAgY3JlYXRlOiBmdW5jdGlvbihpbWFnZVdyYXBwZXIsIGxhYmVsV3JhcHBlcikge1xyXG4gICAgICAgIHZhciBpbWFnZURhdGEgPSBpbWFnZVdyYXBwZXIuZGF0YSxcclxuICAgICAgICAgICAgbGFiZWxEYXRhID0gbGFiZWxXcmFwcGVyLmRhdGEsXHJcbiAgICAgICAgICAgIHdpZHRoID0gaW1hZ2VXcmFwcGVyLnNpemUueCxcclxuICAgICAgICAgICAgaGVpZ2h0ID0gaW1hZ2VXcmFwcGVyLnNpemUueSxcclxuICAgICAgICAgICAgdHJhY2VyID0gVHJhY2VyLmNyZWF0ZShpbWFnZVdyYXBwZXIsIGxhYmVsV3JhcHBlcik7XHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIHJhc3Rlcml6ZTogZnVuY3Rpb24oZGVwdGhsYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgdmFyIGNvbG9yLFxyXG4gICAgICAgICAgICAgICAgICAgIGJjLFxyXG4gICAgICAgICAgICAgICAgICAgIGxjLFxyXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsaW5kZXgsXHJcbiAgICAgICAgICAgICAgICAgICAgY3gsXHJcbiAgICAgICAgICAgICAgICAgICAgY3ksXHJcbiAgICAgICAgICAgICAgICAgICAgY29sb3JNYXAgPSBbXSxcclxuICAgICAgICAgICAgICAgICAgICB2ZXJ0ZXgsXHJcbiAgICAgICAgICAgICAgICAgICAgcCxcclxuICAgICAgICAgICAgICAgICAgICBjYyxcclxuICAgICAgICAgICAgICAgICAgICBzYyxcclxuICAgICAgICAgICAgICAgICAgICBwb3MsXHJcbiAgICAgICAgICAgICAgICAgICAgY29ubmVjdGVkQ291bnQgPSAwLFxyXG4gICAgICAgICAgICAgICAgICAgIGk7XHJcblxyXG4gICAgICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCA0MDA7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yTWFwW2ldID0gMDtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBjb2xvck1hcFswXSA9IGltYWdlRGF0YVswXTtcclxuICAgICAgICAgICAgICAgIGNjID0gbnVsbDtcclxuICAgICAgICAgICAgICAgIGZvciAoIGN5ID0gMTsgY3kgPCBoZWlnaHQgLSAxOyBjeSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGFiZWxpbmRleCA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgYmMgPSBjb2xvck1hcFswXTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKCBjeCA9IDE7IGN4IDwgd2lkdGggLSAxOyBjeCsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvcyA9IGN5ICogd2lkdGggKyBjeDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxhYmVsRGF0YVtwb3NdID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvciA9IGltYWdlRGF0YVtwb3NdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbG9yICE9PSBiYykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYWJlbGluZGV4ID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxjID0gY29ubmVjdGVkQ291bnQgKyAxO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvck1hcFtsY10gPSBjb2xvcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmMgPSBjb2xvcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmVydGV4ID0gdHJhY2VyLmNvbnRvdXJUcmFjaW5nKGN5LCBjeCwgbGMsIGNvbG9yLCBSYXN0ZXJpemVyLkRJUi5PVVRTSURFX0VER0UpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodmVydGV4ICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25uZWN0ZWRDb3VudCsrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxpbmRleCA9IGxjO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IFJhc3Rlcml6ZXIuY3JlYXRlQ29udG91cjJEKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmRpciA9IFJhc3Rlcml6ZXIuQ09OVE9VUl9ESVIuQ1dfRElSO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5pbmRleCA9IGxhYmVsaW5kZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmZpcnN0VmVydGV4ID0gdmVydGV4O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5uZXh0cGVlciA9IGNjO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5pbnNpZGVDb250b3VycyA9IG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2MgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYy5wcmV2cGVlciA9IHA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYyA9IHA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ZXJ0ZXggPSB0cmFjZXJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jb250b3VyVHJhY2luZyhjeSwgY3gsIFJhc3Rlcml6ZXIuRElSLklOU0lERV9FREdFLCBjb2xvciwgbGFiZWxpbmRleCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2ZXJ0ZXggIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBSYXN0ZXJpemVyLmNyZWF0ZUNvbnRvdXIyRCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5maXJzdFZlcnRleCA9IHZlcnRleDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuaW5zaWRlQ29udG91cnMgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlcHRobGFiZWwgPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLmRpciA9IFJhc3Rlcml6ZXIuQ09OVE9VUl9ESVIuQ0NXX0RJUjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcC5kaXIgPSBSYXN0ZXJpemVyLkNPTlRPVVJfRElSLkNXX0RJUjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuaW5kZXggPSBkZXB0aGxhYmVsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2MgPSBjYztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgoc2MgIT09IG51bGwpICYmIHNjLmluZGV4ICE9PSBsYWJlbGluZGV4KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2MgPSBzYy5uZXh0cGVlcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzYyAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAubmV4dHBlZXIgPSBzYy5pbnNpZGVDb250b3VycztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2MuaW5zaWRlQ29udG91cnMgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2MuaW5zaWRlQ29udG91cnMucHJldnBlZXIgPSBwO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzYy5pbnNpZGVDb250b3VycyA9IHA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsRGF0YVtwb3NdID0gbGFiZWxpbmRleDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChsYWJlbERhdGFbcG9zXSA9PT0gUmFzdGVyaXplci5ESVIuT1VUU0lERV9FREdFXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgbGFiZWxEYXRhW3Bvc10gPT09IFJhc3Rlcml6ZXIuRElSLklOU0lERV9FREdFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbGluZGV4ID0gMDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYWJlbERhdGFbcG9zXSA9PT0gUmFzdGVyaXplci5ESVIuSU5TSURFX0VER0UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYyA9IGltYWdlRGF0YVtwb3NdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYyA9IGNvbG9yTWFwWzBdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxpbmRleCA9IGxhYmVsRGF0YVtwb3NdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmMgPSBjb2xvck1hcFtsYWJlbGluZGV4XTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHNjID0gY2M7XHJcbiAgICAgICAgICAgICAgICB3aGlsZSAoc2MgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICBzYy5pbmRleCA9IGRlcHRobGFiZWw7XHJcbiAgICAgICAgICAgICAgICAgICAgc2MgPSBzYy5uZXh0cGVlcjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgY2M6IGNjLFxyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50OiBjb25uZWN0ZWRDb3VudFxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZGVidWc6IHtcclxuICAgICAgICAgICAgICAgIGRyYXdDb250b3VyOiBmdW5jdGlvbihjYW52YXMsIGZpcnN0Q29udG91cikge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBjdHggPSBjYW52YXMuZ2V0Q29udGV4dChcIjJkXCIpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwcSA9IGZpcnN0Q29udG91cixcclxuICAgICAgICAgICAgICAgICAgICAgICAgaXEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHA7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGN0eC5zdHJva2VTdHlsZSA9IFwicmVkXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgY3R4LmZpbGxTdHlsZSA9IFwicmVkXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgY3R4LmxpbmVXaWR0aCA9IDE7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChwcSAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpcSA9IHBxLmluc2lkZUNvbnRvdXJzO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlxID0gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChwcSAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXEgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBpcTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlxID0gaXEubmV4dHBlZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gcHE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcSA9IHBxLm5leHRwZWVyO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBxICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXEgPSBwcS5pbnNpZGVDb250b3VycztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXEgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKHEuZGlyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgUmFzdGVyaXplci5DT05UT1VSX0RJUi5DV19ESVI6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdHguc3Ryb2tlU3R5bGUgPSBcInJlZFwiO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgUmFzdGVyaXplci5DT05UT1VSX0RJUi5DQ1dfRElSOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R4LnN0cm9rZVN0eWxlID0gXCJibHVlXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBSYXN0ZXJpemVyLkNPTlRPVVJfRElSLlVOS05PV05fRElSOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R4LnN0cm9rZVN0eWxlID0gXCJncmVlblwiO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBxLmZpcnN0VmVydGV4O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjdHguYmVnaW5QYXRoKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5tb3ZlVG8ocC54LCBwLnkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkbyB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID0gcC5uZXh0O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R4LmxpbmVUbyhwLngsIHAueSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKHAgIT09IHEuZmlyc3RWZXJ0ZXgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjdHguc3Ryb2tlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgIH1cclxufTtcclxuXHJcbmV4cG9ydCBkZWZhdWx0IFJhc3Rlcml6ZXI7XHJcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIC4vc3JjL2xvY2F0b3IvcmFzdGVyaXplci5qc1xuICoqLyIsIi8qIEBwcmVzZXJ2ZSBBU00gQkVHSU4gKi9cclxuLyogZXNsaW50LWRpc2FibGUgZXFlcWVxKi9cclxuZnVuY3Rpb24gU2tlbGV0b25pemVyKHN0ZGxpYiwgZm9yZWlnbiwgYnVmZmVyKSB7XHJcbiAgICBcInVzZSBhc21cIjtcclxuXHJcbiAgICB2YXIgaW1hZ2VzID0gbmV3IHN0ZGxpYi5VaW50OEFycmF5KGJ1ZmZlciksXHJcbiAgICAgICAgc2l6ZSA9IGZvcmVpZ24uc2l6ZSB8IDAsXHJcbiAgICAgICAgaW11bCA9IHN0ZGxpYi5NYXRoLmltdWw7XHJcblxyXG4gICAgZnVuY3Rpb24gZXJvZGUoaW5JbWFnZVB0ciwgb3V0SW1hZ2VQdHIpIHtcclxuICAgICAgICBpbkltYWdlUHRyID0gaW5JbWFnZVB0ciB8IDA7XHJcbiAgICAgICAgb3V0SW1hZ2VQdHIgPSBvdXRJbWFnZVB0ciB8IDA7XHJcblxyXG4gICAgICAgIHZhciB2ID0gMCxcclxuICAgICAgICAgICAgdSA9IDAsXHJcbiAgICAgICAgICAgIHN1bSA9IDAsXHJcbiAgICAgICAgICAgIHlTdGFydDEgPSAwLFxyXG4gICAgICAgICAgICB5U3RhcnQyID0gMCxcclxuICAgICAgICAgICAgeFN0YXJ0MSA9IDAsXHJcbiAgICAgICAgICAgIHhTdGFydDIgPSAwLFxyXG4gICAgICAgICAgICBvZmZzZXQgPSAwO1xyXG5cclxuICAgICAgICBmb3IgKCB2ID0gMTsgKHYgfCAwKSA8ICgoc2l6ZSAtIDEpIHwgMCk7IHYgPSAodiArIDEpIHwgMCkge1xyXG4gICAgICAgICAgICBvZmZzZXQgPSAob2Zmc2V0ICsgc2l6ZSkgfCAwO1xyXG4gICAgICAgICAgICBmb3IgKCB1ID0gMTsgKHUgfCAwKSA8ICgoc2l6ZSAtIDEpIHwgMCk7IHUgPSAodSArIDEpIHwgMCkge1xyXG4gICAgICAgICAgICAgICAgeVN0YXJ0MSA9IChvZmZzZXQgLSBzaXplKSB8IDA7XHJcbiAgICAgICAgICAgICAgICB5U3RhcnQyID0gKG9mZnNldCArIHNpemUpIHwgMDtcclxuICAgICAgICAgICAgICAgIHhTdGFydDEgPSAodSAtIDEpIHwgMDtcclxuICAgICAgICAgICAgICAgIHhTdGFydDIgPSAodSArIDEpIHwgMDtcclxuICAgICAgICAgICAgICAgIHN1bSA9ICgoaW1hZ2VzWyhpbkltYWdlUHRyICsgeVN0YXJ0MSArIHhTdGFydDEpIHwgMF0gfCAwKVxyXG4gICAgICAgICAgICAgICAgICAgICsgKGltYWdlc1soaW5JbWFnZVB0ciArIHlTdGFydDEgKyB4U3RhcnQyKSB8IDBdIHwgMClcclxuICAgICAgICAgICAgICAgICAgICArIChpbWFnZXNbKGluSW1hZ2VQdHIgKyBvZmZzZXQgKyB1KSB8IDBdIHwgMClcclxuICAgICAgICAgICAgICAgICAgICArIChpbWFnZXNbKGluSW1hZ2VQdHIgKyB5U3RhcnQyICsgeFN0YXJ0MSkgfCAwXSB8IDApXHJcbiAgICAgICAgICAgICAgICAgICAgKyAoaW1hZ2VzWyhpbkltYWdlUHRyICsgeVN0YXJ0MiArIHhTdGFydDIpIHwgMF0gfCAwKSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgaWYgKChzdW0gfCAwKSA9PSAoNSB8IDApKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaW1hZ2VzWyhvdXRJbWFnZVB0ciArIG9mZnNldCArIHUpIHwgMF0gPSAxO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBpbWFnZXNbKG91dEltYWdlUHRyICsgb2Zmc2V0ICsgdSkgfCAwXSA9IDA7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHN1YnRyYWN0KGFJbWFnZVB0ciwgYkltYWdlUHRyLCBvdXRJbWFnZVB0cikge1xyXG4gICAgICAgIGFJbWFnZVB0ciA9IGFJbWFnZVB0ciB8IDA7XHJcbiAgICAgICAgYkltYWdlUHRyID0gYkltYWdlUHRyIHwgMDtcclxuICAgICAgICBvdXRJbWFnZVB0ciA9IG91dEltYWdlUHRyIHwgMDtcclxuXHJcbiAgICAgICAgdmFyIGxlbmd0aCA9IDA7XHJcblxyXG4gICAgICAgIGxlbmd0aCA9IGltdWwoc2l6ZSwgc2l6ZSkgfCAwO1xyXG5cclxuICAgICAgICB3aGlsZSAoKGxlbmd0aCB8IDAp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diA9IDAsXHJcbiAgICAgICAgICAgIHUgPSAwLFxyXG4gICAgICAgICAgICBzdW0gPSAwLFxyXG4gICAgICAgICAgICB5U3RhcnQxID0gMCxcclxuICAgICAgICAgICAgeVN0YXJ0MiA9IDAsXHJcbiAgICAgICAgICAgIHhTdGFydDEgPSAwLFxyXG4gICAgICAgICAgICB4U3RhcnQyID0gMCxcclxuICAgICAgICAgICAgb2Zmc2V0ID0gMDtcclxuXHJcbiAgICAgICAgZm9yICggdiA9IDE7ICh2IHwgMCkgPCAoKHNpemUgLSAxKSB8IDApOyB2ID0gKHYgKyAxKSB8IDApIHtcclxuICAgICAgICAgICAgb2Zmc2V0ID0gKG9mZnNldCArIHNpemUpIHwgMDtcclxuICAgICAgICAgICAgZm9yICggdSA9IDE7ICh1IHwgMCkgPCAoKHNpemUgLSAxKSB8IDApOyB1ID0gKHUgKyAxKSB8IDApIHtcclxuICAgICAgICAgICAgICAgIHlTdGFydDEgPSAob2Zmc2V0IC0gc2l6ZSkgfCAwO1xyXG4gICAgICAgICAgICAgICAgeVN0YXJ0MiA9IChvZmZzZXQgKyBzaXplKSB8IDA7XHJcbiAgICAgICAgICAgICAgICB4U3RhcnQxID0gKHUgLSAxKSB8IDA7XHJcbiAgICAgICAgICAgICAgICB4U3RhcnQyID0gKHUgKyAxKSB8IDA7XHJcbiAgICAgICAgICAgICAgICBzdW0gPSAoKGltYWdlc1soaW5JbWFnZVB0ciArIHlTdGFydDEgKyB4U3RhcnQxKSB8IDBdIHwgMClcclxuICAgICAgICAgICAgICAgICAgICArIChpbWFnZXNbKGluSW1hZ2VQdHIgKyB5U3RhcnQxICsgeFN0YXJ0MikgfCAwXSB8IDApXHJcbiAgICAgICAgICAgICAgICAgICAgKyAoaW1hZ2VzWyhpbkltYWdlUHRyICsgb2Zmc2V0ICsgdSkgfCAwXSB8IDApXHJcbiAgICAgICAgICAgICAgICAgICAgKyAoaW1hZ2VzWyhpbkltYWdlUHRyICsgeVN0YXJ0MiArIHhTdGFydDEpIHwgMF0gfCAwKVxyXG4gICAgICAgICAgICAgICAgICAgICsgKGltYWdlc1soaW5JbWFnZVB0ciArIHlTdGFydDIgKyB4U3RhcnQyKSB8IDBdIHwgMCkpIHwgMDtcclxuICAgICAgICAgICAgICAgIGlmICgoc3VtIHwgMCkgPiAoMCB8IDApKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaW1hZ2VzWyhvdXRJbWFnZVB0ciArIG9mZnNldCArIHUpIHwgMF0gPSAxO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBpbWFnZXNbKG91dEltYWdlUHRyICsgb2Zmc2V0ICsgdSkgfCAwXSA9IDA7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIG1lbWNweShzcmNJbWFnZVB0ciwgZHN0SW1hZ2VQdHIpIHtcclxuICAgICAgICBzcmNJbWFnZVB0ciA9IHNyY0ltYWdlUHRyIHwgMDtcclxuICAgICAgICBkc3RJbWFnZVB0ciA9IGRzdEltYWdlUHRyIHwgMDtcclxuXHJcbiAgICAgICAgdmFyIGxlbmd0aCA9IDA7XHJcblxyXG4gICAgICAgIGxlbmd0aCA9IGltdWwoc2l6ZSwgc2l6ZSkgfCAwO1xyXG5cclxuICAgICAgICB3aGlsZSAoKGxlbmd0aCB8IDApID4gMCkge1xyXG4gICAgICAgICAgICBsZW5ndGggPSAobGVuZ3RoIC0gMSkgfCAwO1xyXG4gICAgICAgICAgICBpbWFnZXNbKGRzdEltYWdlUHRyICsgbGVuZ3RoKSB8IDBdID0gKGltYWdlc1soc3JjSW1hZ2VQdHIgKyBsZW5ndGgpIHwgMF0gfCAwKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gemVyb0JvcmRlcihpbWFnZVB0cikge1xyXG4gICAgICAgIGltYWdlUHRyID0gaW1hZ2VQdHIgfCAwO1xyXG5cclxuICAgICAgICB2YXIgeCA9IDAsXHJcbiAgICAgICAgICAgIHkgPSAwO1xyXG5cclxuICAgICAgICBmb3IgKCB4ID0gMDsgKHggfCAwKSA8ICgoc2l6ZSAtIDEpIHwgMCk7IHggPSAoeCArIDEpIHwgMCkge1xyXG4gICAgICAgICAgICBpbWFnZXNbKGltYWdlUHRyICsgeCkgfCAwXSA9IDA7XHJcbiAgICAgICAgICAgIGltYWdlc1soaW1hZ2VQdHIgKyB5KSB8IDBdID0gMDtcclxuICAgICAgICAgICAgeSA9ICgoeSArIHNpemUpIC0gMSkgfCAwO1xyXG4gICAgICAgICAgICBpbWFnZXNbKGltYWdlUHRyICsgeSkgfCAwXSA9IDA7XHJcbiAgICAgICAgICAgIHkgPSAoeSArIDEpIHwgMDtcclxuICAgICAgICB9XHJcbiAgICAgICAgZm9yICggeCA9IDA7ICh4IHwgMCkgPCAoc2l6ZSB8IDApOyB4ID0gKHggKyAxKSB8IDApIHtcclxuICAgICAgICAgICAgaW1hZ2VzWyhpbWFnZVB0ciArIHkpIHwgMF0gPSAwO1xyXG4gICAgICAgICAgICB5ID0gKHkgKyAxKSB8IDA7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHNrZWxldG9uaXplKCkge1xyXG4gICAgICAgIHZhciBzdWJJbWFnZVB0ciA9IDAsXHJcbiAgICAgICAgICAgIGVyb2RlZEltYWdlUHRyID0gMCxcclxuICAgICAgICAgICAgdGVtcEltYWdlUHRyID0gMCxcclxuICAgICAgICAgICAgc2tlbEltYWdlUHRyID0gMCxcclxuICAgICAgICAgICAgc3VtID0gMCxcclxuICAgICAgICAgICAgZG9uZSA9IDA7XHJcblxyXG4gICAgICAgIGVyb2RlZEltYWdlUHRyID0gaW11bChzaXplLCBzaXplKSB8IDA7XHJcbiAgICAgICAgdGVtcEltYWdlUHRyID0gKGVyb2RlZElt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QYXR0ZXJuID0gZnVuY3Rpb24ocmVzdWx0LCBzdGFydENvdW50ZXIpe1xyXG4gICAgdmFyIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIGNhdGVnb3JpemF0aW9uID0ge1xyXG4gICAgICAgICAgICBzcGFjZToge1xyXG4gICAgICAgICAgICAgICAgbmFycm93OiB7IHNpemU6IDAsIGNvdW50czogMCwgbWluOiAwLCBtYXg6IE51bWJlci5NQVhfVkFMVUV9LFxyXG4gICAgICAgICAgICAgICAgd2lkZToge3NpemU6IDAsIGNvdW50czogMCwgbWluOiAwLCBtYXg6IE51bWJlci5NQVhfVkFMVUV9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGJhcjoge1xyXG4gICAgICAgICAgICAgICAgbmFycm93OiB7IHNpemU6IDAsIGNvdW50czogMCwgbWluOiAwLCBtYXg6IE51bWJlci5NQVhfVkFMVUV9LFxyXG4gICAgICAgICAgICAgICAgd2lkZTogeyBzaXplOiAwLCBjb3VudHM6IDAsIG1pbjogMCwgbWF4OiBOdW1iZXIuTUFYX1ZBTFVFfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBraW5kLFxyXG4gICAgICAgIGNhdCxcclxuICAgICAgICBpLFxyXG4gICAgICAgIGosXHJcbiAgICAgICAgcG9zID0gc3RhcnRDb3VudGVyLFxyXG4gICAgICAgIHBhdHRlcm47XHJcblxyXG4gICAgZm9yIChpID0gMDsgaSA8IHJlc3VsdC5sZW5ndGg7IGkrKyl7XHJcbiAgICAgICAgcGF0dGVybiA9IHNlbGYuX2NoYXJUb1BhdHRlcm4ocmVzdWx0W2ldKTtcclxuICAgICAgICBmb3IgKGogPSA2OyBqID49IDA7IGotLSkge1xyXG4gICAgICAgICAgICBraW5kID0gKGogJiAxKSA9PT0gMiA/IGNhdGVnb3JpemF0aW9uLmJhciA6IGNhdGVnb3JpemF0aW9uLnNwYWNlO1xyXG4gICAgICAgICAgICBjYXQgPSAocGF0dGVybiAmIDEpID09PSAxID8ga2luZC53aWRlIDoga2luZC5uYXJyb3c7XHJcbiAgICAgICAgICAgIGNhdC5zaXplICs9IHNlbGYuX2NvdW50ZXJzW3BvcyArIGpdO1xyXG4gICAgICAgICAgICBjYXQuY291bnRzKys7XHJcbiAgICAgICAgICAgIHBhdHRlcm4gPj49IDE7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHBvcyArPSA4O1xyXG4gICAgfVxyXG5cclxuICAgIFtcInNwYWNlXCIsIFwiYmFyXCJdLmZvckVhY2goZnVuY3Rpb24oa2V5KSB7XHJcbiAgICAgICAgdmFyIG5ld2tpbmQgPSBjYXRlZ29yaXphdGlvbltrZXldO1xyXG4gICAgICAgIG5ld2tpbmQud2lkZS5taW4gPVxyXG4gICAgICAgICAgICBNYXRoLmZsb29yKChuZXdraW5kLm5hcnJvdy5zaXplIC8gbmV3a2luZC5uYXJyb3cuY291bnRzICsgbmV3a2luZC53aWRlLnNpemUgLyBuZXdraW5kLndpZGUuY291bnRzKSAvIDIpO1xyXG4gICAgICAgIG5ld2tpbmQubmFycm93Lm1heCA9IE1hdGguY2VpbChuZXdraW5kLndpZGUubWluKTtcclxuICAgICAgICBuZXdraW5kLndpZGUubWF4ID0gTWF0aC5jZWlsKChuZXdraW5kLndpZGUuc2l6ZSAqIHNlbGYuTUFYX0FDQ0VQVEFCTEUgKyBzZWxmLlBBRERJTkcpIC8gbmV3a2luZC53aWRlLmNvdW50cyk7XHJcbiAgICB9KTtcclxuXHJcbiAgICByZXR1cm4gY2F0ZWdvcml6YXRpb247XHJcbn07XHJcblxyXG5Db2RhYmFyUmVhZGVyLnByb3RvdHlwZS5fY2hhclRvUGF0dGVybiA9IGZ1bmN0aW9uKGNoYXIpIHtcclxuICAgIHZhciBzZWxmID0gdGhpcyxcclxuICAgICAgICBjaGFyQ29kZSA9IGNoYXIuY2hhckNvZGVBdCgwKSxcclxuICAgICAgICBpO1xyXG5cclxuICAgIGZvciAoaSA9IDA7IGkg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8IGNhdC5taW4gfHwgc2l6ZSA+IGNhdC5tYXgpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBwYXR0ZXJuID4+PSAxO1xyXG4gICAgICAgIH1cclxuICAgICAgICBwb3MgKz0gODtcclxuICAgIH1cclxuICAgIHJldHVybiB0cnVlO1xyXG59O1xyXG5cclxuQ29kYWJhclJlYWRlci5wcm90b3R5cGUuX3BhdHRlcm5Ub0NoYXIgPSBmdW5jdGlvbihwYXR0ZXJuKSB7XHJcbiAgICB2YXIgaSxcclxuICAgICAgICBzZWxmID0gdGhpcztcclxuXHJcbiAgICBmb3IgKGkgPSAwOyBpIDwgc2VsZi5DSEFSQUNURVJfRU5DT0RJTkdTLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgaWYgKHNlbGYuQ0hBUkFDVEVSX0VOQ09ESU5HU1tpXSA9PT0gcGF0dGVybikge1xyXG4gICAgICAgICAgICByZXR1cm4gU3RyaW5nLmZyb21DaGFyQ29kZShzZWxmLkFMUEhBQkVUW2ldKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gLTE7XHJcbn07XHJcblxyXG5Db2RhYmFyUmVhZGVyLnByb3RvdHlwZS5fY29tcHV0ZUFsdGVybmF0aW5nVGhyZXNob2xkID0gZnVuY3Rpb24ob2Zmc2V0LCBlbmQpIHtcclxuICAgIHZhciBpLFxyXG4gICAgICAgIG1pbiA9IE51bWJlci5NQVhfVkFMVUUsXHJcbiAgICAgICAgbWF4ID0gMCxcclxuICAgICAgICBjb3VudGVyO1xyXG5cclxuICAgIGZvciAoaSA9IG9mZnNldDsgaSA8IGVuZDsgaSArPSAyKXtcclxuICAgICAgICBjb3VudGVyID0gdGhpcy5fY291bnRlcnNbaV07XHJcbiAgICAgICAgaWYgKGNvdW50ZXIgPiBtYXgpIHtcclxuICAgICAgICAgICAgbWF4ID0gY291bnRlcjtcclxuICAgIC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FydCxcclxuICAgICAgICAgICAgZW5kOiBzdGFydFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29kZSxcclxuICAgICAgICBlcnJvcixcclxuICAgICAgICBub3JtYWxpemVkO1xyXG5cclxuICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKGNvdW50ZXJQb3MgPT09IGNvdW50ZXIubGVuZ3RoIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgbm9ybWFsaXplZCA9IHNlbGYuX25vcm1hbGl6ZShjb3VudGVyKTtcclxuICAgICAgICAgICAgICAgIGlmIChub3JtYWxpemVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb2RlID0gMDsgY29kZSA8IHNlbGYuQ09ERV9QQVRURVJOLmxlbmd0aDsgY29kZSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yID0gc2VsZi5fbWF0Y2hQYXR0ZXJuKG5vcm1hbGl6ZWQsIHNlbGYuQ09ERV9QQVRURVJOW2NvZGVdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yIDwgYmVzdE1hdGNoLmVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guY29kZSA9IGNvZGU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZXJyb3IgPSBlcnJvcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBiZXN0TWF0Y2guZW5kID0gaTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYmVzdE1hdGNoO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY291bnRlclBvcysrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNvdW50ZXJbY291bnRlclBvc10gPSAxO1xyXG4gICAgICAgICAgICBpc1doaXRlID0gIWlzV2hpdGU7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIG51bGw7XHJcbn07XHJcblxyXG5Db2RlMTI4UmVhZGVyLnByb3RvdHlwZS5fZmluZFN0YXJ0ID0gZnVuY3Rpb24oKSB7XHJcbiAgICB2YXIgY291bnRlciA9IFswLCAwLCAwLCAwLCAwLCAwXSxcclxuICAgICAgICBpLFxyXG4gICAgICAgIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIG9mZnNldCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93KSxcclxuICAgICAgICBpc1doaXRlID0gZmFsc2UsXHJcbiAgICAgICAgY291bnRlclBvcyA9IDAsXHJcbiAgICAgICAgYmVzdE1hdGNoID0ge1xyXG4gICAgICAgICAgICBlcnJvcjogTnVtYmVyLk1BWF9WQUxVRSxcclxuICAgICAgICAgICAgY29kZTogLTEsXHJcbiAgICAgICAgICAgIHN0YXJ0OiAwLFxyXG4gICAgICAgICAgICBlbmQ6IDBcclxuICAgICAgICB9LFxyXG4gICAgICAgIGNvZGUsXHJcbiAgICAgICAgZXJyb3IsXHJcbiAgICAgICAgaixcclxuICAgICAgICBzdW0sXHJcbiAgICAgICAgbm9ybWFsaXplZDtcclxuXHJcbiAgICBmb3IgKCBpID0gb2Zmc2V0OyBpIDwgc2VsZi5fcm93Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgaWYgKHNlbGYuX3Jvd1tpXSBeIGlzV2hpdGUpIHtcclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSsrO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChjb3VudGVyUG9zID09PSBjb3VudGVyLmxlbmd0aCAtIDEpIHtcclxuICAgICAgICAgICAgICAgIHN1bSA9IDA7XHJcbiAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IGNvdW50ZXIubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBzdW0gKz0gY291bnRlcltqXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIG5vcm1hbGl6ZWQgPSBzZWxmLl9ub3JtYWxpemUoY291bnRlcik7XHJcbiAgICAgICAgICAgICAgICBpZiAobm9ybWFsaXplZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAoY29kZSA9IHNlbGYuU1RBUlRfQ09ERV9BOyBjb2RlIDw9IHNlbGYuU1RBUlRfQ09ERV9DOyBjb2RlKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSBzZWxmLl9tYXRjaFBhdHRlcm4obm9ybWFsaXplZCwgc2VsZi5DT0RFX1BBVFRFUk5bY29kZV0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyb3IgPCBiZXN0TWF0Y2guZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5jb2RlID0gY29kZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lcnJvciA9IGVycm9yO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChiZXN0TWF0Y2guZXJyb3IgPCBzZWxmLkFWR19DT0RFX0VSUk9SKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5zdGFydCA9IGkgLSBzdW07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lbmQgPSBpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYmVzdE1hdGNoO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBmb3IgKCBqID0gMDsgaiA8IDQ7IGorKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbal0gPSBjb3VudGVyW2ogKyAyXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGNvdW50ZXJbNF0gPSAwO1xyXG4gICAgICAgICAgICAgICAgY291bnRlcls1XSA9IDA7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zLS07XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyUG9zKys7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY291bnRlcltjb3VudGVyUG9zXSA9IDE7XHJcbiAgICAgICAgICAgIGlzV2hpdGUgPSAhaXNXaGl0ZTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbnVsbDtcclxufTtcclxuXHJcbkNvZGUxMjhSZWFkZXIucHJvdG90eXBlLl9kZWNvZGUgPSBmdW5jdGlvbigpIHtcclxuICAgIHZhciBzZWxmID0gdGhpcyxcclxuICAgICAgICBzdGFydEluZm8gPSBzZWxmLl9maW5kU3RhcnQoKSxcclxuICAgICAgICBjb2RlID0gbnVsbCxcclxuICAgICAgICBkb25lID0gZmFsc2UsXHJcbiAgICAgICAgcmVzdWx0ID0gW10sXHJcbiAgICAgICAgbXVsdGlwbGllciA9IDAsXHJcbiAgICAgICAgY2hlY2tzdW0gPSAwLFxyXG4gICAgICAgIGNvZGVzZXQsXHJcbiAgICAgICAgcmF3UmVzdWx0ID0gW10sXHJcbiAgICAgICAgZGVjb2RlZENvZGVzID0gW10sXHJcbiAgICAgICAgc2hpZnROZXh0ID0gZmFsc2UsXHJcbiAgICAgICAgdW5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F9DT0RFKSB7XHJcbiAgICAgICAgICAgICAgICByZW1vdmVMYXN0Q2hhcmFjdGVyID0gdHJ1ZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKGNvZGUuY29kZSAhPT0gc2VsZi5TVE9QX0NPREUpIHtcclxuICAgICAgICAgICAgICAgIHJhd1Jlc3VsdC5wdXNoKGNvZGUuY29kZSk7XHJcbiAgICAgICAgICAgICAgICBtdWx0aXBsaWVyKys7XHJcbiAgICAgICAgICAgICAgICBjaGVja3N1bSArPSBtdWx0aXBsaWVyICogY29kZS5jb2RlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGRlY29kZWRDb2Rlcy5wdXNoKGNvZGUpO1xyXG5cclxuICAgICAgICAgICAgc3dpdGNoIChjb2Rlc2V0KSB7XHJcbiAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0E6XHJcbiAgICAgICAgICAgICAgICBpZiAoY29kZS5jb2RlIDwgNjQpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChTdHJpbmcuZnJvbUNoYXJDb2RlKDMyICsgY29kZS5jb2RlKSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNvZGUuY29kZSA8IDk2KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goU3RyaW5nLmZyb21DaGFyQ29kZShjb2RlLmNvZGUgLSA2NCkpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY29kZS5jb2RlICE9PSBzZWxmLlNUT1BfQ09ERSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZW1vdmVMYXN0Q2hhcmFjdGVyID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoY29kZS5jb2RlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfU0hJRlQ6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNoaWZ0TmV4dCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQjpcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZXNldCA9IHNlbGYuQ09ERV9CO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9DOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0M7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5TVE9QX0NPREU6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQjpcclxuICAgICAgICAgICAgICAgIGlmIChjb2RlLmNvZGUgPCA5Nikge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKFN0cmluZy5mcm9tQ2hhckNvZGUoMzIgKyBjb2RlLmNvZGUpKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvZGUuY29kZSAhPT0gc2VsZi5TVE9QX0NPREUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3ZlTGFzdENoYXJhY3RlciA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGNvZGUuY29kZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX1NISUZUOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzaGlmdE5leHQgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0E7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0E6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLkNPREVfQzpcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZXNldCA9IHNlbGYuQ09ERV9DO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuU1RPUF9DT0RFOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0M6XHJcbiAgICAgICAgICAgICAgICBpZiAoY29kZS5jb2RlIDwgMTAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goY29kZS5jb2RlIDwgMTAgPyBcIjBcIiArIGNvZGUuY29kZSA6IGNvZGUuY29kZSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb2RlLmNvZGUgIT09IHNlbGYuU1RPUF9DT0RFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZUxhc3RDaGFyYWN0ZXIgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChjb2RlLmNvZGUpIHtcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIHNlbGYuQ09ERV9BOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2Rlc2V0ID0gc2VsZi5DT0RFX0E7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ugc2VsZi5DT0RFX0I6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVzZXQgPSBzZWxmLkNPREVfQjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBzZWxmLlNUT1BfQ09ERTpcclxuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgZG9uZSA9IHRydWU7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmICh1bnNoaWZ0KSB7XHJcbiAgICAgICAgICAgIGNvZGVzZXQgPSBjb2Rlc2V0ID09PSBzZWxmLkNPREVfQSA/IHNlbGYuQ09ERV9CIDogc2VsZi5DT0RFX0E7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGlmIChjb2RlID09PSBudWxsKSB7XHJcbiAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICB9XHJcblxyXG4gICAgY29kZS5lbmQ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lcikge1xyXG4gICAgdmFyIGNvdW50ZXIgPSBbXSxcclxuICAgICAgICBzZWxmID0gdGhpcyxcclxuICAgICAgICBpLFxyXG4gICAgICAgIGNvdW50ZXJQb3MgPSAwLFxyXG4gICAgICAgIGJlc3RNYXRjaCA9IHtcclxuICAgICAgICAgICAgZXJyb3I6IE51bWJlci5NQVhfVkFMVUUsXHJcbiAgICAgICAgICAgIGNvZGU6IC0xLFxyXG4gICAgICAgICAgICBzdGFydDogMCxcclxuICAgICAgICAgICAgZW5kOiAwXHJcbiAgICAgICAgfSxcclxuICAgICAgICBlcnJvcixcclxuICAgICAgICBqLFxyXG4gICAgICAgIHN1bSxcclxuICAgICAgICBub3JtYWxpemVkLFxyXG4gICAgICAgIGVwc2lsb24gPSBzZWxmLkFWR19DT0RFX0VSUk9SO1xyXG5cclxuICAgIGlzV2hpdGUgPSBpc1doaXRlIHx8IGZhbHNlO1xyXG4gICAgdHJ5SGFyZGVyID0gdHJ5SGFyZGVyIHx8IGZhbHNlO1xyXG5cclxuICAgIGlmICghb2Zmc2V0KSB7XHJcbiAgICAgICAgb2Zmc2V0ID0gc2VsZi5fbmV4dFNldChzZWxmLl9yb3cpO1xyXG4gICAgfVxyXG5cclxuICAgIGZvciAoIGkgPSAwOyBpIDwgcGF0dGVybi5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIGNvdW50ZXJbaV0gPSAwO1xyXG4gICAgfVxyXG5cclxuICAgIGZvciAoIGkgPSBvZmZzZXQ7IGkgPCBzZWxmLl9yb3cubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBpZiAoc2VsZi5fcm93W2ldIF4gaXNXaGl0ZSkge1xyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdKys7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKGNvdW50ZXJQb3MgPT09IGNvdW50ZXIubGVuZ3RoIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgc3VtID0gMDtcclxuICAgICAgICAgICAgICAgIGZvciAoIGogPSAwOyBqIDwgY291bnRlci5sZW5ndGg7IGorKykge1xyXG4gICAgICAgICAgICAgICAgICAgIHN1bSArPSBjb3VudGVyW2pdO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbm9ybWFsaXplZCA9IHNlbGYuX25vcm1hbGl6ZShjb3VudGVyKTtcclxuICAgICAgICAgICAgICAgIGlmIChub3JtYWxpemVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSBzZWxmLl9tYXRjaFBhdHRlcm4obm9ybWFsaXplZCwgcGF0dGVybik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvciA8IGVwc2lsb24pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVycm9yID0gZXJyb3I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5zdGFydCA9IGkgLSBzdW07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJlc3RNYXRjaC5lbmQgPSBpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYmVzdE1hdGNoO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmICh0cnlIYXJkZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgY291bnRlci5sZW5ndGggLSAyOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY291bnRlcltqXSA9IGNvdW50ZXJbaiArIDJdO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBjb3VudGVyW2NvdW50ZXIubGVuZ3RoIC0gMl0gPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ZXJbY291bnRlci5sZW5ndGggLSAxXSA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgY291bnRlclBvcy0tO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNvdW50ZXJQb3MrKztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb3VudGVyW2NvdW50ZXJQb3NdID0gMTtcclxuICAgICAgICAgICAgaXNXaGl0ZSA9ICFpc1doaXRlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBudWxsO1xyXG59O1xyXG5cclxuSTJvZjVSZWFkZXIucHJvdG90eXBlLl9maW5kU3RhcnQgPSBmdW5jdGlvbigpIHtcclxuICAgIHZhciBzZWxmID0gdGhpcyxcclxuICAgICAgICBsZWFkaW5nV2hpdGVzcGFjZVN0YXJ0LFxyXG4gICAgICAgIG9mZnNldCA9IHNlbGYuX25leHRTZXQoc2VsZi5fcm93KSxcclxuICAgICAgICBzdGFydEluZm8sXHJcbiAgICAgICAgbmFycm93QmFyV2lkdGggPSAxO1xyXG5cclxuICAgIHdoaWxlICghc3RhcnRJbmZvKSB7XHJcbiAgICAgICAgc3RhcnRJbmZvID0gc2VsZi5fZmluZFBhdHRlcm4oc2VsZi5TVEFSVF9QQVRURVJOLCBvZmZzZXQsIGZhbHNlLCB0cnVlKTtcclxuICAgICAgICBpZiAoIXN0YXJ0SW5mbykge1xyXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICB9XHJcbiAgICAgICAgbmFycm93QmFyV2lkdGggPSBNYXRoLmZsb29yKChzdGFydEluZm8uZW5kIC0gc3RhcnRJbmZvLnN0YXJ0KSAvIDQpO1xyXG4gICAgICAgIGxlYWRpbmdXaGl0ZXNwYWNlU3RhcnQgPSBzdGFydEluZm8uc3RhcnQgLSBuYXJyb3dCYXJXaWR0aCAqIDEwO1xyXG4gICAgICAgIGlmIChsZWF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aW9uKGNvdW50ZXIpIHtcclxuICAgIHZhciBqLFxyXG4gICAgICAgIHNlbGYgPSB0aGlzLFxyXG4gICAgICAgIHN1bSA9IDAsXHJcbiAgICAgICAgbm9ybWFsaXplZCxcclxuICAgICAgICBlcnJvcixcclxuICAgICAgICBlcHNpbG9uID0gc2VsZi5BVkdfQ09ERV9FUlJPUixcclxuICAgICAgICBjb2RlLFxyXG4gICAgICAgIGJlc3RNYXRjaCA9IHtcclxuICAgICAgICAgICAgZXJyb3I6IE51bWJlci5NQVhfVkFMVUUsXHJcbiAgICAgICAgICAgIGNvZGU6IC0xLFxyXG4gICAgICAgICAgICBzdGFydDogMCxcclxuICAgICAgICAgICAgZW5kOiAwXHJcbiAgICAgICAgfTtcclxuXHJcbiAgICBmb3IgKCBqID0gMDsgaiA8IGNvdW50ZXIubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICBzdW0gKz0gY291bnRlcltqXTtcclxuICAgIH1cclxuICAgIG5vcm1hbGl6ZWQgPSBzZWxmLl9ub3JtYWxpemUoY291bnRlcik7XHJcbiAgICBpZiAobm9ybWFsaXplZCkge1xyXG4gICAgICAgIGZvciAoY29kZSA9IDA7IGNvZGUgPCBzZWxmLkNPREVfUEFUVEVSTi5sZW5ndGg7IGNvZGUrKykge1xyXG4gICAgICAgICAgICBlcnJvciA9IHNlbGYuX21hdGNoUGF0dGVybihub3JtYWxpemVkLCBzZWxmLkNPREVfUEFUVEVSTltjb2RlXSk7XHJcbiAgICAgICAgICAgIGlmIChlcnJvciA8IGJlc3RNYXRjaC5lcnJvcikge1xyXG4gICAgICAgICAgICAgICAgYmVzdE1hdGNoLmNvZGUgPSBjb2RlO1xyXG4gICAgICAgICAgICAgICAgYmVzdE1hdGNoLmVycm9yID0gZXJyb3I7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGJlc3RNYXRjaC5lcnJvciA8IGVwc2lsb24pIHtcclxuICAgICAgICAgICAgcmV0dXJuIGJlc3RNYXRjaDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbnVsbDtcclxufTtcclxuXHJcbkkyb2Y1UmVhZGVyLnByb3RvdHlwZS5fZGVjb2RlUGF5bG9hZCA9IGZ1bmN0aW9uKGNvdW50ZXJzLCByZXN1bHQsIGRlY29kZWRDb2Rlcykge1xyXG4gICAgdmFyIGksXHJcbiAgICAgICAgc2VsZiA9IHRoaXMsXHJcbiAgICAgICAgcG9zID0gMCxcclxuICAgICAgICBjb3VudGVyTGVuZ3RoID0gY291bnRlcnMubGVuZ3RoLFxyXG4gICAgICAgIGNvdW50ZXJQYWlyID0gW1swLCAwLCAwLCAwLCAwXSwgWzAsIDAsIDAsIDAsIDBdXSxcclxuICAgICAgICBjb2RlcztcclxuXHJcbiAgICB3aGlsZSAocG9zIDwgY291bnRlckxlbmd0aCkge1xyXG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCA1OyBpKyspIHtcclxuICAgICAgICAgICAgY291bnRlclBhaXJbMF1baV0gPSBjb3VudGVyc1twb3NdICogdGhpcy5iYXJTcGFjZVJhdGlvWzBdO1xyXG4gICAgICAgICAgICBjb3VudGVyUGFpclsxXVtpXSA9IGNvdW50ZXJzW3BvcyArIDFdICogdGhpcy5iYXJTcGFjZVJhdGlvWzFdO1xyXG4gICAgICAgICAgICBwb3MgKz0gMjtcclxuICAgICAgICB9XHJcbiAgICAgICAgY29kZXMgPSBzZWxmLl9kZWNvZGVQYWlyKGNvdW50ZXJQYWlyKTtcclxuICAgICAgICBpZiAoIWNvZGVzKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgIH1cclxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY29kZXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgcmVzdWx0LnB1c2goY29kZXNbaV0uY29kZSArIFwiXCIpO1xyXG4gICAgICAgICAgICBkZWNvZGVkQ29kZXMucHVzaChjb2Rlc1tpX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c3RyZWFtJywgdGhpcy5fb250cmFja3BvbHkpO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aGlzLmFkZEV2ZW50TGlzdGVuZXIoJ3RyYWNrJywgdGhpcy5fb250cmFjayA9IGYpO1xuICAgICAgICAgIHRoaXMuYWRkRXZlbnRMaXN0ZW5lcignYWRkc3RyZWFtJywgdGhpcy5fb250cmFja3BvbHkgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICAvLyBvbmFkZHN0cmVhbSBkb2VzIG5vdCBmaXJlIHdoZW4gYSB0cmFjayBpcyBhZGRlZCB0byBhbiBleGlzdGluZyBzdHJlYW0uXG4gICAgICAgICAgICAvLyBidXQgc3RyZWFtLm9uYWRkdHJhY2sgaXMgaW1wbGVtZW50ZWQgc28gd2UgdXNlIHRoYXRcbiAgICAgICAgICAgIGUuc3RyZWFtLmFkZEV2ZW50TGlzdGVuZXIoJ2FkZHRyYWNrJywgZnVuY3Rpb24odGUpIHtcbiAgICAgICAgICAgICAgdmFyIGV2ZW50ID0gbmV3IEV2ZW50KCd0cmFjaycpO1xuICAgICAgICAgICAgICBldmVudC50cmFjayA9IHRlLnRyYWNrO1xuICAgICAgICAgICAgICBldmVudC5yZWNlaXZlciA9IHt0cmFjazogdGUudHJhY2t9O1xuICAgICAgICAgICAgICBldmVudC5zdHJlYW1zID0gW2Uuc3RyZWFtXTtcbiAgICAgICAgICAgICAgc2VsZi5kaXNwYXRjaEV2ZW50KGV2ZW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgZS5zdHJlYW0uZ2V0VHJhY2tzKCkuZm9yRWFjaChmdW5jdGlvbih0cmFjaykge1xuICAgICAgICAgICAgICB2YXIgZXZlbnQgPSBuZXcgRXZlbnQoJ3RyYWNrJyk7XG4gICAgICAgICAgICAgIGV2ZW50LnRyYWNrID0gdHJhY2s7XG4gICAgICAgICAgICAgIGV2ZW50LnJlY2VpdmVyID0ge3RyYWNrOiB0cmFja307XG4gICAgICAgICAgICA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biAgICAgICAgICAgIGlmICghc3RyZWFtKSB7XG4gICAgICAgICAgICAgIHRoaXMuc3JjID0gJyc7XG4gICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuc3JjID0gVVJMLmNyZWF0ZU9iamVjdFVSTChzdHJlYW0pO1xuICAgICAgICAgICAgLy8gV2UgbmVlZCB0byByZWNyZWF0ZSB0aGUgYmxvYiB1cmwgd2hlbiBhIHRyYWNrIGlzIGFkZGVkIG9yIHJlbW92ZWQuXG4gICAgICAgICAgICAvLyBEb2luZyBpdCBtYW51YWxseSBzaW5jZSB3ZSB3YW50IHRvIGF2b2lkIGEgcmVjdXJzaW9uLlxuICAgICAgICAgICAgc3RyZWFtLmFkZEV2ZW50TGlzdGVuZXIoJ2FkZHRyYWNrJywgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgIGlmIChzZWxmLnNyYykge1xuICAgICAgICAgICAgICAgIFVSTC5yZXZva2VPYmplY3RVUkwoc2VsZi5zcmMpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHNlbGYuc3JjID0gVVJMLmNyZWF0ZU9iamVjdFVSTChzdHJlYW0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBzdHJlYW0uYWRkRXZlbnRMaXN0ZW5lcigncmVtb3ZldHJhY2snLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgaWYgKHNlbGYuc3JjKSB7XG4gICAgICAgICAgICAgICAgVVJMLnJldm9rZU9iamVjdFVSTChzZWxmLnNyYyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgc2VsZi5zcmMgPSBVUkwuY3JlYXRlT2JqZWN0VVJMKHN0cmVhbSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgIH1cbiAgfSxcblxuICBzaGltUGVlckNvbm5lY3Rpb246IGZ1bmN0aW9uKCkge1xuIC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hY2sgdGhlIG9yaWdpbmFsIGdldFN0YXRzIGZvcm1hdCB0byBhdm9pZCBicmVha2luZyBvbGQgdXNlcnMuXG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID4gMCAmJiB0eXBlb2Ygc2VsZWN0b3IgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICByZXR1cm4gb3JpZ0dldFN0YXRzKHNlbGVjdG9yLCBzdWNjZXNzQ2FsbGJhY2spO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGZpeENocm9tZVN0YXRzXyA9IGZ1bmN0aW9uKHJlc3BvbnNlKSB7XG4gICAgICAgICAgdmFyIHN0YW5kYXJkUmVwb3J0ID0ge307XG4gICAgICAgICAgdmFyIHJlcG9ydHMgPSByZXNwb25zZS5yZXN1bHQoKTtcbiAgICAgICAgICByZXBvcnRzLmZvckVhY2goZnVuY3Rpb24ocmVwb3J0KSB7XG4gICAgICAgICAgICB2YXIgc3RhbmRhcmRTdGF0cyA9IHtcbiAgICAgICAgICAgICAgaWQ6IHJlcG9ydC5pZCxcbiAgICAgICAgICAgICAgdGltZXN0YW1wOiByZXBvcnQudGltZXN0YW1wLFxuICAgICAgICAgICAgICB0eXBlOiByZXBvcnQudHlwZVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJlcG9ydC5uYW1lcygpLmZvckVhY2goZnVuY3Rpb24obmFtZSkge1xuICAgICAgICAgICAgICBzdGFuZGFyZFN0YXRzW25hbWVdID0gcmVwb3J0LnN0YXQobmFtZSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHN0YW5kYXJkUmVwb3J0W3N0YW5kYXJkU3RhdHMuaWRdID0gc3RhbmRhcmRTdGF0cztcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIHJldHVybiBzdGFuZGFyZFJlcG9ydDtcbiAgICAgICAgfTtcblxuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA+PSAyKSB7XG4gICAgICAgICAgdmFyIH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cmNlXG4gKiAgdHJlZS5cbiAqL1xuJ3VzZSBzdHJpY3QnO1xudmFyIGxvZ2dpbmcgPSByZXF1aXJlKCcuLi91dGlscy5qcycpLmxvZztcblxuLy8gRXhwb3NlIHB1YmxpYyBtZXRob2RzLlxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbigpIHtcbiAgdmFyIGNvbnN0cmFpbnRzVG9DaHJvbWVfID0gZnVuY3Rpb24oYykge1xuICAgIGlmICh0eXBlb2YgYyAhPT0gJ29iamVjdCcgfHwgYy5tYW5kYXRvcnkgfHwgYy5vcHRpb25hbCkge1xuICAgICAgcmV0dXJuIGM7XG4gICAgfVxuICAgIHZhciBjYyA9IHt9O1xuICAgIE9iamVjdC5rZXlzKGMpLmZvckVhY2goZnVuY3Rpb24oa2V5KSB7XG4gICAgICBpZiAoa2V5ID09PSAncmVxdWlyZScgfHwga2V5ID09PSAnYWR2YW5jZWQnIHx8IGtleSA9PT0gJ21lZGlhU291cmNlJykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gICAgICB2YXIgciA9ICh0eXBlb2YgY1trZXldID09PSAnb2JqZWN0JykgPyBjW2tleV0gOiB7aWRlYWw6IGNba2V5XX07XG4gICAgICBpZiAoci5leGFjdCAhPT0gdW5kZWZpbmVkICYmIHR5cGVvZiByLmV4YWN0ID09PSAnbnVtYmVyJykge1xuICAgICAgICByLm1pbiA9IHIubWF4ID0gci5leGFjdDtcbiAgICAgIH1cbiAgICAgIHZhciBvbGRuYW1lXyA9IGZ1bmN0aW9uKHByZWZpeCwgbmFtZSkge1xuICAgICAgICBpZiAocHJlZml4KSB7XG4gICAgICAgICAgcmV0dXJuIHByZWZpeCArIG5hbWUuY2hhckF0KDApLnRvVXBwZXJDYXNlKCkgKyBuYW1lLnNsaWNlKDEpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiAobmFtZSA9PT0gJ2RldmljZUlkJykgPyAnc291cmNlSWQnIDogbmFtZTtcbiAgICAgIH07XG4gICAgICBpZiAoci5pZGVhbCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGNjLm9wdGlvbmFsID0gY2Mub3B0aW9uYWwgfHwgW107XG4gICAgICAgIHZhciBvYyA9IHt9O1xuICAgICAgICBpZiAodHlwZW9mIHIuaWRlYWwgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgb2Nbb2xkbmFtZV8oJ21pbicsIGtleSldID0gci5pZGVhbDtcbiAgICAgICAgICBjYy5vcHRpb25hbC5wdXNoKG9jKTtcbiAgICAgICAgICBvYyA9IHt9O1xuICAgICAgICAgIG9jW29sZG5hbWVfKCdtYXgnLCBrZXkpXSA9IHIuaWRlYWw7XG4gICAgICAgICAgY2Mub3B0aW9uYWwucHVzaChvYyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgb2Nbb2xkbmFtZV8oJycsIGtleSldID0gci5pZGVhbDtcbiAgICAgICAgICBjYy5vcHRpb25hbC5wdXNoKG9jKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKHIuZXhhY3QgIT09IHVuZGVmaW5lZCAmJiB0eXBlb2Ygci5leGFjdCAhPT0gJ251bWJlcicpIHtcbiAgICAgICAgY2MubWFuZGF0b3J5ID0gY2MubWFuZGF0b3J5IHx8IHt9O1xuICAgICAgICBjYy5tYW5kYXRvcnlbb2xkbmFtZV8oJycsIGtleSldID0gci5leGFjdDtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIFsnbWluJywgJ21heCddLmZvckVhY2goZnVuY3Rpb24obWl4KSB7XG4gICAgICAgICAgaWYgKHJbbWl4XSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBjYy5tYW5kYXRvcnkgPSBjYy5tYW5kYXRvcnkgfHwge307XG4gICAgICAgICAgICBjYy5tYW5kYXRvcnlbb2xkbmFtZV8obWl4LCBrZXkpXSA9IHJbbWl4XTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgIH0pO1xu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HRpb25zLm9mZmVyVG9SZWNlaXZlVmlkZW87XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLmxvY2FsU3RyZWFtcy5sZW5ndGgpIHtcbiAgICAgICAgLy8gUHVzaCBsb2NhbCBzdHJlYW1zLlxuICAgICAgICB0aGlzLmxvY2FsU3RyZWFtc1swXS5nZXRUcmFja3MoKS5mb3JFYWNoKGZ1bmN0aW9uKHRyYWNrKSB7XG4gICAgICAgICAgdHJhY2tzLnB1c2goe1xuICAgICAgICAgICAga2luZDogdHJhY2sua2luZCxcbiAgICAgICAgICAgIHRyYWNrOiB0cmFjayxcbiAgICAgICAgICAgIHdhbnRSZWNlaXZlOiB0cmFjay5raW5kID09PSAnYXVkaW8nID9cbiAgICAgICAgICAgICAgICBudW1BdWRpb1RyYWNrcyA+IDAgOiBudW1WaWRlb1RyYWNrcyA+IDBcbiAgICAgICAgICB9KTtcbiAgICAgICAgICBpZiAodHJhY2sua2luZCA9PT0gJ2F1ZGlvJykge1xuICAgICAgICAgICAgbnVtQXVkaW9UcmFja3MtLTtcbiAgICAgICAgICB9IGVsc2UgaWYgKHRyYWNrLmtpbmQgPT09ICd2aWRlbycpIHtcbiAgICAgICAgICAgIG51bVZpZGVvVHJhY2tzLS07XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICAgIC8vIENyZWF0ZSBNLWxpbmVzIGZvciByZWN2b25seSBzdHJlYW1zLlxuICAgICAgd2hpbGUgKG51bUF1ZGlvVHJhY2tzID4gMCB8fCBudW1WaWRlb1RyYWNrcyA+IDApIHtcbiAgICAgICAgaWYgKG51bUF1ZGlvVHJhY2tzID4gMCkge1xuICAgICAgICAgIHRyYWNrcy5wdXNoKHtcbiAgICAgICAgICAgIGtpbmQ6ICdhdWRpbycsXG4gICAgICAgICAgICB3YW50UmVjZWl2ZTogdHJ1ZVxuICAgICAgICAgIH0pO1xuICAgICAgICAgIG51bUF1ZGlvVHJhY2tzLS07XG4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gICAgICAgICAgc2V0OiBmdW5jdGlvbihzdHJlYW0pIHtcbiAgICAgICAgICAgIHRoaXMubW96U3JjT2JqZWN0ID0gc3RyZWFtO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfVxuICB9LFxuXG4gIHNoaW1QZWVyQ29ubmVjdGlvbjogZnVuY3Rpb24oKSB7XG4gICAgLy8gVGhlIFJUQ1BlZXJDb25uZWN0aW9uIG9iamVjdC5cbiAgICBpZiAoIXdpbmRvdy5SVENQZWVyQ29ubmVjdGlvbikge1xuICAgICAgd2luZG93LlJUQ1BlZXJDb25uZWN0aW9uID0gZnVuY3Rpb24ocGNDb25maWcsIHBjQ29uc3RyYWludHMpIHtcbiAgICAgICAgaWYgKGJyb3dzZXJEZXRhaWxzLnZlcnNpb24gPCAzOCkge1xuICAgICAgICAgIC8vIC51cmxzIGlzIG5vdCBzdXBwb3J0ZWQgaW4gRkYgPCAzOC5cbiAgICAgICAgICAvLyBjcmVhdGUgUlRDSWNlU2VydmVycyB3aXRoIGEgc2luZ2xlIHVybC5cbiAgICAgICAgICBpZiAocGNDb25maWcgJiYgcGNDb25maWcuaWNlU2VydmVycykge1xuICAgICAgICAgICAgdmFyIG5ld0ljZVNlcnZlcnMgPSBbXTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcGNDb25maWcuaWNlU2VydmVycy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICB2YXIgc2VydmVyID0gcGNDb25maWcuaWNlU2VydmVyc1tpXTtcbiAgICAgICAgICAgICAgaWYgKHNlcnZlci5oYXNPd25Qcm9wZXJ0eSgndXJscycpKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBzZXJ2ZXIudXJscy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgICAgdmFyIG5ld1NlcnZlciA9IHtcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBzZXJ2ZXIudXJsc1tqXVxuICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgIGlmIChzZXJ2ZXIudXJsc1tqXS5pbmRleE9mKCd0dXJuJykgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgbmV3U2VydmVyLnVzZXJuYW1lID0gc2VydmVyLnVzZXJuYW1lO1xuICAgICAgICAgICAgICAgICAgICBuZXdTZXJ2ZXIuY3JlZGVudGlhbCA9IHNlcnZlci5jcmVkZW50aWFsO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgbmV3SWNlU2VydmVycy5wdXNoKG5ld1NlcnZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5ld0ljZVNlcnZlcnMucHVzaChwY0NvbmZpZy5pY2VTZXJ2ZXJzW2ldKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcGNDb25maWcuaWNlU2VydmVycyA9IG5ld0ljZVNlcnZlcnM7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZXcgbW96UlRDUGVlckNvbm5lY3Rpb24ocGNDb25maWcsIHBjQ29uc3RyYWludHMpOyAvLyBqc2NzOmlnbm9yZSByZXF1aXJlQ2FwaXRhbGl6ZWRDb25zdHJ1Y3RvcnNcbiAgICAgIH07XG4gICAgICB3aW5kb3cuUlRDUGVlckNvbm5lY3Rpb24ucHJvdG90eXBlID0gbW96UlRDUGVlckNvbm5lY3Rpb24ucHJvdG90eXBlO1xuXG4gICAgICAvLyB3cmFwIHN0YXRpYyBtZXRob2RzLiBDdXJyZW50bHkganVzdCBnZW5lcmF0ZUNlcnRpZmljYXRlLlxuICAgICAgaWYgKG1velJUQ1BlZXJDb25uZWN0aW9uLmdlbmVyYXRlQ2VydGlmaWNhdGUpIHtcbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHdpbmRvdy5SVENQZ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AgIGlmIChrZXkgPT09ICdyZXF1aXJlJyB8fCBrZXkgPT09ICdhZHZhbmNlZCcgfHwga2V5ID09PSAnbWVkaWFTb3VyY2UnKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciByID0gY1trZXldID0gKHR5cGVvZiBjW2tleV0gPT09ICdvYmplY3QnKSA/XG4gICAgICAgICAgICAgIGNba2V5XSA6IHtpZGVhbDogY1trZXldfTtcbiAgICAgICAgICBpZiAoci5taW4gIT09IHVuZGVmaW5lZCB8fFxuICAgICAgICAgICAgICByLm1heCAhPT0gdW5kZWZpbmVkIHx8IHIuZXhhY3QgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgcmVxdWlyZS5wdXNoKGtleSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyLmV4YWN0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2Ygci5leGFjdCA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgci4gbWluID0gci5tYXggPSByLmV4YWN0O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgY1trZXldID0gci5leGFjdDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRlbGV0ZSByLmV4YWN0O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoci5pZGVhbCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBjLmFkdmFuY2VkID0gYy5hZHZhbmNlZCB8fCBbXTtcbiAgICAgICAgICAgIHZhciBvYyA9IHt9O1xuICAgICAgICAgICAgaWYgKHR5cGVvZiByLmlkZWFsID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICBvY1trZXldID0ge21pbjogci5pZGVhbCwgbWF4OiByLmlkZWFsfTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIG9jW2tleV0gPSByLmlkZWFsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYy5hZHZhbmNlZC5wdXNoKG9jKTtcbiAgICAgICAgICAgIGRlbGV0ZSByLmlkZWFsO1xuICAgICAgICAgICAgaWYgKCFPYmplY3Qua2V5cyhyKS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgZGVsZXRlIGNba2V5XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBpZiAocmVxdWlyZS5sZW5ndGgpIHtcbiAgICAgICAgICBjLnJlcXVpcmUgPSByZXF1aXJlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjO1xuICAgICAgfTtcbiAgICAgIGlmIChicm93c2VyRGV0YWlscy52ZXJzaW9uIDwgMzgpIHtcbiAgICAgICAgbG9nZ2luZygnc3BlYzogJyArIEpTT04uc3RyaW5naWZ5KGNvbnN0cmFpbnRzKSk7XG4gICAgICAgIGlmIChjb25zdHJhaW50cy5hdWRpbykge1xuICAgICAgICAgIGNvbnN0cmFpbnRzLmF1ZGlvID0gY29uc3RyYWludHNUb0ZGMzdfKGNvbnN0cmFpbnRzLmF1ZGlvKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoY29uc3RyYWludHMudmlkZW8pIHtcbiAgICAgICAgICBjb25zdHJhaW50cy52aWRlbyA9IGNvbnN0cmFpbnRzVG9GRjM3Xyhjb25zdHJhaW50cy52aWRlbyk7XG4gICAgICAgIH1cbiAgICAgICAgbG9nZ2luZygnZmYzNzogJyArIEpTT04uc3RyaW5naWZ5KGNvbnN0cmFpbnRzKSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gbmF2aWdhdG9yLm1vekdldFVzZXJNZWRpYShjb25zdHJhaW50cywgb25TdWNjZXNzLCBvbkVycm9yKTtcbiAgICB9O1xuXG4gICAgbmF2aWdhdG9yLmdldFVzZXJNZWRpYSA9IGdldFVzZXJNZWRpYV87XG5cbiAgICAvLyBSZXR1cm5zIHRoZSByZXN1bHQgb2YgZ2V0VXNlck1lZGl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ICAgICAgIGlmICh0eXBlb2Ygci5leGFjdCA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgIHIuIG1pbiA9IHIubWF4ID0gci5leGFjdDtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY1trZXldID0gci5leGFjdDtcbiAgICAgICAgICB9XG4gICAgICAgICAgZGVsZXRlIHIuZXhhY3Q7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHIuaWRlYWwgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIGMuYWR2YW5jZWQgPSBjLmFkdmFuY2VkIHx8IFtdO1xuICAgICAgICAgIHZhciBvYyA9IHt9O1xuICAgICAgICAgIGlmICh0eXBlb2Ygci5pZGVhbCA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgIG9jW2tleV0gPSB7bWluOiByLmlkZWFsLCBtYXg6IHIuaWRlYWx9O1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBvY1trZXldID0gci5pZGVhbDtcbiAgICAgICAgICB9XG4gICAgICAgICAgYy5hZHZhbmNlZC5wdXNoKG9jKTtcbiAgICAgICAgICBkZWxldGUgci5pZGVhbDtcbiAgICAgICAgICBpZiAoIU9iamVjdC5rZXlzKHIpLmxlbmd0aCkge1xuICAgICAgICAgICAgZGVsZXRlIGNba2V5XTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlcXVpcmUubGVuZ3RoKSB7XG4gICAgICAgIGMucmVxdWlyZSA9IHJlcXVpcmU7XG4gICAgICB9XG4gICAgICByZXR1cm4gYztcbiAgICB9O1xuICAgIGlmIChicm93c2VyRGV0YWlscy52ZXJzaW9uIDwgMzgpIHtcbiAgICAgIGxvZ2dpbmcoJ3NwZWM6ICcgKyBKU09OLnN0cmluZ2lmeShjb25zdHJhaW50cykpO1xuICAgICAgaWYgKGNvbnN0cmFpbnRzLmF1ZGlvKSB7XG4gICAgICAgIGNvbnN0cmFpbnRz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