/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ // add entry modules from loaded chunk to deferred list
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
/******/
/******/ // run deferred modules when all chunks ready
/******/ return checkDeferredModules();
/******/ };
/******/ function checkDeferredModules() {
/******/ var result;
/******/ for(var i = 0; i < deferredModules.length; i++) {
/******/ var deferredModule = deferredModules[i];
/******/ var fulfilled = true;
/******/ for(var j = 1; j < deferredModule.length; j++) {
/******/ var depId = deferredModule[j];
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
/******/ }
/******/ if(fulfilled) {
/******/ deferredModules.splice(i--, 1);
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ }
/******/ }
/******/
/******/ return result;
/******/ }
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "main": 0
/******/ };
/******/
/******/ var deferredModules = [];
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback;
/******/ jsonpArray = jsonpArray.slice();
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ // add entry module to deferred list
/******/ deferredModules.push(["./ts/main.ts","vendor"]);
/******/ // run deferred modules when ready
/******/ return checkDeferredModules();
/******/ })
/************************************************************************/
/******/ ({
/***/ "./css/main.scss":
/*!***********************!*\
!*** ./css/main.scss ***!
\***********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./node_modules/file-loader/dist/cjs.js?name=exBERT.html!./exBERT.html":
/*!*****************************************************************************!*\
!*** ./node_modules/file-loader/dist/cjs.js?name=exBERT.html!./exBERT.html ***!
\*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "exBERT.html";
/***/ }),
/***/ "./node_modules/file-loader/dist/cjs.js?name=index.html!./index.html":
/*!***************************************************************************!*\
!*** ./node_modules/file-loader/dist/cjs.js?name=index.html!./index.html ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "index.html";
/***/ }),
/***/ "./ts/api/demoAPI.ts":
/*!***************************!*\
!*** ./ts/api/demoAPI.ts ***!
\***************************/
/*! exports provided: DemoAPI */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DemoAPI", function() { return DemoAPI; });
const DemoAPI = {
"527fdac4404bf9ba5412646ad457950d4482762c": "527fdac4404bf9ba5412646ad457950d4482762c.json",
"59b4acc05f1d80ecbef1c23eaf2fda10222cb257": "59b4acc05f1d80ecbef1c23eaf2fda10222cb257.json",
"354992f2ee236604c874a3a627e4042bc68586f8": "354992f2ee236604c874a3a627e4042bc68586f8.json",
"5015e5a318605cea6808538db14d8af16887b076": "5015e5a318605cea6808538db14d8af16887b076.json",
"3c9aa152ac894306040703c5095599b199cad1a9": "3c9aa152ac894306040703c5095599b199cad1a9.json",
"0fece0c87203e83afd1674b5aeebaed0f5fa0562": "0fece0c87203e83afd1674b5aeebaed0f5fa0562.json",
"d3a0e4045ea48a275ce51a6af0280406060f47cf": "d3a0e4045ea48a275ce51a6af0280406060f47cf.json",
"ed98d751ab9b6a4a0e85e9332b420a4c13ab75a7": "ed98d751ab9b6a4a0e85e9332b420a4c13ab75a7.json",
"0d24ae08eeb21af82c666cbe2ac0646ed9c9d9a6": "0d24ae08eeb21af82c666cbe2ac0646ed9c9d9a6.json",
"6de053b3b8a4d904780c9a6545a0a63cbbb2b144": "6de053b3b8a4d904780c9a6545a0a63cbbb2b144.json",
"f68df23365faf02f9c01439345bed66936ed85f7": "f68df23365faf02f9c01439345bed66936ed85f7.json",
"4608cb4fc00b43fff68098e85676fad57c940f02": "4608cb4fc00b43fff68098e85676fad57c940f02.json",
"dfcd50146da8d8122a5a57c2a3c0abce503ba94b": "dfcd50146da8d8122a5a57c2a3c0abce503ba94b.json",
"34c8629d4265d7f3ede3add42f3613b205d94c1c": "34c8629d4265d7f3ede3add42f3613b205d94c1c.json",
"db2dc252a786650f64395a0f5d181c0831019cbf": "db2dc252a786650f64395a0f5d181c0831019cbf.json",
"da4597d73d444757bde9176395bf31aad3334131": "da4597d73d444757bde9176395bf31aad3334131.json",
"a2ebf13d3c9371fcf738b9651824e2c3cd1ff8e0": "a2ebf13d3c9371fcf738b9651824e2c3cd1ff8e0.json",
"bc419238c20dd1c5cfe1cc427ab3d1e31353436a": "bc419238c20dd1c5cfe1cc427ab3d1e31353436a.json",
"84e8be9fe562fbd0487c03b55cc6b4f3fb8cd787": "84e8be9fe562fbd0487c03b55cc6b4f3fb8cd787.json",
"207e6c98a0e149dc7e6ed67118296d8a8c89b3c3": "207e6c98a0e149dc7e6ed67118296d8a8c89b3c3.json",
"c185a9349ba5a325acf8514e9b50de71280488aa": "c185a9349ba5a325acf8514e9b50de71280488aa.json",
"dde481a5cd3667ae8c6c5b5e1421dc882b6a2dd6": "dde481a5cd3667ae8c6c5b5e1421dc882b6a2dd6.json",
"f63e14e935d98948b4a0ebc9663400dbe4263348": "f63e14e935d98948b4a0ebc9663400dbe4263348.json",
"79b964d1a5c854deaeace26813f96994bb82aef2": "79b964d1a5c854deaeace26813f96994bb82aef2.json",
"3b1168ec96af00c4e887341e92a878f8752e1d17": "3b1168ec96af00c4e887341e92a878f8752e1d17.json",
"8c462bc298e3183efa8d9e863e25ea5d89806b03": "8c462bc298e3183efa8d9e863e25ea5d89806b03.json",
"9939698edaa25bbae9ee1d27864e698f13963f06": "9939698edaa25bbae9ee1d27864e698f13963f06.json",
"73f1ee497b3e7b6394e55726b18dbf9d514dcea6": "73f1ee497b3e7b6394e55726b18dbf9d514dcea6.json",
"c7cdb80bf813e1de241260aede6cd28ea65ccfae": "c7cdb80bf813e1de241260aede6cd28ea65ccfae.json",
"a96fed16eab1bf6d08e4001c02894d9c549df627": "a96fed16eab1bf6d08e4001c02894d9c549df627.json",
"a8eaf10da8dc75b42e72bdc7091776247fff9657": "a8eaf10da8dc75b42e72bdc7091776247fff9657.json",
"a8194f2309e1c71e977ef8d3be572ae00b0e91f2": "a8194f2309e1c71e977ef8d3be572ae00b0e91f2.json",
"2f4a15b66fcfb0c7a43a33d93763990282bfc5aa": "2f4a15b66fcfb0c7a43a33d93763990282bfc5aa.json",
"06095cef4a7f49b18f153e67e33fddb831a15b46": "06095cef4a7f49b18f153e67e33fddb831a15b46.json",
"4c93eaf0c0ce56f1e5d5100916abf4d31eb35da5": "4c93eaf0c0ce56f1e5d5100916abf4d31eb35da5.json",
"f8c40c67c851a0489f7480c99b31b4f606c0184b": "f8c40c67c851a0489f7480c99b31b4f606c0184b.json",
"e4e71f6ea57be2e05d62af0825a80f144421e02d": "e4e71f6ea57be2e05d62af0825a80f144421e02d.json",
"e7d9d520882782c7cfbffeadaaf22b4c0a081c7c": "e7d9d520882782c7cfbffeadaaf22b4c0a081c7c.json",
"4aa4eb10ead44a0a3c2dd95407017a928138b32b": "4aa4eb10ead44a0a3c2dd95407017a928138b32b.json",
"da31d55ee8cb01bcdb29572cb902b8e799685be2": "da31d55ee8cb01bcdb29572cb902b8e799685be2.json",
"e427181fb02bbf19f7bbb65c9d9389d2d9a41812": "e427181fb02bbf19f7bbb65c9d9389d2d9a41812.json",
"bbcab9e1ca60a851fd7ecfda80de470afa740936": "bbcab9e1ca60a851fd7ecfda80de470afa740936.json",
"4de96aa205076863c9fb4ea99e2ba86fa131ff76": "4de96aa205076863c9fb4ea99e2ba86fa131ff76.json",
"e4c6d1b3004e3cdd0c879a59639b5ce993207a99": "e4c6d1b3004e3cdd0c879a59639b5ce993207a99.json",
"fbc9da79b8bf39dc9998408526741f811a13e6aa": "fbc9da79b8bf39dc9998408526741f811a13e6aa.json",
"528554ee4e615c61287c40ed9a2aea69b91af6c9": "528554ee4e615c61287c40ed9a2aea69b91af6c9.json",
"5e7073c03c37d19826b2fb4a6599ccaedde492e4": "5e7073c03c37d19826b2fb4a6599ccaedde492e4.json",
"71c4a886cdee58a371ae2115311b150e84e555f6": "71c4a886cdee58a371ae2115311b150e84e555f6.json",
"4bce0970a465fe9b96305e06af19c5d9c97d7cc3": "4bce0970a465fe9b96305e06af19c5d9c97d7cc3.json",
"efdb1f0a70f22f80ff3cea0cb79bec717fc8b6f7": "efdb1f0a70f22f80ff3cea0cb79bec717fc8b6f7.json",
"174c6f786d139ce111381045d60d25682a168b99": "174c6f786d139ce111381045d60d25682a168b99.json",
"a8c23e88d6ca6d4efd2646b0742c0fa32dbd55a4": "a8c23e88d6ca6d4efd2646b0742c0fa32dbd55a4.json",
"f6949c28752de35a870efde308585acd46a25278": "f6949c28752de35a870efde308585acd46a25278.json",
"c1bdb8cbafd5d5d8f6bda2b4db16b6bc2d62e18a": "c1bdb8cbafd5d5d8f6bda2b4db16b6bc2d62e18a.json",
"2b81a8f602251cf40b4682c8cedb3966b912d7c6": "2b81a8f602251cf40b4682c8cedb3966b912d7c6.json",
"8f94e843d2510047fd1af46f249afe87ff49cc2f": "8f94e843d2510047fd1af46f249afe87ff49cc2f.json",
"4e3ddb51550c03c64fdbe5592526665100d32930": "4e3ddb51550c03c64fdbe5592526665100d32930.json",
"f816b23af9aa4312c80e668a66a156c934cb330c": "f816b23af9aa4312c80e668a66a156c934cb330c.json",
"2fe05a911a574b8a6d4b05eb13db9e09aaacad2d": "2fe05a911a574b8a6d4b05eb13db9e09aaacad2d.json",
"5c71496726395aaa4d0a65373fd1651b5a0e6b1f": "5c71496726395aaa4d0a65373fd1651b5a0e6b1f.json",
};
/***/ }),
/***/ "./ts/api/mainApi.ts":
/*!***************************!*\
!*** ./ts/api/mainApi.ts ***!
\***************************/
/*! exports provided: emptyTokenDisplay, API */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "emptyTokenDisplay", function() { return emptyTokenDisplay; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "API", function() { return API; });
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
/* harmony import */ var _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/TokenWrapper */ "./ts/data/TokenWrapper.ts");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
/* harmony import */ var _demoAPI__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./demoAPI */ "./ts/api/demoAPI.ts");
/* harmony import */ var object_hash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! object-hash */ "./node_modules/object-hash/dist/object_hash.js");
/* harmony import */ var object_hash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(object_hash__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../etc/apiHelpers */ "./ts/etc/apiHelpers.ts");
/* harmony import */ var _etc_URLHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../etc/URLHandler */ "./ts/etc/URLHandler.ts");
const emptyTokenDisplay = new _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_1__["TokenDisplay"]();
const baseurl = _etc_URLHandler__WEBPACK_IMPORTED_MODULE_6__["URLHandler"].basicURL();
/**
* A rewrite of `d3-fetch`'s `d3.json` callback. If an api call fails, make a backup call to specified url and payload, if specified.
*
* @param response Object expected at time of callback
* @param backupUrl Backup url in the event of fail
* @param backupPayload Backup payload if making a post request
*/
function responseJson(response, backupUrl = null, backupPayload = null) {
if (!response.ok) {
if (backupUrl != null) {
console.log("STATIC FILE NOT FOUND");
return fetch(backupUrl, backupPayload).then(responseJson);
}
throw new Error(response.status + " " + response.statusText);
}
return response.json();
}
/**
* Check first if the information being sent exists in a static demo file. If it does, send that. Otherwise, make a normal call to the server.
*
* @param toSend The packet of information to send to an API endpoint
* @param backupUrl Backup url in the event that the demo file is not found
* @param backupPayload Backup payload if demo file not found, for POST requests only
*/
function checkDemoAPI(toSend, backupUrl = null, backupPayload = null) {
const hsh = object_hash__WEBPACK_IMPORTED_MODULE_4__["sha1"](toSend);
console.log("CHECKING DEMOAPI: " + hsh);
if (_demoAPI__WEBPACK_IMPORTED_MODULE_3__["DemoAPI"].hasOwnProperty(hsh)) {
// Relies on a symbolic link being present in the dist folder to the demo folder
const path = './demo/' + _demoAPI__WEBPACK_IMPORTED_MODULE_3__["DemoAPI"][hsh];
console.log("TRYING TO SENDING STATIC: ", path);
const follow = (response) => responseJson(response, backupUrl, backupPayload);
return fetch(path).then(follow);
}
return d3__WEBPACK_IMPORTED_MODULE_0__["json"](backupUrl, backupPayload);
}
class API {
constructor(baseURL = null) {
this.baseURL = baseURL;
if (this.baseURL == null) {
this.baseURL = baseurl + '/api';
}
}
getModelDetails(model, hashObj = null) {
const toSend = {
model: model
};
const url = Object(_etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__["makeUrl"])(this.baseURL + "/get-model-details", toSend);
console.log("--- GET " + url);
if (hashObj != null) {
const key = object_hash__WEBPACK_IMPORTED_MODULE_4__["sha1"](toSend);
d3__WEBPACK_IMPORTED_MODULE_0__["json"](url).then(r => {
hashObj[key] = r;
});
}
return checkDemoAPI(toSend, url);
}
getMetaAttentions(model, sentence, layer, hashObj = null) {
const toSend = {
model: model,
sentence: sentence,
layer: layer
};
const url = Object(_etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__["makeUrl"])(this.baseURL + "/attend+meta", toSend);
console.log("--- GET " + url);
// Add hash and value to hashObj
if (hashObj != null) {
const key = object_hash__WEBPACK_IMPORTED_MODULE_4__["sha1"](toSend);
d3__WEBPACK_IMPORTED_MODULE_0__["json"](url).then(r => {
hashObj[key] = r;
});
}
return checkDemoAPI(toSend, url);
}
/**
* Update the display based on the information that was already parsed from the passed sentence.
*
* @param a The displayed tokens in the columns
* @param sentenceA The original sentence that led to the tokenized information in `a`
* @param layer Which layer to search at
* @param hashObj If not null, store the information of the responses into the passed object. Used for creating demos.
*/
updateMaskedAttentions(model, tokens, sentence, layer, hashObj = null) {
const toSend = {
model: model,
tokens: ramda__WEBPACK_IMPORTED_MODULE_2__["map"](ramda__WEBPACK_IMPORTED_MODULE_2__["prop"]('text'), tokens.tokenData),
sentence: sentence,
// Empty masks need to be sent as a number, unfortunately. Choosing -1 for this
mask: tokens.maskInds.length ? tokens.maskInds : [-1],
layer: layer,
};
const url = Object(_etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__["makeUrl"])(this.baseURL + '/update-mask');
const payload = Object(_etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__["toPayload"])(toSend);
if (hashObj != null) {
// Add hash and value to hashObj for demo purposes
const key = object_hash__WEBPACK_IMPORTED_MODULE_4__["sha1"](toSend);
d3__WEBPACK_IMPORTED_MODULE_0__["json"](url, payload).then(r => {
hashObj[key] = r;
});
}
console.log("--- POST " + url, payload);
return checkDemoAPI(toSend, url, payload);
}
}
;
/***/ }),
/***/ "./ts/data/AttentionCapsule.ts":
/*!*************************************!*\
!*** ./ts/data/AttentionCapsule.ts ***!
\*************************************/
/*! exports provided: makeFromMetaResponse, AttentionWrapper */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeFromMetaResponse", function() { return makeFromMetaResponse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttentionWrapper", function() { return AttentionWrapper; });
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _etc_Tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../etc/_Tools */ "./ts/etc/_Tools.ts");
/* harmony import */ var _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tensorflow/tfjs */ "./node_modules/@tensorflow/tfjs/dist/tf.esm.js");
/**
* Notes:
*
* - Also encapsulate the CLS/SEP info vs. no CLS/SEP info
* - When layer format changes from list, drop the index into conf.layer
*/
const bpeTokens = ["[CLS]", "[SEP]", "", "", "<|endoftext|>"];
const findBadIndexes = (x) => _etc_Tools__WEBPACK_IMPORTED_MODULE_1__["findAllIndexes"](x.map(t => t.text), (a) => lodash__WEBPACK_IMPORTED_MODULE_0__["includes"](bpeTokens, a));
function makeFromMetaResponse(r, isZeroed) {
const key = 'aa'; // Change this if backend response changes to be simpler
const currPair = r[key];
const left = currPair.left;
const right = currPair.right;
const leftZero = _etc_Tools__WEBPACK_IMPORTED_MODULE_1__["findAllIndexes"](left.map(t => t.text), (a) => lodash__WEBPACK_IMPORTED_MODULE_0__["includes"](bpeTokens, a));
const rightZero = _etc_Tools__WEBPACK_IMPORTED_MODULE_1__["findAllIndexes"](right.map(t => t.text), (a) => lodash__WEBPACK_IMPORTED_MODULE_0__["includes"](bpeTokens, a));
return new AttentionWrapper(currPair.att, [leftZero, rightZero], isZeroed);
}
class AttentionWrapper {
constructor(att, badToks = [[], []], isZeroed = true) {
this.nLayers = 12;
this.nHeads = 12;
this.init(att, badToks, isZeroed);
}
init(att, badToks = [[], []], isZeroed) {
this.isZeroed = isZeroed;
this._att = att;
this._zeroedAttTensor = zeroRowCol(_tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_2__["tensor3d"](att), badToks[0], badToks[1]);
this._attTensor = _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_2__["tensor3d"](att); // If I put this first, buffer modifications change this too.
this.badToks = badToks;
}
updateFromNormal(r, isZeroed) {
const key = 'aa'; // Change this if backend response changes to be simpler
const currPair = r[key];
const left = currPair.left;
const right = currPair.right;
const leftZero = findBadIndexes(left);
const rightZero = findBadIndexes(right);
this.init(currPair.att, [leftZero, rightZero], isZeroed);
}
get attTensor() {
const tens = this.isZeroed ? this._zeroedAttTensor : this._attTensor;
return tens;
}
get att() {
return this.attTensor.arraySync();
}
zeroed(val) {
if (val == null)
return this.isZeroed;
this.isZeroed = val;
return this;
}
toggleZeroing() {
this.zeroed(!this.zeroed());
}
_byHeads(heads) {
if (heads.length == 0) {
return _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_2__["zerosLike"](this._byHead(0));
}
return this.attTensor.gather(heads, 0).sum(0);
}
_byHead(head) {
return this.attTensor.gather([head], 0).squeeze([0]);
}
byHeads(heads) {
return this._byHeads(heads).arraySync();
}
byHead(head) {
return this._byHead(head).arraySync();
}
}
function zeroRowCol(tens, rows, cols) {
let outTens = tens.clone();
let atb = outTens.bufferSync();
lodash__WEBPACK_IMPORTED_MODULE_0__["range"](atb.shape[0]).forEach((head) => {
lodash__WEBPACK_IMPORTED_MODULE_0__["range"](atb.shape[1]).forEach((i) => {
// Set rows to 0
if (lodash__WEBPACK_IMPORTED_MODULE_0__["includes"](rows, i)) {
lodash__WEBPACK_IMPORTED_MODULE_0__["range"](atb.shape[2]).forEach((j) => {
atb.set(0, head, i, j);
});
}
// Set cols to 0
lodash__WEBPACK_IMPORTED_MODULE_0__["range"](atb.shape[2]).forEach((j) => {
if (lodash__WEBPACK_IMPORTED_MODULE_0__["includes"](cols, j))
lodash__WEBPACK_IMPORTED_MODULE_0__["range"](atb.shape[1]).forEach((i) => {
atb.set(0, head, i, j);
});
});
});
});
return outTens;
}
/***/ }),
/***/ "./ts/data/TokenWrapper.ts":
/*!*********************************!*\
!*** ./ts/data/TokenWrapper.ts ***!
\*********************************/
/*! exports provided: TokenDisplay, TokenWrapper, sideToLetter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenDisplay", function() { return TokenDisplay; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenWrapper", function() { return TokenWrapper; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sideToLetter", function() { return sideToLetter; });
/* harmony import */ var _etc_Tools__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../etc/_Tools */ "./ts/etc/_Tools.ts");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
/**
* The original tokens, and the indexes that need to be masked
*/
const emptyFullResponse = [{
text: '[SEP]',
topk_words: [],
topk_probs: []
}];
class TokenDisplay {
constructor(tokens = emptyFullResponse, maskInds = []) {
this.tokenData = tokens;
this.maskInds = maskInds;
}
/**
* Push idx to the mask idx list in order from smallest to largest
*/
mask(val) {
const currInd = lodash__WEBPACK_IMPORTED_MODULE_1__["indexOf"](this.maskInds, val);
if (currInd == -1) {
_etc_Tools__WEBPACK_IMPORTED_MODULE_0__["orderedInsert_"](this.maskInds, val);
}
else {
console.log(`${val} already in maskInds!`);
console.log(this.maskInds);
}
}
toggle(val) {
const currInd = lodash__WEBPACK_IMPORTED_MODULE_1__["indexOf"](this.maskInds, val);
if (currInd == -1) {
console.log(`Masking ${val}`);
this.mask(val);
}
else {
console.log(`Unmasking ${val}`);
this.unmask(val);
}
}
unmask(val) {
lodash__WEBPACK_IMPORTED_MODULE_1__["pull"](this.maskInds, val);
}
resetMask() {
this.maskInds = [];
}
length() {
return this.tokenData.length;
}
concat(other) {
const newTokens = lodash__WEBPACK_IMPORTED_MODULE_1__["concat"](this.tokenData, other.tokenData);
const newMask = lodash__WEBPACK_IMPORTED_MODULE_1__["concat"](this.maskInds, other.maskInds.map(x => x + this.length()));
return new TokenDisplay(newTokens, newMask);
}
}
class TokenWrapper {
constructor(r) {
this.updateFromResponse(r);
}
updateFromResponse(r) {
const tokensA = r.aa.left;
this.updateFromComponents(tokensA, []);
}
updateFromComponents(a, maskA) {
this.a = new TokenDisplay(a, maskA);
}
updateTokens(r) {
const desiredKeys = ['contexts', 'embeddings', 'topk_probs', 'topk_words'];
const newTokens = r.aa.left.map(v => ramda__WEBPACK_IMPORTED_MODULE_2__["pick"](desiredKeys, v));
const pairs = ramda__WEBPACK_IMPORTED_MODULE_2__["zip"](this.a.tokenData, newTokens);
pairs.forEach((d, i) => {
Object.keys(d[1]).map(k => {
d[0][k] = d[1][k];
});
});
}
/**
* Mask the appropriate sentence at the index indicated
*/
mask(sID, idx) {
this[sID].mask(idx);
const opts = ["a", "b"];
const Na = this.a.length();
}
}
function sideToLetter(side, atype) {
// const atype = conf.attType;
if (atype == "all") {
return "all";
}
const out = side == "left" ? atype[0] : atype[1]; // No type checking?
return out;
}
/***/ }),
/***/ "./ts/etc/SVGplus.ts":
/*!***************************!*\
!*** ./ts/etc/SVGplus.ts ***!
\***************************/
/*! exports provided: SVG, SVGMeasurements */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SVG", function() { return SVG; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SVGMeasurements", function() { return SVGMeasurements; });
/* harmony import */ var d3_selection_multi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection-multi */ "./node_modules/d3-selection-multi/index.js");
/**
* Created by hen on 5/15/17.
* Modified by hoo on 4/16/19.
*/
class SVG {
static translate({ x, y }) {
return "translate(" + x + "," + y + ")";
}
static rotate(deg) {
return `rotate(${deg})`;
}
static group(parent, classes, pos = { x: 0, y: 0 }) {
return parent.append('g').attrs({
class: classes,
"transform": SVG.translate(pos)
});
}
}
class SVGMeasurements {
constructor(baseElement, classes = '') {
this.measureElement = baseElement.append('text')
.attrs({ x: 0, y: -20, class: classes });
}
textLength(text, style = null) {
this.measureElement.attr('style', style);
this.measureElement.text(text);
const tl = this.measureElement.node().getComputedTextLength();
this.measureElement.text('');
return tl;
}
}
/***/ }),
/***/ "./ts/etc/SimpleEventHandler.ts":
/*!**************************************!*\
!*** ./ts/etc/SimpleEventHandler.ts ***!
\**************************************/
/*! exports provided: SimpleEventHandler */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleEventHandler", function() { return SimpleEventHandler; });
/**
* Created by hen on 5/15/17.
* Modified by hoo on 4/16/19.
*/
class SimpleEventHandler {
constructor(element) {
this.element = element;
this.eventListeners = [];
}
bind(eventNames, eventFunction) {
for (const eventName of eventNames.split(' ')) {
this.eventListeners.push({ eventName, eventFunction });
const eventFunctionWrap = e => eventFunction(e.detail, e);
this.element.addEventListener(eventName, eventFunctionWrap, false);
}
}
getListeners() {
return this.eventListeners;
}
trigger(eventName, detail) {
this.element.dispatchEvent(new CustomEvent(eventName, { detail }));
}
}
/***/ }),
/***/ "./ts/etc/URLHandler.ts":
/*!******************************!*\
!*** ./ts/etc/URLHandler.ts ***!
\******************************/
/*! exports provided: URLHandler */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URLHandler", function() { return URLHandler; });
/**
* Created by hen on 5/15/17.
*/
class URLHandler {
static basicURL() {
const url_path = window.location.pathname.split('/').slice(0, -2).join('/');
return window.location.origin + (url_path.length ? url_path : '');
}
/**
* Read all URL parameters into a map.
* @returns {Map} the url parameters as a key-value store (ES6 map)
*/
static get parameters() {
// Adapted from: http://stackoverflow.com/questions/2090551/parse-query-string-in-javascript
const query = window.location.search.substring(1);
const vars = query.split('&');
console.log(vars, "--- vars");
const urlParameters = {};
const isInt = x => (/^[0-9]+$/).test(x);
const isFloat = x => (/^[0-9]+\.[0-9]*$/).test(x);
const typeCast = val => {
if (isInt(val)) {
return Number.parseInt(val, 10);
}
else if (isFloat(val)) {
return Number.parseFloat(val);
}
// else:
return val;
};
vars.forEach(v => {
if (v.length > 0) {
const splits = v.split('=');
const key = decodeURIComponent(splits[0]);
let raw_value = decodeURIComponent(splits[1]);
const isArray = raw_value.startsWith('..');
if (isArray) {
raw_value = raw_value.slice(2);
}
if (raw_value.length < 1) {
urlParameters[key] = isArray ? [] : '';
}
else if (isArray) {
urlParameters[key] = raw_value.split(',')
.map(val => typeCast(val));
}
else {
urlParameters[key] = typeCast(raw_value);
}
}
});
return urlParameters;
}
/**
* Generates an URL string from a map of url parameters
* @param {{}} urlParameters - the map of parameters
* @returns {string} - an URI string
*/
static urlString(urlParameters) {
const attr = [];
Object.keys(urlParameters).forEach(k => {
const v = urlParameters[k];
if (v !== undefined) {
let value = v;
if (Array.isArray(v))
value = '..' + v.join(',');
attr.push(encodeURI(k + '=' + value));
}
});
const url = window.location.pathname;
let res = url.substring(url.lastIndexOf('/') + 1);
if (attr.length > 0) {
res += '?' + attr.join('&');
}
return res;
}
static updateURLParam(key, value, addToBrowserHistory = true) {
const currentParams = URLHandler.parameters;
currentParams[key] = value;
URLHandler.updateUrl(currentParams, addToBrowserHistory);
}
// /**
// * Generates a key-value map of all URL params and replaces replaceKeys
// * @param updateKeys
// */
// static updateURLParams(updateKeys) {
// const currentParams = URLHandler.parameters;
// Object.keys(updateKeys).forEach((k) => currentParams[k] = updateKeys[k])
// return currentParams;
// }
static updateUrl(urlParameters, addToBrowserHistory = true) {
if (addToBrowserHistory) {
window.history.pushState(urlParameters, '', URLHandler.urlString(urlParameters));
}
else {
window.history.replaceState(urlParameters, '', URLHandler.urlString(urlParameters));
}
}
}
/***/ }),
/***/ "./ts/etc/Util.ts":
/*!************************!*\
!*** ./ts/etc/Util.ts ***!
\************************/
/*! exports provided: Util, Sel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Util", function() { return Util; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sel", function() { return Sel; });
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
/**
* Created by hen on 5/15/17.
* Modifyed by hoo on 4/16/19.
*/
let the_unique_id_counter = 0;
class Util {
static simpleUId({ prefix = '' }) {
the_unique_id_counter += 1;
return prefix + the_unique_id_counter;
}
}
/**
* Selection utility functions should be static methods in the below class
*/
class Sel {
}
Sel.setSelVisible = (x) => x.attr("visibility", "visible");
Sel.setSelHidden = (x) => x.attr("visibility", "hidden");
Sel.setVisible = (x) => Sel.setSelVisible(d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](x));
Sel.setHidden = (x) => Sel.setSelHidden(d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](x));
Sel.hideElement = (hE) => hE.transition().styles({
'opacity': 0,
'pointer-events': 'none',
'display': 'none'
});
Sel.unhideElement = (hE) => hE.transition().styles({
'opacity': 1,
'pointer-events': null,
'display': null
});
/***/ }),
/***/ "./ts/etc/_Tools.ts":
/*!**************************!*\
!*** ./ts/etc/_Tools.ts ***!
\**************************/
/*! exports provided: findAllIndexes, insertAt_, orderedInsert_, set2SortedArray, makeRandom */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findAllIndexes", function() { return findAllIndexes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertAt_", function() { return insertAt_; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "orderedInsert_", function() { return orderedInsert_; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set2SortedArray", function() { return set2SortedArray; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeRandom", function() { return makeRandom; });
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
function ascOrder(n1, n2) {
if (n1 < n2) {
return -1;
}
else if (n1 > n2) {
return 1;
}
return 0;
}
/**
* Find all indexes that match a particular predicate
*/
function findAllIndexes(array, predicate) {
let fromIndex = 0;
let results = [];
let i = lodash__WEBPACK_IMPORTED_MODULE_0__["findIndex"](array, predicate, fromIndex);
while (i != -1) {
results.push(i);
i = lodash__WEBPACK_IMPORTED_MODULE_0__["findIndex"](array, predicate, i + 1);
}
return results;
}
;
function insertAt_(array, val, ind) {
array.splice(ind, 0, val);
return array;
}
/**
* Convert a set to an ordered array
*/
function set2SortedArray(input) {
return Array.from(input).sort(ascOrder);
}
/**
* Insert a value into array in sorted order IN PLACE
*
* WARNING: Only handles numbers, sorted from least to greatest
* - Assumes already sorted array
*/
function orderedInsert_(array, val, coldstart = false) {
// Resort array if desired
if (coldstart) {
array.sort(ascOrder);
}
const ind = lodash__WEBPACK_IMPORTED_MODULE_0__["sortedIndex"](array, val);
return insertAt_(array, val, ind);
}
function makeRandom(len) {
const a = new Array(len).fill(0);
return a.map((x) => { return lodash__WEBPACK_IMPORTED_MODULE_0__["random"](-5, 5, true); });
}
/***/ }),
/***/ "./ts/etc/apiHelpers.ts":
/*!******************************!*\
!*** ./ts/etc/apiHelpers.ts ***!
\******************************/
/*! exports provided: makeUrl, toPayload */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeUrl", function() { return makeUrl; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toPayload", function() { return toPayload; });
/**
* Convert a JS object into GET URL parameters
*
* @param base Base URL atop which to add GET parameters
* @param params Object to insert into a URL string
*/
function makeUrl(base, params) {
if (params) {
let out = base + "?";
Object.keys(params).forEach(k => {
out += k;
out += '=';
out += params[k];
out += "&";
});
return out.replace(/&$/g, "");
}
else {
return base;
}
}
;
/**
* Convert information in GET request into the message for a POST request
*/
const toPayload = (toSend) => {
return {
method: "POST",
body: JSON.stringify(toSend),
headers: {
"Content-type": "application/json; charset=UTF-8"
}
};
};
/***/ }),
/***/ "./ts/etc/arrayUtils.ts":
/*!******************************!*\
!*** ./ts/etc/arrayUtils.ts ***!
\******************************/
/*! exports provided: sortWithIndices */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortWithIndices", function() { return sortWithIndices; });
/**
* Copies and sorts an array while keeping track of the indices. Currently only supports sorting max -> min.
*
* @param arr - Array to be copied and sorted
*/
function sortWithIndices(arr, fn) {
// If fn is not provided, default to sorting by max value
if (!fn) {
fn = function (left, right) {
return left[0] > right[0] ? -1 : 1;
};
}
let out = {
arr: [],
sortIndices: []
};
let idxTracker = [];
for (let i = 0; i < arr.length; i++) {
idxTracker[i] = [arr[i], i];
}
idxTracker.sort(function (left, right) {
return left[0] > right[0] ? -1 : 1;
});
for (var j = 0; j < arr.length; j++) {
out.sortIndices.push(idxTracker[j][1]);
out.arr[j] = idxTracker[j][0];
}
return out;
}
/***/ }),
/***/ "./ts/etc/types.ts":
/*!*************************!*\
!*** ./ts/etc/types.ts ***!
\*************************/
/*! exports provided: Toggled, NormBy, ModelKind */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Toggled", function() { return Toggled; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NormBy", function() { return NormBy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelKind", function() { return ModelKind; });
var Toggled;
(function (Toggled) {
Toggled[Toggled["ADDED"] = 0] = "ADDED";
Toggled[Toggled["REMOVED"] = 1] = "REMOVED";
})(Toggled || (Toggled = {}));
var NormBy;
(function (NormBy) {
NormBy[NormBy["ROW"] = 0] = "ROW";
NormBy[NormBy["COL"] = 1] = "COL";
NormBy[NormBy["ALL"] = 2] = "ALL";
})(NormBy || (NormBy = {}));
var ModelKind;
(function (ModelKind) {
ModelKind["Bidirectional"] = "bidirectional";
ModelKind["Autoregressive"] = "autoregressive";
})(ModelKind || (ModelKind = {}));
/***/ }),
/***/ "./ts/etc/xd3.ts":
/*!***********************!*\
!*** ./ts/etc/xd3.ts ***!
\***********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.clear = function () {
this.selectAll('*').remove();
return this;
};
d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.toggleClass = function (className) {
this.classed(className, !this.classed(className));
return this;
};
d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.show = function () {
this.style('display', 'initial');
return this;
};
d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.hide = function () {
this.style('display', 'none');
return this;
};
d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.toggle = function () {
var isHidden = this.style('display') == 'none';
return this.style('display', isHidden ? 'inherit' : 'none');
};
d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.after = function (tagName) {
var elements = [];
this.each(function () {
var element = document.createElement(tagName);
this.parentNode.insertBefore(element, this.nextSibling);
elements.push(element);
});
return d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](elements);
};
d3__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.before = function (tagName) {
var elements = [];
this.each(function () {
var element = document.createElement(tagName);
this.parentNode.insertBefore(element, this);
elements.push(element);
});
return d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](elements);
};
/***/ }),
/***/ "./ts/main.ts":
/*!********************!*\
!*** ./ts/main.ts ***!
\********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _vis_attentionVis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vis/attentionVis */ "./ts/vis/attentionVis.ts");
/* harmony import */ var _file_loader_name_exBERT_html_exBERT_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! file-loader?name=exBERT.html!../exBERT.html */ "./node_modules/file-loader/dist/cjs.js?name=exBERT.html!./exBERT.html");
/* harmony import */ var _file_loader_name_exBERT_html_exBERT_html__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_file_loader_name_exBERT_html_exBERT_html__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _file_loader_name_index_html_index_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! file-loader?name=index.html!../index.html */ "./node_modules/file-loader/dist/cjs.js?name=index.html!./index.html");
/* harmony import */ var _file_loader_name_index_html_index_html__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_file_loader_name_index_html_index_html__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _css_main_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../css/main.scss */ "./css/main.scss");
/* harmony import */ var _css_main_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_css_main_scss__WEBPACK_IMPORTED_MODULE_3__);
window.onload = () => {
const base = document.getElementById('attention-vis');
//@ts-ignore
const mainVis = new _vis_attentionVis__WEBPACK_IMPORTED_MODULE_0__["MainGraphic"](base);
console.log("Done loading window");
};
/***/ }),
/***/ "./ts/uiConfig.ts":
/*!************************!*\
!*** ./ts/uiConfig.ts ***!
\************************/
/*! exports provided: UIConfig */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UIConfig", function() { return UIConfig; });
/* harmony import */ var _etc_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./etc/types */ "./ts/etc/types.ts");
/* harmony import */ var _etc_Tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./etc/_Tools */ "./ts/etc/_Tools.ts");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
/* harmony import */ var _etc_URLHandler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./etc/URLHandler */ "./ts/etc/URLHandler.ts");
const falsey = val => (new Set(['false', 0, "no", false, null, ""])).has(val);
const truthy = val => !falsey(val);
const toNumber = x => +x;
class UIConfig {
constructor() {
this._conf = {};
this._nHeads = 12;
this._nLayers = null;
this.attType = 'aa';
this.fromURL();
this.toURL(false);
}
toURL(updateHistory = false) {
_etc_URLHandler__WEBPACK_IMPORTED_MODULE_4__["URLHandler"].updateUrl(this._conf, updateHistory);
}
fromURL() {
const params = _etc_URLHandler__WEBPACK_IMPORTED_MODULE_4__["URLHandler"].parameters;
this._conf = {
model: params['model'] || 'bert-base-cased',
modelKind: params['modelKind'] || _etc_types__WEBPACK_IMPORTED_MODULE_0__["ModelKind"].Bidirectional,
sentence: params['sentence'] || "The girl ran to a local pub to escape the din of her city.",
layer: params['layer'] || 1,
heads: this._initHeads(params['heads']),
threshold: params['threshold'] || 0.7,
tokenInd: params['tokenInd'] || null,
tokenSide: params['tokenSide'] || null,
maskInds: params['maskInds'] || [9],
hideClsSep: truthy(params['hideClsSep']) || true,
};
this._token = { side: this._conf.tokenSide, ind: this._conf.tokenInd };
}
_initHeads(v) {
if (v == null || v.length < 1) {
this.selectAllHeads();
}
else {
console.log(this.headSet(new Set(v))._conf.heads);
}
return this.heads();
}
nHeads(val) {
if (val == null)
return this._nHeads;
this._nHeads = val;
return this;
}
nLayers(val) {
if (val == null)
return this._nLayers;
this._nLayers = val;
return this;
}
toggleSelectAllHeads() {
if (this.heads().length == 0) {
this.selectAllHeads();
}
else {
this.selectNoHeads();
}
}
selectAllHeads() {
this.headSet(new Set(lodash__WEBPACK_IMPORTED_MODULE_2__["range"](0, this._nHeads)));
}
selectNoHeads() {
this.headSet(new Set([]));
}
toggleHead(head) {
let out;
if (this.headSet().has(head)) {
this.headSet().delete(head);
out = _etc_types__WEBPACK_IMPORTED_MODULE_0__["Toggled"].REMOVED;
}
else {
this.headSet().add(head);
out = _etc_types__WEBPACK_IMPORTED_MODULE_0__["Toggled"].ADDED;
}
// Set through setter function to ensure url is updated
this.headSet(this.headSet()); // I hate mutable datastructures... This is confusing.
return out;
}
toggleToken(e) {
const picker = ramda__WEBPACK_IMPORTED_MODULE_3__["pick"](['ind', 'side']);
const compareEvent = picker(e);
const compareToken = picker(this.token());
if (ramda__WEBPACK_IMPORTED_MODULE_3__["equals"](compareToken, compareEvent)) {
this.rmToken();
}
else {
this.token(e);
}
return this;
}
token(val) {
if (val == null)
return this._token;
this._token = val;
this._conf.tokenInd = val.ind;
this._conf.tokenSide = val.side;
this.toURL();
return this;
}
hasToken() {
const conf = this._conf;
const actuallyNull = ((conf.tokenInd == null) && (conf.tokenSide == null));
const strNull = (conf.tokenInd == "null");
return (!actuallyNull) && (!strNull);
}
rmToken() {
this.token({ ind: null, side: null });
return this;
}
sentence(val) {
if (val == null)
return this._conf.sentence;
this._conf.sentence = val;
this.toURL(true);
return this;
}
threshold(val) {
if (val == null)
return this._conf.threshold;
this._conf.threshold = val;
this.toURL();
return this;
}
heads() {
return this._conf.heads;
}
layer(val) {
if (val == null)
return this._conf.layer;
this._conf.layer = val;
this.toURL();
return this;
}
headSet(val) {
if (val == null) {
return this._headSet;
}
this._headSet = val;
this._conf.heads = _etc_Tools__WEBPACK_IMPORTED_MODULE_1__["set2SortedArray"](this._headSet);
this.toURL();
return this;
}
maskInds(val) {
if (val == null)
return this._conf.maskInds;
this._conf.maskInds = val;
this.toURL();
return this;
}
hideClsSep(val) {
if (val == null)
return this._conf.hideClsSep;
this._conf.hideClsSep = truthy(val);
this.toURL();
return this;
}
model(val) {
if (val == null)
return this._conf.model;
this._conf.model = val;
this.toURL();
return this;
}
modelKind(val) {
if (val == null)
return this._conf.modelKind;
this._conf.modelKind = val;
this.toURL();
return this;
}
/**
* Return the offset needed for the modelKind in the configuration
*/
get offset() {
switch (this.modelKind()) {
case _etc_types__WEBPACK_IMPORTED_MODULE_0__["ModelKind"].Bidirectional: {
return 0;
}
case _etc_types__WEBPACK_IMPORTED_MODULE_0__["ModelKind"].Autoregressive: {
return 0;
}
default: {
return 0;
}
}
}
get showNext() {
return this.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_0__["ModelKind"].Autoregressive ? true : false;
}
get matchHistogramDescription() {
return this.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_0__["ModelKind"].Autoregressive ? "Next" : "Matched";
}
}
/***/ }),
/***/ "./ts/vis/AttentionConnector.ts":
/*!**************************************!*\
!*** ./ts/vis/AttentionConnector.ts ***!
\**************************************/
/*! exports provided: scaleLinearWidth, AttentionGraph */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scaleLinearWidth", function() { return scaleLinearWidth; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttentionGraph", function() { return AttentionGraph; });
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
/* harmony import */ var d3_selection_multi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection-multi */ "./node_modules/d3-selection-multi/index.js");
/* harmony import */ var _EdgeConnector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./EdgeConnector */ "./ts/vis/EdgeConnector.ts");
/* harmony import */ var _VisComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VisComponent */ "./ts/vis/VisComponent.ts");
/* harmony import */ var _etc_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../etc/types */ "./ts/etc/types.ts");
const scaleLinearWidth = opacity => 5 * opacity ^ 0.33;
class AttentionGraph extends _VisComponent__WEBPACK_IMPORTED_MODULE_3__["VComponent"] {
constructor(d3Parent, eventHandler, options = {}) {
super(d3Parent, eventHandler);
this.css_name = '';
// OPTIONS WITH DEFAULTS
this._threshold = 0.7; // Accumulation threshold. Between 0-1
this.options = {
boxheight: 26,
height: 500,
width: 200,
offset: 0,
};
/**
* Scale the opacity according to the values of the data, from 0 to max of contained data
* Normalize by each source target, or across the whole
*/
this.createScales = () => {
this.opacityScales = [];
let arr = [];
// Group normalization
switch (this.normBy) {
case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].ROW:
arr = this.edgeData.extent(1);
this.opacityScales = [];
arr.forEach((v, i) => {
this.opacityScales.push(d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]()
.domain([0, v[1]])
.range([0, 0.9]));
});
break;
case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].COL:
arr = this.edgeData.extent(0);
this.opacityScales = [];
arr.forEach((v, i) => {
this.opacityScales.push(d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]()
.domain([0, v[1]])
.range([0, 0.9]));
});
break;
case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].ALL:
const maxIn = d3__WEBPACK_IMPORTED_MODULE_0__["max"](this.plotData.map((d) => d.v));
for (let i = 0; i < this._data.length; i++) {
this.opacityScales.push(d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]()
.domain([0, maxIn])
.range([0, 1]));
}
break;
default:
console.log("Nor norming specified");
break;
}
};
this.superInitSVG(options);
this._init();
}
_init() {
this.svg = this.parent;
this.graph = this.svg.selectAll(`.atn-curve`);
this.linkGen = d3__WEBPACK_IMPORTED_MODULE_0__["linkHorizontal"]()
.x(d => d[0])
.y(d => d[1]);
}
// Define whether to use the 'j' or 'i' attribute to calculate opacities
scaleIdx() {
switch (this.normBy) {
case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].COL:
return 'j';
case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].ROW:
return 'i';
case _etc_types__WEBPACK_IMPORTED_MODULE_4__["NormBy"].ALL:
return 'i';
}
}
/**
* Create connections between locations of the SVG using D3's linkGen
*/
createConnections() {
const self = this;
const op = this.options;
if (this.paths) {
this.paths.attrs({
'd': (d, i) => {
const data = {
source: [0, op.boxheight * (d.i + 0.5 + op.offset)],
target: [op.width, op.boxheight * (d.j + 0.5)] // + 2 allows small offset
};
return this.linkGen(data);
},
'class': 'atn-curve'
})
.attr("src-idx", (d, i) => d.i)
.attr("target-idx", (d, i) => d.j);
}
}
/**
* Change the height of the SVG
*/
updateHeight() {
const op = this.options;
if (this.svg != null) {
this.svg.attr("height", this.options.height + (op.offset * this.options.boxheight));
}
return this;
}
/**
* Change the width of the SVG
*/
updateWidth() {
if (this.svg != null) {
this.svg.attr("width", this.options.width);
}
return this;
}
/**
* Change the Opacity of the lines according to the value of the data
*/
updateOpacity() {
const self = this;
if (this.paths != null) {
// paths.transition().duration(500).attr('opacity', (d) => {
this.paths.attr('opacity', (d) => {
const val = this.opacityScales[d[self.scaleIdx()]](d.v);
return val;
});
this.paths.attr('stroke-width', (d) => {
const val = this.opacityScales[d[self.scaleIdx()]](d.v);
return scaleLinearWidth(val); //5 * val^0.33;
});
}
return this;
}
/**
* Rerender the graph in the event that the data changes
*/
updateData() {
if (this.graph != null) {
d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](".atn-curve").remove();
const data = this.plotData;
this.paths = this.graph
.data(data)
.join('path');
this.createConnections();
this.updateOpacity();
return this;
}
}
data(value) {
if (value == null) {
return this._data;
}
this._data = value;
this.edgeData = new _EdgeConnector__WEBPACK_IMPORTED_MODULE_2__["EdgeData"](value);
this.plotData = this.edgeData.format(this._threshold);
this.createScales();
this.updateData();
return this;
}
height(value) {
if (value == null) {
return this.options.height;
}
this.options.height = value;
this.updateHeight();
return this;
}
width(value) {
if (value == null) {
return this.options.width;
}
this.options.width = value;
this.updateWidth();
return this;
}
threshold(value) {
if (value == null) {
return this._threshold;
}
this._threshold = value;
this.plotData = this.edgeData.format(this._threshold);
this.createScales();
this.updateData();
return this;
}
_wrangle(data) {
return data;
}
_render(data) {
this.svg.html('');
this.updateHeight();
this.updateWidth();
this.updateData();
return this;
}
}
AttentionGraph.events = {}; // No events needed for this one
/***/ }),
/***/ "./ts/vis/AttentionHeadBox.ts":
/*!************************************!*\
!*** ./ts/vis/AttentionHeadBox.ts ***!
\************************************/
/*! exports provided: getAttentionInfo, AttentionHeadBox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAttentionInfo", function() { return getAttentionInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttentionHeadBox", function() { return AttentionHeadBox; });
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
/* harmony import */ var _VisComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VisComponent */ "./ts/vis/VisComponent.ts");
/* harmony import */ var _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../etc/SVGplus */ "./ts/etc/SVGplus.ts");
/* harmony import */ var _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tensorflow/tfjs */ "./node_modules/@tensorflow/tfjs/dist/tf.esm.js");
/**
* From an attention matrix selected by layer, show a summary of the attentions belonging to each head.
*
* @param headMat The matrix representing all the attentions by head (layer already selected)
* @param headList The heads that are selected
* @param side Is this the right or the left display?
* @param tokenInd If not null, select just the information from a single token across heads
* @returns Information needed to label the headbox
*/
function getAttentionInfo(headMat, headList, side = "left", token = null) {
// Collect only from headlist, average each head, transpose to ease iteration
if (headList.length == 0) {
return {
rows: [[]],
labels: [],
max: 0,
};
}
let dim = null;
// Only change the attention graph opposite selected token
if (token != null && (token.side != side)) {
dim = token.side == "left" ? -2 : -1; // Assign to "from" direction if "left"
}
let axis = side == "left" ? 2 : 1;
// average across the axis representing the attentions.
let gatheredMat = _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_3__["tensor3d"](headMat);
if (dim != null) {
gatheredMat = gatheredMat.gather([token.ind], dim);
}
let newMat = gatheredMat.gather(headList, 0).mean([axis]).transpose();
const rowInfo = newMat.arraySync();
const out = {
rows: rowInfo,
labels: headList,
max: newMat.max().arraySync(),
};
return out;
}
;
class AttentionHeadBox extends _VisComponent__WEBPACK_IMPORTED_MODULE_1__["VComponent"] {
constructor(d3Parent, eventHandler, options = {}) {
super(d3Parent, eventHandler);
this.css_name = '';
this.rowCssName = 'att-head';
this.boxCssName = 'att-rect';
this._current = {};
this.options = {
boxDim: 26,
yscale: 1,
xscale: 0.5,
side: "left",
maxWidth: 200,
offset: 0,
};
this.superInitSVG(options);
this._init();
}
_init() {
this.headRows = this.base.selectAll(`.${this.rowCssName}`);
this.headCells = this.headRows.selectAll(`${this.boxCssName}`);
this.opacityScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]().range([0, 1]);
}
updateCurrent() {
const op = this.options;
const cur = this._current;
const nHeads = this._data.rows[0].length;
const baseHeadWidth = op.boxDim * op.xscale;
// Scale headwidth according to maximum width
const getHeadScale = (nH) => (Math.min(op.maxWidth / nH, baseHeadWidth) / baseHeadWidth) * op.xscale;
cur.headHeight = op.boxDim * op.yscale;
cur.headWidth = getHeadScale(nHeads) * op.boxDim;
cur.xPad = cur.headWidth;
cur.yPad = (op.boxDim - cur.headHeight) / 2;
const getBoxWidth = (headWidth) => {
const maxBwidth = 100;
const bwidth = this._data.rows[0].length * cur.headWidth;
const scale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"];
if (bwidth > maxBwidth) {
return;
}
};
cur.boxWidth = (this._data.rows[0].length * cur.headWidth);
cur.totalWidth = (2 * cur.xPad) + cur.boxWidth;
cur.totalHeight = (op.boxDim * (this._data.rows.length + op.offset));
return this._current;
}
updateData() {
const op = this.options;
const self = this;
const boxEvent = (i) => { return { ind: i, side: op.side, head: self._data.labels[i] }; };
const cur = this.updateCurrent();
const getBaseX = () => self.base.node().getBoundingClientRect().left;
const getBaseY = () => self.base.node().getBoundingClientRect().top;
this.base.html('');
this.parent
.attr("width", cur.totalWidth)
.attr("height", cur.totalHeight);
this.headRows = this.base.selectAll(`.${self.rowCssName}`)
.data(self._data.rows)
.join("g")
.attrs({
class: (d, i) => `${self.rowCssName} ${self.rowCssName}-${i}`,
transform: (d, i) => {
return _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__["SVG"].translate({
x: cur.xPad,
y: (op.boxDim * (i + op.offset)) + cur.yPad,
});
},
width: cur.boxWidth,
height: cur.headHeight,
})
.on("mouseover", (d, i) => {
self.eventHandler.trigger(AttentionHeadBox.events.rowMouseOver, { ind: i, side: op.side });
})
.on("mouseout", (d, i) => {
self.eventHandler.trigger(AttentionHeadBox.events.rowMouseOut, { ind: i, side: op.side });
});
this.headCells = this.headRows
.selectAll(`${this.boxCssName}`)
.data(d => d)
.join('rect')
.attrs({
x: (d, i) => i * cur.headWidth,
y: 0,
class: this.boxCssName,
head: (d, i) => self._data.labels[i],
width: cur.headWidth,
height: cur.headHeight,
opacity: (d) => this.opacityScale(d),
fill: "blue"
})
.on("mouseover", (d, i) => {
self.eventHandler.trigger(AttentionHeadBox.events.boxMouseOver, boxEvent(i));
})
.on("mouseout", (d, i) => {
self.eventHandler.trigger(AttentionHeadBox.events.boxMouseOut, boxEvent(i));
})
.on("click", (d, i) => {
self.eventHandler.trigger(AttentionHeadBox.events.boxClick, boxEvent(i));
})
.on("mousemove", function (d, i) {
const op = self.options;
const mouse = d3__WEBPACK_IMPORTED_MODULE_0__["mouse"](self.base.node());
self.eventHandler.trigger(AttentionHeadBox.events.boxMouseMove, { ind: i, side: op.side, baseX: getBaseX(), baseY: getBaseY(), mouse: mouse });
})
.append("svg:title")
.text((d, i) => "Head " + (self._data.labels[i] + 1));
}
_wrangle(data) {
this._data = data;
this.opacityScale = this.opacityScale.domain([0, data.max]);
return data;
}
_render(data) {
this.updateData();
}
}
AttentionHeadBox.events = {
rowMouseOver: "AttentionHeadBox_RowMouseOver",
rowMouseOut: "AttentionHeadBox_RowMouseOut",
boxMouseOver: "AttentionHeadBox_BoxMouseOver",
boxMouseOut: "AttentionHeadBox_BoxMouseOut",
boxMouseMove: "AttentionHeadBox_BoxMouseMove",
boxClick: "AttentionHeadBox_BoxClick",
};
/***/ }),
/***/ "./ts/vis/EdgeConnector.ts":
/*!*********************************!*\
!*** ./ts/vis/EdgeConnector.ts ***!
\*********************************/
/*! exports provided: toEdges, EdgeData */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toEdges", function() { return toEdges; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EdgeData", function() { return EdgeData; });
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
/* harmony import */ var _etc_arrayUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../etc/arrayUtils */ "./ts/etc/arrayUtils.ts");
/* harmony import */ var _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tensorflow/tfjs */ "./node_modules/@tensorflow/tfjs/dist/tf.esm.js");
/**
* Convert data matrix to necessary data array to pass to SVG connections
*/
function toEdges(data, cutoffAmt = 1) {
let outArr = [];
let cutoff;
data.forEach((row, i) => {
cutoff = cutoffAmt * d3__WEBPACK_IMPORTED_MODULE_0__["sum"](row);
let counter = 0;
const sortedArr = _etc_arrayUtils__WEBPACK_IMPORTED_MODULE_2__["sortWithIndices"](row);
sortedArr.arr.forEach((v, j) => {
if (counter < cutoff) {
const obj = {
i: i,
j: sortedArr.sortIndices[j],
v: v,
};
outArr.push(obj);
counter += v;
}
});
});
return outArr;
}
/**
* Class for implementing operations on AttentionGraph implementation.
* Closely tied to [[AttentionConnector]]
*/
class EdgeData {
constructor(data) {
this.data = data;
this.tensData = _tensorflow_tfjs__WEBPACK_IMPORTED_MODULE_3__["tensor"](data);
}
min(axis) {
return this.tensData.min(axis).dataSync();
}
max(axis) {
return this.tensData.max(axis).dataSync();
}
extent(axis) {
return d3__WEBPACK_IMPORTED_MODULE_0__["zip"](this.min(axis), this.max(axis));
}
/**
* Format the data to send to SVG chart.
*
* @param accumulateThresh - A float between 0 and 1, indicating the amount of weight to display. Defaults to 0.7.
*/
format(accumulateThresh = 0.7) {
return toEdges(this.data, accumulateThresh);
}
}
/***/ }),
/***/ "./ts/vis/TextToken.ts":
/*!*****************************!*\
!*** ./ts/vis/TextToken.ts ***!
\*****************************/
/*! exports provided: TextTokens, LeftTextToken, RightTextToken */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextTokens", function() { return TextTokens; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeftTextToken", function() { return LeftTextToken; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RightTextToken", function() { return RightTextToken; });
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _VisComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VisComponent */ "./ts/vis/VisComponent.ts");
class TextTokens extends _VisComponent__WEBPACK_IMPORTED_MODULE_3__["VComponent"] {
constructor(d3Parent, eventHandler, options = {}) {
super(d3Parent, eventHandler);
this.eInfo = (sel, i) => { return { sel: sel, side: this.side, ind: i }; };
this.eEmbedding = (sel, i, embed) => { return { sel: sel, side: this.side, ind: i, embeddings: embed }; };
this.options = {
boxheight: 26,
offset: 0,
divHover: {
width: 150,
height: 150,
offset: [3, 3],
textInfo: "Would predict..."
},
};
this.superInitHTML(options);
}
mask(maskInds) {
this.parent.selectAll(`.${this.css_name}`)
.each((d, i, n) => {
const sel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](n[i]);
sel.classed("masked-token", lodash__WEBPACK_IMPORTED_MODULE_2__["includes"](maskInds, i));
});
}
getEmbedding(ind) {
return this._data[ind];
}
_init() { }
_wrangle(data) {
this.data = this._data;
return this._data;
}
_divPlacement() {
const getBaseX = () => self.base.node().getBoundingClientRect().left;
const getBaseY = () => self.base.node().getBoundingClientRect().top;
const self = this;
const op = this.options;
const mouse = d3__WEBPACK_IMPORTED_MODULE_0__["mouse"](self.base.node());
const divOffset = [3, 3];
const left = mouse[0] + getBaseX() - (op.divHover.width + divOffset[0]);
const top = mouse[1] + getBaseY() + divOffset[1];
return [left, top];
}
_render(data) {
const op = this.options;
const self = this;
// Reset token display
this.base.selectAll("*").remove();
this.divHover = this.base.append('div')
.classed('tok-info', true)
.classed('mat-hover-display', true)
.classed(this.hover_css_name, true)
.style('width', String(this.options.divHover.width) + 'px')
.style('height', String(this.options.divHover.height) + 'px');
this.divHover
.append('p')
.classed('p-info', true)
.style('font-weight', 'bold')
.text(op.divHover.textInfo);
// Add blank divs
console.log(`Internal offset (${this.side}): `, op.offset);
const blankDivs = this.base.selectAll(`.blank-text-box`);
blankDivs.data(ramda__WEBPACK_IMPORTED_MODULE_1__["range"](0, op.offset))
.join("div")
.classed("blank-text-box", true)
.classed("token", true)
.style("height", op.boxheight + 'px')
.text((d) => " ");
// Render normal text box data
self.textBoxes = this.base.selectAll(`.${this.css_name}`)
.data(data)
.join("div")
.attr("class", (d, i) => `token ${this.css_name} token-${i}`)
.attr("id", (d, i) => `${this.css_name}-${i}`)
.style('height', op.boxheight + 'px')
.text((d) => {
return d.text.replace("\u0120", " ").replace("\u010A", "\\n");
})
.on('mouseover', function (d, i) {
const sel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
sel.style('background', 'lightblue');
self.eventHandler.trigger(TextTokens.events.tokenMouseOver, self.eInfo(sel, i));
self.divHover.style('visibility', 'visible');
})
.on('mouseout', function (d, i) {
let sel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
sel.style('background', 0);
self.eventHandler.trigger(TextTokens.events.tokenMouseOut, self.eInfo(sel, i));
self.divHover.style('visibility', 'hidden');
})
.on('mousemove', function (d, i) {
const s = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
const [left, top] = self._divPlacement();
self.divHover
.style('left', String(left) + 'px')
.style('top', String(top) + 'px')
.selectAll(".topk-word-box")
//@ts-ignore
.data(d3__WEBPACK_IMPORTED_MODULE_0__["zip"](d.topk_words, d.topk_probs))
.join('p')
.classed("topk-word-box", true)
.text(w => {
const name = w[0].replace(/\u0120/g, " ").replace(/\u010A/g, "\\n");
const prob = w[1].toFixed(2);
return name + ": " + prob;
});
});
self.addClick(self.textBoxes);
}
addClick(textboxes) {
const self = this;
self.textBoxes = textboxes
.on('click', (d, i, n) => {
const sel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](n[i]);
self.eventHandler.trigger(TextTokens.events.tokenClick, self.eEmbedding(sel, i, d.embeddings));
})
.on('dblclick', (d, i, n) => {
const sel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](n[i]);
self.eventHandler.trigger(TextTokens.events.tokenDblClick, self.eInfo(sel, i));
});
}
}
TextTokens.events = {
tokenMouseOver: "TextToken_TokenMouseOver",
tokenMouseOut: "TextToken_TokenMouseOut",
tokenClick: "TextToken_TokenClick",
tokenDblClick: "TextToken_TokenDblClick",
};
class LeftTextToken extends TextTokens {
constructor(d3Parent, eventHandler, options = {}) {
super(d3Parent, eventHandler);
this.css_name = 'left-token';
this.hover_css_name = 'left-token-hover';
this.side = 'left';
this.offset = 1;
}
}
class RightTextToken extends TextTokens {
constructor(d3Parent, eventHandler, options = {}) {
super(d3Parent, eventHandler);
this.css_name = 'right-token';
this.hover_css_name = 'right-token-hover';
this.side = 'right';
this.offset = 0;
}
_divPlacement() {
const getBaseX = () => self.base.node().getBoundingClientRect().left;
const getBaseY = () => self.base.node().getBoundingClientRect().top;
const self = this;
const op = this.options;
const mouse = d3__WEBPACK_IMPORTED_MODULE_0__["mouse"](self.base.node());
const divOffset = [3, 3];
const left = mouse[0] + getBaseX() + divOffset[0];
const top = mouse[1] + getBaseY() + divOffset[1];
return [left, top];
}
}
/***/ }),
/***/ "./ts/vis/VisComponent.ts":
/*!********************************!*\
!*** ./ts/vis/VisComponent.ts ***!
\********************************/
/*! exports provided: VComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VComponent", function() { return VComponent; });
/* harmony import */ var _etc_Util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../etc/Util */ "./ts/etc/Util.ts");
/* harmony import */ var _etc_SimpleEventHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../etc/SimpleEventHandler */ "./ts/etc/SimpleEventHandler.ts");
/* harmony import */ var _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../etc/SVGplus */ "./ts/etc/SVGplus.ts");
/**
* Should have VComponentHTML and VComponentSVG
*
* Common Properties:
* - events
* - eventHandler (V important)
* - options (Maintains public state. Can expose these with get/set functions with auto update)
* - _current (Maintains private state)
* - cssName (synced with corresponding CSS file)
* - parent (HTML is div containing the base, SVG is SVG element)
* - base (HTML is div with css_name established)
* - _data (Data used to create and render the component)
* - _renderData (Data needed to display. This may not be needed, but is currently used in histogram)
*
* Common Methods:
* - constructor
* - _render() Consider replacing with `_updateData()` that updates all data at once
* - update() Consider replacing this with `data()` that auto updates data
* - redraw()
* - destroy()
*/
class VComponent {
// CONSTRUCTOR ============================================================
/**
* Simple constructor. Subclasses should call @superInit(options) as well.
* see why here: https://stackoverflow.com/questions/43595943/why-are-derived-class-property-values-not-seen-in-the-base-class-constructor
*
* template:
constructor(d3Parent: D3Sel, eventHandler?: SimpleEventHandler, options: {} = {}) {
super(d3Parent, eventHandler);
// -- access to subclass params:
this.superInit(options);
}
*
* @param {D3Sel} d3parent D3 selection of parent SVG DOM Element
* @param {SimpleEventHandler} eventHandler a global event handler object or 'null' for local event handler
*/
constructor(d3parent, eventHandler) {
this.id = _etc_Util__WEBPACK_IMPORTED_MODULE_0__["Util"].simpleUId({});
this.parent = d3parent;
// If not further specified - create a local event handler bound to the bas element
this.eventHandler = eventHandler ||
new _etc_SimpleEventHandler__WEBPACK_IMPORTED_MODULE_1__["SimpleEventHandler"](this.parent.node());
// Object for storing internal states and variables
this._visibility = { hidden: false };
}
superInitHTML(options = {}) {
Object.keys(options).forEach(key => this.options[key] = options[key]);
this.base = this.parent.append('div')
.classed(this.css_name, true);
}
/**
* Has to be called as last call in subclass constructor.
*
* @param {{}} options
* @param defaultLayers -- create the default layers: bg -> main -> fg
*/
superInitSVG(options = {}, defaultLayers = ['bg', 'main', 'fg']) {
// Set default options if not specified in constructor call
// const defaults = this.defaultOptions;
// this.options = {};
// const keys = new Set([...Object.keys(defaults), ...Object.keys(options)]);
// keys.forEach(key => this.options[key] = (key in options) ? options[key] : defaults[key]);
Object.keys(options).forEach(key => this.options[key] = options[key]);
this.layers = {};
// Create the base group element
const svg = this.parent;
this.base = _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__["SVG"].group(svg, this.css_name + ' ID' + this.id, this.options.pos);
// create default layers: background, main, foreground
if (defaultLayers) {
// construction order is important !
defaultLayers.forEach(layer => {
this.layers[layer] = _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__["SVG"].group(this.base, layer);
});
}
}
// DATA UPDATE & RENDER ============================================================
/**
* Every time data has changed, update is called and
* triggers wrangling and re-rendering
* @param {Object} data data object
* @return {*} ---
*/
update(data) {
this._data = data;
if (this._visibility.hidden)
return;
this.renderData = this._wrangle(data);
this._render(this.renderData);
}
// UPDATE OPTIONS ============================================================
/**
* Updates instance options
* @param {Object} options only the options that should be updated
* @param {Boolean} reRender if option change requires a re-rendering (default:false)
* @returns {*} ---
*/
updateOptions({ options, reRender = false }) {
Object.keys(options).forEach(k => this.options[k] = options[k]);
if (reRender)
this._render(this.renderData);
}
// === CONVENIENCE ====
redraw() {
this._render(this.renderData);
}
setHideElement(hE) {
this._visibility.hideElement = hE;
}
hideView() {
if (!this._visibility.hidden) {
const hE = this._visibility.hideElement || this.parent;
hE.transition().styles({
'opacity': 0,
'pointer-events': 'none'
}).style('display', 'none');
this._visibility.hidden = true;
}
}
unhideView() {
if (this._visibility.hidden) {
const hE = this._visibility.hideElement || this.parent;
hE.transition().styles({
'opacity': 1,
'pointer-events': null,
'display': null
});
this._visibility.hidden = false;
// this.update(this.data);
}
}
destroy() {
this.base.remove();
}
clear() {
this.base.html('');
}
}
// STATIC FIELDS ============================================================
/**
* The static property that contains all class related events.
* Should be overwritten and event strings have to be unique!!
*/
VComponent.events = { noEvent: 'VComponent_noEvent' };
/***/ }),
/***/ "./ts/vis/attentionVis.ts":
/*!********************************!*\
!*** ./ts/vis/attentionVis.ts ***!
\********************************/
/*! exports provided: MainGraphic */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MainGraphic", function() { return MainGraphic; });
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
/* harmony import */ var _etc_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../etc/types */ "./ts/etc/types.ts");
/* harmony import */ var _etc_xd3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../etc/xd3 */ "./ts/etc/xd3.ts");
/* harmony import */ var _api_mainApi__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../api/mainApi */ "./ts/api/mainApi.ts");
/* harmony import */ var _uiConfig__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../uiConfig */ "./ts/uiConfig.ts");
/* harmony import */ var _TextToken__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TextToken */ "./ts/vis/TextToken.ts");
/* harmony import */ var _AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./AttentionHeadBox */ "./ts/vis/AttentionHeadBox.ts");
/* harmony import */ var _AttentionConnector__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AttentionConnector */ "./ts/vis/AttentionConnector.ts");
/* harmony import */ var _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../data/TokenWrapper */ "./ts/data/TokenWrapper.ts");
/* harmony import */ var _data_AttentionCapsule__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../data/AttentionCapsule */ "./ts/data/AttentionCapsule.ts");
/* harmony import */ var _etc_SimpleEventHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../etc/SimpleEventHandler */ "./ts/etc/SimpleEventHandler.ts");
/* harmony import */ var _etc_Util__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../etc/Util */ "./ts/etc/Util.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/**
* Showing the top left part of exBERT, no information from the embeddings or the contexts
*/
function isNullToken(tok) {
const isSomeNull = x => {
return (x == null) || (x == "null");
};
const tokIsNull = tok == null;
const tokHasNull = isSomeNull(tok.side) || isSomeNull(tok.ind);
return tokIsNull || tokHasNull;
}
function showBySide(e) {
// Check if saved token in uiConf is null
if (!isNullToken(e)) {
const classSelector = e.side == "left" ? "src-idx" : "target-idx";
_etc_Util__WEBPACK_IMPORTED_MODULE_13__["Sel"].setHidden(".atn-curve");
_etc_Util__WEBPACK_IMPORTED_MODULE_13__["Sel"].setVisible(`.atn-curve[${classSelector}='${e.ind}']`);
}
}
function chooseShowBySide(savedEvent, newEvent) {
if (isNullToken(savedEvent)) {
showBySide(newEvent);
}
}
function chooseShowAll(savedEvent) {
if (isNullToken(savedEvent))
_etc_Util__WEBPACK_IMPORTED_MODULE_13__["Sel"].setVisible(".atn-curve");
}
function unselectHead(head) {
const affectedHeads = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](`.att-rect[head='${head}']`);
affectedHeads.classed("unselected", true);
}
function selectHead(head) {
const affectedHeads = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](`.att-rect[head='${head}']`);
affectedHeads.classed("unselected", false);
}
function setSelDisabled(attr, sel) {
const val = attr ? true : null;
sel.attr('disabled', val);
}
function createStaticSkeleton(base) {
/**
* Top level sections
*/
const sentenceInput = base.append('div')
.attr("id", "sentence-input");
const connectorContainer = base.append('div')
.attr('id', 'connector-container');
const atnControls = connectorContainer.append('div')
.attr("id", "connector-controls");
const atnContainer = connectorContainer.append('div')
.attr("id", "atn-container")
.classed("text-center", true);
/**
* Sentence Input
*/
const formGroup = sentenceInput.append('form')
.append('div').classed('form-group', true);
formGroup.append('label')
.attr('for', "form-sentence-a")
.text(' Input Sentence ');
const sentenceA = formGroup.append('input')
.attr('id', 'form-sentence-a')
.attr('type', 'text')
.attr('name', 'sent-a-input');
sentenceInput.append('div')
.classed('padding', true);
const formButton = sentenceInput.append('button')
.attr('class', 'btn btn-primary')
.attr('id', "update-sentence")
.attr('type', 'button');
formButton.text("Update");
/**
* Connector Controls
*/
const leftControlHalf = atnControls.append('div')
.classed('left-control-half', true);
const rightControlHalf = atnControls.append('div')
.attr('class', 'right-control-half head-control');
const modelSelection = leftControlHalf.append('div')
.attr('id', 'model-selection');
modelSelection.append('label')
.attr('for', 'model-options').text('Select model');
const modelSelector = modelSelection.append('select')
.attr('id', 'model-option-selector')
.attr('name', 'model-options');
const slideContainer = leftControlHalf.append('div')
.classed('slide-container', true);
slideContainer.append('label')
.attr('for', 'my-range')
.html("Display top ...% of attention");
const threshSlider = slideContainer.append('input')
.attr('type', 'range')
.attr('min', '0')
.attr('max', '100')
.attr('value', '70')
.classed('slider', true)
.attr('id', 'my-range');
const layerSelection = leftControlHalf.append('div')
.attr('id', 'layer-selection');
layerSelection.append('div')
.classed('input-description', true)
.text("Layer: ");
const layerCheckboxes = layerSelection.append('div')
.attr('class', 'layer-select btn-group btn-group-toggle')
.attr('data-toggle', 'buttons')
.attr('id', 'layer-select');
const clsToggle = leftControlHalf.append('div')
.attr('id', 'cls-toggle');
clsToggle.append('div')
.attr('class', 'input-description')
.text("Hide Special Tokens");
const clsSwitch = clsToggle.append('label')
.attr('class', 'switch');
clsSwitch.append('input').attr('type', 'checkbox')
.attr('checked', 'checked');
clsSwitch.append('span')
.attr('class', 'short-slider round');
const selectedHeadDiv = rightControlHalf.append('div')
.attr('id', 'selected-head-display');
selectedHeadDiv.append('div')
.classed('input-description', true)
.text('Selected heads:');
const selectedHeads = selectedHeadDiv.append('div').attr('id', 'selected-heads');
const headButtons = rightControlHalf.append('div')
.classed('select-input', true)
.attr('id', 'head-all-or-none');
const headSelectAll = headButtons.append('button').attr('id', 'select-all-heads').text("Select all heads");
const headSelectNone = headButtons.append('button').attr('id', 'select-no-heads').text("Unselect all heads");
const infoContainer = rightControlHalf.append('div')
.attr('id', 'usage-info');
infoContainer.append('p').html("You focus on one token by click.
You can mask any token by double click.");
infoContainer.append('p').html("You can select and de-select a head by a click on the heatmap columns");
connectorContainer.append('div').attr('id', 'vis-break');
/**
* For main attention vis
*/
const headInfoBox = atnContainer.append('div')
.attr('id', "head-info-box")
.classed('mat-hover-display', true)
.classed('text-center', true)
.style('width', String(70) + 'px')
.style('height', String(30) + 'px')
.style('visibillity', 'hidden');
const headBoxLeft = atnContainer.append('svg')
.attr('id', 'left-att-heads');
const tokensLeft = atnContainer.append('div')
.attr("id", "left-tokens");
const atnDisplay = atnContainer.append('svg')
.attr("id", "atn-display");
const tokensRight = atnContainer.append('div')
.attr("id", "right-tokens");
const headBoxRight = atnContainer.append('svg')
.attr('id', 'right-att-heads');
/**
* Return an object that provides handles to the important parts here
*/
const pctSpan = base.select("#my-range-value");
const sels = {
body: d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body'),
atnContainer: atnContainer,
atnDisplay: atnDisplay,
atnHeads: {
left: headBoxLeft,
right: headBoxRight,
headInfo: headInfoBox
},
form: {
sentenceA: sentenceA,
button: formButton
},
tokens: {
left: tokensLeft,
right: tokensRight
},
modelSelector: modelSelector,
clsToggle: clsToggle,
layerCheckboxes: layerCheckboxes,
selectedHeads: selectedHeads,
headSelectAll: headSelectAll,
headSelectNone: headSelectNone,
threshSlider: threshSlider,
};
return sels;
}
class MainGraphic {
/**
*
* @param base 'div' html element into which everything below will be rendered
*/
constructor(baseDiv) {
this.base = d3__WEBPACK_IMPORTED_MODULE_0__["select"](baseDiv);
this.api = new _api_mainApi__WEBPACK_IMPORTED_MODULE_5__["API"]();
this.uiConf = new _uiConfig__WEBPACK_IMPORTED_MODULE_6__["UIConfig"]();
this.sels = createStaticSkeleton(this.base);
this.eventHandler = new _etc_SimpleEventHandler__WEBPACK_IMPORTED_MODULE_12__["SimpleEventHandler"](this.base.node());
this.vizs = {
leftHeads: new _AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"](this.sels.atnHeads.left, this.eventHandler, { side: "left", }),
rightHeads: new _AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"](this.sels.atnHeads.right, this.eventHandler, { side: "right" }),
tokens: {
left: new _TextToken__WEBPACK_IMPORTED_MODULE_7__["LeftTextToken"](this.sels.tokens.left, this.eventHandler),
right: new _TextToken__WEBPACK_IMPORTED_MODULE_7__["RightTextToken"](this.sels.tokens.right, this.eventHandler),
},
attentionSvg: new _AttentionConnector__WEBPACK_IMPORTED_MODULE_9__["AttentionGraph"](this.sels.atnDisplay, this.eventHandler),
};
this._bindEventHandler();
this.mainInit();
}
mainInit() {
const self = this;
this.sels.body.style("cursor", "progress");
this.api.getModelDetails(this.uiConf.model()).then(md => {
const val = md.payload;
// If changing to model with fewer layers, cap accordingly
this.uiConf.nLayers(val.nlayers).nHeads(val.nheads);
const currLayer = this.uiConf.layer();
const maxLayer = this.uiConf.nLayers() - 1;
this.uiConf.layer(Math.min(currLayer, maxLayer));
this.initLayers(this.uiConf.nLayers());
this.api.getMetaAttentions(this.uiConf.model(), this.uiConf.sentence(), this.uiConf.layer()).then(attention => {
const att = attention.payload;
this.initFromResponse(att);
// Wrap postInit into function so asynchronous call does not mess with necessary inits
const postResponseDisplayCleanup = () => {
this._toggleTokenSel();
};
let normBy;
if ((this.uiConf.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive) && (!this.uiConf.hideClsSep())) {
normBy = _etc_types__WEBPACK_IMPORTED_MODULE_3__["NormBy"].COL;
}
else {
normBy = _etc_types__WEBPACK_IMPORTED_MODULE_3__["NormBy"].ALL;
}
this.vizs.attentionSvg.normBy = normBy;
if (this.uiConf.maskInds().length > 0) {
this.tokCapsule.a.maskInds = this.uiConf.maskInds();
this.api.updateMaskedAttentions(this.uiConf.model(), this.tokCapsule.a, this.uiConf.sentence(), this.uiConf.layer()).then(resp => {
const r = resp.payload;
this.attCapsule.updateFromNormal(r, this.uiConf.hideClsSep());
this.tokCapsule.updateTokens(r);
this.update();
postResponseDisplayCleanup();
});
}
else {
this.update();
postResponseDisplayCleanup();
}
if (this.uiConf.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive) {
// Ensure only 1 mask ind is present for autoregressive models
if (this.uiConf.hasToken()) {
this.grayToggle(this.uiConf.token().ind);
}
self.vizs.tokens.left.options.divHover.textInfo = "Would predict next...";
self.vizs.tokens.right.options.divHover.textInfo = "Would predict next...";
}
else {
self.vizs.tokens.left.options.divHover.textInfo = "Would predict here...";
self.vizs.tokens.right.options.divHover.textInfo = "Would predict here...";
}
this.sels.body.style("cursor", "default");
});
});
}
initFromResponse(attention) {
this.attCapsule = Object(_data_AttentionCapsule__WEBPACK_IMPORTED_MODULE_11__["makeFromMetaResponse"])(attention, this.uiConf.hideClsSep());
this.tokCapsule = new _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_10__["TokenWrapper"](attention);
this._staticInits();
}
leaveCorpusMsg(msg) {
this.vizs.corpusInspector.hideView();
this.vizs.corpusMatManager.hideView();
console.log("Running leave msg");
_etc_Util__WEBPACK_IMPORTED_MODULE_13__["Sel"].unhideElement(this.sels.corpusMsgBox);
this.sels.corpusMsgBox.text(msg);
}
_bindEventHandler() {
const self = this;
this.eventHandler.bind(_TextToken__WEBPACK_IMPORTED_MODULE_7__["TextTokens"].events.tokenDblClick, (e) => {
switch (self.uiConf.modelKind()) {
case _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional: {
e.sel.classed("masked-token", !e.sel.classed("masked-token"));
const letter = Object(_data_TokenWrapper__WEBPACK_IMPORTED_MODULE_10__["sideToLetter"])(e.side, this.uiConf.attType);
self.tokCapsule[letter].toggle(e.ind);
self.sels.body.style("cursor", "progress");
self.api.updateMaskedAttentions(this.uiConf.model(), this.tokCapsule.a, this.uiConf.sentence(), this.uiConf.layer()).then((resp) => {
const r = resp.payload;
self.attCapsule.updateFromNormal(r, this.uiConf.hideClsSep());
self.tokCapsule.updateTokens(r);
self.uiConf.maskInds(this.tokCapsule.a.maskInds);
self.update();
self.sels.body.style("cursor", "default");
});
break;
}
case _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive: {
console.log("Autoregressive model doesn't do masking");
break;
}
default: {
console.log("What kind of model is this?");
break;
}
}
});
this.eventHandler.bind(_TextToken__WEBPACK_IMPORTED_MODULE_7__["TextTokens"].events.tokenMouseOver, (e) => {
chooseShowBySide(this.uiConf.token(), e);
});
this.eventHandler.bind(_TextToken__WEBPACK_IMPORTED_MODULE_7__["TextTokens"].events.tokenMouseOut, (e) => {
chooseShowAll(this.uiConf.token());
});
this.eventHandler.bind(_TextToken__WEBPACK_IMPORTED_MODULE_7__["TextTokens"].events.tokenClick, (e) => {
const tokToggle = () => {
this.uiConf.toggleToken(e);
this._toggleTokenSel();
showBySide(e);
};
tokToggle();
this.renderAttHead();
});
this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.rowMouseOver, (e) => {
self.sels.atnHeads.headInfo.style('visibility', 'visible');
});
this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.rowMouseOut, () => {
self.sels.atnHeads.headInfo.style('visibility', 'hidden');
// Don't do anything special on row mouse out
});
this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.boxMouseOver, (e) => {
const updateMat = this.attCapsule.byHead(e.head);
this.vizs.attentionSvg.data(updateMat);
this.vizs.attentionSvg.update(updateMat);
showBySide(this.uiConf.token());
});
this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.boxMouseOut, () => {
const att = this.attCapsule.byHeads(this.uiConf.heads());
this.vizs.attentionSvg.data(att);
this.vizs.attentionSvg.update(att);
showBySide(this.uiConf.token());
});
this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.boxMouseMove, (e) => {
const headInfo = self.sels.atnHeads.headInfo;
let left, top, borderRadius;
if (e.side == "left") {
const divOffset = [12, 3];
left = e.mouse[0] + e.baseX - (+headInfo.style('width').replace('px', '') + divOffset[0]);
top = e.mouse[1] + e.baseY - (+headInfo.style('height').replace('px', '') + divOffset[1]);
borderRadius = "8px 8px 1px 8px";
}
else {
const divOffset = [-13, 3];
left = e.mouse[0] + e.baseX + divOffset[0];
top = e.mouse[1] + e.baseY - (+headInfo.style('height').replace('px', '') + divOffset[1]);
borderRadius = "8px 8px 8px 1px";
}
headInfo
.style('visibility', 'visible')
.style('left', String(left) + 'px')
.style('top', String(top) + 'px')
.style('border-radius', borderRadius)
.text(`Head: ${e.ind + 1}`);
// Don't do anything special on row mouse over
});
this.eventHandler.bind(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["AttentionHeadBox"].events.boxClick, (e) => {
const result = this.uiConf.toggleHead(e.head);
if (result == _etc_types__WEBPACK_IMPORTED_MODULE_3__["Toggled"].ADDED) {
selectHead(e.head);
}
else if (result == _etc_types__WEBPACK_IMPORTED_MODULE_3__["Toggled"].REMOVED) {
unselectHead(e.head);
}
this._renderHeadSummary();
this.renderSvg();
});
}
_toggleTokenSel() {
const e = this.uiConf.token();
const alreadySelected = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('.selected-token');
// If no token should be selected, unselect all tokens
if (!this.uiConf.hasToken()) {
const newSel = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.selected-token');
if (!newSel.empty())
newSel.classed('selected-token', false);
}
// Otherwise, select the indicated token
else {
const token2String = (e) => `#${e.side}-token-${e.ind}`;
const newSel = d3__WEBPACK_IMPORTED_MODULE_0__["select"](token2String(e));
// Check that selection exists
if (!newSel.empty())
newSel.classed('selected-token', true);
}
// Remove previous token selection, if any
if (!alreadySelected.empty()) {
alreadySelected.classed('selected-token', false);
}
if (this.uiConf.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive) {
this.grayToggle(+e.ind);
this.markNextToggle(+e.ind, this.tokCapsule.a.length());
}
}
/** Gray all tokens that have index greater than ind */
grayBadToks(ind) {
if (this.uiConf.modelKind() == _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive) {
const grayToks = function (d, i) {
const s = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
s.classed("masked-token", i > ind);
};
d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.right-token').each(grayToks);
d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.left-token').each(grayToks);
}
}
grayToggle(ind) {
if (this.uiConf.hasToken())
this.grayBadToks(ind);
else
d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.token').classed('masked-token', false);
}
markNextWordToks(ind, N) {
const markToks = function (d, i) {
const s = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
s.classed("next-token", i == Math.min(ind + 1, N));
};
d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.right-token').each(markToks);
d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.left-token').each(markToks);
}
markNextToggle(ind, N) {
if (this.uiConf.hasToken())
this.markNextWordToks(ind, N);
else
d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.token').classed('next-token', false);
}
_staticInits() {
this._initSentenceForm();
this._initModelSelection();
this._renderHeadSummary();
this._initToggle();
this.renderAttHead();
this.renderTokens();
}
_initSentenceForm() {
const self = this;
this.sels.form.sentenceA.attr('placeholder', "Enter new sentence to analyze");
this.sels.form.sentenceA.attr('value', this.uiConf.sentence());
const submitNewSentence = () => {
// replace all occurences of '#' in sentence as this causes the API to break
const sentence_a = this.sels.form.sentenceA.property("value").replace(/\#/g, '');
// Only update if the form is filled correctly
if (sentence_a.length) {
this.sels.body.style("cursor", "progress");
this.api.getMetaAttentions(this.uiConf.model(), sentence_a, this.uiConf.layer())
.then((resp) => {
const r = resp.payload;
this.uiConf.sentence(sentence_a);
this.uiConf.rmToken();
this.attCapsule.updateFromNormal(r, this.uiConf.hideClsSep());
this.tokCapsule.updateFromResponse(r);
this._toggleTokenSel();
this.update();
this.sels.body.style("cursor", "default");
});
}
};
const onEnter = ramda__WEBPACK_IMPORTED_MODULE_2__["curry"]((keyCode, f, event) => {
const e = event || window.event;
if (e.keyCode !== keyCode)
return;
e.preventDefault();
f();
});
const onEnterSubmit = onEnter(13, submitNewSentence);
const btn = this.sels.form.button;
const inputBox = this.sels.form.sentenceA;
btn.on("click", submitNewSentence);
inputBox.on('keypress', onEnterSubmit);
}
_renderHeadSummary() {
this.sels.selectedHeads
.html(ramda__WEBPACK_IMPORTED_MODULE_2__["join"](', ', this.uiConf.heads().map(h => h + 1)));
}
initLayers(nLayers) {
const self = this;
let hasActive = false;
const checkboxes = self.sels.layerCheckboxes.selectAll(".layerCheckbox")
.data(lodash__WEBPACK_IMPORTED_MODULE_1__["range"](0, nLayers))
.join("label")
.attr("class", "btn button layerCheckbox")
.classed('active', (d, i) => {
// Assign to largest layer available if uiConf.layer() > new nLayers
if (d == self.uiConf.layer()) { // Javascript is 0 indexed!
hasActive = true;
return true;
}
if (!hasActive && d == nLayers) {
self.uiConf.layer(d);
hasActive = true;
return true;
}
return false;
})
.text((d) => d + 1)
.append("input")
.attr("type", "radio")
.attr("class", "checkbox-inline")
.attr("name", "layerbox")
// .attr("head", d => d)
.attr("id", (d, i) => "layerCheckbox" + i);
// .text((d, i) => d + " ")
Object(rxjs__WEBPACK_IMPORTED_MODULE_14__["fromEvent"])(checkboxes.nodes(), 'change').pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_15__["tap"])((e) => {
const myData = d3__WEBPACK_IMPORTED_MODULE_0__["select"](e.target).datum();
console.log(myData, "--- myData");
this.sels.layerCheckboxes.selectAll(".layerCheckbox")
.classed('active', d => d === myData);
}), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_15__["map"])((v) => +d3__WEBPACK_IMPORTED_MODULE_0__["select"](v.target).datum()), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_15__["tap"])(v => {
console.log("New layer: ", v);
self.uiConf.layer(v);
self.sels.body.style("cursor", "progress");
}), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_15__["switchMap"])((v) => Object(rxjs__WEBPACK_IMPORTED_MODULE_14__["from"])(self.api.updateMaskedAttentions(self.uiConf.model(), self.tokCapsule.a, self.uiConf.sentence(), v)))).subscribe({
next: (resp) => {
const r = resp.payload;
self.attCapsule.updateFromNormal(r, this.uiConf.hideClsSep());
self.tokCapsule.updateTokens(r);
self.uiConf.maskInds(self.tokCapsule.a.maskInds);
self.update();
self.sels.body.style("cursor", "default");
self._toggleTokenSel();
}
});
const layerId = `#layerCheckbox${this.uiConf.layer()}`;
console.log("Layer ID: ", layerId);
d3__WEBPACK_IMPORTED_MODULE_0__["select"](layerId).attr("checked", "checked");
// Init threshold stuff
const dispThresh = (thresh) => Math.round(thresh * 100);
d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#my-range-value').text(dispThresh(self.uiConf.threshold()));
this.sels.threshSlider.on("input", lodash__WEBPACK_IMPORTED_MODULE_1__["throttle"](function () {
const node = this;
self.uiConf.threshold(+node.value / 100);
d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#my-range-value').text(dispThresh(self.uiConf.threshold()));
self.vizs.attentionSvg.threshold(self.uiConf.threshold());
}, 100));
this.sels.headSelectAll.on("click", function () {
self.uiConf.selectAllHeads();
self.renderSvg();
self.renderAttHead();
});
this.sels.headSelectNone.on("click", function () {
self.uiConf.selectNoHeads();
self.renderSvg();
self.renderAttHead();
_etc_Util__WEBPACK_IMPORTED_MODULE_13__["Sel"].setHidden(".atn-curve");
});
}
_initToggle() {
Object(rxjs__WEBPACK_IMPORTED_MODULE_14__["fromEvent"])(this.sels.clsToggle.node(), 'input').pipe(
// @ts-ignore -- TODO: FIX !
Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_15__["map"])(e => e.srcElement.checked)).subscribe({
next: v => {
this.uiConf.hideClsSep(v);
this.attCapsule.zeroed(v);
this.renderSvg();
this.renderAttHead();
}
});
}
_initModelSelection() {
const self = this;
// Below are the available models. Will need to choose 3 to be available ONLY
const data = [
{ name: "bert-base-cased", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional },
{ name: "bert-base-uncased", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional },
{ name: "bert-base-german-cased", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional },
{ name: "xlm-mlm-en-2048", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional },
{ name: "distilbert-base-uncased", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional },
{ name: "distilroberta-base", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional },
{ name: "albert-base-v1", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional },
{ name: "albert-xxlarge-v2", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional },
{ name: "xlm-roberta-base", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional },
// { name: "t5-small", kind: tp.ModelKind.Autoregressive },
{ name: "roberta-base", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Bidirectional },
{ name: "gpt2", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive },
{ name: "distilgpt2", kind: _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive },
];
const names = ramda__WEBPACK_IMPORTED_MODULE_2__["map"](ramda__WEBPACK_IMPORTED_MODULE_2__["prop"]('name'))(data);
const kinds = ramda__WEBPACK_IMPORTED_MODULE_2__["map"](ramda__WEBPACK_IMPORTED_MODULE_2__["prop"]('kind'))(data);
const kindmap = ramda__WEBPACK_IMPORTED_MODULE_2__["zipObj"](names, kinds);
this.sels.modelSelector.selectAll('.model-option')
.data(data)
.join('option')
.classed('model-option', true)
.property('value', d => d.name)
.attr("modelkind", d => d.kind)
.text(d => d.name);
this.sels.modelSelector.property('value', this.uiConf.model());
this.sels.modelSelector.on('change', function () {
const me = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
const mname = me.property('value');
self.uiConf.model(mname);
self.uiConf.modelKind(kindmap[mname]);
if (kindmap[mname] == _etc_types__WEBPACK_IMPORTED_MODULE_3__["ModelKind"].Autoregressive) {
console.log("RESETTING MASK INDS");
self.uiConf.maskInds([]);
}
self.mainInit();
});
}
renderAttHead() {
const heads = lodash__WEBPACK_IMPORTED_MODULE_1__["range"](0, this.uiConf._nHeads);
const focusAtt = this.attCapsule.att;
const token = this.uiConf.hasToken() ? this.uiConf.token() : null;
//@ts-ignore
const leftAttInfo = Object(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["getAttentionInfo"])(focusAtt, heads, "left", token);
//@ts-ignore
const rightAttInfo = Object(_AttentionHeadBox__WEBPACK_IMPORTED_MODULE_8__["getAttentionInfo"])(focusAtt, heads, "right", token);
this.vizs.leftHeads.options.offset = this.uiConf.offset;
this.vizs.leftHeads.update(leftAttInfo);
this.vizs.rightHeads.update(rightAttInfo);
this._renderHeadSummary();
// Make sure
heads.forEach((h) => {
if (this.uiConf.headSet().has(h)) {
selectHead(h);
}
else {
unselectHead(h);
}
});
}
;
renderTokens() {
const left = this.tokCapsule[this.uiConf.attType[0]];
const right = this.tokCapsule[this.uiConf.attType[1]];
console.log("now: ", this.uiConf.offset);
this.vizs.tokens.left.options.offset = this.uiConf.offset;
this.vizs.tokens.left.update(left.tokenData);
this.vizs.tokens.left.mask(left.maskInds);
this.vizs.tokens.right.update(right.tokenData);
this.vizs.tokens.right.mask(right.maskInds);
// displaySelectedToken
}
renderSvg() {
const att = this.attCapsule.byHeads(this.uiConf.heads());
this.vizs.attentionSvg.options.offset = this.uiConf.offset;
const svg = this.vizs.attentionSvg.data(att);
svg.update(att);
const maxTokens = lodash__WEBPACK_IMPORTED_MODULE_1__["max"]([this.tokCapsule.a.length()]);
const newHeight = svg.options.boxheight * maxTokens;
svg.height(newHeight);
// Don't redisplay everything if one token is selected
showBySide(this.uiConf.token());
}
;
render() {
this.renderTokens();
this.renderSvg();
this.renderAttHead();
}
update() {
this.render();
}
}
/***/ }),
/***/ 0:
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 1:
/*!****************************!*\
!*** node-fetch (ignored) ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 2:
/*!**********************!*\
!*** util (ignored) ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 3:
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 4:
/*!********************************!*\
!*** string_decoder (ignored) ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 5:
/*!********************!*\
!*** fs (ignored) ***!
\********************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ })
/******/ });
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vY3NzL21haW4uc2NzcyIsIndlYnBhY2s6Ly8vLi9leEJFUlQuaHRtbCIsIndlYnBhY2s6Ly8vLi9pbmRleC5odG1sIiwid2VicGFjazovLy8uL3RzL2FwaS9kZW1vQVBJLnRzIiwid2VicGFjazovLy8uL3RzL2FwaS9tYWluQXBpLnRzIiwid2VicGFjazovLy8uL3RzL2RhdGEvQXR0ZW50aW9uQ2Fwc3VsZS50cyIsIndlYnBhY2s6Ly8vLi90cy9kYXRhL1Rva2VuV3JhcHBlci50cyIsIndlYnBhY2s6Ly8vLi90cy9ldGMvU1ZHcGx1cy50cyIsIndlYnBhY2s6Ly8vLi90cy9ldGMvU2ltcGxlRXZlbnRIYW5kbGVyLnRzIiwid2VicGFjazovLy8uL3RzL2V0Yy9VUkxIYW5kbGVyLnRzIiwid2VicGFjazovLy8uL3RzL2V0Yy9VdGlsLnRzIiwid2VicGFjazovLy8uL3RzL2V0Yy9fVG9vbHMudHMiLCJ3ZWJwYWNrOi8vLy4vdHMvZXRjL2FwaUhlbHBlcnMudHMiLCJ3ZWJwYWNrOi8vLy4vdHMvZXRjL2FycmF5VXRpbHMudHMiLCJ3ZWJwYWNrOi8vLy4vdHMvZXRjL3R5cGVzLnRzIiwid2VicGFjazovLy8uL3RzL2V0Yy94ZDMudHMiLCJ3ZWJwYWNrOi8vLy4vdHMvbWFpbi50cyIsIndlYnBhY2s6Ly8vLi90cy91aUNvbmZpZy50cyIsIndlYnBhY2s6Ly8vLi90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Ckge1xuICAgICAgICBpZiAodGhpcy5iYXNlVVJMID09IG51bGwpIHtcbiAgICAgICAgICAgIHRoaXMuYmFzZVVSTCA9IGJhc2V1cmwgKyAnL2FwaSc7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRNb2RlbERldGFpbHMobW9kZWw6IHN0cmluZywgaGFzaE9iajoge30gfCBudWxsID0gbnVsbCk6IFByb21pc2U8cnNwLk1vZGVsRGV0YWlsUmVzcG9uc2U+IHtcbiAgICAgICAgY29uc3QgdG9TZW5kID0ge1xuICAgICAgICAgICAgbW9kZWw6IG1vZGVsXG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB1cmwgPSBtYWtlVXJsKHRoaXMuYmFzZVVSTCArIFwiL2dldC1tb2RlbC1kZXRhaWxzXCIsIHRvU2VuZClcbiAgICAgICAgY29uc29sZS5sb2coXCItLS0gR0VUIFwiICsgdXJsKTtcblxuICAgICAgICBpZiAoaGFzaE9iaiAhPSBudWxsKSB7XG4gICAgICAgICAgICBjb25zdCBrZXkgPSBoYXNoLnNoYTEodG9TZW5kKVxuICAgICAgICAgICAgZDMuanNvbih1cmwpLnRoZW4ociA9PiB7XG4gICAgICAgICAgICAgICAgaGFzaE9ialtrZXldID0gcjtcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gY2hlY2tEZW1vQVBJKHRvU2VuZCwgdXJsKVxuICAgIH1cblxuICAgIGdldE1ldGFBdHRlbnRpb25zKG1vZGVsOiBzdHJpbmcsIHNlbnRlbmNlOiBzdHJpbmcsIGxheWVyOiBudW1iZXIsIGhhc2hPYmo6IHt9IHwgbnVsbCA9IG51bGwpOiBQcm9taXNlPHJzcC5BdHRlbnRpb25EZXRhaWxzUmVzcG9uc2U+IHtcbiAgICAgICAgY29uc3QgdG9TZW5kID0ge1xuICAgICAgICAgICAgbW9kZWw6IG1vZGVsLFxuICAgICAgICAgICAgc2VudGVuY2U6IHNlbnRlbmNlLFxuICAgICAgICA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zb3IyRD50aGlzLmF0dFRlbnNvci5nYXRoZXIoW2hlYWRdLCAwKS5zcXVlZXplKFswXSkpXG4gICAgfVxuXG4gICAgYnlIZWFkcyhoZWFkczpudW1iZXJbXSk6bnVtYmVyW11bXSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9ieUhlYWRzKGhlYWRzKS5hcnJheVN5bmMoKVxuICAgIH1cblxuICAgIGJ5SGVhZChoZWFkOm51bWJlcik6bnVtYmVyW11bXSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9ieUhlYWQoaGVhZCkuYXJyYXlTeW5jKClcbiAgICB9XG59XG5cbmZ1bmN0aW9uIHplcm9Sb3dDb2wodGVuczp0Zi5UZW5zb3IzRCwgcm93czpudW1iZXJbXSwgY29sczpudW1iZXJbXSk6dGYuVGVuc29yM0Qge1xuICAgIGxldCBvdXRUZW5zID0gdGVucy5jbG9uZSgpXG4gICAgbGV0IGF0YiA9IG91dFRlbnMuYnVmZmVyU3luYygpXG4gICAgXy5yYW5nZShhdGIuc2hhcGVbMF0pLmZvckVhY2goKGhlYWQpID0+IHtcbiAgICAgICAgXy5yYW5nZShhdGIuc2hhcGVbMV0pLmZvckVhY2goKGkpID0+IHtcbiAgICAgICAgICAgIC8vIFNldCByb3dzIHRvIDBcbiAgICAgICAgICAgIGlmIChfLmluY2x1ZGVzKHJvd3MsIGkpKSB7XG4gICAgICAgICAgICAgICAgXy5yYW5nZShhdGIuc2hhcGVbMl0pLmZvckVhY2goKGopID0+IHtcbiAgICAgICAgICAgICAgICAgICAgYXRiLnNldCgwLCBoZWFkLCBpLCBqKVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIFNldCBjb2xzIHRvIDBcbiAgICAgICAgICAgIF8ucmFuZ2UoYXRiLnNoYXBlWzJdKS5mb3JFYWNoKChqKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKF8uaW5jbHVkZXMoY29scywgaikpXG4gICAgICAgICAgICA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c3RcbiAgICAgKi9cbiAgICBtYXNrKHZhbCkge1xuICAgICAgICBjb25zdCBjdXJySW5kID0gXy5pbmRleE9mKHRoaXMubWFza0luZHMsIHZhbClcbiAgICAgICAgaWYgKGN1cnJJbmQgPT0gLTEpIHtcbiAgICAgICAgICAgIHhfLm9yZGVyZWRJbnNlcnRfKHRoaXMubWFza0luZHMsIHZhbClcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKGAke3ZhbH0gYWxyZWFkeSBpbiBtYXNrSW5kcyFgKTtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKHRoaXMubWFza0luZHMpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgdG9nZ2xlKHZhbCkge1xuICAgICAgICBjb25zdCBjdXJySW5kID0gXy5pbmRleE9mKHRoaXMubWFza0luZHMsIHZhbClcbiAgICAgICAgaWYgKGN1cnJJbmQgPT0gLTEpIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKGBNYXNraW5nICR7dmFsfWApO1xuICAgICAgICAgICAgdGhpcy5tYXNrKHZhbClcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKGBVbm1hc2tpbmcgJHt2YWx9YCk7XG4gICAgICAgICAgICB0aGlzLnVubWFzayh2YWwpXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB1bm1hc2sodmFsKSB7XG4gICAgICAgIF8ucHVsbCh0aGlzLm1hc2tJbmRzLCB2YWwpO1xuICAgIH1cblxuICAgIHJlc2V0TWFzaygpIHtcbiAgICAgICAgdGhpcy5tYXNrSW5kcyA9IFtdO1xuICAgIH1cblxuICAgIGxlbmd0aCgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMudG9rZW5EYXRhLmxlbmd0aDtcbiAgICB9XG5cbiAgICBjb25jYXQob3RoZXI6IFRva2VuRGlzcGxheSkge1xuICAgICAgICBjb25zdCBuZXdUb2tlbn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jb25zdCB2YXJzID0gcXVlcnkuc3BsaXQoJyYnKTtcbiAgICAgICAgY29uc29sZS5sb2codmFycywgXCItLS0gdmFyc1wiKTtcblxuICAgICAgICBjb25zdCB1cmxQYXJhbWV0ZXJzID0ge307XG5cbiAgICAgICAgY29uc3QgaXNJbnQgPSB4ID0+ICgvXlswLTldKyQvKS50ZXN0KHgpO1xuICAgICAgICBjb25zdCBpc0Zsb2F0ID0geCA9PiAoL15bMC05XStcXC5bMC05XSokLykudGVzdCh4KTtcblxuICAgICAgICBjb25zdCB0eXBlQ2FzdCA9IHZhbCA9PiB7XG4gICAgICAgICAgICBpZiAoaXNJbnQodmFsKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBOdW1iZXIucGFyc2VJbnQodmFsLCAxMCk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzRmxvYXQodmFsKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBOdW1iZXIucGFyc2VGbG9hdCh2YWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gZWxzZTpcbiAgICAgICAgICAgIHJldHVybiB2YWw7XG4gICAgICAgIH1cblxuXG4gICAgICAgIHZhcnMuZm9yRWFjaCh2ID0+IHtcbiAgICAgICAgICAgIGlmICh2Lmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICBjb25zdCBzcGxpdHMgPSB2LnNwbGl0KCc9Jyk7XG4gICAgICAgICAgICAgICAgY29uc3Qga2V5ID0gZGVjb2RlVVJJQ29tcG9uZW50KHNwbGl0c1swXSk7XG4gICAgICAgICAgICAgICAgbGV0IHJhd192YWx1ZSA9IGRlY29kZVVSSUNvbXBvbmVudChzcGxpdHNbMV0pO1xuXG4gICAgICAgICAgICAgICAgY29uc3QgaXNBcnJheSA9IHJhd192YWx1ZS5zdGFydHNXaXRoKCcuLicpO1xuICAgICAgICAgICAgICAgIGlmIChpc0FycmF5KSB7XG4gICAgICAgICAgICAgICAgICAgIHJhd192YWx1ZSA9IHJhd192YWx1ZS5zbGljZSgyKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAocmF3X3ZhbHVlLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgdXJsUGFyYW1ldGVyc1trZXldID0gaXNBcnJheSA/IFtdIDogJyc7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpc0FycmF5KSB7XG4gICAgICAgICAgICAgICAgICAgIHVybFBhcmFtZXRlcnNba2V5XSA9IHJhd192YWx1ZS5zcGxpdCgnLCcpXG4gICAgICAgICAgICAgICAgICAgICAgICAubWFwKHZhbCA9PiB0eXBlQ2FzdCh2YWwpKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB1cmxQYXJhbWV0ZXJzW2tleV0gPSB0eXBlQ2FzdChyYXdfdmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIHVybFBhcmFtZXRlcnM7XG5cbiAgICB9XG5cblxuICAgIC8qKlxuICAgICAqIEdlbmVyYXRlcyBhbiBVUkwgc3RyaW5nIGZyb20gYSBtYXAgb2YgdXJsIHBhcmFtZXRlcnNcbiAgICAgKiBAcGFyYW0ge3t9fSB1cmxQYXJhbWV0ZXJzIC0gdGhlIG1hcCBvZiBwYXJhbWV0ZXJzXG4gICAgICogQHJldHVybnMge3N0cmluZ30gLSBhbiBVUkkgc3RyaW5nXG4gICAgICovXG4gICAgc3RhdGljIHVybFN0cmluZyh1cmxQYXJhbWV0ZXJzOiBvYmplY3QpIHtcbiAgICAgICAgY29uc3QgYXR0ciA9IFtdO1xuICAgICAgICBPYmplY3Qua2V5cyh1cmxQYXJhbWV0ZXJzKS5mb3JFYWNoKGsgPT4ge1xuICAgICAgICAgICAgY29uc3QgdiA9IHVybFBhcmFtZXRlcnNba107XG4gICAgICAgICAgICBpZiAodiAhPT0gdW5kZ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SBtdXRhYmxlIGRhdGFzdHJ1Y3R1cmVzLi4uIFRoaXMgaXMgY29uZnVzaW5nLlxuXG4gICAgICAgIHJldHVybiBvdXRcbiAgICB9XG5cbiAgICB0b2dnbGVUb2tlbihlOiB0cC5Ub2tlbkV2ZW50KTogdGhpcyB7XG4gICAgICAgIGNvbnN0IHBpY2tlciA9IFIucGljayhbJ2luZCcsICdzaWRlJ10pXG4gICAgICAgIGNvbnN0IGNvbXBhcmVFdmVudCA9IHBpY2tlcihlKVxuICAgICAgICBjb25zdCBjb21wYXJlVG9rZW4gPSBwaWNrZXIodGhpcy50b2tlbigpKVxuXG4gICAgICAgIGlmIChSLmVxdWFscyhjb21wYXJlVG9rZW4sIGNvbXBhcmVFdmVudCkpIHtcbiAgICAgICAgICAgIHRoaXMucm1Ub2tlbigpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy50b2tlbihlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICB0b2tlbigpOiB0cC5Ub2tlbkV2ZW50O1xuICAgIHRva2VuKHZhbDogdHAuVG9rZW5FdmVudCk6IHRoaXM7XG4gICAgdG9rZW4odmFsPzogdHAuVG9rZW5FdmVudCkge1xuICAgICAgICBpZiAodmFsID09IG51bGwpXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fdG9rZW5cblxuICAgICAgICB0aGlzLl90b2tlbiA9IHZhbDtcbiAgICAgICAgdGhpcy5fY29uZi50b2tlbkluZCA9IHZhbC5pbmQ7XG4gICAgICAgIHRoaXMuX2NvbmYudG9rZW5TaWRlID0gdmFsLnNpZGU7XG4gICAgICAgIHRoaXMudG9VUkwoKTtcblxuICAgICAgICByZXR1cm4gdGhpc1xuICAgIH1cblxuICAgIGhhc1Rva2VuKCkge1xuICAgICAgICBjb25zdCBjb25mID0gdGhpcy5fY29uZlxuICAgICAgICBjb25zdCBhY3R1YWxseU51bGwgPSAoKGNvbmY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gICBsYXllcih2YWw/KSB7XG4gICAgICAgIGlmICh2YWwgPT0gbnVsbClcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb25mLmxheWVyXG5cbiAgICAgICAgdGhpcy5fY29uZi5sYXllciA9IHZhbDtcbiAgICAgICAgdGhpcy50b1VSTCgpO1xuICAgICAgICByZXR1cm4gdGhpc1xuICAgIH1cblxuICAgIGhlYWRTZXQoKTogU2V0PG51bWJlcj47XG4gICAgaGVhZFNldCh2YWw6IFNldDxudW1iZXI+KTogdGhpcztcbiAgICBoZWFkU2V0KHZhbD8pIHtcbiAgICAgICAgaWYgKHZhbCA9PSBudWxsKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5faGVhZFNldDtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuX2hlYWRTZXQgPSB2YWw7XG4gICAgICAgIHRoaXMuX2NvbmYuaGVhZHMgPSB4Xy5zZXQyU29ydGVkQXJyYXkodGhpcy5faGVhZFNldClcbiAgICAgICAgdGhpcy50b1VSTCgpO1xuICAgICAgICByZXR1cm4gdGhpc1xuICAgIH1cblxuICAgIG1hc2tJbmRzKCk6IG51bWJlcltdO1xuICAgIG1hc2tJbmRzKHZhbDogbnVtYmVyW10pOiB0aGlzO1xuICAgIG1hc2tJbmRzKHZhbD8pIHtcbiAgICAgICAgaWYgKHZhbCA9PSBudWxsKSByZXR1cm4gdGhpcy5fY29uZi5tYXNrSW5kcztcblxuICAgICAgICB0aGlzLl9jb25mLm1hc2tJbmRzID0gdmFsO1xuICAgICAgICB0aGlzLnRvVVJMKCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGhpZGVDbHNTZXAoKTogYm9vbGVhbjtcbiAgICBoaWRlQ2xzU2VwKHZhbDogYm9vbGVhbik6IHRoaXM7XG4gICAgaGlkZUNsc1NlcCh2YWw/KSB7XG4gICAgICAgIGlmICh2YWwgPT0gbnVsbCkgcmV0dXJuIHRoaXMuX2NvbmYuaGlkZUN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h0aGlzLm5vcm1CeSkge1xuICAgICAgICAgICAgY2FzZSB0cC5Ob3JtQnkuQ09MOlxuICAgICAgICAgICAgICAgIHJldHVybiAnaidcbiAgICAgICAgICAgIGNhc2UgdHAuTm9ybUJ5LlJPVzpcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2knXG4gICAgICAgICAgICBjYXNlIHRwLk5vcm1CeS5BTEw6XG4gICAgICAgICAgICAgICAgcmV0dXJuICdpJ1xuXG4gICAgICAgIH1cblxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIENyZWF0ZSBjb25uZWN0aW9ucyBiZXR3ZWVuIGxvY2F0aW9ucyBvZiB0aGUgU1ZHIHVzaW5nIEQzJ3MgbGlua0dlblxuICAgICAqL1xuICAgIHByaXZhdGUgY3JlYXRlQ29ubmVjdGlvbnMoKSB7XG4gICAgICAgIGNvbnN0IHNlbGYgPSB0aGlzO1xuICAgICAgICBjb25zdCBvcCA9IHRoaXMub3B0aW9ucztcbiAgICAgICAgaWYgKHRoaXMucGF0aHMpIHtcbiAgICAgICAgICAgIHRoaXMucGF0aHMuYXR0cnMoe1xuICAgICAgICAgICAgICAgICdkJzogKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGF0YTogeyBzb3VyY2U6IFtudW1iZXIsIG51bWJlcl0sIHRhcmdldDogW251bWJlciwgbnVtYmVyXSB9ID1cbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlOiBbMCwgb3AuYm94aGVpZ2h0ICogKGQuaSArIDAuNSArIG9wLm9mZnNldCldLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0OiBbb3Aud2lkdGgsIG9wLmJveGhlaWdodCAqIChkLmogKyAwLjUpXSAvLyArIDIgYWxsb3dzIHNtYWxsIG9mZnNldFxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5saW5rR2VuKGRhdGEp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4gICAgICAgIGNvbnN0IHNlbGYgPSB0aGlzO1xuICAgICAgICBpZiAodGhpcy5wYXRocyAhPSBudWxsKSB7XG4gICAgICAgICAgICAvLyBwYXRocy50cmFuc2l0aW9uKCkuZHVyYXRpb24oNTAwKS5hdHRyKCdvcGFjaXR5JywgKGQpID0+IHtcbiAgICAgICAgICAgIHRoaXMucGF0aHMuYXR0cignb3BhY2l0eScsIChkKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgdmFsID0gdGhpcy5vcGFjaXR5U2NhbGVzW2Rbc2VsZi5zY2FsZUlkeCgpXV0oZC52KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIHRoaXMucGF0aHMuYXR0cignc3Ryb2tlLXdpZHRoJywgKGQpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCB2YWwgPSB0aGlzLm9wYWNpdHlTY2FsZXNbZFtzZWxmLnNjYWxlSWR4KCldXShkLnYpO1xuICAgICAgICAgICAgICAgIHJldHVybiBzY2FsZUxpbmVhcldpZHRoKHZhbCkgLy81ICogdmFsXjAuMzM7XG4gICAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJlcmVuZGVyIHRoZSBncmFwaCBpbiB0aGUgZXZlbnQgdGhhdCB0aGUgZGF0YSBjaGFuZ2VzXG4gICAgICovXG4gICAgcHJpdmF0ZSB1cGRhdGVEYXRhKCkge1xuICAgICAgICBpZiAodGhpcy5ncmFwaCAhPSBudWxsKSB7XG4gICAgICAgICAgICBkMy5zZWxlY3RBbGwoXCIuYXRuLWN1cnZlXCIpLnJlbW92ZSgpO1xuXG4gICAgICAgICAgICBjb25zdCBkYXRhID0gdGhpcy5wbG90RGF0YVxuXG4gICAgICAgICAgICB0aGlzLnBhdGhzID0gdGhpcy5ncmFwaFxuICAgICAgICAgICAgICAgIC5kYXRhKGRhdGEpXG4gICAgICAgICAgICAgICAgLmpvaW4oJ3BhdGgnKTtcblxuICAgICAgICAgICAgdGhpcy5jcmVhdGVDb25uZWN0aW9ucygpO1xuICAgICAgICAgICAgdGhpcy51cGRhdGVPcGFjaXR5KCk7XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogU2NhbGUgdGhlIG9wYWNpdHkgYWNjb3JkaW5nIHRvIHRoZSB2YWx1ZXMgb2YgdGhlIGRhdGEsIGZyb20gMCB0byBtYXggb2YgY29udGFpbmVkIGRhdGFcbiAgICAgKiBOb3JtYWxpemUgYnkgZWFjaCBzb3VyY2UgdGFyZ2V0LCBvciBhY3Jvc3MgdGhlIHdob2xlXG4gICAgICovXG4gICAgcHJpdmF0ZSBjcmVhdGVTY2FsZXMgPSAoKSA9PiB7XG4gICAgICAgIHRoaXMub3BhY2l0eVNjYWxlcyA9IFtdO1xuICAgICAgICBsZXQgYXJyID0gW11cblxuICAgICAgICAvLyBHcm91cCBub3JtYWxpemF0aW9uXG4gICAgICAgIHN3aXRjaCAodGhpcy5ub3JtQnkpe1xuICAgICAgICAgICAgY2FzZSB0cC5Ob3JtQnkuUk9XOlxuICAgICAgICAgICAgICAgIGFyciA9IHRoaXMuZWRnZURhdGEuZXh0ZW50KDEpO1xuICAgICAgICAgICAgICAgIHRoaXMub3BhY2l0eVNjYWxlcyA9IFtdO1xuICAgICAgICAgICAgICAgIGFyci5mb3JFYWNoKCh2LCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICh0aGlzLm9wYWNpdHlTY2FsZXMgYXMgZDMuU2NhbGVMaW5lYXI8YW55LCBhbnk+W10pLnB1c2goXG4gICAgICAgICAgICAgICAgICAgICAgICBkMy5zY2FsZUxpbmVhcigpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmRvbWFpbihbMCwgdlsxXV0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJhbmdlKFswLCAwLjldKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgdHAuTm9ybUJ5LkNPTDpcbiAgICAgICAgICAgICAgICBhcnIgPSB0aGlzLmVkZ2VEYXRhLmV4dGVudCgwKTtcbiAgICAgICAgICAgICAgICB0aGlzLm9wYWNpdHlTY2FsZXMgPSBbXTtcbiAgICAgICAgICAgICAgICBhcnIuZm9yRWFjaCgodiwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAodGhpcy5vcGFjaXR5U2NhbGVzIGFzIGQzLlNjYWxlTGluZWFyPGFueSwgYW55PltdKS5wdXNoKFxuICAgICAgICAgICAgICAgICAgICAgICAgZDMuc2NhbGVMaW5lYXIoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5kb21haW4oWzAsIHZbMV1dKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yYW5nZShbMCwgMC45XSlcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIHRwLk5vcm1CeS5BTEw6XG4gICAgICAgICAgICAgICAgY29uc3QgbWF4SW4gPSBkMy5tYXgodGhpcy5wbG90RGF0YS5tYXAoKGQpID0+IGQudikpXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLl9kYXRhLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMub3BhY2l0eVNjYWxlcy5wdXNoKGQzLnNjYWxlTGluZWFyKClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5kb21haW4oWzAsIG1heEluXSlcbiAgICAgICAgICAgICAgICAgICAgICAgIC5yYW5nZShbMCwgMV0pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4g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wLnlzY2FsZTtcbiAgICAgICAgY3VyLmhlYWRXaWR0aCA9IGdldEhlYWRTY2FsZShuSGVhZHMpICogb3AuYm94RGltO1xuICAgICAgICBjdXIueFBhZCA9IGN1ci5oZWFkV2lkdGg7XG4gICAgICAgIGN1ci55UGFkID0gKG9wLmJveERpbSAtIGN1ci5oZWFkSGVpZ2h0KSAvIDI7XG5cbiAgICAgICAgY29uc3QgZ2V0Qm94V2lkdGggPSAoaGVhZFdpZHRoKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBtYXhCd2lkdGggPSAxMDA7XG4gICAgICAgICAgICBjb25zdCBid2lkdGggPSB0aGlzLl9kYXRhLnJvd3NbMF0ubGVuZ3RoICogY3VyLmhlYWRXaWR0aFxuICAgICAgICAgICAgY29uc3Qgc2NhbGUgPSBkMy5zY2FsZUxpbmVhclxuICAgICAgICAgICAgaWYgKGJ3aWR0aCA+IG1heEJ3aWR0aCkge1xuICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgfVxuXG4gICAgICAgIH1cblxuICAgICAgICBjdXIuYm94V2lkdGggPSAodGhpcy5fZGF0YS5yb3dzWzBdLmxlbmd0aCAqIGN1ci5oZWFkV2lkdGgpO1xuICAgICAgICBjdXIudG90YWxXaWR0aCA9ICgyICogY3VyLnhQYWQpICsgY3VyLmJveFdpZHRoO1xuICAgICAgICBjdXIudG90YWxIZWlnaHQgPSAob3AuYm94RGltICogKHRoaXMuX2RhdGEucm93cy5sZW5ndGggKyBvcC5vZmZzZXQpKTtcblxuICAgICAgICByZXR1cm4gdGhpcy5fY3VycmVudFxuICAgIH1cblxuICAgIHByaXZhdGUgdXBkYXRlRGF0YSgpIHtcbiAgICAgICAgY29uc3Qgb3AgPSB0aGlzLm9wdGlvbnM7XG4gICAgICAgIGNvbnN0IHNlbGYgPSB0aGlzO1xuICAgICAgICBjb25zdCBib3hFdmVudCA9IChpKSA9PiB7IHJldHVybiB7IGluZDogaSwgc2lkZTogb3Auc2lkZSwgaGVhZDogc2VsZi5fZGF0YS5sYWJlbHNbaV0gfSB9XG4gICAgICAgIGNvbnN0IGN1ciA9IHRoaXMudXBkYXRlQ3VycmVudCgpXG5cbiAgICAgICAgY29uc3QgZ2V0QmFzZVggPSAoKSA9PiAoPEhUTUxFbGVtZW50PnNlbGYuYmFzZS5ub2RlKCkpLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmxlZnRcbiAgICAgICAgY29uc3QgZ2V0QmFzZVkgPSAoKSA9PiAoPEhUTUxFbGVtZW50PnNlbGYuYmFzZS5ub2RlKCkpLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLnRvcFxuXG4gICAgICAgIHRoaXMuYmFzZS5odG1sKCcnKTtcblxuICAgICAgICB0aGlzLnBhcmVudFxuICAgICAgICAgICAgLmF0dHIoXCJ3aWR0aFwiLCBjdXIudG90YWxXaWR0aClcbiAgICAgICAgICAgIC5hdHRyKFwiaGVpZ2h0XCIsIGN1ci50b3RhbEhlaWdodClcblxuICAgICAgICB0aGlzLmhlYWRSb3dzID0gdGhpcy5iYXNlLnNlbGVjdEFsbChgLiR7c2VsZi5yb3dDc3NOYW1lfWApXG4gICAgICAgICAgICAuZGF0YShzZWxmLl9kYXRhLnJvd3MpXG4gICAgICAgICAgICAuam9pbihcImdcIilcbiAgICAgICAgICAgIC5hdHRycyh7XG4gICAgICAgICAgICAgICAgY2xhc3M6IChkLCBpKSA9PiBgJHtzZWxmLnJvd0Nzc05hbWV9ICR7c2VsZi5yb3dDc3NOYW1lfS0ke2l9YCxcbiAgICAgICAgICAgICAgICB0cmFuc2Zvcm06IChkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkcudHJhbnNsYXRlKFxuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHg6IGN1ci54UGFkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHk6IChvcC5ib3hEaW0gKiAoaSArIG9wLm9mZnNldCkpICsgY3VyLnlQYWQsXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd2lkdGg6IGN1ci5ib3hXaWR0aCxcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IGN1ci5oZWFkSGVpZ2h0LFxuXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKFwibW91c2VvdmVyXCIsIChkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgc2VsZi5ldmVudEhhbmRsZXIudHJpZ2dlcihBdHRlbnRpb25IZWFkQm94LmV2ZW50cy5yb3dNb3VzZU92ZXIsIHsgaW5kOiBpLCBzaWRlOiBvcC5zaWRlIH0pXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKFwibW91c2VvdXRcIiwgKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKEF0dGVudGlvbkhlYWRCb3guZXZlbnRzLnJvd01vdXNlT3V0LCB7IGluZDogaSwgc2lkZTogb3Auc2lkZSB9KVxuICAgICAgICAgICAgfSlcblxuICAgICAgICB0aGlzLmhlYWRDZWxscyA9IHRoaXMuaGVhZFJvd3NcbiAgICAgICAgICAgIC5zZWxlY3RBbGwoYCR7dGhpcy5ib3hDc3NOYW1lfWApXG4gICAgICAgICAgICAuZGF0YShkID0+IGQpXG4gICAgICAgICAgICAuam9pbigncmVjdCcpXG4gICAgICAgICAgICAuYXR0cnMoe1xuICAgICAgICAgICAgICAgIHg6IChkLCBpKSA9PiBpICogY3VyLmhlYWRXaWR0aCxcbiAgICAgICAgICAgICAgICB5OiAwLFxuICAgICAgICAgICAgICAgIGNsYXNzOiB0aGlzLmJveENzc05hbWUsXG4gICAgICAgICAgICAgICAgaGVhZDogKGQsIGkpID0+IHNlbGYuX2RhdGEubGFiZWxzW2ldLFxuICAgICAgICAgICAgICAgIHdpZHRoOiBjdXIuaGVhZFdpZHRoLFxuICAgICAgICAgICAgICAgIGhlaWdodDogY3VyLmhlYWRIZWlnaHQsXG4gICAgICAgICAgICAgICAgb3BhY2l0eTogKGQ6IG51bWJlcikgPT4gdGhpcy5vcGFjaXR5U2NhbGUoZCksXG4gICAgICAgICAgICAgICAgZmlsbDogXCJibHVlXCJcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oXCJtb3VzZW92ZXJcIiwgKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKEF0dGVudGlvbkhlYWRCb3guZXZlbnRzLmJveE1vdXNlT3ZlciwgYm94RXZlbnQoaSkpXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKFwibW91c2VvdXRcIiwgKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKEF0dGVudGlvbkhlYWRCb3guZXZlbnRzLmJveE1vdXNlT3V0LCBib3hFdmVudChpKSlcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oXCJjbGlja1wiLCAoZCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgIHNlbGYuZXZlbnRIYW5kbGVyLnRyaWdnZXIoQXR0ZW50aW9uSGVhZEJveC5ldmVudHMuYm94Q2xpY2ssIGJveEV2ZW50KGkpKVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbihcIm1vdXNlbW92ZVwiLCBmdW5jdGlvbihkLCBpKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgb3AgPSBzZWxmLm9wdGlvbnNcbiAgICAgICAgICAgICAgICBjb25zdCBtb3VzZSA9IGQzLm1vdXNlKHNlbGYuYmFzZS5ub2RlKCkpXG5cbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKEF0dGVudGlvbkhlYWRCb3guZXZlbnRzLmJveE1vdXNlTW92ZSwgeyBpbmQ6IGksIHNpZGU6I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yB0byBTVkcgY29ubmVjdGlvbnNcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIHRvRWRnZXMgKGRhdGE6bnVtYmVyW11bXSwgY3V0b2ZmQW10PTEpIDogRWRnZVtdIHtcbiAgICBsZXQgb3V0QXJyOiBFZGdlW10gPSBbXTtcbiAgICBsZXQgY3V0b2ZmOiBudW1iZXI7XG4gICAgZGF0YS5mb3JFYWNoKChyb3csIGkpID0+IHtcbiAgICAgICAgY3V0b2ZmID0gY3V0b2ZmQW10ICogZDMuc3VtKHJvdyk7XG4gICAgICAgIGxldCBjb3VudGVyID0gMDtcbiAgICAgICAgY29uc3Qgc29ydGVkQXJyOmF1LlNvcnRBcnJheSA9IGF1LnNvcnRXaXRoSW5kaWNlcyhyb3cpO1xuXG4gICAgICAgIHNvcnRlZEFyci5hcnIuZm9yRWFjaCgodixqKSA9PiB7XG4gICAgICAgICAgICBpZiAoY291bnRlciA8IGN1dG9mZikge1xuICAgICAgICAgICAgICAgIGNvbnN0IG9iajogRWRnZSA9IHtcbiAgICAgICAgICAgICAgICAgICAgaTogaSxcbiAgICAgICAgICAgICAgICAgICAgajogc29ydGVkQXJyLnNvcnRJbmRpY2VzW2pdLFxuICAgICAgICAgICAgICAgICAgICB2OiB2LFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBvdXRBcnIucHVzaChvYmopO1xuICAgICAgICAgICAgICAgIGNvdW50ZXIgKz0gdjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgIH0pXG5cbiAgICByZXR1cm4gb3V0QXJyO1xufVxuLyoqXG4gKiBDbGFzcyBmb3IgaW1wbGVtZW50aW5nIG9wZXJhdGlvbnMgb24gQXR0ZW50aW9uR3JhcGggaW1wbGVtZW50YXRpb24uIFxuICogQ2xvc2VseSB0aWVkIHRvIFtbQXR0ZW50aW9uQ29ubmVjdG9yXV1cbiAqL1xuZXhwb3J0IGNsYXNzIEVkZ2VEYXRhIHtcbiAgICBy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AgICAgICAgIC5vbignbW91c2VvdmVyJywgZnVuY3Rpb24gKGQsIGkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBzZWwgPSBkMy5zZWxlY3QodGhpcyk7XG4gICAgICAgICAgICAgICAgc2VsLnN0eWxlKCdiYWNrZ3JvdW5kJywgJ2xpZ2h0Ymx1ZScpO1xuICAgICAgICAgICAgICAgIHNlbGYuZXZlbnRIYW5kbGVyLnRyaWdnZXIoVGV4dFRva2Vucy5ldmVudHMudG9rZW5Nb3VzZU92ZXIsIHNlbGYuZUluZm8oc2VsLCBpKSlcbiAgICAgICAgICAgICAgICBzZWxmLmRpdkhvdmVyLnN0eWxlKCd2aXNpYmlsaXR5JywgJ3Zpc2libGUnKVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbignbW91c2VvdXQnLCBmdW5jdGlvbiAoZCwgaSkge1xuICAgICAgICAgICAgICAgIGxldCBzZWwgPSBkMy5zZWxlY3QodGhpcyk7XG4gICAgICAgICAgICAgICAgc2VsLnN0eWxlKCdiYWNrZ3JvdW5kJywgMClcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKFRleHRUb2tlbnMuZXZlbnRzLnRva2VuTW91c2VPdXQsIHNlbGYuZUluZm8oc2VsLCBpKSlcbiAgICAgICAgICAgICAgICBzZWxmLmRpdkhvdmVyLnN0eWxlKCd2aXNpYmlsaXR5JywgJ2hpZGRlbicpXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKCdtb3VzZW1vdmUnLCBmdW5jdGlvbiAoZCwgaSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHMgPSBkMy5zZWxlY3QodGhpcylcbiAgICAgICAgICAgICAgICBjb25zdCBbbGVmdCwgdG9wXSA9IHNlbGYuX2RpdlBsYWNlbWVudCgpXG5cbiAgICAgICAgICAgICAgICBzZWxmLmRpdkhvdmVyXG4gICAgICAgICAgICAgICAgICAgIC5zdHlsZSgnbGVmdCcsIFN0cmluZyhsZWZ0KSArICdweCcpXG4gICAgICAgICAgICAgICAgICAgIC5zdHlsZSgndG9wJywgU3RyaW5nKHRvcCkgKyAncHgnKVxuICAgICAgICAgICAgICAgICAgICAuc2VsZWN0QWxsKFwiLnRvcGstd29yZC1ib3hcIilcbiAgICAgICAgICAgICAgICAgICAgLy9AdHMtaWdub3JlXG4gICAgICAgICAgICAgICAgICAgIC5kYXRhKGQzLnppcChkLnRvcGtfd29yZHMsIGQudG9wa19wcm9icykpXG4gICAgICAgICAgICAgICAgICAgIC5qb2luKCdwJylcbiAgICAgICAgICAgICAgICAgICAgLmNsYXNzZWQoXCJ0b3BrLXdvcmQtYm94XCIsIHRydWUpXG4gICAgICAgICAgICAgICAgICAgIC50ZXh0KHcgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmFtZSA9IHdbMF0ucmVwbGFjZSgvXFx1MDEyMC9nLCBcIiBcIikucmVwbGFjZSgvXFx1MDEwQS9nLCBcIlxcXFxuXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwcm9iID0gd1sxXS50b0ZpeGVkKDIpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmFtZSArIFwiOiBcIiArIHByb2JcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgc2VsZi5hZGRDbGljayhzZWxmLnRleHRCb3hlcylcbiAgICB9XG5cbiAgICBhZGRDbGljayh0ZXh0Ym94ZXM6IEQzU2VsKSB7XG4gICAgICAgIGNvbnN0IHNlbGYgPSB0aGlzO1xuXG4gICAgICAgIHNlbGYudGV4dEJveGVzID0gdGV4dGJveGVzXG4gICAgICAgICAgICAub24oJ2NsaWNrJywgKGQsIGksIG4pID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBzZWwgPSBkMy5zZWxlY3QobltpXSk7XG4gICAgICAgICAgICAgICAgc2VsZi5ldmVudEhhbmRsZXIudHJpZ2dlcihUZ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hbGYgPSBhdG5Db250cm9scy5hcHBlbmQoJ2RpdicpXG4gICAgICAgIC5hdHRyKCdjbGFzcycsICdyaWdodC1jb250cm9sLWhhbGYgaGVhZC1jb250cm9sJylcblxuICAgICAgICBjb25zdCBtb2RlbFNlbGVjdGlvbiA9IGxlZnRDb250cm9sSGFsZi5hcHBlbmQoJ2RpdicpXG4gICAgICAgICAgICAuYXR0cignaWQnLCAnbW9kZWwtc2VsZWN0aW9uJylcblxuICAgICAgICAgICAgbW9kZWxTZWxlY3Rpb24uYXBwZW5kKCdsYWJlbCcpXG4gICAgICAgICAgICAgICAgLmF0dHIoJ2ZvcicsICdtb2RlbC1vcHRpb25zJykudGV4dCgnU2VsZWN0IG1vZGVsJylcblxuICAgICAgICAgICAgY29uc3QgbW9kZWxTZWxlY3RvciA9IG1vZGVsU2VsZWN0aW9uLmFwcGVuZCgnc2VsZWN0JylcbiAgICAgICAgICAgICAgICAuYXR0cignaWQnLCAnbW9kZWwtb3B0aW9uLXNlbGVjdG9yJylcbiAgICAgICAgICAgICAgICAuYXR0cignbmFtZScsICdtb2RlbC1vcHRpb25zJylcbiAgICAgICAgXG4gICAgICAgIGNvbnN0IHNsaWRlQ29udGFpbmVyID0gbGVmdENvbnRyb2xIYWxmLmFwcGVuZCgnZGl2JylcbiAgICAgICAgICAgIC5jbGFzc2VkKCdzbGlkZS1jb250YWluZXInLCB0cnVlKVxuXG4gICAgICAgICAgICBzbGlkZUNvbnRhaW5lci5hcHBlbmQoJ2xhYmVsJylcbiAgICAgICAgICAgICAgICAuYXR0cignZm9yJywgJ215LXJhbmdlJylcbiAgICAgICAgICAgICAgICAuaHRtbChcIkRpc3BsYXkgdG9wIDxzcGFuIGlkPVxcXCJteS1yYW5nZS12YWx1ZVxcXCI+Li4uPC9zcGFuPiUgb2YgYXR0ZW50aW9uXCIpXG5cbiAgICAgICAgICAgIGNvbnN0IHRocmVzaFNsaWRlciA9IHNsaWRlQ29udGFpbmVyLmFwcGVuZCgnaW5wdX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oaXMudWlDb25mLm1vZGVsS2luZCgpID09IHRwLk1vZGVsS2luZC5BdXRvcmVncmVzc2l2ZSkgJiYgKCF0aGlzLnVpQ29uZi5oaWRlQ2xzU2VwKCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIG5vcm1CeSA9IHRwLk5vcm1CeS5DT0xcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG5vcm1CeSA9IHRwLk5vcm1CeS5BTExcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy52aXpzLmF0dGVudGlvblN2Zy5ub3JtQnkgPSBub3JtQnlcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnVpQ29uZi5tYXNrSW5kcygpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50b2tDYXBzdWxlLmEubWFza0luZHMgPSB0aGlzLnVpQ29uZi5tYXNrSW5kcygpXG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hcGkudXBkYXRlTWFza2VkQXR0ZW50aW9ucyh0aGlzLnVpQ29uZi5tb2RlbCgpLCB0aGlzLnRva0NhcHN1bGUuYSwgdGhpcy51aUNvbmYuc2VudGVuY2UoKSwgdGhpcy51aUNvbmYubGF5ZXIoKSkudGhlbihyZXNwID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHIgPSByZXNwLnBheWxvYWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmF0dENhcHN1bGUudXBkYXRlRnJvbU5vcm1hbChyLCB0aGlzLnVpQ29uZi5oaWRlQ2xzU2VwKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50b2tDYXBzdWxlLnVwZGF0ZVRva2VucyhyKVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGUoKVxuICAgICAgICAgICAgICAgICAgICAgICAgcG9zdFJlc3BvbnNlRGlzcGxheUNsZWFudXAoKVxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlKClcbiAgICAgICAgICAgICAgICAgICAgcG9zdFJlc3BvbnNlRGlzcGxheUNsZWFudXAoKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnVpQ29uZi5tb2RlbEtpbmQoKSA9PSB0cC5Nb2RlbEtpbmQuQXV0b3JlZ3Jlc3NpdmUpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gRW5zdXJlIG9ubHkgMSBtYXNrIGluZCBpcyBwcmVzZW50IGZvciBhdXRvcmVncmVzc2l2ZSBtb2RlbHNcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMudWlDb25mLmhhc1Rva2VuKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZ3JheVRvZ2dsZSg8bnVtYmVyPnRoaXMudWlDb25mLnRva2VuKCkuaW5kKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHNlbGYudml6cy50b2tlbnMubGVmdC5vcHRpb25zLmRpdkhvdmVyLnRleHRJbmZvID0gXCJXb3VsZCBwcmVkaWN0IG5leHQuLi5cIlxuICAgICAgICAgICAgICAgICAgICBzZWxmLnZpenMudG9rZW5zLnJpZ2h0Lm9wdGlvbnMuZGl2SG92ZXIudGV4dEluZm8gPSBcIldvdWxkIHByZWRpY3QgbmV4dC4uLlwiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLnZpenMudG9rZW5zLmxlZnQub3B0aW9ucy5kaXZIb3Zlci50ZXh0SW5mbyA9IFwiV291bGQgcHJlZGljdCBoZXJlLi4uXCJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi52aXpzLnRva2Vucy5yaWdodC5vcHRpb25zLm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AgICAgICAgICBzd2l0Y2ggKHNlbGYudWlDb25mLm1vZGVsS2luZCgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSB0cC5Nb2RlbEtpbmQuQmlkaXJlY3Rpb25hbDoge1xuICAgICAgICAgICAgICAgICAgICBlLnNlbC5jbGFzc2VkKFwibWFza2VkLXRva2VuXCIsICFlLnNlbC5jbGFzc2VkKFwibWFza2VkLXRva2VuXCIpKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbGV0dGVyID0gc2lkZVRvTGV0dGVyKGUuc2lkZSwgdGhpcy51aUNvbmYuYXR0VHlwZSlcbiAgICAgICAgICAgICAgICAgICAgc2VsZi50b2tDYXBzdWxlW2xldHRlcl0udG9nZ2xlKGUuaW5kKVxuICAgICAgICAgICAgICAgICAgICBzZWxmLnNlbHMuYm9keS5zdHlsZShcImN1cnNvclwiLCBcInByb2dyZXNzXCIpXG5cbiAgICAgICAgICAgICAgICAgICAgc2VsZi5hcGkudXBkYXRlTWFza2VkQXR0ZW50aW9ucyh0aGlzLnVpQ29uZi5tb2RlbCgpLCB0aGlzLnRva0NhcHN1bGUuYSwgdGhpcy51aUNvbmYuc2VudGVuY2UoKSwgdGhpcy51aUNvbmYubGF5ZXIoKSkudGhlbigocmVzcDogcnNwLkF0dGVudGlvbkRldGFpbHNSZXNwb25zZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgciA9IHJlc3AucGF5bG9hZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuYXR0Q2Fwc3VsZS51cGRhdGVGcm9tTm9ybWFsKHIsIHRoaXMudWlDb25mLmhpZGVDbHNTZXAoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnRva0NhcHN1bGUudXBkYXRlVG9rZW5zKHIpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnVpQ29uZi5tYXNrSW5kcyh0aGlzLnRva0NhcHN1bGUuYS5tYXNrSW5kcylcblxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi51cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuc2Vscy5ib2R5LnN0eWxlKFwiY3Vyc29yXCIsIFwiZGVmYXVsdFwiKVxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2FzZSB0cC5Nb2RlbEtpbmQuQXV0b3JlZ3Jlc3NpdmU6IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJBdXRvcmVncmVzc2l2ZSBtb2RlbCBkb2Vzbid0IGRvIG1hc2tpbmdcIik7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBkZWZhdWx0OiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiV2hhdCBraW5kIG9mIG1vZGVsIGlzIHRoaXM/XCIpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pXG5cbiAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuYmluZChUZXh0VG9rZW5zLmV2ZW50cy50b2tlbk1vdXNlT3ZlciwgKGU6IHRwLlRva2VuRXZlbnQpID0+IHtcbiAgICAgICAgICAgIGNob29zZVNob3dCeVNpZGUodGhpcy51aUNvbmYudG9rZW4oKSwgZSlcbiAgICAgICAgfSlcblxuICAgICAgICB0aGlzLmV2ZW50SGFuZGxlci5iaW5kKFRleHRUb2tlbnMuZXZlbnRzLnRva2VuTW91c2VPdXQsIChlKSA9PiB7XG4gICAgICAgICAgICBjaG9vc2VTaG93QWxsKHRoaXMudWlDb25mLnRva2VuKCkpXG4gICAgICAgIH0pXG5cbiAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuYmluZChUZXh0VG9rZW5zLmV2ZW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RbMF0pXG4gICAgICAgICAgICAgICAgdG9wID0gZS5tb3VzZVsxXSArIGUuYmFzZVkgLSAoK2hlYWRJbmZvLnN0eWxlKCdoZWlnaHQnKS5yZXBsYWNlKCdweCcsICcnKSArIGRpdk9mZnNldFsxXSlcbiAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXMgPSBcIjhweCA4cHggMXB4IDhweFwiXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25zdCBkaXZPZmZzZXQgPSBbLTEzLCAzXVxuICAgICAgICAgICAgICAgIGxlZnQgPSBlLm1vdXNlWzBdICsgZS5iYXNlWCArIGRpdk9mZnNldFswXVxuICAgICAgICAgICAgICAgIHRvcCA9IGUubW91c2VbMV0gKyBlLmJhc2VZIC0gKCtoZWFkSW5mby5zdHlsZSgnaGVpZ2h0JykucmVwbGFjZSgncHgnLCAnJykgKyBkaXZPZmZzZXRbMV0pXG4gICAgICAgICAgICAgICAgYm9yZGVyUmFkaXVzID0gXCI4cHggOHB4IDhweCAxcHhcIlxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBoZWFkSW5mb1xuICAgICAgICAgICAgICAgIC5zdHlsZSgndmlzaWJpbGl0eScsICd2aXNpYmxlJylcbiAgICAgICAgICAgICAgICAuc3R5bGUoJ2xlZnQnLCBTdHJpbmcobGVmdCkgKyAncHgnKVxuICAgICAgICAgICAgICAgIC5zdHlsZSgndG9wJywgU3RyaW5nKHRvcCkgKyAncHgnKVxuICAgICAgICAgICAgICAgIC5zdHlsZSgnYm9yZGVyLXJhZGl1cycsIGJvcmRlclJhZGl1cylcbiAgICAgICAgICAgICAgICAudGV4dChgSGVhZDogJHtlLmluZCArIDF9YClcblxuICAgICAgICAgICAgLy8gRG9uJ3QgZG8gYW55dGhpbmcgc3BlY2lhbCBvbiByb3cgbW91c2Ugb3ZlclxuICAgICAgICB9KVxuXG4gICAgICAgIHRoaXMuZXZlbnRIYW5kbGVyLmJpb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zIHRoZSBBUEkgdG8gYnJlYWtcbiAgICAgICAgICAgIGNvbnN0IHNlbnRlbmNlX2E6IHN0cmluZyA9IHRoaXMuc2Vscy5mb3JtLnNlbnRlbmNlQS5wcm9wZXJ0eShcInZhbHVlXCIpLnJlcGxhY2UoL1xcIy9nLCAnJylcblxuICAgICAgICAgICAgLy8gT25seSB1cGRhdGUgaWYgdGhlIGZvcm0gaXMgZmlsbGVkIGNvcnJlY3RseVxuICAgICAgICAgICAgaWYgKHNlbnRlbmNlX2EubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zZWxzLmJvZHkuc3R5bGUoXCJjdXJzb3JcIiwgXCJwcm9ncmVzc1wiKVxuICAgICAgICAgICAgICAgIHRoaXMuYXBpLmdldE1ldGFBdHRlbnRpb25zKHRoaXMudWlDb25mLm1vZGVsKCksIHNlbnRlbmNlX2EsIHRoaXMudWlDb25mLmxheWVyKCkpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKChyZXNwOiByc3AuQXR0ZW50aW9uRGV0YWlsc1Jlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByID0gcmVzcC5wYXlsb2FkXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVpQ29uZi5zZW50ZW5jZShzZW50ZW5jZV9hKVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy51aUNvbmYucm1Ub2tlbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5hdHRDYXBzdWxlLnVwZGF0ZUZyb21Ob3JtYWwociwgdGhpcy51aUNvbmYuaGlkZUNsc1NlcCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudG9rQ2Fwc3VsZS51cGRhdGVGcm9tUmVzcG9uc2Uocik7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl90b2dnbGVUb2tlblNlbCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2Vscy5ib2R5LnN0eWxlKFwiY3Vyc29yXCIsIFwiZGVmYXVsdFwiKVxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29uc3Qgb25FbnRlciA9IFIuY3VycnkoKGtleUNvZGUsIGYsIGV2ZW50KSA9PiB7XG4gICAgICAgICAgICBjb25zdCBlID0gZXZlbnQgfHwgd2luZG93LmV2ZW50O1xuICAgICAgICAgICAgaWYgKGUua2V5Q29kZSAhPT0ga2V5Q29kZSkgcmV0dXJuO1xuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgZigpO1xuICAgICAgICB9KVxuXG4gICAgICAgIGNvbnN0IG9uRW50ZXJTdWJtaXQgPSBvbkVudGVyKDEzLCBzdWJtaXROZXdTZW50ZW5jZSlcblxuICAgICAgICBjb25zdCBidG4gPSB0aGlzLnNlbHMuZm9ybS5idXR0b247XG4gICAgICAgIGNvbnN0IGlucHV0Qm94ID0gdGhpcy5zZWxzLmZvcm0uc2VudGVuY2VBO1xuXG4gICAgICAgIGJ0bi5vbihcImNsaWNrXCIsIHN1Ym1pdE5ld1NlbnRlbmNlKVxuICAgICAgICBpbnB1dEJveC5vbigna2V5cHJlc3MnLCBvbkVudGVyU3VibWl0KVxuICAgIH1cblxuICAgIHByaXZhdGUgX3JlbmRlckhlYWRTdW1tYXJ5KCkge1xuICAgICAgICB0aGlzLnNlbHMuc2VsZWN0ZWRIZWFkc1xuICAgICAgICAgICAgLmh0bWwoUi5qb2luKCcsICcsIHRoaXMudWlDb25mLmhlYWRzKCkubWFwKGggPT4gaCArIDEpKSlcbiAgICB9XG5cbiAgICBwcml2YXRlIGluaXRMYXllcnMobkxheWVyczogbnVtYmVyKSB7XG4gICAgICAgIGNvbnN0IHNlbGYgPSB0aGlzO1xuICAgICAgICBsZXQgaGFzQWN0aXZlID0gZmFsc2U7XG5cbiAgICAgICAgY29uc3QgY2hlY2tib3hlcyA9IHNlbGYuc2Vscy5sYXllckNoZWNrYm94ZXMuc2VsZWN0QWxsKFwiLmxheWVyQ2hlY2tib3hcIilcbiAgICAgICAgICAgIC5kYXRhKF8ucmFuZ2UoMCwgbkxheWVycykpXG4gICAgICAgICAgICAuam9pbihcImxhYmVsXCIpXG4gICAgICAgICAgICAuYXR0cihcImNsYXNzXCIsIFwiYnRuIGJ1dHRvbiBsYXllckNoZWNrYm94XCIpXG4gICAgICAgICAgICAuY2xhc3NlZCgnYWN0aXZlJywgKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICAvLyBBc3NpZ24gdG8gbGFyZ2VzdCBsYXllciBhdmFpbGFibGUgaWYgdWlDb25mLmxheWVyKCkgPiBuZXcgbkxheWVyc1xuICAgICAgICAgICAgICAgIGlmIChkID09IHNlbGYudWlDb25mLmxheWVyKCkpIHsgLy8gSmF2YXNjcmlwdCBpcyAwIGluZGV4ZWQhXG4gICAgICAgICAgICAgICAgICAgIGhhc0FjdGl2ZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKCFoYXNBY3RpdmUgJiYgZCA9PSBuTGF5ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYudWlDb25mLmxheWVyKGQpXG4gICAgICAgICAgICAgICAgICAgIGhhc0FjdGl2ZSA9IHRydWVcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2VcblxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC50ZXh0KChkKSA9PiBkICsgMSlcbiAgICAgICAgICAgIC5hcHBlbmQoXCJpbnB1dFwiKVxuICAgICAgICAgICAgLmF0dHIoXCJ0eXBlXCIsIFwicmFkaW9cIilcbiAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgXCJjaGVja2JveC1pbmxpbmVcIilcbiAgICAgICAgICAgIC5hdHRyKFwibmFtZVwiLCBcImxheWVyYm94XCIpXG4gICAgICAgICAgICAvLyAuYXR0cihcImhlYWRcIiwgZCA9PiBkKVxuICAgICAgICAgICAgLmF0dHIoXCJpZFwiLCAoZCwgaSkgPT4gXCJsYXllckNoZWNrYm94XCIgKyBpKVxuICAgICAgICAvLyAudGV4dCgoZCwgaSkgPT4gZCArIFwiIFwiKVxuXG4gICAgICAgIGZyb21FdmVudChjaGVja2JveGVzLm5vZGVzKCksICdjaGFuZ2UnKS5waXBlKFxuICAgICAgICAgICAgdGFwKChlOiBFdmVudCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IG15RGF0YSA9IGQzLnNlbGVjdCg8QmFzZVR5cGU+ZS50YXJnZXQpLmRhdHVtKCk7XG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2cobXlEYXRhLCBcIi0tLSBteURhdGFcIik7XG4gICAgICAgICAgICAgICAgdGhpcy5zZWxzLmxheWVyQ2hlY2tib3hlcy5zZWxlY3RBbGwoXCIubGF5ZXJDaGVja2JveFwiKVxuICAgICAgICAgICAgICAgICAgICAuY2xhc3NlZCgnYWN0aXZlJywgZCA9PiBkID09PSBteURhdGEpXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIG1hcCgodjogRXZlbnQpID0+ICtkMy5zZWxlY3QoPEJhc2VUeXBlPnYudGFyZ2V0KS5kYXR1bSgpKSxcbiAgICAgICAgICAgIHRhcCh2ID0+IHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIk5ldyBsYXllcjogXCIsIHYpO1xuICAgICAgICAgICAgICAgIHNlbGYudWlDb25mLmxheWVyKHYpO1xuICAgICAgICAgICAgICAgIHNlbGYuc2Vscy5ib2R5LnN0eWxlKFwiY3Vyc29yXCIsIFwicHJvZ3Jlc3NcIik7XG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIHN3aXRjaE1hcCgodikgPT4gZnJvbShzZWxmLmFwaS51cGRhdGVNYXNrZWRBdHRlbnRpb25zKHNlbGYudWlDb25mLm1vZGVsKCksIHNlbGYudG9rQ2Fwc3VsZS5hLCBzZWxmLnVpQ29uZi5zZW50ZW5jZSgpLCB2KSkpXG4gICAgICAgICkuc3Vic2NyaWJlKHtcbiAgICAgICAgICAgIG5leHQ6IChyZXNwOiByc3AuQXR0ZW50aW9uRGV0YWlsc1Jlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgciA9IHJlc3AucGF5bG9hZDtcbiAgICAgICAgICAgICAgICBzZWxmLmF0dENhcHN1bGUudXBkYXRlRnJvbU5vcm1hbChyLCB0aGlzLnVpQ29uZi5oaWRlQ2xzU2VwKCkpO1xuICAgICAgICAgICAgICAgIHNlbGYudG9rQ2Fwc3VsZS51cGRhdGVUb2tlbnMocik7XG4gICAgICAgICAgICAgICAgc2VsZi51aUNvbmYubWFza0luZHMoc2VsZi50b2tDYXBzdWxlLmEubWFza0luZHMpXG4gICAgICAgICAgICAgICAgc2VsZi51cGRhdGUoKTtcbiAgICAgICAgICAgICAgICBzZWxmLnNlbHMuYm9keS5zdHlsZShcImN1cnNvclwiLCBcImRlZmF1bHRcIilcbiAgICAgICAgICAgICAgICBzZWxmLl90b2dnbGVUb2tlblNlbCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KVxuXG4gICAgICAgIGNvbnN0IGxheWVySWQgPSBgI2xheWVyQ2hlY2tib3gke3RoaXMudWlDb25mLmxheWVyKCl9YFxuICAgICAgICBjb25zb2xlLmxvZyhcIkxheWVyIElEOiBcIiwgbGF5ZXJJZCk7XG4gICAgICAgIGQzLnNlbGVjdChsYXllcklkKS5hdHRyKFwiY2hlY2tlZFwiLCBcImNoZWNrZWRcIilcblxuICAgICAgICAvLyBJbml0IHRocmVzaG9sZCBzdHVmZlxuICAgICAgICBjb25zdCBkaXNwVGhyZXNoID0gKHR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sXG4gICAgICAgIF1cblxuICAgICAgICBjb25zdCBuYW1lcyA9IFIubWFwKFIucHJvcCgnbmFtZScpKShkYXRhKVxuICAgICAgICBjb25zdCBraW5kcyA9IFIubWFwKFIucHJvcCgna2luZCcpKShkYXRhKVxuICAgICAgICBjb25zdCBraW5kbWFwID0gUi56aXBPYmoobmFtZXMsIGtpbmRzKVxuXG4gICAgICAgIHRoaXMuc2Vscy5tb2RlbFNlbGVjdG9yLnNlbGVjdEFsbCgnLm1vZGVsLW9wdGlvbicpXG4gICAgICAgICAgICAuZGF0YShkYXRhKVxuICAgICAgICAgICAgLmpvaW4oJ29wdGlvbicpXG4gICAgICAgICAgICAuY2xhc3NlZCgnbW9kZWwtb3B0aW9uJywgdHJ1ZSlcbiAgICAgICAgICAgIC5wcm9wZXJ0eSgndmFsdWUnLCBkID0+IGQubmFtZSlcbiAgICAgICAgICAgIC5hdHRyKFwibW9kZWxraW5kXCIsIGQgPT4gZC5raW5kKVxuICAgICAgICAgICAgLnRleHQoZCA9PiBkLm5hbWUpXG5cbiAgICAgICAgdGhpcy5zZWxzLm1vZGVsU2VsZWN0b3IucHJvcGVydHkoJ3ZhbHVlJywgdGhpcy51aUNvbmYubW9kZWwoKSk7XG5cbiAgICAgICAgdGhpcy5zZWxzLm1vZGVsU2VsZWN0b3Iub24oJ2NoYW5nZScsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGNvbnN0IG1lID0gZDMuc2VsZWN0KHRoaXMpXG4gICAgICAgICAgICBjb25zdCBtbmFtZSA9IG1lLnByb3BlcnR5KCd2YWx1ZScpXG4gICAgICAgICAgICBzZWxmLnVpQ29uZi5tb2RlbChtbmFtZSk7XG4gICAgICAgICAgICBzZWxmLnVpQ29uZi5tb2RlbEtpbmQoa2luZG1hcFttbmFtZV0pO1xuICAgICAgICAgICAgaWYgKGtpbmRtYXBbbW5hbWVdID09IHRwLk1vZGVsS2luZC5BdXRvcmVncmVzc2l2ZSkge1xuICAgICAgICAgICAgIC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