Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@datagrok-libraries/utils

Package Overview
Dependencies
Maintainers
2
Versions
233
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datagrok-libraries/utils - npm Package Compare versions

Comparing version 4.1.18 to 4.1.19

2

package.json

@@ -11,3 +11,3 @@ {

"fullName": "Utils",
"version": "4.1.18",
"version": "4.1.19",
"description": "Common utilities",

@@ -14,0 +14,0 @@ "dependencies": {

import * as DG from 'datagrok-api/dg';
import { Subject } from 'rxjs';
export declare enum LineDirection {
lower = "lower",
higher = "higher"
}
export type ILineOpts = {
id: number;
import BitArray from './bit-array';
type MarkerSize = {
sizeFrom: number;
sizeTo: number;
};
export type ILineSeries = {
from: Uint32Array;
to: Uint32Array;
color?: string;
directionCol?: string;
direction?: LineDirection;
colors?: string[];
width?: number;
widths?: Float32Array;
opacity?: number;
width?: number;
opacities?: Float32Array;
drawArrows?: boolean;
drawArrowsArr?: BitArray;
};
export type IConnectedPoints = {
[key: number]: ILineOpts[];
};
export type ILines = {
[key: number]: IConnectedPoints;
};
export declare class ScatterPlotLinesRenderer {
sp: DG.ScatterPlotViewer;
xAxis: string;
yAxis: string;
xAxisCol: DG.Column;
yAxisCol: DG.Column;
currentLineIdx: number;
lines: ILines;
lines: ILineSeries;
lineClicked: Subject<number>;
lineHover: Subject<number>;
canvas: any;
paths: {
[key: number]: Path2D;
};
canvas: HTMLCanvasElement;
ctx: CanvasRenderingContext2D;
mouseOverLineId: number | null;
multipleLinesCounts: Uint8Array;
get currentLineId(): number;
set currentLineId(id: number);
constructor(sp: DG.ScatterPlotViewer, xAxis: string, yAxis: string, lines: ILines);
set linesToRender(lines: ILineSeries);
constructor(sp: DG.ScatterPlotViewer, xAxis: string, yAxis: string, lines: ILineSeries);
updateLines(lines: ILineSeries): void;
renderLines(): void;
checkCursorOnLine(x: number, y: number): number | null;
midPointBtw(p1: DG.Point, p2: DG.Point): DG.Point;
findPerpendicularPointOnCurve(idx: number, x1: number, y1: number, x2: number, y2: number): DG.Point;
canvasArrow(path: Path2D, arrowEndX: number, arrowEndY: number, quadX: number, quadY: number): void;
getArrowPoint(lineOpts: ILineOpts, p1: number, p2: number, pointFrom: DG.Point, pointTo: DG.Point): DG.Point | null;
getMarkersSizes(spLook: any, markerSizeCol: DG.Column | null, i: number): MarkerSize;
fillLeftBottomRect(): void;
createMultiLinesIndices(): void;
checkCoordsOnLine(x: number, y: number): number | null;
calculateDistToStraightLine(x: number, y: number, p1: DG.Point, p2: DG.Point): number | null;
calculateDistToCurveLine(i: number, x: number, y: number, p1: DG.Point, p2: DG.Point, pc: DG.Point): number | null;
calculateDistToCurveInRect(x: number, y: number, p0: DG.Point, p1: DG.Point, p2: DG.Point, w: number, h: number): number;
getPointOnDistance(p1x: number, p1y: number, p2x: number, p2y: number, distance: number): DG.Point;
findControlPoint(idx: number, x1: number, y1: number, x2: number, y2: number, i?: number): DG.Point;
canvasArrow(path: CanvasRenderingContext2D, arrowEndX: number, arrowEndY: number, quadX: number, quadY: number): void;
}
export {};
//# sourceMappingURL=render-lines-on-sp.d.ts.map
import * as DG from 'datagrok-api/dg';
import { Subject } from 'rxjs';
export var LineDirection;
(function (LineDirection) {
LineDirection["lower"] = "lower";
LineDirection["higher"] = "higher";
})(LineDirection || (LineDirection = {}));
import BitArray from './bit-array';
export class ScatterPlotLinesRenderer {

@@ -14,4 +10,8 @@ get currentLineId() {

this.currentLineIdx = id;
this.sp.render(this.canvas.getContext('2d'));
this.sp.render(this.ctx);
}
set linesToRender(lines) {
this.updateLines(lines);
this.sp.render(this.ctx);
}
constructor(sp, xAxis, yAxis, lines) {

@@ -21,18 +21,18 @@ this.currentLineIdx = -1;

this.lineHover = new Subject();
this.paths = {};
this.mouseOverLineId = null;
this.sp = sp;
this.xAxis = xAxis;
this.yAxis = yAxis;
this.lines = lines;
this.xAxisCol = this.sp.dataFrame.columns.byName(xAxis);
this.yAxisCol = this.sp.dataFrame.columns.byName(yAxis);
this.canvas = this.sp.getInfo()['canvas'];
this.canvas.addEventListener('mousedown', (event) => {
this.ctx = this.canvas.getContext('2d');
this.updateLines(lines);
this.canvas.onmousedown = () => {
if (this.mouseOverLineId !== null)
this.lineClicked.next(this.mouseOverLineId);
});
this.canvas.addEventListener('mousemove', (event) => {
this.mouseOverLineId = this.checkCursorOnLine(event.offsetX, event.offsetY);
};
this.canvas.onmousemove = (event) => {
this.mouseOverLineId = this.checkCoordsOnLine(event.offsetX, event.offsetY);
if (this.mouseOverLineId !== null)
this.lineHover.next(this.mouseOverLineId);
});
};
sp.onEvent('d4-before-draw-scene')

@@ -43,71 +43,223 @@ .subscribe((_) => {

}
updateLines(lines) {
this.lines = lines;
this.multipleLinesCounts = new Uint8Array(this.lines.from.length);
this.createMultiLinesIndices();
}
renderLines() {
var _a, _b;
const ctx = this.canvas.getContext('2d');
const x = this.sp.dataFrame.columns.byName(this.xAxis);
const y = this.sp.dataFrame.columns.byName(this.yAxis);
for (let p1 of Object.keys(this.lines).map(Number)) {
if (this.sp.dataFrame.filter.get(p1)) {
const pointFrom = this.sp.worldToScreen(x.get(p1), y.get(p1));
const aX = pointFrom === null || pointFrom === void 0 ? void 0 : pointFrom.x;
const aY = pointFrom === null || pointFrom === void 0 ? void 0 : pointFrom.y;
for (let p2 of Object.keys(this.lines[p1]).map(Number)) {
if (this.sp.dataFrame.filter.get(p2)) {
const pointTo = this.sp.worldToScreen(x.get(p2), y.get(p2));
const bX = pointTo === null || pointTo === void 0 ? void 0 : pointTo.x;
const bY = pointTo === null || pointTo === void 0 ? void 0 : pointTo.y;
if (aX && aY && bX && bY) {
for (let lineIdx = 0; lineIdx < this.lines[p1][p2].length; lineIdx++) {
const lineOpts = this.lines[p1][p2][lineIdx];
const line = new Path2D();
this.paths[lineOpts.id] = line;
line.moveTo(aX, aY);
const color = (_a = lineOpts.color) !== null && _a !== void 0 ? _a : '0,128,0';
const opacity = (_b = lineOpts.opacity) !== null && _b !== void 0 ? _b : 1;
ctx.strokeStyle = `rgba(${color},${opacity})`;
ctx.lineWidth = lineOpts.width ? lineOpts.id === this.currentLineIdx ? lineOpts.width + 2 : lineOpts.width :
lineOpts.id === this.currentLineIdx ? 3 : 1;
let midPoint = this.midPointBtw(pointFrom, pointTo);
if (lineIdx > 0 || this.lines[p1][p2].length > 1) {
midPoint = this.findPerpendicularPointOnCurve(lineIdx, pointFrom.x, pointFrom.y, midPoint.x, midPoint.y);
}
line.quadraticCurveTo(midPoint.x, midPoint.y, bX, bY);
if (lineOpts.directionCol) {
const arrowPoint = this.getArrowPoint(lineOpts, p1, p2, pointFrom, pointTo);
if (arrowPoint)
this.canvasArrow(line, arrowPoint.x, arrowPoint.y, midPoint.x, midPoint.y);
}
ctx.beginPath();
ctx.stroke(line);
ctx.closePath();
}
}
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
const spLook = this.sp.getOptions().look;
const individualLineStyles = this.lines.colors || this.lines.width || this.lines.opacities || this.lines.drawArrowsArr;
if (!individualLineStyles) {
this.ctx.lineWidth = (_a = this.lines.width) !== null && _a !== void 0 ? _a : 1;
this.ctx.strokeStyle = `rgba(${(_b = this.lines.color) !== null && _b !== void 0 ? _b : '0,128,0'},${(_c = this.lines.opacity) !== null && _c !== void 0 ? _c : 1})`;
}
const markerSizeCol = spLook['sizeColumnName'] ? this.sp.dataFrame.col(spLook['sizeColumnName']) : null;
const filter = this.sp.dataFrame.filter;
for (let i = 0; i < this.lines.from.length; i++) {
if (filter.get(this.lines.from[i]) && filter.get(this.lines.to[i])) {
const { sizeFrom, sizeTo } = this.getMarkersSizes(spLook, markerSizeCol, i);
const pointFrom = this.sp.worldToScreen(this.xAxisCol.get(this.lines.from[i]), this.yAxisCol.get(this.lines.from[i]));
let aX = pointFrom === null || pointFrom === void 0 ? void 0 : pointFrom.x;
let aY = pointFrom === null || pointFrom === void 0 ? void 0 : pointFrom.y;
const pointTo = this.sp.worldToScreen(this.xAxisCol.get(this.lines.to[i]), this.yAxisCol.get(this.lines.to[i]));
let bX = pointTo === null || pointTo === void 0 ? void 0 : pointTo.x;
let bY = pointTo === null || pointTo === void 0 ? void 0 : pointTo.y;
this.ctx.beginPath();
if (aX && aY && bX && bY) {
if (individualLineStyles) {
const color = ((_d = this.lines.colors) === null || _d === void 0 ? void 0 : _d[i]) ? (_e = this.lines.colors) === null || _e === void 0 ? void 0 : _e[i] : '0,128,0';
const opacity = ((_f = this.lines.opacities) === null || _f === void 0 ? void 0 : _f[i]) ? (_g = this.lines.opacities) === null || _g === void 0 ? void 0 : _g[i] : 1;
this.ctx.strokeStyle = `rgba(${color},${opacity})`;
this.ctx.lineWidth = ((_h = this.lines.widths) === null || _h === void 0 ? void 0 : _h[i]) ? (_j = this.lines.widths) === null || _j === void 0 ? void 0 : _j[i] : 1;
}
const multiLines = this.multipleLinesCounts[i];
let controlPoint = null;
if (multiLines) {
const startPointWithMarker = this.getPointOnDistance(aX, aY, bX, bY, sizeTo);
const endtPointWithMarker = this.getPointOnDistance(bX, bY, aX, aY, sizeFrom);
aX = startPointWithMarker.x;
aY = startPointWithMarker.y;
bX = endtPointWithMarker.x;
bY = endtPointWithMarker.y;
controlPoint = this.lines.from[i] > this.lines.to[i] ?
this.findControlPoint(multiLines, aX, aY, bX, bY, i) :
this.findControlPoint(multiLines, bX, bY, aX, aY, i);
this.ctx.moveTo(aX, aY);
this.ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, bX, bY);
}
else {
this.ctx.moveTo(aX, aY);
this.ctx.lineTo(bX, bY);
}
if ((_k = this.lines.drawArrows) !== null && _k !== void 0 ? _k : (_l = this.lines.drawArrowsArr) === null || _l === void 0 ? void 0 : _l.getBit(i)) {
const arrowPoint = !multiLines ? this.getPointOnDistance(aX, aY, bX, bY, sizeTo) : null;
const arrowCPX = multiLines ? controlPoint.x : aX;
const arrowCPY = multiLines ? controlPoint.y : aY;
this.canvasArrow(this.ctx, (_m = arrowPoint === null || arrowPoint === void 0 ? void 0 : arrowPoint.x) !== null && _m !== void 0 ? _m : bX, (_o = arrowPoint === null || arrowPoint === void 0 ? void 0 : arrowPoint.y) !== null && _o !== void 0 ? _o : bY, arrowCPX, arrowCPY);
}
this.ctx.stroke();
this.ctx.closePath();
}
}
}
this.fillLeftBottomRect();
}
checkCursorOnLine(x, y) {
const ctx = this.canvas.getContext('2d');
for (let id of Object.keys(this.paths).map(Number)) {
ctx.lineWidth = 5;
const inStroke = ctx.isPointInStroke(this.paths[id], x * window.devicePixelRatio, y * window.devicePixelRatio);
if (inStroke)
return id;
getMarkersSizes(spLook, markerSizeCol, i) {
let sizeFrom = 3;
let sizeTo = 3;
if (markerSizeCol) {
sizeFrom = (spLook.markerMinSize + (spLook.markerMaxSize - spLook.markerMinSize) * markerSizeCol.scale(this.lines.from[i])) / 2;
sizeTo = (spLook.markerMinSize + (spLook.markerMaxSize - spLook.markerMinSize) * markerSizeCol.scale(this.lines.to[i])) / 2;
}
else if (spLook.markerDefaultSize) {
sizeFrom = spLook.markerDefaultSize / 2;
sizeTo = spLook.markerDefaultSize / 2;
}
return { sizeFrom, sizeTo };
}
fillLeftBottomRect() {
const rect = new Path2D();
rect.rect(this.sp.yAxisBox.minX, this.sp.yAxisBox.maxY, this.sp.yAxisBox.width, this.sp.xAxisBox.height);
this.ctx.fillStyle = `white`;
this.ctx.beginPath();
this.ctx.fill(rect);
this.ctx.closePath();
}
createMultiLinesIndices() {
const arrayIdxsBitArray = new BitArray(this.lines.from.length);
arrayIdxsBitArray.setAll(true);
for (let i = -1; (i = arrayIdxsBitArray.findNext(i)) !== -1;) {
let firstLineIdx = i;
let p1 = this.lines.from[firstLineIdx];
let p2 = this.lines.to[firstLineIdx];
let linesPerPair = 1;
for (let j = i; (j = arrayIdxsBitArray.findNext(j)) !== -1;) {
const pointToCompare1 = this.lines.from[j];
const pointToCompare2 = this.lines.to[j];
if (pointToCompare1 === p1 && pointToCompare2 === p2 ||
pointToCompare2 === p1 && pointToCompare1 === p2) {
this.multipleLinesCounts[j] = ++linesPerPair;
arrayIdxsBitArray.setBit(j, false, false);
}
}
if (linesPerPair > 1)
this.multipleLinesCounts[firstLineIdx] = 1;
arrayIdxsBitArray.setBit(i, false, false);
}
}
checkCoordsOnLine(x, y) {
let candidateIdx = null;
let minDist = null;
let dist = null;
const spLook = this.sp.getOptions().look;
const markerSizeCol = spLook['sizeColumnName'] ? this.sp.dataFrame.col(spLook['sizeColumnName']) : null;
const filter = this.sp.dataFrame.filter;
for (let i = 0; i < this.lines.from.length; i++) {
if (filter.get(this.lines.from[i]) && filter.get(this.lines.to[i])) {
const { sizeFrom, sizeTo } = this.getMarkersSizes(spLook, markerSizeCol, i);
const pFrom = this.sp.worldToScreen(this.xAxisCol.get(this.lines.from[i]), this.yAxisCol.get(this.lines.from[i]));
const pTo = this.sp.worldToScreen(this.xAxisCol.get(this.lines.to[i]), this.yAxisCol.get(this.lines.to[i]));
if (this.multipleLinesCounts[i]) {
const fromMarker = this.getPointOnDistance(pFrom.x, pFrom.y, pTo.x, pTo.y, sizeTo);
const toMarker = this.getPointOnDistance(pTo.x, pTo.y, pFrom === null || pFrom === void 0 ? void 0 : pFrom.x, pFrom === null || pFrom === void 0 ? void 0 : pFrom.y, sizeFrom);
const controlPoint = this.lines.from[i] > this.lines.to[i] ?
this.findControlPoint(this.multipleLinesCounts[i], fromMarker.x, fromMarker.y, toMarker.x, toMarker.y, i) :
this.findControlPoint(this.multipleLinesCounts[i], toMarker.x, toMarker.y, fromMarker.x, fromMarker.y, i);
dist = this.calculateDistToCurveLine(i, x, y, fromMarker, toMarker, controlPoint);
}
else {
dist = this.calculateDistToStraightLine(x, y, pFrom, pTo);
}
if ((!minDist && dist !== null && dist < 5) || minDist && dist !== null && dist < minDist) {
minDist = dist;
candidateIdx = i;
}
}
}
return candidateIdx;
}
calculateDistToStraightLine(x, y, p1, p2) {
/* calculating coordinates of a rect around a line. If cursor coords are outside this rect - assume that
point is not on line and do not calculate distance to line */
let xMin = Math.min(p1.x, p2.x);
let xMax = Math.max(p1.x, p2.x);
let yMin = Math.min(p1.y, p2.y);
let yMax = Math.max(p1.y, p2.y);
//adding a couple of pixels to increase the width/height of the rect
const threshold = 2;
return x >= xMin - threshold && x <= xMax + threshold && y >= yMin - threshold && y <= yMax + threshold ?
Math.abs(Math.hypot(p1.x - x, p1.y - y) + Math.hypot(p2.x - x, p2.y - y) - Math.hypot(p1.x - p2.x, p1.y - p2.y)) :
null;
}
calculateDistToCurveLine(i, x, y, p1, p2, pc) {
/* calculating coordinates of a rect around a line. If cursor coords are outside this shape - assume that
point is not on line and do not calculate distance to line */
let xMin = Math.min(p1.x, p2.x, pc.x);
let xMax = Math.max(p1.x, p2.x, pc.x);
let yMin = Math.min(p1.y, p2.y, pc.y);
let yMax = Math.max(p1.y, p2.y, pc.y);
//adding a couple of pixels to increase the width/height of the rect
const threshold = 2;
if (x >= xMin - threshold && x <= xMax + threshold && y >= yMin - threshold && y <= yMax + threshold) {
const w = xMax - xMin;
const h = yMax - yMin;
return this.calculateDistToCurveInRect(x, y, p1, pc, p2, w, h);
}
return null;
}
midPointBtw(p1, p2) {
return new DG.Point(p1.x + (p2.x - p1.x) / 2, p1.y + (p2.y - p1.y) / 2);
calculateDistToCurveInRect(x, y, p0, p1, p2, w, h) {
const stepLen = 3;
const stepsNum = Math.floor((w + h) / stepLen);
const deltaT = 1 / stepsNum;
const arrX = new Uint32Array(stepsNum);
const arrY = new Uint32Array(stepsNum);
let maxHW = new Uint32Array(stepsNum);
let minSumHW = null;
const candidateIdxs = new BitArray(stepsNum);
for (let i = 0; i < arrX.length; i++) {
const t = i * deltaT;
const xOnCurve = Math.pow((1 - t), 2) * p0.x + 2 * t * (1 - t) * p1.x + Math.pow(t, 2) * p2.x;
const yOnCurve = Math.pow((1 - t), 2) * p0.y + 2 * t * (1 - t) * p1.y + Math.pow(t, 2) * p2.y;
const rectW = Math.abs(x - xOnCurve);
const rectH = Math.abs(y - yOnCurve);
const sumHW = rectW + rectH;
if (!minSumHW || minSumHW > sumHW)
minSumHW = sumHW;
maxHW[i] = Math.max(rectW, rectH);
arrX[i] = xOnCurve;
arrY[i] = yOnCurve;
}
for (let i = 0; i < arrX.length; i++) {
if (maxHW[i] < minSumHW)
candidateIdxs.setBit(i, true, false);
}
let minDist = null;
for (let j = -1; (j = candidateIdxs.findNext(j)) !== -1;) {
const dist = Math.hypot((arrX[j] - x), (arrY[j] - y));
if (!minDist || minDist > dist)
minDist = dist;
}
return minDist;
}
findPerpendicularPointOnCurve(idx, x1, y1, x2, y2) {
let dx = x2 - x1;
let dy = y2 - y1;
getPointOnDistance(p1x, p1y, p2x, p2y, distance) {
const p1p2d = Math.sqrt(Math.pow(p2x - p1x, 2) + Math.pow(p2y - p1y, 2));
const dx = (p2x - p1x) / p1p2d;
const dy = (p2y - p1y) / p1p2d;
const p3x = p2x - distance * dx;
const p3y = p2y - distance * dy;
return new DG.Point(p3x, p3y);
}
findControlPoint(idx, x1, y1, x2, y2, i) {
const midX = x1 + (x2 - x1) / 2;
const midY = y1 + (y2 - y1) / 2;
let dx = midX - x1;
let dy = midY - y1;
const dist = Math.sqrt(dx * dx + dy * dy);
dx /= dist;
dy /= dist;
const perpendicularLen = 50 * Math.floor(idx / 2) + 50;
const perpendicularLen = 50 * Math.ceil(idx / 2);
return idx % 2 === 0 ?
new DG.Point(x2 + (perpendicularLen / 2) * dy, y2 - (perpendicularLen / 2) * dx) :
new DG.Point(x2 - (perpendicularLen / 2) * dy, y2 + (perpendicularLen / 2) * dx);
new DG.Point(midX + (perpendicularLen / 2) * dy, midY - (perpendicularLen / 2) * dx) :
new DG.Point(midX - (perpendicularLen / 2) * dy, midY + (perpendicularLen / 2) * dx);
}

@@ -121,19 +273,3 @@ canvasArrow(path, arrowEndX, arrowEndY, quadX, quadY) {

}
getArrowPoint(lineOpts, p1, p2, pointFrom, pointTo) {
var _a;
const compareCol = this.sp.dataFrame.col(lineOpts.directionCol);
if (compareCol) {
const direction = (_a = lineOpts.direction) !== null && _a !== void 0 ? _a : LineDirection.higher;
switch (direction) {
case LineDirection.higher:
return compareCol.get(p1) > compareCol.get(p2) ? pointFrom : pointTo;
case LineDirection.lower:
return compareCol.get(p1) > compareCol.get(p2) ? pointTo : pointFrom;
default:
return null;
}
}
return null;
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVuZGVyLWxpbmVzLW9uLXNwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVuZGVyLWxpbmVzLW9uLXNwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDdEMsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUUvQixNQUFNLENBQU4sSUFBWSxhQUdYO0FBSEQsV0FBWSxhQUFhO0lBQ3JCLGdDQUFlLENBQUE7SUFDZixrQ0FBaUIsQ0FBQTtBQUNyQixDQUFDLEVBSFcsYUFBYSxLQUFiLGFBQWEsUUFHeEI7QUFlRCxNQUFNLE9BQU8sd0JBQXdCO0lBWWpDLElBQUksYUFBYTtRQUNiLE9BQU8sSUFBSSxDQUFDLGNBQWMsQ0FBQztJQUMvQixDQUFDO0lBRUQsSUFBSSxhQUFhLENBQUMsRUFBVTtRQUN4QixJQUFJLENBQUMsY0FBYyxHQUFHLEVBQUUsQ0FBQztRQUN6QixJQUFJLENBQUMsRUFBRSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQTZCLENBQUMsQ0FBQztJQUM3RSxDQUFDO0lBRUQsWUFBWSxFQUF3QixFQUFFLEtBQWEsRUFBRSxLQUFhLEVBQUUsS0FBYTtRQWpCakYsbUJBQWMsR0FBRyxDQUFDLENBQUMsQ0FBQztRQUVwQixnQkFBVyxHQUFHLElBQUksT0FBTyxFQUFVLENBQUM7U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iAgICAgICAgZm9yIChsZXQgcDEgb2YgT2JqZWN0LmtleXModGhpcy5saW5lcykubWFwKE51bWJlcikpIHtcblxuICAgICAgICAgICAgaWYgKHRoaXMuc3AuZGF0YUZyYW1lLmZpbHRlci5nZXQocDEpKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcG9pbnRGcm9tID0gdGhpcy5zcC53b3JsZFRvU2NyZWVuKHguZ2V0KHAxKSwgeS5nZXQocDEpKTtcbiAgICAgICAgICAgICAgICBjb25zdCBhWCA9IHBvaW50RnJvbT8ueDtcbiAgICAgICAgICAgICAgICBjb25zdCBhWSA9IHBvaW50RnJvbT8ueTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBwMiBvZiBPYmplY3Qua2V5cyh0aGlzLmxpbmVzW3AxXSkubWFwKE51bWJlcikpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuc3AuZGF0YUZyYW1lLmZpbHRlci5nZXQocDIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwb2ludFRvID0gdGhpcy5zcC53b3JsZFRvU2NyZWVuKHguZ2V0KHAyKSwgeS5nZXQocDIpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGJYID0gcG9pbnRUbz8ueDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGJZID0gcG9pbnRUbz8ueTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhWCAmJiBhWSAmJiBiWCAmJiBiWSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGxpbmVJZHggPSAwOyBsaW5lSWR4IDwgdGhpcy5saW5lc1twMV1bcDJdLmxlbmd0aDsgbGluZUlkeCsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxpbmVPcHRzID0gdGhpcy5saW5lc1twMV1bcDJdW2xpbmVJZHhdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBsaW5lID0gbmV3IFBhdGgyRCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBhdGhzW2xpbmVPcHRzLmlkXSA9IGxpbmU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUubW92ZVRvKGFYISwgYVkhKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY29sb3IgPSBsaW5lT3B0cy5jb2xvciA/PyAnMCwxMjgsMCc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG9wYWNpdHkgPSBsaW5lT3B0cy5vcGFjaXR5ID8/IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5zdHJva2VTdHlsZSA9IGByZ2JhKCR7Y29sb3J9LCR7b3BhY2l0eX0pYDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R4LmxpbmVXaWR0aCA9IGxpbmVPcHRzLndpZHRoID8gbGluZU9wdHMuaWQgPT09IHRoaXMuY3VycmVudExpbmVJZHggPyBsaW5lT3B0cy53aWR0aCArIDIgOiBsaW5lT3B0cy53aWR0aCA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lT3B0cy5pZCA9PT0gdGhpcy5jdXJyZW50TGluZUlkeCA/IDMgOiAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbWlkUG9pbnQ6IERHLlBvaW50ID0gdGhpcy5taWRQb2ludEJ0dyhwb2ludEZyb20sIHBvaW50VG8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGluZUlkeCA+IDAgfHwgdGhpcy5saW5lc1twMV1bcDJdLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pZFBvaW50ID0gdGhpcy5maW5kUGVycGVuZGljdWxhclBvaW50T25DdXJ2ZShsaW5lSWR4LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvaW50RnJvbS54LCBwb2ludEZyb20ueSwgbWlkUG9pbnQueCwgbWlkUG9pbnQueSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lLnF1YWRyYXRpY0N1cnZlVG8obWlkUG9pbnQueCwgbWlkUG9pbnQueSwgYlgsIGJZKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxpbmVPcHRzLmRpcmVjdGlvbkNvbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYXJyb3dQb2ludCA9IHRoaXMuZ2V0QXJyb3dQb2ludChsaW5lT3B0cywgcDEsIHAyLCBwb2ludEZyb20sIHBvaW50VG8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFycm93UG9pbnQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jYW52YXNBcnJvdyhsaW5lLCBhcnJvd1BvaW50LngsIGFycm93UG9pbnQueSwgbWlkUG9pbnQueCwgbWlkUG9pbnQueSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R4LmJlZ2luUGF0aCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdHguc3Ryb2tlKGxpbmUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdHguY2xvc2VQYXRoKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY2hlY2tDdXJzb3JPbkxpbmUoeDogbnVtYmVyLCB5O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xlICsgTWF0aC5QSSAvIDEwKSkpO1xuICAgIH1cblxuICAgIGdldEFycm93UG9pbnQobGluZU9wdHM6IElMaW5lT3B0cywgcDE6IG51bWJlciwgcDI6IG51bWJlciwgcG9pbnRGcm9tOiBERy5Qb2ludCwgcG9pbnRUbzogREcuUG9pbnQpOiBERy5Qb2ludCB8IG51bGwge1xuICAgICAgICBjb25zdCBjb21wYXJlQ29sID0gdGhpcy5zcC5kYXRhRnJhbWUhLmNvbChsaW5lT3B0cy5kaXJlY3Rpb25Db2whKTtcbiAgICAgICAgaWYgKGNvbXBhcmVDb2wpIHtcbiAgICAgICAgICAgIGNvbnN0IGRpcmVjdGlvbiA9IGxpbmVPcHRzLmRpcmVjdGlvbiA/PyBMaW5lRGlyZWN0aW9uLmhpZ2hlcjtcbiAgICAgICAgICAgIHN3aXRjaCAoZGlyZWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgY2FzZSBMaW5lRGlyZWN0aW9uLmhpZ2hlcjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBhcmVDb2wuZ2V0KHAxKSA+IGNvbXBhcmVDb2wuZ2V0KHAyKSA/IHBvaW50RnJvbSA6IHBvaW50VG87XG4gICAgICAgICAgICAgICAgY2FzZSBMaW5lRGlyZWN0aW9uLmxvd2VyOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29tcGFyZUNvbC5nZXQocDEpID4gY29tcGFyZUNvbC5nZXQocDIpID8gcG9pbnRUbyA6IHBvaW50RnJvbTtcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cbn0iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVuZGVyLWxpbmVzLW9uLXNwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJ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W52YXMgPSB0aGlzLnNwLmdldEluZm8oKVsnY2FudmFzJ107XG4gICAgICAgIHRoaXMuY3R4ID0gdGhpcy5jYW52YXMuZ2V0Q29udGV4dCgnMmQnKSBhcyBDYW52YXNSZW5kZXJpbmdDb250ZXh0MkQ7XG4gICAgICAgIHRoaXMudXBkYXRlTGluZXMobGluZXMpO1xuXG4gICAgICAgIHRoaXMuY2FudmFzLm9ubW91c2Vkb3duID0gKCkgPT4ge1xuICAgICAgICAgICAgaWYgKHRoaXMubW91c2VPdmVyTGluZUlkICE9PSBudWxsKVxuICAgICAgICAgICAgICAgIHRoaXMubGluZUNsaWNrZWQubmV4dCh0aGlzLm1vdXNlT3ZlckxpbmVJZCk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmNhbnZhcy5vbm1vdXNlbW92ZSA9IChldmVudDogTW91c2VFdmVudCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5tb3VzZU92ZXJMaW5lSWQgPSB0aGlzLmNoZWNrQ29vcmRzT25MaW5lKGV2ZW50Lm9mZnNldFgsIGV2ZW50Lm9mZnNldFkpO1xuICAgICAgICAgICAgaWYgKHRoaXMubW91c2VPdmVyTGluZUlkICE9PSBudWxsKVxuICAgICAgICAgICAgICAgIHRoaXMubGluZUhvdmVyLm5leHQodGhpcy5tb3VzZU92ZXJMaW5lSWQpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3Aub25FdmVudCgnZDQtYmVmb3JlLWRyYXctc2NlbmUnKVxuICAgICAgICAgICAgLnN1YnNjcmliZSgoXzogYW55KSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJMaW5lcygpO1xuICAgICAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgdXBkYXRlTGluZXMobGluZXM6IElMaW5lU2VyaWVzKSB7XG4gICAgICAgIHRoaXMubGluZXMgPSBsaW5lcztcbiAgICAgICAgdGhpcy5tdWx0aXBsZUxpbmVzQ291bnRzID0gbmV3IFVpbnQ4QXJyYXkod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sIHNpemVUbyB9ID0gdGhpcy5nZXRNYXJrZXJzU2l6ZXMoc3BMb29rLCBtYXJrZXJTaXplQ29sLCBpKTtcbiAgICAgICAgICAgICAgICBjb25zdCBwb2ludEZyb20gPSB0aGlzLnNwLndvcmxkVG9TY3JlZW4odGhpcy54QXhpc0NvbC5nZXQodGhpcy5saW5lcy5mcm9tW2ldKSwgdGhpcy55QXhpc0NvbC5nZXQodGhpcy5saW5lcy5mcm9tW2ldKSk7XG4gICAgICAgICAgICAgICAgbGV0IGFYID0gcG9pbnRGcm9tPy54O1xuICAgICAgICAgICAgICAgIGxldCBhWSA9IHBvaW50RnJvbT8ueTtcbiAgICAgICAgICAgICAgICBjb25zdCBwb2ludFRvID0gdGhpcy5zcC53b3JsZFRvU2NyZWVuKHRoaXMueEF4aXNDb2wuZ2V0KHRoaXMubGluZXMudG9baV0pLCB0aGlzLnlBeGlzQ29sLmdldCh0aGlzLmxpbmVzLnRvW2ldKSk7XG4gICAgICAgICAgICAgICAgbGV0IGJYID0gcG9pbnRUbz8ueDtcbiAgICAgICAgICAgICAgICBsZXQgYlkgPSBwb2ludFRvPy55O1xuICAgICAgICAgICAgICAgIHRoaXMuY3R4LmJlZ2luUGF0aCgpO1xuICAgICAgICAgICAgICAgIGlmIChhWCAmJiBhWSAmJiBiWCAmJiBiWSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaW5kaXZpZHVhbExpbmVTdHlsZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbG9yID0gdGhpcy5saW5lcy5jb2xvcnM/LltpXSA/IHRoaXMubGluZXMuY29sb3JzPy5baV0gOiAnMCwxMjgsMCc7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvcGFjaXR5ID0gdGhpcy5saW5lcy5vcGFjaXRpZXM/LltpXSA/IHRoaXMubGluZXMub3BhY2l0aWVzPy5baV0gOiAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jdHguc3Ryb2tlU3R5bGUgPSBgcmdiYSgke2NvbG9yfSwke29wYWNpdHl9KWA7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmN0eC5saW5lV2lkdGggPSB0aGlzLmxpbmVzLndpZHRocz8uW2ldID8gdGhpcy5saW5lcy53aWR0aHM/LltpXSA6IDE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbXVsdGlMaW5lcyA9IHRoaXMubXVsdGlwbGVMaW5lc0NvdW50c1tpXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2xQb2ludDogREcuUG9pbnQgfCBudWxsID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG11bHRpTGluZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0YXJ0UG9pbnRXaXRoTWFya2VyID0gdGhpcy5nZXRQb2ludE9uRGlzdGFuY2UoYVgsIGFZLCBiWCwgYlksIHNpemVUbyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbmR0UG9pbnRXaXRoTWFya2VyID0gdGhpcy5nZXRQb2ludE9uRGlzdGFuY2UoYlgsIGJZLCBhWCwgYVksIHNpemVGcm9tKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFYID0gc3RhcnRQb2ludFdpdGhNYXJrZXIueDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFZID0gc3RhcnRQb2ludFdpdGhNYXJrZXIueTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJYID0gZW5kdFBvaW50V2l0aE1hcmtlci54O1xuICAgICAgICAgICAgICAgICAgICAgICAgYlkgPSBlbmR0UG9pbnRXaXRoTWFya2VyLnk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sUG9pbnQgPSB0aGlzLmxpbmVzLmZyb21baV0gPiB0aGlzLmxpbmVzLnRvW2ldID9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmZpbmRDb250cm9sUG9pbnQobXVsdGlMaW5lcywgYVgsIGFZLCBiWCwgYlksIGkpIDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmZpbmRDb250cm9sUG9pbnQobXVsdGlMaW5lcywgYlgsIGJZLCBhWCwgYVksIGkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jdHgubW92ZVRvKGFYISwgYVkhKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY3R4LnF1YWRyYXRpY0N1cnZlVG8oY29udHJvbFBvaW50LngsIGNvbnRyb2xQb2ludC55LCBiWCwgYlkpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jdHgubW92ZVRvKGFYISwgYVkhKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY3R4LmxpbmVUbyhiWCwgYlkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmxpbmVzLmRyYXdBcnJvd3MgPz8gdGhpcy5saW5lcy5kcmF3QXJyb3dzQXJyPy5nZXRCaXQoaSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGFycm93UG9pbnQgPSAhbXVsdGlMaW5lcyA/IHRoaXMuZ2V0UG9pbnRPbkRpc3RhbmNlKGFYLCBhWSwgYlgsIGJZLCBzaXplVG8pIDogbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGFycm93Q1BYID0gbXVsdGlMaW5lcyA/IGNvbnRyb2xQb2ludCEueCA6IGFYO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYXJyb3dDUFkgPSBtdWx0aUxpbmVzID8gY29udHJvbFBvaW50IS55IDogYVk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbnZhc0Fycm93KHRoaXMuY3R4LCBhcnJvd1BvaW50Py54ID8/IGJYLCBhcnJvd1BvaW50Py55ID8/IGJZLCBhcnJvd0NQWCwgYXJyb3dDUFkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY3R4LnN0cm9rZSgpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmN0eC5jbG9zZVBhdGgoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5maWxsTGVmdEJvdHRvbVJlY3QoKTtcbiAgICB9XG5cblxuICAgIGdldE1hcmtlcnNTaXplcyhzcExvb2s6IGFueSwgbWFya2VyU2l6ZUNvbDogREcuQ29sdW1uIHwgbnVsbCwgaTogbnVtYmVyKTogTWFya2VyU2l6ZSB7XG4gICAgICAgIGxldCBzaXplRnJvbSA9IDM7XG4gICAgICAgIGxldCBzaXplVG8gPSAzO1xuICAgICAgICBpZiAobWFya2VyU2l6ZUNvbCkge1xuICAgICAgICAgICAgc2l6ZUZyb20gPSAoc3BMb29rLm1hcmtlck1pblNpemUgKyAoc3BMb29rLm1hcmtlck1heFNpemUgLSBzcExvb2subWFya2VyTWluU2l6ZSkgKiBtYXJrZXJTaXplQ29sLnNjYWxlKHRoaXMubGluZXMuZnJvbVtpXSkpIC8gMjtcbiAgICAgICAgICAgIHNpemVUbyA9IChzcExvb2subWFya2VyTWluU2l6ZSArIChzcExvb2subWFya2VyTWF4U2l6ZSAtIHNwTG9vay5tYXJrZXJNaW5TaXplKSAqIG1hcmtlclNpemVDb2wuc2NhbGUodGhpcy5saW5lcy50b1tpXSkpIC8gMjtcbiAgICAgICAgfSBlbHNlIGlmIChzcExvb2subWFya2VyRGVmYXVsdFNpemUpIHtcbiAgICAgICAgICAgIHNpemVGcm9tID0gc3BMb29rLm1hcmtlckRlZmF1bHRTaXplIC8gMjtcbiAgICAgICAgICAgIHNpemVUbyA9IHNwTG9vay5tYXJrZXJEZWZhdWx0U2l6ZSAvIDI7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHsgc2l6ZUZyb20sIHNpemVUbyB9O1xuICAgIH1cblxuXG4gICAgZmlsbExlZnRCb3R0b21SZWN0KCkge1xuICAgICAgICBjb25zdCByZWN0ID0gbmV3IFBhdGgyRCgpO1xuICAgICAgICByZWN0LnJlY3QodGhpcy5zcC55QXhpc0JveC5taW5YLCB0aGlzLnNwLnlBeGlzQm94Lm1heFksIHRoaXMuc3AueUF4aXNCb3gud2lkdGgsIHRoaXMuc3AueEF4aXNCb3guaGVpZ2h0KTtcbiAgICAgICAgdGhpcy5jdHguZmlsbFN0eWxlID0gYHdoaXRlYDtcbiAgICAgICAgdGhpcy5jdHguYmVnaW5QYXRoKCk7XG4gICAgICAgIHRoaXMuY3R4LmZpbGwocmVjdCk7XG4gICAgICAgIHRoaXMuY3R4LmNsb3NlUGF0aCgpO1xuICAgIH1cblxuICAgIGNyZWF0ZU11bHRpTGluZXNJbmRpY2VzKCk6IHZvaWQge1xuICAgICAgICBjb25zdCBhcnJheUlkeHNCaXRBcnJheSA9IG5ldyBCaXRBcnJheSh0aGlzLmxpbmVzLmZyb20ubGVuZ3RoKTtcbiAgICAgICAgYXJyYXlJZHhzQml0QXJyYXkuc2V0QWxsKHRydWUpO1xuICAgICAgICBmb3IgKGxldCBpID0gLTE7IChpID0gYXJyYXlJZHhzQml0QXJyYXkuZmluZE5leHQoaSkpICE9PSAtMTspIHtcbiAgICAgICAgICAgIGxldCBmaXJzdExpbmVJZHggPSBpO1xuICAgICAgICAgICAgbGV0IHAxID0gdGhpcy5saW5lcy5mcm9tW2ZpcnN0TGluZUlkeF07XG4gICAgICAgICAgICBsZXQgcDIgPSB0aGlzLmxpbmVzLnRvW2ZpcnN0TGluZUlkeF07XG4gICAgICAgICAgICBsZXQgbGluZXNQZXJQYWlyID0gMTtcbiAgICAgICAgICAgIGZvciAobGV0IGogPSBpOyAoaiA9IGFycmF5SWR4c0JpdEFycmF5LmZpbmROZXh0KGopKSAhPT0gLTE7KSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcG9pbnRUb0NvbXBhcmUxID0gdGhpcy5saW5lcy5mcm9tW2pdO1xuICAgICAgICAgICAgICAgIGNvbnN0IHBvaW50VG9Db21wYXJlMiA9IHRoaXMubGluZXMudG9bal07XG4gICAgICAgICAgICAgICAgaWYgKHBvaW50VG9Db21wYXJlMSA9PT0gcDEgJiYgcG9pbnRUb0NvbXBhcmUyID09PSBwMiB8fFxuICAgICAgICAgICAgICAgICAgICBwb2ludFRvQ29tcGFyZTIgPT09IHAxICYmIHBvaW50VG9Db21wYXJlMSA9PT0gcDIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tdWx0aXBsZUxpbmVzQ291bnRzW2pdID0gKytsaW5lc1BlclBhaXI7XG4gICAgICAgICAgICAgICAgICAgIGFycmF5SWR4c0JpdEFycmF5LnNldEJpdChqLCBmYWxzZSwgZmFsc2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChsaW5lc1BlclBhaXIgPiAxKVxuICAgICAgICAgICAgICAgIHRoaXMubXVsdGlwbGVMaW5lc0NvdW50c1tmaXJzdExpbmVJZHhdID0gMTtcbiAgICAgICAgICAgIGFycmF5SWR4c0JpdEFycmF5LnNldEJpdChpLCBmYWxzZSwgZmFsc2UpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgY2hlY2tDb29yZHNPbkxpbmUoeDogbnVtYmVyLCB5OiBudW1iZXIpOiBudW1iZXIgfCBudWxsIHtcbiAgICAgICAgbGV0IGNhbmRpZGF0ZUlkeCA9IG51bGw7XG4gICAgICAgIGxldCBtaW5EaXN0ID0gbnVsbDtcbiAgICAgICAgbGV0IGRpc3QgPSBudWxsO1xuICAgICAgICBjb25zdCBzcExvb2sgPSB0aGlzLnNwLmdldE9wdGlvbnMoKS5sb29rO1xuICAgICAgICBjb25zdCBtYXJrZXJTaXplQ29sID0gc3BMb29rWydzaXplQ29sdW1uTmFtZSddID8gdGhpcy5zcC5k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LCBzaXplRnJvbSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbnRyb2xQb2ludCA9IHRoaXMubGluZXMuZnJvbVtpXSA+IHRoaXMubGluZXMudG9baV0gP1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5maW5kQ29udHJvbFBvaW50KHRoaXMubXVsdGlwbGVMaW5lc0NvdW50c1tpXSwgZnJvbU1hcmtlci54LCBmcm9tTWFya2VyLnksIHRvTWFya2VyLngsIHRvTWFya2VyLnksIGkpIDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZmluZENvbnRyb2xQb2ludCh0aGlzLm11bHRpcGxlTGluZXNDb3VudHNbaV0sIHRvTWFya2VyLngsIHRvTWFya2VyLnksIGZyb21NYXJrZXIueCwgZnJvbU1hcmtlci55LCBpKTtcbiAgICAgICAgICAgICAgICAgICAgZGlzdCA9IHRoaXMuY2FsY3VsYXRlRGlzdFRvQ3VydmVMaW5lKGksIHgsIHksIGZyb21NYXJrZXIsIHRvTWFya2VyLCBjb250cm9sUG9pbnQpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGRpc3QgPSB0aGlzLmNhbGN1bGF0ZURpc3RUb1N0cmFpZ2h0TGluZSh4LCB5LCBwRnJvbSwgcFRvKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCghbWluRGlzdCAmJiBkaXN0ICE9PSBudWxsICYmIGRpc3QgPCA1KSB8fCBtaW5EaXN0ICYmIGRpc3QgIT09IG51bGwgJiYgZGlzdCA8IG1pbkRpc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgbWluRGlzdCA9IGRpc3Q7XG4gICAgICAgICAgICAgICAgICAgIGNhbmRpZGF0ZUlkeCA9IGk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjYW5kaWRhdGVJZHg7XG4gICAgfVxuXG4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C0gdCkgKiBwMS55ICsgTWF0aC5wb3codCwgMikgKiBwMi55O1xuICAgICAgICAgICAgY29uc3QgcmVjdFcgPSBNYXRoLmFicyh4IC0geE9uQ3VydmUpO1xuICAgICAgICAgICAgY29uc3QgcmVjdEggPSBNYXRoLmFicyh5IC0geU9uQ3VydmUpO1xuICAgICAgICAgICAgY29uc3Qgc3VtSFcgPSByZWN0VyArIHJlY3RIO1xuICAgICAgICAgICAgaWYgKCFtaW5TdW1IVyB8fCBtaW5TdW1IVyA+IHN1bUhXKVxuICAgICAgICAgICAgICAgIG1pblN1bUhXID0gc3VtSFc7XG4gICAgICAgICAgICBtYXhIV1tpXSA9IE1hdGgubWF4KHJlY3RXLCByZWN0SCk7XG4gICAgICAgICAgICBhcnJYW2ldID0geE9uQ3VydmU7XG4gICAgICAgICAgICBhcnJZW2ldID0geU9uQ3VydmU7XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnJYLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAobWF4SFdbaV0gPCBtaW5TdW1IVyEpXG4gICAgICAgICAgICAgICAgY2FuZGlkYXRlSWR4cy5zZXRCaXQoaSwgdHJ1ZSwgZmFsc2UpO1xuICAgICAgICB9XG4gICAgICAgIGxldCBtaW5EaXN0OiBudW1iZXIgfCBudWxsID0gbnVsbDtcbiAgICAgICAgZm9yIChsZXQgaiA9IC0xOyAoaiA9IGNhbmRpZGF0ZUlkeHMuZmluZE5leHQoaikpICE9PSAtMTspIHtcbiAgICAgICAgICAgIGNvbnN0IGRpc3QgPSBNYXRoLmh5cG90KChhcnJYW2pdIC0geCksIChhcnJZW2pdIC0geSkpO1xuICAgICAgICAgICAgaWYgKCFtaW5EaXN0IHx8IG1pbkRpc3QgPiBkaXN0KVxuICAgICAgICAgICAgICAgIG1pbkRpc3QgPSBkaXN0O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtaW5EaXN0ITtcbiAgICB9XG5cbiA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G59Il19

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc