/******/ (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);
}
/**
*
* @param embedding Embedding of the word
* @param layer In the l'th layer
* @param k how many results to retrieve
*/
getNearestEmbeddings(model, corpus, embedding, layer, heads, k = 10, hashObj = null) {
const toSend = {
model: model,
corpus: corpus,
embedding: embedding,
layer: layer,
heads: heads,
k: k,
};
const url = Object(_etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__["makeUrl"])(this.baseURL + '/k-nearest-embeddings', 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);
}
getNearestContexts(model, corpus, context, layer, heads, k = 10, hashObj = null) {
const toSend = {
model: model,
corpus: corpus,
context: context,
layer: layer,
heads: heads,
k: k,
};
const url = Object(_etc_apiHelpers__WEBPACK_IMPORTED_MODULE_5__["makeUrl"])(this.baseURL + '/k-nearest-contexts', 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);
}
}
;
/***/ }),
/***/ "./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/FaissSearchWrapper.ts":
/*!***************************************!*\
!*** ./ts/data/FaissSearchWrapper.ts ***!
\***************************************/
/*! exports provided: FaissSearchResultWrapper */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FaissSearchResultWrapper", function() { return FaissSearchResultWrapper; });
/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
/* harmony import */ var _etc_SpacyInfo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../etc/SpacyInfo */ "./ts/etc/SpacyInfo.ts");
/* harmony import */ var _etc_xramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../etc/xramda */ "./ts/etc/xramda.ts");
// If value is not a string, don't try to make lowercase
const makeStringLower = ramda__WEBPACK_IMPORTED_MODULE_1__["ifElse"](ramda__WEBPACK_IMPORTED_MODULE_1__["is"](String), ramda__WEBPACK_IMPORTED_MODULE_1__["toLower"], ramda__WEBPACK_IMPORTED_MODULE_1__["identity"]);
function argMax(array) {
return [].map.call(array, (x, i) => [x, i]).reduce((r, a) => (a[0] > r[0] ? a : r))[1];
}
class FaissSearchResultWrapper {
constructor(data, showNext = false) {
this.options = {
showNext: false
};
this.data = data;
this.options.showNext = showNext;
}
get matchAtt() {
return this.showNext() ? "matched_att_plus_1" : "matched_att";
}
get matchIdx() {
return this.showNext() ? "next_index" : "index";
}
/**
* Add position info interpretable by the histogram
*
* @param countObj Represents the inforrmation to be displayed by the histogram
*/
countPosInfo() {
const attOffsets = this.data.map((d, i) => +d[this.matchAtt].out.offset_to_max);
const ctObj = {
offset: Object(_etc_xramda__WEBPACK_IMPORTED_MODULE_3__["initZero"])(attOffsets)
};
attOffsets.forEach(v => {
Object.keys(ctObj).forEach((k) => {
ctObj[k][v] += 1;
});
});
return ctObj;
}
countMaxAttKeys(indexOffset = 0) {
// The keys in the below object dictate what we count
const countObj = {
pos: Object(_etc_xramda__WEBPACK_IMPORTED_MODULE_3__["initZero"])(_etc_SpacyInfo__WEBPACK_IMPORTED_MODULE_2__["SpacyInfo"].TotalMetaOptions.pos),
dep: Object(_etc_xramda__WEBPACK_IMPORTED_MODULE_3__["initZero"])(_etc_SpacyInfo__WEBPACK_IMPORTED_MODULE_2__["SpacyInfo"].TotalMetaOptions.dep),
is_ent: Object(_etc_xramda__WEBPACK_IMPORTED_MODULE_3__["initZero"])(_etc_SpacyInfo__WEBPACK_IMPORTED_MODULE_2__["SpacyInfo"].TotalMetaOptions.is_ent),
};
// Confusing: Show MATCHED WORD attentions, but NEXT WORD distribution
const getMaxToken = (d) => d.tokens[argMax(d.matched_att.out.att)];
this.data.forEach((d, i) => {
const maxMatch = getMaxToken(d);
Object.keys(countObj).forEach(k => {
const val = makeStringLower(String(maxMatch[k]));
countObj[k][val] += 1;
});
});
const newCountObj = Object.assign(countObj, this.countPosInfo());
return newCountObj;
}
countMatchedKeys(indexOffset = 0) {
// The keys in the below object dictate what we count
const countObj = {
pos: Object(_etc_xramda__WEBPACK_IMPORTED_MODULE_3__["initZero"])(_etc_SpacyInfo__WEBPACK_IMPORTED_MODULE_2__["SpacyInfo"].TotalMetaOptions.pos),
dep: Object(_etc_xramda__WEBPACK_IMPORTED_MODULE_3__["initZero"])(_etc_SpacyInfo__WEBPACK_IMPORTED_MODULE_2__["SpacyInfo"].TotalMetaOptions.dep),
is_ent: Object(_etc_xramda__WEBPACK_IMPORTED_MODULE_3__["initZero"])(_etc_SpacyInfo__WEBPACK_IMPORTED_MODULE_2__["SpacyInfo"].TotalMetaOptions.is_ent),
};
this.data.forEach(d => {
// Confusing: Show MATCHED WORD attentions, but NEXT WORD distribution
const match = d.tokens[d[this.matchIdx] + indexOffset];
Object.keys(countObj).forEach(k => {
const val = makeStringLower(String(match[k]));
countObj[k][val] += 1;
});
});
return countObj;
}
getMatchedHistogram(indexOffset = 0) {
const totalHist = this.countMatchedKeys(indexOffset);
const filterZeros = (val, key) => val != 0;
const nonZero = ramda__WEBPACK_IMPORTED_MODULE_1__["map"](ramda__WEBPACK_IMPORTED_MODULE_1__["pickBy"](filterZeros), totalHist);
return nonZero;
}
getMaxAttHistogram() {
// const totalHist = this.countPosInfo()
const newHist = this.countMaxAttKeys();
const filterZeros = (val, key) => val != 0;
const nonZero = ramda__WEBPACK_IMPORTED_MODULE_1__["map"](ramda__WEBPACK_IMPORTED_MODULE_1__["pickBy"](filterZeros), newHist);
return nonZero;
}
showNext(v) {
if (v == null)
return this.options.showNext;
this.options.showNext = v;
return this;
}
}
/***/ }),
/***/ "./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]',
embeddings: [],
contexts: [],
bpe_token: '',
bpe_pos: '',
bpe_dep: '',
bpe_is_ent: null,
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/SpacyInfo.ts":
/*!*****************************!*\
!*** ./ts/etc/SpacyInfo.ts ***!
\*****************************/
/*! exports provided: SpacyInfo, spacyColors */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SpacyInfo", function() { return SpacyInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spacyColors", function() { return spacyColors; });
/* 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 _etc_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../etc/colors */ "./ts/etc/colors.ts");
class SpacyInfo {
constructor() {
this.colorScale = this.createColorScales();
}
createColorScales() {
const toScale = (keys) => {
const obj = ramda__WEBPACK_IMPORTED_MODULE_1__["zipObj"](ramda__WEBPACK_IMPORTED_MODULE_1__["map"](String, keys), _etc_colors__WEBPACK_IMPORTED_MODULE_2__["COLORS200"].slice(0, keys.length));
return k => ramda__WEBPACK_IMPORTED_MODULE_1__["propOr"]("black", k, obj);
};
const myColors = {
pos: toScale(SpacyInfo.TotalMetaOptions.pos),
dep: toScale(SpacyInfo.TotalMetaOptions.dep),
is_ent: toScale(SpacyInfo.TotalMetaOptions.is_ent),
ents: toScale(SpacyInfo.TotalMetaOptions.ents),
offset: d3__WEBPACK_IMPORTED_MODULE_0__["scaleOrdinal"]().range(['black'])
};
return myColors;
}
}
SpacyInfo.EnglishMetaOptions = {
pos: ['punct', 'sym', 'x', 'adj', 'verb', 'conj', 'num', 'et', 'adv', 'x', 'adp', 'noun', 'propn', 'part', 'pron', 'space', 'intj'],
dep: ['root', 'ROOT', 'acl', 'acomp', 'advcl', 'advmod', 'agent', 'amod', 'appos', 'attr', 'aux', 'auxpass', 'case', 'cc', 'ccomp', 'compound', 'conj', 'cop', 'csubj',
'csubjpass', 'dative', 'dep', 'det', 'dobj', 'expl', 'intj', 'mark', 'meta', 'neg', 'nn', 'nounmod', 'npmod', 'nsubj', 'nsubjpass', 'nummod', 'oprd',
'obj', 'obl', 'parataxis', 'pcomp', 'pobj', 'poss', 'preconj', 'predet', 'prep', 'prt', 'punct', 'quantmod', 'relcl', 'root', 'xcomp', 'npadvmod'],
is_ent: [true, false],
ents: ['person', 'norp', 'fac', 'org', 'gpe', 'loc', 'product', 'event', 'work_of_art', 'law', 'language', 'date', 'time', 'percent', 'money', 'quantity', 'ordinal',
'cardinal'],
};
/**
* Obsolete. Represents the information that is included when trained on the universal corpus
*/
SpacyInfo.UniversalMetaOptions = {
pos: ['adj', 'adp', 'adv', 'aux', 'conj', 'cconj', 'det', 'intj', 'noun', 'num', 'part', 'pron', 'propn', 'punct', 'sconj', 'sym', 'verb', 'x', 'space'],
dep: ['acl', 'advcl', 'advmod', 'amod', 'appos', 'aux', 'case', 'cc', 'ccomp', 'clf', 'compound', 'conj', 'cop', 'csubj', 'dep', 'det', 'discourse',
'dislocated', 'expl', 'fixed', 'flat', 'goeswith', 'iobj', 'list', 'mark', 'nmod', 'nsubj', 'nummod', 'obj', 'obl', 'orphan', 'parataxis', 'punct', 'reparandum',
'root', 'vocative', 'xcomp'],
is_ent: [true, false],
ents: ['person', 'norp', 'fac', 'org', 'gpe', 'loc', 'product', 'event', 'work_of_art', 'law', 'language', 'date', 'time', 'percent', 'money', 'quantity', 'ordinal',
'cardinal'],
};
SpacyInfo.TotalMetaOptions = {
pos: ramda__WEBPACK_IMPORTED_MODULE_1__["union"](SpacyInfo.EnglishMetaOptions.pos, SpacyInfo.UniversalMetaOptions.pos),
dep: SpacyInfo.EnglishMetaOptions.dep,
is_ent: SpacyInfo.EnglishMetaOptions.is_ent,
ents: SpacyInfo.EnglishMetaOptions.ents,
};
const spacyColors = new SpacyInfo();
/***/ }),
/***/ "./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/colors.ts":
/*!**************************!*\
!*** ./ts/etc/colors.ts ***!
\**************************/
/*! exports provided: COLORS200 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COLORS200", function() { return COLORS200; });
// Colors were generated to be as visually distinct as possible by: http://jnnnnn.github.io/category-colors-constrained.html
const COLORS200 = [
"#3957ff", "#d3fe14", "#c9080a", "#fec7f8", "#0b7b3e", "#0bf0e9", "#c203c8", "#fd9b39",
"#888593", "#906407", "#98ba7f", "#fe6794", "#10b0ff", "#ac7bff", "#fee7c0", "#964c63",
"#1da49c", "#0ad811", "#bbd9fd", "#fe6cfe", "#297192", "#d1a09c", "#78579e", "#81ffad",
"#739400", "#ca6949", "#d9bf01", "#646a58", "#d5097e", "#bb73a9", "#ccf6e9", "#9cb4b6",
"#b6a7d4", "#9e8c62", "#6e83c8", "#01af64", "#a71afd", "#cfe589", "#d4ccd1", "#fd4109",
"#bf8f0e", "#2f786e", "#4ed1a5", "#d8bb7d", "#a54509", "#6a9276", "#a4777a", "#fc12c9",
"#606f15", "#3cc4d9", "#f31c4e", "#73616f", "#f097c6", "#fc8772", "#92a6fe", "#875b44",
"#699ab3", "#94bc19", "#7d5bf0", "#d24dfe", "#c85b74", "#68ff57", "#b62347", "#994b91",
"#646b8c", "#977ab4", "#d694fd", "#c4d5b5", "#fdc4bd", "#1cae05", "#7bd972", "#e9700a",
"#d08f5d", "#8bb9e1", "#fde945", "#a29d98", "#1682fb", "#9ad9e0", "#d6cafe", "#8d8328",
"#b091a7", "#647579", "#1f8d11", "#e7eafd", "#b9660b", "#a4a644", "#fec24c", "#b1168c",
"#188cc1", "#7ab297", "#4468ae", "#c949a6", "#d48295", "#eb6dc2", "#d5b0cb", "#ff9ffb",
"#fdb082", "#af4d44", "#a759c4", "#a9e03a", "#0d906b", "#9ee3bd", "#5b8846", "#0d8995",
"#f25c58", "#70ae4f", "#847f74", "#9094bb", "#ffe2f1", "#a67149", "#936c8e", "#d04907",
"#c3b8a6", "#cef8c4", "#7a9293", "#fda2ab", "#2ef6c5", "#807242", "#cb94cc", "#b6bdd0",
"#b5c75d", "#fde189", "#b7ff80", "#fa2d8e", "#839a5f", "#28c2b5", "#e5e9e1", "#bc79d8",
"#7ed8fe", "#9f20c3", "#4f7a5b", "#f511fd", "#09c959", "#bcd0ce", "#8685fd", "#98fcff",
"#afbff9", "#6d69b4", "#5f99fd", "#aaa87e", "#b59dfb", "#5d809d", "#d9a742", "#ac5c86",
"#9468d5", "#a4a2b2", "#b1376e", "#d43f3d", "#05a9d1", "#c38375", "#24b58e", "#6eabaf",
"#66bf7f", "#92cbbb", "#ddb1ee", "#1be895", "#c7ecf9", "#a6baa6", "#8045cd", "#5f70f1",
"#a9d796", "#ce62cb", "#0e954d", "#a97d2f", "#fcb8d3", "#9bfee3", "#4e8d84", "#fc6d3f",
"#7b9fd4", "#8c6165", "#72805e", "#d53762", "#f00a1b", "#de5c97", "#8ea28b", "#fccd95",
"#ba9c57", "#b79a82", "#7c5a82", "#7d7ca4", "#958ad6", "#cd8126", "#bdb0b7", "#10e0f8",
"#dccc69", "#d6de0f", "#616d3d", "#985a25", "#30c7fd", "#0aeb65", "#e3cdb4", "#bd1bee",
"#ad665d", "#d77070", "#8ea5b8", "#5b5ad0", "#76655e", "#598100", "#86757e", "#5ea068",
];
/***/ }),
/***/ "./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/etc/xramda.ts":
/*!**************************!*\
!*** ./ts/etc/xramda.ts ***!
\**************************/
/*! exports provided: objFromKeys, assignZero, initZero */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "objFromKeys", function() { return objFromKeys; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assignZero", function() { return assignZero; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initZero", function() { return initZero; });
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
/**
* Map a list as values to an object whose keys are the original list
*/
// (String -> b) -> [String] -> {String: b}
const objFromKeys = ramda__WEBPACK_IMPORTED_MODULE_0__["curry"]((fn, keys) => ramda__WEBPACK_IMPORTED_MODULE_0__["zipObj"](keys, ramda__WEBPACK_IMPORTED_MODULE_0__["map"](fn, keys)));
const assignZero = x => 0;
/**
* Given an list, create an object whose values are all 0
*/
const initZero = objFromKeys(assignZero);
/***/ }),
/***/ "./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_myMain__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vis/myMain */ "./ts/vis/myMain.ts");
/* harmony import */ var _api_mainApi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./api/mainApi */ "./ts/api/mainApi.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 _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/TokenWrapper */ "./ts/data/TokenWrapper.ts");
/* harmony import */ var _file_loader_name_exBERT_html_exBERT_html__WEBPACK_IMPORTED_MODULE_4__ = __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_4___default = /*#__PURE__*/__webpack_require__.n(_file_loader_name_exBERT_html_exBERT_html__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _file_loader_name_index_html_index_html__WEBPACK_IMPORTED_MODULE_5__ = __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_5___default = /*#__PURE__*/__webpack_require__.n(_file_loader_name_index_html_index_html__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _css_main_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../css/main.scss */ "./css/main.scss");
/* harmony import */ var _css_main_scss__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_css_main_scss__WEBPACK_IMPORTED_MODULE_6__);
// import { Tester } from "../ts/test"
function doMySvg() {
return new _vis_myMain__WEBPACK_IMPORTED_MODULE_0__["MainGraphic"]();
}
;
/**
* Create the static files needed for the demo. Save the keys and file paths to a json object that is then written to a file
*
* This will print the object after every call. When the key length is the expected length, right click in chrome and select "save as global variable"
*
* Then, in the console, type "copy(temp1)". Use sublime text (it is the best for handling large files) to paste this into the code and save it as ____.json
*
* @param sentence - The sentence to analyze
* @param maskInd - Which index to mask in the sentence. Atm, can only record one masking
* @param outDictPath - Where to save the object of hashkey: filepath
*/
function createDemos(sentence, maskInd, modelName, corpusName, outDictPath) {
const api = new _api_mainApi__WEBPACK_IMPORTED_MODULE_1__["API"]();
const layers = lodash__WEBPACK_IMPORTED_MODULE_2__["range"](12);
const L = 0;
const contentHash = {}; // Map hash -> contents
// Get the base return for all page initializations
lodash__WEBPACK_IMPORTED_MODULE_2__["range"](12).forEach(L => {
api.getMetaAttentions(modelName, sentence, L, contentHash).then(r0 => {
const tokCapsule = new _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_3__["TokenWrapper"](r0.payload);
// Unmasked response:
api.updateMaskedAttentions(modelName, tokCapsule.a, sentence, L, contentHash).then(r1 => {
// Masked word and searching responses:
tokCapsule.a.mask(maskInd);
api.updateMaskedAttentions(modelName, tokCapsule.a, sentence, L, contentHash).then(r2 => {
// Get search results by embedding
const embedding = r2['aa']['left'][maskInd].embeddings;
api.getNearestEmbeddings(modelName, corpusName, embedding, L, lodash__WEBPACK_IMPORTED_MODULE_2__["range"](12), 50, contentHash).then(x => {
});
// Get search results by context
const context = r2['aa']['left'][maskInd].contexts;
api.getNearestContexts(modelName, corpusName, context, L, lodash__WEBPACK_IMPORTED_MODULE_2__["range"](12), 50, contentHash).then(x => {
console.log(Object.keys(contentHash).length);
console.log(contentHash);
});
});
});
});
});
}
/**
*
* Observe how the demo creation process works.
*
* If desired to mask multiple words in the input for demo purposes, try looping over the mask inds and masking each one individually
*
* @param sentence The demo sentence
* @param maskInd Desired index to mask (can currently only accept a single mask index)
* @param outDictPath
*/
function inspectDemos(sentence, maskInd, modelName, corpusName, outDictPath) {
const api = new _api_mainApi__WEBPACK_IMPORTED_MODULE_1__["API"]();
const contentHash = {};
// Get the base return for all page initializations
lodash__WEBPACK_IMPORTED_MODULE_2__["range"](1).forEach(L => {
api.getMetaAttentions(modelName, sentence, L, "").then(r0 => {
const tokCapsule = new _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_3__["TokenWrapper"](r0.payload);
// Unmasked response:
api.updateMaskedAttentions(modelName, tokCapsule.a, sentence, L, _api_mainApi__WEBPACK_IMPORTED_MODULE_1__["emptyTokenDisplay"]).then(r1 => {
// Masked word and searching responses:
tokCapsule.a.mask(maskInd);
api.updateMaskedAttentions(modelName, tokCapsule.a, sentence, L, _api_mainApi__WEBPACK_IMPORTED_MODULE_1__["emptyTokenDisplay"]).then(r2 => {
console.log(r2);
// Get search results by embedding
const embedding = r2['aa']['left'][maskInd].embeddings;
api.getNearestEmbeddings(modelName, corpusName, embedding, L, lodash__WEBPACK_IMPORTED_MODULE_2__["range"](12), 50, contentHash).then(x => {
});
// Get search results by context
const context = r2['aa']['left'][maskInd].contexts;
api.getNearestContexts(modelName, corpusName, context, L, lodash__WEBPACK_IMPORTED_MODULE_2__["range"](12), 50).then(x => {
});
});
});
});
});
}
function replTest() {
// Tester.testAttWrapperConstructor()
// Tester.testUpdateMaskedAttention()
// Tester.testNjAray();
// Tester.testRandomArrayCreation();
// Tester.testFaissWrapper();
// Tester.testD3Ordinal();
// Tester.testFaissSearchResultsHist();
// Tester.testReadingJSON();
}
window.onload = () => {
doMySvg();
// replTest();
// createDemos("Chicken tastes absolutely delicious if you know what you're doing", 4, "")
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; // How do I automate this?
this._nLayers = null;
this.attType = 'aa'; // Don't allow this to be modified by the user.
this.fromURL();
this.toURL(false);
}
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.",
corpus: params['corpus'] || 'woz',
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],
metaMatch: params['metaMatch'] || "pos",
metaMax: params['metaMax'] || "pos",
displayInspector: params['displayInspector'] || null,
offsetIdxs: this._initOffsetIdxs(params['offsetIdxs']),
hideClsSep: truthy(params['hideClsSep']) || true,
};
this._token = { side: this._conf.tokenSide, ind: this._conf.tokenInd };
}
toURL(updateHistory = false) {
_etc_URLHandler__WEBPACK_IMPORTED_MODULE_4__["URLHandler"].updateUrl(this._conf, updateHistory);
}
_initOffsetIdxs(v) {
if (v == null) {
return [-1, 0, 1];
}
else {
const numberArr = ramda__WEBPACK_IMPORTED_MODULE_3__["map"](toNumber, v);
return numberArr;
}
}
_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;
}
metaMatch(val) {
if (val == null)
return this._conf.metaMax;
this._conf.metaMax = val;
this.toURL();
return this;
}
metaMax(val) {
if (val == null)
return this._conf.metaMatch;
this._conf.metaMatch = val;
this.toURL();
return this;
}
maskInds(val) {
if (val == null)
return this._conf.maskInds;
this._conf.maskInds = val;
this.toURL();
return this;
}
displayInspector(val) {
if (val == null)
return this._conf.displayInspector;
this._conf.displayInspector = val;
this.toURL();
return this;
}
offsetIdxs(val) {
if (val == null)
return this._conf.offsetIdxs;
// convert to numbers
this._conf.offsetIdxs = ramda__WEBPACK_IMPORTED_MODULE_3__["map"](toNumber, 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";
}
corpus(val) {
if (val == null)
return this._conf.corpus;
this._conf.corpus = val;
this.toURL();
return this;
}
}
/***/ }),
/***/ "./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/CorpusHistogram.ts":
/*!***********************************!*\
!*** ./ts/vis/CorpusHistogram.ts ***!
\***********************************/
/*! exports provided: CorpusHistogram */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CorpusHistogram", function() { return CorpusHistogram; });
/* harmony import */ var _VisComponent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VisComponent */ "./ts/vis/VisComponent.ts");
/* harmony import */ var _etc_SpacyInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../etc/SpacyInfo */ "./ts/etc/SpacyInfo.ts");
/* harmony import */ var _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../etc/SVGplus */ "./ts/etc/SVGplus.ts");
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js");
/**
* Data formatting functions
*/
const toRenderData = (obj) => Object.keys(obj).map((k, i) => {
return { label: k, count: obj[k] };
});
const toStringOrNum = (a) => {
const na = +a;
if (isNaN(na)) {
return a;
}
return na;
};
const sortByLabel = ramda__WEBPACK_IMPORTED_MODULE_4__["sortBy"](ramda__WEBPACK_IMPORTED_MODULE_4__["compose"](toStringOrNum, ramda__WEBPACK_IMPORTED_MODULE_4__["prop"]('label')));
const sortByCount = ramda__WEBPACK_IMPORTED_MODULE_4__["sortBy"](ramda__WEBPACK_IMPORTED_MODULE_4__["prop"]('count'));
const toOrderedRender = ramda__WEBPACK_IMPORTED_MODULE_4__["compose"](ramda__WEBPACK_IMPORTED_MODULE_4__["reverse"],
// @ts-ignore -- TODO: fix
sortByCount, toRenderData);
class CorpusHistogram extends _VisComponent__WEBPACK_IMPORTED_MODULE_0__["VComponent"] {
constructor(d3parent, eventHandler, options = {}) {
super(d3parent, eventHandler);
this.css_name = '';
this._current = {
chart: {
height: null,
width: null
}
};
this.axes = {
x: d3__WEBPACK_IMPORTED_MODULE_3__["scaleBand"](),
y: d3__WEBPACK_IMPORTED_MODULE_3__["scaleLinear"](),
};
this.options = {
margin: {
top: 10,
right: 30,
bottom: 50,
left: 40
},
barWidth: 25,
width: 185,
height: 230,
val: "pos",
xLabelRot: 45,
xLabelOffset: 15,
yLabelOffset: 5,
};
this.superInitSVG();
}
meta(val) {
if (val == null) {
return this.options.val;
}
this.options.val = val;
this.update(this._data);
return this;
}
_init() { }
createXAxis() {
const self = this;
const op = this.options;
const width = op.width - op.margin.left - op.margin.right;
this.axes.x
.domain(ramda__WEBPACK_IMPORTED_MODULE_4__["map"](ramda__WEBPACK_IMPORTED_MODULE_4__["prop"]('label'), self.renderData))
.rangeRound([0, width])
.padding(0.1);
this._current.chart.width = width;
}
createYAxis() {
const self = this;
const op = this.options;
const height = op.height - op.margin.top - op.margin.bottom;
this.axes.y
.domain([0, +d3__WEBPACK_IMPORTED_MODULE_3__["max"](ramda__WEBPACK_IMPORTED_MODULE_4__["map"](ramda__WEBPACK_IMPORTED_MODULE_4__["prop"]('count'), self.renderData))])
.rangeRound([height, 0]);
this._current.chart.height = height;
}
createAxes() {
this.createXAxis();
this.createYAxis();
}
_wrangle(data) {
const out = data[this.options.val];
return toOrderedRender(out);
}
width(val) {
if (val == null) {
return this.options.width;
}
this.options.width = val;
this.updateWidth();
this.createXAxis();
return this;
}
height(val) {
if (val == null) {
return this.options.height;
}
this.options.height = val;
this.updateHeight();
this.createYAxis();
return this;
}
updateWidth() {
this.svg.attr('width', this.options.width);
}
updateHeight() {
this.svg.attr('height', this.options.height);
}
figWidth(data) {
const op = this.options;
return (data.length * op.barWidth) + op.margin.left + op.margin.right;
}
_render(data) {
const self = this;
const op = this.options;
const curr = this._current;
this.parent.html('');
this.svg = this.parent;
this.createAxes();
this.width(this.figWidth(data));
this.updateHeight();
// Initialize axes
const g = self.svg.append("g")
.attr("transform", _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__["SVG"].translate({ x: op.margin.left, y: op.margin.top }));
// Hack to allow clearing this histograms to work
self.base = g;
// Fix below for positional changing
const axisBottom = g.append("g")
.attr("transform", _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__["SVG"].translate({ x: 0, y: curr.chart.height }))
.call(d3__WEBPACK_IMPORTED_MODULE_3__["axisBottom"](self.axes.x));
if (op.val != "offset") {
axisBottom
.selectAll("text")
.attr("y", op.yLabelOffset) // Move below the axis
.attr("x", op.xLabelOffset) // Offset to the right a bit
.attr("transform", _etc_SVGplus__WEBPACK_IMPORTED_MODULE_2__["SVG"].rotate(op.xLabelRot));
}
g.append("g")
.call(d3__WEBPACK_IMPORTED_MODULE_3__["axisLeft"](self.axes.y));
g.selectAll(".bar")
.data(data)
.join('rect')
.attr("class", "bar")
.attr("x", function (d) { return self.axes.x(d.label); })
.attr("y", function (d) { return self.axes.y(d.count); })
.attr("width", self.axes.x.bandwidth())
.attr("height", function (d) { return curr.chart.height - self.axes.y(d.count); })
.style('fill', k => _etc_SpacyInfo__WEBPACK_IMPORTED_MODULE_1__["spacyColors"].colorScale[op.val](k.label));
}
}
CorpusHistogram.events = {};
/***/ }),
/***/ "./ts/vis/CorpusInspector.ts":
/*!***********************************!*\
!*** ./ts/vis/CorpusInspector.ts ***!
\***********************************/
/*! exports provided: CorpusInspector */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CorpusInspector", function() { return CorpusInspector; });
/* 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 _VisComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VisComponent */ "./ts/vis/VisComponent.ts");
/* harmony import */ var _etc_xd3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../etc/xd3 */ "./ts/etc/xd3.ts");
// Helpers
const currMatchIdx = (elem) => +elem.parentNode.getAttribute('matchidx');
const currRowNum = (elem) => +elem.parentNode.getAttribute('rownum');
const backgroundColor = x => `rgba(128, 0, 150, ${0.6 * x})`;
class CorpusInspector extends _VisComponent__WEBPACK_IMPORTED_MODULE_2__["VComponent"] {
constructor(d3Parent, eventHandler, options = {}) {
super(d3Parent, eventHandler);
this.css_name = 'corpus-inspector';
this.options = {
showNext: false
};
this.scaler = d3__WEBPACK_IMPORTED_MODULE_0__["scalePow"]().range([0, 0.9]).exponent(2);
this.superInitHTML(options);
this._init();
}
createRows() {
const data = this._data;
this.inspectorRows = this.base.selectAll(".inspector-row")
.data(data)
.join('div')
.classed('inspector-row', true)
.attrs({
matchIdx: d => d.index,
rowNum: (d, i) => i,
})
.on("mouseover", (d, i) => {
this.eventHandler.trigger(CorpusInspector.events.rowMouseOver, {});
});
}
addTooltip() {
this.inspectorCells = this.inspectorCells
.classed('celltooltip', true)
.append('span')
.classed('tooltiptext', true)
.html((d, i, n) => {
const entityStr = d.is_ent ? "
Entity" : "";
const att = n[i].parentNode.getAttribute('att').slice(0, 7);
const attStr = `
Attention: ${att}`;
return `POS: ${d.pos.toLowerCase()}
DEP: ${d.dep.toLowerCase()}` + entityStr + attStr;
});
}
createCells() {
const self = this;
this.inspectorCells = this.inspectorRows.selectAll('.inspector-cell')
.data((d) => d.tokens)
.join('div')
.classed('inspector-cell', true)
.attr('index-offset', (d, i, n) => {
const matchIdx = currMatchIdx(n[i]);
return i - matchIdx;
})
.attrs({
pos: d => d.pos.toLowerCase(),
dep: d => d.dep.toLowerCase(),
is_ent: d => d.is_ent
})
.text(d => d.token.replace("\u0120", " "))
.classed('matched-cell', d => d.is_match)
.classed('next-cell', function (d) {
return self.showNext() && d.is_next_word;
})
.classed('gray-cell', function (d, i) {
const idx = +currMatchIdx(this);
return self.showNext() && i > idx;
});
// Highlight the cells appropriately
this.inspectorCells.each((d, i, n) => {
const idx = currMatchIdx(n[i]);
if (i == idx) {
const att = d.inward;
const maxAtt = +d3__WEBPACK_IMPORTED_MODULE_0__["max"](att);
const currRow = currRowNum(n[i]);
const scaler = self.scaler.domain([0, maxAtt]);
d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"](`.inspector-row[rownum='${currRow}']`)
.selectAll(`.inspector-cell`)
.style('background', (d, i) => {
return backgroundColor(scaler(att[i]));
})
.attr('att', (d, i) => att[i]);
}
});
self.addTooltip();
}
updateData() {
this.createRows();
this.createCells();
}
_init() { }
_wrangle(data) {
this._data = data;
return data;
}
_render(data) {
// Remember that this._data is defined in wrangle which should always be called before render
// as is defined in the update function
this.updateData();
}
showNext(v) {
if (v == null)
return this.options.showNext;
this.options.showNext = v;
return this;
}
}
CorpusInspector.events = {
rowMouseOver: "CorpusInspector_rowMouseOver",
rowMouseOut: "CorpusInspector_rowMouseOut",
rowClick: "CorpusInspector_rowClick",
rowDblClick: "CorpusInspector_rowDblClick",
cellMouseOver: "CorpusInspector_cellMouseOver",
cellMouseOut: "CorpusInspector_cellMouseOut",
cellClick: "CorpusInspector_cellClick",
cellDblClick: "CorpusInspector_cellDblClick",
};
/***/ }),
/***/ "./ts/vis/CorpusMatManager.ts":
/*!************************************!*\
!*** ./ts/vis/CorpusMatManager.ts ***!
\************************************/
/*! exports provided: CorpusMatManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CorpusMatManager", function() { return CorpusMatManager; });
/* 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 _vis_VisComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../vis/VisComponent */ "./ts/vis/VisComponent.ts");
/* harmony import */ var _etc_SVGplus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../etc/SVGplus */ "./ts/etc/SVGplus.ts");
/* harmony import */ var _etc_SpacyInfo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../etc/SpacyInfo */ "./ts/etc/SpacyInfo.ts");
/* harmony import */ var _etc_xd3__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../etc/xd3 */ "./ts/etc/xd3.ts");
function managerData2MatData(dataIn, indexOffset = 0, toPick = ['pos']) {
const outOfRangeObj = {
pos: null,
dep: null,
is_ent: null,
token: null,
};
const chooseProps = ramda__WEBPACK_IMPORTED_MODULE_1__["pick"](toPick);
const dataOut = dataIn.map(d => {
const wordIdx = d.index + indexOffset;
if ((wordIdx < 0) || (wordIdx >= d.tokens.length)) {
return ramda__WEBPACK_IMPORTED_MODULE_1__["assoc"]('height', d.height, outOfRangeObj);
}
const newObj = chooseProps(d.tokens[wordIdx]);
return ramda__WEBPACK_IMPORTED_MODULE_1__["assoc"]('height', d.height, newObj);
});
return dataOut;
}
class CorpusMatManager extends _vis_VisComponent__WEBPACK_IMPORTED_MODULE_2__["VComponent"] {
// Selections
constructor(d3parent, eventHandler, options = {}) {
super(d3parent, eventHandler);
this.css_name = 'corpus-mat-container';
this.options = {
cellWidth: 10,
toPick: ['pos'],
idxs: [-1, 0, 1],
divHover: {
width: 60,
height: 40
}
};
this._current = {};
this.rowCssName = 'index-match-results';
this.cellCssName = 'index-cell-result';
this.idxs = [-1, 0, 1];
this.superInitHTML(options);
this._init();
}
get idxs() {
return this.options.idxs;
}
set idxs(val) {
this.options.idxs = val;
}
// Create static dom elements
_init() {
const self = this;
this.corpusMats = this.base.selectAll('.corpus-mat');
this.rowGroups = this.corpusMats.selectAll(`.${this.rowCssName}`);
this.divHover = this.base.append('div')
.classed('mat-hover-display', true)
.classed('text-center', true)
.style('width', String(this.options.divHover.width) + 'px')
.style('height', String(this.options.divHover.height) + 'px');
this.divHover.append('p');
}
pick(val) {
this.options.toPick = [val];
this.redraw();
}
addRight() {
const addedIdx = ramda__WEBPACK_IMPORTED_MODULE_1__["last"](this.idxs) + 1;
this.idxs.push(addedIdx);
this.addCorpusMat(addedIdx, "right");
}
addLeft() {
const addedIdx = this.idxs[0] - 1;
const addDecrementedHead = x => ramda__WEBPACK_IMPORTED_MODULE_1__["insert"](0, ramda__WEBPACK_IMPORTED_MODULE_1__["head"](x) - 1)(x);
this.idxs = addDecrementedHead(this.idxs);
this.addCorpusMat(addedIdx, "left");
}
killRight() {
this.kill(Math.max(...this.idxs));
}
killLeft() {
this.kill(Math.min(...this.idxs));
}
/**
* Remove edge value from contained indexes
*
* @param d Index to remove
*/
kill(d) {
if (d != 0) {
if (d == Math.min(...this.idxs) || d == Math.max(...this.idxs)) {
this.idxs = ramda__WEBPACK_IMPORTED_MODULE_1__["without"]([d], this.idxs);
this.base.selectAll(`.offset-${d}`).remove();
}
}
}
_wrangle(data) {
return data;
}
data(val) {
if (val == null) {
return this._data;
}
this._data = val;
this._updateData();
return this;
}
/**
* The main rendering code, called whenever the data changes.
*/
_updateData() {
const self = this;
const op = this.options;
this.base.selectAll('.corpus-mat').remove();
this.idxs.forEach((idxOffset, i) => {
self.addCorpusMat(idxOffset);
});
}
/**
* Add another word's meta information matrix column to either side of the index
*
* @param idxOffset Distance of word from matched word in the sentence
* @param toThe Indicates adding to the "left" or to the "right" of the index
*/
addCorpusMat(idxOffset, toThe = "right") {
const self = this;
const op = this.options;
const boxWidth = op.cellWidth * op.toPick.length;
const boxHeight = ramda__WEBPACK_IMPORTED_MODULE_1__["sum"](ramda__WEBPACK_IMPORTED_MODULE_1__["map"](ramda__WEBPACK_IMPORTED_MODULE_1__["prop"]('height'), this._data));
let corpusMat;
if (toThe == "right") {
corpusMat = this.base.append('div');
}
else if (toThe == "left") {
corpusMat = this.base.insert('div', ":first-child");
}
else {
throw Error("toThe must have argument of 'left' or 'right'");
}
corpusMat = corpusMat
.data([idxOffset])
.attr('class', `corpus-mat offset-${idxOffset}`)
.attr('offset', idxOffset)
.append('svg')
.attrs({
width: boxWidth,
height: boxHeight,
})
.on('mouseover', function (d, i) {
self.eventHandler.trigger(CorpusMatManager.events.mouseOver, { idx: i, offset: d, val: self.options.toPick[0] });
})
.on('mouseout', (d, i) => {
this.eventHandler.trigger(CorpusMatManager.events.mouseOut, { idx: i, offset: d });
});
this.addRowGroup(corpusMat);
}
/**
*
* @param mat The base div on which to add matrices and rows
*/
addRowGroup(mat) {
const self = this;
const op = this.options;
const heights = ramda__WEBPACK_IMPORTED_MODULE_1__["map"](ramda__WEBPACK_IMPORTED_MODULE_1__["prop"]('height'), this._data);
const [heightSum, rawHeightList] = ramda__WEBPACK_IMPORTED_MODULE_1__["mapAccum"]((x, y) => [ramda__WEBPACK_IMPORTED_MODULE_1__["add"](x, y), ramda__WEBPACK_IMPORTED_MODULE_1__["add"](x, y)], 0, heights);
const fixList = ramda__WEBPACK_IMPORTED_MODULE_1__["compose"](ramda__WEBPACK_IMPORTED_MODULE_1__["dropLast"](1),
// @ts-ignore
ramda__WEBPACK_IMPORTED_MODULE_1__["prepend"](0));
const heightList = fixList(rawHeightList);
const rowGroup = mat.selectAll(`.${self.rowCssName}`)
.data(d => managerData2MatData(self._data, d, op.toPick))
.join("g")
.attr("class", (d, i) => {
return `${self.rowCssName} ${self.rowCssName}-${i}`;
})
.attr("row-num", (d, i) => i)
.attr("height", d => d.height)
.attr("transform", (d, i) => {
const out = _etc_SVGplus__WEBPACK_IMPORTED_MODULE_3__["SVG"].translate({
x: 0,
y: heightList[i],
});
return out;
});
op.toPick.forEach(prop => {
self.addRect(rowGroup, 0, prop);
});
}
addRect(g, xShift, prop) {
const self = this;
const op = this.options;
const rects = g.append('rect')
.attrs({
width: op.cellWidth,
height: d => d.height - 3,
transform: (d, i) => {
return _etc_SVGplus__WEBPACK_IMPORTED_MODULE_3__["SVG"].translate({
x: xShift,
y: 1.5,
});
},
})
.style('fill', d => CorpusMatManager.colorScale[prop](d[prop]));
const getBaseX = () => self.base.node().getBoundingClientRect().left;
const getBaseY = () => self.base.node().getBoundingClientRect().top;
g.on('mouseover', function (d, i) {
self.divHover.style('visibility', 'visible');
// Get offset
const col = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this.parentNode.parentNode); // Column
const offset = +col.attr('offset');
self.eventHandler.trigger(CorpusMatManager.events.rectMouseOver, { idx: i, offset: offset });
})
.on('mouseout', function (d, i) {
self.divHover.style('visibility', 'hidden');
const col = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this.parentNode.parentNode); // Column
const offset = +col.attr('offset');
self.eventHandler.trigger(CorpusMatManager.events.rectMouseOut, { idx: i, offset: offset });
})
.on('mousemove', function (d, i) {
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() - (op.divHover.height + divOffset[1]);
self.divHover
.style('left', String(left) + 'px')
.style('top', String(top) + 'px')
.selectAll('p')
.text(d[prop]);
});
}
/**
* @param data Data to display
*/
_render(data) {
this._updateData();
}
}
CorpusMatManager.events = {
mouseOver: "CorpusMatManager_MouseOver",
mouseOut: "CorpusMatManager_MouseOut",
click: "CorpusMatManager_Click",
dblClick: "CorpusMatManager_DblClick",
rectMouseOver: "CorpusMatManager_RectMouseOver",
rectMouseOut: "CorpusMatManager_RectMouseOut",
rectClick: "CorpusMatManager_RectClick",
rectDblClick: "CorpusMatManager_RectDblClick",
};
CorpusMatManager.colorScale = _etc_SpacyInfo__WEBPACK_IMPORTED_MODULE_4__["spacyColors"].colorScale;
/***/ }),
/***/ "./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/myMain.ts":
/*!**************************!*\
!*** ./ts/vis/myMain.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 _CorpusInspector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./CorpusInspector */ "./ts/vis/CorpusInspector.ts");
/* harmony import */ var _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../data/TokenWrapper */ "./ts/data/TokenWrapper.ts");
/* harmony import */ var _data_AttentionCapsule__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../data/AttentionCapsule */ "./ts/data/AttentionCapsule.ts");
/* harmony import */ var _etc_SimpleEventHandler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../etc/SimpleEventHandler */ "./ts/etc/SimpleEventHandler.ts");
/* harmony import */ var _vis_CorpusMatManager__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../vis/CorpusMatManager */ "./ts/vis/CorpusMatManager.ts");
/* harmony import */ var _vis_CorpusHistogram__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../vis/CorpusHistogram */ "./ts/vis/CorpusHistogram.ts");
/* harmony import */ var _data_FaissSearchWrapper__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../data/FaissSearchWrapper */ "./ts/data/FaissSearchWrapper.ts");
/* harmony import */ var _etc_Util__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../etc/Util */ "./ts/etc/Util.ts");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
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_17__["Sel"].setHidden(".atn-curve");
_etc_Util__WEBPACK_IMPORTED_MODULE_17__["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_17__["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);
}
class MainGraphic {
constructor() {
this.api = new _api_mainApi__WEBPACK_IMPORTED_MODULE_5__["API"]();
this.uiConf = new _uiConfig__WEBPACK_IMPORTED_MODULE_6__["UIConfig"]();
this.skeletonInit();
this.mainInit();
}
/**
* Functions that can be called without any information of a response.
*
* This should be called once and only once
*/
skeletonInit() {
this.sels = {
body: d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body'),
atnContainer: d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#atn-container'),
atnDisplay: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#atn-display"),
modelSelector: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#model-option-selector"),
corpusSelector: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#corpus-select"),
atnHeads: {
left: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#left-att-heads"),
right: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#right-att-heads"),
headInfo: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#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')
},
form: {
sentenceA: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#form-sentence-a"),
button: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#update-sentence"),
},
tokens: {
left: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#left-tokens"),
right: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#right-tokens"),
},
clsToggle: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#cls-toggle").select(".switch"),
layerCheckboxes: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#layer-select"),
headCheckboxes: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#head-select"),
contextQuery: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#search-contexts"),
embeddingQuery: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#search-embeddings"),
selectedHeads: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#selected-heads"),
headSelectAll: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#select-all-heads"),
headSelectNone: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#select-no-heads"),
testCheckbox: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#simple-embed-query"),
threshSlider: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#my-range"),
corpusInspector: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#corpus-similar-sentences-div"),
corpusMatManager: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#corpus-mat-container"),
corpusMsgBox: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#corpus-msg-box"),
histograms: {
matchedWordDescription: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#match-kind"),
matchedWord: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#matched-histogram-container"),
maxAtt: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#max-att-histogram-container"),
},
buttons: {
killLeft: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#kill-left"),
addLeft: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#minus-left"),
addRight: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#plus-right"),
killRight: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#kill-right"),
refresh: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#mat-refresh")
},
metaSelector: {
matchedWord: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#matched-meta-select"),
maxAtt: d3__WEBPACK_IMPORTED_MODULE_0__["select"]("#max-att-meta-select")
}
};
this.eventHandler = new _etc_SimpleEventHandler__WEBPACK_IMPORTED_MODULE_13__["SimpleEventHandler"](this.sels.body.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),
corpusInspector: new _CorpusInspector__WEBPACK_IMPORTED_MODULE_10__["CorpusInspector"](this.sels.corpusInspector, this.eventHandler),
corpusMatManager: new _vis_CorpusMatManager__WEBPACK_IMPORTED_MODULE_14__["CorpusMatManager"](this.sels.corpusMatManager, this.eventHandler, { idxs: this.uiConf.offsetIdxs() }),
histograms: {
matchedWord: new _vis_CorpusHistogram__WEBPACK_IMPORTED_MODULE_15__["CorpusHistogram"](this.sels.histograms.matchedWord, this.eventHandler),
maxAtt: new _vis_CorpusHistogram__WEBPACK_IMPORTED_MODULE_15__["CorpusHistogram"](this.sels.histograms.maxAtt, this.eventHandler),
},
};
this._bindEventHandler();
}
mainInit() {
const self = this;
this.sels.body.style("cursor", "progress");
this.api.getModelDetails(this.uiConf.model()).then(md => {
const val = md.payload;
this.uiConf.nLayers(val.nlayers).nHeads(val.nheads);
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();
const toDisplay = this.uiConf.displayInspector();
this._searchDisabler();
if (toDisplay == 'context') {
this._queryContext();
}
else if (toDisplay == 'embeddings') {
this._queryEmbeddings();
}
};
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_12__["makeFromMetaResponse"])(attention, this.uiConf.hideClsSep());
this.tokCapsule = new _data_TokenWrapper__WEBPACK_IMPORTED_MODULE_11__["TokenWrapper"](attention);
this._staticInits();
}
leaveCorpusMsg(msg) {
this.vizs.corpusInspector.hideView();
this.vizs.corpusMatManager.hideView();
console.log("Running leave msg");
_etc_Util__WEBPACK_IMPORTED_MODULE_17__["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_11__["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._searchDisabler();
this._renderHeadSummary();
this.renderSvg();
});
this.eventHandler.bind(_vis_CorpusMatManager__WEBPACK_IMPORTED_MODULE_14__["CorpusMatManager"].events.mouseOver, (e) => {
// Uncomment the below if you want to modify the whole column
// const selector = `.inspector-cell[index-offset='${e.offset}']`
// d3.selectAll(selector).classed("hovered-col", true)
});
this.eventHandler.bind(_vis_CorpusMatManager__WEBPACK_IMPORTED_MODULE_14__["CorpusMatManager"].events.mouseOut, (e) => {
// Uncomment the below if you want to modify the whole column
// const selector = `.inspector-cell[index-offset='${e.offset}']`
// d3.selectAll(selector).classed("hovered-col", false)
});
this.eventHandler.bind(_vis_CorpusMatManager__WEBPACK_IMPORTED_MODULE_14__["CorpusMatManager"].events.rectMouseOver, (e) => {
const row = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`.inspector-row[rownum='${e.idx}']`);
const word = row.select(`.inspector-cell[index-offset='${e.offset}']`);
word.classed("hovered-col", true);
});
this.eventHandler.bind(_vis_CorpusMatManager__WEBPACK_IMPORTED_MODULE_14__["CorpusMatManager"].events.rectMouseOut, (e) => {
const row = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`.inspector-row[rownum='${e.idx}']`);
const word = row.select(`.inspector-cell[index-offset='${e.offset}']`);
word.classed("hovered-col", false);
});
}
_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());
}
this._searchDisabler();
}
/** 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);
}
_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: "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: "roberta-base", kind: tp.ModelKind.Bidirectional },
{ name: "gpt2", 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();
});
}
_initCorpusSelection() {
const data = [
{ code: "woz", display: "Wizard of Oz" },
{ code: "wiki", display: "Wikipedia" },
];
const self = this;
self.sels.corpusSelector.selectAll('option')
.data(data)
.join('option')
.property('value', d => d.code)
.text(d => d.display);
this.sels.corpusSelector.on('change', function () {
const me = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
self.uiConf.corpus(me.property('value'));
console.log(self.uiConf.corpus());
});
}
_staticInits() {
this._initSentenceForm();
this._initModelSelection();
this._initCorpusSelection();
this._initQueryForm();
this._initAdder();
this._renderHeadSummary();
this._initMetaSelectors();
this._initToggle();
this.renderAttHead();
this.renderTokens();
}
_initAdder() {
const updateUrlOffsetIdxs = () => {
this.uiConf.offsetIdxs(this.vizs.corpusMatManager.idxs);
};
const fixCorpusMatHeights = () => {
const newWrapped = this._wrapResults(this.vizs.corpusMatManager.data());
this.vizs.corpusMatManager.data(newWrapped.data);
updateUrlOffsetIdxs();
};
this.sels.buttons.addRight.on('click', () => {
this.vizs.corpusMatManager.addRight();
updateUrlOffsetIdxs();
});
this.sels.buttons.addLeft.on('click', () => {
this.vizs.corpusMatManager.addLeft();
updateUrlOffsetIdxs();
});
this.sels.buttons.killRight.on('click', () => {
this.vizs.corpusMatManager.killRight();
updateUrlOffsetIdxs();
});
this.sels.buttons.killLeft.on('click', () => {
this.vizs.corpusMatManager.killLeft();
updateUrlOffsetIdxs();
});
this.sels.buttons.refresh.on('click', () => {
fixCorpusMatHeights();
});
const onresize = () => {
if (this.sels.corpusInspector.text() != '')
fixCorpusMatHeights();
};
window.onresize = onresize;
}
_initMetaSelectors() {
this._initMatchedWordSelector(this.sels.metaSelector.matchedWord);
this._initMaxAttSelector(this.sels.metaSelector.maxAtt);
}
_initMaxAttSelector(sel) {
const self = this;
const chooseSelected = (value) => {
const ms = sel.selectAll('label');
ms.classed('active', false);
const el = sel.selectAll(`label[value=${value}]`);
el.classed('active', true);
};
chooseSelected(this.uiConf.metaMax());
const el = sel.selectAll('label');
el.on('click', function () {
const val = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this).attr('value');
// Do toggle
sel.selectAll('.active').classed('active', false);
d3__WEBPACK_IMPORTED_MODULE_0__["select"](this).classed('active', true);
self.uiConf.metaMax(val);
self.vizs.histograms.maxAtt.meta(val);
});
}
_initMatchedWordSelector(sel) {
const self = this;
const chooseSelected = (value) => {
const ms = sel.selectAll('label');
ms.classed('active', false);
const el = sel.selectAll(`label[value=${value}]`);
el.classed('active', true);
};
chooseSelected(this.uiConf.metaMatch());
const el = sel.selectAll('label');
el.on('click', function () {
const val = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this).attr('value');
// Do toggle
sel.selectAll('.active').classed('active', false);
d3__WEBPACK_IMPORTED_MODULE_0__["select"](this).classed('active', true);
self.uiConf.metaMatch(val);
self._updateCorpusInspectorFromMeta(val);
});
}
_disableSearching(attr) {
setSelDisabled(attr, this.sels.contextQuery);
setSelDisabled(attr, this.sels.embeddingQuery);
}
_updateCorpusInspectorFromMeta(val) {
this.vizs.corpusInspector.showNext(this.uiConf.showNext);
this.vizs.corpusMatManager.pick(val);
this.vizs.histograms.matchedWord.meta(val);
}
_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 clearInspector = () => {
self.vizs.corpusMatManager.clear();
self.vizs.corpusInspector.clear();
self.vizs.histograms.matchedWord.clear();
self.vizs.histograms.maxAtt.clear();
};
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();
clearInspector();
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);
}
_getSearchEmbeds() {
const savedToken = this.uiConf.token();
const out = this.vizs.tokens[savedToken.side].getEmbedding(savedToken.ind);
return out.embeddings;
}
_getSearchContext() {
const savedToken = this.uiConf.token();
const out = this.vizs.tokens[savedToken.side].getEmbedding(savedToken.ind);
return out.contexts;
}
_searchEmbeddings() {
const self = this;
console.log("SEARCHING EMBEDDINGS");
const embed = this._getSearchEmbeds();
const layer = self.uiConf.layer();
const heads = self.uiConf.heads();
const k = 50;
self.vizs.corpusInspector.showNext(self.uiConf.showNext);
this.sels.body.style("cursor", "progress");
self.api.getNearestEmbeddings(self.uiConf.model(), self.uiConf.corpus(), embed, layer, heads, k)
.then((val) => {
if (val.status == 406) {
self.leaveCorpusMsg(`Embeddings are not available for model '${self.uiConf.model()}' and corpus '${self.uiConf.corpus()}' at this time.`);
}
else {
const v = val.payload;
self.vizs.corpusInspector.unhideView();
self.vizs.corpusMatManager.unhideView();
// Get heights of corpus inspector rows.
self.vizs.corpusInspector.update(v);
const wrappedVals = self._wrapResults(v);
const countedVals = wrappedVals.getMatchedHistogram();
const offsetVals = wrappedVals.getMaxAttHistogram();
self.vizs.corpusMatManager.update(wrappedVals.data);
self.sels.histograms.matchedWordDescription.text(this.uiConf.matchHistogramDescription);
console.log("MATCHER: ", self.sels.histograms.matchedWord);
self.vizs.histograms.matchedWord.update(countedVals);
self.vizs.histograms.maxAtt.update(offsetVals);
self.uiConf.displayInspector('embeddings');
this._updateCorpusInspectorFromMeta(this.uiConf.metaMatch());
}
this.sels.body.style("cursor", "default");
});
}
_searchContext() {
const self = this;
console.log("SEARCHING CONTEXTS");
const context = this._getSearchContext();
const layer = self.uiConf.layer();
const heads = self.uiConf.heads();
const k = 50;
self.vizs.corpusInspector.showNext(self.uiConf.showNext);
this.sels.body.style("cursor", "progress");
self.api.getNearestContexts(self.uiConf.model(), self.uiConf.corpus(), context, layer, heads, k)
.then((val) => {
// Get heights of corpus inspector rows.
if (val.status == 406) {
console.log("Contexts are not available!");
self.leaveCorpusMsg(`Contexts are not available for model '${self.uiConf.model()}' and corpus '${self.uiConf.corpus()}' at this time.`);
}
else {
const v = val.payload;
console.log("HIDING");
self.vizs.corpusInspector.update(v);
_etc_Util__WEBPACK_IMPORTED_MODULE_17__["Sel"].hideElement(self.sels.corpusMsgBox);
self.vizs.corpusInspector.unhideView();
self.vizs.corpusMatManager.unhideView();
const wrappedVals = self._wrapResults(v);
const countedVals = wrappedVals.getMatchedHistogram();
const offsetVals = wrappedVals.getMaxAttHistogram();
self.vizs.corpusMatManager.update(wrappedVals.data);
self.vizs.histograms.matchedWord.update(countedVals);
self.vizs.histograms.maxAtt.update(offsetVals);
self.uiConf.displayInspector('context');
this._updateCorpusInspectorFromMeta(this.uiConf.metaMatch());
self.vizs.histograms.maxAtt.meta(self.uiConf.metaMax());
}
this.sels.body.style("cursor", "default");
});
}
_queryContext() {
const self = this;
if (this.uiConf.hasToken()) {
this._searchContext();
}
else {
console.log("Was told to show inspector but was not given a selected token embedding");
}
}
_queryEmbeddings() {
const self = this;
if (this.uiConf.hasToken()) {
console.log("token: ", this.uiConf.token());
this._searchEmbeddings();
}
else {
console.log("Was told to show inspector but was not given a selected token embedding");
}
}
_searchingDisabled() {
return (this.uiConf.heads().length == 0) || (!this.uiConf.hasToken());
}
_searchDisabler() {
this._disableSearching(this._searchingDisabled());
}
_initQueryForm() {
const self = this;
this._searchDisabler();
this.sels.contextQuery.on("click", () => {
self._queryContext();
});
this.sels.embeddingQuery.on("click", () => {
self._queryEmbeddings();
});
}
_renderHeadSummary() {
this.sels.selectedHeads
.html(ramda__WEBPACK_IMPORTED_MODULE_2__["join"](', ', this.uiConf.heads().map(h => h + 1)));
}
// Modify faiss results with corresponding heights
_wrapResults(returnedFaissResults) {
const rows = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('.inspector-row');
// Don't just use offsetHeight since that rounds to the nearest integer
const heights = rows.nodes().map((n) => n.getBoundingClientRect().height);
const newVals = returnedFaissResults.map((v, i) => {
return ramda__WEBPACK_IMPORTED_MODULE_2__["assoc"]('height', heights[i], v);
});
const wrappedVals = new _data_FaissSearchWrapper__WEBPACK_IMPORTED_MODULE_16__["FaissSearchResultWrapper"](newVals, this.uiConf.showNext);
return wrappedVals;
}
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_18__["fromEvent"])(checkboxes.nodes(), 'change').pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_19__["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_19__["map"])((v) => +d3__WEBPACK_IMPORTED_MODULE_0__["select"](v.target).datum()), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_19__["tap"])(v => {
console.log("New layer: ", v);
self.uiConf.layer(v);
self.sels.body.style("cursor", "progress");
}), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_19__["switchMap"])((v) => Object(rxjs__WEBPACK_IMPORTED_MODULE_18__["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._searchDisabler();
self.renderSvg();
self.renderAttHead();
});
this.sels.headSelectNone.on("click", function () {
self.uiConf.selectNoHeads();
self._searchDisabler();
self.renderSvg();
self.renderAttHead();
_etc_Util__WEBPACK_IMPORTED_MODULE_17__["Sel"].setHidden(".atn-curve");
});
}
_initToggle() {
Object(rxjs__WEBPACK_IMPORTED_MODULE_18__["fromEvent"])(this.sels.clsToggle.node(), 'input').pipe(
// @ts-ignore -- TODO: FIX !
Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_19__["map"])(e => e.srcElement.checked)).subscribe({
next: v => {
this.uiConf.hideClsSep(v);
this.attCapsule.zeroed(v);
this.renderSvg();
this.renderAttHead();
}
});
}
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vY3NzL21haW4uc2NzcyIsIndlYnBhY2s6Ly8vLi9leEJFUlQuaHRtbCIsIndlYnBhY2s6Ly8vLi9pbmRleC5odG1sIiwid2VicGFjazovLy8uL3RzL2FwaS9kZW1vQVBJLnRzIiwid2VicGFjazovLy8uL3RzL2FwaS9tYWluQXBpLnRzIiwid2VicGFjazovLy8uL3RzL2RhdGEvQXR0ZW50aW9uQ2Fwc3VsZS50cyIsIndlYnBhY2s6Ly8vLi90cy9kYXRhL0ZhaXNzU2VhcmNoV3JhcHBlci50cyIsIndlYnBhY2s6Ly8vLi90cy9kYXRhL1Rva2VuV3JhcHBlci50cyIsIndlYnBhY2s6Ly8vLi90cy9ldGMvU1ZHcGx1cy50cyIsIndlYnBhY2s6Ly8vLi90cy9ldGMvU2ltcGxlRXZlbnRIYW5kbGVyLnRzIiwid2VicGFjazovLy8uL3RzL2V0Yy9TcGFjeUluZm8udHMiLCJ3ZWJwYWNrOi8vLy4vdHMvZXRjL1VSTEhhbmRsZXIudHMiLCJ3ZWJwYWNrOi8vLy4vdHMvZXRjL1V0aWwudHMiLCJ3ZWJwYWNrOi8vLy4vdHMvZXRjL19Ub29scy50cyIsIndlYnBhY2s6Ly8vLi90cy9ldGMvYXBpSGVscGVycy50cyIsIndlYnBhY2s6Ly8vLi90cy9ldGMvYXJyYXlVdGlscy50cyIsIndlYnBhY2s6Ly8vLi90cy9ldGMvY29sb3JzLnRzIiw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AgbW9kZWw6IG1vZGVsXG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB1cmwgPSBtYWtlVXJsKHRoaXMuYmFzZVVSTCArIFwiL2dldC1tb2RlbC1kZXRhaWxzXCIsIHRvU2VuZClcbiAgICAgICAgY29uc29sZS5sb2coXCItLS0gR0VUIFwiICsgdXJsKTtcblxuICAgICAgICBpZiAoaGFzaE9iaiAhPSBudWxsKSB7XG4gICAgICAgICAgICBjb25zdCBrZXkgPSBoYXNoLnNoYTEodG9TZW5kKVxuICAgICAgICAgICAgZDMuanNvbih1cmwpLnRoZW4ociA9PiB7XG4gICAgICAgICAgICAgICAgaGFzaE9ialtrZXldID0gcjtcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gY2hlY2tEZW1vQVBJKHRvU2VuZCwgdXJsKVxuICAgIH1cblxuICAgIGdldE1ldGFBdHRlbnRpb25zKG1vZGVsOiBzdHJpbmcsIHNlbnRlbmNlOiBzdHJpbmcsIGxheWVyOiBudW1iZXIsIGhhc2hPYmo6IHt9IHwgbnVsbCA9IG51bGwpOiBQcm9taXNlPHJzcC5BdHRlbnRpb25EZXRhaWxzUmVzcG9uc2U+IHtcbiAgICAgICAgY29uc3QgdG9TZW5kID0ge1xuICAgICAgICAgICAgbW9kZWw6IG1vZGVsLFxuICAgICAgICAgICAgc2VudGVuY2U6IHNlbnRlbmNlLFxuICAgICAgICAgICAgbGF5ZXI6IGxheWVyXG4gICAgICAgIH07XG5cbiAgICAgICAgY29uc3QgdXJsID0gbWFrZVVybCh0aGlzLmJhc2VVUkwgKyBcIi9hdHRlbmQrbWV0YVwiLCB0b1NlbmQpXG4gICAgICAgIGNvbnNvbGUubG9nKFwiLS0tIEdFVCBcIiArIHVybCk7XG5cbiAgICAgICAgLy8gQWRkIGhhc2ggYW5kIHZhbHVlIHRvIGhhc2hPYmpcbiAgICAgICAgaWYgKGhhc2hPYmogIT0gbnVsbCkge1xuICAgICAgICAgICAgY29uc3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ICAgICAqIEBwYXJhbSBsYXllciBJbiB0aGUgbCd0aCBsYXllclxuICAgICAqIEBwYXJhbSBrIGhvdyBtYW55IHJlc3VsdHMgdG8gcmV0cmlldmVcbiAgICAgKi9cbiAgICBnZXROZWFyZXN0RW1iZWRkaW5ncyhtb2RlbDogc3RyaW5nLCBjb3JwdXM6IHN0cmluZywgZW1iZWRkaW5nOiBudW1iZXJbXSwgbGF5ZXI6IG51bWJlciwgaGVhZHM6IG51bWJlcltdLCBrID0gMTAsIGhhc2hPYmo6IHt9IHwgbnVsbCA9IG51bGwpOiBQcm9taXNlPHJzcC5OZWFyZXN0TmVpZ2hib3JSZXNwb25zZT4ge1xuICAgICAgICBjb25zdCB0b1NlbmQgPSB7XG4gICAgICAgICAgICBtb2RlbDogbW9kZWwsXG4gICAgICAgICAgICBjb3JwdXM6IGNvcnB1cyxcbiAgICAgICAgICAgIGVtYmVkZGluZzogZW1iZWRkaW5nLFxuICAgICAgICAgICAgbGF5ZXI6IGxheWVyLFxuICAgICAgICAgICAgaGVhZHM6IGhlYWRzLFxuICAgICAgICAgICAgazogayxcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHVybCA9IG1ha2VVcmwodGhpcy5iYXNlVVJMICsgJy9rLW5lYXJlc3QtZW1iZWRkaW5ncycsIHRvU2VuZCk7XG4gICAgICAgIGNvbnNvbGUubG9nKFwiLS0tIEdFVCBcIiArIHVybCk7XG5cbiAgICAgICAgaWYgKGhhc2hPYmogIT0gbnVsbCkge1xuICAgICAgICAgICAgY29uc3Qga2V5ID0gaGFzaC5zaGExKHRvU2VuZClcbiAgICAgICAgICAgIGQzLmpzb24odXJsKS50aGVuKHIgPT4ge1xuICAgICAgICAgICAgICAgIGhhc2hPYmpba2V5XSA9IHI7XG4gICAgICAgICAgICB9KVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGNoZWNrRGVtb0FQSSh0b1NlbmQsIHVybClcbiAgICB9XG5cbiAgICBnZXROZWFyZXN0Q29udGV4dHMobW9kZWw6IHN0cmluZywgY29ycHVzOiBzdHJpbmcsIGNvbnRleHQ6IG51bWJlcltdLCBsYXllcjogbnVtYmVyLCBoZWFkczogbnVtYmVyW10sIGsgPSAxMCwgaGFzaE9iajoge30gfCBudWxsID0gbnVsbCk6IFByb21pc2U8cnNwLk5lYXJlc3ROZWlnaGJvclJlc3BvbnNlPiB7XG4gICAgICAgIGNvbnN0IHRvU2VuZCA9IHtcbiAgICAgICAgICAgIG1vZGVsOiBtb2RlbCxcbiAgICAgICAgICAgIGNvcnB1czogY29ycHVzLFxuICAgICAgICAgICAgY29udGV4dDogY29udGV4dCxcbiAgICAgICAgICAgIGxheWVyOiBsYXllcixcbiAgICAgICAgICAgIGhlYWRzOiBoZWFkcyxcbiAgICAgICAgICAgIGs6IGssXG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB1cmwgPSBtYWtlVXJsKHRoaXMuYmFzZVVSTCArICcvay1uZWFyZXN0LWNvbnRleHRzJywgdG9TZW5kKTtcbiAgICAgICAgY29uc29sZS5sb2coXCItLS0gR0VUIFwiICsgdXJsKTtcblxuICAgICAgICBpZiAoaGFzaE9iaiAhPSBudWxsKSB7XG4gICAgICAgICAgICBjb25zdCBrZXkgPSBoYXNoLnNoYTEodG9TZW5kKVxuICAgICAgICAgICAgZDMuanNvbih1cmwpLnRoZW4ociA9PiB7XG4gICAgICAgICAgICAgICAgaGFzaE9ialtrZXldID0gcjtcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gY2hlY2tEZW1vQVBJKHRvU2VuZCwgdXJsKVxuICAgIH1cbn07XG4iLCJpbXBvcnQgKiBhcyBfIGZyb20gJ2xvZGFzaCdcbmltcG9ydCAqIGFzIHhfIGZyb20gJy4uL2V0Yy9fVG9vbHMnXG5pbXBvcnQgKiBhcyB0cCBmcm9tICcuLi9ldGMvdHlwZXMnXG5pbXBvcnQgKiBhcyB0ZiBmcm9tICdAdGVuc29yZmxvdy90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9ucy5kZXApLFxuICAgICAgICAgICAgaXNfZW50OiBpbml0WmVybyhTcGFjeUluZm8uVG90YWxNZXRhT3B0aW9ucy5pc19lbnQpLFxuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5kYXRhLmZvckVhY2goZCA9PiB7XG4gICAgICAgIC8vIENvbmZ1c2luZzogU2hvdyBNQVRDSEVEIFdPUkQgYXR0ZW50aW9ucywgYnV0IE5FWFQgV09SRCBkaXN0cmlidXRpb25cbiAgICAgICAgICAgIGNvbnN0IG1hdGNoID0gZC50b2tlbnNbZFt0aGlzLm1hdGNoSWR4XSArIGluZGV4T2Zmc2V0XVxuXG4gICAgICAgICAgICBPYmplY3Qua2V5cyhjb3VudE9iaikuZm9yRWFjaChrID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCB2YWwgPSBtYWtlU3RyaW5nTG93ZXIoU3RyaW5nKG1hdGNoW2tdKSlcbiAgICAgICAgICAgICAgICBjb3VudE9ialtrXVt2YWxdICs9IDE7XG4gICAgICAgICAgICB9KVxuICAgICAgICB9KVxuXG4gICAgICAgIHJldHVybiBjb3VudE9ialxuICAgIH1cblxuICAgIGdldE1hdGNoZWRIaXN0b2dyYW0oaW5kZXhPZmZzZXQ9MCkge1xuICAgICAgICBjb25zdCB0b3RhbEhpc3QgPSB0aGlzLmNvdW50TWF0Y2hlZEtleXMoaW5kZXhPZmZzZXQpXG4gICAgICAgIGNvbnN0IGZpbHRlclplcm9zID0gKHZhbCwga2V5KSA9PiB2YWwgIT0gMDtcbiAgICAgICAgY29uc3Qgbm9uWmVybyA9IFIubWFwKFIucGlja0J5KGZpbHRlclplcm9zKSwgdG90YWxIaXN0KVxuXG4gICAgICAgIHJldHVybiBub25aZXJvXG4gICAgfVxuXG4gICAgZ2V0TWF4QXR0SGlzdG9ncmFtKCkge1xuICAgICAgICAvLyBjb25zdCB0b3RhbEhpc3QgPSB0aGlzLmNvdW50UG9zSW5mbygpXG4gICAgICAgIGNvbnN0IG5ld0hpc3QgPS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cblxuZXhwb3J0IGNsYXNzIFRva2VuRGlzcGxheSAge1xuICAgIHRva2VuRGF0YTp0cC5GdWxsU2luZ2xlVG9rZW5JbmZvW11cbiAgICBtYXNrSW5kczpudW1iZXJbXVxuXG4gICAgY29uc3RydWN0b3IodG9rZW5zPWVtcHR5RnVsbFJlc3BvbnNlLCBtYXNrSW5kcz1bXSl7XG4gICAgICAgIHRoaXMudG9rZW5EYXRhID0gdG9rZW5zO1xuICAgICAgICB0aGlzLm1hc2tJbmRzID0gbWFza0luZHM7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUHVzaCBpZHggdG8gdGhlIG1hc2sgaWR4IGxpc3QgaW4gb3JkZXIgZnJvbSBzbWFsbGVzdCB0byBsYXJnZXN0XG4gICAgICovXG4gICAgbWFzayh2YWwpIHtcbiAgICAgICAgY29uc3QgY3VyckluZCA9IF8uaW5kZXhPZih0aGlzLm1hc2tJbmRzLCB2YWwpXG4gICAgICAgIGlmIChjdXJySW5kID09IC0xKSB7XG4gICAgICAgICAgICB4Xy5vcmRlcmVkSW5zZXJ0Xyh0aGlzLm1hc2tJbmRzLCB2YWwpXG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjb25zb2xlLmxvZyhgJHt2YWx9IGFscmVhZHkgaW4gbWFza0luZHMhYCk7XG4gICAgICAgICAgICBjb25zb2xlLmxvZyh0aGlzLm1hc2tJbmRzKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHRvZ2dsZSh2YWwpIHtcbiAgICAgICAgY29uc3QgY3VyckluZCA9IF8uaW5kZXhPZih0aGlzLm1hc2tJbmRzLCB2YWwpXG4gICAgICAgIGlmIChjdXJySW5kID09IC0xKSB7XG4gICAgICAgICAgICBjb25zb2xlLmxvZyhgTWFza2luZyAke3ZhbH1gKTtcbiAgICAgICAgICAgIHRoaXMubWFzayh2YWwpXG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjb25zb2xlLm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GVycygpOiBvYmplY3Qge1xuICAgICAgICAvLyBBZGFwdGVkIGZyb206ICBodHRwOi8vc3RhY2tvdmVyZmxvdy5jb20vcXVlc3Rpb25zLzIwOTA1NTEvcGFyc2UtcXVlcnktc3RyaW5nLWluLWphdmFzY3JpcHRcbiAgICAgICAgY29uc3QgcXVlcnkgPSB3aW5kb3cubG9jYXRpb24uc2VhcmNoLnN1YnN0cmluZygxKTtcbiAgICAgICAgY29uc3QgdmFycyA9IHF1ZXJ5LnNwbGl0KCcmJyk7XG4gICAgICAgIGNvbnNvbGUubG9nKHZhcnMsIFwiLS0tIHZhcnNcIik7XG5cbiAgICAgICAgY29uc3QgdXJsUGFyYW1ldGVycyA9IHt9O1xuXG4gICAgICAgIGNvbnN0IGlzSW50ID0geCA9PiAoL15bMC05XSskLykudGVzdCh4KTtcbiAgICAgICAgY29uc3QgaXNGbG9hdCA9IHggPT4gKC9eWzAtOV0rXFwuWzAtOV0qJC8pLnRlc3QoeCk7XG5cbiAgICAgICAgY29uc3QgdHlwZUNhc3QgPSB2YWwgPT4ge1xuICAgICAgICAgICAgaWYgKGlzSW50KHZhbCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gTnVtYmVyLnBhcnNlSW50KHZhbCwgMTApO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpc0Zsb2F0KHZhbCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gTnVtYmVyLnBhcnNlRmxvYXQodmFsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIGVsc2U6XG4gICAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICB9XG5cblxuICAgICAgICB2YXJzLmZvckVhY2godiA9PiB7XG4gICAgICAgICAgICBpZiAodi5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc3BsaXRzID0gdi5zcGxpdCgnPScpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGtleSA9IGRlY29kZVVSSUNvbXBvbmVudChzcGxpdHNbMF0pO1xuICAgICAgICAgICAgICAgIGxldCByYXdfdmFsdWUgPSBkZWNvZGVVUklDb21wb25lbnQoc3BsaXRzWzFdKTtcblxuICAgICAgICAgICAgICAgIGNvbnN0IGlzQXJyYXkgPSByYXdfdmFsdWUuc3RhcnRzV2l0aCgnLi4nKTtcbiAgICAgICAgICAgICAgICBpZiAoaXNBcnJheSkge1xuICAgICAgICAgICAgICAgICAgICByYXdfdmFsdWUgPSByYXdfdmFsdWUuc2xpY2UoMik7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHJhd192YWx1ZS5sZW5ndGggPCAxKSB7XG4gICAgICAgICAgICAgICAgICAgIHVybFBhcmFtZXRlcnNba2V5XSA9IGlzQXJyYXkgPyBbXSA6ICcnO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNBcnJheSkge1xuICAgICAgICAgICAgICAgICAgICB1cmxQYXJhbWV0ZXJzW2tleV0gPSByYXdfdmFsdWUuc3BsaXQoJywnKVxuICAgICAgICAgICAgICAgICAgICAgICAgLm1hcCh2YWwgPT4gdHlwZUNhc3QodmFsKSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdXJsUGFyYW1ldGVyc1trZXldID0gdHlwZUNhc3QocmF3X3ZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiB1cmxQYXJhbWV0ZXJzO1xuXG4gICAgfVxuXG5cbiAgICAvKipcbiAgICAgKiBHZW5lcmF0ZXMgYW4gVVJMIHN0cmluZyBmcm9tIGEgbWFwIG9mIHVybCBwYXJhbWV0ZXJzXG4gICAgICogQHBhcmFtIHt7fX0gdXJsUGFyYW1ldGVycyAtIHRoZSBtYXAgb2YgcGFyYW1ldGVyc1xuICAgICAqIEByZXR1cm5zIHtzdHJpbmd9IC0gYW4gVVJJIHN0cmluZ1xuICAgICAqL1xuICAgIHN0YXRpYyB1cmxTdHJpbmcodXJsUGFyYW1ldGVyczogb2JqZWN0KSB7XG4gICAgICAgIGNvbnN0IGF0dHIgPSBbXTtcbiAgICAgICAgT2JqZWN0LmtleXModXJsUGFyYW1ldGVycykuZm9yRWFjaChrID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHYgPSB1cmxQYXJhbWV0ZXJzW2tdO1xuICAgICAgICAgICAgaWYgKHYgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9IHY7XG4gICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodikpIHZhbHVlID0gJy4uJyArIHYuam9pbignLCcpO1xuICAgICAgICAgICAgICAgIGF0dHIucHVzaChlbmNvZGVVUkkoayArICc9JyArIHZhbHVlKSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cblxuICAgICAgICBjb25zdCB1cmwgPSB3aW5kb3cubG9jYXRpb24ucGF0aG5hbWU7XG4gICAgICAgIGxldCByZXMgPSB1cmwuc3Vic3RyaW5nKHVybC5sYXN0SW5kZXhPZignLycpICsgMSk7XG4gICAgICAgIGlmIChhdHRyLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHJlcyArPSAnPycgKyBhdHRyLmpvaW4oJyYnKVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlcztcbiAgICB9XG5cbiAgICBzdGF0aWMgdXBkYXRlVVJMUGFyYW0oa2V5OiBzdHJpbmcsIHZhbHVlOiBzdHJpbmcgfCBhbnlbXSwgYWRkVG9Ccm93c2VySGlzdG9yeSA9IHRydWUpIHtcbiAgICAgICAgY29uc3QgY3VycmVudFBhcmFtcyA9IFVSTEhhbmRsZXIucGFyYW1ldGVycztcbiAgICAgICAgY3VycmVudFBhcmFtc1trZXldID0gdmFsdWU7XG4gICAgICAgIFVSTEhhbmRsZXIudXBkYXRlVXJsKGN1cnJlbnRQYXJhbXMsIGFkZFRv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uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb3BhY2l0eSc6IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdwb2ludGVyLWV2ZW50cyc6ICdub25lJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rpc3BsYXknOiAnbm9uZSd9KVxuICAgIHN0YXRpYyB1bmhpZGVFbGVtZW50ID0gKGhFOiBEM1NlbCkgPT4gaEUudHJhbnNpdGlvbigpLnN0eWxlcyh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvcGFjaXR5JzogMSwgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdwb2ludGVyLWV2ZW50cyc6IG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkaXNwbGF5JzogbnVsbH0pXG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9vc2VPYmplY3Qge1xuICAgIFtrZXk6IHN0cmluZ106IGFueVxufVxuXG5leHBvcnQgdHlwZSBkM1M8VCBleHRlbmRzIEJhc2VUeXBlLCBVID0gYW55PiA9IGQzLlNlbGVjdGlvbjxULCBVLCBhbnksIGFueT4iLCJpbXBvcnQgKiBhcyBfIGZyb20gJ2xvZGFzaCdcblxuZnVuY3Rpb24gYXNjT3JkZXIobjEsIG4yKSB7XG4gICAgaWYgKG4xIDwgbjIpIHtcbiAgICAgICAgcmV0dXJuIC0xO1xuICAgIH1cbiAgICBlbHNlIGlmIChuMSA+IG4yKSB7IFxuICAgICAgICByZXR1cm4gMTtcbiAgICB9XG4gICAgcmV0dXJuIDA7XG59XG5cbmV4cG9ydCB7ZmluZEFsbEluZGV4ZXMsIGluc2VydEF0Xywgb3JkZXJlZEluc2VydF8sIHNldDJTb3J0ZWRBcnJheX1cblxuLyoqXG4gKiBGaW5kIGFsbCBpb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AgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gR2V0IHNlYXJjaCByZXN1bHRzIGJ5IGNvbnRleHRcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29udGV4dCA9IHIyWydhYSddWydsZWZ0J11bbWFza0luZF0uY29udGV4dHNcbiAgICAgICAgICAgICAgICAgICAgYXBpLmdldE5lYXJlc3RDb250ZXh0cyhtb2RlbE5hbWUsIGNvcnB1c05hbWUsIGNvbnRleHQsIEwsIF8ucmFuZ2UoMTIpLCA1MCwgY29udGVudEhhc2gpLnRoZW4oeCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhPYmplY3Qua2V5cyhjb250ZW50SGFzaCkubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGNvbnRlbnRIYXNoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgfSlcbiAgICB9KVxufVxuXG4vKipcbiAqIFxuICogT2JzZXJ2ZSBob3cgdGhlIGRlbW8gY3JlYXRpb24gcHJvY2VzcyB3b3Jrcy5cbiAqIFxuICogSWYgZGVzaXJlZCB0byBtYXNrIG11bHRpcGxlIHdvcmRzIGluIHRoZSBpbnB1dCBmb3IgZGVtbyBwdXJwb3NlcywgdHJ5IGxvb3Bpbmcgb3ZlciB0aGUgbWFzayBpbmRzIGFuZCBtYXNraW5nIGVhY2ggb25lIGluZGl2aWR1YWxseVxuICogXG4gKiBAcGFyYW0gc2VudGVuY2UgVGhlIGRlbW8gc2VudGVuY2VcbiAqIEBwYXJhbSBtYXNrSW5kIERlc2lyZWQgaW5kZXggdG8gbWFzayAoY2FuIGN1cnJlbnRseSBvbmx5IGFjY2VwdCBhIHNpbmdsZSBtYXNrIGluZGV4KVxuICogQHBhcmFtIG91dERpY3RQYXRoIFxuICovXG5mdW5jdGlvbiBpbnNwZ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sLFxuICAgICAgICAgICAgb2Zmc2V0SWR4czogdGhpcy5faW5pdE9mZnNldElkeHMocGFyYW1zWydvZmZzZXRJZHhzJ10pLFxuICAgICAgICAgICAgaGlkZUNsc1NlcDogdHJ1dGh5KHBhcmFtc1snaGlkZUNsc1NlcCddKSB8fCB0cnVlLFxuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5fdG9rZW4gPSB7IHNpZGU6IHRoaXMuX2NvbmYudG9rZW5TaWRlLCBpbmQ6IHRoaXMuX2NvbmYudG9rZW5JbmQgfVxuXG4gICAgfVxuXG4gICAgdG9VUkwodXBkYXRlSGlzdG9yeSA9IGZhbHNlKSB7XG4gICAgICAgIFVSTEhhbmRsZXIudXBkYXRlVXJsKHRoaXMuX2NvbmYsIHVwZGF0ZUhpc3RvcnkpXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBfaW5pdE9mZnNldElkeHModjogKHN0cmluZyB8IG51bWJlcilbXSB8IG51bGwpIHtcbiAgICAgICAgaWYgKHYgPT0gbnVsbCkge1xuICAgICAgICAgICAgcmV0dXJuIFstMSwgMCwgMV1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGNvbnN0IG51bWJlckFyciA9IFIubWFwKHRvTnVtYmVyLCB2KTtcbiAgICAgICAgICAgIHJldHVybiBudW1iZXJBcnI7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIF9pbml0SGVhZHModjogbnVtYmVyW10gfCBudWxsKSB7XG4gICAgICAgIGlmICh2ID09IG51bGwgfHwgdi5sZW5ndGggPCAxKSB7XG4gICAgICAgICAgICB0aGlzLnNlbGVjdEFsbEhlYWRzKClcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKHRoaXMuaGVhZFNldChuZXcgU2V0KHYpKS5fY29uZi5oZWFkcyk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5oZWFkcygpXG4g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PSBudWxsKVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Rva2VuXG5cbiAgICAgICAgdGhpcy5fdG9rZW4gPSB2YWw7XG4gICAgICAgIHRoaXMuX2NvbmYudG9rZW5JbmQgPSB2YWwuaW5kO1xuICAgICAgICB0aGlzLl9jb25mLnRva2VuU2lkZSA9IHZhbC5zaWRlO1xuICAgICAgICB0aGlzLnRvVVJMKCk7XG5cbiAgICAgICAgcmV0dXJuIHRoaXNcbiAgICB9XG5cbiAgICBoYXNUb2tlbigpIHtcbiAgICAgICAgY29uc3QgY29uZiA9IHRoaXMuX2NvbmZcbiAgICAgICAgY29uc3QgYWN0dWFsbHlOdWxsID0gKChjb25mLnRva2VuSW5kID09IG51bGwpICYmIChjb25mLnRva2VuU2lkZSA9PSBudWxsKSlcbiAgICAgICAgY29uc3Qgc3RyTnVsbCA9IChjb25mLnRva2VuSW5kID09IFwibnVsbFwiKVxuICAgICAgICByZXR1cm4gKCFhY3R1YWxseU51bGwpICYmICghc3RyTnVsbClcbiAgICB9XG5cbiAgICBybVRva2VuKCkge1xuICAgICAgICB0aGlzLnRva2VuKHsgaW5kOiBudWxsLCBzaWRlOiBudWxsIH0pO1xuICAgICAgICByZXR1cm4gdGhpc1xuICAgIH1cblxuICAgIHNlbnRlbmNlKCk6IHN0cmluZztcbiAgICBzZW50ZW5jZSh2YWw6IHN0cmluZyk6IHRoaXM7XG4gICAgc2VudGVuY2UodmFsPykge1xuICAgICAgICBpZiAodmFsID09IG51bGwpXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fY29uZi5zZW50ZW5jZVxuXG4gICAgICAgIHRoaXMuX2NvbmYuc2VudGVuY2UgPSB2YWxcbiAgICAgICAgdGhpcy50b1VSTCh0cnVlKVxuICAgICAgICByZXR1cm4gdGhpc1xuICAgIH1cblxuICAgIHRocmVzaG9sZCgpOiBudW1iZXI7XG4gICAgdGhyZXNob2xkKHZhbDogbnVtYmVyKTogdGhpcztcbiAgICB0aHJlc2hvbGQodmFsPykge1xuICAgICAgICBpZiAodmFsID09IG51bGwpIHJldHVybiB0aGlzLl9jb25mLnRocmVzaG9sZDtcblxuICAgICAgICB0aGlzLl9jb25mLnRocmVzaG9sZCA9IHZhbDtcbiAgICAgICAgdGhpcy50b1VSTCgpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBoZWFkcygpOiBudW1iZXJbXSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9jb25mLmhlYWRzXG4gICAgfVxuXG4gICAgbGF5ZXIoKTogbnVtYmVyXG4gICAgbGF5ZXIodmFsOiBudW1iZXIpOiB0aGlzXG4gICAgbGF5ZXIodmFsPykge1xuICAgICAgICBpZiAodmFsID09IG51bGwpXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fY29uZi5sYXllclxuXG4gICAgICAgIHRoaXMuX2NvbmYubGF5ZXIgPSB2YWw7XG4gICAgICAgIHRoaXMudG9VUkwoKTtcbiAgICAgICAgcmV0dXJuIHRoaXNcbiAgICB9XG5cbiAgICBoZWFkU2V0KCk6IFNldDxudW1iZXI+O1xuICAgIGhlYWRTZXQodmFsOiBTZXQ8bnVtYmVyPik6IHRoaXM7XG4gICAgaGVhZFNldCh2YWw/KSB7XG4gICAgICAgIGlmICh2YWwgPT0gbnVsbCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2hlYWRTZXQ7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLl9oZWFkU2V0ID0gdmFsO1xuICAgICAgICB0aGlzLl9jb25mLmhlYWRzID0geF8uc2V0MlNvcnRlZEFycmF5KHRoaXMuX2hlYWRTZXQpXG4gICAgICAgIHRoaXMudG9VUkwoKTtcbiAgICAgICAgcmV0dXJuIHRoaXNcbiAgICB9XG5cbiAgICBtZXRhTWF0Y2goKTogdHAuU2ltcGxlTWV0YTtcbiAgICBtZXRhTWF0Y2godmFsOiB0cC5TaW1wbGVNZXRhKTogdGhpcztcbiAgICBtZXRhTWF0Y2godmFsP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NwZWN0b3IgPSB2YWw7XG4gICAgICAgIHRoaXMudG9VUkwoKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgb2Zmc2V0SWR4cygpOiBudW1iZXJbXTtcbiAgICBvZmZzZXRJZHhzKHZhbDogbnVtYmVyW10pOiB0aGlzO1xuICAgIG9mZnNldElkeHModmFsPykge1xuICAgICAgICBpZiAodmFsID09IG51bGwpIHJldHVybiB0aGlzLl9jb25mLm9mZnNldElkeHM7XG5cbiAgICAgICAgLy8gY29udmVydCB0byBudW1iZXJzXG5cbiAgICAgICAgdGhpcy5fY29uZi5vZmZzZXRJZHhzID0gUi5tYXAodG9OdW1iZXIsIHZhbCk7XG4gICAgICAgIHRoaXMudG9VUkwoKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgaGlkZUNsc1NlcCgpOiBib29sZWFuO1xuICAgIGhpZGVDbHNTZXAodmFsOiBib29sZWFuKTogdGhpcztcbiAgICBoaWRlQ2xzU2VwKHZhbD8pIHtcbiAgICAgICAgaWYgKHZhbCA9PSBudWxsKSByZXR1cm4gdGhpcy5fY29uZi5oaWRlQ2xzU2VwO1xuXG4gICAgICAgIHRoaXMuX2NvbmYuaGlkZUNsc1NlcCA9IHRydXRoeSh2YWwpO1xuICAgICAgICB0aGlzLnRvVVJMKCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1vZGVsKCk6IHN0cmluZztcbiAgICBtb2RlbCh2YWw6IHN0cmluZyk6IHRoaXM7XG4gICAgbW9kZWwodmFsPykge1xuICAgICAgICBpZiAodmFsID09IG51bGwpIHJldHVybiB0aGlzLl9jb25mLm1vZGVsXG4gICAgICAgIHRoaXMuX2NvbmYubW9kZWwgPSB2YWxcbiAgICAgICAgdGhpcy50b1VSTCgpO1xuICAgICAgICByZXR1cm4gdGhpc1xuICAgIH1cblxuICAgIG1vZGVsS2luZCgpOiBzdHJpbmc7XG4gICAgbW9kZ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SB0cC5Ob3JtQnkuQWxsOlxuICAgICAgICAgICAgICAgIHJldHVybiAnaSdcblxuICAgICAgICB9XG5cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBDcmVhdGUgY29ubmVjdGlvbnMgYmV0d2VlbiBsb2NhdGlvbnMgb2YgdGhlIFNWRyB1c2luZyBEMydzIGxpbmtHZW5cbiAgICAgKi9cbiAgICBwcml2YXRlIGNyZWF0ZUNvbm5lY3Rpb25zKCkge1xuICAgICAgICBjb25zdCBzZWxmID0gdGhpcztcbiAgICAgICAgY29uc3Qgb3AgPSB0aGlzLm9wdGlvbnM7XG4gICAgICAgIGlmICh0aGlzLnBhdGhzKSB7XG4gICAgICAgICAgICB0aGlzLnBhdGhzLmF0dHJzKHtcbiAgICAgICAgICAgICAgICAnZCc6IChkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGE6IHsgc291cmNlOiBbbnVtYmVyLCBudW1iZXJdLCB0YXJnZXQ6IFtudW1iZXIsIG51bWJlcl0gfSA9XG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZTogWzAsIG9wLmJveGhlaWdodCAqIChkLmkgKyAwLjUgKyBvcC5vZmZzZXQpXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldDogW29wLndpZHRoLCBvcC5ib3hoZWlnaHQgKiAoZC5qICsgMC41KV0gLy8gKyAyIGFsbG93cyBzbWFsbCBvZmZzZXRcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMubGlua0dlbihkYXRhKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICdjbGFzcyc6ICdhdG4tY3VydmUnXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5hdHRyKFwic3JjLWlkeFwiLCAoZCwgaSkgPT4gZC5pKVxuICAgICAgICAgICAgICAgIC5hdHRyK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ICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFNjYWxlIHRoZSBvcGFjaXR5IGFjY29yZGluZyB0byB0aGUgdmFsdWVzIG9mIHRoZSBkYXRhLCBmcm9tIDAgdG8gbWF4IG9mIGNvbnRhaW5lZCBkYXRhXG4gICAgICogTm9ybWFsaXplIGJ5IGVhY2ggc291cmNlIHRhcmdldCwgb3IgYWNyb3NzIHRoZSB3aG9sZVxuICAgICAqL1xuICAgIHByaXZhdGUgY3JlYXRlU2NhbGVzID0gKCkgPT4ge1xuICAgICAgICB0aGlzLm9wYWNpdHlTY2FsZXMgPSBbXTtcbiAgICAgICAgbGV0IGFyciA9IFtdXG5cbiAgICAgICAgLy8gR3JvdXAgbm9ybWFsaXphdGlvblxuICAgICAgICBzd2l0Y2ggKHRoaXMubm9ybUJ5KXtcbiAgICAgICAgICAgIGNhc2UgdHAuTm9ybUJ5LlJvdzpcbiAgICAgICAgICAgICAgICBhcnIgPSB0aGlzLmVkZ2VEYXRhLmV4dGVudCgxKTtcbiAgICAgICAgICAgICAgICB0aGlzLm9wYWNpdHlTY2FsZXMgPSBbXTtcbiAgICAgICAgICAgICAgICBhcnIuZm9yRWFjaCgodiwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAodGhpcy5vcGFjaXR5U2NhbGVzIGFzIGQzLlNjYWxlTGluZWFyPGFueSwgYW55PltdKS5wdXNoKFxuICAgICAgICAgICAgICAgICAgICAgICAgZDMuc2NhbGVMaW5lYXIoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5kb21haW4oWzAsIHZbMV1dKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yYW5nZShbMCwgMC45XSlcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIHRwLk5vcm1CeS5Db2w6XG4gICAgICAgICAgICAgICAgYXJyID0gdGhpcy5lZGdlRGF0YS5leHRlbnQoMCk7XG4gICAgICAgICAgICAgICAgdGhpcy5vcGFjaXR5U2NhbGVzID0gW107XG4gICAgICAgICAgICAgICAgYXJyLmZvckVhY2goKHYsIGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgKHRoaXMub3BhY2l0eVNjYWxlcyBhcyBkMy5TY2FsZUxpbmVhcjxhbnksIGFueT5bXSkucHVzaChcbiAgICAgICAgICAgICAgICAgICAgICAgIGQzLnNjYWxlTGluZWFyKClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZG9tYWluKFswLCB2WzFdXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmFuZ2UoWzAsIDAuOV0pXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSB0cC5Ob3JtQnkuQWxsOlxuICAgICAgICAgICAgICAgIGNvbnN0IG1heEluID0gZDMubWF4KHRoaXMucGxvdERhdGEubWFwKChkKSA9PiBkLnYpKVxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGhpcy5fZGF0YS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm9wYWNpdHlTY2FsZXMucHVzaChkMy5zY2FsZUxpbmVhcigpXG4gICAgICAgICAgICAgICAgICAgICAgICAuZG9tYWluKFswLCBtYXhJbl0pXG4gICAgICAgICAgICAgICAgICAgICAgICAucmFuZ2UoWzAsIDFdKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIk5vciBub3JtaW5nIHNwZWNpZmllZFwiKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuIC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D5zZWxmLmJhc2Uubm9kZSgpKS5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS5sZWZ0XG4gICAgICAgIGNvbnN0IGdldEJhc2VZID0gKCkgPT4gKDxIVE1MRWxlbWVudD5zZWxmLmJhc2Uubm9kZSgpKS5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKS50b3BcblxuICAgICAgICB0aGlzLmJhc2UuaHRtbCgnJyk7XG5cbiAgICAgICAgdGhpcy5wYXJlbnRcbiAgICAgICAgICAgIC5hdHRyKFwid2lkdGhcIiwgY3VyLnRvdGFsV2lkdGgpXG4gICAgICAgICAgICAuYXR0cihcImhlaWdodFwiLCBjdXIudG90YWxIZWlnaHQpXG5cbiAgICAgICAgdGhpcy5oZWFkUm93cyA9IHRoaXMuYmFzZS5zZWxlY3RBbGwoYC4ke3NlbGYucm93Q3NzTmFtZX1gKVxuICAgICAgICAgICAgLmRhdGEoc2VsZi5fZGF0YS5yb3dzKVxuICAgICAgICAgICAgLmpvaW4oXCJnXCIpXG4gICAgICAgICAgICAuYXR0cnMoe1xuICAgICAgICAgICAgICAgIGNsYXNzOiAoZCwgaSkgPT4gYCR7c2VsZi5yb3dDc3NOYW1lfSAke3NlbGYucm93Q3NzTmFtZX0tJHtpfWAsXG4gICAgICAgICAgICAgICAgdHJhbnNmb3JtOiAoZCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHLnRyYW5zbGF0ZShcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4OiBjdXIueFBhZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB5OiAob3AuYm94RGltICogKGkgKyBvcC5vZmZzZXQpKSArIGN1ci55UGFkLFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdpZHRoOiBjdXIuYm94V2lkdGgsXG4gICAgICAgICAgICAgICAgaGVpZ2h0OiBjdXIuaGVhZEhlaWdodCxcblxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbihcIm1vdXNlb3ZlclwiLCAoZCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgIHNlbGYuZXZlbnRIYW5kbGVyLnRyaWdnZXIoQXR0ZW50aW9uSGVhZEJveC5ldmVudHMucm93TW91c2VPdmVyLCB7IGluZDogaSwgc2lkZTogb3Auc2lkZSB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbihcIm1vdXNlb3V0XCIsIChkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgc2VsZi5ldmVudEhhbmRsZXIudHJpZ2dlcihBdHRlbnRpb25IZWFkQm94LmV2ZW50cy5yb3dNb3VzZU91dCwgeyBpbmQ6IGksIHNpZGU6IG9wLnNpZGUgfSlcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgdGhpcy5oZWFkQ2VsbHMgPSB0aGlzLmhlYWRSb3dzXG4gICAgICAgICAgICAuc2VsZWN0QWxsKGAke3RoaXMuYm94Q3NzTmFtZX1gKVxuICAgICAgICAgICAgLmRhdGEoZCA9PiBkKVxuICAgICAgICAgICAgLmpvaW4oJ3JlY3QnKVxuICAgICAgICAgICAgLmF0dHJzKHtcbiAgICAgICAgICAgICAgICB4OiAoZCwgaSkgPT4gaSAqIGN1ci5oZWFkV2lkdGgsXG4gICAgICAgICAgICAgICAgeTogMCxcbiAgICAgICAgICAgICAgICBjbGFzczogdGhpcy5ib3hDc3NOYW1lLFxuICAgICAgICAgICAgICAgIGhlYWQ6IChkLCBpKSA9PiBzZWxmLl9kYXRhLmxhYmVsc1tpXSxcbiAgICAgICAgICAgICAgICB3aWR0aDogY3VyLmhlYWRXaWR0aCxcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IGN1ci5oZWFkSGVpZ2h0LFxuICAgICAgICAgICAgICAgIG9wYWNpdHk6IChkOiBudW1iZXIpID0+IHRoaXMub3BhY2l0eVNjYWxlKGQpLFxuICAgICAgICAgICAgICAgIGZpbGw6IFwiYmx1ZVwiXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKFwibW91c2VvdmVyXCIsIChkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgc2VsZi5ldmVudEhhbmRsZXIudHJpZ2dlcihBdHRlbnRpb25IZWFkQm94LmV2ZW50cy5ib3hNb3VzZU92ZXIsIGJveEV2ZW50KGkpKVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbihcIm1vdXNlb3V0XCIsIChkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgc2VsZi5ldmVudEhhbmRsZXIudHJpZ2dlcihBdHRlbnRpb25IZWFkQm94LmV2ZW50cy5ib3hNb3VzZU91dCwgYm94RXZlbnQoaSkpXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKFwiY2xpY2tcIiwgKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKEF0dGVudGlvbkhlYWRCb3guZXZlbnRzLmJveENsaWNrLCBib3hFdmVudChpKSlcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oXCJtb3VzZW1vdmVcIiwgZnVuY3Rpb24oZCwgaSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IG9wID0gc2VsZi5vcHRpb25zXG4gICAgICAgICAgICAgICAgY29uc3QgbW91c2UgPSBkMy5tb3VzZShzZWxmLmJhc2Uubm9kZSgpKVxuXG4gICAgICAgICAgICAgICAgc2VsZi5ldmVudEhhbmRsZXIudHJpZ2dlcihBdHRlbnRpb25IZWFkQm94LmV2ZW50cy5ib3hNb3VzZU1vdmUsIHsgaW5kOiBpLCBzaWRlOiBvcC5zaWRlLCBiYXNlWDogZ2V0QmFzZVgoKSwgYmFzZVk6IGdldEJhc2VZKCksIG1vdXNlOiBtb3VzZSB9KVxuXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmFwcGVuZChcIn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XBlcihkM3BhcmVudCwgZXZlbnRIYW5kbGVyKVxuICAgICAgICB0aGlzLm9wdGlvbnMgPSB7XG4gICAgICAgICAgICBtYXJnaW46IHtcbiAgICAgICAgICAgICAgICB0b3A6IDEwLFxuICAgICAgICAgICAgICAgIHJpZ2h0OiAzMCxcbiAgICAgICAgICAgICAgICBib3R0b206IDUwLFxuICAgICAgICAgICAgICAgIGxlZnQ6IDQwXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYmFyV2lkdGg6IDI1LFxuICAgICAgICAgICAgd2lkdGg6IDE4NSxcbiAgICAgICAgICAgIGhlaWdodDogMjMwLFxuICAgICAgICAgICAgdmFsOiBcInBvc1wiLCAvLyBDaGFuZ2UgRGVmYXVsdCwgcGFzcyB0aHJvdWdoIGNvbnN0cnVjdG9yXG4gICAgICAgICAgICB4TGFiZWxSb3Q6IDQ1LFxuICAgICAgICAgICAgeExhYmVsT2Zmc2V0OiAxNSxcbiAgICAgICAgICAgIHlMYWJlbE9mZnNldDogNSxcblxuICAgICAgICB9XG4gICAgICAgIHRoaXMuc3VwZXJJbml0U1ZHKClcbiAgICB9XG5cbiAgICBtZXRhKCk6TWF0Y2hlZE1ldGFTZWxlY3Rpb25zXG4gICAgbWV0YSh2YWw6TWF0Y2hlZE1ldGFTZWxlY3Rpb25zKTogdGhpc1xuICAgIG1ldGEodmFsPykge1xuICAgICAgICBpZiAodmFsID09IG51bGwpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLm9wdGlvbnMudmFsO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5vcHRpb25zLnZhbCA9IHZhbDtcbiAgICAgICAgdGhpcy51cGRhdGUodGhpcy5fZGF0YSlcblxuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBfaW5pdCgpIHt9XG5cbiAgICBwcml2YXRlIGNyZWF0ZVhBeGlzKCkge1xuICAgICAgICBjb25zdCBzZWxmID0gdGhpcztcbiAgICAgICAgY29uc3Qgb3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gICAgICAgICAgICAgIC5jYWxsKGQzLmF4aXNCb3R0b20oc2VsZi5heGVzLngpKVxuXG4gICAgICAgICAgICBpZiAob3AudmFsICE9IFwib2Zmc2V0XCIpIHtcbiAgICAgICAgICAgICAgICBheGlzQm90dG9tXG4gICAgICAgICAgICAgICAgICAgIC5zZWxlY3RBbGwoXCJ0ZXh0XCIpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKFwieVwiLCBvcC55TGFiZWxPZmZzZXQpICAgLy8gTW92ZSBiZWxvdyB0aGUgYXhpc1xuICAgICAgICAgICAgICAgICAgICAuYXR0cihcInhcIiwgb3AueExhYmVsT2Zmc2V0KSAgLy8gT2Zmc2V0IHRvIHRoZSByaWdodCBhIGJpdFxuICAgICAgICAgICAgICAgICAgICAuYXR0cihcInRyYW5zZm9ybVwiLCBTVkcucm90YXRlKG9wLnhMYWJlbFJvdCkpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGcuYXBwZW5kKFwiZ1wiKVxuICAgICAgICAgICAgICAgIC5jYWxsKGQzLmF4aXNMZWZ0KHNlbGYuYXhlcy55KSlcblxuICAgICAgICBnLnNlbGVjdEFsbChcIi5iYXJcIilcbiAgICAgICAgICAuZGF0YShkYXRhKVxuICAgICAgICAgIC5qb2luKCdyZWN0JylcbiAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgXCJiYXJcIilcbiAgICAgICAgICAgIC5hdHRyKFwieFwiLCBmdW5jdGlvbihkKSB7IHJldHVybiBzZWxmLmF4ZXMueChkLmxhYmVsKTsgfSlcbiAgICAgICAgICAgIC5hdHRyKFwieVwiLCBmdW5jdGlvbihkKSB7IHJldHVybiBzZWxmLmF4ZXMueShkLmNvdW50KTsgfSlcbiAgICAgICAgICAgIC5hdHRyKFwid2lkdGhcIiwgc2VsZi5heGVzLnguYmFuZHdpZHRoKCkpXG4gICAgICAgICAgICAuYXR0cihcImhlaWdodFwiLCBmdW5jdGlvbihkKSB7IHJldHVybiBjdXJyLm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W50LCBldmVudEhhbmRsZXIpXG4gICAgICAgIHRoaXMuc3VwZXJJbml0SFRNTChvcHRpb25zKVxuICAgICAgICB0aGlzLl9pbml0KClcbiAgICB9XG5cbiAgICBwcml2YXRlIGNyZWF0ZVJvd3MoKSB7XG4gICAgICAgIGNvbnN0IGRhdGEgPSB0aGlzLl9kYXRhXG5cbiAgICAgICAgdGhpcy5pbnNwZWN0b3JSb3dzID0gdGhpcy5iYXNlLnNlbGVjdEFsbChcIi5pbnNwZWN0b3Itcm93XCIpXG4gICAgICAgICAgICAuZGF0YShkYXRhKVxuICAgICAgICAgICAgLmpvaW4oJ2RpdicpXG4gICAgICAgICAgICAuY2xhc3NlZCgnaW5zcGVjdG9yLXJvdycsIHRydWUpXG4gICAgICAgICAgICAuYXR0cnMoe1xuICAgICAgICAgICAgICAgIG1hdGNoSWR4OiBkID0+IGQuaW5kZXgsXG4gICAgICAgICAgICAgICAgcm93TnVtOiAoZCwgaSkgPT4gaSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oXCJtb3VzZW92ZXJcIiwgKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIudHJpZ2dlcihDb3JwdXNJbnNwZWN0b3IuZXZlbnRzLnJvd01vdXNlT3Zlciwge30pXG4gICAgICAgICAgICB9KVxuICAgIH1cblxuICAgIHByaXZhdGUgYWRkVG9vbHRpcCgpIHtcbiAgICAgICAgdGhpcy5pbnNwZWN0b3JDZWxscyA9IHRoaXMuaW5zcGVjdG9yQ2VsbHNcbiAgICAgICAgICAgIC5jbGFzc2VkKCdjZWxsdG9vbHRpcCcsIHRydWUpXG4gICAgICAgICAgICAuYXBwZW5kKCdzcGFuJylcbiAgICAgICAgICAgIC5jbGFzc2VkKCd0b29sdGlwdGV4dCcsIHRydWUpXG4gICAgICAgICAgICAuaHRtbCgoZCwgaSwgbikgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGVudGl0eVN0ciA9IGQu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4gZC5kZXAudG9Mb3dlckNhc2UoKSwgXG4gICAgICAgICAgICAgICAgaXNfZW50OiBkID0+IGQuaXNfZW50XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLnRleHQoZCA9PiBkLnRva2VuLnJlcGxhY2UoXCJcXHUwMTIwXCIsIFwiIFwiKSlcbiAgICAgICAgICAgIC5jbGFzc2VkKCdtYXRjaGVkLWNlbGwnLCBkID0+IGQuaXNfbWF0Y2gpXG4gICAgICAgICAgICAuY2xhc3NlZCgnbmV4dC1jZWxsJywgZnVuY3Rpb24oZCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBzZWxmLnNob3dOZXh0KCkgJiYgZC5pc19uZXh0X3dvcmRcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2xhc3NlZCgnZ3JheS1jZWxsJywgZnVuY3Rpb24oZCwgaSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGlkeCA9ICtjdXJyTWF0Y2hJZHgodGhpcylcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZi5zaG93TmV4dCgpICYmIGkgPiBpZHhcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgLy8gSGlnaGxpZ2h0IHRoZSBjZWxscyBhcHByb3ByaWF0ZWx5XG4gICAgICAgIHRoaXMuaW5zcGVjdG9yQ2VsbHMuZWFjaCgoZCxpLG4pID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGlkeCA9IGN1cnJNYXRjaElkeChuW2ldKVxuICAgICAgICAgICAgaWYgKGkgPT0gaWR4KSB7XG4gICAgICAgICAgICAgICAgY29uc3QgYXR0ID0gZC5pbndhcmRcbiAgICAgICAgICAgICAgICBjb25zdCBtYXhBdHQgPSArZDMubWF4KGF0dClcbiAgICAgICAgICAgICAgICBjb25zdCBjdXJyUm93ID0gY3VyclJvd051bShuW2ldKVxuICAgICAgICAgICAgICAgIGNvbnN0IHNjYWxlciA9IHNlbGYuc2NhbGVyLmRvbWFpbihbMCwgbWF4QXR0XSlc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KHRvVGhlID09IFwicmlnaHRcIikge1xuICAgICAgICAgICAgY29ycHVzTWF0ID0gdGhpcy5iYXNlLmFwcGVuZCgnZGl2JylcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0b1RoZSA9PSBcImxlZnRcIikge1xuICAgICAgICAgICAgY29ycHVzTWF0ID0gdGhpcy5iYXNlLmluc2VydCgnZGl2JywgXCI6Zmlyc3QtY2hpbGRcIilcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFwidG9UaGUgbXVzdCBoYXZlIGFyZ3VtZW50IG9mICdsZWZ0JyBvciAncmlnaHQnXCIpXG4gICAgICAgIH1cblxuICAgICAgICBjb3JwdXNNYXQgPSBjb3JwdXNNYXRcbiAgICAgICAgICAgIC5kYXRhKFtpZHhPZmZzZXRdKVxuICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgYGNvcnB1cy1tYXQgb2Zmc2V0LSR7aWR4T2Zmc2V0fWApXG4gICAgICAgICAgICAuYXR0cignb2Zmc2V0JywgaWR4T2Zmc2V0KVxuICAgICAgICAgICAgLmFwcGVuZCgnc3ZnJylcbiAgICAgICAgICAgIC5hdHRycyh7XG4gICAgICAgICAgICAgICAgd2lkdGg6IGJveFdpZHRoLFxuICAgICAgICAgICAgICAgIGhlaWdodDogYm94SGVpZ2h0LFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbignbW91c2VvdmVyJywgZnVuY3Rpb24gKGQsIGkpIHtcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKENvcnB1c01hdE1hbmFnZXIuZXZlbnRzLm1vdXNlT3ZlciwgeyBpZHg6IGksIG9mZnNldDogZCwgdmFsOiBzZWxmLm9wdGlvbnMudG9QaWNrWzBdIH0pXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKCdtb3VzZW91dCcsIChkLCBpKSA9PiB7XG4gICAgICAgICAgICAgIC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b1BpY2spKVxuICAgICAgICAgICAgLmpvaW4oXCJnXCIpXG4gICAgICAgICAgICAuYXR0cihcImNsYXNzXCIsIChkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGAke3NlbGYucm93Q3NzTmFtZX0gJHtzZWxmLnJvd0Nzc05hbWV9LSR7aX1gXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmF0dHIoXCJyb3ctbnVtXCIsIChkLGkpID0+IGkpXG4gICAgICAgICAgICAuYXR0cihcImhlaWdodFwiLCBkID0+IGQuaGVpZ2h0KVxuICAgICAgICAgICAgLmF0dHIoXCJ0cmFuc2Zvcm1cIiwgKGQsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBvdXQgPSBTVkcudHJhbnNsYXRlKHtcbiAgICAgICAgICAgICAgICAgICAgeDogMCxcbiAgICAgICAgICAgICAgICAgICAgeTogaGVpZ2h0TGlzdFtpXSxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIHJldHVybiBvdXRcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgb3AudG9QaWNrLmZvckVhY2gocHJvcCA9PiB7XG4gICAgICAgICAgICBzZWxmLmFkZFJlY3Qocm93R3JvdXAsIDAsIHByb3ApXG4gICAgICAgIH0pXG4gICAgfVxuXG4gICAgYWRkUmVjdChnOiBEM1NlbCwgeFNoaWZ0OiBudW1iZXIsIHByb3A6IHN0cmluZykge1xuICAgICAgICBjb25zdCBzZWxmID0gdGhpc1xuICAgICAgICBjb25zdCBvcCA9IHRoaXMub3B0aW9uc1xuXG4gICAgICAgIGNvbnN0IHJlY3RzID0gZy5hcHBlbmQoJ3JlY3QnKVxuICAgICAgICAgICAgLmF0dHJzKHtcbiAgICAgICAgICAgICAgICB3aWR0aDogb3AuY2VsbFdpZHRoLFxuICAgICAgICAgICAgICAgIGhlaWdodDogZCA9PiBkLmhlaWdodCAtIDMsXG4gICAgICAgICAgICAgICAgdHJhbnNmb3JtO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AgICAgICB9KVxuICAgICAgICAgICAgLm9uKCdtb3VzZW91dCcsIGZ1bmN0aW9uIChkLCBpKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5kaXZIb3Zlci5zdHlsZSgndmlzaWJpbGl0eScsICdoaWRkZW4nKVxuICAgICAgICAgICAgICAgIGNvbnN0IGNvbCA9IGQzLnNlbGVjdCh0aGlzLnBhcmVudE5vZGUucGFyZW50Tm9kZSkgLy8gQ29sdW1uXG4gICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gK2NvbC5hdHRyKCdvZmZzZXQnKVxuICAgICAgICAgICAgICAgIHNlbGYuZXZlbnRIYW5kbGVyLnRyaWdnZXIoQ29ycHVzTWF0TWFuYWdlci5ldmVudHMucmVjdE1vdXNlT3V0LCB7aWR4OiBpLCBvZmZzZXQ6IG9mZnNldH0pXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKCdtb3VzZW1vdmUnLCBmdW5jdGlvbihkLCBpKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgbW91c2UgPSBkMy5tb3VzZShzZWxmLmJhc2Uubm9kZSgpKVxuICAgICAgICAgICAgICAgIGNvbnN0IGRpdk9mZnNldCA9IFszLCAzXVxuICAgICAgICAgICAgICAgIGNvbnN0IGxlZnQgPSBtb3VzZVswXSArIGdldEJhc2VYKCkgLSAob3AuZGl2SG92ZXIud2lkdGggKyBkaXZPZmZzZXRbMF0pXG4gICAgICAgICAgICAgICAgY29uc3QgdG9wID0gbW91c2VbMV0gKyBnZXRCYXNlWSgpIC0gKG9wLmRpdkhvdmVyLmhlaWdodCArIGRpdk9mZnNldFsxXSlcbiAgICAgICAgICAgICAgICBzZWxmLmRpdkhvdmVyXG4gICAgICAgICAgICAgICAgICAgIC5zdHlsZSgnbGVmdCcsIFN0cmluZyhsZWZ0KSArICdweCcpXG4gICAgICAgICAgICAgICAgICAgIC5zdHlsZSgndG9wJywgU3RyaW5nKHRvcCkgKyAncHgnKVxuICAgICAgICAg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AgICAgICBsZXQgY291bnRlciA9IDA7XG4gICAgICAgIGNvbnN0IHNvcnRlZEFycjphdS5Tb3J0QXJyYXkgPSBhdS5zb3J0V2l0aEluZGljZXMocm93KTtcblxuICAgICAgICBzb3J0ZWRBcnIuYXJyLmZvckVhY2goKHYsaikgPT4ge1xuICAgICAgICAgICAgaWYgKGNvdW50ZXIgPCBjdXRvZmYpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBvYmo6IEVkZ2UgPSB7XG4gICAgICAgICAgICAgICAgICAgIGk6IGksXG4gICAgICAgICAgICAgICAgICAgIGo6IHNvcnRlZEFyci5zb3J0SW5kaWNlc1tqXSxcbiAgICAgICAgICAgICAgICAgICAgdjogdixcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgb3V0QXJyLnB1c2gob2JqKTtcbiAgICAgICAgICAgICAgICBjb3VudGVyICs9IHY7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuICAgICAgICB9KVxuXG4gICAgcmV0dXJuIG91dEFycjtcbn1cbi8qKlxuICogQ2xhc3MgZm9yIGltcGxlbWVudGluZyBvcGVyYXRpb25zIG9uIEF0dGVudGlvbkdyYXBoIGltcGxlbWVudGF0aW9uLiBcbiAqIENsb3NlbHkgdGllZCB0byBbW0F0dGVudGlvbkNvbm5lY3Rvcl1dXG4gKi9cbmV4cG9ydCBjbGFzcyBFZGdlRGF0YSB7XG4gICAgcmVhZG9ubHkgdGVuc0RhdGE6dGYuVGVuc29yO1xuXG4gICAgY29uc3RydWN0b3IgKHB1YmxpYyBkYXRhOm51bWJlcltdW10pe1xuICAgICAgICB0aGlzLnRlbnNEYXRhID0gdGYudGVuc29yKGRhdGEpO1xuICAgIH1cblxuICAgIG1pbihheGlzPzpudW1iZXIpOlR5cGVkQXJyYXkge1xuICAgICAgICByZXR1cm4gdGhpcy50ZW5zRGF0YS5taW4oYXhpcykuZGF0YVN5bmMoKTtcbiAgICB9XG5cbiAgICBtYXgoYXhpcz86bnVt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iB0cC5GdWxsU2luZ2xlVG9rZW5JbmZvW107XG5cbiAgICBfY3VycmVudDoge307XG5cbiAgICBvcHRpb25zID0ge1xuICAgICAgICBib3hoZWlnaHQ6IDI2LFxuICAgICAgICBvZmZzZXQ6IDAsXG4gICAgICAgIGRpdkhvdmVyOiB7XG4gICAgICAgICAgICB3aWR0aDogMTUwLFxuICAgICAgICAgICAgaGVpZ2h0OiAxNTAsXG4gICAgICAgICAgICBvZmZzZXQ6IFszLCAzXSxcbiAgICAgICAgICAgIHRleHRJbmZvOiBcIldvdWxkIHByZWRpY3QuLi5cIlxuICAgICAgICB9LFxuICAgIH07XG5cbiAgICB0ZXh0Qm94ZXM6IEQzU2VsXG5cbiAgICBjb25zdHJ1Y3RvcihkM1BhcmVudDogRDNTZWwsIGV2ZW50SGFuZGxlcj86IFNpbXBsZUV2ZW50SGFuZGxlciwgb3B0aW9uczoge30gPSB7fSkge1xuICAgICAgICBzdXBlcihkM1BhcmVudCwgZXZlbnRIYW5kbGVyKTtcbiAgICAgICAgdGhpcy5zdXBlckluaXRIVE1MKG9wdGlvbnMpO1xuICAgIH1cblxuICAgIG1hc2sobWFza0luZHM6IG51bWJlcltdKSB7XG4gICAgICAgIHRoaXMucGFyZW50LnNlbGVjdEFsbChgLiR7dGhpcy5jc3NfbmFtZX1gKVxuICAgICAgICAgICAgLmVhY2goKGQsIGksIG4pID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBzZWwgPSBkMy5zZWxlY3QobltpXSlcbiAgICAgICAgICAgICAgICBzZWwuY2xhc3NlZChcIm1hc2tlZC10b2tlblwiLCBfLmluY2x1ZGVzKG1hc2tJbmRzLCBpKSlcbiAgICAgICAgICAgIH0pXG4gICAgfVxuXG4gICAgZ2V0RW1iZWRkaW5nKGluZDogbnVtYmVyKTogdHAuRnVsbFNpbmdsZVRva2VuSW5mbyB7XG4gICAgICAgIHJldHVybiB0aGlzLl9kYXRhW2luZF1cbiAgICB9XG5cbiAgICBfaW5pdCgpIH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blwiLCB0cnVlKVxuICAgICAgICAgICAgLnN0eWxlKFwiaGVpZ2h0XCIsIG9wLmJveGhlaWdodCArICdweCcpXG4gICAgICAgICAgICAudGV4dCgoZCkgPT4gXCIgIFwiKVxuXG4gICAgICAgIC8vIFJlbmRlciBub3JtYWwgdGV4dCBib3ggZGF0YVxuICAgICAgICBzZWxmLnRleHRCb3hlcyA9IDxEM1NlbD50aGlzLmJhc2Uuc2VsZWN0QWxsKGAuJHt0aGlzLmNzc19uYW1lfWApXG4gICAgICAgICAgICAuZGF0YShkYXRhKVxuICAgICAgICAgICAgLmpvaW4oXCJkaXZcIilcbiAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgKGQsIGkpID0+IGB0b2tlbiAke3RoaXMuY3NzX25hbWV9IHRva2VuLSR7aX1gKVxuICAgICAgICAgICAgLmF0dHIoXCJpZFwiLCAoZCwgaSkgPT4gYCR7dGhpcy5jc3NfbmFtZX0tJHtpfWApXG4gICAgICAgICAgICAuc3R5bGUoJ2hlaWdodCcsIG9wLmJveGhlaWdodCArICdweCcpXG4gICAgICAgICAgICAudGV4dCgoZCkgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBkLnRleHQucmVwbGFjZShcIlxcdTAxMjBcIiwgXCIgXCIpLnJlcGxhY2UoXCJcXHUwMTBBXCIsIFwiXFxcXG5cIilcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oJ21vdXNlb3ZlcicsIGZ1bmN0aW9uIChkLCBpKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc2VsID0gZDMuc2VsZWN0KHRoaXMpO1xuICAgICAgICAgICAgICAgIHNlbC5zdHlsZSgnYmFja2dyb3VuZCcsICdsaWdodGJsdWUnKTtcbiAgICAgICAgICAgICAgICBzZWxmLmV2ZW50SGFuZGxlci50cmlnZ2VyKFRleHRUb2tlbnMuZXZlbnRzLnRva2VuTW91c2VPdmVyLCBzZWxmLmVJbmZvKHNlbCwgaSkpXG4gICAgICAgICAgICAgICAgc2VsZi5kaXZIb3Zlci5zdHlsZSgndmlzaWJpbGl0eScsICd2aXNpYmxlJylcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oJ21vdXNlb3V0JywgZnVuY3Rpb24gKGQsIGkpIHtcbiAgICAgICAgICAgICAgICBsZXQgc2VsID0gZDMuc2VsZWN0KHRoaXMpO1xuICAgICAgICAgICAgICAgIHNlbC5zdHlsZSgnYmFja2dyb3VuZCcsIDApXG4gICAgICAgICAgICAgICAgc2VsZi5ldmVudEhhbmRsZXIudHJpZ2dlcihUZXh0VG9rZW5zLmV2ZW50cy50b2tlbk1vdXNlT3V0LCBzZWxmLmVJbmZvKHNlbCwgaSkpXG4gICAgICAgICAgICAgICAgc2VsZi5kaXZIb3Zlci5zdHlsZSgndmlzaWJpbGl0eScsICdoaWRkZW4nKVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbignbW91c2Vtb3ZlJywgZnVuY3Rpb24gKGQsIGkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBzID0gZDMuc2VsZWN0KHRoaXMpXG4gICAgICAgICAgICAgICAgY29uc3QgW2xlZnQsIHRvcF0gPSBzZWxmLl9kaXZQbGFjZW1lbnQoKVxuXG4gICAgICAgICAgICAgICAgc2VsZi5kaXZIb3ZlclxuICAgICAgICAgICAgICAgICAgICAuc3R5bGUoJ2xlZnQnLCBTdHJpbmcobGVmdCkgKyAncHgnKVxuICAgICAgICAgICAgICAgICAgICAuc3R5bGUoJ3RvcCcsIFN0cmluZyh0b3ApICsgJ3B4JylcbiAgICAgICAgICAgICAgICAgICAgLnNlbGVjdEFsbChcIi50b3BrLXdvcmQtYm94XCIpXG4gICAgICAgICAgICAgICAgICAgIC8vQHRzLWlnbm9yZVxuICAgICAgICAgICAgICAgICAgICAuZGF0YShkMy56aXAoZC50b3BrX3dvcmRzLCBkLnRvcGtfcHJvYnMpKVxuICAgICAgICAgICAgICAgICAgICAuam9pbigncCcpXG4gICAgICAgICAgICAgICAgICAgIC5jbGFzc2VkKFwidG9way13b3JkLWJveFwiLCB0cnVlKVxuICAgICAgICAgICAgICAgICAgICAudGV4dCh3ID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5hbWUgPSB3WzBdLnJlcGxhY2UoL1xcdTAxMjAvZywgXCIgXCIpLnJlcGxhY2UoL1xcdTAxMEEvZywgXCJcXFxcblwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJvYiA9IHdbMV0udG9GaXhlZCgyKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5hbWUgKyBcIjogXCIgKyBwcm9iXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9KVxuXG4gICAgICAgIHNlbGYuYWRkQ2xpY2soc2VsZi50ZXh0Qm94ZXMpXG4gICAgfVxuXG4gICAgYWRkQ2xpY2sodGV4dGJveGVzOiBEM1NlbCkge1xuICAgICAgICBjb25zdCBzZWxmID0gdGhpcztcblxuICAgICAgICBzZWxmLnRleHRCb3hlcyA9IHRleHRib3hlc1xuICAgICAgICAgICAgLm9uKCdjbGljaycsIChkLCBpLCBuKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc2VsID0gZDMuc2VsZWN0KG5baV0pO1xuICAgICAgICAgICAgICAgIHNlbGYuZXZlbnRIYW5kbGVyLnRyaWdnZXIoVGV4dFRva2Vucy5ldmVudHMudG9rZW5DbGljaywgc2VsZi5lRW1iZWRkaW5nKHNlbCwgaSwgZC5lbWJlZGRpbmdzKSlcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oJ2RibGNsaWNrJywgKGQsIGksIG4pID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBzZWwgPSBkMy5zZWxlY3QobltpXSk7XG4gICAgICAgICAgICAgICAgc2VsZi5ldmVudEhhbmRsZXIudHJpZ2dlcihUZXh0VG9rZW5zLmV2ZW50cy50b2tlbkRibENsaWNrLCBzZWxmLmVJ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VFbGVtZW50ID0gaEU7XG4gICAgfVxuXG4gICAgaGlkZVZpZXcoKSB7XG4gICAgICAgIGlmICghdGhpcy5fdmlzaWJpbGl0eS5oaWRkZW4pIHtcbiAgICAgICAgICAgIGNvbnN0IGhFID0gdGhpcy5fdmlzaWJpbGl0eS5oaWRlRWxlbWVudCB8fCB0aGlzLnBhcmVudDtcbiAgICAgICAgICAgIGhFLnRyYW5zaXRpb24oKS5zdHlsZXMoe1xuICAgICAgICAgICAgICAgICdvcGFjaXR5JzogMCxcbiAgICAgICAgICAgICAgICAncG9pbnRlci1ldmVudHMnOiAnbm9uZSdcbiAgICAgICAgICAgIH0pLnN0eWxlKCdkaXNwbGF5JywgJ25vbmUnKTtcbiAgICAgICAgICAgIHRoaXMuX3Zpc2liaWxpdHkuaGlkZGVuID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHVuaGlkZVZpZXcoKSB7XG4gICAgICAgIGlmICh0aGlzLl92aXNpYmlsaXR5LmhpZGRlbikge1xuICAgICAgICAgICAgY29uc3QgaEUgPSB0aGlzLl92aXNpYmlsaXR5LmhpZGVFbGVtZW50IHx8IHRoaXMucGFyZW50O1xuICAgICAgICAgICAgaEUudHJhbnNpdGlvbigpLnN0eWxlcyh7XG4gICAgICAgICAgICAgICAgJ29wYWNpdHknOiAxLFxuICAgICAgICAgICAgICAgICdwb2ludGVyLWV2ZW50cyc6IG51bGwsXG4gICAgICAgICAgICAgICAgJ2Rpc3BsYXknOiBudWxsXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHRoaXMuX3Zpc2liaWxpdHkuaGlkZGVuID0gZmFsc2U7XG4gICAgICAgICAgICAvLyB0aGlzLnVwZGF0ZSh0aGlzLmRhdGEpO1xuXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBkZXN0cm95KCkge1xuICAgICAgICB0aGlzLmJhc2UucmVtb3ZlKCk7XG4gICAgfVxuXG4gICAgY2xlYXIoKSB7XG4gICAgICAgIHRoa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sbGVkIG9uY2UgYW5kIG9ubHkgb25jZVxuICAgICAqL1xuICAgIHNrZWxldG9uSW5pdCgpIHtcbiAgICAgICAgdGhpcy5zZWxzID0ge1xuICAgICAgICAgICAgYm9keTogZDMuc2VsZWN0KCdib2R5JyksXG4gICAgICAgICAgICBhdG5Db250YWluZXI6IGQzLnNlbGVjdCgnI2F0bi1jb250YWluZXInKSxcbiAgICAgICAgICAgIGF0bkRpc3BsYXk6IGQzLnNlbGVjdChcIiNhdG4tZGlzcGxheVwiKSxcbiAgICAgICAgICAgIG1vZGVsU2VsZWN0b3I6IGQzLnNlbGVjdChcIiNtb2RlbC1vcHRpb24tc2VsZWN0b3JcIiksXG4gICAgICAgICAgICBjb3JwdXNTZWxlY3RvcjogZDMuc2VsZWN0KFwiI2NvcnB1cy1zZWxlY3RcIiksXG4gICAgICAgICAgICBhdG5IZWFkczoge1xuICAgICAgICAgICAgICAgIGxlZnQ6IGQzLnNlbGVjdChcIiNsZWZ0LWF0dC1oZWFkc1wiKSxcbiAgICAgICAgICAgICAgICByaWdodDogZDMuc2VsZWN0KFwiI3JpZ2h0LWF0dC1oZWFkc1wiKSxcbiAgICAgICAgICAgICAgICBoZWFkSW5mbzogZDMuc2VsZWN0KFwiI2hlYWQtaW5mby1ib3hcIilcbiAgICAgICAgICAgICAgICAgICAgLmNsYXNzZWQoJ21hdC1ob3Zlci1kaXNwbGF5JywgdHJ1ZSlcbiAgICAgICAgICAgICAgICAgICAgLmNsYXNzZWQoJ3RleHQtY2VudGVyJywgdHJ1ZSlcbiAgICAgICAgICAgICAgICAgICAgLnN0eWxlKCd3aWR0aCcsIFN0cmluZyg3MCkgKyAncHgnKVxuICAgICAgICAgICAgICAgICAgICAuc3R5bGUoJ2hlaWdodCcsIFN0cmluZygzMCkgKyAncHgnKVxuICAgICAgICAgICAgICAgICAgICAuc3R5bGUoJ3Zpc2liaWxsaXR5JywgJ2hpZGRlbicpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZm9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yeVwiKSxcbiAgICAgICAgICAgIHRocmVzaFNsaWRlcjogZDMuc2VsZWN0KFwiI215LXJhbmdlXCIpLFxuICAgICAgICAgICAgY29ycHVzSW5zcGVjdG9yOiBkMy5zZWxlY3QoXCIjY29ycHVzLXNpbWlsYXItc2VudGVuY2VzLWRpdlwiKSxcbiAgICAgICAgICAgIGNvcnB1c01hdE1hbmFnZXI6IGQzLnNlbGVjdChcIiNjb3JwdXMtbWF0LWNvbnRhaW5lclwiKSxcbiAgICAgICAgICAgIGNvcnB1c01zZ0JveDogZDMuc2VsZWN0KFwiI2NvcnB1cy1tc2ctYm94XCIpLFxuICAgICAgICAgICAgaGlzdG9ncmFtczoge1xuICAgICAgICAgICAgICAgIG1hdGNoZWRXb3JkRGVzY3JpcHRpb246IGQzLnNlbGVjdChcIiNtYXRjaC1raW5kXCIpLFxuICAgICAgICAgICAgICAgIG1hdGNoZWRXb3JkOiBkMy5zZWxlY3QoXCIjbWF0Y2hlZC1oaXN0b2dyYW0tY29udGFpbmVyXCIpLFxuICAgICAgICAgICAgICAgIG1heEF0dDogZDMuc2VsZWN0KFwiI21heC1hdHQtaGlzdG9ncmFtLWNvbnRhaW5lclwiKSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBidXR0b25zOiB7XG4gICAgICAgICAgICAgICAga2lsbExlZnQ6IGQzLnNlbGVjdChcIiNraWxsLWxlZnRcIiksXG4gICAgICAgICAgICAgICAgYWRkTGVmdDogZDMuc2VsZWN0KFwiI21pbnVzLWxlZnRcIiksXG4gICAgICAgICAgICAgICAgYWRkUmlnaHQ6IGQzLnNlbGVjdChcIiNwbHVzLXJpZ2h0XCIpLFxuICAgICAgICAgICAgICAgIGtpbGxSaWdodDogZDMuc2VsZWN0KFwiI2tpbGwtcmlnaHRcIiksXG4gICAgICAgICAgICAgICAgcmVmcmVzaDogZDMuc2VsZWN0KFwiI21hdC1yZWZyZXNoXCIpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbWV0YV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ICAgICAgICAgdGhpcy5hcGkuZ2V0TWV0YUF0dGVudGlvbnModGhpcy51aUNvbmYubW9kZWwoKSwgdGhpcy51aUNvbmYuc2VudGVuY2UoKSwgdGhpcy51aUNvbmYubGF5ZXIoKSkudGhlbihhdHRlbnRpb24gPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGF0dCA9IGF0dGVudGlvbi5wYXlsb2FkO1xuICAgICAgICAgICAgICAgIHRoaXMuaW5pdEZyb21SZXNwb25zZShhdHQpXG5cbiAgICAgICAgICAgICAgICAvLyBXcmFwIHBvc3RJbml0IGludG8gZnVuY3Rpb24gc28gYXN5bmNocm9ub3VzIGNhbGwgZG9lcyBub3QgbWVzcyB3aXRoIG5lY2Vzc2FyeSBpbml0c1xuICAgICAgICAgICAgICAgIGNvbnN0IHBvc3RSZXNwb25zZURpc3BsYXlDbGVhbnVwID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl90b2dnbGVUb2tlblNlbCgpXG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgdG9EaXNwbGF5ID0gdGhpcy51aUNvbmYuZGlzcGxheUluc3BlY3RvcigpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3NlYXJjaERpc2FibGVyKClcblxuICAgICAgICAgICAgICAgICAgICBpZiAodG9EaXNwbGF5ID09ICdjb250ZXh0Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcXVlcnlDb250ZXh0KClcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0b0Rpc3BsYXkgPT0gJ2VtYmVkZGluZ3MnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9xdWVyeUVtYmVkZGluZ3MoKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGV0IG5vcm1CeVxuICAgICAgICAgICAgICAgIGlmICgodGhpcy51aUNvbmYubW9kZWxLaW5kKCkgPT0gdHAuTW9kZWxLaW5kLkF1dG9yZWdyZXNzaXZlKSAmJiAoIXRoaXMudWlDb25mLmhpZGVDbHNTZXAoKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgbm9ybUJ5ID0gdHAuTm9ybUJ5LkNvbFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbm9ybUJ5ID0gdHAuTm9ybUJ5LkFsbFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnZpenMuYXR0ZW50aW9uU3ZnLm5vcm1CeSA9IG5vcm1CeVxuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudWlDb25mLm1hc2tJbmRzKCkubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRva0NhcHN1bGUuYS5tYXNrSW5kcyA9IHRoaXMudWlDb25mLm1hc2tJbmRzKClcblxuICAgICAgICAgICAgICAgICAgICB0aGlzLmFwaS51cGRhdGVNYXNrZWRBdHRlbnRpb25zKHRoaXMudWlDb25mLm1vZGVsKCksIHRoaXMudG9rQ2Fwc3VsZS5hLCB0aGlzLnVpQ29uZi5zZW50ZW5jZSgpLCB0aGlzLnVpQ29uZi5sYXllcigpKS50aGVuKHJlc3AgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgciA9IHJlc3AucGF5bG9hZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYXR0Q2Fwc3VsZS51cGRhdGVGcm9tTm9ybWFsKHIsIHRoaXMudWlDb25mLmhpZGVDbHNTZXAoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRva0NhcHN1bGUudXBkYXRlVG9rZW5zKHIpXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZSgpXG4gICAgICAgICAgICAgICAgICAgICAgICBwb3N0UmVzcG9uc2VEaXNwbGF5Q2xlYW51cCgpXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGUoKVxuICAgICAgICAgICAgICAgICAgICBwb3N0UmVzcG9uc2VEaXNwbGF5Q2xlYW51cCgpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudWlDb25mLm1vZGVsS2luZCgpID09IHRwLk1vZGVsS2luZC5BdXRvcmVncmVzc2l2ZSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBFbnN1cmUgb25seSAxIG1hc2sgaW5kIGlzIHByZXNlbnQgZm9yIGF1dG9yZWdyZXNzaXZlIG1vZGVsc1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy51aUNvbmYuaGFzVG9rZW4oKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ncmF5VG9nZ2xlKDxudW1iZXI+dGhpcy51aUNvbmYudG9rZW4oKS5pbmQpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgc2VsZi52aXpzLnRva2Vucy5sZWZ0Lm9wdGlvbnMuZGl2SG92ZXIudGV4dEluZm8gPSBcIldvdWxkIHByZWRpY3QgbmV4dC4uLlwiXG4gICAgICAgICAgICAgICAgICAgIHNlbGYudml6cy50b2tlbnMucmlnaHQub3B0aW9ucy5kaXZIb3Zlci50ZXh0SW5mbyA9IFwiV291bGQgcHJlZGljdCBuZXh0Li4uXCJcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYudml6cy50b2tlbnMubGVmdC5vcHRpb25zLmRpdkhvdmVyLnRleHRJbmZvID0gXCJXb3VsZCBwcmVkaWN0IGhlcmUuLi5cIlxuICAgICAgICAgICAgICAgICAgICBzZWxmLnZpenMudG9rZW5zLnJpZ2h0Lm9wdGlvbnMuZGl2SG92ZXIudGV4dEluZm8gPSB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ICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnVwZGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5zZWxzLmJvZHkuc3R5bGUoXCJjdXJzb3JcIiwgXCJkZWZhdWx0XCIpXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXNlIHRwLk1vZGVsS2luZC5BdXRvcmVncmVzc2l2ZToge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIkF1dG9yZWdyZXNzaXZlIG1vZGVsIGRvZXNuJ3QgZG8gbWFza2luZ1wiKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJXaGF0IGtpbmQgb2YgbW9kZWwgaXMgdGhpcz9cIik7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSlcblxuICAgICAgICB0aGlzLmV2ZW50SGFuZGxlci5iaW5kKFRleHRUb2tlbnMuZXZlbnRzLnRva2VuTW91c2VPdmVyLCAoZTogdHAuVG9rZW5FdmVudCkgPT4ge1xuICAgICAgICAgICAgY2hvb3NlU2hvd0J5U2lkZSh0aGlzLnVpQ29uZi50b2tlbigpLCBlKVxuICAgICAgICB9KVxuXG4gICAgICAgIHRoaXMuZXZlbnRIYW5kbGVyLmJpbmQoVGV4dFRva2Vucy5ldmVudHMudG9rZW5Nb3VzZU91dCwgKGUpID0+IHtcbiAgICAgICAgICAgIGNob29zZVNob3dBbGwodGhpcy51aUNvbmYudG9rZW4oKSlcbiAgICAgICAgfSlcblxuICAgICAgICB0aGlzLmV2ZW50SGFuZGxlci5iaW5kKFRleHRUb2tlbnM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k9mZnNldFswXSlcbiAgICAgICAgICAgICAgICB0b3AgPSBlLm1vdXNlWzFdICsgZS5iYXNlWSAtICgraGVhZEluZm8uc3R5bGUoJ2hlaWdodCcpLnJlcGxhY2UoJ3B4JywgJycpICsgZGl2T2Zmc2V0WzFdKVxuICAgICAgICAgICAgICAgIGJvcmRlclJhZGl1cyA9IFwiOHB4IDhweCAxcHggOHB4XCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IGRpdk9mZnNldCA9IFstMTMsIDNdXG4gICAgICAgICAgICAgICAgbGVmdCA9IGUubW91c2VbMF0gKyBlLmJhc2VYICsgZGl2T2Zmc2V0WzBdXG4gICAgICAgICAgICAgICAgdG9wID0gZS5tb3VzZVsxXSArIGUuYmFzZVkgLSAoK2hlYWRJbmZvLnN0eWxlKCdoZWlnaHQnKS5yZXBsYWNlKCdweCcsICcnKSArIGRpdk9mZnNldFsxXSlcbiAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXMgPSBcIjhweCA4cHggOHB4IDFweFwiXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGhlYWRJbmZvXG4gICAgICAgICAgICAgICAgLnN0eWxlKCd2aXNpYmlsaXR5JywgJ3Zpc2libGUnKVxuICAgICAgICAgICAgICAgIC5zdHlsZSgnbGVmdCcsIFN0cmluZyhsZWZ0KSArICdweCcpXG4gICAgICAgICAgICAgICAgLnN0eWxlKCd0b3AnLCBTdHJpbmcodG9wKSArICdweCcpXG4gICAgICAgICAgICAgICAgLnN0eWxlKCdib3JkZXItcmFkaXVzJywgYm9yZGVyUmFkaXVzKVxuICAgICAgICAgICAgICAgIC50ZXh0KGBIZWFkOiAke2UuaW5kICsgMX1gKVxuXG4gICAgICAgICAgICAvLyBEb24ndCBkbyBhbnl0aGluZyBzcGVjaWFsIG9uIHJvdyBtb3VzZSBvdmVyXG4gICAgICAgIH0pXG5cbiAgICAgICAgdGhpcy5ldmVud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uICAgICAgICAgICAgZDMuc2VsZWN0QWxsKCcucmlnaHQtdG9rZW4nKS5lYWNoKGdyYXlUb2tzKVxuICAgICAgICAgICAgZDMuc2VsZWN0QWxsKCcubGVmdC10b2tlbicpLmVhY2goZ3JheVRva3MpXG4gICAgICAgIH1cbiAgICB9XG5cblxuICAgIHByaXZhdGUgZ3JheVRvZ2dsZShpbmQ6IG51bWJlcikge1xuICAgICAgICBpZiAodGhpcy51aUNvbmYuaGFzVG9rZW4oKSlcbiAgICAgICAgICAgIHRoaXMuZ3JheUJhZFRva3MoaW5kKVxuICAgICAgICBlbHNlXG4gICAgICAgICAgICBkMy5zZWxlY3RBbGwoJy50b2tlbicpLmNsYXNzZWQoJ21hc2tlZC10b2tlbicsIGZhbHNlKVxuXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBtYXJrTmV4dFdvcmRUb2tzKGluZDogbnVtYmVyLCBOOiBudW1iZXIpIHtcbiAgICAgICAgY29uc3QgbWFya1Rva3MgPSBmdW5jdGlvbiAoZCwgaSkge1xuICAgICAgICAgICAgY29uc3QgcyA9IGQzLnNlbGVjdCh0aGlzKVxuICAgICAgICAgICAgcy5jbGFzc2VkKFwibmV4dC10b2tlblwiLCBpID09IE1hdGgubWluKGluZCArIDEsIE4pKVxuICAgICAgICB9XG4gICAgICAgIGQzLnNlbGVjdEFsbCgnLnJpZ2h0LXRva2VuJykuZWFjaChtYXJrVG9rcylcbiAgICAgICAgZDMuc2VsZWN0QWxsKCcubGVmdC10b2tlbicpLmVhY2gobWFya1Rva3MpXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBtYXJrTmV4dFRvZ2dsZShpbmQ6IG51bWJlciwgTjogbnVtYmVyKSB7XG4gICAgICAgIGlmICh0aGlzLnVpQ29uZi5oYXNUb2tlbigpKVxuICAgICAgICAgICAgdGhpcy5tYXJrTmV4dFdvcmRUb2tzKGluZCwgTilcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgZDMuc2VsZWN0QWxsKCcudG9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XSA9PSB0cC5Nb2RlbEtpbmQuQXV0b3JlZ3Jlc3NpdmUpIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIlJFU0VUVElORyBNQVNLIElORFNcIik7XG4gICAgICAgICAgICAgICAgc2VsZi51aUNvbmYubWFza0luZHMoW10pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzZWxmLm1haW5Jbml0KCk7XG4gICAgICAgIH0pXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBfaW5pdENvcnB1c1NlbGVjdGlvbigpIHtcbiAgICAgICAgY29uc3QgZGF0YSA9IFtcbiAgICAgICAgICAgIHsgY29kZTogXCJ3b3pcIiwgZGlzcGxheTogXCJXaXphcmQgb2YgT3pcIiB9LFxuICAgICAgICAgICAgeyBjb2RlOiBcIndpa2lcIiwgZGlzcGxheTogXCJXaWtpcGVkaWFcIiB9LFxuICAgICAgICBdXG5cbiAgICAgICAgY29uc3Qgc2VsZiA9IHRoaXNcbiAgICAgICAgc2VsZi5zZWxzLmNvcnB1c1NlbGVjdG9yLnNlbGVjdEFsbCgnb3B0aW9uJylcbiAgICAgICAgICAgIC5kYXRhKGRhdGEpXG4gICAgICAgICAgICAuam9pbignb3B0aW9uJylcbiAgICAgICAgICAgIC5wcm9wZXJ0eSgndmFsdWUnLCBkID0+IGQuY29kZSlcbiAgICAgICAgICAgIC50ZXh0KGQgPT4gZC5kaXNwbGF5KVxuXG4gICAgICAgIHRoaXMuc2Vscy5jb3JwdXNTZWxlY3Rvci5vbignY2hhbmdlJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgY29uc3QgbWUgPSBkMy5zZWxlY3QodGhpcylcbiAgICAgICAgICAgIHNlbGYudWlDb25mLmNvcnB1cyhtZS5wcm9wZXJ0eSgndmFsdWUnKSlcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKHNlbGYudWlDb25mLmNvcnB1cygpKTtcbiAgICAgICAgfSlcblxuXG4gICAgfVxuXG4gICAgcHJpdmF0Z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zLnZpenMuY29ycHVzTWF0TWFuYWdlci5hZGRSaWdodCgpXG4gICAgICAgICAgICB1cGRhdGVVcmxPZmZzZXRJZHhzKClcbiAgICAgICAgfSlcblxuICAgICAgICB0aGlzLnNlbHMuYnV0dG9ucy5hZGRMZWZ0Lm9uKCdjbGljaycsICgpID0+IHtcbiAgICAgICAgICAgIHRoaXMudml6cy5jb3JwdXNNYXRNYW5hZ2VyLmFkZExlZnQoKVxuICAgICAgICAgICAgdXBkYXRlVXJsT2Zmc2V0SWR4cygpXG4gICAgICAgIH0pXG5cbiAgICAgICAgdGhpcy5zZWxzLmJ1dHRvbnMua2lsbFJpZ2h0Lm9uKCdjbGljaycsICgpID0+IHtcbiAgICAgICAgICAgIHRoaXMudml6cy5jb3JwdXNNYXRNYW5hZ2VyLmtpbGxSaWdodCgpXG4gICAgICAgICAgICB1cGRhdGVVcmxPZmZzZXRJZHhzKClcbiAgICAgICAgfSlcblxuICAgICAgICB0aGlzLnNlbHMuYnV0dG9ucy5raWxsTGVmdC5vbignY2xpY2snLCAoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLnZpenMuY29ycHVzTWF0TWFuYWdlci5raWxsTGVmdCgpXG4gICAgICAgICAgICB1cGRhdGVVcmxPZmZzZXRJZHhzKClcbiAgICAgICAgfSlcblxuICAgICAgICB0aGlzLnNlbHMuYnV0dG9ucy5yZWZyZXNoLm9uKCdjbGljaycsICgpID0+IHtcbiAgICAgICAgICAgIGZpeENvcnB1c01hdEhlaWdodHMoKTtcbiAgICAgICAgfSlcblxuICAgICAgICBjb25zdCBvbnJlc2l6ZSA9ICgpID0+IHtcbiAgICAgICAgICAgIGlmICh0aGlzLnNlbHMuY29ycHVzSW5zcGVjdG9yLnRleHQoKSAhPSAnJykgZml4Q29ycHVzTWF0SGVpZ2h0cygpO1xuICAgICAgICB9XG5cbiAgICAgICAgd2luZG93Lm9ucmVzaXplID0gb25yZXNpemVcbiAgICB9XG5cbiAgICBwcml2YXRlIF9pbml0TWV0Y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gICAgICAgICB0aGlzLnVpQ29uZi5ybVRva2VuKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmF0dENhcHN1bGUudXBkYXRlRnJvbU5vcm1hbChyLCB0aGlzLnVpQ29uZi5oaWRlQ2xzU2VwKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50b2tDYXBzdWxlLnVwZGF0ZUZyb21SZXNwb25zZShyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3RvZ2dsZVRva2VuU2VsKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnNwZWN0b3IoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2Vscy5ib2R5LnN0eWxlKFwiY3Vyc29yXCIsIFwiZGVmYXVsdFwiKVxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29uc3Qgb25FbnRlciA9IFIuY3VycnkoKGtleUNvZGUsIGYsIGV2ZW50KSA9PiB7XG4gICAgICAgICAgICBjb25zdCBlID0gZXZlbnQgfHwgd2luZG93LmV2ZW50O1xuICAgICAgICAgICAgaWYgKGUua2V5Q29kZSAhPT0ga2V5Q29kZSkgcmV0dXJuO1xuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgZigpO1xuICAgICAgICB9KVxuXG4gICAgICAgIGNvbnN0IG9uRW50ZXJTdWJtaXQgPSBvbkVudGVyKDEzLCBzdWJtaXROZXdTZW50ZW5jZSlcblxuICAgICAgICBjb25zdCBidG4gPSB0aGlzLnNlbHMuZm9ybS5idXR0b247XG4gICAgICAgIGNvbnN0IGlucHV0Qm94ID0gdGhpcy5zZWxzLmZvcm0uc2VudGVuY2VBO1xuXG4gICAgICAgIGJ0bi5vbihcImNsaWNrXCIsIHN1Ym1pdE5ld1Nlb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keS5zdHlsZShcImN1cnNvclwiLCBcInByb2dyZXNzXCIpXG4gICAgICAgIHNlbGYuYXBpLmdldE5lYXJlc3RFbWJlZGRpbmdzKHNlbGYudWlDb25mLm1vZGVsKCksIHNlbGYudWlDb25mLmNvcnB1cygpLCBlbWJlZCwgbGF5ZXIsIGhlYWRzLCBrKVxuICAgICAgICAgICAgLnRoZW4oKHZhbDogcnNwLk5lYXJlc3ROZWlnaGJvclJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKHZhbC5zdGF0dXMgPT0gNDA2KSB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYubGVhdmVDb3JwdXNNc2coYEVtYmVkZGluZ3MgYXJlIG5vdCBhdmFpbGFibGUgZm9yIG1vZGVsICcke3NlbGYudWlDb25mLm1vZGVsKCl9JyBhbmQgY29ycHVzICcke3NlbGYudWlDb25mLmNvcnB1cygpfScgYXQgdGhpcyB0aW1lLmApXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB2ID0gdmFsLnBheWxvYWRcblxuICAgICAgICAgICAgICAgICAgICBzZWxmLnZpenMuY29ycHVzSW5zcGVjdG9yLnVuaGlkZVZpZXcoKVxuICAgICAgICAgICAgICAgICAgICBzZWxmLnZpenMuY29ycHVzTWF0TWFuYWdlci51bmhpZGVWaWV3KClcblxuICAgICAgICAgICAgICAgICAgICAvLyBHZXQgaGVpZ2h0cyBvZiBjb3JwdXMgaW5zcGVjdG9yIHJvd3MuXG4gICAgICAgICAgICAgICAgICAgIHNlbGYudml6cy5jb3JwdXNJbnNwZWN0b3IudXBkYXRlKHYpXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHdyYXBwZWRWYWxzID0gc2VsZi5fd3JhcFJlc3VsdHModilcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY291bnRlZFZhbHMgPSB3cmFwcGVkVmFscy5nZXRNYXRjaGVkSGlzdG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FNcIik7XG4gICAgICAgIGNvbnN0IGNvbnRleHQgPSB0aGlzLl9nZXRTZWFyY2hDb250ZXh0KClcbiAgICAgICAgY29uc3QgbGF5ZXIgPSBzZWxmLnVpQ29uZi5sYXllcigpXG4gICAgICAgIGNvbnN0IGhlYWRzID0gc2VsZi51aUNvbmYuaGVhZHMoKVxuICAgICAgICBjb25zdCBrID0gNTBcbiAgICAgICAgc2VsZi52aXpzLmNvcnB1c0luc3BlY3Rvci5zaG93TmV4dChzZWxmLnVpQ29uZi5zaG93TmV4dClcblxuICAgICAgICB0aGlzLnNlbHMuYm9keS5zdHlsZShcImN1cnNvclwiLCBcInByb2dyZXNzXCIpXG5cbiAgICAgICAgc2VsZi5hcGkuZ2V0TmVhcmVzdENvbnRleHRzKHNlbGYudWlDb25mLm1vZGVsKCksIHNlbGYudWlDb25mLmNvcnB1cygpLCBjb250ZXh0LCBsYXllciwgaGVhZHMsIGspXG4gICAgICAgICAgICAudGhlbigodmFsOiByc3AuTmVhcmVzdE5laWdoYm9yUmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgICAvLyBHZXQgaGVpZ2h0cyBvZiBjb3JwdXMgaW5zcGVjdG9yIHJvd3MuXG4gICAgICAgICAgICAgICAgaWYgKHZhbC5zdGF0dXMgPT0gNDA2KSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiQ29udGV4dHMgYXJlIG5vdCBhdmFpbGFibGUhXCIpO1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmxlYXZlQ29ycHVzTXNnKGBDb250ZXh0cyBhcmUgbm90IGF2YWlsYWJsZSBmb3IgbW9kZWwgJyR7c2VsZi51aUNvbmYubW9kZWwoKX0nIGFuZCBjb3JwdXMgJyR7c2VsZi51aUNvbmYuY29ycHVzKCl9JyBhdCB0aGlzIHRpbWUuYClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHYgPSB2YWwucGF5bG9hZDtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJISURJTkdcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgc2VsZi52aXpzLmNvcnB1c0luc3BlY3Rvci51cGRhdGUodilcblxuICAgICAgICAgICAgICAgICAgICBTZWwuaGlkZUVsZW1lbnQoc2VsZi5zZWxzLmNvcnB1c01zZ0JveClcbiAgICAgICAgICAgICAgICAgICAgc2VsZi52aXpzLmNvcnB1c0luc3BlY3Rvci51bmhpZGVWaWV3KClcbiAgICAgICAgICAgICAgICAgICAgc2VsZi52aXpzLmNvcnB1c01hdE1hbmFnZXIudW5oaWRlVmlldygpXG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgd3JhcHBlZFZhbHMgPSBzZWxmLl93cmFwUmVzdWx0cyh2KVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBjb3VudGVkVmFscyA9IHdyYXBwZWRWYWxzLmdldE1hdGNoZWRIaXN0b2dyYW0oKVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBvZmZzZXRWYWxzID0gd3JhcHBlZFZhbHMuZ2V0TWF4QXR0SGlzdG9ncmFtKClcbiAgICAgICAgICAgICAgICAgICAgc2VsZi52aXpzLmNvcnB1c01hdE1hbmFnZXIudXBkYXRlKHdyYXBwZWRWYWxzLmRhdGEpXG5cbiAgICAgICAgICAgICAgICAgICAgc2VsZi52aXpzLmhpc3RvZ3JhbXMubWF0Y2hlZFdvcmQudXBkYXRlKGNvdW50ZWRWYWxzKVxuICAgICAgICAgICAgICAgICAgICBzZWxmLnZpenMuaGlzdG9ncmFtcy5tYXhBdHQudXBkYXRlKG9mZnNldFZhbHMpXG5cbiAgICAgICAgICAgICAgICAgICAgc2VsZi51aUNvbmYuZGlzcGxheUluc3BlY3RvcignY29udGV4dCcpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZUNvcnB1c0luc3BlY3RvckZyb21NZXRhKHRoaXMudWlDb25m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aSkgPT4ge1xuICAgICAgICAgICAgICAgIC8vIEFzc2lnbiB0byBsYXJnZXN0IGxheWVyIGF2YWlsYWJsZSBpZiB1aUNvbmYubGF5ZXIoKSA+IG5ldyBuTGF5ZXJzXG4gICAgICAgICAgICAgICAgaWYgKGQgPT0gc2VsZi51aUNvbmYubGF5ZXIoKSkgeyAvLyBKYXZhc2NyaXB0IGlzIDAgaW5kZXhlZCFcbiAgICAgICAgICAgICAgICAgICAgaGFzQWN0aXZlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIWhhc0FjdGl2ZSAmJiBkID09IG5MYXllcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi51aUNvbmYubGF5ZXIoZClcbiAgICAgICAgICAgICAgICAgICAgaGFzQWN0aXZlID0gdHJ1ZVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZVxuXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLnRleHQoKGQpID0+IGQgKyAxKVxuICAgICAgICAgICAgLmFwcGVuZChcImlucHV0XCIpXG4gICAgICAgICAgICAuYXR0cihcInR5cGVcIiwgXCJyYWRpb1wiKVxuICAgICAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBcImNoZWNrYm94LWlubGluZVwiKVxuICAgICAgICAgICAgLmF0dHIoXCJuYW1lXCIsIFwibGF5ZXJib3hcIilcbiAgICAgICAgICAgIC8vIC5hdHRyKFwiaGVhZFwiLCBkID0+IGQpXG4gICAgICAgICAgICAuYXR0cihcImlkXCIsIChkLCBpKSA9PiBcImxheWVyQ2hlY2tib3hcIiArIGkpXG4gICAgICAgIC8vIC50ZXh0KChkLCBpKSA9PiBkICsgXCIgXCIpXG5cbiAgICAgICAgZnJvbUV2ZW50KGNoZWNrYm94ZXMubm9kZXMoKSwgJ2NoYW5nZScpLnBpcGUoXG4gICAgICAgICAgICB0YXAoKGU6IEV2ZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgbXlEYXRhID0gZDMuc2VsZWN0KDxCYXNlVHlwZT5lLnRhcmdldCkuZGF0dW0oKTtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhteURhdGEsIFwiLS0tIG15RGF0YVwiKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbHMubGF5ZXJDaGVja2JveGVzLnNlbGVjdEFsbChcIi5sYXllckNoZWNrYm94XCIpXG4gICAgICAgICAgICAgICAgICAgIC5jbGFzc2VkKCdhY3RpdmUnLCBkID0+IGQgPT09IG15RGF0YSlcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgbWFwKCh2OiBFdmVudCkgPT4gK2QzLnNlbGVjdCg8QmFzZVR5cGU+di50YXJnZXQpLmRhdHVtKCkpLFxuICAgICAgICAgICAgdGFwKHYgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiTmV3IGxheWVyOiBcIiwgdik7XG4gICAgICAgICAgICAgICAgc2VsZi51aUNvbmYubGF5ZXIodik7XG4gICAgICAgICAgICAgICAgc2VsZi5zZWxzLmJvZHkuc3R5bGUoXCJjdXJzb3JcIiwgXCJwcm9ncmVzc1wiKTtcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgc3dpdGNoTWFwKCh2KSA9PiBmcm9tKHNlbGYuYXBpLnVwZGF0ZU1hc2tlZEF0dGVudGlvbnMoc2VsZi51aUNvbmYubW9kZWwoKSwgc2VsZi50b2tDYXBzdWxlLmEsIHNlbGYudWlDb25mLnNlbnRlbmNlKCksIHYpKSlcbiAgICAgICAgKS5zdWJzY3JpYmUoe1xuICAgICAgICAgICAgbmV4dDogKHJlc3A6IHJzcC5BdHRlbnRpb25EZXRhaWxzUmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdC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