diff --git a/dist/bundle.js b/dist/bundle.js index 74abd383..c36bc0b2 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -130936,7 +130936,7 @@ function (_super) { } Radial.prototype.getTensor = function (point) { - var t = point.clone().sub(this._centre); + var t = point.clone().sub(this._centre).normalize(); return tensor_1["default"].fromVector(t); }; @@ -133639,9 +133639,9 @@ function () { Tensor.fromVector = function (vector) { var t1 = Math.pow(vector.x, 2) - Math.pow(vector.y, 2); - var t2 = -2 * vector.x * vector.y; + var t2 = 2 * vector.x * vector.y; var t3 = Math.pow(t1, 2) - Math.pow(t2, 2); - var t4 = -2 * t1 * t2; + var t4 = 2 * t1 * t2; return new Tensor(1, [t3, t4]); }; @@ -133731,7 +133731,7 @@ function () { return 0; } - return Math.atan2(this.matrix[1] / this.r, this.matrix[0] / this.r) / 2; + return Math.atan2(this.matrix[1] / this.r, this.matrix[0] / this.r) / 4; }; return Tensor; @@ -138535,4 +138535,4 @@ function () { exports["default"] = Vector; },{"loglevel":54}]},{},[102,104,105,106,107,108,109,110,112,111,113,114,115,116,117,118,119,120,121,122,123,124,125]) -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvQHN2Z2RvdGpzL3N2Zy5qcy9kaXN0L25vZGVfbW9kdWxlcy9Ac3ZnZG90anMvc3ZnLmpzL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9nbG9iYWwuanMiLCJub2RlX21vZHVsZXMvQHN2Z2RvdGpzL3N2Zy5qcy9kaXN0L25vZGVfbW9kdWxlcy9Ac3ZnZG90anMvc3ZnLmpzL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9mYWlscy5qcyIsIm5vZGVfbW9kdWxlcy9Ac3ZnZG90anMvc3ZnLmpzL2Rpc3Qvbm9kZV9tb2R1bGVz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JUU19ZID8gJ3knIDogJ2cnKTtcblxuICAgICAgLy8gXig/ICsgcnggKyApIGlzIG5lZWRlZCwgaW4gY29tYmluYXRpb24gd2l0aCBzb21lIFMgc2xpY2luZywgdG9cbiAgICAgIC8vIHNpbXVsYXRlIHRoZSAneScgZmxhZy5cbiAgICAgIHZhciBzcGxpdHRlciA9IG5ldyBDKFNVUFBPUlRTX1kgPyByeCA6ICdeKD86JyArIHJ4LnNvdXJjZSArICcpJywgZmxhZ3MpO1xuICAgICAgdmFyIGxpbSA9IGxpbWl0ID09PSB1bmRlZmluZWQgPyBNQVhfVUlOVDMyIDogbGltaXQgPj4+IDA7XG4gICAgICBpZiAobGltID09PSAwKSByZXR1cm4gW107XG4gICAgICBpZiAoUy5sZW5ndGggPT09IDApIHJldHVybiBjYWxsUmVnRXhwRXhlYyhzcGxpdHRlciwgUykgPT09IG51bGwgPyBbU10gOiBbXTtcbiAgICAgIHZhciBwID0gMDtcbiAgICAgIHZhciBxID0gMDtcbiAgICAgIHZhciBBID0gW107XG4gICAgICB3aGlsZSAocSA8IFMubGVuZ3RoKSB7XG4gICAgICAgIHNwbGl0dGVyLmxhc3RJbmRleCA9IFNVUFBPUlRTX1kgPyBxIDogMDtcbiAgICAgICAgdmFyIHogPSBjYWxsUmVnRXhwRXhlYyhzcGxpdHRlciwgU1VQUE9SVFNfWSA/IFMgOiBTLnNsaWNlKHEpKTtcbiAgICAgICAgdmFyIGU7XG4gICAgICAgIGlmIChcbiAgICAgICAgICB6ID09PSBudWxsIHx8XG4gICAgICAgICAgKGUgPSBtaW4odG9MZW5ndGgoc3BsaXR0ZXIubGFzdEluZGV4ICsgKFNVUFBPUlRTX1kgPyAwIDogcSkpLCBTLmxlbmd0aCkpID09PSBwXG4gICAgICAgICkge1xuICAgICAgICAgIHEgPSBhZHZhbmNlU3RyaW5nSW5kZXgoUywgcSwgdW5pY29kZU1hdGNoaW5nKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBBLnB1c2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clxuICAgICAgICAgIG9mZihuLCBbIGV2LCBucyBdLmpvaW4oJy4nKSwgbClcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGRlbGV0ZSBiYWdbZXZdW25zXVxyXG4gICAgICB9XHJcbiAgICB9IGVsc2UgaWYgKG5zKSB7XHJcbiAgICAgIC8vIHJlbW92ZSBhbGwgbGlzdGVuZXJzIGZvciBhIHNwZWNpZmljIG5hbWVzcGFjZVxyXG4gICAgICBmb3IgKGV2ZW50IGluIGJhZykge1xyXG4gICAgICAgIGZvciAobmFtZXNwYWNlIGluIGJhZ1tldmVudF0pIHtcclxuICAgICAgICAgIGlmIChucyA9PT0gbmFtZXNwYWNlKSB7XHJcbiAgICAgICAgICAgIG9mZihuLCBbIGV2ZW50LCBucyBdLmpvaW4oJy4nKSlcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH0gZWxzZSBpZiAoZXYpIHtcclxuICAgICAgLy8gcmVtb3ZlIGFsbCBsaXN0ZW5lcnMgZm9yIHRoZSBldmVudFxyXG4gICAgICBpZiAoYmFnW2V2XSkge1xyXG4gICAgICAgIGZvciAobmFtZXNwYWNlIGluIGJhZ1tldl0pIHtcclxuICAgICAgICAgIG9mZihuLCBbIGV2LCBuYW1lc3BhY2UgXS5qb2luKCcuJykpXHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBkZWxldGUgYmFnW2V2XVxyXG4gICAgICB9XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAvLyByZW1vdmUgYWxsIGxpc3RlbmVycyBvbiBhIGdpdmVuIG5vZGVcclxuICAgICAgZm9yIChldmVudCBpbiBiYWcpIHtcclxuICAgICAgICBvZmYobiwgZXZlbnQpXHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGNsZWFyRXZlbnRzKGluc3RhbmNlKVxyXG4gICAgfVxyXG4gIH0pXHJcbn1cclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBkaXNwYXRjaCAobm9kZSw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gICAgIGlmICh0aGlzLnNwYWNlID09PSAnbGNoJykge1xyXG4gICAgICAgICAgY29uc3QgeyBjLCBoIH0gPSB0aGlzXHJcbiAgICAgICAgICBjb25zdCBkVG9SID0gTWF0aC5QSSAvIDE4MFxyXG4gICAgICAgICAgYSA9IGMgKiBNYXRoLmNvcyhkVG9SICogaClcclxuICAgICAgICAgIGIgPSBjICogTWF0aC5zaW4oZFRvUiAqIGgpXHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBVbmRvIHRoZSBub25saW5lYXIgZnVuY3Rpb25cclxuICAgICAgICBjb25zdCB5TCA9IChsICsgMTYpIC8gMTE2XHJcbiAgICAgICAgY29uc3QgeEwgPSBhIC8gNTAwICsgeUxcclxuICAgICAgICBjb25zdCB6TCA9IHlMIC0gYiAvIDIwMFxyXG5cclxuICAgICAgICAvLyBHZXQgdGhlIHh5eiB2YWx1ZXNcclxuICAgICAgICBjb25zdCBjdCA9IDE2IC8gMTE2XHJcbiAgICAgICAgY29uc3QgbXggPSAwLjAwODg1NlxyXG4gICAgICAgIGNvbnN0IG5tID0gNy43ODdcclxuICAgICAgICB4ID0gMC45NTA0NyAqICgoeEwgKiogMyA+IG14KSA/IHhMICoqIDMgOiAoeEwgLSBjdCkgLyBubSlcclxuICAgICAgICB5ID0gMS4wMDAwMCAqICgoeUwgKiogMyA+IG14KSA/IHlMICoqIDMgOiAoeUwgLSBjdCkgLyBubSlcclxuICAgICAgICB6ID0gMS4wODg4MyAqICgoekwgKiogMyA+IG14KSA/IHpMICoqIDMgOiAoekwgLSBjdCkgLyBubSlcclxuICAgICAgfVxyXG5cclxuICAgICAgLy8gQ29udmVydCB4eXogdG8gdW5ib3VuZGVkIHJnYiB2YWx1ZXNcclxuICAgICAgY29uc3QgclUgPSB4ICogMy4yNDA2ICsgeSAqIC0xLjUzNzIgKyB6ICogLTAuNDk4NlxyXG4gICAgICBjb25zdCBnVSA9IHggKiAtMC45Njg5ICsgeSAqIDEuODc1OCArIHogKi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mV3IEJveCh4LCB5LCB3aWR0aCwgaGVpZ2h0KVxyXG4gIH1cclxuXHJcbiAgdHJhbnNmb3JtIChtKSB7XHJcbiAgICBpZiAoIShtIGluc3RhbmNlb2YgTWF0cml4KSkge1xyXG4gICAgICBtID0gbmV3IE1hdHJpeChtKVxyXG4gICAgfVxyXG5cclxuICAgIGxldCB4TWluID0gSW5maW5pdHlcclxuICAgIGxldCB4TWF4ID0gLUluZmluaXR5XHJcbiAgICBsZXQgeU1pbiA9IEluZmluaXR5XHJcbiAgICBsZXQgeU1heCA9IC1JbmZpbml0eVxyXG5cclxuICAgIGNvbnN0IHB0cyA9IFtcclxuICAgICAgbmV3IFBvaW50KHRoaXMueCwgdGhpcy55KSxcclxuICAgICAgbmV3IFBvaW50KHRoaXMueDIsIHRoaXMueSksXHJcbiAgICAgIG5ldyBQb2ludCh0aGlzLngsIHRoaXMueTIpLFxyXG4gICAgICBuZXcgUG9pbnQodGhpcy54MiwgdGhpcy55MilcclxuICAgIF1cclxuXHJcbiAgICBwdHMuZm9yRWFjaChmdW5jdGlvbiAocCkge1xyXG4gICAgICBwID0gcC50cmFuc2Zvcm0obSlcclxuICAgICAgeE1pbiA9IE1hdGgubWluKHhNaW4sIHAueClcclxuICAgICAgeE1heCA9IE1hdGgubWF4KHhNYXgsIHAueClcclxuICAgICAgeU1pbiA9IE1hdGgubWluKHlNaW4sIHAueSlcclxuICAgICAgeU1heCA9IE1hdGgubWF4KHlNYXgsIHAueSlcclxuICAgIH0pXHJcblxyXG4gICAgcmV0dXJuIG5ldyBCb3goXHJcbiAgICAgIHhNaW4sIHlNaW4sXHJcbiAgICAgIHhNYXggLSB4TWluLFxyXG4gICAgICB5TWF4IC0geU1pblxyXG4gICAgKVxyXG4gIH1cclxuXHJcbiAgYWRkT2Zmc2V0ICgpIHtcclxuICAgIC8vIG9mZnNldCBieSB3aW5kb3cgc2Nyb2xsIHBvc2l0aW9uLCBiZWNhdXNlIGdldEJvdW5kaW5nQ2xpZW50Um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JcbiAgICAgICAgaWYgKG91dGVySFRNTCkge1xyXG4gICAgICAgICAgY29uc3QgcmVzdWx0ID0gc3ZnT3JGbihjdXJyZW50KVxyXG4gICAgICAgICAgY3VycmVudCA9IHJlc3VsdCB8fCBjdXJyZW50XHJcblxyXG4gICAgICAgICAgLy8gVGhlIHVzZXIgZG9lcyBub3Qgd2FudCB0aGlzIG5vZGU/IFdlbGwsIHRoZW4gaGUgZ2V0cyBub3RoaW5nXHJcbiAgICAgICAgICBpZiAocmVzdWx0ID09PSBmYWxzZSkgcmV0dXJuICcnXHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBEZWVwIGxvb3AgdGhyb3VnaCBhbGwgY2hpbGRyZW4gYW5kIGFwcGx5IG1vZGlmaWVyXHJcbiAgICAgICAgY3VycmVudC5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHN2Z09yRm4odGhpcylcclxuICAgICAgICAgIGNvbnN0IF90aGlzID0gcmVzdWx0IHx8IHRoaXNcclxuXHJcbiAgICAgICAgICAvLyBJZiBtb2RpZmllciByZXR1cm5zIGZhbHNlLCBkaXNjYXJkIG5vZGVcclxuICAgICAgICAgIGlmIChyZXN1bHQgPT09IGZhbHNlKSB7XHJcbiAgICAgICAgICAgIHRoaXMucmVtb3ZlKClcclxuXHJcbiAgICAgICAgICAgIC8vIElmIG1vZGlmaWVyIHJldHVybnMgbmV3IG5vZGUsIHVzZSBpdFxyXG4gICAgICAgICAgfSBlbHNlIGlmIChyZXN1bHQgJiYgdGhpcyAhPT0gX3RoaXMpIHtcclxuICAgICAgICAgICAgdGhpcy5yZXBsYWNlKF90aGlzKVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH0sIHRydWUpXHJcbiAgICAgIH1cclxuXHJcbiAgICAgIC8vIFJldHVybiBvdXRlciBvciBpbm5lciBjb250ZW50XHJcbiAgICAgIHJldHVybiBvdXRlckhUTUxcclxuICAgICAgICA/IGN1c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hW2ldWzJdXHJcblxyXG4gICAgICAgIGlmIChhW2ldWzNdICE9IG51bGwpIHtcclxuICAgICAgICAgIHMgKz0gJyAnXHJcbiAgICAgICAgICBzICs9IGFbaV1bM11cclxuICAgICAgICAgIHMgKz0gJyAnXHJcbiAgICAgICAgICBzICs9IGFbaV1bNF1cclxuXHJcbiAgICAgICAgICBpZiAoYVtpXVs1XSAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgIHMgKz0gJyAnXHJcbiAgICAgICAgICAgIHMgKz0gYVtpXVs1XVxyXG4gICAgICAgICAgICBzICs9ICcgJ1xyXG4gICAgICAgICAgICBzICs9IGFbaV1bNl1cclxuXHJcbiAgICAgICAgICAgIGlmIChhW2ldWzddICE9IG51bGwpIHtcclxuICAgICAgICAgICAgICBzICs9ICcgJ1xyXG4gICAgICAgICAgICAgIHMgKz0gYVtpXVs3XVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICByZXR1cm4gcyArICcgJ1xyXG59XHJcblxyXG5jb25zdCBwYXRoSGFuZGxlcnMgPSB7XHJcbiAgTTogZnVuY3Rpb24gKGMsIHAsIHAwKSB7XHJcbiAgICBwLnggPSBwMC54ID0gY1swXVxyXG4gICAgcC55ID0gcDAueSA9IGNbMV1cclxuXHJcbiAgICByZXR1cm4gWyAnTScsIHAueCwgcC55IF1cclxuICB9LFxyXG4gIEw6IGZ1bmN0aW9uIChjLCBwKSB7XHJcbiAgICBwLnggPSBjWzBdXHJcbiAgICBwLnkgPSBjWzFdXHJcbiAgICByZXR1cm4gWyAnTCcsIGNbMF0sIGNbMV0gXVxyXG4gIH0sXHJcbiAgSDogZnVuY3Rpb24gKGMsIHApIHtcclxuICAgIHAueCA9IGNbMF1cclxuICAgIHJldHVybiBbICdIJywgY1swXSBdXHJcbiAgfSxcclxuICBWOiBmdW5jdGlvbiAoYywgcCkge1xyXG4gICAgc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3gueFxyXG4gICAgeSAtPSBib3gueVxyXG5cclxuICAgIGlmICghaXNOYU4oeCkgJiYgIWlzTmFOKHkpKSB7XHJcbiAgICAgIC8vIG1vdmUgZXZlcnkgcG9pbnRcclxuICAgICAgZm9yICh2YXIgbCwgaSA9IHRoaXMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcclxuICAgICAgICBsID0gdGhpc1tpXVswXVxyXG5cclxuICAgICAgICBpZiAobCA9PT0gJ00nIHx8IGwgPT09ICdMJyB8fCBsID09PSAnVCcpIHtcclxuICAgICAgICAgIHRoaXNbaV1bMV0gKz0geFxyXG4gICAgICAgICAgdGhpc1tpXVsyXSArPSB5XHJcbiAgICAgICAgfSBlbHNlIGlmIChsID09PSAnSCcpIHtcclxuICAgICAgICAgIHRoaXNbaV1bMV0gKz0geFxyXG4gICAgICAgIH0gZWxzZSBpZiAobCA9PT0gJ1YnKSB7XHJcbiAgICAgICAgICB0aGlzW2ldWzFdICs9IHlcclxuICAgICAgICB9IGVsc2UgaWYgKGwgPT09ICdDJyB8fCBsID09PSAnUycgfHwgbCA9PT0gJ1EnKSB7XHJcbiAgICAgICAgICB0aGlzW2ldWzFdICs9IHhcclxuICAgICAgICAgIHRoaXNbaV1bMl0gKz0geVxyXG4gICAgICAgICAgdGhpc1tpXVszXSArPSB4XHJcbiAgICAgICAgICB0aGlzW2ldWzRdICs9IHlcclxuXHJcbiAgICAgICAgICBpZiAobCA9PT0gJ0MnKSB7XHJcbiAgICAgICAgICAgIHRoaXNbaV1bNV0gKz0geFxyXG4gICAgICAgICAgICB0aGlzW2ldWzZdICs9IHlcclxuICAgICAgICAgIH1cclxuICAgICAgICB9IGVsc2UgaWYgKGwgPT09ICdBJykge1xyXG4gICAgICAgICAgdGhpc1tpXVs2XSArPSB4XHJcbiAgICAgICAgICB0aGlzW2ldWzddICs9IHlcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gdGhpc1xyX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gICB9IGVsc2UgaWYgKGwgPT09ICdWJykge1xyXG4gICAgICAgIHRoaXNbaV1bMV0gPSAoKHRoaXNbaV1bMV0gLSBib3gueSkgKiBoZWlnaHQpIC8gYm94LmhlaWdodCArIGJveC55XHJcbiAgICAgIH0gZWxzZSBpZiAobCA9PT0gJ0MnIHx8IGwgPT09ICdTJyB8fCBsID09PSAnUScpIHtcclxuICAgICAgICB0aGlzW2ldWzFdID0gKCh0aGlzW2ldWzFdIC0gYm94LngpICogd2lkdGgpIC8gYm94LndpZHRoICsgYm94LnhcclxuICAgICAgICB0aGlzW2ldWzJdID0gKCh0aGlzW2ldWzJdIC0gYm94LnkpICogaGVpZ2h0KSAvIGJveC5oZWlnaHQgKyBib3gueVxyXG4gICAgICAgIHRoaXNbaV1bM10gPSAoKHRoaXNbaV1bM10gLSBib3gueCkgKiB3aWR0aCkgLyBib3gud2lkdGggKyBib3gueFxyXG4gICAgICAgIHRoaXNbaV1bNF0gPSAoKHRoaXNbaV1bNF0gLSBib3gueSkgKiBoZWlnaHQpIC8gYm94LmhlaWdodCArIGJveC55XHJcblxyXG4gICAgICAgIGlmIChsID09PSAnQycpIHtcclxuICAgICAgICAgIHRoaXNbaV1bNV0gPSAoKHRoaXNbaV1bNV0gLSBib3gueCkgKiB3aWR0aCkgLyBib3gud2lkdGggKyBib3gueFxyXG4gICAgICAgICAgdGhpc1tpXVs2XSA9ICgodGhpc1tpXVs2XSAtIGJveC55KSAqIGhlaWdodCkgLyBib3guaGVpZ2h0ICsgYm94LnlcclxuICAgICAgICB9XHJcbiAgICAgIH0gZWxzZSBpZiAobCA9PT0gJ0EnKSB7XHJcbiAgICAgICAgLy8gcmVzaXplIHJhZGlpXHJcbiAgICAgICAgdGhpc1tpXVsxXSA9ICh0aGlzW2ldWzFdICogd2lkdGgpIC8gYm94LndpZHRoXHJcbiAgICAgICAgdGhpc1tpXVsyXSA9ICh0aGlzW2ldWzJdICogaGVpZ2h0KSAvIGJveC5oZWlnaHRcclxuXH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pbmcgbXVsdGlwbGUgbGluZXNcclxuICB9XHJcblxyXG4gIC8vIE1vdmUgb3ZlciB4LWF4aXNcclxuICAvLyBUZXh0IGlzIG1vdmVkIGl0cyBib3VuZGluZyBib3hcclxuICAvLyB0ZXh0LWFuY2hvciBkb2VzIE5PVCBtYXR0ZXJcclxuICB4ICh4LCBib3ggPSB0aGlzLmJib3goKSkge1xyXG4gICAgaWYgKHggPT0gbnVsbCkge1xyXG4gICAgICByZXR1cm4gYm94LnhcclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gdGhpcy5hdHRyKCd4JywgdGhpcy5hdHRyKCd4JykgKyB4IC0gYm94LngpXHJcbiAgfVxyXG5cclxuICAvLyBNb3ZlIG92ZXIgeS1heGlzXHJcbiAgeSAoeSwgYm94ID0gdGhpcy5iYm94KCkpIHtcclxuICAgIGlmICh5ID09IG51bGwpIHtcclxuICAgICAgcmV0dXJuIGJveC55XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHRoaXMuYXR0cigneScsIHRoaXMuYXR0cigneScpICsgeSAtIGJveC55KVxyXG4gIH1cclxuXHJcbiAgbW92ZSAoeCwgeSwgYm94ID0gdGhpcy5iYm94KCkpIHtcclxuICAgIHJldHVybiB0aGlzLngoeCwgYm94KS55KHksIGJveClcclxuICB9XHJcblxyXG4gIC8vIE1vdmUgY2VudGVyIG92ZXIgeC1heGlzXHJcbiAgY3ggKHgsIGJveCA9IHRoaXMuYmJveCgpKSB7XHJcbiAgICBpZiAoeCA9PSBudWxsKSB7XHJcbiAgICAgIHJldHVybiBib3guY3hcclxuICAgIH1cclxuXHJcbiAgICByZXR1cm4gdGhpcy5hdHRyKCd4JywgdGhpcy5hdHRyKCd4JykgKyB4IC0gYm94LmN4KVxyXG4gIH1cclxuXHJcbiAgLy8gTW92ZSBjZW50ZXIgb3ZlciB5LWF4aXNcclxuICBjeSAoeSwgYm94ID0gdGhpcy5iYm94KCkpIHtcclxuICAgIGlmICh5ID09IG51bGwpIHtcclx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dmFyIGRhdGEsXG4gICAgICB4MCA9IHRoaXMuX3gwLFxuICAgICAgeTAgPSB0aGlzLl95MCxcbiAgICAgIHgxLFxuICAgICAgeTEsXG4gICAgICB4MixcbiAgICAgIHkyLFxuICAgICAgeDMgPSB0aGlzLl94MSxcbiAgICAgIHkzID0gdGhpcy5feTEsXG4gICAgICBxdWFkcyA9IFtdLFxuICAgICAgbm9kZSA9IHRoaXMuX3Jvb3QsXG4gICAgICBxLFxuICAgICAgaTtcblxuICBpZiAobm9kZSkgcXVhZHMucHVzaChuZXcgUXVhZChub2RlLCB4MCwgeTAsIHgzLCB5MykpO1xuICBpZiAocmFkaXVzID09IG51bGwpIHJhZGl1cyA9IEluZmluaXR5O1xuICBlbHNlIHtcbiAgICB4MCA9IHggLSByYWRpdXMsIHkwID0geSAtIHJhZGl1cztcbiAgICB4MyA9IHggKyByYWRpdXMsIHkzID0geSArIHJhZGl1cztcbiAgICByYWRpdXMgKj0gcmFkaXVzO1xuICB9XG5cbiAgd2hpbGUgKHEgPSBxdWFkcy5wb3AoKSkge1xuXG4gICAgLy8gU3RvcCBzZWFyY2hpbmcgaWYgdGhpcyBxdWFkcmFudCBjYW7igJl0IGNvbnRhaW4gYSBjbG9zZXIgbm9kZS5cbiAgICBpZiAoIShub2RlID0gcS5ub2RlKVxuICAgICAgICB8fCAoeDEgPSBxLngwKSA+IHgzXG4gICAgICAgIHx8ICh5MSA9IHEueTApID4geTNcbiAgICAgICAgfHwgKHgyID0gcS54MSkgPCB4MFxuICAgICAgICB8fCAoeTIgPSBxLnkxKSA8IHkwKSBjb250aW51ZTtcblxuICAgIC8vIEJpc2VjdCB0aGUgY3VycmVudCBxdWFkcmFudC5cbiAgICBpZiAobm9kZS5sZW5ndGgpIHtcbiAgICAgIHZhciB4bSA9ICh4MSArIHgyKSAvIDIsXG4gICAgICAgICAgeW0gPSAoeTEgKyB5MikgLyAyO1xuXG4gICAgICBxdWFkcy5wdXNoKFxuICAgICAgICBuZXcgUXVhZChub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ybWF0ID09PSAnSEVYJykge1xuICAgIHJldHVybiAnMHgnICsgY29sb3IuaGV4LnRvU3RyaW5nKDE2KTtcbiAgfSBlbHNlIGlmIChjb2xvckZvcm1hdCA9PT0gJ1JHQl9BUlJBWScpIHtcbiAgICByZXR1cm4gJ1snICsgciArICcsJyArIGcgKyAnLCcgKyBiICsgJ10nO1xuICB9IGVsc2UgaWYgKGNvbG9yRm9ybWF0ID09PSAnUkdCQV9BUlJBWScpIHtcbiAgICByZXR1cm4gJ1snICsgciArICcsJyArIGcgKyAnLCcgKyBiICsgJywnICsgYSArICddJztcbiAgfSBlbHNlIGlmIChjb2xvckZvcm1hdCA9PT0gJ1JHQl9PQkonKSB7XG4gICAgcmV0dXJuICd7cjonICsgciArICcsZzonICsgZyArICcsYjonICsgYiArICd9JztcbiAgfSBlbHNlIGlmIChjb2xvckZvcm1hdCA9PT0gJ1JHQkFfT0JKJykge1xuICAgIHJldHVybiAne3I6JyArIHIgKyAnLGc6JyArIGcgKyAnLGI6JyArIGIgKyAnLGE6JyArIGEgKyAnfSc7XG4gIH0gZWxzZSBpZiAoY29sb3JGb3JtYXQgPT09ICdIU1ZfT0JKJykge1xuICAgIHJldHVybiAne2g6JyArIGggKyAnLHM6JyArIHMgKyAnLHY6JyArIHYgKyAnfSc7XG4gIH0gZWxzZSBpZiAoY29sb3JGb3JtYXQgPT09ICdIU1ZBX09CSicpIHtcbiAgICByZXR1cm4gJ3toOicgKyBoICsgJyxzOicgKyBzICsgJyx2OicgKyB2ICsgJyxhOicgKyBhICsgJ30nO1xuICB9XG4gIHJldHVybiAndW5rbm93biBmb3JtYXQnO1xufVxuXG52YXIgQVJSX0VBQ0ggPSBBcnJheS5wcm90b3R5cGUuZm9yRWFjaDtcbnZhciBBUlJfU0xJQ0UgPSBBcnJheS5wcm90b3R5cGUuc2xpY2U7XG52YXIgQ29tbW9uID0ge1xuICBCUkVBSzoge30sXG4gIGV4dGVuZDogZnVuY3Rpb24gZXh0ZW5kKHRhcm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ooLispXFxzKixcXHMqKC4rKVxccypcXCkvKTtcbiAgICAgICAgaWYgKHRlc3QgPT09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBzcGFjZTogJ1JHQicsXG4gICAgICAgICAgcjogcGFyc2VGbG9hdCh0ZXN0WzFdKSxcbiAgICAgICAgICBnOiBwYXJzZUZsb2F0KHRlc3RbMl0pLFxuICAgICAgICAgIGI6IHBhcnNlRmxvYXQodGVzdFszXSlcbiAgICAgICAgfTtcbiAgICAgIH0sXG4gICAgICB3cml0ZTogY29sb3JUb1N0cmluZ1xuICAgIH0sXG4gICAgQ1NTX1JHQkE6IHtcbiAgICAgIHJlYWQ6IGZ1bmN0aW9uIHJlYWQob3JpZ2luYWwpIHtcbiAgICAgICAgdmFyIHRlc3QgPSBvcmlnaW5hbC5tYXRjaCgvXnJnYmFcXChcXHMqKC4rKVxccyosXFxzKiguKylcXHMqLFxccyooLispXFxzKixcXHMqKC4rKVxccypcXCkvKTtcbiAgICAgICAgaWYgKHRlc3QgPT09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBzcGFjZTogJ1JHQicsXG4gICAgICAgICAgcjogcGFyc2VGbG9hdCh0ZXN0WzFdKSxcbiAgICAgICAgICBnOiBwYXJzZUZsb2F0KHRlc3RbMl0pLFxuICAgICAgICAgIGI6IHBhcnNlRmxvYXQodGVzdFszXSksXG4gICAgICAgICAgYTogcGFyc2VGbG9hdCh0ZXN0WzRdKVxuICAgICAgICB9O1xuICAgICAgfSxcbiAgICAgIHdyaXRlOiBjb2xvclRvU3RyaW5nXG4gICAgfVxuICB9XG59LFxue1xuICBsaXRtdXM6IENvbW1vbi5pc051bWJlcixcbiAgY29udmVyc2lvbnM6IHtcbiAgICBIRVg6IHtcbiAgICAgIHJlYWQ6IGZ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XSxcbiAgICAgICAgICBnOiBvcmlnaW5hbFsxXSxcbiAgICAgICAgICBiOiBvcmlnaW5hbFsyXSxcbiAgICAgICAgICBhOiBvcmlnaW5hbFszXVxuICAgICAgICB9O1xuICAgICAgfSxcbiAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZShjb2xvcikge1xuICAgICAgICByZXR1cm4gW2NvbG9yLnIsIGNvbG9yLmcsIGNvbG9yLmIsIGNvbG9yLmFdO1xuICAgICAgfVxuICAgIH1cbiAgfVxufSxcbntcbiAgbGl0bXVzOiBDb21tb24uaXNPYmplY3QsXG4gIGNvbnZlcnNpb25zOiB7XG4gICAgUkdCQV9PQko6IHtcbiAgICAgIHJlYWQ6IGZ1bmN0aW9uIHJlYWQob3JpZ2luYWwpIHtcbiAgICAgICAgaWYgKENvbW1vbi5pc051bWJlcihvcmlnaW5hbC5yKSAmJiBDb21tb24uaXNOdW1iZXIob3JpZ2luYWwuZykgJiYgQ29tbW9uLmlzTnVtYmVyKG9yaWdpbmFsLmIpICYmIENvbW1vbi5pc051bWJlcihvcmlnaW5hbC5hKSkge1xuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBzcGFjZTogJ1JHQicsXG4gICAgICAgICAgICByOiBvcmlnaW5hbC5yLFxuICAgICAgICAgICAgZzogb3JpZ2luYWwuZyxcbiAgICAgICAgICAgIGI6IG9yaWdpbmFsLmIsXG4gICAgICAgICAgICBhOiBvcmlnaW5hbC5hXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9LFxuICAgICAgd3JpdGU6IGZ1bmN0aW9uIHdyaXRlKGNvbG9yKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgcjogY29sb3IucixcbiAgICAgICAgICBnOiBjb2xvci5nLFxuICAgICAgICAgIGI6IGNvbG9yLmIsXG4gICAgICAgICAgYTogY29sb3IuYVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH0sXG4gICAgUkdCX09CSjoge1xuICAgICAgcmVhZDogZnVuY3Rpb24gcmVhZChvcmlnaW5hbCkge1xuICAgICAgICBpZiAoQ29tbW9uLmlzTnVtYmVyKG9yaWdpbmFsLnIpICYmIENvbW1vbi5pc051bWJlcihvcmlnaW5hbC5nKSAmJiBDb21tb24uaXNOdW1iZXIob3JpZ2luYWwuYikpIHtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgc3BhY2U6ICdSR0InLFxuICAgICAgICAgICAgcjogb3JpZ2luYWwucixcbiAgICAgICAgICAgIGc6IG9yaWdpbmFsLmcsXG4gICAgICAgICAgICBiOiBvcmlnaW5hbC5iXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9LFxuICAgICAgd3JpdGU6IGZ1bmN0aW9uIHdyaXRlKGNvbG9yKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgcjogY29sb3IucixcbiAgICAgICAgICBnOiBjb2xvci5nLFxuICAgICAgICAgIGI6IGNvbG9yLmJcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9LFxuICAgIEhTVkFfT0JKOiB7XG4gICAgICByZWFkOiBmdW5jdGlvbiByZWFkKG9yaWdpbmFsKSB7XG4gICAgICAgIGlmIChDb21tb24uaXNOdW1iZXIob3JpZ2luYWwuaCkgJiYgQ29tbW9uLmlzTnVtYmVyKG9yaWdpbmFsLnMpICYmIENvbW1vbi5pc051bWJlcihvcmlnaW5hbC52KSAmJiBDb21tb24uaXNOdW1iZXIob3JpZ2luYWwuYSkpIHtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgc3BhY2U6ICdIU1YnLFxuICAgICAgICAgICAgaDogb3JpZ2luYWwuaCxcbiAgICAgICAgICAgIHM6IG9yaWdpbmFsLnMsXG4gICAgICAgICAgICB2OiBvcmlnaW5hbC52LFxuICAgICAgICAgICAgYTogb3JpZ2luYWwuYVxuICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfSxcbiAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZShjb2xvcikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGg6IGNvbG9yLmgsXG4gICAgICAgICAgczogY29sb3IucyxcbiAgICAgICAgICB2OiBjb2xvci52LFxuICAgICAgICAgIGE6IGNvbG9yLmFcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9LFxuICAgIEhTVl9PQko6IHtcbiAgICAgIHJlYWQ6IGZ1bmN0aW9uIHJlYWQob3JpZ2luYWwpIHtcbiAgICAgICAgaWYgKENvbW1vbi5pc051bWJlcihvcmlnaW5hbC5oKSAmJiBDb21tb24uaXNOdW1iZXIob3JpZ2luYWwucykgJiYgQ29tbW9uLmlzTnVtYmVyKG9yaWdpbmFsLnYpKSB7XG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHNwYWNlOiAnSFNWJyxcbiAgICAgICAgICAgIGg6IG9yaWdpbmFsLmgsXG4gICAgICAgICAgICBzOiBvcmlnaW5hbC5zLFxuICAgICAgICAgICAgdjogb3JpZ2luYWwudlxuICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfSxcbiAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZShjb2xvcikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGg6IGNvbG9yLmgsXG4gICAgICAgICAgczogY29sb3IucyxcbiAgICAgICAgICB2OiBjb2xvci52XG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfVxuICB9XG59XTtcbnZhciByZXN1bHQgPSB2b2lkIDA7XG52YXIgdG9SZXR1cm4gPSB2b2lkIDA7XG52YXIgaW50ZXJwcmV0ID0gZnVuY3Rpb24gaW50ZXJwcmV0KCkge1xuICB0b1JldHVybiA9IGZhbHNlO1xuICB2YXIgb3JpZ2luYWw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ICAgICAgICBpZiAoIUNvbW1vbi5pc1VuZGVmaW5lZChpW2NvbXBvbmVudF0pICYmICFDb21tb24uaXNVbmRlZmluZWQodGhpcy5fX2NvbG9yLl9fc3RhdGVbY29tcG9uZW50XSkgJiYgaVtjb21wb25lbnRdICE9PSB0aGlzLl9fY29sb3IuX19zdGF0ZVtjb21wb25lbnRdKSB7XG4gICAgICAgICAgICBtaXNtYXRjaCA9IHRydWU7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICB9LCB0aGlzKTtcbiAgICAgICAgaWYgKG1pc21hdGNoKSB7XG4gICAgICAgICAgQ29tbW9uLmV4dGVuZCh0aGlzLl9fY29sb3IuX19zdGF0ZSwgaSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIENvbW1vbi5leHRlbmQodGhpcy5fX3RlbXAuX19zdGF0ZSwgdGhpcy5fX2NvbG9yLl9fc3RhdGUpO1xuICAgICAgdGhpcy5fX3RlbXAuYSA9IDE7XG4gICAgICB2YXIgZmxpcCA9IHRoaXMuX19jb2xvci52IDwgMC41IHx8IHRoaXMuX19jb2xvci5zID4gMC41ID8gMjU1IDogMDtcbiAgICAgIHZhciBfZmxpcCA9IDI1NSAtIGZsaXA7XG4gICAgICBDb21tb24uZXh0ZW5kKHRoaXMuX19maWVsZF9rbm9iLnN0eWxlLCB7XG4gICAgICAgIG1hcmdpbkxlZnQ6IDEwMCAqIHRoaXMuX19jb2xvci5zIC0gNyArICdweCcsXG4gICAgICAgIG1hcmdpblRvcDogMTAwICogKDEgLSB0aGlzLl9fY29sb3IudikgLSA3ICsgJ3B4JyxcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiB0aGlzLl9fdGVtcC50b0hleFN0cmluZygpLFxuICAgICAgICBib3JkZXI6IHRoaXMuX19maWVsZF9rbm9iX2JvcmRlciArICdyZ2IoJyArIGZsaXAgKyAnLCcgKyBmbGlwICsgJywnICsgZmxpcCArICcpJ1xuICAgICAgfSk7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hbXMuYXV0b1BsYWNlO1xuICAgICAgfVxuICAgIH0sXG4gICAgY2xvc2VPblRvcDoge1xuICAgICAgZ2V0OiBmdW5jdGlvbiBnZXQkJDEoKSB7XG4gICAgICAgIHJldHVybiBwYXJhbXMuY2xvc2VPblRvcDtcbiAgICAgIH1cbiAgICB9LFxuICAgIHByZXNldDoge1xuICAgICAgZ2V0OiBmdW5jdGlvbiBnZXQkJDEoKSB7XG4gICAgICAgIGlmIChfdGhpcy5wYXJlbnQpIHtcbiAgICAgICAgICByZXR1cm4gX3RoaXMuZ2V0Um9vdCgpLnByZXNldDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcGFyYW1zLmxvYWQucHJlc2V0O1xuICAgICAgfSxcbiAgICAgIHNldDogZnVuY3Rpb24gc2V0JCQxKHYpIHtcbiAgICAgICAgaWYgKF90aGlzLnBhcmVudCkge1xuICAgICAgICAgIF90aGlzLmdldFJvb3QoKS5wcmVzZXQgPSB2O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHBhcmFtcy5sb2FkLnByZXNldCA9IHY7XG4gICAgICAgIH1cbiAgICAgICAgc2V0UHJlc2V0U2VsZWN0SW5kZXgodGhpcyk7XG4gICAgICAgIF90aGlzLnJldmVydCgpO1xuICAgICAgfVxuICAgIH0sXG4gICAgd2lkdGg6IHtcbiAgICAgIGdldDogZnVuY3Rpb24gZ2V0JCQxKCkge1xuICAgICAgICByZXR1cm4gcGFyYW1zLndpZHRoO1xuICAgICAgfSxcbiAgICAgIHNldDogZnVuY3Rpb24gc2V0JCQxKHYpIHtcbiAgICAgICAgcGFyYW1zLndpZHRoID0gdjtcbiAgICAgICAgc2V0V2lkdGgoX3RoaXMsIHYpO1xuICAgICAgfVxuICAgIH0sXG4gICAgbmFtZToge1xuICAgICAgZ2V0OiBmdW5jdGlvbiBnZXQkJDEoKSB7XG4gICAgICAgIHJldHVybiBwYXJhbXMubmFtZTtcbiAgICAgIH0sXG4gICAgICBzZXQ6IGZ1bm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tYmVyKGNvbnRyb2xsZXIuX19tYXgpKSB7XG4gICAgICAgIHZhciBvbGROYW1lID0gY29udHJvbGxlci5fX2xpLmZpcnN0RWxlbWVudENoaWxkLmZpcnN0RWxlbWVudENoaWxkLmlubmVySFRNTDtcbiAgICAgICAgdmFyIHdhc0xpc3RlbmluZyA9IGNvbnRyb2xsZXIuX19ndWkuX19saXN0ZW5pbmcuaW5kZXhPZihjb250cm9sbGVyKSA+IC0xO1xuICAgICAgICBjb250cm9sbGVyLnJlbW92ZSgpO1xuICAgICAgICB2YXIgbmV3Q29udHJvbGxlciA9IF9hZGQoZ3VpLCBjb250cm9sbGVyLm9iamVjdCwgY29udHJvbGxlci5wcm9wZXJ0eSwge1xuICAgICAgICAgIGJlZm9yZTogY29udHJvbGxlci5fX2xpLm5leHRFbGVtZW50U2libGluZyxcbiAgICAgICAgICBmYWN0b3J5QXJnczogW2NvbnRyb2xsZXIuX19taW4sIGNvbnRyb2xsZXIuX19tYXgsIGNvbnRyb2xsZXIuX19zdGVwXVxuICAgICAgICB9KTtcbiAgICAgICAgbmV3Q29udHJvbGxlci5uYW1lKG9sZE5hbWUpO1xuICAgICAgICBpZiAod2FzTGlzdGVuaW5nKSBuZXdDb250cm9sbGVyLmxpc3RlbigpO1xuICAgICAgICByZXR1cm4gbmV3Q29udHJvbGxlcjtcbiAgICAgIH1cbiAgICAgIHJldHVybiByZXR1cm5lZDtcbiAgICB9O1xuICAgIGNvbnRyb2xsZXIubWluID0gQ29tbW9uLmNvbXBvc2UociwgY29udHJvbGxlci5taW4pO1xuICAgIGNvbnRyb2xsZXIubWF4ID0gQ29tbW9uLmNvbXBvc2UociwgY29udHJvbGxlci5tYXgpO1xuICB9IGVsc2UgaWYgKGNvbnRyb2xsZXIgaW5zdGFuY2VvZiBCb29sZWFuQ29udHJvbGxlcikge1xuICAgIGRvbS5iaW5kKGxpLCAnY2xpY2snLCBmdW5jdGlvbiAoKSB7XG4gICAgICBkb20uZmFrZUV2ZW50KGNvbn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GFyYW0ge05vZGU/fSB0XG4gICAqIEBwYXJhbSB7Q29tcGFyYXRvcn0gY29tcGFyYXRvclxuICAgKi9cbiAgZnVuY3Rpb24gc3BsYXkgKGksIHQsIGNvbXBhcmF0b3IpIHtcbiAgICBpZiAodCA9PT0gbnVsbCkgeyByZXR1cm4gdDsgfVxuICAgIHZhciBsLCByLCB5O1xuICAgIHZhciBOID0gbmV3IE5vZGUoKTtcbiAgICBsID0gciA9IE47XG5cbiAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgdmFyIGNtcCA9IGNvbXBhcmF0b3IoaSwgdC5rZXkpO1xuICAgICAgLy9pZiAoaSA8IHQua2V5KSB7XG4gICAgICBpZiAoY21wIDwgMCkge1xuICAgICAgICBpZiAodC5sZWZ0ID09PSBudWxsKSB7IGJyZWFrOyB9XG4gICAgICAgIC8vaWYgKGkgPCB0LmxlZnQua2V5KSB7XG4gICAgICAgIGlmIChjb21wYXJhdG9yKGksIHQubGVmdC5rZXkpIDwgMCkge1xuICAgICAgICAgIHkgPSB0LmxlZnQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogcm90YXRlIHJpZ2h0ICovXG4gICAgICAgICAgdC5sZWZ0ID0geS5yaWdodDtcbiAgICAgICAgICB5LnJpZ2h0ID0gdDtcbiAgICAgICAgICB0ID0geTtcbiAgICAgICAgICBpZiAodC5sZWZ0ID09PSBudWxsKSB7IGJyZWFrOyB9XG4gICAgICAgIH1cbiAgICAgICAgci5sZWZ0ID0gdDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogbGluayByaWdodCAqL1xuICAgICAgICByID0gdDtcbiAgICAgICAgdCA9IHQubGVmdDtcbiAgICAgIC8vfSBlbHNlIGlmIChpID4gdC5rZXkpIHtcbiAgICAgIH0gZWxzZSBpZiAoY21wID4gMCkge1xuICAgICAgICBpZiAodC5yaWdodCA9PT0gbnVsbCkgeyBicmVhazsgfVxuICAgICAgICAvL2lmIChpID4gdC5yaWdodC5rZXkpIHt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RhY2sgcyAqL1xuICAgICAgLy8gbGV0IGRvbmUgPSBmYWxzZTtcbiAgICAgIC8vIHZhciByZXMgPSBbXTtcbiAgICAgIC8vIHZhciBicmVha0Vhcmx5ID0gZmFsc2U7XG5cbiAgICAgIC8vIHdoaWxlICghZG9uZSkge1xuICAgICAgLy8gICBpZiAoY3VycmVudCAhPT0gIG51bGwpIHtcbiAgICAgIC8vICAgICBRLnB1c2goY3VycmVudCk7XG4gICAgICAvLyAgICAgY3VycmVudCA9IGN1cnJlbnQubGVmdDtcbiAgICAgIC8vICAgfSBlbHNlIHtcbiAgICAgIC8vICAgICBpZiAoUS5sZW5ndGggIT09IDApIHtcbiAgICAgIC8vICAgICAgIGN1cnJlbnQgPSBRLnBvcCgpO1xuXG4gICAgICAvLyAgICAgICB2YXIgeCA9IGdldEludGVyc2VjdGlvblhQb2ludChjdXJyZW50LmtleSwgcC54LCBwLnkpO1xuICAgICAgLy8gICAgICAgdmFyIGR4ID0gcC54IC0geDtcbiAgICAgIC8vICAgICAgIGlmIChNYXRoLmFicyhkeCkgPCBFUFMpIHtcbiAgICAgIC8vICAgICAgICAgcmVzLnB1c2goY3VycmVudC5rZXkpXG4gICAgICAvLyAgICAgICAgIGJyZWFrRWFybHkgPSB0cnVlO1xuICAgICAgLy8gICAgICAgfSBlbHNlIGlmIChicmVha0Vhcmx5KSB7XG4gICAgICAvLyAgICAgICAgIGRvbmUgPSB0cnVlO1xuICAgICAgLy8gICAgICAgfVxuXG4gICAgICAvLyAgICAgICBjdXJyZW50ID0gY3VycmVudC5yaWdodDtcbiAgICAgIC8vICAgICB9IGVsc2UgZG9uZSA9IHRydWU7XG4gICAgICAvLyAgIH1cbiAgICAgIC8vIH1cblxuICAgICAgLy8gcmV0dXJuIHJlcztcblxuICAgICAgLy8gb3B0aW9uIDMuXG4gICAgICB2YXIgY3VycmVudCA9IHN0YXR1cy5fcm9vdDtcblxuICAgICAgd2hpbGUgKGN1cnJlbnQpIHtcbiAgICAgICAgdmFy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ZlcyBzaWduaWZpY2FudCBib29zdDpcbiAgICAgIHNlZ21lbnQuZHkgPSBmcm9tLnkgLSB0by55O1xuICAgICAgc2VnbWVudC5keCA9IGZyb20ueCAtIHRvLng7XG4gICAgICBzZWdtZW50LmFuZ2xlID0gYW5nbGUoc2VnbWVudC5keSwgc2VnbWVudC5keCk7XG5cbiAgICAgIHZhciBpc1BvaW50ID0gc2VnbWVudC5keSA9PT0gc2VnbWVudC5keCAmJiBzZWdtZW50LmR5ID09PSAwO1xuICAgICAgdmFyIHByZXYgPSBldmVudFF1ZXVlLmZpbmQoZnJvbSk7XG4gICAgICBpZiAocHJldiAmJiAhaXNQb2ludCkge1xuICAgICAgICAvLyB0aGlzIGRldGVjdHMgaWRlbnRpY2FsIHNlZ21lbnRzIGVhcmx5LiBXaXRob3V0IHRoaXMgY2hlY2tcbiAgICAgICAgLy8gdGhlIGFsZ29yaXRobSB3b3VsZCBicmVhayBzaW5jZSBzd2VlcCBsaW5lIGhhcyBubyBtZWFucyB0b1xuICAgICAgICAvLyBkZXRlY3QgaWRlbnRpY2FsIHNlZ21lbnRzLlxuICAgICAgICB2YXIgcHJldkZyb20gPSBwcmV2LmRhdGEuZnJvbTtcbiAgICAgICAgaWYgKHByZXZGcm9tKSB7XG4gICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwcmV2RnJvbS5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgdmFyIHMgPSBwcmV2RnJvbVtpXTtcbiAgICAgICAgICAgIGlmIChzYW1lUG9pbnQocy50bywgdG8pKSB7XG4gICAgICAgICAgICAgIHJlcG9ydEludGVyc2VjdGlvbihzLmZyb20sIFtzLmZyb20sIHMudG9dKTtcbiAgICAgICAgICAgICAgcmVwb3J0SW50ZXJzZWN0aW9uKHMudG8sIFtzLmZyb20sIHMudG9dKTtcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuX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KHZhciBqID0gaSArIDE7IGogPCBsaW5lcy5sZW5ndGg7ICsraikge1xuICAgICAgICAgIHZhciBvdGhlciA9IGxpbmVzW2pdO1xuICAgICAgICAgIHZhciBwdCA9IGludGVyc2VjdFNlZ21lbnRzJDEodGVzdCwgb3RoZXIpO1xuICAgICAgICAgIGlmIChwdCkge1xuICAgICAgICAgICAgaWYgKHJlcG9ydEludGVyc2VjdGlvbihwdCwgW3Rlc3QsIG90aGVyXSkpIHtcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgcmV0dXJuIHJlc3VsdHM7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZGVmYXVsdEludGVyc2VjdGlvblJlcG9ydGVyKHAsIGludGVyaW9yKSB7XG4gICAgICByZXN1bHRzLnB1c2goe1xuICAgICAgICBwb2ludDogcCwgXG4gICAgICAgIHNlZ21lbnRzOiBpbnRlcmlvclxuICAgICAgfSk7XG4gICAgfVxuICB9XG5cbiAgdmFyIEFSUkFZX1RZUEVTID0gW1xuICAgICAgSW50OEFycmF5LCBVaW50OEFycmF5LCBVaW50OENsYW1wZWRBcnJheSwgSW50MTZBcnJheSwgVWludDE2QXJyYXksXG4gICAgICBJbnQzMkFycmF5LCBVaW50MzJBcnJheSwgRmxvYXQzMkFycmF5LCBGbG9hdDY0QXJyYXlcbiAgXTtcblxuICB2YXIgVkVSU0lPTiA9IDM7IC8vIHNlcmlhbGl6ZWQgZm9ybWF0IHZlcnNpb25cblxuICB2YXIgRmxhdGJ1c2ggPSBmdW5jdGlvbiBGbGF0YnVzaChudW1JdGVtcywgbm9kZVNpemUsIEFycmF5VHlwZSwgZGF0YSkge1xuICAgICAgdmFyIHRoaXMkMSA9IHRoaXM7XG5cbiAgICAgIGlmIChudW1JdGVtcyA9PT0gdW5kZWZpbmVkKSB7IHRocm93IG5ldyBFcnJvcignTWlzc2luZyByZXF1aXJlZCBh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GFyZW50IG5vZGUgZm9yIGVhY2ggYmxvY2sgb2YgY29uc2VjdXRpdmUgPG5vZGVTaXplPiBub2Rlc1xuICAgICAgICAgIHdoaWxlIChwb3MkMSA8IGVuZCkge1xuICAgICAgICAgICAgICB2YXIgbm9kZU1pblggPSBJbmZpbml0eTtcbiAgICAgICAgICAgICAgdmFyIG5vZGVNaW5ZID0gSW5maW5pdHk7XG4gICAgICAgICAgICAgIHZhciBub2RlTWF4WCA9IC1JbmZpbml0eTtcbiAgICAgICAgICAgICAgdmFyIG5vZGVNYXhZID0gLUluZmluaXR5O1xuICAgICAgICAgICAgICB2YXIgbm9kZUluZGV4ID0gcG9zJDE7XG5cbiAgICAgICAgICAgICAgLy8gY2FsY3VsYXRlIGJib3ggZm9yIHRoZSBuZXcgbm9kZVxuICAgICAgICAgICAgICBmb3IgKHZhciBpJDIgPSAwOyBpJDIgPCB0aGlzLm5vZGVTaXplICYmIHBvcyQxIDwgZW5kOyBpJDIrKykge1xuICAgICAgICAgICAgICAgICAgdmFyIG1pblgkMSA9IHRoaXMkMS5fYm94ZXNbcG9zJDErK107XG4gICAgICAgICAgICAgICAgICB2YXIgbWluWSQxID0gdGhpcyQxLl9ib3hlc1twb3MkMSsrXTtcbiAgICAgICAgICAgICAgICAgIHZhciBtYXhYJDEgPSB0aGlzJDEuX2JveGVzW3BvcyQxKytdO1xuICAgICAgICAgICAgICAgICAgdmFyIG1heFkkMSA9IHRoaXMkMS5fYm94ZXNbcG9zJDErK107XG4gICAgICAgICAgICAgICAgICBpZiAobWluWCQxIDwgbm9kZU1pblgpIHsgbm9kZU1pblggPSBtaW5YJDE7IH1cbiAgICAgICAgICAgICAgICAgIGlmIChtaW5ZJDEgPCBub2RlTWluWSkgeyBub2RlTWluWSA9IG1pblkkMTsgfVxuICAgICAgICAgICAgICAgICAgaWYgKG1heFgkMSA+IG5vZGVNYXhYKSB7IG5vZGVNYXhYID0gbWF4WCQxOyB9XG4gICAgICAgICAgICAgICAgICBpZiAobW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CBqKTtcbiAgICAgIH1cblxuICAgICAgc29ydCQxKHZhbHVlcywgYm94ZXMsIGluZGljZXMsIGxlZnQsIGopO1xuICAgICAgc29ydCQxKHZhbHVlcywgYm94ZXMsIGluZGljZXMsIGogKyAxLCByaWdodCk7XG4gIH1cblxuICAvLyBzd2FwIHR3byB2YWx1ZXMgYW5kIHR3byBjb3JyZXNwb25kaW5nIGJveGVzXG4gIGZ1bmN0aW9uIHN3YXAodmFsdWVzLCBib3hlcywgaW5kaWNlcywgaSwgaikge1xuICAgICAgdmFyIHRlbXAgPSB2YWx1ZXNbaV07XG4gICAgICB2YWx1ZXNbaV0gPSB2YWx1ZXNbal07XG4gICAgICB2YWx1ZXNbal0gPSB0ZW1wO1xuXG4gICAgICB2YXIgayA9IDQgKiBpO1xuICAgICAgdmFyIG0gPSA0ICogajtcblxuICAgICAgdmFyIGEgPSBib3hlc1trXTtcbiAgICAgIHZhciBiID0gYm94ZXNbayArIDFdO1xuICAgICAgdmFyIGMgPSBib3hlc1trICsgMl07XG4gICAgICB2YXIgZCA9IGJveGVzW2sgKyAzXTtcbiAgICAgIGJveGVzW2tdID0gYm94ZXNbbV07XG4gICAgICBib3hlc1trICsgMV0gPSBib3hlc1ttICsgMV07XG4gICAgICBib3hlc1trICsgMl0gPSBib3hlc1ttICsgMl07XG4gICAgICBib3hlc1trICsgM10gPSBib3hlc1ttICsgM107XG4gICAgICBib3hlc1ttXSA9IGE7XG4gICAgICBib3hlc1ttICsgMV0gPSBiO1xuICAgICAgYm94ZXNbbSArIDJdID0gYztcbiAgICAgIGJveGVzW20gKyAzXSA9IGQ7XG5cbiAgICAgIHZhciBlID0gaW5kaWNlc1tpXTtcbiAgICAgIGluZGljZXNbaV0gPSBpbmRpY2VzW2pdO1xuICAgICAgaW5kaWNlc1tqXSA9IGU7XG4gIH1cblxuICAvLyBGYXN0IEhpbGJlcnQgY3VydmUgYWxnb3JpdGhtIGJ5IGh0dHA6Ly90aHJlYWRsb2NhbG11dGV4LmN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ICAgIHVuaWNvZGVQYXRoRXh0cmFGaWVsZCA9XG4gICAgICAgICAgICAvLyBWZXJzaW9uXG4gICAgICAgICAgICBkZWNUb0hleCgxLCAxKSArXG4gICAgICAgICAgICAvLyBOYW1lQ1JDMzJcbiAgICAgICAgICAgIGRlY1RvSGV4KGNyYzMyKGVuY29kZWRGaWxlTmFtZSksIDQpICtcbiAgICAgICAgICAgIC8vIFVuaWNvZGVOYW1lXG4gICAgICAgICAgICB1dGZFbmNvZGVkRmlsZU5hbWU7XG5cbiAgICAgICAgZXh0cmFGaWVsZHMgKz1cbiAgICAgICAgICAgIC8vIEluZm8tWklQIFVuaWNvZGUgUGF0aCBFeHRyYSBGaWVsZFxuICAgICAgICAgICAgXCJcXHg3NVxceDcwXCIgK1xuICAgICAgICAgICAgLy8gc2l6ZVxuICAgICAgICAgICAgZGVjVG9IZXgodW5pY29kZVBhdGhFeHRyYUZpZWxkLmxlbmd0aCwgMikgK1xuICAgICAgICAgICAgLy8gY29udGVudFxuICAgICAgICAgICAgdW5pY29kZVBhdGhFeHRyYUZpZWxkO1xuICAgIH1cblxuICAgIGlmKHVzZVVURjhGb3JDb21tZW50KSB7XG5cbiAgICAgICAgdW5pY29kZUNvbW1lbnRFeHRyYUZpZWxkID1cbiAgICAgICAgICAgIC8vIFZlcnNpb25cbiAgICAgICAgICAgIGRlY1RvSGV4KDEsIDEpICtcbiAgICAgICAgICAgIC8vIENvbW1lbnRDUkMzMlxuICAgICAgICAgICAgZGVjVG9IZXgoY3JjMzIoZW5jb2RlZENvbW1lbnQpLCA0KSArXG4gICAgICAgICAgICAvLyBVbmljb2RlTmFtZVxuICAgICAgICAgICAgdXRmRW5jb2RlZENvbW1lbnQ7XG5cbiAgICAgICAgZXh0cmFGaWVsZHMgKz1cbiAgICAgICAgICAgIC8vIEluZm8tWklQIFVuaWNvZGUgUGF0aCBFeHRyYSBGaWVsZFxuICAgICAgICAgICAgXCJcXHg3NVxceDYzXCIgK1xuICAgICAgICAgICAgLy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pbGUpIHtcbiAgICAgICAgICAgIGVudHJpZXNDb3VudCsrO1xuICAgICAgICAgICAgdmFyIGNvbXByZXNzaW9uID0gZ2V0Q29tcHJlc3Npb24oZmlsZS5vcHRpb25zLmNvbXByZXNzaW9uLCBvcHRpb25zLmNvbXByZXNzaW9uKTtcbiAgICAgICAgICAgIHZhciBjb21wcmVzc2lvbk9wdGlvbnMgPSBmaWxlLm9wdGlvbnMuY29tcHJlc3Npb25PcHRpb25zIHx8IG9wdGlvbnMuY29tcHJlc3Npb25PcHRpb25zIHx8IHt9O1xuICAgICAgICAgICAgdmFyIGRpciA9IGZpbGUuZGlyLCBkYXRlID0gZmlsZS5kYXRlO1xuXG4gICAgICAgICAgICBmaWxlLl9jb21wcmVzc1dvcmtlcihjb21wcmVzc2lvbiwgY29tcHJlc3Npb25PcHRpb25zKVxuICAgICAgICAgICAgLndpdGhTdHJlYW1JbmZvKFwiZmlsZVwiLCB7XG4gICAgICAgICAgICAgICAgbmFtZSA6IHJlbGF0aXZlUGF0aCxcbiAgICAgICAgICAgICAgICBkaXIgOiBkaXIsXG4gICAgICAgICAgICAgICAgZGF0ZSA6IGRhdGUsXG4gICAgICAgICAgICAgICAgY29tbWVudCA6IGZpbGUuY29tbWVudCB8fCBcIlwiLFxuICAgICAgICAgICAgICAgIHVuaXhQZXJtaXNzaW9ucyA6IGZpbGUudW5peFBlcm1pc3Npb25zLFxuICAgICAgICAgICAgICAgIGRvc1Blcm1pc3Npb25zIDogZmlsZS5kb3NQZXJtaXNzaW9uc1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5waXBlKHppcEZpbGVXb3JrZXIpO1xuICAgICAgICB9KTtcbiAgICAgICAgemlwRmlsZVdvcmtlci5lbnRyaWVzQ291bnQgPSBlbnRyaWVzQ291bnQ7XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgICB6aXBGaWxlV29ya2VyLmVycm9yKGUpO1xuICAgIH1cblxuICAgIHJldHVybiB6aXBGaWxlV29ya2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9wdGlvbnMuY2hlY2tDUkMzMikge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBmaWxlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHByb21pc2VzLnB1c2goY2hlY2tFbnRyeUNSQzMyKGZpbGVzW2ldKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGV4dGVybmFsLlByb21pc2UuYWxsKHByb21pc2VzKTtcbiAgICB9KS50aGVuKGZ1bmN0aW9uIGFkZEZpbGVzKHJlc3VsdHMpIHtcbiAgICAgICAgdmFyIHppcEVudHJpZXMgPSByZXN1bHRzLnNoaWZ0KCk7XG4gICAgICAgIHZhciBmaWxlcyA9IHppcEVudHJpZXMuZmlsZXM7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZmlsZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBpbnB1dCA9IGZpbGVzW2ldO1xuICAgICAgICAgICAgemlwLmZpbGUoaW5wdXQuZmlsZU5hbWVTdHIsIGlucHV0LmRlY29tcHJlc3NlZCwge1xuICAgICAgICAgICAgICAgIGJpbmFyeTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBvcHRpbWl6ZWRCaW5hcnlTdHJpbmc6IHRydWUsXG4gICAgICAgICAgICAgICAgZGF0ZTogaW5wdXQuZGF0ZSxcbiAgICAgICAgICAgICAgICBkaXI6IGlucHV0LmRpcixcbiAgICAgICAgICAgICAgICBjb21tZW50IDogaW5wdXQuZmlsZUNvbW1lbnRTdHIubGVuZ3RoID8gaW5wdXQuZmlsZUNvbW1lbnRTdHIgOiBudWxsLFxuICAgICAgICAgICAgICAgIHVuaXhQZXJtaXNzaW9ucyA6IGlucHV0LnVuaXhQZXJtaXNzaW9ucyxcbiAgICAgICAgICAgICAgICBkb3NQZXJtaXNzaW9ucyA6IGlucHV0LmRvc1Blcm1pc3Npb25zLFxuICAgICAgICAgICAgICAgIGNyZWF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W9uc1xuICAgICAqIEByZXR1cm4gIHtKU1ppcHxPYmplY3R8QXJyYXl9IHRoaXMgSlNaaXAgb2JqZWN0ICh3aGVuIGFkZGluZyBhIGZpbGUpLFxuICAgICAqIGEgZmlsZSAod2hlbiBzZWFyY2hpbmcgYnkgc3RyaW5nKSBvciBhbiBhcnJheSBvZiBmaWxlcyAod2hlbiBzZWFyY2hpbmcgYnkgcmVnZXgpLlxuICAgICAqL1xuICAgIGZpbGU6IGZ1bmN0aW9uKG5hbWUsIGRhdGEsIG8pIHtcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgIGlmIChpc1JlZ0V4cChuYW1lKSkge1xuICAgICAgICAgICAgICAgIHZhciByZWdleHAgPSBuYW1lO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmZpbHRlcihmdW5jdGlvbihyZWxhdGl2ZVBhdGgsIGZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICFmaWxlLmRpciAmJiByZWdleHAudGVzdChyZWxhdGl2ZVBhdGgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7IC8vIHRleHRcbiAgICAgICAgICAgICAgICB2YXIgb2JqID0gdGhpcy5maWxlc1t0aGlzLnJvb3QgKyBuYW1lXTtcbiAgICAgICAgICAgICAgICBpZiAob2JqICYmICFvYmouZGlyKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmo7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgeyAvLyBtb3JlIHRoYW4gb25lIGFyZ3VtZW50IDogd2UgaGF2ZSBkYXRhICFcbiAgICAgICAgICAgIG5hbWUgPSB0aGlzLnJvb3QgKyBuYW1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ZXJDYXNlKCk7XG5cbiAgICAgICAgICAvLyBcImJpbmFyeXN0cmluZ1wiIGlzIHByZWZlcnJlZCBidXQgdGhlIGludGVybmFscyB1c2UgXCJzdHJpbmdcIi5cbiAgICAgICAgICBpZihvcHRzLnR5cGUgPT09IFwiYmluYXJ5c3RyaW5nXCIpIHtcbiAgICAgICAgICAgIG9wdHMudHlwZSA9IFwic3RyaW5nXCI7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKCFvcHRzLnR5cGUpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIk5vIG91dHB1dCB0eXBlIHNwZWNpZmllZC5cIik7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdXRpbHMuY2hlY2tTdXBwb3J0KG9wdHMudHlwZSk7XG5cbiAgICAgICAgICAvLyBhY2NlcHQgbm9kZWpzIGBwcm9jZXNzLnBsYXRmb3JtYFxuICAgICAgICAgIGlmKFxuICAgICAgICAgICAgICBvcHRzLnBsYXRmb3JtID09PSAnZGFyd2luJyB8fFxuICAgICAgICAgICAgICBvcHRzLnBsYXRmb3JtID09PSAnZnJlZWJzZCcgfHxcbiAgICAgICAgICAgICAgb3B0cy5wbGF0Zm9ybSA9PT0gJ2xpbnV4JyB8fFxuICAgICAgICAgICAgICBvcHRzLnBsYXRmb3JtID09PSAnc3Vub3MnXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIG9wdHMucGxhdGZvcm0gPSBcIlVOSVhcIjtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKG9wdHMucGxhdGZvcm0gPT09ICd3aW4zMicpIHtcbiAgICAgICAgICAgICAgb3B0cy5wbGF0Zm9ybSA9IFwiRE9TXCI7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIGNvbW1lbnQgPSBvcHRzLmNvbW1lbnQgfHwgdGhpcy5jb21tZW50IHx8IFwiXCI7XG4gICAgICAgICAgd29ya2VyID0gZ2VuZXJhdGUuZ2VuZXJhdGV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gICB9IGVsc2Uge1xuICAgICAgICBzd2l0Y2godGhpcy50eXBlKSB7XG4gICAgICAgICAgICBjYXNlIFwic3RyaW5nXCI6XG4gICAgICAgICAgICAgICAgZGF0YSA9IHRoaXMuZGF0YS5zdWJzdHJpbmcodGhpcy5pbmRleCwgbmV4dEluZGV4KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInVpbnQ4YXJyYXlcIjpcbiAgICAgICAgICAgICAgICBkYXRhID0gdGhpcy5kYXRhLnN1YmFycmF5KHRoaXMuaW5kZXgsIG5leHRJbmRleCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJhcnJheVwiOlxuICAgICAgICAgICAgY2FzZSBcIm5vZGVidWZmZXJcIjpcbiAgICAgICAgICAgICAgICBkYXRhID0gdGhpcy5kYXRhLnNsaWNlKHRoaXMuaW5kZXgsIG5leHRJbmRleCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmluZGV4ID0gbmV4dEluZGV4O1xuICAgICAgICByZXR1cm4gdGhpcy5wdXNoKHtcbiAgICAgICAgICAgIGRhdGEgOiBkYXRhLFxuICAgICAgICAgICAgbWV0YSA6IHtcbiAgICAgICAgICAgICAgICBwZXJjZW50IDogdGhpcy5tYXggPyB0aGlzLmluZGV4IC8gdGhpcy5tYXggKiAxMDAgOiAwXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cbn07XG5cbm1vZHVsZS5leHBvcnRzID0gRGF0YVdvcmtlcjtcbiIsIid1c2Ugc3RyaWN0JztcblxuLyoqXG4gKiBBIHdvcmtlciB0aGF0IGRvZXMgbm90aGluZyBidXQgcGFzc2luZyBjaHVua3MgdG8gdGhlIG5leHQgb25lLiBUaGlzIGlzIGxpa2VcbiAqIGEgbm9kZWpzIHN0cmVhbSBidXQgd2l0aCBzb21lIGRpZmZlcmVuY2VzLiBPbiB0aGUgZ29vZCBza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G9ydGVkXG4gKi9cbmZ1bmN0aW9uIGNvbmNhdCAodHlwZSwgZGF0YUFycmF5KSB7XG4gICAgdmFyIGksIGluZGV4ID0gMCwgcmVzID0gbnVsbCwgdG90YWxMZW5ndGggPSAwO1xuICAgIGZvcihpID0gMDsgaSA8IGRhdGFBcnJheS5sZW5ndGg7IGkrKykge1xuICAgICAgICB0b3RhbExlbmd0aCArPSBkYXRhQXJyYXlbaV0ubGVuZ3RoO1xuICAgIH1cbiAgICBzd2l0Y2godHlwZSkge1xuICAgICAgICBjYXNlIFwic3RyaW5nXCI6XG4gICAgICAgICAgICByZXR1cm4gZGF0YUFycmF5LmpvaW4oXCJcIik7XG4gICAgICAgICAgY2FzZSBcImFycmF5XCI6XG4gICAgICAgICAgICByZXR1cm4gQXJyYXkucHJvdG90eXBlLmNvbmNhdC5hcHBseShbXSwgZGF0YUFycmF5KTtcbiAgICAgICAgY2FzZSBcInVpbnQ4YXJyYXlcIjpcbiAgICAgICAgICAgIHJlcyA9IG5ldyBVaW50OEFycmF5KHRvdGFsTGVuZ3RoKTtcbiAgICAgICAgICAgIGZvcihpID0gMDsgaSA8IGRhdGFBcnJheS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHJlcy5zZXQoZGF0YUFycmF5W2ldLCBpbmRleCk7XG4gICAgICAgICAgICAgICAgaW5kZXggKz0gZGF0YUFycmF5W2ldLmxlbmd0aDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXM7XG4gICAgICAgIGNhc2UgXCJub2RlYnVmZmVyXCI6XG4gICAgICAgICAgICByZXR1cm4gQnVmZmVyLmNvbmNhdChkYXRhQXJyYXkpO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiY29uY2F0IDogdW5zdXBwb3J0ZWQgdHlwZSAnXCIgICsgdHlwZSArIFwiJ1wiKTtcbiAgICB9XG59XG5cbi8qKlxuICogTGlzdGVuIGEgU3Ry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jb252ZXJ0XG4gICAgZm9yIChpPTAsIG1fcG9zID0gMDsgaSA8IGJ1Zl9sZW47IG1fcG9zKyspIHtcbiAgICAgICAgYyA9IHN0ci5jaGFyQ29kZUF0KG1fcG9zKTtcbiAgICAgICAgaWYgKChjICYgMHhmYzAwKSA9PT0gMHhkODAwICYmIChtX3BvcysxIDwgc3RyX2xlbikpIHtcbiAgICAgICAgICAgIGMyID0gc3RyLmNoYXJDb2RlQXQobV9wb3MrMSk7XG4gICAgICAgICAgICBpZiAoKGMyICYgMHhmYzAwKSA9PT0gMHhkYzAwKSB7XG4gICAgICAgICAgICAgICAgYyA9IDB4MTAwMDAgKyAoKGMgLSAweGQ4MDApIDw8IDEwKSArIChjMiAtIDB4ZGMwMCk7XG4gICAgICAgICAgICAgICAgbV9wb3MrKztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoYyA8IDB4ODApIHtcbiAgICAgICAgICAgIC8qIG9uZSBieXRlICovXG4gICAgICAgICAgICBidWZbaSsrXSA9IGM7XG4gICAgICAgIH0gZWxzZSBpZiAoYyA8IDB4ODAwKSB7XG4gICAgICAgICAgICAvKiB0d28gYnl0ZXMgKi9cbiAgICAgICAgICAgIGJ1ZltpKytdID0gMHhDMCB8IChjID4+PiA2KTtcbiAgICAgICAgICAgIGJ1ZltpKytdID0gMHg4MCB8IChjICYgMHgzZik7XG4gICAgICAgIH0gZWxzZSBpZiAoYyA8IDB4MTAwMDApIHtcbiAgICAgICAgICAgIC8qIHRocmVlIGJ5dGVzICovXG4gICAgICAgICAgICBidWZbaSsrXSA9IDB4RTAgfCAoYyA+Pj4gMTIpO1xuICAgICAgICAgICAgYnVmW2krK10gPSAweDgwIHwgKGMgPj4+IDYgJiAweDNmKTtcbiAgICAgICAgICAgIGJ1ZltpKytdID0gMHg4MCB8IChjICYgMHgzZik7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvKiBmb3VyIGJ5dGVzICovXG4gICAgICAgICAg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GVuID4gNCkgeyB1dGYxNmJ1ZltvdXQrK10gPSAweGZmZmQ7IGkgKz0gY19sZW4tMTsgY29udGludWU7IH1cblxuICAgICAgICAvLyBhcHBseSBtYXNrIG9uIGZpcnN0IGJ5dGVcbiAgICAgICAgYyAmPSBjX2xlbiA9PT0gMiA/IDB4MWYgOiBjX2xlbiA9PT0gMyA/IDB4MGYgOiAweDA3O1xuICAgICAgICAvLyBqb2luIHRoZSByZXN0XG4gICAgICAgIHdoaWxlIChjX2xlbiA+IDEgJiYgaSA8IGxlbikge1xuICAgICAgICAgICAgYyA9IChjIDw8IDYpIHwgKGJ1ZltpKytdICYgMHgzZik7XG4gICAgICAgICAgICBjX2xlbi0tO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gdGVybWluYXRlZCBieSBlbmQgb2Ygc3RyaW5nP1xuICAgICAgICBpZiAoY19sZW4gPiAxKSB7IHV0ZjE2YnVmW291dCsrXSA9IDB4ZmZmZDsgY29udGludWU7IH1cblxuICAgICAgICBpZiAoYyA8IDB4MTAwMDApIHtcbiAgICAgICAgICAgIHV0ZjE2YnVmW291dCsrXSA9IGM7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjIC09IDB4MTAwMDA7XG4gICAgICAgICAgICB1dGYxNmJ1ZltvdXQrK10gPSAweGQ4MDAgfCAoKGMgPj4gMTApICYgMHgzZmYpO1xuICAgICAgICAgICAgdXRmMTZidWZbb3V0KytdID0gMHhkYzAwIHwgKGMgJiAweDNmZik7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBzaHJpbmtCdWYodXRmMTZidWYsIG91dClcbiAgICBpZiAodXRmMTZidWYubGVuZ3RoICE9PSBvdXQpIHtcbiAgICAgICAgaWYodXRmMTZidWYuc3ViYXJyYXkpIHtcbiAgICAgICAgICAgIHV0ZjE2YnVmID0gdXRmMTZidWYuc3ViYXJyYXkoMCwgb3V0KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHV0Z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Y3QgQmxvYl0nXS5pbmRleE9mKE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChkYXRhKSkgIT09IC0xKTtcblxuICAgICAgICBpZiAoaXNCbG9iICYmIHR5cGVvZiBGaWxlUmVhZGVyICE9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgICAgICByZXR1cm4gbmV3IGV4dGVybmFsLlByb21pc2UoZnVuY3Rpb24gKHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgICAgICAgICAgIHZhciByZWFkZXIgPSBuZXcgRmlsZVJlYWRlcigpO1xuXG4gICAgICAgICAgICAgICAgcmVhZGVyLm9ubG9hZCA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShlLnRhcmdldC5yZXN1bHQpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgcmVhZGVyLm9uZXJyb3IgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlLnRhcmdldC5lcnJvcik7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICByZWFkZXIucmVhZEFzQXJyYXlCdWZmZXIoZGF0YSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBkYXRhO1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gcHJvbWlzZS50aGVuKGZ1bmN0aW9uKGRhdGEpIHtcbiAgICAgICAgdmFyIGRhdGFUeXBlID0gZXhwb3J0cy5nZXRUeXBlT2YoZGF0YSk7XG5cbiAgICAgICAgaWYgKCFkYXRhVHlwZSkge1xuICAgICAgICAgICAgcmV0dXJuIGV4dGVybmFsLlByb21pc2UucmVqZWN0KFxuICAgICAgICAgICAgICAgIG5ldyBFcnJvcihcIkNhbid0IHJlYWQgdGhlIGRhdGEgb2YgJ1wiICsgbmFtZSArIFwiJy4gSXMgaXQgXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICBcImluIGEgc3VwcG9ydGVkIEphdmFTY3JpcHQgdHlwZSAoU3RyaW5nLCBCbG9iLCBBcnJheUJ1ZmZlciwgZXRjKSA/XCIpXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIC8vIHNwZWNpYWwgY2FzZSA6IGl0J3Mgd2F5IGVhc2llciB0byB3b3JrIHdpdGggVWludDhBcnJheSB0aGFuIHdpdGggQXJyYXlCdWZmZXJcbiAgICAgICAgaWYgKGRhdGFUeXBlID09PSBcImFycmF5YnVmZmVyXCIpIHtcbiAgICAgICAgICAgIGRhdGEgPSBleHBvcnRzLnRyYW5zZm9ybVRvKFwidWludDhhcnJheVwiLCBkYXRhKTtcbiAgICAgICAgfSBlbHNlIGlmIChkYXRhVHlwZSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgaWYgKGlzQmFzZTY0KSB7XG4gICAgICAgICAgICAgICAgZGF0YSA9IGJhc2U2NC5kZWNvZGUoZGF0YSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChpc0JpbmFyeSkge1xuICAgICAgICAgICAgICAgIC8vIG9wdGltaXplZEJpbmFyeVN0cmluZyA9PT0gdHJ1ZSBtZWFucyB0aGF0IHRoZSBmaWxlIGhhcyBhbHJlYWR5IGJlZW4gZmlsdGVyZWQgd2l0aCBhIDB4RkYgbWFza1xuICAgICAgICAgICAgICAgIGlmIChpc09wdGltaXplZEJpbmFyeVN0cmluZyAhPT0gdHJ1ZSkge1xuICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIGlzIGEgc3RyaW5nLCBub3QgaW4gYSBiYXNlNjQgZm9ybWF0LlxuICAgICAgICAgICAgICAgICAgICAvLyBCZSBzdXJlIHRoYXQgdGhpcyBpcyBhIGNvcnJlY3QgXCJiaW5hcnkgc3RyaW5nXCJcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IHN0cmluZzJiaW5hcnkoZGF0YS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dGlscy5NQVhfVkFMVUVfMzJCSVRTKSB7XG4gICAgICAgICAgICB0aGlzLmNvbXByZXNzZWRTaXplID0gZXh0cmFSZWFkZXIucmVhZEludCg4KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5sb2NhbEhlYWRlck9mZnNldCA9PT0gdXRpbHMuTUFYX1ZBTFVFXzMyQklUUykge1xuICAgICAgICAgICAgdGhpcy5sb2NhbEhlYWRlck9mZnNldCA9IGV4dHJhUmVhZGVyLnJlYWRJbnQoOCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuZGlza051bWJlclN0YXJ0ID09PSB1dGlscy5NQVhfVkFMVUVfMzJCSVRTKSB7XG4gICAgICAgICAgICB0aGlzLmRpc2tOdW1iZXJTdGFydCA9IGV4dHJhUmVhZGVyLnJlYWRJbnQoNCk7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIC8qKlxuICAgICAqIFJlYWQgdGhlIGNlbnRyYWwgcGFydCBvZiBhIHppcCBmaWxlIGFuZCBhZGQgdGhlIGluZm8gaW4gdGhpcyBvYmplY3QuXG4gICAgICogQHBhcmFtIHtEYXRhUmVhZGVyfSByZWFkZXIgdGhlIHJlYWRlciB0byB1c2UuXG4gICAgICovXG4gICAgcmVhZEV4dHJhRmllbGRzOiBmdW5jdGlvbihyZWFkZXIpIHtcbiAgICAgICAgdmFyIGVuZCA9IHJlYWRlci5pbmRleCArIHRoaXMuZXh0cmFGaWVsZHNMZW5ndGgsXG4gICAgICAgICAgICBleHRyYUZpZWxkSWQsXG4gICAgICAgICAgICBleHRyYUZpZWxkTGVuZ3RoLFxuICAgICAgICAgICAgZXh0cmFGaWVsZFZhbHVlO1xuXG4gICAgICAgIGlmICghdGhpcy5leHRyYUZpZWxkcykge1xuICAgICAgICAgICAgdGhpcy5leHRyYUZpZWxkcyA9IHt9O1xuICAgICAgICB9XG5cbiAgICAgICAgd2hpbGUgKHJlYWRlci5pbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgZXh0cmFGaWVsZElkID0gcmVhZGVyLnJlYWRJbnQoMik7XG4gICAgICAgICAgICBleHRyYUZpZWxkTGVuZ3RoID0gcmVhZGVyLnJlYWRJbnQoMik7XG4gICAgICAgICAgICBleHRyYUZpZWxkVmFsdWUgPSByZWFkZXIucmVhZERhdGEoZXh0cmFGaWVsZExlbmd0aCk7XG5cbiAgICAgICAgICAgIHRoaXMuZXh0cmFGaWVsZHNbZXh0cmFGaWVsZElkXSA9IHtcbiAgICAgICAgICAgICAgICBpZDogZXh0cmFGaWVsZElkLFxuICAgICAgICAgICAgICAgIGxlbmd0aDogZXh0cmFGaWVsZExlbmd0aCxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZXh0cmFGaWVsZFZhbHVlXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfSxcbiAgICAvKipcbiAgICAgKiBBcHBseSBhbiBVVEY4IHRyYW5zZm9ybWF0aW9uIGlmIG5lZWRlZC5cbiAgICAgKi9cbiAgICBoYW5kbGVVVEY4OiBmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIGRlY29kZVBhcmFtVHlwZSA9IHN1cHBvcnQudWludDhhcnJheSA/IFwidWludDhhcnJheVwiIDogXCJhcnJheVwiO1xuICAgICAgICBpZiAodGhpcy51c2VVVEY4KCkpIHtcbiAgICAgICAgICAgIHRoaXMuZmlsZU5hbWVTdHIgPSB1dGY4LnV0ZjhkZWNvZGUodGhpcy5maWxlTmFtZSk7XG4gICAgICAgICAgICB0aGlzLmZpbGVDb21tZW50U3RyID0gdXRmOC51dGY4ZGVjb2RlKHRoaXMuZmlsZUNvbW1lbnQpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIHVwYXRoID0gdGhpcy5maW5kRXh0cmFGaWVsZFVuaWNvZGVQYXRoKCk7XG4gICAgICAgICAgICBpZiAodXBhdGggIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmZpbGVOYW1lU3RyID0gdXBhd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vbi5tYWdpY1xuICAgICAgICApIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kYXRhLmdldENvbXByZXNzZWRXb3JrZXIoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSB0aGlzLl9kZWNvbXByZXNzV29ya2VyKCk7XG4gICAgICAgICAgICBpZighdGhpcy5fZGF0YUJpbmFyeSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHJlc3VsdC5waXBlKG5ldyB1dGY4LlV0ZjhFbmNvZGVXb3JrZXIoKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gQ29tcHJlc3NlZE9iamVjdC5jcmVhdGVXb3JrZXJGcm9tKHJlc3VsdCwgY29tcHJlc3Npb24sIGNvbXByZXNzaW9uT3B0aW9ucyk7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIC8qKlxuICAgICAqIFJldHVybiBhIHdvcmtlciBmb3IgdGhlIGRlY29tcHJlc3NlZCBjb250ZW50LlxuICAgICAqIEBwcml2YXRlXG4gICAgICogQHJldHVybiBXb3JrZXIgdGhlIHdvcmtlci5cbiAgICAgKi9cbiAgICBfZGVjb21wcmVzc1dvcmtlciA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKHRoaXMuX2RhdGEgaW5zdGFuY2VvZiBDb21wcmVzc2VkT2JqZWN0KSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fZGF0YS5nZXRDb250ZW50V29ya2VyKCk7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5fZGF0YSBpbnN0YW5jZW9mIEdlbmVyaWNXb3JrZXIpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kYXRhO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBEYXRhV29ya2VyKHRoaXMuX2RhdGEpO1xuICAgICAgICB9XG4gICAgfVxufTtcblxudmFyIHJlbW92ZWRNZXRob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LmJpbmQob2JqKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEZ1bmN0aW9uLnByb3RvdHlwZS5iaW5kLmNhbGwobWV0aG9kLCBvYmopO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIC8vIE1pc3NpbmcgYmluZCBzaGltIG9yIElFOCArIE1vZGVybml6ciwgZmFsbGJhY2sgdG8gd3JhcHBpbmdcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGdW5jdGlvbi5wcm90b3R5cGUuYXBwbHkuYXBwbHkobWV0aG9kLCBbb2JqLCBhcmd1bWVudHNdKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gVHJhY2UoKSBkb2Vzbid0IHByaW50IHRoZSBtZXNzYWdlIGluIElFLCBzbyBmb3IgdGhhdCBjYXNlIHdlIG5lZWQgdG8gd3JhcCBpdFxuICAgIGZ1bmN0aW9uIHRyYWNlRm9ySUUoKSB7XG4gICAgICAgIGlmIChjb25zb2xlLmxvZykge1xuICAgICAgICAgICAgaWYgKGNvbnNvbGUubG9nLmFwcGx5KSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2cuYXBwbHkoY29uc29sZSwgYXJndW1lbnRzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gSW4gb2xkIElFLCBuYXRpdmUgY29uc29sZSBtZXRob2RzIHRoZW1zZWx2ZXMgZG9uJ3QgaGF2ZSBhcHBseSgpLlxuICAgICAgICAgICAgICAgIEZ1bmN0aW9uLnByb3RvdHlwZS5hcHBseS5hcHBseShjb25zb2xlLmxvZywgW2NvbnNvbGUsIGFyZ3VtZW50c10pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9X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gICAgICAgICAgaWYgKHR5cGVvZiBzdG9yZWRMZXZlbCA9PT0gdW5kZWZpbmVkVHlwZSkge1xuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgdmFyIGNvb2tpZSA9IHdpbmRvdy5kb2N1bWVudC5jb29raWU7XG4gICAgICAgICAgICAgICAgICB2YXIgbG9jYXRpb24gPSBjb29raWUuaW5kZXhPZihcbiAgICAgICAgICAgICAgICAgICAgICBlbmNvZGVVUklDb21wb25lbnQoc3RvcmFnZUtleSkgKyBcIj1cIik7XG4gICAgICAgICAgICAgICAgICBpZiAobG9jYXRpb24gIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgc3RvcmVkTGV2ZWwgPSAvXihbXjtdKykvLmV4ZWMoY29va2llLnNsaWNlKGxvY2F0aW9uKSlbMV07XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0gY2F0Y2ggKGlnbm9yZSkge31cbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyBJZiB0aGUgc3RvcmVkIGxldmVsIGlzIG5vdCB2YWxpZCwgdHJlYXQgaXQgYXMgaWYgbm90aGluZyB3YXMgc3RvcmVkLlxuICAgICAgICAgIGlmIChzZWxmLmxldmVsc1tzdG9yZWRMZXZlbF0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICBzdG9yZWRMZXZlbCA9IHVuZGVmaW5lZDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gc3RvcmVkTGV2ZWw7XG4gICAgICB9XG5cbiAgICAgIC8qXG4gICAgICAgKlxuICAgICAgICogUHVibGljIGxvZ2dlciBBUEkgLSBzZWUgaHR0cHM6Ly9naXRodWIuY29tL3BpbXRlcnJ5L2xvZ2xldmVsIGZvciBkZXRhaWxzXG4gICAgICAgKlxuICAgICAgICovXG5cbiAgICAgIHNlbGYubmFtZSA9IG5hbWU7XG5cbiAgICAgIHNlbGYubGV2ZWxzID0geyBcIlRSQUNFXC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ZlbCA8IHNlbGYubGV2ZWxzLlNJTEVOVCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiTm8gY29uc29sZSBhdmFpbGFibGUgZm9yIGxvZ2dpbmdcIjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRocm93IFwibG9nLnNldExldmVsKCkgY2FsbGVkIHdpdGggaW52YWxpZCBsZXZlbDogXCIgKyBsZXZlbDtcbiAgICAgICAgICB9XG4gICAgICB9O1xuXG4gICAgICBzZWxmLnNldERlZmF1bHRMZXZlbCA9IGZ1bmN0aW9uIChsZXZlbCkge1xuICAgICAgICAgIGlmICghZ2V0UGVyc2lzdGVkTGV2ZWwoKSkge1xuICAgICAgICAgICAgICBzZWxmLnNldExldmVsKGxldmVsLCBmYWxzZSk7XG4gICAgICAgICAgfVxuICAgICAgfTtcblxuICAgICAgc2VsZi5lbmFibGVBbGwgPSBmdW5jdGlvbihwZXJzaXN0KSB7XG4gICAgICAgICAgc2VsZi5zZXRMZXZlbChzZWxmLmxldmVscy5UUkFDRSwgcGVyc2lzdCk7XG4gICAgICB9O1xuXG4gICAgICBzZWxmLmRpc2FibGVBbGwgPSBmdW5jdGlvbihwZXJzaXN0KSB7XG4gICAgICAgICAgc2VsZi5zZXRMZXZlbChzZWxmLmxldmVscy5TSUxFTlQsIHBlcnNpc3QpO1xuICAgICAgfTtcblxuICAgICAgLy8gSW5pdGlhbGl6ZSB3aXRoIHRoZSByaWdodCBsZXZlbFxuICAgICAgdmFyIGluaXRpYWxMZXZlbCA9IGdldFBlcnNpc3RlZExldmVsKCk7XG4gICAgICBpZiAoaW5pdGlhbExldmVsID09IG51bGwpIHtcbiAgICAgICAgICBpbml0aWFsTGV2ZWwgPSBkZWZhdWx0TGV2ZWwgPT0gbnVsbCA/IFwiV0FSTlwiIDogZGVmYXVsdExldmVsO1xuICAgICAgfVxuICAgICAgc2VsZi5zZXRMZXZlbChpbml0aWFsTGV2ZWw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Btc2cgICAgICAgICAgPSByZXF1aXJlKCcuL3psaWIvbWVzc2FnZXMnKTtcbnZhciBaU3RyZWFtICAgICAgPSByZXF1aXJlKCcuL3psaWIvenN0cmVhbScpO1xuXG52YXIgdG9TdHJpbmcgPSBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nO1xuXG4vKiBQdWJsaWMgY29uc3RhbnRzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qL1xuLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki9cblxudmFyIFpfTk9fRkxVU0ggICAgICA9IDA7XG52YXIgWl9GSU5JU0ggICAgICAgID0gNDtcblxudmFyIFpfT0sgICAgICAgICAgICA9IDA7XG52YXIgWl9TVFJFQU1fRU5EICAgID0gMTtcbnZhciBaX1NZTkNfRkxVU0ggICAgPSAyO1xuXG52YXIgWl9ERUZBVUxUX0NPTVBSRVNTSU9OID0gLTE7XG5cbnZhciBaX0RFRkFVTFRfU1RSQVRFR1kgICAgPSAwO1xuXG52YXIgWl9ERUZMQVRFRCAgPSA4O1xuXG4vKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qL1xuXG5cbi8qKlxuICogY2xhc3MgRGVmbGF0ZVxuICpcbiAqIEdlbmVyaWMgSlMtc3R5bGUgd3JhcHBlciBmb3IgemxpYiBjYWxscy4gSWYgeW91IGRvbid0IG5lZWRcbiAqIHN0cmVhbWluZyBiZWhhdmlvdXIgLSB1c2UgbW9yZSBzaW1wbGUgZnVuY3Rpb25zOiBbW2RlZmxhdGVdXSxcbiAqIFtbZGVmbGF0ZVJhd11dIGFuZCBbW2d6aXBdXS5cbiAqKi9cblxuLyogaW50ZXJuYWxcbiAqIERlZmxhdGUuY2h1bmtzIC0+IEFycmF5XG4gKlxu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NPTVBSRVNTSU9OOiAgICAgICAgIDAsXG4gIFpfQkVTVF9TUEVFRDogICAgICAgICAgICAgMSxcbiAgWl9CRVNUX0NPTVBSRVNTSU9OOiAgICAgICA5LFxuICBaX0RFRkFVTFRfQ09NUFJFU1NJT046ICAgLTEsXG5cblxuICBaX0ZJTFRFUkVEOiAgICAgICAgICAgICAgIDEsXG4gIFpfSFVGRk1BTl9PTkxZOiAgICAgICAgICAgMixcbiAgWl9STEU6ICAgICAgICAgICAgICAgICAgICAzLFxuICBaX0ZJWEVEOiAgICAgICAgICAgICAgICAgIDQsXG4gIFpfREVGQVVMVF9TVFJBVEVHWTogICAgICAgMCxcblxuICAvKiBQb3NzaWJsZSB2YWx1ZXMgb2YgdGhlIGRhdGFfdHlwZSBmaWVsZCAodGhvdWdoIHNlZSBpbmZsYXRlKCkpICovXG4gIFpfQklOQVJZOiAgICAgICAgICAgICAgICAgMCxcbiAgWl9URVhUOiAgICAgICAgICAgICAgICAgICAxLFxuICAvL1pfQVNDSUk6ICAgICAgICAgICAgICAgIDEsIC8vID0gWl9URVhUIChkZXByZWNhdGVkKVxuICBaX1VOS05PV046ICAgICAgICAgICAgICAgIDIsXG5cbiAgLyogVGhlIGRlZmxhdGUgY29tcHJlc3Npb24gbWV0aG9kICovXG4gIFpfREVGTEFURUQ6ICAgICAgICAgICAgICAgOFxuICAvL1pfTlVMTDogICAgICAgICAgICAgICAgIG51bGwgLy8gVXNlIC0xIG9yIG51bGwgaW5saW5lLCBkZXBlbmRpbmcgb24gdmFyIHR5cGVcbn07XG4iLCIndXNlIHN0cmljdCc7XG5cbi8vIE5vdGU6IHdlIGNhbid0IGdldCBzaWduaWZpY2FudCBzcGVlZCBib29zdCBoZXJlLlxuLy8gU28gd3JpdGUgY29kZSB0byBtaW5pbWl6ZSBzaXplIC0gbm8gcHJlZ2VuZXJhdGVkIHRhYmxlc1xuLy8gYW5kIGFycmF5IHRvb2xzIGRlcGVuZGVuY2llcy5cblxuLy8gKEMpIDE5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iAgICAgICAgcHV0X2J5dGUocywgT1NfQ09ERSk7XG4gICAgICAgIHMuc3RhdHVzID0gQlVTWV9TVEFURTtcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBwdXRfYnl0ZShzLCAocy5nemhlYWQudGV4dCA/IDEgOiAwKSArXG4gICAgICAgICAgICAgICAgICAgIChzLmd6aGVhZC5oY3JjID8gMiA6IDApICtcbiAgICAgICAgICAgICAgICAgICAgKCFzLmd6aGVhZC5leHRyYSA/IDAgOiA0KSArXG4gICAgICAgICAgICAgICAgICAgICghcy5nemhlYWQubmFtZSA/IDAgOiA4KSArXG4gICAgICAgICAgICAgICAgICAgICghcy5nemhlYWQuY29tbWVudCA/IDAgOiAxNilcbiAgICAgICAgKTtcbiAgICAgICAgcHV0X2J5dGUocywgcy5nemhlYWQudGltZSAmIDB4ZmYpO1xuICAgICAgICBwdXRfYnl0ZShzLCAocy5nemhlYWQudGltZSA+PiA4KSAmIDB4ZmYpO1xuICAgICAgICBwdXRfYnl0ZShzLCAocy5nemhlYWQudGltZSA+PiAxNikgJiAweGZmKTtcbiAgICAgICAgcHV0X2J5dGUocywgKHMuZ3poZWFkLnRpbWUgPj4gMjQpICYgMHhmZik7XG4gICAgICAgIHB1dF9ieXRlKHMsIHMubGV2ZWwgPT09IDkgPyAyIDpcbiAgICAgICAgICAgICAgICAgICAgKHMuc3RyYXRlZ3kgPj0gWl9IVUZGTUFOX09OTFkgfHwgcy5sZXZlbCA8IDIgP1xuICAgICAgICAgICAgICAgICAgICAgNCA6IDApKTtcbiAgICAgICAgcHV0X2J5dGUocywgcy5nemhlYWQub3MgJiAweGZmKTtcbiAgICAgICAgaWYgKHMuZ3poZWFkLmV4dHJhICYmIHMuZ3poZWFkLmV4dHJhLmxlbmd0aCkge1xuICAgICAgICAgIHB1dF9ieXRlKHMsIHMuZ3poZWFkLmV4dHJhLmxlbmd0aCAmIDB4ZmYpO1xuICAgICAgICAgIHB1dF9ieXRlKHMsIChzLmd6aG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YHNfd2luZG93YCBpbnN0ZWFkIGB3aW5kb3dgLCBhdm9pZCBjb25mbGljdCB3aXRoIGluc3RydW1lbnRhdGlvbiB0b29sc1xuICB2YXIgc193aW5kb3c7ICAgICAgICAgICAgICAgLyogYWxsb2NhdGVkIHNsaWRpbmcgd2luZG93LCBpZiB3c2l6ZSAhPSAwICovXG4gIHZhciBob2xkOyAgICAgICAgICAgICAgICAgICAvKiBsb2NhbCBzdHJtLmhvbGQgKi9cbiAgdmFyIGJpdHM7ICAgICAgICAgICAgICAgICAgIC8qIGxvY2FsIHN0cm0uYml0cyAqL1xuICB2YXIgbGNvZGU7ICAgICAgICAgICAgICAgICAgLyogbG9jYWwgc3RybS5sZW5jb2RlICovXG4gIHZhciBkY29kZTsgICAgICAgICAgICAgICAgICAvKiBsb2NhbCBzdHJtLmRpc3Rjb2RlICovXG4gIHZhciBsbWFzazsgICAgICAgICAgICAgICAgICAvKiBtYXNrIGZvciBmaXJzdCBsZXZlbCBvZiBsZW5ndGggY29kZXMgKi9cbiAgdmFyIGRtYXNrOyAgICAgICAgICAgICAgICAgIC8qIG1hc2sgZm9yIGZpcnN0IGxldmVsIG9mIGRpc3RhbmNlIGNvZGVzICovXG4gIHZhciBoZXJlOyAgICAgICAgICAgICAgICAgICAvKiByZXRyaWV2ZWQgdGFibGUgZW50cnkgKi9cbiAgdmFyIG9wOyAgICAgICAgICAgICAgICAgICAgIC8qIGNvZGUgYml0cywgb3BlcmF0aW9uLCBleHRyYSBiaXRzLCBvciAqL1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogIHdpbmRvdyBwb3NpdGlvbiwgd2luZG93IGJ5dGVzIHRvIGNvcHkgKi9cbiAgdmFyIGxlbjsgICAgICAgICAgICAgICAgICAgIC8qIG1hdGNoIGxlbmd0aCwgdW51c2VkIGJ5dGVzICovXG4gIHZhciBkaXN0OyAgICAgICAgICAgICAgICAgICAvKiBtYXRjaCBkaXN0YW5jZSAqL1xuICB2YXIgZnJvbTsg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lcyB1bnRpbCBlbmQtb2YtYmxvY2sgb3Igbm90IGVub3VnaFxuICAgICBpbnB1dCBkYXRhIG9yIG91dHB1dCBzcGFjZSAqL1xuXG4gIHRvcDpcbiAgZG8ge1xuICAgIGlmIChiaXRzIDwgMTUpIHtcbiAgICAgIGhvbGQgKz0gaW5wdXRbX2luKytdIDw8IGJpdHM7XG4gICAgICBiaXRzICs9IDg7XG4gICAgICBob2xkICs9IGlucHV0W19pbisrXSA8PCBiaXRzO1xuICAgICAgYml0cyArPSA4O1xuICAgIH1cblxuICAgIGhlcmUgPSBsY29kZVtob2xkICYgbG1hc2tdO1xuXG4gICAgZG9sZW46XG4gICAgZm9yICg7OykgeyAvLyBHb3RvIGVtdWxhdGlvblxuICAgICAgb3AgPSBoZXJlID4+PiAyNC8qaGVyZS5iaXRzKi87XG4gICAgICBob2xkID4+Pj0gb3A7XG4gICAgICBiaXRzIC09IG9wO1xuICAgICAgb3AgPSAoaGVyZSA+Pj4gMTYpICYgMHhmZi8qaGVyZS5vcCovO1xuICAgICAgaWYgKG9wID09PSAwKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBsaXRlcmFsICovXG4gICAgICAgIC8vVHJhY2V2digoc3RkZXJyLCBoZXJlLnZhbCA+PSAweDIwICYmIGhlcmUudmFsIDwgMHg3ZiA/XG4gICAgICAgIC8vICAgICAgICBcImluZmxhdGU6ICAgICAgICAgbGl0ZXJhbCAnJWMnXFxuXCIgOlxuICAgICAgICAvLyAgICAgICAgXCJpbmZsYXRlOiAgICAgICAgIGxpdGVyYWwgMHglMDJ4XFxuXCIsIGhlcmUudmFsKSk7XG4gICAgICAgIG91dHB1dFtfb3V0KytdID0gaGVyZSAmIDB4ZmZmZi8qaGVyZS52YWwqLztcbiAgICAgIH1cbiAgICAgIGVsc2UgaWYgKG9wICYgMTYpIHsgICAgICAgICAgICAgICAgICAgICAvKiBsZW5ndGggYmFzZSAqL1xuICAgICAgICBsZW4gPSBoZXJlICYgMHhmZmZmLypoZXJlLnZhbCovO1xuICAgICAgICBvcCAmPSAxNTsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgZXh0cmEgYml0cyAqL1xuICAgICAgICBpZiAob3ApIHtcbiAgICAgICAgICBpZiAoYml0cyA8IG9wKSB7XG4gICAgICAgICAgICBob2xkICs9IGlucHV0W19pbisrXSA8PCBiaXRzO1xuICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgIH1cbiAgICAgICAgICBsZW4gKz0gaG9sZCAmICgoMSA8PCBvcCkgLSAxKTtcbiAgICAgICAgICBob2xkID4+Pj0gb3A7XG4gICAgICAgICAgYml0cyAtPSBvcDtcbiAgICAgICAgfVxuICAgICAgICAvL1RyYWNldnYoKHN0ZGVyciwgXCJpbmZsYXRlOiAgICAgICAgIGxlbmd0aCAldVxcblwiLCBsZW4pKTtcbiAgICAgICAgaWYgKGJpdHMgPCAxNSkge1xuICAgICAgICAgIGhvbGQgKz0gaW5wdXRbX2luKytdIDw8IGJpdHM7XG4gICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgIGhvbGQgKz0gaW5wdXRbX2luKytdIDw8IGJpdHM7XG4gICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICB9XG4gICAgICAgIGhlcmUgPSBkY29kZVtob2xkICYgZG1hc2tdO1xuXG4gICAgICAgIGRvZGlzdDpcbiAgICAgICAgZm9yICg7OykgeyAvLyBnb3RvIGVtdWxhdGlvblxuICAgICAgICAgIG9wID0gaGVyZSA+Pj4gMjQvKmhlcmUuYml0cyovO1xuICAgICAgICAgIGhvbGQgPj4+PSBvcDtcbiAgICAgICAgICBiaXRzIC09IG9wO1xuICAgICAgICAgIG9wID0gKGhlcmUgPj4+IDE2KSAmIDB4ZmYvKmhlcmUub3AqLztcblxuICAgICAgICAgIGlmIChvcCAmIDE2KSB7ICAgICAgICAgICAgICAgICAgICAgIC8qIGRpc3RhbmNlIGJhc2UgKi9cbiAgICAgICAgICAgIGRpc3QgPSBoZXJlICYgMHhmZmZmLypoZXJlLnZhbCovO1xuICAgICAgICAgICAgb3AgJj0gMTU7ICAgICAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgZXh0cmEgYml0cyAqL1xuICAgICAgICAgICAgaWYgKGJpdHMgPCBvcCkge1xuICAgICAgICAgICAgICBob2xkICs9IGlucHV0W19pbisrXSA8PCBiaXRzO1xuICAgICAgICAgICAgICBiaXRzICs9IDg7XG4gICAgICAgICAgICAgIGlmIChiaXRzIDwgb3ApIHtcbiAgICAgICAgICAgICAgICBob2xkICs9IGlucHV0W19pbisrXSA8PCBiaXRzO1xuICAgICAgICAgICAgICAgIGJpdHMgKz0gODtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGlzdCArPSBob2xkICYgKCgxIDw8IG9wKSAtIDEpO1xuLy8jaWZkZWYgSU5GTEFURV9TVFJJQ1RcbiAgICAgICAgICAgIGlmIChkaXN0ID4gZG1heCkge1xuICAgICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGRpc3RhbmNlIHRvbyBmYXIgYmFjayc7XG4gICAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7XG4gICAgICAgICAgICAgIGJyZWFrIHRvcDtcbiAgICAgICAgICAgIH1cbi8vI2VuZGlmXG4gICAgICAgICAgICBob2xkID4+Pj0gb3A7XG4gICAgICAgICAgICBiaXRzIC09IG9wO1xuICAgICAgICAgICAgLy9UcmFjZXZ2KChzdGRlcnIsIFwiaW5mbGF0ZTogICAgICAgICBkaXN0YW5jZSAldVxcblwiLCBkaXN0KSk7XG4gICAgICAgICAgICBvcCA9IF9vdXQgLSBiZWc7ICAgICAgICAgICAgICAgIC8qIG1heCBkaXN0YW5jZSBpbiBvdXRwdXQgKi9cbiAgICAgICAgICAgIGlmIChkaXN0ID4gb3ApIHsgICAgICAgICAgICAgICAgLyogc2VlIGlmIGNvcHkgZnJvbSB3aW5kb3cgKi9cbiAgICAgICAgICAgICAgb3AgPSBkaXN0IC0gb3A7ICAgICAgICAgICAgICAgLyogZGlzdGFuY2UgYmFjayBpbiB3aW5kb3cgKi9cbiAgICAgICAgICAgICAgaWYgKG9wID4gd2hhdmUpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RhdGUuc2FuZSkge1xuICAgICAgICAgICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBkaXN0YW5jZSB0b28gZmFyIGJhY2snO1xuICAgICAgICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRDtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIHRvcDtcbiAgICAgICAgICAgICAgICB9XG5cbi8vICghKSBUaGlzIGJsb2NrIGlzIGRpc2FibGVkIGluIHpsaWIgZGVmYXVsdHMsXG4vLyBkb24ndCBlbmFibGUgaXQgZm9yIGJpbmFyeSBjb21wYXRpYmlsaXR5XG4vLyNpZmRlZiBJTkZMQVRFX0FMTE9XX0lOVkFMSURfRElTVEFOQ0VfVE9PRkFSX0FSUlJcbi8vICAgICAgICAgICAgICAgIGlmIChsZW4gPD0gb3AgLSB3aGF2ZSkge1xuLy8gICAgICAgICAgICAgICAgICBkbyB7XG4vLyAgICAgICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSAwO1xuLy8gICAgICAgICAgICAgICAgICB9IHdoaWxlICgtLWxlbik7XG4vLyAgICAgICAgICAgICAgICAgIGNvbnRpbnVlIHRvcDtcbi8vICAgICAgICAgICAgICAgIH1cbi8vICAgICAgICAgICAgICAgIGxlbiAtPSBvcCAtIHdoYXZlO1xuLy8gICAgICAgICAgICAgICAgZG8ge1xuLy8gICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IDA7XG4vLyAgICAgICAgICAgICAgICB9IHdoaWxlICgtLW9wID4gd2hhdmUpO1xuLy8gICAgICAgICAgICAgICAgaWYgKG9wID09PSAwKSB7XG4vLyAgICAgICAgICAgICAgICAgIGZyb20gPSBfb3V0IC0gZGlzdDtcbi8vICAgICAgICAgICAgICAgICAgZG8ge1xuLy8gICAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gb3V0cHV0W2Zyb20rK107XG4vLyAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKC0tbGVuKTtcbi8vICAgICAgICAgICAgICAgICAgY29udGludWUgdG9wO1xuLy8gICAgICAgICAgICAgICAgfVxuLy8jZW5kaWZcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBmcm9tID0gMDsgLy8gd2luZG93IGluZGV4XG4gICAgICAgICAgICAgIGZyb21fc291cmNlID0gc193aW5kb3c7XG4gICAgICAgICAgICAgIGlmICh3bmV4dCA9PT0gMCkgeyAgICAgICAgICAgLyogdmVyeSBjb21tb24gY2FzZSAqL1xuICAgICAgICAgICAgICAgIGZyb20gKz0gd3NpemUgLSBvcDtcbiAgICAgICAgICAgICAgICBpZiAob3AgPCBsZW4pIHsgICAgICAgICAvKiBzb21lIGZyb20gd2luZG93ICovXG4gICAgICAgICAgICAgICAgICBsZW4gLT0gb3A7XG4gICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gc193aW5kb3dbZnJvbSsrXTtcbiAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKC0tb3ApO1xuICAgICAgICAgICAgICAgICAgZnJvbSA9IF9vdXQgLSBkaXN0OyAgLyogcmVzdCBmcm9tIG91dHB1dCAqL1xuICAgICAgICAgICAgICAgICAgZnJvbV9zb3VyY2UgPSBvdXRwdXQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGVsc2UgaWYgKHduZXh0IDwgb3ApIHsgICAgICAvKiB3cmFwIGFyb3VuZCB3aW5kb3cgKi9cbiAgICAgICAgICAgICAgICBmcm9tICs9IHdzaXplICsgd25leHQgLSBvcDtcbiAgICAgICAgICAgICAgICBvcCAtPSB3bmV4dDtcbiAgICAgICAgICAgICAgICBpZiAob3AgPCBsZW4pIHsgICAgICAgICAvKiBzb21lIGZyb20gZW5kIG9mIHdpbmRvdyAqL1xuICAgICAgICAgICAgICAgICAgbGVuIC09IG9wO1xuICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IHNfd2luZG93W2Zyb20rK107XG4gICAgICAgICAgICAgICAgICB9IHdoaWxlICgtLW9wKTtcbiAgICAgICAgICAgICAgICAgIGZyb20gPSAwO1xuICAgICAgICAgICAgICAgICAgaWYgKHduZXh0IDwgbGVuKSB7ICAvKiBzb21lIGZyb20gc3RhcnQgb2Ygd2luZG93ICovXG4gICAgICAgICAgICAgICAgICAgIG9wID0gd25leHQ7XG4gICAgICAgICAgICAgICAgICAgIGxlbiAtPSBvcDtcbiAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gc193aW5kb3dbZnJvbSsrXTtcbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoLS1vcCk7XG4gICAgICAgICAgICAgICAgICAgIGZyb20gPSBfb3V0IC0gZGlzdDsgICAgICAvKiByZXN0IGZyb20gb3V0cHV0ICovXG4gICAgICAgICAgICAgICAgICAgIGZyb21fc291cmNlID0gb3V0cHV0O1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBlbHNlIHsgICAgICAgICAgICAgICAgICAgICAgLyogY29udGlndW91cyBpbiB3aW5kb3cgKi9cbiAgICAgICAgICAgICAgICBmcm9tICs9IHduZXh0IC0gb3A7XG4gICAgICAgICAgICAgICAgaWYgKG9wIDwgbGVuKSB7ICAgICAgICAgLyogc29tZSBmcm9tIHdpbmRvdyAqL1xuICAgICAgICAgICAgICAgICAgbGVuIC09IG9wO1xuICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IHNfd2luZG93W2Zyb20rK107XG4gICAgICAgICAgICAgICAgICB9IHdoaWxlICgtLW9wKTtcbiAgICAgICAgICAgICAgICAgIGZyb20gPSBfb3V0IC0gZGlzdDsgIC8qIHJlc3QgZnJvbSBvdXRwdXQgKi9cbiAgICAgICAgICAgICAgICAgIGZyb21fc291cmNlID0gb3V0cHV0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB3aGlsZSAobGVuID4gMikge1xuICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gZnJvbV9zb3VyY2VbZnJvbSsrXTtcbiAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IGZyb21fc291cmNlW2Zyb20rK107XG4gICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSBmcm9tX3NvdXJjZVtmcm9tKytdO1xuICAgICAgICAgICAgICAgIGxlbiAtPSAzO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChsZW4pIHtcbiAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IGZyb21fc291cmNlW2Zyb20rK107XG4gICAgICAgICAgICAgICAgaWYgKGxlbiA+IDEpIHtcbiAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gZnJvbV9zb3VyY2VbZnJvbSsrXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICBmcm9tID0gX291dCAtIGRpc3Q7ICAgICAgICAgIC8qIGNvcHkgZGlyZWN0IGZyb20gb3V0cHV0ICovXG4gICAgICAgICAgICAgIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAvKiBtaW5pbXVtIGxlbmd0aCBpcyB0aHJlZSAqL1xuICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gb3V0cHV0W2Zyb20rK107XG4gICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSBvdXRwdXRbZnJvbSsrXTtcbiAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IG91dHB1dFtmcm9tKytdO1xuICAgICAgICAgICAgICAgIGxlbiAtPSAzO1xuICAgICAgICAgICAgICB9IHdoaWxlIChsZW4gPiAyKTtcbiAgICAgICAgICAgICAgaWYgKGxlbikge1xuICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gb3V0cHV0W2Zyb20rK107XG4gICAgICAgICAgICAgICAgaWYgKGxlbiA+IDEpIHtcbiAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gb3V0cHV0W2Zyb20rK107XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2UgaWYgKChvcCAmIDY0KSA9PT0gMCkgeyAgICAgICAgICAvKiAybmQgbGV2ZWwgZGlzdGFuY2UgY29kZSAqL1xuICAgICAgICAgICAgaGVyZSA9IGRjb2RlWyhoZXJlICYgMHhmZmZmKS8qaGVyZS52YWwqLyArIChob2xkICYgKCgxIDw8IG9wKSAtIDEpKV07XG4gICAgICAgICAgICBjb250aW51ZSBkb2Rpc3Q7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBkaXN0YW5jZSBjb2RlJztcbiAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7XG4gICAgICAgICAgICBicmVhayB0b3A7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7IC8vIG5lZWQgdG8gZW11bGF0ZSBnb3RvIHZpYSBcImNvbnRpbnVlXCJcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZWxzZSBpZiAoKG9wICYgNjQpID09PSAwKSB7ICAgICAgICAgICAgICAvKiAybmQgbGV2ZWwgbGVuZ3RoIGNvZGUgK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gpIGFuZCBpbmZsYXRlKCkgYmVsb3cgZm9yIGRldGFpbHMgKi9cbi8vdmFyIFpfTk9fRkxVU0ggICAgICA9IDA7XG4vL3ZhciBaX1BBUlRJQUxfRkxVU0ggPSAxO1xuLy92YXIgWl9TWU5DX0ZMVVNIICAgID0gMjtcbi8vdmFyIFpfRlVMTF9GTFVTSCAgICA9IDM7XG52YXIgWl9GSU5JU0ggICAgICAgID0gNDtcbnZhciBaX0JMT0NLICAgICAgICAgPSA1O1xudmFyIFpfVFJFRVMgICAgICAgICA9IDY7XG5cblxuLyogUmV0dXJuIGNvZGVzIGZvciB0aGUgY29tcHJlc3Npb24vZGVjb21wcmVzc2lvbiBmdW5jdGlvbnMuIE5lZ2F0aXZlIHZhbHVlc1xuICogYXJlIGVycm9ycywgcG9zaXRpdmUgdmFsdWVzIGFyZSB1c2VkIGZvciBzcGVjaWFsIGJ1dCBub3JtYWwgZXZlbnRzLlxuICovXG52YXIgWl9PSyAgICAgICAgICAgID0gMDtcbnZhciBaX1NUUkVBTV9FTkQgICAgPSAxO1xudmFyIFpfTkVFRF9ESUNUICAgICA9IDI7XG4vL3ZhciBaX0VSUk5PICAgICAgICAgPSAtMTtcbnZhciBaX1NUUkVBTV9FUlJPUiAgPSAtMjtcbnZhciBaX0RBVEFfRVJST1IgICAgPSAtMztcbnZhciBaX01FTV9FUlJPUiAgICAgPSAtNDtcbnZhciBaX0JVRl9FUlJPUiAgICAgPSAtNTtcbi8vdmFyIFpfVkVSU0lPTl9FUlJPUiA9IC02O1xuXG4vKiBUaGUgZGVmbGF0ZSBjb21wcmVzc2lvbiBtZXRob2QgKi9cbnZhciBaX0RFRkxBVEVEICA9IDg7XG5cblxuLyogU1RBVEVTID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki9cbi8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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gICAgRElTVCA9IDIzOyAgICAgIC8qIGk6IHdhaXRpbmcgZm9yIGRpc3RhbmNlIGNvZGUgKi9cbnZhciAgICAgICAgICAgIERJU1RFWFQgPSAyNDsgICAvKiBpOiB3YWl0aW5nIGZvciBkaXN0YW5jZSBleHRyYSBiaXRzICovXG52YXIgICAgICAgICAgICBNQVRDSCA9IDI1OyAgICAgLyogbzogd2FpdGluZyBmb3Igb3V0cHV0IHNwYWNlIHRvIGNvcHkgc3RyaW5nICovXG52YXIgICAgICAgICAgICBMSVQgPSAyNjsgICAgICAgLyogbzogd2FpdGluZyBmb3Igb3V0cHV0IHNwYWNlIHRvIHdyaXRlIGxpdGVyYWwgKi9cbnZhciAgICBDSEVDSyA9IDI3OyAgICAgLyogaTogd2FpdGluZyBmb3IgMzItYml0IGNoZWNrIHZhbHVlICovXG52YXIgICAgTEVOR1RIID0gMjg7ICAgIC8qIGk6IHdhaXRpbmcgZm9yIDMyLWJpdCBsZW5ndGggKGd6aXApICovXG52YXIgICAgRE9ORSA9IDI5OyAgICAgIC8qIGZpbmlzaGVkIGNoZWNrLCBkb25lIC0tIHJlbWFpbiBoZXJlIHVudGlsIHJlc2V0ICovXG52YXIgICAgQkFEID0gMzA7ICAgICAgIC8qIGdvdCBhIGRhdGEgZXJyb3IgLS0gcmVtYWluIGhlcmUgdW50aWwgcmVzZXQgKi9cbnZhciAgICBNRU0gPSAzMTsgICAgICAgLyogZ290IGFuIGluZmxhdGUoKSBtZW1vcnkgZXJyb3IgLS0gcmVtYWluIGhlcmUgdW50aWwgcmVzZXQgKi9cbnZhciAgICBTWU5DID0gMzI7ICAgICAgLyogbG9va2luZyBmb3Igc3luY2hyb25pemF0aW9uIGJ5dGVzIHRvIHJlc3RhcnQgaW5mbGF0ZSgpICovXG5cbi8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovXG5cblxuXG52YXIgRU5PVUdIX0xFTl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ICAvLz09PS8vXG4gICAgICAgIGlmICgoc3RhdGUud3JhcCAmIDIpICYmIGhvbGQgPT09IDB4OGIxZikgeyAgLyogZ3ppcCBoZWFkZXIgKi9cbiAgICAgICAgICBzdGF0ZS5jaGVjayA9IDAvKmNyYzMyKDBMLCBaX05VTEwsIDApKi87XG4gICAgICAgICAgLy89PT0gQ1JDMihzdGF0ZS5jaGVjaywgaG9sZCk7XG4gICAgICAgICAgaGJ1ZlswXSA9IGhvbGQgJiAweGZmO1xuICAgICAgICAgIGhidWZbMV0gPSAoaG9sZCA+Pj4gOCkgJiAweGZmO1xuICAgICAgICAgIHN0YXRlLmNoZWNrID0gY3JjMzIoc3RhdGUuY2hlY2ssIGhidWYsIDIsIDApO1xuICAgICAgICAgIC8vPT09Ly9cblxuICAgICAgICAgIC8vPT09IElOSVRCSVRTKCk7XG4gICAgICAgICAgaG9sZCA9IDA7XG4gICAgICAgICAgYml0cyA9IDA7XG4gICAgICAgICAgLy89PT0vL1xuICAgICAgICAgIHN0YXRlLm1vZGUgPSBGTEFHUztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBzdGF0ZS5mbGFncyA9IDA7ICAgICAgICAgICAvKiBleHBlY3QgemxpYiBoZWFkZXIgKi9cbiAgICAgICAgaWYgKHN0YXRlLmhlYWQpIHtcbiAgICAgICAgICBzdGF0ZS5oZWFkLmRvbmUgPSBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIShzdGF0ZS53cmFwICYgMSkgfHwgICAvKiBjaGVjayBpZiB6bGliIGhlYWRlciBhbGxvd2VkICovXG4gICAgICAgICAgKCgoaG9sZCAmIDB4ZmYpLypCSVRTKDgpKi8gPDwgOCkgKyAoaG9sZCA+PiA4KSkgJSAzMSkge1xuICAgICAgICAgIHN0cm0ubXNnID0gJ2luY29ycmVjdCBoZWFkZXIgY2hlY2snO1xuICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKChob2xkICYgMHgwZikvKkJJVFMoNCkqLyAhPT0gWl9ERUZMQVRFRCkge1xuICAgICAgICAgIHN0cm0ubXNnID0gJ3Vua25vd24gY29tcHJlc3Npb24gbWV0aG9kJztcbiAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIC8vLS0tIERST1BCSVRTKDQpIC0tLS8vXG4gICAgICAgIGhvbGQgPj4+PSA0O1xuICAgICAgICBiaXRzIC09IDQ7XG4gICAgICAgIC8vLS0tLy9cbiAgICAgICAgbGVuID0gKGhvbGQgJiAweDBmKS8qQklUUyg0KSovICsgODtcbiAgICAgICAgaWYgKHN0YXRlLndiaXRzID09PSAwKSB7XG4gICAgICAgICAgc3RhdGUud2JpdHMgPSBsZW47XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAobGVuID4gc3RhdGUud2JpdHMpIHtcbiAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIHdpbmRvdyBzaXplJztcbiAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHN0YXRlLmRtYXggPSAxIDw8IGxlbjtcbiAgICAgICAgLy9UcmFjZXYoKHN0ZGVyciwgXCJpbmZsYXRlOiAgIHpsaWIgaGVhZGVyIG9rXFxuXCIpKTtcbiAgICAgICAgc3RybS5hZGxlciA9IHN0YXRlLmNoZWNrID0gMS8qYWRsZXIzMigwTCwgWl9OVUxMLCAwKSovO1xuICAgICAgICBzdGF0ZS5tb2RlID0gaG9sZCAmIDB4MjAwID8gRElDVElEIDogVFlQRTtcbiAgICAgICAgLy89PT0gSU5JVEJJVFMoKTtcbiAgICAgICAgaG9sZCA9IDA7XG4gICAgICAgIGJpdHMgPSAwO1xuICAgICAgICAvLz09PS8vXG4gICAgICAgIGJyZWFrO1xuICAgICAgY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RhdGUuY2hlY2ssIGhidWYsIDIsIDApO1xuICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgfVxuICAgICAgICAvLz09PSBJTklUQklUUygpO1xuICAgICAgICBob2xkID0gMDtcbiAgICAgICAgYml0cyA9IDA7XG4gICAgICAgIC8vPT09Ly9cbiAgICAgICAgc3RhdGUubW9kZSA9IFRJTUU7XG4gICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAgIGNhc2UgVElNRTpcbiAgICAgICAgLy89PT0gTkVFREJJVFMoMzIpOyAqL1xuICAgICAgICB3aGlsZSAoYml0cyA8IDMyKSB7XG4gICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9XG4gICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgIGJpdHMgKz0gODtcbiAgICAgICAgfVxuICAgICAgICAvLz09PS8vXG4gICAgICAgIGlmIChzdGF0ZS5oZWFkKSB7XG4gICAgICAgICAgc3RhdGUuaGVhZC50aW1lID0gaG9sZDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoc3RhdGUuZmxhZ3MgJiAweDAyMDApIHtcbiAgICAgICAgICAvLz09PSBDUkM0KHN0YXRlLmNoZWNrLCBob2xkKVxuICAgICAgICAgIGhidWZbMF0gPSBob2xkICYgMHhmZjtcbiAgICAgICAgICBoYnVmWzFdID0gKGhvbGQgPj4+IDgpICYgMHhmZjtcbiAgICAgICAgICBoYnVmWzJdID0gKGhvbGQgPj4+IDE2KSAmIDB4ZmY7XG4gICAgICAgICAgaGJ1ZlszXSA9IChob2xkID4+PiAyNCkgJiAweGZmO1xuICAgICAgICAgIHN0YXRlLmNoZWNrID0gY3JjMzIoc3RhdGUuY2hlY2ssIGhidWYsIDQsIDApO1xuICAgICAgICAgIC8vPT09XG4gICAgICAgIH1cbiAgICAgICAgLy89PT0gSU5JVEJJVFM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hbGxzIHRocm91Z2ggKi9cbiAgICAgIGNhc2UgRVhMRU46XG4gICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDQwMCkge1xuICAgICAgICAgIC8vPT09IE5FRURCSVRTKDE2KTsgKi9cbiAgICAgICAgICB3aGlsZSAoYml0cyA8IDE2KSB7XG4gICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH1cbiAgICAgICAgICAgIGhhdmUtLTtcbiAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLz09PS8vXG4gICAgICAgICAgc3RhdGUubGVuZ3RoID0gaG9sZDtcbiAgICAgICAgICBpZiAoc3RhdGUuaGVhZCkge1xuICAgICAgICAgICAgc3RhdGUuaGVhZC5leHRyYV9sZW4gPSBob2xkO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc3RhdGUuZmxhZ3MgJiAweDAyMDApIHtcbiAgICAgICAgICAgIC8vPT09IENSQzIoc3RhdGUuY2hlY2ssIGhvbGQpO1xuICAgICAgICAgICAgaGJ1ZlswXSA9IGhvbGQgJiAweGZmO1xuICAgICAgICAgICAgaGJ1ZlsxXSA9IChob2xkID4+PiA4KSAmIDB4ZmY7XG4gICAgICAgICAgICBzdGF0ZS5jaGVjayA9IGNyYzMyKHN0YXRlLmNoZWNrLCBoYnVmLCAyLCAwKTtcbiAgICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgICB9XG4gICAgICAgICAgLy89PT0gSU5JVEJJVFMoKTtcbiAgICAgICAgICBob2xkID0gMDtcbiAgICAgICAgICBiaXRzID0gMDtcbiAgICAgICAgICAvLz09PS8vXG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoc3RhdGUuaGVhZCkge1xuICAgICAgICAgIHN0YXRlLmhlYWQuZXh0cmEgPSBudWxsLypaX05VTEwqLztcbiAgICAgICAgfVxuICAgICAgICBzdGF0ZS5tb2RlID0gRVhUUkE7XG4gICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAgIGNhc2UgRVhUUkE6XG4gICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDQwMCkge1xuICAgICAgICAgIGNvcHkgPSBzdGF0ZS5sZW5ndGg7XG4gICAgICAgICAgaWYgKGNvcHkgPiBoYXZlKSB7IGNvcHkgPSBoYXZlOyB9XG4gICAgICAgICAgaWYgKGNvcHkpIHtcbiAgICAgICAgICAgIGlmIChzdGF0ZS5oZWFkKSB7XG4gICAgICAgICAgICAgIGxlbiA9IHN0YXRlLmhlYWQuZXh0cmFfbGVuIC0gc3RhdGUubGVuZ3RoO1xuICAgICAgICAgICAgICBpZiAoIXN0YXRlLmhlYWQuZXh0cmEpIHtcbiAgICAgICAgICAgICAgICAvLyBVc2UgdW50eXBlZCBhcnJheSBmb3IgbW9yZSBjb252ZW5pZW50IHByb2Nlc3NpbmcgbGF0ZXJcbiAgICAgICAgICAgICAgICBzdGF0ZS5oZWFkLmV4dHJhID0gbmV3IEFycmF5KHN0YXRlLmhlYWQuZXh0cmFfbGVuKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB1dGlscy5hcnJheVNldChcbiAgICAgICAgICAgICAgICBzdGF0ZS5oZWFkLmV4dHJhLFxuICAgICAgICAgICAgICAgIGlucHV0LFxuICAgICAgICAgICAgICAgIG5leHQsXG4gICAgICAgICAgICAgICAgLy8gZXh0cmEgZmllbGQgaXMgbGltaXRlZCB0byA2NTUzNiBieXRlc1xuICAgICAgICAgICAgICAgIC8vIC0gbm8gbmVlZCBmb3IgYWRkaXRpb25hbCBzaXplIGNoZWNrXG4gICAgICAgICAgICAgICAgY29weSxcbiAgICAgICAgICAgICAgICAvKmxlbiArIGNvcHkgPiBzdGF0ZS5oZWFkLmV4dHJhX21heCAtIGxlbiA/IHN0YXRlLmhlYWQuZXh0cmFfbWF4IDogY29weSwqL1xuICAgICAgICAgICAgICAgIGxlblxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAvL3ptZW1jcHkoc3RhdGUuaGVhZC5leHRyYSArIGxlbiwgbmV4dCxcbiAgICAgICAgICAgICAgLy8gICAgICAgIGxlbiArIGNvcHkgPiBzdGF0ZS5oZWFkLmV4dHJhX21heCA/XG4gICAgICAgICAgICAgIC8vICAgICAgICBzdGF0ZS5oZWFkLmV4dHJhX21heCAtIGxlbiA6IGNvcHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHN0YXRlLmZsYWdzICYgMHgwMjAwKSB7XG4gICAgICAgICAgICAgIHN0YXRlLmNoZWNrID0gY3JjMzIoc3RhdGUuY2hlY2ssIGlucHV0LCBjb3B5LCBuZXh0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGhhdmUgLT0gY29weTtcbiAgICAgICAgICAgIG5leHQgKz0gY29weTtcbiAgICAgICAgICAgIHN0YXRlLmxlbmd0aCAtPSBjb3B5O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc3RhdGUubGVuZ3RoKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICB9XG4gICAgICAgIHN0YXRlLmxlbmd0aCA9IDA7XG4gICAgICAgIHN0YXRlLm1vZGUgPSBOQU1FO1xuICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovXG4gICAgICBjYXNlIE5BTUU6XG4gICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDgwMCkge1xuICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICAgIGNvcHkgPSAwO1xuICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgIC8vIFRPRE86IDIgb3IgMSBieXRlcz9cbiAgICAgICAgICAgIGxlbiA9IGlucHV0W25leHQgKyBjb3B5KytdO1xuICAgICAgICAgICAgLyogdXNlIGNvbnN0YW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dmU7IH1cbiAgICAgICAgICAgIGhhdmUtLTtcbiAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLz09PS8vXG4gICAgICAgICAgaWYgKGhvbGQgIT09IChzdGF0ZS5jaGVjayAmIDB4ZmZmZikpIHtcbiAgICAgICAgICAgIHN0cm0ubXNnID0gJ2hlYWRlciBjcmMgbWlzbWF0Y2gnO1xuICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRDtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLz09PSBJTklUQklUUygpO1xuICAgICAgICAgIGhvbGQgPSAwO1xuICAgICAgICAgIGJpdHMgPSAwO1xuICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgfVxuICAgICAgICBpZiAoc3RhdGUuaGVhZCkge1xuICAgICAgICAgIHN0YXRlLmhlYWQuaGNyYyA9ICgoc3RhdGUuZmxhZ3MgPj4gOSkgJiAxKTtcbiAgICAgICAgICBzdGF0ZS5oZWFkLmRvbmUgPSB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHN0cm0uYWRsZXIgPSBzdGF0ZS5jaGVjayA9IDA7XG4gICAgICAgIHN0YXRlLm1vZGUgPSBUWVBFO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgRElDVElEOlxuICAgICAgICAvLz09PSBORUVEQklUUygzMik7ICovXG4gICAgICAgIHdoaWxlIChiaXRzIDwgMzIpIHtcbiAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH1cbiAgICAgICAgICBoYXZlLS07XG4gICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICB9XG4gICAgICAgIC8vPT09Ly9cbiAgICAgICAgc3RybS5hZ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gICAgaG9sZCA+Pj49IGJpdHMgJiA3O1xuICAgICAgICAgIGJpdHMgLT0gYml0cyAmIDc7XG4gICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgIHN0YXRlLm1vZGUgPSBDSEVDSztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICAvLz09PSBORUVEQklUUygzKTsgKi9cbiAgICAgICAgd2hpbGUgKGJpdHMgPCAzKSB7XG4gICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9XG4gICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgIGJpdHMgKz0gODtcbiAgICAgICAgfVxuICAgICAgICAvLz09PS8vXG4gICAgICAgIHN0YXRlLmxhc3QgPSAoaG9sZCAmIDB4MDEpLypCSVRTKDEpKi87XG4gICAgICAgIC8vLS0tIERST1BCSVRTKDEpIC0tLS8vXG4gICAgICAgIGhvbGQgPj4+PSAxO1xuICAgICAgICBiaXRzIC09IDE7XG4gICAgICAgIC8vLS0tLy9cblxuICAgICAgICBzd2l0Y2ggKChob2xkICYgMHgwMykvKkJJVFMoMikqLykge1xuICAgICAgICAgIGNhc2UgMDogICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHN0b3JlZCBibG9jayAqL1xuICAgICAgICAgICAgLy9UcmFjZXYoKHN0ZGVyciwgXCJpbmZsYXRlOiAgICAgc3RvcmVkIGJsb2NrJXNcXG5cIixcbiAgICAgICAgICAgIC8vICAgICAgICBzdGF0ZS5sYXN0ID8gXCIgKGxhc3QpXCIgOiBcIlwiKSk7XG4gICAgICAgICAgICBzdGF0ZS5tb2RlID0gU1RPUkVEO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAxOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZml4ZWQgYmxvY2sgKi9cbiAgICAgICAgICAgIGZpeGVkdGFibGVzKHN0YXRlKTtcbiAgICAgICAgICAgIC8vVHJhY2V2KChzdGRlcnIsIFwiaW5mbGF0ZTogICAgIGZpeGVkIGNvZGVzIGJsb2NrJXNcXG5cIixcbiAgICAgICAgICAgIC8vICAgICAgICBzdGF0ZS5sYXN0ID8gXCIgKGxhc3QpXCIgOiBcIlwiKSk7XG4gICAgICAgICAgICBzdGF0ZS5tb2RlID0gTEVOXzsgICAgICAgICAgICAgLyogZGVjb2RlIGNvZGVzICovXG4gICAgICAgICAgICBpZiAoZmx1c2ggPT09IFpfVFJFRVMpIHtcbiAgICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMoMikgLS0tLy9cbiAgICAgICAgICAgICAgaG9sZCA+Pj49IDI7XG4gICAgICAgICAgICAgIGJpdHMgLT0gMjtcbiAgICAgICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgICAgICBicmVhayBpbmZfbGVhdmU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIDI6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBkeW5hbWljIGJsb2NrICovXG4gICAgICAgICAgICAvL1RyYWNldigoc3RkZXJyLCBcImluZmxhdGU6ICAgICBkeW5hbWljIGNvZGVzIGJsb2NrJXNcXG5cIixcbiAgICAgICAgICAgIC8vICAgICAgICBzdGF0ZS5sYXN0ID8gXCIgKGxhc3QpXCIgOiBcIlwiKSk7XG4gICAgICAgICAgICBzdGF0ZS5tb2RlID0gVEFCTEU7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGJsb2NrIHR5cGUnO1xuICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRDtcbiAgICAgICAgfVxuICAgICAgICAvLy0tLSBEUk9QQklUUygyKSAtLS0vL1xuICAgICAgICBob2xkID4+Pj0gMjtcbiAgICAgICAgYml0cyAtPSAy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yZSA+Pj4gMTYpICYgMHhmZjtcbiAgICAgICAgICAgIGhlcmVfdmFsID0gaGVyZSAmIDB4ZmZmZjtcblxuICAgICAgICAgICAgaWYgKChoZXJlX2JpdHMpIDw9IGJpdHMpIHsgYnJlYWs7IH1cbiAgICAgICAgICAgIC8vLS0tIFBVTExCWVRFKCkgLS0tLy9cbiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICBiaXRzICs9IDg7XG4gICAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChoZXJlX3ZhbCA8IDE2KSB7XG4gICAgICAgICAgICAvLy0tLSBEUk9QQklUUyhoZXJlLmJpdHMpIC0tLS8vXG4gICAgICAgICAgICBob2xkID4+Pj0gaGVyZV9iaXRzO1xuICAgICAgICAgICAgYml0cyAtPSBoZXJlX2JpdHM7XG4gICAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgICBzdGF0ZS5sZW5zW3N0YXRlLmhhdmUrK10gPSBoZXJlX3ZhbDtcbiAgICAgICAgICB9XG4gICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBpZiAoaGVyZV92YWwgPT09IDE2KSB7XG4gICAgICAgICAgICAgIC8vPT09IE5FRURCSVRTKGhlcmUuYml0cyArIDIpO1xuICAgICAgICAgICAgICBuID0gaGVyZV9iaXRzICsgMjtcbiAgICAgICAgICAgICAgd2hpbGUgKGJpdHMgPCBuKSB7XG4gICAgICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9XG4gICAgICAgICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgICAgICAgIGJpdHMgKz0gODtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAvLz09PS8vXG4gICAgICAgICAgICAgIC8vLS0tIERST1BCSVRTKGhlcmUuYml0cykgLS0tLy9cbiAgICAgICAgICAgICAgaG9sZCA+Pj49IGhlcmVfYml0cztcbiAgICAgICAgICAgICAgYml0cyAtPSBoZXJlX2JpdHM7XG4gICAgICAgICAgICAgIC8vLS0tLy9cbiAgICAgICAgICAgICAgaWYgKHN0YXRlLmhhdmUgPT09IDApIHtcbiAgICAgICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGJpdCBsZW5ndGggcmVwZWF0JztcbiAgICAgICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGxlbiA9IHN0YXRlLmxlbnNbc3RhdGUuaGF2ZSAtIDFdO1xuICAgICAgICAgICAgICBjb3B5ID0gMyArIChob2xkICYgMHgwMyk7Ly9CSVRTKDIpO1xuICAgICAgICAgICAgICAvLy0tLSBEUk9QQklUUygyKSAtLS0vL1xuICAgICAgICAgICAgICBob2xkID4+Pj0gMjtcbiAgICAgICAgICAgICAgYml0cyAtPSAyO1xuICAgICAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChoZXJlX3ZhbCA9PT0gMTcpIHtcbiAgICAgICAgICAgICAgLy89PT0gTkVFREJJVFMoaGVyZS5iaXRzICsgMyk7XG4gICAgICAgICAgICAgIG4gPSBoZXJlX2JpdHMgKyAzO1xuICAgICAgICAgICAgICB3aGlsZSAoYml0cyA8IG4pIHtcbiAgICAgICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH1cbiAgICAgICAgICAgICAgICBoYXZlLS07XG4gICAgICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMoaGVyZS5iaXRzKSAtLS0vL1xuICAgICAgICAgICAgICBob2xkID4+Pj0gaGVyZV9iaXRzO1xuICAgICAgICAgICAgICBiaXRzIC09IGhlcmVfYml0cztcbiAgICAgICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgICAgICBsZW4gPSAwO1xuICAgICAgICAgICAgICBjb3B5ID0gMyArIChob2xkICYgMHgwNyk7Ly9CSVRTKDMpO1xuICAgICAgICAgICAgICAvLy0tLSBEUk9QQklUUygzKSAtLS0vL1xuICAgICAgICAgICAgICBob2xkID4+Pj0gMztcbiAgICAgICAgICAgICAgYml0cyAtPSAzO1xuICAgICAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgLy89PT0gTkVFREJJVFMoaGVyZS5iaXRzICsgNyk7XG4gICAgICAgICAgICAgIG4gPSBoZXJlX2JpdHMgKyA3O1xuICAgICAgICAgICAgICB3aGlsZSAoYml0cyA8IG4pIHtcbiAgICAgICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH1cbiAgICAgICAgICAgICAgICBoYXZlLS07XG4gICAgICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMoaGVyZS5iaXRzKSAtLS0vL1xuICAgICAgICAgICAgICBob2xkID4+Pj0gaGVyZV9iaXRzO1xuICAgICAgICAgICAgICBiaXRzIC09IGhlcmVfYml0cztcbiAgICAgICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgICAgICBsZW4gPSAwO1xuICAgICAgICAgICAgICBjb3B5ID0gMTEgKyAoaG9sZCAmIDB4N2YpOy8vQklUUyg3KTtcbiAgICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMoNykgLS0tLy9cbiAgICAgICAgICAgICAgaG9sZCA+Pj49IDc7XG4gICAgICAgICAgICAgIGJpdHMgLT0gNztcbiAgICAgICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHN0YXRlLmhhdmUgKyBjb3B5ID4gc3RhdGUubmxlbiArIHN0YXRlLm5kaXN0KSB7XG4gICAgICAgICAgICAgIHN0cm0ubXNnID0gJ2ludmFsaWQgYml0IGxlbmd0aCByZXBlYXQnO1xuICAgICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHdoaWxlIChjb3B5LS0pIHtcbiAgICAgICAgICAgICAgc3RhdGUubGVuc1tzdGF0ZS5oYXZlKytdID0gbGVuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8qIGhhbmRsZSBlcnJvciBicmVha3MgaW4gd2hpbGUgKi9cbiAgICAgICAgaWYgKHN0YXRlLm1vZGUgPT09IEJBRCkgeyBicmVhazsgfVxuXG4gICAgICAgIC8qIGNoZWNrIGZvciBlbmQtb2YtYmxvY2sgY29kZSAoYmV0dGVyIGhhdmUgb25lKSAqL1xuICAgICAgICBpZiAoc3RhdGUubGVuc1syNTZdID09PSAwKSB7XG4gICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBjb2RlIC0tIG1pc3NpbmcgZW5kLW9mLWJsb2NrJztcbiAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgLyogYnVpbGQgY29kZSB0YWJsZXMgLS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B7IGJyZWFrOyB9XG4gICAgICAgICAgICAvLy0tLSBQVUxMQllURSgpIC0tLS8vXG4gICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH1cbiAgICAgICAgICAgIGhhdmUtLTtcbiAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLy0tLSBEUk9QQklUUyhsYXN0LmJpdHMpIC0tLS8vXG4gICAgICAgICAgaG9sZCA+Pj49IGxhc3RfYml0cztcbiAgICAgICAgICBiaXRzIC09IGxhc3RfYml0cztcbiAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgc3RhdGUuYmFjayArPSBsYXN0X2JpdHM7XG4gICAgICAgIH1cbiAgICAgICAgLy8tLS0gRFJPUEJJVFMoaGVyZS5iaXRzKSAtLS0vL1xuICAgICAgICBob2xkID4+Pj0gaGVyZV9iaXRzO1xuICAgICAgICBiaXRzIC09IGhlcmVfYml0cztcbiAgICAgICAgLy8tLS0vL1xuICAgICAgICBzdGF0ZS5iYWNrICs9IGhlcmVfYml0cztcbiAgICAgICAgc3RhdGUubGVuZ3RoID0gaGVyZV92YWw7XG4gICAgICAgIGlmIChoZXJlX29wID09PSAwKSB7XG4gICAgICAgICAgLy9UcmFjZXZ2KChzdGRlcnIsIGhlcmUudmFsID49IDB4MjAgJiYgaGVyZS52YWwgPCAweDdmID9cbiAgICAgICAgICAvLyAgICAgICAgXCJpbmZsYXRlOiAgICAgICAgIGxpdGVyYWwgJyVjJ1xcblwiIDpcbiAgICAgICAgICAvLyAgICAgICAgXCJpbmZsYXRlOiAgICAgICAgIGxpdGVyYWwgMHglMDJ4XFxuXCIsIGhlcmUudmFsKSk7XG4gICAgICAgICAgc3RhdGUubW9kZSA9IExJVDtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAoaGVyZV9vcCAmIDMyKSB7XG4gICAgICAgICAgLy9UcmFjZXZ2KChzdGRlcnIsIFwiaW5mbGF0ZTogICAgICAgICBlbmQgb2YgYmxvY2tcXG5cIikpO1xuICAgICAgICAgIHN0YXRlLmJhY2sgPSAtMTtcbiAgICAgICAgICBzdGF0ZS5tb2RlID0gVFlQRTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAoaGVyZV9vcCAmIDY0KSB7XG4gICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBsaXRlcmFsL2xlbmd0aCBjb2RlJztcbiAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHN0YXRlLmV4dHJhID0gaGVyZV9vcCAmIDE1O1xuICAgICAgICBzdGF0ZS5tb2RlID0gTEVORVhUO1xuICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovXG4gICAgICBjYXNlIExFTkVYVDpcbiAgICAgICAgaWYgKHN0YXRlLmV4dHJhKSB7XG4gICAgICAgICAgLy89PT0gTkVFREJJVFMoc3RhdGUuZXh0cmEpO1xuICAgICAgICAgIG4gPSBzdGF0ZS5leHRyYTtcbiAgICAgICAgICB3aGlsZSAoYml0cyA8IG4pIHtcbiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICBiaXRzICs9IDg7XG4gICAgICAgICAgfVxuICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgICBzdGF0ZS5sZW5ndGggKz0gaG9sZCAmICgoMSA8PCBzdGF0ZS5leHRyYSkgLSAxKS8qQklUUyhzdGF0ZS5leHRyYSkqLztcbiAgICAgICAgICAvLy0tLSBEUk9Q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b3AgJiAweGYwKSA9PT0gMCkge1xuICAgICAgICAgIGxhc3RfYml0cyA9IGhlcmVfYml0cztcbiAgICAgICAgICBsYXN0X29wID0gaGVyZV9vcDtcbiAgICAgICAgICBsYXN0X3ZhbCA9IGhlcmVfdmFsO1xuICAgICAgICAgIGZvciAoOzspIHtcbiAgICAgICAgICAgIGhlcmUgPSBzdGF0ZS5kaXN0Y29kZVtsYXN0X3ZhbCArXG4gICAgICAgICAgICAgICAgICAgICgoaG9sZCAmICgoMSA8PCAobGFzdF9iaXRzICsgbGFzdF9vcCkpIC0gMSkpLypCSVRTKGxhc3QuYml0cyArIGxhc3Qub3ApKi8gPj4gbGFzdF9iaXRzKV07XG4gICAgICAgICAgICBoZXJlX2JpdHMgPSBoZXJlID4+PiAyNDtcbiAgICAgICAgICAgIGhlcmVfb3AgPSAoaGVyZSA+Pj4gMTYpICYgMHhmZjtcbiAgICAgICAgICAgIGhlcmVfdmFsID0gaGVyZSAmIDB4ZmZmZjtcblxuICAgICAgICAgICAgaWYgKChsYXN0X2JpdHMgKyBoZXJlX2JpdHMpIDw9IGJpdHMpIHsgYnJlYWs7IH1cbiAgICAgICAgICAgIC8vLS0tIFBVTExCWVRFKCkgLS0tLy9cbiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICBiaXRzICs9IDg7XG4gICAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgfVxuICAgICAgICAgIC8vLS0tIERST1BCSVRTKGxhc3QuYml0cykgLS0tLy9cbiAgICAgICAgICBob2xkID4+Pj0gbGFzdF9iaXRzO1xuICAgICAgICAgIGJpdHMgLT0gbGFzdF9iaXRzO1xuICAgICAgICAgIC8vLS0tLy9cbiAgICAgICAgICBzdGF0ZS5iYWNrICs9IGxhc3RfYml0cztcbiAgICAgICAgfVxuICAgICAgICAvLy0tLSBEUk9QQklUUyhoZXJlLmJpdHMpIC0tLS8vXG4gICAgICAgIGhvbGQgPj4+PSBoZXJlX2JpdHM7XG4gICAgICAgIGJpdHMgLT0gaGVyZV9iaXRzO1xuICAgICAgICAvLy0tLS8vXG4gICAgICAgIHN0YXRlLmJhY2sgKz0gaGVyZV9iaXRzO1xuICAgICAgICBpZiAoaGVyZV9vcCAmIDY0KSB7XG4gICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBkaXN0YW5jZSBjb2RlJztcbiAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHN0YXRlLm9mZnNldCA9IGhlcmVfdmFsO1xuICAgICAgICBzdGF0ZS5leHRyYSA9IChoZXJlX29wKSAmIDE1O1xuICAgICAgICBzdGF0ZS5tb2RlID0gRElTVEVYVDtcbiAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqL1xuICAgICAgY2FzZSBESVNURVhUOlxuICAgICAgICBpZiAoc3RhdGUuZXh0cmEpIHtcbiAgICAgICAgICAvLz09PSBORUVEQklUUyhzdGF0ZS5leHRyYSk7XG4gICAgICAgICAgbiA9IHN0YXRlLmV4dHJhO1xuICAgICAgICAgIHdoaWxlIChiaXRzIDwgbikge1xuICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9XG4gICAgICAgICAgICBoYXZlLS07XG4gICAgICAgICAgICBob2xkICs9IGlucHV0W25leHQrK10gPDwgYml0cztcbiAgICAgICAgICAgIGJpdHMgKz0gODtcbiAgICAgICAgICB9XG4gICAgICAgICAgLy89PT0vL1xuICAgICAgICAgIHN0YXRlLm9mZnNldCArPSBob2xkICYgKCgxIDw8IHN0YXRlLmV4dHJhKSAtIDEpLypCSVRTKHN0YXRlLmV4dHJhKSovO1xuICAgICAgICAgIC8vLS0tIERST1BCSVRTKHN0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A9IEJBRDtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4vLyAoISkgVGhpcyBibG9jayBpcyBkaXNhYmxlZCBpbiB6bGliIGRlZmF1bHRzLFxuLy8gZG9uJ3QgZW5hYmxlIGl0IGZvciBiaW5hcnkgY29tcGF0aWJpbGl0eVxuLy8jaWZkZWYgSU5GTEFURV9BTExPV19JTlZBTElEX0RJU1RBTkNFX1RPT0ZBUl9BUlJSXG4vLyAgICAgICAgICBUcmFjZSgoc3RkZXJyLCBcImluZmxhdGUuYyB0b28gZmFyXFxuXCIpKTtcbi8vICAgICAgICAgIGNvcHkgLT0gc3RhdGUud2hhdmU7XG4vLyAgICAgICAgICBpZiAoY29weSA+IHN0YXRlLmxlbmd0aCkgeyBjb3B5ID0gc3RhdGUubGVuZ3RoOyB9XG4vLyAgICAgICAgICBpZiAoY29weSA+IGxlZnQpIHsgY29weSA9IGxlZnQ7IH1cbi8vICAgICAgICAgIGxlZnQgLT0gY29weTtcbi8vICAgICAgICAgIHN0YXRlLmxlbmd0aCAtPSBjb3B5O1xuLy8gICAgICAgICAgZG8ge1xuLy8gICAgICAgICAgICBvdXRwdXRbcHV0KytdID0gMDtcbi8vICAgICAgICAgIH0gd2hpbGUgKC0tY29weSk7XG4vLyAgICAgICAgICBpZiAoc3RhdGUubGVuZ3RoID09PSAwKSB7IHN0YXRlLm1vZGUgPSBMRU47IH1cbi8vICAgICAgICAgIGJyZWFrO1xuLy8jZW5kaWZcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGNvcHkgPiBzdGF0ZS53bmV4dCkge1xuICAgICAgICAgICAgY29weSAtPSBzdGF0ZS53bmV4dDtcbiAgICAgICAgICAgIGZyb20gPSBzdGF0ZS53c2l6ZSAtIGNvcHk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZnJvbSA9IHN0YXRlLnduZXh0IC0gY29weTtcbiAgICAgICAgICB9XG4gICAgICAgICAga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YWsgaW5mX2xlYXZlOyB9XG4gICAgICAgICAgICBoYXZlLS07XG4gICAgICAgICAgICAvLyBVc2UgJ3wnIGluc3RlYWQgb2YgJysnIHRvIG1ha2Ugc3VyZSB0aGF0IHJlc3VsdCBpcyBzaWduZWRcbiAgICAgICAgICAgIGhvbGQgfD0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLz09PS8vXG4gICAgICAgICAgX291dCAtPSBsZWZ0O1xuICAgICAgICAgIHN0cm0udG90YWxfb3V0ICs9IF9vdXQ7XG4gICAgICAgICAgc3RhdGUudG90YWwgKz0gX291dDtcbiAgICAgICAgICBpZiAoX291dCkge1xuICAgICAgICAgICAgc3RybS5hZGxlciA9IHN0YXRlLmNoZWNrID1cbiAgICAgICAgICAgICAgICAvKlVQREFURShzdGF0ZS5jaGVjaywgcHV0IC0gX291dCwgX291dCk7Ki9cbiAgICAgICAgICAgICAgICAoc3RhdGUuZmxhZ3MgPyBjcmMzMihzdGF0ZS5jaGVjaywgb3V0cHV0LCBfb3V0LCBwdXQgLSBfb3V0KSA6IGFkbGVyMzIoc3RhdGUuY2hlY2ssIG91dHB1dCwgX291dCwgcHV0IC0gX291dCkpO1xuXG4gICAgICAgICAgfVxuICAgICAgICAgIF9vdXQgPSBsZWZ0O1xuICAgICAgICAgIC8vIE5COiBjcmMzMiBzdG9yZWQgYXMgc2lnbmVkIDMyLWJpdCBpbnQsIHpzd2FwMzIgcmV0dXJucyBzaWduZWQgdG9vXG4gICAgICAgICAgaWYgKChzdGF0ZS5mbGFncyA/IGhvbGQgOiB6c3dhcDMyKGhvbGQpKSAhPT0gc3RhdGUuY2hlY2spIHtcbiAgICAgICAgICAgIHN0cm0ubXNnID0gJ2luY29ycmVjdCBkYXRhIGNoZWNrJztcbiAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgICAgLy89PT0gSU5JVEJJVFMoKTtcbiAgICAgICAgICBob2xkID0gMDtcbiAgICAgICAgICBiaXRzID0gMDtcbiAgICAgICAgICAvLz09PS8vXG4gICAgICAgICAgLy9UcmFjZXYoKHN0ZGVyciwgXCJpbmZsYXRlOiAgIGNoZWNrIG1hdGNoZXMgdHJhaWxlclxcblwiKSk7XG4gICAgICAgIH1cbiAgICAgICAgc3RhdGUubW9kZSA9IExFTkdUSDtcbiAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqL1xuICAgICAgY2FzZSBMRU5HVEg6XG4gICAgICAgIGlmIChzdGF0ZS53cmFwICYmIHN0YXRlLmZsYWdzKSB7XG4gICAgICAgICAgLy89PT0gTkVFREJJVFMoMzIpO1xuICAgICAgICAgIHdoaWxlIChiaXRzIDwgMzIpIHtcbiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICBiaXRzICs9IDg7XG4gICAgICAgICAgfVxuICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgICBpZiAoaG9sZCAhPT0gKHN0YXRlLnRvdGFsICYgMHhmZmZmZmZmZikpIHtcbiAgICAgICAgICAgIHN0cm0ubXNnID0gJ2luY29ycmVjdCBsZW5ndGggY2hlY2snO1xuICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRDtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLz09PSBJTklUQklUUygpO1xuICAgICAgICAgIGhvbGQgPSAwO1xuICAgICAgICAgIGJpdHMgPSAwO1xuICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgICAvL1RyYWNldigoc3RkZXJyLCBcImluZmxhdGU6ICAgbGVuZ3RoIG1hdGNoZXMgdHJhaWxlcl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BsZW5ndGggaW4gYml0cyAqL1xuICB2YXIgc3ltID0gMDsgICAgICAgICAgICAgICAvKiBpbmRleCBvZiBjb2RlIHN5bWJvbHMgKi9cbiAgdmFyIG1pbiA9IDAsIG1heCA9IDA7ICAgICAgICAgIC8qIG1pbmltdW0gYW5kIG1heGltdW0gY29kZSBsZW5ndGhzICovXG4gIHZhciByb290ID0gMDsgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBpbmRleCBiaXRzIGZvciByb290IHRhYmxlICovXG4gIHZhciBjdXJyID0gMDsgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBpbmRleCBiaXRzIGZvciBjdXJyZW50IHRhYmxlICovXG4gIHZhciBkcm9wID0gMDsgICAgICAgICAgICAgIC8qIGNvZGUgYml0cyB0byBkcm9wIGZvciBzdWItdGFibGUgKi9cbiAgdmFyIGxlZnQgPSAwOyAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgcHJlZml4IGNvZGVzIGF2YWlsYWJsZSAqL1xuICB2YXIgdXNlZCA9IDA7ICAgICAgICAgICAgICAvKiBjb2RlIGVudHJpZXMgaW4gdGFibGUgdXNlZCAqL1xuICB2YXIgaHVmZiA9IDA7ICAgICAgICAgICAgICAvKiBIdWZmbWFuIGNvZGUgKi9cbiAgdmFyIGluY3I7ICAgICAgICAgICAgICAvKiBmb3IgaW5jcmVtZW50aW5nIGNvZGUsIGluZGV4ICovXG4gIHZhciBmaWxsOyAgICAgICAgICAgICAgLyogaW5kZXggZm9yIHJlcGxpY2F0aW5nIGVudHJpZXMgKi9cbiAgdmFyIGxvdzsgICAgICAgICAgICAgICAvKiBsb3cgYml0cyBmb3IgY3VycmVudCByb290IGVudHJ5ICovXG4gIHZhciBtYXNrOyAgICAgICAgICAgICAgLyogbWFzayBmb3IgbG93IHJvb3QgYml0cyAqL1xuICB2YXIgbmV4dDsgICAgICAgICAgICAgLyogbmV4dCBhdmFpbGFibGUgc3BhY2UgaW4gdGFibGUgKi9cbiAgdmFyIGJ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mcgdGhlIG9yaWdpbmFsIHNvZnR3YXJlLlxuLy8gMy4gVGhpcyBub3RpY2UgbWF5IG5vdCBiZSByZW1vdmVkIG9yIGFsdGVyZWQgZnJvbSBhbnkgc291cmNlIGRpc3RyaWJ1dGlvbi5cblxuLyogZXNsaW50LWRpc2FibGUgc3BhY2UtdW5hcnktb3BzICovXG5cbnZhciB1dGlscyA9IHJlcXVpcmUoJy4uL3V0aWxzL2NvbW1vbicpO1xuXG4vKiBQdWJsaWMgY29uc3RhbnRzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qL1xuLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki9cblxuXG4vL3ZhciBaX0ZJTFRFUkVEICAgICAgICAgID0gMTtcbi8vdmFyIFpfSFVGRk1BTl9PTkxZICAgICAgPSAyO1xuLy92YXIgWl9STEUgICAgICAgICAgICAgICA9IDM7XG52YXIgWl9GSVhFRCAgICAgICAgICAgICAgID0gNDtcbi8vdmFyIFpfREVGQVVMVF9TVFJBVEVHWSAgPSAwO1xuXG4vKiBQb3NzaWJsZSB2YWx1ZXMgb2YgdGhlIGRhdGFfdHlwZSBmaWVsZCAodGhvdWdoIHNlZSBpbmZsYXRlKCkpICovXG52YXIgWl9CSU5BUlkgICAgICAgICAgICAgID0gMDtcbnZhciBaX1RFWFQgICAgICAgICAgICAgICAgPSAxO1xuLy92YXIgWl9BU0NJSSAgICAgICAgICAgICA9IDE7IC8vID0gWl9URVhUXG52YXIgWl9VTktOT1dOICAgICAgICAgICAgID0gMjtcblxuLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki9cblxuXG5mdW5jdGlvbiB6ZXJvKGJ1ZikgeyB2YXIgbGVuID0gYnVmLmxlbmd0aDsgd2hpbGUgK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Ki9cbiAgdmFyIG1heF9jb3VudCA9IDc7ICAgICAgICAgLyogbWF4IHJlcGVhdCBjb3VudCAqL1xuICB2YXIgbWluX2NvdW50ID0gNDsgICAgICAgICAvKiBtaW4gcmVwZWF0IGNvdW50ICovXG5cbiAgaWYgKG5leHRsZW4gPT09IDApIHtcbiAgICBtYXhfY291bnQgPSAxMzg7XG4gICAgbWluX2NvdW50ID0gMztcbiAgfVxuICB0cmVlWyhtYXhfY29kZSArIDEpICogMiArIDFdLyouTGVuKi8gPSAweGZmZmY7IC8qIGd1YXJkICovXG5cbiAgZm9yIChuID0gMDsgbiA8PSBtYXhfY29kZTsgbisrKSB7XG4gICAgY3VybGVuID0gbmV4dGxlbjtcbiAgICBuZXh0bGVuID0gdHJlZVsobiArIDEpICogMiArIDFdLyouTGVuKi87XG5cbiAgICBpZiAoKytjb3VudCA8IG1heF9jb3VudCAmJiBjdXJsZW4gPT09IG5leHRsZW4pIHtcbiAgICAgIGNvbnRpbnVlO1xuXG4gICAgfSBlbHNlIGlmIChjb3VudCA8IG1pbl9jb3VudCkge1xuICAgICAgcy5ibF90cmVlW2N1cmxlbiAqIDJdLyouRnJlcSovICs9IGNvdW50O1xuXG4gICAgfSBlbHNlIGlmIChjdXJsZW4gIT09IDApIHtcblxuICAgICAgaWYgKGN1cmxlbiAhPT0gcHJldmxlbikgeyBzLmJsX3RyZWVbY3VybGVuICogMl0vKi5GcmVxKi8rKzsgfVxuICAgICAgcy5ibF90cmVlW1JFUF8zXzYgKiAyXS8qLkZyZXEqLysrO1xuXG4gICAgfSBlbHNlIGlmIChjb3VudCA8PSAxMCkge1xuICAgICAgcy5ibF90cmVlW1JFUFpfM18xMCAqIDJdLyouRnJlcSovKys7XG5cbiAgICB9IGVsc2Uge1xuICAgICAgcy5ibF90cmVlW1JFUFpfMTFfMTM4ICogMl0vKi5GcmVxKi8rKztcbiAgICB9XG5cbiAgICBjb3VudCA9IDA7XG4gICAgcHJldmxlbiA9IGN1cmxlbjtcblxuICAgIGlmIChuZXh0bGVuID09PSAwKSB7XG4gICAgICBtYXhfY291bnQgPSAxMzg7XG4gICAgICBtaW5fY291bnQgPSAzO1xuXG4gICAgfSBlbHNlIGlmIChjdXJsZW4gPT09IG5leHRsZW4pIHtcbiAgICAgIG1heF9jb3VudCA9IDY7XG4gICAgICBtaW5fY291bnQgPSAzO1xuXG4gICAgfSBlbHNlIHtcbiAgICAgIG1heF9jb3VudCA9IDc7XG4gICAgICBtaW5fY291bnQgPSA0O1xuICAgIH1cbiAgfVxufVxuXG5cbi8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICogU2VuZCBhIGxpdGVyYWwgb3IgZGlzdGFuY2UgdHJlZSBpbiBjb21wcmVzc2VkIGZvcm0sIHVzaW5nIHRoZSBjb2RlcyBpblxuICogYmxfdHJlZS5cbiAqL1xuZnVuY3Rpb24gc2VuZF90cmVlKHMsIHRyZWUsIG1heF9jb2RlKVxuLy8gICAgZGVmbGF0ZV9zdGF0ZSAqcztcbi8vICAgIGN0X2RhdGEgKnRyZWU7IC8qIHRoZSB0cmVlIHRvIGJlIHNjYW5uZWQgKi9cbi8vICAgIGludCBtYXhfY29kZTsgICAgICAgLyogYW5kIGl0cyBsYXJnZXN0IGNvZGUgb2Ygbm9uIHplcm8gZnJlcXVlbmN5ICovXG57XG4gIHZhciBuOyAgICAgICAgICAgICAgICAgICAgIC8qIGl0ZXJhdGVzIG92ZXIgYWxsIHRyZWUgZWxlbWVudHMgKi9cbiAgdmFyIHByZXZsZW4gPSAtMTsgICAgICAgICAgLyogbGFzdCBlbWl0dGVkIGxlbmd0aCAqL1xuICB2YXIgY3VybGVuOyAgICAgICAgICAgICAgICAvKiBsZW5ndGggb2YgY3VycmVudCBjb2RlICovXG5cbiAgdmFyIG5leHRsZW4gPSB0cmVlWzAgKiAyICsgMV0vKi5MZW4qLzsgLyogbGVuZ3RoIG9mIG5leHQgY29kZSAqL1xuXG4gIHZhciBjb3VudCA9IDA7ICAgICAgICAgICAgIC8qIHJlcGVhdCBjb3VudCBvZiB0aGUgY3VycmVudCBjb2RlICovXG4gIHZhciBtYXhfY291bnQgPSA3OyAgICAgICAgIC8qIG1heCByZXBlYXQgY291bnQgKi9cbiAgdmFyIG1pbl9jb3VudCA9IDQ7ICAgICAgICAgLyogbWluIHJlcGVhdCBjb3VudCAqL1xuXG4gIC8qIHRyZWVbbWF4X2NvZGUrMV0uTGVuID0gLTE7ICovICAvKiBndWFyZCBhbHJlYWR5IHNldCAqL1xuICBpZiAobmV4dGxlbiA9PT0gMCkge1xuICAgIG1heF9jb3VudCA9IDEzODtcbiAgICBtaW5fY291bnQgPSAzO1xuICB9XG5cbiAgZm9yIChuID0gMDsgbiA8PSBtYXhfY29kZTsgbisrKSB7XG4gICAgY3VybGVuID0gbmV4dGxlbjtcbiAgICBuZXh0bGVuID0gdHJlZVsobiArIDEpICogMiArIDFdLyouTGVuKi87XG5cbiAgICBpZiAoKytjb3VudCA8IG1heF9jb3VudCAmJiBjdXJsZW4gPT09IG5leHRsZW4pIHtcbiAgICAgIGNvbnRpbnVlO1xuXG4gICAgfSBlbHNlIGlmIChjb3VudCA8IG1pbl9jb3VudCkge1xuICAgICAgZG8geyBzZW5kX2NvZGUocywgY3VybGVuLCBzLmJsX3RyZWUpOyB9IHdoaWxlICgtLWNvdW50ICE9PSAwKTtcblxuICAgIH0gZWxzZSBpZiAoY3VybGVuICE9PSAwKSB7XG4gICAgICBpZiAoY3VybGVuICE9PSBwcmV2bGVuKSB7XG4gICAgICAgIHNlbmRfY29kZShzLCBjdXJsZW4sIHMuYmxfdHJlZSk7XG4gICAgICAgIGNvdW50LS07XG4gICAgICB9XG4gICAgICAvL0Fzc2VydChjb3VudCA+PSAzICYmIGNvdW50IDw9IDYsIFwiIDNfNj9cIik7XG4gICAgICBzZW5kX2NvZGUocywgUkVQXzNfNiwgcy5ibF90cmVlKTtcbiAgICAgIHNlbmRfYml0cyhzLCBjb3VudCAtIDMsIDIpO1xuXG4gICAgfSBlbHNlIGlmIChjb3VudCA8PSAxMCkge1xuICAgICAgc2VuZF9jb2RlKHMsIFJFUFpfM18xMCwgcy5ibF90cmVlKTtcbiAgICAgIHNlbmRfYml0cyhzLCBjb3VudCAtIDMsIDMpO1xuXG4gICAgfSBlbHNlIHtcbiAgICAgIHNlbmRfY29kZShzLCBSRVBaXzExXzEzOCwgcy5ibF90cmVlKTtcbiAgICAgIHNlbmRfYml0cyhzLCBjb3VudCAtIDExLCA3KTtcbiAgICB9XG5cbiAgICBjb3VudCA9IDA7XG4gICAgcHJldmxlbiA9IGN1cmxlbjtcbiAgICBpZiAobmV4dGxlbiA9PT0gMCkge1xuICAgICAgbWF4X2NvdW50ID0gMTM4O1xuICAgICAgbWluX2NvdW50ID0gMztcblxuICAgIH0gZWxzZSBpZiAoY3VybGVuID09PSBuZXh0bGVuKSB7XG4gICAgICBtYXhfY291bnQgPSA2O1xuICAgICAgbWluX2NvdW50ID0gMztcblxuICAgIH0gZWxzZSB7XG4gICAgICBtYXhfY291bnQgPSA3O1xuICAgICAgbWluX2NvdW50ID0gNDtcbiAgICB9XG4gIH1cbn1cblxuXG4vKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIENvbnN0cnVjdCB0aGUgSHVmZm1hbiB0cmVlIGZvciB0aGUgYml0IGxlbmd0aHMgYW5kIHJldHVybiB0aGUgaW5kZXggaW5cbiAqIGJsX29yZGVyIG9mIHRoZSBsYXN0IGJpdCBsZW5ndGggY29kZSB0byBzZW5kLlxuICovXG5mdW5jdGlvbiBidWlsZF9ibF90cmVlKHMpIHtcbiAgdmFyIG1heF9ibGluZGV4OyAgLyogaW5kZXggb2YgbGFzdCBiaXQgbGVuZ3RoIGNvZGUgb2Ygbm9uIHplcm8gZnJlcSAqL1xuXG4gIC8qIERldGVybWluZSB0aGUg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ludCgpO1xuXG4gIGZvciAodmFyIGkgPSAwOyBpIDwgbjsgaSsrKSB7XG4gICAgYTEueCA9IHBbMiAqIGldO1xuICAgIGExLnkgPSBwWzIgKiBpICsgMV07XG4gICAgaWYgKGkgPT0gbiAtIDEpIHtcbiAgICAgIGEyLnggPSBwWzBdO1xuICAgICAgYTIueSA9IHBbMV07XG4gICAgfSBlbHNlIHtcbiAgICAgIGEyLnggPSBwWzIgKiBpICsgMl07XG4gICAgICBhMi55ID0gcFsyICogaSArIDNdO1xuICAgIH1cblxuICAgIGZvciAodmFyIGogPSAwOyBqIDwgbjsgaisrKSB7XG4gICAgICBpZiAoTWF0aC5hYnMoaSAtIGopIDwgMikgY29udGludWVcbiAgICAgIGlmIChqID09IG4gLSAxICYmIGkgPT0gMCkgY29udGludWVcbiAgICAgIGlmIChpID09IG4gLSAxICYmIGogPT0gMCkgY29udGludWVcblxuICAgICAgYjEueCA9IHBbMiAqIGpdO1xuICAgICAgYjEueSA9IHBbMiAqIGogKyAxXTtcbiAgICAgIGlmIChqID09IG4gLSAxKSB7XG4gICAgICAgIGIyLnggPSBwWzBdO1xuICAgICAgICBiMi55ID0gcFsxXTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGIyLnggPSBwWzIgKiBqICsgMl07XG4gICAgICAgIGIyLnkgPSBwWzIgKiBqICsgM107XG4gICAgICB9XG5cbiAgICAgIGlmIChHZXRMaW5lSW50ZXJzZWN0aW9uKGExLCBhMiwgYjEsIGIyLCBjKSAhPSBudWxsKSByZXR1cm4gZmFsc2VcbiAgICB9XG4gIH1cbiAgcmV0dXJuIHRydWVcbn1cbm1vZHVsZS5leHBvcnRzLklzU2ltcGxlID0gSXNTaW1wbGU7XG5cbi8qKlxuICogQ2hlY2tzLCBpZiBwb2x5Z29uIGlzIGNvbnZleC4gUG9seWdvbiBpcyBjb252ZXgsIHdoZW4gZWFjaCBpbm5lciBhbmdsZSBpcyA8PSAxODDCsC5cbiAqXG4gKiBAcGFyYW0ge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NpbXBsZXggc2hhcGUgaXMgYSBzbGlnaHRseSBpcnJlZ3VsYXIgdGV0cmFoZWRyb24uXG4gICAgICAvLyBEZXRlcm1pbmUgd2hpY2ggc2ltcGxleCB3ZSBhcmUgaW4uXG4gICAgICB2YXIgaTEsIGoxLCBrMTsgLy8gT2Zmc2V0cyBmb3Igc2Vjb25kIGNvcm5lciBvZiBzaW1wbGV4IGluIChpLGosaykgY29vcmRzXG4gICAgICB2YXIgaTIsIGoyLCBrMjsgLy8gT2Zmc2V0cyBmb3IgdGhpcmQgY29ybmVyIG9mIHNpbXBsZXggaW4gKGksaixrKSBjb29yZHNcbiAgICAgIGlmICh4MCA+PSB5MCkge1xuICAgICAgICBpZiAoeTAgPj0gejApIHtcbiAgICAgICAgICBpMSA9IDE7XG4gICAgICAgICAgajEgPSAwO1xuICAgICAgICAgIGsxID0gMDtcbiAgICAgICAgICBpMiA9IDE7XG4gICAgICAgICAgajIgPSAxO1xuICAgICAgICAgIGsyID0gMDtcbiAgICAgICAgfSAvLyBYIFkgWiBvcmRlclxuICAgICAgICBlbHNlIGlmICh4MCA+PSB6MCkge1xuICAgICAgICAgIGkxID0gMTtcbiAgICAgICAgICBqMSA9IDA7XG4gICAgICAgICAgazEgPSAwO1xuICAgICAgICAgIGkyID0gMTtcbiAgICAgICAgICBqMiA9IDA7XG4gICAgICAgICAgazIgPSAxO1xuICAgICAgICB9IC8vIFggWiBZIG9yZGVyXG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIGkxID0gMDtcbiAgICAgICAgICBqMSA9IDA7XG4gICAgICAgICAgazEgPSAxO1xuICAgICAgICAgIGkyID0gMTtcbiAgICAgICAgICBqMiA9IDA7XG4gICAgICAgICAgazIgPSAxO1xuICAgICAgICB9IC8vIFogWCBZIG9yZGVyXG4gICAgICB9XG4gICAgICBlbHNlIHsgLy8geDA8eTBcbiAgICAgICAgaWYgKHkwIDwgejApIHtcbiAgICAgICAgICBpMSA9IDA7XG4gICAgICAgICAgajEgPSAwO1xuICAgICAgICAgIGsxID0gMTtcbiAgICAgICAgICBpMiA9IDA7XG4gICAgICAgICAgajIgPSAxO1xuICAgICAgICAgIGsyID0gMTtcbiAgICAgICAgfSAvLyBaIFkgWCBvcmRlclxuICAgICAgICBlbHNlIGlmICh4MCA8IHowKSB7XG4gICAgICAgICAgaTEgPSAwO1xuICAgICAgICAgIGoxID0gMTtcbiAgICAgICAgICBrMSA9IDA7XG4gICAgICAgICAgaTIgPSAwO1xuICAgICAgICAgIGoyID0gMTtcbiAgICAgICAgICBrMiA9IDE7XG4gICAgICAgIH0gLy8gWSBaIFggb3JkZXJcbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgaTEgPSAwO1xuICAgICAgICAgIGoxID0gMTtcbiAgICAgICAgICBrMSA9IDA7XG4gICAgICAgICAgaTIgPSAxO1xuICAgICAgICAgIGoyID0gMTtcbiAgICAgICAgICBrMiA9IDA7XG4gICAgICAgIH0gLy8gWSBYIFogb3JkZXJcbiAgICAgIH1cbiAgICAgIC8vIEEgc3RlcCBvZiAoMSwwLDApIGluIChpLGosaykgbWVhbnMgYSBzdGVwIG9mICgxLWMsLWMsLWMpIGluICh4LHkseiksXG4gICAgICAvLyBhIHN0ZXAgb2YgKDAsMSwwKSBpbiAoaSxqLGspIG1lYW5zIGEgc3RlcCBvZiAoLWMsMS1jLC1jKSBpbiAoeCx5LHopLCBhbmRcbiAgICAgIC8vIGEgc3RlcCBvZiAoMCwwLDEpIGluIChpLGosaykgbWVhbnMgYSBzdGVwIG9mICgtYywtYywxLWMpIGluICh4LHkseiksIHdoZXJlXG4gICAgICAvLyBjID0gMS82LlxuICAgICAgdmFyIHgxID0geDAgLSBpMSArIEczOyAvLyBPZmZzZXRzIGZvciBzZWNvbmQgY29ybmVyIGluICh4LHkseikgY29vcmRzXG4gICAgICB2YXIgeTEgPSB5MCAtIGoxICsgRzM7XG4gICAgICB2YXIgejEgPSB6MCAtIGsxICsgRzM7XG4gICAgICB2YXIgeDIgPSB4MCA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xID0gMC4wO1xuICAgICAgZWxzZSB7XG4gICAgICAgIHZhciBnaTEgPSBwZXJtTW9kMTJbaWkgKyBpMSArIHBlcm1bamogKyBqMSArIHBlcm1ba2sgKyBrMV1dXSAqIDM7XG4gICAgICAgIHQxICo9IHQxO1xuICAgICAgICBuMSA9IHQxICogdDEgKiAoZ3JhZDNbZ2kxXSAqIHgxICsgZ3JhZDNbZ2kxICsgMV0gKiB5MSArIGdyYWQzW2dpMSArIDJdICogejEpO1xuICAgICAgfVxuICAgICAgdmFyIHQyID0gMC42IC0geDIgKiB4MiAtIHkyICogeTIgLSB6MiAqIHoyO1xuICAgICAgaWYgKHQyIDwgMCkgbjIgPSAwLjA7XG4gICAgICBlbHNlIHtcbiAgICAgICAgdmFyIGdpMiA9IHBlcm1Nb2QxMltpaSArIGkyICsgcGVybVtqaiArIGoyICsgcGVybVtrayArIGsyXV1dICogMztcbiAgICAgICAgdDIgKj0gdDI7XG4gICAgICAgIG4yID0gdDIgKiB0MiAqIChncmFkM1tnaTJdICogeDIgKyBncmFkM1tnaTIgKyAxXSAqIHkyICsgZ3JhZDNbZ2kyICsgMl0gKiB6Mik7XG4gICAgICB9XG4gICAgICB2YXIgdDMgPSAwLjYgLSB4MyAqIHgzIC0geTMgKiB5MyAtIHozICogejM7XG4gICAgICBpZiAodDMgPCAwKSBuMyA9IDAuMDtcbiAgICAgIGVsc2Uge1xuICAgICAgICB2YXIgZ2kzID0gcGVybU1vZDEyW2lpICsgMSArIHBlcm1bamogKyAxICsgcGVybVtrayArIDFdXV0gKiAzO1xuICAgICAgICB0MyAqPSB0MztcbiAgICAgICAgbjMgPSB0MyAqIHQzICogKGdyYWQzW2dpM10gKiB4MyArIGdyYWQzW2dpMyArIDFdICogeTMgKyBncmFkM1tnaTMgKyAyXSAqIHozKTtcbiAgICAgIH1cbiAgICAgIC8vIEFkZCBjb250cmlidXRpb25zIGZyb20gZWFjaCBjb3JuZXIgdG8gZ2V0IHRoZSBmaW5hbCBub2lzZSB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gICAgdmFyIHggPSBwMS54LFxuICAgICAgICB5ID0gcDEueSxcbiAgICAgICAgZHggPSBwMi54IC0geCxcbiAgICAgICAgZHkgPSBwMi55IC0geTtcblxuICAgIGlmIChkeCAhPT0gMCB8fCBkeSAhPT0gMCkge1xuXG4gICAgICAgIHZhciB0ID0gKChwLnggLSB4KSAqIGR4ICsgKHAueSAtIHkpICogZHkpIC8gKGR4ICogZHggKyBkeSAqIGR5KTtcblxuICAgICAgICBpZiAodCA+IDEpIHtcbiAgICAgICAgICAgIHggPSBwMi54O1xuICAgICAgICAgICAgeSA9IHAyLnk7XG5cbiAgICAgICAgfSBlbHNlIGlmICh0ID4gMCkge1xuICAgICAgICAgICAgeCArPSBkeCAqIHQ7XG4gICAgICAgICAgICB5ICs9IGR5ICogdDtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGR4ID0gcC54IC0geDtcbiAgICBkeSA9IHAueSAtIHk7XG5cbiAgICByZXR1cm4gZHggKiBkeCArIGR5ICogZHk7XG59XG4vLyByZXN0IG9mIHRoZSBjb2RlIGRvZXNuJ3QgY2FyZSBhYm91dCBwb2ludCBmb3JtYXRcblxuLy8gYmFzaWMgZGlzdGFuY2UtYmFzZWQgc2ltcGxpZmljYXRpb25cbmZ1bmN0aW9uIHNpbXBsaWZ5UmFkaWFsRGlzdChwb2ludHMsIHNxVG9sZXJhbmNlKSB7XG5cbiAgICB2YXIgcHJldlBvaW50ID0gcG9pbnRzWzBdLFxuICAgICAgICBuZXdQb2ludHMgPSBbcHJldlBvaW50XSxcbiAgICAgICAgcG9pbnQ7XG5cbiAgICBmb3IgKHZhciBpID0gMSwgbGVuID0gcG9pbnRzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICAgIHBvaW50ID0gcG9pbnRzW2ldO1xuXG4gICAgICAgIGlmIChnZXRTcURpc3QocG9pbnQsIHByZXZQb2ludCkgPiBzcVRvbGVyYW5jZSkge1xuICAgICAgICAgICAgbmV3UG9pbnRzLnB1c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ICAgICAgICAgICAgIHYubm9ybWFsLmFwcGx5TWF0cml4MyhDU0cuX3RtcG0zKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gY3NnO1xuICAgIH07XG4gICAgQ1NHLnRvTWVzaCA9IGZ1bmN0aW9uIChjc2csIHRvTWF0cml4KSB7XG4gICAgICAgIHZhciBnZW9tID0gbmV3IHRocmVlXzEuR2VvbWV0cnkoKTtcbiAgICAgICAgdmFyIHBzID0gY3NnLnBvbHlnb25zO1xuICAgICAgICB2YXIgdnMgPSBnZW9tLnZlcnRpY2VzO1xuICAgICAgICB2YXIgZnZ1diA9IGdlb20uZmFjZVZlcnRleFV2c1swXTtcbiAgICAgICAgZm9yICh2YXIgX2kgPSAwLCBwc18xID0gcHM7IF9pIDwgcHNfMS5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgIHZhciBwID0gcHNfMVtfaV07XG4gICAgICAgICAgICB2YXIgcHZzID0gcC52ZXJ0aWNlcztcbiAgICAgICAgICAgIHZhciB2MCA9IHZzLmxlbmd0aDtcbiAgICAgICAgICAgIHZhciBwdmxlbiA9IHB2cy5sZW5ndGg7XG4gICAgICAgICAgICBmb3IgKHZhciBfYSA9IDAsIHB2c18xID0gcHZzOyBfYSA8IHB2c18xLmxlbmd0aDsgX2ErKykge1xuICAgICAgICAgICAgICAgIHZhciBwdiA9IHB2c18xW19hXTtcbiAgICAgICAgICAgICAgICB2cy5wdXNoKG5ldyB0aHJlZV8xLlZlY3RvcjMoKS5jb3B5KHB2LnBvcykpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDM7IGogPD0gcHZsZW47IGorKykge1xuICAgICAgICAgICAgICAgIHZhciBmYyA9IG5ldyB0aHJlZV8xLkZhY2UzKHYwLCB2MCArIGogLSAyLCB2MCArIGogLSAxKTtcbiAgICAgICAgICAgICAgICB2YXIgZnV2ID0gW107XG4gICAgICAgICAgICAgICAgZnZ1di5wdXNoKGZ1dik7XG4gICAgICAgICAgICAgICAgdmFyIGZubWwgPSBmYy52ZXJ0ZXhOb3JtYWxzO1xuICAgICAgICAgICAgICAgIGZubWwucHVzaChuZXcgdGhyZWVfMS5WZWN0b3IzKCkuY29weShwdnNbMF0ubm9ybWFsKSk7XG4gICAgICAgICAgICAgICAgZm5tbC5wdXNoKG5ldyB0aHJlZV8xLlZlY3RvcjMoKS5jb3B5KHB2c1tqIC0gMl0ubm9ybWFsKSk7XG4gICAgICAgICAgICAgICAgZm5tbC5wdXNoKG5ldyB0aHJlZV8xLlZlY3RvcjMoKS5jb3B5KHB2c1tqIC0gMV0ubm9ybWFsKSk7XG4gICAgICAgICAgICAgICAgLy8gY2hlY2sgZm9yIHV2IHByb3BlcnR5XG4gICAgICAgICAgICAgICAgaWYgKHB2c1swXS51diAmJiBwdnNbaiAtIDJdLnV2ICYmIHB2c1tqIC0gMV0udXYpIHtcbiAgICAgICAgICAgICAgICAgICAgZnV2LnB1c2gobmV3IHRocmVlXzEuVmVjdG9yMygpLmNvcHkocHZzWzBdLnV2KSk7XG4gICAgICAgICAgICAgICAgICAgIGZ1di5wdXNoKG5ldyB0aHJlZV8xLlZlY3RvcjMoKS5jb3B5KHB2c1tqIC0gMl0udXYpKTtcbiAgICAgICAgICAgICAgICAgICAgZnV2LnB1c2gobmV3IHRocmVlXzEuVmVjdG9yMygpLmNvcHkocHZzW2ogLSAxXS51dikpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmYy5ub3JtYWwgPSBuZXcgdGhyZWVfMS5WZWN0b3IzKCkuY29weShwLnBsYW5lLm5vcm1hbCk7XG4gICAgICAgICAgICAgICAgZ2VvbS5mYWNlcy5wdXNoKGZjKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgaW52ID0gbmV3IHRocmVlXzEuTWF0cml4NCgpLmdldEludmVyc2UodG9NYXRyaXgpO1xuICAgICAgICBnZW9tLmFwcGx5TWF0cml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gICAgIHZhciBvcCA9IENTRy5jdXJyZW50T3A7XG4gICAgICAgICAgICB0b2tlbnMudXBkYXRlTWF0cml4KCk7XG4gICAgICAgICAgICB0b2tlbnMudXBkYXRlTWF0cml4V29ybGQoKTtcbiAgICAgICAgICAgIGlmICghQ1NHLnNvdXJjZU1lc2gpIHtcbiAgICAgICAgICAgICAgICBDU0cuY3VycmVudFByaW0gPSBDU0cuZnJvbU1lc2goQ1NHLnNvdXJjZU1lc2ggPSB0b2tlbnMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgQ1NHLm5leHRQcmltID0gQ1NHLmZyb21NZXNoKHRva2Vucyk7XG4gICAgICAgICAgICAgICAgQ1NHLmN1cnJlbnRQcmltID0gQ1NHLmN1cnJlbnRQcmltW29wXShDU0cubmV4dFByaW0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKENTRy5kb1JlbW92ZSlcbiAgICAgICAgICAgICAgICB0b2tlbnMucGFyZW50LnJlbW92ZSh0b2tlbnMpO1xuICAgICAgICB9IC8vIHVuaW9uLHN1YnRyYWN0LGludGVyc2VjdCxpbnZlcnNlXG4gICAgfTtcbiAgICBDU0cuZXZhbCA9IGZ1bmN0aW9uICh0b2tlbnMsIGRvUmVtb3ZlKSB7XG4gICAgICAgIENTRy5jdXJyZW50T3AgPSBudWxsO1xuICAgICAgICBDU0cuc291cmNlTWVzaCA9IG51bGw7XG4gICAgICAgIENTRy5kb1JlbW92ZSA9IGRvUmVtb3ZlO1xuICAgICAgICBDU0cuaUV2YWwodG9rZW5zKTtcbiAgICAgICAgdmFyIHJlc3VsdCA9IENTRy50b01lc2goQ1NHLmN1cnJlbnRQcmltLCBDU0cuc291cmNlTWVzaC5tYXRyaXgpO1xuICAgICAgICByZXN1bHQubWF0ZXJpYWwgPSBDU0cuc291cmNlTWVzaC5tYXRlcmlhbDtcbiAgICAgICAgcmVzdWx0LmNhc3RTaGFkb3cgPSByZX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pcbiAgICAgICAgICAgICAgICAodGhpcy5ub3JtYWwuZG90KHBvbHlnb24ucGxhbmUubm9ybWFsKSA+IDAgPyBjb3BsYW5hckZyb250IDogY29wbGFuYXJCYWNrKS5wdXNoKHBvbHlnb24pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBGUk9OVDpcbiAgICAgICAgICAgICAgICBmcm9udC5wdXNoKHBvbHlnb24pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBCQUNLOlxuICAgICAgICAgICAgICAgIGJhY2sucHVzaChwb2x5Z29uKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgU1BBTk5JTkc6XG4gICAgICAgICAgICAgICAgdmFyIGYgPSBbXTtcbiAgICAgICAgICAgICAgICB2YXIgYiA9IFtdO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcG9seWdvbi52ZXJ0aWNlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgaiA9IChpICsgMSkgJSBwb2x5Z29uLnZlcnRpY2VzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpID0gdHlwZXNbaV07XG4gICAgICAgICAgICAgICAgICAgIHZhciB0aiA9IHR5cGVzW2pdO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdmkgPSBwb2x5Z29uLnZlcnRpY2VzW2ldO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdmogPSBwb2x5Z29uLnZlcnRpY2VzW2pdO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGkgIT09IEJBQ0spIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGYucHVzaCh2aSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRpICE9PSBGUk9OVCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYi5wdXNoKHRpICE9PSBCQUNLID8gdmkuY2xvbmUoKSA6IHZpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKHRpIHwgdGopID09PSBTUEFOTklORykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHQgPSAodGhpcy53IC0gdGhpcy5ub3JtYWwuZG90KHZpLnBvcykpIC8gdGhpcy5ub3JtYWwuZG90KHZqLnBvcy5taW51cyh2aS5wb3MpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2ID0gdmkuaW50ZXJwb2xhdGUodmosIHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZi5wdXNoKHYpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYi5wdXNoKHYuY2xvbmUoKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGYubGVuZ3RoID49IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgZnJvbnQucHVzaChuZXcgUG9seWdvbihmLCBwb2x5Z29uLnNoYXJlZCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoYi5sZW5ndGggPj0gMykge1xuICAgICAgICAgICAgICAgICAgICBiYWNrLnB1c2gobmV3IFBvbHlnb24oYiwgcG9seWdvbi5zaGFyZWQpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIC8vIHRoZSB0b2xlcmFuY2UgdXNlZCBieSBgc3BsaXRQb2x5Z29uKClgIHRvIGRlY2lkZSBpZiBhXG4gICAgLy8gcG9pbnQgaXMgb24gdGhlIHBsYW5lLlxuICAgIFBsYW5lLkVQU0lMT04gPSAxZS01O1xuICAgIHJldHVybiBQbGFuZTtcbn0oKSk7XG4vKipcbiAqIFJlcHJlc2VudHMgYSBjb252ZXggcG9seWdvbi4gVGhlIHZlcnRpY2VzIHVzZWQ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LnggKSA6ICggYi54IDwgYy54ID8gYi54IDogYy54ICksXG5cdFx0XHRtaW5UWSA9IGEueSA8IGIueSA/ICggYS55IDwgYy55ID8gYS55IDogYy55ICkgOiAoIGIueSA8IGMueSA/IGIueSA6IGMueSApLFxuXHRcdFx0bWF4VFggPSBhLnggPiBiLnggPyAoIGEueCA+IGMueCA/IGEueCA6IGMueCApIDogKCBiLnggPiBjLnggPyBiLnggOiBjLnggKSxcblx0XHRcdG1heFRZID0gYS55ID4gYi55ID8gKCBhLnkgPiBjLnkgPyBhLnkgOiBjLnkgKSA6ICggYi55ID4gYy55ID8gYi55IDogYy55ICk7XG5cblx0XHQvLyB6LW9yZGVyIHJhbmdlIGZvciB0aGUgY3VycmVudCB0cmlhbmdsZSBiYm94O1xuXHRcdHZhciBtaW5aID0gek9yZGVyKCBtaW5UWCwgbWluVFksIG1pblgsIG1pblksIGludlNpemUgKSxcblx0XHRcdG1heFogPSB6T3JkZXIoIG1heFRYLCBtYXhUWSwgbWluWCwgbWluWSwgaW52U2l6ZSApO1xuXG5cdFx0dmFyIHAgPSBlYXIucHJldlosXG5cdFx0XHRuID0gZWFyLm5leHRaO1xuXG5cdFx0Ly8gbG9vayBmb3IgcG9pbnRzIGluc2lkZSB0aGUgdHJpYW5nbGUgaW4gYm90aCBkaXJlY3Rpb25zXG5cdFx0d2hpbGUgKCBwICYmIHAueiA+PSBtaW5aICYmIG4gJiYgbi56IDw9IG1heFogKSB7XG5cblx0XHRcdGlmICggcCAhPT0gZWFyLnByZXYgJiYgcCAhPT0gZWFyLm5leHQgJiZcblx0XHRcdFx0cG9pbnRJblRyaWFuZ2xlKCBhLngsIGEueSwgYi54LCBiLnksIGMueCwgYy55LCBwLngsIHAueSApICYmXG5cdFx0XHRcdGFyZWEoIHAucHJldiwgcCwgcC5uZXh0ICkgPj0gMCApIHsgcmV0dXJuIGZhbHNlOyB9XG5cdFx0XHRwID0gcC5wcmV2WjtcblxuXHRcdFx0aWYgKCBuICE9PSBlYXI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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG5cdCAqXHQzRCBDdXJ2ZXNcblx0ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuXG5cdC8vIEEgRmFjdG9yeSBtZXRob2QgZm9yIGNyZWF0aW5nIG5ldyBjdXJ2ZSBzdWJjbGFzc2VzXG5cblx0Q3VydmUuY3JlYXRlID0gZnVuY3Rpb24gKCBjb25zdHJ1Y3RvciwgZ2V0UG9pbnRGdW5jICkge1xuXG5cdFx0Y29uc3RydWN0b3IucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZSggQ3VydmUucHJvdG90eXBlICk7XG5cdFx0Y29uc3RydWN0b3IucHJvdG90eXBlLmNvbnN0cnVjdG9yID0gY29uc3RydWN0b3I7XG5cdFx0Y29uc3RydWN0b3IucHJvdG90eXBlLmdldFBvaW50ID0gZ2V0UG9pbnRGdW5jO1xuXG5cdFx0cmV0dXJuIGNvbnN0cnVjdG9yO1xuXG5cdH07XG5cblx0LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG5cdCAqXHRMaW5lXG5cdCAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cblxuXHRmdW5jdGlvbiBMaW5lQ3VydmUoIHYxLCB2MiApIHtcblxuXHRcdHRoaXMudjEgPSB2MTtcblx0XHR0aGlzLnYyID0gdjI7XG5cblx0fVxuXG5cdExpbmVDdXJ2ZS5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKCBDdXJ2ZS5wcm90b3R5cGUgKTtcblx0TGluZUN1cnZlLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IExpbmVDdXJ2ZTtcblxuXHRMaW5lQ3VydmUucHJvdG90eXBlLmlzTGluZUN1cnZlID0gdH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HRcdFx0dGFuZ2VudEN1YmljQmV6aWVyKCB0LCB0aGlzLnYwLnksIHRoaXMudjEueSwgdGhpcy52Mi55LCB0aGlzLnYzLnkgKVxuXHRcdCkubm9ybWFsaXplKCk7XG5cblx0fTtcblxuXHQvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcblx0ICpcdFF1YWRyYXRpYyBCZXppZXIgY3VydmVcblx0ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuXG5cblx0ZnVuY3Rpb24gUXVhZHJhdGljQmV6aWVyQ3VydmUoIHYwLCB2MSwgdjIgKSB7XG5cblx0XHR0aGlzLnYwID0gdjA7XG5cdFx0dGhpcy52MSA9IHYxO1xuXHRcdHRoaXMudjIgPSB2MjtcblxuXHR9XG5cblx0UXVhZHJhdGljQmV6aWVyQ3VydmUucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZSggQ3VydmUucHJvdG90eXBlICk7XG5cdFF1YWRyYXRpY0JlemllckN1cnZlLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IFF1YWRyYXRpY0JlemllckN1cnZlO1xuXG5cblx0UXVhZHJhdGljQmV6aWVyQ3VydmUucHJvdG90eXBlLmdldFBvaW50ID0gZnVuY3Rpb24gKCB0ICkge1xuXG5cdFx0dmFyIGIyID0gU2hhcGVVdGlscy5iMjtcblxuXHRcdHJldHVybiBuZXcgVmVjdG9yMihcblx0XHRcdGIyKCB0LCB0aGlzLnYwLngsIHRoaXMudjEueCwgdGhpcy52Mi54ICksXG5cdFx0XHRiMiggdCwgdGhpcy52MC55LCB0aGlzLnYxLnksIHRoaXMudjIueSApXG5cdFx0KTtcblxuXHR9O1xuXG5cblx0UXVhZHJhdGljQmV6aWVyQ3VydmUucHJvdG90eXBlLmdldFRhbmdlbnQgPSBmdW5jdGlvbiggdCApIHtcblxuXHRcdHZhciB0YW5nZW50U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ludFBvaW50ID4gcG9pbnRzLmxlbmd0aCAtIDMgPyBwb2ludHMubGVuZ3RoIC0gMSA6IGludFBvaW50ICsgMiBdO1xuXG5cdFx0XHR2YXIgaW50ZXJwb2xhdGUgPSBDdXJ2ZVV0aWxzLmludGVycG9sYXRlO1xuXG5cdFx0XHRyZXR1cm4gbmV3IFZlY3RvcjMoXG5cdFx0XHRcdGludGVycG9sYXRlKCBwb2ludDAueCwgcG9pbnQxLngsIHBvaW50Mi54LCBwb2ludDMueCwgd2VpZ2h0ICksXG5cdFx0XHRcdGludGVycG9sYXRlKCBwb2ludDAueSwgcG9pbnQxLnksIHBvaW50Mi55LCBwb2ludDMueSwgd2VpZ2h0ICksXG5cdFx0XHRcdGludGVycG9sYXRlKCBwb2ludDAueiwgcG9pbnQxLnosIHBvaW50Mi56LCBwb2ludDMueiwgd2VpZ2h0IClcblx0XHRcdCk7XG5cblx0XHR9XG5cblx0KTtcblxuXHQvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcblx0ICpcdEN1YmljIEJlemllciAzRCBjdXJ2ZVxuXHQgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG5cblx0dmFyIEN1YmljQmV6aWVyQ3VydmUzID0gQ3VydmUuY3JlYXRlKFxuXG5cdFx0ZnVuY3Rpb24gKCB2MCwgdjEsIHYyLCB2MyApIHtcblxuXHRcdFx0dGhpcy52MCA9IHYwO1xuXHRcdFx0dGhpcy52MSA9IHYxO1xuXHRcdFx0dGhpcy52MiA9IHYyO1xuXHRcdFx0dGhpcy52MyA9IHYzO1xuXG5cdFx0fSxcblxuXHRcdGZ1bmN0aW9uICggdCApIHtcblxuXHRcdFx0dmFyIGIzID0gU2hhcGVVdGlscy5iMztcblxuXHRcdFx0cmV0dXJuIG5ldyBWZWN0b3IzKFxuXHRcdFx0XHRiMyggdCwgdGhpcy52MC54LCB0aGlzLnYxLngsIHRoaXMudjIueCwgdGhpcy52My54ICksXG5cdFx0XHRcdGIzKCB0LCB0aGlzLnYwLnksIHRoaXMudjEueSwgdGhpcy52Mi55LCB0aGlzLnYzLnkgKSxcblx0XHRcdFx0YjMoIHQsIHRoaXMudjAueiwgdGhpcy52MS56LCB0aGlzLnYyLnosIHRoaXMudjMueiApXG5cdFx0XHQpO1xuXG5cdFx0fVxuXG5cdCk7XG5cblx0LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG5cdCAqXHRRdWFkcmF0aWMgQmV6aWVyIDNEIGN1cnZlXG5cdCAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cblxuXHR2YXIgUXVhZHJhdGljQmV6aWVyQ3VydmUzID0gQ3VydmUuY3JlYXRlKFxuXG5cdFx0ZnVuY3Rpb24gKCB2MCwgdjEsIHYyICkge1xuXG5cdFx0XHR0aGlzLnYwID0gdjA7XG5cdFx0XHR0aGlzLnYxID0gdjE7XG5cdFx0XHR0aGlzLnYyID0gdjI7XG5cblx0XHR9LFxuXG5cdFx0ZnVuY3Rpb24gKCB0ICkge1xuXG5cdFx0XHR2YXIgYjIgPSBTaGFwZVV0aWxzLmIyO1xuXG5cdFx0XHRyZXR1cm4gbmV3IFZlY3RvcjMoXG5cdFx0XHRcdGIyKCB0LCB0aGlzLnYwLngsIHRoaXMudjEueCwgdGhpcy52Mi54ICksXG5cdFx0XHRcdGIyKCB0LCB0aGlzLnYwLnksIHRoaXMudjEueSwgdGhpcy52Mi55ICksXG5cdFx0XHRcdGIyKCB0LCB0aGlzLnYwLnosIHRoaXMudjEueiwgdGhpcy52Mi56IClcblx0XHRcdCk7XG5cblx0XHR9XG5cblx0KTtcblxuXHQvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcblx0ICpcdExp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ZDogVmVjdG9yW10gPSBbXG4gICAgICAgICAgICBuZXcgVmVjdG9yKC1leHRlbmRTY3JlZW5YLCAtZXh0ZW5kU2NyZWVuWSksXG4gICAgICAgICAgICBuZXcgVmVjdG9yKC1leHRlbmRTY3JlZW5YLCB0aGlzLmRvbWFpbkNvbnRyb2xsZXIuc2NyZWVuRGltZW5zaW9ucy55ICsgZXh0ZW5kU2NyZWVuWSksXG4gICAgICAgICAgICBuZXcgVmVjdG9yKHRoaXMuZG9tYWluQ29udHJvbGxlci5zY3JlZW5EaW1lbnNpb25zLnggKyBleHRlbmRTY3JlZW5YLCB0aGlzLmRvbWFpbkNvbnRyb2xsZXIuc2NyZWVuRGltZW5zaW9ucy55ICsgZXh0ZW5kU2NyZWVuWSksXG4gICAgICAgICAgICBuZXcgVmVjdG9yKHRoaXMuZG9tYWluQ29udHJvbGxlci5zY3JlZW5EaW1lbnNpb25zLnggKyBleHRlbmRTY3JlZW5YLCAtZXh0ZW5kU2NyZWVuWSksXG4gICAgICAgIF07XG5cbiAgICAgICAgdGhpcy5tYWluR3VpLmdldEJsb2NrcygpLnRoZW4oKGJsb2NrcykgPT4ge1xuICAgICAgICAgICAgdGhpcy5tb2RlbEdlbmVyYXRvciA9IG5ldyBNb2RlbEdlbmVyYXRvcihncm91bmQsXG4gICAgICAgICAgICAgICAgdGhpcy5tYWluR3VpLnNlYVBvbHlnb24sXG4gICAgICAgICAgICAgICAgdGhpcy5tYWluR3VpLmNvYXN0bGluZVBvbHlnb24sXG4gICAgICAgICAgICAgICAgdGhpcy5tYWluR3VpLnJpdmVyUG9seWdvbixcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5HdWkubWFpblJvYWRQb2x5Z29ucyxcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5HdWkubWFqb3JSb2FkUG9seWdvbnMsXG4gICAgICAgICAgICAgICAgdGhpcy5tYWluR3VpLm1pbm9yUm9hZFBvbHlnb25zLFxuICAgICAgICAgICAgICAgIHRoaXMubWFpb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NhYmxlZChmYWxzZSk7XG4gICAgICAgICAgICB0aGlzLnRlbnNvckZpZWxkLmRyYXcodGhpcy50ZW5zb3JDYW52YXMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gRGlzYWJsZSBmaWVsZCBkcmFnIGFuZCBkcm9wXG4gICAgICAgICAgICB0aGlzLmRyYWdDb250cm9sbGVyLnNldERyYWdEaXNhYmxlZCh0cnVlKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHRoaXMucHJldmlvdXNGcmFtZURyYXdUZW5zb3IgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnByZXZpb3VzRnJhbWVEcmF3VGVuc29yID0gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAvLyBGb3JjZSByZWRyYXcgaWYgc3dpdGNoaW5nIGZyb20gdGVuc29yIGZpZWxkXG4gICAgICAgICAgICAgICAgdGhpcy5tYWluR3VpLmRyYXcodGhpcy5fc3R5bGUsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5HdWkuZHJhdyh0aGlzLl9zdHlsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB1cGRhdGUoKTogdm9pZCB7XG4gICAgICAgIGlmICh0aGlzLm1vZGVsR2VuZXJhdG9yKSB7XG4gICAgICAgICAgICBsZXQgY29udGludWVVcGRhdGUgPSB0cnVlO1xuICAgICAgICAgICAgY29uc3Qgc3RhcnQgPSBwZXJmb3JtYW5jZS5ub3coKTtcbiAgICAgICAgICAgIHdoaWxlIChjb250aW51ZVVwZGF0ZSAmJiBwZXJmb3JtYW5jZS5ub3coKSAtIHN0YXJ0IDwgMTAwKSB7XG4gICAgICAgICAgICAgICAgY29udGludWVVcGRhdGUgPSB0aGlzLm1vZGVsR2VuZXJhdG9yLnVwZGF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAg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gKiBBbmdsZSBpbiByYWRpYW5zIHRvIHBvc2l0aXZlIHgtYXhpcyBiZXR3ZWVuIC1waSBhbmQgcGlcbiAgICAgKi9cbiAgICBhbmdsZSgpOiBudW1iZXIge1xuICAgICAgICByZXR1cm4gTWF0aC5hdGFuMih0aGlzLnksIHRoaXMueCk7XG4gICAgfVxuXG4gICAgY2xvbmUoKTogVmVjdG9yIHtcbiAgICAgICAgcmV0dXJuIG5ldyBWZWN0b3IodGhpcy54LCB0aGlzLnkpO1xuICAgIH1cblxuICAgIGNvcHkodjogVmVjdG9yKTogVmVjdG9yIHtcbiAgICAgICAgdGhpcy54ID0gdi54O1xuICAgICAgICB0aGlzLnkgPSB2Lnk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGNyb3NzKHY6IFZlY3Rvcik6IG51bWJlciB7XG4gICAgICAgIHJldHVybiB0aGlzLnggKiB2LnkgLSB0aGlzLnkgKiB2Lng7XG4gICAgfVxuXG4gICAgZGlzdGFuY2VUbyh2OiBWZWN0b3IpOiBudW1iZXIge1xuICAgICAgICByZXR1cm4gTWF0aC5zcXJ0KHRoaXMuZGlzdGFuY2VUb1NxdWFyZWQodikpO1xuICAgIH1cblxuICAgIGRpc3RhbmNlVG9TcXVhcmVkICh2OiBWZWN0b3IpOiBudW1iZXIge1xuICAgICAgICBjb25zdCBkeCA9IHRoaXMueCAtIHYueFxuICAgICAgICBjb25zdCBkeSA9IHRoaXMueSAtIHYueTtcbiAgICAgICAgcmV0dXJuIGR4ICogZHggKyBkeSAqIGR5O1xuICAgIH1cblxuICAgIGRpdmlkZSh2OiBWZWN0b3IpOiBWZWN0b3Ige1xuICAgICAgICBpZiAodi54ID09PSAwIHx8IHYueSA9PT0gMCkge1xuICAgICAgICAgICAgbG9nLndhcm4oXCJEaXZpc2lvbiBieSB6ZXJvXCIpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnggLz0gdi54O1xuICAgICAgICB0aGlzLnkgLz0gdi55O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBkaXZpZGVTY2FsYXIoczogbnVtYmVyKTogVmVjdG9yIHtcbiAgICAgICAgaWYgKHMgPT09IDApIHtcbiAgICAgICAgICAgIGxvZy53YXJuKFwiRGl2aXNpb24gYnkgemVyb1wiKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzLm11bHRpcGx5U2NhbGFyKDEgLyBzKTtcbiAgICB9XG5cbiAgICBkb3QodjogVmVjdG9yKTogbnVtYmVyIHtcbiAgICAgICAgcmV0dXJuIHRoaXMueCAqIHYueCArIHRoaXMueSAqIHYueTtcbiAgICB9XG5cbiAgICBlcXVhbHModjogVmVjdG9yKTogYm9vbGVhbiB7XG4gICAgICAgIHJldHVybiAoKHYueCA9PT0gdGhpcy54KSAmJiAodi55ID09PSB0aGlzLnkpKTtcbiAgICB9XG5cbiAgICBsZW5ndGgoKTogbnVtYmVyIHtcbiAgICAgICAgcmV0dXJuIE1hdGguc3FydCh0aGlzLmxlbmd0aFNxKCkpO1xuICAgIH1cblxuICAgIGxlbmd0aFNxKCk6IG51bWJlciB7XG4gICAgICAgIHJldHVybiB0aGlzLnggKiB0aGlzLnggKyB0aGlzLnkgKiB0aGlzLnk7XG4gICAgfVxuXG4gICAgbXVsdGlwbHkodjogVmVjdG9yKTogVmVjdG9yIHtcbiAgICAgICAgdGhpcy54ICo9IHYueDtcbiAgICAgICAgdGhpcy55ICo9IHYueTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgbXVsdGlwbHlTY2FsYXIoczogbnVtYmVyKTogVmVjdG9yIHtcbiAgICAgICAgdGhpcy54ICo9IHM7XG4gICAgICAgIHRoaXMueSAqPSBzO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBuZWdhdGUoKTogVmVjdG9yIHtcbiAgICAgICAgcmV0dXJuIHRoaXMubXVsdGlwbHlTY2FsYXIoLTEpO1xuICAgIH1cblxuICAgIG5vcm1hbGl6ZSgpOiBWZWN0b3Ige1xuICAgICAgICBjb25zdCBsID0gdGhpcy5sZW5ndGgoKTtcbiAgICAgICAgaWYgKGwgPT09IDApIHtcbiAgICAgICAgICAgIGxvZy53YXJuKFwiWmVybyBWZWN0b3JcIik7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIHRoaXMuZGl2aWRlU2NhbGFyKHRoaXMubGVuZ3RoKCkpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEFuZ2xlIGluIHJhZGlhbnNcbiAgICAgKi9cbiAgICByb3RhdGVBcm91bmQoY2VudGVyOiBWZWN0b3IsIGFuZ2xlOiBudW1iZXIpOiBWZWN0b3Ige1xuICAgICAgICBjb25zdCBjb3MgPSBNYXRoLmNvcyhhbmdsZSlcbiAgICAgICAgY29uc3Qgc2luID0gTWF0aC5zaW4oYW5nbGUpO1xuXG4gICAgICAgIGNvbnN0IHggPSB0aGlzLnggLSBjZW50ZXIueDtcbiAgICAgICAgY29uc3QgeSA9IHRoaXMueSAtIGNlbnRlci55O1xuXG4gICAgICAgIHRoaXMueCA9IHggKiBjb3MgLSB5ICogc2luICsgY2VudGVyLng7XG4gICAgICAgIHRoaXMueSA9IHggKiBzaW4gKyB5ICogY29zICsgY2VudGVyLnk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIHNldCh2OiBWZWN0b3IpOiBWZWN0b3Ige1xuICAgICAgICB0aGlzLnggPSB2Lng7XG4gICAgICAgIHRoaXMueSA9IHYueTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgc2V0WCh4OiBudW1iZXIpOiBWZWN0b3Ige1xuICAgICAgICB0aGlzLnggPSB4O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAg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IHF1YWR0cmVlLCBub2RlQWRkUmFkaXVzLCBkc3RlcCk7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKG5vZGVzQWxvbmdTZWdtZW50Lmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBub2Rlc0Fsb25nU2VnbWVudC5sZW5ndGggLSAxOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVzQWxvbmdTZWdtZW50W2pdLmFkZE5laWdoYm9yKG5vZGVzQWxvbmdTZWdtZW50W2orMV0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbG9nLmVycm9yKFwiRXJyb3IgR3JhcGguanM6IHNlZ21lbnQgd2l0aCBsZXNzIHRoYW4gMiBub2Rlc1wiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBcbiAgICAgICAgZm9yIChjb25zdCBuIG9mIHF1YWR0cmVlLmRhdGEoKSkge1xuICAgICAgICAgICAgaWYgKGRlbGV0ZURhbmdsaW5nKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5kZWxldGVEYW5nbGluZ05vZGVzKG4sIHF1YWR0cmVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBuLmFkaiA9IEFycmF5LmZyb20obi5uZWlnaGJvcnMpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5ub2RlcyA9IHF1YWR0cmVlLmRhdGEoKTtcbiAgICAgICAgdGhpcy5pbnRlcnNlY3Rpb25zID0gW107XG4gICAgICAgIGZvciAoY29uc3QgaSBvZiBpbnRlcnNlY3Rpb25zKSB0aGlzLmludGVyc2VjdGlvbnMucHVzaChuZXcgVmVjdG9yKGkucG9pbnQueCwgaS5wb2ludC55KSk7XG4gICAgfVxuXG4gICAgLyoq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5vZGUgPSBxdWFkdHJlZS5maW5kKGN1cnJlbnRQb2ludC54LCBjdXJyZW50UG9pbnQueSwgcmFkaXVzICsgc3RlcC8yKTtcblxuICAgICAgICAgICAgd2hpbGUgKGNsb3Nlc3ROb2RlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBxdWFkdHJlZS5yZW1vdmUoY2xvc2VzdE5vZGUpO1xuICAgICAgICAgICAgICAgIGZvdW5kTm9kZXMucHVzaChjbG9zZXN0Tm9kZSk7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgbGV0IG5vZGVPblNlZ21lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBzIG9mIGNsb3Nlc3ROb2RlLnNlZ21lbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmZ1enp5U2VnbWVudHNFcXVhbChzLCBzZWdtZW50KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZU9uU2VnbWVudCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChub2RlT25TZWdtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIG5vZGVzVG9BZGQucHVzaChjbG9zZXN0Tm9kZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY2xvc2VzdE5vZGUgPSBxdWFkdHJlZS5maW5kKGN1cnJlbnRQb2ludC54LCBjdXJyZW50UG9pbnQueSwgcmFkaXVzICsgc3RlcC8yKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbm9kZXNUb0FkZC5zb3J0KChmaXJzdDogTm9kZSwgc2Vjb25kOiBOb2RlKSA9PlxuICAgICAgICAgICAgICAgIHRoaXMuZG90UHJvZHVjdFRvU2VnbWVudChmaXJzdCwgc3RhcnQsIGRpZmZlcmVuY2VWZWN0b3IpIC0gdGhpcy5kb3RQcm9kdWN0VG9TZWdtZW50KHNlY29uZCwgc3RhcnQsIGRpZmZlcmVuY2VWZWN0b3IpKTtcbiAgICAgICAgICAgIG5vZGVzQWxvbmdTZWdtZW50LnB1c2goLi4ubm9kZXNUb0FkZCk7XG4gICAgICAgIH1cblxuICAgICAgICBxdWFkdHJlZS5hZGRBbGwoZm91bmROb2Rlcyk7XG4gICAgICAgIHJldHVybiBub2Rlc0Fsb25nU2VnbWVudDtcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1enp5U2VnbWVudHNFcXVhbChzMTogU2VnbWVudCwgczI6IFNlZ21lbnQsIHRvbGVyYW5jZT0wLjAwMDEpOiBib29sZWFuIHtcbiAgICAgICAgLy8gRnJvbVxuICAgICAgICBpZiAoczEuZnJvbS54IC0gczIuZnJvbS54ID4gdG9sZXJhbmNlKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoczEuZnJvbS55IC0gczIuZnJvbS55ID4gdG9sZXJhbmNlKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBUb1xuXG4gICAgICAgIGlmIChzMS50by54IC0gczIudG8ueCA+IHRvbGVyYW5jZSkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHMxLnRvLnkgLSBzMi50by55ID4gdG9sZXJhbmNlKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGRvdFByb2R1Y3RUb1NlZ21lbnQobm9kZTogTm9kZSwgc3RhcnQ6IFZlY3RvciwgZGlmZmVyZW5jZVZlY3RvcjogVmVjdG9yKTogbnVtYmVyIHtcbiAgICAgICAgY29uc3QgZG90VmVjdG9yID0gbm9kZ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uczogVmVjdG9yLCBwcml2YXRlIG9yaWdpbjogVmVjdG9yLCBwcml2YXRlIGRzZXA6IG51bWJlcikge1xuICAgICAgICB0aGlzLmRzZXBTcSA9IHRoaXMuZHNlcCAqIHRoaXMuZHNlcDtcbiAgICAgICAgdGhpcy5ncmlkRGltZW5zaW9ucyA9IHdvcmxkRGltZW5zaW9ucy5jbG9uZSgpLmRpdmlkZVNjYWxhcih0aGlzLmRzZXApO1xuICAgICAgICB0aGlzLmdyaWQgPSBbXTtcbiAgICAgICAgZm9yIChsZXQgeCA9IDA7IHggPCB0aGlzLmdyaWREaW1lbnNpb25zLng7IHgrKykge1xuICAgICAgICAgICAgdGhpcy5ncmlkLnB1c2goW10pO1xuICAgICAgICAgICAgZm9yIChsZXQgeSA9IDA7IHkgPCB0aGlzLmdyaWREaW1lbnNpb25zLnk7IHkrKykge1xuICAgICAgICAgICAgICAgIHRoaXMuZ3JpZFt4XS5wdXNoKFtdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEFkZCBhbGwgc2FtcGxlcyBmcm9tIGFub3RoZXIgZ3JpZCB0byB0aGlzIG9uZVxuICAgICAqL1xuICAgIGFkZEFsbChncmlkU3RvcmFnZTogR3JpZFN0b3JhZ2UpOiB2b2lkIHtcbiAgICAgICAgZm9yIChjb25zdCByb3cgb2YgZ3JpZFN0b3JhZ2UuZ3JpZCkge1xuICAgICAgICAgICAgZm9yIChjb25zdCBjZWxsIG9mIHJvdykge1xuICAgICAgICAgICAgICAgIGZvciAoY29uc3Qgc2FtcGxlIG9mIGNlbGwpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hZGRTYW1wbGUoc2FtcGxlKTsgICAgICAgIFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGFkZFBvbHlsaW5lKGxpbmU6IFZlY3RvcltdKTogdm9pZCB7XG4gICAgICAgI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gMSAqIHJhZGl1czsgeCsrKSB7XG4gICAgICAgICAgICBmb3IgKGxldCB5ID0gLTEgKiByYWRpdXM7IHkgPD0gMSAqIHJhZGl1czsgeSsrKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgY2VsbCA9IGNvb3Jkcy5jbG9uZSgpLmFkZChuZXcgVmVjdG9yKHgsIHkpKTtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMudmVjdG9yT3V0T2ZCb3VuZHMoY2VsbCwgdGhpcy5ncmlkRGltZW5zaW9ucykpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCB2MiBvZiB0aGlzLmdyaWRbY2VsbC54XVtjZWxsLnldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXQucHVzaCh2Mik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gb3V0O1xuICAgIH1cblxuICAgIHByaXZhdGUgd29ybGRUb0dyaWQodjogVmVjdG9yKTogVmVjdG9yIHtcbiAgICAgICAgcmV0dXJuIHYuY2xvbmUoKS5zdWIodGhpcy5vcmlnaW4pO1xuICAgIH1cblxuICAgIHByaXZhdGUgZ3JpZFRvV29ybGQodjogVmVjdG9yKTogVmVjdG9yIHtcbiAgICAgICAgcmV0dXJuIHYuY2xvbmUoKS5hZGQodGhpcy5vcmlnaW4pO1xuICAgIH1cblxuICAgIHByaXZhdGUgdmVjdG9yT3V0T2ZCb3VuZHMoZ3JpZFY6IFZlY3RvciwgYm91bmRzOiBWZWN0b3IpOiBib29sZWFuIHtcbiAgICAgICAgcmV0dXJuIChncmlkVi54IDwgMCB8fCBncmlkVi55IDwgMCB8fFxuICAgICAgICAgICAgZ3JpZFYueCA+PSBib3VuZHMueCB8fCBncmlkVi55ID49IGJvdW5kcy55KTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAcmV0dXJuIHtWZWN0b3J9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zID0gW107XG4gICAgICAgIHRoaXMuX3NocnVua1BvbHlnb25zID0gW11cbiAgICAgICAgdGhpcy5fZGl2aWRlZFBvbHlnb25zID0gW107XG4gICAgfVxuXG4gICAgdXBkYXRlKCk6IGJvb2xlYW4ge1xuICAgICAgICBsZXQgY2hhbmdlID0gZmFsc2U7XG4gICAgICAgIGlmICh0aGlzLnRvU2hyaW5rLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIGNvbnN0IHJlc29sdmUgPSB0aGlzLnRvU2hyaW5rLmxlbmd0aCA9PT0gMTtcbiAgICAgICAgICAgIGlmICh0aGlzLnN0ZXBTaHJpbmsodGhpcy50b1Nocmluay5wb3AoKSkpIHtcbiAgICAgICAgICAgICAgICBjaGFuZ2UgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAocmVzb2x2ZSkgdGhpcy5yZXNvbHZlU2hyaW5rKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy50b0RpdmlkZS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICBjb25zdCByZXNvbHZlID0gdGhpcy50b0RpdmlkZS5sZW5ndGggPT09IDE7XG4gICAgICAgICAgICBpZiAodGhpcy5zdGVwRGl2aWRlKHRoaXMudG9EaXZpZGUucG9wKCkpKSB7XG4gICAgICAgICAgICAgICAgY2hhbmdlID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHJlc29sdmUpIHRoaXMucmVzb2x2ZURpdmlkZSgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjaGFuZ2U7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUHJvcGVybHkgc2hyaW5rIHBvbHlnb24gc28gdGhlIGVkZ2VzIGFyZSBhbGwgdGhlIHNhbWUgZGlzdGFuY2UgZnJvbSB0aGUgcm9hZFxuICAgICAqL1xuICAgIGFzeW5jIHNocmluayhhbmltYXRlPWZhbHNlKTogUHJvbWlzZTx2b2lkPiB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTx2b2lkPihyZXNvbHZlID0+IHtcbiAgICAgICAgICAgIGlmICh0aGlzLl9wb2x5Z29ucy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmZpbmRQb2x5Z29ucygpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoYW5pbWF0ZSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLl9wb2x5Z29ucy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy50b1NocmluayA9IHRoaXMuX3BvbHlnb25zLnNsaWNlKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlU2hyaW5rID0gcmVzb2x2ZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fc2hydW5rUG9seWdvbnMgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHAgb2YgdGhpcy5fcG9seWdvbnMpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGVwU2hyaW5rKHApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHByaXZhdGUgc3RlcFNocmluayhwb2x5Z29uOiBWZWN0b3JbXSk6IGJvb2xlYW4ge1xuICAgICAgICBjb25zdCBzaHJ1bmsgPSBQb2x5Z29uVXRpbC5yZXNpemVHZW9tZXRyeShwb2x5Z29uLCAtdGhpcy5wYXJhbXMuc2hyaW5rU3BhY2luZyk7XG4gICAgICAgIGlmIChzaHJ1bmsubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgdGhpcy5fc2hydW5rUG9seWdvbnMucHVzaChzaHJ1bmspXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgYXN5bmMgZGl2aWRlKGFuaW1hdGU9ZmFsc2UpOiBQcm9taXNlPHZvaWQ+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlPHZvaWQ+KHJlc29sdmUgPT4ge1xuICAgICAgICAgICAgaWYgKHRoaXMuX3BvbHlnb25zLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHRoaXMuZmluZFBvbHlnb25zKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxldCBwb2x5Z29ucyA9IHRoaXMuX3BvbHlnb25zO1xuICAgICAgICAgICAgaWYgKHRoaXMuX3NocnVua1BvbHlnb25zLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICBwb2x5Z29ucyA9IHRoaXMuX3NocnVua1BvbHlnb25zO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoYW5pbWF0ZSkge1xuICAgICAgICAgICAgICAgIGlmIChwb2x5Z29ucy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy50b0RpdmlkZSA9IHBvbHlnb25zLnNsaWNlKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlRGl2aWRlID0gcmVzb2x2ZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fZGl2aWRlZFBvbHlnb25zID0gW107XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBwIG9mIHBvbHlnb25zKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc3RlcERpdmlkZShwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBwcml2YXRlIHN0ZXBEaXZpZGUocG9seWdvbjogVmVjdG9yW10pOiBib29sZWFuIHtcbiAgICAgICAgLy8gVE9ETyBuZWVkIHRvIGZpbHRlciBzaHJ1bmsgcG9seWdvbnMgdXNpbmcgYXNwZWN0IHJhdGlvLCBhcmVhIFxuICAgICAgICAvLyB0aGlzIHNraXBzIHRoZSBmaWx0ZXIgaW4gUG9seWdvblV0aWwuc3ViZGl2aWRlUG9seWdvblxuICAgICAgICBpZiAodGhpcy5wYXJhbXMuY2hhbmNlTm9EaXZpZGUgPiAwICYmIE1hdGgucmFuZG9tKCkgPCB0aGlzLnBhcmFtcy5jaGFuY2VOb0RpdmlkZSkge1xuICAgICAgICAgICAgdGhpcy5fZGl2aWRlZFBvbHlnb25zLnB1c2gocG9seWdvbik7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBkaXZpZGVkID0gUG9seWdvblV0aWwuc3ViZGl2aWRlUG9seWdvbihwb2x5Z29uLCB0aGlzLnBhcmFtcy5taW5BcmVhKTtcbiAgICAgICAgaWYgKGRpdmlkZWQubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgdGhpcy5fZGl2aWRlZFBvbHlnb25zLnB1c2goLi4uZGl2aWRlZCk7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgZmluZFBvbHlnb25zKCk6IHZvaWQge1xuICAgICAgICAvLyBOb2RlXG4gICAgICAgIC8vIHgsIHksIHZhbHVlIChWZWN0b3IyKSwgYWRqIChsaXN0IG9mIG5vZGUgcmVmcylcbiAgICAgICAgLy8gR29ubmEgZWRpdCBhZGog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9uZSgpKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5fcG9seWdvbnMgPSB0aGlzLmZpbHRlclBvbHlnb25zQnlXYXRlcihwb2x5Z29ucyk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmaWx0ZXJQb2x5Z29uc0J5V2F0ZXIocG9seWdvbnM6IFZlY3RvcltdW10pOiBWZWN0b3JbXVtdIHtcbiAgICAgICAgY29uc3Qgb3V0OiBWZWN0b3JbXVtdID0gW107XG4gICAgICAgIGZvciAoY29uc3QgcCBvZiBwb2x5Z29ucykge1xuICAgICAgICAgICAgY29uc3QgYXZlcmFnZVBvaW50ID0gUG9seWdvblV0aWwuYXZlcmFnZVBvaW50KHApO1xuICAgICAgICAgICAgaWYgKHRoaXMudGVuc29yRmllbGQub25MYW5kKGF2ZXJhZ2VQb2ludCkgJiYgIXRoaXMudGVuc29yRmllbGQuaW5QYXJrcyhhdmVyYWdlUG9pbnQpKSBvdXQucHVzaChwKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb3V0O1xuICAgIH1cblxuICAgIHByaXZhdGUgcmVtb3ZlUG9seWdvbkFkamFjZW5jaWVzKHBvbHlnb246IE5vZGVbXSk6IHZvaWQge1xuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHBvbHlnb24ubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnQgPSBwb2x5Z29uW2ldO1xuICAgICAgICAgICAgY29uc3QgbmV4dCA9IHBvbHlnb25bKGkgKyAxKSAlIHBvbHlnb24ubGVuZ3RoXTtcblxuICAgICAgICAgICAgY29uc3QgaW5kZXggPSBjdXJyZW50LmFkai5pbmRleE9mKG5leHQpO1xuICAgICAgICAgICAgaWYgKGluZGV4ID49IDApIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50LmFkai5zcGxpY2UoaW5kZXgsIDEpO1xuICAgICAgICAgICA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yKG9yaWdpbi54LCBvcmlnaW4ueSArIHdvcmxkRGltZW5zaW9ucy55KSxcbiAgICAgICAgXTtcbiAgICAgICAgY29uc3QgYm91bmRpbmdQb2x5ID0gUG9seWdvblV0aWwucG9seWdvblRvSnRzKGJvdW5kcyk7XG4gICAgICAgIGNvbnN0IHVuaW9uID0gYm91bmRpbmdQb2x5LmdldEV4dGVyaW9yUmluZygpLnVuaW9uKGpzdHNMaW5lKTtcbiAgICAgICAgY29uc3QgcG9seWdvbml6ZXIgPSBuZXcgKGpzdHMub3BlcmF0aW9uIGFzIGFueSkucG9seWdvbml6ZS5Qb2x5Z29uaXplcigpO1xuICAgICAgICBwb2x5Z29uaXplci5hZGQodW5pb24pO1xuICAgICAgICBjb25zdCBwb2x5Z29ucyA9IHBvbHlnb25pemVyLmdldFBvbHlnb25zKCk7XG5cbiAgICAgICAgbGV0IHNtYWxsZXN0QXJlYSA9IEluZmluaXR5O1xuICAgICAgICBsZXQgc21hbGxlc3RQb2x5O1xuICAgICAgICBmb3IgKGxldCBpID0gcG9seWdvbnMuaXRlcmF0b3IoKTsgaS5oYXNOZXh0KCk7KSB7XG4gICAgICAgICAgICBjb25zdCBwb2x5Z29uID0gaS5uZXh0KCk7XG4gICAgICAgICAgICBjb25zdCBhcmVhID0gcG9seWdvbi5nZXRBcmVhKCk7XG4gICAgICAgICAgICBpZiAoYXJlYSA8IHNtYWxsZXN0QXJlYSkge1xuICAgICAgICAgICAgICAgIHNtYWxsZXN0QXJlYSA9IGFyZWE7XG4gICAgICAgICAgICAgICAgc21hbGxlc3RQb2x5ID0gcG9seWdvbjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghc21hbGxlc3RQb2x5KSByZXR1cm4gW107XG4gICAgICAgIHJldHVybiBzbWFsbGVzdFBvbHkuZ2V0Q29vcmRpbmF0ZXMoKS5tYXAoKGM6IGFueSkgPT4gbmV3IFZlY3RvcihjLngsIGMueSkpO1xuICAgIH1cblxuICA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VibGljIHN0YXRpYyBhdmVyYWdlUG9pbnQocG9seWdvbjogVmVjdG9yW10pOiBWZWN0b3Ige1xuICAgICAgICBpZiAocG9seWdvbi5sZW5ndGggPT09IDApIHJldHVybiBWZWN0b3IuemVyb1ZlY3RvcigpO1xuICAgICAgICBjb25zdCBzdW0gPSBWZWN0b3IuemVyb1ZlY3RvcigpO1xuICAgICAgICBmb3IgKGNvbnN0IHYgb2YgcG9seWdvbikge1xuICAgICAgICAgICAgc3VtLmFkZCh2KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3VtLmRpdmlkZVNjYWxhcihwb2x5Z29uLmxlbmd0aCk7XG4gICAgfVxuXG4gICAgcHVibGljIHN0YXRpYyBpbnNpZGVQb2x5Z29uKHBvaW50OiBWZWN0b3IsIHBvbHlnb246IFZlY3RvcltdKTogYm9vbGVhbiB7XG4gICAgICAgIC8vIHJheS1jYXN0aW5nIGFsZ29yaXRobSBiYXNlZCBvblxuICAgICAgICAvLyBodHRwOi8vd3d3LmVjc2UucnBpLmVkdS9Ib21lcGFnZXMvd3JmL1Jlc2VhcmNoL1Nob3J0X05vdGVzL3BucG9seS5odG1sXG5cbiAgICAgICAgaWYgKHBvbHlnb24ubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgaW5zaWRlID0gZmFsc2U7XG4gICAgICAgIGZvciAobGV0IGkgPSAwLCBqID0gcG9seWdvbi5sZW5ndGggLSAxOyBpIDwgcG9seWdvbi5sZW5ndGg7IGogPSBpKyspIHtcbiAgICAgICAgICAgIGNvbnN0IHhpID0gcG9seWdvbltpXS54LCB5aSA9IHBvbHlnb25baV0ueTtcbiAgICAgICAgICAgIGNvbnN0IHhqID0gcG9seWdvbltqXS54LCB5aiA9IHBvbHlnb25bal0ueTtcblxuICAgICAgICAgICAgY29uc3QgaW50ZXJzZWN0ID0gKCh5aSA+IHBvaW50LnkpICE9ICh5aiA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xpbmVzXG4gICAgICovXG4gICAgam9pbkRhbmdsaW5nU3RyZWFtbGluZXMoKTogdm9pZCB7XG4gICAgICAgIC8vIFRPRE8gZG8gaW4gdXBkYXRlIG1ldGhvZFxuICAgICAgICBmb3IgKGNvbnN0IG1ham9yIG9mIFt0cnVlLCBmYWxzZV0pIHtcbiAgICAgICAgICAgIGZvciAoY29uc3Qgc3RyZWFtbGluZSBvZiB0aGlzLnN0cmVhbWxpbmVzKG1ham9yKSkge1xuICAgICAgICAgICAgICAgIC8vIElnbm9yZSBjaXJjbGVzXG4gICAgICAgICAgICAgICAgaWYgKHN0cmVhbWxpbmVbMF0uZXF1YWxzKHN0cmVhbWxpbmVbc3RyZWFtbGluZS5sZW5ndGggLSAxXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3QgbmV3U3RhcnQgPSB0aGlzLmdldEJlc3ROZXh0UG9pbnQoc3RyZWFtbGluZVswXSwgc3RyZWFtbGluZVs0XSwgc3RyZWFtbGluZSlcbiAgICAgICAgICAgICAgICBpZiAobmV3U3RhcnQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBwIG9mIHRoaXMucG9pbnRzQmV0d2VlbihzdHJlYW1saW5lWzBdLCBuZXdTdGFydCwgdGhpcy5wYXJhbXMuZHN0ZXApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW1saW5lLnVuc2hpZnQocCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmdyaWQobWFqb3IpLmFkZFNhbXBsZShwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IG5ld0VuZCA9IHRoaXMuZ2V0QmVzdE5leHRQb2ludChzdHJlYW1saW5lW3N0cmVhbWxpbmUubGVuZ3RoIC0gMV0sIHN0cmVhbWxpb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OiBWZWN0b3Ige1xuICAgICAgICBjb25zdCBuZWFyYnlQb2ludHMgPSB0aGlzLm1ham9yR3JpZC5nZXROZWFyYnlQb2ludHMocG9pbnQsIHRoaXMucGFyYW1zLmRsb29rYWhlYWQpO1xuICAgICAgICBuZWFyYnlQb2ludHMucHVzaCguLi50aGlzLm1pbm9yR3JpZC5nZXROZWFyYnlQb2ludHMocG9pbnQsIHRoaXMucGFyYW1zLmRsb29rYWhlYWQpKTtcbiAgICAgICAgY29uc3QgZGlyZWN0aW9uID0gcG9pbnQuY2xvbmUoKS5zdWIocHJldmlvdXNQb2ludCk7XG5cbiAgICAgICAgbGV0IGNsb3Nlc3RTYW1wbGUgPSBudWxsO1xuICAgICAgICBsZXQgY2xvc2VzdERpc3RhbmNlID0gSW5maW5pdHk7XG5cbiAgICAgICAgZm9yIChjb25zdCBzYW1wbGUgb2YgbmVhcmJ5UG9pbnRzKSB7XG4gICAgICAgICAgICBpZiAoIXNhbXBsZS5lcXVhbHMocG9pbnQpICYmICFzYW1wbGUuZXF1YWxzKHByZXZpb3VzUG9pbnQpKSB7Ly8gJiYgIXN0cmVhbWxpbmUuaW5jbHVkZXMoc2FtcGxlKSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGRpZmZlcmVuY2VWZWN0b3IgPSBzYW1wbGUuY2xvbmUoKS5zdWIocG9pbnQpO1xuICAgICAgICAgICAgICAgIGlmIChkaWZmZXJlbmNlVmVjdG9yLmRvdChkaXJlY3Rpb24pIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAvLyBCYWNrd2FyZHNcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIEFjdXRlIGFuZ2xlIGJldHdlZW4gdmVjdG9ycyAoYWdub3N0aWMgb2YgQ1csIEFDVylcbiAgICAgICAgICAgICAgICBjb25zdCBkaXN0YW5jZVRvU2FtcGxlID0gcG9pbnQu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ikpIHtcbiAgICAgICAgICAgIC8vICAgICBwYXJhbXMudmFsaWQgPSBmYWxzZTtcbiAgICAgICAgICAgIC8vICAgICBwYXJhbXMuc3RyZWFtbGluZS5wdXNoKFZlY3Rvci56ZXJvVmVjdG9yKCkpO1xuICAgICAgICAgICAgLy8gfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5wb2ludEluQm91bmRzKG5leHRQb2ludClcbiAgICAgICAgICAgICAgICAmJiB0aGlzLmlzVmFsaWRTYW1wbGUobWFqb3IsIG5leHRQb2ludCwgdGhpcy5wYXJhbXNTcS5kdGVzdCwgY29sbGlkZUJvdGgpXG4gICAgICAgICAgICAgICAgJiYgIXRoaXMuc3RyZWFtbGluZVR1cm5lZChwYXJhbXMuc2VlZCwgcGFyYW1zLm9yaWdpbmFsRGlyLCBuZXh0UG9pbnQsIG5leHREaXJlY3Rpb24pKSB7XG4gICAgICAgICAgICAgICAgcGFyYW1zLnByZXZpb3VzUG9pbnQgPSBuZXh0UG9pbnQ7XG4gICAgICAgICAgICAgICAgcGFyYW1zLnByZXZpb3VzRGlyZWN0aW9uID0gbmV4dERpcmVjdGlvbjtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gT25lIG1vcmUgc3RlcFxuICAgICAgICAgICAgICAgIHBhcmFtcy5zdHJlYW1saW5lLnB1c2gobmV4dFBvaW50KTtcbiAgICAgICAgICAgICAgICBwYXJhbXMudmFsaWQgPSBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEJ5IHNpbXVsdGFuZW91c2x5IGludGVncmF0aW5nIGluIGJvdGggZGlyZWN0aW9ucyB3ZSByZWR1Y2UgdGhlIGltcGFjdCBvZiBjaXJjbGVzIG5vdCBqb2luaW5nXG4gICAgICogdXAgYXMgdGhlIGVycm9yIG1hdGNoZXMgYXQgdGhlIGpvaW5cbiAgICAgKi9cbiAgICBwcm90ZWN0ZWQg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ICAgIH1cblxuICAgIGFkZCh0ZW5zb3I6IFRlbnNvcik6IFRlbnNvciB7XG4gICAgICAgIHRoaXMubWF0cml4ID0gdGhpcy5tYXRyaXgubWFwKCh2LCBpKSA9PiB2ICogdGhpcy5yICsgdGVuc29yLm1hdHJpeFtpXSAqIHRlbnNvci5yKTtcbiAgICAgICAgdGhpcy5yID0gTWF0aC5oeXBvdCguLi50aGlzLm1hdHJpeCk7XG4gICAgICAgIHRoaXMubWF0cml4ID0gdGhpcy5tYXRyaXgubWFwKHYgPT4gdiAvIHRoaXMucik7XG4gICAgICAgIHRoaXMub2xkVGhldGEgPSB0cnVlO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBzY2FsZShzOiBudW1iZXIpOiBUZW5zb3Ige1xuICAgICAgICB0aGlzLnIgKj0gcztcbiAgICAgICAgdGhpcy5vbGRUaGV0YSA9IHRydWU7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIC8vIFJhZGlhbnNcbiAgICByb3RhdGUodGhldGE6IG51bWJlcik6IFRlbnNvciB7XG4gICAgICAgIGlmICh0aGV0YSA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH1cbiAgICAgICAgbGV0IG5ld1RoZXRhID0gdGhpcy50aGV0YSArIHRoZXRhO1xuICAgICAgICBpZiAobmV3VGhldGEgPCBNYXRoLlBJKSB7XG4gICAgICAgICAgICBuZXdUaGV0YSArPSBNYXRoLlBJO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG5ld1RoZXRhID49IE1hdGguUEkpIHtcbiAgICAgICAgICAgIG5ld1RoZXRhIC09IE1hdGguUEk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLm1hdHJpeFswXSA9IE1hdGguY29zKDQgKiBuZXdUaGV0YSkgKiB0aGlzLnI7XG4gICAgICAgIHRoaXMubWF0cml4WzFdID0gTWF0aC5zaW4oNCAqIG5ld1RoZXRhKSA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ICAgICAgIGNvbnN0IHNlYUxldmVsTWVzaCA9IHRoaXMucG9seWdvblRvTWVzaCh0aGlzLmdyb3VuZCwgMCk7XG4gICAgICAgICAgICAgICAgdGhpcy50aHJlZVRvQmxlbmRlcihzZWFMZXZlbE1lc2gpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHNlYUxldmVsU1RMID0gdGhpcy5leHBvcnRTVEwuZnJvbU1lc2goc2VhTGV2ZWxNZXNoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnppcC5maWxlKFwibW9kZWwvZG9tYWluLnN0bFwiLCBzZWFMZXZlbFNUTCk7XG5cbiAgICAgICAgICAgICAgICBjb25zdCBzZWFNZXNoID0gdGhpcy5wb2x5Z29uVG9NZXNoKHRoaXMuc2VhLCAwKTtcbiAgICAgICAgICAgICAgICB0aGlzLnRocmVlVG9CbGVuZGVyKHNlYU1lc2gpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHNlYU1lc2hTVEwgPSB0aGlzLmV4cG9ydFNUTC5mcm9tTWVzaChzZWFNZXNoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnppcC5maWxlKFwibW9kZWwvc2VhLnN0bFwiLCBzZWFNZXNoU1RMKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKE1vZGVsR2VuZXJhdG9yU3RhdGVzLkFERF9DT0FTVExJTkUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBNb2RlbEdlbmVyYXRvclN0YXRlcy5BRERfQ09BU1RMSU5FOiB7XG4gICAgICAgICAgICAgICAgY29uc3QgY29hc3RsaW5lTWVzaCA9IHRoaXMucG9seWdvblRvTWVzaCh0aGlzLmNvYXN0bGluZSwgMCk7XG4gICAgICAgICAgICAgICAgdGhpcy50aHJlZVRvQmxlbmRlcihjb2FzdGxpbmVNZXNoKTtcbiAgICAgICAgICAgICAgICBjb25zdCBjb2FzdGxpbmVTVEwgPSB0aGlzLmV4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MCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXNoID0gbmV3IFRIUkVFLk1lc2godGhpcy5yb2Fkc0dlb21ldHJ5KTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50aHJlZVRvQmxlbmRlcihtZXNoKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYnVpbGRpbmdzU1RMID0gdGhpcy5leHBvcnRTVEwuZnJvbU1lc2gobWVzaCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuemlwLmZpbGUoXCJtb2RlbC9yb2Fkcy5zdGxcIiwgYnVpbGRpbmdzU1RMKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0U3RhdGUoTW9kZWxHZW5lcmF0b3JTdGF0ZXMuQUREX0JMT0NLUyk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucG9seWdvbnNUb1Byb2Nlc3MgPSBbLi4udGhpcy5ibG9ja3NdO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCByb2FkID0gdGhpcy5wb2x5Z29uc1RvUHJvY2Vzcy5wb3AoKTtcbiAgICAgICAgICAgICAgICBjb25zdCByb2Fkc01lc2ggPSB0aGlzLnBvbHlnb25Ub01lc2gocm9hZCwgMCk7XG4gICAgICAgICAgICAgICAgdGhpcy5yb2Fkc0dlb21ldHJ5Lm1lcmdlKHJvYWRzTWVzaC5nZW9tZXRyeSBhcyBUSFJFRS5HZW9tZXRyeSwgdGhpcy5ncm91bmRNZXNoLm1hdHJpeCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIE1vZGVsR2VuZXJhdG9yU3RhdGVzLkFERF9CTE9DS1M6IHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wb2x5Z29uc1RvUHJvY2Vzcy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWVzaCA9IG5ldyBUSFJFRS5NZXNoKHRoaXMuYmxvY2tzR2VvbWV0cnkpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRocmVlVG9CbGVuZGVyKG1lc2gpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBibG9ja3NTVEwgPSB0aGlzLmV4cG9ydFNUTC5mcm9tTWVzaChtZXNoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy56aXAuZmlsZShcIm1vZGVsL2Jsb2Nrcy5zdGxcIiwgYmxvY2tzU1RMKTtcblxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKE1vZGVsR2VuZXJhdG9yU3RhdGVzLkFERF9CVUlMRElOR1MpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmJ1aWxkaW5nc1RvUHJvY2VzcyA9IFsuLi50aGlzLmJ1aWxkaW5nc107XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrOyBcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBibG9jayA9IHRoaXMucG9seWdvbnNUb1Byb2Nlc3MucG9wKCk7XG4gICAgICAgICAgICAgICAgY29uc3QgYmxvY2tNZXNoID0gdGhpcy5wb2x5Z29uVG9NZXNoKGJsb2NrLCAxKTtcbiAgICAgICAgICAgICAgICB0aGlzLmJsb2Nrc0dlb21ldHJ5Lm1lcmdlKGJsb2NrTWVzaC5nZW9tZXRyeSBhcyBUSFJFRS5HZW9tZXRyeSwgdGhpcy5ncm91bmRNZXNoLm1hdHJpeCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIE1vZGVsR2VuZXJhdG9yU3RhdGVzLkFERF9CVUlMRElOR1M6IHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5idWlsZGluZ3NUb1Byb2Nlc3MubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICA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UZXh0KFwic2FuIGZyYW5jaXNjb1wiLCB0aGlzLl93aWR0aC8yLCB0aGlzLl9oZWlnaHQgLSAoODAgKiB0aGlzLl9zY2FsZSAtIGZvbnRTaXplKSk7XG4gICAgfVxuXG4gICAgZHJhd1JlY3RhbmdsZSh4OiBudW1iZXIsIHk6IG51bWJlciwgd2lkdGg6IG51bWJlciwgaGVpZ2h0OiBudW1iZXIpOiB2b2lkIHtcbiAgICAgICAgaWYgKHRoaXMuX3NjYWxlICE9PSAxKSB7XG4gICAgICAgICAgICB4ICo9IHRoaXMuX3NjYWxlO1xuICAgICAgICAgICAgeSAqPSB0aGlzLl9zY2FsZTtcbiAgICAgICAgICAgIHdpZHRoICo9IHRoaXMuX3NjYWxlO1xuICAgICAgICAgICAgaGVpZ2h0ICo9IHRoaXMuX3NjYWxlO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuY3R4LmZpbGxSZWN0KHgsIHksIHdpZHRoLCBoZWlnaHQpO1xuXG4gICAgICAgIGlmICh0aGlzLnN2Zykge1xuICAgICAgICAgICAgdGhpcy5zdmcucmVjdCh7XG4gICAgICAgICAgICAgICAgZmlsbDogdGhpcy5jdHguZmlsbFN0eWxlLFxuICAgICAgICAgICAgICAgICdmaWxsLW9wYWNpdHknOiAxLFxuICAgICAgICAgICAgICAgIHN0cm9rZTogdGhpcy5jdHguc3Ryb2tlU3R5bGUsXG4gICAgICAgICAgICAgICAgJ3N0cm9rZS13aWR0aCc6IHRoaXMuY3R4LmxpbmVXaWR0aCxcbiAgICAgICAgICAgICAgICB4OiB4LFxuICAgICAgICAgICAgICAgIHk6IHksXG4gICAgICAgICAgICAgICAgd2lkdGg6IHdpZHRoLFxuICAgICAgICAgICAgICAgIGhlaWdodDogaGVpZ2h0LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBkcmF3UG9seWdvbihwb2x5Z29uOiBWZWN0b3JbXSk6IHZvaWQge1xuICAgICAgICBpZiAocG9seWdvbi5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBwb2x5Z29uID0gdGhpcy56b29tVmVjdG9ycyhwb2x5Z29uKTtcblxuICAgICAgICB0aGlzLmN0eC5iZWdpblBhdGgoKTtcbiAgICAgICAgdGhpcy5jdHgubW92ZVRvKHBvbHlnb25bMF0ueCwgcG9seWdvblswXS55KTtcblxuICAgICAgICBmb3IgKGxldCBpID0gMTsgaSA8IHBvbHlnb24ubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHRoaXMuY3R4LmxpbmVUbyhwb2x5Z29uW2ldLngsIHBvbHlnb25baV0ueSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5jdHgubGluZVRvKHBvbHlnb25bMF0ueCwgcG9seWdvblswXS55KTtcblxuICAgICAgICB0aGlzLmN0eC5maWxsKCk7XG4gICAgICAgIHRoaXMuY3R4LnN0cm9rZSgpO1xuXG4gICAgICAgIGlmICh0aGlzLnN2Zykge1xuICAgICAgICAgICAgY29uc3QgdmVjdG9yQXJyYXkgPSBwb2x5Z29uLm1hcCh2ID0+IFt2LngsIHYueV0pO1xuICAgICAgICAgICAgdmVjdG9yQXJyYXkucHVzaCh2ZWN0b3JBcnJheVswXSk7XG4gICAgICAgICAgICB0aGlzLnN2Zy5wb2x5bGluZSh2ZWN0b3JBcnJheSkuYXR0cih7XG4gICAgICAgICAgICAgICAgZmlsbDogdGhpcy5jdHguZmlsbFN0eWxlLFxuICAgICAgICAgICAgICAgICdmaWxsLW9wYWNpdHknOiAxLFxuICAgICAgICAgICAgICAgIHN0cm9rZTogdGhpcy5jdHguc3Ryb2tlU3R5bGUsXG4gICAgICAgICAgICAgICAgJ3N0cm9rZS13aWR0aCc6IHRoaXMuY3R4LmxpbmVXaWR0aCxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZHJhd1NxdWFyZShjZW50cmU6IFZlY3RvciwgcmFkaXVz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AoZTogYW55KTogdm9pZCA9PiB7XG4gICAgICAgICAgICBpZiAoZS50YXJnZXQuaWQgPT09IFV0aWwuQ0FOVkFTX0lEKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sYXN0U2Nyb2xsdGltZSA9IERhdGUubm93KCk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZWZyZXNoZWRBZnRlclNjcm9sbCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGNvbnN0IGRlbHRhOiBudW1iZXIgPSBlLmRlbHRhWTtcbiAgICAgICAgICAgICAgICAvLyBUT0RPIHNjYWxlIGJ5IHZhbHVlIG9mIGRlbHRhXG4gICAgICAgICAgICAgICAgaWYgKGRlbHRhID4gMCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnpvb20gPSB0aGlzLl96b29tICogdGhpcy5aT09NX1NQRUVEO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuem9vbSA9IHRoaXMuX3pvb20gLyB0aGlzLlpPT01fU1BFRUQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFVzZWQgdG8gc3RvcCBkcmF3aW5nIGJ1aWxkaW5ncyB3aGlsZSBzY3JvbGxpbmcgZm9yIGNlcnRhaW4gc3R5bGVzXG4gICAgICogdG8ga2VlcCB0aGUgZnJhbWVyYXRlIHVwXG4gICAgICovXG4gICAgZ2V0IGlzU2Nyb2xsaW5nKCk6IGJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gRGF0ZS5ub3coKSAtIHRoaXMubGFzdFNjcm9sbHRpbWUgPCB0aGlzLlNDUk9MTF9ERUxBWTtcbiAgICB9XG5cbiAgICBwcml2YXRlIHNldFNjcmVlbkRpbWVuc2lvbnMoKTogdm9pZCB7XG4gICAgICAgIHRoaXMubW92ZWQgPSB0cnVlO1xuICAgICAgICB0aGlzLl9zY3JlZ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WxzZTtcbiAgICAgICAgICAgIHRoaXMuYWRkUGFya3MoKTtcbiAgICAgICAgICAgIHRoaXMucmVkcmF3ID0gdHJ1ZTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5taW5vclJvYWRzLnNldFByZUdlbmVyYXRlQ2FsbGJhY2soKCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5idWlsZGluZ3MucmVzZXQoKTtcbiAgICAgICAgICAgIHRoaXMuc21hbGxQYXJrcyA9IFtdO1xuICAgICAgICAgICAgdGVuc29yRmllbGQucGFya3MgPSB0aGlzLmJpZ1BhcmtzO1xuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLm1pbm9yUm9hZHMuc2V0UG9zdEdlbmVyYXRlQ2FsbGJhY2soKCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5hZGRQYXJrcygpO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBhZGRQYXJrcygpOiB2b2lkIHtcbiAgICAgICAgY29uc3QgZyA9IG5ldyBHcmFwaCh0aGlzLm1ham9yUm9hZHMuYWxsU3RyZWFtbGluZXNcbiAgICAgICAgICAgIC5jb25jYXQodGhpcy5tYWluUm9hZHMuYWxsU3RyZWFtbGluZXMpXG4gICAgICAgICAgICAuY29uY2F0KHRoaXMubWlub3JSb2Fkcy5hbGxTdHJlYW1saW5lcyksIHRoaXMubWlub3JQYXJhbXMuZHN0ZXApO1xuICAgICAgICB0aGlzLmludGVyc2VjdGlvbnMgPSBnLmludGVyc2VjdGlvbnM7XG5cbiAgICAgICAgY29uc3QgcCA9IG5ldyBQb2x5Z29uRmluZGVyKGcubm9kZXMsIHtcbiAgICAgICAgICAgICAgICBtYXhMZW5ndGg6IDIwLFxuICAgICAgICAgICAgICAgIG1pbkFyZWE6IDgwLFxuICAgICAgICAgICAgICAgIHNocmlua1NwYWNpbmc6IDQsXG4gICAgICAgICAgICAgICAgY2hhbmNlTm9EaXZpZGU6IDEsXG4gICAgICAgICAgICB9LCB0aGlzLnRlbnNvckZpZWxkKTtcbiAgICAgICAgcC5maW5kUG9seWdvbnMoKTtcbiAgICAgICAgY29uc3QgcG9seWdvbnMgPSBwLnBvbHlnb25zO1xuXG4gICAgICAgIGlmICh0aGlzLm1pbm9yUm9hZHMuYWxsU3RyZWFtbGluZXMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAvLyBCaWcgcGFya3MgLSBhZGQgY29uc2VjdXRpdmUgcG9seWdvbnNcbiAgICAgICAgICAgIHRoaXMuYmlnUGFya3MgPSBbXTtcbiAgICAgICAgICAgIHRoaXMuc21hbGxQYXJrcyA9IFtdO1xuICAgICAgICAgICAgaWYgKHBvbHlnb25zLmxlbmd0aCA+IHRoaXMubnVtQmlnUGFya3MpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXJrSW5kZXggPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiAocG9seWdvbnMubGVuZ3RoIC0gdGhpcy5udW1CaWdQYXJrcykpO1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSBwYXJrSW5kZXg7IGkgPCBwYXJrSW5kZXggKyB0aGlzLm51bUJpZ1BhcmtzOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5iaWdQYXJrcy5wdXNoKHBvbHlnb25zW2ldKTsgICAgXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLmJpZ1BhcmtzLnB1c2goLi4ucG9seWdvbnMpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gU21hbGwgcGFya3NcbiAgICAgICAgICAgIHRoaXMuc21hbGxQYXJrcyA9IFtdO1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLm51bVNtYWxsUGFya3M7IGkrKykge1xuICAgICAgICAgICAgICAgIGNvbnN0IHBhcmtJbmRleCA9IE1hdGguZmxvb3IoTWF0aC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ICAgICAgICBzdHJva2U6IFwibm9uZVwiLFxuICAgICAgICAgICAgc3Ryb2tlV2lkdGg6IDEsXG4gICAgICAgIH0pO1xuXG4gICAgICAgIGNhbnZhcy5kcmF3UG9seWdvbih0aGlzLnNlYVBvbHlnb24pO1xuXG4gICAgICAgIGNhbnZhcy5zZXRPcHRpb25zKHtcbiAgICAgICAgICAgIHN0cm9rZTogdGhpcy5jb2xvdXJTY2hlbWUuYmdDb2xvdXIsXG4gICAgICAgICAgICBzdHJva2VXaWR0aDogMzAsXG4gICAgICAgIH0pO1xuICAgICAgICBjYW52YXMuZHJhd1BvbHlsaW5lKHRoaXMuY29hc3RsaW5lKTtcblxuICAgICAgICBjYW52YXMuc2V0T3B0aW9ucyh7XG4gICAgICAgICAgICByb3VnaG5lc3M6IDAsXG4gICAgICAgICAgICBmaWxsV2VpZ2h0OiAxLFxuICAgICAgICAgICAgZmlsbDogdGhpcy5jb2xvdXJTY2hlbWUuc2VhQ29sb3VyLFxuICAgICAgICAgICAgZmlsbFN0eWxlOiAnc29saWQnLFxuICAgICAgICAgICAgc3Ryb2tlOiBcIm5vbmVcIixcbiAgICAgICAgICAgIHN0cm9rZVdpZHRoOiAxLFxuICAgICAgICB9KTtcblxuICAgICAgICBjYW52YXMuZHJhd1BvbHlnb24odGhpcy5yaXZlcik7XG5cbiAgICAgICAgLy8gUGFya3NcbiAgICAgICAgY2FudmFzLnNldE9wdGlvbnMoe1xuICAgICAgICAgICAgZmlsbDogdGhpcy5jb2xvdXJTY2hlbWUuZ3Jhc3NDb2xvdXIsXG4gICAgICAgIH0pO1xuICAgICAgICB0aGlzLnBhcmtzLmZvckVhY2gocCA9PiBjYW52YXMuZHJhd1BvbHlnb24ocCkpO1xuXG4gICAgICAgIC8vIFJvYWRzXG4gICAgICAgIGNhbnZhcy5zZXRPcHRpb25zKHtcbiAgICAgICAgICAgIHN0cm9rZTogdGhpcy5jb2xvdXJTY2hlbWUubWlub3JSb2FkQ29sb3VyLFxuICAgICAgICAgICAgc3Ryb2tlV2lkdGg6IDEsXG4gICAgICAgICAgICBmaWxsOiAnbm9uZScsXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMubWlub3JSb2Fkcy5mb3JFYWNoKHMgPT4gY2FudmFzLmRyYXdQb2x5bGluZShzKSk7XG5cbiAgICAgICAgY2FudmFzLnNldE9wdGlvbnMoe1xuICAgICAgICAgICAgc3Ryb2tlV2lkdGg6IDIsXG4gICAgICAgICAgICBzdHJva2U6IHRoaXMuY29sb3VyU2NoZW1lLm1ham9yUm9hZENvbG91cixcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5tYWpvclJvYWRzLmZvckVhY2gocyA9PiBjYW52YXMuZHJhd1BvbHlsaW5lKHMpKTtcbiAgICAgICAgY2FudmFzLmRyYXdQb2x5bGluZSh0aGlzLnNlY29uZGFyeVJpdmVyKTtcblxuICAgICAgICBjYW52YXMuc2V0T3B0aW9ucyh7XG4gICAgICAgICAgICBzdHJva2VXaWR0aDogMyxcbiAgICAgICAgICAgIHN0cm9rZTogdGhpcy5jb2xvdXJTY2hlbWUubWFpblJvYWRDb2xvdXIsXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMubWFpblJvYWRzLmZvckVhY2gocyA9PiBjYW52YXMuZHJhd1BvbHlsaW5lKHMpKTtcbiAgICAgICAgdGhpcy5jb2FzdGxpbmVSb2Fkcy5mb3JFYWNoKHMgPT4gY2FudmFzLmRyYXdQb2x5bGluZShzKSk7XG5cbiAgICAgICAgLy8gQnVpbGRpbmdzXG4gICAgICAgIGlmICghdGhpcy5kcmFnZ2luZykge1xuICAgICAgICAgICAgLy8gTG90c1xuICAgICAgICAgICAgaWYgKCF0aGlzLmNvbG91clNjaGVtZS56b29tQnVpbGRpbmdzIHx8IHRoaXMuZG9tYWluQ29udHJvbGxlci56b29tID49IDIpIHtcbiAgICAgICAgICAgICAgICAvLyBMb3RzXG4gICAgICAgICAgICAgICAgY2FudmFzLnNldE9wdGlvbnMoe1xuICAgICAgICAgICAgICAgICAgICByb3VnaG5lc3M6IDEuMixcbiAgICAgICAgICAgICAgICAgICAgc3Ryb2tlOiB0aGlzLmNvbG91clNjaGVtZS5idWlsZGluZ1N0cm9rZSxcbiAgICAgICAgICAgICAgICAgICAgc3Ryb2tlV2lkdGg6IDEsXG4gICAgICAgICAgICAgICAgICAgIGZpbGw6ICcnLFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGZvciAoY29uc3QgYiBvZiB0aGlzLmxvdHMpIGNhbnZhcy5kcmF3UG9seWdvbihiKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gUHNldWRvLTNEXG4gICAgICAgICAgICBpZiAodGhpcy5jb2xvdXJTY2hlbWUuYnVpbGRpbmdNb2RlbHMgJiYgKCF0aGlzLmNvbG91clNjaGVtZS56b29tQnVpbGRpbmdzIHx8IHRoaXMuZG9tYWluQ29udHJvbGxlci56b29tID49IDIuNSkpIHtcbiAgICAgICAgICAgICAgICAvLyBQc2V1ZG8tM0RcbiAgICAgICAgICAgICAgICBjYW52YXMuc2V0T3B0aW9ucyh7XG4gICAgICAgICAgICAgICAgICAgIHJvdWdobmVzczogMS4yLFxuICAgICAgICAgICAgICAgICAgICBzdHJva2U6IHRoaXMuY29sb3VyU2NoZW1lLmJ1aWxkaW5nU3Ryb2tlLFxuICAgICAgICAgICAgICAgICAgICBzdHJva2VXaWR0aDogMSxcbiAgICAgICAgICAgICAgICAgICAgZmlsbDogdGhpcy5jb2xvdXJTY2hlbWUuYnVpbGRpbmdTaWRlQ29sb3VyLFxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgLy8gVE9ETyB0aGlzIGNhbiBiZSBodWdlbHkgaW1wcm92ZWRcbiAgICAgICAgICAgICAgICBjb25zdCBhbGxTaWRlc0Rpc3RhbmNlczogYW55W10gPSBbXTtcbiAgICAgICAgICAgICAgICBjb25zdCBjYW1lcmEgPSB0aGlzLmRvbWFpbkNvbnRyb2xsZXIuZ2V0Q2FtZXJhUG9zaXRpb24oKTtcbiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IGIgb2YgdGhpcy5idWlsZGluZ01vZGVscykge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHMgb2YgYi5zaWRlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYXZlcmFnZVBvaW50ID0gc1swXS5jbG9uZSgpLmFkZChzWzFdKS5kaXZpZGVTY2FsYXIoMik7XG4gICAgICAgICAgICAgICAgICAgICAgICBhbGxTaWRlc0Rpc3RhbmNlcy5wdXNoKFthdmVyYWdlUG9pbnQuZGlzdGFuY2VUb1NxdWFyZWQoY2FtZXJhKSwgc10pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGFsbFNpZGVzRGlzdGFuY2VzLnNvcnQoKGEsIGIpID0+IGJbMF0gLSBhWzBdKTtcbiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHAgb2YgYWxsU2lkZXNEaXN0YW5jZXMpIGNhbnZhcy5kcmF3UG9seWdvbihwWzFdKTtcblxuICAgICAgICAgICAgICAgIGNhbnZhcy5zZXRPcHRpb25zKHtcbiAgICAgICAgICAgICAgICAgICAgcm91Z2huZXNzOiAxLjIsXG4gICAgICAgICAgICAgICAgICAgIHN0cm9rZTogdGhpcy5jb2xvdXJTY2hlbWUuYnVpbGRpbmdTdHJva2UsXG4gICAgICAgICAgICAgICAgICAgIHN0cm9rZVdpZHRoOiAxLFxuICAgICAgICAgICAgICAgICAgICBmaWxsOiB0aGlzLmNvbG91clNjaGVtZS5idWlsZGluZ0NvbG91cixcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGZvciAoY29uc3QgYiBvZiB0aGlzLmJ1aWxkaW5nTW9kZWxzKSBjYW52YXMuZHJhd1BvbHlnb24oYi5yb29mKTtcbiAgICAgICAgICAgIH1cb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nQoc3RyLnN1YnN0cigxKSwgMTYpOyAgLy8gVE9ETyhkZWFubSk6IFN0cmljdGVyIHBhcnNpbmcuXG4gICAgICAgICAgICAgICAgaWYgKCEoaXYgPj0gMCAmJiBpdiA8PSAweGZmZmZmZikpIHJldHVybiBudWxsOyAgLy8gQ292ZXJzIE5hTi5cbiAgICAgICAgICAgICAgICByZXR1cm4gWyhpdiAmIDB4ZmYwMDAwKSA+PiAxNixcbiAgICAgICAgICAgICAgICAgICAgICAoaXYgJiAweGZmMDApID4+IDgsXG4gICAgICAgICAgICAgICAgICAgICAgaXYgJiAweGZmLFxuICAgICAgICAgICAgICAgICAgICAgIDFdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBvcCA9IHN0ci5pbmRleE9mKCcoJyksIGVwID0gc3RyLmluZGV4T2YoJyknKTtcbiAgICAgICAgaWYgKG9wICE9PSAtMSAmJiBlcCArIDEgPT09IHN0ci5sZW5ndGgpIHtcbiAgICAgICAgICAgIHZhciBmbmFtZSA9IHN0ci5zdWJzdHIoMCwgb3ApO1xuICAgICAgICAgICAgdmFyIHBhcmFtcyA9IHN0ci5zdWJzdHIob3ArMSwgZXAtKG9wKzEpKS5zcGxpdCgnLCcpO1xuICAgICAgICAgICAgdmFyIGFscGhhID0gMTsgIC8vIFRvIGFsbG93IGNhc2UgZmFsbHRocm91Z2guXG4gICAgICAgICAgICBzd2l0Y2ggKGZuYW1lKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAncmdiYSc6XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbXMubGVuZ3RoICE9PSA0KSByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgYWxwaGEgPSBVdGlsLnBhcnNlX2Nzc19mbG9hdChwYXJhbXMucG9wKCkpO1xuICAgICAgICAgICAgICAgICAgICAvLyBGYWxsIHRocm91Z2guXG4gICAgICAgICAgICAgICAgY2FzZSAncmdiJzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtcy5sZW5ndGggIT09IDMpIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW1V0aWwucGFyc2VfY3NzX2ludChwYXJhbXNbMF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFV0aWwucGFyc2VfY3NzX2ludChwYXJhbXNbMV0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFV0aWwucGFyc2VfY3NzX2ludChwYXJhbXNbMl0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFscGhhXTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnaHNsYSc6XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbXMubGVuZ3RoICE9PSA0KSByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgYWxwaGEgPSBVdGlsLnBhcnNlX2Nzc19mbG9hdChwYXJhbXMucG9wKCkpO1xuICAgICAgICAgICAgICAgICAgICAvLyBGYWxsIHRocm91Z2guXG4gICAgICAgICAgICAgICAgY2FzZSAnaHNsJzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtcy5sZW5ndGggIT09IDMpIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaCA9ICgoKHBhcnNlRmxvYXQocGFyYW1zWzBdKSAlIDM2MCkgKyAzNjApICUgMzYwKSAvIDM2MDsgIC8vIDAgLi4gMVxuICAgICAgICAgICAgICAgICAgICAvLyBOT1RFKGRlYW5tKTogQWNjb3JkaW5nIHRvIHRoZSBDU1Mgc3BlYyBzL2wgc2hvdWxkIG9ubHkgYmVcbiAgICAgICAgICAgICAgICAgICAgLy8gcGVyY2VudGFnZXMsIGJ1dCB3ZSBkb24ndCBib3RoZXIgYW5kIGxldCBmbG9hdCBvciBwZXJjZW50YWdlLlxuICAgICAgICAgICAgICAgICAgICB2YXIgcyA9IFV0aWwucGFyc2VfY3NzX2Zsb2F0KHBhcmFtc1sxXSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsID0gVXRpbC5wYXJzZV9jc3NfZmxvYXQocGFyYW1zWzJdKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG0yID0gbCA8PSAwLjUgPyBsICogKHMgKyAxKSA6IGwgKyBzIC0gbCAqIHM7XG4gICAgICAgICAgICAgICAgICAgIHZhciBtMSA9IGwgKiAyIC0gbTI7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbVXRpbC5jbGFtcF9jc3NfYnl0ZShVdGlsLmNzc19odWVfdG9fcmdiKG0xLCBtMiwgaCsxLzMpICogMjU1KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBVdGlsLmNsYW1wX2Nzc19ieXRlKFV0aWwuY3NzX2h1ZV90b19yZ2IobTEsIG0yLCBoKSAqIDI1NSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgVXRpbC5jbGFtcF9jc3NfYnl0ZShVdGlsLmNzc19odWVfdG9fcmdiKG0xLCBtMiwgaC0xLzMpICogMjU1KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHBoYV07XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG59XG4iLCJpbXBvcnQgKiBhcyBsb2cgZnJvbSAnbG9nbGV2ZWwnO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBWZWN0b3Ige1xuICAgIGNvbnN0cnVjdG9yKHB1YmxpYyB4OiBudW1iZXIsIHB1YmxpYyB5OiBudW1iZXIpIHt9XG5cbiAgICBzdGF0aWMgemVyb1ZlY3RvcigpOiBWZWN0b3Ige1xuICAgICAgICByZXR1cm4gbmV3IFZlY3RvcigwLCAwKTtcbiAgICB9XG5cbiAgICBzdGF0aWMgZnJvbV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udW1iZXIge1xuICAgICAgICBjb25zdCBkeCA9IHRoaXMueCAtIHYueFxuICAgICAgICBjb25zdCBkeSA9IHRoaXMueSAtIHYueTtcbiAgICAgICAgcmV0dXJuIGR4ICogZHggKyBkeSAqIGR5O1xuICAgIH1cblxuICAgIGRpdmlkZSh2OiBWZWN0b3IpOiBWZWN0b3Ige1xuICAgICAgICBpZiAodi54ID09PSAwIHx8IHYueSA9PT0gMCkge1xuICAgICAgICAgICAgbG9nLndhcm4oXCJEaXZpc2lvbiBieSB6ZXJvXCIpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnggLz0gdi54O1xuICAgICAgICB0aGlzLnkgLz0gdi55O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBkaXZpZGVTY2FsYXIoczogbnVtYmVyKTogVmVjdG9yIHtcbiAgICAgICAgaWYgKHMgPT09IDApIHtcbiAgICAgICAgICAgIGxvZy53YXJuKFwiRGl2aXNpb24gYnkgemVyb1wiKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzLm11bHRpcGx5U2NhbGFyKDEgLyBzKTtcbiAgICB9XG5cbiAgICBkb3QodjogVmVjdG9yKTogbnVtYmVyIHtcbiAgICAgICAgcmV0dXJuIHRoaXMueCAqIHYueCArIHRoaXMueSAqIHYueTtcbiAgICB9XG5cbiAgICBlcXVhbHModjogVmVjdG9yKTogYm9vbGVhbiB7XG4gICAgICAgIHJldHVybiAoKHYueCA9PT0gdGhpcy54KSAmJiAodi55ID09PSB0aGlzLnkpKTtcbiAgICB9XG5cbiAgICBsZW5ndGgoKTogbnVtYmVyIHtcbiAgICAgICAgcmV0dXJuIE1hdGguc3FydCh0aGlzLmxlbmd0aFNxKCkpO1xuICAgIH1cblxuICAgIGxlbmd0aFNxKCk6IG51bWJlciB7XG4gICAgICAgIHJldHVybiB0aGlzLnggKi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A9IHggKiBjb3MgLSB5ICogc2luICsgY2VudGVyLng7XG4gICAgICAgIHRoaXMueSA9IHggKiBzaW4gKyB5ICogY29zICsgY2VudGVyLnk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIHNldCh2OiBWZWN0b3IpOiBWZWN0b3Ige1xuICAgICAgICB0aGlzLnggPSB2Lng7XG4gICAgICAgIHRoaXMueSA9IHYueTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgc2V0WCh4OiBudW1iZXIpOiBWZWN0b3Ige1xuICAgICAgICB0aGlzLnggPSB4O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBzZXRZKHk6IG51bWJlcik6IFZlY3RvciB7XG4gICAgICAgIHRoaXMueSA9IHk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIHNldExlbmd0aCAobGVuZ3RoOiBudW1iZXIpOiBWZWN0b3Ige1xuICAgICAgICByZXR1cm4gdGhpcy5ub3JtYWxpemUoKS5tdWx0aXBseVNjYWxhcihsZW5ndGgpO1xuICAgIH1cblxuICAgIHN1Yih2OiBWZWN0b3IpOiBWZWN0b3Ige1xuICAgICAgICB0aGlzLnggLT0gdi54O1xuICAgICAgICB0aGlzLnkgLT0gdi55O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG59XG4iXX0= +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvQHN2Z2RvdGpzL3N2Zy5qcy9kaXN0L25vZGVfbW9kdWxlcy9Ac3ZnZG90anMvc3ZnLmpzL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9nbG9iYWwuanMiLCJub2RlX21vZHVsZXMvQHN2Z2RvdGpzL3N2Zy5qcy9kaXN0L25vZ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8gJ20nIDogJycpICtcbiAgICAgICAgICAgICAgICAgIChyeC51bmljb2RlID8gJ3UnIDogJycpICtcbiAgICAgICAgICAgICAgICAgIChTVVBQT1JUU19ZID8gJ3knIDogJ2cnKTtcblxuICAgICAgLy8gXig/ICsgcnggKyApIGlzIG5lZWRlZCwgaW4gY29tYmluYXRpb24gd2l0aCBzb21lIFMgc2xpY2luZywgdG9cbiAgICAgIC8vIHNpbXVsYXRlIHRoZSAneScgZmxhZy5cbiAgICAgIHZhciBzcGxpdHRlciA9IG5ldyBDKFNVUFBPUlRTX1kgPyByeCA6ICdeKD86JyArIHJ4LnNvdXJjZSArICcpJywgZmxhZ3MpO1xuICAgICAgdmFyIGxpbSA9IGxpbWl0ID09PSB1bmRlZmluZWQgPyBNQVhfVUlOVDMyIDogbGltaXQgPj4+IDA7XG4gICAgICBpZiAobGltID09PSAwKSByZXR1cm4gW107XG4gICAgICBpZiAoUy5sZW5ndGggPT09IDApIHJldHVybiBjYWxsUmVnRXhwRXhlYyhzcGxpdHRlciwgUykgPT09IG51bGwgPyBbU10gOiBbXTtcbiAgICAgIHZhciBwID0gMDtcbiAgICAgIHZhciBxID0gMDtcbiAgICAgIHZhciBBID0gW107XG4gICAgICB3aGlsZSAocSA8IFMubGVuZ3RoKSB7XG4gICAgICAgIHNwbGl0dGVyLmxhc3RJbmRleCA9IFNVUFBPUlRTX1kgPyBxIDogMDtcbiAgICAgICAgdmFyIHogPSBjYWxsUmVnRXhwRXhlYyhzcGxpdHRlciwgU1VQUE9SVFNfWSA/IFMgOiBTLnNsaWNlKHEpKTtcbiAgICAgICAgdmFyIGU7XG4gICAgICAgIGlmIChcbiAgICAgICAgICB6ID09PSBudWxsIHx8XG4gICAgICAgICAgKGUgPSBtaW4odG9MZW5ndGgoc3BsaXR0ZXIubGFzdEluZGV4ICsgKFNVUFBPUlRTX1kgPyAwIDogcSkpLCBTLmxlbmd0aCkpID09PSBwXG4gICAgICAgICkge1xuICAgICAgICAgIHEgPSBhZHZ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cclxuICAgICAgaWYgKGJhZ1tldl0gJiYgYmFnW2V2XVtuc10pIHtcclxuICAgICAgICBmb3IgKGwgaW4gYmFnW2V2XVtuc10pIHtcclxuICAgICAgICAgIG9mZihuLCBbIGV2LCBucyBdLmpvaW4oJy4nKSwgbClcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGRlbGV0ZSBiYWdbZXZdW25zXVxyXG4gICAgICB9XHJcbiAgICB9IGVsc2UgaWYgKG5zKSB7XHJcbiAgICAgIC8vIHJlbW92ZSBhbGwgbGlzdGVuZXJzIGZvciBhIHNwZWNpZmljIG5hbWVzcGFjZVxyXG4gICAgICBmb3IgKGV2ZW50IGluIGJhZykge1xyXG4gICAgICAgIGZvciAobmFtZXNwYWNlIGluIGJhZ1tldmVudF0pIHtcclxuICAgICAgICAgIGlmIChucyA9PT0gbmFtZXNwYWNlKSB7XHJcbiAgICAgICAgICAgIG9mZihuLCBbIGV2ZW50LCBucyBdLmpvaW4oJy4nKSlcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH0gZWxzZSBpZiAoZXYpIHtcclxuICAgICAgLy8gcmVtb3ZlIGFsbCBsaXN0ZW5lcnMgZm9yIHRoZSBldmVudFxyXG4gICAgICBpZiAoYmFnW2V2XSkge1xyXG4gICAgICAgIGZvciAobmFtZXNwYWNlIGluIGJhZ1tldl0pIHtcclxuICAgICAgICAgIG9mZihuLCBbIGV2LCBuYW1lc3BhY2UgXS5qb2luKCcuJykpXHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBkZWxldGUgYmFnW2V2XVxyXG4gICAgICB9XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAvLyByZW1vdmUgYWxsIGxpc3RlbmVycyBvbiBhIGdpdmVuIG5vZGVcclxuICAgICAgZm9yIChldmVudCBpbiBiYWcpIHtcclxuICAgICAgICBvZmYobiwgZXZlbnQpXHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGNsZWFyRXZlbnR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ZXQgdGhlIHZhbHVlcyBpbiB0aGUgbGFiIHNwYWNlXHJcbiAgICAgICAgbGV0IHsgbCwgYSwgYiB9ID0gdGhpc1xyXG4gICAgICAgIGlmICh0aGlzLnNwYWNlID09PSAnbGNoJykge1xyXG4gICAgICAgICAgY29uc3QgeyBjLCBoIH0gPSB0aGlzXHJcbiAgICAgICAgICBjb25zdCBkVG9SID0gTWF0aC5QSSAvIDE4MFxyXG4gICAgICAgICAgYSA9IGMgKiBNYXRoLmNvcyhkVG9SICogaClcclxuICAgICAgICAgIGIgPSBjICogTWF0aC5zaW4oZFRvUiAqIGgpXHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBVbmRvIHRoZSBub25saW5lYXIgZnVuY3Rpb25cclxuICAgICAgICBjb25zdCB5TCA9IChsICsgMTYpIC8gMTE2XHJcbiAgICAgICAgY29uc3QgeEwgPSBhIC8gNTAwICsgeUxcclxuICAgICAgICBjb25zdCB6TCA9IHlMIC0gYiAvIDIwMFxyXG5cclxuICAgICAgICAvLyBHZXQgdGhlIHh5eiB2YWx1ZXNcclxuICAgICAgICBjb25zdCBjdCA9IDE2IC8gMTE2XHJcbiAgICAgICAgY29uc3QgbXggPSAwLjAwODg1NlxyXG4gICAgICAgIGNvbnN0IG5tID0gNy43ODdcclxuICAgICAgICB4ID0gMC45NTA0NyAqICgoeEwgKiogMyA+IG14KSA/IHhMICoqIDMgOiAoeEwgLSBjdCkgLyBubSlcclxuICAgICAgICB5ID0gMS4wMDAwMCAqICgoeUwgKiogMyA+IG14KSA/IHlMICoqIDMgOiAoeUwgLSBjdCkgLyBubSlcclxuICAgICAgICB6ID0gMS4wODg4MyAqICgoekwgKiogMyA+IG14KSA/IHpMICoqIDMgOiAoekwgLSBjdCkgLyBubSlcclxuICAgICAgfVxyXG5cclxuICAgICAgLy8gQ29udmVydCB4eXogdG8gdW5ib3VuZGVkIHJnYiB2YWx1ZXNcclxuICAgICAgY29uc3QgclUgPSB4ICogMy4yNDA2ICsge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BNYXRoLm1heCh0aGlzLnkgKyB0aGlzLmhlaWdodCwgYm94LnkgKyBib3guaGVpZ2h0KSAtIHlcclxuXHJcbiAgICByZXR1cm4gbmV3IEJveCh4LCB5LCB3aWR0aCwgaGVpZ2h0KVxyXG4gIH1cclxuXHJcbiAgdHJhbnNmb3JtIChtKSB7XHJcbiAgICBpZiAoIShtIGluc3RhbmNlb2YgTWF0cml4KSkge1xyXG4gICAgICBtID0gbmV3IE1hdHJpeChtKVxyXG4gICAgfVxyXG5cclxuICAgIGxldCB4TWluID0gSW5maW5pdHlcclxuICAgIGxldCB4TWF4ID0gLUluZmluaXR5XHJcbiAgICBsZXQgeU1pbiA9IEluZmluaXR5XHJcbiAgICBsZXQgeU1heCA9IC1JbmZpbml0eVxyXG5cclxuICAgIGNvbnN0IHB0cyA9IFtcclxuICAgICAgbmV3IFBvaW50KHRoaXMueCwgdGhpcy55KSxcclxuICAgICAgbmV3IFBvaW50KHRoaXMueDIsIHRoaXMueSksXHJcbiAgICAgIG5ldyBQb2ludCh0aGlzLngsIHRoaXMueTIpLFxyXG4gICAgICBuZXcgUG9pbnQodGhpcy54MiwgdGhpcy55MilcclxuICAgIF1cclxuXHJcbiAgICBwdHMuZm9yRWFjaChmdW5jdGlvbiAocCkge1xyXG4gICAgICBwID0gcC50cmFuc2Zvcm0obSlcclxuICAgICAgeE1pbiA9IE1hdGgubWluKHhNaW4sIHAueClcclxuICAgICAgeE1heCA9IE1hdGgubWF4KHhNYXgsIHAueClcclxuICAgICAgeU1pbiA9IE1hdGgubWluKHlNaW4sIHAueSlcclxuICAgICAgeU1heCA9IE1hdGgubWF4KHlNYXgsIHAueSlcclxuICAgIH0pXHJcblxyXG4gICAgcmV0dXJuIG5ldyBCb3goXHJcbiAgICAgIHhNaW4sIHlNaW4sXHJcbiAgICAgIHhNYXggLSB4TWluLFxyXG4gICAgICB5TWF4IC0geU1pblxyXG4gICAgKVxyXG4gIH1cclxuXHJcbiAgYWRkT2Zmc2V0ICgpIH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sxXVxyXG5cclxuICAgICAgaWYgKGFbaV1bMl0gIT0gbnVsbCkge1xyXG4gICAgICAgIHMgKz0gJyAnXHJcbiAgICAgICAgcyArPSBhW2ldWzJdXHJcblxyXG4gICAgICAgIGlmIChhW2ldWzNdICE9IG51bGwpIHtcclxuICAgICAgICAgIHMgKz0gJyAnXHJcbiAgICAgICAgICBzICs9IGFbaV1bM11cclxuICAgICAgICAgIHMgKz0gJyAnXHJcbiAgICAgICAgICBzICs9IGFbaV1bNF1cclxuXHJcbiAgICAgICAgICBpZiAoYVtpXVs1XSAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgIHMgKz0gJyAnXHJcbiAgICAgICAgICAgIHMgKz0gYVtpXVs1XVxyXG4gICAgICAgICAgICBzICs9ICcgJ1xyXG4gICAgICAgICAgICBzICs9IGFbaV1bNl1cclxuXHJcbiAgICAgICAgICAgIGlmIChhW2ldWzddICE9IG51bGwpIHtcclxuICAgICAgICAgICAgICBzICs9ICcgJ1xyXG4gICAgICAgICAgICAgIHMgKz0gYVtpXVs3XVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICByZXR1cm4gcyArICcgJ1xyXG59XHJcblxyXG5jb25zdCBwYXRoSGFuZGxlcnMgPSB7XHJcbiAgTTogZnVuY3Rpb24gKGMsIHAsIHAwKSB7XHJcbiAgICBwLnggPSBwMC54ID0gY1swXVxyXG4gICAgcC55ID0gcDAueSA9IGNbMV1cclxuXHJcbiAgICByZXR1cm4gWyAnTScsIHAueCwgcC55IF1cclxuICB9LFxyXG4gIEw6IGZ1bmN0aW9uIChjLCBwKSB7XHJcbiAgICBwLnggPSBjWzBdXHJcbiAgICBwLnkgPSBjWzFdXHJcbiAgICByZXR1cm4gWyAnTCcsIGNbMF0sIGNbMV0gXVxyXG4gIH0sXHJcbiAgSDogZnVuY3Rpb24gKGMsIHApIHtcclxuICAgIHAue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4gICAgdmFyIGJveCA9IHRoaXMuYmJveCgpXHJcblxyXG4gICAgLy8gZ2V0IHJlbGF0aXZlIG9mZnNldFxyXG4gICAgeCAtPSBib3gueFxyXG4gICAgeSAtPSBib3gueVxyXG5cclxuICAgIGlmICghaXNOYU4oeCkgJiYgIWlzTmFOKHkpKSB7XHJcbiAgICAgIC8vIG1vdmUgZXZlcnkgcG9pbnRcclxuICAgICAgZm9yICh2YXIgbCwgaSA9IHRoaXMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcclxuICAgICAgICBsID0gdGhpc1tpXVswXVxyXG5cclxuICAgICAgICBpZiAobCA9PT0gJ00nIHx8IGwgPT09ICdMJyB8fCBsID09PSAnVCcpIHtcclxuICAgICAgICAgIHRoaXNbaV1bMV0gKz0geFxyXG4gICAgICAgICAgdGhpc1tpXVsyXSArPSB5XHJcbiAgICAgICAgfSBlbHNlIGlmIChsID09PSAnSCcpIHtcclxuICAgICAgICAgIHRoaXNbaV1bMV0gKz0geFxyXG4gICAgICAgIH0gZWxzZSBpZiAobCA9PT0gJ1YnKSB7XHJcbiAgICAgICAgICB0aGlzW2ldWzFdICs9IHlcclxuICAgICAgICB9IGVsc2UgaWYgKGwgPT09ICdDJyB8fCBsID09PSAnUycgfHwgbCA9PT0gJ1EnKSB7XHJcbiAgICAgICAgICB0aGlzW2ldWzFdICs9IHhcclxuICAgICAgICAgIHRoaXNbaV1bMl0gKz0geVxyXG4gICAgICAgICAgdGhpc1tpXVszXSArPSB4XHJcbiAgICAgICAgICB0aGlzW2ldWzRdICs9IHlcclxuXHJcbiAgICAgICAgICBpZiAobCA9PT0gJ0MnKSB7XHJcbiAgICAgICAgICAgIHRoaXNbaV1bNV0gKz0geFxyXG4gICAgICAgICAgICB0aGlzW2ldWzZdICs9IHlcclxuICAgICAgICAgIH1cclxuICAgICAgICB9IGVsc2UgaWYgKGwgPT09ICdBJykge1xyXG4gICAgICAgICAgdGhpc1tpXVs2XSArPSB4XHJcbiAgICA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AgICAgIHRoaXNbaV1bMV0gPSAoKHRoaXNbaV1bMV0gLSBib3gueCkgKiB3aWR0aCkgLyBib3gud2lkdGggKyBib3gueFxyXG4gICAgICB9IGVsc2UgaWYgKGwgPT09ICdWJykge1xyXG4gICAgICAgIHRoaXNbaV1bMV0gPSAoKHRoaXNbaV1bMV0gLSBib3gueSkgKiBoZWlnaHQpIC8gYm94LmhlaWdodCArIGJveC55XHJcbiAgICAgIH0gZWxzZSBpZiAobCA9PT0gJ0MnIHx8IGwgPT09ICdTJyB8fCBsID09PSAnUScpIHtcclxuICAgICAgICB0aGlzW2ldWzFdID0gKCh0aGlzW2ldWzFdIC0gYm94LngpICogd2lkdGgpIC8gYm94LndpZHRoICsgYm94LnhcclxuICAgICAgICB0aGlzW2ldWzJdID0gKCh0aGlzW2ldWzJdIC0gYm94LnkpICogaGVpZ2h0KSAvIGJveC5oZWlnaHQgKyBib3gueVxyXG4gICAgICAgIHRoaXNbaV1bM10gPSAoKHRoaXNbaV1bM10gLSBib3gueCkgKiB3aWR0aCkgLyBib3gud2lkdGggKyBib3gueFxyXG4gICAgICAgIHRoaXNbaV1bNF0gPSAoKHRoaXNbaV1bNF0gLSBib3gueSkgKiBoZWlnaHQpIC8gYm94LmhlaWdodCArIGJveC55XHJcblxyXG4gICAgICAgIGlmIChsID09PSAnQycpIHtcclxuICAgICAgICAgIHRoaXNbaV1bNV0gPSAoKHRoaXNbaV1bNV0gLSBib3gueCkgKiB3aWR0aCkgLyBib3gud2lkdGggKyBib3gueFxyXG4gICAgICAgICAgdGhpc1tpXVs2XSA9ICgodGhpc1tpXVs2XSAtIGJveC55KSAqIGhlaWdodCkgLyBib3guaGVpZ2h0ICsgYm94LnlcclxuICAgICAgICB9XHJcbiAgICAgIH0gZWxzZSBpZiAobCA9PT0gJ0EnKSB7XHJcbiAgICAgICAgLy8gcmVzaXplIHJhZGlpXHJcbiAgICAgICAgdGhpc1tpXVsxXSA9ICh0aGlzW2ldWzFdICogd2lkdGgpIC8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mV0dXJuICdyZ2JhKCcgKyByICsgJywnICsgZyArICcsJyArIGIgKyAnLCcgKyBhICsgJyknO1xuICB9IGVsc2UgaWYgKGNvbG9yRm9ybWF0ID09PSAnSEVYJykge1xuICAgIHJldHVybiAnMHgnICsgY29sb3IuaGV4LnRvU3RyaW5nKDE2KTtcbiAgfSBlbHNlIGlmIChjb2xvckZvcm1hdCA9PT0gJ1JHQl9BUlJBWScpIHtcbiAgICByZXR1cm4gJ1snICsgciArICcsJyArIGcgKyAnLCcgKyBiICsgJ10nO1xuICB9IGVsc2UgaWYgKGNvbG9yRm9ybWF0ID09PSAnUkdCQV9BUlJBWScpIHtcbiAgICByZXR1cm4gJ1snICsgciArICcsJyArIGcgKyAnLCcgKyBiICsgJywnICsgYSArICddJztcbiAgfSBlbHNlIGlmIChjb2xvckZvcm1hdCA9PT0gJ1JHQl9PQkonKSB7XG4gICAgcmV0dXJuICd7cjonICsgciArICcsZzonICsgZyArICcsYjonICsgYiArICd9JztcbiAgfSBlbHNlIGlmIChjb2xvckZvcm1hdCA9PT0gJ1JHQkFfT0JKJykge1xuICAgIHJldHVybiAne3I6JyArIHIgKyAnLGc6JyArIGcgKyAnLGI6JyArIGIgKyAnLGE6JyArIGEgKyAnfSc7XG4gIH0gZWxzZSBpZiAoY29sb3JGb3JtYXQgPT09ICdIU1ZfT0JKJykge1xuICAgIHJldHVybiAne2g6JyArIGggKyAnLHM6JyArIHMgKyAnLHY6JyArIHYgKyAnfSc7XG4gIH0gZWxzZSBpZiAoY29sb3JGb3JtYXQgPT09ICdIU1ZBX09CSicpIHtcbiAgICByZXR1cm4gJ3toOicgKyBoICsgJyxzOicgKyBzICsgJyx2OicgKyB2ICsgJyxhOicgKyBhICsgJ30nO1xuICB9XG4gIHJldHVybiAndW5rbm93biBmb3JtYXQnO1xufVxuXG52YXIgQVJSX0VBQ0ggPSBBcnJheS5wcm90b3R5cGUuZm9yRWFjaDtcbnZhciBBUlJfU0xJQ0UgPSBBcnJheS5wcm90b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M6IHtcbiAgICBUSFJFRV9DSEFSX0hFWDoge1xuICAgICAgcmVhZDogZnVuY3Rpb24gcmVhZChvcmlnaW5hbCkge1xuICAgICAgICB2YXIgdGVzdCA9IG9yaWdpbmFsLm1hdGNoKC9eIyhbQS1GMC05XSkoW0EtRjAtOV0pKFtBLUYwLTldKSQvaSk7XG4gICAgICAgIGlmICh0ZXN0ID09PSBudWxsKSB7XG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc3BhY2U6ICdIRVgnLFxuICAgICAgICAgIGhleDogcGFyc2VJbnQoJzB4JyArIHRlc3RbMV0udG9TdHJpbmcoKSArIHRlc3RbMV0udG9TdHJpbmcoKSArIHRlc3RbMl0udG9TdHJpbmcoKSArIHRlc3RbMl0udG9TdHJpbmcoKSArIHRlc3RbM10udG9TdHJpbmcoKSArIHRlc3RbM10udG9TdHJpbmcoKSwgMClcbiAgICAgICAgfTtcbiAgICAgIH0sXG4gICAgICB3cml0ZTogY29sb3JUb1N0cmluZ1xuICAgIH0sXG4gICAgU0lYX0NIQVJfSEVYOiB7XG4gICAgICByZWFkOiBmdW5jdGlvbiByZWFkKG9yaWdpbmFsKSB7XG4gICAgICAgIHZhciB0ZXN0ID0gb3JpZ2luYWwubWF0Y2goL14jKFtBLUYwLTldezZ9KSQvaSk7XG4gICAgICAgIGlmICh0ZXN0ID09PSBudWxsKSB7XG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc3BhY2U6ICdIRVgnLFxuICAgICAgICAgIGhleDogcGFyc2VJbnQoJzB4JyArIHRlc3RbMV0udG9TdHJpbmcoKSwgMClcbiAgICAgICAgfTtcbiAgICAgIH0sXG4gICAgICB3cml0ZTogY29sb3JUb1N0cmluZ1xuICAgIH0sXG4gICAgQ1NTX1JHQjoge1xuICAgICAgcmVhZDogZnVuY3Rpb24gcmVhZChvcmlnaW5hbCkge1xuICAgICAgICB2YXIgdGVzdCA9IG9yaWdpbmFsLm1hdGNoKC9ecmdiXFwoXFxzKiguKylcXHMqLFxccyooLispXFxzKixcXHMqKC4rKVxccypcXCkvKTtcbiAgICAgICAgaWYgKHRlc3QgPT09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBzcGFjZTogJ1JHQicsXG4gICAgICAgICAgcjogcGFyc2VGbG9hdCh0ZXN0WzFdKSxcbiAgICAgICAgICBnOiBwYXJzZUZsb2F0KHRlc3RbMl0pLFxuICAgICAgICAgIGI6IHBhcnNlRmxvYXQodGVzdFszXSlcbiAgICAgICAgfTtcbiAgICAgIH0sXG4gICAgICB3cml0ZTogY29sb3JUb1N0cmluZ1xuICAgIH0sXG4gICAgQ1NTX1JHQkE6IHtcbiAgICAgIHJlYWQ6IGZ1bmN0aW9uIHJlYWQob3JpZ2luYWwpIHtcbiAgICAgICAgdmFyIHRlc3QgPSBvcmlnaW5hbC5tYXRjaCgvXnJnYmFcXChcXHMqKC4rKVxccyosXFxzKiguKylcXHMqLFxccyooLispXFxzKixcXHMqKC4rKVxccypcXCkvKTtcbiAgICAgICAgaWYgKHRlc3QgPT09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBzcGFjZTogJ1JHQicsXG4gICAgICAgICAgcjogcGFyc2VGbG9hdCh0ZXN0WzFdKSxcbiAgICAgICAgICBnOiBwYXJzZUZsb2F0KHRlc3RbMl0pLFxuICAgICAgICAgIGI6IHBhcnNlRmxvYXQodGVzdFszXSksXG4gICAgICAgICAgYTogcGFyc2VGbG9hdCh0ZXN0WzRdKVxuICAgICAgICB9O1xuICAgICAgfSxcbiAgICAgIHdyaXRlOiBjb2xvclRvU3RyaW5nXG4gICAgfVxuICB9XG59LF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dXJuIGZhbHNlO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHNwYWNlOiAnUkdCJyxcbiAgICAgICAgICByOiBvcmlnaW5hbFswXSxcbiAgICAgICAgICBnOiBvcmlnaW5hbFsxXSxcbiAgICAgICAgICBiOiBvcmlnaW5hbFsyXSxcbiAgICAgICAgICBhOiBvcmlnaW5hbFszXVxuICAgICAgICB9O1xuICAgICAgfSxcbiAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZShjb2xvcikge1xuICAgICAgICByZXR1cm4gW2NvbG9yLnIsIGNvbG9yLmcsIGNvbG9yLmIsIGNvbG9yLmFdO1xuICAgICAgfVxuICAgIH1cbiAgfVxufSxcbntcbiAgbGl0bXVzOiBDb21tb24uaXNPYmplY3QsXG4gIGNvbnZlcnNpb25zOiB7XG4gICAgUkdCQV9PQko6IHtcbiAgICAgIHJlYWQ6IGZ1bmN0aW9uIHJlYWQob3JpZ2luYWwpIHtcbiAgICAgICAgaWYgKENvbW1vbi5pc051bWJlcihvcmlnaW5hbC5yKSAmJiBDb21tb24uaXNOdW1iZXIob3JpZ2luYWwuZykgJiYgQ29tbW9uLmlzTnVtYmVyKG9yaWdpbmFsLmIpICYmIENvbW1vbi5pc051bWJlcihvcmlnaW5hbC5hKSkge1xuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBzcGFjZTogJ1JHQicsXG4gICAgICAgICAgICByOiBvcmlnaW5hbC5yLFxuICAgICAgICAgICAgZzogb3JpZ2luYWwuZyxcbiAgICAgICAgICAgIGI6IG9yaWdpbmFsLmIsXG4gICAgICAgICAgICBhOiBvcmlnaW5hbC5hXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9LFxuICAgICAgd3JpdGU6IGZ1bmN0aW9uIHdyaXRlKGNvbG9yKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgcjogY29sb3IucixcbiAgICAgICAgICBnOiBjb2xvci5nLFxuICAgICAgICAgIGI6IGNvbG9yLmIsXG4gICAgICAgICAgYTogY29sb3IuYVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH0sXG4gICAgUkdCX09CSjoge1xuICAgICAgcmVhZDogZnVuY3Rpb24gcmVhZChvcmlnaW5hbCkge1xuICAgICAgICBpZiAoQ29tbW9uLmlzTnVtYmVyKG9yaWdpbmFsLnIpICYmIENvbW1vbi5pc051bWJlcihvcmlnaW5hbC5nKSAmJiBDb21tb24uaXNOdW1iZXIob3JpZ2luYWwuYikpIHtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgc3BhY2U6ICdSR0InLFxuICAgICAgICAgICAgcjogb3JpZ2luYWwucixcbiAgICAgICAgICAgIGc6IG9yaWdpbmFsLmcsXG4gICAgICAgICAgICBiOiBvcmlnaW5hbC5iXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9LFxuICAgICAgd3JpdGU6IGZ1bmN0aW9uIHdyaXRlKGNvbG9yKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgcjogY29sb3IucixcbiAgICAgICAgICBnOiBjb2xvci5nLFxuICAgICAgICAgIGI6IGNvbG9yLmJcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9LFxuICAgIEhTVkFfT0JKOiB7XG4gICAgICByZWFkOiBmdW5jdGlvbiByZWFkKG9yaWdpbmFsKSB7XG4gICAgICAgIGlmIChDb21tb24uaXNOdW1iZXIob3JpZ2luYWwuaCkgJiYgQ29tbW9uLmlzTnVtYmVyKG9yaWdpbmFsLnMpICYmIENvbW1vbi5pc051bWJlcihvcmlnaW5hbC52KSAmJiBDb21tb24uaXNOdW1iZXIob3JpZ2luYWwuYSkpIHtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgc3BhY2U6ICdIU1YnLFxuICAgICAgICAgICAgaDogb3JpZ2luYWwuaCxcbiAgICAgICAgICAgIHM6IG9yaWdpbmFsLnMsXG4gICAgICAgICAgICB2OiBvcmlnaW5hbC52LFxuICAgICAgICAgICAgYTogb3JpZ2luYWwuYVxuICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfSxcbiAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZShjb2xvcikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGg6IGNvbG9yLmgsXG4gICAgICAgICAgczogY29sb3IucyxcbiAgICAgICAgICB2OiBjb2xvci52LFxuICAgICAgICAgIGE6IGNvbG9yLmFcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9LFxuICAgIEhTVl9PQko6IHtcbiAgICAgIHJlYWQ6IGZ1bmN0aW9uIHJlYWQob3JpZ2luYWwpIHtcbiAgICAgICAgaWYgKENvbW1vbi5pc051bWJlcihvcmlnaW5hbC5oKSAmJiBDb21tb24uaXNOdW1iZXIob3JpZ2luYWwucykgJiYgQ29tbW9uLmlzTnVtYmVyKG9yaWdpbmFsLnYpKSB7XG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHNwYWNlOiAnSFNWJyxcbiAgICAgICAgICAgIGg6IG9yaWdpbmFsLmgsXG4gICAgICAgICAgICBzOiBvcmlnaW5hbC5zLFxuICAgICAgICAgICAgdjogb3JpZ2luYWwudlxuICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfSxcbiAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZShjb2xvcikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGg6IGNvbG9yLmgsXG4gICAgICAgICAgczogY29sb3IucyxcbiAgICAgICAgICB2OiBjb2xvci52XG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfVxuICB9XG59XTtcbnZhciByZXN1bHQgPSB2b2lkIDA7XG52YXIgdG9SZXR1cm4gPSB2b2lkIDA7XG52YX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0gZmFsc2U7XG4gICAgICAgIENvbW1vbi5lYWNoKENvbG9yLkNPTVBPTkVOVFMsIGZ1bmN0aW9uIChjb21wb25lbnQpIHtcbiAgICAgICAgICBpZiAoIUNvbW1vbi5pc1VuZGVmaW5lZChpW2NvbXBvbmVudF0pICYmICFDb21tb24uaXNVbmRlZmluZWQodGhpcy5fX2NvbG9yLl9fc3RhdGVbY29tcG9uZW50XSkgJiYgaVtjb21wb25lbnRdICE9PSB0aGlzLl9fY29sb3IuX19zdGF0ZVtjb21wb25lbnRdKSB7XG4gICAgICAgICAgICBtaXNtYXRjaCA9IHRydWU7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICB9LCB0aGlzKTtcbiAgICAgICAgaWYgKG1pc21hdGNoKSB7XG4gICAgICAgICAgQ29tbW9uLmV4dGVuZCh0aGlzLl9fY29sb3IuX19zdGF0ZSwgaSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIENvbW1vbi5leHRlbmQodGhpcy5fX3RlbXAuX19zdGF0ZSwgdGhpcy5fX2NvbG9yLl9fc3RhdGUpO1xuICAgICAgdGhpcy5fX3RlbXAuYSA9IDE7XG4gICAgICB2YXIgZmxpcCA9IHRoaXMuX19jb2xvci52IDwgMC41IHx8IHRoaXMuX19jb2xvci5zID4gMC41ID8gMjU1IDogMDtcbiAgICAgIHZhciBfZmxpcCA9IDI1NSAtIGZsaXA7XG4gICAgICBDb21tb24uZXh0ZW5kKHRoaXMuX19maWVsZF9rbm9iLnN0eWxlLCB7XG4gICAgICAgIG1hcmdpbkxlZnQ6IDEwMCAqIHRoaXMuX19jb2xvci5zIC0gNyArICdweCcsXG4gICAgICAgIG1hcmdpblRvcDogMTAwICogKDEgLSB0aGlzLl9fY29sb3IudikgLSA3ICsgJ3B4JyxcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiB0aGlzLl9fdGVtcC50b0hleFN0cmluZygpLFxuICAgICAgICBib3JkZXI6IHRoaXMuX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AgICB9LFxuICAgIGF1dG9QbGFjZToge1xuICAgICAgZ2V0OiBmdW5jdGlvbiBnZXQkJDEoKSB7XG4gICAgICAgIHJldHVybiBwYXJhbXMuYXV0b1BsYWNlO1xuICAgICAgfVxuICAgIH0sXG4gICAgY2xvc2VPblRvcDoge1xuICAgICAgZ2V0OiBmdW5jdGlvbiBnZXQkJDEoKSB7XG4gICAgICAgIHJldHVybiBwYXJhbXMuY2xvc2VPblRvcDtcbiAgICAgIH1cbiAgICB9LFxuICAgIHByZXNldDoge1xuICAgICAgZ2V0OiBmdW5jdGlvbiBnZXQkJDEoKSB7XG4gICAgICAgIGlmIChfdGhpcy5wYXJlbnQpIHtcbiAgICAgICAgICByZXR1cm4gX3RoaXMuZ2V0Um9vdCgpLnByZXNldDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcGFyYW1zLmxvYWQucHJlc2V0O1xuICAgICAgfSxcbiAgICAgIHNldDogZnVuY3Rpb24gc2V0JCQxKHYpIHtcbiAgICAgICAgaWYgKF90aGlzLnBhcmVudCkge1xuICAgICAgICAgIF90aGlzLmdldFJvb3QoKS5wcmVzZXQgPSB2O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHBhcmFtcy5sb2FkLnByZXNldCA9IHY7XG4gICAgICAgIH1cbiAgICAgICAgc2V0UHJlc2V0U2VsZWN0SW5kZXgodGhpcyk7XG4gICAgICAgIF90aGlzLnJldmVydCgpO1xuICAgICAgfVxuICAgIH0sXG4gICAgd2lkdGg6IHtcbiAgICAgIGdldDogZnVuY3Rpb24gZ2V0JCQxKCkge1xuICAgICAgICByZXR1cm4gcGFyYW1zLndpZHRoO1xuICAgICAgfSxcbiAgICAgIHNldDogZnVuY3Rpb24gc2V0JCQxKHYpIHtcbiAgICAgICAgcGFyYW1zLndpZHRoID0gdjtcbiAgICAgICAgc2V0V2lkdGgoX3RoaXMsIHYpO1xuICAgICAgfVxuICAgIH0sXG4gICAgbmFtZToge1xuICAgICAgZ2V0OiBm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W9uIHIocmV0dXJuZWQpIHtcbiAgICAgIGlmIChDb21tb24uaXNOdW1iZXIoY29udHJvbGxlci5fX21pbikgJiYgQ29tbW9uLmlzTnVtYmVyKGNvbnRyb2xsZXIuX19tYXgpKSB7XG4gICAgICAgIHZhciBvbGROYW1lID0gY29udHJvbGxlci5fX2xpLmZpcnN0RWxlbWVudENoaWxkLmZpcnN0RWxlbWVudENoaWxkLmlubmVySFRNTDtcbiAgICAgICAgdmFyIHdhc0xpc3RlbmluZyA9IGNvbnRyb2xsZXIuX19ndWkuX19saXN0ZW5pbmcuaW5kZXhPZihjb250cm9sbGVyKSA+IC0xO1xuICAgICAgICBjb250cm9sbGVyLnJlbW92ZSgpO1xuICAgICAgICB2YXIgbmV3Q29udHJvbGxlciA9IF9hZGQoZ3VpLCBjb250cm9sbGVyLm9iamVjdCwgY29udHJvbGxlci5wcm9wZXJ0eSwge1xuICAgICAgICAgIGJlZm9yZTogY29udHJvbGxlci5fX2xpLm5leHRFbGVtZW50U2libGluZyxcbiAgICAgICAgICBmYWN0b3J5QXJnczogW2NvbnRyb2xsZXIuX19taW4sIGNvbnRyb2xsZXIuX19tYXgsIGNvbnRyb2xsZXIuX19zdGVwXVxuICAgICAgICB9KTtcbiAgICAgICAgbmV3Q29udHJvbGxlci5uYW1lKG9sZE5hbWUpO1xuICAgICAgICBpZiAod2FzTGlzdGVuaW5nKSBuZXdDb250cm9sbGVyLmxpc3RlbigpO1xuICAgICAgICByZXR1cm4gbmV3Q29udHJvbGxlcjtcbiAgICAgIH1cbiAgICAgIHJldHVybiByZXR1cm5lZDtcbiAgICB9O1xuICAgIGNvbnRyb2xsZXIubWluID0gQ29tbW9uLmNvbXBvc2UociwgY29udHJvbGxlci5taW4pO1xuICAgIGNvbnRyb2xsZXIubWF4ID0gQ29tbW9uLmNvbXBvc2UociwgY29udHJvbGxlci5tYXgpO1xuICB9IGVsc2UgaWYgKGNvbnRyb2xsZXIgaW5zdGFuY2VvZiBCb29sZWFuQ29udHJ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gc3BsYXksIG5vdCByZXF1aXJpbmcgaSB0byBiZSBpbiB0aGUgdHJlZSB0LlxuICAgKiBAcGFyYW0ge0tleX0gaVxuICAgKiBAcGFyYW0ge05vZGU/fSB0XG4gICAqIEBwYXJhbSB7Q29tcGFyYXRvcn0gY29tcGFyYXRvclxuICAgKi9cbiAgZnVuY3Rpb24gc3BsYXkgKGksIHQsIGNvbXBhcmF0b3IpIHtcbiAgICBpZiAodCA9PT0gbnVsbCkgeyByZXR1cm4gdDsgfVxuICAgIHZhciBsLCByLCB5O1xuICAgIHZhciBOID0gbmV3IE5vZGUoKTtcbiAgICBsID0gciA9IE47XG5cbiAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgdmFyIGNtcCA9IGNvbXBhcmF0b3IoaSwgdC5rZXkpO1xuICAgICAgLy9pZiAoaSA8IHQua2V5KSB7XG4gICAgICBpZiAoY21wIDwgMCkge1xuICAgICAgICBpZiAodC5sZWZ0ID09PSBudWxsKSB7IGJyZWFrOyB9XG4gICAgICAgIC8vaWYgKGkgPCB0LmxlZnQua2V5KSB7XG4gICAgICAgIGlmIChjb21wYXJhdG9yKGksIHQubGVmdC5rZXkpIDwgMCkge1xuICAgICAgICAgIHkgPSB0LmxlZnQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogcm90YXRlIHJpZ2h0ICovXG4gICAgICAgICAgdC5sZWZ0ID0geS5yaWdodDtcbiAgICAgICAgICB5LnJpZ2h0ID0gdDtcbiAgICAgICAgICB0ID0geTtcbiAgICAgICAgICBpZiAodC5sZWZ0ID09PSBudWxsKSB7IGJyZWFrOyB9XG4gICAgICAgIH1cbiAgICAgICAgci5sZWZ0ID0gdDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogbGluayByaWdodCAqL1xuICAgICAgICByID0gdDtcbiAgICAgICAgdCA9IHQubGVmdDtcbiAgICAgIC8vfSBlbHNlIGlmIChpID4gdC5rZXkpIHtcbiAgICAgIH0gZWxzZSBpZiAoY21wID4gMCkge1xuICAgICAgICBpZiAodC5yaWdodCA9PT0gbnVsbCkgeyBicmVhazsgfVxuICAgICAgICAvL2lmIChpID4gdC5yaWdodC5rZXkpIHtcbiAgICAgICAgaWYgKGNvbXBhcmF0b3IoaSwgdC5yaWdodC5rZXkpID4gMCkge1xuICAgICAgICAgIHkgPSB0LnJpZ2h0OyAgICAgICAgICAgICAgICAgICAgICAgICAgLyogcm90YXRlIGxlZnQgKi9cbiAgICAgICAgICB0LnJpZ2h0ID0geS5sZWZ0O1xuICAgICAgICAgIHkubGVmdCA9IHQ7XG4gICAgICAgICAgdCA9IHk7XG4gICAgICAgICAgaWYgKHQucmlnaHQgPT09IG51bGwpIHsgYnJlYWs7IH1cbiAgICAgICAgfVxuICAgICAgICBsLnJpZ2h0ID0gdDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBsaW5rIGxlZnQgKi9cbiAgICAgICAgbCA9IHQ7XG4gICAgICAgIHQgPSB0LnJpZ2h0O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG4gICAgfVxuICAgIC8qIGFzc2VtYmxlICovXG4gICAgbC5yaWdodCA9IHQubGVmdDtcbiAgICByLmxlZnQgPSB0LnJpZ2h0O1xuICAgIHQubGVmdCA9IE4ucmlnaHQ7XG4gICAgdC5yaWdodCA9IE4ubGVmdDtcbiAgICByZXR1cm4gdDtcbiAgfVxuXG5cbiAgLyoqXG4gICAqIEBwYXJhbSAge0tleX0gICAgICAgIGlcbiAgICogQHBhcmFtICB7VmFsdWV9ICAgICAgZGF0YVxuICAgKiBAcGFyYW0gIHtDb21wYXJhdG9yfSBjb21wYXJhdG9yXG4gICAqIEBwYXJhbSAge1RyZWV9ICAgICAgIHRyZWVcbiAgICogQHJldHVybiB7Tm9kZX0gICAgICByb290XG4gICAqL1xuICBmdW5jdGlvbiBpbnNlcnQgKGksIGRhdGEsIHQsIGNvbXBhcmF0b3IsIHRyZWUpIHtcbiAgICB2YXIgbm9k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G4gIGZ1bmN0aW9uIG1lcmdlIChsZWZ0LCByaWdodCwgY29tcGFyYXRvcikge1xuICAgIGlmIChyaWdodCA9PT0gbnVsbCkgeyByZXR1cm4gbGVmdDsgfVxuICAgIGlmIChsZWZ0ICA9PT0gbnVsbCkgeyByZXR1cm4gcmlnaHQ7IH1cblxuICAgIHJpZ2h0ID0gc3BsYXkobGVmdC5rZXksIHJpZ2h0LCBjb21wYXJhdG9yKTtcbiAgICByaWdodC5sZWZ0ID0gbGVmdDtcbiAgICByZXR1cm4gcmlnaHQ7XG4gIH1cblxuXG4gIC8qKlxuICAgKiBQcmludHMgbGV2ZWwgb2YgdGhlIHRyZWVcbiAgICogQHBhcmFtICB7Tm9kZX0gICAgICAgICAgICAgICAgICAgICAgICByb290XG4gICAqIEBwYXJhbSAge1N0cmluZ30gICAgICAgICAgICAgICAgICAgICAgcHJlZml4XG4gICAqIEBwYXJhbSAge0Jvb2xlYW59ICAgICAgICAgICAgICAgICAgICAgaXNUYWlsXG4gICAqIEBwYXJhbSAge0FycmF5PHN0cmluZz59ICAgICAgICAgICAgICAgb3V0XG4gICAqIEBwYXJhbSAge0Z1bmN0aW9uKG5vZGU6Tm9kZSk6U3RyaW5nfSAgcHJpbnROb2RlXG4gICAqL1xuICBmdW5jdGlvbiBwcmludFJvdyAocm9vdCwgcHJlZml4LCBpc1RhaWwsIG91dCwgcHJpbnROb2RlKSB7XG4gICAgaWYgKHJvb3QpIHtcbiAgICAgIG91dCgoXCJcIiArIHByZWZpeCArIChpc1RhaWwgPyAn4pSU4pSA4pSAICcgOiAn4pSc4pSA4pSAICcpICsgKHByaW50Tm9kZShyb290KSkgKyBcIlxcblwiKSk7XG4gICAgICB2YXIgaW5kZW50ID0gcHJlZml4ICsgKGlzVGFpbCA/ICcgICAgJyA6ICfilIIgICAnKTtcbiAgICAgIGlmIChyb290LmxlZnQpICB7IHByaW50Um93KHJvb3QubGVmdCwgIGluZGVudCwgZmFsc2UsIG91dCwgcHJpbnROb2Rl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ICAvLyBsZXQgY3VycmVudCA9IHN0YXR1cy5fcm9vdDtcbiAgICAgIC8vIGNvbnN0IFEgPSBbXTsgIC8qIEluaXRpYWxpemUgc3RhY2sgcyAqL1xuICAgICAgLy8gbGV0IGRvbmUgPSBmYWxzZTtcbiAgICAgIC8vIHZhciByZXMgPSBbXTtcbiAgICAgIC8vIHZhciBicmVha0Vhcmx5ID0gZmFsc2U7XG5cbiAgICAgIC8vIHdoaWxlICghZG9uZSkge1xuICAgICAgLy8gICBpZiAoY3VycmVudCAhPT0gIG51bGwpIHtcbiAgICAgIC8vICAgICBRLnB1c2goY3VycmVudCk7XG4gICAgICAvLyAgICAgY3VycmVudCA9IGN1cnJlbnQubGVmdDtcbiAgICAgIC8vICAgfSBlbHNlIHtcbiAgICAgIC8vICAgICBpZiAoUS5sZW5ndGggIT09IDApIHtcbiAgICAgIC8vICAgICAgIGN1cnJlbnQgPSBRLnBvcCgpO1xuXG4gICAgICAvLyAgICAgICB2YXIgeCA9IGdldEludGVyc2VjdGlvblhQb2ludChjdXJyZW50LmtleSwgcC54LCBwLnkpO1xuICAgICAgLy8gICAgICAgdmFyIGR4ID0gcC54IC0geDtcbiAgICAgIC8vICAgICAgIGlmIChNYXRoLmFicyhkeCkgPCBFUFMpIHtcbiAgICAgIC8vICAgICAgICAgcmVzLnB1c2goY3VycmVudC5rZXkpXG4gICAgICAvLyAgICAgICAgIGJyZWFrRWFybHkgPSB0cnVlO1xuICAgICAgLy8gICAgICAgfSBlbHNlIGlmIChicmVha0Vhcmx5KSB7XG4gICAgICAvLyAgICAgICAgIGRvbmUgPSB0cnVlO1xuICAgICAgLy8gICAgICAgfVxuXG4gICAgICAvLyAgICAgICBjdXJyZW50ID0gY3VycmVudC5yaWdodDtcbiAgICAgIC8vICAgICB9IGVsc2UgZG9uZSA9IHRydWU7XG4gICAgICAvLyAgIH1cbiAgICAgIC8vIH1cblxuICAgICAgLy8gcmV0dXJuIHJlcztcblxuICAgICAgLy8gb3B0aW9uIDM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aSA9IDA7IGkgPCBsaW5lcy5sZW5ndGg7ICsraSkge1xuICAgICAgICB2YXIgdGVzdCA9IGxpbmVzW2ldO1xuICAgICAgICBmb3IgKHZhciBqID0gaSArIDE7IGogPCBsaW5lcy5sZW5ndGg7ICsraikge1xuICAgICAgICAgIHZhciBvdGhlciA9IGxpbmVzW2pdO1xuICAgICAgICAgIHZhciBwdCA9IGludGVyc2VjdFNlZ21lbnRzJDEodGVzdCwgb3RoZXIpO1xuICAgICAgICAgIGlmIChwdCkge1xuICAgICAgICAgICAgaWYgKHJlcG9ydEludGVyc2VjdGlvbihwdCwgW3Rlc3QsIG90aGVyXSkpIHtcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgcmV0dXJuIHJlc3VsdHM7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZGVmYXVsdEludGVyc2VjdGlvblJlcG9ydGVyKHAsIGludGVyaW9yKSB7XG4gICAgICByZXN1bHRzLnB1c2goe1xuICAgICAgICBwb2ludDogcCwgXG4gICAgICAgIHNlZ21lbnRzOiBpbnRlcmlvclxuICAgICAgfSk7XG4gICAgfVxuICB9XG5cbiAgdmFyIEFSUkFZX1RZUEVTID0gW1xuICAgICAgSW50OEFycmF5LCBVaW50OEFycmF5LCBVaW50OENsYW1wZWRBcnJheSwgSW50MTZBcnJheSwgVWludDE2QXJyYXksXG4gICAgICBJbnQzMkFycmF5LCBVaW50MzJBcnJheSwgRmxvYXQzMkFycmF5LCBGbG9hdDY0QXJyYXlcbiAgXTtcblxuICB2YXIgVkVSU0lPTiA9IDM7IC8vIHNlcmlhbGl6ZWQgZm9ybWF0IHZlcnNpb25cblxuICB2YXIgRmxhdGJ1c2ggPSBmdW5jdGlvbiBGbGF0YnVzaChudW1JdGVtcywgbm9kZVNpemUsIEFycmF5VHlwZSwgZGF0YSkge1xuICAgICAgdmFyIHRoaXMkMSA9IHRoaXM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gICAgICAgICAgdmFyIGVuZCA9IHRoaXMkMS5fbGV2ZWxCb3VuZHNbaSQxXTtcblxuICAgICAgICAgIC8vIGdlbmVyYXRlIGEgcGFyZW50IG5vZGUgZm9yIGVhY2ggYmxvY2sgb2YgY29uc2VjdXRpdmUgPG5vZGVTaXplPiBub2Rlc1xuICAgICAgICAgIHdoaWxlIChwb3MkMSA8IGVuZCkge1xuICAgICAgICAgICAgICB2YXIgbm9kZU1pblggPSBJbmZpbml0eTtcbiAgICAgICAgICAgICAgdmFyIG5vZGVNaW5ZID0gSW5maW5pdHk7XG4gICAgICAgICAgICAgIHZhciBub2RlTWF4WCA9IC1JbmZpbml0eTtcbiAgICAgICAgICAgICAgdmFyIG5vZGVNYXhZID0gLUluZmluaXR5O1xuICAgICAgICAgICAgICB2YXIgbm9kZUluZGV4ID0gcG9zJDE7XG5cbiAgICAgICAgICAgICAgLy8gY2FsY3VsYXRlIGJib3ggZm9yIHRoZSBuZXcgbm9kZVxuICAgICAgICAgICAgICBmb3IgKHZhciBpJDIgPSAwOyBpJDIgPCB0aGlzLm5vZGVTaXplICYmIHBvcyQxIDwgZW5kOyBpJDIrKykge1xuICAgICAgICAgICAgICAgICAgdmFyIG1pblgkMSA9IHRoaXMkMS5fYm94ZXNbcG9zJDErK107XG4gICAgICAgICAgICAgICAgICB2YXIgbWluWSQxID0gdGhpcyQxLl9ib3hlc1twb3MkMSsrXTtcbiAgICAgICAgICAgICAgICAgIHZhciBtYXhYJDEgPSB0aGlzJDEuX2JveGVzW3BvcyQxKytdO1xuICAgICAgICAgICAgICAgICAgdmFyIG1heFkkMSA9IHRoaXMkMS5fYm94ZXNbcG9zJDErK107XG4gICAgICAgICAgICAgICAgICBpZiAobWluWCQxIDwgbm9kZU1pblgpIHsgbm9kZU1pblggPSBtaW5YJDE7IH1cbiAgICAgICAgICAgICAgICAgIGlmIChtaW5ZJDEgPCBub2RlTWluWSkgeyBub2RlTWluWSA9IG1pblkkMTsgfVxuICAgICAgICAgICA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gICAgICAgICBpZiAoaSA+PSBqKSB7IGJyZWFrOyB9XG4gICAgICAgICAgc3dhcCh2YWx1ZXMsIGJveGVzLCBpbmRpY2VzLCBpLCBqKTtcbiAgICAgIH1cblxuICAgICAgc29ydCQxKHZhbHVlcywgYm94ZXMsIGluZGljZXMsIGxlZnQsIGopO1xuICAgICAgc29ydCQxKHZhbHVlcywgYm94ZXMsIGluZGljZXMsIGogKyAxLCByaWdodCk7XG4gIH1cblxuICAvLyBzd2FwIHR3byB2YWx1ZXMgYW5kIHR3byBjb3JyZXNwb25kaW5nIGJveGVzXG4gIGZ1bmN0aW9uIHN3YXAodmFsdWVzLCBib3hlcywgaW5kaWNlcywgaSwgaikge1xuICAgICAgdmFyIHRlbXAgPSB2YWx1ZXNbaV07XG4gICAgICB2YWx1ZXNbaV0gPSB2YWx1ZXNbal07XG4gICAgICB2YWx1ZXNbal0gPSB0ZW1wO1xuXG4gICAgICB2YXIgayA9IDQgKiBpO1xuICAgICAgdmFyIG0gPSA0ICogajtcblxuICAgICAgdmFyIGEgPSBib3hlc1trXTtcbiAgICAgIHZhciBiID0gYm94ZXNbayArIDFdO1xuICAgICAgdmFyIGMgPSBib3hlc1trICsgMl07XG4gICAgICB2YXIgZCA9IGJveGVzW2sgKyAzXTtcbiAgICAgIGJveGVzW2tdID0gYm94ZXNbbV07XG4gICAgICBib3hlc1trICsgMV0gPSBib3hlc1ttICsgMV07XG4gICAgICBib3hlc1trICsgMl0gPSBib3hlc1ttICsgMl07XG4gICAgICBib3hlc1trICsgM10gPSBib3hlc1ttICsgM107XG4gICAgICBib3hlc1ttXSA9IGE7XG4gICAgICBib3hlc1ttICsgMV0gPSBiO1xuICAgICAgYm94ZXNbbSArIDJdID0gYztcbiAgICAgIGJveGVzW20gKyAzXSA9IGQ7XG5cbiAgICAgIHZhciBlID0gaW5kaWNlc1tpXTtcbiAgICAgIGluZGljZXNbaV0gPSBpbmRpY2VzW2pdO1xuICAgICAgaW5kaWNlc1tqXSA9IGU7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HVuaWNvZGUgcGF0aCBleHRyYSBmaWVsZC5cbiAgICAgICAgLy8gU28gZm9yIG5vdywgVVRGLTggZXZlcnl3aGVyZSAhXG4gICAgICAgIHVuaWNvZGVQYXRoRXh0cmFGaWVsZCA9XG4gICAgICAgICAgICAvLyBWZXJzaW9uXG4gICAgICAgICAgICBkZWNUb0hleCgxLCAxKSArXG4gICAgICAgICAgICAvLyBOYW1lQ1JDMzJcbiAgICAgICAgICAgIGRlY1RvSGV4KGNyYzMyKGVuY29kZWRGaWxlTmFtZSksIDQpICtcbiAgICAgICAgICAgIC8vIFVuaWNvZGVOYW1lXG4gICAgICAgICAgICB1dGZFbmNvZGVkRmlsZU5hbWU7XG5cbiAgICAgICAgZXh0cmFGaWVsZHMgKz1cbiAgICAgICAgICAgIC8vIEluZm8tWklQIFVuaWNvZGUgUGF0aCBFeHRyYSBGaWVsZFxuICAgICAgICAgICAgXCJcXHg3NVxceDcwXCIgK1xuICAgICAgICAgICAgLy8gc2l6ZVxuICAgICAgICAgICAgZGVjVG9IZXgodW5pY29kZVBhdGhFeHRyYUZpZWxkLmxlbmd0aCwgMikgK1xuICAgICAgICAgICAgLy8gY29udGVudFxuICAgICAgICAgICAgdW5pY29kZVBhdGhFeHRyYUZpZWxkO1xuICAgIH1cblxuICAgIGlmKHVzZVVURjhGb3JDb21tZW50KSB7XG5cbiAgICAgICAgdW5pY29kZUNvbW1lbnRFeHRyYUZpZWxkID1cbiAgICAgICAgICAgIC8vIFZlcnNpb25cbiAgICAgICAgICAgIGRlY1RvSGV4KDEsIDEpICtcbiAgICAgICAgICAgIC8vIENvbW1lbnRDUkMzMlxuICAgICAgICAgICAgZGVjVG9IZXgoY3JjMzIoZW5jb2RlZENvbW1lbnQpLCA0KSArXG4gICAgICAgICAgICAvLyBVbmljb2RlTmFtZVxuICAgICAgICAgICAgdXRmRW5jb2RlZENvbW1lbnQ7XG5cbiAgICAgICAgZXh0cmFGaWVsZHMgKz1cbiAgICAgICAgICAgIC8vIElu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mllc0NvdW50ID0gMDtcbiAgICB0cnkge1xuXG4gICAgICAgIHppcC5mb3JFYWNoKGZ1bmN0aW9uIChyZWxhdGl2ZVBhdGgsIGZpbGUpIHtcbiAgICAgICAgICAgIGVudHJpZXNDb3VudCsrO1xuICAgICAgICAgICAgdmFyIGNvbXByZXNzaW9uID0gZ2V0Q29tcHJlc3Npb24oZmlsZS5vcHRpb25zLmNvbXByZXNzaW9uLCBvcHRpb25zLmNvbXByZXNzaW9uKTtcbiAgICAgICAgICAgIHZhciBjb21wcmVzc2lvbk9wdGlvbnMgPSBmaWxlLm9wdGlvbnMuY29tcHJlc3Npb25PcHRpb25zIHx8IG9wdGlvbnMuY29tcHJlc3Npb25PcHRpb25zIHx8IHt9O1xuICAgICAgICAgICAgdmFyIGRpciA9IGZpbGUuZGlyLCBkYXRlID0gZmlsZS5kYXRlO1xuXG4gICAgICAgICAgICBmaWxlLl9jb21wcmVzc1dvcmtlcihjb21wcmVzc2lvbiwgY29tcHJlc3Npb25PcHRpb25zKVxuICAgICAgICAgICAgLndpdGhTdHJlYW1JbmZvKFwiZmlsZVwiLCB7XG4gICAgICAgICAgICAgICAgbmFtZSA6IHJlbGF0aXZlUGF0aCxcbiAgICAgICAgICAgICAgICBkaXIgOiBkaXIsXG4gICAgICAgICAgICAgICAgZGF0ZSA6IGRhdGUsXG4gICAgICAgICAgICAgICAgY29tbWVudCA6IGZpbGUuY29tbWVudCB8fCBcIlwiLFxuICAgICAgICAgICAgICAgIHVuaXhQZXJtaXNzaW9ucyA6IGZpbGUudW5peFBlcm1pc3Npb25zLFxuICAgICAgICAgICAgICAgIGRvc1Blcm1pc3Npb25zIDogZmlsZS5kb3NQZXJtaXNzaW9uc1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5waXBlKHppcEZpbGVXb3JrZXIpO1xuICAgICAgICB9KTtcbiAgICAgICAgemlwRmlsZVdvcmtlci5lbnRyaWVzQ291bnQgPSBlbnRyaWVzQ291bnQ7XG4gICAgfS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lzZS5yZXNvbHZlKHppcEVudHJpZXMpXTtcbiAgICAgICAgdmFyIGZpbGVzID0gemlwRW50cmllcy5maWxlcztcbiAgICAgICAgaWYgKG9wdGlvbnMuY2hlY2tDUkMzMikge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBmaWxlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHByb21pc2VzLnB1c2goY2hlY2tFbnRyeUNSQzMyKGZpbGVzW2ldKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGV4dGVybmFsLlByb21pc2UuYWxsKHByb21pc2VzKTtcbiAgICB9KS50aGVuKGZ1bmN0aW9uIGFkZEZpbGVzKHJlc3VsdHMpIHtcbiAgICAgICAgdmFyIHppcEVudHJpZXMgPSByZXN1bHRzLnNoaWZ0KCk7XG4gICAgICAgIHZhciBmaWxlcyA9IHppcEVudHJpZXMuZmlsZXM7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZmlsZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBpbnB1dCA9IGZpbGVzW2ldO1xuICAgICAgICAgICAgemlwLmZpbGUoaW5wdXQuZmlsZU5hbWVTdHIsIGlucHV0LmRlY29tcHJlc3NlZCwge1xuICAgICAgICAgICAgICAgIGJpbmFyeTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBvcHRpbWl6ZWRCaW5hcnlTdHJpbmc6IHRydWUsXG4gICAgICAgICAgICAgICAgZGF0ZTogaW5wdXQuZGF0ZSxcbiAgICAgICAgICAgICAgICBkaXI6IGlucHV0LmRpcixcbiAgICAgICAgICAgICAgICBjb21tZW50IDogaW5wdXQuZmlsZUNvbW1lbnRTdHIubGVuZ3RoID8gaW5wdXQuZmlsZUNvbW1lbnRTdHIgOiBudWxsLFxuICAgICAgICAgICAgICAgIHVuaXhQZXJtaXNzaW9ucyA6IGlucHV0LnVuaXhQZXJtaXNzaW9ucyx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YSwgZWl0aGVyIHJhdyBvciBiYXNlNjQgZW5jb2RlZFxuICAgICAqIEBwYXJhbSAgIHtPYmplY3R9IG8gICAgIEZpbGUgb3B0aW9uc1xuICAgICAqIEByZXR1cm4gIHtKU1ppcHxPYmplY3R8QXJyYXl9IHRoaXMgSlNaaXAgb2JqZWN0ICh3aGVuIGFkZGluZyBhIGZpbGUpLFxuICAgICAqIGEgZmlsZSAod2hlbiBzZWFyY2hpbmcgYnkgc3RyaW5nKSBvciBhbiBhcnJheSBvZiBmaWxlcyAod2hlbiBzZWFyY2hpbmcgYnkgcmVnZXgpLlxuICAgICAqL1xuICAgIGZpbGU6IGZ1bmN0aW9uKG5hbWUsIGRhdGEsIG8pIHtcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgIGlmIChpc1JlZ0V4cChuYW1lKSkge1xuICAgICAgICAgICAgICAgIHZhciByZWdleHAgPSBuYW1lO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmZpbHRlcihmdW5jdGlvbihyZWxhdGl2ZVBhdGgsIGZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICFmaWxlLmRpciAmJiByZWdleHAudGVzdChyZWxhdGl2ZVBhdGgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7IC8vIHRleHRcbiAgICAgICAgICAgICAgICB2YXIgb2JqID0gdGhpcy5maWxlc1t0aGlzLnJvb3QgKyBuYW1lXTtcbiAgICAgICAgICAgICAgICBpZiAob2JqICYmICFvYmouZGlyKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmo7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgeyAvLyBtb3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HMudHlwZS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgIG9wdHMuY29tcHJlc3Npb24gPSBvcHRzLmNvbXByZXNzaW9uLnRvVXBwZXJDYXNlKCk7XG5cbiAgICAgICAgICAvLyBcImJpbmFyeXN0cmluZ1wiIGlzIHByZWZlcnJlZCBidXQgdGhlIGludGVybmFscyB1c2UgXCJzdHJpbmdcIi5cbiAgICAgICAgICBpZihvcHRzLnR5cGUgPT09IFwiYmluYXJ5c3RyaW5nXCIpIHtcbiAgICAgICAgICAgIG9wdHMudHlwZSA9IFwic3RyaW5nXCI7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKCFvcHRzLnR5cGUpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIk5vIG91dHB1dCB0eXBlIHNwZWNpZmllZC5cIik7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdXRpbHMuY2hlY2tTdXBwb3J0KG9wdHMudHlwZSk7XG5cbiAgICAgICAgICAvLyBhY2NlcHQgbm9kZWpzIGBwcm9jZXNzLnBsYXRmb3JtYFxuICAgICAgICAgIGlmKFxuICAgICAgICAgICAgICBvcHRzLnBsYXRmb3JtID09PSAnZGFyd2luJyB8fFxuICAgICAgICAgICAgICBvcHRzLnBsYXRmb3JtID09PSAnZnJlZWJzZCcgfHxcbiAgICAgICAgICAgICAgb3B0cy5wbGF0Zm9ybSA9PT0gJ2xpbnV4JyB8fFxuICAgICAgICAgICAgICBvcHRzLnBsYXRmb3JtID09PSAnc3Vub3MnXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIG9wdHMucGxhdGZvcm0gPSBcIlVOSVhcIjtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKG9wdHMucGxhdGZvcm0gPT09ICd3aW4zMicpIHtcbiAgICAgICAgICAgICAgb3B0cy5wbGF0Zm9ybSA9IFwiRE9TXCI7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIGNvbW1lbnQgPSBvcH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GlmICh0aGlzLmluZGV4ID49IHRoaXMubWF4KSB7XG4gICAgICAgIC8vIEVPRlxuICAgICAgICByZXR1cm4gdGhpcy5lbmQoKTtcbiAgICB9IGVsc2Uge1xuICAgICAgICBzd2l0Y2godGhpcy50eXBlKSB7XG4gICAgICAgICAgICBjYXNlIFwic3RyaW5nXCI6XG4gICAgICAgICAgICAgICAgZGF0YSA9IHRoaXMuZGF0YS5zdWJzdHJpbmcodGhpcy5pbmRleCwgbmV4dEluZGV4KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInVpbnQ4YXJyYXlcIjpcbiAgICAgICAgICAgICAgICBkYXRhID0gdGhpcy5kYXRhLnN1YmFycmF5KHRoaXMuaW5kZXgsIG5leHRJbmRleCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJhcnJheVwiOlxuICAgICAgICAgICAgY2FzZSBcIm5vZGVidWZmZXJcIjpcbiAgICAgICAgICAgICAgICBkYXRhID0gdGhpcy5kYXRhLnNsaWNlKHRoaXMuaW5kZXgsIG5leHRJbmRleCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmluZGV4ID0gbmV4dEluZGV4O1xuICAgICAgICByZXR1cm4gdGhpcy5wdXNoKHtcbiAgICAgICAgICAgIGRhdGEgOiBkYXRhLFxuICAgICAgICAgICAgbWV0YSA6IHtcbiAgICAgICAgICAgICAgICBwZXJjZW50IDogdGhpcy5tYXggPyB0aGlzLmluZGV4IC8gdGhpcy5tYXggKiAxMDAgOiAwXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cbn07XG5cbm1vZHVsZS5leHBvcnRzID0gRGF0YVdvcmtlcjtcbiIsIid1c2Ugc3RyaWN0JztcblxuLyoqXG4gKiBBIHdvcmtlciB0aGF0IGRvZXMgbm90aGluZyBidXQgcGFzc2luZyBjaHVua3MgdG8gdGhlIG5leHQgb25lLiBUaGl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gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5pc1BhdXNlZCA9IHRydWU7XG5cbiAgICAgICAgaWYodGhpcy5wcmV2aW91cykge1xuICAgICAgICAgICAgdGhpcy5wcmV2aW91cy5wYXVzZSgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH0sXG4gICAgLyoqXG4gICAgICogUmVzdW1lIGEgcGF1c2VkIHN0cmVhbS5cbiAgICAgKiBAcmV0dXJuIHtCb29sZWFufSB0cnVlIGlmIHRoaXMgY2FsbCByZXN1bWVkIHRoZSB3b3JrZXIsIGZhbHNlIG90aGVyd2lzZS5cbiAgICAgKi9cbiAgICByZXN1bWUgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmKCF0aGlzLmlzUGF1c2VkIHx8IHRoaXMuaXNGaW5pc2hlZCkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuaXNQYXVzZWQgPSBmYWxzZTtcblxuICAgICAgICAvLyBpZiB0cnVlLCB0aGUgd29ya2VyIHRyaWVkIHRvIHJlc3VtZSBidXQgZmFpbGVkXG4gICAgICAgIHZhciB3aXRoRXJyb3IgPSBmYWxzZTtcbiAgICAgICAgaWYodGhpcy5nZW5lcmF0ZWRFcnJvcikge1xuICAgICAgICAgICAgdGhpcy5lcnJvcih0aGlzLmdlbmVyYXRlZEVycm9yKTtcbiAgICAgICAgICAgIHdpdGhFcnJvciA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYodGhpcy5wcmV2aW91cykge1xuICAgICAgICAgICAgdGhpcy5wcmV2aW91cy5yZXN1bWUoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiAhd2l0aEVycm9yO1xuICAgIH0sXG4gICAgLyoqXG4gICAgICogRmx1c2ggYW55IHJlbWFpbmluZyBieXRlcyBhcyB0aGUgc3RyZWFtIGlzIGVu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cn0gdGhlIGNvbmNhdGVuYXRlZCBkYXRhXG4gKiBAdGhyb3dzIEVycm9yIGlmIHRoZSBhc2tlZCB0eXBlIGlzIHVuc3VwcG9ydGVkXG4gKi9cbmZ1bmN0aW9uIGNvbmNhdCAodHlwZSwgZGF0YUFycmF5KSB7XG4gICAgdmFyIGksIGluZGV4ID0gMCwgcmVzID0gbnVsbCwgdG90YWxMZW5ndGggPSAwO1xuICAgIGZvcihpID0gMDsgaSA8IGRhdGFBcnJheS5sZW5ndGg7IGkrKykge1xuICAgICAgICB0b3RhbExlbmd0aCArPSBkYXRhQXJyYXlbaV0ubGVuZ3RoO1xuICAgIH1cbiAgICBzd2l0Y2godHlwZSkge1xuICAgICAgICBjYXNlIFwic3RyaW5nXCI6XG4gICAgICAgICAgICByZXR1cm4gZGF0YUFycmF5LmpvaW4oXCJcIik7XG4gICAgICAgICAgY2FzZSBcImFycmF5XCI6XG4gICAgICAgICAgICByZXR1cm4gQXJyYXkucHJvdG90eXBlLmNvbmNhdC5hcHBseShbXSwgZGF0YUFycmF5KTtcbiAgICAgICAgY2FzZSBcInVpbnQ4YXJyYXlcIjpcbiAgICAgICAgICAgIHJlcyA9IG5ldyBVaW50OEFycmF5KHRvdGFsTGVuZ3RoKTtcbiAgICAgICAgICAgIGZvcihpID0gMDsgaSA8IGRhdGFBcnJheS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHJlcy5zZXQoZGF0YUFycmF5W2ldLCBpbmRleCk7XG4gICAgICAgICAgICAgICAgaW5kZXggKz0gZGF0YUFycmF5W2ldLmxlbmd0aDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXM7XG4gICAgICAgIGNhc2UgXCJub2RlYnVmZmVyXCI6XG4gICAgICAgICAgICByZXR1cm4gQnVmZmVyLmNvbmNhdChkYXRhQXJyYXkpO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiY29uY2F0IDog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l9sZW4pO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGJ1ZiA9IG5ldyBBcnJheShidWZfbGVuKTtcbiAgICB9XG5cbiAgICAvLyBjb252ZXJ0XG4gICAgZm9yIChpPTAsIG1fcG9zID0gMDsgaSA8IGJ1Zl9sZW47IG1fcG9zKyspIHtcbiAgICAgICAgYyA9IHN0ci5jaGFyQ29kZUF0KG1fcG9zKTtcbiAgICAgICAgaWYgKChjICYgMHhmYzAwKSA9PT0gMHhkODAwICYmIChtX3BvcysxIDwgc3RyX2xlbikpIHtcbiAgICAgICAgICAgIGMyID0gc3RyLmNoYXJDb2RlQXQobV9wb3MrMSk7XG4gICAgICAgICAgICBpZiAoKGMyICYgMHhmYzAwKSA9PT0gMHhkYzAwKSB7XG4gICAgICAgICAgICAgICAgYyA9IDB4MTAwMDAgKyAoKGMgLSAweGQ4MDApIDw8IDEwKSArIChjMiAtIDB4ZGMwMCk7XG4gICAgICAgICAgICAgICAgbV9wb3MrKztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoYyA8IDB4ODApIHtcbiAgICAgICAgICAgIC8qIG9uZSBieXRlICovXG4gICAgICAgICAgICBidWZbaSsrXSA9IGM7XG4gICAgICAgIH0gZWxzZSBpZiAoYyA8IDB4ODAwKSB7XG4gICAgICAgICAgICAvKiB0d28gYnl0ZXMgKi9cbiAgICAgICAgICAgIGJ1ZltpKytdID0gMHhDMCB8IChjID4+PiA2KTtcbiAgICAgICAgICAgIGJ1ZltpKytdID0gMHg4MCB8IChjICYgMHgzZik7XG4gICAgICAgIH0gZWxzZSBpZiAoYyA8IDB4MTAwMDApIHtcbiAgICAgICAgICAgIC8qIHRocmVlIGJ5dGVzICovXG4gICAgICAgICAgICBidWZbaSsrXSA9IDB4RTAgfCAoYyA+Pj4gMTIpO1xuICAgICAgICAgICAgYnVmW2krK10gPSAweDgwIHwgKGMgPj4+IDYgJiAweDNmKTtcbiAgICAgICAgICAgIGJ1ZltpKytdID0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ICAgICBjX2xlbiA9IF91dGY4bGVuW2NdO1xuICAgICAgICAvLyBza2lwIDUgJiA2IGJ5dGUgY29kZXNcbiAgICAgICAgaWYgKGNfbGVuID4gNCkgeyB1dGYxNmJ1ZltvdXQrK10gPSAweGZmZmQ7IGkgKz0gY19sZW4tMTsgY29udGludWU7IH1cblxuICAgICAgICAvLyBhcHBseSBtYXNrIG9uIGZpcnN0IGJ5dGVcbiAgICAgICAgYyAmPSBjX2xlbiA9PT0gMiA/IDB4MWYgOiBjX2xlbiA9PT0gMyA/IDB4MGYgOiAweDA3O1xuICAgICAgICAvLyBqb2luIHRoZSByZXN0XG4gICAgICAgIHdoaWxlIChjX2xlbiA+IDEgJiYgaSA8IGxlbikge1xuICAgICAgICAgICAgYyA9IChjIDw8IDYpIHwgKGJ1ZltpKytdICYgMHgzZik7XG4gICAgICAgICAgICBjX2xlbi0tO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gdGVybWluYXRlZCBieSBlbmQgb2Ygc3RyaW5nP1xuICAgICAgICBpZiAoY19sZW4gPiAxKSB7IHV0ZjE2YnVmW291dCsrXSA9IDB4ZmZmZDsgY29udGludWU7IH1cblxuICAgICAgICBpZiAoYyA8IDB4MTAwMDApIHtcbiAgICAgICAgICAgIHV0ZjE2YnVmW291dCsrXSA9IGM7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjIC09IDB4MTAwMDA7XG4gICAgICAgICAgICB1dGYxNmJ1ZltvdXQrK10gPSAweGQ4MDAgfCAoKGMgPj4gMTApICYgMHgzZmYpO1xuICAgICAgICAgICAgdXRmMTZidWZbb3V0KytdID0gMHhkYzAwIHwgKGMgJiAweDNmZik7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBzaHJpbmtCdWYodXRmMTZidWYsIG91dClcbiAgICBpZiAodXRmMTZidWYubGVuZ3RoICE9PSBvdXQpIHtcbiAgICAgICAgaWYodXRmMTZidWYuc3ViYXJyYXkpIHtcbiAgICAgICAgICAg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24gVWludDhBcnJheVxuICAgICAgICAgKi9cbiAgICAgICAgdWludDhhcnJheSA6IChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHJldHVybiBzdXBwb3J0LnVpbnQ4YXJyYXkgJiYgU3RyaW5nLmZyb21DaGFyQ29kZS5hcHBseShudWxsLCBuZXcgVWludDhBcnJheSgxKSkubGVuZ3RoID09PSAxO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSkoKSxcbiAgICAgICAgLyoqXG4gICAgICAgICAqIHRydWUgaWYgdGhlIGJyb3dzZXIgYWNjZXB0cyB0byB1c2UgU3RyaW5nLmZyb21DaGFyQ29kZSBvbiBub2RlanMgQnVmZmVyLlxuICAgICAgICAgKi9cbiAgICAgICAgbm9kZWJ1ZmZlciA6IChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHJldHVybiBzdXBwb3J0Lm5vZGVidWZmZXIgJiYgU3RyaW5nLmZyb21DaGFyQ29kZS5hcHBseShudWxsLCBub2RlanNVdGlscy5hbGxvY0J1ZmZlcigxKSkubGVuZ3RoID09PSAxO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSkoKVxuICAgIH1cbn07XG5cbi8qKlxuICogVHJhbnNmb3JtIGFuIGFycmF5LWxpa2Ugb2JqZWN0IHRvIGEgc3RyaW5nLlxuICogQHBhcmFtIHtBcnJheXxBcnJheUJ1ZmZlcnxVaW50OEFycmF5fEJ1ZmZlcn0gYXJyYXkgdGhlIGFycmF5IHRvIHRyYW5zZm9ybS5cbiAqIEByZXR1cm4ge1N0cmluZ30gdGhlIHJlc3VsdC5cbiAqL1xuZnVuY3Rpb24gYXJyY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xvYiA9IHN1cHBvcnQuYmxvYiAmJiAoZGF0YSBpbnN0YW5jZW9mIEJsb2IgfHwgWydbb2JqZWN0IEZpbGVdJywgJ1tvYmplY3QgQmxvYl0nXS5pbmRleE9mKE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChkYXRhKSkgIT09IC0xKTtcblxuICAgICAgICBpZiAoaXNCbG9iICYmIHR5cGVvZiBGaWxlUmVhZGVyICE9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgICAgICByZXR1cm4gbmV3IGV4dGVybmFsLlByb21pc2UoZnVuY3Rpb24gKHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgICAgICAgICAgIHZhciByZWFkZXIgPSBuZXcgRmlsZVJlYWRlcigpO1xuXG4gICAgICAgICAgICAgICAgcmVhZGVyLm9ubG9hZCA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShlLnRhcmdldC5yZXN1bHQpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgcmVhZGVyLm9uZXJyb3IgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlLnRhcmdldC5lcnJvcik7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICByZWFkZXIucmVhZEFzQXJyYXlCdWZmZXIoZGF0YSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBkYXRhO1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gcHJvbWlzZS50aGVuKGZ1bmN0aW9uKGRhdGEpIHtcbiAgICAgICAgdmFyIGRhdGFUeXBlID0gZXhwb3J0cy5nZXRUeXBlT2YoZGF0YSk7XG5cbiAgICAgICAgaWYgKCFkYXRhVHlwZSkge1xuICAgICAgICAgICAgcmV0dXJuIGV4dGVybmFsLlByb21pc2UucmVqZWN0KFxuICAgICAgICAgICAgICAgIG5ldyBFcnJvcihcIkNhbid0IHJlYWQgdGhlIGRhdGEgb2YgJ1wiICsgbmFtZSArIFwiJy4gSXMgaXQgXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICBcImluIGEgc3VwcG9ydGVkIEphdmFTY3JpcHQgdHlwZSAoU3RyaW5nLCBCbG9iLCBBcnJheUJ1ZmZlciwgZXRjKSA/XCIpXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIC8vIHNwZWNpYWwgY2FzZSA6IGl0J3Mgd2F5IGVhc2llciB0byB3b3JrIHdpdGggVWludDhBcnJheSB0aGFuIHdpdGggQXJyYXlCdWZmZXJcbiAgICAgICAgaWYgKGRhdGFUeXBlID09PSBcImFycmF5YnVmZmVyXCIpIHtcbiAgICAgICAgICAgIGRhdGEgPSBleHBvcnRzLnRyYW5zZm9ybVRvKFwidWludDhhcnJheVwiLCBkYXRhKTtcbiAgICAgICAgfSBlbHNlIGlmIChkYXRhVHlwZSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgaWYgKGlzQmFzZTY0KSB7XG4gICAgICAgICAgICAgICAgZGF0YSA9IGJhc2U2NC5kZWNvZGUoZGF0YSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChpc0JpbmFyeSkge1xuICAgICAgICAgICAgICAgIC8vIG9wdGltaXplZEJpbmFyeVN0cmluZyA9PT0gdHJ1ZSBtZWFucyB0aGF0IHRoZSBmaWxlIGhhcyBhbHJlYWR5IGJlZW4gZmlsdGVyZWQgd2l0aCBhIDB4RkYgbWFza1xuICAgICAgICAgICAgICAgIGlmIChpc09wdGltaXplZEJpbmFyeVN0cmluZyAhPT0gdHJ1ZSkge1xuICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIGlzIGEgc3RyaW5nLCBub3QgaW4gYSBiYXNlNjQgZm9ybWF0LlxuICAgICAgICAgICAgICAgICAgICAvLyBCZSBzdXJlIHRoYXQgdGhpcyBpcyB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NpemUgPSBleHRyYVJlYWRlci5yZWFkSW50KDgpO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLmNvbXByZXNzZWRTaXplID09PSB1dGlscy5NQVhfVkFMVUVfMzJCSVRTKSB7XG4gICAgICAgICAgICB0aGlzLmNvbXByZXNzZWRTaXplID0gZXh0cmFSZWFkZXIucmVhZEludCg4KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5sb2NhbEhlYWRlck9mZnNldCA9PT0gdXRpbHMuTUFYX1ZBTFVFXzMyQklUUykge1xuICAgICAgICAgICAgdGhpcy5sb2NhbEhlYWRlck9mZnNldCA9IGV4dHJhUmVhZGVyLnJlYWRJbnQoOCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuZGlza051bWJlclN0YXJ0ID09PSB1dGlscy5NQVhfVkFMVUVfMzJCSVRTKSB7XG4gICAgICAgICAgICB0aGlzLmRpc2tOdW1iZXJTdGFydCA9IGV4dHJhUmVhZGVyLnJlYWRJbnQoNCk7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIC8qKlxuICAgICAqIFJlYWQgdGhlIGNlbnRyYWwgcGFydCBvZiBhIHppcCBmaWxlIGFuZCBhZGQgdGhlIGluZm8gaW4gdGhpcyBvYmplY3QuXG4gICAgICogQHBhcmFtIHtEYXRhUmVhZGVyfSByZWFkZXIgdGhlIHJlYWRlciB0byB1c2UuXG4gICAgICovXG4gICAgcmVhZEV4dHJhRmllbGRzOiBmdW5jdGlvbihyZWFkZXIpIHtcbiAgICAgICAgdmFyIGVuZCA9IHJlYWRlci5pbmRleCArIHRoaXMuZXh0cmFGaWVsZHNMZW5ndGgsXG4gICAgICAgICAgICBleHRyYUZpZWxkSWQsXG4gICAgICAgICAgICBleHRyYUZpZWxkTGVuZ3RoLFxuICAgICAgICAgICAgZXh0cmFGaWVsZFZhbHVlO1xuXG4gICAgICAgIGlmICghdGhpcy5leHRyYUZpZWxkcykge1xuICAgICAgICAgICAgdGhpcy5leHRyYUZpZWxkcyA9IHt9O1xuICAgICAgICB9XG5cbiAgICAgICAgd2hpbGUgKHJlYWRlci5pbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgZXh0cmFGaWVsZElkID0gcmVhZGVyLnJlYWRJbnQoMik7XG4gICAgICAgICAgICBleHRyYUZpZWxkTGVuZ3RoID0gcmVhZGVyLnJlYWRJbnQoMik7XG4gICAgICAgICAgICBleHRyYUZpZWxkVmFsdWUgPSByZWFkZXIucmVhZERhdGEoZXh0cmFGaWVsZExlbmd0aCk7XG5cbiAgICAgICAgICAgIHRoaXMuZXh0cmFGaWVsZHNbZXh0cmFGaWVsZElkXSA9IHtcbiAgICAgICAgICAgICAgICBpZDogZXh0cmFGaWVsZElkLFxuICAgICAgICAgICAgICAgIGxlbmd0aDogZXh0cmFGaWVsZExlbmd0aCxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZXh0cmFGaWVsZFZhbHVlXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfSxcbiAgICAvKipcbiAgICAgKiBBcHBseSBhbiBVVEY4IHRyYW5zZm9ybWF0aW9uIGlmIG5lZWRlZC5cbiAgICAgKi9cbiAgICBoYW5kbGVVVEY4OiBmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIGRlY29kZVBhcmFtVHlwZSA9IHN1cHBvcnQudWludDhhcnJheSA/IFwidWludDhhcnJheVwiIDogXCJhcnJheVwiO1xuICAgICAgICBpZiAodGhpcy51c2VVVEY4KCkpIHtcbiAgICAgICAgICAgIHRoaXMuZmlsZU5hbWVTdHIgPSB1dGY4LnV0ZjhkZWNvZGUodGhpcy5maWxlTmFtZSk7XG4gICAgICAgICAgICB0aGlzLmZpbGVDb21tZW50U3RyID0gdXRmOC51dGY4ZGVjb2RlKHRoaXMuZmlsZUNvbW1lbnQpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIHVwYXRoID0gdGhpcy5maW5kRXh0cmFGaWVsZFVuaWNvZGVQYXR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Db21wcmVzc2VkT2JqZWN0ICYmXG4gICAgICAgICAgICB0aGlzLl9kYXRhLmNvbXByZXNzaW9uLm1hZ2ljID09PSBjb21wcmVzc2lvbi5tYWdpY1xuICAgICAgICApIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kYXRhLmdldENvbXByZXNzZWRXb3JrZXIoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSB0aGlzLl9kZWNvbXByZXNzV29ya2VyKCk7XG4gICAgICAgICAgICBpZighdGhpcy5fZGF0YUJpbmFyeSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHJlc3VsdC5waXBlKG5ldyB1dGY4LlV0ZjhFbmNvZGVXb3JrZXIoKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gQ29tcHJlc3NlZE9iamVjdC5jcmVhdGVXb3JrZXJGcm9tKHJlc3VsdCwgY29tcHJlc3Npb24sIGNvbXByZXNzaW9uT3B0aW9ucyk7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIC8qKlxuICAgICAqIFJldHVybiBhIHdvcmtlciBmb3IgdGhlIGRlY29tcHJlc3NlZCBjb250ZW50LlxuICAgICAqIEBwcml2YXRlXG4gICAgICogQHJldHVybiBXb3JrZXIgdGhlIHdvcmtlci5cbiAgICAgKi9cbiAgICBfZGVjb21wcmVzc1dvcmtlciA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKHRoaXMuX2RhdGEgaW5zdGFuY2VvZiBDb21wcmVzc2VkT2JqZWN0KSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fZGF0YS5nZXRDb250ZW50V29ya2VyKCk7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5fZGF0YSBpbnN0YW5jZW9mIEdlbmVyaWNXb3JrZXIpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kYXRhO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAg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1xuICAgICAgICBpZiAodHlwZW9mIG1ldGhvZC5iaW5kID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICByZXR1cm4gbWV0aG9kLmJpbmQob2JqKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEZ1bmN0aW9uLnByb3RvdHlwZS5iaW5kLmNhbGwobWV0aG9kLCBvYmopO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIC8vIE1pc3NpbmcgYmluZCBzaGltIG9yIElFOCArIE1vZGVybml6ciwgZmFsbGJhY2sgdG8gd3JhcHBpbmdcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGdW5jdGlvbi5wcm90b3R5cGUuYXBwbHkuYXBwbHkobWV0aG9kLCBbb2JqLCBhcmd1bWVudHNdKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gVHJhY2UoKSBkb2Vzbid0IHByaW50IHRoZSBtZXNzYWdlIGluIElFLCBzbyBmb3IgdGhhdCBjYXNlIHdlIG5lZWQgdG8gd3JhcCBpdFxuICAgIGZ1bmN0aW9uIHRyYWNlRm9ySUUoKSB7XG4gICAgICAgIGlmIChjb25zb2xlLmxvZykge1xuICAgICAgICAgICAgaWYgKGNvbnNvbGUubG9nLmFwcGx5KSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2cuYXBwbHkoY29uc29sZSwgYXJndW1lbnRzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gSW4gb2xkIElFLCBuYXRpdmUgY29uc29sZSBtZXRob2RzIHRoZW1zZWx2ZXMgZG9uJ3QgaGF2ZSBhcHBseSgpLlxuICAgICAgICAgICAgICAgIEZ1bmN0aW9uLnByb3Rv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31cblxuICAgICAgICAgIC8vIEZhbGxiYWNrIHRvIGNvb2tpZXMgaWYgbG9jYWwgc3RvcmFnZSBnaXZlcyB1cyBub3RoaW5nXG4gICAgICAgICAgaWYgKHR5cGVvZiBzdG9yZWRMZXZlbCA9PT0gdW5kZWZpbmVkVHlwZSkge1xuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgdmFyIGNvb2tpZSA9IHdpbmRvdy5kb2N1bWVudC5jb29raWU7XG4gICAgICAgICAgICAgICAgICB2YXIgbG9jYXRpb24gPSBjb29raWUuaW5kZXhPZihcbiAgICAgICAgICAgICAgICAgICAgICBlbmNvZGVVUklDb21wb25lbnQoc3RvcmFnZUtleSkgKyBcIj1cIik7XG4gICAgICAgICAgICAgICAgICBpZiAobG9jYXRpb24gIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgc3RvcmVkTGV2ZWwgPSAvXihbXjtdKykvLmV4ZWMoY29va2llLnNsaWNlKGxvY2F0aW9uKSlbMV07XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0gY2F0Y2ggKGlnbm9yZSkge31cbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyBJZiB0aGUgc3RvcmVkIGxldmVsIGlzIG5vdCB2YWxpZCwgdHJlYXQgaXQgYXMgaWYgbm90aGluZyB3YXMgc3RvcmVkLlxuICAgICAgICAgIGlmIChzZWxmLmxldmVsc1tzdG9yZWRMZXZlbF0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICBzdG9yZWRMZXZlbCA9IHVuZGVmaW5lZDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gc3RvcmVkTGV2ZWw7XG4gICAgICB9XG5cbiAgICAgIC8qXG4gICAgICAgKlxuICAgICAgICogUHVibGljIGxvZ2dlciBBUEkgLSBzZWUgaHR0cHM6Ly9naXRodWIuY29tL3BpbXRlcnJ5L2xvZ2xldmVsIGZvciBkZXRhaWxzXG4gICAg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mLCBsZXZlbCwgbmFtZSk7XG4gICAgICAgICAgICAgIGlmICh0eXBlb2YgY29uc29sZSA9PT0gdW5kZWZpbmVkVHlwZSAmJiBsZXZlbCA8IHNlbGYubGV2ZWxzLlNJTEVOVCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiTm8gY29uc29sZSBhdmFpbGFibGUgZm9yIGxvZ2dpbmdcIjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRocm93IFwibG9nLnNldExldmVsKCkgY2FsbGVkIHdpdGggaW52YWxpZCBsZXZlbDogXCIgKyBsZXZlbDtcbiAgICAgICAgICB9XG4gICAgICB9O1xuXG4gICAgICBzZWxmLnNldERlZmF1bHRMZXZlbCA9IGZ1bmN0aW9uIChsZXZlbCkge1xuICAgICAgICAgIGlmICghZ2V0UGVyc2lzdGVkTGV2ZWwoKSkge1xuICAgICAgICAgICAgICBzZWxmLnNldExldmVsKGxldmVsLCBmYWxzZSk7XG4gICAgICAgICAgfVxuICAgICAgfTtcblxuICAgICAgc2VsZi5lbmFibGVBbGwgPSBmdW5jdGlvbihwZXJzaXN0KSB7XG4gICAgICAgICAgc2VsZi5zZXRMZXZlbChzZWxmLmxldmVscy5UUkFDRSwgcGVyc2lzdCk7XG4gICAgICB9O1xuXG4gICAgICBzZWxmLmRpc2FibGVBbGwgPSBmdW5jdGlvbihwZXJzaXN0KSB7XG4gICAgICAgICAgc2VsZi5zZXRMZXZlbChzZWxmLmxldmVscy5TSUxFTlQsIHBlcnNpc3QpO1xuICAgICAgfTtcblxuICAgICAgLy8gSW5pdGlhbGl6ZSB3aXRoIHRoZSByaWdodCBsZXZlbFxuICAgICAgdmFyIGluaXRpYWxMZXZlbCA9IGdldFBlcnNpc3RlZExldmVsKCk7XG4gICAgICBpZiAoaW5pdGlhbExldmVsID09IG51bGwpIHtcbiAgICAgICAgICBpbml0aWFsTGV2ZWwgPSBkZWZhdWx0TGV2ZWwgPT0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WlyZSgnLi91dGlscy9jb21tb24nKTtcbnZhciBzdHJpbmdzICAgICAgPSByZXF1aXJlKCcuL3V0aWxzL3N0cmluZ3MnKTtcbnZhciBtc2cgICAgICAgICAgPSByZXF1aXJlKCcuL3psaWIvbWVzc2FnZXMnKTtcbnZhciBaU3RyZWFtICAgICAgPSByZXF1aXJlKCcuL3psaWIvenN0cmVhbScpO1xuXG52YXIgdG9TdHJpbmcgPSBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nO1xuXG4vKiBQdWJsaWMgY29uc3RhbnRzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qL1xuLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki9cblxudmFyIFpfTk9fRkxVU0ggICAgICA9IDA7XG52YXIgWl9GSU5JU0ggICAgICAgID0gNDtcblxudmFyIFpfT0sgICAgICAgICAgICA9IDA7XG52YXIgWl9TVFJFQU1fRU5EICAgID0gMTtcbnZhciBaX1NZTkNfRkxVU0ggICAgPSAyO1xuXG52YXIgWl9ERUZBVUxUX0NPTVBSRVNTSU9OID0gLTE7XG5cbnZhciBaX0RFRkFVTFRfU1RSQVRFR1kgICAgPSAwO1xuXG52YXIgWl9ERUZMQVRFRCAgPSA4O1xuXG4vKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qL1xuXG5cbi8qKlxuICogY2xhc3MgRGVmbGF0ZVxuICpcbiAqIEdlbmVyaWMgSlMtc3R5bGUgd3JhcHBlciBmb3IgemxpYiBjYWxscy4gSWYgeW91IGRvbid0IG5lZWRcbiAqIHN0cmVhbWluZyBiZWhhdmlvdXIgLSB1c2UgbW9yZSBzaW1wbGUgZnVuY3Rpb25zOiBbW2RlZmxhdGVdXSxcbiAqIFtbZGVmbGF0ZVJ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iAgICAgICAtNSxcbiAgLy9aX1ZFUlNJT05fRVJST1I6IC02LFxuXG4gIC8qIGNvbXByZXNzaW9uIGxldmVscyAqL1xuICBaX05PX0NPTVBSRVNTSU9OOiAgICAgICAgIDAsXG4gIFpfQkVTVF9TUEVFRDogICAgICAgICAgICAgMSxcbiAgWl9CRVNUX0NPTVBSRVNTSU9OOiAgICAgICA5LFxuICBaX0RFRkFVTFRfQ09NUFJFU1NJT046ICAgLTEsXG5cblxuICBaX0ZJTFRFUkVEOiAgICAgICAgICAgICAgIDEsXG4gIFpfSFVGRk1BTl9PTkxZOiAgICAgICAgICAgMixcbiAgWl9STEU6ICAgICAgICAgICAgICAgICAgICAzLFxuICBaX0ZJWEVEOiAgICAgICAgICAgICAgICAgIDQsXG4gIFpfREVGQVVMVF9TVFJBVEVHWTogICAgICAgMCxcblxuICAvKiBQb3NzaWJsZSB2YWx1ZXMgb2YgdGhlIGRhdGFfdHlwZSBmaWVsZCAodGhvdWdoIHNlZSBpbmZsYXRlKCkpICovXG4gIFpfQklOQVJZOiAgICAgICAgICAgICAgICAgMCxcbiAgWl9URVhUOiAgICAgICAgICAgICAgICAgICAxLFxuICAvL1pfQVNDSUk6ICAgICAgICAgICAgICAgIDEsIC8vID0gWl9URVhUIChkZXByZWNhdGVkKVxuICBaX1VOS05PV046ICAgICAgICAgICAgICAgIDIsXG5cbiAgLyogVGhlIGRlZmxhdGUgY29tcHJlc3Npb24gbWV0aG9kICovXG4gIFpfREVGTEFURUQ6ICAgICAgICAgICAgICAgOFxuICAvL1pfTlVMTDogICAgICAgICAgICAgICAgIG51bGwgLy8gVXNlIC0xIG9yIG51bGwgaW5saW5lLCBkZXBlbmRpbmcgb24gdmFyIHR5cGVcbn07XG4iLCIndXNlIHN0cmljdCc7XG5cbi8vIE5vdGU6IHdlIGNhbid0IGdldCBzaWduaWZpY2FudCBzcGVlZCBib29zdCBoZXJlLlxuLy8gU28gd3JpdGUgY29kZSB0byBtaW5pbWl6ZSBzaXplIC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gX3dpblsrK3NjYW5dICYmIHByZXYgPT09IF93aW5bKytzY2FuXSAmJiBwcmV2ID09PSBfd2luWysrc2Nhbl0pIHtcbiAgICAgICAgc3RyZW5kID0gcy5zdHJzdGFydCArIE1BWF9NQVRDSDtcbiAgICAgICAgZG8ge1xuICAgICAgICAgIC8qanNoaW50IG5vZW1wdHk6ZmFsc2UqL1xuICAgICAgICB9IHdoaWxlIChwcmV2ID09PSBfd2luWysrc2Nhbl0gJiYgcHJldiA9PT0gX3dpblsrK3NjYW5dICYmXG4gICAgICAgICAgICAgICAgIHByZXYgPT09IF93aW5bKytzY2FuXSAmJiBwcmV2ID09PSBfd2luWysrc2Nhbl0gJiZcbiAgICAgICAgICAgICAgICAgcHJldiA9PT0gX3dpblsrK3NjYW5dICYmIHByZXYgPT09IF93aW5bKytzY2FuXSAmJlxuICAgICAgICAgICAgICAgICBwcmV2ID09PSBfd2luWysrc2Nhbl0gJiYgcHJldiA9PT0gX3dpblsrK3NjYW5dICYmXG4gICAgICAgICAgICAgICAgIHNjYW4gPCBzdHJlbmQpO1xuICAgICAgICBzLm1hdGNoX2xlbmd0aCA9IE1BWF9NQVRDSCAtIChzdHJlbmQgLSBzY2FuKTtcbiAgICAgICAgaWYgKHMubWF0Y2hfbGVuZ3RoID4gcy5sb29rYWhlYWQpIHtcbiAgICAgICAgICBzLm1hdGNoX2xlbmd0aCA9IHMubG9va2FoZWFkO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICAvL0Fzc2VydChzY2FuIDw9IHMtPndpbmRvdysodUludCkocy0+d2luZG93X3NpemUtMSksIFwid2lsZCBzY2FuXCIpO1xuICAgIH1cblxuICAgIC8qIEVtaXQgbWF0Y2ggaWYgaGF2ZSBydW4gb2YgTUlOX01BVENIIG9yIGxvbmdlciwgZWxzZSBlbWl0IGxpdGVyYWwgKi9cbiAgICBpZiAocy5tYXRjaF9sZW5ndGggPj0gTUlOX01BVENIKSB7XG4gICAgICAvL2NoZWNrX21hdGNoKHMsIH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3RyYXRlZ3kgPj0gWl9IVUZGTUFOX09OTFkgfHwgcy5sZXZlbCA8IDIgP1xuICAgICAgICAgICAgICAgICAgICAgNCA6IDApKTtcbiAgICAgICAgcHV0X2J5dGUocywgT1NfQ09ERSk7XG4gICAgICAgIHMuc3RhdHVzID0gQlVTWV9TVEFURTtcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBwdXRfYnl0ZShzLCAocy5nemhlYWQudGV4dCA/IDEgOiAwKSArXG4gICAgICAgICAgICAgICAgICAgIChzLmd6aGVhZC5oY3JjID8gMiA6IDApICtcbiAgICAgICAgICAgICAgICAgICAgKCFzLmd6aGVhZC5leHRyYSA/IDAgOiA0KSArXG4gICAgICAgICAgICAgICAgICAgICghcy5nemhlYWQubmFtZSA/IDAgOiA4KSArXG4gICAgICAgICAgICAgICAgICAgICghcy5nemhlYWQuY29tbWVudCA/IDAgOiAxNilcbiAgICAgICAgKTtcbiAgICAgICAgcHV0X2J5dGUocywgcy5nemhlYWQudGltZSAmIDB4ZmYpO1xuICAgICAgICBwdXRfYnl0ZShzLCAocy5nemhlYWQudGltZSA+PiA4KSAmIDB4ZmYpO1xuICAgICAgICBwdXRfYnl0ZShzLCAocy5nemhlYWQudGltZSA+PiAxNikgJiAweGZmKTtcbiAgICAgICAgcHV0X2J5dGUocywgKHMuZ3poZWFkLnRpbWUgPj4gMjQpICYgMHhmZik7XG4gICAgICAgIHB1dF9ieXRlKHMsIHMubGV2ZWwgPT09IDkgPyAyIDpcbiAgICAgICAgICAgICAgICAgICAgKHMuc3RyYXRlZ3kgPj0gWl9IVUZGTUFOX09OTFkgfHwgcy5sZXZlbCA8IDIgP1xuICAgICAgICAgICAgICAgICAgICAgNCA6IDApKTtcbiAgICAgICAgcHV0X2J5dGUocywgcy5nemhlYWQub3MgJiAweGZmKTtcbiAgICAgICAgaWYgKHMuZ3poZWFkLmV4dHJhICYmIHMuZ3poZWFkLmV4dHJhLmxlbmd0aCkge1xuICAgICAgICAgIHB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aW5kb3cgKi9cbiAgdmFyIHduZXh0OyAgICAgICAgICAgICAgICAgIC8qIHdpbmRvdyB3cml0ZSBpbmRleCAqL1xuICAvLyBVc2UgYHNfd2luZG93YCBpbnN0ZWFkIGB3aW5kb3dgLCBhdm9pZCBjb25mbGljdCB3aXRoIGluc3RydW1lbnRhdGlvbiB0b29sc1xuICB2YXIgc193aW5kb3c7ICAgICAgICAgICAgICAgLyogYWxsb2NhdGVkIHNsaWRpbmcgd2luZG93LCBpZiB3c2l6ZSAhPSAwICovXG4gIHZhciBob2xkOyAgICAgICAgICAgICAgICAgICAvKiBsb2NhbCBzdHJtLmhvbGQgKi9cbiAgdmFyIGJpdHM7ICAgICAgICAgICAgICAgICAgIC8qIGxvY2FsIHN0cm0uYml0cyAqL1xuICB2YXIgbGNvZGU7ICAgICAgICAgICAgICAgICAgLyogbG9jYWwgc3RybS5sZW5jb2RlICovXG4gIHZhciBkY29kZTsgICAgICAgICAgICAgICAgICAvKiBsb2NhbCBzdHJtLmRpc3Rjb2RlICovXG4gIHZhciBsbWFzazsgICAgICAgICAgICAgICAgICAvKiBtYXNrIGZvciBmaXJzdCBsZXZlbCBvZiBsZW5ndGggY29kZXMgKi9cbiAgdmFyIGRtYXNrOyAgICAgICAgICAgICAgICAgIC8qIG1hc2sgZm9yIGZpcnN0IGxldmVsIG9mIGRpc3RhbmNlIGNvZGVzICovXG4gIHZhciBoZXJlOyAgICAgICAgICAgICAgICAgICAvKiByZXRyaWV2ZWQgdGFibGUgZW50cnkgKi9cbiAgdmFyIG9wOyAgICAgICAgICAgICAgICAgICAgIC8qIGNvZGUgYml0cywgb3BlcmF0aW9uLCBleHRyYSBiaXRzLCBvciAqL1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogIHdpbmRvdyBwb3NpdGlvbiwgd2luZG93IGJ5dGVzIHRvIGNvcHkgKi9cbiAgdmFyIGxlbjsgICAgICAgICAgICAgICAgICAgIC8qIG1hdGNoIGxlbmd0aCwgdW51c2V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KG9wICYgMTYpIHsgICAgICAgICAgICAgICAgICAgICAvKiBsZW5ndGggYmFzZSAqL1xuICAgICAgICBsZW4gPSBoZXJlICYgMHhmZmZmLypoZXJlLnZhbCovO1xuICAgICAgICBvcCAmPSAxNTsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgZXh0cmEgYml0cyAqL1xuICAgICAgICBpZiAob3ApIHtcbiAgICAgICAgICBpZiAoYml0cyA8IG9wKSB7XG4gICAgICAgICAgICBob2xkICs9IGlucHV0W19pbisrXSA8PCBiaXRzO1xuICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgIH1cbiAgICAgICAgICBsZW4gKz0gaG9sZCAmICgoMSA8PCBvcCkgLSAxKTtcbiAgICAgICAgICBob2xkID4+Pj0gb3A7XG4gICAgICAgICAgYml0cyAtPSBvcDtcbiAgICAgICAgfVxuICAgICAgICAvL1RyYWNldnYoKHN0ZGVyciwgXCJpbmZsYXRlOiAgICAgICAgIGxlbmd0aCAldVxcblwiLCBsZW4pKTtcbiAgICAgICAgaWYgKGJpdHMgPCAxNSkge1xuICAgICAgICAgIGhvbGQgKz0gaW5wdXRbX2luKytdIDw8IGJpdHM7XG4gICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgIGhvbGQgKz0gaW5wdXRbX2luKytdIDw8IGJpdHM7XG4gICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICB9XG4gICAgICAgIGhlcmUgPSBkY29kZVtob2xkICYgZG1hc2tdO1xuXG4gICAgICAgIGRvZGlzdDpcbiAgICAgICAgZm9yICg7OykgeyAvLyBnb3RvIGVtdWxhdGlvblxuICAgICAgICAgIG9wID0gaGVyZSA+Pj4gMjQvKmhlcmUuYml0cyovO1xuICAgICAgICAgIGhvbGQgPj4+PSBvcDtcbiAgICAgICAgICBiaXRzIC09IG9wO1xuICAgICAgICAgIG9wID0gKGhlcmUgPj4+IDE2KSAmIDB4ZmYvKmhlcmUub3AqLztcblxuICAgICAgICAgIGlmIChvcCAmIDE2KSB7ICAgICAgICAgICAgICAgICAgICAgIC8qIGRpc3RhbmNlIGJhc2UgKi9cbiAgICAgICAgICAgIGRpc3QgPSBoZXJlICYgMHhmZmZmLypoZXJlLnZhbCovO1xuICAgICAgICAgICAgb3AgJj0gMTU7ICAgICAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgZXh0cmEgYml0cyAqL1xuICAgICAgICAgICAgaWYgKGJpdHMgPCBvcCkge1xuICAgICAgICAgICAgICBob2xkICs9IGlucHV0W19pbisrXSA8PCBiaXRzO1xuICAgICAgICAgICAgICBiaXRzICs9IDg7XG4gICAgICAgICAgICAgIGlmIChiaXRzIDwgb3ApIHtcbiAgICAgICAgICAgICAgICBob2xkICs9IGlucHV0W19pbisrXSA8PCBiaXRzO1xuICAgICAgICAgICAgICAgIGJpdHMgKz0gODtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGlzdCArPSBob2xkICYgKCgxIDw8IG9wKSAtIDEpO1xuLy8jaWZkZWYgSU5GTEFURV9TVFJJQ1RcbiAgICAgICAgICAgIGlmIChkaXN0ID4gZG1heCkge1xuICAgICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGRpc3RhbmNlIHRvbyBmYXIgYmFjayc7XG4gICAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7XG4gICAgICAgICAgICAgIGJyZWFrIHRvcDtcbiAgICAgICAgICAgIH1cbi8vI2VuZGlmXG4gICAgICAgICAgICBob2xkID4+Pj0gb3A7XG4gICAgICAgICAgICBiaXRzIC09IG9wO1xuICAgICAgICAgICAgLy9UcmFjZXZ2KChzdGRlcnIsIFwiaW5mbGF0ZTogICAgICAgICBkaXN0YW5jZSAldVxcblwiLCBkaXN0KSk7XG4gICAgICAgICAgICBvcCA9IF9vdXQgLSBiZWc7ICAgICAgICAgICAgICAgIC8qIG1heCBkaXN0YW5jZSBpbiBvdXRwdXQgKi9cbiAgICAgICAgICAgIGlmIChkaXN0ID4gb3ApIHsgICAgICAgICAgICAgICAgLyogc2VlIGlmIGNvcHkgZnJvbSB3aW5kb3cgKi9cbiAgICAgICAgICAgICAgb3AgPSBkaXN0IC0gb3A7ICAgICAgICAgICAgICAgLyogZGlzdGFuY2UgYmFjayBpbiB3aW5kb3cgKi9cbiAgICAgICAgICAgICAgaWYgKG9wID4gd2hhdmUpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RhdGUuc2FuZSkge1xuICAgICAgICAgICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBkaXN0YW5jZSB0b28gZmFyIGJhY2snO1xuICAgICAgICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRDtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIHRvcDtcbiAgICAgICAgICAgICAgICB9XG5cbi8vICghKSBUaGlzIGJsb2NrIGlzIGRpc2FibGVkIGluIHpsaWIgZGVmYXVsdHMsXG4vLyBkb24ndCBlbmFibGUgaXQgZm9yIGJpbmFyeSBjb21wYXRpYmlsaXR5XG4vLyNpZmRlZiBJTkZMQVRFX0FMTE9XX0lOVkFMSURfRElTVEFOQ0VfVE9PRkFSX0FSUlJcbi8vICAgICAgICAgICAgICAgIGlmIChsZW4gPD0gb3AgLSB3aGF2ZSkge1xuLy8gICAgICAgICAgICAgICAgICBkbyB7XG4vLyAgICAgICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSAwO1xuLy8gICAgICAgICAgICAgICAgICB9IHdoaWxlICgtLWxlbik7XG4vLyAgICAgICAgICAgICAgICAgIGNvbnRpbnVlIHRvcDtcbi8vICAgICAgICAgICAgICAgIH1cbi8vICAgICAgICAgICAgICAgIGxlbiAtPSBvcCAtIHdoYXZlO1xuLy8gICAgICAgICAgICAgICAgZG8ge1xuLy8gICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IDA7XG4vLyAgICAgICAgICAgICAgICB9IHdoaWxlICgtLW9wID4gd2hhdmUpO1xuLy8gICAgICAgICAgICAgICAgaWYgKG9wID09PSAwKSB7XG4vLyAgICAgICAgICAgICAgICAgIGZyb20gPSBfb3V0IC0gZGlzdDtcbi8vICAgICAgICAgICAgICAgICAgZG8ge1xuLy8gICAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gb3V0cHV0W2Zyb20rK107XG4vLyAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKC0tbGVuKTtcbi8vICAgICAgICAgICAgICAgICAgY29udGludWUgdG9wO1xuLy8gICAgICAgICAgICAgICAgfVxuLy8jZW5kaWZcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBmcm9tID0gMDsgLy8gd2luZG93IGluZGV4XG4gICAgICAgICAgICAgIGZyb21fc291cmNlID0gc193aW5kb3c7XG4gICAgICAgICAgICAgIGlmICh3bmV4dCA9PT0gMCkgeyAgICAgICAgICAgLyogdmVyeSBjb21tb24gY2FzZSAqL1xuICAgICAgICAgICAgICAgIGZyb20gKz0gd3NpemUgLSBvcDtcbiAgICAgICAgICAgICAgICBpZiAob3AgPCBsZW4pIHsgICAgICAgICAvKiBzb21lIGZyb20gd2luZG93ICovXG4gICAgICAgICAgICAgICAgICBsZW4gLT0gb3A7XG4gICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gc193aW5kb3dbZnJvbSsrXTtcbiAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKC0tb3ApO1xuICAgICAgICAgICAgICAgICAgZnJvbSA9IF9vdXQgLSBkaXN0OyAgLyogcmVzdCBmcm9tIG91dHB1dCAqL1xuICAgICAgICAgICAgICAgICAgZnJvbV9zb3VyY2UgPSBvdXRwdXQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGVsc2UgaWYgKHduZXh0IDwgb3ApIHsgICAgICAvKiB3cmFwIGFyb3VuZCB3aW5kb3cgKi9cbiAgICAgICAgICAgICAgICBmcm9tICs9IHdzaXplICsgd25leHQgLSBvcDtcbiAgICAgICAgICAgICAgICBvcCAtPSB3bmV4dDtcbiAgICAgICAgICAgICAgICBpZiAob3AgPCBsZW4pIHsgICAgICAgICAvKiBzb21lIGZyb20gZW5kIG9mIHdpbmRvdyAqL1xuICAgICAgICAgICAgICAgICAgbGVuIC09IG9wO1xuICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IHNfd2luZG93W2Zyb20rK107XG4gICAgICAgICAgICAgICAgICB9IHdoaWxlICgtLW9wKTtcbiAgICAgICAgICAgICAgICAgIGZyb20gPSAwO1xuICAgICAgICAgICAgICAgICAgaWYgKHduZXh0IDwgbGVuKSB7ICAvKiBzb21lIGZyb20gc3RhcnQgb2Ygd2luZG93ICovXG4gICAgICAgICAgICAgICAgICAgIG9wID0gd25leHQ7XG4gICAgICAgICAgICAgICAgICAgIGxlbiAtPSBvcDtcbiAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gc193aW5kb3dbZnJvbSsrXTtcbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoLS1vcCk7XG4gICAgICAgICAgICAgICAgICAgIGZyb20gPSBfb3V0IC0gZGlzdDsgICAgICAvKiByZXN0IGZyb20gb3V0cHV0ICovXG4gICAgICAgICAgICAgICAgICAgIGZyb21fc291cmNlID0gb3V0cHV0O1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBlbHNlIHsgICAgICAgICAgICAgICAgICAgICAgLyogY29udGlndW91cyBpbiB3aW5kb3cgKi9cbiAgICAgICAgICAgICAgICBmcm9tICs9IHduZXh0IC0gb3A7XG4gICAgICAgICAgICAgICAgaWYgKG9wIDwgbGVuKSB7ICAgICAgICAgLyogc29tZSBmcm9tIHdpbmRvdyAqL1xuICAgICAgICAgICAgICAgICAgbGVuIC09IG9wO1xuICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IHNfd2luZG93W2Zyb20rK107XG4gICAgICAgICAgICAgICAgICB9IHdoaWxlICgtLW9wKTtcbiAgICAgICAgICAgICAgICAgIGZyb20gPSBfb3V0IC0gZGlzdDsgIC8qIHJlc3QgZnJvbSBvdXRwdXQgKi9cbiAgICAgICAgICAgICAgICAgIGZyb21fc291cmNlID0gb3V0cHV0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB3aGlsZSAobGVuID4gMikge1xuICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gZnJvbV9zb3VyY2VbZnJvbSsrXTtcbiAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IGZyb21fc291cmNlW2Zyb20rK107XG4gICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSBmcm9tX3NvdXJjZVtmcm9tKytdO1xuICAgICAgICAgICAgICAgIGxlbiAtPSAzO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChsZW4pIHtcbiAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IGZyb21fc291cmNlW2Zyb20rK107XG4gICAgICAgICAgICAgICAgaWYgKGxlbiA+IDEpIHtcbiAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gZnJvbV9zb3VyY2VbZnJvbSsrXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICBmcm9tID0gX291dCAtIGRpc3Q7ICAgICAgICAgIC8qIGNvcHkgZGlyZWN0IGZyb20gb3V0cHV0ICovXG4gICAgICAgICAgICAgIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAvKiBtaW5pbXVtIGxlbmd0aCBpcyB0aHJlZSAqL1xuICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gb3V0cHV0W2Zyb20rK107XG4gICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSBvdXRwdXRbZnJvbSsrXTtcbiAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IG91dHB1dFtmcm9tKytdO1xuICAgICAgICAgICAgICAgIGxlbiAtPSAzO1xuICAgICAgICAgICAgICB9IHdoaWxlIChsZW4gPiAyKTtcbiAgICAgICAgICAgICAgaWYgKGxlbikge1xuICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gb3V0cHV0W2Zyb20rK107XG4gICAgICAgICAgICAgICAgaWYgKGxlbiA+IDEpIHtcbiAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gb3V0cHV0W2Zyb20rK107XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2UgaWYgKChvcCAmIDY0KSA9PT0gMCkgeyAgICAgICAgICAvKiAybmQgbGV2ZWwgZGlzdGFuY2UgY29kZSAqL1xuICAgICAgICAgICAgaGVyZSA9IGRjb2RlWyhoZXJlICYgMHhmZmZmKS8qaGVyZS52YWwqLyArIChob2xkICYgKCgxIDw8IG9wKSAtIDEpKV07XG4gICAgICAgICAgICBjb250aW51ZSBkb2Rpc3Q7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBkaXN0YW5jZSBjb2RlJztcbiAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7XG4gICAgICAgICAgICBicmVhayB0b3A7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7IC8vIG5lZWQgdG8gZW11bGF0ZSBnb3RvIHZpYSBcImNvbnRpbnVlXCJcbiAgICAgICAgfVxuICAgICAgf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09PT09PT09PT09PT09PT09PT09Ki9cbi8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovXG5cblxudmFyICAgIEhFQUQgPSAxOyAgICAgICAvKiBpOiB3YWl0aW5nIGZvciBtYWdpYyBoZWFkZXIgKi9cbnZhciAgICBGTEFHUyA9IDI7ICAgICAgLyogaTogd2FpdGluZyBmb3IgbWV0aG9kIGFuZCBmbGFncyAoZ3ppcCkgKi9cbnZhciAgICBUSU1FID0gMzsgICAgICAgLyogaTogd2FpdGluZyBmb3IgbW9kaWZpY2F0aW9uIHRpbWUgKGd6aXApICovXG52YXIgICAgT1MgPSA0OyAgICAgICAgIC8qIGk6IHdhaXRpbmcgZm9yIGV4dHJhIGZsYWdzIGFuZCBvcGVyYXRpbmcgc3lzdGVtIChnemlwKSAqL1xudmFyICAgIEVYTEVOID0gNTsgICAgICAvKiBpOiB3YWl0aW5nIGZvciBleHRyYSBsZW5ndGggKGd6aXApICovXG52YXIgICAgRVhUUkEgPSA2OyAgICAgIC8qIGk6IHdhaXRpbmcgZm9yIGV4dHJhIGJ5dGVzIChnemlwKSAqL1xudmFyICAgIE5BTUUgPSA3OyAgICAgICAvKiBpOiB3YWl0aW5nIGZvciBlbmQgb2YgZmlsZSBuYW1lIChnemlwKSAqL1xudmFyICAgIENPTU1FTlQgPSA4OyAgICAvKiBpOiB3YWl0aW5nIGZvciBlbmQgb2YgY29tbWVudCAoZ3ppcCkgKi9cbnZhciAgICBIQ1JDID0gOTsgICAgICAgLyogaTogd2FpdGluZyBmb3IgaGVhZGVyIGNyYyAoZ3ppcCkgKi9cbnZhciAgICBESUNUSUQgPSAxMDsgICAgLyogaTogd2FpdGluZyBmb3IgZGljdGlvbmFyeSBjaGVjayB2YWx1ZSAqL1xudmFyICAgIERJQ1QgPSAxMTsgICAgICAvKiB3YWl0aW5nIGZvciBpbmZsYXRlU2V0RGljdGlvbmFyeSgpIGNh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gICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgIGJpdHMgKz0gODtcbiAgICAgICAgfVxuICAgICAgICAvLz09PS8vXG4gICAgICAgIGlmICgoc3RhdGUud3JhcCAmIDIpICYmIGhvbGQgPT09IDB4OGIxZikgeyAgLyogZ3ppcCBoZWFkZXIgKi9cbiAgICAgICAgICBzdGF0ZS5jaGVjayA9IDAvKmNyYzMyKDBMLCBaX05VTEwsIDApKi87XG4gICAgICAgICAgLy89PT0gQ1JDMihzdGF0ZS5jaGVjaywgaG9sZCk7XG4gICAgICAgICAgaGJ1ZlswXSA9IGhvbGQgJiAweGZmO1xuICAgICAgICAgIGhidWZbMV0gPSAoaG9sZCA+Pj4gOCkgJiAweGZmO1xuICAgICAgICAgIHN0YXRlLmNoZWNrID0gY3JjMzIoc3RhdGUuY2hlY2ssIGhidWYsIDIsIDApO1xuICAgICAgICAgIC8vPT09Ly9cblxuICAgICAgICAgIC8vPT09IElOSVRCSVRTKCk7XG4gICAgICAgICAgaG9sZCA9IDA7XG4gICAgICAgICAgYml0cyA9IDA7XG4gICAgICAgICAgLy89PT0vL1xuICAgICAgICAgIHN0YXRlLm1vZGUgPSBGTEFHUztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBzdGF0ZS5mbGFncyA9IDA7ICAgICAgICAgICAvKiBleHBlY3QgemxpYiBoZWFkZXIgKi9cbiAgICAgICAgaWYgKHN0YXRlLmhlYWQpIHtcbiAgICAgICAgICBzdGF0ZS5oZWFkLmRvbmUgPSBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIShzdGF0ZS53cmFwICYgMSkgfHwgICAvKiBjaGVjayBpZiB6bGliIGhlYWRlciBhbGxvd2VkICovXG4gICAgICAgICAgKCgoaG9sZCAmIDB4ZmYpLypCSVRTKDgpKi8gPDwgOCkgKyAoaG9sZCA+PiA4KSkgJSAzMSkge1xuICAgICAgICAgIHN0cm0ubXNnID0gJ2luY29ycmVjdCBoZWFkZXIgY2hlY2snO1xuICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKChob2xkICYgMHgwZikvKkJJVFMoNCkqLyAhPT0gWl9ERUZMQVRFRCkge1xuICAgICAgICAgIHN0cm0ubXNnID0gJ3Vua25vd24gY29tcHJlc3Npb24gbWV0aG9kJztcbiAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIC8vLS0tIERST1BCSVRTKDQpIC0tLS8vXG4gICAgICAgIGhvbGQgPj4+PSA0O1xuICAgICAgICBiaXRzIC09IDQ7XG4gICAgICAgIC8vLS0tLy9cbiAgICAgICAgbGVuID0gKGhvbGQgJiAweDBmKS8qQklUUyg0KSovICsgODtcbiAgICAgICAgaWYgKHN0YXRlLndiaXRzID09PSAwKSB7XG4gICAgICAgICAgc3RhdGUud2JpdHMgPSBsZW47XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAobGVuID4gc3RhdGUud2JpdHMpIHtcbiAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIHdpbmRvdyBzaXplJztcbiAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHN0YXRlLmRtYXggPSAxIDw8IGxlbjtcbiAgICAgICAgLy9UcmFjZXYoKHN0ZGVyciwgXCJpbmZsYXRlOiAgIHpsaWIgaGVhZGVyIG9rXFxuXCIpKTtcbiAgICAgICAgc3RybS5hZGxlciA9IHN0YXRlLmNoZWNrID0gMS8qYWRsZXIzMigwTCwgWl9OVUxMLCAwKSovO1xuICAgICAgICBzdGF0ZS5tb2RlID0gaG9sZCAmIDB4MjAwID8gRElDVElEIDogVFlQRTtcbiAgICAgICAgLy89PT0gSU5JVEJJVFMoKTtcb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xuICAgICAgICAgIGhidWZbMV0gPSAoaG9sZCA+Pj4gOCkgJiAweGZmO1xuICAgICAgICAgIHN0YXRlLmNoZWNrID0gY3JjMzIoc3RhdGUuY2hlY2ssIGhidWYsIDIsIDApO1xuICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgfVxuICAgICAgICAvLz09PSBJTklUQklUUygpO1xuICAgICAgICBob2xkID0gMDtcbiAgICAgICAgYml0cyA9IDA7XG4gICAgICAgIC8vPT09Ly9cbiAgICAgICAgc3RhdGUubW9kZSA9IFRJTUU7XG4gICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAgIGNhc2UgVElNRTpcbiAgICAgICAgLy89PT0gTkVFREJJVFMoMzIpOyAqL1xuICAgICAgICB3aGlsZSAoYml0cyA8IDMyKSB7XG4gICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9XG4gICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgIGJpdHMgKz0gODtcbiAgICAgICAgfVxuICAgICAgICAvLz09PS8vXG4gICAgICAgIGlmIChzdGF0ZS5oZWFkKSB7XG4gICAgICAgICAgc3RhdGUuaGVhZC50aW1lID0gaG9sZDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoc3RhdGUuZmxhZ3MgJiAweDAyMDApIHtcbiAgICAgICAgICAvLz09PSBDUkM0KHN0YXRlLmNoZWNrLCBob2xkKVxuICAgICAgICAgIGhidWZbMF0gPSBob2xkICYgMHhmZjtcbiAgICAgICAgICBoYnVmWzFdID0gKGhvbGQgPj4+IDgpICYgMHhmZjtcbiAgICAgICAgICBoYnVmWzJdID0gKGhvbGQgPj4+IDE2KSAmIDB4ZmY7XG4gICAgICAgICAgaGJ1ZlszXSA9IChob2xkID4+PiAyNCkgJiAweGZmO1xuICAgICAgICAgIHN0YXRlLmNoZWNrID0gY3JjMzIo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xuICAgICAgICBiaXRzID0gMDtcbiAgICAgICAgLy89PT0vL1xuICAgICAgICBzdGF0ZS5tb2RlID0gRVhMRU47XG4gICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAgIGNhc2UgRVhMRU46XG4gICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDQwMCkge1xuICAgICAgICAgIC8vPT09IE5FRURCSVRTKDE2KTsgKi9cbiAgICAgICAgICB3aGlsZSAoYml0cyA8IDE2KSB7XG4gICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH1cbiAgICAgICAgICAgIGhhdmUtLTtcbiAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLz09PS8vXG4gICAgICAgICAgc3RhdGUubGVuZ3RoID0gaG9sZDtcbiAgICAgICAgICBpZiAoc3RhdGUuaGVhZCkge1xuICAgICAgICAgICAgc3RhdGUuaGVhZC5leHRyYV9sZW4gPSBob2xkO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc3RhdGUuZmxhZ3MgJiAweDAyMDApIHtcbiAgICAgICAgICAgIC8vPT09IENSQzIoc3RhdGUuY2hlY2ssIGhvbGQpO1xuICAgICAgICAgICAgaGJ1ZlswXSA9IGhvbGQgJiAweGZmO1xuICAgICAgICAgICAgaGJ1ZlsxXSA9IChob2xkID4+PiA4KSAmIDB4ZmY7XG4gICAgICAgICAgICBzdGF0ZS5jaGVjayA9IGNyYzMyKHN0YXRlLmNoZWNrLCBoYnVmLCAyLCAwKTtcbiAgICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgICB9XG4gICAgICAgICAgLy89PT0gSU5JVEJJVFMoKTtcbiAgICAgICAgICBob2xkID0gMDtcbiAgICAgICAgICBiaXRzID0gMDtcbiAgICAgICAgICAvLz09PS8vXG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoc3RhdGUuaGVhZCkge1xuICAgICAgICAgIHN0YXRlLmhlYWQuZXh0cmEgPSBudWxsLypaX05VTEwqLztcbiAgICAgICAgfVxuICAgICAgICBzdGF0ZS5tb2RlID0gRVhUUkE7XG4gICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAgIGNhc2UgRVhUUkE6XG4gICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDQwMCkge1xuICAgICAgICAgIGNvcHkgPSBzdGF0ZS5sZW5ndGg7XG4gICAgICAgICAgaWYgKGNvcHkgPiBoYXZlKSB7IGNvcHkgPSBoYXZlOyB9XG4gICAgICAgICAgaWYgKGNvcHkpIHtcbiAgICAgICAgICAgIGlmIChzdGF0ZS5oZWFkKSB7XG4gICAgICAgICAgICAgIGxlbiA9IHN0YXRlLmhlYWQuZXh0cmFfbGVuIC0gc3RhdGUubGVuZ3RoO1xuICAgICAgICAgICAgICBpZiAoIXN0YXRlLmhlYWQuZXh0cmEpIHtcbiAgICAgICAgICAgICAgICAvLyBVc2UgdW50eXBlZCBhcnJheSBmb3IgbW9yZSBjb252ZW5pZW50IHByb2Nlc3NpbmcgbGF0ZXJcbiAgICAgICAgICAgICAgICBzdGF0ZS5oZWFkLmV4dHJhID0gbmV3IEFycmF5KHN0YXRlLmhlYWQuZXh0cmFfbGVuKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB1dGlscy5hcnJheVNldChcbiAgICAgICAgICAgICAgICBzdGF0ZS5oZWFkLmV4dHJhLFxuICAgICAgICAgICAgICAgIGlucHV0LFxuICAgICAgICAgICAgICAgIG5leHQsXG4gICAgICAgICAgICAgICAgLy8gZXh0cmEgZmllbGQgaXMgbGltaXRlZCB0byA2NTUzNiBieXRlc1xuICAgICAgICAgICAgICAgIC8vIC0gbm8gbmVlZCBmb3IgYWRkaXRpb25hbCBzaXplIGNoZWNrXG4gICAgICAgICAgICAgICAgY29weSxcbiAgICAgICAgICAgICAgICAvKmxlbiArIGNvcHkgPiBzdGF0ZS5oZWFkLmV4dHJhX21heCAtIGxlbiA/IHN0YXRlLmhlYWQuZXh0cmFfbWF4IDogY29weSwqL1xuICAgICAgICAgICAgICAgIGxlblxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAvL3ptZW1jcHkoc3RhdGUuaGVhZC5leHRyYSArIGxlbiwgbmV4dCxcbiAgICAgICAgICAgICAgLy8gICAgICAgIGxlbiArIGNvcHkgPiBzdGF0ZS5oZWFkLmV4dHJhX21heCA/XG4gICAgICAgICAgICAgIC8vICAgICAgICBzdGF0ZS5oZWFkLmV4dHJhX21heCAtIGxlbiA6IGNvcHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHN0YXRlLmZsYWdzICYgMHgwMjAwKSB7XG4gICAgICAgICAgICAgIHN0YXRlLmNoZWNrID0gY3JjMzIoc3RhdGUuY2hlY2ssIGlucHV0LCBjb3B5LCBuZXh0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGhhdmUgLT0gY29weTtcbiAgICAgICAgICAgIG5leHQgKz0gY29weTtcbiAgICAgICAgICAgIHN0YXRlLmxlbmd0aCAtPSBjb3B5O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc3RhdGUubGVuZ3RoKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICB9XG4gICAgICAgIHN0YXRlLmxlbmd0aCA9IDA7XG4gICAgICAgIHN0YXRlLm1vZGUgPSBOQU1FO1xuICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovXG4gICAgICBjYXNlIE5BTUU6XG4gICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDgwMCkge1xuICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICAgIGNvcHkgPSAwO1xuICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgIC8vIFRPRE86IDIgb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cbiAgICAgICAgICB3aGlsZSAoYml0cyA8IDE2KSB7XG4gICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH1cbiAgICAgICAgICAgIGhhdmUtLTtcbiAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLz09PS8vXG4gICAgICAgICAgaWYgKGhvbGQgIT09IChzdGF0ZS5jaGVjayAmIDB4ZmZmZikpIHtcbiAgICAgICAgICAgIHN0cm0ubXNnID0gJ2hlYWRlciBjcmMgbWlzbWF0Y2gnO1xuICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRDtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLz09PSBJTklUQklUUygpO1xuICAgICAgICAgIGhvbGQgPSAwO1xuICAgICAgICAgIGJpdHMgPSAwO1xuICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgfVxuICAgICAgICBpZiAoc3RhdGUuaGVhZCkge1xuICAgICAgICAgIHN0YXRlLmhlYWQuaGNyYyA9ICgoc3RhdGUuZmxhZ3MgPj4gOSkgJiAxKTtcbiAgICAgICAgICBzdGF0ZS5oZWFkLmRvbmUgPSB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHN0cm0uYWRsZXIgPSBzdGF0ZS5jaGVjayA9IDA7XG4gICAgICAgIHN0YXRlLm1vZGUgPSBUWVBFO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgRElDVElEOlxuICAgICAgICAvLz09PSBORUVEQklUUygzMik7ICovXG4gICAgICAgIHdoaWxlIChiaXRzIDwgMzIpIHtcbiAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH1cbiAgICAgICAgICBoYXZlLS07XG4gICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh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FRZUEVETzpcbiAgICAgICAgaWYgKHN0YXRlLmxhc3QpIHtcbiAgICAgICAgICAvLy0tLSBCWVRFQklUUygpIC0tLS8vXG4gICAgICAgICAgaG9sZCA+Pj49IGJpdHMgJiA3O1xuICAgICAgICAgIGJpdHMgLT0gYml0cyAmIDc7XG4gICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgIHN0YXRlLm1vZGUgPSBDSEVDSztcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICAvLz09PSBORUVEQklUUygzKTsgKi9cbiAgICAgICAgd2hpbGUgKGJpdHMgPCAzKSB7XG4gICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9XG4gICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgIGJpdHMgKz0gODtcbiAgICAgICAgfVxuICAgICAgICAvLz09PS8vXG4gICAgICAgIHN0YXRlLmxhc3QgPSAoaG9sZCAmIDB4MDEpLypCSVRTKDEpKi87XG4gICAgICAgIC8vLS0tIERST1BCSVRTKDEpIC0tLS8vXG4gICAgICAgIGhvbGQgPj4+PSAxO1xuICAgICAgICBiaXRzIC09IDE7XG4gICAgICAgIC8vLS0tLy9cblxuICAgICAgICBzd2l0Y2ggKChob2xkICYgMHgwMykvKkJJVFMoMikqLykge1xuICAgICAgICAgIGNhc2UgMDogICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHN0b3JlZCBibG9jayAqL1xuICAgICAgICAgICAgLy9UcmFjZXYoKHN0ZGVyciwgXCJpbmZsYXRlOiAgICAgc3RvcmVkIGJsb2NrJXNcXG5cIixcbiAgICAgICAgICAgIC8vICAgICAgICBzdGF0ZS5sYXN0ID8gXCIgKGxhc3QpXCIgOiBcIlwiKSk7XG4gICAgICAgICAgICBzdGF0ZS5tb2RlID0gU1RPUkVEO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAxOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZml4ZWQgYmxvY2sgKi9cbiAgICAgICAgICAgIGZpeGVkdGFibGVzKHN0YXRlKTtcbiAgICAgICAgICAgIC8vVHJhY2V2KChzdGRlcnIsIFwiaW5mbGF0ZTogICAgIGZpeGVkIGNvZGVzIGJsb2NrJXNcXG5cIixcbiAgICAgICAgICAgIC8vICAgICAgICBzdGF0ZS5sYXN0ID8gXCIgKGxhc3QpXCIgOiBcIlwiKSk7XG4gICAgICAgICAgICBzdGF0ZS5tb2RlID0gTEVOXzsgICAgICAgICAgICAgLyogZGVjb2RlIGNvZGVzICovXG4gICAgICAgICAgICBpZiAoZmx1c2ggPT09IFpfVFJFRVMpIHtcbiAgICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMoMikgLS0tLy9cbiAgICAgICAgICAgICAgaG9sZCA+Pj49IDI7XG4gICAgICAgICAgICAgIGJpdHMgLT0gMjtcbiAgICAgICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgICAgICBicmVhayBpbmZfbGVhdmU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIDI6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBkeW5hbWljIGJsb2NrICovXG4gICAgICAgICAgICAvL1RyYWNldigoc3RkZXJyLCBcImluZmxhdGU6ICAgICBkeW5hbWljIGNvZGVzIGJsb2NrJXNcXG5cIixcbiAgICAgICAgICAgIC8vICAgICAgICBzdGF0ZS5sYXN0ID8gXCIgKGxhc3QpXCIgOiBcIlwiKSk7XG4gICAgICAgICAgICBzdGF0ZS5tb2RlID0gVEFCTEU7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGJsb2NrIHR5cGUnO1xuICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRDtcbiAgICA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5sZW5iaXRzKSovXG4gICAgICAgICAgICBoZXJlX2JpdHMgPSBoZXJlID4+PiAyNDtcbiAgICAgICAgICAgIGhlcmVfb3AgPSAoaGVyZSA+Pj4gMTYpICYgMHhmZjtcbiAgICAgICAgICAgIGhlcmVfdmFsID0gaGVyZSAmIDB4ZmZmZjtcblxuICAgICAgICAgICAgaWYgKChoZXJlX2JpdHMpIDw9IGJpdHMpIHsgYnJlYWs7IH1cbiAgICAgICAgICAgIC8vLS0tIFBVTExCWVRFKCkgLS0tLy9cbiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICBiaXRzICs9IDg7XG4gICAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChoZXJlX3ZhbCA8IDE2KSB7XG4gICAgICAgICAgICAvLy0tLSBEUk9QQklUUyhoZXJlLmJpdHMpIC0tLS8vXG4gICAgICAgICAgICBob2xkID4+Pj0gaGVyZV9iaXRzO1xuICAgICAgICAgICAgYml0cyAtPSBoZXJlX2JpdHM7XG4gICAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgICBzdGF0ZS5sZW5zW3N0YXRlLmhhdmUrK10gPSBoZXJlX3ZhbDtcbiAgICAgICAgICB9XG4gICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBpZiAoaGVyZV92YWwgPT09IDE2KSB7XG4gICAgICAgICAgICAgIC8vPT09IE5FRURCSVRTKGhlcmUuYml0cyArIDIpO1xuICAgICAgICAgICAgICBuID0gaGVyZV9iaXRzICsgMjtcbiAgICAgICAgICAgICAgd2hpbGUgKGJpdHMgPCBuKSB7XG4gICAgICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9XG4gICAgICAgICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgICAgICAgIGJpdHMgKz0gODtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAvLz09PS8vXG4gICAgICAgICAgICAgIC8vLS0tIERST1BCSVRTKGhlcmUuYml0cykgLS0tLy9cbiAgICAgICAgICAgICAgaG9sZCA+Pj49IGhlcmVfYml0cztcbiAgICAgICAgICAgICAgYml0cyAtPSBoZXJlX2JpdHM7XG4gICAgICAgICAgICAgIC8vLS0tLy9cbiAgICAgICAgICAgICAgaWYgKHN0YXRlLmhhdmUgPT09IDApIHtcbiAgICAgICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGJpdCBsZW5ndGggcmVwZWF0JztcbiAgICAgICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGxlbiA9IHN0YXRlLmxlbnNbc3RhdGUuaGF2ZSAtIDFdO1xuICAgICAgICAgICAgICBjb3B5ID0gMyArIChob2xkICYgMHgwMyk7Ly9CSVRTKDIpO1xuICAgICAgICAgICAgICAvLy0tLSBEUk9QQklUUygyKSAtLS0vL1xuICAgICAgICAgICAgICBob2xkID4+Pj0gMjtcbiAgICAgICAgICAgICAgYml0cyAtPSAyO1xuICAgICAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChoZXJlX3ZhbCA9PT0gMTcpIHtcbiAgICAgICAgICAgICAgLy89PT0gTkVFREJJVFMoaGVyZS5iaXRzICsgMyk7XG4gICAgICAgICAgICAgIG4gPSBoZXJlX2JpdHMgKyAzO1xuICAgICAgICAgICAgICB3aGlsZSAoYml0cyA8IG4pIHtcbiAgICAgICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH1cbiAgICAgICAgICAgICAgICBoYXZlLS07XG4gICAgICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMoaGVyZS5iaXRzKSAtLS0vL1xuICAgICAgICAgICAgICBob2xkID4+Pj0gaGVyZV9iaXRzO1xuICAgICAgICAgICAgICBiaXRzIC09IGhlcmVfYml0cztcbiAgICAgICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgICAgICBsZW4gPSAwO1xuICAgICAgICAgICAgICBjb3B5ID0gMyArIChob2xkICYgMHgwNyk7Ly9CSVRTKDMpO1xuICAgICAgICAgICAgICAvLy0tLSBEUk9QQklUUygzKSAtLS0vL1xuICAgICAgICAgICAgICBob2xkID4+Pj0gMztcbiAgICAgICAgICAgICAgYml0cyAtPSAzO1xuICAgICAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgLy89PT0gTkVFREJJVFMoaGVyZS5iaXRzICsgNyk7XG4gICAgICAgICAgICAgIG4gPSBoZXJlX2JpdHMgKyA3O1xuICAgICAgICAgICAgICB3aGlsZSAoYml0cyA8IG4pIHtcbiAgICAgICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH1cbiAgICAgICAgICAgICAgICBoYXZlLS07XG4gICAgICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMoaGVyZS5iaXRzKSAtLS0vL1xuICAgICAgICAgICAgICBob2xkID4+Pj0gaGVyZV9iaXRzO1xuICAgICAgICAgICAgICBiaXRzIC09IGhlcmVfYml0cztcbiAgICAgICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgICAgICBsZW4gPSAwO1xuICAgICAgICAgICAgICBjb3B5ID0gMTEgKyAoaG9sZCAmIDB4N2YpOy8vQklUUyg3KTtcbiAgICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMoNykgLS0tLy9cbiAgICAgICAgICAgICAgaG9sZCA+Pj49IDc7XG4gICAgICAgICAgICAgIGJpdHMgLT0gNztcbiAgICAgICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHN0YXRlLmhhdmUgKyBjb3B5ID4gc3RhdGUubmxlbiArIHN0YXRlLm5kaXN0KSB7XG4gICAgICAgICAgICAgIHN0cm0ubXNnID0gJ2ludmFsaWQgYml0IGxlbmd0aCByZXBlYXQnO1xuICAgICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHdoaWxlIChjb3B5LS0pIHtcbiAgICAgICAgICAgICAgc3RhdGUubGVuc1tzdGF0ZS5oYXZlKytdID0gbGVuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8qIGhhbmRsZSBlcnJvciBicmVha3MgaW4gd2hpbGUgKi9cbiAgICAgICAgaWYgKHN0YXRlLm1vZGUgPT09IEJBRCkgeyBicmVhazsgfVxuXG4gICAgICAgIC8qIGNoZWNrIGZvciBlbmQtb2YtYmxvY2sgY29kZSAoYmV0dGVyIGhhdmUgb25lKSAqL1xuICAgICAgICBpZiAoc3RhdGUubGVuc1syNTZdID09PSAwKSB7XG4gICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBjb2RlIC0tIG1pc3NpbmcgZW5kLW9mLWJsb2NrJztcbiAgICAgICAgICBzdGF0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gICAgICAgLyogZmFsbHMgdGhyb3VnaCAqL1xuICAgICAgY2FzZSBMRU46XG4gICAgICAgIGlmIChoYXZlID49IDYgJiYgbGVmdCA+PSAyNTgpIHtcbiAgICAgICAgICAvLy0tLSBSRVNUT1JFKCkgLS0tXG4gICAgICAgICAgc3RybS5uZXh0X291dCA9IHB1dDtcbiAgICAgICAgICBzdHJtLmF2YWlsX291dCA9IGxlZnQ7XG4gICAgICAgICAgc3RybS5uZXh0X2luID0gbmV4dDtcbiAgICAgICAgICBzdHJtLmF2YWlsX2luID0gaGF2ZTtcbiAgICAgICAgICBzdGF0ZS5ob2xkID0gaG9sZDtcbiAgICAgICAgICBzdGF0ZS5iaXRzID0gYml0cztcbiAgICAgICAgICAvLy0tLVxuICAgICAgICAgIGluZmxhdGVfZmFzdChzdHJtLCBfb3V0KTtcbiAgICAgICAgICAvLy0tLSBMT0FEKCkgLS0tXG4gICAgICAgICAgcHV0ID0gc3RybS5uZXh0X291dDtcbiAgICAgICAgICBvdXRwdXQgPSBzdHJtLm91dHB1dDtcbiAgICAgICAgICBsZWZ0ID0gc3RybS5hdmFpbF9vdXQ7XG4gICAgICAgICAgbmV4dCA9IHN0cm0ubmV4dF9pbjtcbiAgICAgICAgICBpbnB1dCA9IHN0cm0uaW5wdXQ7XG4gICAgICAgICAgaGF2ZSA9IHN0cm0uYXZhaWxfaW47XG4gICAgICAgICAgaG9sZCA9IHN0YXRlLmhvbGQ7XG4gICAgICAgICAgYml0cyA9IHN0YXRlLmJpdHM7XG4gICAgICAgICAgLy8tLS1cblxuICAgICAgICAgIGlmIChzdGF0ZS5tb2RlID09PSBUWVBFKSB7XG4gICAgICAgICAgICBzdGF0ZS5iYWNrID0gLTE7XG4gICAgICAgICAgfVxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHN0YXRlLmJhY2sgPSAwO1xuICAgICAgICBmb3IgKDs7KSB7XG4gICAgICAgICAgaGVyZSA9IHN0YXRlLmxlbmNvZGVb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X3ZhbCA9IGhlcmUgJiAweGZmZmY7XG5cbiAgICAgICAgICAgIGlmICgobGFzdF9iaXRzICsgaGVyZV9iaXRzKSA8PSBiaXRzKSB7IGJyZWFrOyB9XG4gICAgICAgICAgICAvLy0tLSBQVUxMQllURSgpIC0tLS8vXG4gICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH1cbiAgICAgICAgICAgIGhhdmUtLTtcbiAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgICAgLy8tLS0vL1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLy0tLSBEUk9QQklUUyhsYXN0LmJpdHMpIC0tLS8vXG4gICAgICAgICAgaG9sZCA+Pj49IGxhc3RfYml0cztcbiAgICAgICAgICBiaXRzIC09IGxhc3RfYml0cztcbiAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgc3RhdGUuYmFjayArPSBsYXN0X2JpdHM7XG4gICAgICAgIH1cbiAgICAgICAgLy8tLS0gRFJPUEJJVFMoaGVyZS5iaXRzKSAtLS0vL1xuICAgICAgICBob2xkID4+Pj0gaGVyZV9iaXRzO1xuICAgICAgICBiaXRzIC09IGhlcmVfYml0cztcbiAgICAgICAgLy8tLS0vL1xuICAgICAgICBzdGF0ZS5iYWNrICs9IGhlcmVfYml0cztcbiAgICAgICAgc3RhdGUubGVuZ3RoID0gaGVyZV92YWw7XG4gICAgICAgIGlmIChoZXJlX29wID09PSAwKSB7XG4gICAgICAgICAgLy9UcmFjZXZ2KChzdGRlcnIsIGhlcmUudmFsID49IDB4MjAgJiYgaGVyZS52YWwgPCAweDdmID9cbiAgICAgICAgICAvLyAgICAgICAgXCJpbmZsYXRlOiAgICAgICAgIGxpdGVyYWwgJyVjJ1xcblwiIDpcbiAgICAgICAgICAvLyAgICAgICAgXCJpbmZsYXRlOiAgICAgICAgIGxpdGVyYWwgMHglMDJ4XFxuXCIsIGhlcmUudmFsKSk7XG4gICAgICAgICAgc3RhdGUubW9kZSA9IExJVDtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAoaGVyZV9vcCAmIDMyKSB7XG4gICAgICAgICAgLy9UcmFjZXZ2KChzdGRlcnIsIFwiaW5mbGF0ZTogICAgICAgICBlbmQgb2YgYmxvY2tcXG5cIikpO1xuICAgICAgICAgIHN0YXRlLmJhY2sgPSAtMTtcbiAgICAgICAgICBzdGF0ZS5tb2RlID0gVFlQRTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAoaGVyZV9vcCAmIDY0KSB7XG4gICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBsaXRlcmFsL2xlbmd0aCBjb2RlJztcbiAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHN0YXRlLmV4dHJhID0gaGVyZV9vcCAmIDE1O1xuICAgICAgICBzdGF0ZS5tb2RlID0gTEVORVhUO1xuICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovXG4gICAgICBjYXNlIExFTkVYVDpcbiAgICAgICAgaWYgKHN0YXRlLmV4dHJhKSB7XG4gICAgICAgICAgLy89PT0gTkVFREJJVFMoc3RhdGUuZXh0cmEpO1xuICAgICAgICAgIG4gPSBzdGF0ZS5leHRyYTtcbiAgICAgICAgICB3aGlsZSAoYml0cyA8IG4pIHtcbiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICBiaXRzICs9IDg7XG4gICAgICAgICAgfVxuICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgICBzdGF0ZS5sZW5ndGggKz0gaG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8IGJpdHM7XG4gICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgIC8vLS0tLy9cbiAgICAgICAgfVxuICAgICAgICBpZiAoKGhlcmVfb3AgJiAweGYwKSA9PT0gMCkge1xuICAgICAgICAgIGxhc3RfYml0cyA9IGhlcmVfYml0cztcbiAgICAgICAgICBsYXN0X29wID0gaGVyZV9vcDtcbiAgICAgICAgICBsYXN0X3ZhbCA9IGhlcmVfdmFsO1xuICAgICAgICAgIGZvciAoOzspIHtcbiAgICAgICAgICAgIGhlcmUgPSBzdGF0ZS5kaXN0Y29kZVtsYXN0X3ZhbCArXG4gICAgICAgICAgICAgICAgICAgICgoaG9sZCAmICgoMSA8PCAobGFzdF9iaXRzICsgbGFzdF9vcCkpIC0gMSkpLypCSVRTKGxhc3QuYml0cyArIGxhc3Qub3ApKi8gPj4gbGFzdF9iaXRzKV07XG4gICAgICAgICAgICBoZXJlX2JpdHMgPSBoZXJlID4+PiAyNDtcbiAgICAgICAgICAgIGhlcmVfb3AgPSAoaGVyZSA+Pj4gMTYpICYgMHhmZjtcbiAgICAgICAgICAgIGhlcmVfdmFsID0gaGVyZSAmIDB4ZmZmZjtcblxuICAgICAgICAgICAgaWYgKChsYXN0X2JpdHMgKyBoZXJlX2JpdHMpIDw9IGJpdHMpIHsgYnJlYWs7IH1cbiAgICAgICAgICAgIC8vLS0tIFBVTExCWVRFKCkgLS0tLy9cbiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICBiaXRzICs9IDg7XG4gICAgICAgICAgICAvLy0tLS8vXG4gICAgICAgICAgfVxuICAgICAgICAgIC8vLS0tIERST1BCSVRTKGxhc3QuYml0cykgLS0tLy9cbiAgICAgICAgICBob2xkID4+Pj0gbGFzdF9iaXRzO1xuICAgICAgICAgIGJpdHMgLT0gbGFzdF9iaXRzO1xuICAgICAgICAgIC8vLS0tLy9cbiAgICAgICAgICBzdGF0ZS5iYWNrICs9IGxhc3RfYml0cztcbiAgICAgICAgfVxuICAgICAgICAvLy0tLSBEUk9QQklUUyhoZXJlLmJpdHMpIC0tLS8vXG4gICAgICAgIGhvbGQgPj4+PSBoZXJlX2JpdHM7XG4gICAgICAgIGJpdHMgLT0gaGVyZV9iaXRzO1xuICAgICAgICAvLy0tLS8vXG4gICAgICAgIHN0YXRlLmJhY2sgKz0gaGVyZV9iaXRzO1xuICAgICAgICBpZiAoaGVyZV9vcCAmIDY0KSB7XG4gICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBkaXN0YW5jZSBjb2RlJztcbiAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHN0YXRlLm9mZnNldCA9IGhlcmVfdmFsO1xuICAgICAgICBzdGF0ZS5leHRyYSA9IChoZXJlX29wKSAmIDE1O1xuICAgICAgICBzdGF0ZS5tb2RlID0gRElTVEVYVDtcbiAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqL1xuICAgICAgY2FzZSBESVNURVhUOlxuICAgICAgICBpZiAoc3RhdGUuZXh0cmEpIHtcbiAgICAgICAgICAvLz09PSBORUVEQklUUyhzdGF0ZS5leHRyYSk7XG4gICAgICAgICAgbiA9IHN0YXRlLmV4dHJhO1xuICAgICAgICAgIHdoaWxlIChiaXRzIDwgbikge1xuICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9XG4gICAgICAgICAgICBoYXZlLS07XG4gICAgICAgICAgICBob2xkICs9IGlucHV0W25leHQrK10gPDwgYml0cztcbiAgICAgICAgICAgIGJpdHMgKz0gODtcbiAgICAgICAgICB9XG4gICAgICAgICAgLy89PT0vL1xuICAgICAgICAgIHN0YXRlLm9mZnNldCArPSBob2xkICYgK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SBORUVEQklUUygzMik7XG4gICAgICAgICAgd2hpbGUgKGJpdHMgPCAzMikge1xuICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9XG4gICAgICAgICAgICBoYXZlLS07XG4gICAgICAgICAgICAvLyBVc2UgJ3wnIGluc3RlYWQgb2YgJysnIHRvIG1ha2Ugc3VyZSB0aGF0IHJlc3VsdCBpcyBzaWduZWRcbiAgICAgICAgICAgIGhvbGQgfD0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzO1xuICAgICAgICAgICAgYml0cyArPSA4O1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLz09PS8vXG4gICAgICAgICAgX291dCAtPSBsZWZ0O1xuICAgICAgICAgIHN0cm0udG90YWxfb3V0ICs9IF9vdXQ7XG4gICAgICAgICAgc3RhdGUudG90YWwgKz0gX291dDtcbiAgICAgICAgICBpZiAoX291dCkge1xuICAgICAgICAgICAgc3RybS5hZGxlciA9IHN0YXRlLmNoZWNrID1cbiAgICAgICAgICAgICAgICAvKlVQREFURShzdGF0ZS5jaGVjaywgcHV0IC0gX291dCwgX291dCk7Ki9cbiAgICAgICAgICAgICAgICAoc3RhdGUuZmxhZ3MgPyBjcmMzMihzdGF0ZS5jaGVjaywgb3V0cHV0LCBfb3V0LCBwdXQgLSBfb3V0KSA6IGFkbGVyMzIoc3RhdGUuY2hlY2ssIG91dHB1dCwgX291dCwgcHV0IC0gX291dCkpO1xuXG4gICAgICAgICAgfVxuICAgICAgICAgIF9vdXQgPSBsZWZ0O1xuICAgICAgICAgIC8vIE5COiBjcmMzMiBzdG9yZWQgYXMgc2lnbmVkIDMyLWJpdCBpbnQsIHpzd2FwMzIgcmV0dXJucyBzaWduZWQgdG9vXG4gICAgICAgICAgaWYgKChzdGF0ZS5mbGFncyA/IGhvbGQgOiB6c3dhcDMyKGhvbGQpKSAhPT0gc3RhdGUuY2hlY2spIHtcbiAgICAgICAgICAgIHN0cm0ubXNnID0gJ2luY29ycmVjdCBkYXRhIGNoZWNrJztcbiAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgICAgLy89PT0gSU5JVEJJVFMoKTtcbiAgICAgICAgICBob2xkID0gMDtcbiAgICAgICAgICBiaXRzID0gMDtcbiAgICAgICAgICAvLz09PS8vXG4gICAgICAgICAgLy9UcmFjZXYoKHN0ZGVyciwgXCJpbmZsYXRlOiAgIGNoZWNrIG1hdGNoZXMgdHJhaWxlclxcblwiKSk7XG4gICAgICAgIH1cbiAgICAgICAgc3RhdGUubW9kZSA9IExFTkdUSDtcbiAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqL1xuICAgICAgY2FzZSBMRU5HVEg6XG4gICAgICAgIGlmIChzdGF0ZS53cmFwICYmIHN0YXRlLmZsYWdzKSB7XG4gICAgICAgICAgLy89PT0gTkVFREJJVFMoMzIpO1xuICAgICAgICAgIHdoaWxlIChiaXRzIDwgMzIpIHtcbiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfVxuICAgICAgICAgICAgaGF2ZS0tO1xuICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7XG4gICAgICAgICAgICBiaXRzICs9IDg7XG4gICAgICAgICAgfVxuICAgICAgICAgIC8vPT09Ly9cbiAgICAgICAgICBpZiAoaG9sZCAhPT0gKHN0YXRlLnRvdGFsICYgMHhmZmZmZmZmZikpIHtcbiAgICAgICAgICAgIHN0cm0ubXNnID0gJ2luY29ycmVjdCBsZW5ndGggY2hlY2snO1xuICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRDtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLz09PSBJTklUQklUUygpO1xuICAgICAgICAgIGhvbGQgPSAwO1xuICAgICAgICAgIGJpdHMgPSAwO1xuICAgICAgICA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vKiB0YWJsZSBlbnRyeSBmb3IgZHVwbGljYXRpb24gKi9cblxuICB2YXIgbGVuID0gMDsgICAgICAgICAgICAgICAvKiBhIGNvZGUncyBsZW5ndGggaW4gYml0cyAqL1xuICB2YXIgc3ltID0gMDsgICAgICAgICAgICAgICAvKiBpbmRleCBvZiBjb2RlIHN5bWJvbHMgKi9cbiAgdmFyIG1pbiA9IDAsIG1heCA9IDA7ICAgICAgICAgIC8qIG1pbmltdW0gYW5kIG1heGltdW0gY29kZSBsZW5ndGhzICovXG4gIHZhciByb290ID0gMDsgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBpbmRleCBiaXRzIGZvciByb290IHRhYmxlICovXG4gIHZhciBjdXJyID0gMDsgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBpbmRleCBiaXRzIGZvciBjdXJyZW50IHRhYmxlICovXG4gIHZhciBkcm9wID0gMDsgICAgICAgICAgICAgIC8qIGNvZGUgYml0cyB0byBkcm9wIGZvciBzdWItdGFibGUgKi9cbiAgdmFyIGxlZnQgPSAwOyAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgcHJlZml4IGNvZGVzIGF2YWlsYWJsZSAqL1xuICB2YXIgdXNlZCA9IDA7ICAgICAgICAgICAgICAvKiBjb2RlIGVudHJpZXMgaW4gdGFibGUgdXNlZCAqL1xuICB2YXIgaHVmZiA9IDA7ICAgICAgICAgICAgICAvKiBIdWZmbWFuIGNvZGUgKi9cbiAgdmFyIGluY3I7ICAgICAgICAgICAgICAvKiBmb3IgaW5jcmVtZW50aW5nIGNvZGUsIGluZGV4ICovXG4gIHZhciBmaWxsOyAgICAgICAgICAgICAgLyogaW5kZXggZm9yIHJlcGxpY2F0aW5nIGVudHJpZXMgKi9cbiAgdmFyIGxvdzsgICAgICAgICAgICAgICAvKiBsb3cgYml0cyBmb3IgY3VycmVudCByb290IGVudHJ5ICovXG4gIHZhciBtYXNrOyAgICAgICAgICAgICAgLyogbWFzayBmb3IgbG93IHJvb3QgYml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iZSBwbGFpbmx5IG1hcmtlZCBhcyBzdWNoLCBhbmQgbXVzdCBub3QgYmVcbi8vICAgbWlzcmVwcmVzZW50ZWQgYXMgYmVpbmcgdGhlIG9yaWdpbmFsIHNvZnR3YXJlLlxuLy8gMy4gVGhpcyBub3RpY2UgbWF5IG5vdCBiZSByZW1vdmVkIG9yIGFsdGVyZWQgZnJvbSBhbnkgc291cmNlIGRpc3RyaWJ1dGlvbi5cblxuLyogZXNsaW50LWRpc2FibGUgc3BhY2UtdW5hcnktb3BzICovXG5cbnZhciB1dGlscyA9IHJlcXVpcmUoJy4uL3V0aWxzL2NvbW1vbicpO1xuXG4vKiBQdWJsaWMgY29uc3RhbnRzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qL1xuLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki9cblxuXG4vL3ZhciBaX0ZJTFRFUkVEICAgICAgICAgID0gMTtcbi8vdmFyIFpfSFVGRk1BTl9PTkxZICAgICAgPSAyO1xuLy92YXIgWl9STEUgICAgICAgICAgICAgICA9IDM7XG52YXIgWl9GSVhFRCAgICAgICAgICAgICAgID0gNDtcbi8vdmFyIFpfREVGQVVMVF9TVFJBVEVHWSAgPSAwO1xuXG4vKiBQb3NzaWJsZSB2YWx1ZXMgb2YgdGhlIGRhdGFfdHlwZSBmaWVsZCAodGhvdWdoIHNlZSBpbmZsYXRlKCkpICovXG52YXIgWl9CSU5BUlkgICAgICAgICAgICAgID0gMDtcbnZhciBaX1RFWFQgICAgICAgICAgICAgICAgPSAxO1xuLy92YXIgWl9BU0NJSSAgICAgICAgICAgICA9IDE7IC8vID0gWl9URVhUXG52YXIgWl9VTktOT1dOICAgICAgICAgICAgID0gMjtcblxuLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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dW50W2JpdHNdO1xuICAgIHdoaWxlIChuICE9PSAwKSB7XG4gICAgICBtID0gcy5oZWFwWy0taF07XG4gICAgICBpZiAobSA+IG1heF9jb2RlKSB7IGNvbnRpbnVlOyB9XG4gICAgICBpZiAodHJlZVttICogMiArIDFdLyouTGVuKi8gIT09IGJpdHMpIHtcbiAgICAgICAgLy8gVHJhY2UoKHN0ZGVycixcImNvZGUgJWQgYml0cyAlZC0+JWRcXG5cIiwgbSwgdHJlZVttXS5MZW4sIGJpdHMpKTtcbiAgICAgICAgcy5vcHRfbGVuICs9IChiaXRzIC0gdHJlZVttICogMiArIDFdLyouTGVuKi8pICogdHJlZVttICogMl0vKi5GcmVxKi87XG4gICAgICAgIHRyZWVbbSAqIDIgKyAxXS8qLkxlbiovID0gYml0cztcbiAgICAgIH1cbiAgICAgIG4tLTtcbiAgICB9XG4gIH1cbn1cblxuXG4vKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIEdlbmVyYXRlIHRoZSBjb2RlcyBmb3IgYSBnaXZlbiB0cmVlIGFuZCBiaXQgY291bnRzICh3aGljaCBuZWVkIG5vdCBiZVxuICogb3B0aW1hbCkuXG4gKiBJTiBhc3NlcnRpb246IHRoZSBhcnJheSBibF9jb3VudCBjb250YWlucyB0aGUgYml0IGxlbmd0aCBzdGF0aXN0aWNzIGZvclxuICogdGhlIGdpdmVuIHRyZWUgYW5kIHRoZSBmaWVsZCBsZW4gaXMgc2V0IGZvciBhbGwgdHJlZSBlbGVtZW50cy5cbiAqIE9VVCBhc3NlcnRpb246IHRoZSBmaWVsZCBjb2RlIGlzIHNldCBmb3IgYWxsIHRyZWUgZWxlbWVudHMgb2Ygbm9uXG4gKiAgICAgemVybyBjb2RlIGxlbmd0aC5cbiAqL1xuZnVuY3Rpb24gZ2VuX2NvZGVzKHRyZWUsIG1heF9jb2RlLCBibF9jb3VudClcbi8vICAgIGN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Bjb2RlICovXG5cbiAgdmFyIGNvdW50ID0gMDsgICAgICAgICAgICAgLyogcmVwZWF0IGNvdW50IG9mIHRoZSBjdXJyZW50IGNvZGUgKi9cbiAgdmFyIG1heF9jb3VudCA9IDc7ICAgICAgICAgLyogbWF4IHJlcGVhdCBjb3VudCAqL1xuICB2YXIgbWluX2NvdW50ID0gNDsgICAgICAgICAvKiBtaW4gcmVwZWF0IGNvdW50ICovXG5cbiAgaWYgKG5leHRsZW4gPT09IDApIHtcbiAgICBtYXhfY291bnQgPSAxMzg7XG4gICAgbWluX2NvdW50ID0gMztcbiAgfVxuICB0cmVlWyhtYXhfY29kZSArIDEpICogMiArIDFdLyouTGVuKi8gPSAweGZmZmY7IC8qIGd1YXJkICovXG5cbiAgZm9yIChuID0gMDsgbiA8PSBtYXhfY29kZTsgbisrKSB7XG4gICAgY3VybGVuID0gbmV4dGxlbjtcbiAgICBuZXh0bGVuID0gdHJlZVsobiArIDEpICogMiArIDFdLyouTGVuKi87XG5cbiAgICBpZiAoKytjb3VudCA8IG1heF9jb3VudCAmJiBjdXJsZW4gPT09IG5leHRsZW4pIHtcbiAgICAgIGNvbnRpbnVlO1xuXG4gICAgfSBlbHNlIGlmIChjb3VudCA8IG1pbl9jb3VudCkge1xuICAgICAgcy5ibF90cmVlW2N1cmxlbiAqIDJdLyouRnJlcSovICs9IGNvdW50O1xuXG4gICAgfSBlbHNlIGlmIChjdXJsZW4gIT09IDApIHtcblxuICAgICAgaWYgKGN1cmxlbiAhPT0gcHJldmxlbikgeyBzLmJsX3RyZWVbY3VybGVuICogMl0vKi5GcmVxKi8rKzsgfVxuICAgICAgcy5ibF90cmVlW1JFUF8zXzYgKiAyXS8qLkZyZXEqLysrO1xuXG4gICAgfSBlbHNlIGlmIChjb3VudCA8PSAxMCkge1xuICAgICAgcy5ibF90cmVlW1JFUFpfM18xMCAqIDJdLyouRnJlcSovKys7XG5cbiAgICB9IGVsc2Uge1xuICAgICAgcy5ibF90cmVlW1JFUFpfMTFfMTM4ICogMl0vKi5GcmVxKi8rKztcbiAgICB9XG5cbiAgICBjb3VudCA9IDA7XG4gICAgcHJldmxlbiA9IGN1cmxlbjtcblxuICAgIGlmIChuZXh0bGVuID09PSAwKSB7XG4gICAgICBtYXhfY291bnQgPSAxMzg7XG4gICAgICBtaW5fY291bnQgPSAzO1xuXG4gICAgfSBlbHNlIGlmIChjdXJsZW4gPT09IG5leHRsZW4pIHtcbiAgICAgIG1heF9jb3VudCA9IDY7XG4gICAgICBtaW5fY291bnQgPSAzO1xuXG4gICAgfSBlbHNlIHtcbiAgICAgIG1heF9jb3VudCA9IDc7XG4gICAgICBtaW5fY291bnQgPSA0O1xuICAgIH1cbiAgfVxufVxuXG5cbi8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICogU2VuZCBhIGxpdGVyYWwgb3IgZGlzdGFuY2UgdHJlZSBpbiBjb21wcmVzc2VkIGZvcm0sIHVzaW5nIHRoZSBjb2RlcyBpblxuICogYmxfdHJlZS5cbiAqL1xuZnVuY3Rpb24gc2VuZF90cmVlKHMsIHRyZWUsIG1heF9jb2RlKVxuLy8gICAgZGVmbGF0ZV9zdGF0ZSAqcztcbi8vICAgIGN0X2RhdGEgKnRyZWU7IC8qIHRoZSB0cmVlIHRvIGJlIHNjYW5uZWQgKi9cbi8vICAgIGludCBtYXhfY29kZTsgICAgICAgLyogYW5kIGl0cyBsYXJnZXN0IGNvZGUgb2Ygbm9uIHplcm8gZnJlcXVlbmN5ICovXG57XG4gIHZhciBuOyAgICAgICAgICAgICAgICAgICAgIC8qIGl0ZXJhdGVzIG92ZXIgYWxsIHRyZWUgZWxlbWVudHMgKi9cbiAgdmFyIHByZXZsZW4gPSAtMTsgICAgICAgICAgLyogbGFzdCBlbWl0dGVkIGxlbmd0aCAqL1xuICB2YXIgY3VybGVuOyAgICAgICAgICAgICAgICAvKiBsZW5ndGggb2YgY3VycmVudCBjb2RlICovXG5cbiAgdmFyIG5leHRsZW4gPSB0cmVlWzAgKiAyICsgMV0vKi5MZW4qLzsgLyogbGVuZ3RoIG9mIG5leHQgY29kZSAqL1xuXG4gIHZhciBjb3VudCA9IDA7ICAgICAgICAgICAgIC8qIHJlcGVhdCBjb3VudCBvZiB0aGUgY3VycmVudCBjb2RlICovXG4gIHZhciBtYXhfY291bnQgPSA3OyAgICAgICAgIC8qIG1heCByZXBlYXQgY291bnQgKi9cbiAgdmFyIG1pbl9jb3VudCA9IDQ7ICAgICAgICAgLyogbWluIHJlcGVhdCBjb3VudCAqL1xuXG4gIC8qIHRyZWVbbWF4X2NvZGUrMV0uTGVuID0gLTE7ICovICAvKiBndWFyZCBhbHJlYWR5IHNldCAqL1xuICBpZiAobmV4dGxlbiA9PT0gMCkge1xuICAgIG1heF9jb3VudCA9IDEzODtcbiAgICBtaW5fY291bnQgPSAzO1xuICB9XG5cbiAgZm9yIChuID0gMDsgbiA8PSBtYXhfY29kZTsgbisrKSB7XG4gICAgY3VybGVuID0gbmV4dGxlbjtcbiAgICBuZXh0bGVuID0gdHJlZVsobiArIDEpICogMiArIDFdLyouTGVuKi87XG5cbiAgICBpZiAoKytjb3VudCA8IG1heF9jb3VudCAmJiBjdXJsZW4gPT09IG5leHRsZW4pIHtcbiAgICAgIGNvbnRpbnVlO1xuXG4gICAgfSBlbHNlIGlmIChjb3VudCA8IG1pbl9jb3VudCkge1xuICAgICAgZG8geyBzZW5kX2NvZGUocywgY3VybGVuLCBzLmJsX3RyZWUpOyB9IHdoaWxlICgtLWNvdW50ICE9PSAwKTtcblxuICAgIH0gZWxzZSBpZiAoY3VybGVuICE9PSAwKSB7XG4gICAgICBpZiAoY3VybGVuICE9PSBwcmV2bGVuKSB7XG4gICAgICAgIHNlbmRfY29kZShzLCBjdXJsZW4sIHMuYmxfdHJlZSk7XG4gICAgICAgIGNvdW50LS07XG4gICAgICB9XG4gICAgICAvL0Fzc2VydChjb3VudCA+PSAzICYmIGNvdW50IDw9IDYsIFwiIDNfNj9cIik7XG4gICAgICBzZW5kX2NvZGUocywgUkVQXzNfNiwgcy5ibF90cmVlKTtcbiAgICAgIHNlbmRfYml0cyhzLCBjb3VudCAtIDMsIDIpO1xuXG4gICAgfSBlbHNlIGlmIChjb3VudCA8PSAxMCkge1xuICAgICAgc2VuZF9jb2RlKHMsIFJFUFpfM18xMCwgcy5ibF90cmVlKTtcbiAgICAgIHNlbmRfYml0cyhzLCBjb3VudCAtIDMsIDMpO1xuXG4gICAgfSBlbHNlIHtcbiAgICAgIHNlbmRfY29kZShzLCBSRVBaXzExXzEzOCwgcy5ibF90cmVlKTtcbiAgICAgIHNlbmRfYml0cyhzLCBjb3VudCAtIDExLCA3KTtcbiAgICB9XG5cbiAgICBjb3VudCA9IDA7XG4gICAgcHJldmxlbiA9IGN1cmxlbjtcbiAgICBpZiAobmV4dGxlbiA9PT0gMCkge1xuICAgICAgbWF4X2NvdW50ID0gMTM4O1xuICAgICAgbWluX2NvdW50ID0gMztcblxuICAgIH0gZWxzZSBpZiAoY3VybGVuID09PSBuZXh0bGVuKSB7XG4gICAgICBtYXhfY291bnQgPSA2O1xuICAgICAgbWluX2NvdW50ID0gMztcblxuICAgIH0gZWxzZSB7XG4gICAgICBtYXhfY291bnQgPSA3O1xuICAgICAgbWluX2NvdW50ID0gNDtcbiAgICB9XG4gIH1cbn1cblxuXG4vKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIENvbnN0cnVjdCB0aGUgSHVmZm1hbiB0cmVlIGZvciB0aGUgYml0IGxlbmd0aHMgYW5kIHJldHVybiB0aGUgaW5kZXggaW5cbiAqIGJsX29yZGVyIG9mIHRoZSBsYXN0IGJpdCBsZW5ndGggY29kZSB0byBzZW5kLlxuICovXG5mdW5jdGlvbiBidWlsZF9ibF90cmVlKHMpIHtcbiAgdmFyIG1heF9ibGluZGV4OyAgLyog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IGEyID0gUG9pbnQoKTtcbiAgdmFyIGIxID0gUG9pbnQoKTtcbiAgdmFyIGIyID0gUG9pbnQoKTtcbiAgdmFyIGMgPSBQb2ludCgpO1xuXG4gIGZvciAodmFyIGkgPSAwOyBpIDwgbjsgaSsrKSB7XG4gICAgYTEueCA9IHBbMiAqIGldO1xuICAgIGExLnkgPSBwWzIgKiBpICsgMV07XG4gICAgaWYgKGkgPT0gbiAtIDEpIHtcbiAgICAgIGEyLnggPSBwWzBdO1xuICAgICAgYTIueSA9IHBbMV07XG4gICAgfSBlbHNlIHtcbiAgICAgIGEyLnggPSBwWzIgKiBpICsgMl07XG4gICAgICBhMi55ID0gcFsyICogaSArIDNdO1xuICAgIH1cblxuICAgIGZvciAodmFyIGogPSAwOyBqIDwgbjsgaisrKSB7XG4gICAgICBpZiAoTWF0aC5hYnMoaSAtIGopIDwgMikgY29udGludWVcbiAgICAgIGlmIChqID09IG4gLSAxICYmIGkgPT0gMCkgY29udGludWVcbiAgICAgIGlmIChpID09IG4gLSAxICYmIGogPT0gMCkgY29udGludWVcblxuICAgICAgYjEueCA9IHBbMiAqIGpdO1xuICAgICAgYjEueSA9IHBbMiAqIGogKyAxXTtcbiAgICAgIGlmIChqID09IG4gLSAxKSB7XG4gICAgICAgIGIyLnggPSBwWzBdO1xuICAgICAgICBiMi55ID0gcFsxXTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGIyLnggPSBwWzIgKiBqICsgMl07XG4gICAgICAgIGIyLnkgPSBwWzIgKiBqICsgM107XG4gICAgICB9XG5cbiAgICAgIGlmIChHZXRMaW5lSW50ZXJzZWN0aW9uKGExLCBhMiwgYjEsIGIyLCBjKSAhPSBudWxsKSByZXR1cm4gZmFsc2VcbiAgICB9XG4gIH1cbiAgcmV0dXJuIHRydWVcbn1cbm1vZHVsZS5leHBvcnRzLklzU2ltcGxlID0gSXNTaW1wbGU7XG5cbi8qKlxuICogQ2hlY2tzLCBpZiBwb2x5Z29uIGlzIGNvbnZle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FyIHkwID0geWluIC0gWTA7XG4gICAgICB2YXIgejAgPSB6aW4gLSBaMDtcbiAgICAgIC8vIEZvciB0aGUgM0QgY2FzZSwgdGhlIHNpbXBsZXggc2hhcGUgaXMgYSBzbGlnaHRseSBpcnJlZ3VsYXIgdGV0cmFoZWRyb24uXG4gICAgICAvLyBEZXRlcm1pbmUgd2hpY2ggc2ltcGxleCB3ZSBhcmUgaW4uXG4gICAgICB2YXIgaTEsIGoxLCBrMTsgLy8gT2Zmc2V0cyBmb3Igc2Vjb25kIGNvcm5lciBvZiBzaW1wbGV4IGluIChpLGosaykgY29vcmRzXG4gICAgICB2YXIgaTIsIGoyLCBrMjsgLy8gT2Zmc2V0cyBmb3IgdGhpcmQgY29ybmVyIG9mIHNpbXBsZXggaW4gKGksaixrKSBjb29yZHNcbiAgICAgIGlmICh4MCA+PSB5MCkge1xuICAgICAgICBpZiAoeTAgPj0gejApIHtcbiAgICAgICAgICBpMSA9IDE7XG4gICAgICAgICAgajEgPSAwO1xuICAgICAgICAgIGsxID0gMDtcbiAgICAgICAgICBpMiA9IDE7XG4gICAgICAgICAgajIgPSAxO1xuICAgICAgICAgIGsyID0gMDtcbiAgICAgICAgfSAvLyBYIFkgWiBvcmRlclxuICAgICAgICBlbHNlIGlmICh4MCA+PSB6MCkge1xuICAgICAgICAgIGkxID0gMTtcbiAgICAgICAgICBqMSA9IDA7XG4gICAgICAgICAgazEgPSAwO1xuICAgICAgICAgIGkyID0gMTtcbiAgICAgICAgICBqMiA9IDA7XG4gICAgICAgICAgazIgPSAxO1xuICAgICAgICB9IC8vIFggWiBZIG9yZGVyXG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIGkxID0gMDtcbiAgICAgICAgICBqMSA9IDA7XG4gICAgICAgICAgazEgPSAxO1xuICAgICAgICAgIGkyID0gMTtcbiAgICAgICAgICBqMiA9IDA7XG4gICAgICAgICAgazIgPSAxO1xuICAgICAgICB9IC8vIFogWCBZIG9yZGVyXG4gICAgICB9XG4gICAgICBlbHNlIHsgLy8geDA8eTBcbiAgICAgICAgaWYgKHkwIDwgejApIHtcbiAgICAgICAgICBpMSA9IDA7XG4gICAgICAgICAgajEgPSAwO1xuICAgICAgICAgIGsxID0gMTtcbiAgICAgICAgICBpMiA9IDA7XG4gICAgICAgICAgajIgPSAxO1xuICAgICAgICAgIGsyID0gMTtcbiAgICAgICAgfSAvLyBaIFkgWCBvcmRlclxuICAgICAgICBlbHNlIGlmICh4MCA8IHowKSB7XG4gICAgICAgICAgaTEgPSAwO1xuICAgICAgICAgIGoxID0gMTtcbiAgICAgICAgICBrMSA9IDA7XG4gICAgICAgICAgaTIgPSAwO1xuICAgICAgICAgIGoyID0gMTtcbiAgICAgICAgICBrMiA9IDE7XG4gICAgICAgIH0gLy8gWSBaIFggb3JkZXJcbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgaTEgPSAwO1xuICAgICAgICAgIGoxID0gMTtcbiAgICAgICAgICBrMSA9IDA7XG4gICAgICAgICAgaTIgPSAxO1xuICAgICAgICAgIGoyID0gMTtcbiAgICAgICAgICBrMiA9IDA7XG4gICAgICAgIH0gLy8gWSBYIFogb3JkZXJcbiAgICAgIH1cbiAgICAgIC8vIEEgc3RlcCBvZiAoMSwwLDApIGluIChpLGosaykgbWVhbnMgYSBzdGVwIG9mICgxLWMsLWMsLWMpIGluICh4LHkseiksXG4gICAgICAvLyBhIHN0ZXAgb2YgKDAsMSwwKSBpbiAoaSxqLGspIG1lYW5zIGEgc3RlcCBvZiAoLWMsMS1jLC1jKSBpbiAoeCx5LHopLCBhbmRcbiAgICAgIC8vIGEgc3RlcCBvZiAoMCwwLDEpIGluIChpLGosaykgbWVhbnMgYSBzdGVwIG9mICgtYywtYywxLWMpIGluICh4LHkseiksIHdoZXJlXG4gICAgICAvLyBjID0gMS82LlxuICAgICAgdmFyIHgxID0geDAgLSBpMSArIEczOyAvLyBPZmZzZXRzIGZvciBzZWNvbmQgY29ybmVyIGluICh4LHkseikgY29vcmRzXG4gICA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gIH1cbiAgICAgIHZhciB0MSA9IDAuNiAtIHgxICogeDEgLSB5MSAqIHkxIC0gejEgKiB6MTtcbiAgICAgIGlmICh0MSA8IDApIG4xID0gMC4wO1xuICAgICAgZWxzZSB7XG4gICAgICAgIHZhciBnaTEgPSBwZXJtTW9kMTJbaWkgKyBpMSArIHBlcm1bamogKyBqMSArIHBlcm1ba2sgKyBrMV1dXSAqIDM7XG4gICAgICAgIHQxICo9IHQxO1xuICAgICAgICBuMSA9IHQxICogdDEgKiAoZ3JhZDNbZ2kxXSAqIHgxICsgZ3JhZDNbZ2kxICsgMV0gKiB5MSArIGdyYWQzW2dpMSArIDJdICogejEpO1xuICAgICAgfVxuICAgICAgdmFyIHQyID0gMC42IC0geDIgKiB4MiAtIHkyICogeTIgLSB6MiAqIHoyO1xuICAgICAgaWYgKHQyIDwgMCkgbjIgPSAwLjA7XG4gICAgICBlbHNlIHtcbiAgICAgICAgdmFyIGdpMiA9IHBlcm1Nb2QxMltpaSArIGkyICsgcGVybVtqaiArIGoyICsgcGVybVtrayArIGsyXV1dICogMztcbiAgICAgICAgdDIgKj0gdDI7XG4gICAgICAgIG4yID0gdDIgKiB0MiAqIChncmFkM1tnaTJdICogeDIgKyBncmFkM1tnaTIgKyAxXSAqIHkyICsgZ3JhZDNbZ2kyICsgMl0gKiB6Mik7XG4gICAgICB9XG4gICAgICB2YXIgdDMgPSAwLjYgLSB4MyAqIHgzIC0geTMgKiB5MyAtIHozICogejM7XG4gICAgICBpZiAodDMgPCAwKSBuMyA9IDAuMDtcbiAgICAgIGVsc2Uge1xuICAgICAgICB2YXIgZ2kzID0gcGVybU1vZDEyW2lpICsgMSArIHBlcm1bamogKyAxICsgcGVybVtrayArIDFdXV0gKiAzO1xuICAgICAgICB0MyAqPSB0MztcbiAgICAgICAgbjMgPSB0MyAqIHQzICogKGdyYWQzW2dpM10gKiB4MyArIGdyYWQzW2dpMyArIDFdICogeTMgKyBncmFkM1tnaTMgKyAyXSAqIHozKTtcbiAg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ICAgICAgICB2YXIgdiA9IF9jW19iXTtcbiAgICAgICAgICAgICAgICB2LnBvcy5hcHBseU1hdHJpeDQobWVzaC5tYXRyaXgpO1xuICAgICAgICAgICAgICAgIHYubm9ybWFsLmFwcGx5TWF0cml4MyhDU0cuX3RtcG0zKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gY3NnO1xuICAgIH07XG4gICAgQ1NHLnRvTWVzaCA9IGZ1bmN0aW9uIChjc2csIHRvTWF0cml4KSB7XG4gICAgICAgIHZhciBnZW9tID0gbmV3IHRocmVlXzEuR2VvbWV0cnkoKTtcbiAgICAgICAgdmFyIHBzID0gY3NnLnBvbHlnb25zO1xuICAgICAgICB2YXIgdnMgPSBnZW9tLnZlcnRpY2VzO1xuICAgICAgICB2YXIgZnZ1diA9IGdlb20uZmFjZVZlcnRleFV2c1swXTtcbiAgICAgICAgZm9yICh2YXIgX2kgPSAwLCBwc18xID0gcHM7IF9pIDwgcHNfMS5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgIHZhciBwID0gcHNfMVtfaV07XG4gICAgICAgICAgICB2YXIgcHZzID0gcC52ZXJ0aWNlcztcbiAgICAgICAgICAgIHZhciB2MCA9IHZzLmxlbmd0aDtcbiAgICAgICAgICAgIHZhciBwdmxlbiA9IHB2cy5sZW5ndGg7XG4gICAgICAgICAgICBmb3IgKHZhciBfYSA9IDAsIHB2c18xID0gcHZzOyBfYSA8IHB2c18xLmxlbmd0aDsgX2ErKykge1xuICAgICAgICAgICAgICAgIHZhciBwdiA9IHB2c18xW19hXTtcbiAgICAgICAgICAgICAgICB2cy5wdXNoKG5ldyB0aHJlZV8xLlZlY3RvcjMoKS5jb3B5KHB2LnBvcykpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDM7IGogPD0gcHZsZW47IGorKykge1xuICAgICAgICAgICAgICAgIHZhciBmYyA9IG5ldyB0aHJlZV8xLkZhY2UzKHYwLCB2MCArIGogLSAyLCB2MCArIGogLSAxKTtcbiAgICAgICAgICAgICAgICB2YXIgZnV2ID0gW107XG4gICAgICAgICAgICAgICAgZnZ1di5wdXNoKGZ1dik7XG4gICAgICAgICAgICAgICAgdmFyIGZubWwgPSBmYy52ZXJ0ZXhOb3JtYWxzO1xuICAgICAgICAgICAgICAgIGZubWwucHVzaChuZXcgdGhyZWVfMS5WZWN0b3IzKCkuY29weShwdnNbMF0ubm9ybWFsKSk7XG4gICAgICAgICAgICAgICAgZm5tbC5wdXNoKG5ldyB0aHJlZV8xLlZlY3RvcjMoKS5jb3B5KHB2c1tqIC0gMl0ubm9ybWFsKSk7XG4gICAgICAgICAgICAgICAgZm5tbC5wdXNoKG5ldyB0aHJlZV8xLlZlY3RvcjMoKS5jb3B5KHB2c1tqIC0gMV0ubm9ybWFsKSk7XG4gICAgICAgICAgICAgICAgLy8gY2hlY2sgZm9yIHV2IHByb3BlcnR5XG4gICAgICAgICAgICAgICAgaWYgKHB2c1swXS51diAmJiBwdnNbaiAtIDJdLnV2ICYmIHB2c1tqIC0gMV0udXYpIHtcbiAgICAgICAgICAgICAgICAgICAgZnV2LnB1c2gobmV3IHRocmVlXzEuVmVjdG9yMygpLmNvcHkocHZzWzBdLnV2KSk7XG4gICAgICAgICAgICAgICAgICAgIGZ1di5wdXNoKG5ldyB0aHJlZV8xLlZlY3RvcjMoKS5jb3B5KHB2c1tqIC0gMl0udXYpKTtcbiAgICAgICAgICAgICAgICAgICAgZnV2LnB1c2gobmV3IHRocmVlXzEuVmVjdG9yMygpLmNvcHkocHZzW2ogLSAxXS51dikpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmYy5ub3JtYWwgPSBuZXcgdGhyZWVfMS5WZWN0b3IzKCkuY29weShwLnBsYW5lLm5vcm1hbCk7XG4gICAgICAgICAgICAgICAgZ2VvbS5mYWNlcy5wdXNoKGZjKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2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AgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAodHlwZW9mIHRva2VucyA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgIHZhciBvcCA9IENTRy5jdXJyZW50T3A7XG4gICAgICAgICAgICB0b2tlbnMudXBkYXRlTWF0cml4KCk7XG4gICAgICAgICAgICB0b2tlbnMudXBkYXRlTWF0cml4V29ybGQoKTtcbiAgICAgICAgICAgIGlmICghQ1NHLnNvdXJjZU1lc2gpIHtcbiAgICAgICAgICAgICAgICBDU0cuY3VycmVudFByaW0gPSBDU0cuZnJvbU1lc2goQ1NHLnNvdXJjZU1lc2ggPSB0b2tlbnMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgQ1NHLm5leHRQcmltID0gQ1NHLmZyb21NZXNoKHRva2Vucyk7XG4gICAgICAgICAgICAgICAgQ1NHLmN1cnJlbnRQcmltID0gQ1NHLmN1cnJlbnRQcmltW29wXShDU0cubmV4dFByaW0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKENTRy5kb1JlbW92ZSlcbiAgICAgICAgICAgICAgICB0b2tlbnMucGFyZW50LnJlbW92ZSh0b2tlbnMpO1xuICAgICAgICB9IC8vIHVuaW9uLHN1YnRyYWN0LGludGVyc2VjdCxpbnZlcnNlXG4gICAgfTtcbiAgICBDU0cuZXZhbCA9IGZ1bmN0aW9uICh0b2tlbnMsIGRvUmVtb3ZlKSB7XG4gICAgICAgIENTRy5jdXJyZW50T3AgPSBudWxsO1xuICAgICAgICBDU0cuc291cmNlTWVzaCA9IG51bGw7XG4gICAgICAgIENTRy5kb1JlbW92ZSA9IGRvUmVtb3ZlO1xuICAgICAgICBDU0cuaUV2YWwodG9rZW5zKTtcbiAgICAgICAgdmFyIHJlc3VsdCA9IENTRy50b01lc2goQ1NHLmN1cnJlbnRQcmltLCBDU0cuc291cmNlTWVzaC5tYXRyaXgpO1xuICAgICAgICByZ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3aGVuIG5lY2Vzc2FyeS5cbiAgICAgICAgc3dpdGNoIChwb2x5Z29uVHlwZSkge1xuICAgICAgICAgICAgY2FzZSBDT1BMQU5BUjpcbiAgICAgICAgICAgICAgICAodGhpcy5ub3JtYWwuZG90KHBvbHlnb24ucGxhbmUubm9ybWFsKSA+IDAgPyBjb3BsYW5hckZyb250IDogY29wbGFuYXJCYWNrKS5wdXNoKHBvbHlnb24pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBGUk9OVDpcbiAgICAgICAgICAgICAgICBmcm9udC5wdXNoKHBvbHlnb24pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBCQUNLOlxuICAgICAgICAgICAgICAgIGJhY2sucHVzaChwb2x5Z29uKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgU1BBTk5JTkc6XG4gICAgICAgICAgICAgICAgdmFyIGYgPSBbXTtcbiAgICAgICAgICAgICAgICB2YXIgYiA9IFtdO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcG9seWdvbi52ZXJ0aWNlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgaiA9IChpICsgMSkgJSBwb2x5Z29uLnZlcnRpY2VzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpID0gdHlwZXNbaV07XG4gICAgICAgICAgICAgICAgICAgIHZhciB0aiA9IHR5cGVzW2pdO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdmkgPSBwb2x5Z29uLnZlcnRpY2VzW2ldO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdmogPSBwb2x5Z29uLnZlcnRpY2VzW2pdO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGkgIT09IEJBQ0spIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGYucHVzaCh2aSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRpICE9PSBGUk9OVCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYi5wdXNoKHRpICE9PSBCQUNLID8gdmkuY2xvbmUoKSA6IHZpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKHRpIHwgdGopID09PSBTUEFOTklORykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHQgPSAodGhpcy53IC0gdGhpcy5ub3JtYWwuZG90KHZpLnBvcykpIC8gdGhpcy5ub3JtYWwuZG90KHZqLnBvcy5taW51cyh2aS5wb3MpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2ID0gdmkuaW50ZXJwb2xhdGUodmosIHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZi5wdXNoKHYpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYi5wdXNoKHYuY2xvbmUoKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGYubGVuZ3RoID49IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgZnJvbnQucHVzaChuZXcgUG9seWdvbihmLCBwb2x5Z29uLnNoYXJlZCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoYi5sZW5ndGggPj0gMykge1xuICAgICAgICAgICAgICAgICAgICBiYWNrLnB1c2gobmV3IFBvbHlnb24oYiwgcG9seWdvbi5zaGFyZWQpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIC8vIHRoZSB0b2xlcmFuY2UgdXNlZCBieSBgc3BsaXRQb2x5Z29uKClgIHRvIGRlY2lkZSBpZiBhXG4gICAgLy8gcG9pbnQgaXMgb24gdGhlIHBsYW5lLlxuICAgIFBsYW5lLkVQU0lMT04gPSAxZS01O1xuICAgIHJld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2VudHM6IHRhbmdlbnRzLFxuXHRcdFx0XHRub3JtYWxzOiBub3JtYWxzLFxuXHRcdFx0XHRiaW5vcm1hbHM6IGJpbm9ybWFsc1xuXHRcdFx0fTtcblxuXHRcdH1cblxuXHR9O1xuXG5cdC8vIFRPRE86IFRyYW5zZm9ybWF0aW9uIGZvciBDdXJ2ZXM/XG5cblx0LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG5cdCAqXHQzRCBDdXJ2ZXNcblx0ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuXG5cdC8vIEEgRmFjdG9yeSBtZXRob2QgZm9yIGNyZWF0aW5nIG5ldyBjdXJ2ZSBzdWJjbGFzc2VzXG5cblx0Q3VydmUuY3JlYXRlID0gZnVuY3Rpb24gKCBjb25zdHJ1Y3RvciwgZ2V0UG9pbnRGdW5jICkge1xuXG5cdFx0Y29uc3RydWN0b3IucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZSggQ3VydmUucHJvdG90eXBlICk7XG5cdFx0Y29uc3RydWN0b3IucHJvdG90eXBlLmNvbnN0cnVjdG9yID0gY29uc3RydWN0b3I7XG5cdFx0Y29uc3RydWN0b3IucHJvdG90eXBlLmdldFBvaW50ID0gZ2V0UG9pbnRGdW5jO1xuXG5cdFx0cmV0dXJuIGNvbnN0cnVjdG9yO1xuXG5cdH07XG5cblx0LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG5cdCAqXHRMaW5lXG5cdCAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cblxuXHRmdW5jdGlvbiBMaW5lQ3VydmUoIHYxLCB2MiApIHtcblxuXHRcdHRoaXMudjEgPSB2MTtcblx0XHR0aGlzLnYyID0gdjI7XG5cblx0f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A2ICogdDsgXHQvLyBkZXJpdmVkIGZyb20gMnReMyDiiJIgM3ReMiArIDFcblx0XHRcdHZhciBoMTAgPSAzICogdCAqIHQgLSA0ICogdCArIDE7IC8vIHReMyDiiJIgMnReMiArIHRcblx0XHRcdHZhciBoMDEgPSAtIDYgKiB0ICogdCArIDYgKiB0OyBcdC8vIOKIkiAydDMgKyAzdDJcblx0XHRcdHZhciBoMTEgPSAzICogdCAqIHQgLSAyICogdDtcdC8vIHQzIOKIkiB0MlxuXG5cdFx0XHRyZXR1cm4gaDAwICsgaDEwICsgaDAxICsgaDExO1xuXG5cdFx0fSxcblxuXHRcdC8vIENhdG11bGwtUm9tXG5cblx0XHRpbnRlcnBvbGF0ZTogZnVuY3Rpb24oIHAwLCBwMSwgcDIsIHAzLCB0ICkge1xuXG5cdFx0XHR2YXIgdjAgPSAoIHAyIC0gcDAgKSAqIDAuNTtcblx0XHRcdHZhciB2MSA9ICggcDMgLSBwMSApICogMC41O1xuXHRcdFx0dmFyIHQyID0gdCAqIHQ7XG5cdFx0XHR2YXIgdDMgPSB0ICogdDI7XG5cdFx0XHRyZXR1cm4gKCAyICogcDEgLSAyICogcDIgKyB2MCArIHYxICkgKiB0MyArICggLSAzICogcDEgKyAzICogcDIgLSAyICogdjAgLSB2MSApICogdDIgKyB2MCAqIHQgKyBwMTtcblxuXHRcdH1cblxuXHR9O1xuXG5cdC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuXHQgKlx0U3BsaW5lIGN1cnZlXG5cdCAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cblxuXHRmdW5jdGlvbiBTcGxpbmVDdXJ2ZSggcG9pbnRzIC8qIGFycmF5IG9mIFZlY3RvcjIgKi8gKSB7XG5cblx0XHR0aGlzLnBvaW50cyA9ICggcG9pbnRzID09PSB1bmRlZmluZWQgKSA/IFtdIDogcG9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dGFuZ2VudEN1YmljQmV6aWVyID0gQ3VydmVVdGlscy50YW5nZW50Q3ViaWNCZXppZXI7XG5cblx0XHRyZXR1cm4gbmV3IFZlY3RvcjIoXG5cdFx0XHR0YW5nZW50Q3ViaWNCZXppZXIoIHQsIHRoaXMudjAueCwgdGhpcy52MS54LCB0aGlzLnYyLngsIHRoaXMudjMueCApLFxuXHRcdFx0dGFuZ2VudEN1YmljQmV6aWVyKCB0LCB0aGlzLnYwLnksIHRoaXMudjEueSwgdGhpcy52Mi55LCB0aGlzLnYzLnkgKVxuXHRcdCkubm9ybWFsaXplKCk7XG5cblx0fTtcblxuXHQvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcblx0ICpcdFF1YWRyYXRpYyBCZXppZXIgY3VydmVcblx0ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuXG5cblx0ZnVuY3Rpb24gUXVhZHJhdGljQmV6aWVyQ3VydmUoIHYwLCB2MSwgdjIgKSB7XG5cblx0XHR0aGlzLnYwID0gdjA7XG5cdFx0dGhpcy52MSA9IHYxO1xuXHRcdHRoaXMudjIgPSB2MjtcblxuXHR9XG5cblx0UXVhZHJhdGljQmV6aWVyQ3VydmUucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZSggQ3VydmUucHJvdG90eXBlICk7XG5cdFF1YWRyYXRpY0JlemllckN1cnZlLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IFF1YWRyYXRpY0JlemllckN1cnZlO1xuXG5cblx0UXVhZHJhdGljQmV6aWVyQ3VydmUucHJvdG90eXBlLmdldFBvaW50ID0gZnVuY3Rpb24gKCB0ICkge1xuXG5cdFx0dmFyIGIyID0gU2hhcGVVdGlscy5iMjtcblxuXHRcdHJldHVybiBuZXcgVmVjdG9yMihcblx0XHRcdGIyKCB0LCB0aGlzLnYwLngsIHRoaXMudjEueCwgdGh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RcdHZhciBwb2ludDEgPSBwb2ludHNbIGludFBvaW50IF07XG5cdFx0XHR2YXIgcG9pbnQyID0gcG9pbnRzWyBpbnRQb2ludCA+IHBvaW50cy5sZW5ndGggLSAyID8gcG9pbnRzLmxlbmd0aCAtIDEgOiBpbnRQb2ludCArIDEgXTtcblx0XHRcdHZhciBwb2ludDMgPSBwb2ludHNbIGludFBvaW50ID4gcG9pbnRzLmxlbmd0aCAtIDMgPyBwb2ludHMubGVuZ3RoIC0gMSA6IGludFBvaW50ICsgMiBdO1xuXG5cdFx0XHR2YXIgaW50ZXJwb2xhdGUgPSBDdXJ2ZVV0aWxzLmludGVycG9sYXRlO1xuXG5cdFx0XHRyZXR1cm4gbmV3IFZlY3RvcjMoXG5cdFx0XHRcdGludGVycG9sYXRlKCBwb2ludDAueCwgcG9pbnQxLngsIHBvaW50Mi54LCBwb2ludDMueCwgd2VpZ2h0ICksXG5cdFx0XHRcdGludGVycG9sYXRlKCBwb2ludDAueSwgcG9pbnQxLnksIHBvaW50Mi55LCBwb2ludDMueSwgd2VpZ2h0ICksXG5cdFx0XHRcdGludGVycG9sYXRlKCBwb2ludDAueiwgcG9pbnQxLnosIHBvaW50Mi56LCBwb2ludDMueiwgd2VpZ2h0IClcblx0XHRcdCk7XG5cblx0XHR9XG5cblx0KTtcblxuXHQvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcblx0ICpcdEN1YmljIEJlemllciAzRCBjdXJ2ZVxuXHQgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG5cblx0dmFyIEN1YmljQmV6aWVyQ3VydmUzID0gQ3VydmUuY3JlYXRlKFxuXG5cdFx0ZnVuY3Rpb24gKCB2MCwgdjEsIHYyLCB2MyApIHtcblxuXHRcdFx0dGhpcy52MCA9IHYwO1xuXHRcdFx0dGhpcy52MSA9IHYxO1xuXHRcdFx0dGhpcy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ueSwgdGhpcy52Mi55ICksXG5cdFx0XHRcdGIyKCB0LCB0aGlzLnYwLnosIHRoaXMudjEueiwgdGhpcy52Mi56IClcblx0XHRcdCk7XG5cblx0XHR9XG5cblx0KTtcblxuXHQvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcblx0ICpcdExpbmUzRFxuXHQgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG5cblx0dmFyIExpbmVDdXJ2ZTMgPSBDdXJ2ZS5jcmVhdGUoXG5cblx0XHRmdW5jdGlvbiAoIHYxLCB2MiApIHtcblxuXHRcdFx0dGhpcy52MSA9IHYxO1xuXHRcdFx0dGhpcy52MiA9IHYyO1xuXG5cdFx0fSxcblxuXHRcdGZ1bmN0aW9uICggdCApIHtcblxuXHRcdFx0aWYgKCB0ID09PSAxICkge1xuXG5cdFx0XHRcdHJldHVybiB0aGlzLnYyLmNsb25lKCk7XG5cblx0XHRcdH1cblxuXHRcdFx0dmFyIHZlY3RvciA9IG5ldyBWZWN0b3IzKCk7XG5cblx0XHRcdHZlY3Rvci5zdWJWZWN0b3JzKCB0aGlzLnYyLCB0aGlzLnYxICk7IC8vIGRpZmZcblx0XHRcdHZlY3Rvci5tdWx0aXBseVNjYWxhciggdCApO1xuXHRcdFx0dmVjdG9yLmFkZCggdGhpcy52MSApO1xuXG5cdFx0XHRyZXR1cm4gdmVjdG9yO1xuXG5cdFx0fVxuXG5cdCk7XG5cblx0LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG5cdCAqXHRBcmMgY3VydmVcblx0ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuXG5cdGZ1bmN0aW9uIEFyY0N1cnZlKCBhWCwgYVksIGFSYWRpdXMsIGFTdGFydEFuZ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gICAgICAgICAgICB0aGlzLm1haW5HdWkubWFpblJvYWRQb2x5Z29ucyxcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5HdWkubWFqb3JSb2FkUG9seWdvbnMsXG4gICAgICAgICAgICAgICAgdGhpcy5tYWluR3VpLm1pbm9yUm9hZFBvbHlnb25zLFxuICAgICAgICAgICAgICAgIHRoaXMubWFpbkd1aS5idWlsZGluZ01vZGVscyxcbiAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICB0aGlzLm1vZGVsR2VuZXJhdG9yLmdldFNUTCgpLnRoZW4oYmxvYiA9PiB0aGlzLmRvd25sb2FkRmlsZSgnbW9kZWwuemlwJywgYmxvYikpO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGRvd25sb2FkRmlsZShmaWxlbmFtZTogc3RyaW5nLCBmaWxlOiBhbnkpOiB2b2lkIHtcbiAgICAgICAgc2F2ZUFzKGZpbGUsIGZpbGVuYW1lKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBEb3dubG9hZHMgaW1hZ2Ugb2YgbWFwXG4gICAgICogRHJhd3Mgb250byBoaWRkZW4gY2FudmFzIGF0IHJlcXVlc3RlZCByZXNvbHV0aW9uXG4gICAgICovXG4gICAgZG93bmxvYWRQbmcoKTogdm9pZCB7XG4gICAgICAgIGNvbnN0IGMgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChVdGlsLklNR19DQU5WQVNfSUQpIGFzIEhUTUxDYW52YXNFbGVtZW50O1xuXG4gICAgICAgIC8vIERyYXdcbiAgICAgICAgaWYgKHRoaXMuc2hvd1RlbnNvckZpZWxkKCkpIHtcbiAgICAgICAgICAgIHRoaXMudGVuc29yRmllbGQuZHJhdyhuZXcgRGVmYXVsdENhbnZhc1dyYXBwZXIoYywgdGhpcy5pbWFnZVNjYWxlLCBmYWxzZSkpO1xuICAgICAgICB9IGVsc2UgeyAgICAgICAgICAgIFxuIC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oKTtcbiAgICB9XG5cbiAgICBkcmF3KCk6IHZvaWQge1xuICAgICAgICBpZiAodGhpcy5zaG93VGVuc29yRmllbGQoKSkge1xuICAgICAgICAgICAgdGhpcy5wcmV2aW91c0ZyYW1lRHJhd1RlbnNvciA9IHRydWU7XG4gICAgICAgICAgICB0aGlzLmRyYWdDb250cm9sbGVyLnNldERyYWdEaXNhYmxlZChmYWxzZSk7XG4gICAgICAgICAgICB0aGlzLnRlbnNvckZpZWxkLmRyYXcodGhpcy50ZW5zb3JDYW52YXMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gRGlzYWJsZSBmaWVsZCBkcmFnIGFuZCBkcm9wXG4gICAgICAgICAgICB0aGlzLmRyYWdDb250cm9sbGVyLnNldERyYWdEaXNhYmxlZCh0cnVlKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHRoaXMucHJldmlvdXNGcmFtZURyYXdUZW5zb3IgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnByZXZpb3VzRnJhbWVEcmF3VGVuc29yID0gZmFsc2U7XG5cbiAgICAgICAgICAgICAgICAvLyBGb3JjZSByZWRyYXcgaWYgc3dpdGNoaW5nIGZyb20gdGVuc29yIGZpZWxkXG4gICAgICAgICAgICAgICAgdGhpcy5tYWluR3VpLmRyYXcodGhpcy5fc3R5bGUsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5HdWkuZHJhdyh0aGlzLl9zdHlsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB1cGRhdGUoKTogdm9pZCB7XG4gICAgICAgIGlmICh0aGlzLm1vZGVsR2VuZXJhdG9yKSB7XG4gICAgICAgICAgICBsZXQgY29udGludWVVcGRhdGUgPSB0cnVlO1xuICAgICAgICAgICAgY29uc3Qgc3RhcnQgPSBwZXJmb3JtYW5jZS5ub3coKTtcbiAgICAgICAg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50KS5kb3QocGVycGVuZGljdWxhclZlY3RvcikgPCAwO1xuICAgIH1cblxuICAgIGFkZCh2OiBWZWN0b3IpOiBWZWN0b3Ige1xuICAgICAgICB0aGlzLnggKz0gdi54O1xuICAgICAgICB0aGlzLnkgKz0gdi55O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBBbmdsZSBpbiByYWRpYW5zIHRvIHBvc2l0aXZlIHgtYXhpcyBiZXR3ZWVuIC1waSBhbmQgcGlcbiAgICAgKi9cbiAgICBhbmdsZSgpOiBudW1iZXIge1xuICAgICAgICByZXR1cm4gTWF0aC5hdGFuMih0aGlzLnksIHRoaXMueCk7XG4gICAgfVxuXG4gICAgY2xvbmUoKTogVmVjdG9yIHtcbiAgICAgICAgcmV0dXJuIG5ldyBWZWN0b3IodGhpcy54LCB0aGlzLnkpO1xuICAgIH1cblxuICAgIGNvcHkodjogVmVjdG9yKTogVmVjdG9yIHtcbiAgICAgICAgdGhpcy54ID0gdi54O1xuICAgICAgICB0aGlzLnkgPSB2Lnk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGNyb3NzKHY6IFZlY3Rvcik6IG51bWJlciB7XG4gICAgICAgIHJldHVybiB0aGlzLnggKiB2LnkgLSB0aGlzLnkgKiB2Lng7XG4gICAgfVxuXG4gICAgZGlzdGFuY2VUbyh2OiBWZWN0b3IpOiBudW1iZXIge1xuICAgICAgICByZXR1cm4gTWF0aC5zcXJ0KHRoaXMuZGlzdGFuY2VUb1NxdWFyZWQodikpO1xuICAgIH1cblxuICAgIGRpc3RhbmNlVG9TcXVhcmVkICh2OiBWZWN0b3IpOiBudW1iZXIge1xuICAgICAgICBjb25zdCBkeCA9IHRoaXMueCAtIHYueFxuICAgICAgICBjb25zdCBkeSA9IHRoaXMueSAtIHYueTtcbiAgICAgICAgcmV0dXJuIGR4ICogZHggKyBkeSAqIGR5O1xuICAgIH1cblxuICAgIGRpdmlkZSh2OiBWZWN0b3IpOiBWZWN0b3Ige1xuICAgICAgICBpZiAodi54ID09PSAwIHx8IHYueSA9PT0gMCkge1xuICAgICAgICAgICAgbG9nLndhcm4oXCJEaXZpc2lvbiBieSB6ZXJvXCIpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnggLz0gdi54O1xuICAgICAgICB0aGlzLnkgLz0gdi55O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBkaXZpZGVTY2FsYXIoczogbnVtYmVyKTogVmVjdG9yIHtcbiAgICAgICAgaWYgKHMgPT09IDApIHtcbiAgICAgICAgICAgIGxvZy53YXJuKFwiRGl2aXNpb24gYnkgemVyb1wiKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzLm11bHRpcGx5U2NhbGFyKDEgLyBzKTtcbiAgICB9XG5cbiAgICBkb3QodjogVmVjdG9yKTogbnVtYmVyIHtcbiAgICAgICAgcmV0dXJuIHRoaXMueCAqIHYueCArIHRoaXMueSAqIHYueTtcbiAgICB9XG5cbiAgICBlcXVhbHModjogVmVjdG9yKTogYm9vbGVhbiB7XG4gICAgICAgIHJldHVybiAoKHYueCA9PT0gdGhpcy54KSAmJiAodi55ID09PSB0aGlzLnkpKTtcbiAgICB9XG5cbiAgICBsZW5ndGgoKTogbnVtYmVyIHtcbiAgICAgICAgcmV0dXJuIE1hdGguc3FydCh0aGlzLmxlbmd0aFNxKCkpO1xuICAgIH1cblxuICAgIGxlbmd0aFNxKCk6IG51bWJlciB7XG4gICAgICAgIHJldHVybiB0aGlzLnggKiB0aGlzLnggKyB0aGlzLnkgKiB0aGlzLnk7XG4gICAgfVxuXG4gICAgbXVsdGlwbHkodjogVmVjdG9yKTogVmVjdG9yIHtcbiAgICAgICAgdGhpcy54ICo9IHYueDtcbiAgICAgICAgdGhpcy55ICo9IHYueTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgbXVsdGlwbHlTY2FsYXIoczogbnVtYmVyKTogVmVjdG9yIHtcbiAgICAgICAgdGhpcy54ICo9IHM7XG4gICAgICAgIHRoaXMueSAqPSBzO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBuZWdhdGUoKTogVmVjdG9yIHtcbiAgICAgICAgcmV0dXJuIHRoaXMubXVsdGlwbHlTY2FsYXIoLTEpO1xuICAgIH1cblxuICAgIG5vcm1hbGl6ZSgpOiBWZWN0b3Ige1xuICAgICAgICBjb25zdCBsID0gdGhpcy5sZW5ndGgoKTtcbiAgICAgICAgaWYgKGwgPT09IDApIHtcbiAgICAgICAgICAgIGxvZy53YXJuKFwiWmVybyBWZWN0b3JcIik7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIHRoaXMuZGl2aWRlU2NhbGFyKHRoaXMubGVuZ3RoKCkpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEFuZ2xlIGluIHJhZGlhbnNcbiAgICAgKi9cbiAgICByb3RhdGVBcm91bmQoY2VudGVyOiBWZWN0b3IsIGFuZ2xlOiBudW1iZXIpOiBWZWN0b3Ige1xuICAgICAgICBjb25zdCBjb3MgPSBNYXRoLmNvcyhhbmdsZSlcbiAgICAgICAgY29uc3Qgc2luID0gTWF0aC5zaW4oYW5nbGUpO1xuXG4gICAgICAgIGNvbnN0IHggPSB0aGlzLnggLSBjZW50ZXIueDtcbiAgICAgICAgY29uc3QgeSA9IHRoaXMueSAtIGNlbnRlci55O1xuXG4gICAgICAgIHRoaXMueCA9IHggKiBjb3MgLSB5ICogc2luICsgY2VudGVyLng7XG4gICAgICAgIHRoaXMueSA9IHggKiBzaW4gKyB5ICogY29zICsgY2VudGVyLnk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIHNldCh2OiBWZWN0b3IpOiBW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DE7IGkrKykge1xuICAgICAgICAgICAgICAgIGNvbnN0IG5vZGVzQWxvbmdTZWdtZW50ID1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5nZXROb2Rlc0Fsb25nU2VnbWVudCh0aGlzLnZlY3RvcnNUb1NlZ21lbnQoc3RyZWFtbGluZVtpXSwgc3RyZWFtbGluZVtpICsgMV0pLCBxdWFkdHJlZSwgbm9kZUFkZFJhZGl1cywgZHN0ZXApO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGlmIChub2Rlc0Fsb25nU2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgbm9kZXNBbG9uZ1NlZ21lbnQubGVuZ3RoIC0gMTsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBub2Rlc0Fsb25nU2VnbWVudFtqXS5hZGROZWlnaGJvcihub2Rlc0Fsb25nU2VnbWVudFtqKzFdKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZy5lcnJvcihcIkVycm9yIEdyYXBoLmpzOiBzZWdtZW50IHdpdGggbGVzcyB0aGFuIDIgbm9kZXNcIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgXG4gICAgICAgIGZvciAoY29uc3QgbiBvZiBxdWFkdHJlZS5kYXRhKCkpIHtcbiAgICAgICAgICAgIGlmIChkZWxldGVEYW5nbGluZykge1xuICAgICAgICAgICAgICAgIHRoaXMuZGVsZXRlRGFuZ2xpbmdOb2RlcyhuLCBxdWFkdHJlZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbi5hZGogPSBBcnJheS5mcm9tKG4ubmVpZ2hib3JzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMubm9kZXMgPSBxdWFkdHJlZS5kYX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0aXBseVNjYWxhcihpIC8gc3RlcHMpKTtcblxuICAgICAgICAgICAgLy8gT3JkZXIgbm9kZXMsIG5vdCBieSAnY2xvc2VuZXNzJywgYnV0IGJ5IGRvdCBwcm9kdWN0XG4gICAgICAgICAgICBsZXQgbm9kZXNUb0FkZCA9IFtdO1xuICAgICAgICAgICAgbGV0IGNsb3Nlc3ROb2RlID0gcXVhZHRyZWUuZmluZChjdXJyZW50UG9pbnQueCwgY3VycmVudFBvaW50LnksIHJhZGl1cyArIHN0ZXAvMik7XG5cbiAgICAgICAgICAgIHdoaWxlIChjbG9zZXN0Tm9kZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgcXVhZHRyZWUucmVtb3ZlKGNsb3Nlc3ROb2RlKTtcbiAgICAgICAgICAgICAgICBmb3VuZE5vZGVzLnB1c2goY2xvc2VzdE5vZGUpO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGxldCBub2RlT25TZWdtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgcyBvZiBjbG9zZXN0Tm9kZS5zZWdtZW50cykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5mdXp6eVNlZ21lbnRzRXF1YWwocywgc2VnbWVudCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVPblNlZ21lbnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAobm9kZU9uU2VnbWVudCkge1xuICAgICAgICAgICAgICAgICAgICBub2Rlc1RvQWRkLnB1c2goY2xvc2VzdE5vZGUpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNsb3Nlc3ROb2RlID0gcXVhZHRyZWUuZmluZChjdXJyZW50UG9pbnQueCwgY3VycmVudFBvaW50LnksIHJhZGl1cyArI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AgY29uc3QgcmFkaXVzID0gTWF0aC5jZWlsKChkaXN0YW5jZS90aGlzLmRzZXApIC0gMC41KTtcbiAgICAgICAgY29uc3QgY29vcmRzID0gdGhpcy5nZXRTYW1wbGVDb29yZHModik7XG4gICAgICAgIGNvbnN0IG91dDogVmVjdG9yW10gPSBbXTtcbiAgICAgICAgZm9yIChsZXQgeCA9IC0xICogcmFkaXVzOyB4IDw9IDEgKiByYWRpdXM7IHgrKykge1xuICAgICAgICAgICAgZm9yIChsZXQgeSA9IC0xICogcmFkaXVzOyB5IDw9IDEgKiByYWRpdXM7IHkrKykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGNlbGwgPSBjb29yZHMuY2xvbmUoKS5hZGQobmV3IFZlY3Rvcih4LCB5KSk7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLnZlY3Rvck91dE9mQm91bmRzKGNlbGwsIHRoaXMuZ3JpZERpbWVuc2lvbnMpKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3QgdjIgb2YgdGhpcy5ncmlkW2NlbGwueF1bY2VsbC55XSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3V0LnB1c2godjIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG91dDtcbiAgICB9XG5cbiAgICBwcml2YXRlIHdvcmxkVG9HcmlkKHY6IFZlY3Rvcik6IFZlY3RvciB7XG4gICAgICAgIHJldHVybiB2LmNsb25lKCkuc3ViKHRoaXMub3JpZ2luKTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGdyaWRUb1dvcmxkKHY6IFZlY3Rvcik6IFZlY3RvciB7XG4gICAgICAgIHJldHVybiB2LmNsb25lKCkuYWRkKHRoaXMub3JpZ2luKTtcbiAgICB9XG5cbiAgICBwcml2YXRlIHZlY3Rvck91dE9mQm91bmRzKGdyaWRWOiBWZWN0b3IsIGJvdW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dvbnM7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5fcG9seWdvbnM7XG4gICAgfVxuXG4gICAgcmVzZXQoKTogdm9pZCB7XG4gICAgICAgIHRoaXMudG9TaHJpbmsgPSBbXTtcbiAgICAgICAgdGhpcy50b0RpdmlkZSA9IFtdO1xuICAgICAgICB0aGlzLl9wb2x5Z29ucyA9IFtdO1xuICAgICAgICB0aGlzLl9zaHJ1bmtQb2x5Z29ucyA9IFtdXG4gICAgICAgIHRoaXMuX2RpdmlkZWRQb2x5Z29ucyA9IFtdO1xuICAgIH1cblxuICAgIHVwZGF0ZSgpOiBib29sZWFuIHtcbiAgICAgICAgbGV0IGNoYW5nZSA9IGZhbHNlO1xuICAgICAgICBpZiAodGhpcy50b1Nocmluay5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICBjb25zdCByZXNvbHZlID0gdGhpcy50b1Nocmluay5sZW5ndGggPT09IDE7XG4gICAgICAgICAgICBpZiAodGhpcy5zdGVwU2hyaW5rKHRoaXMudG9TaHJpbmsucG9wKCkpKSB7XG4gICAgICAgICAgICAgICAgY2hhbmdlID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHJlc29sdmUpIHRoaXMucmVzb2x2ZVNocmluaygpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMudG9EaXZpZGUubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgY29uc3QgcmVzb2x2ZSA9IHRoaXMudG9EaXZpZGUubGVuZ3RoID09PSAxO1xuICAgICAgICAgICAgaWYgKHRoaXMuc3RlcERpdmlkZSh0aGlzLnRvRGl2aWRlLnBvcCgpKSkge1xuICAgICAgICAgICAgICAgIGNoYW5nZSA9IHRydWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChyZXNvbHZlKSB0aGlzLnJlc29sdmVEaXZpZGUoKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gY2hhbmdlO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFByb3Blcmx5IHNocmluayBwb2x5Z29uIHNvIHRoZSBlZGdlcyBhcmUgYWxsIHRoZSBzYW1lIGRpc3RhbmNlIGZyb20gdGhlIHJvYWRcbiAgICAgKi9cbiAgICBhc3luYyBzaHJpbmsoYW5pbWF0ZT1mYWxzZSk6IFByb21pc2U8dm9pZD4ge1xuICAgICAgICByZXR1cm4gbmV3IFByb21pc2U8dm9pZD4ocmVzb2x2ZSA9PiB7XG4gICAgICAgICAgICBpZiAodGhpcy5fcG9seWdvbnMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5maW5kUG9seWdvbnMoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKGFuaW1hdGUpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5fcG9seWdvbnMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMudG9TaHJpbmsgPSB0aGlzLl9wb2x5Z29ucy5zbGljZSgpO1xuICAgICAgICAgICAgICAgIHRoaXMucmVzb2x2ZVNocmluayA9IHJlc29sdmU7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuX3NocnVua1BvbHlnb25zID0gW107XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBwIG9mIHRoaXMuX3BvbHlnb25zKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc3RlcFNocmluayhwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBwcml2YXRlIHN0ZXBTaHJpbmsocG9seWdvbjogVmVjdG9yW10pOiBib29sZWFuIHtcbiAgICAgICAgY29uc3Qgc2hydW5rID0gUG9seWdvblV0aWwucmVzaXplR2VvbWV0cnkocG9seWdvbiwgLXRoaXMucGFyYW1zLnNocmlua1NwYWNpbmcpO1xuICAgICAgICBpZiAoc2hydW5rLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHRoaXMuX3NocnVua1BvbHlnb25zLnB1c2goc2hydW5rKVxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIGFzeW5jIGRpdmlkZShhbmltYXRlPWZhbHNlKTogUHJvbWlzZTx2b2lkPiB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTx2b2lkPihyZXNvbHZlID0+IHtcbiAgICAgICAgICAgIGlmICh0aGlzLl9wb2x5Z29ucy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmZpbmRQb2x5Z29ucygpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsZXQgcG9seWdvbnMgPSB0aGlzLl9wb2x5Z29ucztcbiAgICAgICAgICAgIGlmICh0aGlzLl9zaHJ1bmtQb2x5Z29ucy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgcG9seWdvbnMgPSB0aGlzLl9zaHJ1bmtQb2x5Z29ucztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGFuaW1hdGUpIHtcbiAgICAgICAgICAgICAgICBpZiAocG9seWdvbnMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMudG9EaXZpZGUgPSBwb2x5Z29ucy5zbGljZSgpO1xuICAgICAgICAgICAgICAgIHRoaXMucmVzb2x2ZURpdmlk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Bwb2x5Z29uLmxlbmd0aF07XG5cbiAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gY3VycmVudC5hZGouaW5kZXhPZihuZXh0KTtcbiAgICAgICAgICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudC5hZGouc3BsaWNlKGluZGV4LCAxKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbG9nLmVycm9yKFwiUG9seWdvbkZpbmRlciAtIG5vZGUgbm90IGluIGFkalwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgcmVjdXJzaXZlV2Fsayh2aXNpdGVkOiBOb2RlW10sIGNvdW50PTApOiBOb2RlW10ge1xuICAgICAgICBpZiAoY291bnQgPj0gdGhpcy5wYXJhbXMubWF4TGVuZ3RoKSByZXR1cm4gbnVsbDtcbiAgICAgICAgLy8gVE9ETyBiYWNrdHJhY2tpbmcgdG8gZmluZCBwb2x5Z29ucyB3aXRoIGRlYWQgZW5kIHJvYWRzIGluc2lkZSB0aGVtXG4gICAgICAgIGNvbnN0IG5leHROb2RlID0gdGhpcy5nZXRSaWdodG1vc3ROb2RlKHZpc2l0ZWRbdmlzaXRlZC5sZW5ndGggLSAyXSwgdmlzaXRlZFt2aXNpdGVkLmxlbmd0aCAtIDFdKTtcbiAgICAgICAgaWYgKG5leHROb2RlID09PSBudWxsKSB7XG4gICAgICAgICAgICByZXR1cm4gbnVsbDsgIC8vIEN1cnJlbnRseSBpZ25vcmVzIHBvbHlnb25zIHdpdGggZGVhZCBlbmQgaW5zaWRlXG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB2aXNpdGVkSW5kZXggPSB2aXNpdGVkLmluZGV4T2YobmV4dE5vZGUpO1xuICAgICAgICBpZiAodmlzaXRlZEluZGV4ID49IDApIHtcbiAgICAgICAgICAgIHJldHVybiB2aXNpdGVkLnNsaWNlKHZpc2l0ZWRJbmRleCk7X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uICAgICAgICAgICAgb3JpZ2luLnggKyB3b3JsZERpbWVuc2lvbnMueCwgb3JpZ2luLnksXG4gICAgICAgICAgICBvcmlnaW4ueCArIHdvcmxkRGltZW5zaW9ucy54LCBvcmlnaW4ueSArIHdvcmxkRGltZW5zaW9ucy55LFxuICAgICAgICAgICAgb3JpZ2luLngsIG9yaWdpbi55ICsgd29ybGREaW1lbnNpb25zLnksXG4gICAgICAgIF07XG4gICAgICAgIGNvbnN0IHNsaWNlZCA9IFBvbHlLLlNsaWNlKHJlY3RhbmdsZSwgcDEueCwgcDEueSwgcDIueCwgcDIueSkubWFwKHAgPT4gUG9seWdvblV0aWwucG9seWdvbkFycmF5VG9Qb2x5Z29uKHApKTtcbiAgICAgICAgY29uc3QgbWluQXJlYSA9IFBvbHlnb25VdGlsLmNhbGNQb2x5Z29uQXJlYShzbGljZWRbMF0pO1xuXG4gICAgICAgIGlmIChzbGljZWQubGVuZ3RoID4gMSAmJiBQb2x5Z29uVXRpbC5jYWxjUG9seWdvbkFyZWEoc2xpY2VkWzFdKSA8IG1pbkFyZWEpIHtcbiAgICAgICAgICAgIHJldHVybiBzbGljZWRbMV07XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gc2xpY2VkWzBdO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFVzZWQgdG8gY3JlYXRlIHNlYSBwb2x5Z29uXG4gICAgICovXG4gICAgcHVibGljIHN0YXRpYyBsaW5lUmVjdGFuZ2xlUG9seWdvbkludGVyc2VjdGlvbihvcmlnaW46IFZlY3Rvciwgd29ybGREaW1lbnNpb25zOiBWZWN0b3IsIGxpbmU6IFZlY3RvcltdKTogVmVjdG9yW10ge1xuICAgICAgICBjb25zdCBqc3RzTGluZSA9IFBvbHlnb25VdGlsLmxpbmVUb0p0cyhsaW5lKTtcbiAgICAgICAgY29uc3QgYm91bmRzID0gW1xuICAgICAgICAgICAgb3JpZ2luLFxuICAgICAgICAgICAgbmV3IFZlY3RvcihvcmlnaW4ueCArIHdvcmxkRGltZW5zaW9ucy54LCBvcmlnaW4ueSksXG4gICAgICAgICAgICBuZXcgVmVjdG9yKG9yaWdpbi54ICsgd29ybGREaW1lbnNpb25zLngsIG9yaWdpbi55ICsgd29ybGREaW1lbnNpb25zLnkpLFxuICAgICAgICAgICAgbmV3IFZlY3RvcihvcmlnaW4ueCwgb3JpZ2luLnkgKyB3b3JsZERpbWVuc2lvbnMueSksXG4gICAgICAgIF07XG4gICAgICAgIGNvbnN0IGJvdW5kaW5nUG9seSA9IFBvbHlnb25VdGlsLnBvbHlnb25Ub0p0cyhib3VuZHMpO1xuICAgICAgICBjb25zdCB1bmlvbiA9IGJvdW5kaW5nUG9seS5nZXRFeHRlcmlvclJpbmcoKS51bmlvbihqc3RzTGluZSk7XG4gICAgICAgIGNvbnN0IHBvbHlnb25pemVyID0gbmV3IChqc3RzLm9wZXJhdGlvbiBhcyBhbnkpLnBvbHlnb25pemUuUG9seWdvbml6ZXIoKTtcbiAgICAgICAgcG9seWdvbml6ZXIuYWRkKHVuaW9uKTtcbiAgICAgICAgY29uc3QgcG9seWdvbnMgPSBwb2x5Z29uaXplci5nZXRQb2x5Z29ucygpO1xuXG4gICAgICAgIGxldCBzbWFsbGVzdEFyZWEgPSBJbmZpbml0eTtcbiAgICAgICAgbGV0IHNtYWxsZXN0UG9seTtcbiAgICAgICAgZm9yIChsZXQgaSA9IHBvbHlnb25zLml0ZXJhdG9yKCk7IGkuaGFzTmV4dCgpOykge1xuICAgICAgICAgICAgY29uc3QgcG9seWdvbiA9IGkubmV4dCgpO1xuICAgICAgICAgICAgY29uc3QgYXJlYSA9IHBvbHlnb24uZ2V0QXJlYSgpO1xuICAgICAgICAgICAgaWYgKGFyZWEgPCBzbWFsbGVzdEFyZWEpIHtcbiAgICAgICAgICAgICAgICBzbWFsbGVzdEFyZWEgPSBhcmVhO1xuICAgICAgICAgICAgICAgIHNtYWxsZXN0UG9seSA9IHBvbHlnb247XG4gICAgICAgICAgICB9XG4gICAgICA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bS5Qb2x5Z29uIHtcbiAgICAgICAgY29uc3QgZ2VvSW5wdXQgPSBwb2x5Z29uLm1hcCh2ID0+IG5ldyBqc3RzLmdlb20uQ29vcmRpbmF0ZSh2LngsIHYueSkpO1xuICAgICAgICBnZW9JbnB1dC5wdXNoKGdlb0lucHV0WzBdKTsgIC8vIENyZWF0ZSBsb29wXG4gICAgICAgIHJldHVybiBQb2x5Z29uVXRpbC5nZW9tZXRyeUZhY3RvcnkuY3JlYXRlUG9seWdvbihQb2x5Z29uVXRpbC5nZW9tZXRyeUZhY3RvcnkuY3JlYXRlTGluZWFyUmluZyhnZW9JbnB1dCksIFtdKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBbIHYueCwgdi55LCB2LngsIHYueSBdLi4uXG4gICAgICovXG4gICAgcHJpdmF0ZSBzdGF0aWMgcG9seWdvblRvUG9seWdvbkFycmF5KHA6IFZlY3RvcltdKTogbnVtYmVyW10ge1xuICAgICAgICBjb25zdCBvdXRQOiBudW1iZXJbXSA9IFtdO1xuICAgICAgICBmb3IgKGNvbnN0IHYgb2YgcCkge1xuICAgICAgICAgICAgb3V0UC5wdXNoKHYueCk7XG4gICAgICAgICAgICBvdXRQLnB1c2godi55KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb3V0UDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBbIHYueCwgdi55LCB2LngsIHYueSBdLi4uXG4gICAgICovXG4gICAgcHJpdmF0ZSBzdGF0aWMgcG9seWdvbkFycmF5VG9Qb2x5Z29uKHA6IG51bWJlcltdKTogVmVjdG9yW10ge1xuICAgICAgICBjb25zdCBvdXRQID0gW107XG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcC5sZW5ndGggLyAyOyBpKyspIHtcbiAgICAgICAgICAgIG91dFAucHVzaChuZXcgVmVjdG9yKHBbMippXSwgcFsyKmkgKyAxXSkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvdXRQO1xuICAgIH1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saW5lc1NpbXBsZSA9IFtdO1xuICAgICAgICB0aGlzLnN0cmVhbWxpbmVzTWFqb3IgPSBbXTtcbiAgICAgICAgdGhpcy5zdHJlYW1saW5lc01pbm9yID0gW107XG4gICAgICAgIHRoaXMuYWxsU3RyZWFtbGluZXMgPSBbXTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBFZGl0cyBzdHJlYW1saW5lc1xuICAgICAqL1xuICAgIGpvaW5EYW5nbGluZ1N0cmVhbWxpbmVzKCk6IHZvaWQge1xuICAgICAgICAvLyBUT0RPIGRvIGluIHVwZGF0ZSBtZXRob2RcbiAgICAgICAgZm9yIChjb25zdCBtYWpvciBvZiBbdHJ1ZSwgZmFsc2VdKSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IHN0cmVhbWxpbmUgb2YgdGhpcy5zdHJlYW1saW5lcyhtYWpvcikpIHtcbiAgICAgICAgICAgICAgICAvLyBJZ25vcmUgY2lyY2xlc1xuICAgICAgICAgICAgICAgIGlmIChzdHJlYW1saW5lWzBdLmVxdWFscyhzdHJlYW1saW5lW3N0cmVhbWxpbmUubGVuZ3RoIC0gMV0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IG5ld1N0YXJ0ID0gdGhpcy5nZXRCZXN0TmV4dFBvaW50KHN0cmVhbWxpbmVbMF0sIHN0cmVhbWxpbmVbNF0sIHN0cmVhbWxpbmUpXG4gICAgICAgICAgICAgICAgaWYgKG5ld1N0YXJ0ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3QgcCBvZiB0aGlzLnBvaW50c0JldHdlZW4oc3RyZWFtbGluZVswXSwgbmV3U3RhcnQsIHRoaXMucGFyYW1zLmRzdGVwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtbGluZS51bnNoaWZ0KHApO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ncmlkKG1ham9yKS5hZGRTYW1wbGUocCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBuZXdFbmQgPSB0aGlzLmdldEJlc3ROZXh0UG9pbnQoc3RyZWFtbGluZVtzdHJlYW1saW5lLmxlbmd0aCAtIDFdLCBzdHJlYW1saW5lW3N0cmVhbWxpbmUubGVuZ3RoIC0gNF0sIHN0cmVhbWxpbmUpO1xuICAgICAgICAgICAgICAgIGlmIChuZXdFbmQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBwIG9mIHRoaXMucG9pbnRzQmV0d2VlbihzdHJlYW1saW5lW3N0cmVhbWxpbmUubGVuZ3RoIC0gMV0sIG5ld0VuZCwgdGhpcy5wYXJhbXMuZHN0ZXApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW1saW5lLnB1c2gocCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmdyaWQobWFqb3IpLmFkZFNhbXBsZShwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFJlc2V0IHNpbXBsaWZpZWQgc3RyZWFtbGluZXNcbiAgICAgICAgdGhpcy5hbGxTdHJlYW1saW5lc1NpbXBsZSA9IFtdO1xuICAgICAgICBmb3IgKGNvbnN0IHMgb2YgdGhpcy5hbGxTdHJlYW1saW5lcykge1xuICAgICAgICAgICAgdGhpcy5hbGxTdHJlYW1saW5lc1NpbXBsZS5wdXNoKHRoaXMuc2ltcGxpZnlTdHJlYW1saW5lKHMpKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgYXJyYXkgb2YgcG9pbnRzIGZyb20gdjEgdG8gdjIgc3VjaCB0aGF0IHRoZXkgYXJlIHNlc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zXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvLyBBY3V0ZSBhbmdsZSBiZXR3ZWVuIHZlY3RvcnMgKGFnbm9zdGljIG9mIENXLCBBQ1cpXG4gICAgICAgICAgICAgICAgY29uc3QgZGlzdGFuY2VUb1NhbXBsZSA9IHBvaW50LmRpc3RhbmNlVG9TcXVhcmVkKHNhbXBsZSk7XG4gICAgICAgICAgICAgICAgaWYgKGRpc3RhbmNlVG9TYW1wbGUgPCAyICogdGhpcy5wYXJhbXNTcS5kc3RlcCkge1xuICAgICAgICAgICAgICAgICAgICBjbG9zZXN0U2FtcGxlID0gc2FtcGxlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgYW5nbGVCZXR3ZWVuID0gTWF0aC5hYnMoVmVjdG9yLmFuZ2xlQmV0d2VlbihkaXJlY3Rpb24sIGRpZmZlcmVuY2VWZWN0b3IpKTtcblxuICAgICAgICAgICAgICAgIC8vIEZpbHRlciBieSBhbmdsZVxuICAgICAgICAgICAgICAgIGlmIChhbmdsZUJldHdlZW4gPCB0aGlzLnBhcmFtcy5qb2luYW5nbGUgJiYgZGlzdGFuY2VUb1NhbXBsZSA8IGNsb3Nlc3REaXN0YW5jZSkge1xuICAgICAgICAgICAgICAgICAgICBjbG9zZXN0RGlzdGFuY2UgPSBkaXN0YW5jZVRvU2FtcGxlO1xuICAgICAgICAgICAgICAgICAgICBjbG9zZXN0U2FtcGxlID0gc2FtcGxlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFRPRE8gaXMgcmVpbXBsZW1lbnQgc2ltcGxpZnktanMgdG8gcHJlc2VydmUgaW50ZXJzZWN0aW9uIHBvaW50c1xuICAgICAgICAvLyAgLSB0aGlzI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uIHtcbiAgICAgICAgaWYgKCF0aGlzLnN0cmVhbWxpbmVzRG9uZSkge1xuICAgICAgICAgICAgdGhpcy5sYXN0U3RyZWFtbGluZU1ham9yID0gIXRoaXMubGFzdFN0cmVhbWxpbmVNYWpvcjtcbiAgICAgICAgICAgIGlmICghdGhpcy5jcmVhdGVTdHJlYW1saW5lKHRoaXMubGFzdFN0cmVhbWxpbmVNYWpvcikpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnN0cmVhbWxpbmVzRG9uZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBBbGwgYXQgb25jZSAtIHdpbGwgZnJlZXplIGlmIGRzZXAgc21hbGxcbiAgICAgKi9cbiAgICBhc3luYyBjcmVhdGVBbGxTdHJlYW1saW5lcyhhbmltYXRlPWZhbHNlKTogUHJvbWlzZTx2b2lkPiB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTx2b2lkPihyZXNvbHZlID0+IHtcbiAgICAgICAgICAgIHRoaXMucmVzb2x2ZSA9IHJlc29sdmVcbiAgICAgICAgICAgIHRoaXMuc3RyZWFtbGluZXNEb25lID0gZmFsc2U7XG5cbiAgICAgICAgICAgIGlmICghYW5pbWF0ZSkge1xuICAgICAgICAgICAgICAgIGxldCBtYWpvciA9IHRydWU7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHRoaXMuY3JlYXRlU3RyZWFtbGluZShtYWpvcikpIHtcbiAgICAgICAgICAgICAgICAgICAgbWFqb3IgPSAhbWFqb3I7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KS50aGVuKCgpID0+IHRoaXMuam9pbkRhbmdsaW5nU3RyZWFtbGluZXMoKSk7XG4gICAgfVx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b2ludC5jbG9uZSgpLmFkZChuZXh0RGlyZWN0aW9uKTtcblxuICAgICAgICAgICAgLy8gVmlzdWFsaXNlIHN0b3BwaW5nIHBvaW50c1xuICAgICAgICAgICAgLy8gaWYgKHRoaXMuc3RyZWFtbGluZVR1cm5lZChwYXJhbXMuc2VlZCwgcGFyYW1zLm9yaWdpbmFsRGlyLCBuZXh0UG9pbnQsIG5leHREaXJlY3Rpb24pKSB7XG4gICAgICAgICAgICAvLyAgICAgcGFyYW1zLnZhbGlkID0gZmFsc2U7XG4gICAgICAgICAgICAvLyAgICAgcGFyYW1zLnN0cmVhbWxpbmUucHVzaChWZWN0b3IuemVyb1ZlY3RvcigpKTtcbiAgICAgICAgICAgIC8vIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMucG9pbnRJbkJvdW5kcyhuZXh0UG9pbnQpXG4gICAgICAgICAgICAgICAgJiYgdGhpcy5pc1ZhbGlkU2FtcGxlKG1ham9yLCBuZXh0UG9pbnQsIHRoaXMucGFyYW1zU3EuZHRlc3QsIGNvbGxpZGVCb3RoKVxuICAgICAgICAgICAgICAgICYmICF0aGlzLnN0cmVhbWxpbmVUdXJuZWQocGFyYW1zLnNlZWQsIHBhcmFtcy5vcmlnaW5hbERpciwgbmV4dFBvaW50LCBuZXh0RGlyZWN0aW9uKSkge1xuICAgICAgICAgICAgICAgIHBhcmFtcy5wcmV2aW91c1BvaW50ID0gbmV4dFBvaW50O1xuICAgICAgICAgICAgICAgIHBhcmFtcy5wcmV2aW91c0RpcmVjdGlvbiA9IG5leHREaXJlY3Rpb247XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIE9uZSBtb3JlIHN0ZXBcbiAgICAgICAgICAgICAgICBwYXJhbXMuc3RyZWFtbGluZS5wdXNoKG5leHRQb2ludCk7XG4gICAgICAgICAgICAgICAgcGFyYW1zLnZhbGlkID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiA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XIge1xuICAgICAgICBpZiAodGhpcy5vbGRUaGV0YSkge1xuICAgICAgICAgICAgdGhpcy5fdGhldGEgPSB0aGlzLmNhbGN1bGF0ZVRoZXRhKCk7XG4gICAgICAgICAgICB0aGlzLm9sZFRoZXRhID0gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5fdGhldGE7XG4gICAgfVxuXG4gICAgYWRkKHRlbnNvcjogVGVuc29yKTogVGVuc29yIHtcbiAgICAgICAgdGhpcy5tYXRyaXggPSB0aGlzLm1hdHJpeC5tYXAoKHYsIGkpID0+IHYgKiB0aGlzLnIgKyB0ZW5zb3IubWF0cml4W2ldICogdGVuc29yLnIpO1xuICAgICAgICB0aGlzLnIgPSBNYXRoLmh5cG90KC4uLnRoaXMubWF0cml4KTtcbiAgICAgICAgdGhpcy5tYXRyaXggPSB0aGlzLm1hdHJpeC5tYXAodiA9PiB2IC8gdGhpcy5yKTtcbiAgICAgICAgdGhpcy5vbGRUaGV0YSA9IHRydWU7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIHNjYWxlKHM6IG51bWJlcik6IFRlbnNvciB7XG4gICAgICAgIHRoaXMuciAqPSBzO1xuICAgICAgICB0aGlzLm9sZFRoZXRhID0gdHJ1ZTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgLy8gUmFkaWFuc1xuICAgIHJvdGF0ZSh0aGV0YTogbnVtYmVyKTogVGVuc29yIHtcbiAgICAgICAgaWYgKHRoZXRhID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgICAgICBsZXQgbmV3VGhldGEgPSB0aGlzLnRoZXRhICsgdGhldGE7XG4gICAgICAgIGlmIChuZXdUaGV0YSA8IE1hdGguUEkpIHtcbiAgICAgICAgICAgIG5ld1RoZXRhICs9IE1hdGguUEk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobmV3VGhldGEgPj0g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3JpdmVyUG9seWdvbjogVmVjdG9yW10gPSBbXTsgLy8gU2ltcGxpZmllZFxuICAgIHByaXZhdGUgX3JpdmVyU2Vjb25kYXJ5Um9hZDogVmVjdG9yW10gPSBbXTtcblxuICAgIGNvbnN0cnVjdG9yKGludGVncmF0b3I6IEZpZWxkSW50ZWdyYXRvcixcbiAgICAgICAgICAgICAgICBvcmlnaW46IFZlY3RvcixcbiAgICAgICAgICAgICAgICB3b3JsZERpbWVuc2lvbnM6IFZlY3RvcixcbiAgICAgICAgICAgICAgICBwcm90ZWN0ZWQgcGFyYW1zOiBXYXRlclBhcmFtcyxcbiAgICAgICAgICAgICAgICBwcml2YXRlIHRlbnNvckZpZWxkOiBUZW5zb3JGaWVsZCkge1xuICAgICAgICBzdXBlcihpbnRlZ3JhdG9yLCBvcmlnaW4sIHdvcmxkRGltZW5zaW9ucywgcGFyYW1zKTtcbiAgICB9XG5cbiAgICBnZXQgY29hc3RsaW5lKCk6IFZlY3RvcltdIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX2NvYXN0bGluZTtcbiAgICB9XG5cbiAgICBnZXQgc2VhUG9seWdvbigpOiBWZWN0b3JbXSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9zZWFQb2x5Z29uO1xuICAgIH1cblxuICAgIGdldCByaXZlclBvbHlnb24oKTogVmVjdG9yW10ge1xuICAgICAgICByZXR1cm4gdGhpcy5fcml2ZXJQb2x5Z29uO1xuICAgIH1cblxuICAgIGdldCByaXZlclNlY29uZGFyeVJvYWQoKTogVmVjdG9yW10ge1xuICAgICAgICByZXR1cm4gdGhpcy5fcml2ZXJTZWNvbmRhcnlSb2FkO1xuICAgIH1cblxuICAgIGNyZWF0ZUNvYXN0KCk6IHZvaWQge1xuICAgICAgICBsZXQgY29hc3RTdHJlYW1saW5lO1xuICAgICAgICBsZXQgc2VlZDtcbiAgICAgICAgbGV0IG1ham9yO1xuXG4gICAgICAgIGlmICh0aGlzLnBhcmFtcy5jb2FzdE5vaXNl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FJVElORzoge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgTW9kZWxHZW5lcmF0b3JTdGF0ZXMuU1VCVFJBQ1RfT0NFQU46IHtcbiAgICAgICAgICAgICAgICBjb25zdCBzZWFMZXZlbE1lc2ggPSB0aGlzLnBvbHlnb25Ub01lc2godGhpcy5ncm91bmQsIDApO1xuICAgICAgICAgICAgICAgIHRoaXMudGhyZWVUb0JsZW5kZXIoc2VhTGV2ZWxNZXNoKTtcbiAgICAgICAgICAgICAgICBjb25zdCBzZWFMZXZlbFNUTCA9IHRoaXMuZXhwb3J0U1RMLmZyb21NZXNoKHNlYUxldmVsTWVzaCk7XG4gICAgICAgICAgICAgICAgdGhpcy56aXAuZmlsZShcIm1vZGVsL2RvbWFpbi5zdGxcIiwgc2VhTGV2ZWxTVEwpO1xuXG4gICAgICAgICAgICAgICAgY29uc3Qgc2VhTWVzaCA9IHRoaXMucG9seWdvblRvTWVzaCh0aGlzLnNlYSwgMCk7XG4gICAgICAgICAgICAgICAgdGhpcy50aHJlZVRvQmxlbmRlcihzZWFNZXNoKTtcbiAgICAgICAgICAgICAgICBjb25zdCBzZWFNZXNoU1RMID0gdGhpcy5leHBvcnRTVEwuZnJvbU1lc2goc2VhTWVzaCk7XG4gICAgICAgICAgICAgICAgdGhpcy56aXAuZmlsZShcIm1vZGVsL3NlYS5zdGxcIiwgc2VhTWVzaFNUTCk7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZShNb2RlbEdlbmVyYXRvclN0YXRlcy5BRERfQ09BU1RMSU5FKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgTW9kZWxHZW5lcmF0b3JTdGF0ZXMuQUREX0NPQVNUTElORToge1xuICAgICAgICAgICAgICAgIGNvbnN0IGNvYXN0bGluZU1lc2ggPSB0aGlzLnBvbHlnb25Ub01lc2godGhpcy5jb2FzdGxpbmUsIDApO1xuICAgICAgICAgICAgICAgIHRoaXMudGhyZWVUb0JsZW5kZXIoY29hc3RsaW5lTWVzaCk7XG4gICAgICAgICAgICAgICAgY29uc3QgY29hc3RsaW5lU1RMID0gdGhpcy5leHBvcnRTVEwuZnJvbU1lc2goY29hc3RsaW5lTWVzaCk7XG4gICAgICAgICAgICAgICAgdGhpcy56aXAuZmlsZShcIm1vZGVsL2NvYXN0bGluZS5zdGxcIiwgY29hc3RsaW5lU1RMKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKE1vZGVsR2VuZXJhdG9yU3RhdGVzLlNVQlRSQUNUX1JJVkVSKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgTW9kZWxHZW5lcmF0b3JTdGF0ZXMuU1VCVFJBQ1RfUklWRVI6IHtcbiAgICAgICAgICAgICAgICBjb25zdCByaXZlck1lc2ggPSB0aGlzLnBvbHlnb25Ub01lc2godGhpcy5yaXZlciwgMCk7XG4gICAgICAgICAgICAgICAgdGhpcy50aHJlZVRvQmxlbmRlcihyaXZlck1lc2gpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHJpdmVyU1RMID0gdGhpcy5leHBvcnRTVEwuZnJvbU1lc2gocml2ZXJNZXNoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnppcC5maWxlKFwibW9kZWwvcml2ZXIuc3RsXCIsIHJpdmVyU1RMKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKE1vZGVsR2VuZXJhdG9yU3RhdGVzLkFERF9ST0FEUyk7XG4gICAgICAgICAgICAgICAgdGhpcy5wb2x5Z29uc1RvUHJvY2VzcyA9IHRoaXMubWlub3JSb2Fkcy5jb25jYXQodGhpcy5tYWpvclJvYWRzKS5jb25jYXQodGhpcy5tYWluUm9hZHMpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBNb2RlbEdlbmVyYXRvclN0YXRlcy5BRERfUk9BRFM6IHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wb2x5Z29uc1RvUHJvY2Vzcy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWVzaCA9IG5ldyBUSFJFRS5NZXNoKHRoaXMucm9hZHNHZW9tZXRyeSk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGhyZWVUb0JsZW5kZXIobWVzaCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGJ1aWxkaW5nc1NUTCA9IHRoaXMuZXhwb3J0U1RMLmZyb21NZXNoKG1lc2gpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnppcC5maWxlKFwibW9kZWwvcm9hZHMuc3RsXCIsIGJ1aWxkaW5nc1NUTCk7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKE1vZGVsR2VuZXJhdG9yU3RhdGVzLkFERF9CTE9DS1MpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBvbHlnb25zVG9Qcm9jZXNzID0gWy4uLnRoaXMuYmxvY2tzXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3Qgcm9hZCA9IHRoaXMucG9seWdvbnNUb1Byb2Nlc3MucG9wKCk7XG4gICAgICAgICAgICAgICAgY29uc3Qgcm9hZHNNZXNoID0gdGhpcy5wb2x5Z29uVG9NZXNoKHJvYWQsIDApO1xuICAgICAgICAgICAgICAgIHRoaXMucm9hZHNHZW9tZXRyeS5tZXJnZShyb2Fkc01lc2guZ2VvbWV0cnkgYXMgVEhSRUUuR2VvbWV0cnksIHRoaXMuZ3JvdW5kTWVzaC5tYXRyaXgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBNb2RlbEdlbmVyYXRvclN0YXRlcy5BRERfQkxPQ0tTOiB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucG9seWdvbnNUb1Byb2Nlc3MubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG1lc2ggPSBuZXcgVEhSRUUuTWVzaCh0aGlzLmJsb2Nrc0dlb21ldHJ5KTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50aHJlZVRvQmxlbmRlcihtZXNoKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYmxvY2tzU1RMID0gdGhpcy5leHBvcnRTVEwuZnJvbU1lc2gobWVzaCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuemlwLmZpbGUoXCJtb2RlbC9ibG9ja3Muc3RsXCIsIGJsb2Nrc1NUTCk7XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZShNb2RlbEdlbmVyYXRvclN0YXRlcy5BRERfQlVJTERJTkdTKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5idWlsZGluZ3NUb1Byb2Nlc3MgPSBbLi4udGhpcy5idWlsZGluZ3NdO1xuICAgICAgICAgICAgICAgICAgICBicmVhazsgXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3QgYmxvY2sgPSB0aGlzLnBvbHlnb25zVG9Qcm9jZXNzLnBvcCgpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGJsb2NrTWVzaCA9IHRoaXMucG9seWdvblRvTWVzaChibG9jaywgMSk7XG4gICAgICAgICAgICAgICAgdGhpcy5ibG9ja3NHZW9tZXRyeS5tZXJnZShibG9ja01lc2guZ2VvbWV0cnkgYXMgVEhSRUUuR2VvbWV0cnksIHRoaXMuZ3JvdW5kTWVzaC5tYXRyaXgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBNb2RlbEdlbmVyYXRvclN0YXRlcy5BRERfQlVJTERJTkdTOiB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuYnVpbGRpbmdzVG9Qcm9jZXNzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXNoID0gbmV3IFRIUkVFLk1lc2godGhpcy5idWlsZGluZ3NHZW9tZXRyeSk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGhyZWVUb0JsZW5kZXIobWVzaCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGJ1aWxkaW5nc1NUTCA9IHRoaXMuZXhwb3J0U1RMLmZyb21NZXNoKG1lc2gpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnppcC5maWxlKFwibW9kZWwvYnVpbGRpbmdzLnN0bFwiLCBidWlsZGluZ3NTVEwpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKE1vZGVsR2VuZXJhdG9yU3RhdGVzLkNSRUFURV9aSVApO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBiID0gdGhpcy5idWlsZGluZ3NUb1Byb2Nlc3MucG9wKCk7XG4gICAgICAgICAgICAgICAgY29uc3QgYnVpbGRpbmdNZXNoID0gdGhpcy5wb2x5Z29uVG9NZXNoKGIubG90U2NyZWVuLCBiLmhlaWdodCk7XG4gICAgICAgICAgICAgICAgdGhpcy5idWlsZGluZ3NHZW9tZXRyeS5tZXJnZShidWlsZGluZ01lc2guZ2VvbWV0cnkgYXMgVEhSRUUuR2VvbWV0cnksIHRoaXMuZ3JvdW5kTWVzaC5tYXRyaXgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBNb2RlbEdlbmVyYXRvclN0YXRlcy5DUkVBVEVfWklQOiB7XG4gICAgICAgICAgICAgICAgdGhpcy56aXAuZ2VuZ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cmRhbmFgO1xuICAgICAgICB0aGlzLmN0eC50ZXh0QWxpZ24gPSBcImNlbnRlclwiO1xuICAgICAgICB0aGlzLmN0eC5maWxsVGV4dChcInNhbiBmcmFuY2lzY29cIiwgdGhpcy5fd2lkdGgvMiwgdGhpcy5faGVpZ2h0IC0gKDgwICogdGhpcy5fc2NhbGUgLSBmb250U2l6ZSkpO1xuICAgIH1cblxuICAgIGRyYXdSZWN0YW5nbGUoeDogbnVtYmVyLCB5OiBudW1iZXIsIHdpZHRoOiBudW1iZXIsIGhlaWdodDogbnVtYmVyKTogdm9pZCB7XG4gICAgICAgIGlmICh0aGlzLl9zY2FsZSAhPT0gMSkge1xuICAgICAgICAgICAgeCAqPSB0aGlzLl9zY2FsZTtcbiAgICAgICAgICAgIHkgKj0gdGhpcy5fc2NhbGU7XG4gICAgICAgICAgICB3aWR0aCAqPSB0aGlzLl9zY2FsZTtcbiAgICAgICAgICAgIGhlaWdodCAqPSB0aGlzLl9zY2FsZTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmN0eC5maWxsUmVjdCh4LCB5LCB3aWR0aCwgaGVpZ2h0KTtcblxuICAgICAgICBpZiAodGhpcy5zdmcpIHtcbiAgICAgICAgICAgIHRoaXMuc3ZnLnJlY3Qoe1xuICAgICAgICAgICAgICAgIGZpbGw6IHRoaXMuY3R4LmZpbGxTdHlsZSxcbiAgICAgICAgICAgICAgICAnZmlsbC1vcGFjaXR5JzogMSxcbiAgICAgICAgICAgICAgICBzdHJva2U6IHRoaXMuY3R4LnN0cm9rZVN0eWxlLFxuICAgICAgICAgICAgICAgICdzdHJva2Utd2lkdGgnOiB0aGlzLmN0eC5saW5lV2lkdGgsXG4gICAgICAgICAgICAgICAgeDogeCxcbiAgICAgICAgICAgICAgICB5OiB5LFxuICAgICAgICAgICAgICAgIHdpZHRoOiB3aWR0aCxcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IGhlaWdodCxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZHJhd1BvbHlnb24ocG9seWdvbjogVmVjdG9yW10pOiB2b2lkIHtcbiAgICAgICAgaWYgKHBvbHlnb24ubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcG9seWdvbiA9IHRoaXMuem9vbVZlY3RvcnMocG9seWdvbik7XG5cbiAgICAgICAgdGhpcy5jdHguYmVnaW5QYXRoKCk7XG4gICAgICAgIHRoaXMuY3R4Lm1vdmVUbyhwb2x5Z29uWzBdLngsIHBvbHlnb25bMF0ueSk7XG5cbiAgICAgICAgZm9yIChsZXQgaSA9IDE7IGkgPCBwb2x5Z29uLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB0aGlzLmN0eC5saW5lVG8ocG9seWdvbltpXS54LCBwb2x5Z29uW2ldLnkpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuY3R4LmxpbmVUbyhwb2x5Z29uWzBdLngsIHBvbHlnb25bMF0ueSk7XG5cbiAgICAgICAgdGhpcy5jdHguZmlsbCgpO1xuICAgICAgICB0aGlzLmN0eC5zdHJva2UoKTtcblxuICAgICAgICBpZiAodGhpcy5zdmcpIHtcbiAgICAgICAgICAgIGNvbnN0IHZlY3RvckFycmF5ID0gcG9seWdvbi5tYXAodiA9PiBbdi54LCB2LnldKTtcbiAgICAgICAgICAgIHZlY3RvckFycmF5LnB1c2godmVjdG9yQXJyYXlbMF0pO1xuICAgICAgICAgICAgdGhpcy5zdmcucG9seWxpbmUodmVjdG9yQXJyYXkpLmF0dHIoe1xuICAgICAgICAgICAgICAgIGZpbGw6IHRoaXMuY3R4LmZpbGxTdHlsZSxcbiAgICAgICAgICAgICAgICAnZmlsbC1vcGFjaXR5JzogMSxcbiAgICAgICAgICAgICAgICBzdHJva2U6IHRoaXMuY3R4LnN0cm9rZVN0eWxlLFxuICAgICAgICAgICAgICAgICdzdHJva2Utd2lkdGgnOiB0aGlzLmN0eC5saW5lV2l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mFkZEV2ZW50TGlzdGVuZXIoJ3doZWVsJywgKGU6IGFueSk6IHZvaWQgPT4ge1xuICAgICAgICAgICAgaWYgKGUudGFyZ2V0LmlkID09PSBVdGlsLkNBTlZBU19JRCkge1xuICAgICAgICAgICAgICAgIHRoaXMubGFzdFNjcm9sbHRpbWUgPSBEYXRlLm5vdygpO1xuICAgICAgICAgICAgICAgIHRoaXMucmVmcmVzaGVkQWZ0ZXJTY3JvbGwgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBjb25zdCBkZWx0YTogbnVtYmVyID0gZS5kZWx0YVk7XG4gICAgICAgICAgICAgICAgLy8gVE9ETyBzY2FsZSBieSB2YWx1ZSBvZiBkZWx0YVxuICAgICAgICAgICAgICAgIGlmIChkZWx0YSA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy56b29tID0gdGhpcy5fem9vbSAqIHRoaXMuWk9PTV9TUEVFRDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnpvb20gPSB0aGlzLl96b29tIC8gdGhpcy5aT09NX1NQRUVEO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBVc2VkIHRvIHN0b3AgZHJhd2luZyBidWlsZGluZ3Mgd2hpbGUgc2Nyb2xsaW5nIGZvciBjZXJ0YWluIHN0eWxlc1xuICAgICAqIHRvIGtlZXAgdGhlIGZyYW1lcmF0ZSB1cFxuICAgICAqL1xuICAgIGdldCBpc1Njcm9sbGluZygpOiBib29sZWFuIHtcbiAgICAgICAgcmV0dXJuIERhdGUubm93KCkgLSB0aGlzLmxhc3RTY3JvbGx0aW1lIDwgdGhpcy5TQ1JPTExfREVMQVk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBzZXRTY3JlZW5EaW1lbnNpb25zKCk6IHZvaWQge1xuICAgICAgICB0aGlzLm1vdmVkID0gd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Hlnb25zKCk7XG4gICAgICAgIGNvbnN0IHBvbHlnb25zID0gcC5wb2x5Z29ucztcblxuICAgICAgICBpZiAodGhpcy5taW5vclJvYWRzLmFsbFN0cmVhbWxpbmVzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgLy8gQmlnIHBhcmtzIC0gYWRkIGNvbnNlY3V0aXZlIHBvbHlnb25zXG4gICAgICAgICAgICB0aGlzLmJpZ1BhcmtzID0gW107XG4gICAgICAgICAgICB0aGlzLnNtYWxsUGFya3MgPSBbXTtcbiAgICAgICAgICAgIGlmIChwb2x5Z29ucy5sZW5ndGggPiB0aGlzLm51bUJpZ1BhcmtzKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcGFya0luZGV4ID0gTWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpICogKHBvbHlnb25zLmxlbmd0aCAtIHRoaXMubnVtQmlnUGFya3MpKTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gcGFya0luZGV4OyBpIDwgcGFya0luZGV4ICsgdGhpcy5udW1CaWdQYXJrczsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYmlnUGFya3MucHVzaChwb2x5Z29uc1tpXSk7ICAgIFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5iaWdQYXJrcy5wdXNoKC4uLnBvbHlnb25zKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vIFNtYWxsIHBhcmtzXG4gICAgICAgICAgICB0aGlzLnNtYWxsUGFya3MgPSBbXTtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGhpcy5udW1TbWFsbFBhcmtzOyBpKyspIHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXJrSW5kZXggPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiBwb2x5Z29ucy5sZW5ndGgpO1x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TY2hlbWUuc2VhQ29sb3VyLFxuICAgICAgICAgICAgZmlsbFN0eWxlOiAnc29saWQnLFxuICAgICAgICAgICAgc3Ryb2tlOiBcIm5vbmVcIixcbiAgICAgICAgICAgIHN0cm9rZVdpZHRoOiAxLFxuICAgICAgICB9KTtcblxuICAgICAgICBjYW52YXMuZHJhd1BvbHlnb24odGhpcy5zZWFQb2x5Z29uKTtcblxuICAgICAgICBjYW52YXMuc2V0T3B0aW9ucyh7XG4gICAgICAgICAgICBzdHJva2U6IHRoaXMuY29sb3VyU2NoZW1lLmJnQ29sb3VyLFxuICAgICAgICAgICAgc3Ryb2tlV2lkdGg6IDMwLFxuICAgICAgICB9KTtcbiAgICAgICAgY2FudmFzLmRyYXdQb2x5bGluZSh0aGlzLmNvYXN0bGluZSk7XG5cbiAgICAgICAgY2FudmFzLnNldE9wdGlvbnMoe1xuICAgICAgICAgICAgcm91Z2huZXNzOiAwLFxuICAgICAgICAgICAgZmlsbFdlaWdodDogMSxcbiAgICAgICAgICAgIGZpbGw6IHRoaXMuY29sb3VyU2NoZW1lLnNlYUNvbG91cixcbiAgICAgICAgICAgIGZpbGxTdHlsZTogJ3NvbGlkJyxcbiAgICAgICAgICAgIHN0cm9rZTogXCJub25lXCIsXG4gICAgICAgICAgICBzdHJva2VXaWR0aDogMSxcbiAgICAgICAgfSk7XG5cbiAgICAgICAgY2FudmFzLmRyYXdQb2x5Z29uKHRoaXMucml2ZXIpO1xuXG4gICAgICAgIC8vIFBhcmtzXG4gICAgICAgIGNhbnZhcy5zZXRPcHRpb25zKHtcbiAgICAgICAgICAgIGZpbGw6IHRoaXMuY29sb3VyU2NoZW1lLmdyYXNzQ29sb3VyLFxuICAgICAgICB9KTtcbiAgICAgICAgdGhpcy5wYXJrcy5mb3JFYWNoKHAgPT4gY2FudmFzLmRyYXdQb2x5Z29uKHApKTtcblxuICAgICAgICAvLyBSb2Fkc1xuICAgICAgICBjYW52YXMuc2V0T3B0aW9ucyh7XG4gICAgICAgICAg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SA+PSAyKSB7XG4gICAgICAgICAgICAgICAgLy8gTG90c1xuICAgICAgICAgICAgICAgIGNhbnZhcy5zZXRPcHRpb25zKHtcbiAgICAgICAgICAgICAgICAgICAgcm91Z2huZXNzOiAxLjIsXG4gICAgICAgICAgICAgICAgICAgIHN0cm9rZTogdGhpcy5jb2xvdXJTY2hlbWUuYnVpbGRpbmdTdHJva2UsXG4gICAgICAgICAgICAgICAgICAgIHN0cm9rZVdpZHRoOiAxLFxuICAgICAgICAgICAgICAgICAgICBmaWxsOiAnJyxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IGIgb2YgdGhpcy5sb3RzKSBjYW52YXMuZHJhd1BvbHlnb24oYik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIFBzZXVkby0zRFxuICAgICAgICAgICAgaWYgKHRoaXMuY29sb3VyU2NoZW1lLmJ1aWxkaW5nTW9kZWxzICYmICghdGhpcy5jb2xvdXJTY2hlbWUuem9vbUJ1aWxkaW5ncyB8fCB0aGlzLmRvbWFpbkNvbnRyb2xsZXIuem9vbSA+PSAyLjUpKSB7XG4gICAgICAgICAgICAgICAgLy8gUHNldWRvLTNEXG4gICAgICAgICAgICAgICAgY2FudmFzLnNldE9wdGlvbnMoe1xuICAgICAgICAgICAgICAgICAgICByb3VnaG5lc3M6IDEuMixcbiAgICAgICAgICAgICAgICAgICAgc3Ryb2tlOiB0aGlzLmNvbG91clNjaGVtZS5idWlsZGluZ1N0cm9rZSxcbiAgICAgICAgICAgICAgICAgICAgc3Ryb2tlV2lkdGg6IDEsXG4gICAgICAgICAgICAgICAgICAgIGZpbGw6IHRoaXMuY29sb3VyU2NoZW1lLmJ1aWxkaW5nU2lkZUNvbG91cixcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFRPRE8gdGhpcyBjYW4gYmUgaHVnZWx5IGltcHJvdmVkXG4gICAgICAgICAgICAgICAgY29uc3QgYWxsU2lkZXNEaXN0YW5jZXM6IGFueVtdID0gW107XG4gICAgICAgICAgICAgICAgY29uc3QgY2FtZXJhID0gdGhpcy5kb21haW5Db250cm9sbGVyLmdldENhbWVyYVBvc2l0aW9uKCk7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBiIG9mIHRoaXMuYnVpbGRpbmdNb2RlbHMpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBzIG9mIGIuc2lkZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGF2ZXJhZ2VQb2ludCA9IHNbMF0uY2xvbmUoKS5hZGQoc1sxXSkuZGl2aWRlU2NhbGFyKDIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYWxsU2lkZXNEaXN0YW5jZXMucHVzaChbYXZlcmFnZVBvaW50LmRpc3RhbmNlVG9TcXVhcmVkKGNhbWVyYSksIHNdKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhbGxTaWRlc0Rpc3RhbmNlcy5zb3J0KChhLCBiKSA9PiBiWzBdIC0gYVswXSk7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBwIG9mIGFsbFNpZGVzRGlzdGFuY2VzKSBjYW52YXMuZHJhd1BvbHlnb24ocFsxXSk7XG5cbiAgICAgICAgICAgICAgICBjYW52YXMuc2V0T3B0aW9ucyh7XG4gICAgICAgICAgICAgICAgICAgIHJvdWdobmVzczogMS4yLFxuICAgICAgICAgICAgICAgICAgICBzdHJva2U6IHRoaXMuY29sb3VyU2NoZW1lLmJ1aWxkaW5nU3Ryb2tlLFxuICAgICAgICAgICAgICAgICAgICBzdHJva2VXaWR0aDogMSxcbiAgICAgICAgICAgICAgICAgICAgZmlsbDogdGhpcy5jb2xvdXJTY2hlbWUuYnVpbGRpbmdDb2xvdXIsXG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBmb3IgKGNvbnN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ci5sZW5ndGggPT09IDcpIHtcbiAgICAgICAgICAgICAgICB2YXIgaXYgPSBwYXJzZUludChzdHIuc3Vic3RyKDEpLCAxNik7ICAvLyBUT0RPKGRlYW5tKTogU3RyaWN0ZXIgcGFyc2luZy5cbiAgICAgICAgICAgICAgICBpZiAoIShpdiA+PSAwICYmIGl2IDw9IDB4ZmZmZmZmKSkgcmV0dXJuIG51bGw7ICAvLyBDb3ZlcnMgTmFOLlxuICAgICAgICAgICAgICAgIHJldHVybiBbKGl2ICYgMHhmZjAwMDApID4+IDE2LFxuICAgICAgICAgICAgICAgICAgICAgIChpdiAmIDB4ZmYwMCkgPj4gOCxcbiAgICAgICAgICAgICAgICAgICAgICBpdiAmIDB4ZmYsXG4gICAgICAgICAgICAgICAgICAgICAgMV07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIG9wID0gc3RyLmluZGV4T2YoJygnKSwgZXAgPSBzdHIuaW5kZXhPZignKScpO1xuICAgICAgICBpZiAob3AgIT09IC0xICYmIGVwICsgMSA9PT0gc3RyLmxlbmd0aCkge1xuICAgICAgICAgICAgdmFyIGZuYW1lID0gc3RyLnN1YnN0cigwLCBvcCk7XG4gICAgICAgICAgICB2YXIgcGFyYW1zID0gc3RyLnN1YnN0cihvcCsxLCBlcC0ob3ArMSkpLnNwbGl0KCcsJyk7XG4gICAgICAgICAgICB2YXIgYWxwaGEgPSAxOyAgLy8gVG8gYWxsb3cgY2FzZSBmYWxsdGhyb3VnaC5cbiAgICAgICAgICAgIHN3aXRjaCAoZm5hbWUpIHtcbiAgICAgICAgICAgICAgICBjYXNlICdyZ2JhJzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtcy5sZW5ndGggIT09IDQpIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICAgICBhbHBoYSA9IFV0aWwucGFyc2VfY3NzX2Zsb2F0KHBhcmFtcy5wb3AoKSk7XG4gICAgICAgICAgICAgICAgICAgIC8vIEZhbGwgdGhyb3VnaC5cbiAgICAgICAgICAgICAgICBjYXNlICdyZ2InOlxuICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1zLmxlbmd0aCAhPT0gMykgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbVXRpbC5wYXJzZV9jc3NfaW50KHBhcmFtc1swXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgVXRpbC5wYXJzZV9jc3NfaW50KHBhcmFtc1sxXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgVXRpbC5wYXJzZV9jc3NfaW50KHBhcmFtc1syXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGFdO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdoc2xhJzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtcy5sZW5ndGggIT09IDQpIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICAgICBhbHBoYSA9IFV0aWwucGFyc2VfY3NzX2Zsb2F0KHBhcmFtcy5wb3AoKSk7XG4gICAgICAgICAgICAgICAgICAgIC8vIEZhbGwgdGhyb3VnaC5cbiAgICAgICAgICAgICAgICBjYXNlICdoc2wnOlxuICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1zLmxlbmd0aCAhPT0gMykgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHZhciBoID0gKCgocGFyc2VGbG9hdChwYXJhbXNbMF0pICUgMzYwKSArIDM2MCkgJSAzNjApIC8gMzYwOyAgLy8gMCAuLiAxXG4gICAgICAgICAgICAgICAgICAgIC8vIE5PVEUoZGVhbm0pOiBBY2NvcmRpbmcgdG8gdGhlIENTUyBzcGVjIHMvbCBzaG91bGQgb25seSBiZVxuICAgICAgICAgICAgICAgICAgICAvLyBwZXJjZW50YWdlcywgYnV0IHdlIGRvbid0IGJvdGhlciBhbmQgbGV0IGZsb2F0IG9yIHBlcmNlbnRhZ2UuXG4gICAgICAgICAgICAgICAgICAgIHZhciBzID0gVXRpbC5wYXJzZV9jc3NfZmxvYXQocGFyYW1zWzFdKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGwgPSBVdGlsLnBhcnNlX2Nzc19mbG9hdChwYXJhbXNbMl0pO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbTIgPSBsIDw9IDAuNSA/IGwgKiAocyArIDEpIDogbCArIHMgLSBsICogcztcbiAgICAgICAgICAgICAgICAgICAgdmFyIG0xID0gbCAqIDIgLSBtMjtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtVdGlsLmNsYW1wX2Nzc19ieXRlKFV0aWwuY3NzX2h1ZV90b19yZ2IobTEsIG0yLCBoKzEvMykgKiAyNTUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFV0aWwuY2xhbXBfY3NzX2J5dGUoVXRpbC5jc3NfaHVlX3RvX3JnYihtMSwgbTIsIGgpICogMjU1KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBVdGlsLmNsYW1wX2Nzc19ieXRlKFV0aWwuY3NzX2h1ZV90b19yZ2IobTEsIG0yLCBoLTEvMykgKiAyNTUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFscGhhXTtcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbn1cbiIsImltcG9ydCAqIGFzIGxvZyBmcm9tICdsb2dsZXZlbCc7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFZlY3RvciB7XG4gICAgY29uc3RydWN0b3IocHVibGljIHg6IG51bWJlciwgcHVibGljIHk6IG51bWJlcikge31cblxuICAgIHN0YXRpYyB6ZXJvVmVjdG9yKCk6IFZlY3RvciB7XG4gICAgICAgIHJldHVybiBuZXcgVmV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gICAgZGlzdGFuY2VUb1NxdWFyZWQgKHY6IFZlY3Rvcik6IG51bWJlciB7XG4gICAgICAgIGNvbnN0IGR4ID0gdGhpcy54IC0gdi54XG4gICAgICAgIGNvbnN0IGR5ID0gdGhpcy55IC0gdi55O1xuICAgICAgICByZXR1cm4gZHggKiBkeCArIGR5ICogZHk7XG4gICAgfVxuXG4gICAgZGl2aWRlKHY6IFZlY3Rvcik6IFZlY3RvciB7XG4gICAgICAgIGlmICh2LnggPT09IDAgfHwgdi55ID09PSAwKSB7XG4gICAgICAgICAgICBsb2cud2FybihcIkRpdmlzaW9uIGJ5IHplcm9cIik7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMueCAvPSB2Lng7XG4gICAgICAgIHRoaXMueSAvPSB2Lnk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGRpdmlkZVNjYWxhcihzOiBudW1iZXIpOiBWZWN0b3Ige1xuICAgICAgICBpZiAocyA9PT0gMCkge1xuICAgICAgICAgICAgbG9nLndhcm4oXCJEaXZpc2lvbiBieSB6ZXJvXCIpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXMubXVsdGlwbHlTY2FsYXIoMSAvIHMpO1xuICAgIH1cblxuICAgIGRvdCh2OiBWZWN0b3IpOiBudW1iZXIge1xuICAgICAgICByZXR1cm4gdGhpcy54ICogdi54ICsgdGhpcy55ICogdi55O1xuICAgIH1cblxuICAgIGVxdWFscyh2OiBWZWN0b3IpOiBib29sZWFuIHtcbiAgICAgICAgcmV0dXJuICgodi54ID09PSB0aGlzLngpICYmICh2LnkgPT09IHRoaXMueSkpO1xuICAgIH1cblxuICAgIGxlbmd0aCgpOiBudW1iZXIge1xuICAgICAgICByZXR1cm4gTWF0aC5zcXJ0KHRoaXMubGVuZ3RoU3EoKSk7XG4gICAgfVxuXG4gICAgbGVuZ3RoU3EoKTogbnVtYmVyIHtcbiAgICAgICAgcmV0dXJuIHRoaXMueCAqIHRoaXMueCArIHRoaXMueSAqIHRoaXMueTtcbiAgICB9XG5cbiAgICBtdWx0aXBseSh2OiBWZWN0b3IpOiBWZWN0b3Ige1xuICAgICAgICB0aGlzLnggKj0gdi54O1xuICAgICAgICB0aGlzLnkgKj0gdi55O1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBtdWx0aXBseVNjYWxhcihzOiBudW1iZXIpOiBWZWN0b3Ige1xuICAgICAgICB0aGlzLnggKj0gcztcbiAgICAgICAgdGhpcy55ICo9IHM7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG5lZ2F0ZSgpOiBWZWN0b3Ige1xuICAgICAgICByZXR1cm4gdGhpcy5tdWx0aXBseVNjYWxhcigtMSk7XG4gICAgfVxuXG4gICAgbm9ybWFsaXplKCk6IFZlY3RvciB7XG4gICAgICAgIGNvbnN0IGwgPSB0aGlzLmxlbmd0aCgpO1xuICAgICAgICBpZiAobCA9PT0gMCkge1xuICAgICAgICAgICAgbG9nLndhcm4oXCJaZXJvIFZlY3RvclwiKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICByZXR1cm4gdGhpcy5kaXZpZGVTY2FsYXIodGhpcy5sZW5ndGgoKSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQW5nbGUgaW4gcmFkaWFuc1xuICAgICAqL1xuICAgIHJvdGF0ZUFyb3VuZChjZW50ZXI6IFZlY3RvciwgYW5nbGU6IG51bWJlcik6IFZlY3RvciB7XG4gICAgICAgIGNvbnN0IGNvcyA9IE1hdGguY29zKGFuZ2xlKVxuICAgICAgICBjb25zdCBzaW4gPSBNYXRoLnNpbihhbmdsZSk7XG5cbiAgICAgICAgY29uc3QgeCA9IHRoaXMueCAtIGNlbnRlci54O1xuICAgICAgICBjb25zdCB5ID0gdGhp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