diff --git a/app/static/js/initQuill.d.ts b/app/static/js/initQuill.d.ts new file mode 100644 index 0000000..58d779c --- /dev/null +++ b/app/static/js/initQuill.d.ts @@ -0,0 +1 @@ +export declare function initQuill(): void; diff --git a/app/static/js/main.js b/app/static/js/main.js index 93bd9f0..c6c550d 100644 --- a/app/static/js/main.js +++ b/app/static/js/main.js @@ -1,5 +1,4 @@ /******/ (() => { // webpackBootstrap -/******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ "./node_modules/@popperjs/core/lib/createPopper.js": @@ -8,6 +7,7 @@ \*********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "createPopper": () => (/* binding */ createPopper), @@ -296,6 +296,7 @@ var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line i \***************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ contains) @@ -333,6 +334,7 @@ function contains(parent, child) { \****************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getBoundingClientRect) @@ -391,6 +393,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy) { \**********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getClippingRect) @@ -488,6 +491,7 @@ function getClippingRect(element, boundary, rootBoundary, strategy) { \***********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getCompositeRect) @@ -567,6 +571,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { \***********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getComputedStyle) @@ -585,6 +590,7 @@ function getComputedStyle(element) { \*************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getDocumentElement) @@ -605,6 +611,7 @@ function getDocumentElement(element) { \**********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getDocumentRect) @@ -652,6 +659,7 @@ function getDocumentRect(element) { \***************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getHTMLElementScroll) @@ -671,6 +679,7 @@ function getHTMLElementScroll(element) { \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getLayoutRect) @@ -710,6 +719,7 @@ function getLayoutRect(element) { \******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getNodeName) @@ -726,6 +736,7 @@ function getNodeName(element) { \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getNodeScroll) @@ -754,6 +765,7 @@ function getNodeScroll(node) { \**********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getOffsetParent) @@ -843,6 +855,7 @@ function getOffsetParent(element) { \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getParentNode) @@ -878,6 +891,7 @@ function getParentNode(element) { \**********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getScrollParent) @@ -911,6 +925,7 @@ function getScrollParent(node) { \**********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getViewportRect) @@ -959,6 +974,7 @@ function getViewportRect(element, strategy) { \****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getWindow) @@ -984,6 +1000,7 @@ function getWindow(node) { \**********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getWindowScroll) @@ -1008,6 +1025,7 @@ function getWindowScroll(node) { \**************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getWindowScrollBarX) @@ -1037,6 +1055,7 @@ function getWindowScrollBarX(element) { \*****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "isElement": () => (/* binding */ isElement), @@ -1076,6 +1095,7 @@ function isShadowRoot(node) { \***********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ isLayoutViewport) @@ -1094,6 +1114,7 @@ function isLayoutViewport() { \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ isScrollParent) @@ -1118,6 +1139,7 @@ function isScrollParent(element) { \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ isTableElement) @@ -1136,6 +1158,7 @@ function isTableElement(element) { \************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ listScrollParents) @@ -1179,6 +1202,7 @@ function listScrollParents(element, list) { \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "afterMain": () => (/* binding */ afterMain), @@ -1246,6 +1270,7 @@ var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, \******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) @@ -1345,6 +1370,7 @@ function effect(_ref2) { \************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) @@ -1469,6 +1495,7 @@ function effect(_ref2) { \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -1671,6 +1698,7 @@ function computeStyles(_ref5) { \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) @@ -1734,6 +1762,7 @@ function effect(_ref) { \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) @@ -1901,6 +1930,7 @@ function flip(_ref) { \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) @@ -1977,6 +2007,7 @@ function hide(_ref) { \************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "applyStyles": () => (/* reexport safe */ _applyStyles_js__WEBPACK_IMPORTED_MODULE_0__["default"]), @@ -2016,6 +2047,7 @@ __webpack_require__.r(__webpack_exports__); \*************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -2086,6 +2118,7 @@ function offset(_ref2) { \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) @@ -2125,6 +2158,7 @@ function popperOffsets(_ref) { \**********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) @@ -2291,6 +2325,7 @@ function preventOverflow(_ref) { \********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "createPopper": () => (/* binding */ createPopper), @@ -2324,6 +2359,7 @@ var createPopper = /*#__PURE__*/(0,_createPopper_js__WEBPACK_IMPORTED_MODULE_4__ \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "applyStyles": () => (/* reexport safe */ _modifiers_index_js__WEBPACK_IMPORTED_MODULE_12__.applyStyles), @@ -2383,6 +2419,7 @@ var createPopper = /*#__PURE__*/(0,_createPopper_js__WEBPACK_IMPORTED_MODULE_9__ \***********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ computeAutoPlacement) @@ -2447,6 +2484,7 @@ function computeAutoPlacement(state, options) { \*****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ computeOffsets) @@ -2534,6 +2572,7 @@ function computeOffsets(_ref) { \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ debounce) @@ -2562,6 +2601,7 @@ function debounce(fn) { \*****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ detectOverflow) @@ -2649,6 +2689,7 @@ function detectOverflow(state, options) { \******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ expandToHashMap) @@ -2668,6 +2709,7 @@ function expandToHashMap(value, keys) { \*********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ format) @@ -2690,6 +2732,7 @@ function format(str) { \*************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getAltAxis) @@ -2706,6 +2749,7 @@ function getAltAxis(axis) { \*******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getBasePlacement) @@ -2723,6 +2767,7 @@ function getBasePlacement(placement) { \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getFreshSideObject) @@ -2744,6 +2789,7 @@ function getFreshSideObject() { \***************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getMainAxisFromPlacement) @@ -2760,6 +2806,7 @@ function getMainAxisFromPlacement(placement) { \***********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getOppositePlacement) @@ -2784,6 +2831,7 @@ function getOppositePlacement(placement) { \********************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getOppositeVariationPlacement) @@ -2806,6 +2854,7 @@ function getOppositeVariationPlacement(placement) { \***************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getVariation) @@ -2822,6 +2871,7 @@ function getVariation(placement) { \*******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "max": () => (/* binding */ max), @@ -2840,6 +2890,7 @@ var round = Math.round; \**************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ mergeByName) @@ -2867,6 +2918,7 @@ function mergeByName(modifiers) { \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ mergePaddingObject) @@ -2885,6 +2937,7 @@ function mergePaddingObject(paddingObject) { \*****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ orderModifiers) @@ -2943,6 +2996,7 @@ function orderModifiers(modifiers) { \*******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ rectToClientRect) @@ -2964,6 +3018,7 @@ function rectToClientRect(rect) { \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ uniqueBy) @@ -2988,6 +3043,7 @@ function uniqueBy(arr, fn) { \************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ getUAString) @@ -3012,6 +3068,7 @@ function getUAString() { \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ validateModifiers) @@ -3108,6 +3165,7 @@ function validateModifiers(modifiers) { \*********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "within": () => (/* binding */ within), @@ -3131,6 +3189,7 @@ function withinMaxClamp(min, value, max) { \********************************************************************************************************/ /***/ ((module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) @@ -3155,7 +3214,7 @@ var ___CSS_LOADER_URL_REPLACEMENT_1___ = _node_modules_css_loader_dist_runtime_g var ___CSS_LOADER_URL_REPLACEMENT_2___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_2___); var ___CSS_LOADER_URL_REPLACEMENT_3___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_3___); // Module -___CSS_LOADER_EXPORT___.push([module.id, "/*\n! tailwindcss v3.3.1 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #E5E7EB; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n*/\n\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font family by default.\n2. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\n[type='button'],\n[type='reset'],\n[type='submit'] {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9CA3AF; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9CA3AF; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background-color: #fff;\n border-color: #6B7280;\n border-width: 1px;\n border-radius: 0px;\n padding-top: 0.5rem;\n padding-right: 0.75rem;\n padding-bottom: 0.5rem;\n padding-left: 0.75rem;\n font-size: 1rem;\n line-height: 1.5rem;\n --tw-shadow: 0 0 rgba(0,0,0,0);\n}\n\n[type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #1C64F2;\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: /*!*/ /*!*/ 0 0 0 0px #fff, /*!*/ /*!*/ 0 0 0 calc(1px + 0px) #1C64F2, var(--tw-shadow);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n border-color: #1C64F2;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #6B7280;\n opacity: 1;\n}\n\ninput::placeholder,textarea::placeholder {\n color: #6B7280;\n opacity: 1;\n}\n\n::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n}\n\n::-webkit-date-and-time-value {\n min-height: 1.5em;\n}\n\nselect:not([size]) {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ");\n background-position: right 0.5rem center;\n background-repeat: no-repeat;\n background-size: 1.5em 1.5em;\n padding-right: 2.5rem;\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n}\n\n[multiple] {\n background-image: none;\n background-image: initial;\n background-position: 0 0;\n background-position: initial;\n background-repeat: repeat;\n background-repeat: initial;\n background-size: auto auto;\n background-size: initial;\n padding-right: 0.75rem;\n -webkit-print-color-adjust: inherit;\n print-color-adjust: inherit;\n}\n\n[type='checkbox'],[type='radio'] {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n padding: 0;\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n display: inline-block;\n vertical-align: middle;\n background-origin: border-box;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n flex-shrink: 0;\n height: 1rem;\n width: 1rem;\n color: #1C64F2;\n background-color: #fff;\n border-color: #6B7280;\n border-width: 1px;\n --tw-shadow: 0 0 rgba(0,0,0,0);\n}\n\n[type='checkbox'] {\n border-radius: 0px;\n}\n\n[type='radio'] {\n border-radius: 100%;\n}\n\n[type='checkbox']:focus,[type='radio']:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 2px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #1C64F2;\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: /*!*/ /*!*/ 0 0 0 2px #fff, /*!*/ /*!*/ 0 0 0 calc(2px + 2px) #1C64F2, var(--tw-shadow);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n\n[type='checkbox']:checked,[type='radio']:checked,.dark [type='checkbox']:checked,.dark [type='radio']:checked {\n border-color: transparent;\n background-color: currentColor;\n background-size: 100% 100%;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n[type='checkbox']:checked {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_1___ + ");\n}\n\n[type='radio']:checked {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_2___ + ");\n}\n\n[type='checkbox']:indeterminate {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_3___ + ");\n border-color: transparent;\n background-color: currentColor;\n background-size: 100% 100%;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus {\n border-color: transparent;\n background-color: currentColor;\n}\n\n[type='file'] {\n background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;\n background: initial;\n border-color: inherit;\n border-width: 0;\n border-radius: 0;\n padding: 0;\n font-size: inherit;\n line-height: inherit;\n}\n\n[type='file']:focus {\n outline: 1px auto inherit;\n}\n\ninput[type=file]::file-selector-button {\n color: white;\n background: #1F2937;\n border: 0;\n font-weight: 500;\n font-size: 0.875rem;\n cursor: pointer;\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n padding-left: 2rem;\n padding-right: 1rem;\n margin-left: -1rem;\n margin-right: 1rem;\n}\n\ninput[type=file]::file-selector-button:hover {\n background: #374151;\n}\n\n.dark input[type=file]::file-selector-button {\n color: white;\n background: #4B5563;\n}\n\n.dark input[type=file]::file-selector-button:hover {\n background: #6B7280;\n}\n\ninput[type=\"range\"]::-webkit-slider-thumb {\n height: 1.25rem;\n width: 1.25rem;\n background: #1C64F2;\n border-radius: 9999px;\n border: 0;\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n cursor: pointer;\n}\n\ninput[type=\"range\"]:disabled::-webkit-slider-thumb {\n background: #9CA3AF;\n}\n\n.dark input[type=\"range\"]:disabled::-webkit-slider-thumb {\n background: #6B7280;\n}\n\ninput[type=\"range\"]:focus::-webkit-slider-thumb {\n outline: 2px solid transparent;\n outline-offset: 2px;\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color), var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) rgb(164 202 254 / 1px), 0 0 rgba(0,0,0,0);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n --tw-ring-opacity: 1px;\n --tw-ring-color: rgba(164, 202, 254, var(--tw-ring-opacity));\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n height: 1.25rem;\n width: 1.25rem;\n background: #1C64F2;\n border-radius: 9999px;\n border: 0;\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n cursor: pointer;\n}\n\ninput[type=\"range\"]:disabled::-moz-range-thumb {\n background: #9CA3AF;\n}\n\n.dark input[type=\"range\"]:disabled::-moz-range-thumb {\n background: #6B7280;\n}\n\ninput[type=\"range\"]::-moz-range-progress {\n background: #3F83F8;\n}\n\ninput[type=\"range\"]::-ms-fill-lower {\n background: #3F83F8;\n}\n\n.toggle-bg:after {\n content: \"\";\n position: absolute;\n top: 0.125rem;\n left: 0.125rem;\n background: white;\n border-color: #D1D5DB;\n border-width: 1px;\n border-radius: 9999px;\n height: 1.25rem;\n width: 1.25rem;\n transition-property: background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;\n transition-duration: .15s;\n box-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n}\n\ninput:checked + .toggle-bg:after {\n transform: translateX(100%);;\n border-color: white;\n}\n\ninput:checked + .toggle-bg {\n background: #1C64F2;\n border-color: #1C64F2;\n}\n\n.tooltip-arrow,.tooltip-arrow:before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n}\n\n.tooltip-arrow {\n visibility: hidden;\n}\n\n.tooltip-arrow:before {\n content: \"\";\n visibility: visible;\n transform: rotate(45deg);\n}\n\n[data-tooltip-style^='light'] + .tooltip > .tooltip-arrow:before {\n border-style: solid;\n border-color: #e5e7eb;\n}\n\n[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='top'] > .tooltip-arrow:before {\n border-bottom-width: 1px;\n border-right-width: 1px;\n}\n\n[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='right'] > .tooltip-arrow:before {\n border-bottom-width: 1px;\n border-left-width: 1px;\n}\n\n[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='bottom'] > .tooltip-arrow:before {\n border-top-width: 1px;\n border-left-width: 1px;\n}\n\n[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='left'] > .tooltip-arrow:before {\n border-top-width: 1px;\n border-right-width: 1px;\n}\n\n.tooltip[data-popper-placement^='top'] > .tooltip-arrow {\n bottom: -4px;\n}\n\n.tooltip[data-popper-placement^='bottom'] > .tooltip-arrow {\n top: -4px;\n}\n\n.tooltip[data-popper-placement^='left'] > .tooltip-arrow {\n right: -4px;\n}\n\n.tooltip[data-popper-placement^='right'] > .tooltip-arrow {\n left: -4px;\n}\n\n.tooltip.invisible > .tooltip-arrow:before {\n visibility: hidden;\n}\n\n[data-popper-arrow],[data-popper-arrow]:before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n}\n\n[data-popper-arrow] {\n visibility: hidden;\n}\n\n[data-popper-arrow]:before {\n content: \"\";\n visibility: visible;\n transform: rotate(45deg);\n}\n\n[data-popper-arrow]:after {\n content: \"\";\n visibility: visible;\n transform: rotate(45deg);\n position: absolute;\n width: 9px;\n height: 9px;\n background: inherit;\n}\n\n[role=\"tooltip\"] > [data-popper-arrow]:before {\n border-style: solid;\n border-color: #e5e7eb;\n}\n\n.dark [role=\"tooltip\"] > [data-popper-arrow]:before {\n border-style: solid;\n border-color: #4b5563;\n}\n\n[role=\"tooltip\"] > [data-popper-arrow]:after {\n border-style: solid;\n border-color: #e5e7eb;\n}\n\n.dark [role=\"tooltip\"] > [data-popper-arrow]:after {\n border-style: solid;\n border-color: #4b5563;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='top'] > [data-popper-arrow]:before {\n border-bottom-width: 1px;\n border-right-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='top'] > [data-popper-arrow]:after {\n border-bottom-width: 1px;\n border-right-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='right'] > [data-popper-arrow]:before {\n border-bottom-width: 1px;\n border-left-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='right'] > [data-popper-arrow]:after {\n border-bottom-width: 1px;\n border-left-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='bottom'] > [data-popper-arrow]:before {\n border-top-width: 1px;\n border-left-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='bottom'] > [data-popper-arrow]:after {\n border-top-width: 1px;\n border-left-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='left'] > [data-popper-arrow]:before {\n border-top-width: 1px;\n border-right-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='left'] > [data-popper-arrow]:after {\n border-top-width: 1px;\n border-right-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='top'] > [data-popper-arrow] {\n bottom: -5px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='bottom'] > [data-popper-arrow] {\n top: -5px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='left'] > [data-popper-arrow] {\n right: -5px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='right'] > [data-popper-arrow] {\n left: -5px;\n}\n\n[role=\"tooltip\"].invisible > [data-popper-arrow]:before {\n visibility: hidden;\n}\n\n[role=\"tooltip\"].invisible > [data-popper-arrow]:after {\n visibility: hidden;\n}\n\n*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(63, 131, 248, 0.5);\n --tw-ring-offset-shadow: 0 0 rgba(0,0,0,0);\n --tw-ring-shadow: 0 0 rgba(0,0,0,0);\n --tw-shadow: 0 0 rgba(0,0,0,0);\n --tw-shadow-colored: 0 0 rgba(0,0,0,0);\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(63, 131, 248, 0.5);\n --tw-ring-offset-shadow: 0 0 rgba(0,0,0,0);\n --tw-ring-shadow: 0 0 rgba(0,0,0,0);\n --tw-shadow: 0 0 rgba(0,0,0,0);\n --tw-shadow-colored: 0 0 rgba(0,0,0,0);\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n.pointer-events-none {\n pointer-events: none;\n}\n.visible {\n visibility: visible;\n}\n.invisible {\n visibility: hidden;\n}\n.collapse {\n visibility: collapse;\n}\n.static {\n position: static;\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.inset-0 {\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n.inset-y-0 {\n top: 0px;\n bottom: 0px;\n}\n.-top-2 {\n top: -0.5rem;\n}\n.bottom-0 {\n bottom: 0px;\n}\n.bottom-2 {\n bottom: 0.5rem;\n}\n.bottom-2\\.5 {\n bottom: 0.625rem;\n}\n.bottom-3 {\n bottom: 0.75rem;\n}\n.bottom-\\[60px\\] {\n bottom: 60px;\n}\n.left-0 {\n left: 0px;\n}\n.left-10 {\n left: 2.5rem;\n}\n.left-3 {\n left: 0.75rem;\n}\n.left-auto {\n left: auto;\n}\n.right-0 {\n right: 0px;\n}\n.right-2 {\n right: 0.5rem;\n}\n.right-2\\.5 {\n right: 0.625rem;\n}\n.right-3 {\n right: 0.75rem;\n}\n.top-0 {\n top: 0px;\n}\n.top-10 {\n top: 2.5rem;\n}\n.z-10 {\n z-index: 10;\n}\n.z-20 {\n z-index: 20;\n}\n.z-30 {\n z-index: 30;\n}\n.z-40 {\n z-index: 40;\n}\n.z-50 {\n z-index: 50;\n}\n.col-span-6 {\n grid-column: span 6 / span 6;\n}\n.col-span-full {\n grid-column: 1 / -1;\n}\n.m-3 {\n margin: 0.75rem;\n}\n.-mx-1 {\n margin-left: -0.25rem;\n margin-right: -0.25rem;\n}\n.-mx-1\\.5 {\n margin-left: -0.375rem;\n margin-right: -0.375rem;\n}\n.-my-1 {\n margin-top: -0.25rem;\n margin-bottom: -0.25rem;\n}\n.-my-1\\.5 {\n margin-top: -0.375rem;\n margin-bottom: -0.375rem;\n}\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n.my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.-mb-px {\n margin-bottom: -1px;\n}\n.-mr-1 {\n margin-right: -0.25rem;\n}\n.-mt-5 {\n margin-top: -1.25rem;\n}\n.mb-0 {\n margin-bottom: 0px;\n}\n.mb-1 {\n margin-bottom: 0.25rem;\n}\n.mb-1\\.5 {\n margin-bottom: 0.375rem;\n}\n.mb-2 {\n margin-bottom: 0.5rem;\n}\n.mb-3 {\n margin-bottom: 0.75rem;\n}\n.mb-4 {\n margin-bottom: 1rem;\n}\n.ml-0 {\n margin-left: 0px;\n}\n.ml-2 {\n margin-left: 0.5rem;\n}\n.ml-3 {\n margin-left: 0.75rem;\n}\n.ml-4 {\n margin-left: 1rem;\n}\n.ml-5 {\n margin-left: 1.25rem;\n}\n.ml-6 {\n margin-left: 1.5rem;\n}\n.ml-auto {\n margin-left: auto;\n}\n.mr-1 {\n margin-right: 0.25rem;\n}\n.mr-2 {\n margin-right: 0.5rem;\n}\n.mr-3 {\n margin-right: 0.75rem;\n}\n.mr-64 {\n margin-right: 16rem;\n}\n.mt-1 {\n margin-top: 0.25rem;\n}\n.mt-16 {\n margin-top: 4rem;\n}\n.mt-2 {\n margin-top: 0.5rem;\n}\n.mt-3 {\n margin-top: 0.75rem;\n}\n.mt-4 {\n margin-top: 1rem;\n}\n.mt-5 {\n margin-top: 1.25rem;\n}\n.mt-8 {\n margin-top: 2rem;\n}\n.block {\n display: block;\n}\n.inline-block {\n display: inline-block;\n}\n.inline {\n display: inline;\n}\n.flex {\n display: flex;\n}\n.inline-flex {\n display: inline-flex;\n}\n.table {\n display: table;\n}\n.grid {\n display: grid;\n}\n.hidden {\n display: none;\n}\n.h-11 {\n height: 2.75rem;\n}\n.h-2 {\n height: 0.5rem;\n}\n.h-2\\.5 {\n height: 0.625rem;\n}\n.h-3 {\n height: 0.75rem;\n}\n.h-4 {\n height: 1rem;\n}\n.h-5 {\n height: 1.25rem;\n}\n.h-6 {\n height: 1.5rem;\n}\n.h-8 {\n height: 2rem;\n}\n.h-80 {\n height: 20rem;\n}\n.h-\\[calc\\(100\\%-1rem\\)\\] {\n height: calc(100% - 1rem);\n}\n.h-full {\n height: 100%;\n}\n.h-screen {\n height: 100vh;\n}\n.max-h-full {\n max-height: 100%;\n}\n.w-1\\/2 {\n width: 50%;\n}\n.w-11 {\n width: 2.75rem;\n}\n.w-11\\/12 {\n width: 91.666667%;\n}\n.w-2 {\n width: 0.5rem;\n}\n.w-2\\.5 {\n width: 0.625rem;\n}\n.w-3 {\n width: 0.75rem;\n}\n.w-4 {\n width: 1rem;\n}\n.w-44 {\n width: 11rem;\n}\n.w-5 {\n width: 1.25rem;\n}\n.w-6 {\n width: 1.5rem;\n}\n.w-64 {\n width: 16rem;\n}\n.w-8 {\n width: 2rem;\n}\n.w-80 {\n width: 20rem;\n}\n.w-full {\n width: 100%;\n}\n.max-w-2xl {\n max-width: 42rem;\n}\n.max-w-6xl {\n max-width: 72rem;\n}\n.max-w-full {\n max-width: 100%;\n}\n.max-w-sm {\n max-width: 24rem;\n}\n.max-w-xs {\n max-width: 20rem;\n}\n.flex-1 {\n flex: 1 1 0%;\n}\n.flex-shrink {\n flex-shrink: 1;\n}\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n.-translate-x-full {\n --tw-translate-x: -100%;\n transform: translate(-100%, var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.-translate-y-full {\n --tw-translate-y: -100%;\n transform: translate(var(--tw-translate-x), -100%) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(0px, var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-96 {\n --tw-translate-x: 24rem;\n transform: translate(24rem, var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-full {\n --tw-translate-x: 100%;\n transform: translate(100%, var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-y-full {\n --tw-translate-y: 100%;\n transform: translate(var(--tw-translate-x), 100%) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.rotate-180 {\n --tw-rotate: 180deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(180deg) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform-none {\n transform: none;\n}\n.cursor-default {\n cursor: default;\n}\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.resize {\n resize: both;\n}\n.grid-cols-4 {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n}\n.grid-cols-6 {\n grid-template-columns: repeat(6, minmax(0, 1fr));\n}\n.grid-cols-7 {\n grid-template-columns: repeat(7, minmax(0, 1fr));\n}\n.flex-col {\n flex-direction: column;\n}\n.flex-wrap {\n flex-wrap: wrap;\n}\n.content-center {\n align-content: center;\n}\n.items-start {\n align-items: flex-start;\n}\n.items-end {\n align-items: flex-end;\n}\n.items-center {\n align-items: center;\n}\n.justify-start {\n justify-content: flex-start;\n}\n.justify-end {\n justify-content: flex-end;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-2 {\n gap: 0.5rem;\n}\n.gap-6 {\n gap: 1.5rem;\n}\n.-space-x-px > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(-1px * 0);\n margin-right: calc(-1px * var(--tw-space-x-reverse));\n margin-left: calc(-1px * (1 - 0));\n margin-left: calc(-1px * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(-1px * calc(1 - 0));\n margin-left: calc(-1px * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-0 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0px * 0);\n margin-right: calc(0px * var(--tw-space-x-reverse));\n margin-left: calc(0px * (1 - 0));\n margin-left: calc(0px * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0px * calc(1 - 0));\n margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-0\\.5 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.125rem * 0);\n margin-right: calc(0.125rem * var(--tw-space-x-reverse));\n margin-left: calc(0.125rem * (1 - 0));\n margin-left: calc(0.125rem * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0.125rem * calc(1 - 0));\n margin-left: calc(0.125rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-1 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.25rem * 0);\n margin-right: calc(0.25rem * var(--tw-space-x-reverse));\n margin-left: calc(0.25rem * (1 - 0));\n margin-left: calc(0.25rem * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0.25rem * calc(1 - 0));\n margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * 0);\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * (1 - 0));\n margin-left: calc(0.5rem * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0.5rem * calc(1 - 0));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-3 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.75rem * 0);\n margin-right: calc(0.75rem * var(--tw-space-x-reverse));\n margin-left: calc(0.75rem * (1 - 0));\n margin-left: calc(0.75rem * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0.75rem * calc(1 - 0));\n margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-y-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * (1 - 0));\n margin-top: calc(0.5rem * (1 - var(--tw-space-y-reverse)));\n margin-top: calc(0.5rem * calc(1 - 0));\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * 0);\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * (1 - 0));\n margin-top: calc(1rem * (1 - var(--tw-space-y-reverse)));\n margin-top: calc(1rem * calc(1 - 0));\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * 0);\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.space-y-6 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1.5rem * (1 - 0));\n margin-top: calc(1.5rem * (1 - var(--tw-space-y-reverse)));\n margin-top: calc(1.5rem * calc(1 - 0));\n margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1.5rem * 0);\n margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));\n}\n.space-y-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(2rem * (1 - 0));\n margin-top: calc(2rem * (1 - var(--tw-space-y-reverse)));\n margin-top: calc(2rem * calc(1 - 0));\n margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(2rem * 0);\n margin-bottom: calc(2rem * var(--tw-space-y-reverse));\n}\n.divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * (1 - 0));\n border-top-width: calc(1px * (1 - var(--tw-divide-y-reverse)));\n border-top-width: calc(1px * calc(1 - 0));\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * 0);\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.divide-gray-100 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgba(243, 244, 246, 1);\n border-color: rgb(243 244 246 / var(--tw-divide-opacity));\n}\n.divide-gray-200 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgba(229, 231, 235, 1);\n border-color: rgb(229 231 235 / var(--tw-divide-opacity));\n}\n.self-center {\n align-self: center;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-x-auto {\n overflow-x: auto;\n}\n.overflow-y-auto {\n overflow-y: auto;\n}\n.overflow-x-hidden {\n overflow-x: hidden;\n}\n.whitespace-nowrap {\n white-space: nowrap;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-lg {\n border-radius: 0.5rem;\n}\n.rounded-md {\n border-radius: 0.375rem;\n}\n.rounded-xl {\n border-radius: 0.75rem;\n}\n.rounded-b {\n border-bottom-right-radius: 0.25rem;\n border-bottom-left-radius: 0.25rem;\n}\n.rounded-b-lg {\n border-bottom-right-radius: 0.5rem;\n border-bottom-left-radius: 0.5rem;\n}\n.rounded-l-lg {\n border-top-left-radius: 0.5rem;\n border-bottom-left-radius: 0.5rem;\n}\n.rounded-r-lg {\n border-top-right-radius: 0.5rem;\n border-bottom-right-radius: 0.5rem;\n}\n.rounded-t {\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem;\n}\n.rounded-t-lg {\n border-top-left-radius: 0.5rem;\n border-top-right-radius: 0.5rem;\n}\n.border {\n border-width: 1px;\n}\n.border-0 {\n border-width: 0px;\n}\n.border-2 {\n border-width: 2px;\n}\n.border-b {\n border-bottom-width: 1px;\n}\n.border-b-2 {\n border-bottom-width: 2px;\n}\n.border-r {\n border-right-width: 1px;\n}\n.border-t {\n border-top-width: 1px;\n}\n.border-solid {\n border-style: solid;\n}\n.border-blue-300 {\n --tw-border-opacity: 1;\n border-color: rgba(164, 202, 254, 1);\n border-color: rgb(164 202 254 / var(--tw-border-opacity));\n}\n.border-blue-600 {\n --tw-border-opacity: 1;\n border-color: rgba(28, 100, 242, 1);\n border-color: rgb(28 100 242 / var(--tw-border-opacity));\n}\n.border-blue-700 {\n --tw-border-opacity: 1;\n border-color: rgba(26, 86, 219, 1);\n border-color: rgb(26 86 219 / var(--tw-border-opacity));\n}\n.border-gray-100 {\n --tw-border-opacity: 1;\n border-color: rgba(243, 244, 246, 1);\n border-color: rgb(243 244 246 / var(--tw-border-opacity));\n}\n.border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, 1);\n border-color: rgb(229 231 235 / var(--tw-border-opacity));\n}\n.border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgba(209, 213, 219, 1);\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.border-transparent {\n border-color: transparent;\n}\n.border-white {\n --tw-border-opacity: 1;\n border-color: rgba(255, 255, 255, 1);\n border-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n.bg-blue-50 {\n --tw-bg-opacity: 1;\n background-color: rgba(235, 245, 255, 1);\n background-color: rgb(235 245 255 / var(--tw-bg-opacity));\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(28, 100, 242, 1);\n background-color: rgb(28 100 242 / var(--tw-bg-opacity));\n}\n.bg-blue-700 {\n --tw-bg-opacity: 1;\n background-color: rgba(26, 86, 219, 1);\n background-color: rgb(26 86 219 / var(--tw-bg-opacity));\n}\n.bg-emerald-700 {\n --tw-bg-opacity: 1;\n background-color: rgba(4, 120, 87, 1);\n background-color: rgb(4 120 87 / var(--tw-bg-opacity));\n}\n.bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgba(243, 244, 246, 1);\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, 1);\n background-color: rgb(229 231 235 / var(--tw-bg-opacity));\n}\n.bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgba(249, 250, 251, 1);\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, 1);\n background-color: rgb(31 41 55 / var(--tw-bg-opacity));\n}\n.bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgba(17, 24, 39, 1);\n background-color: rgb(17 24 39 / var(--tw-bg-opacity));\n}\n.bg-green-100 {\n --tw-bg-opacity: 1;\n background-color: rgba(222, 247, 236, 1);\n background-color: rgb(222 247 236 / var(--tw-bg-opacity));\n}\n.bg-green-400 {\n --tw-bg-opacity: 1;\n background-color: rgba(49, 196, 141, 1);\n background-color: rgb(49 196 141 / var(--tw-bg-opacity));\n}\n.bg-red-100 {\n --tw-bg-opacity: 1;\n background-color: rgba(253, 232, 232, 1);\n background-color: rgb(253 232 232 / var(--tw-bg-opacity));\n}\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgba(240, 82, 82, 1);\n background-color: rgb(240 82 82 / var(--tw-bg-opacity));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(224, 36, 36, 1);\n background-color: rgb(224 36 36 / var(--tw-bg-opacity));\n}\n.bg-red-700 {\n --tw-bg-opacity: 1;\n background-color: rgba(200, 30, 30, 1);\n background-color: rgb(200 30 30 / var(--tw-bg-opacity));\n}\n.bg-teal-700 {\n --tw-bg-opacity: 1;\n background-color: rgba(3, 102, 114, 1);\n background-color: rgb(3 102 114 / var(--tw-bg-opacity));\n}\n.bg-transparent {\n background-color: transparent;\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, 1);\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.bg-white\\/50 {\n background-color: rgba(255, 255, 255, 0.5);\n}\n.bg-opacity-50 {\n --tw-bg-opacity: 0.5;\n}\n.p-0 {\n padding: 0px;\n}\n.p-1 {\n padding: 0.25rem;\n}\n.p-1\\.5 {\n padding: 0.375rem;\n}\n.p-2 {\n padding: 0.5rem;\n}\n.p-2\\.5 {\n padding: 0.625rem;\n}\n.p-3 {\n padding: 0.75rem;\n}\n.p-4 {\n padding: 1rem;\n}\n.p-5 {\n padding: 1.25rem;\n}\n.p-6 {\n padding: 1.5rem;\n}\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-1\\.5 {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n.py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.pb-2 {\n padding-bottom: 0.5rem;\n}\n.pb-3 {\n padding-bottom: 0.75rem;\n}\n.pb-4 {\n padding-bottom: 1rem;\n}\n.pl-10 {\n padding-left: 2.5rem;\n}\n.pl-3 {\n padding-left: 0.75rem;\n}\n.pt-0 {\n padding-top: 0px;\n}\n.pt-2 {\n padding-top: 0.5rem;\n}\n.pt-20 {\n padding-top: 5rem;\n}\n.pt-28 {\n padding-top: 7rem;\n}\n.pt-6 {\n padding-top: 1.5rem;\n}\n.text-left {\n text-align: left;\n}\n.text-center {\n text-align: center;\n}\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.font-bold {\n font-weight: 700;\n}\n.font-extrabold {\n font-weight: 800;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-normal {\n font-weight: 400;\n}\n.font-semibold {\n font-weight: 600;\n}\n.uppercase {\n text-transform: uppercase;\n}\n.italic {\n font-style: italic;\n}\n.leading-6 {\n line-height: 1.5rem;\n}\n.leading-9 {\n line-height: 2.25rem;\n}\n.leading-tight {\n line-height: 1.25;\n}\n.text-black {\n --tw-text-opacity: 1;\n color: rgba(0, 0, 0, 1);\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n.text-blue-600 {\n --tw-text-opacity: 1;\n color: rgba(28, 100, 242, 1);\n color: rgb(28 100 242 / var(--tw-text-opacity));\n}\n.text-gray-400 {\n --tw-text-opacity: 1;\n color: rgba(156, 163, 175, 1);\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgba(107, 114, 128, 1);\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.text-gray-700 {\n --tw-text-opacity: 1;\n color: rgba(55, 65, 81, 1);\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n.text-gray-900 {\n --tw-text-opacity: 1;\n color: rgba(17, 24, 39, 1);\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.text-green-500 {\n --tw-text-opacity: 1;\n color: rgba(14, 159, 110, 1);\n color: rgb(14 159 110 / var(--tw-text-opacity));\n}\n.text-red-500 {\n --tw-text-opacity: 1;\n color: rgba(240, 82, 82, 1);\n color: rgb(240 82 82 / var(--tw-text-opacity));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, 1);\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.underline {\n text-decoration-line: underline;\n}\n.opacity-0 {\n opacity: 0;\n}\n.opacity-100 {\n opacity: 1;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.outline {\n outline-style: solid;\n}\n.blur {\n --tw-blur: blur(8px);\n filter: blur(8px) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-transform {\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-75 {\n transition-duration: 75ms;\n}\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n\n\n.text-danger {\n color: red;\n}\n\n\n.hover\\:border-gray-300:hover {\n --tw-border-opacity: 1;\n border-color: rgba(209, 213, 219, 1);\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n\n\n.hover\\:bg-blue-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(225, 239, 254, 1);\n background-color: rgb(225 239 254 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-blue-800:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(30, 66, 159, 1);\n background-color: rgb(30 66 159 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(243, 244, 246, 1);\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, 1);\n background-color: rgb(229 231 235 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-gray-50:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(249, 250, 251, 1);\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-red-800:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(155, 28, 28, 1);\n background-color: rgb(155 28 28 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-white:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, 1);\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:text-blue-600:hover {\n --tw-text-opacity: 1;\n color: rgba(28, 100, 242, 1);\n color: rgb(28 100 242 / var(--tw-text-opacity));\n}\n\n\n.hover\\:text-blue-700:hover {\n --tw-text-opacity: 1;\n color: rgba(26, 86, 219, 1);\n color: rgb(26 86 219 / var(--tw-text-opacity));\n}\n\n\n.hover\\:text-gray-600:hover {\n --tw-text-opacity: 1;\n color: rgba(75, 85, 99, 1);\n color: rgb(75 85 99 / var(--tw-text-opacity));\n}\n\n\n.hover\\:text-gray-700:hover {\n --tw-text-opacity: 1;\n color: rgba(55, 65, 81, 1);\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n\n\n.hover\\:text-gray-900:hover {\n --tw-text-opacity: 1;\n color: rgba(17, 24, 39, 1);\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n\n\n.focus\\:border-blue-500:focus {\n --tw-border-opacity: 1;\n border-color: rgba(63, 131, 248, 1);\n border-color: rgb(63 131 248 / var(--tw-border-opacity));\n}\n\n\n.focus\\:border-blue-600:focus {\n --tw-border-opacity: 1;\n border-color: rgba(28, 100, 242, 1);\n border-color: rgb(28 100 242 / var(--tw-border-opacity));\n}\n\n\n.focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n\n.focus\\:ring-2:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color), var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color), 0 0 rgba(0,0,0,0);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n\n.focus\\:ring-4:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color), var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color), 0 0 rgba(0,0,0,0);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n\n.focus\\:ring-blue-300:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(164, 202, 254, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-blue-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(63, 131, 248, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-blue-600:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(28, 100, 242, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-emerald-300:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(110, 231, 183, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-gray-200:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(229, 231, 235, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-gray-300:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(209, 213, 219, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-red-300:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(248, 180, 180, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-teal-300:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(126, 220, 226, var(--tw-ring-opacity));\n}\n\n\n.group:hover .group-hover\\:text-gray-900 {\n --tw-text-opacity: 1;\n color: rgba(17, 24, 39, 1);\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:divide-gray-700 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgba(55, 65, 81, 1);\n border-color: rgb(55 65 81 / var(--tw-divide-opacity));\n}\n\n\n.dark .dark\\:border-blue-500 {\n --tw-border-opacity: 1;\n border-color: rgba(63, 131, 248, 1);\n border-color: rgb(63 131 248 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-gray-500 {\n --tw-border-opacity: 1;\n border-color: rgba(107, 114, 128, 1);\n border-color: rgb(107 114 128 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-gray-600 {\n --tw-border-opacity: 1;\n border-color: rgba(75, 85, 99, 1);\n border-color: rgb(75 85 99 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-gray-700 {\n --tw-border-opacity: 1;\n border-color: rgba(55, 65, 81, 1);\n border-color: rgb(55 65 81 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-gray-800 {\n --tw-border-opacity: 1;\n border-color: rgba(31, 41, 55, 1);\n border-color: rgb(31 41 55 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-gray-900 {\n --tw-border-opacity: 1;\n border-color: rgba(17, 24, 39, 1);\n border-color: rgb(17 24 39 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-transparent {\n border-color: transparent;\n}\n\n\n.dark .dark\\:bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(28, 100, 242, 1);\n background-color: rgb(28 100 242 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-emerald-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(5, 150, 105, 1);\n background-color: rgb(5 150 105 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-gray-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(75, 85, 99, 1);\n background-color: rgb(75 85 99 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-gray-700 {\n --tw-bg-opacity: 1;\n background-color: rgba(55, 65, 81, 1);\n background-color: rgb(55 65 81 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, 1);\n background-color: rgb(31 41 55 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-gray-800\\/50 {\n background-color: rgba(31, 41, 55, 0.5);\n}\n\n\n.dark .dark\\:bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgba(17, 24, 39, 1);\n background-color: rgb(17 24 39 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-green-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(3, 84, 63, 1);\n background-color: rgb(3 84 63 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(224, 36, 36, 1);\n background-color: rgb(224 36 36 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-red-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(155, 28, 28, 1);\n background-color: rgb(155 28 28 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-teal-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(4, 116, 129, 1);\n background-color: rgb(4 116 129 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-opacity-80 {\n --tw-bg-opacity: 0.8;\n}\n\n\n.dark .dark\\:text-blue-500 {\n --tw-text-opacity: 1;\n color: rgba(63, 131, 248, 1);\n color: rgb(63 131 248 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-gray-200 {\n --tw-text-opacity: 1;\n color: rgba(229, 231, 235, 1);\n color: rgb(229 231 235 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-gray-400 {\n --tw-text-opacity: 1;\n color: rgba(156, 163, 175, 1);\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-gray-500 {\n --tw-text-opacity: 1;\n color: rgba(107, 114, 128, 1);\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-green-200 {\n --tw-text-opacity: 1;\n color: rgba(188, 240, 218, 1);\n color: rgb(188 240 218 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-red-200 {\n --tw-text-opacity: 1;\n color: rgba(251, 213, 213, 1);\n color: rgb(251 213 213 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-white {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, 1);\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:placeholder-gray-400::-moz-placeholder {\n --tw-placeholder-opacity: 1;\n color: rgba(156, 163, 175, 1);\n color: rgb(156 163 175 / var(--tw-placeholder-opacity));\n}\n\n\n.dark .dark\\:placeholder-gray-400::placeholder {\n --tw-placeholder-opacity: 1;\n color: rgba(156, 163, 175, 1);\n color: rgb(156 163 175 / var(--tw-placeholder-opacity));\n}\n\n\n.dark .dark\\:hover\\:border-gray-600:hover {\n --tw-border-opacity: 1;\n border-color: rgba(75, 85, 99, 1);\n border-color: rgb(75 85 99 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-blue-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(26, 86, 219, 1);\n background-color: rgb(26 86 219 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-emerald-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(4, 120, 87, 1);\n background-color: rgb(4 120 87 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-gray-600:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(75, 85, 99, 1);\n background-color: rgb(75 85 99 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-gray-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(55, 65, 81, 1);\n background-color: rgb(55 65 81 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-gray-800:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, 1);\n background-color: rgb(31 41 55 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(200, 30, 30, 1);\n background-color: rgb(200 30 30 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-teal-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(3, 102, 114, 1);\n background-color: rgb(3 102 114 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:text-blue-500:hover {\n --tw-text-opacity: 1;\n color: rgba(63, 131, 248, 1);\n color: rgb(63 131 248 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:hover\\:text-gray-300:hover {\n --tw-text-opacity: 1;\n color: rgba(209, 213, 219, 1);\n color: rgb(209 213 219 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:hover\\:text-white:hover {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, 1);\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:focus\\:border-blue-500:focus {\n --tw-border-opacity: 1;\n border-color: rgba(63, 131, 248, 1);\n border-color: rgb(63 131 248 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-blue-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(63, 131, 248, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-blue-800:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(30, 66, 159, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-emerald-800:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(6, 95, 70, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-gray-600:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(75, 85, 99, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-gray-700:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(55, 65, 81, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-red-800:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(155, 28, 28, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-red-900:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(119, 29, 29, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-teal-800:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(5, 80, 92, var(--tw-ring-opacity));\n}\n\n\n.dark .group:hover .dark\\:group-hover\\:text-white {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, 1);\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n\n@media (min-width: 640px) {\n\n .sm\\:col-span-3 {\n grid-column: span 3 / span 3;\n }\n\n .sm\\:w-auto {\n width: auto;\n }\n\n .sm\\:rounded-lg {\n border-radius: 0.5rem;\n }\n\n .sm\\:p-8 {\n padding: 2rem;\n }\n\n .sm\\:text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n }\n}\n\n\n@media (min-width: 768px) {\n\n .md\\:inset-0 {\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n }\n\n .md\\:ml-64 {\n margin-left: 16rem;\n }\n\n .md\\:ml-auto {\n margin-left: auto;\n }\n\n .md\\:mr-24 {\n margin-right: 6rem;\n }\n\n .md\\:mr-64 {\n margin-right: 16rem;\n }\n\n .md\\:inline-block {\n display: inline-block;\n }\n\n .md\\:flex {\n display: flex;\n }\n\n .md\\:hidden {\n display: none;\n }\n\n .md\\:w-auto {\n width: auto;\n }\n\n .md\\:w-full {\n width: 100%;\n }\n\n .md\\:translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(0px, var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n }\n\n .md\\:flex-row {\n flex-direction: row;\n }\n\n .md\\:justify-start {\n justify-content: flex-start;\n }\n\n .md\\:space-x-3 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.75rem * 0);\n margin-right: calc(0.75rem * var(--tw-space-x-reverse));\n margin-left: calc(0.75rem * (1 - 0));\n margin-left: calc(0.75rem * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0.75rem * calc(1 - 0));\n margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));\n }\n\n .md\\:text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n }\n}\n\n\n@media (min-width: 1024px) {\n\n .lg\\:w-4\\/12 {\n width: 33.333333%;\n }\n\n .lg\\:max-w-xl {\n max-width: 36rem;\n }\n\n .lg\\:px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n }\n\n .lg\\:pl-3 {\n padding-left: 0.75rem;\n }\n}\n\n\n.\\[\\&\\>\\*\\]\\:\\!border-none>* {\n border-style: none !important;\n}\n\n\n.\\[\\&\\>\\*\\]\\:\\!stroke-black>* {\n stroke: #000000 !important;\n}\n\n\n.dark .\\[\\&\\>\\*\\]\\:dark\\:bg-gray-600>* {\n --tw-bg-opacity: 1;\n background-color: rgba(75, 85, 99, 1);\n background-color: rgb(75 85 99 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:\\[\\&\\>\\*\\]\\:\\!stroke-white>* {\n stroke: #ffffff !important;\n}", "",{"version":3,"sources":["webpack://./src/styles.css",""],"names":[],"mappings":"AAAA;;CAAc,CAAd;;;CAAc;;AAAd;;;EAAA,sBAAc,EAAd,MAAc;EAAd,eAAc,EAAd,MAAc;EAAd,mBAAc,EAAd,MAAc;EAAd,qBAAc,EAAd,MAAc;AAAA;;AAAd;;EAAA,gBAAc;AAAA;;AAAd;;;;;;;CAAc;;AAAd;EAAA,gBAAc,EAAd,MAAc;EAAd,8BAAc,EAAd,MAAc;EAAd,gBAAc,EAAd,MAAc;EAAd,cAAc;KAAd,WAAc,EAAd,MAAc;EAAd,wRAAc,EAAd,MAAc;EAAd,6BAAc,EAAd,MAAc;EAAd,+BAAc,EAAd,MAAc;AAAA;;AAAd;;;CAAc;;AAAd;EAAA,SAAc,EAAd,MAAc;EAAd,oBAAc,EAAd,MAAc;AAAA;;AAAd;;;;CAAc;;AAAd;EAAA,SAAc,EAAd,MAAc;EAAd,cAAc,EAAd,MAAc;EAAd,qBAAc,EAAd,MAAc;AAAA;;AAAd;;CAAc;;AAAd;EAAA,0BAAc;E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GCAA;;EDAA;IAAA,wBCAA;IDAA,gCCAA;IDAA,wDCAA;IDAA,qCCAA;IDAA,6DCAA;IDAA,yCCAA;IDAA;GCAA;;EDAA;IAAA,oBCAA;IDAA;GCAA;CAAA;;;ADAA;;EAAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA,sBCAA;IDAA;GCAA;;EDAA;IAAA;GCAA;CAAA;;;ADAA;EAAA;CCAA;;;ADAA;EAAA;CCAA;;;ADAA;EAAA,mBCAA;EDAA,sCCAA;EDAA;CCAA;;;ADAA;EAAA;CCAA","sourcesContent":["@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n\n.text-danger {\n color: red;\n}",null],"sourceRoot":""}]); +___CSS_LOADER_EXPORT___.push([module.id, "/*\n! tailwindcss v3.3.1 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #E5E7EB; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n*/\n\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font family by default.\n2. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\n[type='button'],\n[type='reset'],\n[type='submit'] {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9CA3AF; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9CA3AF; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background-color: #fff;\n border-color: #6B7280;\n border-width: 1px;\n border-radius: 0px;\n padding-top: 0.5rem;\n padding-right: 0.75rem;\n padding-bottom: 0.5rem;\n padding-left: 0.75rem;\n font-size: 1rem;\n line-height: 1.5rem;\n --tw-shadow: 0 0 rgba(0,0,0,0);\n}\n\n[type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #1C64F2;\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: /*!*/ /*!*/ 0 0 0 0px #fff, /*!*/ /*!*/ 0 0 0 calc(1px + 0px) #1C64F2, var(--tw-shadow);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n border-color: #1C64F2;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #6B7280;\n opacity: 1;\n}\n\ninput::placeholder,textarea::placeholder {\n color: #6B7280;\n opacity: 1;\n}\n\n::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n}\n\n::-webkit-date-and-time-value {\n min-height: 1.5em;\n}\n\nselect:not([size]) {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ");\n background-position: right 0.5rem center;\n background-repeat: no-repeat;\n background-size: 1.5em 1.5em;\n padding-right: 2.5rem;\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n}\n\n[multiple] {\n background-image: none;\n background-image: initial;\n background-position: 0 0;\n background-position: initial;\n background-repeat: repeat;\n background-repeat: initial;\n background-size: auto auto;\n background-size: initial;\n padding-right: 0.75rem;\n -webkit-print-color-adjust: inherit;\n print-color-adjust: inherit;\n}\n\n[type='checkbox'],[type='radio'] {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n padding: 0;\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n display: inline-block;\n vertical-align: middle;\n background-origin: border-box;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n flex-shrink: 0;\n height: 1rem;\n width: 1rem;\n color: #1C64F2;\n background-color: #fff;\n border-color: #6B7280;\n border-width: 1px;\n --tw-shadow: 0 0 rgba(0,0,0,0);\n}\n\n[type='checkbox'] {\n border-radius: 0px;\n}\n\n[type='radio'] {\n border-radius: 100%;\n}\n\n[type='checkbox']:focus,[type='radio']:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 2px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #1C64F2;\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: /*!*/ /*!*/ 0 0 0 2px #fff, /*!*/ /*!*/ 0 0 0 calc(2px + 2px) #1C64F2, var(--tw-shadow);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n\n[type='checkbox']:checked,[type='radio']:checked,.dark [type='checkbox']:checked,.dark [type='radio']:checked {\n border-color: transparent;\n background-color: currentColor;\n background-size: 100% 100%;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n[type='checkbox']:checked {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_1___ + ");\n}\n\n[type='radio']:checked {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_2___ + ");\n}\n\n[type='checkbox']:indeterminate {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_3___ + ");\n border-color: transparent;\n background-color: currentColor;\n background-size: 100% 100%;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus {\n border-color: transparent;\n background-color: currentColor;\n}\n\n[type='file'] {\n background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;\n background: initial;\n border-color: inherit;\n border-width: 0;\n border-radius: 0;\n padding: 0;\n font-size: inherit;\n line-height: inherit;\n}\n\n[type='file']:focus {\n outline: 1px auto inherit;\n}\n\ninput[type=file]::file-selector-button {\n color: white;\n background: #1F2937;\n border: 0;\n font-weight: 500;\n font-size: 0.875rem;\n cursor: pointer;\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n padding-left: 2rem;\n padding-right: 1rem;\n margin-left: -1rem;\n margin-right: 1rem;\n}\n\ninput[type=file]::file-selector-button:hover {\n background: #374151;\n}\n\n.dark input[type=file]::file-selector-button {\n color: white;\n background: #4B5563;\n}\n\n.dark input[type=file]::file-selector-button:hover {\n background: #6B7280;\n}\n\ninput[type=\"range\"]::-webkit-slider-thumb {\n height: 1.25rem;\n width: 1.25rem;\n background: #1C64F2;\n border-radius: 9999px;\n border: 0;\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n cursor: pointer;\n}\n\ninput[type=\"range\"]:disabled::-webkit-slider-thumb {\n background: #9CA3AF;\n}\n\n.dark input[type=\"range\"]:disabled::-webkit-slider-thumb {\n background: #6B7280;\n}\n\ninput[type=\"range\"]:focus::-webkit-slider-thumb {\n outline: 2px solid transparent;\n outline-offset: 2px;\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color), var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) rgb(164 202 254 / 1px), 0 0 rgba(0,0,0,0);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n --tw-ring-opacity: 1px;\n --tw-ring-color: rgba(164, 202, 254, var(--tw-ring-opacity));\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n height: 1.25rem;\n width: 1.25rem;\n background: #1C64F2;\n border-radius: 9999px;\n border: 0;\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n cursor: pointer;\n}\n\ninput[type=\"range\"]:disabled::-moz-range-thumb {\n background: #9CA3AF;\n}\n\n.dark input[type=\"range\"]:disabled::-moz-range-thumb {\n background: #6B7280;\n}\n\ninput[type=\"range\"]::-moz-range-progress {\n background: #3F83F8;\n}\n\ninput[type=\"range\"]::-ms-fill-lower {\n background: #3F83F8;\n}\n\n.toggle-bg:after {\n content: \"\";\n position: absolute;\n top: 0.125rem;\n left: 0.125rem;\n background: white;\n border-color: #D1D5DB;\n border-width: 1px;\n border-radius: 9999px;\n height: 1.25rem;\n width: 1.25rem;\n transition-property: background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;\n transition-duration: .15s;\n box-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n}\n\ninput:checked + .toggle-bg:after {\n transform: translateX(100%);;\n border-color: white;\n}\n\ninput:checked + .toggle-bg {\n background: #1C64F2;\n border-color: #1C64F2;\n}\n\n.tooltip-arrow,.tooltip-arrow:before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n}\n\n.tooltip-arrow {\n visibility: hidden;\n}\n\n.tooltip-arrow:before {\n content: \"\";\n visibility: visible;\n transform: rotate(45deg);\n}\n\n[data-tooltip-style^='light'] + .tooltip > .tooltip-arrow:before {\n border-style: solid;\n border-color: #e5e7eb;\n}\n\n[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='top'] > .tooltip-arrow:before {\n border-bottom-width: 1px;\n border-right-width: 1px;\n}\n\n[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='right'] > .tooltip-arrow:before {\n border-bottom-width: 1px;\n border-left-width: 1px;\n}\n\n[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='bottom'] > .tooltip-arrow:before {\n border-top-width: 1px;\n border-left-width: 1px;\n}\n\n[data-tooltip-style^='light'] + .tooltip[data-popper-placement^='left'] > .tooltip-arrow:before {\n border-top-width: 1px;\n border-right-width: 1px;\n}\n\n.tooltip[data-popper-placement^='top'] > .tooltip-arrow {\n bottom: -4px;\n}\n\n.tooltip[data-popper-placement^='bottom'] > .tooltip-arrow {\n top: -4px;\n}\n\n.tooltip[data-popper-placement^='left'] > .tooltip-arrow {\n right: -4px;\n}\n\n.tooltip[data-popper-placement^='right'] > .tooltip-arrow {\n left: -4px;\n}\n\n.tooltip.invisible > .tooltip-arrow:before {\n visibility: hidden;\n}\n\n[data-popper-arrow],[data-popper-arrow]:before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n}\n\n[data-popper-arrow] {\n visibility: hidden;\n}\n\n[data-popper-arrow]:before {\n content: \"\";\n visibility: visible;\n transform: rotate(45deg);\n}\n\n[data-popper-arrow]:after {\n content: \"\";\n visibility: visible;\n transform: rotate(45deg);\n position: absolute;\n width: 9px;\n height: 9px;\n background: inherit;\n}\n\n[role=\"tooltip\"] > [data-popper-arrow]:before {\n border-style: solid;\n border-color: #e5e7eb;\n}\n\n.dark [role=\"tooltip\"] > [data-popper-arrow]:before {\n border-style: solid;\n border-color: #4b5563;\n}\n\n[role=\"tooltip\"] > [data-popper-arrow]:after {\n border-style: solid;\n border-color: #e5e7eb;\n}\n\n.dark [role=\"tooltip\"] > [data-popper-arrow]:after {\n border-style: solid;\n border-color: #4b5563;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='top'] > [data-popper-arrow]:before {\n border-bottom-width: 1px;\n border-right-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='top'] > [data-popper-arrow]:after {\n border-bottom-width: 1px;\n border-right-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='right'] > [data-popper-arrow]:before {\n border-bottom-width: 1px;\n border-left-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='right'] > [data-popper-arrow]:after {\n border-bottom-width: 1px;\n border-left-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='bottom'] > [data-popper-arrow]:before {\n border-top-width: 1px;\n border-left-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='bottom'] > [data-popper-arrow]:after {\n border-top-width: 1px;\n border-left-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='left'] > [data-popper-arrow]:before {\n border-top-width: 1px;\n border-right-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='left'] > [data-popper-arrow]:after {\n border-top-width: 1px;\n border-right-width: 1px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='top'] > [data-popper-arrow] {\n bottom: -5px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='bottom'] > [data-popper-arrow] {\n top: -5px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='left'] > [data-popper-arrow] {\n right: -5px;\n}\n\n[data-popover][role=\"tooltip\"][data-popper-placement^='right'] > [data-popper-arrow] {\n left: -5px;\n}\n\n[role=\"tooltip\"].invisible > [data-popper-arrow]:before {\n visibility: hidden;\n}\n\n[role=\"tooltip\"].invisible > [data-popper-arrow]:after {\n visibility: hidden;\n}\n\n*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(63, 131, 248, 0.5);\n --tw-ring-offset-shadow: 0 0 rgba(0,0,0,0);\n --tw-ring-shadow: 0 0 rgba(0,0,0,0);\n --tw-shadow: 0 0 rgba(0,0,0,0);\n --tw-shadow-colored: 0 0 rgba(0,0,0,0);\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(63, 131, 248, 0.5);\n --tw-ring-offset-shadow: 0 0 rgba(0,0,0,0);\n --tw-ring-shadow: 0 0 rgba(0,0,0,0);\n --tw-shadow: 0 0 rgba(0,0,0,0);\n --tw-shadow-colored: 0 0 rgba(0,0,0,0);\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n.pointer-events-none {\n pointer-events: none;\n}\n.visible {\n visibility: visible;\n}\n.invisible {\n visibility: hidden;\n}\n.collapse {\n visibility: collapse;\n}\n.static {\n position: static;\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.inset-0 {\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n.inset-y-0 {\n top: 0px;\n bottom: 0px;\n}\n.-top-2 {\n top: -0.5rem;\n}\n.bottom-0 {\n bottom: 0px;\n}\n.bottom-2 {\n bottom: 0.5rem;\n}\n.bottom-2\\.5 {\n bottom: 0.625rem;\n}\n.bottom-3 {\n bottom: 0.75rem;\n}\n.bottom-\\[60px\\] {\n bottom: 60px;\n}\n.left-0 {\n left: 0px;\n}\n.left-10 {\n left: 2.5rem;\n}\n.left-3 {\n left: 0.75rem;\n}\n.left-auto {\n left: auto;\n}\n.right-0 {\n right: 0px;\n}\n.right-2 {\n right: 0.5rem;\n}\n.right-2\\.5 {\n right: 0.625rem;\n}\n.right-3 {\n right: 0.75rem;\n}\n.top-0 {\n top: 0px;\n}\n.top-10 {\n top: 2.5rem;\n}\n.z-10 {\n z-index: 10;\n}\n.z-20 {\n z-index: 20;\n}\n.z-30 {\n z-index: 30;\n}\n.z-40 {\n z-index: 40;\n}\n.z-50 {\n z-index: 50;\n}\n.col-span-6 {\n grid-column: span 6 / span 6;\n}\n.col-span-full {\n grid-column: 1 / -1;\n}\n.m-3 {\n margin: 0.75rem;\n}\n.-mx-1 {\n margin-left: -0.25rem;\n margin-right: -0.25rem;\n}\n.-mx-1\\.5 {\n margin-left: -0.375rem;\n margin-right: -0.375rem;\n}\n.-my-1 {\n margin-top: -0.25rem;\n margin-bottom: -0.25rem;\n}\n.-my-1\\.5 {\n margin-top: -0.375rem;\n margin-bottom: -0.375rem;\n}\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n.my-2 {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}\n.my-4 {\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n.-mb-px {\n margin-bottom: -1px;\n}\n.-mr-1 {\n margin-right: -0.25rem;\n}\n.-mt-5 {\n margin-top: -1.25rem;\n}\n.mb-0 {\n margin-bottom: 0px;\n}\n.mb-1 {\n margin-bottom: 0.25rem;\n}\n.mb-1\\.5 {\n margin-bottom: 0.375rem;\n}\n.mb-2 {\n margin-bottom: 0.5rem;\n}\n.mb-3 {\n margin-bottom: 0.75rem;\n}\n.mb-4 {\n margin-bottom: 1rem;\n}\n.ml-0 {\n margin-left: 0px;\n}\n.ml-2 {\n margin-left: 0.5rem;\n}\n.ml-3 {\n margin-left: 0.75rem;\n}\n.ml-4 {\n margin-left: 1rem;\n}\n.ml-5 {\n margin-left: 1.25rem;\n}\n.ml-6 {\n margin-left: 1.5rem;\n}\n.ml-auto {\n margin-left: auto;\n}\n.mr-1 {\n margin-right: 0.25rem;\n}\n.mr-2 {\n margin-right: 0.5rem;\n}\n.mr-3 {\n margin-right: 0.75rem;\n}\n.mr-64 {\n margin-right: 16rem;\n}\n.mt-1 {\n margin-top: 0.25rem;\n}\n.mt-16 {\n margin-top: 4rem;\n}\n.mt-2 {\n margin-top: 0.5rem;\n}\n.mt-3 {\n margin-top: 0.75rem;\n}\n.mt-4 {\n margin-top: 1rem;\n}\n.mt-5 {\n margin-top: 1.25rem;\n}\n.mt-8 {\n margin-top: 2rem;\n}\n.block {\n display: block;\n}\n.inline-block {\n display: inline-block;\n}\n.inline {\n display: inline;\n}\n.flex {\n display: flex;\n}\n.inline-flex {\n display: inline-flex;\n}\n.table {\n display: table;\n}\n.grid {\n display: grid;\n}\n.hidden {\n display: none;\n}\n.h-11 {\n height: 2.75rem;\n}\n.h-2 {\n height: 0.5rem;\n}\n.h-2\\.5 {\n height: 0.625rem;\n}\n.h-3 {\n height: 0.75rem;\n}\n.h-4 {\n height: 1rem;\n}\n.h-5 {\n height: 1.25rem;\n}\n.h-6 {\n height: 1.5rem;\n}\n.h-8 {\n height: 2rem;\n}\n.h-80 {\n height: 20rem;\n}\n.h-\\[calc\\(100\\%-1rem\\)\\] {\n height: calc(100% - 1rem);\n}\n.h-full {\n height: 100%;\n}\n.h-screen {\n height: 100vh;\n}\n.max-h-full {\n max-height: 100%;\n}\n.w-1\\/2 {\n width: 50%;\n}\n.w-11 {\n width: 2.75rem;\n}\n.w-11\\/12 {\n width: 91.666667%;\n}\n.w-2 {\n width: 0.5rem;\n}\n.w-2\\.5 {\n width: 0.625rem;\n}\n.w-3 {\n width: 0.75rem;\n}\n.w-4 {\n width: 1rem;\n}\n.w-44 {\n width: 11rem;\n}\n.w-5 {\n width: 1.25rem;\n}\n.w-6 {\n width: 1.5rem;\n}\n.w-64 {\n width: 16rem;\n}\n.w-8 {\n width: 2rem;\n}\n.w-80 {\n width: 20rem;\n}\n.w-full {\n width: 100%;\n}\n.max-w-2xl {\n max-width: 42rem;\n}\n.max-w-6xl {\n max-width: 72rem;\n}\n.max-w-full {\n max-width: 100%;\n}\n.max-w-sm {\n max-width: 24rem;\n}\n.max-w-xs {\n max-width: 20rem;\n}\n.flex-1 {\n flex: 1 1 0%;\n}\n.flex-shrink {\n flex-shrink: 1;\n}\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n.-translate-x-full {\n --tw-translate-x: -100%;\n transform: translate(-100%, var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.-translate-y-full {\n --tw-translate-y: -100%;\n transform: translate(var(--tw-translate-x), -100%) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(0px, var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-96 {\n --tw-translate-x: 24rem;\n transform: translate(24rem, var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-full {\n --tw-translate-x: 100%;\n transform: translate(100%, var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-y-full {\n --tw-translate-y: 100%;\n transform: translate(var(--tw-translate-x), 100%) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.rotate-180 {\n --tw-rotate: 180deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(180deg) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform-none {\n transform: none;\n}\n.cursor-default {\n cursor: default;\n}\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.resize {\n resize: both;\n}\n.grid-cols-4 {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n}\n.grid-cols-6 {\n grid-template-columns: repeat(6, minmax(0, 1fr));\n}\n.grid-cols-7 {\n grid-template-columns: repeat(7, minmax(0, 1fr));\n}\n.flex-col {\n flex-direction: column;\n}\n.flex-wrap {\n flex-wrap: wrap;\n}\n.content-center {\n align-content: center;\n}\n.items-start {\n align-items: flex-start;\n}\n.items-end {\n align-items: flex-end;\n}\n.items-center {\n align-items: center;\n}\n.justify-start {\n justify-content: flex-start;\n}\n.justify-end {\n justify-content: flex-end;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-2 {\n gap: 0.5rem;\n}\n.gap-6 {\n gap: 1.5rem;\n}\n.-space-x-px > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(-1px * 0);\n margin-right: calc(-1px * var(--tw-space-x-reverse));\n margin-left: calc(-1px * (1 - 0));\n margin-left: calc(-1px * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(-1px * calc(1 - 0));\n margin-left: calc(-1px * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-0 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0px * 0);\n margin-right: calc(0px * var(--tw-space-x-reverse));\n margin-left: calc(0px * (1 - 0));\n margin-left: calc(0px * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0px * calc(1 - 0));\n margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-0\\.5 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.125rem * 0);\n margin-right: calc(0.125rem * var(--tw-space-x-reverse));\n margin-left: calc(0.125rem * (1 - 0));\n margin-left: calc(0.125rem * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0.125rem * calc(1 - 0));\n margin-left: calc(0.125rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-1 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.25rem * 0);\n margin-right: calc(0.25rem * var(--tw-space-x-reverse));\n margin-left: calc(0.25rem * (1 - 0));\n margin-left: calc(0.25rem * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0.25rem * calc(1 - 0));\n margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * 0);\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * (1 - 0));\n margin-left: calc(0.5rem * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0.5rem * calc(1 - 0));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-3 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.75rem * 0);\n margin-right: calc(0.75rem * var(--tw-space-x-reverse));\n margin-left: calc(0.75rem * (1 - 0));\n margin-left: calc(0.75rem * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0.75rem * calc(1 - 0));\n margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-y-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.5rem * (1 - 0));\n margin-top: calc(0.5rem * (1 - var(--tw-space-y-reverse)));\n margin-top: calc(0.5rem * calc(1 - 0));\n margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.5rem * 0);\n margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));\n}\n.space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * (1 - 0));\n margin-top: calc(1rem * (1 - var(--tw-space-y-reverse)));\n margin-top: calc(1rem * calc(1 - 0));\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * 0);\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.space-y-6 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1.5rem * (1 - 0));\n margin-top: calc(1.5rem * (1 - var(--tw-space-y-reverse)));\n margin-top: calc(1.5rem * calc(1 - 0));\n margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1.5rem * 0);\n margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));\n}\n.space-y-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(2rem * (1 - 0));\n margin-top: calc(2rem * (1 - var(--tw-space-y-reverse)));\n margin-top: calc(2rem * calc(1 - 0));\n margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(2rem * 0);\n margin-bottom: calc(2rem * var(--tw-space-y-reverse));\n}\n.divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * (1 - 0));\n border-top-width: calc(1px * (1 - var(--tw-divide-y-reverse)));\n border-top-width: calc(1px * calc(1 - 0));\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * 0);\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.divide-gray-100 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgba(243, 244, 246, 1);\n border-color: rgb(243 244 246 / var(--tw-divide-opacity));\n}\n.divide-gray-200 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgba(229, 231, 235, 1);\n border-color: rgb(229 231 235 / var(--tw-divide-opacity));\n}\n.self-center {\n align-self: center;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-x-auto {\n overflow-x: auto;\n}\n.overflow-y-auto {\n overflow-y: auto;\n}\n.overflow-x-hidden {\n overflow-x: hidden;\n}\n.whitespace-nowrap {\n white-space: nowrap;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-lg {\n border-radius: 0.5rem;\n}\n.rounded-md {\n border-radius: 0.375rem;\n}\n.rounded-xl {\n border-radius: 0.75rem;\n}\n.rounded-b {\n border-bottom-right-radius: 0.25rem;\n border-bottom-left-radius: 0.25rem;\n}\n.rounded-b-lg {\n border-bottom-right-radius: 0.5rem;\n border-bottom-left-radius: 0.5rem;\n}\n.rounded-l-lg {\n border-top-left-radius: 0.5rem;\n border-bottom-left-radius: 0.5rem;\n}\n.rounded-r-lg {\n border-top-right-radius: 0.5rem;\n border-bottom-right-radius: 0.5rem;\n}\n.rounded-t {\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem;\n}\n.rounded-t-lg {\n border-top-left-radius: 0.5rem;\n border-top-right-radius: 0.5rem;\n}\n.border {\n border-width: 1px;\n}\n.border-0 {\n border-width: 0px;\n}\n.border-2 {\n border-width: 2px;\n}\n.border-b {\n border-bottom-width: 1px;\n}\n.border-b-2 {\n border-bottom-width: 2px;\n}\n.border-r {\n border-right-width: 1px;\n}\n.border-t {\n border-top-width: 1px;\n}\n.border-solid {\n border-style: solid;\n}\n.border-blue-300 {\n --tw-border-opacity: 1;\n border-color: rgba(164, 202, 254, 1);\n border-color: rgb(164 202 254 / var(--tw-border-opacity));\n}\n.border-blue-600 {\n --tw-border-opacity: 1;\n border-color: rgba(28, 100, 242, 1);\n border-color: rgb(28 100 242 / var(--tw-border-opacity));\n}\n.border-blue-700 {\n --tw-border-opacity: 1;\n border-color: rgba(26, 86, 219, 1);\n border-color: rgb(26 86 219 / var(--tw-border-opacity));\n}\n.border-gray-100 {\n --tw-border-opacity: 1;\n border-color: rgba(243, 244, 246, 1);\n border-color: rgb(243 244 246 / var(--tw-border-opacity));\n}\n.border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, 1);\n border-color: rgb(229 231 235 / var(--tw-border-opacity));\n}\n.border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgba(209, 213, 219, 1);\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.border-transparent {\n border-color: transparent;\n}\n.border-white {\n --tw-border-opacity: 1;\n border-color: rgba(255, 255, 255, 1);\n border-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n.bg-blue-50 {\n --tw-bg-opacity: 1;\n background-color: rgba(235, 245, 255, 1);\n background-color: rgb(235 245 255 / var(--tw-bg-opacity));\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(28, 100, 242, 1);\n background-color: rgb(28 100 242 / var(--tw-bg-opacity));\n}\n.bg-blue-700 {\n --tw-bg-opacity: 1;\n background-color: rgba(26, 86, 219, 1);\n background-color: rgb(26 86 219 / var(--tw-bg-opacity));\n}\n.bg-emerald-700 {\n --tw-bg-opacity: 1;\n background-color: rgba(4, 120, 87, 1);\n background-color: rgb(4 120 87 / var(--tw-bg-opacity));\n}\n.bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgba(243, 244, 246, 1);\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, 1);\n background-color: rgb(229 231 235 / var(--tw-bg-opacity));\n}\n.bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgba(249, 250, 251, 1);\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, 1);\n background-color: rgb(31 41 55 / var(--tw-bg-opacity));\n}\n.bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgba(17, 24, 39, 1);\n background-color: rgb(17 24 39 / var(--tw-bg-opacity));\n}\n.bg-green-100 {\n --tw-bg-opacity: 1;\n background-color: rgba(222, 247, 236, 1);\n background-color: rgb(222 247 236 / var(--tw-bg-opacity));\n}\n.bg-green-400 {\n --tw-bg-opacity: 1;\n background-color: rgba(49, 196, 141, 1);\n background-color: rgb(49 196 141 / var(--tw-bg-opacity));\n}\n.bg-red-100 {\n --tw-bg-opacity: 1;\n background-color: rgba(253, 232, 232, 1);\n background-color: rgb(253 232 232 / var(--tw-bg-opacity));\n}\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgba(240, 82, 82, 1);\n background-color: rgb(240 82 82 / var(--tw-bg-opacity));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(224, 36, 36, 1);\n background-color: rgb(224 36 36 / var(--tw-bg-opacity));\n}\n.bg-red-700 {\n --tw-bg-opacity: 1;\n background-color: rgba(200, 30, 30, 1);\n background-color: rgb(200 30 30 / var(--tw-bg-opacity));\n}\n.bg-teal-700 {\n --tw-bg-opacity: 1;\n background-color: rgba(3, 102, 114, 1);\n background-color: rgb(3 102 114 / var(--tw-bg-opacity));\n}\n.bg-transparent {\n background-color: transparent;\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, 1);\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.bg-white\\/50 {\n background-color: rgba(255, 255, 255, 0.5);\n}\n.bg-opacity-50 {\n --tw-bg-opacity: 0.5;\n}\n.p-0 {\n padding: 0px;\n}\n.p-1 {\n padding: 0.25rem;\n}\n.p-1\\.5 {\n padding: 0.375rem;\n}\n.p-2 {\n padding: 0.5rem;\n}\n.p-2\\.5 {\n padding: 0.625rem;\n}\n.p-3 {\n padding: 0.75rem;\n}\n.p-4 {\n padding: 1rem;\n}\n.p-5 {\n padding: 1.25rem;\n}\n.p-6 {\n padding: 1.5rem;\n}\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-1\\.5 {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n.py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.pb-2 {\n padding-bottom: 0.5rem;\n}\n.pb-3 {\n padding-bottom: 0.75rem;\n}\n.pb-4 {\n padding-bottom: 1rem;\n}\n.pl-10 {\n padding-left: 2.5rem;\n}\n.pl-3 {\n padding-left: 0.75rem;\n}\n.pt-0 {\n padding-top: 0px;\n}\n.pt-2 {\n padding-top: 0.5rem;\n}\n.pt-20 {\n padding-top: 5rem;\n}\n.pt-28 {\n padding-top: 7rem;\n}\n.pt-6 {\n padding-top: 1.5rem;\n}\n.text-left {\n text-align: left;\n}\n.text-center {\n text-align: center;\n}\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.font-bold {\n font-weight: 700;\n}\n.font-extrabold {\n font-weight: 800;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-normal {\n font-weight: 400;\n}\n.font-semibold {\n font-weight: 600;\n}\n.uppercase {\n text-transform: uppercase;\n}\n.leading-6 {\n line-height: 1.5rem;\n}\n.leading-9 {\n line-height: 2.25rem;\n}\n.leading-tight {\n line-height: 1.25;\n}\n.text-black {\n --tw-text-opacity: 1;\n color: rgba(0, 0, 0, 1);\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n.text-blue-600 {\n --tw-text-opacity: 1;\n color: rgba(28, 100, 242, 1);\n color: rgb(28 100 242 / var(--tw-text-opacity));\n}\n.text-gray-400 {\n --tw-text-opacity: 1;\n color: rgba(156, 163, 175, 1);\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgba(107, 114, 128, 1);\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.text-gray-700 {\n --tw-text-opacity: 1;\n color: rgba(55, 65, 81, 1);\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n.text-gray-900 {\n --tw-text-opacity: 1;\n color: rgba(17, 24, 39, 1);\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.text-green-500 {\n --tw-text-opacity: 1;\n color: rgba(14, 159, 110, 1);\n color: rgb(14 159 110 / var(--tw-text-opacity));\n}\n.text-red-500 {\n --tw-text-opacity: 1;\n color: rgba(240, 82, 82, 1);\n color: rgb(240 82 82 / var(--tw-text-opacity));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, 1);\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.opacity-0 {\n opacity: 0;\n}\n.opacity-100 {\n opacity: 1;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: 0 0 rgba(0,0,0,0), 0 0 rgba(0,0,0,0), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.outline {\n outline-style: solid;\n}\n.blur {\n --tw-blur: blur(8px);\n filter: blur(8px) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-transform {\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-75 {\n transition-duration: 75ms;\n}\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n\n\n.text-danger {\n color: red;\n}\n\n\n.hover\\:border-gray-300:hover {\n --tw-border-opacity: 1;\n border-color: rgba(209, 213, 219, 1);\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n\n\n.hover\\:bg-blue-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(225, 239, 254, 1);\n background-color: rgb(225 239 254 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-blue-800:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(30, 66, 159, 1);\n background-color: rgb(30 66 159 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(243, 244, 246, 1);\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, 1);\n background-color: rgb(229 231 235 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-gray-50:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(249, 250, 251, 1);\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-red-800:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(155, 28, 28, 1);\n background-color: rgb(155 28 28 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:bg-white:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, 1);\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n\n.hover\\:text-blue-600:hover {\n --tw-text-opacity: 1;\n color: rgba(28, 100, 242, 1);\n color: rgb(28 100 242 / var(--tw-text-opacity));\n}\n\n\n.hover\\:text-blue-700:hover {\n --tw-text-opacity: 1;\n color: rgba(26, 86, 219, 1);\n color: rgb(26 86 219 / var(--tw-text-opacity));\n}\n\n\n.hover\\:text-gray-600:hover {\n --tw-text-opacity: 1;\n color: rgba(75, 85, 99, 1);\n color: rgb(75 85 99 / var(--tw-text-opacity));\n}\n\n\n.hover\\:text-gray-700:hover {\n --tw-text-opacity: 1;\n color: rgba(55, 65, 81, 1);\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n\n\n.hover\\:text-gray-900:hover {\n --tw-text-opacity: 1;\n color: rgba(17, 24, 39, 1);\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n\n\n.focus\\:border-blue-500:focus {\n --tw-border-opacity: 1;\n border-color: rgba(63, 131, 248, 1);\n border-color: rgb(63 131 248 / var(--tw-border-opacity));\n}\n\n\n.focus\\:border-blue-600:focus {\n --tw-border-opacity: 1;\n border-color: rgba(28, 100, 242, 1);\n border-color: rgb(28 100 242 / var(--tw-border-opacity));\n}\n\n\n.focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n\n.focus\\:ring-2:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color), var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color), 0 0 rgba(0,0,0,0);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n\n.focus\\:ring-4:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color), var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color), 0 0 rgba(0,0,0,0);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n\n.focus\\:ring-blue-300:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(164, 202, 254, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-blue-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(63, 131, 248, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-blue-600:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(28, 100, 242, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-emerald-300:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(110, 231, 183, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-gray-200:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(229, 231, 235, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-gray-300:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(209, 213, 219, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-red-300:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(248, 180, 180, var(--tw-ring-opacity));\n}\n\n\n.focus\\:ring-teal-300:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(126, 220, 226, var(--tw-ring-opacity));\n}\n\n\n.group:hover .group-hover\\:text-gray-900 {\n --tw-text-opacity: 1;\n color: rgba(17, 24, 39, 1);\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:divide-gray-700 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgba(55, 65, 81, 1);\n border-color: rgb(55 65 81 / var(--tw-divide-opacity));\n}\n\n\n.dark .dark\\:border-blue-500 {\n --tw-border-opacity: 1;\n border-color: rgba(63, 131, 248, 1);\n border-color: rgb(63 131 248 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-gray-500 {\n --tw-border-opacity: 1;\n border-color: rgba(107, 114, 128, 1);\n border-color: rgb(107 114 128 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-gray-600 {\n --tw-border-opacity: 1;\n border-color: rgba(75, 85, 99, 1);\n border-color: rgb(75 85 99 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-gray-700 {\n --tw-border-opacity: 1;\n border-color: rgba(55, 65, 81, 1);\n border-color: rgb(55 65 81 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-gray-800 {\n --tw-border-opacity: 1;\n border-color: rgba(31, 41, 55, 1);\n border-color: rgb(31 41 55 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-gray-900 {\n --tw-border-opacity: 1;\n border-color: rgba(17, 24, 39, 1);\n border-color: rgb(17 24 39 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:border-transparent {\n border-color: transparent;\n}\n\n\n.dark .dark\\:bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(28, 100, 242, 1);\n background-color: rgb(28 100 242 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-emerald-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(5, 150, 105, 1);\n background-color: rgb(5 150 105 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-gray-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(75, 85, 99, 1);\n background-color: rgb(75 85 99 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-gray-700 {\n --tw-bg-opacity: 1;\n background-color: rgba(55, 65, 81, 1);\n background-color: rgb(55 65 81 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, 1);\n background-color: rgb(31 41 55 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-gray-800\\/50 {\n background-color: rgba(31, 41, 55, 0.5);\n}\n\n\n.dark .dark\\:bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgba(17, 24, 39, 1);\n background-color: rgb(17 24 39 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-green-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(3, 84, 63, 1);\n background-color: rgb(3 84 63 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(224, 36, 36, 1);\n background-color: rgb(224 36 36 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-red-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(155, 28, 28, 1);\n background-color: rgb(155 28 28 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-teal-600 {\n --tw-bg-opacity: 1;\n background-color: rgba(4, 116, 129, 1);\n background-color: rgb(4 116 129 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:bg-opacity-80 {\n --tw-bg-opacity: 0.8;\n}\n\n\n.dark .dark\\:text-blue-500 {\n --tw-text-opacity: 1;\n color: rgba(63, 131, 248, 1);\n color: rgb(63 131 248 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-gray-200 {\n --tw-text-opacity: 1;\n color: rgba(229, 231, 235, 1);\n color: rgb(229 231 235 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-gray-400 {\n --tw-text-opacity: 1;\n color: rgba(156, 163, 175, 1);\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-gray-500 {\n --tw-text-opacity: 1;\n color: rgba(107, 114, 128, 1);\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-green-200 {\n --tw-text-opacity: 1;\n color: rgba(188, 240, 218, 1);\n color: rgb(188 240 218 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-red-200 {\n --tw-text-opacity: 1;\n color: rgba(251, 213, 213, 1);\n color: rgb(251 213 213 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:text-white {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, 1);\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:placeholder-gray-400::-moz-placeholder {\n --tw-placeholder-opacity: 1;\n color: rgba(156, 163, 175, 1);\n color: rgb(156 163 175 / var(--tw-placeholder-opacity));\n}\n\n\n.dark .dark\\:placeholder-gray-400::placeholder {\n --tw-placeholder-opacity: 1;\n color: rgba(156, 163, 175, 1);\n color: rgb(156 163 175 / var(--tw-placeholder-opacity));\n}\n\n\n.dark .dark\\:hover\\:border-gray-600:hover {\n --tw-border-opacity: 1;\n border-color: rgba(75, 85, 99, 1);\n border-color: rgb(75 85 99 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-blue-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(26, 86, 219, 1);\n background-color: rgb(26 86 219 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-emerald-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(4, 120, 87, 1);\n background-color: rgb(4 120 87 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-gray-600:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(75, 85, 99, 1);\n background-color: rgb(75 85 99 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-gray-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(55, 65, 81, 1);\n background-color: rgb(55 65 81 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-gray-800:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, 1);\n background-color: rgb(31 41 55 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(200, 30, 30, 1);\n background-color: rgb(200 30 30 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:bg-teal-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgba(3, 102, 114, 1);\n background-color: rgb(3 102 114 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:hover\\:text-blue-500:hover {\n --tw-text-opacity: 1;\n color: rgba(63, 131, 248, 1);\n color: rgb(63 131 248 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:hover\\:text-gray-300:hover {\n --tw-text-opacity: 1;\n color: rgba(209, 213, 219, 1);\n color: rgb(209 213 219 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:hover\\:text-white:hover {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, 1);\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n\n.dark .dark\\:focus\\:border-blue-500:focus {\n --tw-border-opacity: 1;\n border-color: rgba(63, 131, 248, 1);\n border-color: rgb(63 131 248 / var(--tw-border-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-blue-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(63, 131, 248, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-blue-800:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(30, 66, 159, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-emerald-800:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(6, 95, 70, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-gray-600:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(75, 85, 99, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-gray-700:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(55, 65, 81, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-red-800:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(155, 28, 28, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-red-900:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(119, 29, 29, var(--tw-ring-opacity));\n}\n\n\n.dark .dark\\:focus\\:ring-teal-800:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgba(5, 80, 92, var(--tw-ring-opacity));\n}\n\n\n.dark .group:hover .dark\\:group-hover\\:text-white {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, 1);\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n\n@media (min-width: 640px) {\n\n .sm\\:col-span-3 {\n grid-column: span 3 / span 3;\n }\n\n .sm\\:w-auto {\n width: auto;\n }\n\n .sm\\:rounded-lg {\n border-radius: 0.5rem;\n }\n\n .sm\\:p-8 {\n padding: 2rem;\n }\n\n .sm\\:text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n }\n}\n\n\n@media (min-width: 768px) {\n\n .md\\:inset-0 {\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n }\n\n .md\\:ml-64 {\n margin-left: 16rem;\n }\n\n .md\\:ml-auto {\n margin-left: auto;\n }\n\n .md\\:mr-24 {\n margin-right: 6rem;\n }\n\n .md\\:mr-64 {\n margin-right: 16rem;\n }\n\n .md\\:inline-block {\n display: inline-block;\n }\n\n .md\\:flex {\n display: flex;\n }\n\n .md\\:hidden {\n display: none;\n }\n\n .md\\:w-auto {\n width: auto;\n }\n\n .md\\:w-full {\n width: 100%;\n }\n\n .md\\:translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(0px, var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n }\n\n .md\\:flex-row {\n flex-direction: row;\n }\n\n .md\\:justify-start {\n justify-content: flex-start;\n }\n\n .md\\:space-x-3 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.75rem * 0);\n margin-right: calc(0.75rem * var(--tw-space-x-reverse));\n margin-left: calc(0.75rem * (1 - 0));\n margin-left: calc(0.75rem * (1 - var(--tw-space-x-reverse)));\n margin-left: calc(0.75rem * calc(1 - 0));\n margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));\n }\n\n .md\\:text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n }\n}\n\n\n@media (min-width: 1024px) {\n\n .lg\\:w-4\\/12 {\n width: 33.333333%;\n }\n\n .lg\\:max-w-xl {\n max-width: 36rem;\n }\n\n .lg\\:px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n }\n\n .lg\\:pl-3 {\n padding-left: 0.75rem;\n }\n}\n\n\n.\\[\\&\\>\\*\\]\\:\\!border-none>* {\n border-style: none !important;\n}\n\n\n.\\[\\&\\>\\*\\]\\:\\!stroke-black>* {\n stroke: #000000 !important;\n}\n\n\n.dark .\\[\\&\\>\\*\\]\\:dark\\:bg-gray-600>* {\n --tw-bg-opacity: 1;\n background-color: rgba(75, 85, 99, 1);\n background-color: rgb(75 85 99 / var(--tw-bg-opacity));\n}\n\n\n.dark .dark\\:\\[\\&\\>\\*\\]\\:\\!stroke-white>* {\n stroke: #ffffff !important;\n}", "",{"version":3,"sources":["webpack://./src/styles.css",""],"names":[],"mappings":"AAAA;;CAAc,CAAd;;;CAAc;;AAAd;;;EAAA,sBAAc,EAAd,MAAc;EAAd,eAAc,EAAd,MAAc;EAAd,mBAAc,EAAd,MAAc;EAAd,qBAAc,EAAd,MA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ADAA;;EAAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA,kBCAA;IDAA;GCAA;CAAA;;;ADAA;;EAAA;IAAA,SCAA;IDAA,WCAA;IDAA,YCAA;IDAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA,sBCAA;IDAA,8KCAA;IDAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA,wBCAA;IDAA,gCCAA;IDAA,wDCAA;IDAA,qCCAA;IDAA,6DCAA;IDAA,yCCAA;IDAA;GCAA;;EDAA;IAAA,oBCAA;IDAA;GCAA;CAAA;;;ADAA;;EAAA;IAAA;GCAA;;EDAA;IAAA;GCAA;;EDAA;IAAA,sBCAA;IDAA;GCAA;;EDAA;IAAA;GCAA;CAAA;;;ADAA;EAAA;CCAA;;;ADAA;EAAA;CCAA;;;ADAA;EAAA,mBCAA;EDAA,sCCAA;EDAA;CCAA;;;ADAA;EAAA;CCAA","sourcesContent":["@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n\n.text-danger {\n color: red;\n}",null],"sourceRoot":""}]); // Exports /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); @@ -3168,6 +3227,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, "/*\n! tailwindcss v3.3.1 | MIT License \*****************************************************/ /***/ ((module) => { +"use strict"; /* @@ -3262,6 +3322,7 @@ module.exports = function (cssWithMappingToString) { \********************************************************/ /***/ ((module) => { +"use strict"; module.exports = function (url, options) { @@ -3297,6 +3358,7 @@ module.exports = function (url, options) { \************************************************************/ /***/ ((module) => { +"use strict"; module.exports = function (item) { @@ -3322,6 +3384,7 @@ module.exports = function (item) { \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -3478,6 +3541,7 @@ function initAccordions() { \*************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interface.js.map @@ -3490,6 +3554,7 @@ __webpack_require__.r(__webpack_exports__); \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=types.js.map @@ -3502,6 +3567,7 @@ __webpack_require__.r(__webpack_exports__); \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -3757,6 +3823,7 @@ function initCarousels() { \************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interface.js.map @@ -3769,6 +3836,7 @@ __webpack_require__.r(__webpack_exports__); \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=types.js.map @@ -3781,6 +3849,7 @@ __webpack_require__.r(__webpack_exports__); \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -3888,6 +3957,7 @@ function initCollapses() { \************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interface.js.map @@ -3900,6 +3970,7 @@ __webpack_require__.r(__webpack_exports__); \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=types.js.map @@ -3912,6 +3983,7 @@ __webpack_require__.r(__webpack_exports__); \****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -4063,6 +4135,7 @@ function initDials() { \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interface.js.map @@ -4075,6 +4148,7 @@ __webpack_require__.r(__webpack_exports__); \****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=types.js.map @@ -4087,6 +4161,7 @@ __webpack_require__.r(__webpack_exports__); \*******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -4164,6 +4239,7 @@ function initDismisses() { \***********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interface.js.map @@ -4176,6 +4252,7 @@ __webpack_require__.r(__webpack_exports__); \*******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=types.js.map @@ -4188,6 +4265,7 @@ __webpack_require__.r(__webpack_exports__); \******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -4511,6 +4589,7 @@ function initDrawers() { \**********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interface.js.map @@ -4523,6 +4602,7 @@ __webpack_require__.r(__webpack_exports__); \******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=types.js.map @@ -4535,6 +4615,7 @@ __webpack_require__.r(__webpack_exports__); \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -4780,6 +4861,7 @@ function initDropdowns() { \************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interface.js.map @@ -4792,6 +4874,7 @@ __webpack_require__.r(__webpack_exports__); \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=types.js.map @@ -4804,6 +4887,7 @@ __webpack_require__.r(__webpack_exports__); \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "initFlowbite": () => (/* binding */ initFlowbite) @@ -4853,6 +4937,7 @@ function initFlowbite() { \*****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -5136,6 +5221,7 @@ function initModals() { \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interface.js.map @@ -5148,6 +5234,7 @@ __webpack_require__.r(__webpack_exports__); \*****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=types.js.map @@ -5160,6 +5247,7 @@ __webpack_require__.r(__webpack_exports__); \*******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -5392,6 +5480,7 @@ function initPopovers() { \***********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interface.js.map @@ -5404,6 +5493,7 @@ __webpack_require__.r(__webpack_exports__); \*******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=types.js.map @@ -5416,6 +5506,7 @@ __webpack_require__.r(__webpack_exports__); \****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -5540,6 +5631,7 @@ function initTabs() { \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interface.js.map @@ -5552,6 +5644,7 @@ __webpack_require__.r(__webpack_exports__); \****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=types.js.map @@ -5564,6 +5657,7 @@ __webpack_require__.r(__webpack_exports__); \*******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), @@ -5778,6 +5872,7 @@ function initTooltips() { \***********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interface.js.map @@ -5790,6 +5885,7 @@ __webpack_require__.r(__webpack_exports__); \*******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=types.js.map @@ -5802,6 +5898,7 @@ __webpack_require__.r(__webpack_exports__); \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) @@ -5833,6 +5930,7 @@ var Events = /** @class */ (function () { \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "Accordion": () => (/* reexport safe */ _components_accordion__WEBPACK_IMPORTED_MODULE_1__["default"]), @@ -5981,6 +6079,7 @@ events.init(); \************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +"use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) @@ -6035,6 +6134,7 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js \****************************************************************************/ /***/ ((module) => { +"use strict"; var stylesInDOM = []; @@ -6128,6 +6228,7 @@ module.exports = function (list, options) { \********************************************************************/ /***/ ((module) => { +"use strict"; var memo = {}; @@ -6171,6 +6272,7 @@ module.exports = insertBySelector; \**********************************************************************/ /***/ ((module) => { +"use strict"; /* istanbul ignore next */ @@ -6190,6 +6292,7 @@ module.exports = insertStyleElement; \**********************************************************************************/ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { +"use strict"; /* istanbul ignore next */ @@ -6209,6 +6312,7 @@ module.exports = setAttributesWithoutAttributes; \***************************************************************/ /***/ ((module) => { +"use strict"; /* istanbul ignore next */ @@ -6279,6 +6383,7 @@ module.exports = domAPI; \*********************************************************************/ /***/ ((module) => { +"use strict"; /* istanbul ignore next */ @@ -6302,6 +6407,7 @@ module.exports = styleTagTransform; \**********************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { +"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.initBooks = void 0; @@ -6342,6 +6448,7 @@ exports.initBooks = initBooks; \*****************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -6451,6 +6558,40 @@ function initContributors() { exports.initContributors = initContributors; +/***/ }), + +/***/ "./src/initQuill.ts": +/*!**************************!*\ + !*** ./src/initQuill.ts ***! + \**************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.initQuill = void 0; +var Quill = __webpack_require__(/*! ./quill */ "./src/quill.js"); +function initQuill() { + var toolbarOptions = [ + ['bold', 'italic', 'underline'], + [{ list: 'ordered' }, { list: 'bullet' }], + [{ header: [1, 2, 3, 4, 5, 6, false] }], + [{ indent: '-1' }, { indent: '+1' }], + ['clean'], + ]; + var editorElement = document.querySelector('#editor'); + if (editorElement) { + var quill = new Quill('#editor', { + theme: 'snow', + modules: { + toolbar: toolbarOptions, + }, + }); + } +} +exports.initQuill = initQuill; + + /***/ }), /***/ "./src/quill_value_to_textarea.ts": @@ -6459,6 +6600,7 @@ exports.initContributors = initContributors; \****************************************/ /***/ (function(__unused_webpack_module, exports) { +"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -6497,16 +6639,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.initQuill = void 0; +exports.initQuillValueToTextArea = void 0; var quill_value_to_textarea = function () { var aboutInput = document.querySelector('#about'); var qlEditor = document.querySelector('.ql-editor'); var editorContent = qlEditor.innerHTML; aboutInput.value = editorContent; - console.log(editorContent); return undefined; }; -function initQuill() { +function initQuillValueToTextArea() { var _this = this; var qlEditor = document.querySelector('.ql-editor'); if (!qlEditor) { @@ -6519,7 +6660,17413 @@ function initQuill() { }); }); }); } -exports.initQuill = initQuill; +exports.initQuillValueToTextArea = initQuillValueToTextArea; + + +/***/ }), + +/***/ "./src/quill.js": +/*!**********************!*\ + !*** ./src/quill.js ***! + \**********************/ +/***/ (function(module) { + +/*! + * Quill Editor v1.3.6 + * https://quilljs.com/ + * Copyright (c) 2014, Jason Chen + * Copyright (c) 2013, salesforce.com + */ +(function webpackUniversalModuleDefinition(root, factory) { + if (true) + module.exports = factory(); + else {} +})(typeof self !== 'undefined' ? self : this, function () { + return /******/ (function (modules) { + // webpackBootstrap + /******/ // The module cache + /******/ var installedModules = {}; + /******/ + /******/ // The require function + /******/ function __nested_webpack_require_724__(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, + __nested_webpack_require_724__, + ); + /******/ + /******/ // Flag the module as loaded + /******/ module.l = true; + /******/ + /******/ // Return the exports of the module + /******/ return module.exports; + /******/ + } + /******/ + /******/ + /******/ // expose the modules object (__webpack_modules__) + /******/ __nested_webpack_require_724__.m = modules; + /******/ + /******/ // expose the module cache + /******/ __nested_webpack_require_724__.c = installedModules; + /******/ + /******/ // define getter function for harmony exports + /******/ __nested_webpack_require_724__.d = function (exports, name, getter) { + /******/ if (!__nested_webpack_require_724__.o(exports, name)) { + /******/ Object.defineProperty(exports, name, { + /******/ configurable: false, + /******/ enumerable: true, + /******/ get: getter, + /******/ + }); + /******/ + } + /******/ + }; + /******/ + /******/ // getDefaultExport function for compatibility with non-harmony modules + /******/ __nested_webpack_require_724__.n = function (module) { + /******/ var getter = + module && module.__esModule + ? /******/ function getDefault() { + return module['default']; + } + : /******/ function getModuleExports() { + return module; + }; + /******/ __nested_webpack_require_724__.d(getter, 'a', getter); + /******/ return getter; + /******/ + }; + /******/ + /******/ // Object.prototype.hasOwnProperty.call + /******/ __nested_webpack_require_724__.o = function (object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + /******/ + /******/ // __webpack_public_path__ + /******/ __nested_webpack_require_724__.p = ''; + /******/ + /******/ // Load entry module and return exports + /******/ return __nested_webpack_require_724__((__nested_webpack_require_724__.s = 109)); + /******/ + })( + /************************************************************************/ + /******/ [ + /* 0 */ + /***/ function (module, exports, __nested_webpack_require_3440__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', {value: true}); + var container_1 = __nested_webpack_require_3440__(17); + var format_1 = __nested_webpack_require_3440__(18); + var leaf_1 = __nested_webpack_require_3440__(19); + var scroll_1 = __nested_webpack_require_3440__(45); + var inline_1 = __nested_webpack_require_3440__(46); + var block_1 = __nested_webpack_require_3440__(47); + var embed_1 = __nested_webpack_require_3440__(48); + var text_1 = __nested_webpack_require_3440__(49); + var attributor_1 = __nested_webpack_require_3440__(12); + var class_1 = __nested_webpack_require_3440__(32); + var style_1 = __nested_webpack_require_3440__(33); + var store_1 = __nested_webpack_require_3440__(31); + var Registry = __nested_webpack_require_3440__(1); + var Parchment = { + Scope: Registry.Scope, + create: Registry.create, + find: Registry.find, + query: Registry.query, + register: Registry.register, + Container: container_1.default, + Format: format_1.default, + Leaf: leaf_1.default, + Embed: embed_1.default, + Scroll: scroll_1.default, + Block: block_1.default, + Inline: inline_1.default, + Text: text_1.default, + Attributor: { + Attribute: attributor_1.default, + Class: class_1.default, + Style: style_1.default, + Store: store_1.default, + }, + }; + exports.default = Parchment; + + /***/ + }, + /* 1 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var __extends = + (this && this.__extends) || + (function () { + var extendStatics = + Object.setPrototypeOf || + ({__proto__: []} instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function (d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); + Object.defineProperty(exports, '__esModule', {value: true}); + var ParchmentError = /** @class */ (function (_super) { + __extends(ParchmentError, _super); + function ParchmentError(message) { + var _this = this; + message = '[Parchment] ' + message; + _this = _super.call(this, message) || this; + _this.message = message; + _this.name = _this.constructor.name; + return _this; + } + return ParchmentError; + })(Error); + exports.ParchmentError = ParchmentError; + var attributes = {}; + var classes = {}; + var tags = {}; + var types = {}; + exports.DATA_KEY = '__blot'; + var Scope; + (function (Scope) { + Scope[(Scope['TYPE'] = 3)] = 'TYPE'; + Scope[(Scope['LEVEL'] = 12)] = 'LEVEL'; + Scope[(Scope['ATTRIBUTE'] = 13)] = 'ATTRIBUTE'; + Scope[(Scope['BLOT'] = 14)] = 'BLOT'; + Scope[(Scope['INLINE'] = 7)] = 'INLINE'; + Scope[(Scope['BLOCK'] = 11)] = 'BLOCK'; + Scope[(Scope['BLOCK_BLOT'] = 10)] = 'BLOCK_BLOT'; + Scope[(Scope['INLINE_BLOT'] = 6)] = 'INLINE_BLOT'; + Scope[(Scope['BLOCK_ATTRIBUTE'] = 9)] = 'BLOCK_ATTRIBUTE'; + Scope[(Scope['INLINE_ATTRIBUTE'] = 5)] = 'INLINE_ATTRIBUTE'; + Scope[(Scope['ANY'] = 15)] = 'ANY'; + })((Scope = exports.Scope || (exports.Scope = {}))); + function create(input, value) { + var match = query(input); + if (match == null) { + throw new ParchmentError('Unable to create ' + input + ' blot'); + } + var BlotClass = match; + var node = + // @ts-ignore + input instanceof Node || input['nodeType'] === Node.TEXT_NODE + ? input + : BlotClass.create(value); + return new BlotClass(node, value); + } + exports.create = create; + function find(node, bubble) { + if (bubble === void 0) { + bubble = false; + } + if (node == null) return null; + // @ts-ignore + if (node[exports.DATA_KEY] != null) + return node[exports.DATA_KEY].blot; + if (bubble) return find(node.parentNode, bubble); + return null; + } + exports.find = find; + function query(query, scope) { + if (scope === void 0) { + scope = Scope.ANY; + } + var match; + if (typeof query === 'string') { + match = types[query] || attributes[query]; + // @ts-ignore + } else if ( + query instanceof Text || + query['nodeType'] === Node.TEXT_NODE + ) { + match = types['text']; + } else if (typeof query === 'number') { + if (query & Scope.LEVEL & Scope.BLOCK) { + match = types['block']; + } else if (query & Scope.LEVEL & Scope.INLINE) { + match = types['inline']; + } + } else if (query instanceof HTMLElement) { + var names = (query.getAttribute('class') || '').split(/\s+/); + for (var i in names) { + match = classes[names[i]]; + if (match) break; + } + match = match || tags[query.tagName]; + } + if (match == null) return null; + // @ts-ignore + if ( + scope & Scope.LEVEL & match.scope && + scope & Scope.TYPE & match.scope + ) + return match; + return null; + } + exports.query = query; + function register() { + var Definitions = []; + for (var _i = 0; _i < arguments.length; _i++) { + Definitions[_i] = arguments[_i]; + } + if (Definitions.length > 1) { + return Definitions.map(function (d) { + return register(d); + }); + } + var Definition = Definitions[0]; + if ( + typeof Definition.blotName !== 'string' && + typeof Definition.attrName !== 'string' + ) { + throw new ParchmentError('Invalid definition'); + } else if (Definition.blotName === 'abstract') { + throw new ParchmentError('Cannot register abstract class'); + } + types[Definition.blotName || Definition.attrName] = Definition; + if (typeof Definition.keyName === 'string') { + attributes[Definition.keyName] = Definition; + } else { + if (Definition.className != null) { + classes[Definition.className] = Definition; + } + if (Definition.tagName != null) { + if (Array.isArray(Definition.tagName)) { + Definition.tagName = Definition.tagName.map(function (tagName) { + return tagName.toUpperCase(); + }); + } else { + Definition.tagName = Definition.tagName.toUpperCase(); + } + var tagNames = Array.isArray(Definition.tagName) + ? Definition.tagName + : [Definition.tagName]; + tagNames.forEach(function (tag) { + if (tags[tag] == null || Definition.className == null) { + tags[tag] = Definition; + } + }); + } + } + return Definition; + } + exports.register = register; + + /***/ + }, + /* 2 */ + /***/ function (module, exports, __nested_webpack_require_11288__) { + var diff = __nested_webpack_require_11288__(51); + var equal = __nested_webpack_require_11288__(11); + var extend = __nested_webpack_require_11288__(3); + var op = __nested_webpack_require_11288__(20); + + var NULL_CHARACTER = String.fromCharCode(0); // Placeholder char for embed in diff() + + var Delta = function (ops) { + // Assume we are given a well formed ops + if (Array.isArray(ops)) { + this.ops = ops; + } else if (ops != null && Array.isArray(ops.ops)) { + this.ops = ops.ops; + } else { + this.ops = []; + } + }; + + Delta.prototype.insert = function (text, attributes) { + var newOp = {}; + if (text.length === 0) return this; + newOp.insert = text; + if ( + attributes != null && + typeof attributes === 'object' && + Object.keys(attributes).length > 0 + ) { + newOp.attributes = attributes; + } + return this.push(newOp); + }; + + Delta.prototype['delete'] = function (length) { + if (length <= 0) return this; + return this.push({delete: length}); + }; + + Delta.prototype.retain = function (length, attributes) { + if (length <= 0) return this; + var newOp = {retain: length}; + if ( + attributes != null && + typeof attributes === 'object' && + Object.keys(attributes).length > 0 + ) { + newOp.attributes = attributes; + } + return this.push(newOp); + }; + + Delta.prototype.push = function (newOp) { + var index = this.ops.length; + var lastOp = this.ops[index - 1]; + newOp = extend(true, {}, newOp); + if (typeof lastOp === 'object') { + if ( + typeof newOp['delete'] === 'number' && + typeof lastOp['delete'] === 'number' + ) { + this.ops[index - 1] = { + delete: lastOp['delete'] + newOp['delete'], + }; + return this; + } + // Since it does not matter if we insert before or after deleting at the same index, + // always prefer to insert first + if (typeof lastOp['delete'] === 'number' && newOp.insert != null) { + index -= 1; + lastOp = this.ops[index - 1]; + if (typeof lastOp !== 'object') { + this.ops.unshift(newOp); + return this; + } + } + if (equal(newOp.attributes, lastOp.attributes)) { + if ( + typeof newOp.insert === 'string' && + typeof lastOp.insert === 'string' + ) { + this.ops[index - 1] = {insert: lastOp.insert + newOp.insert}; + if (typeof newOp.attributes === 'object') + this.ops[index - 1].attributes = newOp.attributes; + return this; + } else if ( + typeof newOp.retain === 'number' && + typeof lastOp.retain === 'number' + ) { + this.ops[index - 1] = {retain: lastOp.retain + newOp.retain}; + if (typeof newOp.attributes === 'object') + this.ops[index - 1].attributes = newOp.attributes; + return this; + } + } + } + if (index === this.ops.length) { + this.ops.push(newOp); + } else { + this.ops.splice(index, 0, newOp); + } + return this; + }; + + Delta.prototype.chop = function () { + var lastOp = this.ops[this.ops.length - 1]; + if (lastOp && lastOp.retain && !lastOp.attributes) { + this.ops.pop(); + } + return this; + }; + + Delta.prototype.filter = function (predicate) { + return this.ops.filter(predicate); + }; + + Delta.prototype.forEach = function (predicate) { + this.ops.forEach(predicate); + }; + + Delta.prototype.map = function (predicate) { + return this.ops.map(predicate); + }; + + Delta.prototype.partition = function (predicate) { + var passed = [], + failed = []; + this.forEach(function (op) { + var target = predicate(op) ? passed : failed; + target.push(op); + }); + return [passed, failed]; + }; + + Delta.prototype.reduce = function (predicate, initial) { + return this.ops.reduce(predicate, initial); + }; + + Delta.prototype.changeLength = function () { + return this.reduce(function (length, elem) { + if (elem.insert) { + return length + op.length(elem); + } else if (elem.delete) { + return length - elem.delete; + } + return length; + }, 0); + }; + + Delta.prototype.length = function () { + return this.reduce(function (length, elem) { + return length + op.length(elem); + }, 0); + }; + + Delta.prototype.slice = function (start, end) { + start = start || 0; + if (typeof end !== 'number') end = Infinity; + var ops = []; + var iter = op.iterator(this.ops); + var index = 0; + while (index < end && iter.hasNext()) { + var nextOp; + if (index < start) { + nextOp = iter.next(start - index); + } else { + nextOp = iter.next(end - index); + ops.push(nextOp); + } + index += op.length(nextOp); + } + return new Delta(ops); + }; + + Delta.prototype.compose = function (other) { + var thisIter = op.iterator(this.ops); + var otherIter = op.iterator(other.ops); + var delta = new Delta(); + while (thisIter.hasNext() || otherIter.hasNext()) { + if (otherIter.peekType() === 'insert') { + delta.push(otherIter.next()); + } else if (thisIter.peekType() === 'delete') { + delta.push(thisIter.next()); + } else { + var length = Math.min( + thisIter.peekLength(), + otherIter.peekLength(), + ); + var thisOp = thisIter.next(length); + var otherOp = otherIter.next(length); + if (typeof otherOp.retain === 'number') { + var newOp = {}; + if (typeof thisOp.retain === 'number') { + newOp.retain = length; + } else { + newOp.insert = thisOp.insert; + } + // Preserve null when composing with a retain, otherwise remove it for inserts + var attributes = op.attributes.compose( + thisOp.attributes, + otherOp.attributes, + typeof thisOp.retain === 'number', + ); + if (attributes) newOp.attributes = attributes; + delta.push(newOp); + // Other op should be delete, we could be an insert or retain + // Insert + delete cancels out + } else if ( + typeof otherOp['delete'] === 'number' && + typeof thisOp.retain === 'number' + ) { + delta.push(otherOp); + } + } + } + return delta.chop(); + }; + + Delta.prototype.concat = function (other) { + var delta = new Delta(this.ops.slice()); + if (other.ops.length > 0) { + delta.push(other.ops[0]); + delta.ops = delta.ops.concat(other.ops.slice(1)); + } + return delta; + }; + + Delta.prototype.diff = function (other, index) { + if (this.ops === other.ops) { + return new Delta(); + } + var strings = [this, other].map(function (delta) { + return delta + .map(function (op) { + if (op.insert != null) { + return typeof op.insert === 'string' + ? op.insert + : NULL_CHARACTER; + } + var prep = delta === other ? 'on' : 'with'; + throw new Error('diff() called ' + prep + ' non-document'); + }) + .join(''); + }); + var delta = new Delta(); + var diffResult = diff(strings[0], strings[1], index); + var thisIter = op.iterator(this.ops); + var otherIter = op.iterator(other.ops); + diffResult.forEach(function (component) { + var length = component[1].length; + while (length > 0) { + var opLength = 0; + switch (component[0]) { + case diff.INSERT: + opLength = Math.min(otherIter.peekLength(), length); + delta.push(otherIter.next(opLength)); + break; + case diff.DELETE: + opLength = Math.min(length, thisIter.peekLength()); + thisIter.next(opLength); + delta['delete'](opLength); + break; + case diff.EQUAL: + opLength = Math.min( + thisIter.peekLength(), + otherIter.peekLength(), + length, + ); + var thisOp = thisIter.next(opLength); + var otherOp = otherIter.next(opLength); + if (equal(thisOp.insert, otherOp.insert)) { + delta.retain( + opLength, + op.attributes.diff(thisOp.attributes, otherOp.attributes), + ); + } else { + delta.push(otherOp)['delete'](opLength); + } + break; + } + length -= opLength; + } + }); + return delta.chop(); + }; + + Delta.prototype.eachLine = function (predicate, newline) { + newline = newline || '\n'; + var iter = op.iterator(this.ops); + var line = new Delta(); + var i = 0; + while (iter.hasNext()) { + if (iter.peekType() !== 'insert') return; + var thisOp = iter.peek(); + var start = op.length(thisOp) - iter.peekLength(); + var index = + typeof thisOp.insert === 'string' + ? thisOp.insert.indexOf(newline, start) - start + : -1; + if (index < 0) { + line.push(iter.next()); + } else if (index > 0) { + line.push(iter.next(index)); + } else { + if (predicate(line, iter.next(1).attributes || {}, i) === false) { + return; + } + i += 1; + line = new Delta(); + } + } + if (line.length() > 0) { + predicate(line, {}, i); + } + }; + + Delta.prototype.transform = function (other, priority) { + priority = !!priority; + if (typeof other === 'number') { + return this.transformPosition(other, priority); + } + var thisIter = op.iterator(this.ops); + var otherIter = op.iterator(other.ops); + var delta = new Delta(); + while (thisIter.hasNext() || otherIter.hasNext()) { + if ( + thisIter.peekType() === 'insert' && + (priority || otherIter.peekType() !== 'insert') + ) { + delta.retain(op.length(thisIter.next())); + } else if (otherIter.peekType() === 'insert') { + delta.push(otherIter.next()); + } else { + var length = Math.min( + thisIter.peekLength(), + otherIter.peekLength(), + ); + var thisOp = thisIter.next(length); + var otherOp = otherIter.next(length); + if (thisOp['delete']) { + // Our delete either makes their delete redundant or removes their retain + continue; + } else if (otherOp['delete']) { + delta.push(otherOp); + } else { + // We retain either their retain or insert + delta.retain( + length, + op.attributes.transform( + thisOp.attributes, + otherOp.attributes, + priority, + ), + ); + } + } + } + return delta.chop(); + }; + + Delta.prototype.transformPosition = function (index, priority) { + priority = !!priority; + var thisIter = op.iterator(this.ops); + var offset = 0; + while (thisIter.hasNext() && offset <= index) { + var length = thisIter.peekLength(); + var nextType = thisIter.peekType(); + thisIter.next(); + if (nextType === 'delete') { + index -= Math.min(length, index - offset); + continue; + } else if (nextType === 'insert' && (offset < index || !priority)) { + index += length; + } + offset += length; + } + return index; + }; + + module.exports = Delta; + + /***/ + }, + /* 3 */ + /***/ function (module, exports) { + 'use strict'; + + var hasOwn = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + + var isArray = function isArray(arr) { + if (typeof Array.isArray === 'function') { + return Array.isArray(arr); + } + + return toStr.call(arr) === '[object Array]'; + }; + + var isPlainObject = function isPlainObject(obj) { + if (!obj || toStr.call(obj) !== '[object Object]') { + return false; + } + + var hasOwnConstructor = hasOwn.call(obj, 'constructor'); + var hasIsPrototypeOf = + obj.constructor && + obj.constructor.prototype && + hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); + // Not own constructor property must be Object + if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + var key; + for (key in obj) { + /**/ + } + + return typeof key === 'undefined' || hasOwn.call(obj, key); + }; + + module.exports = function extend() { + var options, name, src, copy, copyIsArray, clone; + var target = arguments[0]; + var i = 1; + var length = arguments.length; + var deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + if ( + target == null || + (typeof target !== 'object' && typeof target !== 'function') + ) { + target = {}; + } + + for (; i < length; ++i) { + options = arguments[i]; + // Only deal with non-null/undefined values + if (options != null) { + // Extend the base object + for (name in options) { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target !== copy) { + // Recurse if we're merging plain objects or arrays + if ( + deep && + copy && + (isPlainObject(copy) || (copyIsArray = isArray(copy))) + ) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray(src) ? src : []; + } else { + clone = src && isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = extend(deep, clone, copy); + + // Don't bring in undefined values + } else if (typeof copy !== 'undefined') { + target[name] = copy; + } + } + } + } + } + + // Return the modified object + return target; + }; + + /***/ + }, + /* 4 */ + /***/ function (module, exports, __nested_webpack_require_28001__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = + exports.BlockEmbed = + exports.bubbleFormats = + undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _extend = __nested_webpack_require_28001__(3); + + var _extend2 = _interopRequireDefault(_extend); + + var _quillDelta = __nested_webpack_require_28001__(2); + + var _quillDelta2 = _interopRequireDefault(_quillDelta); + + var _parchment = __nested_webpack_require_28001__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _break = __nested_webpack_require_28001__(16); + + var _break2 = _interopRequireDefault(_break); + + var _inline = __nested_webpack_require_28001__(6); + + var _inline2 = _interopRequireDefault(_inline); + + var _text = __nested_webpack_require_28001__(7); + + var _text2 = _interopRequireDefault(_text); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var NEWLINE_LENGTH = 1; + + var BlockEmbed = (function (_Parchment$Embed) { + _inherits(BlockEmbed, _Parchment$Embed); + + function BlockEmbed() { + _classCallCheck(this, BlockEmbed); + + return _possibleConstructorReturn( + this, + (BlockEmbed.__proto__ || Object.getPrototypeOf(BlockEmbed)).apply( + this, + arguments, + ), + ); + } + + _createClass(BlockEmbed, [ + { + key: 'attach', + value: function attach() { + _get( + BlockEmbed.prototype.__proto__ || + Object.getPrototypeOf(BlockEmbed.prototype), + 'attach', + this, + ).call(this); + this.attributes = new _parchment2.default.Attributor.Store( + this.domNode, + ); + }, + }, + { + key: 'delta', + value: function delta() { + return new _quillDelta2.default().insert( + this.value(), + (0, _extend2.default)( + this.formats(), + this.attributes.values(), + ), + ); + }, + }, + { + key: 'format', + value: function format(name, value) { + var attribute = _parchment2.default.query( + name, + _parchment2.default.Scope.BLOCK_ATTRIBUTE, + ); + if (attribute != null) { + this.attributes.attribute(attribute, value); + } + }, + }, + { + key: 'formatAt', + value: function formatAt(index, length, name, value) { + this.format(name, value); + }, + }, + { + key: 'insertAt', + value: function insertAt(index, value, def) { + if (typeof value === 'string' && value.endsWith('\n')) { + var block = _parchment2.default.create(Block.blotName); + this.parent.insertBefore( + block, + index === 0 ? this : this.next, + ); + block.insertAt(0, value.slice(0, -1)); + } else { + _get( + BlockEmbed.prototype.__proto__ || + Object.getPrototypeOf(BlockEmbed.prototype), + 'insertAt', + this, + ).call(this, index, value, def); + } + }, + }, + ]); + + return BlockEmbed; + })(_parchment2.default.Embed); + + BlockEmbed.scope = _parchment2.default.Scope.BLOCK_BLOT; + // It is important for cursor behavior BlockEmbeds use tags that are block level elements + + var Block = (function (_Parchment$Block) { + _inherits(Block, _Parchment$Block); + + function Block(domNode) { + _classCallCheck(this, Block); + + var _this2 = _possibleConstructorReturn( + this, + (Block.__proto__ || Object.getPrototypeOf(Block)).call( + this, + domNode, + ), + ); + + _this2.cache = {}; + return _this2; + } + + _createClass(Block, [ + { + key: 'delta', + value: function delta() { + if (this.cache.delta == null) { + this.cache.delta = this.descendants(_parchment2.default.Leaf) + .reduce(function (delta, leaf) { + if (leaf.length() === 0) { + return delta; + } else { + return delta.insert(leaf.value(), bubbleFormats(leaf)); + } + }, new _quillDelta2.default()) + .insert('\n', bubbleFormats(this)); + } + return this.cache.delta; + }, + }, + { + key: 'deleteAt', + value: function deleteAt(index, length) { + _get( + Block.prototype.__proto__ || + Object.getPrototypeOf(Block.prototype), + 'deleteAt', + this, + ).call(this, index, length); + this.cache = {}; + }, + }, + { + key: 'formatAt', + value: function formatAt(index, length, name, value) { + if (length <= 0) return; + if ( + _parchment2.default.query( + name, + _parchment2.default.Scope.BLOCK, + ) + ) { + if (index + length === this.length()) { + this.format(name, value); + } + } else { + _get( + Block.prototype.__proto__ || + Object.getPrototypeOf(Block.prototype), + 'formatAt', + this, + ).call( + this, + index, + Math.min(length, this.length() - index - 1), + name, + value, + ); + } + this.cache = {}; + }, + }, + { + key: 'insertAt', + value: function insertAt(index, value, def) { + if (def != null) + return _get( + Block.prototype.__proto__ || + Object.getPrototypeOf(Block.prototype), + 'insertAt', + this, + ).call(this, index, value, def); + if (value.length === 0) return; + var lines = value.split('\n'); + var text = lines.shift(); + if (text.length > 0) { + if (index < this.length() - 1 || this.children.tail == null) { + _get( + Block.prototype.__proto__ || + Object.getPrototypeOf(Block.prototype), + 'insertAt', + this, + ).call(this, Math.min(index, this.length() - 1), text); + } else { + this.children.tail.insertAt( + this.children.tail.length(), + text, + ); + } + this.cache = {}; + } + var block = this; + lines.reduce(function (index, line) { + block = block.split(index, true); + block.insertAt(0, line); + return line.length; + }, index + text.length); + }, + }, + { + key: 'insertBefore', + value: function insertBefore(blot, ref) { + var head = this.children.head; + _get( + Block.prototype.__proto__ || + Object.getPrototypeOf(Block.prototype), + 'insertBefore', + this, + ).call(this, blot, ref); + if (head instanceof _break2.default) { + head.remove(); + } + this.cache = {}; + }, + }, + { + key: 'length', + value: function length() { + if (this.cache.length == null) { + this.cache.length = + _get( + Block.prototype.__proto__ || + Object.getPrototypeOf(Block.prototype), + 'length', + this, + ).call(this) + NEWLINE_LENGTH; + } + return this.cache.length; + }, + }, + { + key: 'moveChildren', + value: function moveChildren(target, ref) { + _get( + Block.prototype.__proto__ || + Object.getPrototypeOf(Block.prototype), + 'moveChildren', + this, + ).call(this, target, ref); + this.cache = {}; + }, + }, + { + key: 'optimize', + value: function optimize(context) { + _get( + Block.prototype.__proto__ || + Object.getPrototypeOf(Block.prototype), + 'optimize', + this, + ).call(this, context); + this.cache = {}; + }, + }, + { + key: 'path', + value: function path(index) { + return _get( + Block.prototype.__proto__ || + Object.getPrototypeOf(Block.prototype), + 'path', + this, + ).call(this, index, true); + }, + }, + { + key: 'removeChild', + value: function removeChild(child) { + _get( + Block.prototype.__proto__ || + Object.getPrototypeOf(Block.prototype), + 'removeChild', + this, + ).call(this, child); + this.cache = {}; + }, + }, + { + key: 'split', + value: function split(index) { + var force = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : false; + + if ( + force && + (index === 0 || index >= this.length() - NEWLINE_LENGTH) + ) { + var clone = this.clone(); + if (index === 0) { + this.parent.insertBefore(clone, this); + return this; + } else { + this.parent.insertBefore(clone, this.next); + return clone; + } + } else { + var next = _get( + Block.prototype.__proto__ || + Object.getPrototypeOf(Block.prototype), + 'split', + this, + ).call(this, index, force); + this.cache = {}; + return next; + } + }, + }, + ]); + + return Block; + })(_parchment2.default.Block); + + Block.blotName = 'block'; + Block.tagName = 'P'; + Block.defaultChild = 'break'; + Block.allowedChildren = [ + _inline2.default, + _parchment2.default.Embed, + _text2.default, + ]; + + function bubbleFormats(blot) { + var formats = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : {}; + + if (blot == null) return formats; + if (typeof blot.formats === 'function') { + formats = (0, _extend2.default)(formats, blot.formats()); + } + if ( + blot.parent == null || + blot.parent.blotName == 'scroll' || + blot.parent.statics.scope !== blot.statics.scope + ) { + return formats; + } + return bubbleFormats(blot.parent, formats); + } + + exports.bubbleFormats = bubbleFormats; + exports.BlockEmbed = BlockEmbed; + exports.default = Block; + + /***/ + }, + /* 5 */ + /***/ function (module, exports, __nested_webpack_require_43669__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = exports.overload = exports.expandConfig = undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for ( + var _i = arr[Symbol.iterator](), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance', + ); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + __nested_webpack_require_43669__(50); + + var _quillDelta = __nested_webpack_require_43669__(2); + + var _quillDelta2 = _interopRequireDefault(_quillDelta); + + var _editor = __nested_webpack_require_43669__(14); + + var _editor2 = _interopRequireDefault(_editor); + + var _emitter3 = __nested_webpack_require_43669__(8); + + var _emitter4 = _interopRequireDefault(_emitter3); + + var _module = __nested_webpack_require_43669__(9); + + var _module2 = _interopRequireDefault(_module); + + var _parchment = __nested_webpack_require_43669__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _selection = __nested_webpack_require_43669__(15); + + var _selection2 = _interopRequireDefault(_selection); + + var _extend = __nested_webpack_require_43669__(3); + + var _extend2 = _interopRequireDefault(_extend); + + var _logger = __nested_webpack_require_43669__(10); + + var _logger2 = _interopRequireDefault(_logger); + + var _theme = __nested_webpack_require_43669__(34); + + var _theme2 = _interopRequireDefault(_theme); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var debug = (0, _logger2.default)('quill'); + + var Quill = (function () { + _createClass(Quill, null, [ + { + key: 'debug', + value: function debug(limit) { + if (limit === true) { + limit = 'log'; + } + _logger2.default.level(limit); + }, + }, + { + key: 'find', + value: function find(node) { + return node.__quill || _parchment2.default.find(node); + }, + }, + { + key: 'import', + value: function _import(name) { + if (this.imports[name] == null) { + debug.error( + 'Cannot import ' + + name + + '. Are you sure it was registered?', + ); + } + return this.imports[name]; + }, + }, + { + key: 'register', + value: function register(path, target) { + var _this = this; + + var overwrite = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : false; + + if (typeof path !== 'string') { + var name = path.attrName || path.blotName; + if (typeof name === 'string') { + // register(Blot | Attributor, overwrite) + this.register('formats/' + name, path, target); + } else { + Object.keys(path).forEach(function (key) { + _this.register(key, path[key], target); + }); + } + } else { + if (this.imports[path] != null && !overwrite) { + debug.warn('Overwriting ' + path + ' with', target); + } + this.imports[path] = target; + if ( + (path.startsWith('blots/') || + path.startsWith('formats/')) && + target.blotName !== 'abstract' + ) { + _parchment2.default.register(target); + } else if ( + path.startsWith('modules') && + typeof target.register === 'function' + ) { + target.register(); + } + } + }, + }, + ]); + + function Quill(container) { + var _this2 = this; + + var options = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : {}; + + _classCallCheck(this, Quill); + + this.options = expandConfig(container, options); + this.container = this.options.container; + if (this.container == null) { + return debug.error('Invalid Quill container', container); + } + if (this.options.debug) { + Quill.debug(this.options.debug); + } + var html = this.container.innerHTML.trim(); + this.container.classList.add('ql-container'); + this.container.innerHTML = ''; + this.container.__quill = this; + this.root = this.addContainer('ql-editor'); + this.root.classList.add('ql-blank'); + this.root.setAttribute('data-gramm', false); + this.scrollingContainer = + this.options.scrollingContainer || this.root; + this.emitter = new _emitter4.default(); + this.scroll = _parchment2.default.create(this.root, { + emitter: this.emitter, + whitelist: this.options.formats, + }); + this.editor = new _editor2.default(this.scroll); + this.selection = new _selection2.default(this.scroll, this.emitter); + this.theme = new this.options.theme(this, this.options); + this.keyboard = this.theme.addModule('keyboard'); + this.clipboard = this.theme.addModule('clipboard'); + this.history = this.theme.addModule('history'); + this.theme.init(); + this.emitter.on( + _emitter4.default.events.EDITOR_CHANGE, + function (type) { + if (type === _emitter4.default.events.TEXT_CHANGE) { + _this2.root.classList.toggle( + 'ql-blank', + _this2.editor.isBlank(), + ); + } + }, + ); + this.emitter.on( + _emitter4.default.events.SCROLL_UPDATE, + function (source, mutations) { + var range = _this2.selection.lastRange; + var index = + range && range.length === 0 ? range.index : undefined; + modify.call( + _this2, + function () { + return _this2.editor.update(null, mutations, index); + }, + source, + ); + }, + ); + var contents = this.clipboard.convert( + '
' + + html + + '


', + ); + this.setContents(contents); + this.history.clear(); + if (this.options.placeholder) { + this.root.setAttribute( + 'data-placeholder', + this.options.placeholder, + ); + } + if (this.options.readOnly) { + this.disable(); + } + } + + _createClass(Quill, [ + { + key: 'addContainer', + value: function addContainer(container) { + var refNode = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : null; + + if (typeof container === 'string') { + var className = container; + container = document.createElement('div'); + container.classList.add(className); + } + this.container.insertBefore(container, refNode); + return container; + }, + }, + { + key: 'blur', + value: function blur() { + this.selection.setRange(null); + }, + }, + { + key: 'deleteText', + value: function deleteText(index, length, source) { + var _this3 = this; + + var _overload = overload(index, length, source); + + var _overload2 = _slicedToArray(_overload, 4); + + index = _overload2[0]; + length = _overload2[1]; + source = _overload2[3]; + + return modify.call( + this, + function () { + return _this3.editor.deleteText(index, length); + }, + source, + index, + -1 * length, + ); + }, + }, + { + key: 'disable', + value: function disable() { + this.enable(false); + }, + }, + { + key: 'enable', + value: function enable() { + var enabled = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : true; + + this.scroll.enable(enabled); + this.container.classList.toggle('ql-disabled', !enabled); + }, + }, + { + key: 'focus', + value: function focus() { + var scrollTop = this.scrollingContainer.scrollTop; + this.selection.focus(); + this.scrollingContainer.scrollTop = scrollTop; + this.scrollIntoView(); + }, + }, + { + key: 'format', + value: function format(name, value) { + var _this4 = this; + + var source = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : _emitter4.default.sources.API; + + return modify.call( + this, + function () { + var range = _this4.getSelection(true); + var change = new _quillDelta2.default(); + if (range == null) { + return change; + } else if ( + _parchment2.default.query( + name, + _parchment2.default.Scope.BLOCK, + ) + ) { + change = _this4.editor.formatLine( + range.index, + range.length, + _defineProperty({}, name, value), + ); + } else if (range.length === 0) { + _this4.selection.format(name, value); + return change; + } else { + change = _this4.editor.formatText( + range.index, + range.length, + _defineProperty({}, name, value), + ); + } + _this4.setSelection( + range, + _emitter4.default.sources.SILENT, + ); + return change; + }, + source, + ); + }, + }, + { + key: 'formatLine', + value: function formatLine(index, length, name, value, source) { + var _this5 = this; + + var formats = void 0; + + var _overload3 = overload(index, length, name, value, source); + + var _overload4 = _slicedToArray(_overload3, 4); + + index = _overload4[0]; + length = _overload4[1]; + formats = _overload4[2]; + source = _overload4[3]; + + return modify.call( + this, + function () { + return _this5.editor.formatLine(index, length, formats); + }, + source, + index, + 0, + ); + }, + }, + { + key: 'formatText', + value: function formatText(index, length, name, value, source) { + var _this6 = this; + + var formats = void 0; + + var _overload5 = overload(index, length, name, value, source); + + var _overload6 = _slicedToArray(_overload5, 4); + + index = _overload6[0]; + length = _overload6[1]; + formats = _overload6[2]; + source = _overload6[3]; + + return modify.call( + this, + function () { + return _this6.editor.formatText(index, length, formats); + }, + source, + index, + 0, + ); + }, + }, + { + key: 'getBounds', + value: function getBounds(index) { + var length = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : 0; + + var bounds = void 0; + if (typeof index === 'number') { + bounds = this.selection.getBounds(index, length); + } else { + bounds = this.selection.getBounds(index.index, index.length); + } + var containerBounds = this.container.getBoundingClientRect(); + return { + bottom: bounds.bottom - containerBounds.top, + height: bounds.height, + left: bounds.left - containerBounds.left, + right: bounds.right - containerBounds.left, + top: bounds.top - containerBounds.top, + width: bounds.width, + }; + }, + }, + { + key: 'getContents', + value: function getContents() { + var index = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : 0; + var length = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : this.getLength() - index; + + var _overload7 = overload(index, length); + + var _overload8 = _slicedToArray(_overload7, 2); + + index = _overload8[0]; + length = _overload8[1]; + + return this.editor.getContents(index, length); + }, + }, + { + key: 'getFormat', + value: function getFormat() { + var index = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : this.getSelection(true); + var length = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : 0; + + if (typeof index === 'number') { + return this.editor.getFormat(index, length); + } else { + return this.editor.getFormat(index.index, index.length); + } + }, + }, + { + key: 'getIndex', + value: function getIndex(blot) { + return blot.offset(this.scroll); + }, + }, + { + key: 'getLength', + value: function getLength() { + return this.scroll.length(); + }, + }, + { + key: 'getLeaf', + value: function getLeaf(index) { + return this.scroll.leaf(index); + }, + }, + { + key: 'getLine', + value: function getLine(index) { + return this.scroll.line(index); + }, + }, + { + key: 'getLines', + value: function getLines() { + var index = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : 0; + var length = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : Number.MAX_VALUE; + + if (typeof index !== 'number') { + return this.scroll.lines(index.index, index.length); + } else { + return this.scroll.lines(index, length); + } + }, + }, + { + key: 'getModule', + value: function getModule(name) { + return this.theme.modules[name]; + }, + }, + { + key: 'getSelection', + value: function getSelection() { + var focus = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : false; + + if (focus) this.focus(); + this.update(); // Make sure we access getRange with editor in consistent state + return this.selection.getRange()[0]; + }, + }, + { + key: 'getText', + value: function getText() { + var index = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : 0; + var length = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : this.getLength() - index; + + var _overload9 = overload(index, length); + + var _overload10 = _slicedToArray(_overload9, 2); + + index = _overload10[0]; + length = _overload10[1]; + + return this.editor.getText(index, length); + }, + }, + { + key: 'hasFocus', + value: function hasFocus() { + return this.selection.hasFocus(); + }, + }, + { + key: 'insertEmbed', + value: function insertEmbed(index, embed, value) { + var _this7 = this; + + var source = + arguments.length > 3 && arguments[3] !== undefined + ? arguments[3] + : Quill.sources.API; + + return modify.call( + this, + function () { + return _this7.editor.insertEmbed(index, embed, value); + }, + source, + index, + ); + }, + }, + { + key: 'insertText', + value: function insertText(index, text, name, value, source) { + var _this8 = this; + + var formats = void 0; + + var _overload11 = overload(index, 0, name, value, source); + + var _overload12 = _slicedToArray(_overload11, 4); + + index = _overload12[0]; + formats = _overload12[2]; + source = _overload12[3]; + + return modify.call( + this, + function () { + return _this8.editor.insertText(index, text, formats); + }, + source, + index, + text.length, + ); + }, + }, + { + key: 'isEnabled', + value: function isEnabled() { + return !this.container.classList.contains('ql-disabled'); + }, + }, + { + key: 'off', + value: function off() { + return this.emitter.off.apply(this.emitter, arguments); + }, + }, + { + key: 'on', + value: function on() { + return this.emitter.on.apply(this.emitter, arguments); + }, + }, + { + key: 'once', + value: function once() { + return this.emitter.once.apply(this.emitter, arguments); + }, + }, + { + key: 'pasteHTML', + value: function pasteHTML(index, html, source) { + this.clipboard.dangerouslyPasteHTML(index, html, source); + }, + }, + { + key: 'removeFormat', + value: function removeFormat(index, length, source) { + var _this9 = this; + + var _overload13 = overload(index, length, source); + + var _overload14 = _slicedToArray(_overload13, 4); + + index = _overload14[0]; + length = _overload14[1]; + source = _overload14[3]; + + return modify.call( + this, + function () { + return _this9.editor.removeFormat(index, length); + }, + source, + index, + ); + }, + }, + { + key: 'scrollIntoView', + value: function scrollIntoView() { + this.selection.scrollIntoView(this.scrollingContainer); + }, + }, + { + key: 'setContents', + value: function setContents(delta) { + var _this10 = this; + + var source = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : _emitter4.default.sources.API; + + return modify.call( + this, + function () { + delta = new _quillDelta2.default(delta); + var length = _this10.getLength(); + var deleted = _this10.editor.deleteText(0, length); + var applied = _this10.editor.applyDelta(delta); + var lastOp = applied.ops[applied.ops.length - 1]; + if ( + lastOp != null && + typeof lastOp.insert === 'string' && + lastOp.insert[lastOp.insert.length - 1] === '\n' + ) { + _this10.editor.deleteText(_this10.getLength() - 1, 1); + applied.delete(1); + } + var ret = deleted.compose(applied); + return ret; + }, + source, + ); + }, + }, + { + key: 'setSelection', + value: function setSelection(index, length, source) { + if (index == null) { + this.selection.setRange(null, length || Quill.sources.API); + } else { + var _overload15 = overload(index, length, source); + + var _overload16 = _slicedToArray(_overload15, 4); + + index = _overload16[0]; + length = _overload16[1]; + source = _overload16[3]; + + this.selection.setRange( + new _selection.Range(index, length), + source, + ); + if (source !== _emitter4.default.sources.SILENT) { + this.selection.scrollIntoView(this.scrollingContainer); + } + } + }, + }, + { + key: 'setText', + value: function setText(text) { + var source = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : _emitter4.default.sources.API; + + var delta = new _quillDelta2.default().insert(text); + return this.setContents(delta, source); + }, + }, + { + key: 'update', + value: function update() { + var source = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : _emitter4.default.sources.USER; + + var change = this.scroll.update(source); // Will update selection before selection.update() does if text changes + this.selection.update(source); + return change; + }, + }, + { + key: 'updateContents', + value: function updateContents(delta) { + var _this11 = this; + + var source = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : _emitter4.default.sources.API; + + return modify.call( + this, + function () { + delta = new _quillDelta2.default(delta); + return _this11.editor.applyDelta(delta, source); + }, + source, + true, + ); + }, + }, + ]); + + return Quill; + })(); + + Quill.DEFAULTS = { + bounds: null, + formats: null, + modules: {}, + placeholder: '', + readOnly: false, + scrollingContainer: null, + strict: true, + theme: 'default', + }; + Quill.events = _emitter4.default.events; + Quill.sources = _emitter4.default.sources; + // eslint-disable-next-line no-undef + Quill.version = false ? 0 : '1.3.6'; + + Quill.imports = { + delta: _quillDelta2.default, + parchment: _parchment2.default, + 'core/module': _module2.default, + 'core/theme': _theme2.default, + }; + + function expandConfig(container, userConfig) { + userConfig = (0, _extend2.default)( + true, + { + container: container, + modules: { + clipboard: true, + keyboard: true, + history: true, + }, + }, + userConfig, + ); + if (!userConfig.theme || userConfig.theme === Quill.DEFAULTS.theme) { + userConfig.theme = _theme2.default; + } else { + userConfig.theme = Quill.import('themes/' + userConfig.theme); + if (userConfig.theme == null) { + throw new Error( + 'Invalid theme ' + userConfig.theme + '. Did you register it?', + ); + } + } + var themeConfig = (0, _extend2.default)( + true, + {}, + userConfig.theme.DEFAULTS, + ); + [themeConfig, userConfig].forEach(function (config) { + config.modules = config.modules || {}; + Object.keys(config.modules).forEach(function (module) { + if (config.modules[module] === true) { + config.modules[module] = {}; + } + }); + }); + var moduleNames = Object.keys(themeConfig.modules).concat( + Object.keys(userConfig.modules), + ); + var moduleConfig = moduleNames.reduce(function (config, name) { + var moduleClass = Quill.import('modules/' + name); + if (moduleClass == null) { + debug.error( + 'Cannot load ' + + name + + ' module. Are you sure you registered it?', + ); + } else { + config[name] = moduleClass.DEFAULTS || {}; + } + return config; + }, {}); + // Special case toolbar shorthand + if ( + userConfig.modules != null && + userConfig.modules.toolbar && + userConfig.modules.toolbar.constructor !== Object + ) { + userConfig.modules.toolbar = { + container: userConfig.modules.toolbar, + }; + } + userConfig = (0, _extend2.default)( + true, + {}, + Quill.DEFAULTS, + {modules: moduleConfig}, + themeConfig, + userConfig, + ); + ['bounds', 'container', 'scrollingContainer'].forEach(function (key) { + if (typeof userConfig[key] === 'string') { + userConfig[key] = document.querySelector(userConfig[key]); + } + }); + userConfig.modules = Object.keys(userConfig.modules).reduce(function ( + config, + name, + ) { + if (userConfig.modules[name]) { + config[name] = userConfig.modules[name]; + } + return config; + }, + {}); + return userConfig; + } + + // Handle selection preservation and TEXT_CHANGE emission + // common to modification APIs + function modify(modifier, source, index, shift) { + if ( + this.options.strict && + !this.isEnabled() && + source === _emitter4.default.sources.USER + ) { + return new _quillDelta2.default(); + } + var range = index == null ? null : this.getSelection(); + var oldDelta = this.editor.delta; + var change = modifier(); + if (range != null) { + if (index === true) index = range.index; + if (shift == null) { + range = shiftRange(range, change, source); + } else if (shift !== 0) { + range = shiftRange(range, index, shift, source); + } + this.setSelection(range, _emitter4.default.sources.SILENT); + } + if (change.length() > 0) { + var _emitter; + + var args = [ + _emitter4.default.events.TEXT_CHANGE, + change, + oldDelta, + source, + ]; + (_emitter = this.emitter).emit.apply( + _emitter, + [_emitter4.default.events.EDITOR_CHANGE].concat(args), + ); + if (source !== _emitter4.default.sources.SILENT) { + var _emitter2; + + (_emitter2 = this.emitter).emit.apply(_emitter2, args); + } + } + return change; + } + + function overload(index, length, name, value, source) { + var formats = {}; + if ( + typeof index.index === 'number' && + typeof index.length === 'number' + ) { + // Allow for throwaway end (used by insertText/insertEmbed) + if (typeof length !== 'number') { + (source = value), + (value = name), + (name = length), + (length = index.length), + (index = index.index); + } else { + (length = index.length), (index = index.index); + } + } else if (typeof length !== 'number') { + (source = value), (value = name), (name = length), (length = 0); + } + // Handle format being object, two format name/value strings or excluded + if ( + (typeof name === 'undefined' ? 'undefined' : _typeof(name)) === + 'object' + ) { + formats = name; + source = value; + } else if (typeof name === 'string') { + if (value != null) { + formats[name] = value; + } else { + source = name; + } + } + // Handle optional source + source = source || _emitter4.default.sources.API; + return [index, length, formats, source]; + } + + function shiftRange(range, index, length, source) { + if (range == null) return null; + var start = void 0, + end = void 0; + if (index instanceof _quillDelta2.default) { + var _map = [range.index, range.index + range.length].map(function ( + pos, + ) { + return index.transformPosition( + pos, + source !== _emitter4.default.sources.USER, + ); + }); + + var _map2 = _slicedToArray(_map, 2); + + start = _map2[0]; + end = _map2[1]; + } else { + var _map3 = [range.index, range.index + range.length].map(function ( + pos, + ) { + if ( + pos < index || + (pos === index && source === _emitter4.default.sources.USER) + ) + return pos; + if (length >= 0) { + return pos + length; + } else { + return Math.max(index, pos + length); + } + }); + + var _map4 = _slicedToArray(_map3, 2); + + start = _map4[0]; + end = _map4[1]; + } + return new _selection.Range(start, end - start); + } + + exports.expandConfig = expandConfig; + exports.overload = overload; + exports.default = Quill; + + /***/ + }, + /* 6 */ + /***/ function (module, exports, __nested_webpack_require_79872__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _text = __nested_webpack_require_79872__(7); + + var _text2 = _interopRequireDefault(_text); + + var _parchment = __nested_webpack_require_79872__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Inline = (function (_Parchment$Inline) { + _inherits(Inline, _Parchment$Inline); + + function Inline() { + _classCallCheck(this, Inline); + + return _possibleConstructorReturn( + this, + (Inline.__proto__ || Object.getPrototypeOf(Inline)).apply( + this, + arguments, + ), + ); + } + + _createClass( + Inline, + [ + { + key: 'formatAt', + value: function formatAt(index, length, name, value) { + if ( + Inline.compare(this.statics.blotName, name) < 0 && + _parchment2.default.query( + name, + _parchment2.default.Scope.BLOT, + ) + ) { + var blot = this.isolate(index, length); + if (value) { + blot.wrap(name, value); + } + } else { + _get( + Inline.prototype.__proto__ || + Object.getPrototypeOf(Inline.prototype), + 'formatAt', + this, + ).call(this, index, length, name, value); + } + }, + }, + { + key: 'optimize', + value: function optimize(context) { + _get( + Inline.prototype.__proto__ || + Object.getPrototypeOf(Inline.prototype), + 'optimize', + this, + ).call(this, context); + if ( + this.parent instanceof Inline && + Inline.compare( + this.statics.blotName, + this.parent.statics.blotName, + ) > 0 + ) { + var parent = this.parent.isolate( + this.offset(), + this.length(), + ); + this.moveChildren(parent); + parent.wrap(this); + } + }, + }, + ], + [ + { + key: 'compare', + value: function compare(self, other) { + var selfIndex = Inline.order.indexOf(self); + var otherIndex = Inline.order.indexOf(other); + if (selfIndex >= 0 || otherIndex >= 0) { + return selfIndex - otherIndex; + } else if (self === other) { + return 0; + } else if (self < other) { + return -1; + } else { + return 1; + } + }, + }, + ], + ); + + return Inline; + })(_parchment2.default.Inline); + + Inline.allowedChildren = [ + Inline, + _parchment2.default.Embed, + _text2.default, + ]; + // Lower index means deeper in the DOM tree, since not found (-1) is for embeds + Inline.order = [ + 'cursor', + 'inline', // Must be lower + 'underline', + 'strike', + 'italic', + 'bold', + 'script', + 'link', + 'code', // Must be higher + ]; + + exports.default = Inline; + + /***/ + }, + /* 7 */ + /***/ function (module, exports, __nested_webpack_require_86733__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _parchment = __nested_webpack_require_86733__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var TextBlot = (function (_Parchment$Text) { + _inherits(TextBlot, _Parchment$Text); + + function TextBlot() { + _classCallCheck(this, TextBlot); + + return _possibleConstructorReturn( + this, + (TextBlot.__proto__ || Object.getPrototypeOf(TextBlot)).apply( + this, + arguments, + ), + ); + } + + return TextBlot; + })(_parchment2.default.Text); + + exports.default = TextBlot; + + /***/ + }, + /* 8 */ + /***/ function (module, exports, __nested_webpack_require_89063__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _eventemitter = __nested_webpack_require_89063__(54); + + var _eventemitter2 = _interopRequireDefault(_eventemitter); + + var _logger = __nested_webpack_require_89063__(10); + + var _logger2 = _interopRequireDefault(_logger); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var debug = (0, _logger2.default)('quill:events'); + + var EVENTS = ['selectionchange', 'mousedown', 'mouseup', 'click']; + + EVENTS.forEach(function (eventName) { + document.addEventListener(eventName, function () { + for ( + var _len = arguments.length, args = Array(_len), _key = 0; + _key < _len; + _key++ + ) { + args[_key] = arguments[_key]; + } + + [].slice + .call(document.querySelectorAll('.ql-container')) + .forEach(function (node) { + // TODO use WeakMap + if (node.__quill && node.__quill.emitter) { + var _node$__quill$emitter; + + (_node$__quill$emitter = + node.__quill.emitter).handleDOM.apply( + _node$__quill$emitter, + args, + ); + } + }); + }); + }); + + var Emitter = (function (_EventEmitter) { + _inherits(Emitter, _EventEmitter); + + function Emitter() { + _classCallCheck(this, Emitter); + + var _this = _possibleConstructorReturn( + this, + (Emitter.__proto__ || Object.getPrototypeOf(Emitter)).call(this), + ); + + _this.listeners = {}; + _this.on('error', debug.error); + return _this; + } + + _createClass(Emitter, [ + { + key: 'emit', + value: function emit() { + debug.log.apply(debug, arguments); + _get( + Emitter.prototype.__proto__ || + Object.getPrototypeOf(Emitter.prototype), + 'emit', + this, + ).apply(this, arguments); + }, + }, + { + key: 'handleDOM', + value: function handleDOM(event) { + for ( + var _len2 = arguments.length, + args = Array(_len2 > 1 ? _len2 - 1 : 0), + _key2 = 1; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 1] = arguments[_key2]; + } + + (this.listeners[event.type] || []).forEach(function (_ref) { + var node = _ref.node, + handler = _ref.handler; + + if (event.target === node || node.contains(event.target)) { + handler.apply(undefined, [event].concat(args)); + } + }); + }, + }, + { + key: 'listenDOM', + value: function listenDOM(eventName, node, handler) { + if (!this.listeners[eventName]) { + this.listeners[eventName] = []; + } + this.listeners[eventName].push({node: node, handler: handler}); + }, + }, + ]); + + return Emitter; + })(_eventemitter2.default); + + Emitter.events = { + EDITOR_CHANGE: 'editor-change', + SCROLL_BEFORE_UPDATE: 'scroll-before-update', + SCROLL_OPTIMIZE: 'scroll-optimize', + SCROLL_UPDATE: 'scroll-update', + SELECTION_CHANGE: 'selection-change', + TEXT_CHANGE: 'text-change', + }; + Emitter.sources = { + API: 'api', + SILENT: 'silent', + USER: 'user', + }; + + exports.default = Emitter; + + /***/ + }, + /* 9 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var Module = function Module(quill) { + var options = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : {}; + + _classCallCheck(this, Module); + + this.quill = quill; + this.options = options; + }; + + Module.DEFAULTS = {}; + + exports.default = Module; + + /***/ + }, + /* 10 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + var levels = ['error', 'warn', 'log', 'info']; + var level = 'warn'; + + function debug(method) { + if (levels.indexOf(method) <= levels.indexOf(level)) { + var _console; + + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + (_console = console)[method].apply(_console, args); // eslint-disable-line no-console + } + } + + function namespace(ns) { + return levels.reduce(function (logger, method) { + logger[method] = debug.bind(console, method, ns); + return logger; + }, {}); + } + + debug.level = namespace.level = function (newLevel) { + level = newLevel; + }; + + exports.default = namespace; + + /***/ + }, + /* 11 */ + /***/ function (module, exports, __nested_webpack_require_97936__) { + var pSlice = Array.prototype.slice; + var objectKeys = __nested_webpack_require_97936__(52); + var isArguments = __nested_webpack_require_97936__(53); + + var deepEqual = (module.exports = function (actual, expected, opts) { + if (!opts) opts = {}; + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + } else if (actual instanceof Date && expected instanceof Date) { + return actual.getTime() === expected.getTime(); + + // 7.3. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if ( + !actual || + !expected || + (typeof actual != 'object' && typeof expected != 'object') + ) { + return opts.strict ? actual === expected : actual == expected; + + // 7.4. For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected, opts); + } + }); + + function isUndefinedOrNull(value) { + return value === null || value === undefined; + } + + function isBuffer(x) { + if (!x || typeof x !== 'object' || typeof x.length !== 'number') + return false; + if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { + return false; + } + if (x.length > 0 && typeof x[0] !== 'number') return false; + return true; + } + + function objEquiv(a, b, opts) { + var i, key; + if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) return false; + // an identical 'prototype' property. + if (a.prototype !== b.prototype) return false; + //~~~I've managed to break Object.keys through screwy arguments passing. + // Converting to array solves the problem. + if (isArguments(a)) { + if (!isArguments(b)) { + return false; + } + a = pSlice.call(a); + b = pSlice.call(b); + return deepEqual(a, b, opts); + } + if (isBuffer(a)) { + if (!isBuffer(b)) { + return false; + } + if (a.length !== b.length) return false; + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + return true; + } + try { + var ka = objectKeys(a), + kb = objectKeys(b); + } catch (e) { + //happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!deepEqual(a[key], b[key], opts)) return false; + } + return typeof a === typeof b; + } + + /***/ + }, + /* 12 */ + /***/ function (module, exports, __nested_webpack_require_101826__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', {value: true}); + var Registry = __nested_webpack_require_101826__(1); + var Attributor = /** @class */ (function () { + function Attributor(attrName, keyName, options) { + if (options === void 0) { + options = {}; + } + this.attrName = attrName; + this.keyName = keyName; + var attributeBit = Registry.Scope.TYPE & Registry.Scope.ATTRIBUTE; + if (options.scope != null) { + // Ignore type bits, force attribute bit + this.scope = + (options.scope & Registry.Scope.LEVEL) | attributeBit; + } else { + this.scope = Registry.Scope.ATTRIBUTE; + } + if (options.whitelist != null) this.whitelist = options.whitelist; + } + Attributor.keys = function (node) { + return [].map.call(node.attributes, function (item) { + return item.name; + }); + }; + Attributor.prototype.add = function (node, value) { + if (!this.canAdd(node, value)) return false; + node.setAttribute(this.keyName, value); + return true; + }; + Attributor.prototype.canAdd = function (node, value) { + var match = Registry.query( + node, + Registry.Scope.BLOT & (this.scope | Registry.Scope.TYPE), + ); + if (match == null) return false; + if (this.whitelist == null) return true; + if (typeof value === 'string') { + return this.whitelist.indexOf(value.replace(/["']/g, '')) > -1; + } else { + return this.whitelist.indexOf(value) > -1; + } + }; + Attributor.prototype.remove = function (node) { + node.removeAttribute(this.keyName); + }; + Attributor.prototype.value = function (node) { + var value = node.getAttribute(this.keyName); + if (this.canAdd(node, value) && value) { + return value; + } + return ''; + }; + return Attributor; + })(); + exports.default = Attributor; + + /***/ + }, + /* 13 */ + /***/ function (module, exports, __nested_webpack_require_104151__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = exports.Code = undefined; + + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for ( + var _i = arr[Symbol.iterator](), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance', + ); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _quillDelta = __nested_webpack_require_104151__(2); + + var _quillDelta2 = _interopRequireDefault(_quillDelta); + + var _parchment = __nested_webpack_require_104151__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _block = __nested_webpack_require_104151__(4); + + var _block2 = _interopRequireDefault(_block); + + var _inline = __nested_webpack_require_104151__(6); + + var _inline2 = _interopRequireDefault(_inline); + + var _text = __nested_webpack_require_104151__(7); + + var _text2 = _interopRequireDefault(_text); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Code = (function (_Inline) { + _inherits(Code, _Inline); + + function Code() { + _classCallCheck(this, Code); + + return _possibleConstructorReturn( + this, + (Code.__proto__ || Object.getPrototypeOf(Code)).apply( + this, + arguments, + ), + ); + } + + return Code; + })(_inline2.default); + + Code.blotName = 'code'; + Code.tagName = 'CODE'; + + var CodeBlock = (function (_Block) { + _inherits(CodeBlock, _Block); + + function CodeBlock() { + _classCallCheck(this, CodeBlock); + + return _possibleConstructorReturn( + this, + (CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock)).apply( + this, + arguments, + ), + ); + } + + _createClass( + CodeBlock, + [ + { + key: 'delta', + value: function delta() { + var _this3 = this; + + var text = this.domNode.textContent; + if (text.endsWith('\n')) { + // Should always be true + text = text.slice(0, -1); + } + return text.split('\n').reduce(function (delta, frag) { + return delta.insert(frag).insert('\n', _this3.formats()); + }, new _quillDelta2.default()); + }, + }, + { + key: 'format', + value: function format(name, value) { + if (name === this.statics.blotName && value) return; + + var _descendant = this.descendant( + _text2.default, + this.length() - 1, + ), + _descendant2 = _slicedToArray(_descendant, 1), + text = _descendant2[0]; + + if (text != null) { + text.deleteAt(text.length() - 1, 1); + } + _get( + CodeBlock.prototype.__proto__ || + Object.getPrototypeOf(CodeBlock.prototype), + 'format', + this, + ).call(this, name, value); + }, + }, + { + key: 'formatAt', + value: function formatAt(index, length, name, value) { + if (length === 0) return; + if ( + _parchment2.default.query( + name, + _parchment2.default.Scope.BLOCK, + ) == null || + (name === this.statics.blotName && + value === this.statics.formats(this.domNode)) + ) { + return; + } + var nextNewline = this.newlineIndex(index); + if (nextNewline < 0 || nextNewline >= index + length) return; + var prevNewline = this.newlineIndex(index, true) + 1; + var isolateLength = nextNewline - prevNewline + 1; + var blot = this.isolate(prevNewline, isolateLength); + var next = blot.next; + blot.format(name, value); + if (next instanceof CodeBlock) { + next.formatAt( + 0, + index - prevNewline + length - isolateLength, + name, + value, + ); + } + }, + }, + { + key: 'insertAt', + value: function insertAt(index, value, def) { + if (def != null) return; + + var _descendant3 = this.descendant(_text2.default, index), + _descendant4 = _slicedToArray(_descendant3, 2), + text = _descendant4[0], + offset = _descendant4[1]; + + text.insertAt(offset, value); + }, + }, + { + key: 'length', + value: function length() { + var length = this.domNode.textContent.length; + if (!this.domNode.textContent.endsWith('\n')) { + return length + 1; + } + return length; + }, + }, + { + key: 'newlineIndex', + value: function newlineIndex(searchIndex) { + var reverse = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : false; + + if (!reverse) { + var offset = this.domNode.textContent + .slice(searchIndex) + .indexOf('\n'); + return offset > -1 ? searchIndex + offset : -1; + } else { + return this.domNode.textContent + .slice(0, searchIndex) + .lastIndexOf('\n'); + } + }, + }, + { + key: 'optimize', + value: function optimize(context) { + if (!this.domNode.textContent.endsWith('\n')) { + this.appendChild(_parchment2.default.create('text', '\n')); + } + _get( + CodeBlock.prototype.__proto__ || + Object.getPrototypeOf(CodeBlock.prototype), + 'optimize', + this, + ).call(this, context); + var next = this.next; + if ( + next != null && + next.prev === this && + next.statics.blotName === this.statics.blotName && + this.statics.formats(this.domNode) === + next.statics.formats(next.domNode) + ) { + next.optimize(context); + next.moveChildren(this); + next.remove(); + } + }, + }, + { + key: 'replace', + value: function replace(target) { + _get( + CodeBlock.prototype.__proto__ || + Object.getPrototypeOf(CodeBlock.prototype), + 'replace', + this, + ).call(this, target); + [].slice + .call(this.domNode.querySelectorAll('*')) + .forEach(function (node) { + var blot = _parchment2.default.find(node); + if (blot == null) { + node.parentNode.removeChild(node); + } else if (blot instanceof _parchment2.default.Embed) { + blot.remove(); + } else { + blot.unwrap(); + } + }); + }, + }, + ], + [ + { + key: 'create', + value: function create(value) { + var domNode = _get( + CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock), + 'create', + this, + ).call(this, value); + domNode.setAttribute('spellcheck', false); + return domNode; + }, + }, + { + key: 'formats', + value: function formats() { + return true; + }, + }, + ], + ); + + return CodeBlock; + })(_block2.default); + + CodeBlock.blotName = 'code-block'; + CodeBlock.tagName = 'PRE'; + CodeBlock.TAB = ' '; + + exports.Code = Code; + exports.default = CodeBlock; + + /***/ + }, + /* 14 */ + /***/ function (module, exports, __nested_webpack_require_117162__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for ( + var _i = arr[Symbol.iterator](), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance', + ); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _quillDelta = __nested_webpack_require_117162__(2); + + var _quillDelta2 = _interopRequireDefault(_quillDelta); + + var _op = __nested_webpack_require_117162__(20); + + var _op2 = _interopRequireDefault(_op); + + var _parchment = __nested_webpack_require_117162__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _code = __nested_webpack_require_117162__(13); + + var _code2 = _interopRequireDefault(_code); + + var _cursor = __nested_webpack_require_117162__(24); + + var _cursor2 = _interopRequireDefault(_cursor); + + var _block = __nested_webpack_require_117162__(4); + + var _block2 = _interopRequireDefault(_block); + + var _break = __nested_webpack_require_117162__(16); + + var _break2 = _interopRequireDefault(_break); + + var _clone = __nested_webpack_require_117162__(21); + + var _clone2 = _interopRequireDefault(_clone); + + var _deepEqual = __nested_webpack_require_117162__(11); + + var _deepEqual2 = _interopRequireDefault(_deepEqual); + + var _extend = __nested_webpack_require_117162__(3); + + var _extend2 = _interopRequireDefault(_extend); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var ASCII = /^[ -~]*$/; + + var Editor = (function () { + function Editor(scroll) { + _classCallCheck(this, Editor); + + this.scroll = scroll; + this.delta = this.getDelta(); + } + + _createClass(Editor, [ + { + key: 'applyDelta', + value: function applyDelta(delta) { + var _this = this; + + var consumeNextNewline = false; + this.scroll.update(); + var scrollLength = this.scroll.length(); + this.scroll.batchStart(); + delta = normalizeDelta(delta); + delta.reduce(function (index, op) { + var length = op.retain || op.delete || op.insert.length || 1; + var attributes = op.attributes || {}; + if (op.insert != null) { + if (typeof op.insert === 'string') { + var text = op.insert; + if (text.endsWith('\n') && consumeNextNewline) { + consumeNextNewline = false; + text = text.slice(0, -1); + } + if (index >= scrollLength && !text.endsWith('\n')) { + consumeNextNewline = true; + } + _this.scroll.insertAt(index, text); + + var _scroll$line = _this.scroll.line(index), + _scroll$line2 = _slicedToArray(_scroll$line, 2), + line = _scroll$line2[0], + offset = _scroll$line2[1]; + + var formats = (0, _extend2.default)( + {}, + (0, _block.bubbleFormats)(line), + ); + if (line instanceof _block2.default) { + var _line$descendant = line.descendant( + _parchment2.default.Leaf, + offset, + ), + _line$descendant2 = _slicedToArray( + _line$descendant, + 1, + ), + leaf = _line$descendant2[0]; + + formats = (0, _extend2.default)( + formats, + (0, _block.bubbleFormats)(leaf), + ); + } + attributes = + _op2.default.attributes.diff(formats, attributes) || {}; + } else if (_typeof(op.insert) === 'object') { + var key = Object.keys(op.insert)[0]; // There should only be one key + if (key == null) return index; + _this.scroll.insertAt(index, key, op.insert[key]); + } + scrollLength += length; + } + Object.keys(attributes).forEach(function (name) { + _this.scroll.formatAt( + index, + length, + name, + attributes[name], + ); + }); + return index + length; + }, 0); + delta.reduce(function (index, op) { + if (typeof op.delete === 'number') { + _this.scroll.deleteAt(index, op.delete); + return index; + } + return index + (op.retain || op.insert.length || 1); + }, 0); + this.scroll.batchEnd(); + return this.update(delta); + }, + }, + { + key: 'deleteText', + value: function deleteText(index, length) { + this.scroll.deleteAt(index, length); + return this.update( + new _quillDelta2.default().retain(index).delete(length), + ); + }, + }, + { + key: 'formatLine', + value: function formatLine(index, length) { + var _this2 = this; + + var formats = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : {}; + + this.scroll.update(); + Object.keys(formats).forEach(function (format) { + if ( + _this2.scroll.whitelist != null && + !_this2.scroll.whitelist[format] + ) + return; + var lines = _this2.scroll.lines(index, Math.max(length, 1)); + var lengthRemaining = length; + lines.forEach(function (line) { + var lineLength = line.length(); + if (!(line instanceof _code2.default)) { + line.format(format, formats[format]); + } else { + var codeIndex = index - line.offset(_this2.scroll); + var codeLength = + line.newlineIndex(codeIndex + lengthRemaining) - + codeIndex + + 1; + line.formatAt( + codeIndex, + codeLength, + format, + formats[format], + ); + } + lengthRemaining -= lineLength; + }); + }); + this.scroll.optimize(); + return this.update( + new _quillDelta2.default() + .retain(index) + .retain(length, (0, _clone2.default)(formats)), + ); + }, + }, + { + key: 'formatText', + value: function formatText(index, length) { + var _this3 = this; + + var formats = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : {}; + + Object.keys(formats).forEach(function (format) { + _this3.scroll.formatAt( + index, + length, + format, + formats[format], + ); + }); + return this.update( + new _quillDelta2.default() + .retain(index) + .retain(length, (0, _clone2.default)(formats)), + ); + }, + }, + { + key: 'getContents', + value: function getContents(index, length) { + return this.delta.slice(index, index + length); + }, + }, + { + key: 'getDelta', + value: function getDelta() { + return this.scroll.lines().reduce(function (delta, line) { + return delta.concat(line.delta()); + }, new _quillDelta2.default()); + }, + }, + { + key: 'getFormat', + value: function getFormat(index) { + var length = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : 0; + + var lines = [], + leaves = []; + if (length === 0) { + this.scroll.path(index).forEach(function (path) { + var _path = _slicedToArray(path, 1), + blot = _path[0]; + + if (blot instanceof _block2.default) { + lines.push(blot); + } else if (blot instanceof _parchment2.default.Leaf) { + leaves.push(blot); + } + }); + } else { + lines = this.scroll.lines(index, length); + leaves = this.scroll.descendants( + _parchment2.default.Leaf, + index, + length, + ); + } + var formatsArr = [lines, leaves].map(function (blots) { + if (blots.length === 0) return {}; + var formats = (0, _block.bubbleFormats)(blots.shift()); + while (Object.keys(formats).length > 0) { + var blot = blots.shift(); + if (blot == null) return formats; + formats = combineFormats( + (0, _block.bubbleFormats)(blot), + formats, + ); + } + return formats; + }); + return _extend2.default.apply(_extend2.default, formatsArr); + }, + }, + { + key: 'getText', + value: function getText(index, length) { + return this.getContents(index, length) + .filter(function (op) { + return typeof op.insert === 'string'; + }) + .map(function (op) { + return op.insert; + }) + .join(''); + }, + }, + { + key: 'insertEmbed', + value: function insertEmbed(index, embed, value) { + this.scroll.insertAt(index, embed, value); + return this.update( + new _quillDelta2.default() + .retain(index) + .insert(_defineProperty({}, embed, value)), + ); + }, + }, + { + key: 'insertText', + value: function insertText(index, text) { + var _this4 = this; + + var formats = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : {}; + + text = text.replace(/\r\n/g, '\n').replace(/\r/g, '\n'); + this.scroll.insertAt(index, text); + Object.keys(formats).forEach(function (format) { + _this4.scroll.formatAt( + index, + text.length, + format, + formats[format], + ); + }); + return this.update( + new _quillDelta2.default() + .retain(index) + .insert(text, (0, _clone2.default)(formats)), + ); + }, + }, + { + key: 'isBlank', + value: function isBlank() { + if (this.scroll.children.length == 0) return true; + if (this.scroll.children.length > 1) return false; + var block = this.scroll.children.head; + if (block.statics.blotName !== _block2.default.blotName) + return false; + if (block.children.length > 1) return false; + return block.children.head instanceof _break2.default; + }, + }, + { + key: 'removeFormat', + value: function removeFormat(index, length) { + var text = this.getText(index, length); + + var _scroll$line3 = this.scroll.line(index + length), + _scroll$line4 = _slicedToArray(_scroll$line3, 2), + line = _scroll$line4[0], + offset = _scroll$line4[1]; + + var suffixLength = 0, + suffix = new _quillDelta2.default(); + if (line != null) { + if (!(line instanceof _code2.default)) { + suffixLength = line.length() - offset; + } else { + suffixLength = line.newlineIndex(offset) - offset + 1; + } + suffix = line + .delta() + .slice(offset, offset + suffixLength - 1) + .insert('\n'); + } + var contents = this.getContents(index, length + suffixLength); + var diff = contents.diff( + new _quillDelta2.default().insert(text).concat(suffix), + ); + var delta = new _quillDelta2.default() + .retain(index) + .concat(diff); + return this.applyDelta(delta); + }, + }, + { + key: 'update', + value: function update(change) { + var mutations = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : []; + var cursorIndex = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : undefined; + + var oldDelta = this.delta; + if ( + mutations.length === 1 && + mutations[0].type === 'characterData' && + mutations[0].target.data.match(ASCII) && + _parchment2.default.find(mutations[0].target) + ) { + // Optimization for character changes + var textBlot = _parchment2.default.find(mutations[0].target); + var formats = (0, _block.bubbleFormats)(textBlot); + var index = textBlot.offset(this.scroll); + var oldValue = mutations[0].oldValue.replace( + _cursor2.default.CONTENTS, + '', + ); + var oldText = new _quillDelta2.default().insert(oldValue); + var newText = new _quillDelta2.default().insert( + textBlot.value(), + ); + var diffDelta = new _quillDelta2.default() + .retain(index) + .concat(oldText.diff(newText, cursorIndex)); + change = diffDelta.reduce(function (delta, op) { + if (op.insert) { + return delta.insert(op.insert, formats); + } else { + return delta.push(op); + } + }, new _quillDelta2.default()); + this.delta = oldDelta.compose(change); + } else { + this.delta = this.getDelta(); + if ( + !change || + !(0, _deepEqual2.default)( + oldDelta.compose(change), + this.delta, + ) + ) { + change = oldDelta.diff(this.delta, cursorIndex); + } + } + return change; + }, + }, + ]); + + return Editor; + })(); + + function combineFormats(formats, combined) { + return Object.keys(combined).reduce(function (merged, name) { + if (formats[name] == null) return merged; + if (combined[name] === formats[name]) { + merged[name] = combined[name]; + } else if (Array.isArray(combined[name])) { + if (combined[name].indexOf(formats[name]) < 0) { + merged[name] = combined[name].concat([formats[name]]); + } + } else { + merged[name] = [combined[name], formats[name]]; + } + return merged; + }, {}); + } + + function normalizeDelta(delta) { + return delta.reduce(function (delta, op) { + if (op.insert === 1) { + var attributes = (0, _clone2.default)(op.attributes); + delete attributes['image']; + return delta.insert({image: op.attributes.image}, attributes); + } + if ( + op.attributes != null && + (op.attributes.list === true || op.attributes.bullet === true) + ) { + op = (0, _clone2.default)(op); + if (op.attributes.list) { + op.attributes.list = 'ordered'; + } else { + op.attributes.list = 'bullet'; + delete op.attributes.bullet; + } + } + if (typeof op.insert === 'string') { + var text = op.insert.replace(/\r\n/g, '\n').replace(/\r/g, '\n'); + return delta.insert(text, op.attributes); + } + return delta.push(op); + }, new _quillDelta2.default()); + } + + exports.default = Editor; + + /***/ + }, + /* 15 */ + /***/ function (module, exports, __nested_webpack_require_138197__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = exports.Range = undefined; + + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for ( + var _i = arr[Symbol.iterator](), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance', + ); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _parchment = __nested_webpack_require_138197__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _clone = __nested_webpack_require_138197__(21); + + var _clone2 = _interopRequireDefault(_clone); + + var _deepEqual = __nested_webpack_require_138197__(11); + + var _deepEqual2 = _interopRequireDefault(_deepEqual); + + var _emitter3 = __nested_webpack_require_138197__(8); + + var _emitter4 = _interopRequireDefault(_emitter3); + + var _logger = __nested_webpack_require_138197__(10); + + var _logger2 = _interopRequireDefault(_logger); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + return arr2; + } else { + return Array.from(arr); + } + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var debug = (0, _logger2.default)('quill:selection'); + + var Range = function Range(index) { + var length = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : 0; + + _classCallCheck(this, Range); + + this.index = index; + this.length = length; + }; + + var Selection = (function () { + function Selection(scroll, emitter) { + var _this = this; + + _classCallCheck(this, Selection); + + this.emitter = emitter; + this.scroll = scroll; + this.composing = false; + this.mouseDown = false; + this.root = this.scroll.domNode; + this.cursor = _parchment2.default.create('cursor', this); + // savedRange is last non-null range + this.lastRange = this.savedRange = new Range(0, 0); + this.handleComposition(); + this.handleDragging(); + this.emitter.listenDOM('selectionchange', document, function () { + if (!_this.mouseDown) { + setTimeout( + _this.update.bind(_this, _emitter4.default.sources.USER), + 1, + ); + } + }); + this.emitter.on( + _emitter4.default.events.EDITOR_CHANGE, + function (type, delta) { + if ( + type === _emitter4.default.events.TEXT_CHANGE && + delta.length() > 0 + ) { + _this.update(_emitter4.default.sources.SILENT); + } + }, + ); + this.emitter.on( + _emitter4.default.events.SCROLL_BEFORE_UPDATE, + function () { + if (!_this.hasFocus()) return; + var native = _this.getNativeRange(); + if (native == null) return; + if (native.start.node === _this.cursor.textNode) return; // cursor.restore() will handle + // TODO unclear if this has negative side effects + _this.emitter.once( + _emitter4.default.events.SCROLL_UPDATE, + function () { + try { + _this.setNativeRange( + native.start.node, + native.start.offset, + native.end.node, + native.end.offset, + ); + } catch (ignored) {} + }, + ); + }, + ); + this.emitter.on( + _emitter4.default.events.SCROLL_OPTIMIZE, + function (mutations, context) { + if (context.range) { + var _context$range = context.range, + startNode = _context$range.startNode, + startOffset = _context$range.startOffset, + endNode = _context$range.endNode, + endOffset = _context$range.endOffset; + + _this.setNativeRange( + startNode, + startOffset, + endNode, + endOffset, + ); + } + }, + ); + this.update(_emitter4.default.sources.SILENT); + } + + _createClass(Selection, [ + { + key: 'handleComposition', + value: function handleComposition() { + var _this2 = this; + + this.root.addEventListener('compositionstart', function () { + _this2.composing = true; + }); + this.root.addEventListener('compositionend', function () { + _this2.composing = false; + if (_this2.cursor.parent) { + var range = _this2.cursor.restore(); + if (!range) return; + setTimeout(function () { + _this2.setNativeRange( + range.startNode, + range.startOffset, + range.endNode, + range.endOffset, + ); + }, 1); + } + }); + }, + }, + { + key: 'handleDragging', + value: function handleDragging() { + var _this3 = this; + + this.emitter.listenDOM('mousedown', document.body, function () { + _this3.mouseDown = true; + }); + this.emitter.listenDOM('mouseup', document.body, function () { + _this3.mouseDown = false; + _this3.update(_emitter4.default.sources.USER); + }); + }, + }, + { + key: 'focus', + value: function focus() { + if (this.hasFocus()) return; + this.root.focus(); + this.setRange(this.savedRange); + }, + }, + { + key: 'format', + value: function format(_format, value) { + if ( + this.scroll.whitelist != null && + !this.scroll.whitelist[_format] + ) + return; + this.scroll.update(); + var nativeRange = this.getNativeRange(); + if ( + nativeRange == null || + !nativeRange.native.collapsed || + _parchment2.default.query( + _format, + _parchment2.default.Scope.BLOCK, + ) + ) + return; + if (nativeRange.start.node !== this.cursor.textNode) { + var blot = _parchment2.default.find( + nativeRange.start.node, + false, + ); + if (blot == null) return; + // TODO Give blot ability to not split + if (blot instanceof _parchment2.default.Leaf) { + var after = blot.split(nativeRange.start.offset); + blot.parent.insertBefore(this.cursor, after); + } else { + blot.insertBefore(this.cursor, nativeRange.start.node); // Should never happen + } + this.cursor.attach(); + } + this.cursor.format(_format, value); + this.scroll.optimize(); + this.setNativeRange( + this.cursor.textNode, + this.cursor.textNode.data.length, + ); + this.update(); + }, + }, + { + key: 'getBounds', + value: function getBounds(index) { + var length = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : 0; + + var scrollLength = this.scroll.length(); + index = Math.min(index, scrollLength - 1); + length = Math.min(index + length, scrollLength - 1) - index; + var node = void 0, + _scroll$leaf = this.scroll.leaf(index), + _scroll$leaf2 = _slicedToArray(_scroll$leaf, 2), + leaf = _scroll$leaf2[0], + offset = _scroll$leaf2[1]; + if (leaf == null) return null; + + var _leaf$position = leaf.position(offset, true); + + var _leaf$position2 = _slicedToArray(_leaf$position, 2); + + node = _leaf$position2[0]; + offset = _leaf$position2[1]; + + var range = document.createRange(); + if (length > 0) { + range.setStart(node, offset); + + var _scroll$leaf3 = this.scroll.leaf(index + length); + + var _scroll$leaf4 = _slicedToArray(_scroll$leaf3, 2); + + leaf = _scroll$leaf4[0]; + offset = _scroll$leaf4[1]; + + if (leaf == null) return null; + + var _leaf$position3 = leaf.position(offset, true); + + var _leaf$position4 = _slicedToArray(_leaf$position3, 2); + + node = _leaf$position4[0]; + offset = _leaf$position4[1]; + + range.setEnd(node, offset); + return range.getBoundingClientRect(); + } else { + var side = 'left'; + var rect = void 0; + if (node instanceof Text) { + if (offset < node.data.length) { + range.setStart(node, offset); + range.setEnd(node, offset + 1); + } else { + range.setStart(node, offset - 1); + range.setEnd(node, offset); + side = 'right'; + } + rect = range.getBoundingClientRect(); + } else { + rect = leaf.domNode.getBoundingClientRect(); + if (offset > 0) side = 'right'; + } + return { + bottom: rect.top + rect.height, + height: rect.height, + left: rect[side], + right: rect[side], + top: rect.top, + width: 0, + }; + } + }, + }, + { + key: 'getNativeRange', + value: function getNativeRange() { + var selection = document.getSelection(); + if (selection == null || selection.rangeCount <= 0) return null; + var nativeRange = selection.getRangeAt(0); + if (nativeRange == null) return null; + var range = this.normalizeNative(nativeRange); + debug.info('getNativeRange', range); + return range; + }, + }, + { + key: 'getRange', + value: function getRange() { + var normalized = this.getNativeRange(); + if (normalized == null) return [null, null]; + var range = this.normalizedToRange(normalized); + return [range, normalized]; + }, + }, + { + key: 'hasFocus', + value: function hasFocus() { + return document.activeElement === this.root; + }, + }, + { + key: 'normalizedToRange', + value: function normalizedToRange(range) { + var _this4 = this; + + var positions = [[range.start.node, range.start.offset]]; + if (!range.native.collapsed) { + positions.push([range.end.node, range.end.offset]); + } + var indexes = positions.map(function (position) { + var _position = _slicedToArray(position, 2), + node = _position[0], + offset = _position[1]; + + var blot = _parchment2.default.find(node, true); + var index = blot.offset(_this4.scroll); + if (offset === 0) { + return index; + } else if (blot instanceof _parchment2.default.Container) { + return index + blot.length(); + } else { + return index + blot.index(node, offset); + } + }); + var end = Math.min( + Math.max.apply(Math, _toConsumableArray(indexes)), + this.scroll.length() - 1, + ); + var start = Math.min.apply( + Math, + [end].concat(_toConsumableArray(indexes)), + ); + return new Range(start, end - start); + }, + }, + { + key: 'normalizeNative', + value: function normalizeNative(nativeRange) { + if ( + !contains(this.root, nativeRange.startContainer) || + (!nativeRange.collapsed && + !contains(this.root, nativeRange.endContainer)) + ) { + return null; + } + var range = { + start: { + node: nativeRange.startContainer, + offset: nativeRange.startOffset, + }, + end: { + node: nativeRange.endContainer, + offset: nativeRange.endOffset, + }, + native: nativeRange, + }; + [range.start, range.end].forEach(function (position) { + var node = position.node, + offset = position.offset; + while ( + !(node instanceof Text) && + node.childNodes.length > 0 + ) { + if (node.childNodes.length > offset) { + node = node.childNodes[offset]; + offset = 0; + } else if (node.childNodes.length === offset) { + node = node.lastChild; + offset = + node instanceof Text + ? node.data.length + : node.childNodes.length + 1; + } else { + break; + } + } + (position.node = node), (position.offset = offset); + }); + return range; + }, + }, + { + key: 'rangeToNative', + value: function rangeToNative(range) { + var _this5 = this; + + var indexes = range.collapsed + ? [range.index] + : [range.index, range.index + range.length]; + var args = []; + var scrollLength = this.scroll.length(); + indexes.forEach(function (index, i) { + index = Math.min(scrollLength - 1, index); + var node = void 0, + _scroll$leaf5 = _this5.scroll.leaf(index), + _scroll$leaf6 = _slicedToArray(_scroll$leaf5, 2), + leaf = _scroll$leaf6[0], + offset = _scroll$leaf6[1]; + var _leaf$position5 = leaf.position(offset, i !== 0); + + var _leaf$position6 = _slicedToArray(_leaf$position5, 2); + + node = _leaf$position6[0]; + offset = _leaf$position6[1]; + + args.push(node, offset); + }); + if (args.length < 2) { + args = args.concat(args); + } + return args; + }, + }, + { + key: 'scrollIntoView', + value: function scrollIntoView(scrollingContainer) { + var range = this.lastRange; + if (range == null) return; + var bounds = this.getBounds(range.index, range.length); + if (bounds == null) return; + var limit = this.scroll.length() - 1; + + var _scroll$line = this.scroll.line( + Math.min(range.index, limit), + ), + _scroll$line2 = _slicedToArray(_scroll$line, 1), + first = _scroll$line2[0]; + + var last = first; + if (range.length > 0) { + var _scroll$line3 = this.scroll.line( + Math.min(range.index + range.length, limit), + ); + + var _scroll$line4 = _slicedToArray(_scroll$line3, 1); + + last = _scroll$line4[0]; + } + if (first == null || last == null) return; + var scrollBounds = scrollingContainer.getBoundingClientRect(); + if (bounds.top < scrollBounds.top) { + scrollingContainer.scrollTop -= scrollBounds.top - bounds.top; + } else if (bounds.bottom > scrollBounds.bottom) { + scrollingContainer.scrollTop += + bounds.bottom - scrollBounds.bottom; + } + }, + }, + { + key: 'setNativeRange', + value: function setNativeRange(startNode, startOffset) { + var endNode = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : startNode; + var endOffset = + arguments.length > 3 && arguments[3] !== undefined + ? arguments[3] + : startOffset; + var force = + arguments.length > 4 && arguments[4] !== undefined + ? arguments[4] + : false; + + debug.info( + 'setNativeRange', + startNode, + startOffset, + endNode, + endOffset, + ); + if ( + startNode != null && + (this.root.parentNode == null || + startNode.parentNode == null || + endNode.parentNode == null) + ) { + return; + } + var selection = document.getSelection(); + if (selection == null) return; + if (startNode != null) { + if (!this.hasFocus()) this.root.focus(); + var native = (this.getNativeRange() || {}).native; + if ( + native == null || + force || + startNode !== native.startContainer || + startOffset !== native.startOffset || + endNode !== native.endContainer || + endOffset !== native.endOffset + ) { + if (startNode.tagName == 'BR') { + startOffset = [].indexOf.call( + startNode.parentNode.childNodes, + startNode, + ); + startNode = startNode.parentNode; + } + if (endNode.tagName == 'BR') { + endOffset = [].indexOf.call( + endNode.parentNode.childNodes, + endNode, + ); + endNode = endNode.parentNode; + } + var range = document.createRange(); + range.setStart(startNode, startOffset); + range.setEnd(endNode, endOffset); + selection.removeAllRanges(); + selection.addRange(range); + } + } else { + selection.removeAllRanges(); + this.root.blur(); + document.body.focus(); // root.blur() not enough on IE11+Travis+SauceLabs (but not local VMs) + } + }, + }, + { + key: 'setRange', + value: function setRange(range) { + var force = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : false; + var source = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : _emitter4.default.sources.API; + + if (typeof force === 'string') { + source = force; + force = false; + } + debug.info('setRange', range); + if (range != null) { + var args = this.rangeToNative(range); + this.setNativeRange.apply( + this, + _toConsumableArray(args).concat([force]), + ); + } else { + this.setNativeRange(null); + } + this.update(source); + }, + }, + { + key: 'update', + value: function update() { + var source = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : _emitter4.default.sources.USER; + + var oldRange = this.lastRange; + + var _getRange = this.getRange(), + _getRange2 = _slicedToArray(_getRange, 2), + lastRange = _getRange2[0], + nativeRange = _getRange2[1]; + + this.lastRange = lastRange; + if (this.lastRange != null) { + this.savedRange = this.lastRange; + } + if (!(0, _deepEqual2.default)(oldRange, this.lastRange)) { + var _emitter; + + if ( + !this.composing && + nativeRange != null && + nativeRange.native.collapsed && + nativeRange.start.node !== this.cursor.textNode + ) { + this.cursor.restore(); + } + var args = [ + _emitter4.default.events.SELECTION_CHANGE, + (0, _clone2.default)(this.lastRange), + (0, _clone2.default)(oldRange), + source, + ]; + (_emitter = this.emitter).emit.apply( + _emitter, + [_emitter4.default.events.EDITOR_CHANGE].concat(args), + ); + if (source !== _emitter4.default.sources.SILENT) { + var _emitter2; + + (_emitter2 = this.emitter).emit.apply(_emitter2, args); + } + } + }, + }, + ]); + + return Selection; + })(); + + function contains(parent, descendant) { + try { + // Firefox inserts inaccessible nodes around video elements + descendant.parentNode; + } catch (e) { + return false; + } + // IE11 has bug with Text nodes + // https://connect.microsoft.com/IE/feedback/details/780874/node-contains-is-incorrect + if (descendant instanceof Text) { + descendant = descendant.parentNode; + } + return parent.contains(descendant); + } + + exports.Range = Range; + exports.default = Selection; + + /***/ + }, + /* 16 */ + /***/ function (module, exports, __nested_webpack_require_164358__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _parchment = __nested_webpack_require_164358__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Break = (function (_Parchment$Embed) { + _inherits(Break, _Parchment$Embed); + + function Break() { + _classCallCheck(this, Break); + + return _possibleConstructorReturn( + this, + (Break.__proto__ || Object.getPrototypeOf(Break)).apply( + this, + arguments, + ), + ); + } + + _createClass( + Break, + [ + { + key: 'insertInto', + value: function insertInto(parent, ref) { + if (parent.children.length === 0) { + _get( + Break.prototype.__proto__ || + Object.getPrototypeOf(Break.prototype), + 'insertInto', + this, + ).call(this, parent, ref); + } else { + this.remove(); + } + }, + }, + { + key: 'length', + value: function length() { + return 0; + }, + }, + { + key: 'value', + value: function value() { + return ''; + }, + }, + ], + [ + { + key: 'value', + value: function value() { + return undefined; + }, + }, + ], + ); + + return Break; + })(_parchment2.default.Embed); + + Break.blotName = 'break'; + Break.tagName = 'BR'; + + exports.default = Break; + + /***/ + }, + /* 17 */ + /***/ function (module, exports, __nested_webpack_require_169321__) { + 'use strict'; + + var __extends = + (this && this.__extends) || + (function () { + var extendStatics = + Object.setPrototypeOf || + ({__proto__: []} instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function (d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); + Object.defineProperty(exports, '__esModule', {value: true}); + var linked_list_1 = __nested_webpack_require_169321__(44); + var shadow_1 = __nested_webpack_require_169321__(30); + var Registry = __nested_webpack_require_169321__(1); + var ContainerBlot = /** @class */ (function (_super) { + __extends(ContainerBlot, _super); + function ContainerBlot(domNode) { + var _this = _super.call(this, domNode) || this; + _this.build(); + return _this; + } + ContainerBlot.prototype.appendChild = function (other) { + this.insertBefore(other); + }; + ContainerBlot.prototype.attach = function () { + _super.prototype.attach.call(this); + this.children.forEach(function (child) { + child.attach(); + }); + }; + ContainerBlot.prototype.build = function () { + var _this = this; + this.children = new linked_list_1.default(); + // Need to be reversed for if DOM nodes already in order + [].slice + .call(this.domNode.childNodes) + .reverse() + .forEach(function (node) { + try { + var child = makeBlot(node); + _this.insertBefore(child, _this.children.head || undefined); + } catch (err) { + if (err instanceof Registry.ParchmentError) return; + else throw err; + } + }); + }; + ContainerBlot.prototype.deleteAt = function (index, length) { + if (index === 0 && length === this.length()) { + return this.remove(); + } + this.children.forEachAt( + index, + length, + function (child, offset, length) { + child.deleteAt(offset, length); + }, + ); + }; + ContainerBlot.prototype.descendant = function (criteria, index) { + var _a = this.children.find(index), + child = _a[0], + offset = _a[1]; + if ( + (criteria.blotName == null && criteria(child)) || + (criteria.blotName != null && child instanceof criteria) + ) { + return [child, offset]; + } else if (child instanceof ContainerBlot) { + return child.descendant(criteria, offset); + } else { + return [null, -1]; + } + }; + ContainerBlot.prototype.descendants = function ( + criteria, + index, + length, + ) { + if (index === void 0) { + index = 0; + } + if (length === void 0) { + length = Number.MAX_VALUE; + } + var descendants = []; + var lengthLeft = length; + this.children.forEachAt( + index, + length, + function (child, index, length) { + if ( + (criteria.blotName == null && criteria(child)) || + (criteria.blotName != null && child instanceof criteria) + ) { + descendants.push(child); + } + if (child instanceof ContainerBlot) { + descendants = descendants.concat( + child.descendants(criteria, index, lengthLeft), + ); + } + lengthLeft -= length; + }, + ); + return descendants; + }; + ContainerBlot.prototype.detach = function () { + this.children.forEach(function (child) { + child.detach(); + }); + _super.prototype.detach.call(this); + }; + ContainerBlot.prototype.formatAt = function ( + index, + length, + name, + value, + ) { + this.children.forEachAt( + index, + length, + function (child, offset, length) { + child.formatAt(offset, length, name, value); + }, + ); + }; + ContainerBlot.prototype.insertAt = function (index, value, def) { + var _a = this.children.find(index), + child = _a[0], + offset = _a[1]; + if (child) { + child.insertAt(offset, value, def); + } else { + var blot = + def == null + ? Registry.create('text', value) + : Registry.create(value, def); + this.appendChild(blot); + } + }; + ContainerBlot.prototype.insertBefore = function (childBlot, refBlot) { + if ( + this.statics.allowedChildren != null && + !this.statics.allowedChildren.some(function (child) { + return childBlot instanceof child; + }) + ) { + throw new Registry.ParchmentError( + 'Cannot insert ' + + childBlot.statics.blotName + + ' into ' + + this.statics.blotName, + ); + } + childBlot.insertInto(this, refBlot); + }; + ContainerBlot.prototype.length = function () { + return this.children.reduce(function (memo, child) { + return memo + child.length(); + }, 0); + }; + ContainerBlot.prototype.moveChildren = function ( + targetParent, + refNode, + ) { + this.children.forEach(function (child) { + targetParent.insertBefore(child, refNode); + }); + }; + ContainerBlot.prototype.optimize = function (context) { + _super.prototype.optimize.call(this, context); + if (this.children.length === 0) { + if (this.statics.defaultChild != null) { + var child = Registry.create(this.statics.defaultChild); + this.appendChild(child); + child.optimize(context); + } else { + this.remove(); + } + } + }; + ContainerBlot.prototype.path = function (index, inclusive) { + if (inclusive === void 0) { + inclusive = false; + } + var _a = this.children.find(index, inclusive), + child = _a[0], + offset = _a[1]; + var position = [[this, index]]; + if (child instanceof ContainerBlot) { + return position.concat(child.path(offset, inclusive)); + } else if (child != null) { + position.push([child, offset]); + } + return position; + }; + ContainerBlot.prototype.removeChild = function (child) { + this.children.remove(child); + }; + ContainerBlot.prototype.replace = function (target) { + if (target instanceof ContainerBlot) { + target.moveChildren(this); + } + _super.prototype.replace.call(this, target); + }; + ContainerBlot.prototype.split = function (index, force) { + if (force === void 0) { + force = false; + } + if (!force) { + if (index === 0) return this; + if (index === this.length()) return this.next; + } + var after = this.clone(); + this.parent.insertBefore(after, this.next); + this.children.forEachAt( + index, + this.length(), + function (child, offset, length) { + child = child.split(offset, force); + after.appendChild(child); + }, + ); + return after; + }; + ContainerBlot.prototype.unwrap = function () { + this.moveChildren(this.parent, this.next); + this.remove(); + }; + ContainerBlot.prototype.update = function (mutations, context) { + var _this = this; + var addedNodes = []; + var removedNodes = []; + mutations.forEach(function (mutation) { + if ( + mutation.target === _this.domNode && + mutation.type === 'childList' + ) { + addedNodes.push.apply(addedNodes, mutation.addedNodes); + removedNodes.push.apply(removedNodes, mutation.removedNodes); + } + }); + removedNodes.forEach(function (node) { + // Check node has actually been removed + // One exception is Chrome does not immediately remove IFRAMEs + // from DOM but MutationRecord is correct in its reported removal + if ( + node.parentNode != null && + // @ts-ignore + node.tagName !== 'IFRAME' && + document.body.compareDocumentPosition(node) & + Node.DOCUMENT_POSITION_CONTAINED_BY + ) { + return; + } + var blot = Registry.find(node); + if (blot == null) return; + if ( + blot.domNode.parentNode == null || + blot.domNode.parentNode === _this.domNode + ) { + blot.detach(); + } + }); + addedNodes + .filter(function (node) { + return node.parentNode == _this.domNode; + }) + .sort(function (a, b) { + if (a === b) return 0; + if ( + a.compareDocumentPosition(b) & + Node.DOCUMENT_POSITION_FOLLOWING + ) { + return 1; + } + return -1; + }) + .forEach(function (node) { + var refBlot = null; + if (node.nextSibling != null) { + refBlot = Registry.find(node.nextSibling); + } + var blot = makeBlot(node); + if (blot.next != refBlot || blot.next == null) { + if (blot.parent != null) { + blot.parent.removeChild(_this); + } + _this.insertBefore(blot, refBlot || undefined); + } + }); + }; + return ContainerBlot; + })(shadow_1.default); + function makeBlot(node) { + var blot = Registry.find(node); + if (blot == null) { + try { + blot = Registry.create(node); + } catch (e) { + blot = Registry.create(Registry.Scope.INLINE); + [].slice.call(node.childNodes).forEach(function (child) { + // @ts-ignore + blot.domNode.appendChild(child); + }); + if (node.parentNode) { + node.parentNode.replaceChild(blot.domNode, node); + } + blot.attach(); + } + } + return blot; + } + exports.default = ContainerBlot; + + /***/ + }, + /* 18 */ + /***/ function (module, exports, __nested_webpack_require_181313__) { + 'use strict'; + + var __extends = + (this && this.__extends) || + (function () { + var extendStatics = + Object.setPrototypeOf || + ({__proto__: []} instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function (d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); + Object.defineProperty(exports, '__esModule', {value: true}); + var attributor_1 = __nested_webpack_require_181313__(12); + var store_1 = __nested_webpack_require_181313__(31); + var container_1 = __nested_webpack_require_181313__(17); + var Registry = __nested_webpack_require_181313__(1); + var FormatBlot = /** @class */ (function (_super) { + __extends(FormatBlot, _super); + function FormatBlot(domNode) { + var _this = _super.call(this, domNode) || this; + _this.attributes = new store_1.default(_this.domNode); + return _this; + } + FormatBlot.formats = function (domNode) { + if (typeof this.tagName === 'string') { + return true; + } else if (Array.isArray(this.tagName)) { + return domNode.tagName.toLowerCase(); + } + return undefined; + }; + FormatBlot.prototype.format = function (name, value) { + var format = Registry.query(name); + if (format instanceof attributor_1.default) { + this.attributes.attribute(format, value); + } else if (value) { + if ( + format != null && + (name !== this.statics.blotName || + this.formats()[name] !== value) + ) { + this.replaceWith(name, value); + } + } + }; + FormatBlot.prototype.formats = function () { + var formats = this.attributes.values(); + var format = this.statics.formats(this.domNode); + if (format != null) { + formats[this.statics.blotName] = format; + } + return formats; + }; + FormatBlot.prototype.replaceWith = function (name, value) { + var replacement = _super.prototype.replaceWith.call( + this, + name, + value, + ); + this.attributes.copy(replacement); + return replacement; + }; + FormatBlot.prototype.update = function (mutations, context) { + var _this = this; + _super.prototype.update.call(this, mutations, context); + if ( + mutations.some(function (mutation) { + return ( + mutation.target === _this.domNode && + mutation.type === 'attributes' + ); + }) + ) { + this.attributes.build(); + } + }; + FormatBlot.prototype.wrap = function (name, value) { + var wrapper = _super.prototype.wrap.call(this, name, value); + if ( + wrapper instanceof FormatBlot && + wrapper.statics.scope === this.statics.scope + ) { + this.attributes.move(wrapper); + } + return wrapper; + }; + return FormatBlot; + })(container_1.default); + exports.default = FormatBlot; + + /***/ + }, + /* 19 */ + /***/ function (module, exports, __nested_webpack_require_185160__) { + 'use strict'; + + var __extends = + (this && this.__extends) || + (function () { + var extendStatics = + Object.setPrototypeOf || + ({__proto__: []} instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function (d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); + Object.defineProperty(exports, '__esModule', {value: true}); + var shadow_1 = __nested_webpack_require_185160__(30); + var Registry = __nested_webpack_require_185160__(1); + var LeafBlot = /** @class */ (function (_super) { + __extends(LeafBlot, _super); + function LeafBlot() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + LeafBlot.value = function (domNode) { + return true; + }; + LeafBlot.prototype.index = function (node, offset) { + if ( + this.domNode === node || + this.domNode.compareDocumentPosition(node) & + Node.DOCUMENT_POSITION_CONTAINED_BY + ) { + return Math.min(offset, 1); + } + return -1; + }; + LeafBlot.prototype.position = function (index, inclusive) { + var offset = [].indexOf.call( + this.parent.domNode.childNodes, + this.domNode, + ); + if (index > 0) offset += 1; + return [this.parent.domNode, offset]; + }; + LeafBlot.prototype.value = function () { + return ( + (_a = {}), + (_a[this.statics.blotName] = + this.statics.value(this.domNode) || true), + _a + ); + var _a; + }; + LeafBlot.scope = Registry.Scope.INLINE_BLOT; + return LeafBlot; + })(shadow_1.default); + exports.default = LeafBlot; + + /***/ + }, + /* 20 */ + /***/ function (module, exports, __nested_webpack_require_187569__) { + var equal = __nested_webpack_require_187569__(11); + var extend = __nested_webpack_require_187569__(3); + + var lib = { + attributes: { + compose: function (a, b, keepNull) { + if (typeof a !== 'object') a = {}; + if (typeof b !== 'object') b = {}; + var attributes = extend(true, {}, b); + if (!keepNull) { + attributes = Object.keys(attributes).reduce(function ( + copy, + key, + ) { + if (attributes[key] != null) { + copy[key] = attributes[key]; + } + return copy; + }, + {}); + } + for (var key in a) { + if (a[key] !== undefined && b[key] === undefined) { + attributes[key] = a[key]; + } + } + return Object.keys(attributes).length > 0 + ? attributes + : undefined; + }, + + diff: function (a, b) { + if (typeof a !== 'object') a = {}; + if (typeof b !== 'object') b = {}; + var attributes = Object.keys(a) + .concat(Object.keys(b)) + .reduce(function (attributes, key) { + if (!equal(a[key], b[key])) { + attributes[key] = b[key] === undefined ? null : b[key]; + } + return attributes; + }, {}); + return Object.keys(attributes).length > 0 + ? attributes + : undefined; + }, + + transform: function (a, b, priority) { + if (typeof a !== 'object') return b; + if (typeof b !== 'object') return undefined; + if (!priority) return b; // b simply overwrites us without priority + var attributes = Object.keys(b).reduce(function ( + attributes, + key, + ) { + if (a[key] === undefined) attributes[key] = b[key]; // null is a valid value + return attributes; + }, + {}); + return Object.keys(attributes).length > 0 + ? attributes + : undefined; + }, + }, + + iterator: function (ops) { + return new Iterator(ops); + }, + + length: function (op) { + if (typeof op['delete'] === 'number') { + return op['delete']; + } else if (typeof op.retain === 'number') { + return op.retain; + } else { + return typeof op.insert === 'string' ? op.insert.length : 1; + } + }, + }; + + function Iterator(ops) { + this.ops = ops; + this.index = 0; + this.offset = 0; + } + + Iterator.prototype.hasNext = function () { + return this.peekLength() < Infinity; + }; + + Iterator.prototype.next = function (length) { + if (!length) length = Infinity; + var nextOp = this.ops[this.index]; + if (nextOp) { + var offset = this.offset; + var opLength = lib.length(nextOp); + if (length >= opLength - offset) { + length = opLength - offset; + this.index += 1; + this.offset = 0; + } else { + this.offset += length; + } + if (typeof nextOp['delete'] === 'number') { + return {delete: length}; + } else { + var retOp = {}; + if (nextOp.attributes) { + retOp.attributes = nextOp.attributes; + } + if (typeof nextOp.retain === 'number') { + retOp.retain = length; + } else if (typeof nextOp.insert === 'string') { + retOp.insert = nextOp.insert.substr(offset, length); + } else { + // offset should === 0, length should === 1 + retOp.insert = nextOp.insert; + } + return retOp; + } + } else { + return {retain: Infinity}; + } + }; + + Iterator.prototype.peek = function () { + return this.ops[this.index]; + }; + + Iterator.prototype.peekLength = function () { + if (this.ops[this.index]) { + // Should never return 0 if our index is being managed correctly + return lib.length(this.ops[this.index]) - this.offset; + } else { + return Infinity; + } + }; + + Iterator.prototype.peekType = function () { + if (this.ops[this.index]) { + if (typeof this.ops[this.index]['delete'] === 'number') { + return 'delete'; + } else if (typeof this.ops[this.index].retain === 'number') { + return 'retain'; + } else { + return 'insert'; + } + } + return 'retain'; + }; + + module.exports = lib; + + /***/ + }, + /* 21 */ + /***/ function (module, exports) { + var clone = (function () { + 'use strict'; + + function _instanceof(obj, type) { + return type != null && obj instanceof type; + } + + var nativeMap; + try { + nativeMap = Map; + } catch (_) { + // maybe a reference error because no `Map`. Give it a dummy value that no + // value will ever be an instanceof. + nativeMap = function () {}; + } + + var nativeSet; + try { + nativeSet = Set; + } catch (_) { + nativeSet = function () {}; + } + + var nativePromise; + try { + nativePromise = Promise; + } catch (_) { + nativePromise = function () {}; + } + + /** + * Clones (copies) an Object using deep copying. + * + * This function supports circular references by default, but if you are certain + * there are no circular references in your object, you can save some CPU time + * by calling clone(obj, false). + * + * Caution: if `circular` is false and `parent` contains circular references, + * your program may enter an infinite loop and crash. + * + * @param `parent` - the object to be cloned + * @param `circular` - set to true if the object to be cloned may contain + * circular references. (optional - true by default) + * @param `depth` - set to a number if the object is only to be cloned to + * a particular depth. (optional - defaults to Infinity) + * @param `prototype` - sets the prototype to be used when cloning an object. + * (optional - defaults to parent prototype). + * @param `includeNonEnumerable` - set to true if the non-enumerable properties + * should be cloned as well. Non-enumerable properties on the prototype + * chain will be ignored. (optional - false by default) + */ + function clone( + parent, + circular, + depth, + prototype, + includeNonEnumerable, + ) { + if (typeof circular === 'object') { + depth = circular.depth; + prototype = circular.prototype; + includeNonEnumerable = circular.includeNonEnumerable; + circular = circular.circular; + } + // maintain two arrays for circular references, where corresponding parents + // and children have the same index + var allParents = []; + var allChildren = []; + + var useBuffer = typeof Buffer != 'undefined'; + + if (typeof circular == 'undefined') circular = true; + + if (typeof depth == 'undefined') depth = Infinity; + + // recurse this function so we don't reset allParents and allChildren + function _clone(parent, depth) { + // cloning null always returns null + if (parent === null) return null; + + if (depth === 0) return parent; + + var child; + var proto; + if (typeof parent != 'object') { + return parent; + } + + if (_instanceof(parent, nativeMap)) { + child = new nativeMap(); + } else if (_instanceof(parent, nativeSet)) { + child = new nativeSet(); + } else if (_instanceof(parent, nativePromise)) { + child = new nativePromise(function (resolve, reject) { + parent.then( + function (value) { + resolve(_clone(value, depth - 1)); + }, + function (err) { + reject(_clone(err, depth - 1)); + }, + ); + }); + } else if (clone.__isArray(parent)) { + child = []; + } else if (clone.__isRegExp(parent)) { + child = new RegExp(parent.source, __getRegExpFlags(parent)); + if (parent.lastIndex) child.lastIndex = parent.lastIndex; + } else if (clone.__isDate(parent)) { + child = new Date(parent.getTime()); + } else if (useBuffer && Buffer.isBuffer(parent)) { + child = new Buffer(parent.length); + parent.copy(child); + return child; + } else if (_instanceof(parent, Error)) { + child = Object.create(parent); + } else { + if (typeof prototype == 'undefined') { + proto = Object.getPrototypeOf(parent); + child = Object.create(proto); + } else { + child = Object.create(prototype); + proto = prototype; + } + } + + if (circular) { + var index = allParents.indexOf(parent); + + if (index != -1) { + return allChildren[index]; + } + allParents.push(parent); + allChildren.push(child); + } + + if (_instanceof(parent, nativeMap)) { + parent.forEach(function (value, key) { + var keyChild = _clone(key, depth - 1); + var valueChild = _clone(value, depth - 1); + child.set(keyChild, valueChild); + }); + } + if (_instanceof(parent, nativeSet)) { + parent.forEach(function (value) { + var entryChild = _clone(value, depth - 1); + child.add(entryChild); + }); + } + + for (var i in parent) { + var attrs; + if (proto) { + attrs = Object.getOwnPropertyDescriptor(proto, i); + } + + if (attrs && attrs.set == null) { + continue; + } + child[i] = _clone(parent[i], depth - 1); + } + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(parent); + for (var i = 0; i < symbols.length; i++) { + // Don't need to worry about cloning a symbol because it is a primitive, + // like a number or string. + var symbol = symbols[i]; + var descriptor = Object.getOwnPropertyDescriptor( + parent, + symbol, + ); + if ( + descriptor && + !descriptor.enumerable && + !includeNonEnumerable + ) { + continue; + } + child[symbol] = _clone(parent[symbol], depth - 1); + if (!descriptor.enumerable) { + Object.defineProperty(child, symbol, { + enumerable: false, + }); + } + } + } + + if (includeNonEnumerable) { + var allPropertyNames = Object.getOwnPropertyNames(parent); + for (var i = 0; i < allPropertyNames.length; i++) { + var propertyName = allPropertyNames[i]; + var descriptor = Object.getOwnPropertyDescriptor( + parent, + propertyName, + ); + if (descriptor && descriptor.enumerable) { + continue; + } + child[propertyName] = _clone(parent[propertyName], depth - 1); + Object.defineProperty(child, propertyName, { + enumerable: false, + }); + } + } + + return child; + } + + return _clone(parent, depth); + } + + /** + * Simple flat clone using prototype, accepts only objects, usefull for property + * override on FLAT configuration object (no nested props). + * + * USE WITH CAUTION! This may not behave as you wish if you do not know how this + * works. + */ + clone.clonePrototype = function clonePrototype(parent) { + if (parent === null) return null; + + var c = function () {}; + c.prototype = parent; + return new c(); + }; + + // private utility functions + + function __objToStr(o) { + return Object.prototype.toString.call(o); + } + clone.__objToStr = __objToStr; + + function __isDate(o) { + return typeof o === 'object' && __objToStr(o) === '[object Date]'; + } + clone.__isDate = __isDate; + + function __isArray(o) { + return typeof o === 'object' && __objToStr(o) === '[object Array]'; + } + clone.__isArray = __isArray; + + function __isRegExp(o) { + return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; + } + clone.__isRegExp = __isRegExp; + + function __getRegExpFlags(re) { + var flags = ''; + if (re.global) flags += 'g'; + if (re.ignoreCase) flags += 'i'; + if (re.multiline) flags += 'm'; + return flags; + } + clone.__getRegExpFlags = __getRegExpFlags; + + return clone; + })(); + + if (typeof module === 'object' && module.exports) { + module.exports = clone; + } + + /***/ + }, + /* 22 */ + /***/ function (module, exports, __nested_webpack_require_202377__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for ( + var _i = arr[Symbol.iterator](), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance', + ); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _parchment = __nested_webpack_require_202377__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _emitter = __nested_webpack_require_202377__(8); + + var _emitter2 = _interopRequireDefault(_emitter); + + var _block = __nested_webpack_require_202377__(4); + + var _block2 = _interopRequireDefault(_block); + + var _break = __nested_webpack_require_202377__(16); + + var _break2 = _interopRequireDefault(_break); + + var _code = __nested_webpack_require_202377__(13); + + var _code2 = _interopRequireDefault(_code); + + var _container = __nested_webpack_require_202377__(25); + + var _container2 = _interopRequireDefault(_container); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + function isLine(blot) { + return ( + blot instanceof _block2.default || blot instanceof _block.BlockEmbed + ); + } + + var Scroll = (function (_Parchment$Scroll) { + _inherits(Scroll, _Parchment$Scroll); + + function Scroll(domNode, config) { + _classCallCheck(this, Scroll); + + var _this = _possibleConstructorReturn( + this, + (Scroll.__proto__ || Object.getPrototypeOf(Scroll)).call( + this, + domNode, + ), + ); + + _this.emitter = config.emitter; + if (Array.isArray(config.whitelist)) { + _this.whitelist = config.whitelist.reduce(function ( + whitelist, + format, + ) { + whitelist[format] = true; + return whitelist; + }, + {}); + } + // Some reason fixes composition issues with character languages in Windows/Chrome, Safari + _this.domNode.addEventListener('DOMNodeInserted', function () {}); + _this.optimize(); + _this.enable(); + return _this; + } + + _createClass(Scroll, [ + { + key: 'batchStart', + value: function batchStart() { + this.batch = true; + }, + }, + { + key: 'batchEnd', + value: function batchEnd() { + this.batch = false; + this.optimize(); + }, + }, + { + key: 'deleteAt', + value: function deleteAt(index, length) { + var _line = this.line(index), + _line2 = _slicedToArray(_line, 2), + first = _line2[0], + offset = _line2[1]; + + var _line3 = this.line(index + length), + _line4 = _slicedToArray(_line3, 1), + last = _line4[0]; + + _get( + Scroll.prototype.__proto__ || + Object.getPrototypeOf(Scroll.prototype), + 'deleteAt', + this, + ).call(this, index, length); + if (last != null && first !== last && offset > 0) { + if ( + first instanceof _block.BlockEmbed || + last instanceof _block.BlockEmbed + ) { + this.optimize(); + return; + } + if (first instanceof _code2.default) { + var newlineIndex = first.newlineIndex(first.length(), true); + if (newlineIndex > -1) { + first = first.split(newlineIndex + 1); + if (first === last) { + this.optimize(); + return; + } + } + } else if (last instanceof _code2.default) { + var _newlineIndex = last.newlineIndex(0); + if (_newlineIndex > -1) { + last.split(_newlineIndex + 1); + } + } + var ref = + last.children.head instanceof _break2.default + ? null + : last.children.head; + first.moveChildren(last, ref); + first.remove(); + } + this.optimize(); + }, + }, + { + key: 'enable', + value: function enable() { + var enabled = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : true; + + this.domNode.setAttribute('contenteditable', enabled); + }, + }, + { + key: 'formatAt', + value: function formatAt(index, length, format, value) { + if (this.whitelist != null && !this.whitelist[format]) return; + _get( + Scroll.prototype.__proto__ || + Object.getPrototypeOf(Scroll.prototype), + 'formatAt', + this, + ).call(this, index, length, format, value); + this.optimize(); + }, + }, + { + key: 'insertAt', + value: function insertAt(index, value, def) { + if ( + def != null && + this.whitelist != null && + !this.whitelist[value] + ) + return; + if (index >= this.length()) { + if ( + def == null || + _parchment2.default.query( + value, + _parchment2.default.Scope.BLOCK, + ) == null + ) { + var blot = _parchment2.default.create( + this.statics.defaultChild, + ); + this.appendChild(blot); + if (def == null && value.endsWith('\n')) { + value = value.slice(0, -1); + } + blot.insertAt(0, value, def); + } else { + var embed = _parchment2.default.create(value, def); + this.appendChild(embed); + } + } else { + _get( + Scroll.prototype.__proto__ || + Object.getPrototypeOf(Scroll.prototype), + 'insertAt', + this, + ).call(this, index, value, def); + } + this.optimize(); + }, + }, + { + key: 'insertBefore', + value: function insertBefore(blot, ref) { + if ( + blot.statics.scope === _parchment2.default.Scope.INLINE_BLOT + ) { + var wrapper = _parchment2.default.create( + this.statics.defaultChild, + ); + wrapper.appendChild(blot); + blot = wrapper; + } + _get( + Scroll.prototype.__proto__ || + Object.getPrototypeOf(Scroll.prototype), + 'insertBefore', + this, + ).call(this, blot, ref); + }, + }, + { + key: 'leaf', + value: function leaf(index) { + return this.path(index).pop() || [null, -1]; + }, + }, + { + key: 'line', + value: function line(index) { + if (index === this.length()) { + return this.line(index - 1); + } + return this.descendant(isLine, index); + }, + }, + { + key: 'lines', + value: function lines() { + var index = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : 0; + var length = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : Number.MAX_VALUE; + + var getLines = function getLines(blot, index, length) { + var lines = [], + lengthLeft = length; + blot.children.forEachAt( + index, + length, + function (child, index, length) { + if (isLine(child)) { + lines.push(child); + } else if ( + child instanceof _parchment2.default.Container + ) { + lines = lines.concat( + getLines(child, index, lengthLeft), + ); + } + lengthLeft -= length; + }, + ); + return lines; + }; + return getLines(this, index, length); + }, + }, + { + key: 'optimize', + value: function optimize() { + var mutations = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : []; + var context = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : {}; + + if (this.batch === true) return; + _get( + Scroll.prototype.__proto__ || + Object.getPrototypeOf(Scroll.prototype), + 'optimize', + this, + ).call(this, mutations, context); + if (mutations.length > 0) { + this.emitter.emit( + _emitter2.default.events.SCROLL_OPTIMIZE, + mutations, + context, + ); + } + }, + }, + { + key: 'path', + value: function path(index) { + return _get( + Scroll.prototype.__proto__ || + Object.getPrototypeOf(Scroll.prototype), + 'path', + this, + ) + .call(this, index) + .slice(1); // Exclude self + }, + }, + { + key: 'update', + value: function update(mutations) { + if (this.batch === true) return; + var source = _emitter2.default.sources.USER; + if (typeof mutations === 'string') { + source = mutations; + } + if (!Array.isArray(mutations)) { + mutations = this.observer.takeRecords(); + } + if (mutations.length > 0) { + this.emitter.emit( + _emitter2.default.events.SCROLL_BEFORE_UPDATE, + source, + mutations, + ); + } + _get( + Scroll.prototype.__proto__ || + Object.getPrototypeOf(Scroll.prototype), + 'update', + this, + ).call(this, mutations.concat([])); // pass copy + if (mutations.length > 0) { + this.emitter.emit( + _emitter2.default.events.SCROLL_UPDATE, + source, + mutations, + ); + } + }, + }, + ]); + + return Scroll; + })(_parchment2.default.Scroll); + + Scroll.blotName = 'scroll'; + Scroll.className = 'ql-editor'; + Scroll.tagName = 'DIV'; + Scroll.defaultChild = 'block'; + Scroll.allowedChildren = [ + _block2.default, + _block.BlockEmbed, + _container2.default, + ]; + + exports.default = Scroll; + + /***/ + }, + /* 23 */ + /***/ function (module, exports, __nested_webpack_require_218690__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.SHORTKEY = exports.default = undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for ( + var _i = arr[Symbol.iterator](), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance', + ); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _clone = __nested_webpack_require_218690__(21); + + var _clone2 = _interopRequireDefault(_clone); + + var _deepEqual = __nested_webpack_require_218690__(11); + + var _deepEqual2 = _interopRequireDefault(_deepEqual); + + var _extend = __nested_webpack_require_218690__(3); + + var _extend2 = _interopRequireDefault(_extend); + + var _quillDelta = __nested_webpack_require_218690__(2); + + var _quillDelta2 = _interopRequireDefault(_quillDelta); + + var _op = __nested_webpack_require_218690__(20); + + var _op2 = _interopRequireDefault(_op); + + var _parchment = __nested_webpack_require_218690__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _quill = __nested_webpack_require_218690__(5); + + var _quill2 = _interopRequireDefault(_quill); + + var _logger = __nested_webpack_require_218690__(10); + + var _logger2 = _interopRequireDefault(_logger); + + var _module = __nested_webpack_require_218690__(9); + + var _module2 = _interopRequireDefault(_module); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var debug = (0, _logger2.default)('quill:keyboard'); + + var SHORTKEY = /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey'; + + var Keyboard = (function (_Module) { + _inherits(Keyboard, _Module); + + _createClass(Keyboard, null, [ + { + key: 'match', + value: function match(evt, binding) { + binding = normalize(binding); + if ( + ['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].some(function ( + key, + ) { + return !!binding[key] !== evt[key] && binding[key] !== null; + }) + ) { + return false; + } + return binding.key === (evt.which || evt.keyCode); + }, + }, + ]); + + function Keyboard(quill, options) { + _classCallCheck(this, Keyboard); + + var _this = _possibleConstructorReturn( + this, + (Keyboard.__proto__ || Object.getPrototypeOf(Keyboard)).call( + this, + quill, + options, + ), + ); + + _this.bindings = {}; + Object.keys(_this.options.bindings).forEach(function (name) { + if ( + name === 'list autofill' && + quill.scroll.whitelist != null && + !quill.scroll.whitelist['list'] + ) { + return; + } + if (_this.options.bindings[name]) { + _this.addBinding(_this.options.bindings[name]); + } + }); + _this.addBinding( + {key: Keyboard.keys.ENTER, shiftKey: null}, + handleEnter, + ); + _this.addBinding( + { + key: Keyboard.keys.ENTER, + metaKey: null, + ctrlKey: null, + altKey: null, + }, + function () {}, + ); + if (/Firefox/i.test(navigator.userAgent)) { + // Need to handle delete and backspace for Firefox in the general case #1171 + _this.addBinding( + {key: Keyboard.keys.BACKSPACE}, + {collapsed: true}, + handleBackspace, + ); + _this.addBinding( + {key: Keyboard.keys.DELETE}, + {collapsed: true}, + handleDelete, + ); + } else { + _this.addBinding( + {key: Keyboard.keys.BACKSPACE}, + {collapsed: true, prefix: /^.?$/}, + handleBackspace, + ); + _this.addBinding( + {key: Keyboard.keys.DELETE}, + {collapsed: true, suffix: /^.?$/}, + handleDelete, + ); + } + _this.addBinding( + {key: Keyboard.keys.BACKSPACE}, + {collapsed: false}, + handleDeleteRange, + ); + _this.addBinding( + {key: Keyboard.keys.DELETE}, + {collapsed: false}, + handleDeleteRange, + ); + _this.addBinding( + { + key: Keyboard.keys.BACKSPACE, + altKey: null, + ctrlKey: null, + metaKey: null, + shiftKey: null, + }, + {collapsed: true, offset: 0}, + handleBackspace, + ); + _this.listen(); + return _this; + } + + _createClass(Keyboard, [ + { + key: 'addBinding', + value: function addBinding(key) { + var context = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : {}; + var handler = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : {}; + + var binding = normalize(key); + if (binding == null || binding.key == null) { + return debug.warn( + 'Attempted to add invalid keyboard binding', + binding, + ); + } + if (typeof context === 'function') { + context = {handler: context}; + } + if (typeof handler === 'function') { + handler = {handler: handler}; + } + binding = (0, _extend2.default)(binding, context, handler); + this.bindings[binding.key] = this.bindings[binding.key] || []; + this.bindings[binding.key].push(binding); + }, + }, + { + key: 'listen', + value: function listen() { + var _this2 = this; + + this.quill.root.addEventListener('keydown', function (evt) { + if (evt.defaultPrevented) return; + var which = evt.which || evt.keyCode; + var bindings = (_this2.bindings[which] || []).filter( + function (binding) { + return Keyboard.match(evt, binding); + }, + ); + if (bindings.length === 0) return; + var range = _this2.quill.getSelection(); + if (range == null || !_this2.quill.hasFocus()) return; + + var _quill$getLine = _this2.quill.getLine(range.index), + _quill$getLine2 = _slicedToArray(_quill$getLine, 2), + line = _quill$getLine2[0], + offset = _quill$getLine2[1]; + + var _quill$getLeaf = _this2.quill.getLeaf(range.index), + _quill$getLeaf2 = _slicedToArray(_quill$getLeaf, 2), + leafStart = _quill$getLeaf2[0], + offsetStart = _quill$getLeaf2[1]; + + var _ref = + range.length === 0 + ? [leafStart, offsetStart] + : _this2.quill.getLeaf(range.index + range.length), + _ref2 = _slicedToArray(_ref, 2), + leafEnd = _ref2[0], + offsetEnd = _ref2[1]; + + var prefixText = + leafStart instanceof _parchment2.default.Text + ? leafStart.value().slice(0, offsetStart) + : ''; + var suffixText = + leafEnd instanceof _parchment2.default.Text + ? leafEnd.value().slice(offsetEnd) + : ''; + var curContext = { + collapsed: range.length === 0, + empty: range.length === 0 && line.length() <= 1, + format: _this2.quill.getFormat(range), + offset: offset, + prefix: prefixText, + suffix: suffixText, + }; + var prevented = bindings.some(function (binding) { + if ( + binding.collapsed != null && + binding.collapsed !== curContext.collapsed + ) + return false; + if ( + binding.empty != null && + binding.empty !== curContext.empty + ) + return false; + if ( + binding.offset != null && + binding.offset !== curContext.offset + ) + return false; + if (Array.isArray(binding.format)) { + // any format is present + if ( + binding.format.every(function (name) { + return curContext.format[name] == null; + }) + ) { + return false; + } + } else if (_typeof(binding.format) === 'object') { + // all formats must match + if ( + !Object.keys(binding.format).every(function (name) { + if (binding.format[name] === true) + return curContext.format[name] != null; + if (binding.format[name] === false) + return curContext.format[name] == null; + return (0, + _deepEqual2.default)(binding.format[name], curContext.format[name]); + }) + ) { + return false; + } + } + if ( + binding.prefix != null && + !binding.prefix.test(curContext.prefix) + ) + return false; + if ( + binding.suffix != null && + !binding.suffix.test(curContext.suffix) + ) + return false; + return ( + binding.handler.call(_this2, range, curContext) !== true + ); + }); + if (prevented) { + evt.preventDefault(); + } + }); + }, + }, + ]); + + return Keyboard; + })(_module2.default); + + Keyboard.keys = { + BACKSPACE: 8, + TAB: 9, + ENTER: 13, + ESCAPE: 27, + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + DELETE: 46, + }; + + Keyboard.DEFAULTS = { + bindings: { + bold: makeFormatHandler('bold'), + italic: makeFormatHandler('italic'), + underline: makeFormatHandler('underline'), + indent: { + // highlight tab or tab at beginning of list, indent or blockquote + key: Keyboard.keys.TAB, + format: ['blockquote', 'indent', 'list'], + handler: function handler(range, context) { + if (context.collapsed && context.offset !== 0) return true; + this.quill.format('indent', '+1', _quill2.default.sources.USER); + }, + }, + outdent: { + key: Keyboard.keys.TAB, + shiftKey: true, + format: ['blockquote', 'indent', 'list'], + // highlight tab or tab at beginning of list, indent or blockquote + handler: function handler(range, context) { + if (context.collapsed && context.offset !== 0) return true; + this.quill.format('indent', '-1', _quill2.default.sources.USER); + }, + }, + 'outdent backspace': { + key: Keyboard.keys.BACKSPACE, + collapsed: true, + shiftKey: null, + metaKey: null, + ctrlKey: null, + altKey: null, + format: ['indent', 'list'], + offset: 0, + handler: function handler(range, context) { + if (context.format.indent != null) { + this.quill.format( + 'indent', + '-1', + _quill2.default.sources.USER, + ); + } else if (context.format.list != null) { + this.quill.format( + 'list', + false, + _quill2.default.sources.USER, + ); + } + }, + }, + 'indent code-block': makeCodeBlockHandler(true), + 'outdent code-block': makeCodeBlockHandler(false), + 'remove tab': { + key: Keyboard.keys.TAB, + shiftKey: true, + collapsed: true, + prefix: /\t$/, + handler: function handler(range) { + this.quill.deleteText( + range.index - 1, + 1, + _quill2.default.sources.USER, + ); + }, + }, + tab: { + key: Keyboard.keys.TAB, + handler: function handler(range) { + this.quill.history.cutoff(); + var delta = new _quillDelta2.default() + .retain(range.index) + .delete(range.length) + .insert('\t'); + this.quill.updateContents(delta, _quill2.default.sources.USER); + this.quill.history.cutoff(); + this.quill.setSelection( + range.index + 1, + _quill2.default.sources.SILENT, + ); + }, + }, + 'list empty enter': { + key: Keyboard.keys.ENTER, + collapsed: true, + format: ['list'], + empty: true, + handler: function handler(range, context) { + this.quill.format('list', false, _quill2.default.sources.USER); + if (context.format.indent) { + this.quill.format( + 'indent', + false, + _quill2.default.sources.USER, + ); + } + }, + }, + 'checklist enter': { + key: Keyboard.keys.ENTER, + collapsed: true, + format: {list: 'checked'}, + handler: function handler(range) { + var _quill$getLine3 = this.quill.getLine(range.index), + _quill$getLine4 = _slicedToArray(_quill$getLine3, 2), + line = _quill$getLine4[0], + offset = _quill$getLine4[1]; + + var formats = (0, _extend2.default)({}, line.formats(), { + list: 'checked', + }); + var delta = new _quillDelta2.default() + .retain(range.index) + .insert('\n', formats) + .retain(line.length() - offset - 1) + .retain(1, {list: 'unchecked'}); + this.quill.updateContents(delta, _quill2.default.sources.USER); + this.quill.setSelection( + range.index + 1, + _quill2.default.sources.SILENT, + ); + this.quill.scrollIntoView(); + }, + }, + 'header enter': { + key: Keyboard.keys.ENTER, + collapsed: true, + format: ['header'], + suffix: /^$/, + handler: function handler(range, context) { + var _quill$getLine5 = this.quill.getLine(range.index), + _quill$getLine6 = _slicedToArray(_quill$getLine5, 2), + line = _quill$getLine6[0], + offset = _quill$getLine6[1]; + + var delta = new _quillDelta2.default() + .retain(range.index) + .insert('\n', context.format) + .retain(line.length() - offset - 1) + .retain(1, {header: null}); + this.quill.updateContents(delta, _quill2.default.sources.USER); + this.quill.setSelection( + range.index + 1, + _quill2.default.sources.SILENT, + ); + this.quill.scrollIntoView(); + }, + }, + 'list autofill': { + key: ' ', + collapsed: true, + format: {list: false}, + prefix: /^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/, + handler: function handler(range, context) { + var length = context.prefix.length; + + var _quill$getLine7 = this.quill.getLine(range.index), + _quill$getLine8 = _slicedToArray(_quill$getLine7, 2), + line = _quill$getLine8[0], + offset = _quill$getLine8[1]; + + if (offset > length) return true; + var value = void 0; + switch (context.prefix.trim()) { + case '[]': + case '[ ]': + value = 'unchecked'; + break; + case '[x]': + value = 'checked'; + break; + case '-': + case '*': + value = 'bullet'; + break; + default: + value = 'ordered'; + } + this.quill.insertText( + range.index, + ' ', + _quill2.default.sources.USER, + ); + this.quill.history.cutoff(); + var delta = new _quillDelta2.default() + .retain(range.index - offset) + .delete(length + 1) + .retain(line.length() - 2 - offset) + .retain(1, {list: value}); + this.quill.updateContents(delta, _quill2.default.sources.USER); + this.quill.history.cutoff(); + this.quill.setSelection( + range.index - length, + _quill2.default.sources.SILENT, + ); + }, + }, + 'code exit': { + key: Keyboard.keys.ENTER, + collapsed: true, + format: ['code-block'], + prefix: /\n\n$/, + suffix: /^\s+$/, + handler: function handler(range) { + var _quill$getLine9 = this.quill.getLine(range.index), + _quill$getLine10 = _slicedToArray(_quill$getLine9, 2), + line = _quill$getLine10[0], + offset = _quill$getLine10[1]; + + var delta = new _quillDelta2.default() + .retain(range.index + line.length() - offset - 2) + .retain(1, {'code-block': null}) + .delete(1); + this.quill.updateContents(delta, _quill2.default.sources.USER); + }, + }, + 'embed left': makeEmbedArrowHandler(Keyboard.keys.LEFT, false), + 'embed left shift': makeEmbedArrowHandler(Keyboard.keys.LEFT, true), + 'embed right': makeEmbedArrowHandler(Keyboard.keys.RIGHT, false), + 'embed right shift': makeEmbedArrowHandler( + Keyboard.keys.RIGHT, + true, + ), + }, + }; + + function makeEmbedArrowHandler(key, shiftKey) { + var _ref3; + + var where = key === Keyboard.keys.LEFT ? 'prefix' : 'suffix'; + return ( + (_ref3 = { + key: key, + shiftKey: shiftKey, + altKey: null, + }), + _defineProperty(_ref3, where, /^$/), + _defineProperty(_ref3, 'handler', function handler(range) { + var index = range.index; + if (key === Keyboard.keys.RIGHT) { + index += range.length + 1; + } + + var _quill$getLeaf3 = this.quill.getLeaf(index), + _quill$getLeaf4 = _slicedToArray(_quill$getLeaf3, 1), + leaf = _quill$getLeaf4[0]; + + if (!(leaf instanceof _parchment2.default.Embed)) return true; + if (key === Keyboard.keys.LEFT) { + if (shiftKey) { + this.quill.setSelection( + range.index - 1, + range.length + 1, + _quill2.default.sources.USER, + ); + } else { + this.quill.setSelection( + range.index - 1, + _quill2.default.sources.USER, + ); + } + } else { + if (shiftKey) { + this.quill.setSelection( + range.index, + range.length + 1, + _quill2.default.sources.USER, + ); + } else { + this.quill.setSelection( + range.index + range.length + 1, + _quill2.default.sources.USER, + ); + } + } + return false; + }), + _ref3 + ); + } + + function handleBackspace(range, context) { + if (range.index === 0 || this.quill.getLength() <= 1) return; + + var _quill$getLine11 = this.quill.getLine(range.index), + _quill$getLine12 = _slicedToArray(_quill$getLine11, 1), + line = _quill$getLine12[0]; + + var formats = {}; + if (context.offset === 0) { + var _quill$getLine13 = this.quill.getLine(range.index - 1), + _quill$getLine14 = _slicedToArray(_quill$getLine13, 1), + prev = _quill$getLine14[0]; + + if (prev != null && prev.length() > 1) { + var curFormats = line.formats(); + var prevFormats = this.quill.getFormat(range.index - 1, 1); + formats = + _op2.default.attributes.diff(curFormats, prevFormats) || {}; + } + } + // Check for astral symbols + var length = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(context.prefix) + ? 2 + : 1; + this.quill.deleteText( + range.index - length, + length, + _quill2.default.sources.USER, + ); + if (Object.keys(formats).length > 0) { + this.quill.formatLine( + range.index - length, + length, + formats, + _quill2.default.sources.USER, + ); + } + this.quill.focus(); + } + + function handleDelete(range, context) { + // Check for astral symbols + var length = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(context.suffix) + ? 2 + : 1; + if (range.index >= this.quill.getLength() - length) return; + var formats = {}, + nextLength = 0; + + var _quill$getLine15 = this.quill.getLine(range.index), + _quill$getLine16 = _slicedToArray(_quill$getLine15, 1), + line = _quill$getLine16[0]; + + if (context.offset >= line.length() - 1) { + var _quill$getLine17 = this.quill.getLine(range.index + 1), + _quill$getLine18 = _slicedToArray(_quill$getLine17, 1), + next = _quill$getLine18[0]; + + if (next) { + var curFormats = line.formats(); + var nextFormats = this.quill.getFormat(range.index, 1); + formats = + _op2.default.attributes.diff(curFormats, nextFormats) || {}; + nextLength = next.length(); + } + } + this.quill.deleteText( + range.index, + length, + _quill2.default.sources.USER, + ); + if (Object.keys(formats).length > 0) { + this.quill.formatLine( + range.index + nextLength - 1, + length, + formats, + _quill2.default.sources.USER, + ); + } + } + + function handleDeleteRange(range) { + var lines = this.quill.getLines(range); + var formats = {}; + if (lines.length > 1) { + var firstFormats = lines[0].formats(); + var lastFormats = lines[lines.length - 1].formats(); + formats = + _op2.default.attributes.diff(lastFormats, firstFormats) || {}; + } + this.quill.deleteText(range, _quill2.default.sources.USER); + if (Object.keys(formats).length > 0) { + this.quill.formatLine( + range.index, + 1, + formats, + _quill2.default.sources.USER, + ); + } + this.quill.setSelection(range.index, _quill2.default.sources.SILENT); + this.quill.focus(); + } + + function handleEnter(range, context) { + var _this3 = this; + + if (range.length > 0) { + this.quill.scroll.deleteAt(range.index, range.length); // So we do not trigger text-change + } + var lineFormats = Object.keys(context.format).reduce(function ( + lineFormats, + format, + ) { + if ( + _parchment2.default.query( + format, + _parchment2.default.Scope.BLOCK, + ) && + !Array.isArray(context.format[format]) + ) { + lineFormats[format] = context.format[format]; + } + return lineFormats; + }, + {}); + this.quill.insertText( + range.index, + '\n', + lineFormats, + _quill2.default.sources.USER, + ); + // Earlier scroll.deleteAt might have messed up our selection, + // so insertText's built in selection preservation is not reliable + this.quill.setSelection( + range.index + 1, + _quill2.default.sources.SILENT, + ); + this.quill.focus(); + Object.keys(context.format).forEach(function (name) { + if (lineFormats[name] != null) return; + if (Array.isArray(context.format[name])) return; + if (name === 'link') return; + _this3.quill.format( + name, + context.format[name], + _quill2.default.sources.USER, + ); + }); + } + + function makeCodeBlockHandler(indent) { + return { + key: Keyboard.keys.TAB, + shiftKey: !indent, + format: {'code-block': true}, + handler: function handler(range) { + var CodeBlock = _parchment2.default.query('code-block'); + var index = range.index, + length = range.length; + + var _quill$scroll$descend = this.quill.scroll.descendant( + CodeBlock, + index, + ), + _quill$scroll$descend2 = _slicedToArray( + _quill$scroll$descend, + 2, + ), + block = _quill$scroll$descend2[0], + offset = _quill$scroll$descend2[1]; + + if (block == null) return; + var scrollIndex = this.quill.getIndex(block); + var start = block.newlineIndex(offset, true) + 1; + var end = block.newlineIndex(scrollIndex + offset + length); + var lines = block.domNode.textContent + .slice(start, end) + .split('\n'); + offset = 0; + lines.forEach(function (line, i) { + if (indent) { + block.insertAt(start + offset, CodeBlock.TAB); + offset += CodeBlock.TAB.length; + if (i === 0) { + index += CodeBlock.TAB.length; + } else { + length += CodeBlock.TAB.length; + } + } else if (line.startsWith(CodeBlock.TAB)) { + block.deleteAt(start + offset, CodeBlock.TAB.length); + offset -= CodeBlock.TAB.length; + if (i === 0) { + index -= CodeBlock.TAB.length; + } else { + length -= CodeBlock.TAB.length; + } + } + offset += line.length + 1; + }); + this.quill.update(_quill2.default.sources.USER); + this.quill.setSelection( + index, + length, + _quill2.default.sources.SILENT, + ); + }, + }; + } + + function makeFormatHandler(format) { + return { + key: format[0].toUpperCase(), + shortKey: true, + handler: function handler(range, context) { + this.quill.format( + format, + !context.format[format], + _quill2.default.sources.USER, + ); + }, + }; + } + + function normalize(binding) { + if (typeof binding === 'string' || typeof binding === 'number') { + return normalize({key: binding}); + } + if ( + (typeof binding === 'undefined' + ? 'undefined' + : _typeof(binding)) === 'object' + ) { + binding = (0, _clone2.default)(binding, false); + } + if (typeof binding.key === 'string') { + if (Keyboard.keys[binding.key.toUpperCase()] != null) { + binding.key = Keyboard.keys[binding.key.toUpperCase()]; + } else if (binding.key.length === 1) { + binding.key = binding.key.toUpperCase().charCodeAt(0); + } else { + return null; + } + } + if (binding.shortKey) { + binding[SHORTKEY] = binding.shortKey; + delete binding.shortKey; + } + return binding; + } + + exports.default = Keyboard; + exports.SHORTKEY = SHORTKEY; + + /***/ + }, + /* 24 */ + /***/ function (module, exports, __nested_webpack_require_253445__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for ( + var _i = arr[Symbol.iterator](), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance', + ); + } + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _parchment = __nested_webpack_require_253445__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _text = __nested_webpack_require_253445__(7); + + var _text2 = _interopRequireDefault(_text); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Cursor = (function (_Parchment$Embed) { + _inherits(Cursor, _Parchment$Embed); + + _createClass(Cursor, null, [ + { + key: 'value', + value: function value() { + return undefined; + }, + }, + ]); + + function Cursor(domNode, selection) { + _classCallCheck(this, Cursor); + + var _this = _possibleConstructorReturn( + this, + (Cursor.__proto__ || Object.getPrototypeOf(Cursor)).call( + this, + domNode, + ), + ); + + _this.selection = selection; + _this.textNode = document.createTextNode(Cursor.CONTENTS); + _this.domNode.appendChild(_this.textNode); + _this._length = 0; + return _this; + } + + _createClass(Cursor, [ + { + key: 'detach', + value: function detach() { + // super.detach() will also clear domNode.__blot + if (this.parent != null) this.parent.removeChild(this); + }, + }, + { + key: 'format', + value: function format(name, value) { + if (this._length !== 0) { + return _get( + Cursor.prototype.__proto__ || + Object.getPrototypeOf(Cursor.prototype), + 'format', + this, + ).call(this, name, value); + } + var target = this, + index = 0; + while ( + target != null && + target.statics.scope !== _parchment2.default.Scope.BLOCK_BLOT + ) { + index += target.offset(target.parent); + target = target.parent; + } + if (target != null) { + this._length = Cursor.CONTENTS.length; + target.optimize(); + target.formatAt(index, Cursor.CONTENTS.length, name, value); + this._length = 0; + } + }, + }, + { + key: 'index', + value: function index(node, offset) { + if (node === this.textNode) return 0; + return _get( + Cursor.prototype.__proto__ || + Object.getPrototypeOf(Cursor.prototype), + 'index', + this, + ).call(this, node, offset); + }, + }, + { + key: 'length', + value: function length() { + return this._length; + }, + }, + { + key: 'position', + value: function position() { + return [this.textNode, this.textNode.data.length]; + }, + }, + { + key: 'remove', + value: function remove() { + _get( + Cursor.prototype.__proto__ || + Object.getPrototypeOf(Cursor.prototype), + 'remove', + this, + ).call(this); + this.parent = null; + }, + }, + { + key: 'restore', + value: function restore() { + if (this.selection.composing || this.parent == null) return; + var textNode = this.textNode; + var range = this.selection.getNativeRange(); + var restoreText = void 0, + start = void 0, + end = void 0; + if ( + range != null && + range.start.node === textNode && + range.end.node === textNode + ) { + var _ref = [textNode, range.start.offset, range.end.offset]; + restoreText = _ref[0]; + start = _ref[1]; + end = _ref[2]; + } + // Link format will insert text outside of anchor tag + while ( + this.domNode.lastChild != null && + this.domNode.lastChild !== this.textNode + ) { + this.domNode.parentNode.insertBefore( + this.domNode.lastChild, + this.domNode, + ); + } + if (this.textNode.data !== Cursor.CONTENTS) { + var text = this.textNode.data.split(Cursor.CONTENTS).join(''); + if (this.next instanceof _text2.default) { + restoreText = this.next.domNode; + this.next.insertAt(0, text); + this.textNode.data = Cursor.CONTENTS; + } else { + this.textNode.data = text; + this.parent.insertBefore( + _parchment2.default.create(this.textNode), + this, + ); + this.textNode = document.createTextNode(Cursor.CONTENTS); + this.domNode.appendChild(this.textNode); + } + } + this.remove(); + if (start != null) { + var _map = [start, end].map(function (offset) { + return Math.max( + 0, + Math.min(restoreText.data.length, offset - 1), + ); + }); + + var _map2 = _slicedToArray(_map, 2); + + start = _map2[0]; + end = _map2[1]; + + return { + startNode: restoreText, + startOffset: start, + endNode: restoreText, + endOffset: end, + }; + } + }, + }, + { + key: 'update', + value: function update(mutations, context) { + var _this2 = this; + + if ( + mutations.some(function (mutation) { + return ( + mutation.type === 'characterData' && + mutation.target === _this2.textNode + ); + }) + ) { + var range = this.restore(); + if (range) context.range = range; + } + }, + }, + { + key: 'value', + value: function value() { + return ''; + }, + }, + ]); + + return Cursor; + })(_parchment2.default.Embed); + + Cursor.blotName = 'cursor'; + Cursor.className = 'ql-cursor'; + Cursor.tagName = 'span'; + Cursor.CONTENTS = '\uFEFF'; // Zero width no break space + + exports.default = Cursor; + + /***/ + }, + /* 25 */ + /***/ function (module, exports, __nested_webpack_require_264937__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _parchment = __nested_webpack_require_264937__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _block = __nested_webpack_require_264937__(4); + + var _block2 = _interopRequireDefault(_block); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Container = (function (_Parchment$Container) { + _inherits(Container, _Parchment$Container); + + function Container() { + _classCallCheck(this, Container); + + return _possibleConstructorReturn( + this, + (Container.__proto__ || Object.getPrototypeOf(Container)).apply( + this, + arguments, + ), + ); + } + + return Container; + })(_parchment2.default.Container); + + Container.allowedChildren = [ + _block2.default, + _block.BlockEmbed, + Container, + ]; + + exports.default = Container; + + /***/ + }, + /* 26 */ + /***/ function (module, exports, __nested_webpack_require_267519__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.ColorStyle = + exports.ColorClass = + exports.ColorAttributor = + undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _parchment = __nested_webpack_require_267519__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var ColorAttributor = (function (_Parchment$Attributor) { + _inherits(ColorAttributor, _Parchment$Attributor); + + function ColorAttributor() { + _classCallCheck(this, ColorAttributor); + + return _possibleConstructorReturn( + this, + ( + ColorAttributor.__proto__ || + Object.getPrototypeOf(ColorAttributor) + ).apply(this, arguments), + ); + } + + _createClass(ColorAttributor, [ + { + key: 'value', + value: function value(domNode) { + var value = _get( + ColorAttributor.prototype.__proto__ || + Object.getPrototypeOf(ColorAttributor.prototype), + 'value', + this, + ).call(this, domNode); + if (!value.startsWith('rgb(')) return value; + value = value.replace(/^[^\d]+/, '').replace(/[^\d]+$/, ''); + return ( + '#' + + value + .split(',') + .map(function (component) { + return ('00' + parseInt(component).toString(16)).slice( + -2, + ); + }) + .join('') + ); + }, + }, + ]); + + return ColorAttributor; + })(_parchment2.default.Attributor.Style); + + var ColorClass = new _parchment2.default.Attributor.Class( + 'color', + 'ql-color', + { + scope: _parchment2.default.Scope.INLINE, + }, + ); + var ColorStyle = new ColorAttributor('color', 'color', { + scope: _parchment2.default.Scope.INLINE, + }); + + exports.ColorAttributor = ColorAttributor; + exports.ColorClass = ColorClass; + exports.ColorStyle = ColorStyle; + + /***/ + }, + /* 27 */ + /***/ function (module, exports, __nested_webpack_require_272860__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.sanitize = exports.default = undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _inline = __nested_webpack_require_272860__(6); + + var _inline2 = _interopRequireDefault(_inline); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Link = (function (_Inline) { + _inherits(Link, _Inline); + + function Link() { + _classCallCheck(this, Link); + + return _possibleConstructorReturn( + this, + (Link.__proto__ || Object.getPrototypeOf(Link)).apply( + this, + arguments, + ), + ); + } + + _createClass( + Link, + [ + { + key: 'format', + value: function format(name, value) { + if (name !== this.statics.blotName || !value) + return _get( + Link.prototype.__proto__ || + Object.getPrototypeOf(Link.prototype), + 'format', + this, + ).call(this, name, value); + value = this.constructor.sanitize(value); + this.domNode.setAttribute('href', value); + }, + }, + ], + [ + { + key: 'create', + value: function create(value) { + var node = _get( + Link.__proto__ || Object.getPrototypeOf(Link), + 'create', + this, + ).call(this, value); + value = this.sanitize(value); + node.setAttribute('href', value); + node.setAttribute('target', '_blank'); + return node; + }, + }, + { + key: 'formats', + value: function formats(domNode) { + return domNode.getAttribute('href'); + }, + }, + { + key: 'sanitize', + value: function sanitize(url) { + return _sanitize(url, this.PROTOCOL_WHITELIST) + ? url + : this.SANITIZED_URL; + }, + }, + ], + ); + + return Link; + })(_inline2.default); + + Link.blotName = 'link'; + Link.tagName = 'A'; + Link.SANITIZED_URL = 'about:blank'; + Link.PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel']; + + function _sanitize(url, protocols) { + var anchor = document.createElement('a'); + anchor.href = url; + var protocol = anchor.href.slice(0, anchor.href.indexOf(':')); + return protocols.indexOf(protocol) > -1; + } + + exports.default = Link; + exports.sanitize = _sanitize; + + /***/ + }, + /* 28 */ + /***/ function (module, exports, __nested_webpack_require_278789__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _keyboard = __nested_webpack_require_278789__(23); + + var _keyboard2 = _interopRequireDefault(_keyboard); + + var _dropdown = __nested_webpack_require_278789__(107); + + var _dropdown2 = _interopRequireDefault(_dropdown); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var optionsCounter = 0; + + function toggleAriaAttribute(element, attribute) { + element.setAttribute( + attribute, + !(element.getAttribute(attribute) === 'true'), + ); + } + + var Picker = (function () { + function Picker(select) { + var _this = this; + + _classCallCheck(this, Picker); + + this.select = select; + this.container = document.createElement('span'); + this.buildPicker(); + this.select.style.display = 'none'; + this.select.parentNode.insertBefore(this.container, this.select); + + this.label.addEventListener('mousedown', function () { + _this.togglePicker(); + }); + this.label.addEventListener('keydown', function (event) { + switch (event.keyCode) { + // Allows the "Enter" key to open the picker + case _keyboard2.default.keys.ENTER: + _this.togglePicker(); + break; + + // Allows the "Escape" key to close the picker + case _keyboard2.default.keys.ESCAPE: + _this.escape(); + event.preventDefault(); + break; + default: + } + }); + this.select.addEventListener('change', this.update.bind(this)); + } + + _createClass(Picker, [ + { + key: 'togglePicker', + value: function togglePicker() { + this.container.classList.toggle('ql-expanded'); + // Toggle aria-expanded and aria-hidden to make the picker accessible + toggleAriaAttribute(this.label, 'aria-expanded'); + toggleAriaAttribute(this.options, 'aria-hidden'); + }, + }, + { + key: 'buildItem', + value: function buildItem(option) { + var _this2 = this; + + var item = document.createElement('span'); + item.tabIndex = '0'; + item.setAttribute('role', 'button'); + + item.classList.add('ql-picker-item'); + item.classList.add('hover:bg-gray-200'); + item.classList.add('dark:hover:bg-gray-700'); + + if (option.hasAttribute('value')) { + item.setAttribute('data-value', option.getAttribute('value')); + } + if (option.textContent) { + item.setAttribute('data-label', option.textContent); + } + item.addEventListener('click', function () { + _this2.selectItem(item, true); + }); + item.addEventListener('keydown', function (event) { + switch (event.keyCode) { + // Allows the "Enter" key to select an item + case _keyboard2.default.keys.ENTER: + _this2.selectItem(item, true); + event.preventDefault(); + break; + + // Allows the "Escape" key to close the picker + case _keyboard2.default.keys.ESCAPE: + _this2.escape(); + event.preventDefault(); + break; + default: + } + }); + + return item; + }, + }, + { + key: 'buildLabel', + value: function buildLabel() { + var label = document.createElement('span'); + label.classList.add('ql-picker-label'); + label.innerHTML = _dropdown2.default; + label.tabIndex = '0'; + label.setAttribute('role', 'button'); + label.setAttribute('aria-expanded', 'false'); + this.container.appendChild(label); + return label; + }, + }, + { + key: 'buildOptions', + value: function buildOptions() { + var _this3 = this; + + var options = document.createElement('span'); + options.classList.add('ql-picker-options'); + options.classList.add('bg-gray-50'); + options.classList.add('dark:bg-gray-600'); + + // Don't want screen readers to read this until options are visible + options.setAttribute('aria-hidden', 'true'); + options.tabIndex = '-1'; + + // Need a unique id for aria-controls + options.id = 'ql-picker-options-' + optionsCounter; + optionsCounter += 1; + this.label.setAttribute('aria-controls', options.id); + + this.options = options; + + [].slice.call(this.select.options).forEach(function (option) { + var item = _this3.buildItem(option); + options.appendChild(item); + if (option.selected === true) { + _this3.selectItem(item); + } + }); + this.container.appendChild(options); + }, + }, + { + key: 'buildPicker', + value: function buildPicker() { + var _this4 = this; + + [].slice.call(this.select.attributes).forEach(function (item) { + _this4.container.setAttribute(item.name, item.value); + }); + this.container.classList.add('ql-picker'); + this.label = this.buildLabel(); + this.buildOptions(); + }, + }, + { + key: 'escape', + value: function escape() { + var _this5 = this; + + // Close menu and return focus to trigger label + this.close(); + // Need setTimeout for accessibility to ensure that the browser executes + // focus on the next process thread and after any DOM content changes + setTimeout(function () { + return _this5.label.focus(); + }, 1); + }, + }, + { + key: 'close', + value: function close() { + this.container.classList.remove('ql-expanded'); + this.label.setAttribute('aria-expanded', 'false'); + this.options.setAttribute('aria-hidden', 'true'); + }, + }, + { + key: 'selectItem', + value: function selectItem(item) { + var trigger = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : false; + + var selected = this.container.querySelector('.ql-selected'); + if (item === selected) return; + if (selected != null) { + selected.classList.remove('ql-selected'); + } + if (item == null) return; + item.classList.add('ql-selected'); + this.select.selectedIndex = [].indexOf.call( + item.parentNode.children, + item, + ); + if (item.hasAttribute('data-value')) { + this.label.setAttribute( + 'data-value', + item.getAttribute('data-value'), + ); + } else { + this.label.removeAttribute('data-value'); + } + if (item.hasAttribute('data-label')) { + this.label.setAttribute( + 'data-label', + item.getAttribute('data-label'), + ); + } else { + this.label.removeAttribute('data-label'); + } + if (trigger) { + if (typeof Event === 'function') { + this.select.dispatchEvent(new Event('change')); + } else if ( + (typeof Event === 'undefined' + ? 'undefined' + : _typeof(Event)) === 'object' + ) { + // IE11 + var event = document.createEvent('Event'); + event.initEvent('change', true, true); + this.select.dispatchEvent(event); + } + this.close(); + } + }, + }, + { + key: 'update', + value: function update() { + var option = void 0; + if (this.select.selectedIndex > -1) { + var item = + this.container.querySelector('.ql-picker-options').children[ + this.select.selectedIndex + ]; + option = this.select.options[this.select.selectedIndex]; + this.selectItem(item); + } else { + this.selectItem(null); + } + var isActive = + option != null && + option !== this.select.querySelector('option[selected]'); + this.label.classList.toggle('ql-active', isActive); + }, + }, + ]); + + return Picker; + })(); + + exports.default = Picker; + + /***/ + }, + /* 29 */ + /***/ function (module, exports, __nested_webpack_require_290181__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _parchment = __nested_webpack_require_290181__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _quill = __nested_webpack_require_290181__(5); + + var _quill2 = _interopRequireDefault(_quill); + + var _block = __nested_webpack_require_290181__(4); + + var _block2 = _interopRequireDefault(_block); + + var _break = __nested_webpack_require_290181__(16); + + var _break2 = _interopRequireDefault(_break); + + var _container = __nested_webpack_require_290181__(25); + + var _container2 = _interopRequireDefault(_container); + + var _cursor = __nested_webpack_require_290181__(24); + + var _cursor2 = _interopRequireDefault(_cursor); + + var _embed = __nested_webpack_require_290181__(35); + + var _embed2 = _interopRequireDefault(_embed); + + var _inline = __nested_webpack_require_290181__(6); + + var _inline2 = _interopRequireDefault(_inline); + + var _scroll = __nested_webpack_require_290181__(22); + + var _scroll2 = _interopRequireDefault(_scroll); + + var _text = __nested_webpack_require_290181__(7); + + var _text2 = _interopRequireDefault(_text); + + var _clipboard = __nested_webpack_require_290181__(55); + + var _clipboard2 = _interopRequireDefault(_clipboard); + + var _history = __nested_webpack_require_290181__(42); + + var _history2 = _interopRequireDefault(_history); + + var _keyboard = __nested_webpack_require_290181__(23); + + var _keyboard2 = _interopRequireDefault(_keyboard); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + _quill2.default.register({ + 'blots/block': _block2.default, + 'blots/block/embed': _block.BlockEmbed, + 'blots/break': _break2.default, + 'blots/container': _container2.default, + 'blots/cursor': _cursor2.default, + 'blots/embed': _embed2.default, + 'blots/inline': _inline2.default, + 'blots/scroll': _scroll2.default, + 'blots/text': _text2.default, + + 'modules/clipboard': _clipboard2.default, + 'modules/history': _history2.default, + 'modules/keyboard': _keyboard2.default, + }); + + _parchment2.default.register( + _block2.default, + _break2.default, + _cursor2.default, + _inline2.default, + _scroll2.default, + _text2.default, + ); + + exports.default = _quill2.default; + + /***/ + }, + /* 30 */ + /***/ function (module, exports, __nested_webpack_require_292749__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', {value: true}); + var Registry = __nested_webpack_require_292749__(1); + var ShadowBlot = /** @class */ (function () { + function ShadowBlot(domNode) { + this.domNode = domNode; + // @ts-ignore + this.domNode[Registry.DATA_KEY] = {blot: this}; + } + Object.defineProperty(ShadowBlot.prototype, 'statics', { + // Hack for accessing inherited static methods + get: function () { + return this.constructor; + }, + enumerable: true, + configurable: true, + }); + ShadowBlot.create = function (value) { + if (this.tagName == null) { + throw new Registry.ParchmentError( + 'Blot definition missing tagName', + ); + } + var node; + if (Array.isArray(this.tagName)) { + if (typeof value === 'string') { + value = value.toUpperCase(); + if (parseInt(value).toString() === value) { + value = parseInt(value); + } + } + if (typeof value === 'number') { + node = document.createElement(this.tagName[value - 1]); + } else if (this.tagName.indexOf(value) > -1) { + node = document.createElement(value); + } else { + node = document.createElement(this.tagName[0]); + } + } else { + node = document.createElement(this.tagName); + } + if (this.className) { + node.classList.add(this.className); + } + return node; + }; + ShadowBlot.prototype.attach = function () { + if (this.parent != null) { + this.scroll = this.parent.scroll; + } + }; + ShadowBlot.prototype.clone = function () { + var domNode = this.domNode.cloneNode(false); + return Registry.create(domNode); + }; + ShadowBlot.prototype.detach = function () { + if (this.parent != null) this.parent.removeChild(this); + // @ts-ignore + delete this.domNode[Registry.DATA_KEY]; + }; + ShadowBlot.prototype.deleteAt = function (index, length) { + var blot = this.isolate(index, length); + blot.remove(); + }; + ShadowBlot.prototype.formatAt = function ( + index, + length, + name, + value, + ) { + var blot = this.isolate(index, length); + if (Registry.query(name, Registry.Scope.BLOT) != null && value) { + blot.wrap(name, value); + } else if (Registry.query(name, Registry.Scope.ATTRIBUTE) != null) { + var parent = Registry.create(this.statics.scope); + blot.wrap(parent); + parent.format(name, value); + } + }; + ShadowBlot.prototype.insertAt = function (index, value, def) { + var blot = + def == null + ? Registry.create('text', value) + : Registry.create(value, def); + var ref = this.split(index); + this.parent.insertBefore(blot, ref); + }; + ShadowBlot.prototype.insertInto = function (parentBlot, refBlot) { + if (refBlot === void 0) { + refBlot = null; + } + if (this.parent != null) { + this.parent.children.remove(this); + } + var refDomNode = null; + parentBlot.children.insertBefore(this, refBlot); + if (refBlot != null) { + refDomNode = refBlot.domNode; + } + if ( + this.domNode.parentNode != parentBlot.domNode || + this.domNode.nextSibling != refDomNode + ) { + parentBlot.domNode.insertBefore(this.domNode, refDomNode); + } + this.parent = parentBlot; + this.attach(); + }; + ShadowBlot.prototype.isolate = function (index, length) { + var target = this.split(index); + target.split(length); + return target; + }; + ShadowBlot.prototype.length = function () { + return 1; + }; + ShadowBlot.prototype.offset = function (root) { + if (root === void 0) { + root = this.parent; + } + if (this.parent == null || this == root) return 0; + return this.parent.children.offset(this) + this.parent.offset(root); + }; + ShadowBlot.prototype.optimize = function (context) { + // TODO clean up once we use WeakMap + // @ts-ignore + if (this.domNode[Registry.DATA_KEY] != null) { + // @ts-ignore + delete this.domNode[Registry.DATA_KEY].mutations; + } + }; + ShadowBlot.prototype.remove = function () { + if (this.domNode.parentNode != null) { + this.domNode.parentNode.removeChild(this.domNode); + } + this.detach(); + }; + ShadowBlot.prototype.replace = function (target) { + if (target.parent == null) return; + target.parent.insertBefore(this, target.next); + target.remove(); + }; + ShadowBlot.prototype.replaceWith = function (name, value) { + var replacement = + typeof name === 'string' ? Registry.create(name, value) : name; + replacement.replace(this); + return replacement; + }; + ShadowBlot.prototype.split = function (index, force) { + return index === 0 ? this : this.next; + }; + ShadowBlot.prototype.update = function (mutations, context) { + // Nothing to do by default + }; + ShadowBlot.prototype.wrap = function (name, value) { + var wrapper = + typeof name === 'string' ? Registry.create(name, value) : name; + if (this.parent != null) { + this.parent.insertBefore(wrapper, this.next); + } + wrapper.appendChild(this); + return wrapper; + }; + ShadowBlot.blotName = 'abstract'; + return ShadowBlot; + })(); + exports.default = ShadowBlot; + + /***/ + }, + /* 31 */ + /***/ function (module, exports, __nested_webpack_require_299266__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', {value: true}); + var attributor_1 = __nested_webpack_require_299266__(12); + var class_1 = __nested_webpack_require_299266__(32); + var style_1 = __nested_webpack_require_299266__(33); + var Registry = __nested_webpack_require_299266__(1); + var AttributorStore = /** @class */ (function () { + function AttributorStore(domNode) { + this.attributes = {}; + this.domNode = domNode; + this.build(); + } + AttributorStore.prototype.attribute = function (attribute, value) { + // verb + if (value) { + if (attribute.add(this.domNode, value)) { + if (attribute.value(this.domNode) != null) { + this.attributes[attribute.attrName] = attribute; + } else { + delete this.attributes[attribute.attrName]; + } + } + } else { + attribute.remove(this.domNode); + delete this.attributes[attribute.attrName]; + } + }; + AttributorStore.prototype.build = function () { + var _this = this; + this.attributes = {}; + var attributes = attributor_1.default.keys(this.domNode); + var classes = class_1.default.keys(this.domNode); + var styles = style_1.default.keys(this.domNode); + attributes + .concat(classes) + .concat(styles) + .forEach(function (name) { + var attr = Registry.query(name, Registry.Scope.ATTRIBUTE); + if (attr instanceof attributor_1.default) { + _this.attributes[attr.attrName] = attr; + } + }); + }; + AttributorStore.prototype.copy = function (target) { + var _this = this; + Object.keys(this.attributes).forEach(function (key) { + var value = _this.attributes[key].value(_this.domNode); + target.format(key, value); + }); + }; + AttributorStore.prototype.move = function (target) { + var _this = this; + this.copy(target); + Object.keys(this.attributes).forEach(function (key) { + _this.attributes[key].remove(_this.domNode); + }); + this.attributes = {}; + }; + AttributorStore.prototype.values = function () { + var _this = this; + return Object.keys(this.attributes).reduce(function ( + attributes, + name, + ) { + attributes[name] = _this.attributes[name].value(_this.domNode); + return attributes; + }, + {}); + }; + return AttributorStore; + })(); + exports.default = AttributorStore; + + /***/ + }, + /* 32 */ + /***/ function (module, exports, __nested_webpack_require_302202__) { + 'use strict'; + + var __extends = + (this && this.__extends) || + (function () { + var extendStatics = + Object.setPrototypeOf || + ({__proto__: []} instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function (d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); + Object.defineProperty(exports, '__esModule', {value: true}); + var attributor_1 = __nested_webpack_require_302202__(12); + function match(node, prefix) { + var className = node.getAttribute('class') || ''; + return className.split(/\s+/).filter(function (name) { + return name.indexOf(prefix + '-') === 0; + }); + } + var ClassAttributor = /** @class */ (function (_super) { + __extends(ClassAttributor, _super); + function ClassAttributor() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + ClassAttributor.keys = function (node) { + return (node.getAttribute('class') || '') + .split(/\s+/) + .map(function (name) { + return name.split('-').slice(0, -1).join('-'); + }); + }; + ClassAttributor.prototype.add = function (node, value) { + if (!this.canAdd(node, value)) return false; + this.remove(node); + node.classList.add(this.keyName + '-' + value); + return true; + }; + ClassAttributor.prototype.remove = function (node) { + var matches = match(node, this.keyName); + matches.forEach(function (name) { + node.classList.remove(name); + }); + if (node.classList.length === 0) { + node.removeAttribute('class'); + } + }; + ClassAttributor.prototype.value = function (node) { + var result = match(node, this.keyName)[0] || ''; + var value = result.slice(this.keyName.length + 1); // +1 for hyphen + return this.canAdd(node, value) ? value : ''; + }; + return ClassAttributor; + })(attributor_1.default); + exports.default = ClassAttributor; + + /***/ + }, + /* 33 */ + /***/ function (module, exports, __nested_webpack_require_304932__) { + 'use strict'; + + var __extends = + (this && this.__extends) || + (function () { + var extendStatics = + Object.setPrototypeOf || + ({__proto__: []} instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function (d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); + Object.defineProperty(exports, '__esModule', {value: true}); + var attributor_1 = __nested_webpack_require_304932__(12); + function camelize(name) { + var parts = name.split('-'); + var rest = parts + .slice(1) + .map(function (part) { + return part[0].toUpperCase() + part.slice(1); + }) + .join(''); + return parts[0] + rest; + } + var StyleAttributor = /** @class */ (function (_super) { + __extends(StyleAttributor, _super); + function StyleAttributor() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + StyleAttributor.keys = function (node) { + return (node.getAttribute('style') || '') + .split(';') + .map(function (value) { + var arr = value.split(':'); + return arr[0].trim(); + }); + }; + StyleAttributor.prototype.add = function (node, value) { + if (!this.canAdd(node, value)) return false; + // @ts-ignore + node.style[camelize(this.keyName)] = value; + return true; + }; + StyleAttributor.prototype.remove = function (node) { + // @ts-ignore + node.style[camelize(this.keyName)] = ''; + if (!node.getAttribute('style')) { + node.removeAttribute('style'); + } + }; + StyleAttributor.prototype.value = function (node) { + // @ts-ignore + var value = node.style[camelize(this.keyName)]; + return this.canAdd(node, value) ? value : ''; + }; + return StyleAttributor; + })(attributor_1.default); + exports.default = StyleAttributor; + + /***/ + }, + /* 34 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var Theme = (function () { + function Theme(quill, options) { + _classCallCheck(this, Theme); + + this.quill = quill; + this.options = options; + this.modules = {}; + } + + _createClass(Theme, [ + { + key: 'init', + value: function init() { + var _this = this; + + Object.keys(this.options.modules).forEach(function (name) { + if (_this.modules[name] == null) { + _this.addModule(name); + } + }); + }, + }, + { + key: 'addModule', + value: function addModule(name) { + var moduleClass = this.quill.constructor.import( + 'modules/' + name, + ); + this.modules[name] = new moduleClass( + this.quill, + this.options.modules[name] || {}, + ); + return this.modules[name]; + }, + }, + ]); + + return Theme; + })(); + + Theme.DEFAULTS = { + modules: {}, + }; + Theme.themes = { + default: Theme, + }; + + exports.default = Theme; + + /***/ + }, + /* 35 */ + /***/ function (module, exports, __nested_webpack_require_310047__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _parchment = __nested_webpack_require_310047__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _text = __nested_webpack_require_310047__(7); + + var _text2 = _interopRequireDefault(_text); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var GUARD_TEXT = '\uFEFF'; + + var Embed = (function (_Parchment$Embed) { + _inherits(Embed, _Parchment$Embed); + + function Embed(node) { + _classCallCheck(this, Embed); + + var _this = _possibleConstructorReturn( + this, + (Embed.__proto__ || Object.getPrototypeOf(Embed)).call( + this, + node, + ), + ); + + _this.contentNode = document.createElement('span'); + _this.contentNode.setAttribute('contenteditable', false); + [].slice + .call(_this.domNode.childNodes) + .forEach(function (childNode) { + _this.contentNode.appendChild(childNode); + }); + _this.leftGuard = document.createTextNode(GUARD_TEXT); + _this.rightGuard = document.createTextNode(GUARD_TEXT); + _this.domNode.appendChild(_this.leftGuard); + _this.domNode.appendChild(_this.contentNode); + _this.domNode.appendChild(_this.rightGuard); + return _this; + } + + _createClass(Embed, [ + { + key: 'index', + value: function index(node, offset) { + if (node === this.leftGuard) return 0; + if (node === this.rightGuard) return 1; + return _get( + Embed.prototype.__proto__ || + Object.getPrototypeOf(Embed.prototype), + 'index', + this, + ).call(this, node, offset); + }, + }, + { + key: 'restore', + value: function restore(node) { + var range = void 0, + textNode = void 0; + var text = node.data.split(GUARD_TEXT).join(''); + if (node === this.leftGuard) { + if (this.prev instanceof _text2.default) { + var prevLength = this.prev.length(); + this.prev.insertAt(prevLength, text); + range = { + startNode: this.prev.domNode, + startOffset: prevLength + text.length, + }; + } else { + textNode = document.createTextNode(text); + this.parent.insertBefore( + _parchment2.default.create(textNode), + this, + ); + range = { + startNode: textNode, + startOffset: text.length, + }; + } + } else if (node === this.rightGuard) { + if (this.next instanceof _text2.default) { + this.next.insertAt(0, text); + range = { + startNode: this.next.domNode, + startOffset: text.length, + }; + } else { + textNode = document.createTextNode(text); + this.parent.insertBefore( + _parchment2.default.create(textNode), + this.next, + ); + range = { + startNode: textNode, + startOffset: text.length, + }; + } + } + node.data = GUARD_TEXT; + return range; + }, + }, + { + key: 'update', + value: function update(mutations, context) { + var _this2 = this; + + mutations.forEach(function (mutation) { + if ( + mutation.type === 'characterData' && + (mutation.target === _this2.leftGuard || + mutation.target === _this2.rightGuard) + ) { + var range = _this2.restore(mutation.target); + if (range) context.range = range; + } + }); + }, + }, + ]); + + return Embed; + })(_parchment2.default.Embed); + + exports.default = Embed; + + /***/ + }, + /* 36 */ + /***/ function (module, exports, __nested_webpack_require_317627__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.AlignStyle = + exports.AlignClass = + exports.AlignAttribute = + undefined; + + var _parchment = __nested_webpack_require_317627__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + var config = { + scope: _parchment2.default.Scope.BLOCK, + whitelist: ['right', 'center', 'justify'], + }; + + var AlignAttribute = new _parchment2.default.Attributor.Attribute( + 'align', + 'align', + config, + ); + var AlignClass = new _parchment2.default.Attributor.Class( + 'align', + 'ql-align', + config, + ); + var AlignStyle = new _parchment2.default.Attributor.Style( + 'align', + 'text-align', + config, + ); + + exports.AlignAttribute = AlignAttribute; + exports.AlignClass = AlignClass; + exports.AlignStyle = AlignStyle; + + /***/ + }, + /* 37 */ + /***/ function (module, exports, __nested_webpack_require_318882__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.BackgroundStyle = exports.BackgroundClass = undefined; + + var _parchment = __nested_webpack_require_318882__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _color = __nested_webpack_require_318882__(26); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + var BackgroundClass = new _parchment2.default.Attributor.Class( + 'background', + 'ql-bg', + { + scope: _parchment2.default.Scope.INLINE, + }, + ); + var BackgroundStyle = new _color.ColorAttributor( + 'background', + 'background-color', + { + scope: _parchment2.default.Scope.INLINE, + }, + ); + + exports.BackgroundClass = BackgroundClass; + exports.BackgroundStyle = BackgroundStyle; + + /***/ + }, + /* 38 */ + /***/ function (module, exports, __nested_webpack_require_319957__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.DirectionStyle = + exports.DirectionClass = + exports.DirectionAttribute = + undefined; + + var _parchment = __nested_webpack_require_319957__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + var config = { + scope: _parchment2.default.Scope.BLOCK, + whitelist: ['rtl'], + }; + + var DirectionAttribute = new _parchment2.default.Attributor.Attribute( + 'direction', + 'dir', + config, + ); + var DirectionClass = new _parchment2.default.Attributor.Class( + 'direction', + 'ql-direction', + config, + ); + var DirectionStyle = new _parchment2.default.Attributor.Style( + 'direction', + 'direction', + config, + ); + + exports.DirectionAttribute = DirectionAttribute; + exports.DirectionClass = DirectionClass; + exports.DirectionStyle = DirectionStyle; + + /***/ + }, + /* 39 */ + /***/ function (module, exports, __nested_webpack_require_321250__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.FontClass = exports.FontStyle = undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _parchment = __nested_webpack_require_321250__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var config = { + scope: _parchment2.default.Scope.INLINE, + whitelist: ['serif', 'monospace'], + }; + + var FontClass = new _parchment2.default.Attributor.Class( + 'font', + 'ql-font', + config, + ); + + var FontStyleAttributor = (function (_Parchment$Attributor) { + _inherits(FontStyleAttributor, _Parchment$Attributor); + + function FontStyleAttributor() { + _classCallCheck(this, FontStyleAttributor); + + return _possibleConstructorReturn( + this, + ( + FontStyleAttributor.__proto__ || + Object.getPrototypeOf(FontStyleAttributor) + ).apply(this, arguments), + ); + } + + _createClass(FontStyleAttributor, [ + { + key: 'value', + value: function value(node) { + return _get( + FontStyleAttributor.prototype.__proto__ || + Object.getPrototypeOf(FontStyleAttributor.prototype), + 'value', + this, + ) + .call(this, node) + .replace(/["']/g, ''); + }, + }, + ]); + + return FontStyleAttributor; + })(_parchment2.default.Attributor.Style); + + var FontStyle = new FontStyleAttributor('font', 'font-family', config); + + exports.FontStyle = FontStyle; + exports.FontClass = FontClass; + + /***/ + }, + /* 40 */ + /***/ function (module, exports, __nested_webpack_require_326091__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.SizeStyle = exports.SizeClass = undefined; + + var _parchment = __nested_webpack_require_326091__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + var SizeClass = new _parchment2.default.Attributor.Class( + 'size', + 'ql-size', + { + scope: _parchment2.default.Scope.INLINE, + whitelist: ['small', 'large', 'huge'], + }, + ); + var SizeStyle = new _parchment2.default.Attributor.Style( + 'size', + 'font-size', + { + scope: _parchment2.default.Scope.INLINE, + whitelist: ['10px', '18px', '32px'], + }, + ); + + exports.SizeClass = SizeClass; + exports.SizeStyle = SizeStyle; + + /***/ + }, + /* 41 */ + /***/ function (module, exports, __nested_webpack_require_327168__) { + 'use strict'; + + module.exports = { + align: { + '': __nested_webpack_require_327168__(76), + center: __nested_webpack_require_327168__(77), + right: __nested_webpack_require_327168__(78), + justify: __nested_webpack_require_327168__(79), + }, + background: __nested_webpack_require_327168__(80), + blockquote: __nested_webpack_require_327168__(81), + bold: __nested_webpack_require_327168__(82), + clean: __nested_webpack_require_327168__(83), + code: __nested_webpack_require_327168__(58), + 'code-block': __nested_webpack_require_327168__(58), + color: __nested_webpack_require_327168__(84), + direction: { + '': __nested_webpack_require_327168__(85), + rtl: __nested_webpack_require_327168__(86), + }, + float: { + center: __nested_webpack_require_327168__(87), + full: __nested_webpack_require_327168__(88), + left: __nested_webpack_require_327168__(89), + right: __nested_webpack_require_327168__(90), + }, + formula: __nested_webpack_require_327168__(91), + header: { + 1: __nested_webpack_require_327168__(92), + 2: __nested_webpack_require_327168__(93), + }, + italic: __nested_webpack_require_327168__(94), + image: __nested_webpack_require_327168__(95), + indent: { + '+1': __nested_webpack_require_327168__(96), + '-1': __nested_webpack_require_327168__(97), + }, + link: __nested_webpack_require_327168__(98), + list: { + ordered: __nested_webpack_require_327168__(99), + bullet: __nested_webpack_require_327168__(100), + check: __nested_webpack_require_327168__(101), + }, + script: { + sub: __nested_webpack_require_327168__(102), + super: __nested_webpack_require_327168__(103), + }, + strike: __nested_webpack_require_327168__(104), + underline: __nested_webpack_require_327168__(105), + video: __nested_webpack_require_327168__(106), + }; + + /***/ + }, + /* 42 */ + /***/ function (module, exports, __nested_webpack_require_328998__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.getLastChangeIndex = exports.default = undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _parchment = __nested_webpack_require_328998__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _quill = __nested_webpack_require_328998__(5); + + var _quill2 = _interopRequireDefault(_quill); + + var _module = __nested_webpack_require_328998__(9); + + var _module2 = _interopRequireDefault(_module); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var History = (function (_Module) { + _inherits(History, _Module); + + function History(quill, options) { + _classCallCheck(this, History); + + var _this = _possibleConstructorReturn( + this, + (History.__proto__ || Object.getPrototypeOf(History)).call( + this, + quill, + options, + ), + ); + + _this.lastRecorded = 0; + _this.ignoreChange = false; + _this.clear(); + _this.quill.on( + _quill2.default.events.EDITOR_CHANGE, + function (eventName, delta, oldDelta, source) { + if ( + eventName !== _quill2.default.events.TEXT_CHANGE || + _this.ignoreChange + ) + return; + if ( + !_this.options.userOnly || + source === _quill2.default.sources.USER + ) { + _this.record(delta, oldDelta); + } else { + _this.transform(delta); + } + }, + ); + _this.quill.keyboard.addBinding( + {key: 'Z', shortKey: true}, + _this.undo.bind(_this), + ); + _this.quill.keyboard.addBinding( + {key: 'Z', shortKey: true, shiftKey: true}, + _this.redo.bind(_this), + ); + if (/Win/i.test(navigator.platform)) { + _this.quill.keyboard.addBinding( + {key: 'Y', shortKey: true}, + _this.redo.bind(_this), + ); + } + return _this; + } + + _createClass(History, [ + { + key: 'change', + value: function change(source, dest) { + if (this.stack[source].length === 0) return; + var delta = this.stack[source].pop(); + this.stack[dest].push(delta); + this.lastRecorded = 0; + this.ignoreChange = true; + this.quill.updateContents( + delta[source], + _quill2.default.sources.USER, + ); + this.ignoreChange = false; + var index = getLastChangeIndex(delta[source]); + this.quill.setSelection(index); + }, + }, + { + key: 'clear', + value: function clear() { + this.stack = {undo: [], redo: []}; + }, + }, + { + key: 'cutoff', + value: function cutoff() { + this.lastRecorded = 0; + }, + }, + { + key: 'record', + value: function record(changeDelta, oldDelta) { + if (changeDelta.ops.length === 0) return; + this.stack.redo = []; + var undoDelta = this.quill.getContents().diff(oldDelta); + var timestamp = Date.now(); + if ( + this.lastRecorded + this.options.delay > timestamp && + this.stack.undo.length > 0 + ) { + var delta = this.stack.undo.pop(); + undoDelta = undoDelta.compose(delta.undo); + changeDelta = delta.redo.compose(changeDelta); + } else { + this.lastRecorded = timestamp; + } + this.stack.undo.push({ + redo: changeDelta, + undo: undoDelta, + }); + if (this.stack.undo.length > this.options.maxStack) { + this.stack.undo.shift(); + } + }, + }, + { + key: 'redo', + value: function redo() { + this.change('redo', 'undo'); + }, + }, + { + key: 'transform', + value: function transform(delta) { + this.stack.undo.forEach(function (change) { + change.undo = delta.transform(change.undo, true); + change.redo = delta.transform(change.redo, true); + }); + this.stack.redo.forEach(function (change) { + change.undo = delta.transform(change.undo, true); + change.redo = delta.transform(change.redo, true); + }); + }, + }, + { + key: 'undo', + value: function undo() { + this.change('undo', 'redo'); + }, + }, + ]); + + return History; + })(_module2.default); + + History.DEFAULTS = { + delay: 1000, + maxStack: 100, + userOnly: false, + }; + + function endsWithNewlineChange(delta) { + var lastOp = delta.ops[delta.ops.length - 1]; + if (lastOp == null) return false; + if (lastOp.insert != null) { + return ( + typeof lastOp.insert === 'string' && lastOp.insert.endsWith('\n') + ); + } + if (lastOp.attributes != null) { + return Object.keys(lastOp.attributes).some(function (attr) { + return ( + _parchment2.default.query( + attr, + _parchment2.default.Scope.BLOCK, + ) != null + ); + }); + } + return false; + } + + function getLastChangeIndex(delta) { + var deleteLength = delta.reduce(function (length, op) { + length += op.delete || 0; + return length; + }, 0); + var changeIndex = delta.length() - deleteLength; + if (endsWithNewlineChange(delta)) { + changeIndex -= 1; + } + return changeIndex; + } + + exports.default = History; + exports.getLastChangeIndex = getLastChangeIndex; + + /***/ + }, + /* 43 */ + /***/ function (module, exports, __nested_webpack_require_337806__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = exports.BaseTooltip = undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _extend = __nested_webpack_require_337806__(3); + + var _extend2 = _interopRequireDefault(_extend); + + var _quillDelta = __nested_webpack_require_337806__(2); + + var _quillDelta2 = _interopRequireDefault(_quillDelta); + + var _emitter = __nested_webpack_require_337806__(8); + + var _emitter2 = _interopRequireDefault(_emitter); + + var _keyboard = __nested_webpack_require_337806__(23); + + var _keyboard2 = _interopRequireDefault(_keyboard); + + var _theme = __nested_webpack_require_337806__(34); + + var _theme2 = _interopRequireDefault(_theme); + + var _colorPicker = __nested_webpack_require_337806__(59); + + var _colorPicker2 = _interopRequireDefault(_colorPicker); + + var _iconPicker = __nested_webpack_require_337806__(60); + + var _iconPicker2 = _interopRequireDefault(_iconPicker); + + var _picker = __nested_webpack_require_337806__(28); + + var _picker2 = _interopRequireDefault(_picker); + + var _tooltip = __nested_webpack_require_337806__(61); + + var _tooltip2 = _interopRequireDefault(_tooltip); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var ALIGNS = [false, 'center', 'right', 'justify']; + + var COLORS = [ + '#000000', + '#e60000', + '#ff9900', + '#ffff00', + '#008a00', + '#0066cc', + '#9933ff', + '#ffffff', + '#facccc', + '#ffebcc', + '#ffffcc', + '#cce8cc', + '#cce0f5', + '#ebd6ff', + '#bbbbbb', + '#f06666', + '#ffc266', + '#ffff66', + '#66b966', + '#66a3e0', + '#c285ff', + '#888888', + '#a10000', + '#b26b00', + '#b2b200', + '#006100', + '#0047b2', + '#6b24b2', + '#444444', + '#5c0000', + '#663d00', + '#666600', + '#003700', + '#002966', + '#3d1466', + ]; + + var FONTS = [false, 'serif', 'monospace']; + + var HEADERS = ['1', '2', '3', false]; + + var SIZES = ['small', false, 'large', 'huge']; + + var BaseTheme = (function (_Theme) { + _inherits(BaseTheme, _Theme); + + function BaseTheme(quill, options) { + _classCallCheck(this, BaseTheme); + + var _this = _possibleConstructorReturn( + this, + (BaseTheme.__proto__ || Object.getPrototypeOf(BaseTheme)).call( + this, + quill, + options, + ), + ); + + var listener = function listener(e) { + if (!document.body.contains(quill.root)) { + return document.body.removeEventListener('click', listener); + } + if ( + _this.tooltip != null && + !_this.tooltip.root.contains(e.target) && + document.activeElement !== _this.tooltip.textbox && + !_this.quill.hasFocus() + ) { + _this.tooltip.hide(); + } + if (_this.pickers != null) { + _this.pickers.forEach(function (picker) { + if (!picker.container.contains(e.target)) { + picker.close(); + } + }); + } + }; + quill.emitter.listenDOM('click', document.body, listener); + return _this; + } + + _createClass(BaseTheme, [ + { + key: 'addModule', + value: function addModule(name) { + var module = _get( + BaseTheme.prototype.__proto__ || + Object.getPrototypeOf(BaseTheme.prototype), + 'addModule', + this, + ).call(this, name); + if (name === 'toolbar') { + this.extendToolbar(module); + } + return module; + }, + }, + { + key: 'buildButtons', + value: function buildButtons(buttons, icons) { + buttons.forEach(function (button) { + var className = button.getAttribute('class') || ''; + className.split(/\s+/).forEach(function (name) { + if (!name.startsWith('ql-')) return; + name = name.slice('ql-'.length); + if (icons[name] == null) return; + if (name === 'direction') { + button.innerHTML = icons[name][''] + icons[name]['rtl']; + } else if (typeof icons[name] === 'string') { + button.innerHTML = icons[name]; + } else { + var value = button.value || ''; + if (value != null && icons[name][value]) { + button.innerHTML = icons[name][value]; + } + } + }); + }); + }, + }, + { + key: 'buildPickers', + value: function buildPickers(selects, icons) { + var _this2 = this; + + this.pickers = selects.map(function (select) { + if (select.classList.contains('ql-align')) { + if (select.querySelector('option') == null) { + fillSelect(select, ALIGNS); + } + return new _iconPicker2.default(select, icons.align); + } else if ( + select.classList.contains('ql-background') || + select.classList.contains('ql-color') + ) { + var format = select.classList.contains('ql-background') + ? 'background' + : 'color'; + if (select.querySelector('option') == null) { + fillSelect( + select, + COLORS, + format === 'background' ? '#ffffff' : '#000000', + ); + } + return new _colorPicker2.default(select, icons[format]); + } else { + if (select.querySelector('option') == null) { + if (select.classList.contains('ql-font')) { + fillSelect(select, FONTS); + } else if (select.classList.contains('ql-header')) { + fillSelect(select, HEADERS); + } else if (select.classList.contains('ql-size')) { + fillSelect(select, SIZES); + } + } + return new _picker2.default(select); + } + }); + var update = function update() { + _this2.pickers.forEach(function (picker) { + picker.update(); + }); + }; + this.quill.on(_emitter2.default.events.EDITOR_CHANGE, update); + }, + }, + ]); + + return BaseTheme; + })(_theme2.default); + + BaseTheme.DEFAULTS = (0, _extend2.default)( + true, + {}, + _theme2.default.DEFAULTS, + { + modules: { + toolbar: { + handlers: { + formula: function formula() { + this.quill.theme.tooltip.edit('formula'); + }, + image: function image() { + var _this3 = this; + + var fileInput = this.container.querySelector( + 'input.ql-image[type=file]', + ); + if (fileInput == null) { + fileInput = document.createElement('input'); + fileInput.setAttribute('type', 'file'); + fileInput.setAttribute( + 'accept', + 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon', + ); + fileInput.classList.add('ql-image'); + fileInput.addEventListener('change', function () { + if ( + fileInput.files != null && + fileInput.files[0] != null + ) { + var reader = new FileReader(); + reader.onload = function (e) { + var range = _this3.quill.getSelection(true); + _this3.quill.updateContents( + new _quillDelta2.default() + .retain(range.index) + .delete(range.length) + .insert({image: e.target.result}), + _emitter2.default.sources.USER, + ); + _this3.quill.setSelection( + range.index + 1, + _emitter2.default.sources.SILENT, + ); + fileInput.value = ''; + }; + reader.readAsDataURL(fileInput.files[0]); + } + }); + this.container.appendChild(fileInput); + } + fileInput.click(); + }, + video: function video() { + this.quill.theme.tooltip.edit('video'); + }, + }, + }, + }, + }, + ); + + var BaseTooltip = (function (_Tooltip) { + _inherits(BaseTooltip, _Tooltip); + + function BaseTooltip(quill, boundsContainer) { + _classCallCheck(this, BaseTooltip); + + var _this4 = _possibleConstructorReturn( + this, + ( + BaseTooltip.__proto__ || Object.getPrototypeOf(BaseTooltip) + ).call(this, quill, boundsContainer), + ); + + _this4.textbox = _this4.root.querySelector('input[type="text"]'); + _this4.listen(); + return _this4; + } + + _createClass(BaseTooltip, [ + { + key: 'listen', + value: function listen() { + var _this5 = this; + + this.textbox.addEventListener('keydown', function (event) { + if (_keyboard2.default.match(event, 'enter')) { + _this5.save(); + event.preventDefault(); + } else if (_keyboard2.default.match(event, 'escape')) { + _this5.cancel(); + event.preventDefault(); + } + }); + }, + }, + { + key: 'cancel', + value: function cancel() { + this.hide(); + }, + }, + { + key: 'edit', + value: function edit() { + var mode = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : 'link'; + var preview = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : null; + + this.root.classList.remove('ql-hidden'); + this.root.classList.add('ql-editing'); + if (preview != null) { + this.textbox.value = preview; + } else if (mode !== this.root.getAttribute('data-mode')) { + this.textbox.value = ''; + } + this.position( + this.quill.getBounds(this.quill.selection.savedRange), + ); + this.textbox.select(); + this.textbox.setAttribute( + 'placeholder', + this.textbox.getAttribute('data-' + mode) || '', + ); + this.root.setAttribute('data-mode', mode); + }, + }, + { + key: 'restoreFocus', + value: function restoreFocus() { + var scrollTop = this.quill.scrollingContainer.scrollTop; + this.quill.focus(); + this.quill.scrollingContainer.scrollTop = scrollTop; + }, + }, + { + key: 'save', + value: function save() { + var value = this.textbox.value; + switch (this.root.getAttribute('data-mode')) { + case 'link': { + var scrollTop = this.quill.root.scrollTop; + if (this.linkRange) { + this.quill.formatText( + this.linkRange, + 'link', + value, + _emitter2.default.sources.USER, + ); + delete this.linkRange; + } else { + this.restoreFocus(); + this.quill.format( + 'link', + value, + _emitter2.default.sources.USER, + ); + } + this.quill.root.scrollTop = scrollTop; + break; + } + case 'video': { + value = extractVideoUrl(value); + } // eslint-disable-next-line no-fallthrough + case 'formula': { + if (!value) break; + var range = this.quill.getSelection(true); + if (range != null) { + var index = range.index + range.length; + this.quill.insertEmbed( + index, + this.root.getAttribute('data-mode'), + value, + _emitter2.default.sources.USER, + ); + if (this.root.getAttribute('data-mode') === 'formula') { + this.quill.insertText( + index + 1, + ' ', + _emitter2.default.sources.USER, + ); + } + this.quill.setSelection( + index + 2, + _emitter2.default.sources.USER, + ); + } + break; + } + default: + } + this.textbox.value = ''; + this.hide(); + }, + }, + ]); + + return BaseTooltip; + })(_tooltip2.default); + + function extractVideoUrl(url) { + var match = + url.match( + /^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/, + ) || + url.match( + /^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/, + ); + if (match) { + return ( + (match[1] || 'https') + + '://www.youtube.com/embed/' + + match[2] + + '?showinfo=0' + ); + } + if ( + (match = url.match( + /^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/, + )) + ) { + // eslint-disable-line no-cond-assign + return ( + (match[1] || 'https') + + '://player.vimeo.com/video/' + + match[2] + + '/' + ); + } + return url; + } + + function fillSelect(select, values) { + var defaultValue = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : false; + + values.forEach(function (value) { + var option = document.createElement('option'); + if (value === defaultValue) { + option.setAttribute('selected', 'selected'); + } else { + option.setAttribute('value', value); + } + select.appendChild(option); + }); + } + + exports.BaseTooltip = BaseTooltip; + exports.default = BaseTheme; + + /***/ + }, + /* 44 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', {value: true}); + var LinkedList = /** @class */ (function () { + function LinkedList() { + this.head = this.tail = null; + this.length = 0; + } + LinkedList.prototype.append = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + this.insertBefore(nodes[0], null); + if (nodes.length > 1) { + this.append.apply(this, nodes.slice(1)); + } + }; + LinkedList.prototype.contains = function (node) { + var cur, + next = this.iterator(); + while ((cur = next())) { + if (cur === node) return true; + } + return false; + }; + LinkedList.prototype.insertBefore = function (node, refNode) { + if (!node) return; + node.next = refNode; + if (refNode != null) { + node.prev = refNode.prev; + if (refNode.prev != null) { + refNode.prev.next = node; + } + refNode.prev = node; + if (refNode === this.head) { + this.head = node; + } + } else if (this.tail != null) { + this.tail.next = node; + node.prev = this.tail; + this.tail = node; + } else { + node.prev = null; + this.head = this.tail = node; + } + this.length += 1; + }; + LinkedList.prototype.offset = function (target) { + var index = 0, + cur = this.head; + while (cur != null) { + if (cur === target) return index; + index += cur.length(); + cur = cur.next; + } + return -1; + }; + LinkedList.prototype.remove = function (node) { + if (!this.contains(node)) return; + if (node.prev != null) node.prev.next = node.next; + if (node.next != null) node.next.prev = node.prev; + if (node === this.head) this.head = node.next; + if (node === this.tail) this.tail = node.prev; + this.length -= 1; + }; + LinkedList.prototype.iterator = function (curNode) { + if (curNode === void 0) { + curNode = this.head; + } + // TODO use yield when we can + return function () { + var ret = curNode; + if (curNode != null) curNode = curNode.next; + return ret; + }; + }; + LinkedList.prototype.find = function (index, inclusive) { + if (inclusive === void 0) { + inclusive = false; + } + var cur, + next = this.iterator(); + while ((cur = next())) { + var length = cur.length(); + if ( + index < length || + (inclusive && + index === length && + (cur.next == null || cur.next.length() !== 0)) + ) { + return [cur, index]; + } + index -= length; + } + return [null, 0]; + }; + LinkedList.prototype.forEach = function (callback) { + var cur, + next = this.iterator(); + while ((cur = next())) { + callback(cur); + } + }; + LinkedList.prototype.forEachAt = function (index, length, callback) { + if (length <= 0) return; + var _a = this.find(index), + startNode = _a[0], + offset = _a[1]; + var cur, + curIndex = index - offset, + next = this.iterator(startNode); + while ((cur = next()) && curIndex < index + length) { + var curLength = cur.length(); + if (index > curIndex) { + callback( + cur, + index - curIndex, + Math.min(length, curIndex + curLength - index), + ); + } else { + callback( + cur, + 0, + Math.min(curLength, index + length - curIndex), + ); + } + curIndex += curLength; + } + }; + LinkedList.prototype.map = function (callback) { + return this.reduce(function (memo, cur) { + memo.push(callback(cur)); + return memo; + }, []); + }; + LinkedList.prototype.reduce = function (callback, memo) { + var cur, + next = this.iterator(); + while ((cur = next())) { + memo = callback(memo, cur); + } + return memo; + }; + return LinkedList; + })(); + exports.default = LinkedList; + + /***/ + }, + /* 45 */ + /***/ function (module, exports, __nested_webpack_require_362405__) { + 'use strict'; + + var __extends = + (this && this.__extends) || + (function () { + var extendStatics = + Object.setPrototypeOf || + ({__proto__: []} instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function (d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); + Object.defineProperty(exports, '__esModule', {value: true}); + var container_1 = __nested_webpack_require_362405__(17); + var Registry = __nested_webpack_require_362405__(1); + var OBSERVER_CONFIG = { + attributes: true, + characterData: true, + characterDataOldValue: true, + childList: true, + subtree: true, + }; + var MAX_OPTIMIZE_ITERATIONS = 100; + var ScrollBlot = /** @class */ (function (_super) { + __extends(ScrollBlot, _super); + function ScrollBlot(node) { + var _this = _super.call(this, node) || this; + _this.scroll = _this; + _this.observer = new MutationObserver(function (mutations) { + _this.update(mutations); + }); + _this.observer.observe(_this.domNode, OBSERVER_CONFIG); + _this.attach(); + return _this; + } + ScrollBlot.prototype.detach = function () { + _super.prototype.detach.call(this); + this.observer.disconnect(); + }; + ScrollBlot.prototype.deleteAt = function (index, length) { + this.update(); + if (index === 0 && length === this.length()) { + this.children.forEach(function (child) { + child.remove(); + }); + } else { + _super.prototype.deleteAt.call(this, index, length); + } + }; + ScrollBlot.prototype.formatAt = function ( + index, + length, + name, + value, + ) { + this.update(); + _super.prototype.formatAt.call(this, index, length, name, value); + }; + ScrollBlot.prototype.insertAt = function (index, value, def) { + this.update(); + _super.prototype.insertAt.call(this, index, value, def); + }; + ScrollBlot.prototype.optimize = function (mutations, context) { + var _this = this; + if (mutations === void 0) { + mutations = []; + } + if (context === void 0) { + context = {}; + } + _super.prototype.optimize.call(this, context); + // We must modify mutations directly, cannot make copy and then modify + var records = [].slice.call(this.observer.takeRecords()); + // Array.push currently seems to be implemented by a non-tail recursive function + // so we cannot just mutations.push.apply(mutations, this.observer.takeRecords()); + while (records.length > 0) mutations.push(records.pop()); + // TODO use WeakMap + var mark = function (blot, markParent) { + if (markParent === void 0) { + markParent = true; + } + if (blot == null || blot === _this) return; + if (blot.domNode.parentNode == null) return; + // @ts-ignore + if (blot.domNode[Registry.DATA_KEY].mutations == null) { + // @ts-ignore + blot.domNode[Registry.DATA_KEY].mutations = []; + } + if (markParent) mark(blot.parent); + }; + var optimize = function (blot) { + // Post-order traversal + if ( + // @ts-ignore + blot.domNode[Registry.DATA_KEY] == null || + // @ts-ignore + blot.domNode[Registry.DATA_KEY].mutations == null + ) { + return; + } + if (blot instanceof container_1.default) { + blot.children.forEach(optimize); + } + blot.optimize(context); + }; + var remaining = mutations; + for (var i = 0; remaining.length > 0; i += 1) { + if (i >= MAX_OPTIMIZE_ITERATIONS) { + throw new Error( + '[Parchment] Maximum optimize iterations reached', + ); + } + remaining.forEach(function (mutation) { + var blot = Registry.find(mutation.target, true); + if (blot == null) return; + if (blot.domNode === mutation.target) { + if (mutation.type === 'childList') { + mark(Registry.find(mutation.previousSibling, false)); + [].forEach.call(mutation.addedNodes, function (node) { + var child = Registry.find(node, false); + mark(child, false); + if (child instanceof container_1.default) { + child.children.forEach(function (grandChild) { + mark(grandChild, false); + }); + } + }); + } else if (mutation.type === 'attributes') { + mark(blot.prev); + } + } + mark(blot); + }); + this.children.forEach(optimize); + remaining = [].slice.call(this.observer.takeRecords()); + records = remaining.slice(); + while (records.length > 0) mutations.push(records.pop()); + } + }; + ScrollBlot.prototype.update = function (mutations, context) { + var _this = this; + if (context === void 0) { + context = {}; + } + mutations = mutations || this.observer.takeRecords(); + // TODO use WeakMap + mutations + .map(function (mutation) { + var blot = Registry.find(mutation.target, true); + if (blot == null) return null; + // @ts-ignore + if (blot.domNode[Registry.DATA_KEY].mutations == null) { + // @ts-ignore + blot.domNode[Registry.DATA_KEY].mutations = [mutation]; + return blot; + } else { + // @ts-ignore + blot.domNode[Registry.DATA_KEY].mutations.push(mutation); + return null; + } + }) + .forEach(function (blot) { + if ( + blot == null || + blot === _this || + //@ts-ignore + blot.domNode[Registry.DATA_KEY] == null + ) + return; + // @ts-ignore + blot.update( + blot.domNode[Registry.DATA_KEY].mutations || [], + context, + ); + }); + // @ts-ignore + if (this.domNode[Registry.DATA_KEY].mutations != null) { + // @ts-ignore + _super.prototype.update.call( + this, + this.domNode[Registry.DATA_KEY].mutations, + context, + ); + } + this.optimize(mutations, context); + }; + ScrollBlot.blotName = 'scroll'; + ScrollBlot.defaultChild = 'block'; + ScrollBlot.scope = Registry.Scope.BLOCK_BLOT; + ScrollBlot.tagName = 'DIV'; + return ScrollBlot; + })(container_1.default); + exports.default = ScrollBlot; + + /***/ + }, + /* 46 */ + /***/ function (module, exports, __nested_webpack_require_370497__) { + 'use strict'; + + var __extends = + (this && this.__extends) || + (function () { + var extendStatics = + Object.setPrototypeOf || + ({__proto__: []} instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function (d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); + Object.defineProperty(exports, '__esModule', {value: true}); + var format_1 = __nested_webpack_require_370497__(18); + var Registry = __nested_webpack_require_370497__(1); + // Shallow object comparison + function isEqual(obj1, obj2) { + if (Object.keys(obj1).length !== Object.keys(obj2).length) + return false; + // @ts-ignore + for (var prop in obj1) { + // @ts-ignore + if (obj1[prop] !== obj2[prop]) return false; + } + return true; + } + var InlineBlot = /** @class */ (function (_super) { + __extends(InlineBlot, _super); + function InlineBlot() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + InlineBlot.formats = function (domNode) { + if (domNode.tagName === InlineBlot.tagName) return undefined; + return _super.formats.call(this, domNode); + }; + InlineBlot.prototype.format = function (name, value) { + var _this = this; + if (name === this.statics.blotName && !value) { + this.children.forEach(function (child) { + if (!(child instanceof format_1.default)) { + child = child.wrap(InlineBlot.blotName, true); + } + _this.attributes.copy(child); + }); + this.unwrap(); + } else { + _super.prototype.format.call(this, name, value); + } + }; + InlineBlot.prototype.formatAt = function ( + index, + length, + name, + value, + ) { + if ( + this.formats()[name] != null || + Registry.query(name, Registry.Scope.ATTRIBUTE) + ) { + var blot = this.isolate(index, length); + blot.format(name, value); + } else { + _super.prototype.formatAt.call(this, index, length, name, value); + } + }; + InlineBlot.prototype.optimize = function (context) { + _super.prototype.optimize.call(this, context); + var formats = this.formats(); + if (Object.keys(formats).length === 0) { + return this.unwrap(); // unformatted span + } + var next = this.next; + if ( + next instanceof InlineBlot && + next.prev === this && + isEqual(formats, next.formats()) + ) { + next.moveChildren(this); + next.remove(); + } + }; + InlineBlot.blotName = 'inline'; + InlineBlot.scope = Registry.Scope.INLINE_BLOT; + InlineBlot.tagName = 'SPAN'; + return InlineBlot; + })(format_1.default); + exports.default = InlineBlot; + + /***/ + }, + /* 47 */ + /***/ function (module, exports, __nested_webpack_require_374197__) { + 'use strict'; + + var __extends = + (this && this.__extends) || + (function () { + var extendStatics = + Object.setPrototypeOf || + ({__proto__: []} instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function (d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); + Object.defineProperty(exports, '__esModule', {value: true}); + var format_1 = __nested_webpack_require_374197__(18); + var Registry = __nested_webpack_require_374197__(1); + var BlockBlot = /** @class */ (function (_super) { + __extends(BlockBlot, _super); + function BlockBlot() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + BlockBlot.formats = function (domNode) { + var tagName = Registry.query(BlockBlot.blotName).tagName; + if (domNode.tagName === tagName) return undefined; + return _super.formats.call(this, domNode); + }; + BlockBlot.prototype.format = function (name, value) { + if (Registry.query(name, Registry.Scope.BLOCK) == null) { + return; + } else if (name === this.statics.blotName && !value) { + this.replaceWith(BlockBlot.blotName); + } else { + _super.prototype.format.call(this, name, value); + } + }; + BlockBlot.prototype.formatAt = function (index, length, name, value) { + if (Registry.query(name, Registry.Scope.BLOCK) != null) { + this.format(name, value); + } else { + _super.prototype.formatAt.call(this, index, length, name, value); + } + }; + BlockBlot.prototype.insertAt = function (index, value, def) { + if ( + def == null || + Registry.query(value, Registry.Scope.INLINE) != null + ) { + // Insert text or inline + _super.prototype.insertAt.call(this, index, value, def); + } else { + var after = this.split(index); + var blot = Registry.create(value, def); + after.parent.insertBefore(blot, after); + } + }; + BlockBlot.prototype.update = function (mutations, context) { + if (navigator.userAgent.match(/Trident/)) { + this.build(); + } else { + _super.prototype.update.call(this, mutations, context); + } + }; + BlockBlot.blotName = 'block'; + BlockBlot.scope = Registry.Scope.BLOCK_BLOT; + BlockBlot.tagName = 'P'; + return BlockBlot; + })(format_1.default); + exports.default = BlockBlot; + + /***/ + }, + /* 48 */ + /***/ function (module, exports, __nested_webpack_require_377436__) { + 'use strict'; + + var __extends = + (this && this.__extends) || + (function () { + var extendStatics = + Object.setPrototypeOf || + ({__proto__: []} instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function (d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); + Object.defineProperty(exports, '__esModule', {value: true}); + var leaf_1 = __nested_webpack_require_377436__(19); + var EmbedBlot = /** @class */ (function (_super) { + __extends(EmbedBlot, _super); + function EmbedBlot() { + return (_super !== null && _super.apply(this, arguments)) || this; + } + EmbedBlot.formats = function (domNode) { + return undefined; + }; + EmbedBlot.prototype.format = function (name, value) { + // super.formatAt wraps, which is what we want in general, + // but this allows subclasses to overwrite for formats + // that just apply to particular embeds + _super.prototype.formatAt.call(this, 0, this.length(), name, value); + }; + EmbedBlot.prototype.formatAt = function (index, length, name, value) { + if (index === 0 && length === this.length()) { + this.format(name, value); + } else { + _super.prototype.formatAt.call(this, index, length, name, value); + } + }; + EmbedBlot.prototype.formats = function () { + return this.statics.formats(this.domNode); + }; + return EmbedBlot; + })(leaf_1.default); + exports.default = EmbedBlot; + + /***/ + }, + /* 49 */ + /***/ function (module, exports, __nested_webpack_require_379624__) { + 'use strict'; + + var __extends = + (this && this.__extends) || + (function () { + var extendStatics = + Object.setPrototypeOf || + ({__proto__: []} instanceof Array && + function (d, b) { + d.__proto__ = b; + }) || + function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function (d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new __()); + }; + })(); + Object.defineProperty(exports, '__esModule', {value: true}); + var leaf_1 = __nested_webpack_require_379624__(19); + var Registry = __nested_webpack_require_379624__(1); + var TextBlot = /** @class */ (function (_super) { + __extends(TextBlot, _super); + function TextBlot(node) { + var _this = _super.call(this, node) || this; + _this.text = _this.statics.value(_this.domNode); + return _this; + } + TextBlot.create = function (value) { + return document.createTextNode(value); + }; + TextBlot.value = function (domNode) { + var text = domNode.data; + // @ts-ignore + if (text['normalize']) text = text['normalize'](); + return text; + }; + TextBlot.prototype.deleteAt = function (index, length) { + this.domNode.data = this.text = + this.text.slice(0, index) + this.text.slice(index + length); + }; + TextBlot.prototype.index = function (node, offset) { + if (this.domNode === node) { + return offset; + } + return -1; + }; + TextBlot.prototype.insertAt = function (index, value, def) { + if (def == null) { + this.text = + this.text.slice(0, index) + value + this.text.slice(index); + this.domNode.data = this.text; + } else { + _super.prototype.insertAt.call(this, index, value, def); + } + }; + TextBlot.prototype.length = function () { + return this.text.length; + }; + TextBlot.prototype.optimize = function (context) { + _super.prototype.optimize.call(this, context); + this.text = this.statics.value(this.domNode); + if (this.text.length === 0) { + this.remove(); + } else if ( + this.next instanceof TextBlot && + this.next.prev === this + ) { + this.insertAt(this.length(), this.next.value()); + this.next.remove(); + } + }; + TextBlot.prototype.position = function (index, inclusive) { + if (inclusive === void 0) { + inclusive = false; + } + return [this.domNode, index]; + }; + TextBlot.prototype.split = function (index, force) { + if (force === void 0) { + force = false; + } + if (!force) { + if (index === 0) return this; + if (index === this.length()) return this.next; + } + var after = Registry.create(this.domNode.splitText(index)); + this.parent.insertBefore(after, this.next); + this.text = this.statics.value(this.domNode); + return after; + }; + TextBlot.prototype.update = function (mutations, context) { + var _this = this; + if ( + mutations.some(function (mutation) { + return ( + mutation.type === 'characterData' && + mutation.target === _this.domNode + ); + }) + ) { + this.text = this.statics.value(this.domNode); + } + }; + TextBlot.prototype.value = function () { + return this.text; + }; + TextBlot.blotName = 'text'; + TextBlot.scope = Registry.Scope.INLINE_BLOT; + return TextBlot; + })(leaf_1.default); + exports.default = TextBlot; + + /***/ + }, + /* 50 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var elem = document.createElement('div'); + elem.classList.toggle('test-class', false); + if (elem.classList.contains('test-class')) { + var _toggle = DOMTokenList.prototype.toggle; + DOMTokenList.prototype.toggle = function (token, force) { + if (arguments.length > 1 && !this.contains(token) === !force) { + return force; + } else { + return _toggle.call(this, token); + } + }; + } + + if (!String.prototype.startsWith) { + String.prototype.startsWith = function (searchString, position) { + position = position || 0; + return this.substr(position, searchString.length) === searchString; + }; + } + + if (!String.prototype.endsWith) { + String.prototype.endsWith = function (searchString, position) { + var subjectString = this.toString(); + if ( + typeof position !== 'number' || + !isFinite(position) || + Math.floor(position) !== position || + position > subjectString.length + ) { + position = subjectString.length; + } + position -= searchString.length; + var lastIndex = subjectString.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; + }; + } + + if (!Array.prototype.find) { + Object.defineProperty(Array.prototype, 'find', { + value: function value(predicate) { + if (this === null) { + throw new TypeError( + 'Array.prototype.find called on null or undefined', + ); + } + if (typeof predicate !== 'function') { + throw new TypeError('predicate must be a function'); + } + var list = Object(this); + var length = list.length >>> 0; + var thisArg = arguments[1]; + var value; + + for (var i = 0; i < length; i++) { + value = list[i]; + if (predicate.call(thisArg, value, i, list)) { + return value; + } + } + return undefined; + }, + }); + } + + document.addEventListener('DOMContentLoaded', function () { + // Disable resizing in Firefox + document.execCommand('enableObjectResizing', false, false); + // Disable automatic linkifying in IE11 + document.execCommand('autoUrlDetect', false, false); + }); + + /***/ + }, + /* 51 */ + /***/ function (module, exports) { + /** + * This library modifies the diff-patch-match library by Neil Fraser + * by removing the patch and match functionality and certain advanced + * options in the diff function. The original license is as follows: + * + * === + * + * Diff Match and Patch + * + * Copyright 2006 Google Inc. + * http://code.google.com/p/google-diff-match-patch/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /** + * The data structure representing a diff is an array of tuples: + * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']] + * which means: delete 'Hello', add 'Goodbye' and keep ' world.' + */ + var DIFF_DELETE = -1; + var DIFF_INSERT = 1; + var DIFF_EQUAL = 0; + + /** + * Find the differences between two texts. Simplifies the problem by stripping + * any common prefix or suffix off the texts before diffing. + * @param {string} text1 Old string to be diffed. + * @param {string} text2 New string to be diffed. + * @param {Int} cursor_pos Expected edit position in text1 (optional) + * @return {Array} Array of diff tuples. + */ + function diff_main(text1, text2, cursor_pos) { + // Check for equality (speedup). + if (text1 == text2) { + if (text1) { + return [[DIFF_EQUAL, text1]]; + } + return []; + } + + // Check cursor_pos within bounds + if (cursor_pos < 0 || text1.length < cursor_pos) { + cursor_pos = null; + } + + // Trim off common prefix (speedup). + var commonlength = diff_commonPrefix(text1, text2); + var commonprefix = text1.substring(0, commonlength); + text1 = text1.substring(commonlength); + text2 = text2.substring(commonlength); + + // Trim off common suffix (speedup). + commonlength = diff_commonSuffix(text1, text2); + var commonsuffix = text1.substring(text1.length - commonlength); + text1 = text1.substring(0, text1.length - commonlength); + text2 = text2.substring(0, text2.length - commonlength); + + // Compute the diff on the middle block. + var diffs = diff_compute_(text1, text2); + + // Restore the prefix and suffix. + if (commonprefix) { + diffs.unshift([DIFF_EQUAL, commonprefix]); + } + if (commonsuffix) { + diffs.push([DIFF_EQUAL, commonsuffix]); + } + diff_cleanupMerge(diffs); + if (cursor_pos != null) { + diffs = fix_cursor(diffs, cursor_pos); + } + diffs = fix_emoji(diffs); + return diffs; + } + + /** + * Find the differences between two texts. Assumes that the texts do not + * have any common prefix or suffix. + * @param {string} text1 Old string to be diffed. + * @param {string} text2 New string to be diffed. + * @return {Array} Array of diff tuples. + */ + function diff_compute_(text1, text2) { + var diffs; + + if (!text1) { + // Just add some text (speedup). + return [[DIFF_INSERT, text2]]; + } + + if (!text2) { + // Just delete some text (speedup). + return [[DIFF_DELETE, text1]]; + } + + var longtext = text1.length > text2.length ? text1 : text2; + var shorttext = text1.length > text2.length ? text2 : text1; + var i = longtext.indexOf(shorttext); + if (i != -1) { + // Shorter text is inside the longer text (speedup). + diffs = [ + [DIFF_INSERT, longtext.substring(0, i)], + [DIFF_EQUAL, shorttext], + [DIFF_INSERT, longtext.substring(i + shorttext.length)], + ]; + // Swap insertions for deletions if diff is reversed. + if (text1.length > text2.length) { + diffs[0][0] = diffs[2][0] = DIFF_DELETE; + } + return diffs; + } + + if (shorttext.length == 1) { + // Single character string. + // After the previous speedup, the character can't be an equality. + return [ + [DIFF_DELETE, text1], + [DIFF_INSERT, text2], + ]; + } + + // Check to see if the problem can be split in two. + var hm = diff_halfMatch_(text1, text2); + if (hm) { + // A half-match was found, sort out the return data. + var text1_a = hm[0]; + var text1_b = hm[1]; + var text2_a = hm[2]; + var text2_b = hm[3]; + var mid_common = hm[4]; + // Send both pairs off for separate processing. + var diffs_a = diff_main(text1_a, text2_a); + var diffs_b = diff_main(text1_b, text2_b); + // Merge the results. + return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b); + } + + return diff_bisect_(text1, text2); + } + + /** + * Find the 'middle snake' of a diff, split the problem in two + * and return the recursively constructed diff. + * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations. + * @param {string} text1 Old string to be diffed. + * @param {string} text2 New string to be diffed. + * @return {Array} Array of diff tuples. + * @private + */ + function diff_bisect_(text1, text2) { + // Cache the text lengths to prevent multiple calls. + var text1_length = text1.length; + var text2_length = text2.length; + var max_d = Math.ceil((text1_length + text2_length) / 2); + var v_offset = max_d; + var v_length = 2 * max_d; + var v1 = new Array(v_length); + var v2 = new Array(v_length); + // Setting all elements to -1 is faster in Chrome & Firefox than mixing + // integers and undefined. + for (var x = 0; x < v_length; x++) { + v1[x] = -1; + v2[x] = -1; + } + v1[v_offset + 1] = 0; + v2[v_offset + 1] = 0; + var delta = text1_length - text2_length; + // If the total number of characters is odd, then the front path will collide + // with the reverse path. + var front = delta % 2 != 0; + // Offsets for start and end of k loop. + // Prevents mapping of space beyond the grid. + var k1start = 0; + var k1end = 0; + var k2start = 0; + var k2end = 0; + for (var d = 0; d < max_d; d++) { + // Walk the front path one step. + for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) { + var k1_offset = v_offset + k1; + var x1; + if ( + k1 == -d || + (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1]) + ) { + x1 = v1[k1_offset + 1]; + } else { + x1 = v1[k1_offset - 1] + 1; + } + var y1 = x1 - k1; + while ( + x1 < text1_length && + y1 < text2_length && + text1.charAt(x1) == text2.charAt(y1) + ) { + x1++; + y1++; + } + v1[k1_offset] = x1; + if (x1 > text1_length) { + // Ran off the right of the graph. + k1end += 2; + } else if (y1 > text2_length) { + // Ran off the bottom of the graph. + k1start += 2; + } else if (front) { + var k2_offset = v_offset + delta - k1; + if ( + k2_offset >= 0 && + k2_offset < v_length && + v2[k2_offset] != -1 + ) { + // Mirror x2 onto top-left coordinate system. + var x2 = text1_length - v2[k2_offset]; + if (x1 >= x2) { + // Overlap detected. + return diff_bisectSplit_(text1, text2, x1, y1); + } + } + } + } + + // Walk the reverse path one step. + for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) { + var k2_offset = v_offset + k2; + var x2; + if ( + k2 == -d || + (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1]) + ) { + x2 = v2[k2_offset + 1]; + } else { + x2 = v2[k2_offset - 1] + 1; + } + var y2 = x2 - k2; + while ( + x2 < text1_length && + y2 < text2_length && + text1.charAt(text1_length - x2 - 1) == + text2.charAt(text2_length - y2 - 1) + ) { + x2++; + y2++; + } + v2[k2_offset] = x2; + if (x2 > text1_length) { + // Ran off the left of the graph. + k2end += 2; + } else if (y2 > text2_length) { + // Ran off the top of the graph. + k2start += 2; + } else if (!front) { + var k1_offset = v_offset + delta - k2; + if ( + k1_offset >= 0 && + k1_offset < v_length && + v1[k1_offset] != -1 + ) { + var x1 = v1[k1_offset]; + var y1 = v_offset + x1 - k1_offset; + // Mirror x2 onto top-left coordinate system. + x2 = text1_length - x2; + if (x1 >= x2) { + // Overlap detected. + return diff_bisectSplit_(text1, text2, x1, y1); + } + } + } + } + } + // Diff took too long and hit the deadline or + // number of diffs equals number of characters, no commonality at all. + return [ + [DIFF_DELETE, text1], + [DIFF_INSERT, text2], + ]; + } + + /** + * Given the location of the 'middle snake', split the diff in two parts + * and recurse. + * @param {string} text1 Old string to be diffed. + * @param {string} text2 New string to be diffed. + * @param {number} x Index of split point in text1. + * @param {number} y Index of split point in text2. + * @return {Array} Array of diff tuples. + */ + function diff_bisectSplit_(text1, text2, x, y) { + var text1a = text1.substring(0, x); + var text2a = text2.substring(0, y); + var text1b = text1.substring(x); + var text2b = text2.substring(y); + + // Compute both diffs serially. + var diffs = diff_main(text1a, text2a); + var diffsb = diff_main(text1b, text2b); + + return diffs.concat(diffsb); + } + + /** + * Determine the common prefix of two strings. + * @param {string} text1 First string. + * @param {string} text2 Second string. + * @return {number} The number of characters common to the start of each + * string. + */ + function diff_commonPrefix(text1, text2) { + // Quick check for common null cases. + if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) { + return 0; + } + // Binary search. + // Performance analysis: http://neil.fraser.name/news/2007/10/09/ + var pointermin = 0; + var pointermax = Math.min(text1.length, text2.length); + var pointermid = pointermax; + var pointerstart = 0; + while (pointermin < pointermid) { + if ( + text1.substring(pointerstart, pointermid) == + text2.substring(pointerstart, pointermid) + ) { + pointermin = pointermid; + pointerstart = pointermin; + } else { + pointermax = pointermid; + } + pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); + } + return pointermid; + } + + /** + * Determine the common suffix of two strings. + * @param {string} text1 First string. + * @param {string} text2 Second string. + * @return {number} The number of characters common to the end of each string. + */ + function diff_commonSuffix(text1, text2) { + // Quick check for common null cases. + if ( + !text1 || + !text2 || + text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1) + ) { + return 0; + } + // Binary search. + // Performance analysis: http://neil.fraser.name/news/2007/10/09/ + var pointermin = 0; + var pointermax = Math.min(text1.length, text2.length); + var pointermid = pointermax; + var pointerend = 0; + while (pointermin < pointermid) { + if ( + text1.substring( + text1.length - pointermid, + text1.length - pointerend, + ) == + text2.substring( + text2.length - pointermid, + text2.length - pointerend, + ) + ) { + pointermin = pointermid; + pointerend = pointermin; + } else { + pointermax = pointermid; + } + pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); + } + return pointermid; + } + + /** + * Do the two texts share a substring which is at least half the length of the + * longer text? + * This speedup can produce non-minimal diffs. + * @param {string} text1 First string. + * @param {string} text2 Second string. + * @return {Array.} Five element Array, containing the prefix of + * text1, the suffix of text1, the prefix of text2, the suffix of + * text2 and the common middle. Or null if there was no match. + */ + function diff_halfMatch_(text1, text2) { + var longtext = text1.length > text2.length ? text1 : text2; + var shorttext = text1.length > text2.length ? text2 : text1; + if (longtext.length < 4 || shorttext.length * 2 < longtext.length) { + return null; // Pointless. + } + + /** + * Does a substring of shorttext exist within longtext such that the substring + * is at least half the length of longtext? + * Closure, but does not reference any external variables. + * @param {string} longtext Longer string. + * @param {string} shorttext Shorter string. + * @param {number} i Start index of quarter length substring within longtext. + * @return {Array.} Five element Array, containing the prefix of + * longtext, the suffix of longtext, the prefix of shorttext, the suffix + * of shorttext and the common middle. Or null if there was no match. + * @private + */ + function diff_halfMatchI_(longtext, shorttext, i) { + // Start with a 1/4 length substring at position i as a seed. + var seed = longtext.substring( + i, + i + Math.floor(longtext.length / 4), + ); + var j = -1; + var best_common = ''; + var best_longtext_a, + best_longtext_b, + best_shorttext_a, + best_shorttext_b; + while ((j = shorttext.indexOf(seed, j + 1)) != -1) { + var prefixLength = diff_commonPrefix( + longtext.substring(i), + shorttext.substring(j), + ); + var suffixLength = diff_commonSuffix( + longtext.substring(0, i), + shorttext.substring(0, j), + ); + if (best_common.length < suffixLength + prefixLength) { + best_common = + shorttext.substring(j - suffixLength, j) + + shorttext.substring(j, j + prefixLength); + best_longtext_a = longtext.substring(0, i - suffixLength); + best_longtext_b = longtext.substring(i + prefixLength); + best_shorttext_a = shorttext.substring(0, j - suffixLength); + best_shorttext_b = shorttext.substring(j + prefixLength); + } + } + if (best_common.length * 2 >= longtext.length) { + return [ + best_longtext_a, + best_longtext_b, + best_shorttext_a, + best_shorttext_b, + best_common, + ]; + } else { + return null; + } + } + + // First check if the second quarter is the seed for a half-match. + var hm1 = diff_halfMatchI_( + longtext, + shorttext, + Math.ceil(longtext.length / 4), + ); + // Check again based on the third quarter. + var hm2 = diff_halfMatchI_( + longtext, + shorttext, + Math.ceil(longtext.length / 2), + ); + var hm; + if (!hm1 && !hm2) { + return null; + } else if (!hm2) { + hm = hm1; + } else if (!hm1) { + hm = hm2; + } else { + // Both matched. Select the longest. + hm = hm1[4].length > hm2[4].length ? hm1 : hm2; + } + + // A half-match was found, sort out the return data. + var text1_a, text1_b, text2_a, text2_b; + if (text1.length > text2.length) { + text1_a = hm[0]; + text1_b = hm[1]; + text2_a = hm[2]; + text2_b = hm[3]; + } else { + text2_a = hm[0]; + text2_b = hm[1]; + text1_a = hm[2]; + text1_b = hm[3]; + } + var mid_common = hm[4]; + return [text1_a, text1_b, text2_a, text2_b, mid_common]; + } + + /** + * Reorder and merge like edit sections. Merge equalities. + * Any edit section can move as long as it doesn't cross an equality. + * @param {Array} diffs Array of diff tuples. + */ + function diff_cleanupMerge(diffs) { + diffs.push([DIFF_EQUAL, '']); // Add a dummy entry at the end. + var pointer = 0; + var count_delete = 0; + var count_insert = 0; + var text_delete = ''; + var text_insert = ''; + var commonlength; + while (pointer < diffs.length) { + switch (diffs[pointer][0]) { + case DIFF_INSERT: + count_insert++; + text_insert += diffs[pointer][1]; + pointer++; + break; + case DIFF_DELETE: + count_delete++; + text_delete += diffs[pointer][1]; + pointer++; + break; + case DIFF_EQUAL: + // Upon reaching an equality, check for prior redundancies. + if (count_delete + count_insert > 1) { + if (count_delete !== 0 && count_insert !== 0) { + // Factor out any common prefixies. + commonlength = diff_commonPrefix(text_insert, text_delete); + if (commonlength !== 0) { + if ( + pointer - count_delete - count_insert > 0 && + diffs[pointer - count_delete - count_insert - 1][0] == + DIFF_EQUAL + ) { + diffs[pointer - count_delete - count_insert - 1][1] += + text_insert.substring(0, commonlength); + } else { + diffs.splice(0, 0, [ + DIFF_EQUAL, + text_insert.substring(0, commonlength), + ]); + pointer++; + } + text_insert = text_insert.substring(commonlength); + text_delete = text_delete.substring(commonlength); + } + // Factor out any common suffixies. + commonlength = diff_commonSuffix(text_insert, text_delete); + if (commonlength !== 0) { + diffs[pointer][1] = + text_insert.substring( + text_insert.length - commonlength, + ) + diffs[pointer][1]; + text_insert = text_insert.substring( + 0, + text_insert.length - commonlength, + ); + text_delete = text_delete.substring( + 0, + text_delete.length - commonlength, + ); + } + } + // Delete the offending records and add the merged ones. + if (count_delete === 0) { + diffs.splice( + pointer - count_insert, + count_delete + count_insert, + [DIFF_INSERT, text_insert], + ); + } else if (count_insert === 0) { + diffs.splice( + pointer - count_delete, + count_delete + count_insert, + [DIFF_DELETE, text_delete], + ); + } else { + diffs.splice( + pointer - count_delete - count_insert, + count_delete + count_insert, + [DIFF_DELETE, text_delete], + [DIFF_INSERT, text_insert], + ); + } + pointer = + pointer - + count_delete - + count_insert + + (count_delete ? 1 : 0) + + (count_insert ? 1 : 0) + + 1; + } else if ( + pointer !== 0 && + diffs[pointer - 1][0] == DIFF_EQUAL + ) { + // Merge this equality with the previous one. + diffs[pointer - 1][1] += diffs[pointer][1]; + diffs.splice(pointer, 1); + } else { + pointer++; + } + count_insert = 0; + count_delete = 0; + text_delete = ''; + text_insert = ''; + break; + } + } + if (diffs[diffs.length - 1][1] === '') { + diffs.pop(); // Remove the dummy entry at the end. + } + + // Second pass: look for single edits surrounded on both sides by equalities + // which can be shifted sideways to eliminate an equality. + // e.g: ABAC -> ABAC + var changes = false; + pointer = 1; + // Intentionally ignore the first and last element (don't need checking). + while (pointer < diffs.length - 1) { + if ( + diffs[pointer - 1][0] == DIFF_EQUAL && + diffs[pointer + 1][0] == DIFF_EQUAL + ) { + // This is a single edit surrounded by equalities. + if ( + diffs[pointer][1].substring( + diffs[pointer][1].length - diffs[pointer - 1][1].length, + ) == diffs[pointer - 1][1] + ) { + // Shift the edit over the previous equality. + diffs[pointer][1] = + diffs[pointer - 1][1] + + diffs[pointer][1].substring( + 0, + diffs[pointer][1].length - diffs[pointer - 1][1].length, + ); + diffs[pointer + 1][1] = + diffs[pointer - 1][1] + diffs[pointer + 1][1]; + diffs.splice(pointer - 1, 1); + changes = true; + } else if ( + diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) == + diffs[pointer + 1][1] + ) { + // Shift the edit over the next equality. + diffs[pointer - 1][1] += diffs[pointer + 1][1]; + diffs[pointer][1] = + diffs[pointer][1].substring(diffs[pointer + 1][1].length) + + diffs[pointer + 1][1]; + diffs.splice(pointer + 1, 1); + changes = true; + } + } + pointer++; + } + // If shifts were made, the diff needs reordering and another shift sweep. + if (changes) { + diff_cleanupMerge(diffs); + } + } + + var diff = diff_main; + diff.INSERT = DIFF_INSERT; + diff.DELETE = DIFF_DELETE; + diff.EQUAL = DIFF_EQUAL; + + module.exports = diff; + + /* + * Modify a diff such that the cursor position points to the start of a change: + * E.g. + * cursor_normalize_diff([[DIFF_EQUAL, 'abc']], 1) + * => [1, [[DIFF_EQUAL, 'a'], [DIFF_EQUAL, 'bc']]] + * cursor_normalize_diff([[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xyz']], 2) + * => [2, [[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xy'], [DIFF_DELETE, 'z']]] + * + * @param {Array} diffs Array of diff tuples + * @param {Int} cursor_pos Suggested edit position. Must not be out of bounds! + * @return {Array} A tuple [cursor location in the modified diff, modified diff] + */ + function cursor_normalize_diff(diffs, cursor_pos) { + if (cursor_pos === 0) { + return [DIFF_EQUAL, diffs]; + } + for (var current_pos = 0, i = 0; i < diffs.length; i++) { + var d = diffs[i]; + if (d[0] === DIFF_DELETE || d[0] === DIFF_EQUAL) { + var next_pos = current_pos + d[1].length; + if (cursor_pos === next_pos) { + return [i + 1, diffs]; + } else if (cursor_pos < next_pos) { + // copy to prevent side effects + diffs = diffs.slice(); + // split d into two diff changes + var split_pos = cursor_pos - current_pos; + var d_left = [d[0], d[1].slice(0, split_pos)]; + var d_right = [d[0], d[1].slice(split_pos)]; + diffs.splice(i, 1, d_left, d_right); + return [i + 1, diffs]; + } else { + current_pos = next_pos; + } + } + } + throw new Error('cursor_pos is out of bounds!'); + } + + /* + * Modify a diff such that the edit position is "shifted" to the proposed edit location (cursor_position). + * + * Case 1) + * Check if a naive shift is possible: + * [0, X], [ 1, Y] -> [ 1, Y], [0, X] (if X + Y === Y + X) + * [0, X], [-1, Y] -> [-1, Y], [0, X] (if X + Y === Y + X) - holds same result + * Case 2) + * Check if the following shifts are possible: + * [0, 'pre'], [ 1, 'prefix'] -> [ 1, 'pre'], [0, 'pre'], [ 1, 'fix'] + * [0, 'pre'], [-1, 'prefix'] -> [-1, 'pre'], [0, 'pre'], [-1, 'fix'] + * ^ ^ + * d d_next + * + * @param {Array} diffs Array of diff tuples + * @param {Int} cursor_pos Suggested edit position. Must not be out of bounds! + * @return {Array} Array of diff tuples + */ + function fix_cursor(diffs, cursor_pos) { + var norm = cursor_normalize_diff(diffs, cursor_pos); + var ndiffs = norm[1]; + var cursor_pointer = norm[0]; + var d = ndiffs[cursor_pointer]; + var d_next = ndiffs[cursor_pointer + 1]; + + if (d == null) { + // Text was deleted from end of original string, + // cursor is now out of bounds in new string + return diffs; + } else if (d[0] !== DIFF_EQUAL) { + // A modification happened at the cursor location. + // This is the expected outcome, so we can return the original diff. + return diffs; + } else { + if (d_next != null && d[1] + d_next[1] === d_next[1] + d[1]) { + // Case 1) + // It is possible to perform a naive shift + ndiffs.splice(cursor_pointer, 2, d_next, d); + return merge_tuples(ndiffs, cursor_pointer, 2); + } else if (d_next != null && d_next[1].indexOf(d[1]) === 0) { + // Case 2) + // d[1] is a prefix of d_next[1] + // We can assume that d_next[0] !== 0, since d[0] === 0 + // Shift edit locations.. + ndiffs.splice(cursor_pointer, 2, [d_next[0], d[1]], [0, d[1]]); + var suffix = d_next[1].slice(d[1].length); + if (suffix.length > 0) { + ndiffs.splice(cursor_pointer + 2, 0, [d_next[0], suffix]); + } + return merge_tuples(ndiffs, cursor_pointer, 3); + } else { + // Not possible to perform any modification + return diffs; + } + } + } + + /* + * Check diff did not split surrogate pairs. + * Ex. [0, '\uD83D'], [-1, '\uDC36'], [1, '\uDC2F'] -> [-1, '\uD83D\uDC36'], [1, '\uD83D\uDC2F'] + * '\uD83D\uDC36' === '🐶', '\uD83D\uDC2F' === '🐯' + * + * @param {Array} diffs Array of diff tuples + * @return {Array} Array of diff tuples + */ + function fix_emoji(diffs) { + var compact = false; + var starts_with_pair_end = function (str) { + return str.charCodeAt(0) >= 0xdc00 && str.charCodeAt(0) <= 0xdfff; + }; + var ends_with_pair_start = function (str) { + return ( + str.charCodeAt(str.length - 1) >= 0xd800 && + str.charCodeAt(str.length - 1) <= 0xdbff + ); + }; + for (var i = 2; i < diffs.length; i += 1) { + if ( + diffs[i - 2][0] === DIFF_EQUAL && + ends_with_pair_start(diffs[i - 2][1]) && + diffs[i - 1][0] === DIFF_DELETE && + starts_with_pair_end(diffs[i - 1][1]) && + diffs[i][0] === DIFF_INSERT && + starts_with_pair_end(diffs[i][1]) + ) { + compact = true; + + diffs[i - 1][1] = diffs[i - 2][1].slice(-1) + diffs[i - 1][1]; + diffs[i][1] = diffs[i - 2][1].slice(-1) + diffs[i][1]; + + diffs[i - 2][1] = diffs[i - 2][1].slice(0, -1); + } + } + if (!compact) { + return diffs; + } + var fixed_diffs = []; + for (var i = 0; i < diffs.length; i += 1) { + if (diffs[i][1].length > 0) { + fixed_diffs.push(diffs[i]); + } + } + return fixed_diffs; + } + + /* + * Try to merge tuples with their neigbors in a given range. + * E.g. [0, 'a'], [0, 'b'] -> [0, 'ab'] + * + * @param {Array} diffs Array of diff tuples. + * @param {Int} start Position of the first element to merge (diffs[start] is also merged with diffs[start - 1]). + * @param {Int} length Number of consecutive elements to check. + * @return {Array} Array of merged diff tuples. + */ + function merge_tuples(diffs, start, length) { + // Check from (start-1) to (start+length). + for (var i = start + length - 1; i >= 0 && i >= start - 1; i--) { + if (i + 1 < diffs.length) { + var left_d = diffs[i]; + var right_d = diffs[i + 1]; + if (left_d[0] === right_d[1]) { + diffs.splice(i, 2, [left_d[0], left_d[1] + right_d[1]]); + } + } + } + return diffs; + } + + /***/ + }, + /* 52 */ + /***/ function (module, exports) { + exports = module.exports = + typeof Object.keys === 'function' ? Object.keys : shim; + + exports.shim = shim; + function shim(obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; + } + + /***/ + }, + /* 53 */ + /***/ function (module, exports) { + var supportsArgumentsClass = + (function () { + return Object.prototype.toString.call(arguments); + })() == '[object Arguments]'; + + exports = module.exports = supportsArgumentsClass + ? supported + : unsupported; + + exports.supported = supported; + function supported(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; + } + + exports.unsupported = unsupported; + function unsupported(object) { + return ( + (object && + typeof object == 'object' && + typeof object.length == 'number' && + Object.prototype.hasOwnProperty.call(object, 'callee') && + !Object.prototype.propertyIsEnumerable.call(object, 'callee')) || + false + ); + } + + /***/ + }, + /* 54 */ + /***/ function (module, exports) { + 'use strict'; + + var has = Object.prototype.hasOwnProperty, + prefix = '~'; + + /** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @api private + */ + function Events() {} + + // + // We try to not inherit from `Object.prototype`. In some engines creating an + // instance in this way is faster than calling `Object.create(null)` directly. + // If `Object.create(null)` is not supported we prefix the event names with a + // character to make sure that the built-in object properties are not + // overridden or used as an attack vector. + // + if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; + } + + /** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {Mixed} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @api private + */ + function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; + } + + /** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @api public + */ + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + + /** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @api public + */ + EventEmitter.prototype.eventNames = function eventNames() { + var names = [], + events, + name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) + names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; + }; + + /** + * Return the listeners registered for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Boolean} exists Only check if there are listeners. + * @returns {Array|Boolean} + * @api public + */ + EventEmitter.prototype.listeners = function listeners(event, exists) { + var evt = prefix ? prefix + event : event, + available = this._events[evt]; + + if (exists) return !!available; + if (!available) return []; + if (available.fn) return [available.fn]; + + for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) { + ee[i] = available[i].fn; + } + + return ee; + }; + + /** + * Calls each of the listeners registered for a given event. + * + * @param {String|Symbol} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @api public + */ + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt], + len = arguments.length, + args, + i; + + if (listeners.fn) { + if (listeners.once) + this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: + return listeners.fn.call(listeners.context), true; + case 2: + return listeners.fn.call(listeners.context, a1), true; + case 3: + return listeners.fn.call(listeners.context, a1, a2), true; + case 4: + return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: + return ( + listeners.fn.call(listeners.context, a1, a2, a3, a4), true + ); + case 6: + return ( + listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true + ); + } + + for (i = 1, args = new Array(len - 1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length, + j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) + this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: + listeners[i].fn.call(listeners[i].context); + break; + case 2: + listeners[i].fn.call(listeners[i].context, a1); + break; + case 3: + listeners[i].fn.call(listeners[i].context, a1, a2); + break; + case 4: + listeners[i].fn.call(listeners[i].context, a1, a2, a3); + break; + default: + if (!args) + for (j = 1, args = new Array(len - 1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; + }; + + /** + * Add a listener for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn The listener function. + * @param {Mixed} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.on = function on(event, fn, context) { + var listener = new EE(fn, context || this), + evt = prefix ? prefix + event : event; + + if (!this._events[evt]) + (this._events[evt] = listener), this._eventsCount++; + else if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [this._events[evt], listener]; + + return this; + }; + + /** + * Add a one-time listener for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn The listener function. + * @param {Mixed} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.once = function once(event, fn, context) { + var listener = new EE(fn, context || this, true), + evt = prefix ? prefix + event : event; + + if (!this._events[evt]) + (this._events[evt] = listener), this._eventsCount++; + else if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [this._events[evt], listener]; + + return this; + }; + + /** + * Remove the listeners of a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {Mixed} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.removeListener = function removeListener( + event, + fn, + context, + once, + ) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn && + (!once || listeners.once) && + (!context || listeners.context === context) + ) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + } else { + for ( + var i = 0, events = [], length = listeners.length; + i < length; + i++ + ) { + if ( + listeners[i].fn !== fn || + (once && !listeners[i].once) || + (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) + this._events[evt] = events.length === 1 ? events[0] : events; + else if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + + return this; + }; + + /** + * Remove all listeners, or those of the specified event. + * + * @param {String|Symbol} [event] The event name. + * @returns {EventEmitter} `this`. + * @api public + */ + EventEmitter.prototype.removeAllListeners = function removeAllListeners( + event, + ) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; + }; + + // + // Alias methods names because people roll like that. + // + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + + // + // This function doesn't apply anymore. + // + EventEmitter.prototype.setMaxListeners = function setMaxListeners() { + return this; + }; + + // + // Expose the prefix. + // + EventEmitter.prefixed = prefix; + + // + // Allow `EventEmitter` to be imported as module namespace. + // + EventEmitter.EventEmitter = EventEmitter; + + // + // Expose the module. + // + if ('undefined' !== typeof module) { + module.exports = EventEmitter; + } + + /***/ + }, + /* 55 */ + /***/ function (module, exports, __nested_webpack_require_432304__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.matchText = + exports.matchSpacing = + exports.matchNewline = + exports.matchBlot = + exports.matchAttributor = + exports.default = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for ( + var _i = arr[Symbol.iterator](), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance', + ); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _extend2 = __nested_webpack_require_432304__(3); + + var _extend3 = _interopRequireDefault(_extend2); + + var _quillDelta = __nested_webpack_require_432304__(2); + + var _quillDelta2 = _interopRequireDefault(_quillDelta); + + var _parchment = __nested_webpack_require_432304__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _quill = __nested_webpack_require_432304__(5); + + var _quill2 = _interopRequireDefault(_quill); + + var _logger = __nested_webpack_require_432304__(10); + + var _logger2 = _interopRequireDefault(_logger); + + var _module = __nested_webpack_require_432304__(9); + + var _module2 = _interopRequireDefault(_module); + + var _align = __nested_webpack_require_432304__(36); + + var _background = __nested_webpack_require_432304__(37); + + var _code = __nested_webpack_require_432304__(13); + + var _code2 = _interopRequireDefault(_code); + + var _color = __nested_webpack_require_432304__(26); + + var _direction = __nested_webpack_require_432304__(38); + + var _font = __nested_webpack_require_432304__(39); + + var _size = __nested_webpack_require_432304__(40); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var debug = (0, _logger2.default)('quill:clipboard'); + + var DOM_KEY = '__ql-matcher'; + + var CLIPBOARD_CONFIG = [ + [Node.TEXT_NODE, matchText], + [Node.TEXT_NODE, matchNewline], + ['br', matchBreak], + [Node.ELEMENT_NODE, matchNewline], + [Node.ELEMENT_NODE, matchBlot], + [Node.ELEMENT_NODE, matchSpacing], + [Node.ELEMENT_NODE, matchAttributor], + [Node.ELEMENT_NODE, matchStyles], + ['li', matchIndent], + ['b', matchAlias.bind(matchAlias, 'bold')], + ['i', matchAlias.bind(matchAlias, 'italic')], + ['style', matchIgnore], + ]; + + var ATTRIBUTE_ATTRIBUTORS = [ + _align.AlignAttribute, + _direction.DirectionAttribute, + ].reduce(function (memo, attr) { + memo[attr.keyName] = attr; + return memo; + }, {}); + + var STYLE_ATTRIBUTORS = [ + _align.AlignStyle, + _background.BackgroundStyle, + _color.ColorStyle, + _direction.DirectionStyle, + _font.FontStyle, + _size.SizeStyle, + ].reduce(function (memo, attr) { + memo[attr.keyName] = attr; + return memo; + }, {}); + + var Clipboard = (function (_Module) { + _inherits(Clipboard, _Module); + + function Clipboard(quill, options) { + _classCallCheck(this, Clipboard); + + var _this = _possibleConstructorReturn( + this, + (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call( + this, + quill, + options, + ), + ); + + _this.quill.root.addEventListener( + 'paste', + _this.onPaste.bind(_this), + ); + _this.container = _this.quill.addContainer('ql-clipboard'); + _this.container.setAttribute('contenteditable', true); + _this.container.setAttribute('tabindex', -1); + _this.matchers = []; + CLIPBOARD_CONFIG.concat(_this.options.matchers).forEach(function ( + _ref, + ) { + var _ref2 = _slicedToArray(_ref, 2), + selector = _ref2[0], + matcher = _ref2[1]; + + if (!options.matchVisual && matcher === matchSpacing) return; + _this.addMatcher(selector, matcher); + }); + return _this; + } + + _createClass(Clipboard, [ + { + key: 'addMatcher', + value: function addMatcher(selector, matcher) { + this.matchers.push([selector, matcher]); + }, + }, + { + key: 'convert', + value: function convert(html) { + if (typeof html === 'string') { + this.container.innerHTML = html.replace(/\>\r?\n +\<'); // Remove spaces between tags + return this.convert(); + } + var formats = this.quill.getFormat( + this.quill.selection.savedRange.index, + ); + if (formats[_code2.default.blotName]) { + var text = this.container.innerText; + this.container.innerHTML = ''; + return new _quillDelta2.default().insert( + text, + _defineProperty( + {}, + _code2.default.blotName, + formats[_code2.default.blotName], + ), + ); + } + + var _prepareMatching = this.prepareMatching(), + _prepareMatching2 = _slicedToArray(_prepareMatching, 2), + elementMatchers = _prepareMatching2[0], + textMatchers = _prepareMatching2[1]; + + var delta = traverse( + this.container, + elementMatchers, + textMatchers, + ); + // Remove trailing newline + if ( + deltaEndsWith(delta, '\n') && + delta.ops[delta.ops.length - 1].attributes == null + ) { + delta = delta.compose( + new _quillDelta2.default() + .retain(delta.length() - 1) + .delete(1), + ); + } + debug.log('convert', this.container.innerHTML, delta); + this.container.innerHTML = ''; + return delta; + }, + }, + { + key: 'dangerouslyPasteHTML', + value: function dangerouslyPasteHTML(index, html) { + var source = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : _quill2.default.sources.API; + + if (typeof index === 'string') { + this.quill.setContents(this.convert(index), html); + this.quill.setSelection(0, _quill2.default.sources.SILENT); + } else { + var paste = this.convert(html); + this.quill.updateContents( + new _quillDelta2.default().retain(index).concat(paste), + source, + ); + this.quill.setSelection( + index + paste.length(), + _quill2.default.sources.SILENT, + ); + } + }, + }, + { + key: 'onPaste', + value: function onPaste(e) { + var _this2 = this; + + if (e.defaultPrevented || !this.quill.isEnabled()) return; + var range = this.quill.getSelection(); + var delta = new _quillDelta2.default().retain(range.index); + var scrollTop = this.quill.scrollingContainer.scrollTop; + this.container.focus(); + this.quill.selection.update(_quill2.default.sources.SILENT); + setTimeout(function () { + delta = delta.concat(_this2.convert()).delete(range.length); + _this2.quill.updateContents( + delta, + _quill2.default.sources.USER, + ); + // range.length contributes to delta.length() + _this2.quill.setSelection( + delta.length() - range.length, + _quill2.default.sources.SILENT, + ); + _this2.quill.scrollingContainer.scrollTop = scrollTop; + _this2.quill.focus(); + }, 1); + }, + }, + { + key: 'prepareMatching', + value: function prepareMatching() { + var _this3 = this; + + var elementMatchers = [], + textMatchers = []; + this.matchers.forEach(function (pair) { + var _pair = _slicedToArray(pair, 2), + selector = _pair[0], + matcher = _pair[1]; + + switch (selector) { + case Node.TEXT_NODE: + textMatchers.push(matcher); + break; + case Node.ELEMENT_NODE: + elementMatchers.push(matcher); + break; + default: + [].forEach.call( + _this3.container.querySelectorAll(selector), + function (node) { + // TODO use weakmap + node[DOM_KEY] = node[DOM_KEY] || []; + node[DOM_KEY].push(matcher); + }, + ); + break; + } + }); + return [elementMatchers, textMatchers]; + }, + }, + ]); + + return Clipboard; + })(_module2.default); + + Clipboard.DEFAULTS = { + matchers: [], + matchVisual: true, + }; + + function applyFormat(delta, format, value) { + if ( + (typeof format === 'undefined' ? 'undefined' : _typeof(format)) === + 'object' + ) { + return Object.keys(format).reduce(function (delta, key) { + return applyFormat(delta, key, format[key]); + }, delta); + } else { + return delta.reduce(function (delta, op) { + if (op.attributes && op.attributes[format]) { + return delta.push(op); + } else { + return delta.insert( + op.insert, + (0, _extend3.default)( + {}, + _defineProperty({}, format, value), + op.attributes, + ), + ); + } + }, new _quillDelta2.default()); + } + } + + function computeStyle(node) { + if (node.nodeType !== Node.ELEMENT_NODE) return {}; + var DOM_KEY = '__ql-computed-style'; + return ( + node[DOM_KEY] || (node[DOM_KEY] = window.getComputedStyle(node)) + ); + } + + function deltaEndsWith(delta, text) { + var endText = ''; + for ( + var i = delta.ops.length - 1; + i >= 0 && endText.length < text.length; + --i + ) { + var op = delta.ops[i]; + if (typeof op.insert !== 'string') break; + endText = op.insert + endText; + } + return endText.slice(-1 * text.length) === text; + } + + function isLine(node) { + if (node.childNodes.length === 0) return false; // Exclude embed blocks + var style = computeStyle(node); + return ['block', 'list-item'].indexOf(style.display) > -1; + } + + function traverse(node, elementMatchers, textMatchers) { + // Post-order + if (node.nodeType === node.TEXT_NODE) { + return textMatchers.reduce(function (delta, matcher) { + return matcher(node, delta); + }, new _quillDelta2.default()); + } else if (node.nodeType === node.ELEMENT_NODE) { + return [].reduce.call( + node.childNodes || [], + function (delta, childNode) { + var childrenDelta = traverse( + childNode, + elementMatchers, + textMatchers, + ); + if (childNode.nodeType === node.ELEMENT_NODE) { + childrenDelta = elementMatchers.reduce(function ( + childrenDelta, + matcher, + ) { + return matcher(childNode, childrenDelta); + }, + childrenDelta); + childrenDelta = (childNode[DOM_KEY] || []).reduce(function ( + childrenDelta, + matcher, + ) { + return matcher(childNode, childrenDelta); + }, + childrenDelta); + } + return delta.concat(childrenDelta); + }, + new _quillDelta2.default(), + ); + } else { + return new _quillDelta2.default(); + } + } + + function matchAlias(format, node, delta) { + return applyFormat(delta, format, true); + } + + function matchAttributor(node, delta) { + var attributes = _parchment2.default.Attributor.Attribute.keys(node); + var classes = _parchment2.default.Attributor.Class.keys(node); + var styles = _parchment2.default.Attributor.Style.keys(node); + var formats = {}; + attributes + .concat(classes) + .concat(styles) + .forEach(function (name) { + var attr = _parchment2.default.query( + name, + _parchment2.default.Scope.ATTRIBUTE, + ); + if (attr != null) { + formats[attr.attrName] = attr.value(node); + if (formats[attr.attrName]) return; + } + attr = ATTRIBUTE_ATTRIBUTORS[name]; + if ( + attr != null && + (attr.attrName === name || attr.keyName === name) + ) { + formats[attr.attrName] = attr.value(node) || undefined; + } + attr = STYLE_ATTRIBUTORS[name]; + if ( + attr != null && + (attr.attrName === name || attr.keyName === name) + ) { + attr = STYLE_ATTRIBUTORS[name]; + formats[attr.attrName] = attr.value(node) || undefined; + } + }); + if (Object.keys(formats).length > 0) { + delta = applyFormat(delta, formats); + } + return delta; + } + + function matchBlot(node, delta) { + var match = _parchment2.default.query(node); + if (match == null) return delta; + if (match.prototype instanceof _parchment2.default.Embed) { + var embed = {}; + var value = match.value(node); + if (value != null) { + embed[match.blotName] = value; + delta = new _quillDelta2.default().insert( + embed, + match.formats(node), + ); + } + } else if (typeof match.formats === 'function') { + delta = applyFormat(delta, match.blotName, match.formats(node)); + } + return delta; + } + + function matchBreak(node, delta) { + if (!deltaEndsWith(delta, '\n')) { + delta.insert('\n'); + } + return delta; + } + + function matchIgnore() { + return new _quillDelta2.default(); + } + + function matchIndent(node, delta) { + var match = _parchment2.default.query(node); + if ( + match == null || + match.blotName !== 'list-item' || + !deltaEndsWith(delta, '\n') + ) { + return delta; + } + var indent = -1, + parent = node.parentNode; + while (!parent.classList.contains('ql-clipboard')) { + if ((_parchment2.default.query(parent) || {}).blotName === 'list') { + indent += 1; + } + parent = parent.parentNode; + } + if (indent <= 0) return delta; + return delta.compose( + new _quillDelta2.default() + .retain(delta.length() - 1) + .retain(1, {indent: indent}), + ); + } + + function matchNewline(node, delta) { + if (!deltaEndsWith(delta, '\n')) { + if ( + isLine(node) || + (delta.length() > 0 && + node.nextSibling && + isLine(node.nextSibling)) + ) { + delta.insert('\n'); + } + } + return delta; + } + + function matchSpacing(node, delta) { + if ( + isLine(node) && + node.nextElementSibling != null && + !deltaEndsWith(delta, '\n\n') + ) { + var nodeHeight = + node.offsetHeight + + parseFloat(computeStyle(node).marginTop) + + parseFloat(computeStyle(node).marginBottom); + if ( + node.nextElementSibling.offsetTop > + node.offsetTop + nodeHeight * 1.5 + ) { + delta.insert('\n'); + } + } + return delta; + } + + function matchStyles(node, delta) { + var formats = {}; + var style = node.style || {}; + if (style.fontStyle && computeStyle(node).fontStyle === 'italic') { + formats.italic = true; + } + if ( + style.fontWeight && + (computeStyle(node).fontWeight.startsWith('bold') || + parseInt(computeStyle(node).fontWeight) >= 700) + ) { + formats.bold = true; + } + if (Object.keys(formats).length > 0) { + delta = applyFormat(delta, formats); + } + if (parseFloat(style.textIndent || 0) > 0) { + // Could be 0.5in + delta = new _quillDelta2.default().insert('\t').concat(delta); + } + return delta; + } + + function matchText(node, delta) { + var text = node.data; + // Word represents empty line with   + if (node.parentNode.tagName === 'O:P') { + return delta.insert(text.trim()); + } + if ( + text.trim().length === 0 && + node.parentNode.classList.contains('ql-clipboard') + ) { + return delta; + } + if (!computeStyle(node.parentNode).whiteSpace.startsWith('pre')) { + // eslint-disable-next-line func-style + var replacer = function replacer(collapse, match) { + match = match.replace(/[^\u00a0]/g, ''); // \u00a0 is nbsp; + return match.length < 1 && collapse ? ' ' : match; + }; + text = text.replace(/\r\n/g, ' ').replace(/\n/g, ' '); + text = text.replace(/\s\s+/g, replacer.bind(replacer, true)); // collapse whitespace + if ( + (node.previousSibling == null && isLine(node.parentNode)) || + (node.previousSibling != null && isLine(node.previousSibling)) + ) { + text = text.replace(/^\s+/, replacer.bind(replacer, false)); + } + if ( + (node.nextSibling == null && isLine(node.parentNode)) || + (node.nextSibling != null && isLine(node.nextSibling)) + ) { + text = text.replace(/\s+$/, replacer.bind(replacer, false)); + } + } + return delta.insert(text); + } + + exports.default = Clipboard; + exports.matchAttributor = matchAttributor; + exports.matchBlot = matchBlot; + exports.matchNewline = matchNewline; + exports.matchSpacing = matchSpacing; + exports.matchText = matchText; + + /***/ + }, + /* 56 */ + /***/ function (module, exports, __nested_webpack_require_456301__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _inline = __nested_webpack_require_456301__(6); + + var _inline2 = _interopRequireDefault(_inline); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Bold = (function (_Inline) { + _inherits(Bold, _Inline); + + function Bold() { + _classCallCheck(this, Bold); + + return _possibleConstructorReturn( + this, + (Bold.__proto__ || Object.getPrototypeOf(Bold)).apply( + this, + arguments, + ), + ); + } + + _createClass( + Bold, + [ + { + key: 'optimize', + value: function optimize(context) { + _get( + Bold.prototype.__proto__ || + Object.getPrototypeOf(Bold.prototype), + 'optimize', + this, + ).call(this, context); + if (this.domNode.tagName !== this.statics.tagName[0]) { + this.replaceWith(this.statics.blotName); + } + }, + }, + ], + [ + { + key: 'create', + value: function create() { + return _get( + Bold.__proto__ || Object.getPrototypeOf(Bold), + 'create', + this, + ).call(this); + }, + }, + { + key: 'formats', + value: function formats() { + return true; + }, + }, + ], + ); + + return Bold; + })(_inline2.default); + + Bold.blotName = 'bold'; + Bold.tagName = ['STRONG', 'B']; + + exports.default = Bold; + + /***/ + }, + /* 57 */ + /***/ function (module, exports, __nested_webpack_require_461222__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.addControls = exports.default = undefined; + + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for ( + var _i = arr[Symbol.iterator](), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance', + ); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _quillDelta = __nested_webpack_require_461222__(2); + + var _quillDelta2 = _interopRequireDefault(_quillDelta); + + var _parchment = __nested_webpack_require_461222__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _quill = __nested_webpack_require_461222__(5); + + var _quill2 = _interopRequireDefault(_quill); + + var _logger = __nested_webpack_require_461222__(10); + + var _logger2 = _interopRequireDefault(_logger); + + var _module = __nested_webpack_require_461222__(9); + + var _module2 = _interopRequireDefault(_module); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var debug = (0, _logger2.default)('quill:toolbar'); + + var Toolbar = (function (_Module) { + _inherits(Toolbar, _Module); + + function Toolbar(quill, options) { + _classCallCheck(this, Toolbar); + + var _this = _possibleConstructorReturn( + this, + (Toolbar.__proto__ || Object.getPrototypeOf(Toolbar)).call( + this, + quill, + options, + ), + ); + + if (Array.isArray(_this.options.container)) { + var container = document.createElement('div'); + addControls(container, _this.options.container); + quill.container.parentNode.insertBefore( + container, + quill.container, + ); + _this.container = container; + } else if (typeof _this.options.container === 'string') { + _this.container = document.querySelector(_this.options.container); + } else { + _this.container = _this.options.container; + } + if (!(_this.container instanceof HTMLElement)) { + var _ret; + + return ( + (_ret = debug.error( + 'Container required for toolbar', + _this.options, + )), + _possibleConstructorReturn(_this, _ret) + ); + } + _this.container.classList.add('ql-toolbar'); + _this.controls = []; + _this.handlers = {}; + Object.keys(_this.options.handlers).forEach(function (format) { + _this.addHandler(format, _this.options.handlers[format]); + }); + [].forEach.call( + _this.container.querySelectorAll('button, select'), + function (input) { + _this.attach(input); + }, + ); + _this.quill.on( + _quill2.default.events.EDITOR_CHANGE, + function (type, range) { + if (type === _quill2.default.events.SELECTION_CHANGE) { + _this.update(range); + } + }, + ); + _this.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function () { + var _this$quill$selection = _this.quill.selection.getRange(), + _this$quill$selection2 = _slicedToArray( + _this$quill$selection, + 1, + ), + range = _this$quill$selection2[0]; // quill.getSelection triggers update + + _this.update(range); + }); + return _this; + } + + _createClass(Toolbar, [ + { + key: 'addHandler', + value: function addHandler(format, handler) { + this.handlers[format] = handler; + }, + }, + { + key: 'attach', + value: function attach(input) { + var _this2 = this; + + var format = [].find.call( + input.classList, + function (className) { + return className.indexOf('ql-') === 0; + }, + ); + if (!format) return; + format = format.slice('ql-'.length); + if (input.tagName === 'BUTTON') { + input.setAttribute('type', 'button'); + } + if (this.handlers[format] == null) { + if ( + this.quill.scroll.whitelist != null && + this.quill.scroll.whitelist[format] == null + ) { + debug.warn( + 'ignoring attaching to disabled format', + format, + input, + ); + return; + } + if (_parchment2.default.query(format) == null) { + debug.warn( + 'ignoring attaching to nonexistent format', + format, + input, + ); + return; + } + } + var eventName = input.tagName === 'SELECT' ? 'change' : 'click'; + input.addEventListener(eventName, function (e) { + var value = void 0; + if (input.tagName === 'SELECT') { + if (input.selectedIndex < 0) return; + var selected = input.options[input.selectedIndex]; + if (selected.hasAttribute('selected')) { + value = false; + } else { + value = selected.value || false; + } + } else { + if (input.classList.contains('ql-active')) { + value = false; + } else { + value = input.value || !input.hasAttribute('value'); + } + e.preventDefault(); + } + _this2.quill.focus(); + + var _quill$selection$getR = _this2.quill.selection.getRange(), + _quill$selection$getR2 = _slicedToArray( + _quill$selection$getR, + 1, + ), + range = _quill$selection$getR2[0]; + + if (_this2.handlers[format] != null) { + _this2.handlers[format].call(_this2, value); + } else if ( + _parchment2.default.query(format).prototype instanceof + _parchment2.default.Embed + ) { + value = prompt('Enter ' + format); + if (!value) return; + _this2.quill.updateContents( + new _quillDelta2.default() + .retain(range.index) + .delete(range.length) + .insert(_defineProperty({}, format, value)), + _quill2.default.sources.USER, + ); + } else { + _this2.quill.format( + format, + value, + _quill2.default.sources.USER, + ); + } + _this2.update(range); + }); + // TODO use weakmap + this.controls.push([format, input]); + }, + }, + { + key: 'update', + value: function update(range) { + var formats = range == null ? {} : this.quill.getFormat(range); + this.controls.forEach(function (pair) { + var _pair = _slicedToArray(pair, 2), + format = _pair[0], + input = _pair[1]; + + if (input.tagName === 'SELECT') { + var option = void 0; + if (range == null) { + option = null; + } else if (formats[format] == null) { + option = input.querySelector('option[selected]'); + } else if (!Array.isArray(formats[format])) { + var value = formats[format]; + if (typeof value === 'string') { + value = value.replace(/\"/g, '\\"'); + } + option = input.querySelector( + 'option[value="' + value + '"]', + ); + } + if (option == null) { + input.value = ''; // TODO make configurable? + input.selectedIndex = -1; + } else { + option.selected = true; + } + } else { + if (range == null) { + input.classList.remove('ql-active'); + } else if (input.hasAttribute('value')) { + // both being null should match (default values) + // '1' should match with 1 (headers) + var isActive = + formats[format] === input.getAttribute('value') || + (formats[format] != null && + formats[format].toString() === + input.getAttribute('value')) || + (formats[format] == null && + !input.getAttribute('value')); + input.classList.toggle('ql-active', isActive); + } else { + input.classList.toggle( + 'ql-active', + formats[format] != null, + ); + } + } + }); + }, + }, + ]); + + return Toolbar; + })(_module2.default); + + Toolbar.DEFAULTS = {}; + + function addButton(container, format, value) { + var input = document.createElement('button'); + input.setAttribute('type', 'button'); + input.classList.add('ql-' + format); + if (value != null) { + input.value = value; + } + container.appendChild(input); + } + + function addControls(container, groups) { + if (!Array.isArray(groups[0])) { + groups = [groups]; + } + groups.forEach(function (controls) { + var group = document.createElement('span'); + group.classList.add('ql-formats'); + controls.forEach(function (control) { + if (typeof control === 'string') { + addButton(group, control); + } else { + var format = Object.keys(control)[0]; + var value = control[format]; + if (Array.isArray(value)) { + addSelect(group, format, value); + } else { + addButton(group, format, value); + } + } + }); + container.appendChild(group); + }); + } + + function addSelect(container, format, values) { + var input = document.createElement('select'); + input.classList.add('ql-' + format); + values.forEach(function (value) { + var option = document.createElement('option'); + if (value !== false) { + option.setAttribute('value', value); + } else { + option.setAttribute('selected', 'selected'); + } + input.appendChild(option); + }); + container.appendChild(input); + } + + Toolbar.DEFAULTS = { + container: null, + handlers: { + clean: function clean() { + var _this3 = this; + + var range = this.quill.getSelection(); + if (range == null) return; + if (range.length == 0) { + var formats = this.quill.getFormat(); + Object.keys(formats).forEach(function (name) { + // Clean functionality in existing apps only clean inline formats + if ( + _parchment2.default.query( + name, + _parchment2.default.Scope.INLINE, + ) != null + ) { + _this3.quill.format(name, false); + } + }); + } else { + this.quill.removeFormat(range, _quill2.default.sources.USER); + } + }, + direction: function direction(value) { + var align = this.quill.getFormat()['align']; + if (value === 'rtl' && align == null) { + this.quill.format( + 'align', + 'right', + _quill2.default.sources.USER, + ); + } else if (!value && align === 'right') { + this.quill.format('align', false, _quill2.default.sources.USER); + } + this.quill.format( + 'direction', + value, + _quill2.default.sources.USER, + ); + }, + indent: function indent(value) { + var range = this.quill.getSelection(); + var formats = this.quill.getFormat(range); + var indent = parseInt(formats.indent || 0); + if (value === '+1' || value === '-1') { + var modifier = value === '+1' ? 1 : -1; + if (formats.direction === 'rtl') modifier *= -1; + this.quill.format( + 'indent', + indent + modifier, + _quill2.default.sources.USER, + ); + } + }, + link: function link(value) { + if (value === true) { + value = prompt('Enter link URL:'); + } + this.quill.format('link', value, _quill2.default.sources.USER); + }, + list: function list(value) { + var range = this.quill.getSelection(); + var formats = this.quill.getFormat(range); + if (value === 'check') { + if ( + formats['list'] === 'checked' || + formats['list'] === 'unchecked' + ) { + this.quill.format( + 'list', + false, + _quill2.default.sources.USER, + ); + } else { + this.quill.format( + 'list', + 'unchecked', + _quill2.default.sources.USER, + ); + } + } else { + this.quill.format('list', value, _quill2.default.sources.USER); + } + }, + }, + }; + + exports.default = Toolbar; + exports.addControls = addControls; + + /***/ + }, + /* 58 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 59 */ + /***/ function (module, exports, __nested_webpack_require_480223__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _picker = __nested_webpack_require_480223__(28); + + var _picker2 = _interopRequireDefault(_picker); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var ColorPicker = (function (_Picker) { + _inherits(ColorPicker, _Picker); + + function ColorPicker(select, label) { + _classCallCheck(this, ColorPicker); + + var _this = _possibleConstructorReturn( + this, + ( + ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker) + ).call(this, select), + ); + + _this.label.innerHTML = label; + _this.container.classList.add('ql-color-picker'); + [].slice + .call(_this.container.querySelectorAll('.ql-picker-item'), 0, 7) + .forEach(function (item) { + item.classList.add('ql-primary'); + }); + return _this; + } + + _createClass(ColorPicker, [ + { + key: 'buildItem', + value: function buildItem(option) { + var item = _get( + ColorPicker.prototype.__proto__ || + Object.getPrototypeOf(ColorPicker.prototype), + 'buildItem', + this, + ).call(this, option); + item.style.backgroundColor = option.getAttribute('value') || ''; + return item; + }, + }, + { + key: 'selectItem', + value: function selectItem(item, trigger) { + _get( + ColorPicker.prototype.__proto__ || + Object.getPrototypeOf(ColorPicker.prototype), + 'selectItem', + this, + ).call(this, item, trigger); + var colorLabel = this.label.querySelector('.ql-color-label'); + var value = item ? item.getAttribute('data-value') || '' : ''; + if (colorLabel) { + if (colorLabel.tagName === 'line') { + colorLabel.style.stroke = value; + } else { + colorLabel.style.fill = value; + } + } + }, + }, + ]); + + return ColorPicker; + })(_picker2.default); + + exports.default = ColorPicker; + + /***/ + }, + /* 60 */ + /***/ function (module, exports, __nested_webpack_require_485687__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _picker = __nested_webpack_require_485687__(28); + + var _picker2 = _interopRequireDefault(_picker); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var IconPicker = (function (_Picker) { + _inherits(IconPicker, _Picker); + + function IconPicker(select, icons) { + _classCallCheck(this, IconPicker); + + var _this = _possibleConstructorReturn( + this, + (IconPicker.__proto__ || Object.getPrototypeOf(IconPicker)).call( + this, + select, + ), + ); + + _this.container.classList.add('ql-icon-picker'); + [].forEach.call( + _this.container.querySelectorAll('.ql-picker-item'), + function (item) { + item.innerHTML = icons[item.getAttribute('data-value') || '']; + }, + ); + _this.defaultItem = _this.container.querySelector('.ql-selected'); + _this.selectItem(_this.defaultItem); + return _this; + } + + _createClass(IconPicker, [ + { + key: 'selectItem', + value: function selectItem(item, trigger) { + _get( + IconPicker.prototype.__proto__ || + Object.getPrototypeOf(IconPicker.prototype), + 'selectItem', + this, + ).call(this, item, trigger); + item = item || this.defaultItem; + this.label.innerHTML = item.innerHTML; + }, + }, + ]); + + return IconPicker; + })(_picker2.default); + + exports.default = IconPicker; + + /***/ + }, + /* 61 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var Tooltip = (function () { + function Tooltip(quill, boundsContainer) { + var _this = this; + + _classCallCheck(this, Tooltip); + + this.quill = quill; + this.boundsContainer = boundsContainer || document.body; + this.root = quill.addContainer('ql-tooltip'); + this.root.innerHTML = this.constructor.TEMPLATE; + if (this.quill.root === this.quill.scrollingContainer) { + this.quill.root.addEventListener('scroll', function () { + _this.root.style.marginTop = + -1 * _this.quill.root.scrollTop + 'px'; + }); + } + this.hide(); + } + + _createClass(Tooltip, [ + { + key: 'hide', + value: function hide() { + this.root.classList.add('ql-hidden'); + }, + }, + { + key: 'position', + value: function position(reference) { + var left = + reference.left + + reference.width / 2 - + this.root.offsetWidth / 2; + // root.scrollTop should be 0 if scrollContainer !== root + var top = reference.bottom + this.quill.root.scrollTop; + this.root.style.left = left + 'px'; + this.root.style.top = top + 'px'; + this.root.classList.remove('ql-flip'); + var containerBounds = + this.boundsContainer.getBoundingClientRect(); + var rootBounds = this.root.getBoundingClientRect(); + var shift = 0; + if (rootBounds.right > containerBounds.right) { + shift = containerBounds.right - rootBounds.right; + this.root.style.left = left + shift + 'px'; + } + if (rootBounds.left < containerBounds.left) { + shift = containerBounds.left - rootBounds.left; + this.root.style.left = left + shift + 'px'; + } + if (rootBounds.bottom > containerBounds.bottom) { + var height = rootBounds.bottom - rootBounds.top; + var verticalShift = reference.bottom - reference.top + height; + this.root.style.top = top - verticalShift + 'px'; + this.root.classList.add('ql-flip'); + } + return shift; + }, + }, + { + key: 'show', + value: function show() { + this.root.classList.remove('ql-editing'); + this.root.classList.remove('ql-hidden'); + }, + }, + ]); + + return Tooltip; + })(); + + exports.default = Tooltip; + + /***/ + }, + /* 62 */ + /***/ function (module, exports, __nested_webpack_require_494450__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for ( + var _i = arr[Symbol.iterator](), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError( + 'Invalid attempt to destructure non-iterable instance', + ); + } + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _extend = __nested_webpack_require_494450__(3); + + var _extend2 = _interopRequireDefault(_extend); + + var _emitter = __nested_webpack_require_494450__(8); + + var _emitter2 = _interopRequireDefault(_emitter); + + var _base = __nested_webpack_require_494450__(43); + + var _base2 = _interopRequireDefault(_base); + + var _link = __nested_webpack_require_494450__(27); + + var _link2 = _interopRequireDefault(_link); + + var _selection = __nested_webpack_require_494450__(15); + + var _icons = __nested_webpack_require_494450__(41); + + var _icons2 = _interopRequireDefault(_icons); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var TOOLBAR_CONFIG = [ + [{header: ['1', '2', '3', false]}], + ['bold', 'italic', 'underline', 'link'], + [{list: 'ordered'}, {list: 'bullet'}], + ['clean'], + ]; + + var SnowTheme = (function (_BaseTheme) { + _inherits(SnowTheme, _BaseTheme); + + function SnowTheme(quill, options) { + _classCallCheck(this, SnowTheme); + + if ( + options.modules.toolbar != null && + options.modules.toolbar.container == null + ) { + options.modules.toolbar.container = TOOLBAR_CONFIG; + } + + var _this = _possibleConstructorReturn( + this, + (SnowTheme.__proto__ || Object.getPrototypeOf(SnowTheme)).call( + this, + quill, + options, + ), + ); + + _this.quill.container.classList.add('ql-snow'); + return _this; + } + + _createClass(SnowTheme, [ + { + key: 'extendToolbar', + value: function extendToolbar(toolbar) { + toolbar.container.classList.add('ql-snow'); + this.buildButtons( + [].slice.call(toolbar.container.querySelectorAll('button')), + _icons2.default, + ); + this.buildPickers( + [].slice.call(toolbar.container.querySelectorAll('select')), + _icons2.default, + ); + this.tooltip = new SnowTooltip(this.quill, this.options.bounds); + if (toolbar.container.querySelector('.ql-link')) { + this.quill.keyboard.addBinding( + {key: 'K', shortKey: true}, + function (range, context) { + toolbar.handlers['link'].call( + toolbar, + !context.format.link, + ); + }, + ); + } + }, + }, + ]); + + return SnowTheme; + })(_base2.default); + + SnowTheme.DEFAULTS = (0, _extend2.default)( + true, + {}, + _base2.default.DEFAULTS, + { + modules: { + toolbar: { + handlers: { + link: function link(value) { + if (value) { + var range = this.quill.getSelection(); + if (range == null || range.length == 0) return; + var preview = this.quill.getText(range); + if ( + /^\S+@\S+\.\S+$/.test(preview) && + preview.indexOf('mailto:') !== 0 + ) { + preview = 'mailto:' + preview; + } + var tooltip = this.quill.theme.tooltip; + tooltip.edit('link', preview); + } else { + this.quill.format('link', false); + } + }, + }, + }, + }, + }, + ); + + var SnowTooltip = (function (_BaseTooltip) { + _inherits(SnowTooltip, _BaseTooltip); + + function SnowTooltip(quill, bounds) { + _classCallCheck(this, SnowTooltip); + + var _this2 = _possibleConstructorReturn( + this, + ( + SnowTooltip.__proto__ || Object.getPrototypeOf(SnowTooltip) + ).call(this, quill, bounds), + ); + + _this2.preview = _this2.root.querySelector('a.ql-preview'); + return _this2; + } + + _createClass(SnowTooltip, [ + { + key: 'listen', + value: function listen() { + var _this3 = this; + + _get( + SnowTooltip.prototype.__proto__ || + Object.getPrototypeOf(SnowTooltip.prototype), + 'listen', + this, + ).call(this); + this.root + .querySelector('a.ql-action') + .addEventListener('click', function (event) { + if (_this3.root.classList.contains('ql-editing')) { + _this3.save(); + } else { + _this3.edit('link', _this3.preview.textContent); + } + event.preventDefault(); + }); + this.root + .querySelector('a.ql-remove') + .addEventListener('click', function (event) { + if (_this3.linkRange != null) { + var range = _this3.linkRange; + _this3.restoreFocus(); + _this3.quill.formatText( + range, + 'link', + false, + _emitter2.default.sources.USER, + ); + delete _this3.linkRange; + } + event.preventDefault(); + _this3.hide(); + }); + this.quill.on( + _emitter2.default.events.SELECTION_CHANGE, + function (range, oldRange, source) { + if (range == null) return; + if ( + range.length === 0 && + source === _emitter2.default.sources.USER + ) { + var _quill$scroll$descend = + _this3.quill.scroll.descendant( + _link2.default, + range.index, + ), + _quill$scroll$descend2 = _slicedToArray( + _quill$scroll$descend, + 2, + ), + link = _quill$scroll$descend2[0], + offset = _quill$scroll$descend2[1]; + + if (link != null) { + _this3.linkRange = new _selection.Range( + range.index - offset, + link.length(), + ); + var preview = _link2.default.formats(link.domNode); + _this3.preview.textContent = preview; + _this3.preview.setAttribute('href', preview); + _this3.show(); + _this3.position( + _this3.quill.getBounds(_this3.linkRange), + ); + return; + } + } else { + delete _this3.linkRange; + } + _this3.hide(); + }, + ); + }, + }, + { + key: 'show', + value: function show() { + _get( + SnowTooltip.prototype.__proto__ || + Object.getPrototypeOf(SnowTooltip.prototype), + 'show', + this, + ).call(this); + this.root.removeAttribute('data-mode'); + }, + }, + ]); + + return SnowTooltip; + })(_base.BaseTooltip); + + SnowTooltip.TEMPLATE = [ + '', + '', + '', + '', + ].join(''); + + exports.default = SnowTheme; + + /***/ + }, + /* 63 */ + /***/ function (module, exports, __nested_webpack_require_507111__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _core = __nested_webpack_require_507111__(29); + + var _core2 = _interopRequireDefault(_core); + + var _align = __nested_webpack_require_507111__(36); + + var _direction = __nested_webpack_require_507111__(38); + + var _indent = __nested_webpack_require_507111__(64); + + var _blockquote = __nested_webpack_require_507111__(65); + + var _blockquote2 = _interopRequireDefault(_blockquote); + + var _header = __nested_webpack_require_507111__(66); + + var _header2 = _interopRequireDefault(_header); + + var _list = __nested_webpack_require_507111__(67); + + var _list2 = _interopRequireDefault(_list); + + var _background = __nested_webpack_require_507111__(37); + + var _color = __nested_webpack_require_507111__(26); + + var _font = __nested_webpack_require_507111__(39); + + var _size = __nested_webpack_require_507111__(40); + + var _bold = __nested_webpack_require_507111__(56); + + var _bold2 = _interopRequireDefault(_bold); + + var _italic = __nested_webpack_require_507111__(68); + + var _italic2 = _interopRequireDefault(_italic); + + var _link = __nested_webpack_require_507111__(27); + + var _link2 = _interopRequireDefault(_link); + + var _script = __nested_webpack_require_507111__(69); + + var _script2 = _interopRequireDefault(_script); + + var _strike = __nested_webpack_require_507111__(70); + + var _strike2 = _interopRequireDefault(_strike); + + var _underline = __nested_webpack_require_507111__(71); + + var _underline2 = _interopRequireDefault(_underline); + + var _image = __nested_webpack_require_507111__(72); + + var _image2 = _interopRequireDefault(_image); + + var _video = __nested_webpack_require_507111__(73); + + var _video2 = _interopRequireDefault(_video); + + var _code = __nested_webpack_require_507111__(13); + + var _code2 = _interopRequireDefault(_code); + + var _formula = __nested_webpack_require_507111__(74); + + var _formula2 = _interopRequireDefault(_formula); + + var _syntax = __nested_webpack_require_507111__(75); + + var _syntax2 = _interopRequireDefault(_syntax); + + var _toolbar = __nested_webpack_require_507111__(57); + + var _toolbar2 = _interopRequireDefault(_toolbar); + + var _icons = __nested_webpack_require_507111__(41); + + var _icons2 = _interopRequireDefault(_icons); + + var _picker = __nested_webpack_require_507111__(28); + + var _picker2 = _interopRequireDefault(_picker); + + var _colorPicker = __nested_webpack_require_507111__(59); + + var _colorPicker2 = _interopRequireDefault(_colorPicker); + + var _iconPicker = __nested_webpack_require_507111__(60); + + var _iconPicker2 = _interopRequireDefault(_iconPicker); + + var _tooltip = __nested_webpack_require_507111__(61); + + var _tooltip2 = _interopRequireDefault(_tooltip); + + var _bubble = __nested_webpack_require_507111__(108); + + var _bubble2 = _interopRequireDefault(_bubble); + + var _snow = __nested_webpack_require_507111__(62); + + var _snow2 = _interopRequireDefault(_snow); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + _core2.default.register( + { + 'attributors/attribute/direction': _direction.DirectionAttribute, + + 'attributors/class/align': _align.AlignClass, + 'attributors/class/background': _background.BackgroundClass, + 'attributors/class/color': _color.ColorClass, + 'attributors/class/direction': _direction.DirectionClass, + 'attributors/class/font': _font.FontClass, + 'attributors/class/size': _size.SizeClass, + + 'attributors/style/align': _align.AlignStyle, + 'attributors/style/background': _background.BackgroundStyle, + 'attributors/style/color': _color.ColorStyle, + 'attributors/style/direction': _direction.DirectionStyle, + 'attributors/style/font': _font.FontStyle, + 'attributors/style/size': _size.SizeStyle, + }, + true, + ); + + _core2.default.register( + { + 'formats/align': _align.AlignClass, + 'formats/direction': _direction.DirectionClass, + 'formats/indent': _indent.IndentClass, + + 'formats/background': _background.BackgroundStyle, + 'formats/color': _color.ColorStyle, + 'formats/font': _font.FontClass, + 'formats/size': _size.SizeClass, + + 'formats/blockquote': _blockquote2.default, + 'formats/code-block': _code2.default, + 'formats/header': _header2.default, + 'formats/list': _list2.default, + + 'formats/bold': _bold2.default, + 'formats/code': _code.Code, + 'formats/italic': _italic2.default, + 'formats/link': _link2.default, + 'formats/script': _script2.default, + 'formats/strike': _strike2.default, + 'formats/underline': _underline2.default, + + 'formats/image': _image2.default, + 'formats/video': _video2.default, + + 'formats/list/item': _list.ListItem, + + 'modules/formula': _formula2.default, + 'modules/syntax': _syntax2.default, + 'modules/toolbar': _toolbar2.default, + + 'themes/bubble': _bubble2.default, + 'themes/snow': _snow2.default, + + 'ui/icons': _icons2.default, + 'ui/picker': _picker2.default, + 'ui/icon-picker': _iconPicker2.default, + 'ui/color-picker': _colorPicker2.default, + 'ui/tooltip': _tooltip2.default, + }, + true, + ); + + exports.default = _core2.default; + + /***/ + }, + /* 64 */ + /***/ function (module, exports, __nested_webpack_require_512750__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.IndentClass = undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _parchment = __nested_webpack_require_512750__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var IdentAttributor = (function (_Parchment$Attributor) { + _inherits(IdentAttributor, _Parchment$Attributor); + + function IdentAttributor() { + _classCallCheck(this, IdentAttributor); + + return _possibleConstructorReturn( + this, + ( + IdentAttributor.__proto__ || + Object.getPrototypeOf(IdentAttributor) + ).apply(this, arguments), + ); + } + + _createClass(IdentAttributor, [ + { + key: 'add', + value: function add(node, value) { + if (value === '+1' || value === '-1') { + var indent = this.value(node) || 0; + value = value === '+1' ? indent + 1 : indent - 1; + } + if (value === 0) { + this.remove(node); + return true; + } else { + return _get( + IdentAttributor.prototype.__proto__ || + Object.getPrototypeOf(IdentAttributor.prototype), + 'add', + this, + ).call(this, node, value); + } + }, + }, + { + key: 'canAdd', + value: function canAdd(node, value) { + return ( + _get( + IdentAttributor.prototype.__proto__ || + Object.getPrototypeOf(IdentAttributor.prototype), + 'canAdd', + this, + ).call(this, node, value) || + _get( + IdentAttributor.prototype.__proto__ || + Object.getPrototypeOf(IdentAttributor.prototype), + 'canAdd', + this, + ).call(this, node, parseInt(value)) + ); + }, + }, + { + key: 'value', + value: function value(node) { + return ( + parseInt( + _get( + IdentAttributor.prototype.__proto__ || + Object.getPrototypeOf(IdentAttributor.prototype), + 'value', + this, + ).call(this, node), + ) || undefined + ); // Don't return NaN + }, + }, + ]); + + return IdentAttributor; + })(_parchment2.default.Attributor.Class); + + var IndentClass = new IdentAttributor('indent', 'ql-indent', { + scope: _parchment2.default.Scope.BLOCK, + whitelist: [1, 2, 3, 4, 5, 6, 7, 8], + }); + + exports.IndentClass = IndentClass; + + /***/ + }, + /* 65 */ + /***/ function (module, exports, __nested_webpack_require_518832__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _block = __nested_webpack_require_518832__(4); + + var _block2 = _interopRequireDefault(_block); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Blockquote = (function (_Block) { + _inherits(Blockquote, _Block); + + function Blockquote() { + _classCallCheck(this, Blockquote); + + return _possibleConstructorReturn( + this, + (Blockquote.__proto__ || Object.getPrototypeOf(Blockquote)).apply( + this, + arguments, + ), + ); + } + + return Blockquote; + })(_block2.default); + + Blockquote.blotName = 'blockquote'; + Blockquote.tagName = 'blockquote'; + + exports.default = Blockquote; + + /***/ + }, + /* 66 */ + /***/ function (module, exports, __nested_webpack_require_521228__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _block = __nested_webpack_require_521228__(4); + + var _block2 = _interopRequireDefault(_block); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Header = (function (_Block) { + _inherits(Header, _Block); + + function Header() { + _classCallCheck(this, Header); + + return _possibleConstructorReturn( + this, + (Header.__proto__ || Object.getPrototypeOf(Header)).apply( + this, + arguments, + ), + ); + } + + _createClass(Header, null, [ + { + key: 'formats', + value: function formats(domNode) { + return this.tagName.indexOf(domNode.tagName) + 1; + }, + }, + ]); + + return Header; + })(_block2.default); + + Header.blotName = 'header'; + Header.tagName = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6']; + + exports.default = Header; + + /***/ + }, + /* 67 */ + /***/ function (module, exports, __nested_webpack_require_524603__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = exports.ListItem = undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _parchment = __nested_webpack_require_524603__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _block = __nested_webpack_require_524603__(4); + + var _block2 = _interopRequireDefault(_block); + + var _container = __nested_webpack_require_524603__(25); + + var _container2 = _interopRequireDefault(_container); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var ListItem = (function (_Block) { + _inherits(ListItem, _Block); + + function ListItem() { + _classCallCheck(this, ListItem); + + return _possibleConstructorReturn( + this, + (ListItem.__proto__ || Object.getPrototypeOf(ListItem)).apply( + this, + arguments, + ), + ); + } + + _createClass( + ListItem, + [ + { + key: 'format', + value: function format(name, value) { + if (name === List.blotName && !value) { + this.replaceWith( + _parchment2.default.create(this.statics.scope), + ); + } else { + _get( + ListItem.prototype.__proto__ || + Object.getPrototypeOf(ListItem.prototype), + 'format', + this, + ).call(this, name, value); + } + }, + }, + { + key: 'remove', + value: function remove() { + if (this.prev == null && this.next == null) { + this.parent.remove(); + } else { + _get( + ListItem.prototype.__proto__ || + Object.getPrototypeOf(ListItem.prototype), + 'remove', + this, + ).call(this); + } + }, + }, + { + key: 'replaceWith', + value: function replaceWith(name, value) { + this.parent.isolate(this.offset(this.parent), this.length()); + if (name === this.parent.statics.blotName) { + this.parent.replaceWith(name, value); + return this; + } else { + this.parent.unwrap(); + return _get( + ListItem.prototype.__proto__ || + Object.getPrototypeOf(ListItem.prototype), + 'replaceWith', + this, + ).call(this, name, value); + } + }, + }, + ], + [ + { + key: 'formats', + value: function formats(domNode) { + return domNode.tagName === this.tagName + ? undefined + : _get( + ListItem.__proto__ || Object.getPrototypeOf(ListItem), + 'formats', + this, + ).call(this, domNode); + }, + }, + ], + ); + + return ListItem; + })(_block2.default); + + ListItem.blotName = 'list-item'; + ListItem.tagName = 'LI'; + + var List = (function (_Container) { + _inherits(List, _Container); + + _createClass(List, null, [ + { + key: 'create', + value: function create(value) { + var tagName = value === 'ordered' ? 'OL' : 'UL'; + var node = _get( + List.__proto__ || Object.getPrototypeOf(List), + 'create', + this, + ).call(this, tagName); + if (value === 'checked' || value === 'unchecked') { + node.setAttribute('data-checked', value === 'checked'); + } + return node; + }, + }, + { + key: 'formats', + value: function formats(domNode) { + if (domNode.tagName === 'OL') return 'ordered'; + if (domNode.tagName === 'UL') { + if (domNode.hasAttribute('data-checked')) { + return domNode.getAttribute('data-checked') === 'true' + ? 'checked' + : 'unchecked'; + } else { + return 'bullet'; + } + } + return undefined; + }, + }, + ]); + + function List(domNode) { + _classCallCheck(this, List); + + var _this2 = _possibleConstructorReturn( + this, + (List.__proto__ || Object.getPrototypeOf(List)).call( + this, + domNode, + ), + ); + + var listEventHandler = function listEventHandler(e) { + if (e.target.parentNode !== domNode) return; + var format = _this2.statics.formats(domNode); + var blot = _parchment2.default.find(e.target); + if (format === 'checked') { + blot.format('list', 'unchecked'); + } else if (format === 'unchecked') { + blot.format('list', 'checked'); + } + }; + + domNode.addEventListener('touchstart', listEventHandler); + domNode.addEventListener('mousedown', listEventHandler); + return _this2; + } + + _createClass(List, [ + { + key: 'format', + value: function format(name, value) { + if (this.children.length > 0) { + this.children.tail.format(name, value); + } + }, + }, + { + key: 'formats', + value: function formats() { + // We don't inherit from FormatBlot + return _defineProperty( + {}, + this.statics.blotName, + this.statics.formats(this.domNode), + ); + }, + }, + { + key: 'insertBefore', + value: function insertBefore(blot, ref) { + if (blot instanceof ListItem) { + _get( + List.prototype.__proto__ || + Object.getPrototypeOf(List.prototype), + 'insertBefore', + this, + ).call(this, blot, ref); + } else { + var index = ref == null ? this.length() : ref.offset(this); + var after = this.split(index); + after.parent.insertBefore(blot, after); + } + }, + }, + { + key: 'optimize', + value: function optimize(context) { + _get( + List.prototype.__proto__ || + Object.getPrototypeOf(List.prototype), + 'optimize', + this, + ).call(this, context); + var next = this.next; + if ( + next != null && + next.prev === this && + next.statics.blotName === this.statics.blotName && + next.domNode.tagName === this.domNode.tagName && + next.domNode.getAttribute('data-checked') === + this.domNode.getAttribute('data-checked') + ) { + next.moveChildren(this); + next.remove(); + } + }, + }, + { + key: 'replace', + value: function replace(target) { + if (target.statics.blotName !== this.statics.blotName) { + var item = _parchment2.default.create( + this.statics.defaultChild, + ); + target.moveChildren(item); + this.appendChild(item); + } + _get( + List.prototype.__proto__ || + Object.getPrototypeOf(List.prototype), + 'replace', + this, + ).call(this, target); + }, + }, + ]); + + return List; + })(_container2.default); + + List.blotName = 'list'; + List.scope = _parchment2.default.Scope.BLOCK_BLOT; + List.tagName = ['OL', 'UL']; + List.defaultChild = 'list-item'; + List.allowedChildren = [ListItem]; + + exports.ListItem = ListItem; + exports.default = List; + + /***/ + }, + /* 68 */ + /***/ function (module, exports, __nested_webpack_require_536854__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _bold = __nested_webpack_require_536854__(56); + + var _bold2 = _interopRequireDefault(_bold); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Italic = (function (_Bold) { + _inherits(Italic, _Bold); + + function Italic() { + _classCallCheck(this, Italic); + + return _possibleConstructorReturn( + this, + (Italic.__proto__ || Object.getPrototypeOf(Italic)).apply( + this, + arguments, + ), + ); + } + + return Italic; + })(_bold2.default); + + Italic.blotName = 'italic'; + Italic.tagName = ['EM', 'I']; + + exports.default = Italic; + + /***/ + }, + /* 69 */ + /***/ function (module, exports, __nested_webpack_require_539200__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _inline = __nested_webpack_require_539200__(6); + + var _inline2 = _interopRequireDefault(_inline); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Script = (function (_Inline) { + _inherits(Script, _Inline); + + function Script() { + _classCallCheck(this, Script); + + return _possibleConstructorReturn( + this, + (Script.__proto__ || Object.getPrototypeOf(Script)).apply( + this, + arguments, + ), + ); + } + + _createClass(Script, null, [ + { + key: 'create', + value: function create(value) { + if (value === 'super') { + return document.createElement('sup'); + } else if (value === 'sub') { + return document.createElement('sub'); + } else { + return _get( + Script.__proto__ || Object.getPrototypeOf(Script), + 'create', + this, + ).call(this, value); + } + }, + }, + { + key: 'formats', + value: function formats(domNode) { + if (domNode.tagName === 'SUB') return 'sub'; + if (domNode.tagName === 'SUP') return 'super'; + return undefined; + }, + }, + ]); + + return Script; + })(_inline2.default); + + Script.blotName = 'script'; + Script.tagName = ['SUB', 'SUP']; + + exports.default = Script; + + /***/ + }, + /* 70 */ + /***/ function (module, exports, __nested_webpack_require_543930__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _inline = __nested_webpack_require_543930__(6); + + var _inline2 = _interopRequireDefault(_inline); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Strike = (function (_Inline) { + _inherits(Strike, _Inline); + + function Strike() { + _classCallCheck(this, Strike); + + return _possibleConstructorReturn( + this, + (Strike.__proto__ || Object.getPrototypeOf(Strike)).apply( + this, + arguments, + ), + ); + } + + return Strike; + })(_inline2.default); + + Strike.blotName = 'strike'; + Strike.tagName = 'S'; + + exports.default = Strike; + + /***/ + }, + /* 71 */ + /***/ function (module, exports, __nested_webpack_require_546279__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _inline = __nested_webpack_require_546279__(6); + + var _inline2 = _interopRequireDefault(_inline); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Underline = (function (_Inline) { + _inherits(Underline, _Inline); + + function Underline() { + _classCallCheck(this, Underline); + + return _possibleConstructorReturn( + this, + (Underline.__proto__ || Object.getPrototypeOf(Underline)).apply( + this, + arguments, + ), + ); + } + + return Underline; + })(_inline2.default); + + Underline.blotName = 'underline'; + Underline.tagName = 'U'; + + exports.default = Underline; + + /***/ + }, + /* 72 */ + /***/ function (module, exports, __nested_webpack_require_548661__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _parchment = __nested_webpack_require_548661__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _link = __nested_webpack_require_548661__(27); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var ATTRIBUTES = ['alt', 'height', 'width']; + + var Image = (function (_Parchment$Embed) { + _inherits(Image, _Parchment$Embed); + + function Image() { + _classCallCheck(this, Image); + + return _possibleConstructorReturn( + this, + (Image.__proto__ || Object.getPrototypeOf(Image)).apply( + this, + arguments, + ), + ); + } + + _createClass( + Image, + [ + { + key: 'format', + value: function format(name, value) { + if (ATTRIBUTES.indexOf(name) > -1) { + if (value) { + this.domNode.setAttribute(name, value); + } else { + this.domNode.removeAttribute(name); + } + } else { + _get( + Image.prototype.__proto__ || + Object.getPrototypeOf(Image.prototype), + 'format', + this, + ).call(this, name, value); + } + }, + }, + ], + [ + { + key: 'create', + value: function create(value) { + var node = _get( + Image.__proto__ || Object.getPrototypeOf(Image), + 'create', + this, + ).call(this, value); + if (typeof value === 'string') { + node.setAttribute('src', this.sanitize(value)); + } + return node; + }, + }, + { + key: 'formats', + value: function formats(domNode) { + return ATTRIBUTES.reduce(function (formats, attribute) { + if (domNode.hasAttribute(attribute)) { + formats[attribute] = domNode.getAttribute(attribute); + } + return formats; + }, {}); + }, + }, + { + key: 'match', + value: function match(url) { + return ( + /\.(jpe?g|gif|png)$/.test(url) || + /^data:image\/.+;base64/.test(url) + ); + }, + }, + { + key: 'sanitize', + value: function sanitize(url) { + return (0, _link.sanitize)(url, ['http', 'https', 'data']) + ? url + : '//:0'; + }, + }, + { + key: 'value', + value: function value(domNode) { + return domNode.getAttribute('src'); + }, + }, + ], + ); + + return Image; + })(_parchment2.default.Embed); + + Image.blotName = 'image'; + Image.tagName = 'IMG'; + + exports.default = Image; + + /***/ + }, + /* 73 */ + /***/ function (module, exports, __nested_webpack_require_555080__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _block = __nested_webpack_require_555080__(4); + + var _link = __nested_webpack_require_555080__(27); + + var _link2 = _interopRequireDefault(_link); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var ATTRIBUTES = ['height', 'width']; + + var Video = (function (_BlockEmbed) { + _inherits(Video, _BlockEmbed); + + function Video() { + _classCallCheck(this, Video); + + return _possibleConstructorReturn( + this, + (Video.__proto__ || Object.getPrototypeOf(Video)).apply( + this, + arguments, + ), + ); + } + + _createClass( + Video, + [ + { + key: 'format', + value: function format(name, value) { + if (ATTRIBUTES.indexOf(name) > -1) { + if (value) { + this.domNode.setAttribute(name, value); + } else { + this.domNode.removeAttribute(name); + } + } else { + _get( + Video.prototype.__proto__ || + Object.getPrototypeOf(Video.prototype), + 'format', + this, + ).call(this, name, value); + } + }, + }, + ], + [ + { + key: 'create', + value: function create(value) { + var node = _get( + Video.__proto__ || Object.getPrototypeOf(Video), + 'create', + this, + ).call(this, value); + node.setAttribute('frameborder', '0'); + node.setAttribute('allowfullscreen', true); + node.setAttribute('src', this.sanitize(value)); + return node; + }, + }, + { + key: 'formats', + value: function formats(domNode) { + return ATTRIBUTES.reduce(function (formats, attribute) { + if (domNode.hasAttribute(attribute)) { + formats[attribute] = domNode.getAttribute(attribute); + } + return formats; + }, {}); + }, + }, + { + key: 'sanitize', + value: function sanitize(url) { + return _link2.default.sanitize(url); + }, + }, + { + key: 'value', + value: function value(domNode) { + return domNode.getAttribute('src'); + }, + }, + ], + ); + + return Video; + })(_block.BlockEmbed); + + Video.blotName = 'video'; + Video.className = 'ql-video'; + Video.tagName = 'IFRAME'; + + exports.default = Video; + + /***/ + }, + /* 74 */ + /***/ function (module, exports, __nested_webpack_require_561185__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = exports.FormulaBlot = undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _embed = __nested_webpack_require_561185__(35); + + var _embed2 = _interopRequireDefault(_embed); + + var _quill = __nested_webpack_require_561185__(5); + + var _quill2 = _interopRequireDefault(_quill); + + var _module = __nested_webpack_require_561185__(9); + + var _module2 = _interopRequireDefault(_module); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var FormulaBlot = (function (_Embed) { + _inherits(FormulaBlot, _Embed); + + function FormulaBlot() { + _classCallCheck(this, FormulaBlot); + + return _possibleConstructorReturn( + this, + ( + FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot) + ).apply(this, arguments), + ); + } + + _createClass(FormulaBlot, null, [ + { + key: 'create', + value: function create(value) { + var node = _get( + FormulaBlot.__proto__ || Object.getPrototypeOf(FormulaBlot), + 'create', + this, + ).call(this, value); + if (typeof value === 'string') { + window.katex.render(value, node, { + throwOnError: false, + errorColor: '#f00', + }); + node.setAttribute('data-value', value); + } + return node; + }, + }, + { + key: 'value', + value: function value(domNode) { + return domNode.getAttribute('data-value'); + }, + }, + ]); + + return FormulaBlot; + })(_embed2.default); + + FormulaBlot.blotName = 'formula'; + FormulaBlot.className = 'ql-formula'; + FormulaBlot.tagName = 'SPAN'; + + var Formula = (function (_Module) { + _inherits(Formula, _Module); + + _createClass(Formula, null, [ + { + key: 'register', + value: function register() { + _quill2.default.register(FormulaBlot, true); + }, + }, + ]); + + function Formula() { + _classCallCheck(this, Formula); + + var _this2 = _possibleConstructorReturn( + this, + (Formula.__proto__ || Object.getPrototypeOf(Formula)).call(this), + ); + + if (window.katex == null) { + throw new Error('Formula module requires KaTeX.'); + } + return _this2; + } + + return Formula; + })(_module2.default); + + exports.FormulaBlot = FormulaBlot; + exports.default = Formula; + + /***/ + }, + /* 75 */ + /***/ function (module, exports, __nested_webpack_require_567040__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = exports.CodeToken = exports.CodeBlock = undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _parchment = __nested_webpack_require_567040__(0); + + var _parchment2 = _interopRequireDefault(_parchment); + + var _quill = __nested_webpack_require_567040__(5); + + var _quill2 = _interopRequireDefault(_quill); + + var _module = __nested_webpack_require_567040__(9); + + var _module2 = _interopRequireDefault(_module); + + var _code = __nested_webpack_require_567040__(13); + + var _code2 = _interopRequireDefault(_code); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var SyntaxCodeBlock = (function (_CodeBlock) { + _inherits(SyntaxCodeBlock, _CodeBlock); + + function SyntaxCodeBlock() { + _classCallCheck(this, SyntaxCodeBlock); + + return _possibleConstructorReturn( + this, + ( + SyntaxCodeBlock.__proto__ || + Object.getPrototypeOf(SyntaxCodeBlock) + ).apply(this, arguments), + ); + } + + _createClass(SyntaxCodeBlock, [ + { + key: 'replaceWith', + value: function replaceWith(block) { + this.domNode.textContent = this.domNode.textContent; + this.attach(); + _get( + SyntaxCodeBlock.prototype.__proto__ || + Object.getPrototypeOf(SyntaxCodeBlock.prototype), + 'replaceWith', + this, + ).call(this, block); + }, + }, + { + key: 'highlight', + value: function highlight(_highlight) { + var text = this.domNode.textContent; + if (this.cachedText !== text) { + if (text.trim().length > 0 || this.cachedText == null) { + this.domNode.innerHTML = _highlight(text); + this.domNode.normalize(); + this.attach(); + } + this.cachedText = text; + } + }, + }, + ]); + + return SyntaxCodeBlock; + })(_code2.default); + + SyntaxCodeBlock.className = 'ql-syntax'; + + var CodeToken = new _parchment2.default.Attributor.Class( + 'token', + 'hljs', + { + scope: _parchment2.default.Scope.INLINE, + }, + ); + + var Syntax = (function (_Module) { + _inherits(Syntax, _Module); + + _createClass(Syntax, null, [ + { + key: 'register', + value: function register() { + _quill2.default.register(CodeToken, true); + _quill2.default.register(SyntaxCodeBlock, true); + }, + }, + ]); + + function Syntax(quill, options) { + _classCallCheck(this, Syntax); + + var _this2 = _possibleConstructorReturn( + this, + (Syntax.__proto__ || Object.getPrototypeOf(Syntax)).call( + this, + quill, + options, + ), + ); + + if (typeof _this2.options.highlight !== 'function') { + throw new Error( + 'Syntax module requires highlight.js. Please include the library on the page before Quill.', + ); + } + var timer = null; + _this2.quill.on( + _quill2.default.events.SCROLL_OPTIMIZE, + function () { + clearTimeout(timer); + timer = setTimeout(function () { + _this2.highlight(); + timer = null; + }, _this2.options.interval); + }, + ); + _this2.highlight(); + return _this2; + } + + _createClass(Syntax, [ + { + key: 'highlight', + value: function highlight() { + var _this3 = this; + + if (this.quill.selection.composing) return; + this.quill.update(_quill2.default.sources.USER); + var range = this.quill.getSelection(); + this.quill.scroll + .descendants(SyntaxCodeBlock) + .forEach(function (code) { + code.highlight(_this3.options.highlight); + }); + this.quill.update(_quill2.default.sources.SILENT); + if (range != null) { + this.quill.setSelection( + range, + _quill2.default.sources.SILENT, + ); + } + }, + }, + ]); + + return Syntax; + })(_module2.default); + + Syntax.DEFAULTS = { + highlight: (function () { + if (window.hljs == null) return null; + return function (text) { + var result = window.hljs.highlightAuto(text); + return result.value; + }; + })(), + interval: 1000, + }; + + exports.CodeBlock = SyntaxCodeBlock; + exports.CodeToken = CodeToken; + exports.default = Syntax; + + /***/ + }, + /* 76 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 77 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 78 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 79 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 80 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 81 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 82 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 83 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 84 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 85 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 86 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 87 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 88 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 89 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 90 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 91 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 92 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 93 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 94 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 95 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 96 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 97 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 98 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 99 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 100 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 101 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 102 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 103 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 104 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 105 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 106 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 107 */ + /***/ function (module, exports) { + module.exports = + ' '; + + /***/ + }, + /* 108 */ + /***/ function (module, exports, __nested_webpack_require_593470__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = exports.BubbleTooltip = undefined; + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _extend = __nested_webpack_require_593470__(3); + + var _extend2 = _interopRequireDefault(_extend); + + var _emitter = __nested_webpack_require_593470__(8); + + var _emitter2 = _interopRequireDefault(_emitter); + + var _base = __nested_webpack_require_593470__(43); + + var _base2 = _interopRequireDefault(_base); + + var _selection = __nested_webpack_require_593470__(15); + + var _icons = __nested_webpack_require_593470__(41); + + var _icons2 = _interopRequireDefault(_icons); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called", + ); + } + return call && + (typeof call === 'object' || typeof call === 'function') + ? call + : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + typeof superClass, + ); + } + subClass.prototype = Object.create( + superClass && superClass.prototype, + { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }, + ); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var TOOLBAR_CONFIG = [ + ['bold', 'italic', 'link'], + [{header: 1}, {header: 2}, 'blockquote'], + ]; + + var BubbleTheme = (function (_BaseTheme) { + _inherits(BubbleTheme, _BaseTheme); + + function BubbleTheme(quill, options) { + _classCallCheck(this, BubbleTheme); + + if ( + options.modules.toolbar != null && + options.modules.toolbar.container == null + ) { + options.modules.toolbar.container = TOOLBAR_CONFIG; + } + + var _this = _possibleConstructorReturn( + this, + ( + BubbleTheme.__proto__ || Object.getPrototypeOf(BubbleTheme) + ).call(this, quill, options), + ); + + _this.quill.container.classList.add('ql-bubble'); + return _this; + } + + _createClass(BubbleTheme, [ + { + key: 'extendToolbar', + value: function extendToolbar(toolbar) { + this.tooltip = new BubbleTooltip( + this.quill, + this.options.bounds, + ); + this.tooltip.root.appendChild(toolbar.container); + this.buildButtons( + [].slice.call(toolbar.container.querySelectorAll('button')), + _icons2.default, + ); + this.buildPickers( + [].slice.call(toolbar.container.querySelectorAll('select')), + _icons2.default, + ); + }, + }, + ]); + + return BubbleTheme; + })(_base2.default); + + BubbleTheme.DEFAULTS = (0, _extend2.default)( + true, + {}, + _base2.default.DEFAULTS, + { + modules: { + toolbar: { + handlers: { + link: function link(value) { + if (!value) { + this.quill.format('link', false); + } else { + this.quill.theme.tooltip.edit(); + } + }, + }, + }, + }, + }, + ); + + var BubbleTooltip = (function (_BaseTooltip) { + _inherits(BubbleTooltip, _BaseTooltip); + + function BubbleTooltip(quill, bounds) { + _classCallCheck(this, BubbleTooltip); + + var _this2 = _possibleConstructorReturn( + this, + ( + BubbleTooltip.__proto__ || Object.getPrototypeOf(BubbleTooltip) + ).call(this, quill, bounds), + ); + + _this2.quill.on( + _emitter2.default.events.EDITOR_CHANGE, + function (type, range, oldRange, source) { + if (type !== _emitter2.default.events.SELECTION_CHANGE) return; + if ( + range != null && + range.length > 0 && + source === _emitter2.default.sources.USER + ) { + _this2.show(); + // Lock our width so we will expand beyond our offsetParent boundaries + _this2.root.style.left = '0px'; + _this2.root.style.width = ''; + _this2.root.style.width = _this2.root.offsetWidth + 'px'; + var lines = _this2.quill.getLines(range.index, range.length); + if (lines.length === 1) { + _this2.position(_this2.quill.getBounds(range)); + } else { + var lastLine = lines[lines.length - 1]; + var index = _this2.quill.getIndex(lastLine); + var length = Math.min( + lastLine.length() - 1, + range.index + range.length - index, + ); + var _bounds = _this2.quill.getBounds( + new _selection.Range(index, length), + ); + _this2.position(_bounds); + } + } else if ( + document.activeElement !== _this2.textbox && + _this2.quill.hasFocus() + ) { + _this2.hide(); + } + }, + ); + return _this2; + } + + _createClass(BubbleTooltip, [ + { + key: 'listen', + value: function listen() { + var _this3 = this; + + _get( + BubbleTooltip.prototype.__proto__ || + Object.getPrototypeOf(BubbleTooltip.prototype), + 'listen', + this, + ).call(this); + this.root + .querySelector('.ql-close') + .addEventListener('click', function () { + _this3.root.classList.remove('ql-editing'); + }); + this.quill.on( + _emitter2.default.events.SCROLL_OPTIMIZE, + function () { + // Let selection be restored by toolbar handlers before repositioning + setTimeout(function () { + if (_this3.root.classList.contains('ql-hidden')) return; + var range = _this3.quill.getSelection(); + if (range != null) { + _this3.position(_this3.quill.getBounds(range)); + } + }, 1); + }, + ); + }, + }, + { + key: 'cancel', + value: function cancel() { + this.show(); + }, + }, + { + key: 'position', + value: function position(reference) { + var shift = _get( + BubbleTooltip.prototype.__proto__ || + Object.getPrototypeOf(BubbleTooltip.prototype), + 'position', + this, + ).call(this, reference); + var arrow = this.root.querySelector('.ql-tooltip-arrow'); + arrow.style.marginLeft = ''; + if (shift === 0) return shift; + arrow.style.marginLeft = + -1 * shift - arrow.offsetWidth / 2 + 'px'; + }, + }, + ]); + + return BubbleTooltip; + })(_base.BaseTooltip); + + BubbleTooltip.TEMPLATE = [ + '', + '
', + '', + '', + '
', + ].join(''); + + exports.BubbleTooltip = BubbleTooltip; + exports.default = BubbleTheme; + + /***/ + }, + /* 109 */ + /***/ function (module, exports, __nested_webpack_require_604017__) { + module.exports = __nested_webpack_require_604017__(63); + + /***/ + }, + /******/ + ], + )['default']; +}); /***/ }), @@ -6530,6 +24077,7 @@ exports.initQuill = initQuill; \***************************************************************************************************************************************************************************/ /***/ ((module) => { +"use strict"; module.exports = "data:image/svg+xml,%3csvg viewBox=%270 0 16 16%27 fill=%27white%27 xmlns=%27http://www.w3.org/2000/svg%27%3e%3ccircle cx=%278%27 cy=%278%27 r=%273%27/%3e%3c/svg%3e"; /***/ }), @@ -6540,6 +24088,7 @@ module.exports = "data:image/svg+xml,%3csvg viewBox=%270 0 16 16%27 fill=%27whit \*********************************************************************************************************************************************************************************************************************************************************************/ /***/ ((module) => { +"use strict"; module.exports = "data:image/svg+xml,%3csvg viewBox=%270 0 16 16%27 fill=%27white%27 xmlns=%27http://www.w3.org/2000/svg%27%3e%3cpath d=%27M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z%27/%3e%3c/svg%3e"; /***/ }), @@ -6550,6 +24099,7 @@ module.exports = "data:image/svg+xml,%3csvg viewBox=%270 0 16 16%27 fill=%27whit \******************************************************************************************************************************************************************************************************************************************************/ /***/ ((module) => { +"use strict"; module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 16 16%27%3e%3cpath stroke=%27white%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M4 8h8%27/%3e%3c/svg%3e"; /***/ }), @@ -6560,6 +24110,7 @@ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg% \******************************************************************************************************************************************************************************************************************************************************************/ /***/ ((module) => { +"use strict"; module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3e%3cpath stroke=%27%236B7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27M6 8l4 4 4-4%27/%3e%3c/svg%3e"; /***/ }) @@ -6667,8 +24218,9 @@ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg% /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +// This entry need to be wrapped in an IIFE because it need to be in strict mode. (() => { +"use strict"; var exports = __webpack_exports__; /*!*********************!*\ !*** ./src/main.ts ***! @@ -6678,15 +24230,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); __webpack_require__(/*! ./styles.css */ "./src/styles.css"); var books_1 = __webpack_require__(/*! ./books */ "./src/books.ts"); var contributors_1 = __webpack_require__(/*! ./contributors */ "./src/contributors.ts"); +var initQuill_1 = __webpack_require__(/*! ./initQuill */ "./src/initQuill.ts"); var quill_value_to_textarea_1 = __webpack_require__(/*! ./quill_value_to_textarea */ "./src/quill_value_to_textarea.ts"); document.addEventListener('DOMContentLoaded', function () { (0, books_1.initBooks)(); (0, contributors_1.initContributors)(); - (0, quill_value_to_textarea_1.initQuill)(); + (0, initQuill_1.initQuill)(); + (0, quill_value_to_textarea_1.initQuillValueToTextArea)(); }); })(); /******/ })() ; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Oz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mVhaztcblxuICAgICAgICBjYXNlICdmbic6XG4gICAgICAgICAgaWYgKHR5cGVvZiBtb2RpZmllci5mbiAhPT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgY29uc29sZS5lcnJvcihmb3JtYXQoSU5WQUxJRF9NT0RJRklFUl9FUlJPUiwgbW9kaWZpZXIubmFtZSwgJ1wiZm5cIicsICdcImZ1bmN0aW9uXCInLCBcIlxcXCJcIiArIFN0cmluZyhtb2RpZmllci5mbikgKyBcIlxcXCJcIikpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJ2VmZmVjdCc6XG4gICAgICAgICAgaWYgKG1vZGlmaWVyLmVmZmVjdCAhPSBudWxsICYmIHR5cGVvZiBtb2RpZmllci5lZmZlY3QgIT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZm9ybWF0KElOVkFMSURfTU9ESUZJRVJfRVJST1IsIG1vZGlmaWVyLm5hbWUsICdcImVmZmVjdFwiJywgJ1wiZnVuY3Rpb25cIicsIFwiXFxcIlwiICsgU3RyaW5nKG1vZGlmaWVyLmZuKSArIFwiXFxcIlwiKSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAncmVxdWlyZXMnOlxuICAgICAgICAgIGlmIChtb2RpZmllci5yZXF1aXJlcyAhPSBudWxsICYmICFBcnJheS5pc0FycmF5KG1vZGlmaWVyLnJlcXVpcmVzKSkge1xuICAgICAgICAgICAgY29uc29sZS5lcnJvcihmb3JtYXQoSU5WQUxJRF9NT0RJRklFUl9FUlJPUiwgbW9kaWZpZXIubmFtZSwgJ1wicmVxdWlyZXNcIicsICdcImFycmF5XCInLCBcIlxcXCJcIiArIFN0cmluZyhtb2RpZmllci5yZXF1aXJlcykgKyBcIlxcXCJcIikpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuXG4gICA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uICAgICAgICAvLyBkb24ndCBoaWRlIG90aGVyIGFjY29yZGlvbnMgaWYgYWx3YXlzIG9wZW5cbiAgICAgICAgaWYgKCF0aGlzLl9vcHRpb25zLmFsd2F5c09wZW4pIHtcbiAgICAgICAgICAgIHRoaXMuX2l0ZW1zLm1hcChmdW5jdGlvbiAoaSkge1xuICAgICAgICAgICAgICAgIHZhciBfYSwgX2I7XG4gICAgICAgICAgICAgICAgaWYgKGkgIT09IGl0ZW0pIHtcbiAgICAgICAgICAgICAgICAgICAgKF9hID0gaS50cmlnZ2VyRWwuY2xhc3NMaXN0KS5yZW1vdmUuYXBwbHkoX2EsIF90aGlzLl9vcHRpb25zLmFjdGl2ZUNsYXNzZXMuc3BsaXQoJyAnKSk7XG4gICAgICAgICAgICAgICAgICAgIChfYiA9IGkudHJpZ2dlckVsLmNsYXNzTGlzdCkuYWRkLmFwcGx5KF9iLCBfdGhpcy5fb3B0aW9ucy5pbmFjdGl2ZUNsYXNzZXMuc3BsaXQoJyAnKSk7XG4gICAgICAgICAgICAgICAgICAgIGkudGFyZ2V0RWwuY2xhc3NMaXN0LmFkZCgnaGlkZGVuJyk7XG4gICAgICAgICAgICAgICAgICAgIGkudHJpZ2dlckVsLnNldEF0dHJpYnV0ZSgnYXJpYS1leHBhbmRlZCcsICdmYWxzZScpO1xuICAgICAgICAgICAgICAgICAgICBpLmFjdGl2ZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAvLyByb3RhdGUgaWNvbiBpZiBzZXRcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkuaWNvbkVsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpLmljb25FbC5jbGFzc0xpc3QucmVtb3ZlKCdyb3RhdGUtMTgwJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICAvLyBzaG93IGFjdGl2ZSBpdGVtXG4gICAgICAgIChfYSA9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ykpLFxuICAgICAgICAgICAgICAgICAgICBlbDogJGluZGljYXRvckVsLFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGNhcm91c2VsID0gbmV3IENhcm91c2VsKGl0ZW1zLCB7XG4gICAgICAgICAgICBkZWZhdWx0UG9zaXRpb246IGRlZmF1bHRQb3NpdGlvbixcbiAgICAgICAgICAgIGluZGljYXRvcnM6IHtcbiAgICAgICAgICAgICAgICBpdGVtczogaW5kaWNhdG9ycyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpbnRlcnZhbDogaW50ZXJ2YWwgPyBpbnRlcnZhbCA6IERlZmF1bHQuaW50ZXJ2YWwsXG4gICAgICAgIH0pO1xuICAgICAgICBpZiAoc2xpZGUpIHtcbiAgICAgICAgICAgIGNhcm91c2VsLmN5Y2xlKCk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gY2hlY2sgZm9yIGNvbnRyb2xzXG4gICAgICAgIHZhciBjYXJvdXNlbE5leHRFbCA9ICRjYXJvdXNlbEVsLnF1ZXJ5U2VsZWN0b3IoJ1tkYXRhLWNhcm91c2VsLW5leHRdJyk7XG4gICAgICAgIHZhciBjYXJvdXNlbFByZXZFbCA9ICRjYXJvdXNlbEVsLnF1ZXJ5U2VsZWN0b3IoJ1tkYXRhLWNhcm91c2VsLXByZXZdJyk7XG4gICAgICAgIGlmIChjYXJvdXNlbE5leHRFbCkge1xuICAgICAgICAgICAgY2Fyb3VzZWxOZXh0RWwuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgY2Fyb3VzZWwubmV4dCgpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGNhcm91c2VsUHJldkVsKSB7XG4gICAgICAgICAgICBjYXJvdXNlbFByZXZFbC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGZ1bm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bnRzLmZvckVhY2goZnVuY3Rpb24gKGV2KSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuX3RyaWdnZXJFbC5hZGRFdmVudExpc3RlbmVyKGV2LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLnNob3coKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBfdGhpcy5fdGFyZ2V0RWwuYWRkRXZlbnRMaXN0ZW5lcihldiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5zaG93KCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHRyaWdnZXJFdmVudFR5cGVzLmhpZGVFdmVudHMuZm9yRWFjaChmdW5jdGlvbiAoZXYpIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5fcGFyZW50RWwuYWRkRXZlbnRMaXN0ZW5lcihldiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIV90aGlzLl9wYXJlbnRFbC5tYXRjaGVzKCc6aG92ZXInKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuaGlkZSgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgRGlhbC5wcm90b3R5cGUuaGlkZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy5fdGFyZ2V0RWwuY2xhc3NMaXN0LmFkZCgnaGlkZGVuJyk7XG4gICAgICAgIGlmICh0aGlzLl90cmlnZ2VyRWwpIHtcbiAgICAgICAgICAgIHRoaXMuX3RyaWdnZXJFbC5zZXRBdHRyaWJ1dGUoJ2FyaWEtZXhwYW5kZWQnLCAnZmFsc2UnKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLl92aXNpYmxlID0gZmFsc2U7XG4gICAgICAgIC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Nhc2UgJ2hvdmVyJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ21vdXNlZW50ZXInLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydtb3VzZWxlYXZlJywgJ2JsdXInXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgY2FzZSAnY2xpY2snOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFsnY2xpY2snLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydmb2N1c291dCcsICdibHVyJ10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgJ25vbmUnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFtdLFxuICAgICAgICAgICAgICAgICAgICBoaWRlRXZlbnRzOiBbXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ21vdXNlZW50ZXInLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydtb3VzZWxlYXZlJywgJ2JsdXInXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfTtcbiAgICByZXR1cm4gRGlhbDtcbn0oKSk7XG5pZiAodHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICB3aW5kb3cuRGlhbCA9IERpYWw7XG59XG5leHBvcnQgZnVuY3Rpb24gaW5pdERpYWxzKCkge1xuICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJ1tkYXRhLWRpYWwtaW5pdF0nK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gIH07XG4gICAgRHJhd2VyLnByb3RvdHlwZS5fZGVzdHJveUJhY2tkcm9wRWwgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLl92aXNpYmxlKSB7XG4gICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdbZHJhd2VyLWJhY2tkcm9wXScpLnJlbW92ZSgpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBEcmF3ZXIucHJvdG90eXBlLl9nZXRQbGFjZW1lbnRDbGFzc2VzID0gZnVuY3Rpb24gKHBsYWNlbWVudCkge1xuICAgICAgICBzd2l0Y2ggKHBsYWNlbWVudCkge1xuICAgICAgICAgICAgY2FzZSAndG9wJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBiYXNlOiBbJ3RvcC0wJywgJ2xlZnQtMCcsICdyaWdodC0wJ10sXG4gICAgICAgICAgICAgICAgICAgIGFjdGl2ZTogWyd0cmFuc2Zvcm0tbm9uZSddLFxuICAgICAgICAgICAgICAgICAgICBpbmFjdGl2ZTogWyctdHJhbnNsYXRlLXktZnVsbCddLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICBjYXNlICdyaWdodCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgYmFzZTogWydyaWdodC0wJywgJ3RvcC0wJ10sXG4gICAgICAgICAgICAgICAgICAgIGFjdGl2ZTogWyd0cmFuc2Zvcm0tbm9uZSddLFxuICAgICAgICAgICAgICAgICAgICBpbmFjdGl2ZTogWyd0cmFuc2xhdGUteC1mdWxsJ10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgJ2JvdHRvbSc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgYmFzZTogWydib3R0b20tMCcsICdsZWZ0LTAnLCAncmlnaHQtMCddLFxuICAgICAgICAgICAgICAgICAgICBhY3RpdmU6IFsndHJhbnNmb3JtLW5vbmUnXSxcbiAgICAgICAgICAgICAgICAgICAgaW5hY3RpdmU6IFsndHJhbnNsYXRlLXktZnVsbCddLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICBjYXNlICdsZWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBiYXNlOiBbJ2xlZnQtMCcsICd0b3AtMCddLFxuICAgICAgICAgICAgICAgICAgICBhY3RpdmU6IFsndHJhbnNmb3JtLW5vbmUnXSxcbiAgICAgICAgICAgICAgICAgICAgaW5hY3RpdmU6IFsnLXRyYW5zbGF0ZS14LWZ1bGwnXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgY2FzZSAnYm90dG9tLWVkZ2UnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGJhc2U6IFsnbGVmdC0wJywgJ3RvcC0wJ10sXG4gICAgICAgICAgICAgICAgICAgIGFjdGl2ZTogWyd0cmFuc2Zvcm0tbm9uZSddLFxuICAgICAgICAgICAgICAgICAgICBpbmFjdGl2ZTogWyd0cmFuc2xhdGUteS1mdWxsJywgdGhpcy5fb3B0aW9ucy5lZGdlT2Zmc2V0XSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBiYXNlOiBbJ2xlZnQtMCcsICd0b3AtMCddLFxuICAgICAgICAgICAgICAgICAgICBhY3RpdmU6IFsndHJhbnNmb3JtLW5vbmUnXSxcbiAgICAgICAgICAgICAgICAgICAgaW5hY3RpdmU6IFsnLXRyYW5zbGF0ZS14LWZ1bGwnXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfTtcbiAgICBEcmF3ZXIucHJvdG90eXBlLmlzSGlkZGVuID0gZnVuY3Rpb24gKCkge1xu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AgICAgICAgICAgICAgICAgICAgICA6IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBEZWZhdWx0LmJvZHlTY3JvbGxpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZHJvcDogYmFja2Ryb3BcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGJhY2tkcm9wID09PSAndHJ1ZSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IERlZmF1bHQuYmFja2Ryb3AsXG4gICAgICAgICAgICAgICAgICAgICAgICBlZGdlOiBlZGdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBlZGdlID09PSAndHJ1ZSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IERlZmF1bHQuZWRnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVkZ2VPZmZzZXQ6IGVkZ2VPZmZzZXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGVkZ2VPZmZzZXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IERlZmF1bHQuZWRnZU9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRHJhd2VyIHdpdGggaWQgXCIuY29uY2F0KGRyYXdlcklkLCBcIiBub3QgZm91bmQuIEFyZSB5b3Ugc3VyZSB0aGF0IHRoZSBkYXRhLWRyYXdlci10YXJnZXQgYXR0cmlidXRlIHBvaW50cyB0byB0aGUgY29ycmVjdCBk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ZW5lcnMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHZhciB0cmlnZ2VyRXZlbnRzID0gdGhpcy5fZ2V0VHJpZ2dlckV2ZW50cygpO1xuICAgICAgICAvLyBjbGljayBldmVudCBoYW5kbGluZyBmb3IgdHJpZ2dlciBlbGVtZW50XG4gICAgICAgIGlmICh0aGlzLl9vcHRpb25zLnRyaWdnZXJUeXBlID09PSAnY2xpY2snKSB7XG4gICAgICAgICAgICB0cmlnZ2VyRXZlbnRzLnNob3dFdmVudHMuZm9yRWFjaChmdW5jdGlvbiAoZXYpIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5fdHJpZ2dlckVsLmFkZEV2ZW50TGlzdGVuZXIoZXYsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMudG9nZ2xlKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICAvLyBob3ZlciBldmVudCBoYW5kbGluZyBmb3IgdHJpZ2dlciBlbGVtZW50XG4gICAgICAgIGlmICh0aGlzLl9vcHRpb25zLnRyaWdnZXJUeXBlID09PSAnaG92ZXInKSB7XG4gICAgICAgICAgICB0cmlnZ2VyRXZlbnRzLnNob3dFdmVudHMuZm9yRWFjaChmdW5jdGlvbiAoZXYpIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5fdHJpZ2dlckVsLmFkZEV2ZW50TGlzdGVuZXIoZXYsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGV2ID09PSAnY2xpY2snKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy50b2dnbGUoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnNob3coKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIF90aGlzLl9vcHRpb25zLmRlbGF5KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIF90aGlzLl90YXJnZXRFbC5hZGRFdmVudExpc3RlbmVyKGV2LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLnNob3coKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdHJpZ2dlckV2ZW50cy5oaWRlRXZlbnRzLmZvckVhY2goZnVuY3Rpb24gKGV2KSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuX3RyaWdnZXJFbC5hZGRFdmVudExpc3RlbmVyKGV2LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFfdGhpcy5fdGFyZ2V0RWwubWF0Y2hlcygnOmhvdmVyJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5oaWRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIF90aGlzLl9vcHRpb25zLmRlbGF5KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBfdGhpcy5fdGFyZ2V0RWwuYWRkRXZlbnRMaXN0ZW5lcihldiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghX3RoaXMuX3RyaWdnZXJFbC5tYXRjaGVzKCc6aG92ZXInKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmhpZGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgX3RoaXMuX29wdGlvbnMuZGVsYXkpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIERyb3Bkb3duLnByb3RvdHlwZS5fY3JlYXRlUG9wcGVySW5zdGFuY2UgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiBjcmVhdGVQb3BwZXIodGhpcy5fdHJpZ2dlckVsLCB0aGlzLl90YXJnZXRFbCwge1xuICAgICAgICAgICAgcGxhY2VtZW50OiB0aGlzLl9vcHRpb25zLnBsYWNlbWVudCxcbiAgICAgICAgICAgIG1vZGlmaWVyczogW1xuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogJ29mZnNldCcsXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldDogW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29wdGlvbnMub2Zmc2V0U2tpZGRpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fb3B0aW9ucy5vZmZzZXREaXN0YW5jZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgRHJvcGRvd24ucHJvdG90eXBlLl9zZXR1cENsaWNrT3V0c2lkZUxpc3RlbmVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICB0aGlzLl9jbGlja091dHNpZGVFdmVudExpc3RlbmVyID0gZnVuY3Rpb24gKGV2KSB7XG4gICAgICAgICAgICBfdGhpcy5faGFuZGxlQ2xpY2tPdXRzaWRlKG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lcicsICdjbGljayddLFxuICAgICAgICAgICAgICAgICAgICBoaWRlRXZlbnRzOiBbJ21vdXNlbGVhdmUnXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgY2FzZSAnY2xpY2snOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFsnY2xpY2snXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogW10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgJ25vbmUnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFtdLFxuICAgICAgICAgICAgICAgICAgICBoaWRlRXZlbnRzOiBbXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ2NsaWNrJ10sXG4gICAgICAgICAgICAgICAgICAgIGhpZGVFdmVudHM6IFtdLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICB9O1xuICAgIERyb3Bkb3duLnByb3RvdHlwZS50b2dnbGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLmlzVmlzaWJsZSgpKSB7XG4gICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuc2hvdygpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuX29wdGlvbnMub25Ub2dnbGUodGhpcyk7XG4gICAgfTtcbiAgICBEcm9wZG93bi5wcm90b3R5cGUuaXNWaXNpYmxlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5fdmlzaWJsZTtcbiAgICB9O1xuICAgIERyb3Bkb3duLnByb3RvdHlwZS5zaG93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1cbiAgICAgICAgZG9jdW1lbnQuYm9keS5yZW1vdmVFdmVudExpc3RlbmVyKCdrZXlkb3duJywgdGhpcy5fa2V5ZG93bkV2ZW50TGlzdGVuZXIsIHRydWUpO1xuICAgIH07XG4gICAgTW9kYWwucHJvdG90eXBlLl9oYW5kbGVPdXRzaWRlQ2xpY2sgPSBmdW5jdGlvbiAodGFyZ2V0KSB7XG4gICAgICAgIGlmICh0YXJnZXQgPT09IHRoaXMuX3RhcmdldEVsIHx8XG4gICAgICAgICAgICAodGFyZ2V0ID09PSB0aGlzLl9iYWNrZHJvcEVsICYmIHRoaXMuaXNWaXNpYmxlKCkpKSB7XG4gICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgTW9kYWwucHJvdG90eXBlLl9nZXRQbGFjZW1lbnRDbGFzc2VzID0gZnVuY3Rpb24gKCkge1xuICAgICAgICBzd2l0Y2ggKHRoaXMuX29wdGlvbnMucGxhY2VtZW50KSB7XG4gICAgICAgICAgICAvLyB0b3BcbiAgICAgICAgICAgIGNhc2UgJ3RvcC1sZWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gWydqdXN0aWZ5LXN0YXJ0JywgJ2l0ZW1zLXN0YXJ0J107XG4gICAgICAgICAgICBjYXNlICd0b3AtY2VudGVyJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gWydqdXN0aWZ5LWNlbnRlcicsICdpdGVtcy1zdGFydCddO1xuICAgICAgICAgICAgY2FzZSAndG9wLXJpZ2h0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gWydqdXN0aWZ5LWVuZCcsICdpdGVtcy1zdGFydCddO1xuICAgICAgICAgICAgLy8gY2VudGVyXG4gICAgICAgICAgICBjYXNlICdjZW50ZXItbGVmdCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIFsnanVzdGlmeS1zdGFydCcsICdpdGVtcy1jZW50ZXInXTtcbiAgICAgICAgICAgIGNhc2UgJ2NlbnRlcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIFsnanVzdGlmeS1jZW50ZXInLCAnaXRlbXMtY2VudGVyJ107XG4gICAgICAgICAgICBjYXNlICdjZW50ZXItcmlnaHQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBbJ2p1c3RpZnktZW5kJywgJ2l0ZW1zLWNlbnRlciddO1xuICAgICAgICAgICAgLy8gYm90dG9tXG4gICAgICAgICAgICBjYXNlICdib3R0b20tbGVmdCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIFsnanVzdGlmeS1zdGFydCcsICdpdGVtcy1lbmQnXTtcbiAgICAgICAgICAgIGNhc2UgJ2JvdHRvbS1jZW50ZXInOlxuICAgICAgICAgICAgICAgIHJldHVybiBbJ2p1c3RpZnktY2VudGVyJywgJ2l0ZW1zLWVuZCddO1xuICAgICAgICAgICAgY2FzZSAnYm90dG9tLXJpZ2h0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gWydqdXN0aWZ5LWVuZCcsICdpdGVtcy1lbmQnXTtcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuIFsnanVzdGlmeS1jZW50ZXInLCAnaXRlbXMtY2VudGVyJ107XG4gICAgICAgIH1cbiAgICB9O1xuICAgIE1vZGFsLnByb3RvdHlwZS50b2dnbGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLl9pc0hpZGRlbikge1xuICAgICAgICAgICAgdGhpcy5zaG93KCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBjYWxsYmFjayBmdW5jdGlvblxuICAgICAgICB0aGlzLl9vcHRpb25zLm9uVG9nZ2xlKHRoaXMpO1xuICAgIH07XG4gICAgTW9kYWwucHJvdG90eXBlLnNob3cgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLmlzSGlkZGVuKSB7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Y3Rpb24gKCR0cmlnZ2VyRWwpIHtcbiAgICAgICAgdmFyIG1vZGFsSWQgPSAkdHJpZ2dlckVsLmdldEF0dHJpYnV0ZSgnZGF0YS1tb2RhbC10b2dnbGUnKTtcbiAgICAgICAgdmFyICRtb2RhbEVsID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQobW9kYWxJZCk7XG4gICAgICAgIGlmICgkbW9kYWxFbCkge1xuICAgICAgICAgICAgdmFyIHBsYWNlbWVudCA9ICRtb2RhbEVsLmdldEF0dHJpYnV0ZSgnZGF0YS1tb2RhbC1wbGFjZW1lbnQnKTtcbiAgICAgICAgICAgIHZhciBiYWNrZHJvcCA9ICRtb2RhbEVsLmdldEF0dHJpYnV0ZSgnZGF0YS1tb2RhbC1iYWNrZHJvcCcpO1xuICAgICAgICAgICAgdmFyIG1vZGFsXzEgPSBnZXRNb2RhbEluc3RhbmNlKG1vZGFsSWQsIG1vZGFsSW5zdGFuY2VzKTtcbiAgICAgICAgICAgIGlmICghbW9kYWxfMSkge1xuICAgICAgICAgICAgICAgIG1vZGFsXzEgPSB7XG4gICAgICAgICAgICAgICAgICAgIGlkOiBtb2RhbElkLFxuICAgICAgICAgICAgICAgICAgICBvYmplY3Q6IG5ldyBNb2RhbCgkbW9kYWxFbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2VtZW50OiBwbGFjZW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHBsYWNlbWVudFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogRGVmYXVsdC5wbGFjZW1lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZHJvcDogYmFja2Ryb3AgPyBiYWNrZHJvcCA6IERlZmF1bHQuYmFja2Ryb3AsXG4gICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgbW9kYWxJbnN0YW5jZXMucHVzaChtb2RhbF8xKTtcbiAgICAgICAgICA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AgICAgICAgIF90aGlzLmhpZGUoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIDEwMCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIF90aGlzLl90YXJnZXRFbC5hZGRFdmVudExpc3RlbmVyKGV2LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghX3RoaXMuX3RyaWdnZXJFbC5tYXRjaGVzKCc6aG92ZXInKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuaGlkZSgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgMTAwKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIFBvcG92ZXIucHJvdG90eXBlLl9jcmVhdGVQb3BwZXJJbnN0YW5jZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIGNyZWF0ZVBvcHBlcih0aGlzLl90cmlnZ2VyRWwsIHRoaXMuX3RhcmdldEVsLCB7XG4gICAgICAgICAgICBwbGFjZW1lbnQ6IHRoaXMuX29wdGlvbnMucGxhY2VtZW50LFxuICAgICAgICAgICAgbW9kaWZpZXJzOiBbXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBuYW1lOiAnb2Zmc2V0JyxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgb2Zmc2V0OiBbMCwgdGhpcy5fb3B0aW9ucy5vZmZzZXRdLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdLFxuICAgICAgICB9KTtcbiAgICB9O1xuICAgIFBvcG92ZXIucHJvdG90eXBlLl9nZXRUcmlnZ2VyRXZlbnRzID0gZnVuY3Rpb24gKCkge1xuICAgICAgICBzd2l0Y2ggKHRoaXMuX29wdGlvbnMudHJpZ2dlclR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgJ2hvdmVyJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ21vdXNlZW50ZXInLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydtb3VzZWxlYXZlJywgJ2JsdXInXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgY2FzZSAnY2xpY2snOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFsnY2xpY2snLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydmb2N1c291dCcsICdibHVyJ10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgJ25vbmUnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFtdLFxuICAgICAgICAgICAgICAgICAgICBoaWRlRXZlbnRzOiBbXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ21vdXNlZW50ZXInLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydtb3VzZWxlYXZlJywgJ2JsdXInXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfTtcbiAgICBQb3BvdmVyLnByb3RvdHlwZS5fc2V0dXBLZXlkb3duTGlzdGVuZXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHRoaXMuX2tleWRvd25FdmVudExpc3Rlbm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X2dldFRyaWdnZXJFdmVudHMoKTtcbiAgICAgICAgdHJpZ2dlckV2ZW50cy5zaG93RXZlbnRzLmZvckVhY2goZnVuY3Rpb24gKGV2KSB7XG4gICAgICAgICAgICBfdGhpcy5fdHJpZ2dlckVsLmFkZEV2ZW50TGlzdGVuZXIoZXYsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5zaG93KCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICAgIHRyaWdnZXJFdmVudHMuaGlkZUV2ZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChldikge1xuICAgICAgICAgICAgX3RoaXMuX3RyaWdnZXJFbC5hZGRFdmVudExpc3RlbmVyKGV2LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuaGlkZSgpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgVG9vbHRpcC5wcm90b3R5cGUuX2NyZWF0ZVBvcHBlckluc3RhbmNlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gY3JlYXRlUG9wcGVyKHRoaXMuX3RyaWdnZXJFbCwgdGhpcy5fdGFyZ2V0RWwsIHtcbiAgICAgICAgICAgIHBsYWNlbWVudDogdGhpcy5fb3B0aW9ucy5wbGFjZW1lbnQsXG4gICAgICAgICAgICBtb2RpZmllcnM6IFtcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWU6ICdvZmZzZXQnLFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQ6IFswLCA4XSxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXSxcbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICBUb29sdGlwLnByb3RvdHlwZS5fZ2V0VHJpZ2dlckV2ZW50cyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgc3dpdGNoICh0aGlzLl9vcHRpb25zLnRyaWdnZXJUeXBlKSB7XG4gICAgICAgICAgICBjYXNlICdob3Zlcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgc2hvd0V2ZW50czogWydtb3VzZWVudGVyJywgJ2ZvY3VzJ10sXG4gICAgICAgICAgICAgICAgICAgIGhpZGVFdmVudHM6IFsnbW91c2VsZWF2ZScsICdibHVyJ10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgJ2NsaWNrJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ2NsaWNrJywgJ2ZvY3VzJ10sXG4gICAgICAgICAgICAgICAgICAgIGhpZGVFdmVudHM6IFsnZm9jdXNvdXQnLCAnYmx1ciddLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICBjYXNlICdub25lJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogW10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgc2hvd0V2ZW50czogWydtb3VzZWVudGVyJywgJ2ZvY3VzJ10sXG4gICAgICAgICAgICAgICAgICAgIGhpZGVFdmVudHM6IFsnbW91c2VsZWF2ZScsICdibHVyJ10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgVG9vbHRpcC5wcm90b3R5cGUuX3NldHVwS2V5ZG93bkxpc3RlbmVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICB0aGlzLl9rZ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mVmO1xuXG4vLyBvYmplY3QgdG8gc3RvcmUgbG9hZGVkIGFuZCBsb2FkaW5nIGNodW5rc1xuLy8gdW5kZWZpbmVkID0gY2h1bmsgbm90IGxvYWRlZCwgbnVsbCA9IGNodW5rIHByZWxvYWRlZC9wcmVmZXRjaGVkXG4vLyBbcmVzb2x2ZSwgcmVqZWN0LCBQcm9taXNlXSA9IGNodW5rIGxvYWRpbmcsIDAgPSBjaHVuayBsb2FkZWRcbnZhciBpbnN0YWxsZWRDaHVua3MgPSB7XG5cdFwibWFpblwiOiAwXG59O1xuXG4vLyBubyBjaHVuayBvbiBkZW1hbmQgbG9hZGluZ1xuXG4vLyBubyBwcmVmZXRjaGluZ1xuXG4vLyBubyBwcmVsb2FkZWRcblxuLy8gbm8gSE1SXG5cbi8vIG5vIEhNUiBtYW5pZmVzdFxuXG4vLyBubyBvbiBjaHVua3MgbG9hZGVkXG5cbi8vIG5vIGpzb25wIGZ1bmN0aW9uIiwiX193ZWJwYWNrX3JlcXVpcmVfXy5uYyA9IHVuZGVmaW5lZDsiLCJpbXBvcnQgJy4vc3R5bGVzLmNzcyc7XG5pbXBvcnQge2luaXRCb29rc30gZnJvbSAnLi9ib29rcyc7XG5pbXBvcnQge2luaXRDb250cmlidXRvcnN9IGZyb20gJy4vY29udHJpYnV0b3JzJztcbmltcG9ydCB7aW5pdFF1aWxsfSBmcm9tICcuL3F1aWxsX3ZhbHVlX3RvX3RleHRhcmVhJztcblxuZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignRE9NQ29udGVudExvYWRlZCcsICgpID0+IHtcbiAgaW5pdEJvb2tzKCk7XG4gIGluaXRDb250cmlidXRvcnMoKTtcbiAgaW5pdFF1aWxsKCk7XG59KTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsIm1hcHBpbmdz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Bmb3IgZWFjaCBtb2RpZmllclxuICAgICAgICAvLyBpcyBmaWxsZWQgd2l0aCB0aGUgaW5pdGlhbCBkYXRhIHNwZWNpZmllZCBieSB0aGUgbW9kaWZpZXIuIFRoaXMgbWVhbnNcbiAgICAgICAgLy8gaXQgZG9lc24ndCBwZXJzaXN0IGFuZCBpcyBmcmVzaCBvbiBlYWNoIHVwZGF0ZS5cbiAgICAgICAgLy8gVG8gZW5zdXJlIHBlcnNpc3RlbnQgZGF0YSwgdXNlIGAke25hbWV9I3BlcnNpc3RlbnRgXG5cbiAgICAgICAgc3RhdGUub3JkZXJlZE1vZGlmaWVycy5mb3JFYWNoKGZ1bmN0aW9uIChtb2RpZmllcikge1xuICAgICAgICAgIHJldHVybiBzdGF0ZS5tb2RpZmllcnNEYXRhW21vZGlmaWVyLm5hbWVdID0gT2JqZWN0LmFzc2lnbih7fSwgbW9kaWZpZXIuZGF0YSk7XG4gICAgICAgIH0pO1xuICAgICAgICB2YXIgX19kZWJ1Z19sb29wc19fID0gMDtcblxuICAgICAgICBmb3IgKHZhciBpbmRleCA9IDA7IGluZGV4IDwgc3RhdGUub3JkZXJlZE1vZGlmaWVycy5sZW5ndGg7IGluZGV4KyspIHtcbiAgICAgICAgICBpZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09IFwicHJvZHVjdGlvblwiKSB7XG4gICAgICAgICAgICBfX2RlYnVnX2xvb3BzX18gKz0gMTtcblxuICAgICAgICAgICAgaWYgKF9fZGVidWdfbG9vcHNfXyA+IDEwMCkge1xuICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKElORklOSVRFX0xPT1BfRVJST1IpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoc3RhdGUucmVzZXQgPT09IHRydWUpIHtcbiAgICAgICAgICAgIHN0YXRlLnJlc2V0ID0gZmFsc2U7XG4gICAgICAgICAgICBpbmRleCA9IC0xO1xuIC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dGlvbiAoa2V5KSB7XG4gICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICBpZiAodHlwZW9mIG1vZGlmaWVyLm5hbWUgIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKGZvcm1hdChJTlZBTElEX01PRElGSUVSX0VSUk9SLCBTdHJpbmcobW9kaWZpZXIubmFtZSksICdcIm5hbWVcIicsICdcInN0cmluZ1wiJywgXCJcXFwiXCIgKyBTdHJpbmcobW9kaWZpZXIubmFtZSkgKyBcIlxcXCJcIikpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJ2VuYWJsZWQnOlxuICAgICAgICAgIGlmICh0eXBlb2YgbW9kaWZpZXIuZW5hYmxlZCAhPT0gJ2Jvb2xlYW4nKSB7XG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKGZvcm1hdChJTlZBTElEX01PRElGSUVSX0VSUk9SLCBtb2RpZmllci5uYW1lLCAnXCJlbmFibGVkXCInLCAnXCJib29sZWFuXCInLCBcIlxcXCJcIiArIFN0cmluZyhtb2RpZmllci5lbmFibGVkKSArIFwiXFxcIlwiKSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAncGhhc2UnOlxuICAgICAgICAgIGlmIChtb2RpZmllclBoYXNlcy5pbmRleE9mKG1vZGlmaWVyLnBoYXNlKSA8IDApIHtcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZm9ybWF0KElOVkFMSURfTU9ESUZJRVJfRVJST1IsIG1vZGlmaWVyLm5hbWUsICdcInBoYXNlXCInLCBcImVpdGhlciBcIiArIG1vZGlmaWVyUGhhc2VzLmpvaW4oJywgJyksIFwiXFxcIlwiICsgU3RyaW5nKG1vZGlmaWVyLnBoYXNlKSArIFwiXFxcIlwiKSk7XG4gICAgICAgICAgfVxuXG4gICAg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b3NpdGlvbjogcG9zaXRpb24sXG4gICAgICAgICAgICAgICAgICAgIGVsOiAkY2Fyb3VzZWxJdGVtRWwsXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgaWYgKCRjYXJvdXNlbEl0ZW1FbC5nZXRBdHRyaWJ1dGUoJ2RhdGEtY2Fyb3VzZWwtaXRlbScpID09PVxuICAgICAgICAgICAgICAgICAgICAnYWN0aXZlJykge1xuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0UG9zaXRpb24gPSBwb3NpdGlvbjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgaW5kaWNhdG9ycyA9IFtdO1xuICAgICAgICBpZiAoJGNhcm91c2VsRWwucXVlcnlTZWxlY3RvckFsbCgnW2RhdGEtY2Fyb3VzZWwtc2xpZGUtdG9dJykubGVuZ3RoKSB7XG4gICAgICAgICAgICBBcnJheS5mcm9tKCRjYXJvdXNlbEVsLnF1ZXJ5U2VsZWN0b3JBbGwoJ1tkYXRhLWNhcm91c2VsLXNsaWRlLXRvXScpKS5tYXAoZnVuY3Rpb24gKCRpbmRpY2F0b3JFbCkge1xuICAgICAgICAgICAgICAgIGluZGljYXRvcnMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBwYXJzZUludCgkaW5kaWNhdG9yRWwuZ2V0QXR0cmlidXRlKCdkYXRhLWNhcm91c2VsLXNsaWRlLXRvJykpLFxuICAgICAgICAgICAgICAgICAgICBlbDogJGluZGljYXRvckVsLFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGNhcm91c2VsID0gbmV3IENhcm91c2VsKGl0ZW1zLCB7XG4gICAgICAgICAgICBkZWZhdWx0UG9zaXRpb246IGRlZmF1bHRQb3NpdGlvbixcbiAgICAgICAgICAgIGluZGljYXRvcnM6IHtcbiAgICAgICAgIC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gIHRoaXMuX3RyaWdnZXJFbC5zZXRBdHRyaWJ1dGUoJ2FyaWEtZXhwYW5kZWQnLCAndHJ1ZScpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuX3Zpc2libGUgPSB0cnVlO1xuICAgICAgICAvLyBjYWxsYmFjayBmdW5jdGlvblxuICAgICAgICB0aGlzLl9vcHRpb25zLm9uU2hvdyh0aGlzKTtcbiAgICB9O1xuICAgIERpYWwucHJvdG90eXBlLnRvZ2dsZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKHRoaXMuX3Zpc2libGUpIHtcbiAgICAgICAgICAgIHRoaXMuaGlkZSgpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5zaG93KCk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIERpYWwucHJvdG90eXBlLmlzSGlkZGVuID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gIXRoaXMuX3Zpc2libGU7XG4gICAgfTtcbiAgICBEaWFsLnByb3RvdHlwZS5pc1Zpc2libGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl92aXNpYmxlO1xuICAgIH07XG4gICAgRGlhbC5wcm90b3R5cGUuX2dldFRyaWdnZXJFdmVudFR5cGVzID0gZnVuY3Rpb24gKHRyaWdnZXJUeXBlKSB7XG4gICAgICAgIHN3aXRjaCAodHJpZ2dlclR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgJ2hvdmVyJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ21vdXNlZW50ZXInLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydtb3VzZWxlYXZlJywgJ2JsdXInXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgY2FzZSAnY2xpY2snOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFsnY2xpY2snLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydmb2N1c291dCcsICdibHVyJ10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgJ25vbmUnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFtdLFxuICAgICAgICAgICAgICAgICAgICBoaWRlRXZlbnRzOiBbXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ21vdXNlZW50ZXInLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydtb3VzZWxlYXZlJywgJ2JsdXInXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfTtcbiAgICByZXR1cm4gRGlhbDtcbn0oKSk7XG5pZiAodHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICB3aW5kb3cuRGlhbCA9IERpYWw7XG59XG5leHBvcnQgZnVuY3Rpb24gaW5pdERpYWxzKCkge1xuICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJ1tkYXRhLWRpYWwtaW5pdF0nKS5mb3JFYWNoKGZ1bmN0aW9uICgkcGFyZW50RWwpIHtcbiAgICAgICAgdmFyICR0cmlnZ2VyRWwgPSAkcGFyZW50RWwucXVlcnlTZWxlY3RvcignW2RhdGEtZGlhbC10b2dnbGVdJyk7XG4gICAgICAgIGlmICgkdHJpZ2dlckVsKSB7XG4gICAgICAgICAgICB2YXIgZGlhbElkID0gJHRyaWdnZXJFbC5nZXRBdHRyaWJ1dGUoJ2RhdGEtZGlhbC10b2dnbGUnKTt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GFjZW1lbnRDbGFzc2VzID0gZnVuY3Rpb24gKHBsYWNlbWVudCkge1xuICAgICAgICBzd2l0Y2ggKHBsYWNlbWVudCkge1xuICAgICAgICAgICAgY2FzZSAndG9wJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBiYXNlOiBbJ3RvcC0wJywgJ2xlZnQtMCcsICdyaWdodC0wJ10sXG4gICAgICAgICAgICAgICAgICAgIGFjdGl2ZTogWyd0cmFuc2Zvcm0tbm9uZSddLFxuICAgICAgICAgICAgICAgICAgICBpbmFjdGl2ZTogWyctdHJhbnNsYXRlLXktZnVsbCddLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICBjYXNlICdyaWdodCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgYmFzZTogWydyaWdodC0wJywgJ3RvcC0wJ10sXG4gICAgICAgICAgICAgICAgICAgIGFjdGl2ZTogWyd0cmFuc2Zvcm0tbm9uZSddLFxuICAgICAgICAgICAgICAgICAgICBpbmFjdGl2ZTogWyd0cmFuc2xhdGUteC1mdWxsJ10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgJ2JvdHRvbSc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgYmFzZTogWydib3R0b20tMCcsICdsZWZ0LTAnLCAncmlnaHQtMCddLFxuICAgICAgICAgICAgICAgICAgICBhY3RpdmU6IFsndHJhbnNmb3JtLW5vbmUnXSxcbiAgICAgICAgICAgICAgICAgICAgaW5hY3RpdmU6IFsndHJhbnNsYXRlLXktZnVsbCddLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICBjYXNlICdsZWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBiYXNlOiBbJ2xlZnQtMCcsICd0b3AtMCddLFxuICAgICAgICAgICAgICAgICAgICBhY3RpdmU6IFsndHJhbnNmb3JtLW5vbmUnXSxcbiAgICAgICAgICAgICAgICAgICAgaW5hY3RpdmU6IFsnLXRyYW5zbGF0ZS14LWZ1bGwnXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgY2FzZSAnYm90dG9tLWVkZ2UnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGJhc2U6IFsnbGVmdC0wJywgJ3RvcC0wJ10sXG4gICAgICAgICAgICAgICAgICAgIGFjdGl2ZTogWyd0cmFuc2Zvcm0tbm9uZSddLFxuICAgICAgICAgICAgICAgICAgICBpbmFjdGl2ZTogWyd0cmFuc2xhdGUteS1mdWxsJywgdGhpcy5fb3B0aW9ucy5lZGdlT2Zmc2V0XSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBiYXNlOiBbJ2xlZnQtMCcsICd0b3AtMCddLFxuICAgICAgICAgICAgICAgICAgICBhY3RpdmU6IFsndHJhbnNmb3JtLW5vbmUnXSxcbiAgICAgICAgICAgICAgICAgICAgaW5hY3RpdmU6IFsnLXRyYW5zbGF0ZS14LWZ1bGwnXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfTtcbiAgICBEcmF3ZXIucHJvdG90eXBlLmlzSGlkZGVuID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gIXRoaXMuX3Zpc2libGU7XG4gICAgfTtcbiAgICBEcmF3ZXIucHJvdG90eXBlLmlzVmlzaWJsZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX3Zpc2libGU7XG4gICAgfTtcbiAgICByZXR1cm4gRHJhd2VyO1xufSgpKTtcbmlmICh0eXBlb2Ygd2luZG93ICE9PSAndW5kZWZpbmVkJykge1xuICAgIHdpbmRvdy5EcmF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cm9wID0gJHRyaWdnZXJFbC5nZXRBdHRyaWJ1dGUoJ2RhdGEtZHJhd2VyLWJhY2tkcm9wJyk7XG4gICAgICAgICAgICB2YXIgZWRnZSA9ICR0cmlnZ2VyRWwuZ2V0QXR0cmlidXRlKCdkYXRhLWRyYXdlci1lZGdlJyk7XG4gICAgICAgICAgICB2YXIgZWRnZU9mZnNldCA9ICR0cmlnZ2VyRWwuZ2V0QXR0cmlidXRlKCdkYXRhLWRyYXdlci1lZGdlLW9mZnNldCcpO1xuICAgICAgICAgICAgaWYgKCFnZXREcmF3ZXJJbnN0YW5jZShkcmF3ZXJJZCwgZHJhd2VySW5zdGFuY2VzKSkge1xuICAgICAgICAgICAgICAgIGRyYXdlckluc3RhbmNlcy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGRyYXdlcklkLFxuICAgICAgICAgICAgICAgICAgICBvYmplY3Q6IG5ldyBEcmF3ZXIoJGRyYXdlckVsLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwbGFjZW1lbnQ6IHBsYWNlbWVudCA/IHBsYWNlbWVudCA6IERlZmF1bHQucGxhY2VtZW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgYm9keVNjcm9sbGluZzogYm9keVNjcm9sbGluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gYm9keVNjcm9sbGluZyA9PT0gJ3RydWUnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBEZWZhdWx0LmJvZHlTY3JvbGxpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZHJvcDogYmFja2Ryb3BcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGJhY2tkcm9wID09PSAndHJ1ZSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IERlZmF1bHQuYmFja2Ryb3AsXG4gICAgICAgICAgICAgICAgICAgICAgICBlZGdlOiBlZGdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBlZGdlID09PSAndHJ1ZSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IERlZmF1bHQuZWRnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVkZ2VPZmZzZXQ6IGVkZ2VPZmZzZXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGVkZ2VPZmZzZXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IERlZmF1bHQuZWRnZU9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRHJhd2VyIHdpdGggaWQgXCIuY29uY2F0KGRyYXdlcklkLCBcIiBub3QgZm91bmQuIEFyZSB5b3Ugc3VyZSB0aGF0IHRoZSBkYXRhLWRyYXdlci10YXJnZXQgYXR0cmlidXRlIHBvaW50cyB0byB0aGUgY29ycmVjdCBkcmF3ZXIgaWQ/XCIpKTtcbiAgICAgICAgfVxuICAgIH0pO1xuICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJ1tkYXRhLWRyYXdlci10b2dnbGVdJykuZm9yRWFjaChmdW5jdGlvbiAoJHRyaWdnZXJFbCkge1xuICAgICAgICB2YXIgZHJhd2VySWQgPSAkdHJpZ2dlckVsLmdldEF0dHJpYnV0ZSgnZGF0YS1kcmF3ZXItdG9nZ2xlJyk7XG4gICA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snKSB7XG4gICAgICAgICAgICB0cmlnZ2VyRXZlbnRzLnNob3dFdmVudHMuZm9yRWFjaChmdW5jdGlvbiAoZXYpIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5fdHJpZ2dlckVsLmFkZEV2ZW50TGlzdGVuZXIoZXYsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMudG9nZ2xlKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICAvLyBob3ZlciBldmVudCBoYW5kbGluZyBmb3IgdHJpZ2dlciBlbGVtZW50XG4gICAgICAgIGlmICh0aGlzLl9vcHRpb25zLnRyaWdnZXJUeXBlID09PSAnaG92ZXInKSB7XG4gICAgICAgICAgICB0cmlnZ2VyRXZlbnRzLnNob3dFdmVudHMuZm9yRWFjaChmdW5jdGlvbiAoZXYpIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5fdHJpZ2dlckVsLmFkZEV2ZW50TGlzdGVuZXIoZXYsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGV2ID09PSAnY2xpY2snKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy50b2dnbGUoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnNob3coKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIF90aGlzLl9vcHRpb25zLmRlbGF5KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIF90aGlzLl90YXJnZXRFbC5hZGRFdmVudExpc3RlbmVyKGV2LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLnNob3coKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdHJpZ2dlckV2ZW50cy5oaWRlRXZlbnRzLmZvckVhY2goZnVuY3Rpb24gKGV2KSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuX3RyaWdnZXJFbC5hZGRFdmVudExpc3RlbmVyKGV2LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFfdGhpcy5fdGFyZ2V0RWwubWF0Y2hlcygnOmhvdmVyJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5oaWRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIF90aGlzLl9vcHRpb25zLmRlbGF5KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBfdGhpcy5fdGFyZ2V0RWwuYWRkRXZlbnRMaXN0ZW5lcihldiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghX3RoaXMuX3RyaWdnZXJFbC5tYXRjaGVzKCc6aG92ZXInKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmhpZGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgX3RoaXMuX29wdGlvbnMuZGVsYXkpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIERyb3Bkb3duLnByb3RvdHlwZS5fY3JlYXRlUG9wcGVySW5zdGFuY2UgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiBjcmVhdGVQb3BwZXIodGhpcy5fdHJpZ2dlckVsLCB0aGlzLl90YXJnZXRFbCwge1xuICAgICAgICAgICAgcGxhY2VtZW50OiB0aGlzLl9vcHRpb25zLnBsYWNlbWVudCxcbiAgICAgICAgICAgIG1vZGlmaWVyczogW1xuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogJ29mZnNldCcsXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldDogW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29wdGlvbnMub2Zmc2V0U2tpZGRpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fb3B0aW9ucy5vZmZzZXREaXN0YW5jZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgRHJvcGRvd24ucHJvdG90eXBlLl9zZXR1cENsaWNrT3V0c2lkZUxpc3RlbmVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICB0aGlzLl9jbGlja091dHNpZGVFdmVudExpc3RlbmVyID0gZnVuY3Rpb24gKGV2KSB7XG4gICAgICAgICAgICBfdGhpcy5faGFuZGxlQ2xpY2tPdXRzaWRlKGV2LCBfdGhpcy5fdGFyZ2V0RWwpO1xuICAgICAgICB9O1xuICAgICAgICBkb2N1bWVudC5ib2R5LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgdGhpcy5fY2xpY2tPdXRzaWRlRXZlbnRMaXN0ZW5lciwgdHJ1ZSk7XG4gICAgfTtcbiAgICBEcm9wZG93bi5wcm90b3R5cGUuX3JlbW92ZUNsaWNrT3V0c2lkZUxpc3RlbmVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICBkb2N1bWVudC5ib2R5LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgdGhpcy5fY2xpY2tPdXRzaWRlRXZlbnRMaXN0ZW5lciwgdHJ1ZSk7XG4gICAgfTtcbiAgICBEcm9wZG93bi5wcm90b3R5cGUuX2hhbmRsZUNsaWNrT3V0c2lkZSA9IGZ1bmN0aW9uIChldiwgdGFyZ2V0RWwpIHtcbiAgICAgICAgdmFyIGNsaWNrZWRFbCA9IGV2LnRhcmdldDtcbiAgICAgICAgaWYgKGNsaWNrZWRFbCAhPT0gdGFyZ2V0RWwgJiZcbiAgICAgICAgICAgICF0YXJnZXRFbC5jb250YWlucyhjbGlja2VkRWwpICYmXG4gICAgICAgICAgICAhdGhpcy5fdHJpZ2dlckVsLmNvbnRhaW5zKGNsaWNrZWRFbCkgJiZcbiAgICAgICAgICAgIHRoaXMuaXNWaXNpYmxlKCkpIHtcbiAgICAgICAgICAgIHRoaXMuaGlkZSgpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBEcm9wZG93bi5wcm90b3R5cGUuX2dldFRyaWdnZXJFdmVudHMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHN3aXRjaCAodGhpcy5fb3B0aW9ucy50cmlnZ2VyVHlwZSkge1xuICAgICAgICAgICAgY2FzZSAnaG92ZXInOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFsnbW91c2VlbnRlcicsICdjbGljayddLFxuICAgICAgICAgICAgICAgICAgICBoaWRlRXZlbnRzOiBbJ21vdXNlbGVhdmUnXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgY2FzZSAnY2xpY2snOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFsnY2xpY2snXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogW10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgJ25vbmUnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFtdLFxuICAgICAgICAgICAgICAgICAgICBoaWRlRXZlbnRzOiBbXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ2NsaWNrJ10sXG4gICAgICAgICAgICAgICAgICAgIGhpZGVFdmVudHM6IFtdLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICB9O1xuICAgIERyb3Bkb3duLnByb3RvdHlwZS50b2dnbGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLmlzVmlzaWJsZSgpKSB7XG4gICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuc2hvdygpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuX29wdGlvbnMub25Ub2dnbGUodGhpcyk7XG4gICAgfTtcbiAgICBEcm9wZG93bi5wcm90b3R5cGUuaXNWaXNpYmxlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5fdmlzaWJsZTtcbiAgICB9O1xuICAgIERyb3Bkb3duLnByb3RvdHlwZS5zaG93ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB0aGlzLl90YXJnZXRFbC5jbGFzc0xpc3QucmVtb3ZlKCdoaWRkZW4nKTtcbiAgICAgICAgdGhpcy5fdGFyZ2V0RWwuY2xhc3NMaXN0LmFkZCgnYmxvY2snKTtcbiAgICAgICAgLy8gRW5hYmxlIHRoZSBldmVudCBsaXN0ZW5lcnNcbiAgICAgICAgdGhpcy5fcG9wcGVySW5zdGFuY2Uuc2V0T3B0aW9ucyhmdW5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G4gICAgICAgICAgICAodGFyZ2V0ID09PSB0aGlzLl9iYWNrZHJvcEVsICYmIHRoaXMuaXNWaXNpYmxlKCkpKSB7XG4gICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgTW9kYWwucHJvdG90eXBlLl9nZXRQbGFjZW1lbnRDbGFzc2VzID0gZnVuY3Rpb24gKCkge1xuICAgICAgICBzd2l0Y2ggKHRoaXMuX29wdGlvbnMucGxhY2VtZW50KSB7XG4gICAgICAgICAgICAvLyB0b3BcbiAgICAgICAgICAgIGNhc2UgJ3RvcC1sZWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gWydqdXN0aWZ5LXN0YXJ0JywgJ2l0ZW1zLXN0YXJ0J107XG4gICAgICAgICAgICBjYXNlICd0b3AtY2VudGVyJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gWydqdXN0aWZ5LWNlbnRlcicsICdpdGVtcy1zdGFydCddO1xuICAgICAgICAgICAgY2FzZSAndG9wLXJpZ2h0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gWydqdXN0aWZ5LWVuZCcsICdpdGVtcy1zdGFydCddO1xuICAgICAgICAgICAgLy8gY2VudGVyXG4gICAgICAgICAgICBjYXNlICdjZW50ZXItbGVmdCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIFsnanVzdGlmeS1zdGFydCcsICdpdGVtcy1jZW50ZXInXTtcbiAgICAgICAgICAgIGNhc2UgJ2NlbnRlcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIFsnanVzdGlmeS1jZW50ZXInLCAnaXRlbXMtY2VudGVyJ107XG4gICAgICAgICAgICBjYXNlICdjZW50ZXItcmlnaHQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBbJ2p1c3RpZnktZW5kJywgJ2l0ZW1zLWNlbnRlciddO1xuICAgICAgICAgICAgLy8gYm90dG9tXG4gICAgICAgICAgICBjYXNlICdib3R0b20tbGVmdCc6XG4gICAgICAgICAgIC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ICRtb2RhbEVsLmdldEF0dHJpYnV0ZSgnZGF0YS1tb2RhbC1wbGFjZW1lbnQnKTtcbiAgICAgICAgICAgIHZhciBiYWNrZHJvcCA9ICRtb2RhbEVsLmdldEF0dHJpYnV0ZSgnZGF0YS1tb2RhbC1iYWNrZHJvcCcpO1xuICAgICAgICAgICAgdmFyIG1vZGFsXzEgPSBnZXRNb2RhbEluc3RhbmNlKG1vZGFsSWQsIG1vZGFsSW5zdGFuY2VzKTtcbiAgICAgICAgICAgIGlmICghbW9kYWxfMSkge1xuICAgICAgICAgICAgICAgIG1vZGFsXzEgPSB7XG4gICAgICAgICAgICAgICAgICAgIGlkOiBtb2RhbElkLFxuICAgICAgICAgICAgICAgICAgICBvYmplY3Q6IG5ldyBNb2RhbCgkbW9kYWxFbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2VtZW50OiBwbGFjZW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHBsYWNlbWVudFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogRGVmYXVsdC5wbGFjZW1lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZHJvcDogYmFja2Ryb3AgPyBiYWNrZHJvcCA6IERlZmF1bHQuYmFja2Ryb3AsXG4gICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgbW9kYWxJbnN0YW5jZXMucHVzaChtb2RhbF8xKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgICR0cmlnZ2VyRWwuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgbW9kYWxfMS5vYmplY3QudG9nZ2xlKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJNb2RhbCB3aXRoIGlkIFwiLmNvbmNhdChtb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N0aW9uICgpIHtcbiAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgdmFyIHRyaWdnZXJFdmVudHMgPSB0aGlzLl9nZXRUcmlnZ2VyRXZlbnRzKCk7XG4gICAgICAgIHRyaWdnZXJFdmVudHMuc2hvd0V2ZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChldikge1xuICAgICAgICAgICAgX3RoaXMuX3RyaWdnZXJFbC5hZGRFdmVudExpc3RlbmVyKGV2LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuc2hvdygpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBfdGhpcy5fdGFyZ2V0RWwuYWRkRXZlbnRMaXN0ZW5lcihldiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIF90aGlzLnNob3coKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICAgICAgdHJpZ2dlckV2ZW50cy5oaWRlRXZlbnRzLmZvckVhY2goZnVuY3Rpb24gKGV2KSB7XG4gICAgICAgICAgICBfdGhpcy5fdHJpZ2dlckVsLmFkZEV2ZW50TGlzdGVuZXIoZXYsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFfdGhpcy5fdGFyZ2V0RWwubWF0Y2hlcygnOmhvdmVyJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmhpZGUoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIDEwMCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIF90aGlzLl90YXJnZXRFbC5hZGRFdmVudExpc3RlbmVyKGV2LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghX3RoaXMuX3RyaWdnZXJFbC5tYXRjaGVzKCc6aG92ZXInKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuaGlkZSgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgMTAwKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIFBvcG92ZXIucHJvdG90eXBlLl9jcmVhdGVQb3BwZXJJbnN0YW5jZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIGNyZWF0ZVBvcHBlcih0aGlzLl90cmlnZ2VyRWwsIHRoaXMuX3RhcmdldEVsLCB7XG4gICAgICAgICAgICBwbGFjZW1lbnQ6IHRoaXMuX29wdGlvbnMucGxhY2VtZW50LFxuICAgICAgICAgICAgbW9kaWZpZXJzOiBbXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBuYW1lOiAnb2Zmc2V0JyxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgb2Zmc2V0OiBbMCwgdGhpcy5fb3B0aW9ucy5vZmZzZXRdLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdLFxuICAgICAgICB9KTtcbiAgICB9O1xuICAgIFBvcG92ZXIucHJvdG90eXBlLl9nZXRUcmlnZ2VyRXZlbnRzID0gZnVuY3Rpb24gKCkge1xuICAgICAgICBzd2l0Y2ggKHRoaXMuX29wdGlvbnMudHJpZ2dlclR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgJ2hvdmVyJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ21vdXNlZW50ZXInLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydtb3VzZWxlYXZlJywgJ2JsdXInXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgY2FzZSAnY2xpY2snOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFsnY2xpY2snLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydmb2N1c291dCcsICdibHVyJ10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgJ25vbmUnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHNob3dFdmVudHM6IFtdLFxuICAgICAgICAgICAgICAgICAgICBoaWRlRXZlbnRzOiBbXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ21vdXNlZW50ZXInLCAnZm9jdXMnXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogWydtb3VzZWxlYXZlJywgJ2JsdXInXSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfTtcbiAgICBQb3BvdmVyLnByb3RvdHlwZS5fc2V0dXBLZXlkb3duTGlzdGVuZXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHRoaXMuX2tleWRvd25FdmVudExpc3RlbmVyID0gZnVuY3Rpb24gKGV2KSB7XG4gICAgICAgICAgICBpZiAoZXYua2V5ID09PSAnRXNjYXBlJykge1xuICAgICAgICAgICAgICAgIF90aGlzLmhpZGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgZG9jdW1lbnQuYm9keS5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJywgdGhpcy5fa2V5ZG93bkV2ZW50TGlzdGVuZXIsIHRydWUpO1xuICAgIH07XG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AgICAgIHRyaWdnZXJFdmVudHMuaGlkZUV2ZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChldikge1xuICAgICAgICAgICAgX3RoaXMuX3RyaWdnZXJFbC5hZGRFdmVudExpc3RlbmVyKGV2LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuaGlkZSgpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgVG9vbHRpcC5wcm90b3R5cGUuX2NyZWF0ZVBvcHBlckluc3RhbmNlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gY3JlYXRlUG9wcGVyKHRoaXMuX3RyaWdnZXJFbCwgdGhpcy5fdGFyZ2V0RWwsIHtcbiAgICAgICAgICAgIHBsYWNlbWVudDogdGhpcy5fb3B0aW9ucy5wbGFjZW1lbnQsXG4gICAgICAgICAgICBtb2RpZmllcnM6IFtcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWU6ICdvZmZzZXQnLFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQ6IFswLCA4XSxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXSxcbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICBUb29sdGlwLnByb3RvdHlwZS5fZ2V0VHJpZ2dlckV2ZW50cyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgc3dpdGNoICh0aGlzLl9vcHRpb25zLnRyaWdnZXJUeXBlKSB7XG4gICAgICAgICAgICBjYXNlICdob3Zlcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgc2hvd0V2ZW50czogWydtb3VzZWVudGVyJywgJ2ZvY3VzJ10sXG4gICAgICAgICAgICAgICAgICAgIGhpZGVFdmVudHM6IFsnbW91c2VsZWF2ZScsICdibHVyJ10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNhc2UgJ2NsaWNrJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbJ2NsaWNrJywgJ2ZvY3VzJ10sXG4gICAgICAgICAgICAgICAgICAgIGhpZGVFdmVudHM6IFsnZm9jdXNvdXQnLCAnYmx1ciddLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICBjYXNlICdub25lJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBzaG93RXZlbnRzOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV2ZW50czogW10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgc2hvd0V2ZW50czogWydtb3VzZWVudGVyJywgJ2ZvY3VzJ10sXG4gICAgICAgICAgICAgICAgICAgIGhpZGVFdmVudHM6IFsnbW91c2VsZWF2ZScsICdibHVyJ10sXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgVG9vbHRpcC5wcm90b3R5cGUuX3NldHVwS2V5ZG93bkxpc3RlbmVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICB0aGlzLl9rZXlkb3duRXZlbnRMaXN0ZW5lciA9IGZ1bmN0aW9uIChldikge1xuICAgICAgICAgICAgaWYgKGV2LmtleSA9PT0gJ0VzY2FwZScpIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5oaWRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIGRvY3VtZW50LmJvZHkuYWRkRXZlbnRMaXN0ZW5lcigna2V5ZG93bicsIHRoaXMuX2tleWRvd25FdmVudExpc3RlbmVyL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bmN0aW9uIF9fd2VicGFja19yZXF1aXJlX18obW9kdWxlSWQpIHtcbiAgICAgIC8qKioqKiovXG4gICAgICAvKioqKioqLyAvLyBDaGVjayBpZiBtb2R1bGUgaXMgaW4gY2FjaGVcbiAgICAgIC8qKioqKiovIGlmIChpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXSkge1xuICAgICAgICAvKioqKioqLyByZXR1cm4gaW5zdGFsbGVkTW9kdWxlc1ttb2R1bGVJZF0uZXhwb3J0cztcbiAgICAgICAgLyoqKioqKi9cbiAgICAgIH1cbiAgICAgIC8qKioqKiovIC8vIENyZWF0ZSBhIG5ldyBtb2R1bGUgKGFuZCBwdXQgaXQgaW50byB0aGUgY2FjaGUpXG4gICAgICAvKioqKioqLyB2YXIgbW9kdWxlID0gKGluc3RhbGxlZE1vZHVsZXNbbW9kdWxlSWRdID0ge1xuICAgICAgICAvKioqKioqLyBpOiBtb2R1bGVJZCxcbiAgICAgICAgLyoqKioqKi8gbDogZmFsc2UsXG4gICAgICAgIC8qKioqKiovIGV4cG9ydHM6IHt9LFxuICAgICAgICAvKioqKioqL1xuICAgICAgfSk7XG4gICAgICAvKioqKioqL1xuICAgICAgLyoqKioqKi8gLy8gRXhlY3V0ZSB0aGUgbW9kdWxlIGZ1bmN0aW9uXG4gICAgICAvKioqKioqLyBtb2R1bGVzW21vZHVsZUlkXS5jYWxsKFxuICAgICAgICBtb2R1bGUuZXhwb3J0cyxcbiAgICAgICAgbW9kdWxlLFxuICAgICAgICBtb2R1bGUuZXhwb3J0cyxcbiAgICAgICAgX193ZWJwYWNrX3JlcXVpcmVfXyxcbiAgICAgICk7XG4gICAgICAvKioqKioqL1xuICAgICAgLyoqKioqKi8gLy8gRmxhZyB0aGUgbW9kdWxlIGFzIGxvYWRlZFxuICAgICAgLyoqKioqKi8gbW9kdWxlLmwgPSB0cnVlO1xuICAgICAgLyoqKioqKi9cbiAgICAgIC8qKioqKiovIC8vIFJldHVybiB0aGUgZXhwb3J0cyB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YW5kIHJldHVybiBleHBvcnRzXG4gICAgLyoqKioqKi8gcmV0dXJuIF9fd2VicGFja19yZXF1aXJlX18oKF9fd2VicGFja19yZXF1aXJlX18ucyA9IDEwOSkpO1xuICAgIC8qKioqKiovXG4gIH0pKFxuICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4gICAgLyoqKioqKi8gW1xuICAgICAgLyogMCAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge3ZhbHVlOiB0cnVlfSk7XG4gICAgICAgIHZhciBjb250YWluZXJfMSA9IF9fd2VicGFja19yZXF1aXJlX18oMTcpO1xuICAgICAgICB2YXIgZm9ybWF0XzEgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDE4KTtcbiAgICAgICAgdmFyIGxlYWZfMSA9IF9fd2VicGFja19yZXF1aXJlX18oMTkpO1xuICAgICAgICB2YXIgc2Nyb2xsXzEgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDQ1KTtcbiAgICAgICAgdmFyIGlubGluZV8xID0gX193ZWJwYWNrX3JlcXVpcmVfXyg0Nik7XG4gICAgICAgIHZhciBibG9ja18xID0gX193ZWJwYWNrX3JlcXVpcmVfXyg0Nyk7XG4gICAgICAgIHZhciBlbWJlZF8xID0gX193ZWJwYWNrX3JlcXVpcmVfXyg0OCk7XG4gICAgICAgIHZhciB0ZXh0XzEgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDQ5KTtcbiAgICAgICAgdmFyIGF0dHJpYnV0b3JfMSA9IF9fd2VicGFja19yZXF1aXJlX18oMTIpO1xuICAgICAgICB2YXIgY2xhc3NfMSA9IF9fd2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x0LFxuICAgICAgICAgIH0sXG4gICAgICAgIH07XG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IFBhcmNobWVudDtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDEgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgICAgIHZhciBfX2V4dGVuZHMgPVxuICAgICAgICAgICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fFxuICAgICAgICAgIChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZXh0ZW5kU3RhdGljcyA9XG4gICAgICAgICAgICAgIE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fFxuICAgICAgICAgICAgICAoe19fcHJvdG9fXzogW119IGluc3RhbmNlb2YgQXJyYXkgJiZcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICAgICAgICAgICAgZC5fX3Byb3RvX18gPSBiO1xuICAgICAgICAgICAgICAgIH0pIHx8XG4gICAgICAgICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgcCBpbiBiKSBpZiAoYi5oYXNPd25Qcm9wZXJ0eShwKSkgZFtwXSA9IGJbcF07XG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTtcbiAgICAgICAgICAgICAgZnVuY3Rpb24gX18oKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jb25zdHJ1Y3RvciA9IGQ7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgZC5wcm90b3R5cGUgPVxuICAgICAgICAgICAgICAgIGIgPT09IG51bGxcbiAgICAgICAgICAgICAgICAgID8gT2JqZWN0LmNyZWF0ZShiKVxuICAgICAgICAgICAgICAgICAgOiAoKF9fLnByb3RvdHlwZSA9IGIucHJvdG90eXBlKSwgbmV3IF9fKCkpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9KSgpO1xuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgJ19fZXNNb2R1bGUnLCB7dmFsdWU6IHRydWV9KTtcbiAgICAgICAgdmFyIFBhcmNobWVudEVycm9yID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgICAgICAgIF9fZXh0ZW5kcyhQYXJjaG1lbnRFcnJvciwgX3N1cGVyKTtcbiAgICAgICAgICBmdW5jdGlvbiBQYXJjaG1lbnRFcnJvcihtZXNzYWdlKSB7XG4gICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICAgICAgbWVzc2FnZSA9ICdbUGFyY2htZW50XSAnICsgbWVzc2FnZTtcbiAgICAgICAgICAgIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgbWVzc2FnZSkgfHwgdGhpcztcbiAgICAgICAgICAgIF90aGlzLm1lc3NhZ2UgPSBtZXNzYWdlO1xuICAgICAgICAgICAgX3RoaXMubmFtZSA9IF90aGlzLmNvbnN0cnVjdG9yLm5hbWU7XG4gICAgICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBQYXJjaG1lbnRFcnJvcjtcbiAgICAgICAgfSkoRXJyb3IpO1xuICAgICAgICBleHBvcnRzLlBhcmNobWVudEVycm9yID0gUGFyY2htZW50RXJyb3I7XG4gICAgICAgIHZhciBhdHRyaWJ1dGVzID0ge307XG4gICAgICAgIHZhciBjbGFzc2VzID0ge307XG4gICAgICAgIHZhciB0YWdzID0ge307XG4gICAgICAgIHZhciB0eXBlcyA9IHt9O1xuICAgICAgICBleHBvcnRzLkRBVEFfS0VZID0gJ19fYmxvdCc7XG4g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xsKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgUGFyY2htZW50RXJyb3IoJ1VuYWJsZSB0byBjcmVhdGUgJyArIGlucHV0ICsgJyBibG90Jyk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciBCbG90Q2xhc3MgPSBtYXRjaDtcbiAgICAgICAgICB2YXIgbm9kZSA9XG4gICAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgICBpbnB1dCBpbnN0YW5jZW9mIE5vZGUgfHwgaW5wdXRbJ25vZGVUeXBlJ10gPT09IE5vZGUuVEVYVF9OT0RFXG4gICAgICAgICAgICAgID8gaW5wdXRcbiAgICAgICAgICAgICAgOiBCbG90Q2xhc3MuY3JlYXRlKHZhbHVlKTtcbiAgICAgICAgICByZXR1cm4gbmV3IEJsb3RDbGFzcyhub2RlLCB2YWx1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgZXhwb3J0cy5jcmVhdGUgPSBjcmVhdGU7XG4gICAgICAgIGZ1bmN0aW9uIGZpbmQobm9kZSwgYnViYmxlKSB7XG4gICAgICAgICAgaWYgKGJ1YmJsZSA9PT0gdm9pZCAwKSB7XG4gICAgICAgICAgICBidWJibGUgPSBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKG5vZGUgPT0gbnVsbCkgcmV0dXJuIG51bGw7XG4gICAgICAgICAgLy8gQHRzLWlnbm9yZVxuICAgICAgICAgIGlmIChub2RlW2V4cG9ydHMuREFUQV9LRVldICE9IG51bGwpXG4gICAgICAgICAgICByZXR1cm4gbm9kZVtleHBvcnRzLkRBVEFfS0VZXS5ibG90O1xuICAgICAgICAgIGlmIChidWJibGUpIHJldHVybiBmaW5kKG5vZGUucGFyZW50Tm9kZSwgYnViYmxlKTtcbiAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICBleHBvcnRzLmZpbmQgPSBmaW5kO1xuICAgICAgICBmdW5jdGlvbiBxdWVyeShxdWVyeSwgc2NvcGUpIHtcbiAgICAgICAgICBpZiAoc2NvcGUgPT09IHZvaWQgMCkge1xuICAgICAgICAgICAgc2NvcGUgPSBTY29wZS5BTlk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciBtYXRjaDtcbiAgICAgICAgICBpZiAodHlwZW9mIHF1ZXJ5ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgbWF0Y2ggPSB0eXBlc1txdWVyeV0gfHwgYXR0cmlidXRlc1txdWVyeV07XG4gICAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgIHF1ZXJ5IGluc3RhbmNlb2YgVGV4dCB8fFxuICAgICAgICAgICAgcXVlcnlbJ25vZGVUeXBlJ10gPT09IE5vZGUuVEVYVF9OT0RFXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICBtYXRjaCA9IHR5cGVzWyd0ZXh0J107XG4gICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgcXVlcnkgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICBpZiAocXVlcnkgJiBTY29wZS5MRVZFTCAmIFNjb3BlLkJMT0NLKSB7XG4gICAgICAgICAgICAgIG1hdGNoID0gdHlwZXNbJ2Jsb2NrJ107XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHF1ZXJ5ICYgU2NvcGUuTEVWRUwgJiBTY29wZS5JTkxJTkUpIHtcbiAgICAgICAgICAgICAgbWF0Y2ggPSB0eXBlc1snaW5saW5lJ107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmIChxdWVyeSBpbnN0YW5jZW9mIEhUTUxFbGVtZW50KSB7XG4gICAgICAgICAgICB2YXIgbmFtZXMgPSAocXVlcnkuZ2V0QXR0cmlidXRlKCdjbGFzcycpIHx8ICcnKS5zcGxpdCgvXFxzKy8pO1xuICAgICAgICAgICAgZm9yICh2YXIgaSBpbiBuYW1lcykge1xuICAgICAgICAgICAgICBtYXRjaCA9IGNsYXNzZXNbbmFtZXNbaV1dO1xuICAgICAgICAgICAgICBpZiAobWF0Y2gpIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbWF0Y2ggPSBtYXRjaCB8fCB0YWdzW3F1ZXJ5LnRhZ05hbWVdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAobWF0Y2ggPT0gbnVsbCkgcmV0dXJuIG51bGw7XG4gICAgICAgICAgLy8gQHRzLWlnbm9yZVxuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgIHNjb3BlICYgU2NvcGUuTEVWRUwgJiBtYXRjaC5zY29wZSAmJlxuICAgICAgICAgICAgc2NvcGUgJiBTY29wZS5UWVBFICYgbWF0Y2guc2NvcGVcbiAgICAgICAgICApXG4gICAgICAgICAgICByZXR1cm4gbWF0Y2g7XG4gICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgZXhwb3J0cy5xdWVyeSA9IHF1ZXJ5O1xuICAgICAgICBmdW5jdGlvbiByZWdpc3RlcigpIHtcbiAgICAgICAgICB2YXIgRGVmaW5pdGlvbnMgPSBbXTtcbiAgICAgICAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgRGVmaW5pdGlvbnNbX2ldID0gYXJndW1lbnRzW19pXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKERlZmluaXRpb25zLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgIHJldHVybiBEZWZpbml0aW9ucy5tYXAoZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHJlZ2lzdGVyKGQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciBEZWZpbml0aW9uID0gRGVmaW5pdGlvbnNbMF07XG4gICAgICAgICAgaWYgKFxuICAgICAgICAgICAgdHlwZW9mIERlZmluaXRpb24uYmxvdE5hbWUgIT09ICdzdHJpbmcnICYmXG4gICAgICAgICAgICB0eXBlb2YgRGVmaW5pdGlvbi5hdHRyTmFtZSAhPT0gJ3N0cmluZydcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBQYXJjaG1lbnRFcnJvcignSW52YWxpZCBkZWZpbml0aW9uJyk7XG4gICAgICAgICAgfSBlbHNlIGlmIChEZWZpbml0aW9uLmJsb3ROYW1lID09PSAnYWJzdHJhY3QnKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgUGFyY2htZW50RXJyb3IoJ0Nhbm5vdCByZWdpc3RlciBhYnN0cmFjdCBjbGFzcycpO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0eXBlc1tEZWZpbml0aW9uLmJsb3ROYW1lIHx8IERlZmluaXRpb24uYXR0ck5hbWVdID0gRGVmaW5pdGlvbjtcbiAgICAgICAgICBpZiAodHlwZW9mIERlZmluaXRpb24ua2V5TmFtZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGF0dHJpYnV0ZXNbRGVmaW5pdGlvbi5rZXlOYW1lXSA9IERlZmluaXRpb247XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChEZWZpbml0aW9uLmNsYXNzTmFtZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIGNsYXNzZXNbRGVmaW5pdGlvbi5jbGFzc05hbWVdID0gRGVmaW5pdGlvbjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChEZWZpbml0aW9uLnRhZ05hbWUgIT0gbnVsbCkge1xuICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShEZWZpbml0aW9uLnRhZ05hbWUpKSB7XG4gICAgICAgICAgICAgICAgRGVmaW5pdGlvbi50YWdOYW1lID0gRGVmaW5pdGlvbi50YWdOYW1lLm1hcChmdW5jdGlvbiAodGFnTmFtZSkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHRhZ05hbWUudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBEZWZpbml0aW9uLnRhZ05hbWUgPSBEZWZpbml0aW9uLnRhZ05hbWUudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB2YXIgdGFnTmFtZXMgPSBBcnJheS5pc0FycmF5KERlZmluaXRpb24udGFnTmFtZSlcbiAgICAgICAgICAgICAgICA/IERlZmluaXRpb24udGFnTmFtZVxuICAgICAgICAgICAgICAgIDogW0RlZmluaXRpb24udGFnTmFtZV07XG4gICAgICAgICAgICAgIHRhZ05hbWVzLmZvckVhY2goZnVuY3Rpb24gKHRhZykge1xuICAgICAgICAgICAgICAgIGlmICh0YWdzW3RhZ10gPT0gbnVsbCB8fCBEZWZpbml0aW9uLmNsYXNzTmFtZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICB0YWdzW3RhZ10gPSBEZWZpbml0aW9uO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBEZWZpbml0aW9uO1xuICAgICAgICB9XG4gICAgICAgIGV4cG9ydHMucmVnaXN0ZXIgPSByZWdpc3RlcjtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDIgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcbiAgICAgICAgdmFyIGRpZmYgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDUxKTtcbiAgICAgICAgdmFyIGVxdWFsID0gX193ZWJwYWNrX3JlcXVpcmVfXygxMSk7XG4gICAgICAgIHZhciBleHRlbmQgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDMpO1xuICAgICAgICB2YXIgb3AgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDIwKTtcblxuICAgICAgICB2YXIgTlVMTF9DSEFSQUNURVIgPSBTdHJpbmcuZnJvbUNoYXJDb2RlKDApOyAvLyBQbGFjZWhvbGRlciBjaGFyIGZvciBlbWJlZCBpbiBkaWZmKClcblxuICAgICAgICB2YXIgRGVsdGEgPSBmdW5jdGlvbiAob3BzKSB7XG4gICAgICAgICAgLy8gQXNzdW1lIHdlIGFyZSBnaXZlbiBhIHdlbGwgZm9ybWVkIG9wc1xuICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KG9wcykpIHtcbiAgICAgICAgICAgIHRoaXMub3BzID0gb3BzO1xuICAgICAgICAgIH0gZWxzZSBpZiAob3BzICE9IG51bGwgJiYgQXJyYXkuaXNBcnJheShvcHMub3BzKSkge1xuICAgICAgICAgICAgdGhpcy5vcHMgPSBvcHMub3BzO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLm9wcyA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICBEZWx0YS5wcm90b3R5cGUuaW5zZXJ0ID0gZnVuY3Rpb24gKHRleHQsIGF0dHJpYnV0ZXMpIHtcbiAgICAgICAgICB2YXIgbmV3T3AgPSB7fTtcbiAgICAgICAgICBpZiAodGV4dC5sZW5ndGggPT09IDApIHJldHVybiB0aGlzO1xuICAgICAgICAgIG5ld09wLmluc2VydCA9IHRleHQ7XG4gICAgICAgICAgaWYgKFxuICAgICAgICAgICAgYXR0cmlidXRlcyAhPSBudWxsICYmXG4gICAgICAgICAgICB0eXBlb2YgYXR0cmlidXRlcyA9PT0gJ29iamVjdCcgJiZcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKGF0dHJpYnV0ZXMpLmxlbmd0aCA+IDBcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIG5ld09wLmF0dHJpYnV0ZXMgPSBhdHRyaWJ1dGVzO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gdGhpcy5wdXNoKG5ld09wKTtcbiAgICAgICAgfTtcblxuICAgICAgICBEZWx0YS5wcm90b3R5cGVbJ2RlbGV0ZSddID0gZnVuY3Rpb24gKGxlbmd0aCkge1xuICAgICAgICAgIGlmIChsZW5ndGggPD0gMCkgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgcmV0dXJuIHRoaXMucHVzaCh7ZGVsZXRlOiBsZW5ndGh9KTtcbiAgICAgICAgfTtcblxuICAgICAgICBEZWx0YS5wcm90b3R5cGUucmV0YWluID0gZnVuY3Rpb24gKGxlbmd0aCwgYXR0cmlidXRlcykge1xuICAgICAgICAgIGlmIChsZW5ndGggPD0gMCkgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgdmFyIG5ld09wID0ge3JldGFpbjogbGVuZ3RofTtcbiAgICAgICAgICBpZiAoXG4gICAgICAgICAgICBhdHRyaWJ1dGVzICE9IG51bGwgJiZcbiAgICAgICAgICAgIHR5cGVvZiBhdHRyaWJ1dGVzID09PSAnb2JqZWN0JyAmJlxuICAgICAgICAgICAgT2JqZWN0LmtleXMoYXR0cmlidXRlcykubGVuZ3RoID4gMFxuICAgICAgICAgICkge1xuICAgICAgICAgICAgbmV3T3AuYXR0cmlidXRlcyA9IGF0dHJpYnV0ZXM7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiB0aGlzLnB1c2gobmV3T3ApO1xuICAgICAgICB9O1xuXG4gICAgICAgIERlbHRhLnByb3RvdHlwZS5wdXNoID0gZnVuY3Rpb24gKG5ld09wKSB7XG4gICAgICAgICAgdmFyIGluZGV4ID0gdGhpcy5vcHMubGVuZ3RoO1xuICAgICAgICAgIHZhciBsYXN0T3AgPSB0aGlzLm9wc1tpbmRleCAtIDFdO1xuICAgICAgICAgIG5ld09wID0gZXh0ZW5kKHRydWUsIHt9LCBuZXdPcCk7XG4gICAgICAgICAgaWYgKHR5cGVvZiBsYXN0T3AgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgIHR5cGVvZiBuZXdPcFsnZGVsZXRlJ10gPT09ICdudW1iZXInICYmXG4gICAgICAgICAgICAgIHR5cGVvZiBsYXN0T3BbJ2RlbGV0ZSddID09PSAnbnVtYmVyJ1xuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIHRoaXMub3BzW2luZGV4IC0gMV0gPSB7XG4gICAgICAgICAgICAgICAgZGVsZXRlOiBsYXN0T3BbJ2RlbGV0ZSddICsgbmV3T3BbJ2RlbGV0ZSddLFxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFNpbmNlIGl0IGRvZXMgbm90IG1hdHRlciBpZiB3ZSBpbnNlcnQgYmVmb3JlIG9yIGFmdGVyIGRlbGV0aW5nIGF0IHRoZSBzYW1lIGluZGV4LFxuICAgICAgICAgICAgLy8gYWx3YXlzIHByZWZlciB0byBpbnNlcnQgZmlyc3RcbiAgICAgICAgICAgIGlmICh0eXBlb2YgbGFzdE9wWydkZWxldGUnXSA9PT0gJ251bWJlcicgJiYgbmV3T3AuaW5zZXJ0ICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgaW5kZXggLT0gMTtcbiAgICAgICAgICAgICAgbGFzdE9wID0gdGhpcy5vcHNbaW5kZXggLSAxXTtcbiAgICAgICAgICAgICAgaWYgKHR5cGVvZiBsYXN0T3AgIT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5vcHMudW5zaGlmdChuZXdPcCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChlcXVhbChuZXdPcC5hdHRyaWJ1dGVzLCBsYXN0T3AuYXR0cmlidXRlcykpIHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIHR5cGVvZiBuZXdPcC5pbnNlcnQgPT09ICdzdHJpbmcnICYmXG4gICAgICAgICAgICAgICAgdHlwZW9mIGxhc3RPcC5pbnNlcnQgPT09ICdzdHJpbmcnXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIHRoaXMub3BzW2luZGV4IC0gMV0gPSB7aW5zZXJ0OiBsYXN0T3AuaW5zZXJ0ICsgbmV3T3AuaW5zZXJ0fTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG5ld09wLmF0dHJpYnV0ZXMgPT09ICdvYmplY3QnKVxuICAgICAgICAgICAgICAgICAgdGhpcy5vcHNbaW5kZXggLSAxXS5hdHRyaWJ1dGVzID0gbmV3T3AuYXR0cmlidXRlcztcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICB0eXBlb2YgbmV3T3AucmV0YWluID09PSAnbnVtYmVyJyAmJlxuICAgICAgICAgICAgICAgIHR5cGVvZiBsYXN0T3AucmV0YWluID09PSAnbnVtYmVyJ1xuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICB0aGlzLm9wc1tpbmRleCAtIDFdID0ge3JldGFpbjogbGFzdE9wLnJldGFpbiArIG5ld09wLnJldGFpbn07XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBuZXdPcC5hdHRyaWJ1dGVzID09PSAnb2JqZWN0JylcbiAgICAgICAgICAgICAgICAgIHRoaXMub3BzW2luZGV4IC0gMV0uYXR0cmlidXRlcyA9IG5ld09wLmF0dHJpYnV0ZXM7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGluZGV4ID09PSB0aGlzLm9wcy5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRoaXMub3BzLnB1c2gobmV3T3ApO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgIC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uIChzdGFydCwgZW5kKSB7XG4gICAgICAgICAgc3RhcnQgPSBzdGFydCB8fCAwO1xuICAgICAgICAgIGlmICh0eXBlb2YgZW5kICE9PSAnbnVtYmVyJykgZW5kID0gSW5maW5pdHk7XG4gICAgICAgICAgdmFyIG9wcyA9IFtdO1xuICAgICAgICAgIHZhciBpdGVyID0gb3AuaXRlcmF0b3IodGhpcy5vcHMpO1xuICAgICAgICAgIHZhciBpbmRleCA9IDA7XG4gICAgICAgICAgd2hpbGUgKGluZGV4IDwgZW5kICYmIGl0ZXIuaGFzTmV4dCgpKSB7XG4gICAgICAgICAgICB2YXIgbmV4dE9wO1xuICAgICAgICAgICAgaWYgKGluZGV4IDwgc3RhcnQpIHtcbiAgICAgICAgICAgICAgbmV4dE9wID0gaXRlci5uZXh0KHN0YXJ0IC0gaW5kZXgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgbmV4dE9wID0gaXRlci5uZXh0KGVuZCAtIGluZGV4KTtcbiAgICAgICAgICAgICAgb3BzLnB1c2gobmV4dE9wKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGluZGV4ICs9IG9wLmxlbmd0aChuZXh0T3ApO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gbmV3IERlbHRhKG9wcyk7XG4gICAgICAgIH07XG5cbiAgICAgICAgRGVsdGEucHJvdG90eXBlLmNvbXBvc2UgPSBmdW5jdGlvbiAob3RoZXIpIHtcbiAgICAgICAgICB2YXIgdGhpc0l0ZXIgPSBvcC5pdGVyYXRvcih0aGlzLm9wcyk7XG4gICAgICAgICAgdmFyIG90aGVySXRlciA9IG9wLml0ZXJhdG9yKG90aGVyLm9wcyk7XG4gICAgICAgICAgdmFyIGRlbHRhID0gbmV3IERlbHRhKCk7XG4gICAgICAgICAgd2hpbGUgKHRoaXNJdGVyLmhhc05leHQoKSB8fCBvdGhlckl0ZXIuaGFzTmV4dCgpKSB7XG4gICAgICAgICAgICBpZiAob3RoZXJJdGVyLnBlZWtUeXBlKCkgPT09ICdpbnNlcnQnKSB7XG4gICAgICAgICAgICAgIGRlbHRhLnB1c2gob3RoZXJJdGVyLm5leHQoKSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXNJdGVyLnBlZWtUeXBlKCkgPT09ICdkZWxldGUnKSB7XG4gICAgICAgICAgICAgIGRlbHRhLnB1c2godGhpc0l0ZXIubmV4dCgpKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHZhciBsZW5ndGggPSBNYXRoLm1pbihcbiAgICAgICAgICAgICAgICB0aGlzSXRlci5wZWVrTGVuZ3RoKCksXG4gICAgICAgICAgICAgICAgb3RoZXJJdGVyLnBlZWtMZW5ndGgoKSxcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgdmFyIHRoaXNPcCA9IHRoaXNJdGVyLm5leHQobGVuZ3RoKTtcbiAgICAgICAgICAgICAgdmFyIG90aGVyT3AgPSBvdGhlckl0ZXIubmV4dChsZW5ndGgpO1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIG90aGVyT3AucmV0YWluID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICAgIHZhciBuZXdPcCA9IHt9O1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdGhpc09wLnJldGFpbiA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICAgIG5ld09wLnJldGFpbiA9IGxlbmd0aDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgbmV3T3AuaW5zZXJ0ID0gdGhpc09wLmluc2VydDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gUHJlc2VydmUgbnVsbCB3aGVuIGNvbXBvc2luZyB3aXRoIGEgcmV0YWluLCBvdGhlcndpc2UgcmVtb3ZlIGl0IGZvciBpbnNlcnRzXG4gICAgICAgICAgICAgICAgdmFyIGF0dHJpYnV0ZXMgPSBvcC5hdHRyaWJ1dGVzLmNvbXBvc2UoXG4gICAgICAgICAgICAgICAgICB0aGlzT3AuYXR0cmlidXRlcyxcbiAgICAgICAgICAgICAgICAgIG90aGVyT3AuYXR0cmlidXRlcyxcbiAgICAgICAgICAgICAgICAgIHR5cGVvZiB0aGlzT3AucmV0YWluID09PSAnbnVtYmVyJyxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGlmIChhdHRyaWJ1dGVzKSBuZXdPcC5hdHRyaWJ1dGVzID0gYXR0cmlidXRlcztcbiAgICAgICAgICAgICAgICBkZWx0YS5wdXNoKG5ld09wKTtcbiAgICAgICAgICAgICAgICAvLyBPdGhlciBvcCBzaG91bGQgYmUgZGVsZXRlLCB3ZSBjb3VsZCBiZSBhbiBpbnNlcnQgb3IgcmV0YWluXG4gICAgICAgICAgICAgICAgLy8gSW5zZXJ0ICsgZGVsZXRlIGNhbmNlbHMgb3V0XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgdHlwZW9mIG90aGVyT3BbJ2RlbGV0ZSddID09PSAnbnVtYmVyJyAmJlxuICAgICAgICAgICAgICAgIHR5cGVvZiB0aGlzT3AucmV0YWluID09PSAnbnVtYmVyJ1xuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBkZWx0YS5wdXNoKG90aGVyT3ApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBkZWx0YS5jaG9wKCk7XG4gICAgICAgIH07XG5cbiAgICAgICAgRGVsdGEucHJvdG90eXBlLmNvbmNhdCA9IGZ1bmN0aW9uIChvdGhlcikge1xuICAgICAgICAgIHZhciBkZWx0YSA9IG5ldyBEZWx0YSh0aGlzLm9wcy5zbGljZSgpKTtcbiAgICAgICAgICBpZiAob3RoZXIub3BzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIGRlbHRhLnB1c2gob3RoZXIub3BzWzBdKTtcbiAgICAgICAgICAgIGRlbHRhLm9wcyA9IGRlbHRhLm9wcy5jb25jYXQob3RoZXIub3BzLnNsaWNlKDEpKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGRlbHRhO1xuICAgICAgICB9O1xuXG4gICAgICAgIERlbHRhLnByb3RvdHlwZS5kaWZmID0gZnVuY3Rpb24gKG90aGVyLCBpbmRleCkge1xuICAgICAgICAgIGlmICh0aGlzLm9wcyA9PT0gb3RoZXIub3BzKSB7XG4gICAgICAgICAgICByZXR1cm4gbmV3IERlbHRhKCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciBzdHJpbmdzID0gW3RoaXMsIG90aGVyXS5tYXAoZnVuY3Rpb24gKGRlbHRhKSB7XG4gICAgICAgICAgICByZXR1cm4gZGVsdGFcbiAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAob3ApIHtcbiAgICAgICAgICAgICAgICBpZiAob3AuaW5zZXJ0ICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiB0eXBlb2Ygb3AuaW5zZXJ0ID09PSAnc3RyaW5nJ1xuICAgICAgICAgICAgICAgICAgICA/IG9wLmluc2VydFxuICAgICAgICAgICAgICAgICAgICA6IE5VTExfQ0hBUkFDVEVSO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgcHJlcCA9IGRlbHRhID09PSBvdGhlciA/ICdvbicgOiAnd2l0aCc7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdkaWZmKCkgY2FsbGVkICcgKyBwcmVwICsgJyBub24tZG9jdW1lbnQnKTtcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgLmpvaW4oJycpO1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHZhciBkZWx0YSA9IG5ldyBEZWx0YSgpO1xuICAgICAgICAgIHZhciBkaWZmUmVzdWx0ID0gZGlmZihzdHJpbmdzWzBdLCBzdHJpbmdzWzFdLCBpbmRleCk7XG4gICAgICAgICAgdmFyIHRoaXNJdGVyID0gb3AuaXRlcmF0b3IodGhpcy5vcHMpO1xuICAgICAgICAgIHZhciBvdGhlckl0ZXIgPSBvcC5pdGVyYXRvcihvdGhlci5vcHMpO1xuICAgICAgICAgIGRpZmZSZXN1bHQuZm9yRWFjaChmdW5jdGlvbiAoY29tcG9uZW50KSB7XG4gICAgICAgICAgICB2YXIgbGVuZ3RoID0gY29tcG9uZW50WzFdLmxlbmd0aDtcbiAgICAgICAgICAgIHdoaWxlIChsZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgIHZhciBvcExlbmd0aCA9IDA7XG4gICAgICAgICAgICAgIHN3aXRjaCAoY29tcG9uZW50WzBdKSB7XG4gICAgICAgICAgICAgICAgY2FzZSBkaWZmLklOU0VSVDpcbiAgICAgICAgICAgICAgICAgIG9wTGVuZ3RoID0gTWF0aC5taW4ob3RoZXJJdGVyLnBlZWtMZW5ndGgoKSwgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgIGRlbHRhLnB1c2gob3RoZXJJdGVyLm5leHQob3BMZW5ndGgpKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgZGlmZi5ERUxFVEU6XG4gICAgICAgICAgICAgICAgICBvcExlbmd0aCA9IE1hdGgubWluKGxlbmd0aCwgdGhpc0l0ZXIucGVla0xlbmd0aCgpKTtcbiAgICAgICAgICAgICAgICAgIHRoaXNJdGVyLm5leHQob3BMZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgZGVsdGFbJ2RlbGV0ZSddKG9wTGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgZGlmZi5FUVVBTDpcbiAgICAgICAgICAgICAgICAgIG9wTGVuZ3RoID0gTWF0aC5taW4oXG4gICAgICAgICAgICAgICAgICAgIHRoaXNJdGVyLnBlZWtMZW5ndGgoKSxcbiAgICAgICAgICAgICAgICAgICAgb3RoZXJJdGVyLnBlZWtMZW5ndGgoKSxcbiAgICAgICAgICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIHZhciB0aGlzT3AgPSB0aGlzSXRlci5uZXh0KG9wTGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgIHZhciBvdGhlck9wID0gb3RoZXJJdGVyLm5leHQob3BMZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgaWYgKGVxdWFsKHRoaXNPcC5pbnNlcnQsIG90aGVyT3AuaW5zZXJ0KSkge1xuICAgICAgICAgICAgICAgICAgICBkZWx0YS5yZXRhaW4oXG4gICAgICAgICAgICAgICAgICAgICAgb3BMZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgb3AuYXR0cmlidXRlcy5kaWZmKHRoaXNPcC5hdHRyaWJ1dGVzLCBvdGhlck9wLmF0dHJpYnV0ZXMpLFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZGVsdGEucHVzaChvdGhlck9wKVsnZGVsZXRlJ10ob3BMZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgbGVuZ3RoIC09IG9wTGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBkZWx0YS5jaG9wKCk7XG4gICAgICAgIH07XG5cbiAgICAgICAgRGVsdGEucHJvdG90eXBlLmVhY2hMaW5lID0gZnVuY3Rpb24gKHByZWRpY2F0ZSwgbmV3bGluZSkge1xuICAgICAgICAgIG5ld2xpbmUgPSBuZXdsaW5lIHx8ICdcXG4nO1xuICAgICAgICAgIHZhciBpdGVyID0gb3AuaXRlcmF0b3IodGhpcy5vcHMpO1xuICAgICAgICAgIHZhciBsaW5lID0gbmV3IERlbHRhKCk7XG4gICAgICAgICAgdmFyIGkgPSAwO1xuICAgICAgICAgIHdoaWxlIChpdGVyLmhhc05leHQoKSkge1xuICAgICAgICAgICAgaWYgKGl0ZXIucGVla1R5cGUoKSAhPT0gJ2luc2VydCcpIHJldHVybjtcbiAgICAgICAgICAgIHZhciB0aGlzT3AgPSBpdGVyLnBlZWsoKTtcbiAgICAgICAgICAgIHZhciBzdGFydCA9IG9wLmxlbmd0aCh0aGlzT3ApIC0gaXRlci5wZWVrTGVuZ3RoKCk7XG4gICAgICAgICAgICB2YXIgaW5kZXggPVxuICAgICAgICAgICAgICB0eXBlb2YgdGhpc09wLmluc2VydCA9PT0gJ3N0cmluZydcbiAgICAgICAgICAgICAgICA/IHRoaXNPcC5pbnNlcnQuaW5kZXhPZihuZXdsaW5lLCBzdGFydCkgLSBzdGFydFxuICAgICAgICAgICAgICAgIDogLTE7XG4gICAgICAgICAgICBpZiAoaW5kZXggPCAwKSB7XG4gICAgICAgICAgICAgIGxpbmUucHVzaChpdGVyLm5leHQoKSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGluZGV4ID4gMCkge1xuICAgICAgICAgICAgICBsaW5lLnB1c2goaXRlci5uZXh0KGluZGV4KSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBpZiAocHJlZGljYXRlKGxpbmUsIGl0ZXIubmV4dCgxKS5hdHRyaWJ1dGVzIHx8IHt9LCBpKSA9PT0gZmFsc2UpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaSArPSAxO1xuICAgICAgICAgICAgICBsaW5lID0gbmV3IERlbHRhKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChsaW5lLmxlbmd0aCgpID4gMCkge1xuICAgICAgICAgICAgcHJlZGljYXRlKGxpbmUsIHt9LCBpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgRGVsdGEucHJvdG90eXBlLnRyYW5zZm9ybSA9IGZ1bmN0aW9uIChvdGhlciwgcHJpb3JpdHkpIHtcbiAgICAgICAgICBwcmlvcml0eSA9ICEhcHJpb3JpdHk7XG4gICAgICAgICAgaWYgKHR5cGVvZiBvdGhlciA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnRyYW5zZm9ybVBvc2l0aW9uKG90aGVyLCBwcmlvcml0eSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciB0aGlzSXRlciA9IG9wLml0ZXJhdG9yKHRoaXMub3BzKTtcbiAgICAgICAgICB2YXIgb3RoZXJJdGVyID0gb3AuaXRlcmF0b3Iob3RoZXIub3BzKTtcbiAgICAgICAgICB2YXIgZGVsdGEgPSBuZXcgRGVsdGEoKTtcbiAgICAgICAgICB3aGlsZSAodGhpc0l0ZXIuaGFzTmV4dCgpIHx8IG90aGVySXRlci5oYXNOZXh0KCkpIHtcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgdGhpc0l0ZXIucGVla1R5cGUoKSA9PT0gJ2luc2VydCcgJiZcbiAgICAgICAgICAgICAgKHByaW9yaXR5IHx8IG90aGVySXRlci5wZWVrVHlwZSgpICE9PSAnaW5zZXJ0JylcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBkZWx0YS5yZXRhaW4ob3AubGVuZ3RoKHRoaXNJdGVyLm5leHQoKSkpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChvdGhlckl0ZXIucGVla1R5cGUoKSA9PT0gJ2luc2VydCcpIHtcbiAgICAgICAgICAgICAgZGVsdGEucHVzaChvdGhlckl0ZXIubmV4dCgpKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHZhciBsZW5ndGggPSBNYXRoLm1pbihcbiAgICAgICAgICAgICAgICB0aGlzSXRlci5wZWVrTGVuZ3RoKCksXG4gICAgICAgICAgICAgICAgb3RoZXJJdGVyLnBlZWtMZW5ndGgoKSxcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgdmFyIHRoaXNPcCA9IHRoaXNJdGVyLm5leHQobGVuZ3RoKTtcbiAgICAgICAgICAgICAgdmFyIG90aGVyT3AgPSBvdGhlckl0ZXIubmV4dChsZW5ndGgpO1xuICAgICAgICAgICAgICBpZiAodGhpc09wWydkZWxldGUnXSkge1xuICAgICAgICAgICAgICAgIC8vIE91ciBkZWxldGUgZWl0aGVyIG1ha2VzIHRoZWlyIGRlbGV0ZSByZWR1bmRhbnQgb3IgcmVtb3ZlcyB0aGVpciByZXRhaW5cbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChvdGhlck9wWydkZWxldGUnXSkge1xuICAgICAgICAgICAgICAgIGRlbHRhLnB1c2gob3RoZXJPcCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gV2UgcmV0YWluIGVpdGhlciB0aGVpciByZXRhaW4gb3IgaW5zZXJ0XG4gICAgICAgICAgICAgICAgZGVsdGEucmV0YWluKFxuICAgICAgICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgb3AuYXR0cmlidXRlcy50cmFuc2Zvcm0oXG4gICAgICAgICAgICAgICAgICAgIHRoaXNPcC5hdHRyaWJ1dGVzLFxuICAgICAgICAgICAgICAgICAgICBvdGhlck9wLmF0dHJpYnV0ZXMsXG4gICAgICAgICAgICAgICAgICAgIHByaW9yaXR5LFxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBkZWx0YS5jaG9wKCk7XG4gICAgICAgIH07XG5cbiAgICAgICAgRGVsdGEucHJvdG90eXBlLnRyYW5zZm9ybVBvc2l0aW9uID0gZnVuY3Rpb24gKGluZGV4LCBwcmlvcml0eSkge1xuICAgICAgICAgIHByaW9yaXR5ID0gISFwcmlvcml0eTtcbiAgICAgICAgICB2YXIgdGhpc0l0ZXIgPSBvcC5pdGVyYXRvcih0aGlzLm9wcyk7XG4gICAgICAgICAgdmFyIG9mZnNldCA9IDA7XG4gICAgICAgICAgd2hpbGUgKHRoaXNJdGVyLmhhc05leHQoKSAmJiBvZmZzZXQgPD0gaW5kZXgpIHtcbiAgICAgICAgICAgIHZhciBsZW5ndGggPSB0aGlzSXRlci5wZWVrTGVuZ3RoKCk7XG4gICAgICAgICAgICB2YXIgbmV4dFR5cGUgPSB0aGlzSXRlci5wZWVrVHlwZSgpO1xuICAgICAgICAgICAgdGhpc0l0ZXIubmV4dCgpO1xuICAgICAgICAgICAgaWYgKG5leHRUeXBlID09PSAnZGVsZXRlJykge1xuICAgICAgICAgICAgICBpbmRleCAtPSBNYXRoLm1pbihsZW5ndGgsIGluZGV4IC0gb2Zmc2V0KTtcbiAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG5leHRUeXBlID09PSAnaW5zZXJ0JyAmJiAob2Zmc2V0IDwgaW5kZXggfHwgIXByaW9yaXR5KSkge1xuICAgICAgICAgICAgICBpbmRleCArPSBsZW5ndGg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBvZmZzZXQgKz0gbGVuZ3RoO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gaW5kZXg7XG4gICAgICAgIH07XG5cbiAgICAgICAgbW9kdWxlLmV4cG9ydHMgPSBEZWx0YTtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDMgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgICAgIHZhciBoYXNPd24gPSBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5O1xuICAgICAgICB2YXIgdG9TdHIgPSBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nO1xuXG4gICAgICAgIHZhciBpc0FycmF5ID0gZnVuY3Rpb24gaXNBcnJheShhcnIpIHtcbiAgICAgICAgICBpZiAodHlwZW9mIEFycmF5LmlzQXJyYXkgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHJldHVybiBBcnJheS5pc0FycmF5KGFycik7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHRvU3RyLmNhbGwoYXJyKSA9PT0gJ1tvYmplY3QgQXJyYXldJztcbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgaXNQbGFpbk9iamVjdCA9IGZ1bmN0aW9uIGlzUGxhaW5PYmplY3Qob2JqKSB7XG4gICAgICAgICAgaWYgKCFvYmogfHwgdG9TdHIuY2FsbChvYmopICE9PSAnW29iamVjdCBPYmplY3RdJykge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciBoYXNPd25Db25zdHJ1Y3RvciA9IGhhc093bi5jYWxsKG9iaiwgJ2NvbnN0cnVjdG9yJyk7XG4gICAgICAgICAgdmFyIGhhc0lzUHJvdG90eXBlT2YgPVxuICAgICAgICAgICAgb2JqLmNvbnN0cnVjdG9yICYmXG4gICAgICAgICAgICBvYmouY29uc3RydWN0b3IucHJvdG90eXBlICYmXG4gICAgICAgICAgICBoYXNPd24uY2FsbChvYmouY29uc3RydWN0b3IucHJvdG90eXBlLCAnaXNQcm90b3R5cGVPZicpO1xuICAgICAgICAgIC8vIE5vdCBvd24gY29uc3RydWN0b3IgcHJvcGVydHkgbXVzdCBiZSBPYmplY3RcbiAgICAgICAgICBpZiAob2JqLmNvbnN0cnVjdG9yICYmICFoYXNPd25Db25zdHJ1Y3RvciAmJiAhaGFzSXNQcm90b3R5cGVPZikge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIC8vIE93biBwcm9wZXJ0aWVzIGFyZSBlbnVtZXJhdGVkIGZpcnN0bHksIHNvIHRvIHNwZWVkIHVwLFxuICAgICAgICAgIC8vIGlmIGxhc3Qgb25lIGlzIG93biwgdGhlbiBhbGwgcHJvcGVydGllcyBhcmUgb3duLlxuICAgICAgICAgIHZhciBrZXk7XG4gICAgICAgICAgZm9yIChrZXkgaW4gb2JqKSB7XG4gICAgICAgICAgICAvKiovXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHR5cGVvZiBrZXkgPT09ICd1bmRlZmluZWQnIHx8IGhhc093bi5jYWxsKG9iaiwga2V5KTtcbiAgICAgICAgfTtcblxuICAgICAgICBtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGV4dGVuZCgpIHtcbiAgICAgICAgICB2YXIgb3B0aW9ucywgbmFtZSwgc3JjLCBjb3B5LCBjb3B5SXNBcnJheSwgY2xvbmU7XG4gICAgICAgICAgdmFyIHRhcmdldCA9IGFyZ3VtZW50c1swXTtcbiAgICAgICAgICB2YXIgaSA9IDE7XG4gICAgICAgICAgdmFyIGxlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGg7XG4gICAgICAgICAgdmFyIGRlZXAgPSBmYWxzZTtcblxuICAgICAgICAgIC8vIEhhbmRsZSBhIGRlZXAgY29weSBzaXR1YXRpb25cbiAgICAgICAgICBpZiAodHlwZW9mIHRhcmdldCA9PT0gJ2Jvb2xlYW4nKSB7XG4gICAgICAgICAgICBkZWVwID0gdGFyZ2V0O1xuICAgICAgICAgICAgdGFyZ2V0ID0gYXJndW1lbnRzWzFdIHx8IHt9O1xuICAgICAgICAgICAgLy8gc2tpcCB0aGUgYm9vbGVhbiBhbmQgdGhlIHRhcmdldFxuICAgICAgICAgICAgaSA9IDI7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgIHRhcmdldCA9PSBudWxsIHx8XG4gICAgICAgICAgICAodHlwZW9mIHRhcmdldCAhPT0gJ29iamVjdCcgJiYgdHlwZW9mIHRhcmdldCAhPT0gJ2Z1bmN0aW9uJylcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIHRhcmdldCA9IHt9O1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGZvciAoOyBpIDwgbGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIG9wdGlvbnMgPSBhcmd1bWVudHNbaV07XG4gICAgICAgICAgICAvLyBPbmx5IGRlYWwgd2l0aCBub24tbnVsbC91bmRlZmluZWQgdmFsdWVzXG4gICAgICAgICAgICBpZiAob3B0aW9ucyAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIC8vIEV4dGVuZCB0aGUgYmFzZSBvYmplY3RcbiAgICAgICAgICAgICAgZm9yIChuYW1lIGluIG9wdGlvbnMpIHtcbiAgICAgICAgICAgICAgICBzcmMgPSB0YXJnZXRbbmFtZV07XG4gICAgICAgICAgICAgICAgY29weSA9IG9wdGlvbnNbbmFtZV07XG5cbiAgICAgICAgICAgICAgICAvLyBQcmV2ZW50IG5ldmVyLWVuZGluZyBsb29wXG4gICAgICAgICAgICAgICAgaWYgKHRhcmdldCAhPT0gY29weSkge1xuICAgICAgICAgICAgICAgICAgLy8gUmVjdXJzZSBpZiB3ZSdyZSBtZXJnaW5nIHBsYWluIG9iamVjdHMgb3IgYXJyYXlzXG4gICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIGRlZXAgJiZcbiAgICAgICAgICAgICAgICAgICAgY29weSAmJlxuICAgICAgICAgICAgICAgICAgICAoaXNQbGFpbk9iamVjdChjb3B5KSB8fCAoY29weUlzQXJyYXkgPSBpc0FycmF5KGNvcHkpKSlcbiAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29weUlzQXJyYXkpIHtcbiAgICAgICAgICAgICAgICAgICAgICBjb3B5SXNBcnJheSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgIGNsb25lID0gc3JjICYmIGlzQXJyYXkoc3JjKSA/IHNyYyA6IFtdO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIGNsb25lID0gc3JjICYmIGlzUGxhaW5PYmplY3Qoc3JjKSA/IHNyYyA6IHt9O1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gTmV2ZXIgbW92ZSBvcmlnaW5hbCBvYmplY3RzLCBjbG9uZSB0aGVtXG4gICAgICAgICAgICAgICAgICAgIHRhcmdldFtuYW1lXSA9IGV4dGVuZChkZWVwLCBjbG9uZSwgY29weSk7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gRG9uJ3QgYnJpbmcgaW4gdW5kZWZpbmVkIHZhbHVlc1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgY29weSAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0W25hbWVdID0gY29weTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyBSZXR1cm4gdGhlIG1vZGlmaWVkIG9iamVjdFxuICAgICAgICAgIHJldHVybiB0YXJnZXQ7XG4gICAgICAgIH07XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiA0ICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgJ19fZXNNb2R1bGUnLCB7XG4gICAgICAgICAgdmFsdWU6IHRydWUsXG4gICAgICAgIH0pO1xuICAgICAgICBleHBvcnRz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3RydWN0b3I7XG4gICAgICAgICAgfTtcbiAgICAgICAgfSkoKTtcblxuICAgICAgICB2YXIgX2dldCA9IGZ1bmN0aW9uIGdldChvYmplY3QsIHByb3BlcnR5LCByZWNlaXZlcikge1xuICAgICAgICAgIGlmIChvYmplY3QgPT09IG51bGwpIG9iamVjdCA9IEZ1bmN0aW9uLnByb3RvdHlwZTtcbiAgICAgICAgICB2YXIgZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3Iob2JqZWN0LCBwcm9wZXJ0eSk7XG4gICAgICAgICAgaWYgKGRlc2MgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdmFyIHBhcmVudCA9IE9iamVjdC5nZXRQcm90b3R5cGVPZihvYmplY3QpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGdldChwYXJlbnQsIHByb3BlcnR5LCByZWNlaXZlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmICgndmFsdWUnIGluIGRlc2MpIHtcbiAgICAgICAgICAgIHJldHVybiBkZXNjLnZhbHVlO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZ2V0dGVyID0gZGVzYy5nZXQ7XG4gICAgICAgICAgICBpZiAoZ2V0dGVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBnZXR0ZXIuY2FsbChyZWNlaXZlcik7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHZhciBfZXh0ZW5kID0gX193ZWJwYWNrX3JlcXVpcmVfXygzKTtcblxuICAgICAgICB2YXIgX2V4dGVuZDIgPSBfaW50ZXJ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hc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIE5FV0xJTkVfTEVOR1RIID0gMTtcblxuICAgICAgICB2YXIgQmxvY2tFbWJlZCA9IChmdW5jdGlvbiAoX1BhcmNobWVudCRFbWJlZCkge1xuICAgICAgICAgIF9pbmhlcml0cyhCbG9ja0VtYmVkLCBfUGFyY2htZW50JEVtYmVkKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIEJsb2NrRW1iZWQoKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgQmxvY2tFbWJlZCk7XG5cbiAgICAgICAgICAgIHJldHVybiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKEJsb2NrRW1iZWQuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihCbG9ja0VtYmVkKSkuYXBwbHkoXG4gICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICBhcmd1bWVudHMsXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhCbG9ja0VtYmVkLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2F0dGFjaCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBhdHRhY2goKSB7XG4gICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgIEJsb2NrRW1iZWQucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQmxvY2tFbWJlZC5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgJ2F0dGFjaCcsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzKTtcbiAgICAgICAgICAgICAgICB0aGlzLmF0dHJpYnV0ZXMgPSBuZXcgX3BhcmNobWVudDIuZGVmYXVsdC5BdHRyaWJ1dG9yLlN0b3JlKFxuICAgICAgICAgICAgICAgICAgdGhpcy5kb21Ob2RlLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdkZWx0YScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBkZWx0YSgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KCkuaW5zZXJ0KFxuICAgICAgICAgICAgICAgICAgdGhpcy52YWx1ZSgpLFxuICAgICAgICAgICAgICAgICAgKDAsIF9leHRlbmQyLmRlZmF1bHQpKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmZvcm1hdHMoKSxcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hdHRyaWJ1dGVzLnZhbHVlcygpLFxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZm9ybWF0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGZvcm1hdChuYW1lLCB2YWx1ZSkge1xuICAgICAgICAgICAgICAgIHZhciBhdHRyaWJ1dGUgPSBfcGFyY2htZW50Mi5kZWZhdWx0LnF1ZXJ5KFxuICAgICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQuU2NvcGUuQkxPQ0tfQVRUUklCVVRFLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgaWYgKGF0dHJpYnV0ZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLmF0dHJpYnV0ZXMuYXR0cmlidXRlKGF0dHJpYnV0ZSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2Zvcm1hdEF0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGZvcm1hdEF0KGluZGV4LCBsZW5ndGgsIG5hbWUsIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5mb3JtYXQobmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnaW5zZXJ0QXQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gaW5zZXJ0QXQoaW5kZXgsIHZhbHVlLCBkZWYpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJyAmJiB2YWx1ZS5lbmRzV2l0aCgnXFxuJykpIHtcbiAgICAgICAgICAgICAgICAgIHZhciBibG9jayA9IF9wYXJjaG1lbnQyLmRlZmF1bHQuY3JlYXRlKEJsb2NrLmJsb3ROYW1lKTtcbiAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50Lmluc2VydEJlZm9yZShcbiAgICAgICAgICAgICAgICAgICAgYmxvY2ssXG4gICAgICAgICAgICAgICAgICAgIGluZGV4ID09PSAwID8gdGhpcyA6IHRoaXMubmV4dCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBibG9jay5pbnNlcnRBdCgwLCB2YWx1ZS5zbGljZSgwLCAtMSkpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgICBCbG9ja0VtYmVkLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQmxvY2tFbWJlZC5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgICAnaW5zZXJ0QXQnLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIGluZGV4LCB2YWx1ZSwgZGVmKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgcmV0dXJuIEJsb2NrRW1iZWQ7XG4gICAgICAgIH0pKF9wYXJjaG1lbnQyLmRlZmF1bHQuRW1iZWQpO1xuXG4gICAgICAgIEJsb2NrRW1iZWQuc2NvcGUgPSBfcGFyY2htZW50Mi5kZWZhdWx0LlNjb3BlLkJMT0NLX0JMT1Q7XG4gICAgICAgIC8vIEl0IGlzIGltcG9ydGFudCBmb3IgY3Vyc29yIGJlaGF2aW9yIEJsb2NrRW1iZWRzIHVzZSB0YWdzIHRoYXQgYXJlIGJsb2NrIGxldmVsIGVsZW1lbnRzXG5cbiAgICAgICAgdmFyIEJsb2NrID0gKGZ1bmN0aW9uIChfUGFyY2htZW50JEJsb2NrKSB7XG4gICAgICAgICAgX2luaGVyaXRzKEJsb2NrLCBfUGFyY2htZW50JEJsb2NrKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIEJsb2NrKGRvbU5vZGUpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBCbG9jayk7XG5cbiAgICAgICAgICAgIHZhciBfdGhpczIgPSBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKEJsb2NrLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQmxvY2spKS5jYWxsKFxuICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgZG9tTm9kZSxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgIF90aGlzMi5jYWNoZSA9IHt9O1xuICAgICAgICAgICAgcmV0dXJuIF90aGlzMjtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoQmxvY2ssIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZGVsdGEnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZGVsdGEoKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY2FjaGUuZGVsdGEgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgdGhpcy5jYWNoZS5kZWx0YSA9IHRoaXMuZGVzY2VuZGFudHMoX3BhcmNobWVudDIuZGVmYXVsdC5MZWFmKVxuICAgICAgICAgICAgICAgICAgICAucmVkdWNlKGZ1bmN0aW9uIChkZWx0YSwgbGVhZikge1xuICAgICAgICAgICAgICAgICAgICAgIGlmIChsZWFmLmxlbmd0aCgpID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVsdGE7XG4gICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWx0YS5pbnNlcnQobGVhZi52YWx1ZSgpLCBidWJibGVGb3JtYXRzKGxlYWYpKTtcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpKVxuICAgICAgICAgICAgICAgICAgICAuaW5zZXJ0KCdcXG4nLCBidWJibGVGb3JtYXRzKHRoaXMpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2FjaGUuZGVsdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdkZWxldGVBdCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBkZWxldGVBdChpbmRleCwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgIEJsb2NrLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKEJsb2NrLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAnZGVsZXRlQXQnLFxuICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgaW5kZXgsIGxlbmd0aCk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYWNoZSA9IHt9O1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZm9ybWF0QXQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9ybWF0QXQoaW5kZXgsIGxlbmd0aCwgbmFtZSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICBpZiAobGVuZ3RoIDw9IDApIHJldHVybjtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LnF1ZXJ5KFxuICAgICAgICAgICAgICAgICAgICBuYW1lLFxuICAgICAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LlNjb3BlLkJMT0NLLFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ICsgbGVuZ3RoID09PSB0aGlzLmxlbmd0aCgpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybWF0KG5hbWUsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgICAgQmxvY2sucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihCbG9jay5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgICAnZm9ybWF0QXQnLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgKS5jYWxsKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgICBpbmRleCxcbiAgICAgICAgICAgICAgICAgICAgTWF0aC5taW4obGVuZ3RoLCB0aGlzLmxlbmd0aCgpIC0gaW5kZXggLSAxKSxcbiAgICAgICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLmNhY2hlID0ge307XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdpbnNlcnRBdCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBpbnNlcnRBdChpbmRleCwgdmFsdWUsIGRlZikge1xuICAgICAgICAgICAgICAgIGlmIChkZWYgIT0gbnVsbClcbiAgICAgICAgICAgICAgICAgIHJldHVybiBfZ2V0KFxuICAgICAgICAgICAgICAgICAgICBCbG9jay5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKEJsb2NrLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgICdpbnNlcnRBdCcsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgaW5kZXgsIHZhbHVlLCBkZWYpO1xuICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPT09IDApIHJldHVybjtcbiAgICAgICAgICAgICAgICB2YXIgbGluZXMgPSB2YWx1ZS5zcGxpdCgnXFxuJyk7XG4gICAgICAgICAgICAgICAgdmFyIHRleHQgPSBsaW5lcy5zaGlmdCgpO1xuICAgICAgICAgICAgICAgIGlmICh0ZXh0Lmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA8IHRoaXMubGVuZ3RoKCkgLSAxIHx8IHRoaXMuY2hpbGRyZW4udGFpbCA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIF9nZXQoXG4gICAgICAgICAgICAgICAgICAgICAgQmxvY2sucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKEJsb2NrLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgICAgJ2luc2VydEF0JyxcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgTWF0aC5taW4oaW5kZXgsIHRoaXMubGVuZ3RoKCkgLSAxKSwgdGV4dCk7XG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNoaWxkcmVuLnRhaWwuaW5zZXJ0QXQoXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5jaGlsZHJlbi50YWlsLmxlbmd0aCgpLFxuICAgICAgICAgICAgICAgICAgICAgIHRleHQsXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB0aGlzLmNhY2hlID0ge307XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBibG9jayA9IHRoaXM7XG4gICAgICAgICAgICAgICAgbGluZXMucmVkdWNlKGZ1bmN0aW9uIChpbmRleCwgbGluZSkge1xuICAgICAgICAgICAgICAgICAgYmxvY2sgPSBibG9jay5zcGxpdChpbmRleCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICBibG9jay5pbnNlcnRBdCgwLCBsaW5lKTtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBsaW5lLmxlbmd0aDtcbiAgICAgICAgICAgICAgICB9LCBpbmRleCArIHRleHQubGVuZ3RoKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2luc2VydEJlZm9yZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBpbnNlcnRCZWZvcmUoYmxvdCwgcmVmKSB7XG4gICAgICAgICAgICAgICAgdmFyIGhlYWQgPSB0aGlzLmNoaWxkcmVuLmhlYWQ7XG4gICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgIEJsb2NrLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKEJsb2NrLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAnaW5zZXJ0QmVmb3JlJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIGJsb3QsIHJlZik7XG4gICAgICAgICAgICAgICAgaWYgKGhlYWQgaW5zdGFuY2VvZiBfYnJlYWsyLmRlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgIGhlYWQucmVtb3ZlKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMuY2FjaGUgPSB7fTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2xlbmd0aCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBsZW5ndGgoKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY2FjaGUubGVuZ3RoID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIHRoaXMuY2FjaGUubGVuZ3RoID1cbiAgICAgICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgICAgICBCbG9jay5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQmxvY2sucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICAgICAnbGVuZ3RoJyxcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgICApLmNhbGwodGhpcykgKyBORVdMSU5FX0xFTkdUSDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2FjaGUubGVuZ3RoO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnbW92ZUNoaWxkcmVuJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIG1vdmVDaGlsZHJlbih0YXJnZXQsIHJlZikge1xuICAgICAgICAgICAgICAgIF9nZXQoXG4gICAgICAgICAgICAgICAgICBCbG9jay5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihCbG9jay5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgJ21vdmVDaGlsZHJlbicsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCB0YXJnZXQsIHJlZik7XG4gICAgICAgICAgICAgICAgdGhpcy5jYWNoZSA9IHt9O1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnb3B0aW1pemUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gb3B0aW1pemUoY29udGV4dCkge1xuICAgICAgICAgICAgICAgIF9nZXQoXG4gICAgICAgICAgICAgICAgICBCbG9jay5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihCbG9jay5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgJ29wdGltaXplJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIGNvbnRleHQpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FjaGUgPSB7fTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3BhdGgnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcGF0aChpbmRleCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBfZ2V0KFxuICAgICAgICAgICAgICAgICAgQmxvY2sucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQmxvY2sucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICdwYXRoJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIGluZGV4LCB0cnVlKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3JlbW92ZUNoaWxkJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHJlbW92ZUNoaWxkKGNoaWxkKSB7XG4gICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgIEJsb2NrLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKEJsb2NrLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAncmVtb3ZlQ2hpbGQnLFxuICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgY2hpbGQpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FjaGUgPSB7fTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3NwbGl0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHNwbGl0KGluZGV4KSB7XG4gICAgICAgICAgICAgICAgdmFyIGZvcmNlID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAxICYmIGFyZ3VtZW50c1sxXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzFdXG4gICAgICAgICAgICAgICAgICAgIDogZmFsc2U7XG5cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBmb3JjZSAmJlxuICAgICAgICAgICAgICAgICAgKGluZGV4ID09PSAwIHx8IGluZGV4ID49IHRoaXMubGVuZ3RoKCkgLSBORVdMSU5FX0xFTkdUSClcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIHZhciBjbG9uZSA9IHRoaXMuY2xvbmUoKTtcbiAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBhcmVudC5pbnNlcnRCZWZvcmUoY2xvbmUsIHRoaXMpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50Lmluc2VydEJlZm9yZShjbG9uZSwgdGhpcy5uZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNsb25lO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICB2YXIgbmV4dCA9IF9nZXQoXG4gICAgICAgICAgICAgICAgICAgIEJsb2NrLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQmxvY2sucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICAgJ3NwbGl0JyxcbiAgICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBpbmRleCwgZm9yY2UpO1xuICAgICAgICAgICAgICAgICAgdGhpcy5jYWNoZSA9IHt9O1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIG5leHQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIHJldHVybiBCbG9jaztcbiAgICAgICAgfSkoX3BhcmNobWVudDIuZGVmYXVsdC5CbG9jayk7XG5cbiAgICAgICAgQmxvY2suYmxvdE5hbWUgPSAnYmxvY2snO1xuICAgICAgICBCbG9jay50YWdOYW1lID0gJ1AnO1xuICAgICAgICBCbG9jay5kZWZhdWx0Q2hpbGQgPSAnYnJlYWsnO1xuICAgICAgICBCbG9jay5hbGxvd2VkQ2hpbGRyZW4gPSBbXG4gICAgICAgICAgX2lubGluZTIuZGVmYXVsdCxcbiAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LkVtYmVkLFxuICAgICAgICAgIF90ZXh0Mi5kZWZhdWx0LFxuICAgICAgICBdO1xuXG4gICAgICAgIGZ1bmN0aW9uIGJ1YmJsZUZvcm1hdHMoYmxvdCkge1xuICAgICAgICAgIHZhciBmb3JtYXRzID1cbiAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAxICYmIGFyZ3VtZW50c1sxXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgID8gYXJndW1lbnRzWzFdXG4gICAgICAgICAgICAgIDoge307XG5cbiAgICAgICAgICBpZiAoYmxvdCA9PSBudWxsKSByZXR1cm4gZm9ybWF0cztcbiAgICAgICAgICBpZiAodHlwZW9mIGJsb3QuZm9ybWF0cyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgZm9ybWF0cyA9ICgwLCBfZXh0ZW5kMi5kZWZhdWx0KShmb3JtYXRzLCBibG90LmZvcm1hdHMoKSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgIGJsb3QucGFyZW50ID09IG51bGwgfHxcbiAgICAgICAgICAgIGJsb3QucGFyZW50LmJsb3ROYW1lID09ICdzY3JvbGwnIHx8XG4gICAgICAgICAgICBibG90LnBhcmVudC5zdGF0aWNzLnNjb3BlICE9PSBibG90LnN0YXRpY3Muc2NvcGVcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIHJldHVybiBmb3JtYXRzO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gYnViYmxlRm9ybWF0cyhibG90LnBhcmVudCwgZm9ybWF0cyk7XG4gICAgICAgIH1cblxuICAgICAgICBleHBvcnRzLmJ1YmJsZUZvcm1hdHMgPSBidWJibGVGb3JtYXRzO1xuICAgICAgICBleHBvcnRzLkJsb2NrRW1iZWQgPSBCbG9ja0VtYmVkO1xuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBCbG9jaztcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDUgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAnX19lc01vZHVsZScsIHtcbiAgICAgICAgICB2YWx1ZTogdHJ1ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IGV4cG9ydHMub3ZlcmxvYWQgPSBleHBvcnRzLmV4cGFuZENvbmZpZyA9IHVuZGVmaW5lZDtcblxuICAgICAgICB2YXIgX3R5cGVvZiA9XG4gICAgICAgICAgdHlwZW9mIFN5bWJvbCA9PT0gJ2Z1bmN0aW9uJyAmJiB0eXBlb2YgU3ltYm9sLml0ZXJhdG9yID09PSAnc3ltYm9sJ1xuICAgICAgICAgICAgPyBmdW5jdGlvbiAob2JqKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiBvYmo7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIDogZnVuY3Rpb24gKG9iaikge1xuICAgICAgICAgICAgICAgIHJldHVybiBvYmogJiZcbiAgICAgICAgICAgICAgICAgIHR5cGVvZiBTeW1ib2wgPT09ICdmdW5jdGlvbicgJiZcbiAgICAgICAgICAgICAgICAgIG9iai5jb25zdHJ1Y3RvciA9PT0gU3ltYm9sICYmXG4gICAgICAgICAgICAgICAgICBvYmogIT09IFN5bWJvbC5wcm90b3R5cGVcbiAgICAgICAgICAgICAgICAgID8gJ3N5bWJvbCdcbiAgICAgICAgICAgICAgICAgIDogdHlwZW9mIG9iajtcbiAgICAgICAgICAgICAgfTtcblxuICAgICAgICB2YXIgX3NsaWNlZFRvQXJyYXkgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIHNsaWNlSXRlcmF0b3IoYXJyLCBpKSB7XG4gICAgICAgICAgICB2YXIgX2FyciA9IFtdO1xuICAgICAgICAgICAgdmFyIF9uID0gdHJ1ZTtcbiAgICAgICAgICAgIHZhciBfZCA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIF9lID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgZm9yIChcbiAgICAgICAgICAgICAgICB2YXIgX2kgPSBhcnJbU3ltYm9sLml0ZXJhdG9yXSgpLCBfcztcbiAgICAgICAgICAgICAgICAhKF9uID0gKF9zID0gX2kubmV4dCgpKS5kb25lKTtcbiAgICAgICAgICAgICAgICBfbiA9IHRydWVcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgX2Fyci5wdXNoKF9zLnZhbHVlKTtcbiAgICAgICAgICAgICAgICBpZiAoaSAmJiBfYXJyLmxlbmd0aCA9PT0gaSkgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBfZCA9IHRydWU7XG4gICAgICAgICAgICAgIF9lID0gZXJyO1xuICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBpZiAoIV9uICYmIF9pWydyZXR1cm4nXSkgX2lbJ3JldHVybiddKCk7XG4gICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgaWYgKF9kKSB0aHJvdyBfZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIF9hcnI7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoYXJyLCBpKSB7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShhcnIpKSB7XG4gICAgICAgICAgICAgIHJldHVybiBhcnI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKFN5bWJvbC5pdGVyYXRvciBpbiBPYmplY3QoYXJyKSkge1xuICAgICAgICAgICAgICByZXR1cm4gc2xpY2VJdGVyYXRvcihhcnIsIGkpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgICAnSW52YWxpZCBhdHRlbXB0IHRvIGRlc3RydWN0dXJlIG5vbi1pdGVyYWJsZSBpbnN0YW5jZScsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcbiAgICAgICAgfSkoKTtcblxuICAgICAgICB2YXIgX2NyZWF0ZUNsYXNzID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0aWVzKHRhcmdldCwgcHJvcHMpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcHJvcHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgdmFyIGRlc2NyaXB0b3IgPSBwcm9wc1tpXTtcbiAgICAgICAgICAgICAgZGVzY3JpcHRvci5lbnVtZXJhYmxlID0gZGVzY3JpcHRvci5lbnVtZXJhYmxlIHx8IGZhbHNlO1xuICAgICAgICAgICAgICBkZXNjcmlwdG9yLmNvbmZpZ3VyYWJsZSA9IH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9wZXJ0eShvYmosIGtleSwgdmFsdWUpIHtcbiAgICAgICAgICBpZiAoa2V5IGluIG9iaikge1xuICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KG9iaiwga2V5LCB7XG4gICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZSxcbiAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBvYmpba2V5XSA9IHZhbHVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2NsYXNzQ2FsbENoZWNrKGluc3RhbmNlLCBDb25zdHJ1Y3Rvcikge1xuICAgICAgICAgIGlmICghKGluc3RhbmNlIGluc3RhbmNlb2YgQ29uc3RydWN0b3IpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24nKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgZGVidWcgPSAoMCwgX2xvZ2dlcjIuZGVmYXVsdCkoJ3F1aWxsJyk7XG5cbiAgICAgICAgdmFyIFF1aWxsID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoUXVpbGwsIG51bGwsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZGVidWcnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZGVidWcobGltaXQpIHtcbiAgICAgICAgICAgICAgICBpZiAobGltaXQgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICAgIGxpbWl0ID0gJ2xvZyc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIF9sb2dnZXIyLmRlZmF1bHQubGV2ZWwobGltaXQpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZmluZCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBmaW5kKG5vZGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5fX3F1aWxsIHx8IF9wYXJjaG1lbnQyLmRlZmF1bHQuZmluZChub2RlKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2ltcG9ydCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBfaW1wb3J0KG5hbWUpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5pbXBvcnRzW25hbWVdID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnLmVycm9yKFxuICAgICAgICAgICAgICAgICAgICAnQ2Fubm90IGltcG9ydCAnICtcbiAgICAgICAgICAgICAgICAgICAgICBuYW1lICtcbiAgICAgICAgICAgICAgICAgICAgICAnLiBBcmUgeW91IHN1cmUgaXQgd2FzIHJlZ2lzdGVyZWQ/JyxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmltcG9ydHNbbmFtZV07XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdyZWdpc3RlcicsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiByZWdpc3RlcihwYXRoLCB0YXJnZXQpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgdmFyIG92ZXJ3cml0ZSA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMiAmJiBhcmd1bWVudHNbMl0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1syXVxuICAgICAgICAgICAgICAgICAgICA6IGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBwYXRoICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBwYXRoLmF0dHJOYW1lIHx8IHBhdGguYmxvdE5hbWU7XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG5hbWUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHJlZ2lzdGVyKEJsb3QgfCBBdHRyaWJ1dG9yLCBvdmVyd3JpdGUpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVnaXN0ZXIoJ2Zvcm1hdHMvJyArIG5hbWUsIHBhdGgsIHRhcmdldCk7XG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhwYXRoKS5mb3JFYWNoKGZ1bmN0aW9uIChrZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5yZWdpc3RlcihrZXksIHBhdGhba2V5XSwgdGFyZ2V0KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmltcG9ydHNbcGF0aF0gIT0gbnVsbCAmJiAhb3ZlcndyaXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlYnVnLndhcm4oJ092ZXJ3cml0aW5nICcgKyBwYXRoICsgJyB3aXRoJywgdGFyZ2V0KTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIHRoaXMuaW1wb3J0c1twYXRoXSA9IHRhcmdldDtcbiAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgKHBhdGguc3RhcnRzV2l0aCgnYmxvdHMvJykgfHxcbiAgICAgICAgICAgICAgICAgICAgICBwYXRoLnN0YXJ0c1dpdGgoJ2Zvcm1hdHMvJykpICYmXG4gICAgICAgICAgICAgICAgICAgIHRhcmdldC5ibG90TmFtZSAhPT0gJ2Fic3RyYWN0J1xuICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQucmVnaXN0ZXIodGFyZ2V0KTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHBhdGguc3RhcnRzV2l0aCgnbW9kdWxlcycpICYmXG4gICAgICAgICAgICAgICAgICAgIHR5cGVvZiB0YXJnZXQucmVnaXN0ZXIgPT09ICdmdW5jdGlvbidcbiAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXQucmVnaXN0ZXIoKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgZnVuY3Rpb24gUXVpbGwoY29udGFpbmVyKSB7XG4gICAgICAgICAgICB2YXIgX3RoaXMyID0gdGhpcztcblxuICAgICAgICAgICAgdmFyIG9wdGlvbnMgPVxuICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMSAmJiBhcmd1bWVudHNbMV0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzFdXG4gICAgICAgICAgICAgICAgOiB7fTtcblxuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIFF1aWxsKTtcblxuICAgICAgICAgICAgdGhpcy5vcHRpb25zID0gZXhwYW5kQ29uZmlnKGNvbnRhaW5lciwgb3B0aW9ucyk7XG4gICAgICAgICAgICB0aGlzLmNvbnRhaW5lciA9IHRoaXMub3B0aW9ucy5jb250YWluZXI7XG4gICAgICAgICAgICBpZiAodGhpcy5jb250YWluZXIgPT0gbnVsbCkge1xuICAgICAgICAgICAgICByZXR1cm4gZGVidWcuZXJyb3IoJ0ludmFsaWQgUXVpbGwgY29udGFpbmVyJywgY29udGFpbmVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLm9wdGlvbnMuZGVidWcpIHtcbiAgICAgICAgICAgICAgUXVpbGwuZGVidWcodGhpcy5vcHRpb25zLmRlYnVnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBodG1sID0gdGhpcy5jb250YWluZXIuaW5uZXJIVE1MLnRyaW0oKTtcbiAgICAgICAgICAgIHRoaXMuY29udGFpbmVyLmNsYXNzTGlzdC5hZGQoJ3FsLWNvbnRhaW5lcicpO1xuICAgICAgICAgICAgdGhpcy5jb250YWluZXIuaW5uZXJIVE1MID0gJyc7XG4gICAgICAgICAgICB0aGlzLmNvbnRhaW5lci5fX3F1aWxsID0gdGhpcztcbiAgICAgICAgICAgIHRoaXMucm9vdCA9IHRoaXMuYWRkQ29udGFpbmVyKCdxbC1lZGl0b3InKTtcbiAgICAgICAgICAgIHRoaXMucm9vdC5jbGFzc0xpc3QuYWRkKCdxbC1ibGFuaycpO1xuICAgICAgICAgICAgdGhpcy5yb290LnNldEF0dHJpYnV0ZSgnZGF0YS1ncmFtbScsIGZhbHNlKTtcbiAgICAgICAgICAgIHRoaXMuc2Nyb2xsaW5nQ29udGFpbmVyID1cbiAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLnNjcm9sbGluZ0NvbnRhaW5lciB8fCB0aGlzLnJvb3Q7XG4gICAgICAgICAgICB0aGlzLmVtaXR0ZXIgPSBuZXcgX2VtaXR0ZXI0LmRlZmF1bHQoKTtcbiAgICAgICAgICAgIHRoaXMuc2Ny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AgICAgICAgICAgICAgICAncWwtYmxhbmsnLFxuICAgICAgICAgICAgICAgICAgICBfdGhpczIuZWRpdG9yLmlzQmxhbmsoKSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHRoaXMuZW1pdHRlci5vbihcbiAgICAgICAgICAgICAgX2VtaXR0ZXI0LmRlZmF1bHQuZXZlbnRzLlNDUk9MTF9VUERBVEUsXG4gICAgICAgICAgICAgIGZ1bmN0aW9uIChzb3VyY2UsIG11dGF0aW9ucykge1xuICAgICAgICAgICAgICAgIHZhciByYW5nZSA9IF90aGlzMi5zZWxlY3Rpb24ubGFzdFJhbmdlO1xuICAgICAgICAgICAgICAgIHZhciBpbmRleCA9XG4gICAgICAgICAgICAgICAgICByYW5nZSAmJiByYW5nZS5sZW5ndGggPT09IDAgPyByYW5nZS5pbmRleCA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBtb2RpZnkuY2FsbChcbiAgICAgICAgICAgICAgICAgIF90aGlzMixcbiAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzMi5lZGl0b3IudXBkYXRlKG51bGwsIG11dGF0aW9ucywgaW5kZXgpO1xuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHZhciBjb250ZW50cyA9IHRoaXMuY2xpcGJvYXJkLmNvbnZlcnQoXG4gICAgICAgICAgICAgICc8ZGl2IGNsYXNzPVxcJ3FsLWVkaXRvclxcJyBzdHlsZT1cIndoaXRlLXNwYWNlOiBub3JtYWw7XCI+JyArXG4gICAgICAgICAgICAgICAgaHRtbCArXG4gICAgICAgICAgICAgICAgJzxwPjxicj48L3A+PC9kaXY+JyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICB0aGlzLnNldENvbnRlbnRzKGNvbnRlbnRzKTtcbiAgICAgICAgICAgIHRoaXMuaGlzdG9yeS5jbGVhcigpO1xuICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5wbGFjZWhvbGRlcikge1xuICAgICAgICAgICAgICB0aGlzLnJvb3Quc2V0QXR0cmlidXRlKFxuICAgICAgICAgICAgICAgICdkYXRhLXBsYWNlaG9sZGVyJyxcbiAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMucGxhY2Vob2xkZXIsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGhpcy5vcHRpb25zLnJlYWRPbmx5KSB7XG4gICAgICAgICAgICAgIHRoaXMuZGlzYWJsZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhRdWlsbCwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdhZGRDb250YWluZXInLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gYWRkQ29udGFpbmVyKGNvbnRhaW5lcikge1xuICAgICAgICAgICAgICAgIHZhciByZWZOb2RlID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAxICYmIGFyZ3VtZW50c1sxXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzFdXG4gICAgICAgICAgICAgICAgICAgIDogbnVsbDtcblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgY29udGFpbmVyID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgdmFyIGNsYXNzTmFtZSA9IGNvbnRhaW5lcjtcbiAgICAgICAgICAgICAgICAgIGNvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpO1xuICAgICAgICAgICAgICAgICAgY29udGFpbmVyLmNsYXNzTGlzdC5hZGQoY2xhc3NOYW1lKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5jb250YWluZXIuaW5zZXJ0QmVmb3JlKGNvbnRhaW5lciwgcmVmTm9kZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbnRhaW5lcjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2JsdXInLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gYmx1cigpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbi5zZXRSYW5nZShudWxsKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2RlbGV0ZVRleHQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZGVsZXRlVGV4dChpbmRleCwgbGVuZ3RoLCBzb3VyY2UpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXMzID0gdGhpcztcblxuICAgICAgICAgICAgICAgIHZhciBfb3ZlcmxvYWQgPSBvdmVybG9hZChpbmRleCwgbGVuZ3RoLCBzb3VyY2UpO1xuXG4gICAgICAgICAgICAgICAgdmFyIF9vdmVybG9hZDIgPSBfc2xpY2VkVG9BcnJheShfb3ZlcmxvYWQsIDQpO1xuXG4gICAgICAgICAgICAgICAgaW5kZXggPSBfb3ZlcmxvYWQyWzBdO1xuICAgICAgICAgICAgICAgIGxlbmd0aCA9IF9vdmVybG9hZDJbMV07XG4gICAgICAgICAgICAgICAgc291cmNlID0gX292ZXJsb2FkMlszXTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBtb2RpZnkuY2FsbChcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfdGhpczMuZWRpdG9yLmRlbGV0ZVRleHQoaW5kZXgsIGxlbmd0aCk7XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICAgICAgICAtMSAqIGxlbmd0aCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZGlzYWJsZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBkaXNhYmxlKCkge1xuICAgICAgICAgICAgICAgIHRoaXMuZW5hYmxlKGZhbHNlKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2VuYWJsZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBlbmFibGUoKSB7XG4gICAgICAgICAgICAgICAgdmFyIGVuYWJsZWQgPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDAgJiYgYXJndW1lbnRzWzBdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMF1cbiAgICAgICAgICAgICAgICAgICAgOiB0cnVlO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5zY3JvbGwuZW5hYmxlKGVuYWJsZWQpO1xuICAgICAgICAgICAgICAgIHRoaXMuY29udGFpbmVyLmNsYXNzTGlzdC50b2dnbGUoJ3FsLWRpc2FibGVkJywgIWVuYWJsZWQpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZm9jdXMnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9jdXMoKSB7XG4gICAgICAgICAgICAgICAgdmFyIHNjcm9sbFRvcCA9IHRoaXMuc2Nyb2xsaW5nQ29udGFpbmVyLnNjcm9sbFRvcDtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbi5mb2N1cygpO1xuICAgICAgICAgICAgICAgIHRoaXMuc2Nyb2xsaW5nQ29udGFpbmVyLnNjcm9sbFRvcCA9IHNjcm9sbFRvcDtcbiAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbEludG9WaWV3KCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdmb3JtYXQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9ybWF0KG5hbWUsIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdmFyIF90aGlzNCA9IHRoaXM7XG5cbiAgICAgICAgICAgICAgICB2YXIgc291cmNlID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAyICYmIGFyZ3VtZW50c1syXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzJdXG4gICAgICAgICAgICAgICAgICAgIDogX2VtaXR0ZXI0LmRlZmF1bHQuc291cmNlcy5BUEk7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gbW9kaWZ5LmNhbGwoXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcmFuZ2UgPSBfdGhpczQuZ2V0U2VsZWN0aW9uKHRydWUpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgY2hhbmdlID0gbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyYW5nZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYW5nZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LnF1ZXJ5KFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQuU2NvcGUuQkxPQ0ssXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBjaGFuZ2UgPSBfdGhpczQuZWRpdG9yLmZvcm1hdExpbmUoXG4gICAgICAgICAgICAgICAgICAgICAgICByYW5nZS5pbmRleCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJhbmdlLmxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9kZWZpbmVQcm9wZXJ0eSh7fSwgbmFtZSwgdmFsdWUpLFxuICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmFuZ2UubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgX3RoaXM0LnNlbGVjdGlvbi5mb3JtYXQobmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2U7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgY2hhbmdlID0gX3RoaXM0LmVkaXRvci5mb3JtYXRUZXh0KFxuICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2UuaW5kZXgsXG4gICAgICAgICAgICAgICAgICAgICAgICByYW5nZS5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICBfZGVmaW5lUHJvcGVydHkoe30sIG5hbWUsIHZhbHVlKSxcbiAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIF90aGlzNC5zZXRTZWxlY3Rpb24oXG4gICAgICAgICAgICAgICAgICAgICAgcmFuZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgX2VtaXR0ZXI0LmRlZmF1bHQuc291cmNlcy5TSUxFTlQsXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2U7XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdmb3JtYXRMaW5lJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGZvcm1hdExpbmUoaW5kZXgsIGxlbmd0aCwgbmFtZSwgdmFsdWUsIHNvdXJjZSkge1xuICAgICAgICAgICAgICAgIHZhciBfdGhpczUgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgdmFyIGZvcm1hdHMgPSB2b2lkIDA7XG5cbiAgICAgICAgICAgICAgICB2YXIgX292ZXJsb2FkMyA9IG92ZXJsb2FkKGluZGV4LCBsZW5ndGgsIG5hbWUsIHZhbHVlLCBzb3VyY2UpO1xuXG4gICAgICAgICAgICAgICAgdmFyIF9vdmVybG9hZDQgPSBfc2xpY2VkVG9BcnJheShfb3ZlcmxvYWQzLCA0KTtcblxuICAgICAgICAgICAgICAgIGluZGV4ID0gX292ZXJsb2FkNFswXTtcbiAgICAgICAgICAgICAgICBsZW5ndGggPSBfb3ZlcmxvYWQ0WzFdO1xuICAgICAgICAgICAgICAgIGZvcm1hdHMgPSBfb3ZlcmxvYWQ0WzJdO1xuICAgICAgICAgICAgICAgIHNvdXJjZSA9IF9vdmVybG9hZDRbM107XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gbW9kaWZ5LmNhbGwoXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXM1LmVkaXRvci5mb3JtYXRMaW5lKGluZGV4LCBsZW5ndGgsIGZvcm1hdHMpO1xuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZm9ybWF0VGV4dCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBmb3JtYXRUZXh0KGluZGV4LCBsZW5ndGgsIG5hbWUsIHZhbHVlLCBzb3VyY2UpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXM2ID0gdGhpcztcblxuICAgICAgICAgICAgICAgIHZhciBmb3JtYXRzID0gdm9pZCAwO1xuXG4gICAgICAgICAgICAgICAgdmFyIF9vdmVybG9hZDUgPSBvdmVybG9hZChpbmRleCwgbGVuZ3RoLCBuYW1lLCB2YWx1ZSwgc291cmNlKTtcblxuICAgICAgICAgICAgICAgIHZhciBfb3ZlcmxvYWQ2ID0gX3NsaWNlZFRvQXJyYXkoX292ZXJsb2FkNSwgNCk7XG5cbiAgICAgICAgICAgICAgICBpbmRleCA9IF9vdmVybG9hZDZbMF07XG4gICAgICAgICAgICAgICAgbGVuZ3RoID0gX292ZXJsb2FkNlsxXTtcbiAgICAgICAgICAgICAgICBmb3JtYXRzID0gX292ZXJsb2FkNlsyXTtcbiAgICAgICAgICAgICAgICBzb3VyY2UgPSBfb3ZlcmxvYWQ2WzNdO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG1vZGlmeS5jYWxsKFxuICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzNi5lZGl0b3IuZm9ybWF0VGV4dChpbmRleCwgbGVuZ3RoLCBmb3JtYXRzKTtcbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICBzb3VyY2UsXG4gICAgICAgICAgICAgICAgICBpbmRleCxcbiAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2dldEJvdW5kcycsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRCb3VuZHMoaW5kZXgpIHtcbiAgICAgICAgICAgICAgICB2YXIgbGVuZ3RoID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAxICYmIGFyZ3VtZW50c1sxXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzFdXG4gICAgICAgICAgICAgICAgICAgIDogMDtcblxuICAgICAgICAgICAgICAgIHZhciBib3VuZHMgPSB2b2lkIDA7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpbmRleCA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICAgIGJvdW5kcyA9IHRoaXMuc2VsZWN0aW9uLmdldEJvdW5kcyhpbmRleCwgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgYm91bmRzID0gdGhpcy5zZWxlY3Rpb24uZ2V0Qm91bmRzKGluZGV4LmluZGV4LCBpbmRleC5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgY29udGFpbmVyQm91bmRzID0gdGhpcy5jb250YWluZXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgIGJvdHRvbTogYm91bmRzLmJvdHRvbSAtIGNvbnRhaW5lckJvdW5kcy50b3AsXG4gICAgICAgICAgICAgICAgICBoZWlnaHQ6IGJvdW5kcy5oZWlnaHQsXG4gICAgICAgICAgICAgICAgICBsZWZ0OiBib3VuZHMubGVmdCAtIGNvbnRhaW5lckJvdW5kcy5sZWZ0LFxuICAgICAgICAgICAgICAgICAgcmlnaHQ6IGJvdW5kcy5yaWdodCAtIGNvbnRhaW5lckJvdW5kcy5sZWZ0LFxuICAgICAgICAgICAgICAgICAgdG9wOiBib3VuZHMudG9wIC0gY29udGFpbmVyQm91bmRzLnRvcCxcbiAgICAgICAgICAgICAgICAgIHdpZHRoOiBib3VuZHMud2lkdGgsXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2dldENvbnRlbnRzJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGdldENvbnRlbnRzKCkge1xuICAgICAgICAgICAgICAgIHZhciBpbmRleCA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMCAmJiBhcmd1bWVudHNbMF0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1swXVxuICAgICAgICAgICAgICAgICAgICA6IDA7XG4gICAgICAgICAgICAgICAgdmFyIGxlbmd0aCA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMSAmJiBhcmd1bWVudHNbMV0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1sxXVxuICAgICAgICAgICAgICAgICAgICA6IHRoaXMuZ2V0TGVuZ3RoKCkgLSBpbmRleDtcblxuICAgICAgICAgICAgICAgIHZhciBfb3ZlcmxvYWQ3ID0gb3ZlcmxvYWQoaW5kZXgsIGxlbmd0aCk7XG5cbiAgICAgICAgICAgICAgICB2YXIgX292ZXJsb2FkOCA9IF9zbGljZWRUb0FycmF5KF9vdmVybG9hZDcsIDIpO1xuXG4gICAgICAgICAgICAgICAgaW5kZXggPSBfb3ZlcmxvYWQ4WzBdO1xuICAgICAgICAgICAgICAgIGxlbmd0aCA9IF9vdmVybG9hZDhbMV07XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5lZGl0b3IuZ2V0Q29udGVudHMoaW5kZXgsIGxlbmd0aCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdnZXRGb3JtYXQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0Rm9ybWF0KCkge1xuICAgICAgICAgICAgICAgIHZhciBpbmRleCA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMCAmJiBhcmd1bWVudHNbMF0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1swXVxuICAgICAgICAgICAgICAgICAgICA6IHRoaXMuZ2V0U2VsZWN0aW9uKHRydWUpO1xuICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDEgJiYgYXJndW1lbnRzWzFdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMV1cbiAgICAgICAgICAgICAgICAgICAgOiAwO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpbmRleCA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmVkaXRvci5nZXRGb3JtYXQoaW5kZXgsIGxlbmd0aCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmVkaXRvci5nZXRGb3JtYXQoaW5kZXguaW5kZXgsIGluZGV4Lmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZ2V0SW5kZXgnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0SW5kZXgoYmxvdCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBibG90Lm9mZnNldCh0aGlzLnNjcm9sbCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdnZXRMZW5ndGgnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0TGVuZ3RoKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnNjcm9sbC5sZW5ndGgoKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2dldExlYWYnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0TGVhZihpbmRleCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnNjcm9sbC5sZWFmKGluZGV4KTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2dldExpbmUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0TGluZShpbmRleCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnNjcm9sbC5saW5lKGluZGV4KTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2dldExpbmVzJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGdldExpbmVzKCkge1xuICAgICAgICAgICAgICAgIHZhciBpbmRleCA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMCAmJiBhcmd1bWVudHNbMF0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1swXVxuICAgICAgICAgICAgICAgICAgICA6IDA7XG4gICAgICAgICAgICAgICAgdmFyIGxlbmd0aCA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMSAmJiBhcmd1bWVudHNbMV0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1sxXVxuICAgICAgICAgICAgICAgICAgICA6IE51bWJlci5NQVhfVkFMVUU7XG5cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGluZGV4ICE9PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuc2Nyb2xsLmxpbmVzKGluZGV4LmluZGV4LCBpbmRleC5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5zY3JvbGwubGluZXMoaW5kZXgsIGxlbmd0aCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZ2V0TW9kdWxlJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGdldE1vZHVsZShuYW1lKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudGhlbWUubW9kdWxlc1tuYW1lXTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2dldFNlbGVjdGlvbicsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRTZWxlY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgdmFyIGZvY3VzID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAwICYmIGFyZ3VtZW50c1swXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzBdXG4gICAgICAgICAgICAgICAgICAgIDogZmFsc2U7XG5cbiAgICAgICAgICAgICAgICBpZiAoZm9jdXMpIHRoaXMuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZSgpOyAvLyBNYWtlIHN1cmUgd2UgYWNjZXNzIGdldFJhbmdlIHdpdGggZWRpdG9yIGluIGNvbnNpc3RlbnQgc3RhdGVcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5zZWxlY3Rpb24uZ2V0UmFuZ2UoKVswXTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2dldFRleHQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0VGV4dCgpIHtcbiAgICAgICAgICAgICAgICB2YXIgaW5kZXggPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDAgJiYgYXJndW1lbnRzWzBdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMF1cbiAgICAgICAgICAgICAgICAgICAgOiAwO1xuICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDEgJiYgYXJndW1lbnRzWzFdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMV1cbiAgICAgICAgICAgICAgICAgICAgOiB0aGlzLmdldExlbmd0aCgpIC0gaW5kZXg7XG5cbiAgICAgICAgICAgICAgICB2YXIgX292ZXJsb2FkOSA9IG92ZXJsb2FkKGluZGV4LCBsZW5ndGgpO1xuXG4gICAgICAgICAgICAgICAgdmFyIF9vdmVybG9hZDEwID0gX3NsaWNlZFRvQXJyYXkoX292ZXJsb2FkOSwgMik7XG5cbiAgICAgICAgICAgICAgICBpbmRleCA9IF9vdmVybG9hZDEwWzBdO1xuICAgICAgICAgICAgICAgIGxlbmd0aCA9IF9vdmVybG9hZDEwWzFdO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZWRpdG9yLmdldFRleHQoaW5kZXgsIGxlbmd0aCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdoYXNGb2N1cycsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBoYXNGb2N1cygpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5zZWxlY3Rpb24uaGFzRm9jdXMoKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2luc2VydEVtYmVkJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGluc2VydEVtYmVkKGluZGV4LCBlbWJlZCwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXM3ID0gdGhpcztcblxuICAgICAgICAgICAgICAgIHZhciBzb3VyY2UgPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDMgJiYgYXJndW1lbnRzWzNdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbM11cbiAgICAgICAgICAgICAgICAgICAgOiBRdWlsbC5zb3VyY2VzLkFQSTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBtb2RpZnkuY2FsbChcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfdGhpczcuZWRpdG9yLmluc2VydEVtYmVkKGluZGV4LCBlbWJlZCwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdpbnNlcnRUZXh0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGluc2VydFRleHQoaW5kZXgsIHRleHQsIG5hbWUsIHZhbHVlLCBzb3VyY2UpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXM4ID0gdGhpcztcblxuICAgICAgICAgICAgICAgIHZhciBmb3JtYXRzID0gdm9pZCAwO1xuXG4gICAgICAgICAgICAgICAgdmFyIF9vdmVybG9hZDExID0gb3ZlcmxvYWQoaW5kZXgsIDAsIG5hbWUsIHZhbHVlLCBzb3VyY2UpO1xuXG4gICAgICAgICAgICAgICAgdmFyIF9vdmVybG9hZDEyID0gX3NsaWNlZFRvQXJyYXkoX292ZXJsb2FkMTEsIDQpO1xuXG4gICAgICAgICAgICAgICAgaW5kZXggPSBfb3ZlcmxvYWQxMlswXTtcbiAgICAgICAgICAgICAgICBmb3JtYXRzID0gX292ZXJsb2FkMTJbMl07XG4gICAgICAgICAgICAgICAgc291cmNlID0gX292ZXJsb2FkMTJbM107XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gbW9kaWZ5LmNhbGwoXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXM4LmVkaXRvci5pbnNlcnRUZXh0KGluZGV4LCB0ZXh0LCBmb3JtYXRzKTtcbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICBzb3VyY2UsXG4gICAgICAgICAgICAgICAgICBpbmRleCxcbiAgICAgICAgICAgICAgICAgIHRleHQubGVuZ3RoLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdpc0VuYWJsZWQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gaXNFbmFibGVkKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiAhdGhpcy5jb250YWluZXIuY2xhc3NMaXN0LmNvbnRhaW5zKCdxbC1kaXNhYmxlZCcpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnb2ZmJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIG9mZigpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5lbWl0dGVyLm9mZi5hcHBseSh0aGlzLmVtaXR0ZXIsIGFyZ3VtZW50cyk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdvbicsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBvbigpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5lbWl0dGVyLm9uLmFwcGx5KHRoaXMuZW1pdHRlciwgYXJndW1lbnRzKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ29uY2UnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gb25jZSgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5lbWl0dGVyLm9uY2UuYXBwbHkodGhpcy5lbWl0dGVyLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAncGFzdGVIVE1MJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHBhc3RlSFRNTChpbmRleCwgaHRtbCwgc291cmNlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jbGlwYm9hcmQuZGFuZ2Vyb3VzbHlQYXN0ZUhUTUwoaW5kZXgsIGh0bWwsIHNvdXJjZSk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdyZW1vdmVGb3JtYXQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcmVtb3ZlRm9ybWF0KGluZGV4LCBsZW5ndGgsIHNvdXJjZSkge1xuICAgICAgICAgICAgICAgIHZhciBfdGhpczkgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgdmFyIF9vdmVybG9hZDEzID0gb3ZlcmxvYWQoaW5kZXgsIGxlbmd0aCwgc291cmNlKTtcblxuICAgICAgICAgICAgICAgIHZhciBfb3ZlcmxvYWQxNCA9IF9zbGljZWRUb0FycmF5KF9vdmVybG9hZDEzLCA0KTtcblxuICAgICAgICAgICAgICAgIGluZGV4ID0gX292ZXJsb2FkMTRbMF07XG4gICAgICAgICAgICAgICAgbGVuZ3RoID0gX292ZXJsb2FkMTRbMV07XG4gICAgICAgICAgICAgICAgc291cmNlID0gX292ZXJsb2FkMTRbM107XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gbW9kaWZ5LmNhbGwoXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXM5LmVkaXRvci5yZW1vdmVGb3JtYXQoaW5kZXgsIGxlbmd0aCk7XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3Njcm9sbEludG9WaWV3JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHNjcm9sbEludG9WaWV3KCkge1xuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uLnNjcm9sbEludG9WaWV3KHRoaXMuc2Nyb2xsaW5nQ29udGFpbmVyKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3NldENvbnRlbnRzJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHNldENvbnRlbnRzKGRlbHRhKSB7XG4gICAgICAgICAgICAgICAgdmFyIF90aGlzMTAgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgdmFyIHNvdXJjZSA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMSAmJiBhcmd1bWVudHNbMV0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1sxXVxuICAgICAgICAgICAgICAgICAgICA6IF9lbWl0dGVyNC5kZWZhdWx0LnNvdXJjZXMuQVBJO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG1vZGlmeS5jYWxsKFxuICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVsdGEgPSBuZXcgX3F1aWxsRGVsdGEyLmRlZmF1bHQoZGVsdGEpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGVuZ3RoID0gX3RoaXMxMC5nZXRMZW5ndGgoKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRlbGV0ZWQgPSBfdGhpczEwLmVkaXRvci5kZWxldGVUZXh0KDAsIGxlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBhcHBsaWVkID0gX3RoaXMxMC5lZGl0b3IuYXBwbHlEZWx0YShkZWx0YSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsYXN0T3AgPSBhcHBsaWVkLm9wc1thcHBsaWVkLm9wcy5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGxhc3RPcCAhPSBudWxsICYmXG4gICAgICAgICAgICAgICAgICAgICAgdHlwZW9mIGxhc3RPcC5pbnNlcnQgPT09ICdzdHJpbmcnICYmXG4gICAgICAgICAgICAgICAgICAgICAgbGFzdE9wLmluc2VydFtsYXN0T3AuaW5zZXJ0Lmxlbmd0aCAtIDFdID09PSAnXFxuJ1xuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBfdGhpczEwLmVkaXRvci5kZWxldGVUZXh0KF90aGlzMTAuZ2V0TGVuZ3RoKCkgLSAxLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgICBhcHBsaWVkLmRlbGV0ZSgxKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB2YXIgcmV0ID0gZGVsZXRlZC5jb21wb3NlKGFwcGxpZWQpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnc2V0U2VsZWN0aW9uJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHNldFNlbGVjdGlvbihpbmRleCwgbGVuZ3RoLCBzb3VyY2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb24uc2V0UmFuZ2UobnVsbCwgbGVuZ3RoIHx8IFF1aWxsLnNvdXJjZXMuQVBJKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgdmFyIF9vdmVybG9hZDE1ID0gb3ZlcmxvYWQoaW5kZXgsIGxlbmd0aCwgc291cmNlKTtcblxuICAgICAgICAgICAgICAgICAgdmFyIF9vdmVybG9hZDE2ID0gX3NsaWNlZFRvQXJyYXkoX292ZXJsb2FkMTUsIDQpO1xuXG4gICAgICAgICAgICAgICAgICBpbmRleCA9IF9vdmVybG9hZDE2WzBdO1xuICAgICAgICAgICAgICAgICAgbGVuZ3RoID0gX292ZXJsb2FkMTZbMV07XG4gICAgICAgICAgICAgICAgICBzb3VyY2UgPSBfb3ZlcmxvYWQxNlszXTtcblxuICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb24uc2V0UmFuZ2UoXG4gICAgICAgICAgICAgICAgICAgIG5ldyBfc2VsZWN0aW9uLlJhbmdlKGluZGV4LCBsZW5ndGgpLFxuICAgICAgICAgICAgICAgICAgICBzb3VyY2UsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgaWYgKHNvdXJjZSAhPT0gX2VtaXR0ZXI0LmRlZmF1bHQuc291cmNlcy5TSUxFTlQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb24uc2Nyb2xsSW50b1ZpZXcodGhpcy5zY3JvbGxpbmdDb250YWluZXIpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3NldFRleHQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gc2V0VGV4dCh0ZXh0KSB7XG4gICAgICAgICAgICAgICAgdmFyIHNvdXJjZSA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMSAmJiBhcmd1bWVudHNbMV0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1sxXVxuICAgICAgICAgICAgICAgICAgICA6IF9lbWl0dGVyNC5kZWZhdWx0LnNvdXJjZXMuQVBJO1xuXG4gICAgICAgICAgICAgICAgdmFyIGRlbHRhID0gbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KCkuaW5zZXJ0KHRleHQpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnNldENvbnRlbnRzKGRlbHRhLCBzb3VyY2UpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAndXBkYXRlJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHVwZGF0ZSgpIHtcbiAgICAgICAgICAgICAgICB2YXIgc291cmNlID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAwICYmIGFyZ3VtZW50c1swXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzBdXG4gICAgICAgICAgICAgICAgICAgIDogX2VtaXR0ZXI0LmRlZmF1bHQuc291cmNlcy5VU0VSO1xuXG4gICAgICAgICAgICAgICAgdmFyIGNoYW5nZSA9IHRoaXMuc2Nyb2xsLnVwZGF0ZShzb3VyY2UpOyAvLyBXaWxsIHVwZGF0ZSBzZWxlY3Rpb24gYmVmb3JlIHNlbGVjdGlvbi51cGRhdGUoKSBkb2VzIGlmIHRleHQgY2hhbmdlc1xuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uLnVwZGF0ZShzb3VyY2UpO1xuICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2U7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICd1cGRhdGVDb250ZW50cycsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiB1cGRhdGVDb250ZW50cyhkZWx0YSkge1xuICAgICAgICAgICAgICAgIHZhciBfdGhpczExID0gdGhpcztcblxuICAgICAgICAgICAgICAgIHZhciBzb3VyY2UgPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDEgJiYgYXJndW1lbnRzWzFdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMV1cbiAgICAgICAgICAgICAgICAgICAgOiBfZW1pdHRlcjQuZGVmYXVsdC5zb3VyY2VzLkFQSTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBtb2RpZnkuY2FsbChcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlbHRhID0gbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KGRlbHRhKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzMTEuZWRpdG9yLmFwcGx5RGVsdGEoZGVsdGEsIHNvdXJjZSk7XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgdHJ1ZSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIHJldHVybiBRdWlsbDtcbiAgICAgICAgfSkoKTtcblxuICAgICAgICBRdWlsbC5ERUZBVUxUUyA9IHtcbiAgICAgICAgICBib3VuZHM6IG51bGwsXG4gICAgICAgICAgZm9ybWF0czogbnVsbCxcbiAgICAgICAgICBtb2R1bGVzOiB7fSxcbiAgICAgICAgICBwbGFjZWhvbGRlcjogJycsXG4gICAgICAgICAgcmVhZE9ubHk6IGZhbHNlLFxuICAgICAgICAgIHNjcm9sbGluZ0NvbnRhaW5lcjogbnVsbCxcbiAgICAgICAgICBzdHJpY3Q6IHRydWUsXG4gICAgICAgICAgdGhlbWU6ICdkZWZhdWx0JyxcbiAgICAgICAgfTtcbiAgICAgICAgUXVpbGwuZXZlbnRzID0gX2VtaXR0ZXI0LmRlZmF1bHQuZXZlbnRzO1xuICAgICAgICBRdWlsbC5zb3VyY2VzID0gX2VtaXR0ZXI0LmRlZmF1bHQuc291cmNlcztcbiAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXVuZGVmXG4gICAgICAgIFF1aWxsLnZlcnNpb24gPSBmYWxzZSA/ICdkZXYnIDogJzEuMy42JztcblxuICAgICAgICBRdWlsbC5pbXBvcnRzID0ge1xuICAgICAgICAgIGRlbHRhOiBfcXVpbGxEZWx0YTIuZGVmYXVsdCxcbiAgICAgICAgICBwYXJjaG1lbnQ6IF9wYXJjaG1lbnQyLmRlZmF1bHQsXG4gICAgICAgICAgJ2NvcmUvbW9kdWxlJzogX21vZHVsZTIuZGVmYXVsdCxcbiAgICAgICAgICAnY29yZS90aGVtZSc6IF90aGVtZTIuZGVmYXVsdCxcbiAgICAgICAgfTtcblxuICAgICAgICBmdW5jdGlvbiBleHBhbmRDb25maWcoY29udGFpbmVyLCB1c2VyQ29uZmlnKSB7XG4gICAgICAgICAgdXNlckNvbmZpZyA9ICgwLCBfZXh0ZW5kMi5kZWZhdWx0KShcbiAgICAgICAgICAgIHRydWUsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGNvbnRhaW5lcjogY29udGFpbmVyLFxuICAgICAgICAgICAgICBtb2R1bGVzOiB7XG4gICAgICAgICAgICAgICAgY2xpcGJvYXJkOiB0cnVlLFxuICAgICAgICAgICAgICAgIGtleWJvYXJkOiB0cnVlLFxuICAgICAgICAgICAgICAgIGhpc3Rvcnk6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdXNlckNvbmZpZyxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmICghdXNlckNvbmZpZy50aGVtZSB8fCB1c2VyQ29uZmlnLnRoZW1lID09PSBRdWlsbC5ERUZBVUxUUy50aGVtZSkge1xuICAgICAgICAgICAgdXNlckNvbmZpZy50aGVtZSA9IF90aGVtZTIuZGVmYXVsdDtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdXNlckNvbmZpZy50aGVtZSA9IFF1aWxsLmltcG9ydCgndGhlbWVzLycgKyB1c2VyQ29uZmlnLnRoZW1lKTtcbiAgICAgICAgICAgIGlmICh1c2VyQ29uZmlnLnRoZW1lID09IG51bGwpIHtcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICdJbnZhbGlkIHRoZW1lICcgKyB1c2VyQ29uZmlnLnRoZW1lICsgJy4gRGlkIHlvdSByZWdpc3RlciBpdD8nLFxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgdGhlbWVDb25maWcgPSAoMCwgX2V4dGVuZDIuZGVmYXVsdCkoXG4gICAgICAgICAgICB0cnVlLFxuICAgICAgICAgICAge30sXG4gICAgICAgICAgICB1c2VyQ29uZmlnLnRoZW1lLkRFRkFVTFRTLFxuICAgICAgICAgICk7XG4gICAgICAgICAgW3RoZW1lQ29uZmlnLCB1c2VyQ29uZmlnXS5mb3JFYWNoKGZ1bmN0aW9uIChjb25maWcpIHtcbiAgICAgICAgICAgIGNvbmZpZy5tb2R1bGVzID0gY29uZmlnLm1vZHVsZXMgfHwge307XG4gICAgICAgICAgICBPYmplY3Qua2V5cyhjb25maWcubW9kdWxlcykuZm9yRWFjaChmdW5jdGlvbiAobW9kdWxlKSB7XG4gICAgICAgICAgICAgIGlmIChjb25maWcubW9kdWxlc1ttb2R1bGVdID09PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgY29uZmlnLm1vZHVsZXNbbW9kdWxlXSA9IHt9O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICB2YXIgbW9kdWxlTmFtZXMgPSBPYmplY3Qua2V5cyh0aGVtZUNvbmZpZy5tb2R1bGVzKS5jb25jYXQoXG4gICAgICAgICAgICBPYmplY3Qua2V5cyh1c2VyQ29uZmlnLm1vZHVsZXMpLFxuICAgICAgICAgICk7XG4gICAgICAgICAgdmFyIG1vZHVsZUNvbmZpZyA9IG1vZHVsZU5hbWVzLnJlZHVjZShmdW5jdGlvbiAoY29uZmlnLCBuYW1lKSB7XG4gICAgICAgICAgICB2YXIgbW9kdWxlQ2xhc3MgPSBRdWlsbC5pbXBvcnQoJ21vZHVsZXMvJyArIG5hbWUpO1xuICAgICAgICAgICAgaWYgKG1vZHVsZUNsYXNzID09IG51bGwpIHtcbiAgICAgICAgICAgICAgZGVidWcuZXJyb3IoXG4gICAgICAgICAgICAgICAgJ0Nhbm5vdCBsb2FkICcgK1xuICAgICAgICAgICAgICAgICAgbmFtZSArXG4gICAgICAgICAgICAgICAgICAnIG1vZHVsZS4gQXJlIHlvdSBzdXJlIHlvdSByZWdpc3RlcmVkIGl0PycsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjb25maWdbbmFtZV0gPSBtb2R1bGVDbGFzcy5ERUZBVUxUUyB8fCB7fTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBjb25maWc7XG4gICAgICAgICAgfSwge30pO1xuICAgICAgICAgIC8vIFNwZWNpYWwgY2FzZSB0b29sYmFyIHNob3J0aGFuZFxuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgIHVzZXJDb25maWcubW9kdWxlcyAhPSBudWxsICYmXG4gICAgICAgICAgICB1c2VyQ29uZmlnLm1vZHVsZXMudG9vbGJhciAmJlxuICAgICAgICAgICAgdXNlckNvbmZpZy5tb2R1bGVzLnRvb2xiYXIuY29uc3RydWN0b3IgIT09IE9iamVjdFxuICAgICAgICAgICkge1xuICAgICAgICAgICAgdXNlckNvbmZpZy5tb2R1bGVzLnRvb2xiYXIgPSB7XG4gICAgICAgICAgICAgIGNvbnRhaW5lcjogdXNlckNvbmZpZy5tb2R1bGVzLnRvb2xiYXIsXG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH1cbiAgICAgICAgICB1c2VyQ29uZmlnID0gKDAsIF9leHRlbmQyLmRlZmF1bHQpKFxuICAgICAgICAgICAgdHJ1ZSxcbiAgICAgICAgICAgIHt9LFxuICAgICAgICAgICAgUXVpbGwuREVGQVVMVFMsXG4gICAgICAgICAgICB7bW9kdWxlczogbW9kdWxlQ29uZmlnfSxcbiAgICAgICAgICAgIHRoZW1lQ29uZmlnLFxuICAgICAgICAgICAgdXNlckNvbmZpZyxcbiAgICAgICAgICApO1xuICAgICAgICAgIFsnYm91bmRzJywgJ2NvbnRhaW5lcicsICdzY3JvbGxpbmdDb250YWluZXInXS5mb3JFYWNoKGZ1bmN0aW9uIChrZXkpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdXNlckNvbmZpZ1trZXldID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICB1c2VyQ29uZmlnW2tleV0gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKHVzZXJDb25maWdba2V5XSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgdXNlckNvbmZpZy5tb2R1bGVzID0gT2JqZWN0LmtleXModXNlckNvbmZpZy5tb2R1bGVzKS5yZWR1Y2UoZnVuY3Rpb24gKFxuICAgICAgICAgICAgY29uZmlnLFxuICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIGlmICh1c2VyQ29uZmlnLm1vZHVsZXNbbmFtZV0pIHtcbiAgICAgICAgICAgICAgY29uZmlnW25hbWVdID0gdXNlckNvbmZpZy5tb2R1bGVzW25hbWVdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGNvbmZpZztcbiAgICAgICAgICB9LFxuICAgICAgICAgIHt9KTtcbiAgICAgICAgICByZXR1cm4gdXNlckNvbmZpZztcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEhhbmRsZSBzZWxlY3Rpb24gcHJlc2VydmF0aW9uIGFuZCBURVhUX0NIQU5HRSBlbWlzc2lvblxuICAgICAgICAvLyBjb21tb24gdG8gbW9kaWZpY2F0aW9uIEFQSXNcbiAgICAgICAgZnVuY3Rpb24gbW9kaWZ5KG1vZGlmaWVyLCBzb3VyY2UsIGluZGV4LCBzaGlmdCkge1xuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgIHRoaXMub3B0aW9ucy5zdHJpY3QgJiZcbiAgICAgICAgICAgICF0aGlzLmlzRW5hYmxlZCgpICYmXG4gICAgICAgICAgICBzb3VyY2UgPT09IF9lbWl0dGVyNC5kZWZhdWx0LnNvdXJjZXMuVVNFUlxuICAgICAgICAgICkge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgcmFuZ2UgPSBpbmRleCA9PSBudWxsID8gbnVsbCA6IHRoaXMuZ2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgdmFyIG9sZERlbHRhID0gdGhpcy5lZGl0b3IuZGVsdGE7XG4gICAgICAgICAgdmFyIGNoYW5nZSA9IG1vZGlmaWVyKCk7XG4gICAgICAgICAgaWYgKHJhbmdlICE9IG51bGwpIHtcbiAgICAgICAgICAgIGlmIChpbmRleCA9PT0gdHJ1ZSkgaW5kZXggPSByYW5nZS5pbmRleDtcbiAgICAgICAgICAgIGlmICh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KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGNoYW5nZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIG92ZXJsb2FkKGluZGV4LCBsZW5ndGgsIG5hbWUsIHZhbHVlLCBzb3VyY2UpIHtcbiAgICAgICAgICB2YXIgZm9ybWF0cyA9IHt9O1xuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgIHR5cGVvZiBpbmRleC5pbmRleCA9PT0gJ251bWJlcicgJiZcbiAgICAgICAgICAgIHR5cGVvZiBpbmRleC5sZW5ndGggPT09ICdudW1iZXInXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICAvLyBBbGxvdyBmb3IgdGhyb3dhd2F5IGVuZCAodXNlZCBieSBpbnNlcnRUZXh0L2luc2VydEVtYmVkKVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBsZW5ndGggIT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgIChzb3VyY2UgPSB2YWx1ZSksXG4gICAgICAgICAgICAgICAgKHZhbHVlID0gbmFtZSksXG4gICAgICAgICAgICAgICAgKG5hbWUgPSBsZW5ndGgpLFxuICAgICAgICAgICAgICAgIChsZW5ndGggPSBpbmRleC5sZW5ndGgpLFxuICAgICAgICAgICAgICAgIChpbmRleCA9IGluZGV4LmluZGV4KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIChsZW5ndGggPSBpbmRleC5sZW5ndGgpLCAoaW5kZXggPSBpbmRleC5pbmRleCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgbGVuZ3RoICE9PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgKHNvdXJjZSA9IHZhbHVlKSwgKHZhbHVlID0gbmFtZSksIChuYW1lID0gbGVuZ3RoKSwgKGxlbmd0aCA9IDApO1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLyBIYW5kbGUgZm9ybWF0IGJlaW5nIG9iamVjdCwgdHdvIGZvcm1hdCBuYW1lL3ZhbHVlIHN0cmluZ3Mgb3IgZXhjbHVkZWRcbiAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAodHlwZW9mIG5hbWUgPT09ICd1bmRlZmluZWQnID8gJ3VuZGVmaW5lZCcgOiBfdHlwZW9mKG5hbWUpKSA9PT1cbiAgICAgICAgICAgICdvYmplY3QnXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICBmb3JtYXRzID0gbmFtZTtcbiAgICAgICAgICAgIHNvdXJjZSA9IHZhbHVlO1xuICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIG5hbWUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBpZiAodmFsdWUgIT0gbnVsbCkge1xuICAgICAgICAgICAgICBmb3JtYXRzW25hbWVdID0gdmFsdWU7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBzb3VyY2UgPSBuYW1lO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICAvLyBIYW5kbGUgb3B0aW9uYWwgc291cmNlXG4gICAgICAgICAgc291cmNlID0gc291cmNlIHx8IF9lbWl0dGVyNC5kZWZhdWx0LnNvdXJjZXMuQVBJO1xuICAgICAgICAgIHJldHVybiBbaW5kZXgsIGxlbmd0aCwgZm9ybWF0cywgc291cmNlXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIHNoaWZ0UmFuZ2UocmFuZ2UsIGluZGV4LCBsZW5ndGgsIHNvdXJjZSkge1xuICAgICAgICAgIGlmIChyYW5nZSA9PSBudWxsKSByZXR1cm4gbnVsbDtcbiAgICAgICAgICB2YXIgc3RhcnQgPSB2b2lkIDAsXG4gICAgICAgICAgICBlbmQgPSB2b2lkIDA7XG4gICAgICAgICAgaWYgKGluZGV4IGluc3RhbmNlb2YgX3F1aWxsRGVsdGEyLmRlZmF1bHQpIHtcbiAgICAgICAgICAgIHZhciBfbWFwID0gW3JhbmdlLmluZGV4LCByYW5nZS5pbmRleCArIHJhbmdlLmxlbmd0aF0ubWFwKGZ1bmN0aW9uIChcbiAgICAgICAgICAgICAgcG9zLFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIHJldHVybiBpbmRleC50cmFuc2Zvcm1Qb3NpdGlvbihcbiAgICAgICAgICAgICAgICBwb3MsXG4gICAgICAgICAgICAgICAgc291cmNlICE9PSBfZW1pdHRlcjQuZGVmYXVsdC5zb3VyY2VzLlVTRVIsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgdmFyIF9tYXAyID0gX3NsaWNlZFRvQXJyYXkoX21hcCwgMik7XG5cbiAgICAgICAgICAgIHN0YXJ0ID0gX21hcDJbMF07XG4gICAgICAgICAgICBlbmQgPSBfbWFwMlsxXTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIF9tYXAzID0gW3JhbmdlLmluZGV4LCByYW5nZS5pbmRleCArIHJhbmdlLmxlbmd0aF0ubWFwKGZ1bmN0aW9uIChcbiAgICAgICAgICAgICAgcG9zLFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBwb3MgPCBpbmRleCB8fFxuICAgICAgICAgICAgICAgIChwb3MgPT09IGluZGV4ICYmIHNvdXJjZSA9PT0gX2VtaXR0ZXI0LmRlZmF1bHQuc291cmNlcy5VU0VSKVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgcmV0dXJuIHBvcztcbiAgICAgICAgICAgICAgaWYgKGxlbmd0aCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBvcyArIGxlbmd0aDtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5tYXgoaW5kZXgsIHBvcyArIGxlbmd0aCk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAg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ICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBnZXQocGFyZW50LCBwcm9wZXJ0eSwgcmVjZWl2ZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSBpZiAoJ3ZhbHVlJyBpbiBkZXNjKSB7XG4gICAgICAgICAgICByZXR1cm4gZGVzYy52YWx1ZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGdldHRlciA9IGRlc2MuZ2V0O1xuICAgICAgICAgICAgaWYgKGdldHRlciA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZ2V0dGVyLmNhbGwocmVjZWl2ZXIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgX3RleHQgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDcpO1xuXG4gICAgICAgIHZhciBfdGV4dDIgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KF90ZXh0KTtcblxuICAgICAgICB2YXIgX3BhcmNobWVudCA9IF9fd2VicGFja19yZXF1aXJlX18oMCk7XG5cbiAgICAgICAgdmFyIF9wYXJjaG1lbnQyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfcGFyY2htZW50KTtcblxuICAgICAgICBmdW5jdGlvbiBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KG9iaikge1xuICAgICAgICAgIHJldHVybiBvYmogJiYgb2JqLl9fZXNNb2R1bGUgPyBvYmogOiB7ZGVmYXVsdDogb2JqfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9jbGFzc0NhbGxDaGVjayhpbnN0YW5jZSwgQ29uc3RydWN0b3IpIHtcbiAgICAgICAgICBpZiAoIShpbnN0YW5jZSBpbnN0YW5jZW9mIENvbnN0cnVjdG9yKSkge1xuICAgICAgICAgICAgd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xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIElubGluZSA9IChmdW5jdGlvbiAoX1BhcmNobWVudCRJbmxpbmUpIHtcbiAgICAgICAgICBfaW5oZXJpdHMoSW5saW5lLCBfUGFyY2htZW50JElubGluZSk7XG5cbiAgICAgICAgICBmdW5jdGlvbiBJbmxpbmUoKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgSW5saW5lKTtcblxuICAgICAgICAgICAgcmV0dXJuIF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoSW5saW5lLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoSW5saW5lKSkuYXBwbHkoXG4gICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICBhcmd1bWVudHMsXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhcbiAgICAgICAgICAgIElubGluZSxcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGtleTogJ2Zvcm1hdEF0JyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9ybWF0QXQoaW5kZXgsIGxlbmd0aCwgbmFtZSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgSW5saW5lLmNvbXBhcmUodGhpcy5zdGF0aWNzLmJsb3ROYW1lLCBuYW1lKSA8IDAgJiZcbiAgICAgICAgICAgICAgICAgICAgX3BhcmNobWVudDIuZGVmYXVsdC5xdWVyeShcbiAgICAgICAgICAgICAgICAgICAgICBuYW1lLFxuICAgICAgICAgICAgICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQuU2NvcGUuQkxPVCxcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBibG90ID0gdGhpcy5pc29sYXRlKGluZGV4LCBsZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICBibG90LndyYXAobmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgIElubGluZS5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoSW5saW5lLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgICAgJ2Zvcm1hdEF0JyxcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgaW5kZXgsIGxlbmd0aCwgbmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdvcHRpbWl6ZScsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIG9wdGltaXplKGNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICAgIF9nZXQoXG4gICAgICAgICAgICAgICAgICAgIElubGluZS5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKElubGluZS5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgICAnb3B0aW1pemUnLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIGNvbnRleHQpO1xuICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLnBhcmVudCBpbnN0YW5jZW9mIElubGluZSAmJlxuICAgICAgICAgICAgICAgICAgICBJbmxpbmUuY29tcGFyZShcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRpY3MuYmxvdE5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5wYXJlbnQuc3RhdGljcy5ibG90TmFtZSxcbiAgICAgICAgICAgICAgICAgICAgKSA+IDBcbiAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcGFyZW50ID0gdGhpcy5wYXJlbnQuaXNvbGF0ZShcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLm9mZnNldCgpLFxuICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGVuZ3RoKCksXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubW92ZUNoaWxkcmVuKHBhcmVudCk7XG4gICAgICAgICAgICAgICAgICAgIHBhcmVudC53cmFwKHRoaXMpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAnY29tcGFyZScsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGNvbXBhcmUoc2VsZiwgb3RoZXIpIHtcbiAgICAgICAgICAgICAgICAgIHZhciBzZWxmSW5kZXggPSBJbmxpbmUub3JkZXIuaW5kZXhPZihzZWxmKTtcbiAgICAgICAgICAgICAgICAgIHZhciBvdGhlckluZGV4ID0gSW5saW5lLm9yZGVyLmluZGV4T2Yob3RoZXIpO1xuICAgICAgICAgICAgICAgICAgaWYgKHNlbGZJbmRleCA+PSAwIHx8IG90aGVySW5kZXggPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2VsZkluZGV4IC0gb3RoZXJJbmRleDtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VsZiA9PT0gb3RoZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNlbGYgPCBvdGhlcikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXSxcbiAgICAgICAgICApO1xuXG4gICAgICAgICAgcmV0dXJuIElubGluZTtcbiAgICAgICAgfSkoX3BhcmNobWVudDIuZGVmYXVsdC5JbmxpbmUpO1xuXG4gICAgICAgIElubGluZS5hbGxvd2VkQ2hpbGRyZW4gPSBbXG4gICAgICAgICAgSW5saW5lLFxuICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQuRW1iZWQsXG4gICAgICAgICAgX3RleHQyLmRlZmF1bHQsXG4gICAgICAgIF07XG4gICAgICAgIC8vIExvd2VyIGluZGV4IG1lYW5zIGRlZXBlciBpbiB0aGUgRE9NIHRyZWUsIHNpbmNlIG5vdCBmb3VuZCAoLTEpIGlzIGZvciBlbWJlZHNcbiAgICAgICAgSW5saW5lLm9yZGVyID0gW1xuICAgICAgICAgICdjdXJzb3InLFxuICAgICAgICAgICdpbmxpbmUnLCAvLyBNdXN0IGJlIGxvd2VyXG4gICAgICAgICAgJ3VuZGVybGluZScsXG4gICAgICAgICAgJ3N0cmlrZScsXG4gICAgICAgICAgJ2l0YWxpYycsXG4gICAgICAgICAgJ2JvbGQnLFxuICAgICAgICAgICdzY3JpcHQnLFxuICAgICAgICAgICdsaW5rJyxcbiAgICAgICAgICAnY29kZScsIC8vIE11c3QgYmUgaGlnaGVyXG4gICAgICAgIF07XG5cbiAgICAgICAgZXhwb3J0cy5kZWZhdWx0ID0gSW5saW5lO1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogNyAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge1xuICAgICAgICAgIHZhbHVlOiB0cnVlLFxuICAgICAgICB9KTtcblxuICAgICAgICB2YXIgX3BhcmNobWVudCA9IF9fd2VicGFja19yZXF1aXJlX18oMCk7XG5cbiAgICAgICAgdmFyIF9wYXJjaG1lbnQyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfcGFyY2htZW50KTtcblxuICAgICAgICBmdW5jdGlvbiBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KG9iaikge1xuICA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XIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIFRleHRCbG90ID0gKGZ1bmN0aW9uIChfUGFyY2htZW50JFRleHQpIHtcbiAgICAgICAgICBfaW5oZXJpdHMoVGV4dEJsb3QsIF9QYXJjaG1lbnQkVGV4dCk7XG5cbiAgICAgICAgICBmdW5jdGlvbiBUZXh0QmxvdCgpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBUZXh0QmxvdCk7XG5cbiAgICAgICAgICAgIHJldHVybiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKFRleHRCbG90Ll9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoVGV4dEJsb3QpKS5hcHBseShcbiAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgIGFyZ3VtZW50cyxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIFRleHRCbG90O1xuICAgICAgICB9KShfcGFyY2htZW50Mi5kZWZhdWx0LlRleHQpO1xuXG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IFRleHRCbG90O1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogOCAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge1xuICAgICAgICAgIHZhbHVlOiB0cnVlLFxuICAgICAgICB9KTtcblxuICAgICAgICB2YXIgX2NyZWF0ZUNsYXNzID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0aWVzKHRhcmdldCwgcHJvcHMpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcHJvcHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgdmFyIGRlc2NyaXB0b3IgPSBwcm9wc1tpXTtcbiAgICAgICAgICAgICAgZGVzY3JpcHRvci5lbnVtZXJhYmxlID0gZGVzY3JpcHRvci5lbnVtZXJhYmxlIHx8IGZhbHNlO1xuICAgICAgICAgICAgICBkZXNjcmlwdG9yLmNvbmZpZ3VyYWJsZSA9IHRydWU7XG4gICAgICAgICAgICAgIGlmICgndmFsdWUnIGluIGRlc2NyaXB0b3IpIGRlc2NyaXB0b3Iud3JpdGFibGUgPSB0cnVlO1xuICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGFyZ2V0LCBkZXNjcmlwdG9yLmtleSwgZGVzY3JpcHRvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoQ29uc3RydWN0b3IsIHByb3RvUHJvcHMsIHN0YXRpY1Byb3BzKSB7XG4gICAgICAgICAgICBpZiAocHJvdG9Qcm9wcykgZGVmaW5lUHJvcGVydGllcyhDb25zdHJ1Y3Rvci5wcm90b3R5cGUsIHByb3RvUHJvcHMpO1xuICAgICAgICAgICAgaWYgKHN0YXRpY1Byb3BzKSBkZWZpbmVQcm9wZXJ0aWVzKENvbnN0cnVjdG9yLCBzdGF0aWNQcm9wcyk7XG4gICAgICAgICAgICByZXR1cm4gQ29uc3RydWN0b3I7XG4gICAgICAgICAgfTtcbiAgICAgICAgfSkoKTtcblxuICAgICAgICB2YXIgX2dldCA9IGZ1bmN0aW9uIGdldChvYmplY3QsIHByb3BlcnR5LCByZWNlaXZlcikge1xuICAgICAgICAgIGlmIChvYmplY3QgPT09IG51bGwpIG9iamVjdCA9IEZ1bmN0aW9uLnByb3RvdHlwZTtcbiAgICAgICAgICB2YXIgZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3Iob2JqZWN0LCBwcm9wZXJ0eSk7XG4gICAgICAgICAgaWYgKGRlc2MgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdmFyIHBhcmVudCA9IE9iamVjdC5nZXRQcm90b3R5cGVPZihvYmplY3QpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGdldChwYXJlbnQsIHByb3BlcnR5LCByZWNlaXZlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmICgndmFsdWUnIGluIGRlc2MpIHtcbiAgICAgICAgICAgIHJldHVybiBkZXNjLnZhbHVlO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZ2V0dGVyID0gZGVzYy5nZXQ7XG4gICAgICAgICAgICBpZiAoZ2V0dGVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBnZXR0ZXIuY2FsbChyZWNlaXZlcik7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHZhciBfZXZlbnRlbWl0dGVyID0gX193ZWJwYWNrX3JlcXVpcmVfXyg1NCk7XG5cbiAgICAgICAgdmFyIF9ldmVudGVtaXR0ZXIyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfZXZlbnRlbWl0dGVyKTtcblxuICAgICAgICB2YXIgX2xvZ2dlciA9IF9fd2VicGFja19yZXF1aXJlX18oMTApO1xuXG4gICAgICAgIHZhciBfbG9nZ2VyMiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX2xvZ2dlcik7XG5cbiAgICAgICAgZnVuY3Rpb24gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChvYmopIHtcbiAgICAgICAgICByZXR1cm4gb2JqICYmIG9iai5fX2VzTW9kdWxlID8gb2JqIDoge2RlZmF1bHQ6IG9ian07XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfY2xhc3NDYWxsQ2hlY2soaW5zdGFuY2UsIENvbnN0cnVjdG9yKSB7XG4gICAgICAgICAgaWYgKCEoaW5zdGFuY2UgaW5zdGFuY2VvZiBDb25zdHJ1Y3RvcikpIHtcbiAgICAgICAgICA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JiBzdXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBkZWJ1ZyA9ICgwLCBfbG9nZ2VyMi5kZWZhdWx0KSgncXVpbGw6ZXZlbnRzJyk7XG5cbiAgICAgICAgdmFyIEVWRU5UUyA9IFsnc2VsZWN0aW9uY2hhbmdlJywgJ21vdXNlZG93bicsICdtb3VzZXVwJywgJ2NsaWNrJ107XG5cbiAgICAgICAgRVZFTlRTLmZvckVhY2goZnVuY3Rpb24gKGV2ZW50TmFtZSkge1xuICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBmb3IgKFxuICAgICAgICAgICAgICB2YXIgX2xlbiA9IGFyZ3VtZW50cy5sZW5ndGgsIGFyZ3MgPSBBcnJheShfbGVuKSwgX2tleSA9IDA7XG4gICAgICAgICAgICAgIF9rZXkgPCBfbGVuO1xuICAgICAgICAgICAgICBfa2V5KytcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBhcmdzW19rZXldID0gYXJndW1lbnRzW19rZXldO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBbXS5zbGljZVxuICAgICAgICAgICAgICAuY2FsbChkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcucWwtY29udGFpbmVyJykpXG4gICAgICAgICAgICAgIC5mb3JFYWNoKGZ1bmN0aW9uIChub2RlKSB7XG4gICAgICAgICAgICAgICAgLy8gVE9ETyB1c2UgV2Vha01hcFxuICAgICAgICAgICAgICAgIGlmIChub2RlLl9fcXVpbGwgJiYgbm9kZS5fX3F1aWxsLmVtaXR0ZXIpIHtcbiAgICAgICAgICAgICAgICAgIHZhciBfbm9kZSRfX3F1aWxsJGVtaXR0ZXI7XG5cbiAgICAgICAgICAgICAgICAgIChfbm9kZSRfX3F1aWxsJGVtaXR0ZXIgPVxuICAgICAgICAgICAgICAgICAgICBub2RlLl9fcXVpbGwuZW1pdHRlcikuaGFuZGxlRE9NLmFwcGx5KFxuICAgICAgICAgICAgICAgICAgICBfbm9kZSRfX3F1aWxsJGVtaXR0ZXIsXG4gICAgICAgICAgICAgICAgICAgIGFyZ3MsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHZhciBFbWl0dGVyID0gKGZ1bmN0aW9uIChfRXZlbnRFbWl0dGVyKSB7XG4gICAgICAgICAgX2luaGVyaXRzKEVtaXR0ZXIsIF9FdmVudEVtaXR0ZXIpO1xuXG4gICAgICAgICAgZnVuY3Rpb24gRW1pdHRlcigpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBFbWl0dGVyKTtcblxuICAgICAgICAgICAgdmFyIF90aGlzID0gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oXG4gICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgIChFbWl0dGVyLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoRW1pdHRlcikpLmNhbGwodGhpcyksXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICBfdGhpcy5saXN0ZW5lcnMgPSB7fTtcbiAgICAgICAgICAgIF90aGlzLm9uKCdlcnJvcicsIGRlYnVnLmVycm9yKTtcbiAgICAgICAgICAgIHJldHVybiBfdGhpcztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoRW1pdHRlciwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdlbWl0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGVtaXQoKSB7XG4gICAgICAgICAgICAgICAgZGVidWcubG9nLmFwcGx5KGRlYnVnLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgICAgIF9nZXQoXG4gICAgICAgICAgICAgICAgICBFbWl0dGVyLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKEVtaXR0ZXIucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICdlbWl0JyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnaGFuZGxlRE9NJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGhhbmRsZURPTShldmVudCkge1xuICAgICAgICAgICAgICAgIGZvciAoXG4gICAgICAgICAgICAgICAgICB2YXIgX2xlbjIgPSBhcmd1bWVudHMubGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICBhcmdzID0gQXJyYXkoX2xlbjIgPiAxID8gX2xlbjIgLSAxIDogMCksXG4gICAgICAgICAgICAgICAgICAgIF9rZXkyID0gMTtcbiAgICAgICAgICAgICAgICAgIF9rZXkyIDwgX2xlbjI7XG4gICAgICAgICAgICAgICAgICBfa2V5MisrXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBhcmdzW19rZXkyIC0gMV0gPSBhcmd1bWVudHNbX2tleTJdO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICh0aGlzLmxpc3RlbmVyc1tldmVudC50eXBlXSB8fCBbXSkuZm9yRWFjaChmdW5jdGlvbiAoX3JlZikge1xuICAgICAgICAgICAgICAgICAgdmFyIG5vZGUgPSBfcmVmLm5vZGUsXG4gICAgICAgICAgICAgICAgICAgIGhhbmRsZXIgPSBfcmVmLmhhbmRsZXI7XG5cbiAgICAgICAgICAgICAgICAgIGlmIChldmVudC50YXJnZXQgPT09IG5vZGUgfHwgbm9kZS5jb250YWlucyhldmVudC50YXJnZXQpKSB7XG4gICAgICAgICAgICAgICAgICAgIGhhbmRsZXIuYXBwbHkodW5kZWZpbmVkLCBbZXZlbnRdLmNvbmNhdChhcmdzKSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdsaXN0ZW5ET00nLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gbGlzdGVuRE9NKGV2ZW50TmFtZSwgbm9kZSwgaGFuZGxlcikge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5saXN0ZW5lcnNbZXZlbnROYW1lXSkge1xuICAgICAgICAgICAgICAgICAgdGhpcy5saXN0ZW5lcnNbZXZlbnROYW1lXSA9IFtdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLmxpc3RlbmVyc1tldmVudE5hbWVdLnB1c2goe25vZGU6IG5vZGUsIGhhbmRsZ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3dhcm4nLCAnbG9nJywgJ2luZm8nXTtcbiAgICAgICAgdmFyIGxldmVsID0gJ3dhcm4nO1xuXG4gICAgICAgIGZ1bmN0aW9uIGRlYnVnKG1ldGhvZCkge1xuICAgICAgICAgIGlmIChsZXZlbHMuaW5kZXhPZihtZXRob2QpIDw9IGxldmVscy5pbmRleE9mKGxldmVsKSkge1xuICAgICAgICAgICAgdmFyIF9jb25zb2xlO1xuXG4gICAgICAgICAgICBmb3IgKFxuICAgICAgICAgICAgICB2YXIgX2xlbiA9IGFyZ3VtZW50cy5sZW5ndGgsXG4gICAgICAgICAgICAgICAgYXJncyA9IEFycmF5KF9sZW4gPiAxID8gX2xlbiAtIDEgOiAwKSxcbiAgICAgICAgICAgICAgICBfa2V5ID0gMTtcbiAgICAgICAgICAgICAgX2tleSA8IF9sZW47XG4gICAgICAgICAgICAgIF9rZXkrK1xuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIGFyZ3NbX2tleSAtIDFdID0gYXJndW1lbnRzW19rZXldO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAoX2NvbnNvbGUgPSBjb25zb2xlKVttZXRob2RdLmFwcGx5KF9jb25zb2xlLCBhcmdzKTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gbmFtZXNwYWNlKG5zKSB7XG4gICAgICAgICAgcmV0dXJuIGxldmVscy5yZWR1Y2UoZnVuY3Rpb24gKGxvZ2dlciwgbWV0aG9kKSB7XG4gICAgICAgICAgICBsb2dnZXJbbWV0aG9kXSA9IGRlYnVnLmJpbmQoY29uc29sZSwgbWV0aG9kLCBucyk7XG4gICAgICAgICAgICByZXR1cm4gbG9nZ2VyO1xuICAgICAgICAgIH0sIHt9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGRlYnVnLmxldmVsID0gbmFtZXNwYWNlLmxldmVsID0gZnVuY3Rpb24gKG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Fzc2luZy5cbiAgICAgICAgICAvLyAgIENvbnZlcnRpbmcgdG8gYXJyYXkgc29sdmVzIHRoZSBwcm9ibGVtLlxuICAgICAgICAgIGlmIChpc0FyZ3VtZW50cyhhKSkge1xuICAgICAgICAgICAgaWYgKCFpc0FyZ3VtZW50cyhiKSkge1xuICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBhID0gcFNsaWNlLmNhbGwoYSk7XG4gICAgICAgICAgICBiID0gcFNsaWNlLmNhbGwoYik7XG4gICAgICAgICAgICByZXR1cm4gZGVlcEVxdWFsKGEsIGIsIG9wdHMpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoaXNCdWZmZXIoYSkpIHtcbiAgICAgICAgICAgIGlmICghaXNCdWZmZXIoYikpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGEubGVuZ3RoICE9PSBiLmxlbmd0aCkgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgaWYgKGFbaV0gIT09IGJbaV0pIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIGthID0gb2JqZWN0S2V5cyhhKSxcbiAgICAgICAgICAgICAga2IgPSBvYmplY3RLZXlzKGIpO1xuICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgIC8vaGFwcGVucyB3aGVuIG9uZSBpcyBhIHN0cmluZyBsaXRlcmFsIGFuZCB0aGUgb3RoZXIgaXNuJ3RcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gaGF2aW5nIHRoZSBzYW1lIG51bWJlciBvZiBvd25lZCBwcm9wZXJ0aWVzIChrZXlzIGluY29ycG9yYXRlc1xuICAgICAgICAgIC8vIGhhc093blByb3BlcnR5KVxuICAgICAgICAgIGlmIChrYS5sZW5ndGggIT0ga2IubGVuZ3RoKSByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgLy90aGUgc2FtZSBzZXQgb2Yga2V5cyAoYWx0aG91Z2ggbm90IG5lY2Vzc2FyaWx5IHRoZSBzYW1lIG9yZGVyKSxcbiAgICAgICAgICBrYS5zb3J0KCk7XG4gICAgICAgICAga2Iuc29ydCgpO1xuICAgICAgICAgIC8vfn5+Y2hlYXAga2V5IHRlc3RcbiAgICAgICAgICBmb3IgKGkgPSBrYS5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgICAgaWYgKGthW2ldICE9IGtiW2ldKSByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgfVxuICAgICAgICAgIC8vZXF1aXZhbGVudCB2YWx1ZXMgZm9yIGV2ZXJ5IGNvcnJlc3BvbmRpbmcga2V5LCBhbmRcbiAgICAgICAgICAvL35+fnBvc3NpYmx5IGV4cGVuc2l2ZSBkZWVwIHRlc3RcbiAgICAgICAgICBmb3IgKGkgPSBrYS5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgICAga2V5ID0ga2FbaV07XG4gICAgICAgICAgICBpZiAoIWRlZXBFcXVhbChhW2tleV0sIGJba2V5XSwgb3B0cykpIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHR5cGVvZiBhID09PSB0eXBlb2YgYjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogMTIgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgICAgI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dDtcbiAgICAgICAgICB9XG4gICAgICAgICAgQXR0cmlidXRvci5rZXlzID0gZnVuY3Rpb24gKG5vZGUpIHtcbiAgICAgICAgICAgIHJldHVybiBbXS5tYXAuY2FsbChub2RlLmF0dHJpYnV0ZXMsIGZ1bmN0aW9uIChpdGVtKSB7XG4gICAgICAgICAgICAgIHJldHVybiBpdGVtLm5hbWU7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIEF0dHJpYnV0b3IucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIChub2RlLCB2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKCF0aGlzLmNhbkFkZChub2RlLCB2YWx1ZSkpIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIG5vZGUuc2V0QXR0cmlidXRlKHRoaXMua2V5TmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBBdHRyaWJ1dG9yLnByb3RvdHlwZS5jYW5BZGQgPSBmdW5jdGlvbiAobm9kZSwgdmFsdWUpIHtcbiAgICAgICAgICAgIHZhciBtYXRjaCA9IFJlZ2lzdHJ5LnF1ZXJ5KFxuICAgICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgICBSZWdpc3RyeS5TY29wZS5CTE9UICYgKHRoaXMuc2NvcGUgfCBSZWdpc3RyeS5TY29wZS5UWVBFKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAobWF0Y2ggPT0gbnVsbCkgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgaWYgKHRoaXMud2hpdGVsaXN0ID09IG51bGwpIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHRoaXMud2hpdGVsaXN0LmluZGV4T2YodmFsdWUucmVwbGFjZSgvW1wiJ10vZywgJycpKSA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W5lZDtcblxuICAgICAgICB2YXIgX3NsaWNlZFRvQXJyYXkgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIHNsaWNlSXRlcmF0b3IoYXJyLCBpKSB7XG4gICAgICAgICAgICB2YXIgX2FyciA9IFtdO1xuICAgICAgICAgICAgdmFyIF9uID0gdHJ1ZTtcbiAgICAgICAgICAgIHZhciBfZCA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIF9lID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgZm9yIChcbiAgICAgICAgICAgICAgICB2YXIgX2kgPSBhcnJbU3ltYm9sLml0ZXJhdG9yXSgpLCBfcztcbiAgICAgICAgICAgICAgICAhKF9uID0gKF9zID0gX2kubmV4dCgpKS5kb25lKTtcbiAgICAgICAgICAgICAgICBfbiA9IHRydWVcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgX2Fyci5wdXNoKF9zLnZhbHVlKTtcbiAgICAgICAgICAgICAgICBpZiAoaSAmJiBfYXJyLmxlbmd0aCA9PT0gaSkgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBfZCA9IHRydWU7XG4gICAgICAgICAgICAgIF9lID0gZXJyO1xuICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBpZiAoIV9uICYmIF9pWydyZXR1cm4nXSkgX2lbJ3JldHVybiddKCk7XG4gICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgaWYgKF9kKSB0aHJvdyBfZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIF9hcnI7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoYXJyLCBpKSB7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShhcnIpKSB7XG4gICAgICAgICAgICAgIHJldHVybiBhcnI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKFN5bWJvbC5pdGVyYXRvciBpbiBPYmplY3QoYXJyKSkge1xuICAgICAgICAgICAgICByZXR1cm4gc2xpY2VJdGVyYXRvcihhcnIsIGkpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgICAnSW52YWxpZCBhdHRlbXB0IHRvIGRlc3RydWN0dXJlIG5vbi1pdGVyYWJsZSBpbnN0YW5jZScsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcbiAgICAgICAgfSkoKTtcblxuICAgICAgICB2YXIgX2NyZWF0ZUNsYXNzID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0aWVzKHRhcmdldCwgcHJvcHMpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcHJvcHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgdmFyIGRlc2NyaXB0b3IgPSBwcm9wc1tpXTtcbiAgICAgICAgICAgICAgZGVzY3JpcHRvci5lbnVtZXJhYmxlID0gZGVzY3JpcHRvci5lbnVtZXJhYmxlIHx8IGZhbHNlO1xuICAgICAgICAgICAgICBkZXNjcmlwdG9yLmNvbmZpZ3VyYWJsZSA9IHRydWU7XG4gICAgICAgICAgICAgIGlmICgndmFsdWUnIGluIGRlc2NyaXB0b3IpIGRlc2NyaXB0b3Iud3JpdGFibGUgPSB0cnVlO1xuICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGFyZ2V0LCBkZXNjcmlwdG9yLmtleSwgZGVzY3JpcHRvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoQ29uc3RydWN0b3IsIHByb3RvUHJvcHMsIHN0YXRpY1Byb3BzKSB7XG4gICAgICAgICAgICBpZiAocHJvdG9Qcm9wcykgZGVmaW5lUHJvcGVydGllcyhDb25zdHJ1Y3Rvci5wcm90b3R5cGUsIHByb3RvUHJvcHMpO1xuICAgICAgICAgICAgaWYgKHN0YXRpY1Byb3BzKSBkZWZpbmVQcm9wZXJ0aWVzKENvbnN0cnVjdG9yLCBzdGF0aWNQcm9wcyk7XG4gICAgICAgICAgICByZXR1cm4gQ29uc3RydWN0b3I7XG4gICAgICAgICAgfTtcbiAgICAgICAgfSkoKTtcblxuICAgICAgICB2YXIgX2dldCA9IGZ1bmN0aW9uIGdldChvYmplY3QsIHByb3BlcnR5LCByZWNlaXZlcikge1xuICAgICAgICAgIGlmIChvYmplY3QgPT09IG51bGwpIG9iamVjdCA9IEZ1bmN0aW9uLnByb3RvdHlwZTtcbiAgICAgICAgICB2YXIgZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3Iob2JqZWN0LCBwcm9wZXJ0eSk7XG4gICAgICAgICAgaWYgKGRlc2MgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdmFyIHBhcmVudCA9IE9iamVjdC5nZXRQcm90b3R5cGVPZihvYmplY3QpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGdldChwYXJlbnQsIHByb3BlcnR5LCByZWNlaXZlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmICgndmFsdWUnIGluIGRlc2MpIHtcbiAgICAgICAgICAgIHJldHVybiBkZXNjLnZhbHVlO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZ2V0dGVyID0gZG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ICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2NsYXNzQ2FsbENoZWNrKGluc3RhbmNlLCBDb25zdHJ1Y3Rvcikge1xuICAgICAgICAgIGlmICghKGluc3RhbmNlIGluc3RhbmNlb2YgQ29uc3RydWN0b3IpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24nKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihzZWxmLCBjYWxsKSB7XG4gICAgICAgICAgaWYgKCFzZWxmKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgUmVmZXJlbmNlRXJyb3IoXG4gICAgICAgICAgICAgIFwidGhpcyBoYXNuJ3QgYmVlbiBpbml0aWFsaXNlZCAtIHN1cGVyKCkgaGFzbid0IGJlZW4gY2FsbGVkXCIsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gY2FsbCAmJlxuICAgICAgICAgICAgKHR5cGVvZiBjYWxsID09PSAnb2JqZWN0JyB8fCB0eXBlb2YgY2FsbCA9PT0gJ2Z1bmN0aW9uJylcbiAgICAgICAgICAgID8gY2FsbFxuICAgICAgICAgICAgOiBzZWxmO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2luaGVyaXRzKHN1YkNsYXNzLCBzdXBlckNsYXNzKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZiBzdXBlckNsYXNzICE9PSAnZnVuY3Rpb24nICYmIHN1cGVyQ2xhc3MgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICdTdXBlciBleHByZXNzaW9uIG11c3QgZWl0aGVyIGJlIG51bGwgb3IgYSBmdW5jdGlvbiwgbm90ICcgK1xuICAgICAgICAgICAgICAgIHR5cGVvZiBzdXBlckNsYXNzLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgc3ViQ2xhc3MucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShcbiAgICAgICAgICAgIHN1cGVyQ2xhc3MgJiYgc3VwZXJDbGFzcy5wcm90b3R5cGUsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGNvbnN0cnVjdG9yOiB7XG4gICAgICAgICAgICAgICAgdmFsdWU6IHN1YkNsYXNzLFxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgKTtcbiAgICAgICAgICBpZiAoc3VwZXJDbGFzcylcbiAgICAgICAgICAgIE9iamVjdC5zZXRQcm90b3R5cGVPZlxuICAgICAgICAgICAgICA/IE9iamVjdC5zZXRQcm90b3R5cGVPZihzdWJDbGFzcywgc3VwZXJDbGFzcylcbiAgICAgICAgICAgICAgOiAoc3ViQ2xhc3MuX19wcm90b19fID0gc3VwZXJDbGFzcyk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgQ29kZSA9IChmdW5jdGlvbiAoX0lubGluZSkge1xuICAgICAgICAgIF9pbmhlcml0cyhDb2RlLCBfSW5saW5lKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIENvZGUoKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgQ29kZSk7XG5cbiAgICAgICAgICAgIHJldHVybiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKENvZGUuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihDb2RlKSkuYXBwbHkoXG4gICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICBhcmd1bWVudHMsXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBDb2RlO1xuICAgICAgICB9KShfaW5saW5lMi5kZWZhdWx0KTtcblxuICAgICAgICBDb2RlLmJsb3ROYW1lID0gJ2NvZGUnO1xuICAgICAgICBDb2RlLnRhZ05hbWUgPSAnQ09ERSc7XG5cbiAgICAgICAgdmFyIENvZGVCbG9jayA9IChmdW5jdGlvbiAoX0Jsb2NrKSB7XG4gICAgICAgICAgX2luaGVyaXRzKENvZGVCbG9jaywgX0Jsb2NrKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIENvZGVCbG9jaygpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBDb2RlQmxvY2spO1xuXG4gICAgICAgICAgICByZXR1cm4gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oXG4gICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgIChDb2RlQmxvY2suX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihDb2RlQmxvY2spKS5hcHBseShcbiAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgIGFyZ3VtZW50cyxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKFxuICAgICAgICAgICAgQ29kZUJsb2NrLFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAnZGVsdGEnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBkZWx0YSgpIHtcbiAgICAgICAgICAgICAgICAgIHZhciBfdGhpczMgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgICB2YXIgdGV4dCA9IHRoaXMuZG9tTm9kZS50ZXh0Q29udGVudDtcbiAgICAgICAgICAgICAgICAgIGlmICh0ZXh0LmVuZHNXaXRoKCdcXG4nKSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBTaG91bGQgYWx3YXlzIGJlIHRydWVcbiAgICAgICAgICAgICAgICAgICAgdGV4dCA9IHRleHQuc2xpY2UoMCwgLTEpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgcmV0dXJuIHRleHQuc3BsaXQoJ1xcbicpLnJlZHVjZShmdW5jdGlvbiAoZGVsdGEsIGZyYWcpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlbHRhLmluc2VydChmcmFnKS5pbnNlcnQoJ1xcbicsIF90aGlzMy5mb3JtYXRzKCkpO1xuICAgICAgICAgICAgICAgICAgfSwgbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KCkpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdmb3JtYXQnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBmb3JtYXQobmFtZSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIGlmIChuYW1lID09PSB0aGlzLnN0YXRpY3MuYmxvdE5hbWUgJiYgdmFsdWUpIHJldHVybjtcblxuICAgICAgICAgICAgICAgICAgdmFyIF9kZXNjZW5kYW50ID0gdGhpcy5kZXNjZW5kYW50KFxuICAgICAgICAgICAgICAgICAgICAgIF90ZXh0Mi5kZWZhdWx0LFxuICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGVuZ3RoKCkgLSAxLFxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICBfZGVzY2VuZGFudDIgPSBfc2xpY2VkVG9BcnJheShfZGVzY2VuZGFudCwgMSksXG4gICAgICAgICAgICAgICAgICAgIHRleHQgPSBfZGVzY2VuZGFudDJbMF07XG5cbiAgICAgICAgICAgICAgICAgIGlmICh0ZXh0ICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgdGV4dC5kZWxldGVBdCh0ZXh0Lmxlbmd0aCgpIC0gMSwgMSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgICBDb2RlQmxvY2sucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihDb2RlQmxvY2sucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICAgJ2Zvcm1hdCcsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgbmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdmb3JtYXRBdCcsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGZvcm1hdEF0KGluZGV4LCBsZW5ndGgsIG5hbWUsIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICBpZiAobGVuZ3RoID09PSAwKSByZXR1cm47XG4gICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQucXVlcnkoXG4gICAgICAgICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LlNjb3BlLkJMT0NLLFxuICAgICAgICAgICAgICAgICAgICApID09IG51bGwgfHxcbiAgICAgICAgICAgICAgICAgICAgKG5hbWUgPT09IHRoaXMuc3RhdGljcy5ibG90TmFtZSAmJlxuICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID09PSB0aGlzLnN0YXRpY3MuZm9ybWF0cyh0aGlzLmRvbU5vZGUpKVxuICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIHZhciBuZXh0TmV3bGluZSA9IHRoaXMubmV3bGluZUluZGV4KGluZGV4KTtcbiAgICAgICAgICAgICAgICAgIGlmIChuZXh0TmV3bGluZSA8IDAgfHwgbmV4dE5ld2xpbmUgPj0gaW5kZXggKyBsZW5ndGgpIHJldHVybjtcbiAgICAgICAgICAgICAgICAgIHZhciBwcmV2TmV3bGluZSA9IHRoaXMubmV3bGluZUluZGV4KGluZGV4LCB0cnVlKSArIDE7XG4gICAgICAgICAgICAgICAgICB2YXIgaXNvbGF0ZUxlbmd0aCA9IG5leHROZXdsaW5lIC0gcHJldk5ld2xpbmUgKyAxO1xuICAgICAgICAgICAgICAgICAgdmFyIGJsb3QgPSB0aGlzLmlzb2xhdGUocHJldk5ld2xpbmUsIGlzb2xhdGVMZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgdmFyIG5leHQgPSBibG90Lm5leHQ7XG4gICAgICAgICAgICAgICAgICBibG90LmZvcm1hdChuYW1lLCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICBpZiAobmV4dCBpbnN0YW5jZW9mIENvZGVCbG9jaykge1xuICAgICAgICAgICAgICAgICAgICBuZXh0LmZvcm1hdEF0KFxuICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgaW5kZXggLSBwcmV2TmV3bGluZSArIGxlbmd0aCAtIGlzb2xhdGVMZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAnaW5zZXJ0QXQnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBpbnNlcnRBdChpbmRleCwgdmFsdWUsIGRlZikge1xuICAgICAgICAgICAgICAgICAgaWYgKGRlZiAhPSBudWxsKSByZXR1cm47XG5cbiAgICAgICAgICAgICAgICAgIHZhciBfZGVzY2VuZGFudDMgPSB0aGlzLmRlc2NlbmRhbnQoX3RleHQyLmRlZmF1bHQsIGluZGV4KSxcbiAgICAgICAgICAgICAgICAgICAgX2Rlc2NlbmRhbnQ0ID0gX3NsaWNlZFRvQXJyYXkoX2Rlc2NlbmRhbnQzLCAyKSxcbiAgICAgICAgICAgICAgICAgICAgdGV4dCA9IF9kZXNjZW5kYW50NFswXSxcbiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0ID0gX2Rlc2NlbmRhbnQ0WzFdO1xuXG4gICAgICAgICAgICAgICAgICB0ZXh0Lmluc2VydEF0KG9mZnNldCwgdmFsdWUpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdsZW5ndGgnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBsZW5ndGgoKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgbGVuZ3RoID0gdGhpcy5kb21Ob2RlLnRleHRDb250ZW50Lmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5kb21Ob2RlLnRleHRDb250ZW50LmVuZHNXaXRoKCdcXG4nKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbGVuZ3RoICsgMTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIHJldHVybiBsZW5ndGg7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGtleTogJ25ld2xpbmVJbmRleCcsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIG5ld2xpbmVJbmRleChzZWFyY2hJbmRleCkge1xuICAgICAgICAgICAgICAgICAgdmFyIHJldmVyc2UgPVxuICAgICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMSAmJiBhcmd1bWVudHNbMV0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzFdXG4gICAgICAgICAgICAgICAgICAgICAgOiBmYWxzZTtcblxuICAgICAgICAgICAgICAgICAgaWYgKCFyZXZlcnNlKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBvZmZzZXQgPSB0aGlzLmRvbU5vZGUudGV4dENvbnRlbnRcbiAgICAgICAgICAgICAgICAgICAgICAuc2xpY2Uoc2VhcmNoSW5kZXgpXG4gICAgICAgICAgICAgICAgICAgICAgLmluZGV4T2YoJ1xcbicpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2Zmc2V0ID4gLTEgPyBzZWFyY2hJbmRleCArIG9mZnNldCA6IC0xO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZG9tTm9kZS50ZXh0Q29udGVudFxuICAgICAgICAgICAgICAgICAgICAgIC5zbGljZSgwLCBzZWFyY2hJbmRleClcbiAgICAgICAgICAgICAgICAgICAgICAubGFzdEluZGV4T2YoJ1xcbicpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdvcHRpbWl6ZScsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIG9wdGltaXplKGNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5kb21Ob2RlLnRleHRDb250ZW50LmVuZHNXaXRoKCdcXG4nKSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmFwcGVuZENoaWxkKF9wYXJjaG1lbnQyLmRlZmF1bHQuY3JlYXRlKCd0ZXh0JywgJ1xcbicpKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIF9nZXQoXG4gICAgICAgICAgICAgICAgICAgIENvZGVCbG9jay5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKENvZGVCbG9jay5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgICAnb3B0aW1pemUnLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIGNvbnRleHQpO1xuICAgICAgICAgICAgICAgICAgdmFyIG5leHQgPSB0aGlzLm5leHQ7XG4gICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIG5leHQgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgICBuZXh0LnByZXYgPT09IHRoaXMgJiZcbiAgICAgICAgICAgICAgICAgICAgbmV4dC5zdGF0aWNzLmJsb3ROYW1lID09PSB0aGlzLnN0YXRpY3MuYmxvdE5hbWUgJiZcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0aWNzLmZvcm1hdHModGhpcy5kb21Ob2RlKSA9PT1cbiAgICAgICAgICAgICAgICAgICAgICBuZXh0LnN0YXRpY3MuZm9ybWF0cyhuZXh0LmRvbU5vZGUpXG4gICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgbmV4dC5vcHRpbWl6ZShjb250ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgbmV4dC5tb3ZlQ2hpbGRyZW4odGhpcyk7XG4gICAgICAgICAgICAgICAgICAgIG5leHQucmVtb3ZlKCk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGtleTogJ3JlcGxhY2UnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiByZXBsYWNlKHRhcmdldCkge1xuICAgICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgICAgQ29kZUJsb2NrLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQ29kZUJsb2NrLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgICdyZXBsYWNlJyxcbiAgICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCB0YXJnZXQpO1xuICAgICAgICAgICAgICAgICAgW10uc2xpY2VcbiAgICAgICAgICAgICAgICAgICAgLmNhbGwodGhpcy5kb21Ob2RlLnF1ZXJ5U2VsZWN0b3JBbGwoJyonKSlcbiAgICAgICAgICAgICAgICAgICAgLmZvckVhY2goZnVuY3Rpb24gKG5vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICB2YXIgYmxvdCA9IF9wYXJjaG1lbnQyLmRlZmF1bHQuZmluZChub2RlKTtcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoYmxvdCA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBub2RlLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQobm9kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChibG90IGluc3RhbmNlb2YgX3BhcmNobWVudDIuZGVmYXVsdC5FbWJlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYmxvdC5yZW1vdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgYmxvdC51bndyYXAoKTtcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAnY3JlYXRlJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gY3JlYXRlKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgZG9tTm9kZSA9IF9nZXQoXG4gICAgICAgICAgICAgICAgICAgIENvZGVCbG9jay5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKENvZGVCbG9jayksXG4gICAgICAgICAgICAgICAgICAgICdjcmVhdGUnLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIGRvbU5vZGUuc2V0QXR0cmlidXRlKCdzcGVsbGNoZWNrJywgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIGRvbU5vZGU7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGtleTogJ2Zvcm1hdHMnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBmb3JtYXRzKCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIHJldHVybiBDb2RlQmxvY2s7XG4gICAgICAgIH0pKF9ibG9jazIuZGVmYXVsdCk7XG5cbiAgICAgICAgQ29kZUJsb2NrLmJsb3ROYW1lID0gJ2NvZGUtYmxvY2snO1xuICAgICAgICBDb2RlQmxvY2sudGFnTmFtZSA9ICdQUkUnO1xuICAgICAgICBDb2RlQmxvY2suVEFCID0gJyAgJztcblxuICAgICAgICBleHBvcnRzLkNvZGUgPSBDb2RlO1xuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBDb2RlQmxvY2s7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiAxNCAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge1xuICAgICAgICAgIHZhbHVlOiB0cnVlLFxuICAgICAgICB9KTtcblxuICAgICAgICB2YXIgX3R5cGVvZiA9XG4gICAgICAgICAgdHlwZW9mIFN5bWJvbCA9PT0gJ2Z1bmN0aW9uJyAmJiB0eXBlb2YgU3ltYm9sLml0ZXJhdG9yID09PSAnc3ltYm9sJ1xuICAgICAgICAgICAgPyBmdW5jdGlvbiAob2JqKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiBvYmo7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIDogZnVuY3Rpb24gKG9iaikge1xuICAgICAgICAgICAgICAgIHJldHVybiBvYmogJiZcbiAgICAgICAgICAgICAgICAgIHR5cGVvZiBTeW1ib2wgPT09ICdmdW5jdGlvbicgJiZcbiAgICAgICAgICAgICAgICAgIG9iai5jb25zdHJ1Y3RvciA9PT0gU3ltYm9sICYmXG4gICAgICAgICAgICAgICAgICBvYmogIT09IFN5bWJvbC5wcm90b3R5cGVcbiAgICAgICAgICAgICAgICAgID8gJ3N5bWJvbCdcbiAgICAgICAgICAgICAgICAgIDogdHlwZW9mIG9iajtcbiAgICAgICAgICAgICAgfTtcblxuICAgICAgICB2YXIgX3NsaWNlZFRvQXJyYXkgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIHNsaWNlSXRlcmF0b3IoYXJyLCBpKSB7XG4gICAgICAgICAgICB2YXIgX2FyciA9IFtdO1xuICAgICAgICAgICAgdmFyIF9uID0gdHJ1ZTtcbiAgICAgICAgICAgIHZhciBfZCA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIF9lID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgZm9yIChcbiAgICAgICAgICAgICAgICB2YXIgX2kgPSBhcnJbU3ltYm9sLml0ZXJhdG9yXSgpLCBfcztcbiAgICAgICAgICAgICAgICAhKF9uID0gKF9zID0gX2kubmV4dCgpKS5kb25lKTtcbiAgICAgICAgICAgICAgICBfbiA9IHRydWVcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgX2Fyci5wdXNoKF9zLnZhbHVlKTtcbiAgICAgICAgICAgICAgICBpZiAoaSAmJiBfYXJyLmxlbmd0aCA9PT0gaSkgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBfZCA9IHRydWU7XG4gICAgICAgICAgICAgIF9lID0gZXJyO1xuICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBpZiAoIV9uICYmIF9pWydyZXR1cm4nXSkgX2lbJ3JldHVybiddKCk7XG4gICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgaWYgKF9kKSB0aHJvdyBfZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIF9hcnI7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoYXJyLCBpKSB7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShhcnIpKSB7XG4gICAgICAgICAgICAgIHJldHVybiBhcnI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKFN5bWJvbC5pdGVyYXRvciBpbiBPYmplY3QoYXJyKSkge1xuICAgICAgICAgICAgICByZXR1cm4gc2xpY2VJdGVyYXRvcihhcnIsIGkpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgICAnSW52YWxpZCBhdHRlbXB0IHRvIGRlc3RydWN0dXJlIG5vbi1pdGVyYWJsZSBpbnN0YW5jZScsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcbiAgICAgICAgfSkoKTtcblxuICAgICAgICB2YXIgX2NyZWF0ZUNsYXNzID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0aWVzKHRhcmdldCwgcHJvcHMpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcHJvcHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgdmFyIGRlc2NyaXB0b3IgPSBwcm9wc1tpXTtcbiAgICAgICAgICAgICAgZGVzY3JpcHRvci5lbnVtZXJhYmxlID0gZGVzY3JpcHRvci5lbnVtZXJhYmxlIHx8IGZhbHNlO1xuICAgICAgICAgICAgICBkZXNjcmlwdG9yLmNvbmZpZ3VyYWJsZSA9IHRydWU7XG4gICAgICAgICAgICAgIGlmICgndmFsdWUnIGluIGRlc2NyaXB0b3IpIGRlc2NyaXB0b3Iud3JpdGFibGUgPSB0cnVlO1xuICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGFyZ2V0LCBkZXNjcmlwdG9yLmtleSwgZGVzY3JpcHRvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoQ29uc3RydWN0b3IsIHByb3RvUHJvcHMsIHN0YXRpY1Byb3BzKSB7XG4gICAgICAgICAgICBpZiAocHJvdG9Qc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cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBvYmpba2V5XSA9IHZhbHVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2NsYXNzQ2FsbENoZWNrKGluc3RhbmNlLCBDb25zdHJ1Y3Rvcikge1xuICAgICAgICAgIGlmICghKGluc3RhbmNlIGluc3RhbmNlb2YgQ29uc3RydWN0b3IpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24nKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgQVNDSUkgPSAvXlsgLX5dKiQvO1xuXG4gICAgICAgIHZhciBFZGl0b3IgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIEVkaXRvcihzY3JvbGwpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBFZGl0b3IpO1xuXG4gICAgICAgICAgICB0aGlzLnNjcm9sbCA9IHNjcm9sbDtcbiAgICAgICAgICAgIHRoaXMuZGVsdGEgPSB0aGlzLmdldERlbHRhKCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKEVkaXRvciwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdhcHBseURlbHRhJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGFwcGx5RGVsdGEoZGVsdGEpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgdmFyIGNvbnN1bWVOZXh0TmV3bGluZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHRoaXMuc2Nyb2xsLnVwZGF0ZSgpO1xuICAgICAgICAgICAgICAgIHZhciBzY3JvbGxMZW5ndGggPSB0aGlzLnNjcm9sbC5sZW5ndGgoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbC5iYXRjaFN0YXJ0KCk7XG4gICAgICAgICAgICAgICAgZGVsdGEgPSBub3JtYWxpemVEZWx0YShkZWx0YSk7XG4gICAgICAgICAgICAgICAgZGVsdGEucmVkdWNlKGZ1bmN0aW9uIChpbmRleCwgb3ApIHtcbiAgICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPSBvcC5yZXRhaW4gfHwgb3AuZGVsZXRlIHx8IG9wLmluc2VydC5sZW5ndGggfHwgMTtcbiAgICAgICAgICAgICAgICAgIHZhciBhdHRyaWJ1dGVzID0gb3AuYXR0cmlidXRlcyB8fCB7fTtcbiAgICAgICAgICAgICAgICAgIGlmIChvcC5pbnNlcnQgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wLmluc2VydCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgICB2YXIgdGV4dCA9IG9wLmluc2VydDtcbiAgICAgICAgICAgICAgICAgICAgICBpZiAodGV4dC5lbmRzV2l0aCgnXFxuJykgJiYgY29uc3VtZU5leHROZXdsaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdW1lTmV4dE5ld2xpbmUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQgPSB0ZXh0LnNsaWNlKDAsIC0xKTtcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID49IHNjcm9sbExlbmd0aCAmJiAhdGV4dC5lbmRzV2l0aCgnXFxuJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN1bWVOZXh0TmV3bGluZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnNjcm9sbC5pbnNlcnRBdChpbmRleCwgdGV4dCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICB2YXIgX3Njcm9sbCRsaW5lID0gX3RoaXMuc2Nyb2xsLmxpbmUoaW5kZXgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgX3Njcm9sbCRsaW5lMiA9IF9zbGljZWRUb0FycmF5KF9zY3JvbGwkbGluZSwgMiksXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lID0gX3Njcm9sbCRsaW5lMlswXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldCA9IF9zY3JvbGwkbGluZTJbMV07XG5cbiAgICAgICAgICAgICAgICAgICAgICB2YXIgZm9ybWF0cyA9ICgwLCBfZXh0ZW5kMi5kZWZhdWx0KShcbiAgICAgICAgICAgICAgICAgICAgICAgIHt9LFxuICAgICAgICAgICAgICAgICAgICAgICAgKDAsIF9ibG9jay5idWJibGVGb3JtYXRzKShsaW5lKSxcbiAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgIGlmIChsaW5lIGluc3RhbmNlb2YgX2Jsb2NrMi5kZWZhdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgX2xpbmUkZGVzY2VuZGFudCA9IGxpbmUuZGVzY2VuZGFudChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LkxlYWYsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfbGluZSRkZXNjZW5kYW50MiA9IF9zbGljZWRUb0FycmF5KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9saW5lJGRlc2NlbmRhbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgbGVhZiA9IF9saW5lJGRlc2NlbmRhbnQyWzBdO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXRzID0gKDAsIF9leHRlbmQyLmRlZmF1bHQpKFxuICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXRzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAoMCwgX2Jsb2NrLmJ1YmJsZUZvcm1hdHMpKGxlYWYpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlcyA9XG4gICAgICAgICAgICAgICAgICAgICAgICBfb3AyLmRlZmF1bHQuYXR0cmlidXRlcy5kaWZmKGZvcm1hdHMsIGF0dHJpYnV0ZXMpIHx8IHt9O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKF90eXBlb2Yob3AuaW5zZXJ0KSA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICB2YXIga2V5ID0gT2JqZWN0LmtleXMob3AuaW5zZXJ0KVswXTsgLy8gVGhlcmUgc2hvdWxkIG9ubHkgYmUgb25lIGtleVxuICAgICAgICAgICAgICAgICAgICAgIGlmIChrZXkgPT0gbnVsbCkgcmV0dXJuIGluZGV4O1xuICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnNjcm9sbC5pbnNlcnRBdChpbmRleCwga2V5LCBvcC5pbnNlcnRba2V5XSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgc2Nyb2xsTGVuZ3RoICs9IGxlbmd0aDtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKGF0dHJpYnV0ZXMpLmZvckVhY2goZnVuY3Rpb24gKG5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuc2Nyb2xsLmZvcm1hdEF0KFxuICAgICAgICAgICAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgICBuYW1lLFxuICAgICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXNbbmFtZV0sXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBpbmRleCArIGxlbmd0aDtcbiAgICAgICAgICAgICAgICB9LCAwKTtcbiAgICAgICAgICAgICAgICBkZWx0YS5yZWR1Y2UoZnVuY3Rpb24gKGluZGV4LCBvcCkge1xuICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcC5kZWxldGUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLnNjcm9sbC5kZWxldGVBdChpbmRleCwgb3AuZGVsZXRlKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGluZGV4O1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgcmV0dXJuIGluZGV4ICsgKG9wLnJldGFpbiB8fCBvcC5pbnNlcnQubGVuZ3RoIHx8IDEpO1xuICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgICAgIHRoaXMuc2Nyb2xsLmJhdGNoRW5kKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudXBkYXRlKGRlbHRhKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2RlbGV0ZVRleHQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZGVsZXRlVGV4dChpbmRleCwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zY3JvbGwuZGVsZXRlQXQoaW5kZXgsIGxlbmd0aCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudXBkYXRlKFxuICAgICAgICAgICAgICAgICAgbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KCkucmV0YWluKGluZGV4KS5kZWxldGUobGVuZ3RoKSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZm9ybWF0TGluZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBmb3JtYXRMaW5lKGluZGV4LCBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXMyID0gdGhpcztcblxuICAgICAgICAgICAgICAgIHZhciBmb3JtYXRzID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAyICYmIGFyZ3VtZW50c1syXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzJdXG4gICAgICAgICAgICAgICAgICAgIDoge307XG5cbiAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbC51cGRhdGUoKTtcbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhmb3JtYXRzKS5mb3JFYWNoKGZ1bmN0aW9uIChmb3JtYXQpIHtcbiAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMyLnNjcm9sbC53aGl0ZWxpc3QgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgICAhX3RoaXMyLnNjcm9sbC53aGl0ZWxpc3RbZm9ybWF0XVxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICB2YXIgbGluZXMgPSBfdGhpczIuc2Nyb2xsLmxpbmVzKGluZGV4LCBNYXRoLm1heChsZW5ndGgsIDEpKTtcbiAgICAgICAgICAgICAgICAgIHZhciBsZW5ndGhSZW1haW5pbmcgPSBsZW5ndGg7XG4gICAgICAgICAgICAgICAgICBsaW5lcy5mb3JFYWNoKGZ1bmN0aW9uIChsaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsaW5lTGVuZ3RoID0gbGluZS5sZW5ndGgoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEobGluZSBpbnN0YW5jZW9mIF9jb2RlMi5kZWZhdWx0KSkge1xuICAgICAgICAgICAgICAgICAgICAgIGxpbmUuZm9ybWF0KGZvcm1hdCwgZm9ybWF0c1tmb3JtYXRdKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICB2YXIgY29kZUluZGV4ID0gaW5kZXggLSBsaW5lLm9mZnNldChfdGhpczIuc2Nyb2xsKTtcbiAgICAgICAgICAgICAgICAgICAgICB2YXIgY29kZUxlbmd0aCA9XG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lLm5ld2xpbmVJbmRleChjb2RlSW5kZXggKyBsZW5ndGhSZW1haW5pbmcpIC1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGVJbmRleCArXG4gICAgICAgICAgICAgICAgICAgICAgICAxO1xuICAgICAgICAgICAgICAgICAgICAgIGxpbmUuZm9ybWF0QXQoXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2RlSW5kZXgsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2RlTGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0LFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0c1tmb3JtYXRdLFxuICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbGVuZ3RoUmVtYWluaW5nIC09IGxpbmVMZW5ndGg7XG4gICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbC5vcHRpbWl6ZSgpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnVwZGF0ZShcbiAgICAgICAgICAgICAgICAgIG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpXG4gICAgICAgICAgICAgICAgICAgIC5yZXRhaW4oaW5kZXgpXG4gICAgICAgICAgICAgICAgICAgIC5yZXRhaW4obGVuZ3RoLCAoMCwgX2Nsb25lMi5kZWZhdWx0KShmb3JtYXRzKSksXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2Zvcm1hdFRleHQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9ybWF0VGV4dChpbmRleCwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgdmFyIF90aGlzMyA9IHRoaXM7XG5cbiAgICAgICAgICAgICAgICB2YXIgZm9ybWF0cyA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMiAmJiBhcmd1bWVudHNbMl0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1syXVxuICAgICAgICAgICAgICAgICAgICA6IHt9O1xuXG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXMoZm9ybWF0cykuZm9yRWFjaChmdW5jdGlvbiAoZm9ybWF0KSB7XG4gICAgICAgICAgICAgICAgICBfdGhpczMuc2Nyb2xsLmZvcm1hdEF0KFxuICAgICAgICAgICAgICAgICAgICBpbmRleCxcbiAgICAgICAgICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICBmb3JtYXQsXG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdHNbZm9ybWF0XSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudXBkYXRlKFxuICAgICAgICAgICAgICAgICAgbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KClcbiAgICAgICAgICAgICAgICAgICAgLnJldGFpbihpbmRleClcbiAgICAgICAgICAgICAgICAgICAgLnJldGFpbihsZW5ndGgsICgwLCBfY2xvbmUyLmRlZmF1bHQpKGZvcm1hdHMpKSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZ2V0Q29udGVudHMnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0Q29udGVudHMoaW5kZXgsIGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRlbHRhLnNsaWNlKGluZGV4LCBpbmRleCArIGxlbmd0aCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdnZXREZWx0YScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBnZXREZWx0YSgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5zY3JvbGwubGluZXMoKS5yZWR1Y2UoZnVuY3Rpb24gKGRlbHRhLCBsaW5lKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gZGVsdGEuY29uY2F0KGxpbmUuZGVsdGEoKSk7XG4gICAgICAgICAgICAgICAgfSwgbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KCkpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZ2V0Rm9ybWF0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGdldEZvcm1hdChpbmRleCkge1xuICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDEgJiYgYXJndW1lbnRzWzFdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMV1cbiAgICAgICAgICAgICAgICAgICAgOiAwO1xuXG4gICAgICAgICAgICAgICAgdmFyIGxpbmVzID0gW10sXG4gICAgICAgICAgICAgICAgICBsZWF2ZXMgPSBbXTtcbiAgICAgICAgICAgICAgICBpZiAobGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbC5wYXRoKGluZGV4KS5mb3JFYWNoKGZ1bmN0aW9uIChwYXRoKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBfcGF0aCA9IF9zbGljZWRUb0FycmF5KHBhdGgsIDEpLFxuICAgICAgICAgICAgICAgICAgICAgIGJsb3QgPSBfcGF0aFswXTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoYmxvdCBpbnN0YW5jZW9mIF9ibG9jazIuZGVmYXVsdCkge1xuICAgICAgICAgICAgICAgICAgICAgIGxpbmVzLnB1c2goYmxvdCk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYmxvdCBpbnN0YW5jZW9mIF9wYXJjaG1lbnQyLmRlZmF1bHQuTGVhZikge1xuICAgICAgICAgICAgICAgICAgICAgIGxlYXZlcy5wdXNoKGJsb3QpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgbGluZXMgPSB0aGlzLnNjcm9sbC5saW5lcyhpbmRleCwgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgIGxlYXZlcyA9IHRoaXMuc2Nyb2xsLmRlc2NlbmRhbnRzKFxuICAgICAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LkxlYWYsXG4gICAgICAgICAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgICAgICAgICBsZW5ndGgsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgZm9ybWF0c0FyciA9IFtsaW5lcywgbGVhdmVzXS5tYXAoZnVuY3Rpb24gKGJsb3RzKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoYmxvdHMubGVuZ3RoID09PSAwKSByZXR1cm4ge307XG4gICAgICAgICAgICAgICAgICB2YXIgZm9ybWF0cyA9ICgwLCBfYmxvY2suYnViYmxlRm9ybWF0cykoYmxvdHMuc2hpZnQoKSk7XG4gICAgICAgICAgICAgICAgICB3aGlsZSAoT2JqZWN0LmtleXMoZm9ybWF0cykubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgYmxvdCA9IGJsb3RzLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChibG90ID09IG51bGwpIHJldHVybiBmb3JtYXRzO1xuICAgICAgICAgICAgICAgICAgICBmb3JtYXRzID0gY29tYmluZUZvcm1hdHMoXG4gICAgICAgICAgICAgICAgICAgICAgKDAsIF9ibG9jay5idWJibGVGb3JtYXRzKShibG90KSxcbiAgICAgICAgICAgICAgICAgICAgICBmb3JtYXRzLFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgcmV0dXJuIGZvcm1hdHM7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9leHRlbmQyLmRlZmF1bHQuYXBwbHkoX2V4dGVuZDIuZGVmYXVsdCwgZm9ybWF0c0Fycik7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdnZXRUZXh0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGdldFRleHQoaW5kZXgsIGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmdldENvbnRlbnRzKGluZGV4LCBsZW5ndGgpXG4gICAgICAgICAgICAgICAgICAuZmlsdGVyKGZ1bmN0aW9uIChvcCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHlwZW9mIG9wLmluc2VydCA9PT0gJ3N0cmluZyc7XG4gICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAob3ApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wLmluc2VydDtcbiAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAuam9pbignJyk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdpbnNlcnRFbWJlZCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBpbnNlcnRFbWJlZChpbmRleCwgZW1iZWQsIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zY3JvbGwuaW5zZXJ0QXQoaW5kZXgsIGVtYmVkLCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudXBkYXRlKFxuICAgICAgICAgICAgICAgICAgbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KClcbiAgICAgICAgICAgICAgICAgICAgLnJldGFpbihpbmRleClcbiAgICAgICAgICAgICAgICAgICAgLmluc2VydChfZGVmaW5lUHJvcGVydHkoe30sIGVtYmVkLCB2YWx1ZSkpLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdpbnNlcnRUZXh0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGluc2VydFRleHQoaW5kZXgsIHRleHQpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXM0ID0gdGhpcztcblxuICAgICAgICAgICAgICAgIHZhciBmb3JtYXRzID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAyICYmIGFyZ3VtZW50c1syXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzJdXG4gICAgICAgICAgICAgICAgICAgIDoge307XG5cbiAgICAgICAgICAgICAgICB0ZXh0ID0gdGV4dC5yZXBsYWNlKC9cXHJcXG4vZywgJ1xcbicpLnJlcGxhY2UoL1xcci9nLCAnXFxuJyk7XG4gICAgICAgICAgICAgICAgdGhpcy5zY3JvbGwuaW5zZXJ0QXQoaW5kZXgsIHRleHQpO1xuICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKGZvcm1hdHMpLmZvckVhY2goZnVuY3Rpb24gKGZvcm1hdCkge1xuICAgICAgICAgICAgICAgICAgX3RoaXM0LnNjcm9sbC5mb3JtYXRBdChcbiAgICAgICAgICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICAgICAgICAgIHRleHQubGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICBmb3JtYXQsXG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdHNbZm9ybWF0XSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudXBkYXRlKFxuICAgICAgICAgICAgICAgICAgbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KClcbiAgICAgICAgICAgICAgICAgICAgLnJldGFpbihpbmRleClcbiAgICAgICAgICAgICAgICAgICAgLmluc2VydCh0ZXh0LCAoMCwgX2Nsb25lMi5kZWZhdWx0KShmb3JtYXRzKSksXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2lzQmxhbmsnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gaXNCbGFuaygpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zY3JvbGwuY2hpbGRyZW4ubGVuZ3RoID09IDApIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNjcm9sbC5jaGlsZHJlbi5sZW5ndGggPiAxKSByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgdmFyIGJsb2NrID0gdGhpcy5zY3JvbGwuY2hpbGRyZW4uaGVhZDtcbiAgICAgICAgICAgICAgICBpZiAoYmxvY2suc3RhdGljcy5ibG90TmFtZSAhPT0gX2Jsb2NrMi5kZWZhdWx0LmJsb3ROYW1lKVxuICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIGlmIChibG9jay5jaGlsZHJlbi5sZW5ndGggPiAxKSByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGJsb2NrLmNoaWxkcmVuLmhlYWQgaW5zdGFuY2VvZiBfYnJlYWsyLmRlZmF1bHQ7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdyZW1vdmVGb3JtYXQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcmVtb3ZlRm9ybWF0KGluZGV4LCBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICB2YXIgdGV4dCA9IHRoaXMuZ2V0VGV4dChpbmRleCwgbGVuZ3RoKTtcblxuICAgICAgICAgICAgICAgIHZhciBfc2Nyb2xsJGxpbmUzID0gdGhpcy5zY3JvbGwubGluZShpbmRleCArIGxlbmd0aCksXG4gICAgICAgICAgICAgICAgICBfc2Nyb2xsJGxpbmU0ID0gX3NsaWNlZFRvQXJyYXkoX3Njcm9sbCRsaW5lMywgMiksXG4gICAgICAgICAgICAgICAgICBsaW5lID0gX3Njcm9sbCRsaW5lNFswXSxcbiAgICAgICAgICAgICAgICAgIG9mZnNldCA9IF9zY3JvbGwkbGluZTRbMV07XG5cbiAgICAgICAgICAgICAgICB2YXIgc3VmZml4TGVuZ3RoID0gMCxcbiAgICAgICAgICAgICAgICAgIHN1ZmZpeCA9IG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIGlmIChsaW5lICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGlmICghKGxpbmUgaW5zdGFuY2VvZiBfY29kZTIuZGVmYXVsdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgc3VmZml4TGVuZ3RoID0gbGluZS5sZW5ndGgoKSAtIG9mZnNldDtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHN1ZmZpeExlbmd0aCA9IGxpbmUubmV3bGluZUluZGV4KG9mZnNldCkgLSBvZmZzZXQgKyAxO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgc3VmZml4ID0gbGluZVxuICAgICAgICAgICAgICAgICAgICAuZGVsdGEoKVxuICAgICAgICAgICAgICAgICAgICAuc2xpY2Uob2Zmc2V0LCBvZmZzZXQgKyBzdWZmaXhMZW5ndGggLSAxKVxuICAgICAgICAgICAgICAgICAgICAuaW5zZXJ0KCdcXG4nKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIGNvbnRlbnRzID0gdGhpcy5nZXRDb250ZW50cyhpbmRleCwgbGVuZ3RoICsgc3VmZml4TGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB2YXIgZGlmZiA9IGNvbnRlbnRzLmRpZmYoXG4gICAgICAgICAgICAgICAgICBuZXcgX3F1aWxsRGVsdGEyLmRlZmF1bHQoKS5pbnNlcnQodGV4dCkuY29uY2F0KHN1ZmZpeCksXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB2YXIgZGVsdGEgPSBuZXcgX3F1aWxsRGVsdGEyLmRlZmF1bHQoKVxuICAgICAgICAgICAgICAgICAgLnJldGFpbihpbmRleClcbiAgICAgICAgICAgICAgICAgIC5jb25jYXQoZGlmZik7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuYXBwbHlEZWx0YShkZWx0YSk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICd1cGRhdGUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gdXBkYXRlKGNoYW5nZSkge1xuICAgICAgICAgICAgICAgIHZhciBtdXRhdGlvbnMgPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDEgJiYgYXJndW1lbnRzWzFdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMV1cbiAgICAgICAgICAgICAgICAgICAgOiBbXTtcbiAgICAgICAgICAgICAgICB2YXIgY3Vyc29ySW5kZXggPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDIgJiYgYXJndW1lbnRzWzJdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMl1cbiAgICAgICAgICAgICAgICAgICAgOiB1bmRlZmluZWQ7XG5cbiAgICAgICAgICAgICAgICB2YXIgb2xkRGVsdGEgPSB0aGlzLmRlbHRhO1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIG11dGF0aW9ucy5sZW5ndGggPT09IDEgJiZcbiAgICAgICAgICAgICAgICAgIG11dGF0aW9uc1swXS50eXBlID09PSAnY2hhcmFjdGVyRGF0YScgJiZcbiAgICAgICAgICAgICAgICAgIG11dGF0aW9uc1swXS50YXJnZXQuZGF0YS5tYXRjaChBU0NJSSkgJiZcbiAgICAgICAgICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQuZmluZChtdXRhdGlvbnNbMF0udGFyZ2V0KVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgLy8gT3B0aW1pemF0aW9uIGZvciBjaGFyYWN0ZXIgY2hhbmdlc1xuICAgICAgICAgICAgICAgICAgdmFyIHRleHRCbG90ID0gX3BhcmNobWVudDIuZGVmYXVsdC5maW5kKG11dGF0aW9uc1swXS50YXJnZXQpO1xuICAgICAgICAgICAgICAgICAgdmFyIGZvcm1hdHMgPSAoMCwgX2Jsb2NrLmJ1YmJsZUZvcm1hdHMpKHRleHRCbG90KTtcbiAgICAgICAgICAgICAgICAgIHZhciBpbmRleCA9IHRleHRCbG90Lm9mZnNldCh0aGlzLnNjcm9sbCk7XG4gICAgICAgICAgICAgICAgICB2YXIgb2xkVmFsdWUgPSBtdXRhdGlvbnNbMF0ub2xkVmFsdWUucmVwbGFjZShcbiAgICAgICAgICAgICAgICAgICAgX2N1cnNvcjIuZGVmYXVsdC5DT05URU5UUyxcbiAgICAgICAgICAgICAgICAgICAgJycsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgdmFyIG9sZFRleHQgPSBuZXcgX3F1aWxsRGVsdGEyLmRlZmF1bHQoKS5pbnNlcnQob2xkVmFsdWUpO1xuICAgICAgICAgICAgICAgICAgdmFyIG5ld1RleHQgPSBuZXcgX3F1aWxsRGVsdGEyLmRlZmF1bHQoKS5pbnNlcnQoXG4gICAgICAgICAgICAgICAgICAgIHRleHRCbG90LnZhbHVlKCksXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgdmFyIGRpZmZEZWx0YSA9IG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpXG4gICAgICAgICAgICAgICAgICAgIC5yZXRhaW4oaW5kZXgpXG4gICAgICAgICAgICAgICAgICAgIC5jb25jYXQob2xkVGV4dC5kaWZmKG5ld1RleHQsIGN1cnNvckluZGV4KSk7XG4gICAgICAgICAgICAgICAgICBjaGFuZ2UgPSBkaWZmRGVsdGEucmVkdWNlKGZ1bmN0aW9uIChkZWx0YSwgb3ApIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wLmluc2VydCkge1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWx0YS5pbnNlcnQob3AuaW5zZXJ0LCBmb3JtYXRzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVsdGEucHVzaChvcCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sIG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpKTtcbiAgICAgICAgICAgICAgICAgIHRoaXMuZGVsdGEgPSBvbGREZWx0YS5jb21wb3NlKGNoYW5nZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIHRoaXMuZGVsdGEgPSB0aGlzLmdldERlbHRhKCk7XG4gICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICFjaGFuZ2UgfHxcbiAgICAgICAgICAgICAgICAgICAgISgwLCBfZGVlcEVxdWFsMi5kZWZhdWx0KShcbiAgICAgICAgICAgICAgICAgICAgICBvbGREZWx0YS5jb21wb3NlKGNoYW5nZSksXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5kZWx0YSxcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGNoYW5nZSA9IG9sZERlbHRhLmRpZmYodGhpcy5kZWx0YSwgY3Vyc29ySW5kZXgpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIHJldHVybiBFZGl0b3I7XG4gICAgICAgIH0pKCk7XG5cbiAgICAgICAgZnVuY3Rpb24gY29tYmluZUZvcm1hdHMoZm9ybWF0cywgY29tYmluZWQpIHtcbiAgICAgICAgICByZXR1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HVybiBkZWx0YS5pbnNlcnQoe2ltYWdlOiBvcC5hdHRyaWJ1dGVzLmltYWdlfSwgYXR0cmlidXRlcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgIG9wLmF0dHJpYnV0ZXMgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAob3AuYXR0cmlidXRlcy5saXN0ID09PSB0cnVlIHx8IG9wLmF0dHJpYnV0ZXMuYnVsbGV0ID09PSB0cnVlKVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIG9wID0gKDAsIF9jbG9uZTIuZGVmYXVsdCkob3ApO1xuICAgICAgICAgICAgICBpZiAob3AuYXR0cmlidXRlcy5saXN0KSB7XG4gICAgICAgICAgICAgICAgb3AuYXR0cmlidXRlcy5saXN0ID0gJ29yZGVyZWQnO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG9wLmF0dHJpYnV0ZXMubGlzdCA9ICdidWxsZXQnO1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBvcC5hdHRyaWJ1dGVzLmJ1bGxldDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBvcC5pbnNlcnQgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHZhciB0ZXh0ID0gb3AuaW5zZXJ0LnJlcGxhY2UoL1xcclxcbi9nLCAnXFxuJykucmVwbGFjZSgvXFxyL2csICdcXG4nKTtcbiAgICAgICAgICAgICAgcmV0dXJuIGRlbHRhLmluc2VydCh0ZXh0LCBvcC5hdHRyaWJ1dGVzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBkZWx0YS5wdXNoKG9wKTtcbiAgICAgICAgICB9LCBuZXcgX3F1aWxsRGVsdGEyLmRlZmF1bHQoKSk7XG4gICAgICAgIH1cblxuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBFZGl0b3I7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiAxNSAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge1xuICAgICAgICAgIHZhbHVlOiB0cnVlLFxuICAgICAgICB9KTtcbiAgICAgICAgZXhwb3J0cy5kZWZhdWx0ID0gZXhwb3J0cy5SYW5nZSA9IHVuZGVmaW5lZDtcblxuICAgICAgICB2YXIgX3NsaWNlZFRvQXJyYXkgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIHNsaWNlSXRlcmF0b3IoYXJyLCBpKSB7XG4gICAgICAgICAgICB2YXIgX2FyciA9IFtdO1xuICAgICAgICAgICAgdmFyIF9uID0gdHJ1ZTtcbiAgICAgICAgICAgIHZhciBfZCA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIF9lID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgZm9yIChcbiAgICAgICAgICAgICAgICB2YXIgX2kgPSBhcnJbU3ltYm9sLml0ZXJhdG9yXSgpLCBfcztcbiAgICAgICAgICAgICAgICAhKF9uID0gKF9zID0gX2kubmV4dCgpKS5kb25lKTtcbiAgICAgICAgICAgICAgICBfbiA9IHRydWVcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgX2Fyci5wdXNoKF9zLnZhbHVlKTtcbiAgICAgICAgICAgICAgICBpZiAoaSAmJiBfYXJyLmxlbmd0aCA9PT0gaSkgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBfZCA9IHRydWU7XG4gICAgICAgICAgICAgIF9lID0gZXJyO1xuICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBpZiAoIV9uICYmIF9pWydyZXR1cm4nXSkgX2lbJ3JldHVybiddKCk7XG4gICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgaWYgKF9kKSB0aHJvdyBfZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIF9hcnI7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoYXJyLCBpKSB7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShhcnIpKSB7XG4gICAgICAgICAgICAgIHJldHVybiBhcnI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKFN5bWJvbC5pdGVyYXRvciBpbiBPYmplY3QoYXJyKSkge1xuICAgICAgICAgICAgICByZXR1cm4gc2xpY2VJdGVyYXRvcihhcnIsIGkpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgICAnSW52YWxpZCBhdHRlbXB0IHRvIGRlc3RydWN0dXJlIG5vbi1pdGVyYWJsZSBpbnN0YW5jZScsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcbiAgICAgICAgfSkoKTtcblxuICAgICAgICB2YXIgX2NyZWF0ZUNsYXNzID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0aWVzKHRhcmdldCwgcHJvcHMpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcHJvcHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgdmFyIGRlc2NyaXB0b3IgPSBwcm9wc1tpXTtcbiAgICAgICAgICAgICAgZGVzY3Jp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gICAgICAgdGhpcy5jdXJzb3IgPSBfcGFyY2htZW50Mi5kZWZhdWx0LmNyZWF0ZSgnY3Vyc29yJywgdGhpcyk7XG4gICAgICAgICAgICAvLyBzYXZlZFJhbmdlIGlzIGxhc3Qgbm9uLW51bGwgcmFuZ2VcbiAgICAgICAgICAgIHRoaXMubGFzdFJhbmdlID0gdGhpcy5zYXZlZFJhbmdlID0gbmV3IFJhbmdlKDAsIDApO1xuICAgICAgICAgICAgdGhpcy5oYW5kbGVDb21wb3NpdGlvbigpO1xuICAgICAgICAgICAgdGhpcy5oYW5kbGVEcmFnZ2luZygpO1xuICAgICAgICAgICAgdGhpcy5lbWl0dGVyLmxpc3RlbkRPTSgnc2VsZWN0aW9uY2hhbmdlJywgZG9jdW1lbnQsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgaWYgKCFfdGhpcy5tb3VzZURvd24pIHtcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KFxuICAgICAgICAgICAgICAgICAgX3RoaXMudXBkYXRlLmJpbmQoX3RoaXMsIF9lbWl0dGVyNC5kZWZhdWx0LnNvdXJjZXMuVVNFUiksXG4gICAgICAgICAgICAgICAgICAxLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdGhpcy5lbWl0dGVyLm9uKFxuICAgICAgICAgICAgICBfZW1pdHRlcjQuZGVmYXVsdC5ldmVudHMuRURJVE9SX0NIQU5HRSxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKHR5cGUsIGRlbHRhKSB7XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgdHlwZSA9PT0gX2VtaXR0ZXI0LmRlZmF1bHQuZXZlbnRzLlRFWFRfQ0hBTkdFICYmXG4gICAgICAgICAgICAgICAgICBkZWx0YS5sZW5ndGgoKSA+IDBcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIF90aGlzLnVwZGF0ZShfZW1pdHRlcjQuZGVmYXVsdC5zb3VyY2VzLlNJTEVOVCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHRoaXMuZW1pdHRlci5vbihcbiAgICAgICAgICAgICAgX2VtaXR0ZXI0LmRlZmF1bHQuZXZlbnRzLlNDUk9MTF9CRUZPUkVfVVBEQVRFLFxuICAgICAgICAgICAgICBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFfdGhpcy5oYXNGb2N1cygpKSByZXR1cm47XG4gICAgICAgICAgICAgICAgdmFyIG5hdGl2ZSA9IF90aGlzLmdldE5hdGl2ZVJhbmdlKCk7XG4gICAgICAgICAgICAgICAgaWYgKG5hdGl2ZSA9PSBudWxsKSByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKG5hdGl2ZS5zdGFydC5ub2RlID09PSBfdGhpcy5jdXJzb3IudGV4dE5vZGUpIHJldHVybjsgLy8gY3Vyc29yLnJlc3RvcmUoKSB3aWxsIGhhbmRsZVxuICAgICAgICAgICAgICAgIC8vIFRPRE8gdW5jbGVhciBpZiB0aGlzIGhhcyBuZWdhdGl2ZSBzaWRlIGVmZmVjdHNcbiAgICAgICAgICAgICAgICBfdGhpcy5lbWl0dGVyLm9uY2UoXG4gICAgICAgICAgICAgICAgICBfZW1pdHRlcjQuZGVmYXVsdC5ldmVudHMuU0NST0xMX1VQREFURSxcbiAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5zZXROYXRpdmVSYW5nZShcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hdGl2ZS5zdGFydC5ub2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgbmF0aXZlLnN0YXJ0Lm9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hdGl2ZS5lbmQubm9kZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hdGl2ZS5lbmQub2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGlnbm9yZWQpIHt9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgdGhpcy5lbWl0dGVyLm9uKFxuICAgICAgICAgICAgICBfZW1pdHRlcjQuZGVmYXVsdC5ldmVudHMuU0NST0xMX09QVElNSVpFLFxuICAgICAgICAgICAgICBmdW5jdGlvbiAobXV0YXRpb25zLCBjb250ZXh0KSB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbnRleHQucmFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgIHZhciBfY29udGV4dCRyYW5nZSA9IGNvbnRleHQucmFuZ2UsXG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0Tm9kZSA9IF9jb250ZXh0JHJhbmdlLnN0YXJ0Tm9kZSxcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRPZmZzZXQgPSBfY29udGV4dCRyYW5nZS5zdGFydE9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgZW5kTm9kZSA9IF9jb250ZXh0JHJhbmdlLmVuZE5vZGUsXG4gICAgICAgICAgICAgICAgICAgIGVuZE9mZnNldCA9IF9jb250ZXh0JHJhbmdlLmVuZE9mZnNldDtcblxuICAgICAgICAgICAgICAgICAgX3RoaXMuc2V0TmF0aXZlUmFuZ2UoXG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0Tm9kZSxcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRPZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgIGVuZE5vZGUsXG4gICAgICAgICAgICAgICAgICAgIGVuZE9mZnNldCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHRoaXMudXBkYXRlKF9lbWl0dGVyNC5kZWZhdWx0LnNvdXJjZXMuU0lMRU5UKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoU2VsZWN0aW9uLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2hhbmRsZUNvbXBvc2l0aW9uJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGhhbmRsZUNvbXBvc2l0aW9uKCkge1xuICAgICAgICAgICAgICAgIHZhciBfdGhpczIgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5yb290LmFkZEV2ZW50TGlzdGVuZXIoJ2NvbXBvc2l0aW9uc3RhcnQnLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICBfdGhpczIuY29tcG9zaW5nID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0aGlzLnJvb3QuYWRkRXZlbnRMaXN0ZW5lcignY29tcG9zaXRpb25lbmQnLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICBfdGhpczIuY29tcG9zaW5nID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICBpZiAoX3RoaXMyLmN1cnNvci5wYXJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJhbmdlID0gX3RoaXMyLmN1cnNvci5yZXN0b3JlKCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghcmFuZ2UpIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgX3RoaXMyLnNldE5hdGl2ZVJhbmdlKFxuICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnROb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnRPZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgICAgICByYW5nZS5lbmROb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2UuZW5kT2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0sIDEpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnaGFuZGxlRHJhZ2dpbmcnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gaGFuZGxlRHJhZ2dpbmcoKSB7XG4gICAgICAgICAgICAgICAgdmFyIF90aGlzMyA9IHRoaXM7XG5cbiAgICAgICAgICAgICAgICB0aGlzLmVtaXR0ZXIubGlzdGVuRE9NKCdtb3VzZWRvd24nLCBkb2N1bWVudC5ib2R5LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICBfdGhpczMubW91c2VEb3duID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0aGlzLmVtaXR0ZXIubGlzdGVuRE9NKCdtb3VzZXVwJywgZG9jdW1lbnQuYm9keSwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgX3RoaXMzLm1vdXNlRG93biA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgX3RoaXMzLnVwZGF0ZShfZW1pdHRlcjQuZGVmYXVsdC5zb3VyY2VzLlVTRVIpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZm9jdXMnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9jdXMoKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuaGFzRm9jdXMoKSkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIHRoaXMucm9vdC5mb2N1cygpO1xuICAgICAgICAgICAgICAgIHRoaXMuc2V0UmFuZ2UodGhpcy5zYXZlZFJhbmdlKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2Zvcm1hdCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBmb3JtYXQoX2Zvcm1hdCwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbC53aGl0ZWxpc3QgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgIXRoaXMuc2Nyb2xsLndoaXRlbGlzdFtfZm9ybWF0XVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbC51cGRhdGUoKTtcbiAgICAgICAgICAgICAgICB2YXIgbmF0aXZlUmFuZ2UgPSB0aGlzLmdldE5hdGl2ZVJhbmdlKCk7XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgbmF0aXZlUmFuZ2UgPT0gbnVsbCB8fFxuICAgICAgICAgICAgICAgICAgIW5hdGl2ZVJhbmdlLm5hdGl2ZS5jb2xsYXBzZWQgfHxcbiAgICAgICAgICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQucXVlcnkoXG4gICAgICAgICAgICAgICAgICAgIF9mb3JtYXQsXG4gICAgICAgICAgICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQuU2NvcGUuQkxPQ0ssXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGlmIChuYXRpdmVSYW5nZS5zdGFydC5ub2RlICE9PSB0aGlzLmN1cnNvci50ZXh0Tm9kZSkge1xuICAgICAgICAgICAgICAgICAgdmFyIGJsb3QgPSBfcGFyY2htZW50Mi5kZWZhdWx0LmZpbmQoXG4gICAgICAgICAgICAgICAgICAgIG5hdGl2ZVJhbmdlLnN0YXJ0Lm5vZGUsXG4gICAgICAgICAgICAgICAgICAgIGZhbHNlLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGlmIChibG90ID09IG51bGwpIHJldHVybjtcbiAgICAgICAgICAgICAgICAgIC8vIFRPRE8gR2l2ZSBibG90IGFiaWxpdHkgdG8gbm90IHNwbGl0XG4gICAgICAgICAgICAgICAgICBpZiAoYmxvdCBpbnN0YW5jZW9mIF9wYXJjaG1lbnQyLmRlZmF1bHQuTGVhZikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgYWZ0ZXIgPSBibG90LnNwbGl0KG5hdGl2ZVJhbmdlLnN0YXJ0Lm9mZnNldCk7XG4gICAgICAgICAgICAgICAgICAgIGJsb3QucGFyZW50Lmluc2VydEJlZm9yZSh0aGlzLmN1cnNvciwgYWZ0ZXIpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYmxvdC5pbnNlcnRCZWZvcmUodGhpcy5jdXJzb3IsIG5hdGl2ZVJhbmdlLnN0YXJ0Lm5vZGUpOyAvLyBTaG91bGQgbmV2ZXIgaGFwcGVuXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB0aGlzLmN1cnNvci5hdHRhY2goKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5jdXJzb3IuZm9ybWF0KF9mb3JtYXQsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbC5vcHRpbWl6ZSgpO1xuICAgICAgICAgICAgICAgIHRoaXMuc2V0TmF0aXZlUmFuZ2UoXG4gICAgICAgICAgICAgICAgICB0aGlzLmN1cnNvci50ZXh0Tm9kZSxcbiAgICAgICAgICAgICAgICAgIHRoaXMuY3Vyc29yLnRleHROb2RlLmRhdGEubGVuZ3RoLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgdGhpcy51cGRhdGUoKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2dldEJvdW5kcycsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRCb3VuZHMoaW5kZXgpIHtcbiAgICAgICAgICAgICAgICB2YXIgbGVuZ3RoID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAxICYmIGFyZ3VtZW50c1sxXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzFdXG4gICAgICAgICAgICAgICAgICAgIDogMDtcblxuICAgICAgICAgICAgICAgIHZhciBzY3JvbGxMZW5ndGggPSB0aGlzLnNjcm9sbC5sZW5ndGgoKTtcbiAgICAgICAgICAgICAgICBpbmRleCA9IE1hdGgubWluKGluZGV4LCBzY3JvbGxMZW5ndGggLSAxKTtcbiAgICAgICAgICAgICAgICBsZW5ndGggPSBNYXRoLm1pbihpbmRleCArIGxlbmd0aCwgc2Nyb2xsTGVuZ3RoIC0gMSkgLSBpbmRleDtcbiAgICAgICAgICAgICAgICB2YXIgbm9kZSA9IHZvaWQgMCxcbiAgICAgICAgICAgICAgICAgIF9zY3JvbGwkbGVhZiA9IHRoaXMuc2Nyb2xsLmxlYWYoaW5kZXgpLFxuICAgICAgICAgICAgICAgICAgX3Njcm9sbCRsZWFmMiA9IF9zbGljZWRUb0FycmF5KF9zY3JvbGwkbGVhZiwgMiksXG4gICAgICAgICAgICAgICAgICBsZWFmID0gX3Njcm9sbCRsZWFmMlswXSxcbiAgICAgICAgICAgICAgICAgIG9mZnNldCA9IF9zY3JvbGwkbGVhZjJbMV07XG4gICAgICAgICAgICAgICAgaWYgKGxlYWYgPT0gbnVsbCkgcmV0dXJuIG51bGw7XG5cbiAgICAgICAgICAgICAgICB2YXIgX2xlYWYkcG9zaXRpb24gPSBsZWFmLnBvc2l0aW9uKG9mZnNldCwgdHJ1ZSk7XG5cbiAgICAgICAgICAgICAgICB2YXIgX2xlYWYkcG9zaXRpb24yID0gX3NsaWNlZFRvQXJyYXkoX2xlYWYkcG9zaXRpb24sIDIpO1xuXG4gICAgICAgICAgICAgICAgbm9kZSA9IF9sZWFmJHBvc2l0aW9uMlswXTtcbiAgICAgICAgICAgICAgICBvZmZzZXQgPSBfbGVhZiRwb3NpdGlvbjJbMV07XG5cbiAgICAgICAgICAgICAgICB2YXIgcmFuZ2UgPSBkb2N1bWVudC5jcmVhdGVSYW5nZSgpO1xuICAgICAgICAgICAgICAgIGlmIChsZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICByYW5nZS5zZXRTdGFydChub2RlLCBvZmZzZXQpO1xuXG4gICAgICAgICAgICAgICAgICB2YXIgX3Njcm9sbCRsZWFmMyA9IHRoaXMuc2Nyb2xsLmxlYWYoaW5kZXggKyBsZW5ndGgpO1xuXG4gICAgICAgICAgICAgICAgICB2YXIgX3Njcm9sbCRsZWFmNCA9IF9zbGljZWRUb0FycmF5KF9zY3JvbGwkbGVhZjMsIDIpO1xuXG4gICAgICAgICAgICAgICAgICBsZWFmID0gX3Njcm9sbCRsZWFmNFswXTtcbiAgICAgICAgICAgICAgICAgIG9mZnNldCA9IF9zY3JvbGwkbGVhZjRbMV07XG5cbiAgICAgICAgICAgICAgICAgIGlmIChsZWFmID09IG51bGwpIHJldHVybiBudWxsO1xuXG4gICAgICAgICAgICAgICAgICB2YXIgX2xlYWYkcG9zaXRpb24zID0gbGVhZi5wb3NpdGlvbihvZmZzZXQsIHRydWUpO1xuXG4gICAgICAgICAgICAgICAgICB2YXIgX2xlYWYkcG9zaXRpb240ID0gX3NsaWNlZFRvQXJyYXkoX2xlYWYkcG9zaXRpb24zLCAyKTtcblxuICAgICAgICAgICAgICAgICAgbm9kZSA9IF9sZWFmJHBvc2l0aW9uNFswXTtcbiAgICAgICAgICAgICAgICAgIG9mZnNldCA9IF9sZWFmJHBvc2l0aW9uNFsxXTtcblxuICAgICAgICAgICAgICAgICAgcmFuZ2Uuc2V0RW5kKG5vZGUsIG9mZnNldCk7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gcmFuZ2UuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIHZhciBzaWRlID0gJ2xlZnQnO1xuICAgICAgICAgICAgICAgICAgdmFyIHJlY3QgPSB2b2lkIDA7XG4gICAgICAgICAgICAgICAgICBpZiAobm9kZSBpbnN0YW5jZW9mIFRleHQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9mZnNldCA8IG5vZGUuZGF0YS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICByYW5nZS5zZXRTdGFydChub2RlLCBvZmZzZXQpO1xuICAgICAgICAgICAgICAgICAgICAgIHJhbmdlLnNldEVuZChub2RlLCBvZmZzZXQgKyAxKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICByYW5nZS5zZXRTdGFydChub2RlLCBvZmZzZXQgLSAxKTtcbiAgICAgICAgICAgICAgICAgICAgICByYW5nZS5zZXRFbmQobm9kZSwgb2Zmc2V0KTtcbiAgICAgICAgICAgICAgICAgICAgICBzaWRlID0gJ3JpZ2h0JztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZWN0ID0gcmFuZ2UuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZWN0ID0gbGVhZi5kb21Ob2RlLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAob2Zmc2V0ID4gMCkgc2lkZSA9ICdyaWdodCc7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBib3R0b206IHJlY3QudG9wICsgcmVjdC5oZWlnaHQsXG4gICAgICAgICAgICAgICAgICAgIGhlaWdodDogcmVjdC5oZWlnaHQsXG4gICAgICAgICAgICAgICAgICAgIGxlZnQ6IHJlY3Rbc2lkZV0sXG4gICAgICAgICAgICAgICAgICAgIHJpZ2h0OiByZWN0W3NpZGVdLFxuICAgICAgICAgICAgICAgICAgICB0b3A6IHJlY3QudG9wLFxuICAgICAgICAgICAgICAgICAgICB3aWR0aDogMCxcbiAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZ2V0TmF0aXZlUmFuZ2UnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0TmF0aXZlUmFuZ2UoKSB7XG4gICAgICAgICAgICAgICAgdmFyIHNlbGVjdGlvbiA9IGRvY3VtZW50LmdldFNlbGVjdGlvbigpO1xuICAgICAgICAgICAgICAgIGlmIChzZWxlY3Rpb24gPT0gbnVsbCB8fCBzZWxlY3Rpb24ucmFuZ2VDb3VudCA8PSAwKSByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICB2YXIgbmF0aXZlUmFuZ2UgPSBzZWxlY3Rpb24uZ2V0UmFuZ2VBdCgwKTtcbiAgICAgICAgICAgICAgICBpZiAobmF0aXZlUmFuZ2UgPT0gbnVsbCkgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgdmFyIHJhbmdlID0gdGhpcy5ub3JtYWxpemVOYXRpdmUobmF0aXZlUmFuZ2UpO1xuICAgICAgICAgICAgICAgIGRlYnVnLmluZm8oJ2dldE5hdGl2ZVJhbmdlJywgcmFuZ2UpO1xuICAgICAgICAgICAgICAgIHJldHVybiByYW5nZTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2dldFJhbmdlJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGdldFJhbmdlKCkge1xuICAgICAgICAgICAgICAgIHZhciBub3JtYWxpemVkID0gdGhpcy5nZXROYXRpdmVSYW5nZSgpO1xuICAgICAgICAgICAgICAgIGlmIChub3JtYWxpemVkID09IG51bGwpIHJldHVybiBbbnVsbCwgbnVsbF07XG4gICAgICAgICAgICAgICAgdmFyIHJhbmdlID0gdGhpcy5ub3JtYWxpemVkVG9SYW5nZShub3JtYWxpemVkKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gW3JhbmdlLCBub3JtYWxpemVkXTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2hhc0ZvY3VzJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGhhc0ZvY3VzKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBkb2N1bWVudC5hY3RpdmVFbGVtZW50ID09PSB0aGlzLnJvb3Q7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdub3JtYWxpemVkVG9SYW5nZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBub3JtYWxpemVkVG9SYW5nZShyYW5nZSkge1xuICAgICAgICAgICAgICAgIHZhciBfdGhpczQgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgdmFyIHBvc2l0aW9ucyA9IFtbcmFuZ2Uuc3RhcnQubm9kZSwgcmFuZ2Uuc3RhcnQub2Zmc2V0XV07XG4gICAgICAgICAgICAgICAgaWYgKCFyYW5nZS5uYXRpdmUuY29sbGFwc2VkKSB7XG4gICAgICAgICAgICAgICAgICBwb3NpdGlvbnMucHVzaChbcmFuZ2UuZW5kLm5vZGUsIHJhbmdlLmVuZC5vZmZzZXRdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIGluZGV4ZXMgPSBwb3NpdGlvbnMubWFwKGZ1bmN0aW9uIChwb3NpdGlvbikge1xuICAgICAgICAgICAgICAgICAgdmFyIF9wb3NpdGlvbiA9IF9zbGljZWRUb0FycmF5KHBvc2l0aW9uLCAyKSxcbiAgICAgICAgICAgICAgICAgICAgbm9kZSA9IF9wb3NpdGlvblswXSxcbiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0ID0gX3Bvc2l0aW9uWzFdO1xuXG4gICAgICAgICAgICAgICAgICB2YXIgYmxvdCA9IF9wYXJjaG1lbnQyLmRlZmF1bHQuZmluZChub2RlLCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgIHZhciBpbmRleCA9IGJsb3Qub2Zmc2V0KF90aGlzNC5zY3JvbGwpO1xuICAgICAgICAgICAgICAgICAgaWYgKG9mZnNldCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaW5kZXg7XG4gICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGJsb3QgaW5zdGFuY2VvZiBfcGFyY2htZW50Mi5kZWZhdWx0LkNvbnRhaW5lcikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaW5kZXggKyBibG90Lmxlbmd0aCgpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGluZGV4ICsgYmxvdC5pbmRleChub2RlLCBvZmZzZXQpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHZhciBlbmQgPSBNYXRoLm1pbihcbiAgICAgICAgICAgICAgICAgIE1hdGgubWF4LmFwcGx5KE1hdGgsIF90b0NvbnN1bWFibGVBcnJheShpbmRleGVzKSksXG4gICAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbC5sZW5ndGgoKSAtIDEsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB2YXIgc3RhcnQgPSBNYXRoLm1pbi5hcHBseShcbiAgICAgICAgICAgICAgICAgIE1hdGgsXG4gICAgICAgICAgICAgICAgICBbZW5kXS5jb25jYXQoX3RvQ29uc3VtYWJsZUFycmF5KGluZGV4ZXMpKSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgUmFuZ2Uoc3RhcnQsIGVuZCAtIHN0YXJ0KTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ25vcm1hbGl6ZU5hdGl2ZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBub3JtYWxpemVOYXRpdmUobmF0aXZlUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAhY29udGFpbnModGhpcy5yb290LCBuYXRpdmVSYW5nZS5zdGFydENvbnRhaW5lcikgfHxcbiAgICAgICAgICAgICAgICAgICghbmF0aXZlUmFuZ2UuY29sbGFwc2VkICYmXG4gICAgICAgICAgICAgICAgICAgICFjb250YWlucyh0aGlzLnJvb3QsIG5hdGl2ZVJhbmdlLmVuZENvbnRhaW5lcikpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIHJhbmdlID0ge1xuICAgICAgICAgICAgICAgICAgc3RhcnQ6IHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZTogbmF0aXZlUmFuZ2Uuc3RhcnRDb250YWluZXIsXG4gICAgICAgICAgICAgICAgICAgIG9mZnNldDogbmF0aXZlUmFuZ2Uuc3RhcnRPZmZzZXQsXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgZW5kOiB7XG4gICAgICAgICAgICAgICAgICAgIG5vZGU6IG5hdGl2ZVJhbmdlLmVuZENvbnRhaW5lcixcbiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0OiBuYXRpdmVSYW5nZS5lbmRPZmZzZXQsXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgbmF0aXZlOiBuYXRpdmVSYW5nZSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFtyYW5nZS5zdGFydCwgcmFuZ2UuZW5kXS5mb3JFYWNoKGZ1bmN0aW9uIChwb3NpdGlvbikge1xuICAgICAgICAgICAgICAgICAgdmFyIG5vZGUgPSBwb3NpdGlvbi5ub2RlLFxuICAgICAgICAgICAgICAgICAgICBvZmZzZXQgPSBwb3NpdGlvbi5vZmZzZXQ7XG4gICAgICAgICAgICAgICAgICB3aGlsZSAoXG4gICAgICAgICAgICAgICAgICAgICEobm9kZSBpbnN0YW5jZW9mIFRleHQpICYmXG4gICAgICAgICAgICAgICAgICAgIG5vZGUuY2hpbGROb2Rlcy5sZW5ndGggPiAwXG4gICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGUuY2hpbGROb2Rlcy5sZW5ndGggPiBvZmZzZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICBub2RlID0gbm9kZS5jaGlsZE5vZGVzW29mZnNldF07XG4gICAgICAgICAgICAgICAgICAgICAgb2Zmc2V0ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChub2RlLmNoaWxkTm9kZXMubGVuZ3RoID09PSBvZmZzZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICBub2RlID0gbm9kZS5sYXN0Q2hpbGQ7XG4gICAgICAgICAgICAgICAgICAgICAgb2Zmc2V0ID1cbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUgaW5zdGFuY2VvZiBUZXh0XG4gICAgICAgICAgICAgICAgICAgICAgICAgID8gbm9kZS5kYXRhLmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICA6IG5vZGUuY2hpbGROb2Rlcy5sZW5ndGggKyAxO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAocG9zaXRpb24ubm9kZSA9IG5vZGUpLCAocG9zaXRpb24ub2Zmc2V0ID0gb2Zmc2V0KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmFuZ2U7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdyYW5nZVRvTmF0aXZlJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHJhbmdlVG9OYXRpdmUocmFuZ2UpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXM1ID0gdGhpcztcblxuICAgICAgICAgICAgICAgIHZhciBpbmRleGVzID0gcmFuZ2UuY29sbGFwc2VkXG4gICAgICAgICAgICAgICAgICA/IFtyYW5nZS5pbmRleF1cbiAgICAgICAgICAgICAgICAgIDogW3JhbmdlLmluZGV4LCByYW5nZS5pbmRleCArIHJhbmdlLmxlbmd0aF07XG4gICAgICAgICAgICAgICAgdmFyIGFyZ3MgPSBbXTtcbiAgICAgICAgICAgICAgICB2YXIgc2Nyb2xsTGVuZ3RoID0gdGhpcy5zY3JvbGwubGVuZ3RoKCk7XG4gICAgICAgICAgICAgICAgaW5kZXhlcy5mb3JFYWNoKGZ1bmN0aW9uIChpbmRleCwgaSkge1xuICAgICAgICAgICAgICAgICAgaW5kZXggPSBNYXRoLm1pbihzY3JvbGxMZW5ndGggLSAxLCBpbmRleCk7XG4gICAgICAgICAgICAgICAgICB2YXIgbm9kZSA9IHZvaWQgMCxcbiAgICAgICAgICAgICAgICAgICAgX3Njcm9sbCRsZWFmNSA9IF90aGlzNS5zY3JvbGwubGVhZihpbmRleCksXG4gICAgICAgICAgICAgICAgICAgIF9zY3JvbGwkbGVhZjYgPSBfc2xpY2VkVG9BcnJheShfc2Nyb2xsJGxlYWY1LCAyKSxcbiAgICAgICAgICAgICAgICAgICAgbGVhZiA9IF9zY3JvbGwkbGVhZjZbMF0sXG4gICAgICAgICAgICAgICAgICAgIG9mZnNldCA9IF9zY3JvbGwkbGVhZjZbMV07XG4gICAgICAgICAgICAgICAgICB2YXIgX2xlYWYkcG9zaXRpb241ID0gbGVhZi5wb3NpdGlvbihvZmZzZXQsIGkgIT09IDApO1xuXG4gICAgICAgICAgICAgICAgICB2YXIgX2xlYWYkcG9zaXRpb242ID0gX3NsaWNlZFRvQXJyYXkoX2xlYWYkcG9zaXRpb241LCAyKTtcblxuICAgICAgICAgICAgICAgICAgbm9kZSA9IF9sZWFmJHBvc2l0aW9uNlswXTtcbiAgICAgICAgICAgICAgICAgIG9mZnNldCA9IF9sZWFmJHBvc2l0aW9uNlsxXTtcblxuICAgICAgICAgICAgICAgICAgYXJncy5wdXNoKG5vZGUsIG9mZnNldCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgaWYgKGFyZ3MubGVuZ3RoIDwgMikge1xuICAgICAgICAgICAgICAgICAgYXJncyA9IGFyZ3MuY29uY2F0KGFyZ3MpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gYXJncztcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3Njcm9sbEludG9WaWV3JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHNjcm9sbEludG9WaWV3KHNjcm9sbGluZ0NvbnRhaW5lcikge1xuICAgICAgICAgICAgICAgIHZhciByYW5nZSA9IHRoaXMubGFzdFJhbmdlO1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZSA9PSBudWxsKSByZXR1cm47XG4gICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IHRoaXMuZ2V0Qm91bmRzKHJhbmdlLmluZGV4LCByYW5nZS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIGlmIChib3VuZHMgPT0gbnVsbCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIHZhciBsaW1pdCA9IHRoaXMuc2Nyb2xsLmxlbmd0aCgpIC0gMTtcblxuICAgICAgICAgICAgICAgIHZhciBfc2Nyb2xsJGxpbmUgPSB0aGlzLnNjcm9sbC5saW5lKFxuICAgICAgICAgICAgICAgICAgICBNYXRoLm1pbihyYW5nZS5pbmRleCwgbGltaXQpLFxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIF9zY3JvbGwkbGluZTIgPSBfc2xpY2VkVG9BcnJheShfc2Nyb2xsJGxpbmUsIDEpLFxuICAgICAgICAgICAgICAgICAgZmlyc3QgPSBfc2Nyb2xsJGxpbmUyWzBdO1xuXG4gICAgICAgICAgICAgICAgdmFyIGxhc3QgPSBmaXJzdDtcbiAgICAgICAgICAgICAgICBpZiAocmFuZ2UubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgdmFyIF9zY3JvbGwkbGluZTMgPSB0aGlzLnNjcm9sbC5saW5lKFxuICAgICAgICAgICAgICAgICAgICBNYXRoLm1pbihyYW5nZS5pbmRleCArIHJhbmdlLmxlbmd0aCwgbGltaXQpLFxuICAgICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgICAgdmFyIF9zY3JvbGwkbGluZTQgPSBfc2xpY2VkVG9BcnJheShfc2Nyb2xsJGxpbmUzLCAxKTtcblxuICAgICAgICAgICAgICAgICAgbGFzdCA9IF9zY3JvbGwkbGluZTRbMF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChmaXJzdCA9PSBudWxsIHx8IGxhc3QgPT0gbnVsbCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIHZhciBzY3JvbGxCb3VuZHMgPSBzY3JvbGxpbmdDb250YWluZXIuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XG4gICAgICAgICAgICAgICAgaWYgKGJvdW5kcy50b3AgPCBzY3JvbGxCb3VuZHMudG9wKSB7XG4gICAgICAgICAgICAgICAgICBzY3JvbGxpbmdDb250YWluZXIuc2Nyb2xsVG9wIC09IHNjcm9sbEJvdW5kcy50b3AgLSBib3VuZHMudG9wO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYm91bmRzLmJvdHRvbSA+IHNjcm9sbEJvdW5kcy5ib3R0b20pIHtcbiAgICAgICAgICAgICAgICAgIHNjcm9sbGluZ0NvbnRhaW5lci5zY3JvbGxUb3AgKz1cbiAgICAgICAgICAgICAgICAgICAgYm91bmRzLmJvdHRvbSAtIHNjcm9sbEJvdW5kcy5ib3R0b207XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnc2V0TmF0aXZlUmFuZ2UnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gc2V0TmF0aXZlUmFuZ2Uoc3RhcnROb2RlLCBzdGFydE9mZnNldCkge1xuICAgICAgICAgICAgICAgIHZhciBlbmROb2RlID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAyICYmIGFyZ3VtZW50c1syXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzJdXG4gICAgICAgICAgICAgICAgICAgIDogc3RhcnROb2RlO1xuICAgICAgICAgICAgICAgIHZhciBlbmRPZmZzZXQgPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDMgJiYgYXJndW1lbnRzWzNdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbM11cbiAgICAgICAgICAgICAgICAgICAgOiBzdGFydE9mZnNldDtcbiAgICAgICAgICAgICAgICB2YXIgZm9yY2UgPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDQgJiYgYXJndW1lbnRzWzRdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbNF1cbiAgICAgICAgICAgICAgICAgICAgOiBmYWxzZTtcblxuICAgICAgICAgICAgICAgIGRlYnVnLmluZm8oXG4gICAgICAgICAgICAgICAgICAnc2V0TmF0aXZlUmFuZ2UnLFxuICAgICAgICAgICAgICAgICAgc3RhcnROb2RlLFxuICAgICAgICAgICAgICAgICAgc3RhcnRPZmZzZXQsXG4gICAgICAgICAgICAgICAgICBlbmROb2RlLFxuICAgICAgICAgICAgICAgICAgZW5kT2Zmc2V0LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgc3RhcnROb2RlICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICAgICh0aGlzLnJvb3QucGFyZW50Tm9kZSA9PSBudWxsIHx8XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0Tm9kZS5wYXJlbnROb2RlID09IG51bGwgfHxcbiAgICAgICAgICAgICAgICAgICAgZW5kTm9kZS5wYXJlbnROb2RlID09IG51bGwpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBzZWxlY3Rpb24gPSBkb2N1bWVudC5nZXRTZWxlY3Rpb24oKTtcbiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0aW9uID09IG51bGwpIHJldHVybjtcbiAgICAgICAgICAgICAgICBpZiAoc3RhcnROb2RlICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5oYXNGb2N1cygpKSB0aGlzLnJvb3QuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICAgIHZhciBuYXRpdmUgPSAodGhpcy5nZXROYXRpdmVSYW5nZSgpIHx8IHt9KS5uYXRpdmU7XG4gICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIG5hdGl2ZSA9PSBudWxsIHx8XG4gICAgICAgICAgICAgICAgICAgIGZvcmNlIHx8XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0Tm9kZSAhPT0gbmF0aXZlLnN0YXJ0Q29udGFpbmVyIHx8XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0T2Zmc2V0ICE9PSBuYXRpdmUuc3RhcnRPZmZzZXQgfHxcbiAgICAgICAgICAgICAgICAgICAgZW5kTm9kZSAhPT0gbmF0aXZlLmVuZENvbnRhaW5lciB8fFxuICAgICAgICAgICAgICAgICAgICBlbmRPZmZzZXQgIT09IG5hdGl2ZS5lbmRPZmZzZXRcbiAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RhcnROb2RlLnRhZ05hbWUgPT0gJ0JSJykge1xuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0T2Zmc2V0ID0gW10uaW5kZXhPZi5jYWxsKFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnROb2RlLnBhcmVudE5vZGUuY2hpbGROb2RlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0Tm9kZSxcbiAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0Tm9kZSA9IHN0YXJ0Tm9kZS5wYXJlbnROb2RlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChlbmROb2RlLnRhZ05hbWUgPT0gJ0JSJykge1xuICAgICAgICAgICAgICAgICAgICAgIGVuZE9mZnNldCA9IFtdLmluZGV4T2YuY2FsbChcbiAgICAgICAgICAgICAgICAgICAgICAgIGVuZE5vZGUucGFyZW50Tm9kZS5jaGlsZE5vZGVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgZW5kTm9kZSxcbiAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgIGVuZE5vZGUgPSBlbmROb2RlLnBhcmVudE5vZGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdmFyIHJhbmdlID0gZG9jdW1lbnQuY3JlYXRlUmFuZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2Uuc2V0U3RhcnQoc3RhcnROb2RlLCBzdGFydE9mZnNldCk7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLnNldEVuZChlbmROb2RlLCBlbmRPZmZzZXQpO1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb24ucmVtb3ZlQWxsUmFuZ2VzKCk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5hZGRSYW5nZShyYW5nZSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5yZW1vdmVBbGxSYW5nZXMoKTtcbiAgICAgICAgICAgICAgICAgIHRoaXMucm9vdC5ibHVyKCk7XG4gICAgICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5LmZvY3VzKCk7IC8vIHJvb3QuYmx1cigpIG5vdCBlbm91Z2ggb24gSUUxMStUcmF2aXMrU2F1Y2VMYWJzIChidXQgbm90IGxvY2FsIFZNcylcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdzZXRSYW5nZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBzZXRSYW5nZShyYW5nZSkge1xuICAgICAgICAgICAgICAgIHZhciBmb3JjZSA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMSAmJiBhcmd1bWVudHNbMV0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1sxXVxuICAgICAgICAgICAgICAgICAgICA6IGZhbHNlO1xuICAgICAgICAgICAgICAgIHZhciBzb3VyY2UgPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDIgJiYgYXJndW1lbnRzWzJdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMl1cbiAgICAgICAgICAgICAgICAgICAgOiBfZW1pdHRlcjQuZGVmYXVsdC5zb3VyY2VzLkFQSTtcblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZm9yY2UgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICBzb3VyY2UgPSBmb3JjZTtcbiAgICAgICAgICAgICAgICAgIGZvcmNlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRlYnVnLmluZm8oJ3NldFJhbmdlJywgcmFuZ2UpO1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgYXJncyA9IHRoaXMucmFuZ2VUb05hdGl2ZShyYW5nZSk7XG4gICAgICAgICAgICAgICAgICB0aGlzLnNldE5hdGl2ZVJhbmdlLmFwcGx5KFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgICBfdG9Db25zdW1hYmxlQXJyYXkoYXJncykuY29uY2F0KFtmb3JjZV0pLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgdGhpcy5zZXROYXRpdmVSYW5nZShudWxsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy51cGRhdGUoc291cmNlKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3VwZGF0ZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiB1cGRhdGUoKSB7XG4gICAgICAgICAgICAgICAgdmFyIHNvdXJjZSA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMCAmJiBhcmd1bWVudHNbMF0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1swXVxuICAgICAgICAgICAgICAgICAgICA6IF9lbWl0dGVyNC5kZWZhdWx0LnNvdXJjZXMuVVNFUjtcblxuICAgICAgICAgICAgICAgIHZhciBvbGRSYW5nZSA9IHRoaXMubGFzdFJhbmdlO1xuXG4gICAgICAgICAgICAgICAgdmFyIF9nZXRSYW5nZSA9IHRoaXMuZ2V0UmFuZ2UoKSxcbiAgICAgICAgICAgICAgICAgIF9nZXRSYW5nZTIgPSBfc2xpY2VkVG9BcnJheShfZ2V0UmFuZ2UsIDIpLFxuICAgICAgICAgICAgICAgICAgbGFzdFJhbmdlID0gX2dldFJhbmdlMlswXSxcbiAgICAgICAgICAgICAgICAgIG5hdGl2ZVJhbmdlID0gX2dldFJhbmdlMlsxXTtcblxuICAgICAgICAgICAgICAgIHRoaXMubGFzdFJhbmdlID0gbGFzdFJhbmdlO1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmxhc3RSYW5nZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLnNhdmVkUmFuZ2UgPSB0aGlzLmxhc3RSYW5nZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCEoMCwgX2RlZXBFcXVhbDIuZGVmYXVsdCkob2xkUmFuZ2UsIHRoaXMubGFzdFJhbmdlKSkge1xuICAgICAgICAgICAgICAgICAgdmFyIF9lbWl0dGVyO1xuXG4gICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICF0aGlzLmNvbXBvc2luZyAmJlxuICAgICAgICAgICAgICAgICAgICBuYXRpdmVSYW5nZSAhPSBudWxsICYmXG4gICAgICAgICAgICAgICAgICAgIG5hdGl2ZVJhbmdlLm5hdGl2ZS5jb2xsYXBzZWQgJiZcbiAgICAgICAgICAgICAgICAgICAgbmF0aXZlUmFuZ2Uuc3RhcnQubm9kZSAhPT0gdGhpcy5jdXJzb3IudGV4dE5vZGVcbiAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnNvci5yZXN0b3JlKCk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB2YXIgYXJncyA9IFtcbiAgICAgICAgICAgICAgICAgICAgX2VtaXR0ZXI0LmRlZmF1bHQuZXZlbnRzLlNFTEVDVElPTl9DSEFOR0UsXG4gICAgICAgICAgICAgICAgICAgICgwLCBfY2xvbmUyLmRlZmF1bHQpKHRoaXMubGFzdFJhbmdlKSxcbiAgICAgICAgICAgICAgICAgICAgKDAsIF9jbG9uZTIuZGVmYXVsdCkob2xkUmFuZ2UpLFxuICAgICAgICAgICAgICAgICAgICBzb3VyY2UsXG4gICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgICAgKF9lbWl0dGVyID0gdGhpcy5lbWl0dGVyKS5lbWl0LmFwcGx5KFxuICAgICAgICAgICAgICAgICAgICBfZW1pdHRlcixcbiAgICAgICAgICAgICAgICAgICAgW19lbWl0dGVyNC5kZWZhdWx0LmV2ZW50cy5FRElUT1JfQ0hBTkdFXS5jb25jYXQoYXJncyksXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgaWYgKHNvdXJjZSAhPT0gX2VtaXR0ZXI0LmRlZmF1bHQuc291cmNlcy5TSUxFTlQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIF9lbWl0dGVyMjtcblxuICAgICAgICAgICAgICAgICAgICAoX2VtaXR0ZXIyID0gdGhpcy5lbWl0dGVyKS5lbWl0LmFwcGx5KF9lbWl0dGVyMiwgYXJncyk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIHJldHVybiBTZWxlY3Rpb247XG4gICAgICAgIH0pKCk7XG5cbiAgICAgICAgZnVuY3Rpb24gY29udGFpbnMocGFyZW50LCBkZXNjZW5kYW50KSB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIC8vIEZpcmVmb3ggaW5zZXJ0cyBpbmFjY2Vzc2libGUgbm9kZXMgYXJvdW5kIHZpZGVvIGVsZW1lbnRzXG4gICAgICAgICAgICBkZXNjZW5kYW50LnBhcmVudE5vZGU7XG4gICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLyBJRTExIGhhcyBidWcgd2l0aCBUZXh0IG5vZGVzXG4gICAgICAgICAgLy8gaHR0cHM6Ly9jb25uZWN0Lm1pY3Jvc29mdC5jb20vSUUvZmVlZGJhY2svZGV0YWlscy83ODA4NzQvbm9kZS1jb250YWlucy1pcy1pbmNvcnJlY3RcbiAgICAgICAgICBpZiAoZGVzY2VuZGFudCBpbnN0YW5jZW9mIFRleHQpIHtcbiAgICAgICAgICAgIGRlc2NlbmRhbnQgPSBkZXNjZW5kYW50LnBhcmVudE5vZGU7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBwYXJlbnQuY29udGFpbnMoZGVzY2VuZGFudCk7XG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cywgc3RhdGljUHJvcHMpIHtcbiAgICAgICAgICAgIGlmIChwcm90b1Byb3BzKSBkZWZpbmVQcm9wZXJ0aWVzKENvbnN0cnVjdG9yLnByb3RvdHlwZSwgcHJvdG9Qcm9wcyk7XG4gICAgICAgICAgICBpZiAoc3RhdGljUHJvcHMpIGRlZmluZVByb3BlcnRpZXMoQ29uc3RydWN0b3IsIHN0YXRpY1Byb3BzKTtcbiAgICAgICAgICAgIHJldHVybiBDb25zdHJ1Y3RvcjtcbiAgICAgICAgICB9O1xuICAgICAgICB9KSgpO1xuXG4gICAgICAgIHZhciBfZ2V0ID0gZnVuY3Rpb24gZ2V0KG9iamVjdCwgcHJvcGVydHksIHJlY2VpdmVyKSB7XG4gICAgICAgICAgaWYgKG9iamVjdCA9PT0gbnVsbCkgb2JqZWN0ID0gRnVuY3Rpb24ucHJvdG90eXBlO1xuICAgICAgICAgIHZhciBkZXNjID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihvYmplY3QsIHByb3BlcnR5KTtcbiAgICAgICAgICBpZiAoZGVzYyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB2YXIgcGFyZW50ID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKG9iamVjdCk7XG4gICAgICAgICAgICBpZiAocGFyZW50ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gZ2V0KHBhcmVudCwgcHJvcGVydHksIHJlY2VpdmVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKCd2YWx1ZScgaW4gZGVzYykge1xuICAgICAgICAgICAgcmV0dXJuIGRlc2MudmFsdWU7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBnZXR0ZXIgPSBkZXNjLmdldDtcbiAgICAgICAgICAgIGlmIChnZXR0ZXIgPT09IHV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gICAgICAgICAodHlwZW9mIGNhbGwgPT09ICdvYmplY3QnIHx8IHR5cGVvZiBjYWxsID09PSAnZnVuY3Rpb24nKVxuICAgICAgICAgICAgPyBjYWxsXG4gICAgICAgICAgICA6IHNlbGY7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfaW5oZXJpdHMoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpIHtcbiAgICAgICAgICBpZiAodHlwZW9mIHN1cGVyQ2xhc3MgIT09ICdmdW5jdGlvbicgJiYgc3VwZXJDbGFzcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgJ1N1cGVyIGV4cHJlc3Npb24gbXVzdCBlaXRoZXIgYmUgbnVsbCBvciBhIGZ1bmN0aW9uLCBub3QgJyArXG4gICAgICAgICAgICAgICAgdHlwZW9mIHN1cGVyQ2xhc3MsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBzdWJDbGFzcy5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKFxuICAgICAgICAgICAgc3VwZXJDbGFzcyAmJiBzdXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBCcmVhayA9IChmdW5jdGlvbiAoX1BhcmNobWVudCRFbWJlZCkge1xuICAgICAgICAgIF9pbmhlcml0cyhCcmVhaywgX1BhcmNobWVudCRFbWJlZCk7XG5cbiAgICAgICAgICBmdW5jdGlvbiBCcmVhaygpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBCcmVhayk7XG5cbiAgICAgICAgICAgIHJldHVybiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKEJyZWFrLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQnJlYWspKS5hcHBseShcbiAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgIGFyZ3VtZW50cyxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKFxuICAgICAgICAgICAgQnJlYWssXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdpbnNlcnRJbnRvJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gaW5zZXJ0SW50byhwYXJlbnQsIHJlZikge1xuICAgICAgICAgICAgICAgICAgaWYgKHBhcmVudC5jaGlsZHJlbi5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgICAgICBCcmVhay5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQnJlYWsucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICAgICAnaW5zZXJ0SW50bycsXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIHBhcmVudCwgcmVmKTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlKCk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGtleTogJ2xlbmd0aCcsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGxlbmd0aCgpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICd2YWx1ZScsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHZhbHVlKCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuICcnO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAndmFsdWUnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiB2YWx1ZSgpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIHJldHVybiBCcmVhaztcbiAgICAgICAgfSkoX3BhcmNobWVudDIuZGVmYXVsdC5FbWJlZCk7XG5cbiAgICAgICAgQnJlYWsuYmxvdE5hbWUgPSAnYnJlYWsnO1xuICAgICAgICBCcmVhay50YWdOYW1lID0gJ0JSJztcblxuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBCcmVhaztcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDE3ICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICB2YXIgX19leHRlbmRzID1cbiAgICAgICAgICAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHxcbiAgICAgICAgICAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGV4dGVuZFN0YXRpY3MgPVxuICAgICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgICAgICAgKHtfX3Byb3RvX186IFtdfSBpbnN0YW5jZW9mIEFycmF5ICYmXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgICAgICAgICAgIGQuX19wcm90b19fID0gYjtcbiAgICAgICAgICAgICAgICB9KSB8fFxuICAgICAgICAgICAgICBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIHAgaW4gYikgaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdO1xuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICAgIGV4dGVuZFN0YXRpY3MoZCwgYik7XG4gICAgICAgICAgICAgIGZ1bmN0aW9uIF9fKCkge1xuICAgICAgICAgICAgICAgIHRoaXMuY29uc3RydWN0b3IgPSBkO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGQucHJvdG90eXBlID1cbiAgICAgICAgICAgICAgICBiID09PSBudWxsXG4gICAgICAgICAgICAgICAgICA/IE9iamVjdC5jcmVhdGUoYilcbiAgICAgICAgICAgICAgICAgIDogKChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSksIG5ldyBfXygpKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfSkoKTtcbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge3ZhbHVlOiB0cnVlfSk7XG4gICAgICAgIHZhciBsaW5rZWRfbGlzdF8xID0gX193ZWJwYWNrX3JlcXVpcmVfXyg0NCk7XG4gICAgICAgIHZhciBzaGFkb3dfMSA9IF9fd2VicGFja19yZXF1aXJlX18oMzApO1xuICAgICAgICB2YXIgUmVnaXN0cnkgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDEpO1xuICAgICAgICB2YXIgQ29udGFpbmVyQmxvdCA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICAgICAgICBfX2V4dGVuZHMoQ29udGFpbmVyQmxvdCwgX3N1cGVyKTtcbiAgICAgICAgICBmdW5jdGlvbiBDb250YWluZXJCbG90KGRvbU5vZGUpIHtcbiAgICAgICAgICAgIHZhciBfdGhpcyA9IF9zdXBlci5jYWxsKHRoaXMsIGRvbU5vZGUpIHx8IHRoaXM7XG4gICAgICAgICAgICBfdGhpcy5idWlsZCgpO1xuICAgICAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgICAgICAgIH1cbiAgICAgICAgICBDb250YWluZXJCbG90LnByb3RvdHlwZS5hcHBlbmRDaGlsZCA9IGZ1bmN0aW9uIChvdGhlcikge1xuICAgICAgICAgICAgdGhpcy5pbnNlcnRCZWZvcmUob3RoZXIpO1xuICAgICAgICAgIH07XG4gICAgICAgICAgQ29udGFpbmVyQmxvdC5wcm90b3R5cGUuYXR0YWNoID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5hdHRhY2guY2FsbCh0aGlzKTtcbiAgICAgICAgICAgIHRoaXMuY2hpbGRyZW4uZm9yRWFjaChmdW5jdGlvbiAoY2hpbGQpIHtcbiAgICAgICAgICAgICAgY2hpbGQuYXR0YWNoKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIENvbnRhaW5lckJsb3QucHJvdG90eXBlLmJ1aWxkID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIHRoaXMuY2hpbGRyZW4gPSBuZXcgbGlua2VkX2xpc3RfMS5kZWZhdWx0KCk7XG4gICAgICAgICAgICAvLyBOZWVkIHRvIGJlIHJldmVyc2VkIGZvciBpZiBET00gbm9kZXMgYWxyZWFkeSBpbiBvcmRlclxuICAgICAgICAgICAgW10uc2xpY2VcbiAgICAgICAgICAgICAgLmNhbGwodGhpcy5kb21Ob2RlLmNoaWxkTm9kZXMpXG4gICAgICAgICAgICAgIC5yZXZlcnNlKClcbiAgICAgICAgICAgICAgLmZvckVhY2goZnVuY3Rpb24gKG5vZGUpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkID0gbWFrZUJsb3Qobm9kZSk7XG4gICAgICAgICAgICAgICAgICBfdGhpcy5pbnNlcnRCZWZvcmUoY2hpbGQsIF90aGlzLmNoaWxkcmVuLmhlYWQgfHwgdW5kZWZpbmVkKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgIGlmIChlcnIgaW5zdGFuY2VvZiBSZWdpc3RyeS5QYXJjaG1lbnRFcnJvcikgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgZWxzZSB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIENvbnRhaW5lckJsb3QucHJvdG90eXBlLmRlbGV0ZUF0ID0gZnVuY3Rpb24gKGluZGV4LCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGlmIChpbmRleCA9PT0gMCAmJiBsZW5ndGggPT09IHRoaXMubGVuZ3RoKCkpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVtb3ZlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmNoaWxkcmVuLmZvckVhY2hBdChcbiAgICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICAgIGxlbmd0aCxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKGNoaWxkLCBvZmZzZXQsIGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGNoaWxkLmRlbGV0ZUF0KG9mZnNldCwgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBDb250YWluZXJCbG90LnByb3RvdHlwZS5kZXNjZW5kYW50ID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBpbmRleCkge1xuICAgICAgICAgICAgdmFyIF9hID0gdGhpcy5jaGlsZHJlbi5maW5kKGluZGV4KSxcbiAgICAgICAgICAgICAgY2hpbGQgPSBfYVswXSxcbiAgICAgICAgICAgICAgb2Zmc2V0ID0gX2FbMV07XG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgIChjcml0ZXJpYS5ibG90TmFtZSA9PSBudWxsICYmIGNyaXRlcmlhKGNoaWxkKSkgfHxcbiAgICAgICAgICAgICAgKGNyaXRlcmlhLmJsb3ROYW1lICE9IG51bGwgJiYgY2hpbGQgaW5zdGFuY2VvZiBjcml0ZXJpYSlcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICByZXR1cm4gW2NoaWxkLCBvZmZzZXRdO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaGlsZCBpbnN0YW5jZW9mIENvbnRhaW5lckJsb3QpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkLmRlc2NlbmRhbnQoY3JpdGVyaWEsIG9mZnNldCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gW251bGwsIC0xXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIENvbnRhaW5lckJsb3QucHJvdG90eXBlLmRlc2NlbmRhbnRzID0gZnVuY3Rpb24gKFxuICAgICAgICAgICAgY3JpdGVyaWEsXG4gICAgICAgICAgICBpbmRleCxcbiAgICAgICAgICAgIGxlbmd0aCxcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIGlmIChpbmRleCA9PT0gdm9pZCAwKSB7XG4gICAgICAgICAgICAgIGluZGV4ID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChsZW5ndGggPT09IHZvaWQgMCkge1xuICAgICAgICAgICAgICBsZW5ndGggPSBOdW1iZXIuTUFYX1ZBTFVFO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGRlc2NlbmRhbnRzID0gW107XG4gICAgICAgICAgICB2YXIgbGVuZ3RoTGVmdCA9IGxlbmd0aDtcbiAgICAgICAgICAgIHRoaXMuY2hpbGRyZW4uZm9yRWFjaEF0KFxuICAgICAgICAgICAgICBpbmRleCxcbiAgICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgICBmdW5jdGlvbiAoY2hpbGQsIGluZGV4LCBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAoY3JpdGVyaWEuYmxvdE5hbWUgPT0gbnVsbCAmJiBjcml0ZXJpYShjaGlsZCkpIHx8XG4gICAgICAgICAgICAgICAgICAoY3JpdGVyaWEuYmxvdE5hbWUgIT0gbnVsbCAmJiBjaGlsZCBpbnN0YW5jZW9mIGNyaXRlcmlhKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVzY2VuZGFudHMucHVzaChjaGlsZCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjaGlsZCBpbnN0YW5jZW9mIENvbnRhaW5lckJsb3QpIHtcbiAgICAgICAgICAgICAgICAgIGRlc2NlbmRhbnRzID0gZGVzY2VuZGFudHMuY29uY2F0KFxuICAgICAgICAgICAgICAgICAgICBjaGlsZC5kZXNjZW5kYW50cyhjcml0ZXJpYSwgaW5kZXgsIGxlbmd0aExlZnQpLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGVuZ3RoTGVmdCAtPSBsZW5ndGg7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgcmV0dXJuIGRlc2NlbmRhbnRzO1xuICAgICAgICAgIH07XG4gICAgICAgICAgQ29udGFpbmVyQmxvdC5wcm90b3R5cGUuZGV0YWNoID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy5jaGlsZHJlbi5mb3JFYWNoKGZ1bmN0aW9uIChjaGlsZCkge1xuICAgICAgICAgICAgICBjaGlsZC5kZXRhY2goKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5kZXRhY2guY2FsbCh0aGlzKTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIENvbnRhaW5lckJsb3QucHJvdG90eXBlLmZvcm1hdEF0ID0gZnVuY3Rpb24gKFxuICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICBsZW5ndGgsXG4gICAgICAgICAgICBuYW1lLFxuICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICB0aGlzLmNoaWxkcmVuLmZvckVhY2hBdChcbiAgICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICAgIGxlbmd0aCxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKGNoaWxkLCBvZmZzZXQsIGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGNoaWxkLmZvcm1hdEF0KG9mZnNldCwgbGVuZ3RoLCBuYW1lLCB2YWx1ZSk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH07XG4gICAgICAgICAgQ29udGFpbmVyQmxvdC5wcm90b3R5cGUuaW5zZXJ0QXQgPSBmdW5jdGlvbiAoaW5kZXgsIHZhbHVlLCBkZWYpIHtcbiAgICAgICAgICAgIHZhciBfYSA9IHRoaXMuY2hpbGRyZW4uZmluZChpbmRleCksXG4gICAgICAgICAgICAgIGNoaWxkID0gX2FbMF0sXG4gICAgICAgICAgICAgIG9mZnNldCA9IF9hWzFdO1xuICAgICAgICAgICAgaWYgKGNoaWxkKSB7XG4gICAgICAgICAgICAgIGNoaWxkLmluc2VydEF0KG9mZnNldCwgdmFsdWUsIGRlZik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgYmxvdCA9XG4gICAgICAgICAgICAgICAgZGVmID09IG51bGxcbiAgICAgICAgICAgICAgICAgID8gUmVnaXN0cnkuY3JlYXRlKCd0ZXh0JywgdmFsdWUpXG4gICAgICAgICAgICAgICAgICA6IFJlZ2lzdHJ5LmNyZWF0ZSh2YWx1ZSwgZGVmKTtcbiAgICAgICAgICAgICAgdGhpcy5hcHBlbmRDaGlsZChibG90KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIENvbnRhaW5lckJsb3QucHJvdG90eXBlLmluc2VydEJlZm9yZSA9IGZ1bmN0aW9uIChjaGlsZEJsb3QsIHJlZkJsb3QpIHtcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgdGhpcy5zdGF0aWNzLmFsbG93ZWRDaGlsZHJlbiAhPSBudWxsICYmXG4gICAgICAgICAgICAgICF0aGlzLnN0YXRpY3MuYWxsb3dlZENoaWxkcmVuLnNvbWUoZnVuY3Rpb24gKGNoaWxkKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNoaWxkQmxvdCBpbnN0YW5jZW9mIGNoaWxkO1xuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIHRocm93IG5ldyBSZWdpc3RyeS5QYXJjaG1lbnRFcnJvcihcbiAgICAgICAgICAgICAgICAnQ2Fubm90IGluc2VydCAnICtcbiAgICAgICAgICAgICAgICAgIGNoaWxkQmxvdC5zdGF0aWNzLmJsb3ROYW1lICtcbiAgICAgICAgICAgICAgICAgICcgaW50byAnICtcbiAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdGljcy5ibG90TmFtZSxcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNoaWxkQmxvdC5pbnNlcnRJbnRvKHRoaXMsIHJlZkJsb3QpO1xuICAgICAgICAgIH07XG4gICAgICAgICAgQ29udGFpbmVyQmxvdC5wcm90b3R5cGUubGVuZ3RoID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2hpbGRyZW4ucmVkdWNlKGZ1bmN0aW9uIChtZW1vLCBjaGlsZCkge1xuICAgICAgICAgICAgICByZXR1cm4gbWVtbyArIGNoaWxkLmxlbmd0aCgpO1xuICAgICAgICAgICAgfSwgMCk7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBDb250YWluZXJCbG90LnByb3RvdHlwZS5tb3ZlQ2hpbGRyZW4gPSBmdW5jdGlvbiAoXG4gICAgICAgICAgICB0YXJnZXRQYXJlbnQsXG4gICAgICAgICAgICByZWZOb2RlLFxuICAgICAgICAgICkge1xuICAgICAgICAgICAgdGhpcy5jaGlsZHJlbi5mb3JFYWNoKGZ1bmN0aW9uIChjaGlsZCkge1xuICAgICAgICAgICAgICB0YXJnZXRQYXJlbnQuaW5zZXJ0QmVmb3JlKGNoaWxkLCByZWZOb2RlKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH07XG4gICAgICAgICAgQ29udGFpbmVyQmxvdC5wcm90b3R5cGUub3B0aW1pemUgPSBmdW5jdGlvbiAoY29udGV4dCkge1xuICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5vcHRpbWl6ZS5jYWxsKHRoaXMsIGNvbnRleHQpO1xuICAgICAgICAgICAgaWYgKHRoaXMuY2hpbGRyZW4ubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgIGlmICh0aGlzLnN0YXRpY3MuZGVmYXVsdENoaWxkICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICB2YXIgY2hpbGQgPSBSZWdpc3RyeS5jcmVhdGUodGhpcy5zdGF0aWNzLmRlZmF1bHRDaGlsZCk7XG4gICAgICAgICAgICAgICAgdGhpcy5hcHBlbmRDaGlsZChjaGlsZCk7XG4gICAgICAgICAgICAgICAgY2hpbGQub3B0aW1pemUoY29udGV4dCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW1vdmUoKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgICAgQ29udGFpbmVyQmxvdC5wcm90b3R5cGUucGF0aCA9IGZ1bmN0aW9uIChpbmRleCwgaW5jbHVzaXZlKSB7XG4gICAgICAgICAgICBpZiAoaW5jbHVzaXZlID09PSB2b2lkIDApIHtcbiAgICAgICAgICAgICAgaW5jbHVzaXZlID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgX2EgPSB0aGlzLmNoaWxkcmVuLmZpbmQoaW5kZXgsIGluY2x1c2l2ZSksXG4gICAgICAgICAgICAgIGNoaWxkID0gX2FbMF0sXG4gICAgICAgICAgICAgIG9mZnNldCA9IF9hWzFdO1xuICAgICAgICAgICAgdmFyIHBvc2l0aW9uID0gW1t0aGlzLCBpbmRleF1dO1xuICAgICAgICAgICAgaWYgKGNoaWxkIGluc3RhbmNlb2YgQ29udGFpbmVyQmxvdCkge1xuICAgICAgICAgICAgICByZXR1cm4gcG9zaXRpb24uY29uY2F0KGNoaWxkLnBhdGgob2Zmc2V0LCBpbmNsdXNpdmUpKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hpbGQgIT0gbnVsbCkge1xuICAgICAgICAgICAgICBwb3NpdGlvbi5wdXNoKFtjaGlsZCwgb2Zmc2V0XSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcG9zaXRpb247XG4gICAgICAgICAgfTtcbiAgICAgICAgICBDb250YWluZXJCbG90LnByb3RvdHlwZS5yZW1vdmVDaGlsZCA9IGZ1bmN0aW9uIChjaGlsZCkge1xuICAgICAgICAgICAgdGhpcy5jaGlsZHJlbi5yZW1vdmUoY2hpbGQpO1xuICAgICAgICAgIH07XG4gICAgICAgICAgQ29udGFpbmVyQmxvdC5wcm90b3R5cGUucmVwbGFjZSA9IGZ1bmN0aW9uICh0YXJnZXQpIHtcbiAgICAgICAgICAgIGlmICh0YXJnZXQgaW5zdGFuY2VvZiBDb250YWluZXJCbG90KSB7XG4gICAgICAgICAgICAgIHRhcmdldC5tb3ZlQ2hpbGRyZW4odGhpcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBfc3VwZXIucHJvdG90eXBlLnJlcGxhY2UuY2FsbCh0aGlzLCB0YXJnZXQpO1xuICAgICAgICAgIH07XG4gICAgICAgICAgQ29udGFpbmVyQmxvdC5wcm90b3R5cGUuc3BsaXQgPSBmdW5jdGlvbiAoaW5kZXgsIGZvcmNlKSB7XG4gICAgICAgICAgICBpZiAoZm9yY2UgPT09IHZvaWQgMCkge1xuICAgICAgICAgICAgICBmb3JjZSA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFmb3JjZSkge1xuICAgICAgICAgICAgICBpZiAoaW5kZXggPT09IDApIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgICBpZiAoaW5kZXggPT09IHRoaXMubGVuZ3RoKCkpIHJldHVybiB0aGlzLm5leHQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgYWZ0ZXIgPSB0aGlzLmNsb25lKCk7XG4gICAgICAgICAgICB0aGlzLnBhcmVudC5pbnNlcnRCZWZvcmUoYWZ0ZXIsIHRoaXMubmV4dCk7XG4gICAgICAgICAgICB0aGlzLmNoaWxkcmVuLmZvckVhY2hBdChcbiAgICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICAgIHRoaXMubGVuZ3RoKCksXG4gICAgICAgICAgICAgIGZ1bmN0aW9uIChjaGlsZCwgb2Zmc2V0LCBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjaGlsZCA9IGNoaWxkLnNwbGl0KG9mZnNldCwgZm9yY2UpO1xuICAgICAgICAgICAgICAgIGFmdGVyLmFwcGVuZENoaWxkKGNoaWxkKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICByZXR1cm4gYWZ0ZXI7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBDb250YWluZXJCbG90LnByb3RvdHlwZS51bndyYXAgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0aGlzLm1vdmVDaGlsZHJlbih0aGlzLnBhcmVudCwgdGhpcy5uZXh0KTtcbiAgICAgICAgICAgIHRoaXMucmVtb3ZlKCk7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBDb250YWluZXJCbG90LnByb3RvdHlwZS51cGRhdGUgPSBmdW5jdGlvbiAobXV0YXRpb25zLCBjb250ZXh0KSB7XG4gICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICAgICAgdmFyIGFkZGVkTm9kZXMgPSBbXTtcbiAgICAgICAgICAgIHZhciByZW1vdmVkTm9kZXMgPSBbXTtcbiAgICAgICAgICAgIG11dGF0aW9ucy5mb3JFYWNoKGZ1bmN0aW9uIChtdXRhdGlvbikge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbXV0YXRpb24udGFyZ2V0ID09PSBfdGhpcy5kb21Ob2RlICYmXG4gICAgICAgICAgICAgICAgbXV0YXRpb24udHlwZSA9PT0gJ2NoaWxkTGlzdCdcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgYWRkZWROb2Rlcy5wdXNoLmFwcGx5KGFkZGVkTm9kZXMsIG11dGF0aW9uLmFkZGVkTm9kZXMpO1xuICAgICAgICAgICAgICAgIHJlbW92ZWROb2Rlcy5wdXNoLmFwcGx5KHJlbW92ZWROb2RlcywgbXV0YXRpb24ucmVtb3ZlZE5vZGVzKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZW1vdmVkTm9kZXMuZm9yRWFjaChmdW5jdGlvbiAobm9kZSkge1xuICAgICAgICAgICAgICAvLyBDaGVjayBub2RlIGhhcyBhY3R1YWxseSBiZWVuIHJlbW92ZWRcbiAgICAgICAgICAgICAgLy8gT25lIGV4Y2VwdGlvbiBpcyBDaHJvbWUgZG9lcyBub3QgaW1tZWRpYXRlbHkgcmVtb3ZlIElGUkFNRXNcbiAgICAgICAgICAgICAgLy8gZnJvbSBET00gYnV0IE11dGF0aW9uUmVjb3JkIGlzIGNvcnJlY3QgaW4gaXRzIHJlcG9ydGVkIHJlbW92YWxcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG5vZGUucGFyZW50Tm9kZSAhPSBudWxsICYmXG4gICAgICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxuICAgICAgICAgICAgICAgIG5vZGUudGFnTmFtZSAhPT0gJ0lGUkFNRScgJiZcbiAgICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5LmNvbXBhcmVEb2N1bWVudFBvc2l0aW9uKG5vZGUpICZcbiAgICAgICAgICAgICAgICAgIE5vZGUuRE9DVU1FTlRfUE9TSVRJT05fQ09OVEFJTkVEX0JZXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB2YXIgYmxvdCA9IFJlZ2lzdHJ5LmZpbmQobm9kZSk7XG4gICAgICAgICAgICAgIGlmIChibG90ID09IG51bGwpIHJldHVybjtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIGJsb3QuZG9tTm9kZS5wYXJlbnROb2RlID09IG51bGwgfHxcbiAgICAgICAgICAgICAgICBibG90LmRvbU5vZGUucGFyZW50Tm9kZSA9PT0gX3RoaXMuZG9tTm9kZVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBibG90LmRldGFjaCgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGFkZGVkTm9kZXNcbiAgICAgICAgICAgICAgLmZpbHRlcihmdW5jdGlvbiAobm9kZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBub2RlLnBhcmVudE5vZGUgPT0gX3RoaXMuZG9tTm9kZTtcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgLnNvcnQoZnVuY3Rpb24gKGEsIGIpIHtcbiAgICAgICAgICAgICAgICBpZiAoYSA9PT0gYikgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgYS5jb21wYXJlRG9jdW1lbnRQb3NpdGlvbihiKSAmXG4gICAgICAgICAgICAgICAgICBOb2RlLkRPQ1VNRU5UX1BPU0lUSU9OX0ZPTExPV0lOR1xuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgLmZvckVhY2goZnVuY3Rpb24gKG5vZGUpIHtcbiAgICAgICAgICAgICAgICB2YXIgcmVmQmxvdCA9IG51bGw7XG4gICAgICAgICAgICAgICAgaWYgKG5vZGUubmV4dFNpYmxpbmcgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgcmVmQmxvdCA9IFJlZ2lzdHJ5LmZpbmQobm9kZS5uZXh0U2libGluZyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBibG90ID0gbWFrZUJsb3Qobm9kZSk7XG4gICAgICAgICAgICAgICAgaWYgKGJsb3QubmV4dCAhPSByZWZCbG90IHx8IGJsb3QubmV4dCA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoYmxvdC5wYXJlbnQgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBibG90LnBhcmVudC5yZW1vdmVDaGlsZChfdGhpcyk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBfdGhpcy5pbnNlcnRCZWZvcmUoYmxvdCwgcmVmQmxvdCB8fCB1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfTtcbiAgICAgICAgICByZXR1cm4gQ29udGFpbmVyQmxvdDtcbiAgICAgICAgfSkoc2hhZG93XzEuZGVmYXVsdCk7XG4gICAgICAgIGZ1bmN0aW9uIG1ha2VCbG90KG5vZGUpIHtcbiAgICAgICAgICB2YXIgYmxvdCA9IFJlZ2lzdHJ5LmZpbmQobm9kZSk7XG4gICAgICAgICAgaWYgKGJsb3QgPT0gbnVsbCkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgYmxvdCA9IFJlZ2lzdHJ5LmNyZWF0ZShub2RlKTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgYmxvdCA9IFJlZ2lzdHJ5LmNyZWF0ZShSZWdpc3RyeS5TY29wZS5JTkxJTkUpO1xuICAgICAgICAgICAgICBbXS5zbGljZS5jYWxsKG5vZGUuY2hpbGROb2RlcykuZm9yRWFjaChmdW5jdGlvbiAoY2hpbGQpIHtcbiAgICAgICAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgICAgICAgYmxvdC5kb21Ob2RlLmFwcGVuZENoaWxkKGNoaWxkKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIGlmIChub2RlLnBhcmVudE5vZGUpIHtcbiAgICAgICAgICAgICAgICBub2RlLnBhcmVudE5vZGUucmVwbGFjZUNoaWxkKGJsb3QuZG9tTm9kZSwgbm9kZSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYmxvdC5hdHRhY2goKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGJsb3Q7XG4gICAgICAgIH1cbiAgICAgICAgZXhwb3J0cy5kZWZhdWx0ID0gQ29udGFpbmVyQmxvdDtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDE4ICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICB2YXIgX19leHRlbmRzID1cbiAgICAgICAgICAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHxcbiAgICAgICAgICAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGV4dGVuZFN0YXRpY3MgPVxuICAgICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgICAgICAgKHtfX3Byb3RvX186IFtdfSBpbnN0YW5jZW9mIEFycmF5ICYmXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgICAgICAgICAgIGQuX19wcm90b19fID0gYjtcbiAgICAgICAgICAgICAgICB9KSB8fFxuICAgICAgICAgICAgICBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIHAgaW4gYikgaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdO1xuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICAgIGV4dGVuZFN0YXRpY3MoZCwgYik7XG4gICAgICAgICAgICAgIGZ1bmN0aW9uIF9fKCkge1xuICAgICAgICAgICAgICAgIHRoaXMuY29uc3RydWN0b3IgPSBkO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGQucHJvdG90eXBlID1cbiAgICAgICAgICAgICAgICBiID09PSBudWxsXG4gICAgICAgICAgICAgICAgICA/IE9iamVjdC5jcmVhdGUoYilcbiAgICAgICAgICAgICAgICAgIDogKChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSksIG5ldyBfXygpKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfSkoKTtcbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge3ZhbHVlOiB0cnVlfSk7XG4gICAgICAgIHZhciBhdHRyaWJ1dG9yXzEgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDEyKTtcbiAgICAgICAgdmFyIHN0b3JlXzEgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDMxKTtcbiAgICAgICAgdmFyIGNvbnRhaW5lcl8xID0gX193ZWJwYWNrX3JlcXVpcmVfXygxNyk7XG4gICAgICAgIHZhciBSZWdpc3RyeSA9IF9fd2VicGFja19yZXF1aXJlX18oMSk7XG4gICAgICAgIHZhciBGb3JtYXRCbG90ID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgICAgICAgIF9fZXh0ZW5kcyhGb3JtYXRCbG90LCBfc3VwZXIpO1xuICAgICAgICAgIGZ1bmN0aW9uIEZvcm1hdEJsb3QoZG9tTm9kZSkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gX3N1cGVyLmNhbGwodGhpcywgZG9tTm9kZSkgfHwgdGhpcztcbiAgICAgICAgICAgIF90aGlzLmF0dHJpYnV0ZXMgPSBu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BsYWNlV2l0aChuYW1lLCB2YWx1ZSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIEZvcm1hdEJsb3QucHJvdG90eXBlLmZvcm1hdHMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZm9ybWF0cyA9IHRoaXMuYXR0cmlidXRlcy52YWx1ZXMoKTtcbiAgICAgICAgICAgIHZhciBmb3JtYXQgPSB0aGlzLnN0YXRpY3MuZm9ybWF0cyh0aGlzLmRvbU5vZGUpO1xuICAgICAgICAgICAgaWYgKGZvcm1hdCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIGZvcm1hdHNbdGhpcy5zdGF0aWNzLmJsb3ROYW1lXSA9IGZvcm1hdDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBmb3JtYXRzO1xuICAgICAgICAgIH07XG4gICAgICAgICAgRm9ybWF0QmxvdC5wcm90b3R5cGUucmVwbGFjZVdpdGggPSBmdW5jdGlvbiAobmFtZSwgdmFsdWUpIHtcbiAgICAgICAgICAgIHZhciByZXBsYWNlbWVudCA9IF9zdXBlci5wcm90b3R5cGUucmVwbGFjZVdpdGguY2FsbChcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgdGhpcy5hdHRyaWJ1dGVzLmNvcHkocmVwbGFjZW1lbnQpO1xuICAgICAgICAgICAgcmV0dXJuIHJlcGxhY2VtZW50O1xuICAgICAgICAgIH07XG4gICAgICAgICAgRm9ybWF0QmxvdC5wcm90b3R5cGUudXBkYXRlID0gZnVuY3Rpb24gKG11dGF0aW9ucywgY29udGV4dCkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUudXBkYXRlLmNhbGwodGhpcywgbXV0YXRpb25zLCBjb250ZXh0KTtcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgbXV0YXRpb25zLnNvbWUoZnVuY3Rpb24gKG11dGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgIG11dGF0aW9uLnRhcmdldCA9PT0gX3RoaXMuZG9tTm9kZSAmJlxuICAgICAgICAgICAgICAgICAgbXV0YXRpb24udHlwZSA9PT0gJ2F0dHJpYnV0ZXMnXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICB0aGlzLmF0dHJpYnV0ZXMuYnVpbGQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIEZvcm1hdEJsb3QucHJvdG90eXBlLndyYXAgPSBmdW5jdGlvbiAobmFtZSwgdmFsdWUpIHtcbiAgICAgICAgICAgIHZhciB3cmFwcGVyID0gX3N1cGVyLnByb3RvdHlwZS53cmFwLmNhbGwodGhpcywgbmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICB3cmFwcGVyIGluc3RhbmNlb2YgRm9ybWF0QmxvdCAmJlxuICAgICAgICAgICAgICB3cmFwcGVyLnN0YXRpY3Muc2NvcGUgPT09IHRoaXMuc3RhdGljcy5zY29wZVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIHRoaXMuYXR0cmlidXRlcy5tb3ZlKHdyYXBwZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHdyYXBwZXI7XG4gICAgICAgICAgfTtcbiAgICAgICAgICByZXR1cm4gRm9ybWF0QmxvdDtcbiAgICAgICAgfSkoY29udGFpbmVyXzEuZGVmYXVsdCk7XG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IEZvcm1hdEJsb3Q7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiAxOSAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgdmFyIF9fZXh0ZW5kcyA9XG4gICAgICAgICAgKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8XG4gICAgICAgICAgKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBleHRlbmRTdGF0aWNzID1cbiAgICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICAgICAgICh7X19wcm90b19fOiBbXX0gaW5zdGFuY2VvZiBBcnJheSAmJlxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICAgICAgICBkLl9fcHJvdG9fXyA9IGI7XG4gICAgICAgICAgICAgICAgfSkgfHxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICAgICAgICBmdW5jdGlvbiBfXygpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnN0cnVjdG9yID0gZDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBkLnByb3RvdHlwZSA9XG4gICAgICAgICAgICAgICAgYiA9PT0gbnVsbFxuICAgICAgICAgICAgICAgICAgPyBPYmplY3QuY3JlYXRlKGIpXG4gICAgICAgICAgICAgICAgICA6ICgoX18ucHJvdG90eXBlID0gYi5wcm90b3R5cGUpLCBuZXcgX18oKSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH0pKCk7XG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAnX19lc01vZHVsZScsIHt2YWx1ZTogdHJ1ZX0pO1xuICAgICAgICB2YXIgc2hhZG93XzEgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDMwKTtcbiAgICAgICAgdmFyIFJlZ2lzdHJ5ID0gX193ZWJwYWNrX3JlcXVpcmVfXygxKTtcbiAgICAgICAgdmFyIExlYWZCbG90ID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKF9zdXBlcikge1xuICAgICAgICAgIF9fZXh0ZW5kcyhMZWFmQmxvdCwgX3N1cGVyKTtcbiAgICAgICAgICBmdW5jdGlvbiBMZWFmQmxvdCgpIHtcbiAgICAgICAgICAgIHJldHVybiAoX3N1cGVyICE9PSBudWxsICYmIF9zdXBlci5hcHBseSh0aGlzLCBhcmd1bWVudHMpKSB8fCB0aGlzO1xuICAgICAgICAgIH1cbiAgICAgICAgICBMZWFmQmxvdC52YWx1ZSA9IGZ1bmN0aW9uIChkb21Ob2RlKSB7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIExlYWZCbG90LnByb3RvdHlwZS5pbmRleCA9IGZ1bmN0aW9uIChub2RlLCBvZmZzZXQpIHtcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgdGhpcy5kb21Ob2RlID09PSBub2RlIHx8XG4gICAgICAgICAgICAgIHRoaXMuZG9tTm9kZS5jb21wYXJlRG9jdW1lbnRQb3NpdGlvbihub2RlKSAmXG4gICAgICAgICAgICAgICAgTm9kZS5ET0NVTUVOVF9QT1NJVElPTl9DT05UQUlORURfQllcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICByZXR1cm4gTWF0aC5taW4ob2Zmc2V0LCAxKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIExlYWZCbG90LnByb3RvdHlwZS5wb3NpdGlvbiA9IGZ1bmN0aW9uIChpbmRleCwgaW5jbHVzaXZlKSB7XG4gICAgICAgICAgICB2YXIgb2Zmc2V0ID0gW10uaW5kZXhPZi5jYWxsKFxuICAgICAgICAgICAgICB0aGlzLnBhcmVudC5kb21Ob2RlLmNoaWxkTm9kZXMsXG4gICAgICAgICAgICAgIHRoaXMuZG9tTm9kZSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAoaW5kZXggPiAwKSBvZmZzZXQgKz0gMTtcbiAgICAgICAgICAgIHJldHVybiBbdGhpcy5wYXJlbnQuZG9tTm9kZSwgb2Zmc2V0XTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIExlYWZCbG90LnByb3RvdHlwZS52YWx1ZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgIChfYSA9IHt9KSxcbiAgICAgICAgICAgICAgKF9hW3RoaXMuc3RhdGljcy5ibG90TmFtZV0gPVxuICAgICAgICAgICAgICAgIHRoaXMuc3RhdGljcy52YWx1ZSh0aGlzLmRvbU5vZGUpIHx8IHRydWUpLFxuICAgICAgICAgICAgICBfYVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHZhciBfYTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIExlYWZCbG90LnNjb3BlID0gUmVnaXN0cnkuU2NvcGUuSU5MSU5FX0JMT1Q7XG4gICAgICAgICAgcmV0dXJuIExlYWZCbG90O1xuICAgICAgICB9KShzaGFkb3dfMS5kZWZhdWx0KTtcbiAgICAgICAgZXhwb3J0cy5kZWZhdWx0ID0gTGVhZkJsb3Q7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiAyMCAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICB2YXIgZXF1YWwgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDExKTtcbiAgICAgICAgdmFyIGV4dGVuZCA9IF9fd2VicGFja19yZXF1aXJlX18oMyk7XG5cbiAgICAgICAgdmFyIGxpYiA9IHtcbiAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBjb21wb3NlOiBmdW5jdGlvbiAoYSwgYiwga2VlcE51bGwpIHtcbiAgICAgICAgICAgICAgaWYgKHR5cGVvZiBhICE9PSAnb2JqZWN0JykgYSA9IHt9O1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIGIgIT09ICdvYmplY3QnKSBiID0ge307XG4gICAgICAgICAgICAgIHZhciBhdHRyaWJ1dGVzID0gZXh0ZW5kKHRydWUsIHt9LCBiKTtcbiAgICAgICAgICAgICAgaWYgKCFrZWVwTnVsbCkge1xuICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXMgPSBPYmplY3Qua2V5cyhhdHRyaWJ1dGVzKS5yZWR1Y2UoZnVuY3Rpb24gKFxuICAgICAgICAgICAgICAgICAgY29weSxcbiAgICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGlmIChhdHRyaWJ1dGVzW2tleV0gIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBjb3B5W2tleV0gPSBhdHRyaWJ1dGVzW2tleV07XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICByZXR1cm4gY29weTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHt9KTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gYSkge1xuICAgICAgICAgICAgICAgIGlmIChhW2tleV0gIT09IHVuZGVmaW5lZCAmJiBiW2tleV0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgYXR0cmlidXRlc1trZXldID0gYVtrZXldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICByZXR1cm4gT2JqZWN0LmtleXMoYXR0cmlidXRlcykubGVuZ3RoID4gMFxuICAgICAgICAgICAgICAgID8gYXR0cmlidXRlc1xuICAgICAgICAgICAgICAgIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgZGlmZjogZnVuY3Rpb24gKGEsIGIpIHtcbiAgICAgICAgICAgICAgaWYgKHR5cGVvZiBhICE9PSAnb2JqZWN0JykgYSA9IHt9O1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIGIgIT09ICdvYmplY3QnKSBiID0ge307XG4gICAgICAgICAgICAgIHZhciBhdHRyaWJ1dGVzID0gT2JqZWN0LmtleXMoYSlcbiAgICAgICAgICAgICAgICAuY29uY2F0KE9iamVjdC5rZXlzKGIpKVxuICAgICAgICAgICAgICAgIC5yZWR1Y2UoZnVuY3Rpb24gKGF0dHJpYnV0ZXMsIGtleSkge1xuICAgICAgICAgICAgICAgICAgaWYgKCFlcXVhbChhW2tleV0sIGJba2V5XSkpIHtcbiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlc1trZXldID0gYltrZXldID09PSB1bmRlZmluZWQgPyBudWxsIDogYltrZXldO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgcmV0dXJuIGF0dHJpYnV0ZXM7XG4gICAgICAgICAgICAgICAgfSwge30pO1xuICAgICAgICAgICAgICByZXR1cm4gT2JqZWN0LmtleXMoYXR0cmlidXRlcykubGVuZ3RoID4gMFxuICAgICAgICAgICAgICAgID8gYXR0cmlidXRlc1xuICAgICAgICAgICAgICAgIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgdHJhbnNmb3JtOiBmdW5jdGlvbiAoYSwgYiwgcHJpb3JpdHkpIHtcbiAgICAgICAgICAgICAgaWYgKHR5cGVvZiBhICE9PSAnb2JqZWN0JykgcmV0dXJuIGI7XG4gICAgICAgICAgICAgIGlmICh0eXBlb2YgYiAhPT0gJ29iamVjdCcpIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgIGlmICghcHJpb3JpdHkpIHJldHVybiBiOyAvLyBiIHNpbXBseSBvdmVyd3JpdGVzIHVzIHdpdGhvdXQgcHJpb3JpdHlcbiAgICAgICAgICAgICAgdmFyIGF0dHJpYnV0ZXMgPSBPYmplY3Qua2V5cyhiKS5yZWR1Y2UoZnVuY3Rpb24gKFxuICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXMsXG4gICAgICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoYVtrZXldID09PSB1bmRlZmluZWQpIGF0dHJpYnV0ZXNba2V5XSA9IGJba2V5XTsgLy8gbnVsbCBpcyBhIHZhbGlkIHZhbHVlXG4gICAgICAgICAgICAgICAgcmV0dXJuIGF0dHJpYnV0ZXM7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHt9KTtcbiAgICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKGF0dHJpYnV0ZXMpLmxlbmd0aCA+IDBcbiAgICAgICAgICAgICAgICA/IGF0dHJpYnV0ZXNcbiAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcblxuICAgICAgICAgIGl0ZXJhdG9yOiBmdW5jdGlvbiAob3BzKSB7XG4gICAgICAgICAgICByZXR1cm4gbmV3IEl0ZXJhdG9yKG9wcyk7XG4gICAgICAgICAgfSxcblxuICAgICAgICAgIGxlbmd0aDogZnVuY3Rpb24gKG9wKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIG9wWydkZWxldGUnXSA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIG9wWydkZWxldGUnXTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIG9wLnJldGFp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DtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRoaXMub2Zmc2V0ICs9IGxlbmd0aDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0eXBlb2YgbmV4dE9wWydkZWxldGUnXSA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHtkZWxldGU6IGxlbmd0aH07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgcmV0T3AgPSB7fTtcbiAgICAgICAgICAgICAgaWYgKG5leHRPcC5hdHRyaWJ1dGVzKSB7XG4gICAgICAgICAgICAgICAgcmV0T3AuYXR0cmlidXRlcyA9IG5leHRPcC5hdHRyaWJ1dGVzO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmICh0eXBlb2YgbmV4dE9wLnJldGFpbiA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICByZXRPcC5yZXRhaW4gPSBsZW5ndGg7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIG5leHRPcC5pbnNlcnQgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgcmV0T3AuaW5zZXJ0ID0gbmV4dE9wLmluc2VydC5zdWJzdHIob2Zmc2V0LCBsZW5ndGgpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIG9mZnNldCBzaG91bGQgPT09IDAsIGxlbmd0aCBzaG91bGQgPT09IDFcbiAgICAgICAgICAgICAgICByZXRPcC5pbnNlcnQgPSBuZXh0T3AuaW5zZXJ0O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHJldHVybiByZXRPcDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHtyZXRhaW46IEluZmluaXR5fTtcbiAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgSXRlcmF0b3IucHJvdG90eXBlLnBlZWsgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMub3BzW3RoaXMuaW5kZXhdO1xuICAgICAgICB9O1xuXG4gICAgICAgIEl0ZXJhdG9yLnByb3RvdHlwZS5wZWVrTGVuZ3RoID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGlmICh0aGlzLm9wc1t0aGlzLmluZGV4XSkge1xuICAgICAgICAgICAgLy8gU2hvdWxkIG5ldmVyIHJldHVybiAwIGlmIG91ciBpbmRleCBpcyBiZWluZyBtYW5hZ2VkIGNvcnJlY3RseVxuICAgICAgICAgICAgcmV0dXJuIGxpYi5sZW5ndGgodGhpcy5vcHNbdGhpcy5pbmRleF0pIC0gdGhpcy5vZmZzZXQ7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBJbmZpbml0eTtcbiAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgSXRlcmF0b3IucHJvdG90eXBlLnBlZWtUeXBlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGlmICh0aGlzLm9wc1t0aGlzLmluZGV4XSkge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiB0aGlzLm9wc1t0aGlzLmluZGV4XVsnZGVsZXRlJ10gPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgIHJldHVybiAnZGVsZXRlJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHRoaXMub3BzW3RoaXMuaW5kZXhdLnJldGFpbiA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgcmV0dXJuICdyZXRhaW4nO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuICdpbnNlcnQnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gJ3JldGFpbic7XG4gICAgICAgIH07XG5cbiAgICAgICAgbW9kdWxlLmV4cG9ydH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gICAgICAgICogICAgYSBwYXJ0aWN1bGFyIGRlcHRoLiAob3B0aW9uYWwgLSBkZWZhdWx0cyB0byBJbmZpbml0eSlcbiAgICAgICAgICAgKiBAcGFyYW0gYHByb3RvdHlwZWAgLSBzZXRzIHRoZSBwcm90b3R5cGUgdG8gYmUgdXNlZCB3aGVuIGNsb25pbmcgYW4gb2JqZWN0LlxuICAgICAgICAgICAqICAgIChvcHRpb25hbCAtIGRlZmF1bHRzIHRvIHBhcmVudCBwcm90b3R5cGUpLlxuICAgICAgICAgICAqIEBwYXJhbSBgaW5jbHVkZU5vbkVudW1lcmFibGVgIC0gc2V0IHRvIHRydWUgaWYgdGhlIG5vbi1lbnVtZXJhYmxlIHByb3BlcnRpZXNcbiAgICAgICAgICAgKiAgICBzaG91bGQgYmUgY2xvbmVkIGFzIHdlbGwuIE5vbi1lbnVtZXJhYmxlIHByb3BlcnRpZXMgb24gdGhlIHByb3RvdHlwZVxuICAgICAgICAgICAqICAgIGNoYWluIHdpbGwgYmUgaWdub3JlZC4gKG9wdGlvbmFsIC0gZmFsc2UgYnkgZGVmYXVsdClcbiAgICAgICAgICAgKi9cbiAgICAgICAgICBmdW5jdGlvbiBjbG9uZShcbiAgICAgICAgICAgIHBhcmVudCxcbiAgICAgICAgICAgIGNpcmN1bGFyLFxuICAgICAgICAgICAgZGVwdGgsXG4gICAgICAgICAgICBwcm90b3R5cGUsXG4gICAgICAgICAgICBpbmNsdWRlTm9uRW51bWVyYWJsZSxcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgY2lyY3VsYXIgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgIGRlcHRoID0gY2lyY3VsYXIuZGVwdGg7XG4gICAgICAgICAgICAgIHByb3RvdHlwZSA9IGNpcmN1bGFyLnByb3RvdHlwZTtcbiAgICAgICAgICAgICAgaW5jbHVkZU5vbkVudW1lcmFibGUgPSBjaXJjdWxhci5pbmNsdWRlTm9uRW51bWVyYWJsZTtcbiAgICAgICAgICAgICAgY2lyY3VsYXIgPSBjaXJjdWxhci5jaXJjdWxhcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIG1haW50YWluIHR3byBhcnJheXMgZm9yIGNpcmN1bGFyIHJlZmVyZW5jZXMsIHdoZXJlIGNvcnJlc3BvbmRpbmcgcGFyZW50c1xuICAgICAgICAgICAgLy8gYW5kIGNoaWxkcmVuIGhhdmUgdGhlIHNhbWUgaW5kZXhcbiAgICAgICAgICAgIHZhciBhbGxQYXJlbnRzID0gW107XG4gICAgICAgICAgICB2YXIgYWxsQ2hpbGRyZW4gPSBbXTtcblxuICAgICAgICAgICAgdmFyIHVzZUJ1ZmZlciA9IHR5cGVvZiBCdWZmZXIgIT0gJ3VuZGVmaW5lZCc7XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgY2lyY3VsYXIgPT0gJ3VuZGVmaW5lZCcpIGNpcmN1bGFyID0gdHJ1ZTtcblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBkZXB0aCA9PSAndW5kZWZpbmVkJykgZGVwdGggPSBJbmZpbml0eTtcblxuICAgICAgICAgICAgLy8gcmVjdXJzZSB0aGlzIGZ1bmN0aW9uIHNvIHdlIGRvbid0IHJlc2V0IGFsbFBhcmVudHMgYW5kIGFsbENoaWxkcmVuXG4gICAgICAgICAgICBmdW5jdGlvbiBfY2xvbmUocGFyZW50LCBkZXB0aCkge1xuICAgICAgICAgICAgICAvLyBjbG9uaW5nIG51bGwgYWx3YXlzIHJldHVybnMgbnVsbFxuICAgICAgICAgICAgICBpZiAocGFyZW50ID09PSBudWxsKSByZXR1cm4gbnVsbDtcblxuICAgICAgICAgICAgICBpZiAoZGVwdGggPT09IDApIHJldHVybiBwYXJlbnQ7XG5cbiAgICAgICAgICAgICAgdmFyIGNoaWxkO1xuICAgICAgICAgICAgICB2YXIgcHJvdG87XG4gICAgICAgICAgICAgIGlmICh0eXBlb2YgcGFyZW50ICE9ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcmVudDtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGlmIChfaW5zdGFuY2VvZihwYXJlbnQsIG5hdGl2ZU1hcCkpIHtcbiAgICAgICAgICAgICAgICBjaGlsZCA9IG5ldyBuYXRpdmVNYXAoKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChfaW5zdGFuY2VvZihwYXJlbnQsIG5hdGl2ZVNldCkpIHtcbiAgICAgICAgICAgICAgICBjaGlsZCA9IG5ldyBuYXRpdmVTZXQoKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChfaW5zdGFuY2VvZihwYXJlbnQsIG5hdGl2ZVByb21pc2UpKSB7XG4gICAgICAgICAgICAgICAgY2hpbGQgPSBuZXcgbmF0aXZlUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICAgICAgICBwYXJlbnQudGhlbihcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShfY2xvbmUodmFsdWUsIGRlcHRoIC0gMSkpO1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KF9jbG9uZShlcnIsIGRlcHRoIC0gMSkpO1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChjbG9uZS5fX2lzQXJyYXkocGFyZW50KSkge1xuICAgICAgICAgICAgICAgIGNoaWxkID0gW107XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2xvbmUuX19pc1JlZ0V4cChwYXJlbnQpKSB7XG4gICAgICAgICAgICAgICAgY2hpbGQgPSBuZXcgUmVnRXhwKHBhcmVudC5zb3VyY2UsIF9fZ2V0UmVnRXhwRmxhZ3MocGFyZW50KSk7XG4gICAgICAgICAgICAgICAgaWYgKHBhcmVudC5sYXN0SW5kZXgpIGNoaWxkLmxhc3RJbmRleCA9IHBhcmVudC5sYXN0SW5kZXg7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2xvbmUuX19pc0RhdGUocGFyZW50KSkge1xuICAgICAgICAgICAgICAgIGNoaWxkID0gbmV3IERhdGUocGFyZW50LmdldFRpbWUoKSk7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAodXNlQnVmZmVyICYmIEJ1ZmZlci5pc0J1ZmZlcihwYXJlbnQpKSB7XG4gICAgICAgICAgICAgICAgY2hpbGQgPSBuZXcgQnVmZmVyKHBhcmVudC5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIHBhcmVudC5jb3B5KGNoaWxkKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gY2hpbGQ7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoX2luc3RhbmNlb2YocGFyZW50LCBFcnJvcikpIHtcbiAgICAgICAgICAgICAgICBjaGlsZCA9IE9iamVjdC5jcmVhdGUocGFyZW50KTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHByb3RvdHlwZSA9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgICAgcHJvdG8gPSBPYmplY3QuZ2V0UHJvdG90eXBlT2YocGFyZW50KTtcbiAgICAgICAgICAgICAgICAgIGNoaWxkID0gT2JqZWN0LmNyZWF0ZShwcm90byk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGNoaWxkID0gT2JqZWN0LmNyZWF0ZShwcm90b3R5cGUpO1xuICAgICAgICAgICAgICAgICAgcHJvdG8gPSBwcm90b3R5cGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgaWYgKGNpcmN1bGFyKSB7XG4gICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gYWxsUGFyZW50cy5pbmRleE9mKHBhcmVudCk7XG5cbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggIT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBhbGxDaGlsZHJlbltpbmRleF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGFsbFBhcmVudHMucHVzaChwYXJlbnQpO1xuICAgICAgICAgICAgICAgIGFsbENoaWxkcmVuLnB1c2goY2hpbGQpO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgaWYgKF9pbnN0YW5jZW9mKHBhcmVudCwgbmF0aXZlTWFwKSkge1xuICAgICAgICAgICAgICAgIHBhcmVudC5mb3JFYWNoKGZ1bmN0aW9uICh2YWx1ZSwga2V5KSB7XG4gICAgICAgICAgICAgICAgICB2YXIga2V5Q2hpbGQgPSBfY2xvbmUoa2V5LCBkZXB0aCAtIDEpO1xuICAgICAgICAgICAgICAgICAgdmFyIHZhbHVlQ2hpbGQgPSBfY2xvbmUodmFsdWUsIGRlcHRoIC0gMSk7XG4gICAgICAgICAgICAgICAgICBjaGlsZC5zZXQoa2V5Q2hpbGQsIHZhbHVlQ2hpbGQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChfaW5zdGFuY2VvZihwYXJlbnQsIG5hdGl2ZVNldCkpIHtcbiAgICAgICAgICAgICAgICBwYXJlbnQuZm9yRWFjaChmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIHZhciBlbnRyeUNoaWxkID0gX2Nsb25lKHZhbHVlLCBkZXB0aCAtIDEpO1xuICAgICAgICAgICAgICAgICAgY2hpbGQuYWRkKGVudHJ5Q2hpbGQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgZm9yICh2YXIgaSBpbiBwYXJlbnQpIHtcbiAgICAgICAgICAgICAgICB2YXIgYXR0cnM7XG4gICAgICAgICAgICAgICAgaWYgKHByb3RvKSB7XG4gICAgICAgICAgICAgICAgICBhdHRycyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IocHJvdG8sIGkpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChhdHRycyAmJiBhdHRycy5zZXQgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNoaWxkW2ldID0gX2Nsb25lKHBhcmVudFtpXSwgZGVwdGggLSAxKTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGlmIChPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKSB7XG4gICAgICAgICAgICAgICAgdmFyIHN5bWJvbHMgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKHBhcmVudCk7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBzeW1ib2xzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAvLyBEb24ndCBuZWVkIHRvIHdvcnJ5IGFib3V0IGNsb25pbmcgYSBzeW1ib2wgYmVjYXVzZSBpdCBpcyBhIHByaW1pdGl2ZSxcbiAgICAgICAgICAgICAgICAgIC8vIGxpa2UgYSBudW1iZXIgb3Igc3RyaW5nLlxuICAgICAgICAgICAgICAgICAgdmFyIHN5bWJvbCA9IHN5bWJvbHNbaV07XG4gICAgICAgICAgICAgICAgICB2YXIgZGVzY3JpcHRvciA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoXG4gICAgICAgICAgICAgICAgICAgIHBhcmVudCxcbiAgICAgICAgICAgICAgICAgICAgc3ltYm9sLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvciAmJlxuICAgICAgICAgICAgICAgICAgICAhZGVzY3JpcHRvci5lbnVtZXJhYmxlICYmXG4gICAgICAgICAgICAgICAgICAgICFpbmNsdWRlTm9uRW51bWVyYWJsZVxuICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgY2hpbGRbc3ltYm9sXSA9IF9jbG9uZShwYXJlbnRbc3ltYm9sXSwgZGVwdGggLSAxKTtcbiAgICAgICAgICAgICAgICAgIGlmICghZGVzY3JpcHRvci5lbnVtZXJhYmxlKSB7XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShjaGlsZCwgc3ltYm9sLCB7XG4gICAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGlmIChpbmNsdWRlTm9uRW51bWVyYWJsZSkge1xuICAgICAgICAgICAgICAgIHZhciBhbGxQcm9wZXJ0eU5hbWVzID0gT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMocGFyZW50KTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGFsbFByb3BlcnR5TmFtZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgIHZhciBwcm9wZXJ0eU5hbWUgPSBhbGxQcm9wZXJ0eU5hbWVzW2ldO1xuICAgICAgICAgICAgICAgICAgdmFyIGRlc2NyaXB0b3IgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKFxuICAgICAgICAgICAgICAgICAgICBwYXJlbnQsXG4gICAgICAgICAgICAgICAgICAgIHByb3BlcnR5TmFtZSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBpZiAoZGVzY3JpcHRvciAmJiBkZXNjcmlwdG9yLmVudW1lcmFibGUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBjaGlsZFtwcm9wZXJ0eU5hbWVdID0gX2Nsb25lKHBhcmVudFtwcm9wZXJ0eU5hbWVdLCBkZXB0aCAtIDEpO1xuICAgICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGNoaWxkLCBwcm9wZXJ0eU5hbWUsIHtcbiAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICByZXR1cm4gY2hpbGQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBfY2xvbmUocGFyZW50LCBkZXB0aCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLyoqXG4gICAgICAgICAgICogU2ltcGxlIGZsYXQgY2xvbmUgdXNpbmcgcHJvdG90eXBlLCBhY2NlcHRzIG9ubHkgb2JqZWN0cywgdXNlZnVsbCBmb3IgcHJvcGVydHlcbiAgICAgICAgICAgKiBvdmVycmlkZSBvbiBGTEFUIGNvbmZpZ3VyYXRpb24gb2JqZWN0IChubyBuZXN0ZWQgcHJvcHMpLlxuICAgICAgICAgICAqXG4gICAgICAgICAgICogVVNFIFdJVEggQ0FVVElPTiEgVGhpcyBtYXkgbm90IGJlaGF2ZSBhcyB5b3Ugd2lzaCBpZiB5b3UgZG8gbm90IGtub3cgaG93IHRoaXNcbiAgICAgICAgICAgKiB3b3Jrcy5cbiAgICAgICAgICAgKi9cbiAgICAgICAgICBjbG9uZS5jbG9uZVByb3RvdHlwZSA9IGZ1bmN0aW9uIGNsb25lUHJvdG90eXBlKHBhcmVudCkge1xuICAgICAgICAgICAgaWYgKHBhcmVudCA9PT0gbnVsbCkgcmV0dXJuIG51bGw7XG5cbiAgICAgICAgICAgIHZhciBjID0gZnVuY3Rpb24gKCkge307XG4gICAgICAgICAgICBjLnByb3RvdHlwZSA9IHBhcmVudDtcbiAgICAgICAgICAgIHJldHVybiBuZXcgYygpO1xuICAgICAgICAgIH07XG5cbiAgICAgICAgICAvLyBwcml2YXRlIHV0aWxpdHkgZnVuY3Rpb25zXG5cbiAgICAgICAgICBmdW5jdGlvbiBfX29ialRvU3RyKG8pIHtcbiAgICAgICAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwobyk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGNsb25lLl9fb2JqVG9TdHIgPSBfX29ialRvU3RyO1xuXG4gICAgICAgICAgZnVuY3Rpb24gX19pc0RhdGUobykge1xuICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiBvID09PSAnb2JqZWN0JyAmJiBfX29ialRvU3RyKG8pID09PSAnW29iamVjdCBEYXRlXSc7XG4gICAgICAgICAgfVxuICAgICAgICAgIGNsb25lLl9faXNEYXRlID0gX19pc0RhdGU7XG5cbiAgICAgICAgICBmdW5jdGlvbiBfX2lzQXJyYXkobykge1xuICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiBvID09PSAnb2JqZWN0JyAmJiBfX29ialRvU3RyKG8pID09PSAnW29iamVjdCBBcnJheV0nO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjbG9uZS5fX2lzQXJyYXkgPSBfX2lzQXJyYXk7XG5cbiAgICAgICAgICBmdW5jdGlvbiBfX2lzUmVnRXhwKG8pIHtcbiAgICAgICAgICAgIHJldHVybiB0eXBlb2YgbyA9PT0gJ29iamVjdCcgJiYgX19vYmpUb1N0cihvKSA9PT0gJ1tvYmplY3QgUmVnRXhwXSc7XG4gICAgICAgICAgfVxuICAgICAgICAgIGNsb25lLl9faXNSZWdFeHAgPSBfX2lzUmVnRXhwO1xuXG4gICAgICAgICAgZnVuY3Rpb24gX19nZXRSZWdFeHBGbGFncyhyZSkge1xuICAgICAgICAgICAgdmFyIGZsYWdzID0gJyc7XG4gICAgICAgICAgICBpZiAocmUuZ2xvYmFsKSBmbGFncyArPSAnZyc7XG4gICAgICAgICAgICBpZiAocmUuaWdub3JlQ2FzZSkgZmxhZ3MgKz0gJ2knO1xuICAgICAgICAgICAgaWYgKHJlLm11bHRpbGluZSkgZmxhZ3MgKz0gJ20nO1xuICAgICAgICAgICAgcmV0dXJuIGZsYWdzO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjbG9uZS5fX2dldFJlZ0V4cEZsYWdzID0gX19nZXRSZWdFeHBGbGFncztcblxuICAgICAgICAgIHJldHVybiBjbG9uZTtcbiAgICAgICAgfSkoKTtcblxuICAgICAgICBpZiAodHlwZW9mIG1vZHVsZSA9PT0gJ29iamVjdCcgJiYgbW9kdWxlLmV4cG9ydHMpIHtcbiAgICAgICAgICBtb2R1bGUuZXhwb3J0cyA9IGNsb25lO1xuICAgICAgICB9XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiAyMiAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge1xuICAgICAgICAgIHZhbHVlOiB0cnVlLFxuICAgICAgICB9KTtcblxuICAgICAgICB2YXIgX3NsaWNlZFRvQXJyYXkgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIHNsaWNlSXRlcmF0b3IoYXJyLCBpKSB7XG4gICAgICAgICAgICB2YXIgX2FyciA9IFtdO1xuICAgICAgICAgICAgdmFyIF9uID0gdHJ1ZTtcbiAgICAgICAgICAgIHZhciBfZCA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIF9lID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgZm9yIChcbiAgICAgICAgICAgICAgICB2YXIgX2kgPSBhcnJbU3ltYm9sLml0ZXJhdG9yXSgpLCBfcztcbiAgICAgICAgICAgICAgICAhKF9uID0gKF9zID0gX2kubmV4dCgpKS5kb25lKTtcbiAgICAgICAgICAgICAgICBfbiA9IHRydWVcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgX2Fyci5wdXNoKF9zLnZhbHVlKTtcbiAgICAgICAgICAgICAgICBpZiAoaSAmJiBfYXJyLmxlbmd0aCA9PT0gaSkgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBfZCA9IHRydWU7XG4gICAgICAgICAgICAgIF9lID0gZXJyO1xuICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBpZiAoIV9uICYmIF9pWydyZXR1cm4nXSkgX2lbJ3JldHVybiddKCk7XG4gICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgaWYgKF9kKSB0aHJvdyBfZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIF9hcnI7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoYXJyLCBpKSB7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShhcnIpKSB7XG4gICAgICAgICAgICAgIHJldHVybiBhcnI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKFN5bWJvbC5pdGVyYXRvciBpbiBPYmplY3QoYXJyKSkge1xuICAgICAgICAgICAgICByZXR1cm4gc2xpY2V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pO1xuICAgICAgICAgICAgaWYgKHN0YXRpY1Byb3BzKSBkZWZpbmVQcm9wZXJ0aWVzKENvbnN0cnVjdG9yLCBzdGF0aWNQcm9wcyk7XG4gICAgICAgICAgICByZXR1cm4gQ29uc3RydWN0b3I7XG4gICAgICAgICAgfTtcbiAgICAgICAgfSkoKTtcblxuICAgICAgICB2YXIgX2dldCA9IGZ1bmN0aW9uIGdldChvYmplY3QsIHByb3BlcnR5LCByZWNlaXZlcikge1xuICAgICAgICAgIGlmIChvYmplY3QgPT09IG51bGwpIG9iamVjdCA9IEZ1bmN0aW9uLnByb3RvdHlwZTtcbiAgICAgICAgICB2YXIgZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3Iob2JqZWN0LCBwcm9wZXJ0eSk7XG4gICAgICAgICAgaWYgKGRlc2MgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdmFyIHBhcmVudCA9IE9iamVjdC5nZXRQcm90b3R5cGVPZihvYmplY3QpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGdldChwYXJlbnQsIHByb3BlcnR5LCByZWNlaXZlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmICgndmFsdWUnIGluIGRlc2MpIHtcbiAgICAgICAgICAgIHJldHVybiBkZXNjLnZhbHVlO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZ2V0dGVyID0gZGVzYy5nZXQ7XG4gICAgICAgICAgICBpZiAoZ2V0dGVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBnZXR0ZXIuY2FsbChyZWNlaXZlcik7XG4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XNzQ2FsbENoZWNrKGluc3RhbmNlLCBDb25zdHJ1Y3Rvcikge1xuICAgICAgICAgIGlmICghKGluc3RhbmNlIGluc3RhbmNlb2YgQ29uc3RydWN0b3IpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24nKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihzZWxmLCBjYWxsKSB7XG4gICAgICAgICAgaWYgKCFzZWxmKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgUmVmZXJlbmNlRXJyb3IoXG4gICAgICAgICAgICAgIFwidGhpcyBoYXNuJ3QgYmVlbiBpbml0aWFsaXNlZCAtIHN1cGVyKCkgaGFzbid0IGJlZW4gY2FsbGVkXCIsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gY2FsbCAmJlxuICAgICAgICAgICAgKHR5cGVvZiBjYWxsID09PSAnb2JqZWN0JyB8fCB0eXBlb2YgY2FsbCA9PT0gJ2Z1bmN0aW9uJylcbiAgICAgICAgICAgID8gY2FsbFxuICAgICAgICAgICAgOiBzZWxmO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2luaGVyaXRzKHN1YkNsYXNzLCBzdXBlckNsYXNzKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZiBzdXBlckNsYXNzICE9PSAnZnVuY3Rpb24nICYmIHN1cGVyQ2xhc3MgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICdTdXBlciBleHByZXNzaW9uIG11c3QgZWl0aGVyIGJlIG51bGwgb3IgYSBmdW5jdGlvbiwgbm90ICcgK1xuICAgICAgICAgICAgICAgIHR5cGVvZiBzdXBlckNsYXNzLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgc3ViQ2xhc3MucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShcbiAgICAgICAgICAgIHN1cGVyQ2xhc3MgJiYgc3VwZXJDbGFzcy5wcm90b3R5cGUsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGNvbnN0cnVjdG9yOiB7XG4gICAgICAgICAgICAgICAgdmFsdWU6IHN1YkNsYXNzLFxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgKTtcbiAgICAgICAgICBpZiAoc3VwZXJDbGFzcylcbiAgICAgICAgICAgIE9iamVjdC5zZXRQcm90b3R5cGVPZlxuICAgICAgICAgICAgICA/IE9iamVjdC5zZXRQcm90b3R5cGVPZihzdWJDbGFzcywgc3VwZXJDbGFzcylcbiAgICAgICAgICAgICAgOiAoc3ViQ2xhc3MuX19wcm90b19fID0gc3VwZXJDbGFzcyk7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBpc0xpbmUoYmxvdCkge1xuICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICBibG90IGluc3RhbmNlb2YgX2Jsb2NrMi5kZWZhdWx0IHx8IGJsb3QgaW5zdGFuY2VvZiBfYmxvY2suQmxvY2tFbWJlZFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgU2Nyb2xsID0gKGZ1bmN0aW9uIChfUGFyY2htZW50JFNjcm9sbCkge1xuICAgICAgICAgIF9pbmhlcml0cyhTY3JvbGwsIF9QYXJjaG1lbnQkU2Nyb2xsKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIFNjcm9sbChkb21Ob2RlLCBjb25maWcpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBTY3JvbGwpO1xuXG4gICAgICAgICAgICB2YXIgX3RoaXMgPSBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKFNjcm9sbC5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKFNjcm9sbCkpLmNhbGwoXG4gICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICBkb21Ob2RlLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgX3RoaXMuZW1pdHRlciA9IGNvbmZpZy5lbWl0dGVyO1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoY29uZmlnLndoaXRlbGlzdCkpIHtcbiAgICAgICAgICAgICAgX3RoaXMud2hpdGVsaXN0ID0gY29uZmlnLndoaXRlbGlzdC5yZWR1Y2UoZnVuY3Rpb24gKFxuICAgICAgICAgICAgICAgIHdoaXRlbGlzdCxcbiAgICAgICAgICAgICAgICBmb3JtYXQsXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIHdoaXRlbGlzdFtmb3JtYXRdID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICByZXR1cm4gd2hpdGVsaXN0O1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB7fSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBTb21lIHJlYXNvbiBmaXhlcyBjb21wb3NpdGlvbiBpc3N1ZXMgd2l0aCBjaGFyYWN0ZXIgbGFuZ3VhZ2VzIGluIFdpbmRvd3MvQ2hyb21lLCBTYWZhcmlcbiAgICAgICAgICAgIF90aGlzLmRvbU5vZGUuYWRkRXZlbnRMaXN0ZW5lcignRE9NTm9kZUluc2VydGVkJywgZnVuY3Rpb24gKCkge30pO1xuICAgICAgICAgICAgX3RoaXMub3B0aW1pemUoKTtcbiAgICAgICAgICAgIF90aGlzLmVuYWJsZSgpO1xuICAgICAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhTY3JvbGwsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnYmF0Y2hTdGFydCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBiYXRjaFN0YXJ0KCkge1xuICAgICAgICAgICAgICAgIHRoaXMuYmF0Y2ggPSB0cnVlO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnYmF0Y2hFbmQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gYmF0Y2hFbmQoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5iYXRjaCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHRoaXMub3B0aW1pemUoKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2RlbGV0ZUF0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGRlbGV0ZUF0KGluZGV4LCBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICB2YXIgX2xpbmUgPSB0aGlzLmxpbmUoaW5kZXgpLFxuICAgICAgICAgICAgICAgICAgX2xpbmUyID0gX3NsaWNlZFRvQXJyYXkoX2xpbmUsIDIpLFxuICAgICAgICAgICAgICAgICAgZmlyc3QgPSBfbGluZTJbMF0sXG4gICAgICAgICAgICAgICAgICBvZmZzZXQgPSBfbGluZTJbMV07XG5cbiAgICAgICAgICAgICAgICB2YXIgX2xpbmUzID0gdGhpcy5saW5lKGluZGV4ICsgbGVuZ3RoKSxcbiAgICAgICAgICAgICAgICAgIF9saW5lNCA9IF9zbGljZWRUb0FycmF5KF9saW5lMywgMSksXG4gICAgICAgICAgICAgICAgICBsYXN0ID0gX2xpbmU0WzBdO1xuXG4gICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgIFNjcm9sbC5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihTY3JvbGwucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICdkZWxldGVBdCcsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBpbmRleCwgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgICBpZiAobGFzdCAhPSBudWxsICYmIGZpcnN0ICE9PSBsYXN0ICYmIG9mZnNldCA+IDApIHtcbiAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgZmlyc3QgaW5zdGFuY2VvZiBfYmxvY2suQmxvY2tFbWJlZCB8fFxuICAgICAgICAgICAgICAgICAgICBsYXN0IGluc3RhbmNlb2YgX2Jsb2NrLkJsb2NrRW1iZWRcbiAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm9wdGltaXplKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGlmIChmaXJzdCBpbnN0YW5jZW9mIF9jb2RlMi5kZWZhdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBuZXdsaW5lSW5kZXggPSBmaXJzdC5uZXdsaW5lSW5kZXgoZmlyc3QubGVuZ3RoKCksIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobmV3bGluZUluZGV4ID4gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICBmaXJzdCA9IGZpcnN0LnNwbGl0KG5ld2xpbmVJbmRleCArIDEpO1xuICAgICAgICAgICAgICAgICAgICAgIGlmIChmaXJzdCA9PT0gbGFzdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpbWl6ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChsYXN0IGluc3RhbmNlb2YgX2NvZGUyLmRlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIF9uZXdsaW5lSW5kZXggPSBsYXN0Lm5ld2xpbmVJbmRleCgwKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKF9uZXdsaW5lSW5kZXggPiAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgIGxhc3Quc3BsaXQoX25ld2xpbmVJbmRleCArIDEpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB2YXIgcmVmID1cbiAgICAgICAgICAgICAgICAgICAgbGFzdC5jaGlsZHJlbi5oZWFkIGluc3RhbmNlb2YgX2JyZWFrMi5kZWZhdWx0XG4gICAgICAgICAgICAgICAgICAgICAgPyBudWxsXG4gICAgICAgICAgICAgICAgICAgICAgOiBsYXN0LmNoaWxkcmVuLmhlYWQ7XG4gICAgICAgICAgICAgICAgICBmaXJzdC5tb3ZlQ2hpbGRyZW4obGFzdCwgcmVmKTtcbiAgICAgICAgICAgICAgICAgIGZpcnN0LnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLm9wdGltaXplKCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdlbmFibGUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZW5hYmxlKCkge1xuICAgICAgICAgICAgICAgIHZhciBlbmFibGVkID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAwICYmIGFyZ3VtZW50c1swXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzBdXG4gICAgICAgICAgICAgICAgICAgIDogdHJ1ZTtcblxuICAgICAgICAgICAgICAgIHRoaXMuZG9tTm9kZS5zZXRBdHRyaWJ1dGUoJ2NvbnRlbnRlZGl0YWJsZScsIGVuYWJsZWQpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZm9ybWF0QXQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9ybWF0QXQoaW5kZXgsIGxlbmd0aCwgZm9ybWF0LCB2YWx1ZSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLndoaXRlbGlzdCAhPSBudWxsICYmICF0aGlzLndoaXRlbGlzdFtmb3JtYXRdKSByZXR1cm47XG4gICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgIFNjcm9sbC5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihTY3JvbGwucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICdmb3JtYXRBdCcsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBpbmRleCwgbGVuZ3RoLCBmb3JtYXQsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICB0aGlzLm9wdGltaXplKCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdpbnNlcnRBdCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBpbnNlcnRBdChpbmRleCwgdmFsdWUsIGRlZikge1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGRlZiAhPSBudWxsICYmXG4gICAgICAgICAgICAgICAgICB0aGlzLndoaXRlbGlzdCAhPSBudWxsICYmXG4gICAgICAgICAgICAgICAgICAhdGhpcy53aGl0ZWxpc3RbdmFsdWVdXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGlmIChpbmRleCA+PSB0aGlzLmxlbmd0aCgpKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIGRlZiA9PSBudWxsIHx8XG4gICAgICAgICAgICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQucXVlcnkoXG4gICAgICAgICAgICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgX3BhcmNobWVudDIuZGVmYXVsdC5TY29wZS5CTE9DSyxcbiAgICAgICAgICAgICAgICAgICAgKSA9PSBudWxsXG4gICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGJsb3QgPSBfcGFyY2htZW50Mi5kZWZhdWx0LmNyZWF0ZShcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRpY3MuZGVmYXVsdENoaWxkLFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmFwcGVuZENoaWxkKGJsb3QpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGVmID09IG51bGwgJiYgdmFsdWUuZW5kc1dpdGgoJ1xcbicpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS5zbGljZSgwLCAtMSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYmxvdC5pbnNlcnRBdCgwLCB2YWx1ZSwgZGVmKTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBlbWJlZCA9IF9wYXJjaG1lbnQyLmRlZmF1bHQuY3JlYXRlKHZhbHVlLCBkZWYpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmFwcGVuZENoaWxkKGVtYmVkKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgICAgU2Nyb2xsLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoU2Nyb2xsLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgICdpbnNlcnRBdCcsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgaW5kZXgsIHZhbHVlLCBkZWYpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLm9wdGltaXplKCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdpbnNlcnRCZWZvcmUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gaW5zZXJ0QmVmb3JlKGJsb3QsIHJlZikge1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGJsb3Quc3RhdGljcy5zY29wZSA9PT0gX3BhcmNobWVudDIuZGVmYXVsdC5TY29wZS5JTkxJTkVfQkxPVFxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgdmFyIHdyYXBwZXIgPSBfcGFyY2htZW50Mi5kZWZhdWx0LmNyZWF0ZShcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGF0aWNzLmRlZmF1bHRDaGlsZCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICB3cmFwcGVyLmFwcGVuZENoaWxkKGJsb3QpO1xuICAgICAgICAgICAgICAgICAgYmxvdCA9IHdyYXBwZXI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIF9nZXQoXG4gICAgICAgICAgICAgICAgICBTY3JvbGwucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoU2Nyb2xsLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAnaW5zZXJ0QmVmb3JlJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIGJsb3QsIHJlZik7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdsZWFmJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGxlYWYoaW5kZXgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5wYXRoKGluZGV4KS5wb3AoKSB8fCBbbnVsbCwgLTFdO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnbGluZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBsaW5lKGluZGV4KSB7XG4gICAgICAgICAgICAgICAgaWYgKGluZGV4ID09PSB0aGlzLmxlbmd0aCgpKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5saW5lKGluZGV4IC0gMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRlc2NlbmRhbnQoaXNMaW5lLCBpbmRleCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdsaW5lcycsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBsaW5lcygpIHtcbiAgICAgICAgICAgICAgICB2YXIgaW5kZXggPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDAgJiYgYXJndW1lbnRzWzBdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMF1cbiAgICAgICAgICAgICAgICAgICAgOiAwO1xuICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDEgJiYgYXJndW1lbnRzWzFdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMV1cbiAgICAgICAgICAgICAgICAgICAgOiBOdW1iZXIuTUFYX1ZBTFVFO1xuXG4gICAgICAgICAgICAgICAgdmFyIGdldExpbmVzID0gZnVuY3Rpb24gZ2V0TGluZXMoYmxvdCwgaW5kZXgsIGxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgdmFyIGxpbmVzID0gW10sXG4gICAgICAgICAgICAgICAgICAgIGxlbmd0aExlZnQgPSBsZW5ndGg7XG4gICAgICAgICAgICAgICAgICBibG90LmNoaWxkcmVuLmZvckVhY2hBdChcbiAgICAgICAgICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICAgICAgICAgIGxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKGNoaWxkLCBpbmRleCwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKGlzTGluZShjaGlsZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVzLnB1c2goY2hpbGQpO1xuICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICBjaGlsZCBpbnN0YW5jZW9mIF9wYXJjaG1lbnQyLmRlZmF1bHQuQ29udGFpbmVyXG4gICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lcyA9IGxpbmVzLmNvbmNhdChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0TGluZXMoY2hpbGQsIGluZGV4LCBsZW5ndGhMZWZ0KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aExlZnQgLT0gbGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBsaW5lcztcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJldHVybiBnZXRMaW5lcyh0aGlzLCBpbmRleCwgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ29wdGltaXplJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIG9wdGltaXplKCkge1xuICAgICAgICAgICAgICAgIHZhciBtdXRhdGlvbnMgPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDAgJiYgYXJndW1lbnRzWzBdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMF1cbiAgICAgICAgICAgICAgICAgICAgOiBbXTtcbiAgICAgICAgICAgICAgICB2YXIgY29udGV4dCA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMSAmJiBhcmd1bWVudHNbMV0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1sxXVxuICAgICAgICAgICAgICAgICAgICA6IHt9O1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuYmF0Y2ggPT09IHRydWUpIHJldHVybjtcbiAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgU2Nyb2xsLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKFNjcm9sbC5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgJ29wdGltaXplJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIG11dGF0aW9ucywgY29udGV4dCk7XG4gICAgICAgICAgICAgICAgaWYgKG11dGF0aW9ucy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLmVtaXR0ZXIuZW1pdChcbiAgICAgICAgICAgICAgICAgICAgX2VtaXR0ZXIyLmRlZmF1bHQuZXZlbnRzLlNDUk9MTF9PUFRJTUlaRSxcbiAgICAgICAgICAgICAgICAgICAgbXV0YXRpb25zLFxuICAgICAgICAgICAgICAgICAgICBjb250ZXh0LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdwYXRoJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHBhdGgoaW5kZXgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gX2dldChcbiAgICAgICAgICAgICAgICAgIFNjcm9sbC5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihTY3JvbGwucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICdwYXRoJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgLmNhbGwodGhpcywgaW5kZXgpXG4gICAgICAgICAgICAgICAgICAuc2xpY2UoMSk7IC8vIEV4Y2x1ZGUgc2VsZlxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAndXBkYXRlJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHVwZGF0ZShtdXRhdGlvbnMpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5iYXRjaCA9PT0gdHJ1ZSkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIHZhciBzb3VyY2UgPSBfZW1pdHRlcjIuZGVmYXVsdC5zb3VyY2VzLlVTRVI7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBtdXRhdGlvbnMgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICBzb3VyY2UgPSBtdXRhdGlvbnM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghQXJyYXkuaXNBcnJheShtdXRhdGlvbnMpKSB7XG4gICAgICAgICAgICAgICAgICBtdXRhdGlvbnMgPSB0aGlzLm9ic2VydmVyLnRha2VSZWNvcmRzKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChtdXRhdGlvbnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgdGhpcy5lbWl0dGVyLmVtaXQoXG4gICAgICAgICAgICAgICAgICAgIF9lbWl0dGVyMi5kZWZhdWx0LmV2ZW50cy5TQ1JPTExfQkVGT1JFX1VQREFURSxcbiAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICBtdXRhdGlvbnMsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgU2Nyb2xsLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKFNjcm9sbC5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgJ3VwZGF0ZScsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBtdXRhdGlvbnMuY29uY2F0KFtdKSk7IC8vIHBhc3MgY29weVxuICAgICAgICAgICAgICAgIGlmIChtdXRhdGlvbnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgdGhpcy5lbWl0dGVyLmVtaXQoXG4gICAgICAgICAgICAgICAgICAgIF9lbWl0dGVyMi5kZWZhdWx0LmV2ZW50cy5TQ1JPTExfVVBEQVRFLFxuICAgICAgICAgICAgICAgICAgICBzb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgIG11dGF0aW9ucyxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIHJldHVybiBTY3JvbGw7XG4gICAgICAgIH0pKF9wYXJjaG1lbnQyLmRlZmF1bHQuU2Nyb2xsKTtcblxuICAgICAgICBTY3JvbGwuYmxvdE5hbWUgPSAnc2Nyb2xsJztcbiAgICAgICAgU2Nyb2xsLmNsYXNzTmFtZSA9ICdxbC1lZGl0b3InO1xuICAgICAgICBTY3JvbGwudGFnTmFtZSA9ICdESVYnO1xuICAgICAgICBTY3JvbGwuZGVmYXVsdENoaWxkID0gJ2Jsb2NrJztcbiAgICAgICAgU2Nyb2xsLmFsbG93ZWRDaGlsZHJlbiA9IFtcbiAgICAgICAgICBfYmxvY2syLmRlZmF1bHQsXG4gICAgICAgICAgX2Jsb2NrLkJsb2NrRW1iZWQsXG4gICAgICAgICAgX2NvbnRhaW5lcjIuZGVmYXVsdCxcbiAgICAgICAgXTtcblxuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBTY3JvbGw7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiAyMyAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge1xuICAgICAgICAgIHZhbHVlOiB0cnVlLFxuICAgICAgICB9KTtcbiAgICAgICAgZXhwb3J0cy5TSE9SVEtFWSA9IGV4cG9ydHMuZGVmYXVsdCA9IHVuZGVmaW5lZDtcblxuICAgICAgICB2YXIgX3R5cGVvZiA9XG4gICAgICAgICAgdHlwZW9mIFN5bWJvbCA9PT0gJ2Z1bmN0aW9uJyAmJiB0eXBlb2YgU3ltYm9sLml0ZXJhdG9yID09PSAnc3ltYm9sJ1xuICAgICAgICAgICAgPyBmdW5jdGlvbiAob2JqKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiBvYmo7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIDogZnVuY3Rpb24gKG9iaikge1xuICAgICAgICAgICAgICAgIHJldHVybiBvYmogJiZcbiAgICAgICAgICAgICAgICAgIHR5cGVvZiBTeW1ib2wgPT09ICdmdW5jdGlvbicgJiZcbiAgICAgICAgICAgICAgICAgIG9iai5jb25zdHJ1Y3RvciA9PT0gU3ltYm9sICYmXG4gICAgICAgICAgICAgICAgICBvYmogIT09IFN5bWJvbC5wcm90b3R5cGVcbiAgICAgICAgICAgICAgICAgID8gJ3N5bWJvbCdcbiAgICAgICAgICAgICAgICAgIDogdHlwZW9mIG9iajtcbiAgICAgICAgICAgICAgfTtcblxuICAgICAgICB2YXIgX3NsaWNlZFRvQXJyYXkgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIHNsaWNlSXRlcmF0b3IoYXJyLCBpKSB7XG4gICAgICAgICAgICB2YXIgX2FyciA9IFtdO1xuICAgICAgICAgICAgdmFyIF9uID0gdHJ1ZTtcbiAgICAgICAgICAgIHZhciBfZCA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIF9lID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgZm9yIChcbiAgICAgICAgICAgICAgICB2YXIgX2kgPSBhcnJbU3ltYm9sLml0ZXJhdG9yXSgpLCBfcztcbiAgICAgICAgICAgICAgICAhKF9uID0gKF9zID0gX2kubmV4dCgpKS5kb25lKTtcbiAgICAgICAgICAgICAgICBfbiA9IHRydWVcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgX2Fyci5wdXNoKF9zLnZhbHVlKTtcbiAgICAgICAgICAgICAgICBpZiAoaSAmJiBfYXJyLmxlbmd0aCA9PT0gaSkgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBfZCA9IHRydWU7XG4gICAgICAgICAgICAgIF9lID0gZXJyO1xuICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBpZiAoIV9uICYmIF9pWydyZXR1cm4nXSkgX2lbJ3JldHVybiddKCk7XG4gICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgaWYgKF9kKSB0aHJvdyBfZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIF9hcnI7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoYXJyLCBpKSB7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShhcnIpKSB7XG4gICAgICAgICAgICAgIHJldHVybiBhcnI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKFN5bWJvbC5pdGVyYXRvciBpbiBPYmplY3QoYXJyKSkge1xuICAgICAgICAgICAgICByZXR1cm4gc2xpY2VJdGVyYXRvcihhcnIsIGkpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAg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ICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGRlYnVnID0gKDAsIF9sb2dnZXIyLmRlZmF1bHQpKCdxdWlsbDprZXlib2FyZCcpO1xuXG4gICAgICAgIHZhciBTSE9SVEtFWSA9IC9NYWMvaS50ZXN0KG5hdmlnYXRvci5wbGF0Zm9ybSkgPyAnbWV0YUtleScgOiAnY3RybEtleSc7XG5cbiAgICAgICAgdmFyIEtleWJvYXJkID0gKGZ1bmN0aW9uIChfTW9kdWxlKSB7XG4gICAgICAgICAgX2luaGVyaXRzKEtleWJvYXJkLCBfTW9kdWxlKTtcblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhLZXlib2FyZCwgbnVsbCwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdtYXRjaCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBtYXRjaChldnQsIGJpbmRpbmcpIHtcbiAgICAgICAgICAgICAgICBiaW5kaW5nID0gbm9ybWFsaXplKGJpbmRpbmcpO1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIFsnYWx0S2V5JywgJ2N0cmxLZXknLCAnbWV0YUtleScsICdzaGlmdEtleSddLnNvbWUoZnVuY3Rpb24gKFxuICAgICAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICEhYmluZGluZ1trZXldICE9PSBldnRba2V5XSAmJiBiaW5kaW5nW2tleV0gIT09IG51bGw7XG4gICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gYmluZGluZy5rZXkgPT09IChldnQud2hpY2ggfHwgZXZ0LmtleUNvZGUpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIEtleWJvYXJkKHF1aWxsLCBvcHRpb25zKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgS2V5Ym9hcmQpO1xuXG4gICAgICAgICAgICB2YXIgX3RoaXMgPSBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKEtleWJvYXJkLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoS2V5Ym9hcmQpKS5jYWxsKFxuICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgcXVpbGwsXG4gICAgICAgICAgICAgICAgb3B0aW9ucyxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgIF90aGlzLmJpbmRpbmdzID0ge307XG4gICAgICAgICAgICBPYmplY3Qua2V5cyhfdGhpcy5vcHRpb25zLmJpbmRpbmdzKS5mb3JFYWNoKGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBuYW1lID09PSAnbGlzdCBhdXRvZmlsbCcgJiZcbiAgICAgICAgICAgICAgICBxdWlsbC5zY3JvbGwud2hpdGVsaXN0ICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICAhcXVpbGwuc2Nyb2xsLndoaXRlbGlzdFsnbGlzdCddXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAoX3RoaXMub3B0aW9ucy5iaW5kaW5nc1tuYW1lXSkge1xuICAgICAgICAgICAgICAgIF90aGlzLmFkZEJpbmRpbmcoX3RoaXMub3B0aW9ucy5iaW5kaW5nc1tuYW1lXSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgX3RoaXMuYWRkQmluZGluZyhcbiAgICAgICAgICAgICAge2tleTogS2V5Ym9hcmQua2V5cy5FTlRFUiwgc2hpZnRLZXk6IG51bGx9LFxuICAgICAgICAgICAgICBoYW5kbGVFbnRlcixcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBfdGhpcy5hZGRCaW5kaW5nKFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiBLZXlib2FyZC5rZXlzLkVOVEVSLFxuICAgICAgICAgICAgICAgIG1ldGFLZXk6IG51bGwsXG4gICAgICAgICAgICAgICAgY3RybEtleTogbnVsbCxcbiAgICAgICAgICAgICAgICBhbHRLZXk6IG51bGwsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHt9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmICgvRmlyZWZveC9pLnRlc3QobmF2aWdhdG9yLnVzZXJBZ2VudCkpIHtcbiAgICAgICAgICAgICAgLy8gTmVlZCB0byBoYW5kbGUgZGVsZXRlIGFuZCBiYWNrc3BhY2UgZm9yIEZpcmVmb3ggaW4gdGhlIGdlbmVyYWwgY2FzZSAjMTE3MVxuICAgICAgICAgICAgICBfdGhpcy5hZGRCaW5kaW5nKFxuICAgICAgICAgICAgICAgIHtrZXk6IEtleWJvYXJkLmtleXMuQkFDS1NQQUNFfSxcbiAgICAgICAgICAgICAgICB7Y29sbGFwc2VkOiB0cnVlfSxcbiAgICAgICAgICAgICAgICBoYW5kbGVCYWNrc3BhY2UsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIF90aGlzLmFkZEJpbmRpbmcoXG4gICAgICAgICAgICAgICAge2tleTogS2V5Ym9hcmQua2V5cy5ERUxFVEV9LFxuICAgICAgICAgICAgICAgIHtjb2xsYXBzZWQ6IHRydWV9LFxuICAgICAgICAgICAgICAgIGhhbmRsZURlbGV0ZSxcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIF90aGlzLmFkZEJpbmRpbmcoXG4gICAgICAgICAgICAgICAge2tleTogS2V5Ym9hcmQua2V5cy5CQUNLU1BBQ0V9LFxuICAgICAgICAgICAgICAgIHtjb2xsYXBzZWQ6IHRydWUsIHByZWZpeDogL14uPyQvfSxcbiAgICAgICAgICAgICAgICBoYW5kbGVCYWNrc3BhY2UsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIF90aGlzLmFkZEJpbmRpbmcoXG4gICAgICAgICAgICAgICAge2tleTogS2V5Ym9hcmQua2V5cy5ERUxFVEV9LFxuICAgICAgICAgICAgICAgIHtjb2xsYXBzZWQ6IHRydWUsIHN1ZmZpeDogL14uPyQvfSxcbiAgICAgICAgICAgICAgICBoYW5kbGVEZWxldGUsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBfdGhpcy5hZGRCaW5kaW5nKFxuICAgICAgICAgICAgICB7a2V5OiBLZXlib2FyZC5rZXlzLkJBQ0tTUEFDRX0sXG4gICAgICAgICAgICAgIHtjb2xsYXBzZWQ6IGZhbHNlfSxcbiAgICAgICAgICAgICAgaGFuZGxlRGVsZXRlUmFuZ2UsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgX3RoaXMuYWRkQmluZGluZyhcbiAgICAgICAgICAgICAge2tleTogS2V5Ym9hcmQua2V5cy5ERUxFVEV9LFxuICAgICAgICAgICAgICB7Y29sbGFwc2VkOiBmYWxzZX0sXG4gICAgICAgICAgICAgIGhhbmRsZURlbGV0ZVJhbmdlLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIF90aGlzLmFkZEJpbmRpbmcoXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6IEtleWJvYXJkLmtleXMuQkFDS1NQQUNFLFxuICAgICAgICAgICAgICAgIGFsdEtleTogbnVsbCxcbiAgICAgICAgICAgICAgICBjdHJsS2V5OiBudWxsLFxuICAgICAgICAgICAgICAgIG1ldGFLZXk6IG51bGwsXG4gICAgICAgICAgICAgICAgc2hpZnRLZXk6IG51bGwsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtjb2xsYXBzZWQ6IHRydWUsIG9mZnNldDogMH0sXG4gICAgICAgICAgICAgIGhhbmRsZUJhY2tzcGFjZSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBfdGhpcy5saXN0ZW4oKTtcbiAgICAgICAgICAgIHJldHVybiBfdGhpcztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoS2V5Ym9hcmQsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnYWRkQmluZGluZycsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBhZGRCaW5kaW5nKGtleSkge1xuICAgICAgICAgICAgICAgIHZhciBjb250ZXh0ID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAxICYmIGFyZ3VtZW50c1sxXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzFdXG4gICAgICAgICAgICAgICAgICAgIDoge307XG4gICAgICAgICAgICAgICAgdmFyIGhhbmRsZXIgPVxuICAgICAgICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDIgJiYgYXJndW1lbnRzWzJdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMl1cbiAgICAgICAgICAgICAgICAgICAgOiB7fTtcblxuICAgICAgICAgICAgICAgIHZhciBiaW5kaW5nID0gbm9ybWFsaXplKGtleSk7XG4gICAgICAgICAgICAgICAgaWYgKGJpbmRpbmcgPT0gbnVsbCB8fCBiaW5kaW5nLmtleSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gZGVidWcud2FybihcbiAgICAgICAgICAgICAgICAgICAgJ0F0dGVtcHRlZCB0byBhZGQgaW52YWxpZCBrZXlib2FyZCBiaW5kaW5nJyxcbiAgICAgICAgICAgICAgICAgICAgYmluZGluZyxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgY29udGV4dCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgY29udGV4dCA9IHtoYW5kbGVyOiBjb250ZXh0fTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBoYW5kbGVyID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICBoYW5kbGVyID0ge2hhbmRsZXI6IGhhbmRsZXJ9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBiaW5kaW5nID0gKDAsIF9leHRlbmQyLmRlZmF1bHQpKGJpbmRpbmcsIGNvbnRleHQsIGhhbmRsZXIpO1xuICAgICAgICAgICAgICAgIHRoaXMuYmluZGluZ3NbYmluZGluZy5rZXldID0gdGhpcy5iaW5kaW5nc1tiaW5kaW5nLmtleV0gfHwgW107XG4gICAgICAgICAgICAgICAgdGhpcy5iaW5kaW5nc1tiaW5kaW5nLmtleV0ucHVzaChiaW5kaW5nKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2xpc3RlbicsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBsaXN0ZW4oKSB7XG4gICAgICAgICAgICAgICAgdmFyIF90aGlzMiA9IHRoaXM7XG5cbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnJvb3QuYWRkRXZlbnRMaXN0ZW5lcigna2V5ZG93bicsIGZ1bmN0aW9uIChldnQpIHtcbiAgICAgICAgICAgICAgICAgIGlmIChldnQuZGVmYXVsdFByZXZlbnRlZCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgdmFyIHdoaWNoID0gZXZ0LndoaWNoIHx8IGV2dC5rZXlDb2RlO1xuICAgICAgICAgICAgICAgICAgdmFyIGJpbmRpbmdzID0gKF90aGlzMi5iaW5kaW5nc1t3aGljaF0gfHwgW10pLmZpbHRlcihcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKGJpbmRpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gS2V5Ym9hcmQubWF0Y2goZXZ0LCBiaW5kaW5nKTtcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBpZiAoYmluZGluZ3MubGVuZ3RoID09PSAwKSByZXR1cm47XG4gICAgICAgICAgICAgICAgICB2YXIgcmFuZ2UgPSBfdGhpczIucXVpbGwuZ2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgICAgICAgICBpZiAocmFuZ2UgPT0gbnVsbCB8fCAhX3RoaXMyLnF1aWxsLmhhc0ZvY3VzKCkpIHJldHVybjtcblxuICAgICAgICAgICAgICAgICAgdmFyIF9xdWlsbCRnZXRMaW5lID0gX3RoaXMyLnF1aWxsLmdldExpbmUocmFuZ2UuaW5kZXgpLFxuICAgICAgICAgICAgICAgICAgICBfcXVpbGwkZ2V0TGluZTIgPSBfc2xpY2VkVG9BcnJheShfcXVpbGwkZ2V0TGluZSwgMiksXG4gICAgICAgICAgICAgICAgICAgIGxpbmUgPSBfcXVpbGwkZ2V0TGluZTJbMF0sXG4gICAgICAgICAgICAgICAgICAgIG9mZnNldCA9IF9xdWlsbCRnZXRMaW5lMlsxXTtcblxuICAgICAgICAgICAgICAgICAgdmFyIF9xdWlsbCRnZXRMZWFmID0gX3RoaXMyLnF1aWxsLmdldExlYWYocmFuZ2UuaW5kZXgpLFxuICAgICAgICAgICAgICAgICAgICBfcXVpbGwkZ2V0TGVhZjIgPSBfc2xpY2VkVG9BcnJheShfcXVpbGwkZ2V0TGVhZiwgMiksXG4gICAgICAgICAgICAgICAgICAgIGxlYWZTdGFydCA9IF9xdWlsbCRnZXRMZWFmMlswXSxcbiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0U3RhcnQgPSBfcXVpbGwkZ2V0TGVhZjJbMV07XG5cbiAgICAgICAgICAgICAgICAgIHZhciBfcmVmID1cbiAgICAgICAgICAgICAgICAgICAgICByYW5nZS5sZW5ndGggPT09IDBcbiAgICAgICAgICAgICAgICAgICAgICAgID8gW2xlYWZTdGFydCwgb2Zmc2V0U3RhcnRdXG4gICAgICAgICAgICAgICAgICAgICAgICA6IF90aGlzMi5xdWlsbC5nZXRMZWFmKHJhbmdlLmluZGV4ICsgcmFuZ2UubGVuZ3RoKSxcbiAgICAgICAgICAgICAgICAgICAgX3JlZjIgPSBfc2xpY2VkVG9BcnJheShfcmVmLCAyKSxcbiAgICAgICAgICAgICAgICAgICAgbGVhZkVuZCA9IF9yZWYyWzBdLFxuICAgICAgICAgICAgICAgICAgICBvZmZzZXRFbmQgPSBfcmVmMlsxXTtcblxuICAgICAgICAgICAgICAgICAgdmFyIHByZWZpeFRleHQgPVxuICAgICAgICAgICAgICAgICAgICBsZWFmU3RhcnQgaW5zdGFuY2VvZiBfcGFyY2htZW50Mi5kZWZhdWx0LlRleHRcbiAgICAgICAgICAgICAgICAgICAgICA/IGxlYWZTdGFydC52YWx1ZSgpLnNsaWNlKDAsIG9mZnNldFN0YXJ0KVxuICAgICAgICAgICAgICAgICAgICAgIDogJyc7XG4gICAgICAgICAgICAgICAgICB2YXIgc3VmZml4VGV4dCA9XG4gICAgICAgICAgICAgICAgICAgIGxlYWZFbmQgaW5zdGFuY2VvZiBfcGFyY2htZW50Mi5kZWZhdWx0LlRleHRcbiAgICAgICAgICAgICAgICAgICAgICA/IGxlYWZFbmQudmFsdWUoKS5zbGljZShvZmZzZXRFbmQpXG4gICAgICAgICAgICAgICAgICAgICAgOiAnJztcbiAgICAgICAgICAgICAgICAgIHZhciBjdXJDb250ZXh0ID0ge1xuICAgICAgICAgICAgICAgICAgICBjb2xsYXBzZWQ6IHJhbmdlLmxlbmd0aCA9PT0gMCxcbiAgICAgICAgICAgICAgICAgICAgZW1wdHk6IHJhbmdlLmxlbmd0aCA9PT0gMCAmJiBsaW5lLmxlbmd0aCgpIDw9IDEsXG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdDogX3RoaXMyLnF1aWxsLmdldEZvcm1hdChyYW5nZSksXG4gICAgICAgICAgICAgICAgICAgIG9mZnNldDogb2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICBwcmVmaXg6IHByZWZpeFRleHQsXG4gICAgICAgICAgICAgICAgICAgIHN1ZmZpeDogc3VmZml4VGV4dCxcbiAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICB2YXIgcHJldmVudGVkID0gYmluZGluZ3Muc29tZShmdW5jdGlvbiAoYmluZGluZykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgYmluZGluZy5jb2xsYXBzZWQgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgICAgIGJpbmRpbmcuY29sbGFwc2VkICE9PSBjdXJDb250ZXh0LmNvbGxhcHNlZFxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgYmluZGluZy5lbXB0eSAhPSBudWxsICYmXG4gICAgICAgICAgICAgICAgICAgICAgYmluZGluZy5lbXB0eSAhPT0gY3VyQ29udGV4dC5lbXB0eVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgYmluZGluZy5vZmZzZXQgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgICAgIGJpbmRpbmcub2Zmc2V0ICE9PSBjdXJDb250ZXh0Lm9mZnNldFxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShiaW5kaW5nLmZvcm1hdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAvLyBhbnkgZm9ybWF0IGlzIHByZXNlbnRcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICBiaW5kaW5nLmZvcm1hdC5ldmVyeShmdW5jdGlvbiAobmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY3VyQ29udGV4dC5mb3JtYXRbbmFtZV0gPT0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKF90eXBlb2YoYmluZGluZy5mb3JtYXQpID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgICAgICAgIC8vIGFsbCBmb3JtYXRzIG11c3QgbWF0Y2hcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAhT2JqZWN0LmtleXMoYmluZGluZy5mb3JtYXQpLmV2ZXJ5KGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChiaW5kaW5nLmZvcm1hdFtuYW1lXSA9PT0gdHJ1ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY3VyQ29udGV4dC5mb3JtYXRbbmFtZV0gIT0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGJpbmRpbmcuZm9ybWF0W25hbWVdID09PSBmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY3VyQ29udGV4dC5mb3JtYXRbbmFtZV0gPT0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICgwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfZGVlcEVxdWFsMi5kZWZhdWx0KShiaW5kaW5nLmZvcm1hdFtuYW1lXSwgY3VyQ29udGV4dC5mb3JtYXRbbmFtZV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGJpbmRpbmcucHJlZml4ICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICAgICAgICAhYmluZGluZy5wcmVmaXgudGVzdChjdXJDb250ZXh0LnByZWZpeClcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGJpbmRpbmcuc3VmZml4ICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICAgICAgICAhYmluZGluZy5zdWZmaXgudGVzdChjdXJDb250ZXh0LnN1ZmZpeClcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgICAgICBiaW5kaW5nLmhhbmRsZXIuY2FsbChfdGhpczIsIHJhbmdlLCBjdXJDb250ZXh0KSAhPT0gdHJ1ZVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICBpZiAocHJldmVudGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGV2dC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIHJldHVybiBLZXlib2FyZDtcbiAgICAgICAgfSkoX21vZHVsZTIuZGVmYXVsdCk7XG5cbiAgICAgICAgS2V5Ym9hcmQua2V5cyA9IHtcbiAgICAgICAgICBCQUNLU1BBQ0U6IDgsXG4gICAgICAgICAgVEFCOiA5LFxuICAgICAgICAgIEVOVEVSOiAxMyxcbiAgICAgICAgICBFU0NBUEU6IDI3LFxuICAgICAgICAgIExFRlQ6IDM3LFxuICAgICAgICAgIFVQOiAzOCxcbiAgICAgICAgICBSSUdIVDogMzksXG4gICAgICAgICAgRE9XTjogNDAsXG4gICAgICAgICAgREVMRVRFOiA0NixcbiAgICAgICAgfTtcblxuICAgICAgICBLZXlib2FyZC5ERUZBVUxUUyA9IHtcbiAgICAgICAgICBiaW5kaW5nczoge1xuICAgICAgICAgICAgYm9sZDogbWFrZUZvcm1hdEhhbmRsZXIoJ2JvbGQnKSxcbiAgICAgICAgICAgIGl0YWxpYzogbWFrZUZvcm1hdEhhbmRsZXIoJ2l0YWxpYycpLFxuICAgICAgICAgICAgdW5kZXJsaW5lOiBtYWtlRm9ybWF0SGFuZGxlcigndW5kZXJsaW5lJyksXG4gICAgICAgICAgICBpbmRlbnQ6IHtcbiAgICAgICAgICAgICAgLy8gaGlnaGxpZ2h0IHRhYiBvciB0YWIgYXQgYmVnaW5uaW5nIG9mIGxpc3QsIGluZGVudCBvciBibG9ja3F1b3RlXG4gICAgICAgICAgICAgIGtleTogS2V5Ym9hcmQua2V5cy5UQUIsXG4gICAgICAgICAgICAgIGZvcm1hdDogWydibG9ja3F1b3RlJywgJ2luZGVudCcsICdsaXN0J10sXG4gICAgICAgICAgICAgIGhhbmRsZXI6IGZ1bmN0aW9uIGhhbmRsZXIocmFuZ2UsIGNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5jb2xsYXBzZWQgJiYgY29udGV4dC5vZmZzZXQgIT09IDApIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuZm9ybWF0KCdpbmRlbnQnLCAnKzEnLCBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBvdXRkZW50OiB7XG4gICAgICAgICAgICAgIGtleTogS2V5Ym9hcmQua2V5cy5UQUIsXG4gICAgICAgICAgICAgIHNoaWZ0S2V5OiB0cnVlLFxuICAgICAgICAgICAgICBmb3JtYXQ6IFsnYmxvY2txdW90ZScsICdpbmRlbnQnLCAnbGlzdCddLFxuICAgICAgICAgICAgICAvLyBoaWdobGlnaHQgdGFiIG9yIHRhYiBhdCBiZWdpbm5pbmcgb2YgbGlzdCwgaW5kZW50IG9yIGJsb2NrcXVvdGVcbiAgICAgICAgICAgICAgaGFuZGxlcjogZnVuY3Rpb24gaGFuZGxlcihyYW5nZSwgY29udGV4dCkge1xuICAgICAgICAgICAgICAgIGlmIChjb250ZXh0LmNvbGxhcHNlZCAmJiBjb250ZXh0Lm9mZnNldCAhPT0gMCkgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5mb3JtYXQoJ2luZGVudCcsICctMScsIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlVTRVIpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICdvdXRkZW50IGJhY2tzcGFjZSc6IHtcbiAgICAgICAgICAgICAga2V5OiBLZXlib2FyZC5rZXlzLkJBQ0tTUEFDRSxcbiAgICAgICAgICAgICAgY29sbGFwc2VkOiB0cnVlLFxuICAgICAgICAgICAgICBzaGlmdEtleTogbnVsbCxcbiAgICAgICAgICAgICAgbWV0YUtleTogbnVsbCxcbiAgICAgICAgICAgICAgY3RybEtleTogbnVsbCxcbiAgICAgICAgICAgICAgYWx0S2V5OiBudWxsLFxuICAgICAgICAgICAgICBmb3JtYXQ6IFsnaW5kZW50JywgJ2xpc3QnXSxcbiAgICAgICAgICAgICAgb2Zmc2V0OiAwLFxuICAgICAgICAgICAgICBoYW5kbGVyOiBmdW5jdGlvbiBoYW5kbGVyKHJhbmdlLCBjb250ZXh0KSB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbnRleHQuZm9ybWF0LmluZGVudCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdChcbiAgICAgICAgICAgICAgICAgICAgJ2luZGVudCcsXG4gICAgICAgICAgICAgICAgICAgICctMScsXG4gICAgICAgICAgICAgICAgICAgIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlVTRVIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5mb3JtYXQubGlzdCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdChcbiAgICAgICAgICAgICAgICAgICAgJ2xpc3QnLFxuICAgICAgICAgICAgICAgICAgICBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICdpbmRlbnQgY29kZS1ibG9jayc6IG1ha2VDb2RlQmxvY2tIYW5kbGVyKHRydWUpLFxuICAgICAgICAgICAgJ291dGRlbnQgY29kZS1ibG9jayc6IG1ha2VDb2RlQmxvY2tIYW5kbGVyKGZhbHNlKSxcbiAgICAgICAgICAgICdyZW1vdmUgdGFiJzoge1xuICAgICAgICAgICAgICBrZXk6IEtleWJvYXJkLmtleXMuVEFCLFxuICAgICAgICAgICAgICBzaGlmdEtleTogdHJ1ZSxcbiAgICAgICAgICAgICAgY29sbGFwc2VkOiB0cnVlLFxuICAgICAgICAgICAgICBwcmVmaXg6IC9cXHQkLyxcbiAgICAgICAgICAgICAgaGFuZGxlcjogZnVuY3Rpb24gaGFuZGxlcihyYW5nZSkge1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuZGVsZXRlVGV4dChcbiAgICAgICAgICAgICAgICAgIHJhbmdlLmluZGV4IC0gMSxcbiAgICAgICAgICAgICAgICAgIDEsXG4gICAgICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdGFiOiB7XG4gICAgICAgICAgICAgIGtleTogS2V5Ym9hcmQua2V5cy5UQUIsXG4gICAgICAgICAgICAgIGhhbmRsZXI6IGZ1bmN0aW9uIGhhbmRsZXIocmFuZ2UpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmhpc3RvcnkuY3V0b2ZmKCk7XG4gICAgICAgICAgICAgICAgdmFyIGRlbHRhID0gbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KClcbiAgICAgICAgICAgICAgICAgIC5yZXRhaW4ocmFuZ2UuaW5kZXgpXG4gICAgICAgICAgICAgICAgICAuZGVsZXRlKHJhbmdlLmxlbmd0aClcbiAgICAgICAgICAgICAgICAgIC5pbnNlcnQoJ1xcdCcpO1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwudXBkYXRlQ29udGVudHMoZGVsdGEsIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlVTRVIpO1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuaGlzdG9yeS5jdXRvZmYoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnNldFNlbGVjdGlvbihcbiAgICAgICAgICAgICAgICAgIHJhbmdlLmluZGV4ICsgMSxcbiAgICAgICAgICAgICAgICAgIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlNJTEVOVCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICdsaXN0IGVtcHR5IGVudGVyJzoge1xuICAgICAgICAgICAgICBrZXk6IEtleWJvYXJkLmtleXMuRU5URVIsXG4gICAgICAgICAgICAgIGNvbGxhcHNlZDogdHJ1ZSxcbiAgICAgICAgICAgICAgZm9ybWF0OiBbJ2xpc3QnXSxcbiAgICAgICAgICAgICAgZW1wdHk6IHRydWUsXG4gICAgICAgICAgICAgIGhhbmRsZXI6IGZ1bmN0aW9uIGhhbmRsZXIocmFuZ2UsIGNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdCgnbGlzdCcsIGZhbHNlLCBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSKTtcbiAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5mb3JtYXQuaW5kZW50KSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdChcbiAgICAgICAgICAgICAgICAgICAgJ2luZGVudCcsXG4gICAgICAgICAgICAgICAgICAgIGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgJ2NoZWNrbGlzdCBlbnRlcic6IHtcbiAgICAgICAgICAgICAga2V5OiBLZXlib2FyZC5rZXlzLkVOVEVSLFxuICAgICAgICAgICAgICBjb2xsYXBzZWQ6IHRydWUsXG4gICAgICAgICAgICAgIGZvcm1hdDoge2xpc3Q6ICdjaGVja2VkJ30sXG4gICAgICAgICAgICAgIGhhbmRsZXI6IGZ1bmN0aW9uIGhhbmRsZXIocmFuZ2UpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3F1aWxsJGdldExpbmUzID0gdGhpcy5xdWlsbC5nZXRMaW5lKHJhbmdlLmluZGV4KSxcbiAgICAgICAgICAgICAgICAgIF9xdWlsbCRnZXRMaW5lNCA9IF9zbGljZWRUb0FycmF5KF9xdWlsbCRnZXRMaW5lMywgMiksXG4gICAgICAgICAgICAgICAgICBsaW5lID0gX3F1aWxsJGdldExpbmU0WzBdLFxuICAgICAgICAgICAgICAgICAgb2Zmc2V0ID0gX3F1aWxsJGdldExpbmU0WzFdO1xuXG4gICAgICAgICAgICAgICAgdmFyIGZvcm1hdHMgPSAoMCwgX2V4dGVuZDIuZGVmYXVsdCkoe30sIGxpbmUuZm9ybWF0cygpLCB7XG4gICAgICAgICAgICAgICAgICBsaXN0OiAnY2hlY2tlZCcsXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgdmFyIGRlbHRhID0gbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KClcbiAgICAgICAgICAgICAgICAgIC5yZXRhaW4ocmFuZ2UuaW5kZXgpXG4gICAgICAgICAgICAgICAgICAuaW5zZXJ0KCdcXG4nLCBmb3JtYXRzKVxuICAgICAgICAgICAgICAgICAgLnJldGFpbihsaW5lLmxlbmd0aCgpIC0gb2Zmc2V0IC0gMSlcbiAgICAgICAgICAgICAgICAgIC5yZXRhaW4oMSwge2xpc3Q6ICd1bmNoZWNrZWQnfSk7XG4gICAgICAgICAgICAgICAgdGhpcy5xdWlsbC51cGRhdGVDb250ZW50cyhkZWx0YSwgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUik7XG4gICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5zZXRTZWxlY3Rpb24oXG4gICAgICAgICAgICAgICAgICByYW5nZS5pbmRleCArIDEsXG4gICAgICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5TSUxFTlQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnNjcm9sbEludG9WaWV3KCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgJ2hlYWRlciBlbnRlcic6IHtcbiAgICAgICAgICAgICAga2V5OiBLZXlib2FyZC5rZXlzLkVOVEVSLFxuICAgICAgICAgICAgICBjb2xsYXBzZWQ6IHRydWUsXG4gICAgICAgICAgICAgIGZvcm1hdDogWydoZWFkZXInXSxcbiAgICAgICAgICAgICAgc3VmZml4OiAvXiQvLFxuICAgICAgICAgICAgICBoYW5kbGVyOiBmdW5jdGlvbiBoYW5kbGVyKHJhbmdlLCBjb250ZXh0KSB7XG4gICAgICAgICAgICAgICAgdmFyIF9xdWlsbCRnZXRMaW5lNSA9IHRoaXMucXVpbGwuZ2V0TGluZShyYW5nZS5pbmRleCksXG4gICAgICAgICAgICAgICAgICBfcXVpbGwkZ2V0TGluZTYgPSBfc2xpY2VkVG9BcnJheShfcXVpbGwkZ2V0TGluZTUsIDIpLFxuICAgICAgICAgICAgICAgICAgbGluZSA9IF9xdWlsbCRnZXRMaW5lNlswXSxcbiAgICAgICAgICAgICAgICAgIG9mZnNldCA9IF9xdWlsbCRnZXRMaW5lNlsxXTtcblxuICAgICAgICAgICAgICAgIHZhciBkZWx0YSA9IG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpXG4gICAgICAgICAgICAgICAgICAucmV0YWluKHJhbmdlLmluZGV4KVxuICAgICAgICAgICAgICAgICAgLmluc2VydCgnXFxuJywgY29udGV4dC5mb3JtYXQpXG4gICAgICAgICAgICAgICAgICAucmV0YWluKGxpbmUubGVuZ3RoKCkgLSBvZmZzZXQgLSAxKVxuICAgICAgICAgICAgICAgICAgLnJldGFpbigxLCB7aGVhZGVyOiBudWxsfSk7XG4gICAgICAgICAgICAgICAgdGhpcy5xdWlsbC51cGRhdGVDb250ZW50cyhkZWx0YSwgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUik7XG4gICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5zZXRTZWxlY3Rpb24oXG4gICAgICAgICAgICAgICAgICByYW5nZS5pbmRleCArIDEsXG4gICAgICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5TSUxFTlQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnNjcm9sbEludG9WaWV3KCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgJ2xpc3QgYXV0b2ZpbGwnOiB7XG4gICAgICAgICAgICAgIGtleTogJyAnLFxuICAgICAgICAgICAgICBjb2xsYXBzZWQ6IHRydWUsXG4gICAgICAgICAgICAgIGZvcm1hdDoge2xpc3Q6IGZhbHNlfSxcbiAgICAgICAgICAgICAgcHJlZml4OiAvXlxccyo/KFxcZCtcXC58LXxcXCp8XFxbID9cXF18XFxbeFxcXSkkLyxcbiAgICAgICAgICAgICAgaGFuZGxlcjogZnVuY3Rpb24gaGFuZGxlcihyYW5nZSwgY29udGV4dCkge1xuICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPSBjb250ZXh0LnByZWZpeC5sZW5ndGg7XG5cbiAgICAgICAgICAgICAgICB2YXIgX3F1aWxsJGdldExpbmU3ID0gdGhpcy5xdWlsbC5nZXRMaW5lKHJhbmdlLmluZGV4KSxcbiAgICAgICAgICAgICAgICAgIF9xdWlsbCRnZXRMaW5lOCA9IF9zbGljZWRUb0FycmF5KF9xdWlsbCRnZXRMaW5lNywgMiksXG4gICAgICAgICAgICAgICAgICBsaW5lID0gX3F1aWxsJGdldExpbmU4WzBdLFxuICAgICAgICAgICAgICAgICAgb2Zmc2V0ID0gX3F1aWxsJGdldExpbmU4WzFdO1xuXG4gICAgICAgICAgICAgICAgaWYgKG9mZnNldCA+IGxlbmd0aCkgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gdm9pZCAwO1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoY29udGV4dC5wcmVmaXgudHJpbSgpKSB7XG4gICAgICAgICAgICAgICAgICBjYXNlICdbXSc6XG4gICAgICAgICAgICAgICAgICBjYXNlICdbIF0nOlxuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9ICd1bmNoZWNrZWQnO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgIGNhc2UgJ1t4XSc6XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gJ2NoZWNrZWQnO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgIGNhc2UgJy0nOlxuICAgICAgICAgICAgICAgICAgY2FzZSAnKic6XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gJ2J1bGxldCc7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSAnb3JkZXJlZCc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuaW5zZXJ0VGV4dChcbiAgICAgICAgICAgICAgICAgIHJhbmdlLmluZGV4LFxuICAgICAgICAgICAgICAgICAgJyAnLFxuICAgICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuaGlzdG9yeS5jdXRvZmYoKTtcbiAgICAgICAgICAgICAgICB2YXIgZGVsdGEgPSBuZXcgX3F1aWxsRGVsdGEyLmRlZmF1bHQoKVxuICAgICAgICAgICAgICAgICAgLnJldGFpbihyYW5nZS5pbmRleCAtIG9mZnNldClcbiAgICAgICAgICAgICAgICAgIC5kZWxldGUobGVuZ3RoICsgMSlcbiAgICAgICAgICAgICAgICAgIC5yZXRhaW4obGluZS5sZW5ndGgoKSAtIDIgLSBvZmZzZXQpXG4gICAgICAgICAgICAgICAgICAucmV0YWluKDEsIHtsaXN0OiB2YWx1ZX0pO1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwudXBkYXRlQ29udGVudHMoZGVsdGEsIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlVTRVIpO1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuaGlzdG9yeS5jdXRvZmYoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnNldFNlbGVjdGlvbihcbiAgICAgICAgICAgICAgICAgIHJhbmdlLmluZGV4IC0gbGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuU0lMRU5ULFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgJ2NvZGUgZXhpdCc6IHtcbiAgICAgICAgICAgICAga2V5OiBLZXlib2FyZC5rZXlzLkVOVEVSLFxuICAgICAgICAgICAgICBjb2xsYXBzZWQ6IHRydWUsXG4gICAgICAgICAgICAgIGZvcm1hdDogWydjb2RlLWJsb2NrJ10sXG4gICAgICAgICAgICAgIHByZWZpeDogL1xcblxcbiQvLFxuICAgICAgICAgICAgICBzdWZmaXg6IC9eXFxzKyQvLFxuICAgICAgICAgICAgICBoYW5kbGVyOiBmdW5jdGlvbiBoYW5kbGVyKHJhbmdlKSB7XG4gICAgICAgICAgICAgICAgdmFyIF9xdWlsbCRnZXRMaW5lOSA9IHRoaXMucXVpbGwuZ2V0TGluZShyYW5nZS5pbmRleCksXG4gICAgICAgICAgICAgICAgICBfcXVpbGwkZ2V0TGluZTEwID0gX3NsaWNlZFRvQXJyYXkoX3F1aWxsJGdldExpbmU5LCAyKSxcbiAgICAgICAgICAgICAgICAgIGxpbmUgPSBfcXVpbGwkZ2V0TGluZTEwWzBdLFxuICAgICAgICAgICAgICAgICAgb2Zmc2V0ID0gX3F1aWxsJGdldExpbmUxMFsxXTtcblxuICAgICAgICAgICAgICAgIHZhciBkZWx0YSA9IG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpXG4gICAgICAgICAgICAgICAgICAucmV0YWluKHJhbmdlLmluZGV4ICsgbGluZS5sZW5ndGgoKSAtIG9mZnNldCAtIDIpXG4gICAgICAgICAgICAgICAgICAucmV0YWluKDEsIHsnY29kZS1ibG9jayc6IG51bGx9KVxuICAgICAgICAgICAgICAgICAgLmRlbGV0ZSgxKTtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnVwZGF0ZUNvbnRlbnRzKGRlbHRhLCBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAnZW1iZWQgbGVmdCc6IG1ha2VFbWJlZEFycm93SGFuZGxlcihLZXlib2FyZC5rZXlzLkxFRlQsIGZhbHNlKSxcbiAgICAgICAgICAgICdlbWJlZCBsZWZ0IHNoaWZ0JzogbWFrZUVtYmVkQXJyb3dIYW5kbGVyKEtleWJvYXJkLmtleXMuTEVGVCwgdHJ1ZSksXG4gICAgICAgICAgICAnZW1iZWQgcmlnaHQnOiBtYWtlRW1iZWRBcnJvd0hhbmRsZXIoS2V5Ym9hcmQua2V5cy5SSUdIVCwgZmFsc2UpLFxuICAgICAgICAgICAgJ2VtYmVkIHJpZ2h0IHNoaWZ0JzogbWFrZUVtYmVkQXJyb3dIYW5kbGVyKFxuICAgICAgICAgICAgICBLZXlib2FyZC5rZXlzLlJJR0hULFxuICAgICAgICAgICAgICB0cnVlLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICB9LFxuICAgICAgICB9O1xuXG4gICAgICAgIGZ1bmN0aW9uIG1ha2VFbWJlZEFycm93SGFuZGxlcihrZXksIHNoaWZ0S2V5KSB7XG4gICAgICAgICAgdmFyIF9yZWYzO1xuXG4gICAgICAgICAgdmFyIHdoZXJlID0ga2V5ID09PSBLZXlib2FyZC5rZXlzLkxFRlQgPyAncHJlZml4JyA6ICdzdWZmaXgnO1xuICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAoX3JlZjMgPSB7XG4gICAgICAgICAgICAgIGtleToga2V5LFxuICAgICAgICAgICAgICBzaGlmdEtleTogc2hpZnRLZXksXG4gICAgICAgICAgICAgIGFsdEtleTogbnVsbCxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgX2RlZmluZVByb3BlcnR5KF9yZWYzLCB3aGVyZSwgL14kLyksXG4gICAgICAgICAgICBfZGVmaW5lUHJvcGVydHkoX3JlZjMsICdoYW5kbGVyJywgZnVuY3Rpb24gaGFuZGxlcihyYW5nZSkge1xuICAgICAgICAgICAgICB2YXIgaW5kZXggPSByYW5nZS5pbmRleDtcbiAgICAgICAgICAgICAgaWYgKGtleSA9PT0gS2V5Ym9hcmQua2V5cy5SSUdIVCkge1xuICAgICAgICAgICAgICAgIGluZGV4ICs9IHJhbmdlLmxlbmd0aCArIDE7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICB2YXIgX3F1aWxsJGdldExlYWYzID0gdGhpcy5xdWlsbC5nZXRMZWFmKGluZGV4KSxcbiAgICAgICAgICAgICAgICBfcXVpbGwkZ2V0TGVhZjQgPSBfc2xpY2VkVG9BcnJheShfcXVpbGwkZ2V0TGVhZjMsIDEpLFxuICAgICAgICAgICAgICAgIGxlYWYgPSBfcXVpbGwkZ2V0TGVhZjRbMF07XG5cbiAgICAgICAgICAgICAgaWYgKCEobGVhZiBpbnN0YW5jZW9mIF9wYXJjaG1lbnQyLmRlZmF1bHQuRW1iZWQpKSByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgaWYgKGtleSA9PT0gS2V5Ym9hcmQua2V5cy5MRUZUKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNoaWZ0S2V5KSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnNldFNlbGVjdGlvbihcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UuaW5kZXggLSAxLFxuICAgICAgICAgICAgICAgICAgICByYW5nZS5sZW5ndGggKyAxLFxuICAgICAgICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5zZXRTZWxlY3Rpb24oXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLmluZGV4IC0gMSxcbiAgICAgICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChzaGlmdEtleSkge1xuICAgICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5zZXRTZWxlY3Rpb24oXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLmluZGV4LFxuICAgICAgICAgICAgICAgICAgICByYW5nZS5sZW5ndGggKyAxLFxuICAgICAgICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5zZXRTZWxlY3Rpb24oXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLmluZGV4ICsgcmFuZ2UubGVuZ3RoICsgMSxcbiAgICAgICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgX3JlZjNcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlQmFja3NwYWNlKHJhbmdlLCBjb250ZXh0KSB7XG4gICAgICAgICAgaWYgKHJhbmdlLmluZGV4ID09PSAwIHx8IHRoaXMucXVpbGwuZ2V0TGVuZ3RoKCkgPD0gMSkgcmV0dXJuO1xuXG4gICAgICAgICAgdmFyIF9xdWlsbCRnZXRMaW5lMTEgPSB0aGlzLnF1aWxsLmdldExpbmUocmFuZ2UuaW5kZXgpLFxuICAgICAgICAgICAgX3F1aWxsJGdldExpbmUxMiA9IF9zbGljZWRUb0FycmF5KF9xdWlsbCRnZXRMaW5lMTEsIDEpLFxuICAgICAgICAgICAgbGluZSA9IF9xdWlsbCRnZXRMaW5lMTJbMF07XG5cbiAgICAgICAgICB2YXIgZm9ybWF0cyA9IHt9O1xuICAgICAgICAgIGlmIChjb250ZXh0Lm9mZnNldCA9PT0gMCkge1xuICAgICAgICAgICAgdmFyIF9xdWlsbCRnZXRMaW5lMTMgPSB0aGlzLnF1aWxsLmdldExpbmUocmFuZ2UuaW5kZXggLSAxKSxcbiAgICAgICAgICAgICAgX3F1aWxsJGdldExpbmUxNCA9IF9zbGljZWRUb0FycmF5KF9xdWlsbCRnZXRMaW5lMTMsIDEpLFxuICAgICAgICAgICAgICBwcmV2ID0gX3F1aWxsJGdldExpbmUxNFswXTtcblxuICAgICAgICAgICAgaWYgKHByZXYgIT0gbnVsbCAmJiBwcmV2Lmxlbmd0aCgpID4gMSkge1xuICAgICAgICAgICAgICB2YXIgY3VyRm9ybWF0cyA9IGxpbmUuZm9ybWF0cygpO1xuICAgICAgICAgICAgICB2YXIgcHJldkZvcm1hdHMgPSB0aGlzLnF1aWxsLmdldEZvcm1hdChyYW5nZS5pbmRleCAtIDEsIDEpO1xuICAgICAgICAgICAgICBmb3JtYXRzID1cbiAgICAgICAgICAgICAgICBfb3AyLmRlZmF1bHQuYXR0cmlidXRlcy5kaWZmKGN1ckZvcm1hdHMsIHByZXZGb3JtYXRzKSB8fCB7fTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gQ2hlY2sgZm9yIGFzdHJhbCBzeW1ib2xzXG4gICAgICAgICAgdmFyIGxlbmd0aCA9IC9bXFx1RDgwMC1cXHVEQkZGXVtcXHVEQzAwLVxcdURGRkZdJC8udGVzdChjb250ZXh0LnByZWZpeClcbiAgICAgICAgICAgID8gMlxuICAgICAgICAgICAgOiAxO1xuICAgICAgICAgIHRoaXMucXVpbGwuZGVsZXRlVGV4dChcbiAgICAgICAgICAgIHJhbmdlLmluZGV4IC0gbGVuZ3RoLFxuICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhmb3JtYXRzKS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdExpbmUoXG4gICAgICAgICAgICAgIHJhbmdlLmluZGV4IC0gbGVuZ3RoLFxuICAgICAgICAgICAgICBsZW5ndGgsXG4gICAgICAgICAgICAgIGZvcm1hdHMsXG4gICAgICAgICAgICAgIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlVTRVIsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aGlzLnF1aWxsLmZvY3VzKCk7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBoYW5kbGVEZWxldGUocmFuZ2UsIGNvbnRleHQpIHtcbiAgICAgICAgICAvLyBDaGVjayBmb3IgYXN0cmFsIHN5bWJvbHNcbiAgICAgICAgICB2YXIgbGVuZ3RoID0gL15bXFx1RDgwMC1cXHVEQkZGXVtcXHVEQzAwLVxcdURGRkZdLy50ZXN0KGNvbnRleHQuc3VmZml4KVxuICAgICAgICAgICAgPyAyXG4gICAgICAgICAgICA6IDE7XG4gICAgICAgICAgaWYgKHJhbmdlLmluZGV4ID49IHRoaXMucXVpbGwuZ2V0TGVuZ3RoKCkgLSBsZW5ndGgpIHJldHVybjtcbiAgICAgICAgICB2YXIgZm9ybWF0cyA9IHt9LFxuICAgICAgICAgICAgbmV4dExlbmd0aCA9IDA7XG5cbiAgICAgICAgICB2YXIgX3F1aWxsJGdldExpbmUxNSA9IHRoaXMucXVpbGwuZ2V0TGluZShyYW5nZS5pbmRleCksXG4gICAgICAgICAgICBfcXVpbGwkZ2V0TGluZTE2ID0gX3NsaWNlZFRvQXJyYXkoX3F1aWxsJGdldExpbmUxNSwgMSksXG4gICAgICAgICAgICBsaW5lID0gX3F1aWxsJGdldExpbmUxNlswXTtcblxuICAgICAgICAgIGlmIChjb250ZXh0Lm9mZnNldCA+PSBsaW5lLmxlbmd0aCgpIC0gMSkge1xuICAgICAgICAgICAgdmFyIF9xdWlsbCRnZXRMaW5lMTcgPSB0aGlzLnF1aWxsLmdldExpbmUocmFuZ2UuaW5kZXggKyAxKSxcbiAgICAgICAgICAgICAgX3F1aWxsJGdldExpbmUxOCA9IF9zbGljZWRUb0FycmF5KF9xdWlsbCRnZXRMaW5lMTcsIDEpLFxuICAgICAgICAgICAgICBuZXh0ID0gX3F1aWxsJGdldExpbmUxOFswXTtcblxuICAgICAgICAgICAgaWYgKG5leHQpIHtcbiAgICAgICAgICAgICAgdmFyIGN1ckZvcm1hdHMgPSBsaW5lLmZvcm1hdHMoKTtcbiAgICAgICAgICAgICAgdmFyIG5leHRGb3JtYXRzID0gdGhpcy5xdWlsbC5nZXRGb3JtYXQocmFuZ2UuaW5kZXgsIDEpO1xuICAgICAgICAgICAgICBmb3JtYXRzID1cbiAgICAgICAgICAgICAgICBfb3AyLmRlZmF1bHQuYXR0cmlidXRlcy5kaWZmKGN1ckZvcm1hdHMsIG5leHRGb3JtYXRzKSB8fCB7fTtcbiAgICAgICAgICAgICAgbmV4dExlbmd0aCA9IG5leHQubGVuZ3RoKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHRoaXMucXVpbGwuZGVsZXRlVGV4dChcbiAgICAgICAgICAgIHJhbmdlLmluZGV4LFxuICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhmb3JtYXRzKS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdExpbmUoXG4gICAgICAgICAgICAgIHJhbmdlLmluZGV4ICsgbmV4dExlbmd0aCAtIDEsXG4gICAgICAgICAgICAgIGxlbmd0aCxcbiAgICAgICAgICAgICAgZm9ybWF0cyxcbiAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlRGVsZXRlUmFuZ2UocmFuZ2UpIHtcbiAgICAgICAgICB2YXIgbGluZXMgPSB0aGlzLnF1aWxsLmdldExpbmVzKHJhbmdlKTtcbiAgICAgICAgICB2YXIgZm9ybWF0cyA9IHt9O1xuICAgICAgICAgIGlmIChsaW5lcy5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICB2YXIgZmlyc3RGb3JtYXRzID0gbGluZXNbMF0uZm9ybWF0cygpO1xuICAgICAgICAgICAgdmFyIGxhc3RGb3JtYXRzID0gbGluZXNbbGluZXMubGVuZ3RoIC0gMV0uZm9ybWF0cygpO1xuICAgICAgICAgICAgZm9ybWF0cyA9XG4gICAgICAgICAgICAgIF9vcDIuZGVmYXVsdC5hdHRyaWJ1dGVzLmRpZmYobGFzdEZvcm1hdHMsIGZpcnN0Rm9ybWF0cykgfHwge307XG4gICAgICAgICAgfVxuICAgICAgICAgIHRoaXMucXVpbGwuZGVsZXRlVGV4dChyYW5nZSwgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUik7XG4gICAgICAgICAgaWYgKE9iamVjdC5rZXlzKGZvcm1hdHMpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHRoaXMucXVpbGwuZm9ybWF0TGluZShcbiAgICAgICAgICAgICAgcmFuZ2UuaW5kZXgsXG4gICAgICAgICAgICAgIDEsXG4gICAgICAgICAgICAgIGZvcm1hdHMsXG4gICAgICAgICAgICAgIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlVTRVIsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aGlzLnF1aWxsLnNldFNlbGVjdGlvbihyYW5nZS5pbmRleCwgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuU0lMRU5UKTtcbiAgICAgICAgICB0aGlzLnF1aWxsLmZvY3VzKCk7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBoYW5kbGVFbnRlcihyYW5nZSwgY29udGV4dCkge1xuICAgICAgICAgIHZhciBfdGhpczMgPSB0aGlzO1xuXG4gICAgICAgICAgaWYgKHJhbmdlLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHRoaXMucXVpbGwuc2Nyb2xsLmRlbGV0ZUF0KHJhbmdlLmluZGV4LCByYW5nZS5sZW5ndGgpOyAvLyBTbyB3ZSBkbyBub3QgdHJpZ2dlciB0ZXh0LWNoYW5nZVxuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgbGluZUZvcm1hdHMgPSBPYmplY3Qua2V5cyhjb250ZXh0LmZvcm1hdCkucmVkdWNlKGZ1bmN0aW9uIChcbiAgICAgICAgICAgIGxpbmVGb3JtYXRzLFxuICAgICAgICAgICAgZm9ybWF0LFxuICAgICAgICAgICkge1xuICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LnF1ZXJ5KFxuICAgICAgICAgICAgICAgIGZvcm1hdCxcbiAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LlNjb3BlLkJMT0NLLFxuICAgICAgICAgICAgICApICYmXG4gICAgICAgICAgICAgICFBcnJheS5pc0FycmF5KGNvbnRleHQuZm9ybWF0W2Zvcm1hdF0pXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgbGluZUZvcm1hdHNbZm9ybWF0XSA9IGNvbnRleHQuZm9ybWF0W2Zvcm1hdF07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbGluZUZvcm1hdHM7XG4gICAgICAgICAgfSxcbiAgICAgICAgICB7fSk7XG4gICAgICAgICAgdGhpcy5xdWlsbC5pbnNlcnRUZXh0KFxuICAgICAgICAgICAgcmFuZ2UuaW5kZXgsXG4gICAgICAgICAgICAnXFxuJyxcbiAgICAgICAgICAgIGxpbmVGb3JtYXRzLFxuICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICApO1xuICAgICAgICAgIC8vIEVhcmxpZXIgc2Nyb2xsLmRlbGV0ZUF0IG1pZ2h0IGhhdmUgbWVzc2VkIHVwIG91ciBzZWxlY3Rpb24sXG4gICAgICAgICAgLy8gc28gaW5zZXJ0VGV4dCdzIGJ1aWx0IGluIHNlbGVjdGlvbiBwcmVzZXJ2YXRpb24gaXMgbm90IHJlbGlhYmxlXG4gICAgICAgICAgdGhpcy5xdWlsbC5zZXRTZWxlY3Rpb24oXG4gICAgICAgICAgICByYW5nZS5pbmRleCArIDEsXG4gICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5TSUxFTlQsXG4gICAgICAgICAgKTtcbiAgICAgICAgICB0aGlzLnF1aWxsLmZvY3VzKCk7XG4gICAgICAgICAgT2JqZWN0LmtleXMoY29udGV4dC5mb3JtYXQpLmZvckVhY2goZnVuY3Rpb24gKG5hbWUpIHtcbiAgICAgICAgICAgIGlmIChsaW5lRm9ybWF0c1tuYW1lXSAhPSBudWxsKSByZXR1cm47XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShjb250ZXh0LmZvcm1hdFtuYW1lXSkpIHJldHVybjtcbiAgICAgICAgICAgIGlmIChuYW1lID09PSAnbGluaycpIHJldHVybjtcbiAgICAgICAgICAgIF90aGlzMy5xdWlsbC5mb3JtYXQoXG4gICAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgICAgIGNvbnRleHQuZm9ybWF0W25hbWVdLFxuICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIG1ha2VDb2RlQmxvY2tIYW5kbGVyKGluZGVudCkge1xuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBrZXk6IEtleWJvYXJkLmtleXMuVEFCLFxuICAgICAgICAgICAgc2hpZnRLZXk6ICFpbmRlbnQsXG4gICAgICAgICAgICBmb3JtYXQ6IHsnY29kZS1ibG9jayc6IHRydWV9LFxuICAgICAgICAgICAgaGFuZGxlcjogZnVuY3Rpb24gaGFuZGxlcihyYW5nZSkge1xuICAgICAgICAgICAgICB2YXIgQ29kZUJsb2NrID0gX3BhcmNobWVudDIuZGVmYXVsdC5xdWVyeSgnY29kZS1ibG9jaycpO1xuICAgICAgICAgICAgICB2YXIgaW5kZXggPSByYW5nZS5pbmRleCxcbiAgICAgICAgICAgICAgICBsZW5ndGggPSByYW5nZS5sZW5ndGg7XG5cbiAgICAgICAgICAgICAgdmFyIF9xdWlsbCRzY3JvbGwkZGVzY2VuZCA9IHRoaXMucXVpbGwuc2Nyb2xsLmRlc2NlbmRhbnQoXG4gICAgICAgICAgICAgICAgICBDb2RlQmxvY2ssXG4gICAgICAgICAgICAgICAgICBpbmRleCxcbiAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIF9xdWlsbCRzY3JvbGwkZGVzY2VuZDIgPSBfc2xpY2VkVG9BcnJheShcbiAgICAgICAgICAgICAgICAgIF9xdWlsbCRzY3JvbGwkZGVzY2VuZCxcbiAgICAgICAgICAgICAgICAgIDIsXG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICBibG9jayA9IF9xdWlsbCRzY3JvbGwkZGVzY2VuZDJbMF0sXG4gICAgICAgICAgICAgICAgb2Zmc2V0ID0gX3F1aWxsJHNjcm9sbCRkZXNjZW5kMlsxXTtcblxuICAgICAgICAgICAgICBpZiAoYmxvY2sgPT0gbnVsbCkgcmV0dXJuO1xuICAgICAgICAgICAgICB2YXIgc2Nyb2xsSW5kZXggPSB0aGlzLnF1aWxsLmdldEluZGV4KGJsb2NrKTtcbiAgICAgICAgICAgICAgdmFyIHN0YXJ0ID0gYmxvY2submV3bGluZUluZGV4KG9mZnNldCwgdHJ1ZSkgKyAxO1xuICAgICAgICAgICAgICB2YXIgZW5kID0gYmxvY2submV3bGluZUluZGV4KHNjcm9sbEluZGV4ICsgb2Zmc2V0ICsgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgdmFyIGxpbmVzID0gYmxvY2suZG9tTm9kZS50ZXh0Q29udGVudFxuICAgICAgICAgICAgICAgIC5zbGljZShzdGFydCwgZW5kKVxuICAgICAgICAgICAgICAgIC5zcGxpdCgnXFxuJyk7XG4gICAgICAgICAgICAgIG9mZnNldCA9IDA7XG4gICAgICAgICAgICAgIGxpbmVzLmZvckVhY2goZnVuY3Rpb24gKGxpbmUsIGkpIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5kZW50KSB7XG4gICAgICAgICAgICAgICAgICBibG9jay5pbnNlcnRBdChzdGFydCArIG9mZnNldCwgQ29kZUJsb2NrLlRBQik7XG4gICAgICAgICAgICAgICAgICBvZmZzZXQgKz0gQ29kZUJsb2NrLlRBQi5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBpbmRleCArPSBDb2RlQmxvY2suVEFCLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGxlbmd0aCArPSBDb2RlQmxvY2suVEFCLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGxpbmUuc3RhcnRzV2l0aChDb2RlQmxvY2suVEFCKSkge1xuICAgICAgICAgICAgICAgICAgYmxvY2suZGVsZXRlQXQoc3RhcnQgKyBvZmZzZXQsIENvZGVCbG9jay5UQUIubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgIG9mZnNldCAtPSBDb2RlQmxvY2suVEFCLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgIGlmIChpID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGluZGV4IC09IENvZGVCbG9jay5UQUIubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbGVuZ3RoIC09IENvZGVCbG9jay5UQUIubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBvZmZzZXQgKz0gbGluZS5sZW5ndGggKyAxO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgdGhpcy5xdWlsbC51cGRhdGUoX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUik7XG4gICAgICAgICAgICAgIHRoaXMucXVpbGwuc2V0U2VsZWN0aW9uKFxuICAgICAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgICAgIGxlbmd0aCxcbiAgICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5TSUxFTlQsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBtYWtlRm9ybWF0SGFuZGxlcihmb3JtYXQpIHtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAga2V5OiBmb3JtYXRbMF0udG9VcHBlckNhc2UoKSxcbiAgICAgICAgICAgIHNob3J0S2V5OiB0cnVlLFxuICAgICAgICAgICAgaGFuZGxlcjogZnVuY3Rpb24gaGFuZGxlcihyYW5nZSwgY29udGV4dCkge1xuICAgICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdChcbiAgICAgICAgICAgICAgICBmb3JtYXQsXG4gICAgICAgICAgICAgICAgIWNvbnRleHQuZm9ybWF0W2Zvcm1hdF0sXG4gICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIG5vcm1hbGl6ZShiaW5kaW5nKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZiBiaW5kaW5nID09PSAnc3RyaW5nJyB8fCB0eXBlb2YgYmluZGluZyA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgIHJldHVybiBub3JtYWxpemUoe2tleTogYmluZGluZ30pO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAodHlwZW9mIGJpbmRpbmcgPT09ICd1bmRlZmluZWQnXG4gICAgICAgICAgICAgID8gJ3VuZGVmaW5lZCdcbiAgICAgICAgICAgICAgOiBfdHlwZW9mKGJpbmRpbmcpKSA9PT0gJ29iamVjdCdcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIGJpbmRpbmcgPSAoMCwgX2Nsb25lMi5kZWZhdWx0KShiaW5kaW5nLCBmYWxzZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICh0eXBlb2YgYmluZGluZy5rZXkgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBpZiAoS2V5Ym9hcmQua2V5c1tiaW5kaW5nLmtleS50b1VwcGVyQ2FzZSgpXSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIGJpbmRpbmcua2V5ID0gS2V5Ym9hcmQua2V5c1tiaW5kaW5nLmtleS50b1VwcGVyQ2FzZSgpXTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYmluZGluZy5rZXkubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgIGJpbmRpbmcua2V5ID0gYmluZGluZy5rZXkudG9VcHBlckNhc2UoKS5jaGFyQ29kZUF0KDApO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChiaW5kaW5nLnNob3J0S2V5KSB7XG4gICAgICAgICAgICBiaW5kaW5nW1NIT1JUS0VZXSA9IGJpbmRpbmcuc2hvcnRLZXk7XG4gICAgICAgICAgICBkZWxldGUgYmluZGluZy5zaG9ydEtleTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGJpbmRpbmc7XG4gICAgICAgIH1cblxuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBLZXlib2FyZDtcbiAgICAgICAgZXhwb3J0cy5TSE9SVEtFWSA9IFNIT1JUS0VZO1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogMjQgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAnX19lc01vZHVsZScsIHtcbiAgICAgICAgICB2YWx1ZTogdHJ1ZSxcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdmFyIF9zbGljZWRUb0FycmF5ID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBmdW5jdGlvbiBzbGljZUl0ZXJhdG9yKGFyciwgaSkge1xuICAgICAgICAgICAgdmFyIF9hcnIgPSBbXTtcbiAgICAgICAgICAgIHZhciBfbiA9IHRydWU7XG4gICAgICAgICAgICB2YXIgX2QgPSBmYWxzZTtcbiAgICAgICAgICAgIHZhciBfZSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGZvciAoXG4gICAgICAgICAgICAgICAgdmFyIF9pID0gYXJyW1N5bWJvbC5pdGVyYXRvcl0oKSwgX3M7XG4gICAgICAgICAgICAgICAgIShfbiA9IChfcyA9IF9pLm5leHQoKSkuZG9uZSk7XG4gICAgICAgICAgICAgICAgX24gPSB0cnVlXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIF9hcnIucHVzaChfcy52YWx1ZSk7XG4gICAgICAgICAgICAgICAgaWYgKGkgJiYgX2Fyci5sZW5ndGggPT09IGkpIGJyZWFrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgX2QgPSB0cnVlO1xuICAgICAgICAgICAgICBfZSA9IGVycjtcbiAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgaWYgKCFfbiAmJiBfaVsncmV0dXJuJ10pIF9pWydyZXR1cm4nXSgpO1xuICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIGlmIChfZCkgdGhyb3cgX2U7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBfYXJyO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGFyciwgaSkge1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoYXJyKSkge1xuICAgICAgICAgICAgICByZXR1cm4gYXJyO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChTeW1ib2wuaXRlcmF0b3IgaW4gT2JqZWN0KGFycikpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHNsaWNlSXRlcmF0b3IoYXJyLCBpKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICAgJ0ludmFsaWQgYXR0ZW1wdCB0byBkZXN0cnVjdHVyZSBub24taXRlcmFibGUgaW5zdGFuY2UnLFxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgIH0pKCk7XG5cbiAgICAgICAgdmFyIF9nZXQgPSBmdW5jdGlvbiBnZXQob2JqZWN0LCBwcm9wZXJ0eSwgc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AgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAnU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIEN1cnNvciA9IChmdW5jdGlvbiAoX1BhcmNobWVudCRFbWJlZCkge1xuICAgICAgICAgIF9pbmhlcml0cyhDdXJzb3IsIF9QYXJjaG1lbnQkRW1iZWQpO1xuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKEN1cnNvciwgbnVsbCwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICd2YWx1ZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiB2YWx1ZSgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIEN1cnNvcihkb21Ob2RlLCBzZWxlY3Rpb24pIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBDdXJzb3IpO1xuXG4gICAgICAgICAgICB2YXIgX3RoaXMgPSBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKEN1cnNvci5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKEN1cnNvcikpLmNhbGwoXG4gICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICBkb21Ob2RlLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgX3RoaXMuc2VsZWN0aW9uID0gc2VsZWN0aW9uO1xuICAgICAgICAgICAgX3RoaXMudGV4dE5vZGUgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShDdXJzb3IuQ09OVEVOVFMpO1xuICAgICAgICAgICAgX3RoaXMuZG9tTm9kZS5hcHBlbmRDaGlsZChfdGhpcy50ZXh0Tm9kZSk7XG4gICAgICAgICAgICBfdGhpcy5fbGVuZ3RoID0gMDtcbiAgICAgICAgICAgIHJldHVybiBfdGhpcztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoQ3Vyc29yLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2RldGFjaCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBkZXRhY2goKSB7XG4gICAgICAgICAgICAgICAgLy8gc3VwZXIuZGV0YWNoKCkgd2lsbCBhbHNvIGNsZWFyIGRvbU5vZGUuX19ibG90XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucGFyZW50ICE9IG51bGwpIHRoaXMucGFyZW50LnJlbW92ZUNoaWxkKHRoaXMpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZm9ybWF0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGZvcm1hdChuYW1lLCB2YWx1ZSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLl9sZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBfZ2V0KFxuICAgICAgICAgICAgICAgICAgICBDdXJzb3IucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihDdXJzb3IucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICAgJ2Zvcm1hdCcsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgbmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgdGFyZ2V0ID0gdGhpcyxcbiAgICAgICAgICAgICAgICAgIGluZGV4ID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoXG4gICAgICAgICAgICAgICAgICB0YXJnZXQgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgdGFyZ2V0LnN0YXRpY3Muc2NvcGUgIT09IF9wYXJjaG1lbnQyLmRlZmF1bHQuU2NvcGUuQkxPQ0tfQkxPVFxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgaW5kZXggKz0gdGFyZ2V0Lm9mZnNldCh0YXJnZXQucGFyZW50KTtcbiAgICAgICAgICAgICAgICAgIHRhcmdldCA9IHRhcmdldC5wYXJlbnQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh0YXJnZXQgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgdGhpcy5fbGVuZ3RoID0gQ3Vyc29yLkNPTlRFTlRTLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgIHRhcmdldC5vcHRpbWl6ZSgpO1xuICAgICAgICAgICAgICAgICAgdGFyZ2V0LmZvcm1hdEF0KGluZGV4LCBDdXJzb3IuQ09OVEVOVFMubGVuZ3RoLCBuYW1lLCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICB0aGlzLl9sZW5ndGggPSAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2luZGV4JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGluZGV4KG5vZGUsIG9mZnNldCkge1xuICAgICAgICAgICAgICAgIGlmIChub2RlID09PSB0aGlzLnRleHROb2RlKSByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICByZXR1cm4gX2dldChcbiAgICAgICAgICAgICAgICAgIEN1cnNvci5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihDdXJzb3IucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICdpbmRleCcsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBub2RlLCBvZmZzZXQpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnbGVuZ3RoJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGxlbmd0aCgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fbGVuZ3RoO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAncG9zaXRpb24nLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcG9zaXRpb24oKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFt0aGlzLnRleHROb2RlLCB0aGlzLnRleHROb2RlLmRhdGEubGVuZ3RoXTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3JlbW92ZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiByZW1vdmUoKSB7XG4gICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgIEN1cnNvci5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihDdXJzb3IucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICdyZW1vdmUnLFxuICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICApLmNhbGwodGhpcyk7XG4gICAgICAgICAgICAgICAgdGhpcy5wYXJlbnQgPSBudWxsO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAncmVzdG9yZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiByZXN0b3JlKCkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNlbGVjdGlvbi5jb21wb3NpbmcgfHwgdGhpcy5wYXJlbnQgPT0gbnVsbCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIHZhciB0ZXh0Tm9kZSA9IHRoaXMudGV4dE5vZGU7XG4gICAgICAgICAgICAgICAgdmFyIHJhbmdlID0gdGhpcy5zZWxlY3Rpb24uZ2V0TmF0aXZlUmFuZ2UoKTtcbiAgICAgICAgICAgICAgICB2YXIgcmVzdG9yZVRleHQgPSB2b2lkIDAsXG4gICAgICAgICAgICAgICAgICBzdGFydCA9IHZvaWQgMCxcbiAgICAgICAgICAgICAgICAgIGVuZCA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICByYW5nZSAhPSBudWxsICYmXG4gICAgICAgICAgICAgICAgICByYW5nZS5zdGFydC5ub2RlID09PSB0ZXh0Tm9kZSAmJlxuICAgICAgICAgICAgICAgICAgcmFuZ2UuZW5kLm5vZGUgPT09IHRleHROb2RlXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgX3JlZiA9IFt0ZXh0Tm9kZSwgcmFuZ2Uuc3RhcnQub2Zmc2V0LCByYW5nZS5lbmQub2Zmc2V0XTtcbiAgICAgICAgICAgICAgICAgIHJlc3RvcmVUZXh0ID0gX3JlZlswXTtcbiAgICAgICAgICAgICAgICAgIHN0YXJ0ID0gX3JlZlsxXTtcbiAgICAgICAgICAgICAgICAgIGVuZCA9IF9yZWZbMl07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIExpbmsgZm9ybWF0IHdpbGwgaW5zZXJ0IHRleHQgb3V0c2lkZSBvZiBhbmNob3IgdGFnXG4gICAgICAgICAgICAgICAgd2hpbGUgKFxuICAgICAgICAgICAgICAgICAgdGhpcy5kb21Ob2RlLmxhc3RDaGlsZCAhPSBudWxsICYmXG4gICAgICAgICAgICAgICAgICB0aGlzLmRvbU5vZGUubGFzdENoaWxkICE9PSB0aGlzLnRleHROb2RlXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLmRvbU5vZGUucGFyZW50Tm9kZS5pbnNlcnRCZWZvcmUoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZG9tTm9kZS5sYXN0Q2hpbGQsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZG9tTm9kZSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnRleHROb2RlLmRhdGEgIT09IEN1cnNvci5DT05URU5UUykge1xuICAgICAgICAgICAgICAgICAgdmFyIHRleHQgPSB0aGlzLnRleHROb2RlLmRhdGEuc3BsaXQoQ3Vyc29yLkNPTlRFTlRTKS5qb2luKCcnKTtcbiAgICAgICAgICAgICAgICAgIGlmICh0aGlzLm5leHQgaW5zdGFuY2VvZiBfdGV4dDIuZGVmYXVsdCkge1xuICAgICAgICAgICAgICAgICAgICByZXN0b3JlVGV4dCA9IHRoaXMubmV4dC5kb21Ob2RlO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm5leHQuaW5zZXJ0QXQoMCwgdGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGV4dE5vZGUuZGF0YSA9IEN1cnNvci5DT05URU5UUztcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGV4dE5vZGUuZGF0YSA9IHRleHQ7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50Lmluc2VydEJlZm9yZShcbiAgICAgICAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LmNyZWF0ZSh0aGlzLnRleHROb2RlKSxcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRleHROb2RlID0gZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoQ3Vyc29yLkNPTlRFTlRTKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kb21Ob2RlLmFwcGVuZENoaWxkKHRoaXMudGV4dE5vZGUpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgIGlmIChzdGFydCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgX21hcCA9IFtzdGFydCwgZW5kXS5tYXAoZnVuY3Rpb24gKG9mZnNldCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5tYXgoXG4gICAgICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgICBNYXRoLm1pbihyZXN0b3JlVGV4dC5kYXRhLmxlbmd0aCwgb2Zmc2V0IC0gMSksXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgdmFyIF9tYXAyID0gX3NsaWNlZFRvQXJyYXkoX21hcCwgMik7XG5cbiAgICAgICAgICAgICAgICAgIHN0YXJ0ID0gX21hcDJbMF07XG4gICAgICAgICAgICAgICAgICBlbmQgPSBfbWFwMlsxXTtcblxuICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhcnROb2RlOiByZXN0b3JlVGV4dCxcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRPZmZzZXQ6IHN0YXJ0LFxuICAgICAgICAgICAgICAgICAgICBlbmROb2RlOiByZXN0b3JlVGV4dCxcbiAgICAgICAgICAgICAgICAgICAgZW5kT2Zmc2V0OiBlbmQsXG4gICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3VwZGF0ZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiB1cGRhdGUobXV0YXRpb25zLCBjb250ZXh0KSB7XG4gICAgICAgICAgICAgICAgdmFyIF90aGlzMiA9IHRoaXM7XG5cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBtdXRhdGlvbnMuc29tZShmdW5jdGlvbiAobXV0YXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgICAgICBtdXRhdGlvbi50eXBlID09PSAnY2hhcmFjdGVyRGF0YScgJiZcbiAgICAgICAgICAgICAgICAgICAgICBtdXRhdGlvbi50YXJnZXQgPT09IF90aGlzMi50ZXh0Tm9kZVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIHZhciByYW5nZSA9IHRoaXMucmVzdG9yZSgpO1xuICAgICAgICAgICAgICAgICAgaWYgKHJhbmdlKSBjb250ZXh0LnJhbmdlID0gcmFuZ2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAndmFsdWUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gdmFsdWUoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICcnO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIHJldHVybiBDdXJzb3I7XG4gICAgICAgIH0pKF9wYXJjaG1lbnQyLmRlZmF1bHQuRW1iZWQpO1xuXG4gICAgICAgIEN1cnNvci5ibG90TmFtZSA9ICdjdXJzb3InO1xuICAgICAgICBDdXJzb3IuY2xhc3NOYW1lID0gJ3FsLWN1cnNvcic7XG4gICAgICAgIEN1cnNvci50YWdOYW1lID0gJ3NwYW4nO1xuICAgICAgICBDdXJzb3IuQ09OVEVOVFMgPSAnXFx1RkVGRic7IC8vIFplcm8gd2lkdGggbm8gYnJlYWsgc3BhY2VcblxuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBDdXJzb3I7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiAyNSAq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cgbmV3IFJlZmVyZW5jZUVycm9yKFxuICAgICAgICAgICAgICBcInRoaXMgaGFzbid0IGJlZW4gaW5pdGlhbGlzZWQgLSBzdXBlcigpIGhhc24ndCBiZWVuIGNhbGxlZFwiLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGNhbGwgJiZcbiAgICAgICAgICAgICh0eXBlb2YgY2FsbCA9PT0gJ29iamVjdCcgfHwgdHlwZW9mIGNhbGwgPT09ICdmdW5jdGlvbicpXG4gICAgICAgICAgICA/IGNhbGxcbiAgICAgICAgICAgIDogc2VsZjtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9pbmhlcml0cyhzdWJDbGFzcywgc3VwZXJDbGFzcykge1xuICAgICAgICAgIGlmICh0eXBlb2Ygc3VwZXJDbGFzcyAhPT0gJ2Z1bmN0aW9uJyAmJiBzdXBlckNsYXNzICE9PSBudWxsKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAnU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIENvbnRhaW5lciA9IChmdW5jdGlvbiAoX1BhcmNobWVudCRDb250YWluZXIpIHtcbiAgICAgICAgICBfaW5oZXJpdHMoQ29udGFpbmVyLCBfUGFyY2htZW50JENvbnRhaW5lcik7XG5cbiAgICAgICAgICBmdW5jdGlvbiBDb250YWluZXIoKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgQ29udGFpbmVyKTtcblxuICAgICAgICAgICAgcmV0dXJuIF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoQ29udGFpbmVyLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQ29udGFpbmVyKSkuYXBwbHkoXG4gICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICBhcmd1bWVudHMsXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBDb250YWluZXI7XG4gICAgICAgIH0pKF9wYXJjaG1lbnQyLmRlZmF1bHQuQ29udGFpbmVyKTtcblxuICAgICAgICBDb250YWluZXIuYWxsb3dlZENoaWxkcmVuID0gW1xuICAgICAgICAgIF9ibG9jazIuZGVmYXVsdCxcbiAgICAgICAgICBfYmxvY2suQmxvY2tFbWJlZCxcbiAg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gICAgICAgICAgICByZXR1cm4gZGVzYy52YWx1ZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGdldHRlciA9IGRlc2MuZ2V0O1xuICAgICAgICAgICAgaWYgKGdldHRlciA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZ2V0dGVyLmNhbGwocmVjZWl2ZXIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgX3BhcmNobWVudCA9IF9fd2VicGFja19yZXF1aXJlX18oMCk7XG5cbiAgICAgICAgdmFyIF9wYXJjaG1lbnQyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfcGFyY2htZW50KTtcblxuICAgICAgICBmdW5jdGlvbiBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KG9iaikge1xuICAgICAgICAgIHJldHVybiBvYmogJiYgb2JqLl9fZXNNb2R1bGUgPyBvYmogOiB7ZGVmYXVsdDogb2JqfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9jbGFzc0NhbGxDaGVjayhpbnN0YW5jZSwgQ29uc3RydWN0b3IpIHtcbiAgICAgICAgICBpZiAoIShpbnN0YW5jZSBpbnN0YW5jZW9mIENvbnN0cnVjdG9yKSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQ2Fubm90IGNhbGwgYSBjbGFzcyBhcyBhIGZ1bmN0aW9uJyk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oc2VsZiwgY2FsbCkge1xuICAgICAgICAgIGlmICghc2VsZikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFJlZmVyZW5jZUVycm9yKFxuICAgICAgICAgICAgICBcInRoaXMgaGFzbid0IGJlZW4gaW5pdGlhbGlzZWQgLSBzdXBlcigpIGhhc24ndCBiZWVuIGNhbGxlZFwiLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGNhbGwgJiZcbiAgICAgICAgICAgICh0eXBlb2YgY2FsbCA9PT0gJ29iamVjdCcgfHwgdHlwZW9mIGNhbGwgPT09ICdmdW5jdGlvbicpXG4gICAgICAgICAgICA/IGNhbGxcbiAgICAgICAgICAgIDogc2VsZjtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9pbmhlcml0cyhzdWJDbGFzcywgc3VwZXJDbGFzcykge1xuICAgICAgICAgIGlmICh0eXBlb2Ygc3VwZXJDbGFzcyAhPT0gJ2Z1bmN0aW9uJyAmJiBzdXBlckNsYXNzICE9PSBudWxsKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAnU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIENvbG9yQXR0cmlidXRvciA9IChmdW5jdGlvbiAoX1BhcmNobWVudCRBdHRyaWJ1dG9yKSB7XG4gICAgICAgICAgX2luaGVyaXRzKENvbG9yQXR0cmlidXRvciwgX1BhcmNobWVudCRBdHRyaWJ1dG9yKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIENvbG9yQXR0cmlidXRvcigpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBDb2xvckF0dHJpYnV0b3IpO1xuXG4gICAgICAgICAgICByZXR1cm4gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oXG4gICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgIChcbiAgICAgICAgICAgICAgICBDb2xvckF0dHJpYnV0b3IuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKENvbG9yQXR0cmlidXRvcilcbiAgICAgICAgICAgICAgKS5hcHBseSh0aGlzLCBhcmd1bWVudHMpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoQ29sb3JBdHRyaWJ1dG9yLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3ZhbHVlJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHZhbHVlKGRvbU5vZGUpIHtcbiAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSBfZ2V0KFxuICAgICAgICAgICAgICAgICAgQ29sb3JBdHRyaWJ1dG9yLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKENvbG9yQXR0cmlidXRvci5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgJ3ZhbHVlJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIGRvbU5vZGUpO1xuICAgICAgICAgICAgICAgIGlmICghdmFsdWUuc3RhcnRzV2l0aCgncmdiKCcpKSByZXR1cm4gdmFsdWU7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS5yZXBsYWNlKC9eW15cXGRdKy8sICcnKS5yZXBsYWNlKC9bXlxcZF0rJC8sICcnKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgJyMnICtcbiAgICAgICAgICAgICAgICAgIHZhbHVlXG4gICAgICAgICAgICAgICAgICAgIC5zcGxpdCgnLCcpXG4gICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKGNvbXBvbmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoJzAwJyArIHBhcnNlSW50KGNvbXBvbmVudCkudG9TdHJpbmcoMTYpKS5zbGljZShcbiAgICAgICAgICAgICAgICAgICAgICAgIC0yLFxuICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5qb2luKCcnKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgcmV0dXJuIENvbG9yQXR0cmlidXRvcjtcbiAgICAgICAgfSkoX3BhcmNobWVudDIuZGVmYXVsdC5BdHRyaWJ1dG9yLlN0eWxlKTtcblxuICAgICAgICB2YXIgQ29sb3JD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0eURlc2NyaXB0b3Iob2JqZWN0LCBwcm9wZXJ0eSk7XG4gICAgICAgICAgaWYgKGRlc2MgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdmFyIHBhcmVudCA9IE9iamVjdC5nZXRQcm90b3R5cGVPZihvYmplY3QpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGdldChwYXJlbnQsIHByb3BlcnR5LCByZWNlaXZlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmICgndmFsdWUnIGluIGRlc2MpIHtcbiAgICAgICAgICAgIHJldHVybiBkZXNjLnZhbHVlO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZ2V0dGVyID0gZGVzYy5nZXQ7XG4gICAgICAgICAgICBpZiAoZ2V0dGVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBnZXR0ZXIuY2FsbChyZWNlaXZlcik7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHZhciBfaW5saW5lID0gX193ZWJwYWNrX3JlcXVpcmVfXyg2KTtcblxuICAgICAgICB2YXIgX2lubGluZTIgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KF9pbmxpbmUpO1xuXG4gICAgICAgIGZ1bmN0aW9uIF9pbnRlcm9wUmVxdWlyZURlZmF1bHQob2JqKSB7XG4gICAgICAgICAgcmV0dXJuIG9iaiAmJiBvYmouX19lc01vZHVsZSA/IG9iaiA6IHtkZWZhdWx0OiBvYmp9O1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2NsYXNzQ2FsbENoZWNrKGluc3RhbmNlLCBDb25zdHJ1Y3Rvcikge1xuICAgICAgICAgIGlmICghKGluc3RhbmNlIGluc3RhbmNlb2YgQ29uc3RydWN0b3IpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24nKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihzZWxmLCBjYWxsKSB7XG4gICAgICAgICAgaWYgKCFzZWxmKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgUmVmZXJlbmNlRXJyb3IoXG4gICAgICAgICAgICAgIFwidGhpcyBoYXNuJ3QgYmVlbiBpbml0aWFsaXNlZCAtIHN1cGVyKCkgaGFzbid0IGJlZW4gY2FsbGVkXCIsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gY2FsbCAmJlxuICAgICAgICAgICAgKHR5cGVvZiBjYWxsID09PSAnb2JqZWN0JyB8fCB0eXBlb2YgY2FsbCA9PT0gJ2Z1bmN0aW9uJylcbiAgICAgICAgICAgID8gY2FsbFxuICAgICAgICAgICAgOiBzZWxmO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2luaGVyaXRzKHN1YkNsYXNzLCBzdXBlckNsYXNzKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZiBzdXBlckNsYXNzICE9PSAnZnVuY3Rpb24nICYmIHN1cGVyQ2xhc3MgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICdTdXBlciBleHByZXNzaW9uIG11c3QgZWl0aGVyIGJlIG51bGwgb3IgYSBmdW5jdGlvbiwgbm90ICcgK1xuICAgICAgICAgICAgICAgIHR5cGVvZiBzdXBlckNsYXNzLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgc3ViQ2xhc3MucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShcbiAgICAgICAgICAgIHN1cGVyQ2xhc3MgJiYgc3VwZXJDbGFzcy5wcm90b3R5cGUsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGNvbnN0cnVjdG9yOiB7XG4gICAgICAgICAgICAgICAgdmFsdWU6IHN1YkNsYXNzLFxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgKTtcbiAgICAgICAgICBpZiAoc3VwZXJDbGFzcylcbiAgICAgICAgICAgIE9iamVjdC5zZXRQcm90b3R5cGVPZlxuICAgICAgICAgICAgICA/IE9iamVjdC5zZXRQcm90b3R5cGVPZihzdWJDbGFzcywgc3VwZXJDbGFzcylcbiAgICAgICAgICAgICAgOiAoc3ViQ2xhc3MuX19wcm90b19fID0gc3VwZXJDbGFzcyk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgTGluayA9IChmdW5jdGlvbiAoX0lubGluZSkge1xuICAgICAgICAgIF9pbmhlcml0cyhMaW5rLCBfSW5saW5lKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIExpbmsoKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgTGluayk7XG5cbiAgICAgICAgICAgIHJldHVybiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKExpbmsuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihMaW5rKSkuYXBwbHkoXG4gICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICBhcmd1bWVudHMsXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhcbiAgICAgICAgICAgIExpbmssXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdmb3JtYXQnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBmb3JtYXQobmFtZSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIGlmIChuYW1lICE9PSB0aGlzLnN0YXRpY3MuYmxvdE5hbWUgfHwgIXZhbHVlKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX2dldChcbiAgICAgICAgICAgICAgICAgICAgICBMaW5rLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihMaW5rLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgICAgJ2Zvcm1hdCcsXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIG5hbWUsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIHZhbHVlID0gdGhpcy5jb25zdHJ1Y3Rvci5zYW5pdGl6ZSh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICB0aGlzLmRvbU5vZGUuc2V0QXR0cmlidXRlKCdocmVmJywgdmFsdWUpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAnY3JlYXRlJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gY3JlYXRlKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgbm9kZSA9IF9nZXQoXG4gICAgICAgICAgICAgICAgICAgIExpbmsuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihMaW5rKSxcbiAgICAgICAgICAgICAgICAgICAgJ2NyZWF0ZScsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnNhbml0aXplKHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIG5vZGUuc2V0QXR0cmlidXRlKCdocmVmJywgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgbm9kZS5zZXRBdHRyaWJ1dGUoJ3RhcmdldCcsICdfYmxhbmsnKTtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBub2RlO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdmb3JtYXRzJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9ybWF0cyhkb21Ob2RlKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gZG9tTm9kZS5nZXRBdHRyaWJ1dGUoJ2hyZWYnKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAnc2FuaXRpemUnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBzYW5pdGl6ZSh1cmwpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBfc2FuaXRpemUodXJsLCB0aGlzLlBST1RPQ09MX1dISVRFTElTVClcbiAgICAgICAgICAgICAgICAgICAgPyB1cmxcbiAgICAgICAgICAgICAgICAgICAgOiB0aGlzLlNBTklUSVpFRF9VUkw7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIHJldHVybiBMaW5rO1xuICAgICAgICB9KShfaW5saW5lMi5kZWZhdWx0KTtcblxuICAgICAgICBMaW5rLmJsb3ROYW1lID0gJ2xpbmsnO1xuICAgICAgICBMaW5rLnRhZ05hbWUgPSAnQSc7XG4gICAgICAgIExpbmsuU0FOSVRJWkVEX1VSTCA9ICdhYm91dDpibGFuayc7XG4gICAgICAgIExpbmsuUFJPVE9DT0xfV0hJVEVMSVNUID0gWydodHRwJywgJ2h0dHBzJywgJ21haWx0bycsICd0ZWwnXTtcblxuICAgICAgICBmdW5jdGlvbiBfc2FuaXRpemUodXJsLCBwcm90b2NvbHMpIHtcbiAgICAgICAgICB2YXIgYW5jaG9yID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnYScpO1xuICAgICAgICAgIGFuY2hvci5ocmVmID0gdXJsO1xuICAgICAgICAgIHZhciBwcm90b2NvbCA9IGFuY2hvci5ocmVmLnNsaWNlKDAsIGFuY2hvci5ocmVmLmluZGV4T2YoJzonKSk7XG4gICAgICAgICAgcmV0dXJuIHByb3RvY29scy5pbmRleE9mKHByb3RvY29sKSA+IC0xO1xuICAgICAgICB9XG5cbiAgICAgICAgZXhwb3J0cy5kZWZhdWx0ID0gTGluaztcbiAgICAgICAgZXhwb3J0cy5zYW5pdGl6ZSA9IF9zYW5pdGl6ZTtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDI4ICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgJ19fZXNNb2R1bGUnLCB7XG4gICAgICAgICAgdmFsdWU6IHRydWUsXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHZhciBfdHlwZW9mID1cbiAgICAgICAgICB0eXBlb2YgU3ltYm9sID09PSAnZnVuY3Rpb24nICYmIHR5cGVvZiBTeW1ib2wuaXRlcmF0b3IgPT09ICdzeW1ib2wnXG4gICAgICAgICAgICA/IGZ1bmN0aW9uIChvYmopIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHlwZW9mIG9iajtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgOiBmdW5jdGlvbiAob2JqKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG9iaiAmJlxuICAgICAgICAgICAgICAgICAgdHlwZW9mIFN5bWJvbCA9PT0gJ2Z1bmN0aW9uJyAmJlxuICAgICAgICAgICAgICAgICAgb2JqLmNvbnN0cnVjdG9yID09PSBTeW1ib2wgJiZcbiAgICAgICAgICAgICAgICAgIG9iaiAhPT0gU3ltYm9sLnByb3RvdHlwZVxuICAgICAgICAgICAgICAgICAgPyAnc3ltYm9sJ1xuICAgICAgICAgICAgICAgICAgOiB0eXBlb2Ygb2JqO1xuICAgICAgICAgICAgICB9O1xuXG4gICAgICAgIHZhciBfY3JlYXRlQ2xhc3MgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXModGFyZ2V0LCBwcm9wcykge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwcm9wcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICB2YXIgZGVzY3JpcHRvciA9IHByb3BzW2ldO1xuICAgICAgICAgICAgICBkZXNjcmlwdG9yLmVudW1lcmFibGUgPSBkZXNjcmlwdG9yLmVudW1lcmFibGUgfHwgZmFsc2U7XG4gICAgICAgICAgICAgIGRlc2NyaXB0b3IuY29uZmlndXJhYmxlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgaWYgKCd2YWx1ZScgaW4gZGVzY3JpcHRvcikgZGVzY3JpcHRvci53cml0YWJsZSA9IHRydWU7XG4gICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0YXJnZXQsIGRlc2NyaXB0b3Iua2V5LCBkZXNjc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gICAgICAgICAgdGhpcy5sYWJlbC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJywgZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgIHN3aXRjaCAoZXZlbnQua2V5Q29kZSkge1xuICAgICAgICAgICAgICAgIC8vIEFsbG93cyB0aGUgXCJFbnRlclwiIGtleSB0byBvcGVuIHRoZSBwaWNrZXJcbiAgICAgICAgICAgICAgICBjYXNlIF9rZXlib2FyZDIuZGVmYXVsdC5rZXlzLkVOVEVSOlxuICAgICAgICAgICAgICAgICAgX3RoaXMudG9nZ2xlUGlja2VyKCk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIC8vIEFsbG93cyB0aGUgXCJFc2NhcGVcIiBrZXkgdG8gY2xvc2UgdGhlIHBpY2tlclxuICAgICAgICAgICAgICAgIGNhc2UgX2tleWJvYXJkMi5kZWZhdWx0LmtleXMuRVNDQVBFOlxuICAgICAgICAgICAgICAgICAgX3RoaXMuZXNjYXBlKCk7XG4gICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB0aGlzLnNlbGVjdC5hZGRFdmVudExpc3RlbmVyKCdjaGFuZ2UnLCB0aGlzLnVwZGF0ZS5iaW5kKHRoaXMpKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoUGlja2VyLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3RvZ2dsZVBpY2tlcicsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiB0b2dnbGVQaWNrZXIoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jb250YWluZXIuY2xhc3NMaXN0LnRvZ2dsZSgncWwtZXhwY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3B0aW9uLmdldEF0dHJpYnV0ZSgndmFsdWUnKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb24udGV4dENvbnRlbnQpIHtcbiAgICAgICAgICAgICAgICAgIGl0ZW0uc2V0QXR0cmlidXRlKCdkYXRhLWxhYmVsJywgb3B0aW9uLnRleHRDb250ZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgIF90aGlzMi5zZWxlY3RJdGVtKGl0ZW0sIHRydWUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGl0ZW0uYWRkRXZlbnRMaXN0ZW5lcigna2V5ZG93bicsIGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICAgICAgc3dpdGNoIChldmVudC5rZXlDb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIEFsbG93cyB0aGUgXCJFbnRlclwiIGtleSB0byBzZWxlY3QgYW4gaXRlbVxuICAgICAgICAgICAgICAgICAgICBjYXNlIF9rZXlib2FyZDIuZGVmYXVsdC5rZXlzLkVOVEVSOlxuICAgICAgICAgICAgICAgICAgICAgIF90aGlzMi5zZWxlY3RJdGVtKGl0ZW0sIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gQWxsb3dzIHRoZSBcIkVzY2FwZVwiIGtleSB0byBjbG9zZSB0aGUgcGlja2VyXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgX2tleWJvYXJkMi5kZWZhdWx0LmtleXMuRVNDQVBFOlxuICAgICAgICAgICAgICAgICAgICAgIF90aGlzMi5lc2NhcGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIGl0ZW07XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdidWlsZExhYmVsJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGJ1aWxkTGFiZWwoKSB7XG4gICAgICAgICAgICAgICAgdmFyIGxhYmVsID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc3BhbicpO1xuICAgICAgICAgICAgICAgIGxhYmVsLmNsYXNzTGlzdC5hZGQoJ3FsLXBpY2tlci1sYWJlbCcpO1xuICAgICAgICAgICAgICAgIGxhYmVsLmlubmVySFRNTCA9IF9kcm9wZG93bjIuZGVmYXVsdDtcbiAgICAgICAgICAgICAgICBsYWJlbC50YWJJbmRleCA9ICcwJztcbiAgICAgICAgICAgICAgICBsYWJlbC5zZXRBdHRyaWJ1dGUoJ3JvbGUnLCAnYnV0dG9uJyk7XG4gICAgICAgICAgICAgICAgbGFiZWwuc2V0QXR0cmlidXRlKCdhcmlhLWV4cGFuZGVkJywgJ2ZhbHNlJyk7XG4gICAgICAgICAgICAgICAgdGhpcy5jb250YWluZXIuYXBwZW5kQ2hpbGQobGFiZWwpO1xuICAgICAgICAgICAgICAgIHJldHVybiBsYWJlbDtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2J1aWxkT3B0aW9ucycsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBidWlsZE9wdGlvbnMoKSB7XG4gICAgICAgICAgICAgICAgdmFyIF90aGlzMyA9IHRo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cHRpb24pO1xuICAgICAgICAgICAgICAgICAgb3B0aW9ucy5hcHBlbmRDaGlsZChpdGVtKTtcbiAgICAgICAgICAgICAgICAgIGlmIChvcHRpb24uc2VsZWN0ZWQgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMzLnNlbGVjdEl0ZW0oaXRlbSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgdGhpcy5jb250YWluZXIuYXBwZW5kQ2hpbGQob3B0aW9ucyk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdidWlsZFBpY2tlcicsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBidWlsZFBpY2tlcigpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXM0ID0gdGhpcztcblxuICAgICAgICAgICAgICAgIFtdLnNsaWNlLmNhbGwodGhpcy5zZWxlY3QuYXR0cmlidXRlcykuZm9yRWFjaChmdW5jdGlvbiAoaXRlbSkge1xuICAgICAgICAgICAgICAgICAgX3RoaXM0LmNvbnRhaW5lci5zZXRBdHRyaWJ1dGUoaXRlbS5uYW1lLCBpdGVtLnZhbHVlKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnRhaW5lci5jbGFzc0xpc3QuYWRkKCdxbC1waWNrZXInKTtcbiAgICAgICAgICAgICAgICB0aGlzLmxhYmVsID0gdGhpcy5idWlsZExhYmVsKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5idWlsZE9wdGlvbnMoKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2VzY2FwZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBlc2NhcGUoKSB7XG4gICAgICAgICAgICAgIC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bGVjdEl0ZW0oaXRlbSkge1xuICAgICAgICAgICAgICAgIHZhciB0cmlnZ2VyID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAxICYmIGFyZ3VtZW50c1sxXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzFdXG4gICAgICAgICAgICAgICAgICAgIDogZmFsc2U7XG5cbiAgICAgICAgICAgICAgICB2YXIgc2VsZWN0ZWQgPSB0aGlzLmNvbnRhaW5lci5xdWVyeVNlbGVjdG9yKCcucWwtc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgICAgICBpZiAoaXRlbSA9PT0gc2VsZWN0ZWQpIHJldHVybjtcbiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0ZWQgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQuY2xhc3NMaXN0LnJlbW92ZSgncWwtc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGl0ZW0gPT0gbnVsbCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGl0ZW0uY2xhc3NMaXN0LmFkZCgncWwtc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdC5zZWxlY3RlZEluZGV4ID0gW10uaW5kZXhPZi5jYWxsKFxuICAgICAgICAgICAgICAgICAgaXRlbS5wYXJlbnROb2RlLmNoaWxkcmVuLFxuICAgICAgICAgICAgICAgICAgaXRlbSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGlmIChpdGVtLmhhc0F0dHJpYnV0ZSgnZGF0YS12YWx1ZScpKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLmxhYmVsLnNldEF0dHJpYnV0ZShcbiAgICAgICAgICAgICAgICAgICAgJ2RhdGEtdmFsdWUnLFxuICAgICAgICAgICAgICAgICAgICBpdGVtLmdldEF0dHJpYnV0ZSgnZGF0YS12YWx1ZScpLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgdGhpcy5sYWJlbC5yZW1vdmVBdHRyaWJ1dGUoJ2RhdGEtdmFsdWUnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGl0ZW0uaGFzQXR0cmlidXRlKCdkYXRhLWxhYmVsJykpIHtcbiAgICAgICAgICAgICAgICAgIHRoaXMubGFiZWwuc2V0QXR0cmlidXRlKFxuICAgICAgICAgICAgICAgICAgICAnZGF0YS1sYWJlbCcsXG4gICAgICAgICAgICAgICAgICAgIGl0ZW0uZ2V0QXR0cmlidXRlKCdkYXRhLWxhYmVsJyksXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLmxhYmVsLnJlbW92ZUF0dHJpYnV0ZSgnZGF0YS1sYWJlbCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodHJpZ2dlcikge1xuICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBFdmVudCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdC5kaXNwYXRjaEV2ZW50KG5ldyBFdmVudCgnY2hhbmdlJykpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgKHR5cGVvZiBFdmVudCA9PT0gJ3VuZGVmaW5lZCdcbiAgICAgICAgICAgICAgICAgICAgICA/ICd1bmRlZmluZWQnXG4gICAgICAgICAgICAgICAgICAgICAgOiBfdHlwZW9mKEV2ZW50KSkgPT09ICdvYmplY3QnXG4gICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gSUUxMVxuICAgICAgICAgICAgICAgICAgICB2YXIgZXZlbnQgPSBkb2N1bWVudC5jcmVhdGVFdmVudCgnRXZlbnQnKTtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQuaW5pdEV2ZW50KCdjaGFuZ2UnLCB0cnVlLCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3QuZGlzcGF0Y2hFdmVudChldmVudCk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB0aGlzLmNsb3NlKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAndXBkYXRlJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHVwZGF0ZSgpIHtcbiAgICAgICAgICAgICAgICB2YXIgb3B0aW9uID0gdm9pZCAwO1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNlbGVjdC5zZWxlY3RlZEluZGV4ID4gLTEpIHtcbiAgICAgICAgICAgICAgICAgIHZhciBpdGVtID1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jb250YWluZXIucXVlcnlTZWxlY3RvcignLnFsLXBpY2tlci1vcHRpb25zJykuY2hpbGRyZW5bXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3Quc2VsZWN0ZWRJbmRleFxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgICAgb3B0aW9uID0gdGhpcy5zZWxlY3Qub3B0aW9uc1t0aGlzLnNlbGVjdC5zZWxlY3RlZEluZGV4XTtcbiAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0SXRlbShpdGVtKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RJdGVtKG51bGwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgaXNBY3RpdmUgPVxuICAgICAgICAgICAgICAgICAgb3B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XG4gICAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgICB0aGlzLmRvbU5vZGVbUmVnaXN0cnkuREFUQV9LRVldID0ge2Jsb3Q6IHRoaXN9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoU2hhZG93QmxvdC5wcm90b3R5cGUsICdzdGF0aWNzJywge1xuICAgICAgICAgICAgLy8gSGFjayBmb3IgYWNjZXNzaW5nIGluaGVyaXRlZCBzdGF0aWMgbWV0aG9kc1xuICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbnN0cnVjdG9yO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGVudW1lcmFibGU6IHRydWUsXG4gICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgU2hhZG93QmxvdC5jcmVhdGUgPSBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnRhZ05hbWUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICB0aHJvdyBuZXcgUmVnaXN0cnkuUGFyY2htZW50RXJyb3IoXG4gICAgICAgICAgICAgICAgJ0Jsb3QgZGVmaW5pdGlvbiBtaXNzaW5nIHRhZ05hbWUnLFxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIG5vZGU7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh0aGlzLnRhZ05hbWUpKSB7XG4gICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS50b1VwcGVyQ2FzZSgpO1xuICAgICAgICAgICAgICAgIGlmIChwYXJzZUludCh2YWx1ZSkudG9TdHJpbmcoKSA9PT0gdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIHZhbHVlID0gcGFyc2VJbnQodmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICAgIG5vZGUgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KHRoaXMudGFnTmFtZVt2YWx1ZSAtIDFdKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnRhZ05hbWUuaW5kZXhPZih2YWx1ZSkgPiAtMSkge1xuICAgICAgICAgICAgICAgIG5vZGUgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KHZhbHVlKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBub2RlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCh0aGlzLnRhZ05hbWVbMF0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBub2RlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCh0aGlzLnRhZ05hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRoaXMuY2xhc3NOYW1lKSB7XG4gICAgICAgICAgICAgIG5vZGUuY2xhc3NMaXN0LmFkZCh0aGlzLmNsYXNzTmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbm9kZTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIFNoYWRvd0Jsb3QucHJvdG90eXBlLmF0dGFjaCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnBhcmVudCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIHRoaXMuc2Nyb2xsID0gdGhpcy5wYXJlbnQuc2Nyb2xsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgICAgU2hhZG93QmxvdC5wcm90b3R5cGUuY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HZhbHVlKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoUmVnaXN0cnkucXVlcnkobmFtZSwgUmVnaXN0cnkuU2NvcGUuQVRUUklCVVRFKSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBwYXJlbnQgPSBSZWdpc3RyeS5jcmVhdGUodGhpcy5zdGF0aWNzLnNjb3BlKTtcbiAgICAgICAgICAgICAgYmxvdC53cmFwKHBhcmVudCk7XG4gICAgICAgICAgICAgIHBhcmVudC5mb3JtYXQobmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgICAgU2hhZG93QmxvdC5wcm90b3R5cGUuaW5zZXJ0QXQgPSBmdW5jdGlvbiAoaW5kZXgsIHZhbHVlLCBkZWYpIHtcbiAgICAgICAgICAgIHZhciBibG90ID1cbiAgICAgICAgICAgICAgZGVmID09IG51bGxcbiAgICAgICAgICAgICAgICA/IFJlZ2lzdHJ5LmNyZWF0ZSgndGV4dCcsIHZhbHVlKVxuICAgICAgICAgICAgICAgIDogUmVnaXN0cnkuY3JlYXRlKHZhbHVlLCBkZWYpO1xuICAgICAgICAgICAgdmFyIHJlZiA9IHRoaXMuc3BsaXQoaW5kZXgpO1xuICAgICAgICAgICAgdGhpcy5wYXJlbnQuaW5zZXJ0QmVmb3JlKGJsb3QsIHJlZik7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBTaGFkb3dCbG90LnByb3RvdHlwZS5pbnNlcnRJbnRvID0gZnVuY3Rpb24gKHBhcmVudEJsb3QsIHJlZkJsb3QpIHtcbiAgICAgICAgICAgIGlmIChyZWZCbG90ID09PSB2b2lkIDApIHtcbiAgICAgICAgICAgICAgcmVmQmxvdCA9IG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGhpcy5wYXJlbnQgIT0gbnVsbCkge1xuICAgICAgICAgICAgICB0aGlzLnBhcmVudC5jaGlsZHJlbi5yZW1vdmUodGhpcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgcmVmRG9tTm9kZSA9IG51bGw7XG4gICAgICAgICAgICBwYXJlbnRCbG90LmNoaWxkcmVuLmluc2VydEJlZm9yZSh0aGlzLCByZWZCbG90KTtcbiAgICAgICAgICAgIGlmIChyZWZCbG90ICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgcmVmRG9tTm9kZSA9IHJlZkJsb3QuZG9tTm9kZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgdGhpcy5kb21Ob2RlLnBhcmVudE5vZGUgIT0gcGFyZW50QmxvdC5kb21Ob2RlIHx8XG4gICAgICAgICAgICAgIHRoaXMuZG9tTm9kZS5uZXh0U2libGluZyAhPSByZWZEb21Ob2RlXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgcGFyZW50QmxvdC5kb21Ob2RlLmluc2VydEJlZm9yZSh0aGlzLmRvbU5vZGUsIHJlZkRvbU5vZGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5wYXJlbnQgPSBwYXJlbnRCbG90O1xuICAgICAgICAgICAgdGhpcy5hdHRhY2goKTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIFNoYWRvd0Jsb3QucHJvdG90eXBlLmlzb2xhdGUgPSBmdW5jdGlvbiAoaW5kZXgsIGxlbmd0aCkge1xuICAgICAgICAgICAgdmFyIHRhcmdldCA9IHRoaXMuc3BsaXQoaW5kZXgpO1xuICAgICAgICAgICAgdGFyZ2V0LnNwbGl0KGxlbmd0aCk7XG4gICAgICAgICAgICByZXR1cm4gdGFyZ2V0O1xuICAgICAgICAgIH07XG4gICAgICAgICAgU2hhZG93QmxvdC5wcm90b3R5cGUubGVuZ3RoID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBTaGFkb3dCbG90LnByb3RvdHlwZS5vZmZzZXQgPSBmdW5jdGlvbiAocm9vdCkge1xuICAgICAgICAgICAgaWYgKHJvb3QgPT09IHZvaWQgMCkge1xuICAgICAgICAgICAgICByb290ID0gdGhpcy5wYXJlbnQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGhpcy5wYXJlbnQgPT0gbnVsbCB8fCB0aGlzID09IHJvb3QpIHJldHVybiAwO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMucGFyZW50LmNoaWxkcmVuLm9mZnNldCh0aGlzKSArIHRoaXMucGFyZW50Lm9mZnNldChyb290KTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIFNoYWRvd0Jsb3QucHJvdG90eXBlLm9wdGltaXplID0gZnVuY3Rpb24gKGNvbnRleHQpIHtcbiAgICAgICAgICAgIC8vIFRPRE8gY2xlYW4gdXAgb25jZSB3ZSB1c2UgV2Vha01hcFxuICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxuICAgICAgICAgICAgaWYgKHRoaXMuZG9tTm9kZVtSZWdpc3RyeS5EQVRBX0tFWV0gIT0gbnVsbCkge1xuICAgICAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLmRvbU5vZGVbUmVnaXN0cnkuREFUQV9LRVldLm11dGF0aW9ucztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIFNoYWRvd0Jsb3QucHJvdG90eXBlLnJlbW92ZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmRvbU5vZGUucGFyZW50Tm9kZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIHRoaXMuZG9tTm9kZS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHRoaXMuZG9tTm9kZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmRldGFjaCgpO1xuICAgICAgICAgIH07XG4gICAgICAgICAgU2hhZG93QmxvdC5wcm90b3R5cGUucmVwbGFjZSA9IGZ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Y3JlYXRlKG5hbWUsIHZhbHVlKSA6IG5hbWU7XG4gICAgICAgICAgICBpZiAodGhpcy5wYXJlbnQgIT0gbnVsbCkge1xuICAgICAgICAgICAgICB0aGlzLnBhcmVudC5pbnNlcnRCZWZvcmUod3JhcHBlciwgdGhpcy5uZXh0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHdyYXBwZXIuYXBwZW5kQ2hpbGQodGhpcyk7XG4gICAgICAgICAgICByZXR1cm4gd3JhcHBlcjtcbiAgICAgICAgICB9O1xuICAgICAgICAgIFNoYWRvd0Jsb3QuYmxvdE5hbWUgPSAnYWJzdHJhY3QnO1xuICAgICAgICAgIHJldHVybiBTaGFkb3dCbG90O1xuICAgICAgICB9KSgpO1xuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBTaGFkb3dCbG90O1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogMzEgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAnX19lc01vZHVsZScsIHt2YWx1ZTogdHJ1ZX0pO1xuICAgICAgICB2YXIgYXR0cmlidXRvcl8xID0gX193ZWJwYWNrX3JlcXVpcmVfXygxMik7XG4gICAgICAgIHZhciBjbGFzc18xID0gX193ZWJwYWNrX3JlcXVpcmVfXygzMik7XG4gICAgICAgIHZhciBzdHlsZV8xID0gX193ZWJwYWNrX3JlcXVpcmVfXygzMyk7XG4gICAgICAgIHZhciBSZWdpc3RyeSA9IF9fd2VicGFja19yZXF1aXJlX18oMSk7XG4gICAgICAgIHZhciBBdHRyaWJ1dG9yU3RvcmUgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgZnVuY3Rpb24gQXR0cmlidXRvclN0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ID0ge307XG4gICAgICAgICAgICB2YXIgYXR0cmlidXRlcyA9IGF0dHJpYnV0b3JfMS5kZWZhdWx0LmtleXModGhpcy5kb21Ob2RlKTtcbiAgICAgICAgICAgIHZhciBjbGFzc2VzID0gY2xhc3NfMS5kZWZhdWx0LmtleXModGhpcy5kb21Ob2RlKTtcbiAgICAgICAgICAgIHZhciBzdHlsZXMgPSBzdHlsZV8xLmRlZmF1bHQua2V5cyh0aGlzLmRvbU5vZGUpO1xuICAgICAgICAgICAgYXR0cmlidXRlc1xuICAgICAgICAgICAgICAuY29uY2F0KGNsYXNzZXMpXG4gICAgICAgICAgICAgIC5jb25jYXQoc3R5bGVzKVxuICAgICAgICAgICAgICAuZm9yRWFjaChmdW5jdGlvbiAobmFtZSkge1xuICAgICAgICAgICAgICAgIHZhciBhdHRyID0gUmVnaXN0cnkucXVlcnkobmFtZSwgUmVnaXN0cnkuU2NvcGUuQVRUUklCVVRFKTtcbiAgICAgICAgICAgICAgICBpZiAoYXR0ciBpbnN0YW5jZW9mIGF0dHJpYnV0b3JfMS5kZWZhdWx0KSB7XG4gICAgICAgICAgICAgICAgICBfdGhpcy5hdHRyaWJ1dGVzW2F0dHIuYXR0ck5hbWVdID0gYXR0cjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH07XG4gICAgICAgICAgQXR0cmlidXRvclN0b3JlLnByb3RvdHlwZS5jb3B5ID0gZnVuY3Rpb24gKHRhcmdldCkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKHRoaXMuYXR0cmlidXRlcykuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgICAgICAgIHZhciB2YWx1ZSA9IF90aGlzLmF0dHJpYnV0ZXNba2V5XS52YWx1ZShfdGhpcy5kb21Ob2RlKTtcbiAgICAgICAgICAgICAgdGFyZ2V0LmZvcm1hdChrZXksIHZhbHVlKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH07XG4gICAgICAgICAgQXR0cmlidXRvclN0b3JlLnByb3RvdHlwZS5tb3ZlID0gZnVuY3Rpb24gKHRhcmdldCkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIHRoaXMuY29weSh0YXJnZXQpO1xuICAgICAgICAgICAgT2JqZWN0LmtleXModGhpcy5hdHRyaWJ1dGVzKS5mb3JFYWNoKGZ1bmN0aW9uIChrZXkpIHtcbiAgICAgICAgICAgICAgX3RoaXMuYXR0cmlidXRlc1trZXldLnJlbW92ZShfdGhpcy5kb21Ob2RlKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdGhpcy5hdHRyaWJ1dGVzID0ge307XG4gICAgICAgICAgfTtcbiAgICAgICAgICBBdHRyaWJ1dG9yU3RvcmUucHJvdG90eXBlLnZhbHVlcyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgICAgICByZXR1cm4gT2JqZWN0LmtleXModGhpcy5hdHRyaWJ1dGVzKS5yZWR1Y2UoZnVuY3Rpb24gKFxuICAgICAgICAgICAgICBhdHRyaWJ1dGVzLFxuICAgICAgICAgICAgICBuYW1lLFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIGF0dHJpYnV0ZXNbbmFtZV0gPSBfdGhpcy5hdHRyaWJ1dGVzW25hbWVdLnZhbHVlKF90aGlzLmRvbU5vZGUpO1xuICAgICAgICAgICAgICByZXR1cm4gYXR0cmlidXRlcztcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7fSk7XG4gICAgICAgICAgfTtcbiAgICAgICAgICByZXR1cm4gQXR0cmlidXRvclN0b3JlO1xuICAgICAgICB9KSgpO1xuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBBdHRyaWJ1dG9yU3RvcmU7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiAzMiAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgdmFyIF9fZXh0ZW5kcyA9XG4gICAgICAgICAgKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8XG4gICAgICAgICAgKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBleHRlbmRTdGF0aWNzID1cbiAgICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICAgICAgICh7X19wcm90b19fOiBbXX0gaW5zdGFuY2VvZiBBcnJheSAmJlxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICAgICAgICBkLl9fcHJvdG9fXyA9IGI7XG4gICAgICAgICAgICAgICAgfSkgfHxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICAgICAgICBmdW5jdGlvbiBfXygpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnN0cnVjdG9yID0gZDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBkLnByb3RvdHlwZSA9XG4gICAgICAgICAgICAgICAgYiA9PT0gbnVsbFxuICAgICAgICAgICAgICAgICAgPyBPYmplY3QuY3JlYXRlKGIpXG4gICAgICAgICAgICAgICAgICA6ICgoX18ucHJvdG90eXBlID0gYi5wcm90b3R5cGUpLCBuZXcgX18oKSk7XG4gICAgICAgICAgICB9O1xuICA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nKS5zbGljZSgwLCAtMSkuam9pbignLScpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIENsYXNzQXR0cmlidXRvci5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gKG5vZGUsIHZhbHVlKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuY2FuQWRkKG5vZGUsIHZhbHVlKSkgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5yZW1vdmUobm9kZSk7XG4gICAgICAgICAgICBub2RlLmNsYXNzTGlzdC5hZGQodGhpcy5rZXlOYW1lICsgJy0nICsgdmFsdWUpO1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBDbGFzc0F0dHJpYnV0b3IucHJvdG90eXBlLnJlbW92ZSA9IGZ1bmN0aW9uIChub2RlKSB7XG4gICAgICAgICAgICB2YXIgbWF0Y2hlcyA9IG1hdGNoKG5vZGUsIHRoaXMua2V5TmFtZSk7XG4gICAgICAgICAgICBtYXRjaGVzLmZvckVhY2goZnVuY3Rpb24gKG5hbWUpIHtcbiAgICAgICAgICAgICAgbm9kZS5jbGFzc0xpc3QucmVtb3ZlKG5hbWUpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBpZiAobm9kZS5jbGFzc0xpc3QubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgIG5vZGUucmVtb3ZlQXR0cmlidXRlKCdjbGFzcycpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgICAgQ2xhc3NBdHRyaWJ1dG9yLnByb3RvdHlwZS52YWx1ZSA9IGZ1bmN0aW9uIChub2RlKSB7XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0gbWF0Y2gobm9kZSwgdGhpcy5rZXlOYW1lKVswXSB8fCAnJztcbiAgICAgICAgICAgIHZhciB2YWx1ZSA9IHJlc3VsdC5zbGljZSh0aGlzLmtleU5hbWUubGVuZ3RoICsgMSk7IC8vICsxIGZvciBoeXBoZW5cbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNhbkFkZChub2RlLCB2YWx1ZSkgPyB2YWx1ZSA6ICcnO1xuICAgICAgICAgIH07XG4gICAgICAgICAgcmV0dXJuIENsYXNzQXR0cmlidXRvcjtcbiAgICAgICAgfSkoYXR0cmlidXRvcl8xLmRlZmF1bHQpO1xuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBDbGFzc0F0dHJpYnV0b3I7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiAzMyAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgdmFyIF9fZXh0ZW5kcyA9XG4gICAgICAgICAgKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8XG4gICAgICAgICAgKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBleHRlbmRTdGF0aWNzID1cbiAgICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICAgICAgICh7X19wcm90b19fOiBbXX0gaW5zdGFuY2VvZiBBcnJheSAmJlxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICAgICAgICBkLl9fcHJvdG9fXyA9IGI7XG4gICAgICAgICAgICAgICAgfSkgfHxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICAgICAgICBmdW5jdGlvbiBfXygpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnN0cnVjdG9yID0gZDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBkLnByb3RvdHlwZSA9XG4gICAgICAgICAgICAgICAgYiA9PT0gbnVsbFxuICAgICAgICAgICAgICAgICAgPyBPYmplY3QuY3JlYXRlKGIpXG4gICAgICAgICAgICAgICAgICA6ICgoX18ucHJvdG90eXBlID0gYi5wcm90b3R5cGUpLCBuZXcgX18oKSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH0pKCk7XG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAnX19lc01vZHVsZScsIHt2YWx1ZTogdHJ1ZX0pO1xuICAgICAgICB2YXIgYXR0cmlidXRvcl8xID0gX193ZWJwYWNrX3JlcXVpcmVfXygxMik7XG4gICAgICAgIGZ1bmN0aW9uIGNhbWVsaXplKG5hbWUpIHtcbiAgICAgICAgICB2YXIgcGFydHMgPSBuYW1lLnNwbGl0KCctJyk7XG4gICAgICAgICAgdmFyIHJlc3QgPSBwYXJ0c1xuICAgICAgICAgICAgLnNsaWNlKDEpXG4gICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChwYXJ0KSB7XG4gICAgICAgICAgICAgIHJldHVybiBwYXJ0WzBdLnRvVXBwZXJDYXNlKCkgKyBwYXJ0LnNsaWNlKDEpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5qb2luKCcnKTtcbiAgICAgICAgICByZXR1cm4gcGFydHNbMF0gKyByZXN0O1xuICAgICAgICB9XG4gICAgICAgIHZhciBTdHlsZUF0dHJpYnV0b3IgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgICAgICAgX19leHRlbmRzKFN0eWxlQXR0cmlidXRvciwgX3N1cGVyKTtcbiAgICAgICAgICBmdW5jdGlvbiBTdHlsZUF0dHJpYnV0b3IoKSB7XG4gICAgICAgICAgICByZXR1cm4gKF9zdXBlciAhPT0gbnVsbCAmJiBfc3VwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKSkgfHwgdGhpcztcbiAgICAgICAgICB9XG4gICAgICAgICAgU3R5bGVBdHRyaWJ1dG9yLmtleXMgPSBmdW5jdGlvbiAobm9kZSkge1xuICAgICAgICAgICAgcmV0dXJuIChub2RlLmdldEF0dHJpYnV0ZSgnc3R5bGUnKSB8fCAnJylcbiAgICAgICAgICAgICAgLnNwbGl0KCc7JylcbiAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICB2YXIgYXJyID0gdmFsdWUuc3BsaXQoJzonKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXJyWzBdLnRyaW0oKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBTdHlsZUF0dHJpYnV0b3IucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIChub2RlLCB2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKCF0aGlzLmNhbkFkZChub2RlLCB2YWx1ZSkpIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgIG5vZGUuc3R5bGVbY2FtZWxpemUodGhpcy5rZXlOYW1lKV0gPSB2YWx1ZTtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgIH07XG4gICAgICAgICAgU3R5bGVBdHRyaWJ1dG9yLnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbiAobm9kZSkge1xuICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxuICAgICAgICAgICAgbm9kZS5zdHlsZVtjYW1lbGl6ZSh0aGlzLmtleU5hbWUpXSA9ICcnO1xuICAgICAgICAgICAgaWYgKCFub2RlLmdldEF0dHJpYnV0ZSgnc3R5bGUnKSkge1xuICAgICAgICAgICAgICBub2RlLnJlbW92ZU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tcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBUaGVtZSk7XG5cbiAgICAgICAgICAgIHRoaXMucXVpbGwgPSBxdWlsbDtcbiAgICAgICAgICAgIHRoaXMub3B0aW9ucyA9IG9wdGlvbnM7XG4gICAgICAgICAgICB0aGlzLm1vZHVsZXMgPSB7fTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoVGhlbWUsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnaW5pdCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBpbml0KCkge1xuICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG5cbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh0aGlzLm9wdGlvbnMubW9kdWxlcykuZm9yRWFjaChmdW5jdGlvbiAobmFtZSkge1xuICAgICAgICAgICAgICAgICAgaWYgKF90aGlzLm1vZHVsZXNbbmFtZV0gPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hZGRNb2R1bGUobmFtZSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdhZGRNb2R1bGUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gYWRkTW9kdWxlKG5hbWUpIHtcbiAgICAgICAgICAgICAgICB2YXIgbW9kdWxlQ2xhc3MgPSB0aGlzLnF1aWxsLmNvbnN0cnVjdG9yLmltcG9ydChcbiAgICAgICAgICAgICAgICAgICdtb2R1bGVzLycgKyBuYW1lLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgdGhpcy5tb2R1bGVzW25hbWVdID0gbmV3IG1vZHVsZUNsYXNzKFxuICAgICAgICAgICAgICAgICAgdGhpcy5xdWlsbCxcbiAgICAgICAgICAgICAgICAgIHRoaXMub3B0aW9ucy5tb2R1bGVzW25hbWVdIHx8IHt9LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMubW9kdWxlc1tuYW1lXTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG5cbiAgICAgICAgICByZXR1cm4gVGhlbWU7XG4gICAgICAgIH0pKCk7XG5cbiAgICAgICAgVGhlbWUuREVGQVVMVFMgPSB7XG4gICAgICAgICAgbW9kdWxlczoge30sXG4gICAgICAgIH07XG4gICAgICAgIFRoZW1lLnRoZW1lcyA9IHtcbiAgICAgICAgICBkZWZhdWx0OiBUaGVtZSxcbiAgICAgICAgfTtcblxuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBUaGVtZTtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDM1ICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgJ19fZXNNb2R1bGUnLCB7XG4gICAgICAgICAgdmFsdWU6IHRydWUsXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHZhciBfY3JlYXRlQ2xhc3MgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXModGFyZ2V0LCBwcm9wcykge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwcm9wcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICB2YXIgZGVzY3JpcHRvciA9IHByb3BzW2ldO1xuICAgICAgICAgICAgICBkZXNjcmlwdG9yLmVudW1lcmFibGUgPSBkZXNjcmlwdG9yLmVudW1lcmFibG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PSBudWxsKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gZ2V0KHBhcmVudCwgcHJvcGVydHksIHJlY2VpdmVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKCd2YWx1ZScgaW4gZGVzYykge1xuICAgICAgICAgICAgcmV0dXJuIGRlc2MudmFsdWU7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBnZXR0ZXIgPSBkZXNjLmdldDtcbiAgICAgICAgICAgIGlmIChnZXR0ZXIgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGdldHRlci5jYWxsKHJlY2VpdmVyKTtcbiAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgdmFyIF9wYXJjaG1lbnQgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDApO1xuXG4gICAgICAgIHZhciBfcGFyY2htZW50MiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX3BhcmNobWVudCk7XG5cbiAgICAgICAgdmFyIF90ZXh0ID0gX193ZWJwYWNrX3JlcXVpcmVfXyg3KTtcblxuICAgICAgICB2YXIgX3RleHQyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfdGV4dCk7XG5cbiAgICAgICAgZnVuY3Rpb24gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChvYmopIHtcbiAgICAgICAgICByZXR1cm4gb2JqICYmIG9iai5fX2VzTW9kdWxlID8gb2JqIDoge2RlZmF1bHQ6IG9ian07XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfY2xhc3NDYWxsQ2hlY2soaW5zdGFuY2UsIENvbnN0cnVjdG9yKSB7XG4gICAgICAgICAgaWYgKCEoaW5zdGFuY2Ug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PYmplY3QuY3JlYXRlKFxuICAgICAgICAgICAgc3VwZXJDbGFzcyAmJiBzdXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBHVUFSRF9URVhUID0gJ1xcdUZFRkYnO1xuXG4gICAgICAgIHZhciBFbWJlZCA9IChmdW5jdGlvbiAoX1BhcmNobWVudCRFbWJlZCkge1xuICAgICAgICAgIF9pbmhlcml0cyhFbWJlZCwgX1BhcmNobWVudCRFbWJlZCk7XG5cbiAgICAgICAgICBmdW5jdGlvbiBFbWJlZChub2RlKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgRW1iZWQpO1xuXG4gICAgICAgICAgICB2YXIgX3RoaXMgPSBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKEVtYmVkLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoRW1iZWQpKS5jYWxsKFxuICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgIF90aGlzLmNvbnRlbnROb2RlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc3BhbicpO1xuICAgICAgICAgICAgX3RoaXMuY29udGVudE5vZGUuc2V0QXR0cmlidXRlKCdjb250ZW50ZWRpdGFibGUnLCBmYWxzZSk7XG4gICAgICAgICAgICBbXS5zbGljZVxuICAgICAgICAgICAgICAuY2FsbChfdGhpcy5kb21Ob2RlLmNoaWxkTm9kZXMpXG4gICAgICAgICAgICAgIC5mb3JFYWNoKGZ1bmN0aW9uIChjaGlsZE5vZGUpIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5jb250ZW50Tm9kZS5hcHBlbmRDaGlsZChjaGlsZE5vZGUpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIF90aGlzLmxlZnRHdWFyZCA9IGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKEdVQVJEX1RFWFQpO1xuICAgICAgICAgICAgX3RoaXMucmlnaHRHdWFyZCA9IGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKEdVQVJEX1RFWFQpO1xuICAgICAgICAgICAgX3RoaXMuZG9tTm9kZS5hcHBlbmRDaGlsZChfdGhpcy5sZWZ0R3VhcmQpO1xuICAgICAgICAgICAgX3RoaXMuZG9tTm9kZS5hcHBlbmRDaGlsZChfdGhpcy5jb250ZW50Tm9kZSk7XG4gICAgICAgICAgICBfdGhpcy5kb21Ob2RlLmFwcGVuZENoaWxkKF90aGlzLnJpZ2h0R3VhcmQpO1xuICAgICAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhFbWJlZCwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdpbmRleCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBpbmRleChub2RlLCBvZmZzZXQpIHtcbiAgICAgICAgICAgICAgICBpZiAobm9kZSA9PT0gdGhpcy5sZWZ0R3VhcmQpIHJldHVybiAwO1xuICAgICAgICAgICAgICAgIGlmIChub2RlID09PSB0aGlzLnJpZ2h0R3VhcmQpIHJldHVybiAxO1xuICAgICAgICAgICAgICAgIHJldHVybiBfZ2V0KFxuICAgICAgICAgICAgICAgICAgRW1iZWQucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoRW1iZWQucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICdpbmRleCcsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBub2RlLCBvZmZzZXQpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAncmVzdG9yZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiByZXN0b3JlKG5vZGUpIHtcbiAgICAgICAgICAgICAgICB2YXIgcmFuZ2UgPSB2b2lkIDAsXG4gICAgICAgICAgICAgICAgICB0ZXh0Tm9kZSA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgICB2YXIgdGV4dCA9IG5vZGUuZGF0YS5zcGxpdChHVUFSRF9URVhUKS5qb2luKCcnKTtcbiAgICAgICAgICAgICAgICBpZiAobm9kZSA9PT0gdGhpcy5sZWZ0R3VhcmQpIHtcbiAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnByZXYgaW5zdGFuY2VvZiBfdGV4dDIuZGVmYXVsdCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcHJldkxlbmd0aCA9IHRoaXMucHJldi5sZW5ndGgoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wcmV2Lmluc2VydEF0KHByZXZMZW5ndGgsIHRleHQpO1xuICAgICAgICAgICAgICAgICAgICByYW5nZSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICBzdGFydE5vZGU6IHRoaXMucHJldi5kb21Ob2RlLFxuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0T2Zmc2V0OiBwcmV2TGVuZ3RoICsgdGV4dC5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0ZXh0Tm9kZSA9IGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHRleHQpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBhcmVudC5pbnNlcnRCZWZvcmUoXG4gICAgICAgICAgICAgICAgICAgICAgX3BhcmNobWVudDIuZGVmYXVsdC5jcmVhdGUodGV4dE5vZGUpLFxuICAgICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0ge1xuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0Tm9kZTogdGV4dE5vZGUsXG4gICAgICAgICAgICAgICAgICAgICAgc3RhcnRPZmZzZXQ6IHRleHQubGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobm9kZSA9PT0gdGhpcy5yaWdodEd1YXJkKSB7XG4gICAgICAgICAgICAgICAgICBpZiAodGhpcy5uZXh0IGluc3RhbmNlb2YgX3RleHQyLmRlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5uZXh0Lmluc2VydEF0KDAsIHRleHQpO1xuICAgICAgICAgICAgICAgICAgICByYW5nZSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICBzdGFydE5vZGU6IHRoaXMubmV4dC5kb21Ob2RlLFxuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0T2Zmc2V0OiB0ZXh0Lmxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRleHROb2RlID0gZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUodGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50Lmluc2VydEJlZm9yZShcbiAgICAgICAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LmNyZWF0ZSh0ZXh0Tm9kZSksXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5uZXh0LFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByYW5nZSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICBzdGFydE5vZGU6IHRleHROb2RlLFxuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0T2Zmc2V0OiB0ZXh0Lmxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbm9kZS5kYXRhID0gR1VBUkRfVEVYVDtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmFuZ2U7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICd1cGRhdGUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gdXBkYXRlKG11dGF0aW9ucywgY29udGV4dCkge1xuICAgICAgICAgICAgICAgIHZhciBfdGhpczIgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgbXV0YXRpb25zLmZvckVhY2goZnVuY3Rpb24gKG11dGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIG11dGF0aW9uLnR5cGUgPT09ICdjaGFyYWN0ZXJEYXRhJyAmJlxuICAgICAgICAgICAgICAgICAgICAobXV0YXRpb24udGFyZ2V0ID09PSBfdGhpczIubGVmdEd1YXJkIHx8XG4gICAgICAgICAgICAgICAgICAgICAgbXV0YXRpb24udGFyZ2V0ID09PSBfdGhpczIucmlnaHRHdWFyZClcbiAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcmFuZ2UgPSBfdGhpczIucmVzdG9yZShtdXRhdGlvbi50YXJnZXQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocmFuZ2UpIGNvbnRleHQucmFuZ2UgPSByYW5nZTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG5cbiAgICAgICAgICByZXR1cm4gRW1iZWQ7XG4gICAgICAgIH0pKF9wYXJjaG1lbnQyLmRlZmF1bHQuRW1iZWQpO1xuXG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IEVtYmVkO1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogMzYgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAnX19lc01vZHVsZScsIHtcbiAgICAgICAgICB2YWx1ZTogdHJ1ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIGV4cG9ydHMuQWxpZ25TdHlsZSA9XG4gICAgICAgICAgZXhwb3J0cy5BbGlnbkNsYXNzID1cbiAgICAgICAgICBleHBvcnRzLkFsaWduQXR0cmlidXRlID1cbiAgICAgICAgICAgIHVuZGVmaW5lZDtcblxuICAgICAgICB2YXIgX3BhcmNobWVudCA9IF9fd2VicGFja19yZXF1aXJlX18oMCk7XG5cbiAgICAgICAgdmFyIF9wYXJjaG1lbnQyID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4gICAgICAgIHZhciBCYWNrZ3JvdW5kU3R5bGUgPSBuZXcgX2NvbG9yLkNvbG9yQXR0cmlidXRvcihcbiAgICAgICAgICAnYmFja2dyb3VuZCcsXG4gICAgICAgICAgJ2JhY2tncm91bmQtY29sb3InLFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHNjb3BlOiBfcGFyY2htZW50Mi5kZWZhdWx0LlNjb3BlLklOTElORSxcbiAgICAgICAgICB9LFxuICAgICAgICApO1xuXG4gICAgICAgIGV4cG9ydHMuQmFja2dyb3VuZENsYXNzID0gQmFja2dyb3VuZENsYXNzO1xuICAgICAgICBleHBvcnRzLkJhY2tncm91bmRTdHlsZSA9IEJhY2tncm91bmRTdHlsZTtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDM4ICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgJ19fZXNNb2R1bGUnLCB7XG4gICAgICAgICAgdmFsdWU6IHRydWUsXG4gICAgICAgIH0pO1xuICAgICAgICBleHBvcnRzLkRpcmVjdGlvblN0eWxlID1cbiAgICAgICAgICBleHBvcnRzLkRpcmVjdGlvbkNsYXNzID1cbiAgICAgICAgICBleHBvcnRzLkRpcmVjdGlvbkF0dHJpYnV0ZSA9XG4gICAgICAgICAgICB1bmRlZmluZWQ7XG5cbiAgICAgICAgdmFyIF9wYXJjaG1lbnQgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDApO1xuXG4gICAgICAgIHZhciBfcGFyY2htZW50MiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX3BhcmNobWVudCk7XG5cbiAgICAgICAgZnVuY3Rpb24gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChvYmopIHtcbiAgICAgICAgICByZXR1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ZXMoQ29uc3RydWN0b3IucHJvdG90eXBlLCBwcm90b1Byb3BzKTtcbiAgICAgICAgICAgIGlmIChzdGF0aWNQcm9wcykgZGVmaW5lUHJvcGVydGllcyhDb25zdHJ1Y3Rvciwgc3RhdGljUHJvcHMpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnN0cnVjdG9yO1xuICAgICAgICAgIH07XG4gICAgICAgIH0pKCk7XG5cbiAgICAgICAgdmFyIF9nZXQgPSBmdW5jdGlvbiBnZXQob2JqZWN0LCBwcm9wZXJ0eSwgcmVjZWl2ZXIpIHtcbiAgICAgICAgICBpZiAob2JqZWN0ID09PSBudWxsKSBvYmplY3QgPSBGdW5jdGlvbi5wcm90b3R5cGU7XG4gICAgICAgICAgdmFyIGRlc2MgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKG9iamVjdCwgcHJvcGVydHkpO1xuICAgICAgICAgIGlmIChkZXNjID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnQgPSBPYmplY3QuZ2V0UHJvdG90eXBlT2Yob2JqZWN0KTtcbiAgICAgICAgICAgIGlmIChwYXJlbnQgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBnZXQocGFyZW50LCBwcm9wZXJ0eSwgcmVjZWl2ZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSBpZiAoJ3ZhbHVlJyBpbiBkZXNjKSB7XG4gICAgICAgICAgICByZXR1cm4gZGVzYy52YWx1ZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGdldHRlciA9IGRlc2MuZ2V0O1xuICAgICAgICAgICAgaWYgKGdldHRlciA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB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bicpXG4gICAgICAgICAgICA/IGNhbGxcbiAgICAgICAgICAgIDogc2VsZjtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9pbmhlcml0cyhzdWJDbGFzcywgc3VwZXJDbGFzcykge1xuICAgICAgICAgIGlmICh0eXBlb2Ygc3VwZXJDbGFzcyAhPT0gJ2Z1bmN0aW9uJyAmJiBzdXBlckNsYXNzICE9PSBudWxsKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAnU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGNvbmZpZyA9IHtcbiAgICAgICAgICBzY29wZTogX3BhcmNobWVudDIuZGVmYXVsdC5TY29wZS5JTkxJTkUsXG4gICAgICAgICAgd2hpdGVsaXN0OiBbJ3NlcmlmJywgJ21vbm9zcGFjZSddLFxuICAgICAgICB9O1xuXG4gICAgICAgIHZhciBGb250Q2xhc3MgPSBuZXcgX3BhcmNobWVudDIuZGVmYXVsdC5BdHRyaWJ1dG9yLkNsYXNzKFxuICAgICAgICAgICdmb250JyxcbiAgICAgICAgICAncWwtZm9udCcsXG4gICAgICAgICAgY29uZmlnLFxuICAgICAgICApO1xuXG4gICAgICAgIHZhciBGb250U3R5bGVBdHRyaWJ1dG9yID0gKGZ1bmN0aW9uIChfUGFyY2htZW50JEF0dHJpYnV0b3IpIHtcbiAgICAgICAgICBfaW5oZXJpdHMoRm9udFN0eWxlQXR0cmlidXRvciwgX1BhcmNobWVudCRBdHRyaWJ1dG9yKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIEZvbnRTdHlsZUF0dHJpYnV0b3IoKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgRm9udFN0eWxlQXR0cmlidXRvcik7XG5cbiAgICAgICAgICAgIHJldHVybiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKFxuICAgICAgICAgICAgICAgIEZvbnRTdHlsZUF0dHJpYnV0b3IuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKEZvbnRTdHlsZUF0dHJpYnV0b3IpXG4gICAgICAgICAgICAgICkuYXBwbHkodGhpcywgYXJndW1lbnRzKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKEZvbnRTdHlsZUF0dHJpYnV0b3IsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAndmFsdWUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gdmFsdWUobm9kZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBfZ2V0KFxuICAgICAgICAgICAgICAgICAgRm9udFN0eWxlQXR0cmlidXRvci5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihGb250U3R5bGVBdHRyaWJ1dG9yLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAndmFsdWUnLFxuICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAuY2FsbCh0aGlzLCBub2RlKVxuICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoL1tcIiddL2csICcnKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG5cbiAgICAgICAgICByZXR1cm4gRm9udFN0eWxlQXR0cmlidXRvcjtcbiAgICAgICAgfSkoX3BhcmNobWVudDIuZGVmYXVsdC5BdHRyaWJ1dG9yLlN0eWxlKTtcblxuICAgICAgICB2YXIgRm9udFN0eWxlID0gbmV3IEZvbnRTdHlsZUF0dHJpYnV0b3IoJ2ZvbnQnLCAnZm9udC1mYW1pbHknLCBjb25maWcpO1xuXG4gICAgICAgIGV4cG9ydHMuRm9udFN0eWxlID0gRm9udFN0eWxlO1xuICAgICAgICBleHBvcnRzLkZvbnRDbGFzcyA9IEZvbnRDbGFzcztcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDQwICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZ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cbiAgICAgICAgICB9LFxuICAgICAgICApO1xuXG4gICAgICAgIGV4cG9ydHMuU2l6ZUNsYXNzID0gU2l6ZUNsYXNzO1xuICAgICAgICBleHBvcnRzLlNpemVTdHlsZSA9IFNpemVTdHlsZTtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDQxICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICBtb2R1bGUuZXhwb3J0cyA9IHtcbiAgICAgICAgICBhbGlnbjoge1xuICAgICAgICAgICAgJyc6IF9fd2VicGFja19yZXF1aXJlX18oNzYpLFxuICAgICAgICAgICAgY2VudGVyOiBfX3dlYnBhY2tfcmVxdWlyZV9fKDc3KSxcbiAgICAgICAgICAgIHJpZ2h0OiBfX3dlYnBhY2tfcmVxdWlyZV9fKDc4KSxcbiAgICAgICAgICAgIGp1c3RpZnk6IF9fd2VicGFja19yZXF1aXJlX18oNzkpLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgYmFja2dyb3VuZDogX193ZWJwYWNrX3JlcXVpcmVfXyg4MCksXG4gICAgICAgICAgYmxvY2txdW90ZTogX193ZWJwYWNrX3JlcXVpcmVfXyg4MSksXG4gICAgICAgICAgYm9sZDogX193ZWJwYWNrX3JlcXVpcmVfXyg4MiksXG4gICAgICAgICAgY2xlYW46IF9fd2VicGFja19yZXF1aXJlX18oODMpLFxuICAgICAgICAgIGNvZGU6IF9fd2VicGFja19yZXF1aXJlX18oNTgpLFxuICAgICAgICAgICdjb2RlLWJsb2NrJzogX193ZWJwYWNrX3JlcXVpcmVfXyg1OCksXG4gICAgICAgICAgY29sb3I6IF9fd2VicGFja19yZXF1aXJlX18oODQpLFxuICAgICAgICAgIGRpcmVjdGlvbjoge1xuICAgICAgICAgICAgJyc6IF9fd2VicGFja19yZXF1aXJlX18oODUpLFxuICAgICAgICAgICAgcnRsOiBfX3dlYnBhY2tfcmVxdWlyZV9fKDg2KSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGZsb2F0OiB7XG4gICAgICAgICAgICBjZW50ZXI6IF9fd2VicGFja19yZXF1aXJlX18oODcpLFxuICAgICAgICAgICAgZnVsbDogX193ZWJwYWNrX3JlcXVpcmVfXyg4OCksXG4gICAgICAgICAgICBsZWZ0OiBfX3dlYnBhY2tfcmVxdWlyZV9fKDg5KSxcbiAgICAgICAgICAgIHJpZ2h0OiBfX3dlYnBhY2tfcmVxdWlyZV9fKDkwKSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGZvcm11bGE6IF9fd2VicGFja19yZXF1aXJlX18oOTEpLFxuICAgICAgICAgIGhlYWRlcjoge1xuICAgICAgICAgICAgMTogX193ZWJwYWNrX3JlcXVpcmVfXyg5MiksXG4gICAgICAgICAgICAyOiBfX3dlYnBhY2tfcmVxdWlyZV9fKDkzKSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGl0YWxpYzogX193ZWJwYWNrX3JlcXVpcmVfXyg5NCksXG4gICAgICAgICAgaW1hZ2U6IF9fd2VicGFja19yZXF1aXJlX18oOTUpLFxuICAgICAgICAgIGluZGVudDoge1xuICAgICAgICAgICAgJysxJzogX193ZWJwYWNrX3JlcXVpcmVfXyg5NiksXG4gICAgICAgICAgICAnLTEnOiBfX3dlYnBhY2tfcmVxdWlyZV9fKDk3KSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGxpbms6IF9fd2VicGFja19yZXF1aXJlX18oOTgpLFxuICAgICAgICAgIGxpc3Q6IHtcbiAgICAgICAgICAgIG9yZGVyZWQ6IF9fd2VicGFja19yZXF1aXJlX18oOTkpLFxuICAgICAgICAgICAgYnVsbGV0OiBfX3dlYnBhY2tfcmVxdWlyZV9fKDEwMCksXG4gICAgICAgICAgICBjaGVjazogX193ZWJwYWNrX3JlcXVpcmVfXygxMDEpLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgc2NyaXB0OiB7XG4gICAgICAgICAgICBzdWI6IF9fd2VicGFja19yZXF1aXJlX18oMTAyKSxcbiAgICAgICAgICAgIHN1cGVyOiBfX3dlYnBhY2tfcmVxdWlyZV9fKDEwMyksXG4gICAgICAgICAgfSxcbiAgICAgICAgICBzdHJpa2U6IF9fd2VicGFja19yZXF1aXJlX18oMTA0KSxcbiAgICAgICAgICB1bmRlcmxpbmU6IF9fd2VicGFja19yZXF1aXJlX18oMTA1KSxcbiAgICAgICAgICB2aWRlbzogX193ZWJwYWNrX3JlcXVpcmVfXygxMDYpLFxuICAgICAgICB9O1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogNDIgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAnX19lc01vZHVsZScsIHtcbiAgICAgICAgICB2YWx1ZTogdHJ1ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIGV4cG9ydHMuZ2V0TGFzdENoYW5nZUluZGV4ID0gZXhwb3J0cy5kZWZhdWx0ID0gdW5kZWZpbmVkO1xuXG4gICAgICAgIHZhciBfY3JlYXRlQ2xhc3MgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXModGFyZ2V0LCBwcm9wcykge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwcm9wcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICB2YXIgZGVzY3JpcHRvciA9IHByb3BzW2ldO1xuICAgICAgICAgICAgICBkZXNjcmlwdG9yLmVudW1lcmFibGUgPSBkZXNjcmlwdG9yLmVudW1lcmFibGUgfHwgZmFsc2U7XG4gICAgICAgICAgICAgIGRlc2NyaXB0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m93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICdTdXBlciBleHByZXNzaW9uIG11c3QgZWl0aGVyIGJlIG51bGwgb3IgYSBmdW5jdGlvbiwgbm90ICcgK1xuICAgICAgICAgICAgICAgIHR5cGVvZiBzdXBlckNsYXNzLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgc3ViQ2xhc3MucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShcbiAgICAgICAgICAgIHN1cGVyQ2xhc3MgJiYgc3VwZXJDbGFzcy5wcm90b3R5cGUsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGNvbnN0cnVjdG9yOiB7XG4gICAgICAgICAgICAgICAgdmFsdWU6IHN1YkNsYXNzLFxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgKTtcbiAgICAgICAgICBpZiAoc3VwZXJDbGFzcylcbiAgICAgICAgICAgIE9iamVjdC5zZXRQcm90b3R5cGVPZlxuICAgICAgICAgICAgICA/IE9iamVjdC5zZXRQcm90b3R5cGVPZihzdWJDbGFzcywgc3VwZXJDbGFzcylcbiAgICAgICAgICAgICAgOiAoc3ViQ2xhc3MuX19wcm90b19fID0gc3VwZXJDbGFzcyk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgSGlzdG9yeSA9IChmdW5jdGlvbiAoX01vZHVsZSkge1xuICAgICAgICAgIF9pbmhlcml0cyhIaXN0b3J5LCBfTW9kdWxlKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIEhpc3RvcnkocXVpbGwsIG9wdGlvbnMpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBIaXN0b3J5KTtcblxuICAgICAgICAgICAgdmFyIF90aGlzID0gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oXG4gICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgIChIaXN0b3J5Ll9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoSGlzdG9yeSkpLmNhbGwoXG4gICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICBxdWlsbCxcbiAgICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgX3RoaXMubGFzdFJlY29yZGVkID0gMDtcbiAgICAgICAgICAgIF90aGlzLmlnbm9yZUNoYW5nZSA9IGZhbHNlO1xuICAgICAgICAgICAgX3RoaXMuY2xlYXIoKTtcbiAgICAgICAgICAgIF90aGlzLnF1aWxsLm9uKFxuICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuZXZlbnRzLkVESVRPUl9DSEFOR0UsXG4gICAgICAgICAgICAgIGZ1bmN0aW9uIChldmVudE5hbWUsIGRlbHRhLCBvbGREZWx0YSwgc291cmNlKSB7XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgZXZlbnROYW1lICE9PSBfcXVpbGwyLmRlZmF1bHQuZXZlbnRzLlRFWFRfQ0hBTkdFIHx8XG4gICAgICAgICAgICAgICAgICBfdGhpcy5pZ25vcmVDaGFuZ2VcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgIV90aGlzLm9wdGlvbnMudXNlck9ubHkgfHxcbiAgICAgICAgICAgICAgICAgIHNvdXJjZSA9PT0gX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUlxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgX3RoaXMucmVjb3JkKGRlbHRhLCBvbGREZWx0YSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIF90aGlzLnRyYW5zZm9ybShkZWx0YSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIF90aGlzLnF1aWxsLmtleWJvYXJkLmFkZEJpbmRpbmcoXG4gICAgICAgICAgICAgIHtrZXk6ICdaJywgc2hvcnRLZXk6IHRydWV9LFxuICAgICAgICAgICAgICBfdGhpcy51bmRvLmJpbmQoX3RoaXMpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIF90aGlzLnF1aWxsLmtleWJvYXJkLmFkZEJpbmRpbmcoXG4gICAgICAgICAgICAgIHtrZXk6ICdaJywgc2hvcnRLZXk6IHRydWUsIHNoaWZ0S2V5OiB0cnVlfSxcbiAgICAgICAgICAgICAgX3RoaXMucmVkby5iaW5kKF90aGlzKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAoL1dpbi9pLnRlc3QobmF2aWdhdG9yLnBsYXRmb3JtKSkge1xuICAgICAgICAgICAgICBfdGhpcy5xdWlsbC5rZXlib2FyZC5hZGRCaW5kaW5nKFxuICAgICAgICAgICAgICAgIHtrZXk6ICdZJywgc2hvcnRLZXk6IHRydWV9LFxuICAgICAgICAgICAgICAgIF90aGlzLnJlZG8uYmluZChfdGhpcyksXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKEhpc3RvcnksIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnY2hhbmdlJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGNoYW5nZShzb3VyY2UsIGRlc3QpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zdGFja1tzb3VyY2VdLmxlbmd0aCA9PT0gMCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIHZhciBkZWx0YSA9IHRoaXMuc3RhY2tbc291cmNlXS5wb3AoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnN0YWNrW2Rlc3RdLnB1c2goZGVsdGEpO1xuICAgICAgICAgICAgICAgIHRoaXMubGFzdFJlY29yZGVkID0gMDtcbiAgICAgICAgICAgICAgICB0aGlzLmlnbm9yZUNoYW5nZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgdGhpcy5xdWlsbC51cGRhdGVDb250ZW50cyhcbiAgICAgICAgICAgICAgICAgIGRlbHRhW3NvdXJjZV0sXG4gICAgICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgdGhpcy5pZ25vcmVDaGFuZ2UgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSBnZXRMYXN0Q2hhbmdlSW5kZXgoZGVsdGFbc291cmNlXSk7XG4gICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5zZXRTZWxlY3Rpb24oaW5kZXgpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnY2xlYXInLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gY2xlYXIoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zdGFjayA9IHt1bmRvOiBbXSwgcmVkbzogW119O1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnY3V0b2ZmJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGN1dG9mZigpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmxhc3RSZWNvcmRlZCA9IDA7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdyZWNvcmQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcmVjb3JkKGNoYW5nZURlbHRhLCBvbGREZWx0YSkge1xuICAgICAgICAgICAgICAgIGlmIChjaGFuZ2VEZWx0YS5vcHMubGVuZ3RoID09PSAwKSByZXR1cm47XG4gICAgICAgICAgICAgICAgdGhpcy5zdGFjay5yZWRvID0gW107XG4gICAgICAgICAgICAgICAgdmFyIHVuZG9EZWx0YSA9IHRoaXMucXVpbGwuZ2V0Q29udGVudHMoKS5kaWZmKG9sZERlbHRhKTtcbiAgICAgICAgICAgICAgICB2YXIgdGltZXN0YW1wID0gRGF0ZS5ub3coKTtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICB0aGlzLmxhc3RSZWNvcmRlZCArIHRoaXMub3B0aW9ucy5kZWxheSA+IHRpbWVzdGFtcCAmJlxuICAgICAgICAgICAgICAgICAgdGhpcy5zdGFjay51bmRvLmxlbmd0aCA+IDBcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIHZhciBkZWx0YSA9IHRoaXMuc3RhY2sudW5kby5wb3AoKTtcbiAgICAgICAgICAgICAgICAgIHVuZG9EZWx0YSA9IHVuZG9EZWx0YS5jb21wb3NlKGRlbHRhLnVuZG8pO1xuICAgICAgICAgICAgICAgICAgY2hhbmdlRGVsdGEgPSBkZWx0YS5yZWRvLmNvbXBvc2UoY2hhbmdlRGVsdGEpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLmxhc3RSZWNvcmRlZCA9IHRpbWVzdGFtcDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5zdGFjay51bmRvLnB1c2goe1xuICAgICAgICAgICAgICAgICAgcmVkbzogY2hhbmdlRGVsdGEsXG4gICAgICAgICAgICAgICAgICB1bmRvOiB1bmRvRGVsdGEsXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc3RhY2sudW5kby5sZW5ndGggPiB0aGlzLm9wdGlvbnMubWF4U3RhY2spIHtcbiAgICAgICAgICAgICAgICAgIHRoaXMuc3RhY2sudW5kby5zaGlmdCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3JlZG8nLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcmVkbygpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNoYW5nZSgncmVkbycsICd1bmRvJyk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICd0cmFuc2Zvcm0nLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gdHJhbnNmb3JtKGRlbHRhKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zdGFjay51bmRvLmZvckVhY2goZnVuY3Rpb24gKGNoYW5nZSkge1xuICAgICAgICAgICAgICAgICAgY2hhbmdlLnVuZG8gPSBkZWx0YS50cmFuc2Zvcm0oY2hhbmdlLnVuZG8sIHRydWUpO1xuICAgICAgICAgICAgICAgICAgY2hhbmdlLnJlZG8gPSBkZWx0YS50cmFuc2Zvcm0oY2hhbmdlLnJlZG8sIHRydWUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHRoaXMuc3RhY2sucmVkby5mb3JFYWNoKGZ1bmN0aW9uIChjaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgIGNoYW5nZS51bmRvID0gZGVsdGEudHJhbnNmb3JtKGNoYW5nZS51bmRvLCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgIGNoYW5nZS5yZWRvID0gZGVsdGEudHJhbnNmb3JtKGNoYW5nZS5yZWRvLCB0cnVlKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3VuZG8nLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gdW5kbygpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNoYW5nZSgndW5kbycsICdyZWRvJyk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgcmV0dXJuIEhpc3Rvcnk7XG4gICAgICAgIH0pKF9tb2R1bGUyLmRlZmF1bHQpO1xuXG4gICAgICAgIEhpc3RvcnkuREVGQVVMVFMgPSB7XG4gICAgICAgICAgZGVsYXk6IDEwMDAsXG4gICAgICAgICAgbWF4U3RhY2s6IDEwMCxcbiAgICAgICAgICB1c2VyT25seTogZmFsc2UsXG4gICAgICAgIH07XG5cbiAgICAgICAgZnVuY3Rpb24gZW5kc1dpdGhOZXdsaW5lQ2hhbmdlKGRlbHRhKSB7XG4gICAgICAgICAgdmFyIGxhc3RPcCA9IGRlbHRhLm9wc1tkZWx0YS5vcHMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgaWYgKGxhc3RPcCA9PSBudWxsKSByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgaWYgKGxhc3RPcC5pbnNlcnQgIT0gbnVsbCkge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgdHlwZW9mIGxhc3RPcC5pbnNlcnQgPT09ICdzdHJpbmcnICYmIGxhc3RPcC5pbnNlcnQuZW5kc1dpdGgoJ1xcbicpXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAobGFzdE9wLmF0dHJpYnV0ZXMgIT0gbnVsbCkge1xuICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKGxhc3RPcC5hdHRyaWJ1dGVzKS5zb21lKGZ1bmN0aW9uIChhdHRyKSB7XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgX3BhcmNobWVudDIuZGVmYXVsdC5xdWVyeShcbiAgICAgICAgICAgICAgICAgIGF0dHIsXG4gICAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LlNjb3BlLkJMT0NLLFxuICAgICAgICAgICAgICAgICkgIT0gbnVsbFxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIGdldExhc3RDaGFuZ2VJbmRleChkZWx0YSkge1xuICAgICAgICAgIHZhciBkZWxldGVMZW5ndGggPSBkZWx0YS5yZWR1Y2UoZnVuY3Rpb24gKGxlbmd0aCwgb3ApIHtcbiAgICAgICAgICAgIGxlbmd0aCArPSBvcC5kZWxldGUgfHwgMDtcbiAgICAgICAgICAgIHJldHVybiBsZW5ndGg7XG4gICAgICAgICAgfSwgMCk7XG4gICAgICAgICAgdmFyIGNoYW5nZUluZGV4ID0gZGVsdGEubGVuZ3RoKCkgLSBkZWxldGVMZW5ndGg7XG4gICAgICAgICAgaWYgKGVuZHNXaXRoTmV3bGluZUNoYW5nZShkZWx0YSkpIHtcbiAgICAgICAgICAgIGNoYW5nZUluZGV4IC09IDE7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBjaGFuZ2VJbmRleDtcbiAgICAgICAgfVxuXG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IEhpc3Rvcnk7XG4gICAgICAgIGV4cG9ydHMuZ2V0TGFzdENoYW5nZUluZGV4ID0gZ2V0TGFzdENoYW5nZUluZGV4O1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogNDMgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydH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tcbiAgICAgICAgICAgIGlmIChzdGF0aWNQcm9wcykgZGVmaW5lUHJvcGVydGllcyhDb25zdHJ1Y3Rvciwgc3RhdGljUHJvcHMpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnN0cnVjdG9yO1xuICAgICAgICAgIH07XG4gICAgICAgIH0pKCk7XG5cbiAgICAgICAgdmFyIF9nZXQgPSBmdW5jdGlvbiBnZXQob2JqZWN0LCBwcm9wZXJ0eSwgcmVjZWl2ZXIpIHtcbiAgICAgICAgICBpZiAob2JqZWN0ID09PSBudWxsKSBvYmplY3QgPSBGdW5jdGlvbi5wcm90b3R5cGU7XG4gICAgICAgICAgdmFyIGRlc2MgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKG9iamVjdCwgcHJvcGVydHkpO1xuICAgICAgICAgIGlmIChkZXNjID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnQgPSBPYmplY3QuZ2V0UHJvdG90eXBlT2Yob2JqZWN0KTtcbiAgICAgICAgICAgIGlmIChwYXJlbnQgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBnZXQocGFyZW50LCBwcm9wZXJ0eSwgcmVjZWl2ZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSBpZiAoJ3ZhbHVlJyBpbiBkZXNjKSB7XG4gICAgICAgICAgICByZXR1cm4gZGVzYy52YWx1ZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGdldHRlciA9IGRlc2MuZ2V0O1xuICAgICAgICAgICAgaWYgKGdldHRlciA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZ2V0dGVyLmNhbGwocmVjZW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2YgY2FsbCA9PT0gJ29iamVjdCcgfHwgdHlwZW9mIGNhbGwgPT09ICdmdW5jdGlvbicpXG4gICAgICAgICAgICA/IGNhbGxcbiAgICAgICAgICAgIDogc2VsZjtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9pbmhlcml0cyhzdWJDbGFzcywgc3VwZXJDbGFzcykge1xuICAgICAgICAgIGlmICh0eXBlb2Ygc3VwZXJDbGFzcyAhPT0gJ2Z1bmN0aW9uJyAmJiBzdXBlckNsYXNzICE9PSBudWxsKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAnU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIEFMSUdOUyA9IFtmYWxzZSwgJ2NlbnRlcicsICdyaWdodCcsICdqdXN0aWZ5J107XG5cbiAgICAgICAgdmFyIENPTE9SUyA9IFtcbiAgICAgICAgICAnIzAwMDAwMCcsXG4gICAgICAgICAgJyNlNjAwMDAnLFxuICAgICAgICAgICcjZmY5OTAwJyxcbiAgICAgICAgICAnI2ZmZmYwMCcsXG4gICAgICAgICAgJyMwMDhhMDAnLFxuICAgICAgICAgICcjMDA2NmNjJyxcbiAgICAgICAgICAnIzk5MzNmZicsXG4gICAgICAgICAgJyNmZmZmZmYnLFxuICAgICAgICAgICcjZmFjY2NjJyxcbiAgICAgICAgICAnI2ZmZWJjYycsXG4gICAgICAgICAgJyNmZmZmY2MnLFxuICAgICAgICAgICcjY2NlOGNjJyxcbiAgICAgICAgICAnI2NjZTBmNScsXG4gICAgICAgICAgJyNlYmQ2ZmYnLFxuICAgICAgICAgICcjYmJiYmJiJyxcbiAgICAgICAgICAnI2YwNjY2NicsXG4gICAgICAgICAgJyNmZmMyNjYnLFxuICAgICAgICAgICcjZmZmZjY2JyxcbiAgICAgICAgICAnIzY2Yjk2NicsXG4gICAgICAgICAgJyM2NmEzZTAnLFxuICAgICAgICAgICcjYzI4NWZmJyxcbiAgICAgICAgICAnIzg4ODg4OCcsXG4gICAgICAgICAgJyNhMTAwMDAnLFxuICAgICAgICAgICcjYjI2YjAwJyxcbiAgICAgICAgICAnI2IyYjIwMCcsXG4gICAgICAgICAgJyMwMDYxMDAnLFxuICAgICAgICAgICcjMDA0N2IyJyxcbiAgICAgICAgICAnIzZiMjRiMicsXG4gICAgICAgICAgJyM0NDQ0NDQnLFxuICAgICAgICAgICcjNWMwMDAwJyxcbiAgICAgICAgICAnIzY2M2QwMCcsXG4gICAgICAgICAgJyM2NjY2MDAnLFxuICAgICAgICAgICcjMDAzNzAwJyxcbiAgICAgICAgICAnIzAwMjk2NicsXG4gICAgICAgICAgJyMzZDE0NjYnLFxuICAgICAgICBdO1xuXG4gICAgICAgIHZhciBGT05UUyA9IFtmYWxzZSwgJ3NlcmlmJywgJ21vbm9zcGFjZSddO1xuXG4gICAgICAgIHZhciBIRUFERVJTID0gWycxJywgJzInLCAnMycsIGZhbHNlXTtcblxuICAgICAgICB2YXIgU0laRVMgPSBbJ3NtYWxsJywgZmFsc2UsICdsYXJnZScsICdodWdlJ107XG5cbiAgICAgICAgdmFyIEJhc2VUaGVtZSA9IChmdW5jdGlvbiAoX1RoZW1lKSB7XG4gICAgICAgICAgX2luaGVyaXRzKEJhc2VUaGVtZSwgX1RoZW1lKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIEJhc2VUaGVtZShxdWlsbCwgb3B0aW9ucykge1xuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIEJhc2VUaGVtZSk7XG5cbiAgICAgICAgICAgIHZhciBfdGhpcyA9IF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoQmFzZVRoZW1lLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQmFzZVRoZW1lKSkuY2FsbChcbiAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgIHF1aWxsLFxuICAgICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICB2YXIgbGlzdGVuZXIgPSBmdW5jdGlvbiBsaXN0ZW5lcihlKSB7XG4gICAgICAgICAgICAgIGlmICghZG9jdW1lbnQuYm9keS5jb250YWlucyhxdWlsbC5yb290KSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBkb2N1bWVudC5ib2R5LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgbGlzdGVuZXIpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBfdGhpcy50b29sdGlwICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICAhX3RoaXMudG9vbHRpcC5yb290LmNvbnRhaW5zKGUudGFyZ2V0KSAmJlxuICAgICAgICAgICAgICAgIGRvY3VtZW50LmFjdGl2ZUVsZW1lbnQgIT09IF90aGlzLnRvb2x0aXAudGV4dGJveCAmJlxuICAgICAgICAgICAgICAgICFfdGhpcy5xdWlsbC5oYXNGb2N1cygpXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIF90aGlzLnRvb2x0aXAuaGlkZSgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChfdGhpcy5waWNrZXJzICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5waWNrZXJzLmZvckVhY2goZnVuY3Rpb24gKHBpY2tlcikge1xuICAgICAgICAgICAgICAgICAgaWYgKCFwaWNrZXIuY29udGFpbmVyLmNvbnRhaW5zKGUudGFyZ2V0KSkge1xuICAgICAgICAgICAgICAgICAgICBwaWNrZXIuY2xvc2UoKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHF1aWxsLmVtaXR0ZXIubGlzdGVuRE9NKCdjbGljaycsIGRvY3VtZW50LmJvZHksIGxpc3RlbmVyKTtcbiAgICAgICAgICAgIHJldHVybiBfdGhpcztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoQmFzZVRoZW1lLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2FkZE1vZHVsZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBhZGRNb2R1bGUobmFtZSkge1xuICAgICAgICAgICAgICAgIHZhciBtb2R1bGUgPSBfZ2V0KFxuICAgICAgICAgICAgICAgICAgQmFzZVRoZW1lLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKEJhc2VUaGVtZS5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgJ2FkZE1vZHVsZScsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBuYW1lKTtcbiAgICAgICAgICAgICAgICBpZiAobmFtZSA9PT0gJ3Rvb2xiYXInKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLmV4dGVuZFRvb2xiYXIobW9kdWxlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIG1vZHVsZTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2J1aWxkQnV0dG9ucycsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBidWlsZEJ1dHRvbnMoYnV0dG9ucywgaWNvbnMpIHtcbiAgICAgICAgICAgICAgICBidXR0b25zLmZvckVhY2goZnVuY3Rpb24gKGJ1dHRvbikge1xuICAgICAgICAgICAgICAgICAgdmFyIGNsYXNzTmFtZSA9IGJ1dHRvbi5nZXRBdHRyaWJ1dGUoJ2NsYXNzJykgfHwgJyc7XG4gICAgICAgICAgICAgICAgICBjbGFzc05hbWUuc3BsaXQoL1xccysvKS5mb3JFYWNoKGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghbmFtZS5zdGFydHNXaXRoKCdxbC0nKSkgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICBuYW1lID0gbmFtZS5zbGljZSgncWwtJy5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoaWNvbnNbbmFtZV0gPT0gbnVsbCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICBpZiAobmFtZSA9PT0gJ2RpcmVjdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgICBidXR0b24uaW5uZXJIVE1MID0gaWNvbnNbbmFtZV1bJyddICsgaWNvbnNbbmFtZV1bJ3J0bCddO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBpY29uc1tuYW1lXSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgICBidXR0b24uaW5uZXJIVE1MID0gaWNvbnNbbmFtZV07XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gYnV0dG9uLnZhbHVlIHx8ICcnO1xuICAgICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZSAhPSBudWxsICYmIGljb25zW25hbWVdW3ZhbHVlXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uLmlubmVySFRNTCA9IGljb25zW25hbWVdW3ZhbHVlXTtcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnYnVpbGRQaWNrZXJzJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGJ1aWxkUGlja2VycyhzZWxlY3RzLCBpY29ucykge1xuICAgICAgICAgICAgICAgIHZhciBfdGhpczIgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5waWNrZXJzID0gc2VsZWN0cy5tYXAoZnVuY3Rpb24gKHNlbGVjdCkge1xuICAgICAgICAgICAgICAgICAgaWYgKHNlbGVjdC5jbGFzc0xpc3QuY29udGFpbnMoJ3FsLWFsaWduJykpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGVjdC5xdWVyeVNlbGVjdG9yKCdvcHRpb24nKSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgZmlsbFNlbGVjdChzZWxlY3QsIEFMSUdOUyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBfaWNvblBpY2tlcjIuZGVmYXVsdChzZWxlY3QsIGljb25zLmFsaWduKTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdC5jbGFzc0xpc3QuY29udGFpbnMoJ3FsLWJhY2tncm91bmQnKSB8fFxuICAgICAgICAgICAgICAgICAgICBzZWxlY3QuY2xhc3NMaXN0LmNvbnRhaW5zKCdxbC1jb2xvcicpXG4gICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGZvcm1hdCA9IHNlbGVjdC5jbGFzc0xpc3QuY29udGFpbnMoJ3FsLWJhY2tncm91bmQnKVxuICAgICAgICAgICAgICAgICAgICAgID8gJ2JhY2tncm91bmQnXG4gICAgICAgICAgICAgICAgICAgICAgOiAnY29sb3InO1xuICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZWN0LnF1ZXJ5U2VsZWN0b3IoJ29wdGlvbicpID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICBmaWxsU2VsZWN0KFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LFxuICAgICAgICAgICAgICAgICAgICAgICAgQ09MT1JTLFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0ID09PSAnYmFja2dyb3VuZCcgPyAnI2ZmZmZmZicgOiAnIzAwMDAwMCcsXG4gICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IF9jb2xvclBpY2tlcjIuZGVmYXVsdChzZWxlY3QsIGljb25zW2Zvcm1hdF0pO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGVjdC5xdWVyeVNlbGVjdG9yKCdvcHRpb24nKSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGVjdC5jbGFzc0xpc3QuY29udGFpbnMoJ3FsLWZvbnQnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZmlsbFNlbGVjdChzZWxlY3QsIEZPTlRTKTtcbiAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNlbGVjdC5jbGFzc0xpc3QuY29udGFpbnMoJ3FsLWhlYWRlcicpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxsU2VsZWN0KHNlbGVjdCwgSEVBREVSUyk7XG4gICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzZWxlY3QuY2xhc3NMaXN0LmNvbnRhaW5zKCdxbC1zaXplJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGxTZWxlY3Qoc2VsZWN0LCBTSVpFUyk7XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgX3BpY2tlcjIuZGVmYXVsdChzZWxlY3QpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHZhciB1cGRhdGUgPSBmdW5jdGlvbiB1cGRhdGUoKSB7XG4gICAgICAgICAgICAgICAgICBfdGhpczIucGlja2Vycy5mb3JFYWNoKGZ1bmN0aW9uIChwaWNrZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgcGlja2VyLnVwZGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLm9uKF9lbWl0dGVyMi5kZWZhdWx0LmV2ZW50cy5FRElUT1JfQ0hBTkdFLCB1cGRhdGUpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIHJldHVybiBCYXNlVGhlbWU7XG4gICAgICAgIH0pKF90aGVtZTIuZGVmYXVsdCk7XG5cbiAgICAgICAgQmFzZVRoZW1lLkRFRkFVTFRTID0gKDAsIF9leHRlbmQyLmRlZmF1bHQpKFxuICAgICAgICAgIHRydWUsXG4gICAgICAgICAge30sXG4gICAgICAgICAgX3RoZW1lMi5kZWZhdWx0LkRFRkFVTFRTLFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1vZHVsZXM6IHtcbiAgICAgICAgICAgICAgdG9vbGJhcjoge1xuICAgICAgICAgICAgICAgIGhhbmRsZXJzOiB7XG4gICAgICAgICAgICAgICAgICBmb3JtdWxhOiBmdW5jdGlvbiBmb3JtdWxhKCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnRoZW1lLnRvb2x0aXAuZWRpdCgnZm9ybXVsYScpO1xuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIGltYWdlOiBmdW5jdGlvbiBpbWFnZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIF90aGlzMyA9IHRoaXM7XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGVJbnB1dCA9IHRoaXMuY29udGFpbmVyLnF1ZXJ5U2VsZWN0b3IoXG4gICAgICAgICAgICAgICAgICAgICAgJ2lucHV0LnFsLWltYWdlW3R5cGU9ZmlsZV0nLFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZmlsZUlucHV0ID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICBmaWxlSW5wdXQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdpbnB1dCcpO1xuICAgICAgICAgICAgICAgICAgICAgIGZpbGVJbnB1dC5zZXRBdHRyaWJ1dGUoJ3R5cGUnLCAnZmlsZScpO1xuICAgICAgICAgICAgICAgICAgICAgIGZpbGVJbnB1dC5zZXRBdHRyaWJ1dGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAnYWNjZXB0JyxcbiAgICAgICAgICAgICAgICAgICAgICAgICdpbWFnZS9wbmcsIGltYWdlL2dpZiwgaW1hZ2UvanBlZywgaW1hZ2UvYm1wLCBpbWFnZS94LWljb24nLFxuICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgZmlsZUlucHV0LmNsYXNzTGlzdC5hZGQoJ3FsLWltYWdlJyk7XG4gICAgICAgICAgICAgICAgICAgICAgZmlsZUlucHV0LmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZUlucHV0LmZpbGVzICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZUlucHV0LmZpbGVzWzBdICE9IG51bGxcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVhZGVyID0gbmV3IEZpbGVSZWFkZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmVhZGVyLm9ubG9hZCA9IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJhbmdlID0gX3RoaXMzLnF1aWxsLmdldFNlbGVjdGlvbih0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdGhpczMucXVpbGwudXBkYXRlQ29udGVudHMoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXcgX3F1aWxsRGVsdGEyLmRlZmF1bHQoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmV0YWluKHJhbmdlLmluZGV4KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZGVsZXRlKHJhbmdlLmxlbmd0aClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmluc2VydCh7aW1hZ2U6IGUudGFyZ2V0LnJlc3VsdH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2VtaXR0ZXIyLmRlZmF1bHQuc291cmNlcy5VU0VSLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMzLnF1aWxsLnNldFNlbGVjdGlvbihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhbmdlLmluZGV4ICsgMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9lbWl0dGVyMi5kZWZhdWx0LnNvdXJjZXMuU0lMRU5ULFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZUlucHV0LnZhbHVlID0gJyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRlci5yZWFkQXNEYXRhVVJMKGZpbGVJbnB1dC5maWxlc1swXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb250YWluZXIuYXBwZW5kQ2hpbGQoZmlsZUlucHV0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmaWxlSW5wdXQuY2xpY2soKTtcbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICB2aWRlbzogZnVuY3Rpb24gdmlkZW8oKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucXVpbGwudGhlbWUudG9vbHRpcC5lZGl0KCd2aWRlbycpO1xuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICApO1xuXG4gICAgICAgIHZhciBCYXNlVG9vbHRpcCA9IChmdW5jdGlvbiAoX1Rvb2x0aXApIHtcbiAgICAgICAgICBfaW5oZXJpdHMoQmFzZVRvb2x0aXAsIF9Ub29sdGlwKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIEJhc2VUb29sdGlwKHF1aWxsLCBib3VuZHNDb250YWluZXIpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBCYXNlVG9vbHRpcCk7XG5cbiAgICAgICAgICAgIHZhciBfdGhpczQgPSBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKFxuICAgICAgICAgICAgICAgIEJhc2VUb29sdGlwLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQmFzZVRvb2x0aXApXG4gICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBxdWlsbCwgYm91bmRzQ29udGFpbmVyKSxcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgIF90aGlzNC50ZXh0Ym94ID0gX3RoaXM0LnJvb3QucXVlcnlTZWxlY3RvcignaW5wdXRbdHlwZT1cInRleHRcIl0nKTtcbiAgICAgICAgICAgIF90aGlzNC5saXN0ZW4oKTtcbiAgICAgICAgICAgIHJldHVybiBfdGhpczQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKEJhc2VUb29sdGlwLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2xpc3RlbicsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBsaXN0ZW4oKSB7XG4gICAgICAgICAgICAgICAgdmFyIF90aGlzNSA9IHRoaXM7XG5cbiAgICAgICAgICAgICAgICB0aGlzLnRleHRib3guYWRkRXZlbnRMaXN0ZW5lcigna2V5ZG93bicsIGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICAgICAgaWYgKF9rZXlib2FyZDIuZGVmYXVsdC5tYXRjaChldmVudCwgJ2VudGVyJykpIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXM1LnNhdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoX2tleWJvYXJkMi5kZWZhdWx0Lm1hdGNoKGV2ZW50LCAnZXNjYXBlJykpIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXM1LmNhbmNlbCgpO1xuICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnY2FuY2VsJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGNhbmNlbCgpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2VkaXQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZWRpdCgpIHtcbiAgICAgICAgICAgICAgICB2YXIgbW9kZSA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMCAmJiBhcmd1bWVudHNbMF0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1swXVxuICAgICAgICAgICAgICAgICAgICA6ICdsaW5rJztcbiAgICAgICAgICAgICAgICB2YXIgcHJldmlldyA9XG4gICAgICAgICAgICAgICAgICBhcmd1bWVudHMubGVuZ3RoID4gMSAmJiBhcmd1bWVudHNbMV0gIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50c1sxXVxuICAgICAgICAgICAgICAgICAgICA6IG51bGw7XG5cbiAgICAgICAgICAgICAgICB0aGlzLnJvb3QuY2xhc3NMaXN0LnJlbW92ZSgncWwtaGlkZGVuJyk7XG4gICAgICAgICAgICAgICAgdGhpcy5yb290LmNsYXNzTGlzdC5hZGQoJ3FsLWVkaXRpbmcnKTtcbiAgICAgICAgICAgICAgICBpZiAocHJldmlldyAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLnRleHRib3gudmFsdWUgPSBwcmV2aWV3O1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobW9kZSAhPT0gdGhpcy5yb290LmdldEF0dHJpYnV0ZSgnZGF0YS1tb2RlJykpIHtcbiAgICAgICAgICAgICAgICAgIHRoaXMudGV4dGJveC52YWx1ZSA9ICcnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnBvc2l0aW9uKFxuICAgICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5nZXRCb3VuZHModGhpcy5xdWlsbC5zZWxlY3Rpb24uc2F2ZWRSYW5nZSksXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB0aGlzLnRleHRib3guc2VsZWN0KCk7XG4gICAgICAgICAgICAgICAgdGhpcy50ZXh0Ym94LnNldEF0dHJpYnV0ZShcbiAgICAgICAgICAgICAgICAgICdwbGFjZWhvbGRlcicsXG4gICAgICAgICAgICAgICAgICB0aGlzLnRleHRib3guZ2V0QXR0cmlidXRlKCdkYXRhLScgKyBtb2RlKSB8fCAnJyxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHRoaXMucm9vdC5zZXRBdHRyaWJ1dGUoJ2RhdGEtbW9kZScsIG1vZGUpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAncmVzdG9yZUZvY3VzJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHJlc3RvcmVGb2N1cygpIHtcbiAgICAgICAgICAgICAgICB2YXIgc2Nyb2xsVG9wID0gdGhpcy5xdWlsbC5zY3JvbGxpbmdDb250YWluZXIuc2Nyb2xsVG9wO1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnNjcm9sbGluZ0NvbnRhaW5lci5zY3JvbGxUb3AgPSBzY3JvbGxUb3A7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdzYXZlJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHNhdmUoKSB7XG4gICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gdGhpcy50ZXh0Ym94LnZhbHVlO1xuICAgICAgICAgICAgICAgIHN3aXRjaCAodGhpcy5yb290LmdldEF0dHJpYnV0ZSgnZGF0YS1tb2RlJykpIHtcbiAgICAgICAgICAgICAgICAgIGNhc2UgJ2xpbmsnOiB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBzY3JvbGxUb3AgPSB0aGlzLnF1aWxsLnJvb3Quc2Nyb2xsVG9wO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5saW5rUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdFRleHQoXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxpbmtSYW5nZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICdsaW5rJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgX2VtaXR0ZXIyLmRlZmF1bHQuc291cmNlcy5VU0VSLFxuICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHRoaXMubGlua1JhbmdlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVzdG9yZUZvY3VzKCk7XG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5mb3JtYXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAnbGluaycsXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9lbWl0dGVyMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucXVpbGwucm9vdC5zY3JvbGxUb3AgPSBzY3JvbGxUb3A7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgY2FzZSAndmlkZW8nOiB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gZXh0cmFjdFZpZGVvVXJsKHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIH0gLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWZhbGx0aHJvdWdoXG4gICAgICAgICAgICAgICAgICBjYXNlICdmb3JtdWxhJzoge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXZhbHVlKSBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJhbmdlID0gdGhpcy5xdWlsbC5nZXRTZWxlY3Rpb24odHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyYW5nZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gcmFuZ2UuaW5kZXggKyByYW5nZS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5pbnNlcnRFbWJlZChcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yb290LmdldEF0dHJpYnV0ZSgnZGF0YS1tb2RlJyksXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9lbWl0dGVyMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnJvb3QuZ2V0QXR0cmlidXRlKCdkYXRhLW1vZGUnKSA9PT0gJ2Zvcm11bGEnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmluc2VydFRleHQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ICsgMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgJyAnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfZW1pdHRlcjIuZGVmYXVsdC5zb3VyY2VzLlVTRVIsXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnNldFNlbGVjdGlvbihcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ICsgMixcbiAgICAgICAgICAgICAgICAgICAgICAgIF9lbWl0dGVyMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy50ZXh0Ym94LnZhbHVlID0gJyc7XG4gICAgICAgICAgICAgICAgdGhpcy5oaWRlKCk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgcmV0dXJuIEJhc2VUb29sdGlwO1xuICAgICAgICB9KShfdG9vbHRpcDIuZGVmYXVsdCk7XG5cbiAgICAgICAgZnVuY3Rpb24gZXh0cmFjdFZpZGVvVXJsKHVybCkge1xuICAgICAgICAgIHZhciBtYXRjaCA9XG4gICAgICAgICAgICB1cmwubWF0Y2goXG4gICAgICAgICAgICAgIC9eKD86KGh0dHBzPyk6XFwvXFwvKT8oPzooPzp3d3d8bSlcXC4pP3lvdXR1YmVcXC5jb21cXC93YXRjaC4qdj0oW2EtekEtWjAtOV8tXSspLyxcbiAgICAgICAgICAgICkgfHxcbiAgICAgICAgICAgIHVybC5tYXRjaChcbiAgICAgICAgICAgICAgL14oPzooaHR0cHM/KTpcXC9cXC8pPyg/Oig/Ond3d3xtKVxcLik/eW91dHVcXC5iZVxcLyhbYS16QS1aMC05Xy1dKykvLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgIChtYXRjaFsxXSB8fCAnaHR0cHMnKSArXG4gICAgICAgICAgICAgICc6Ly93d3cueW91dHViZS5jb20vZW1iZWQvJyArXG4gICAgICAgICAgICAgIG1hdGNoWzJdICtcbiAgICAgICAgICAgICAgJz9zaG93aW5mbz0wJ1xuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKFxuICAgICAgICAgICAgKG1hdGNoID0gdXJsLm1hdGNoKFxuICAgICAgICAgICAgICAvXig/OihodHRwcz8pOlxcL1xcLyk/KD86d3d3XFwuKT92aW1lb1xcLmNvbVxcLyhcXGQrKS8sXG4gICAgICAgICAgICApKVxuICAgICAgICAgICkge1xuICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25kLWFzc2lnblxuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgKG1hdGNoWzFdIHx8ICdodHRwcycpICtcbiAgICAgICAgICAgICAgJzovL3BsYXllci52aW1lby5jb20vdmlkZW8vJyArXG4gICAgICAgICAgICAgIG1hdGNoWzJdICtcbiAgICAgICAgICAgICAgJy8nXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gdXJsO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gZmlsbFNlbGVjdChzZWxlY3QsIHZhbHVlcykge1xuICAgICAgICAgIHZhciBkZWZhdWx0VmFsdWUgPVxuICAgICAgICAgICAgYXJndW1lbnRzLmxlbmd0aCA+IDIgJiYgYXJndW1lbnRzWzJdICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgPyBhcmd1bWVudHNbMl1cbiAgICAgICAgICAgICAgOiBmYWxzZTtcblxuICAgICAgICAgIHZhbHVlcy5mb3JFYWNoKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgdmFyIG9wdGlvbiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ29wdGlvbicpO1xuICAgICAgICAgICAgaWYgKHZhbHVlID09PSBkZWZhdWx0VmFsdWUpIHtcbiAgICAgICAgICAgICAgb3B0aW9uLnNldEF0dHJpYnV0ZSgnc2VsZWN0ZWQnLCAnc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIG9wdGlvbi5zZXRBdHRyaWJ1dGUoJ3ZhbHVlJywgdmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2VsZWN0LmFwcGVuZENoaWxkKG9wdGlvbik7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICBleHBvcnRzLkJhc2VUb29sdGlwID0gQmFzZVRvb2x0aXA7XG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IEJhc2VUaGVtZTtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDQ0ICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgJ19fZXNNb2R1bGUnLCB7dmFsdWU6IHRydWV9KTtcbiAgICAgICAgdmFyIExpbmtlZExpc3QgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgZnVuY3Rpb24gTGlua2VkTGlzdCgpIHtcbiAgICAgICAgICAgIHRoaXMuaGVhZCA9IHRoaXMudGFpbCA9IG51bGw7XG4gICAgICAgICAgICB0aGlzLmxlbmd0aCA9IDA7XG4gICAgICAgICAgfVxuICAgICAgICAgIExpbmtlZExpc3QucHJvdG90eXBlLmFwcGVuZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBub2RlcyA9IFtdO1xuICAgICAgICAgICAgZm9yICh2YXIgX2kgPSAwOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgICAgbm9kZXNbX2ldID0gYXJndW1lbnRzW19pXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuaW5zZXJ0QmVmb3JlKG5vZGVzWzBdLCBudWxsKTtcbiAgICAgICAgICAgIGlmIChub2Rlcy5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICAgIHRoaXMuYXBwZW5kLmFwcGx5KHRoaXMsIG5vZGVzLnNsaWNlKDEpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIExpbmtlZExpc3QucHJvdG90eXBlLmNvbnRhaW5zID0gZnVuY3Rpb24gKG5vZGUpIHtcbiAgICAgICAgICAgIHZhciBjdXIsXG4gICAgICAgICAgICAgIG5leHQgPSB0aGlzLml0ZXJhdG9yKCk7XG4gICAgICAgICAgICB3aGlsZSAoKGN1ciA9IG5leHQoKSkpIHtcbiAgICAgICAgICAgICAgaWYgKGN1ciA9PT0gbm9kZSkgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBMaW5rZWRMaXN0LnByb3RvdHlwZS5pbnNlcnRCZWZvcmUgPSBmdW5jdGlvbiAobm9kZSwgcmVmTm9kZSkge1xuICAgICAgICAgICAgaWYgKCFub2RlKSByZXR1cm47XG4gICAgICAgICAgICBub2RlLm5leHQgPSByZWZOb2RlO1xuICAgICAgICAgICAgaWYgKHJlZk5vZGUgIT0gbnVsbCkge1xuICAgICAgICAgICAgICBub2RlLnByZXYgPSByZWZOb2RlLnByZXY7XG4gICAgICAgICAgICAgIGlmIChyZWZOb2RlLnByZXYgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHJlZk5vZGUucHJldi5uZXh0ID0gbm9kZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICByZWZOb2RlLnByZXYgPSBub2RlO1xuICAgICAgICAgICAgICBpZiAocmVmTm9kZSA9PT0gdGhpcy5oZWFkKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5oZWFkID0gbm9kZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnRhaWwgIT0gbnVsbCkge1xuICAgICAgICAgICAgICB0aGlzLnRhaWwubmV4dCA9IG5vZGU7XG4gICAgICAgICAgICAgIG5vZGUucHJldiA9IHRoaXMudGFpbDtcbiAgICAgICAgICAgICAgdGhpcy50YWlsID0gbm9kZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIG5vZGUucHJldiA9IG51bGw7XG4gICAgICAgICAgICAgIHRoaXMuaGVhZCA9IHRoaXMudGFpbCA9IG5vZGU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmxlbmd0aCArPSAxO1xuICAgICAgICAgIH07XG4gICAgICAgICAgTGlua2VkTGlzdC5wcm90b3R5cGUub2Zmc2V0ID0gZnVuY3Rpb24gKHRhcmdldCkge1xuICAgICAgICAgICAgdmFyIGluZGV4ID0gMCxcbiAgICAgICAgICAgICAgY3VyID0gdGhpcy5oZWFkO1xuICAgICAgICAgICAgd2hpbGUgKGN1ciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIGlmIChjdXIgPT09IHRhcmdldCkgcmV0dXJuIGluZGV4O1xuICAgICAgICAgICAgICBpbmRleCArPSBjdXIubGVuZ3RoKCk7XG4gICAgICAgICAgICAgIGN1ciA9IGN1ci5uZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICAgIH07XG4gICAgICAgICAgTGlua2VkTGlzdC5wcm90b3R5cGUucmVtb3ZlID0gZnVuY3Rpb24gKG5vZGUpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5jb250YWlucyhub2RlKSkgcmV0dXJuO1xuICAgICAgICAgICAgaWYgKG5vZGUucHJldiAhPSBudWxsKSBub2RlLnByZXYubmV4dCA9IG5vZGUubmV4dDtcbiAgICAgICAgICAgIGlmIChub2RlLm5leHQgIT0gbnVsbCkgbm9kZS5uZXh0LnByZXYgPSBub2RlLnByZXY7XG4gICAgICAgICAgICBpZiAobm9kZSA9PT0gdGhpcy5oZWFkKSB0aGlzLmhlYWQgPSBub2RlLm5leHQ7XG4gICAgICAgICAgICBpZiAobm9kZSA9PT0gdGhpcy50YWlsKSB0aGlzLnRhaWwgPSBub2RlLnByZXY7XG4gICAgICAgICAgICB0aGlzLmxlbmd0aCAtPSAxO1xuICAgICAgICAgIH07XG4gICAgICAgICAgTGlua2VkTGlzdC5wcm90b3R5cGUuaXRlcmF0b3IgPSBmdW5jdGlvbiAoY3VyTm9kZSkge1xuICAgICAgICAgICAgaWYgKGN1ck5vZGUgPT09IHZvaWQgMCkge1xuICAgICAgICAgICAgICBjdXJOb2RlID0gdGhpcy5oZWFkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gVE9ETyB1c2UgeWllbGQgd2hlbiB3ZSBjYW5cbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgIHZhciByZXQgPSBjdXJOb2RlO1xuICAgICAgICAgICAgICBpZiAoY3VyTm9kZSAhPSBudWxsKSBjdXJOb2RlID0gY3VyTm9kZS5uZXh0O1xuICAgICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIExpbmtlZExpc3QucHJvdG90eXBlLmZpbmQgPSBmdW5jdGlvbiAoaW5kZXgsIGluY2x1c2l2ZSkge1xuICAgICAgICAgICAgaWYgKGluY2x1c2l2ZSA9PT0gdm9pZCAwKSB7XG4gICAgICAgICAgICAgIGluY2x1c2l2ZSA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGN1cixcbiAgICAgICAgICAgICAgbmV4dCA9IHRoaXMuaXRlcmF0b3IoKTtcbiAgICAgICAgICAgIHdoaWxlICgoY3VyID0gbmV4dCgpKSkge1xuICAgICAgICAgICAgICB2YXIgbGVuZ3RoID0gY3VyLmxlbmd0aCgpO1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgaW5kZXggPCBsZW5ndGggfHxcbiAgICAgICAgICAgICAgICAoaW5jbHVzaXZlICYmXG4gICAgICAgICAgICAgICAgICBpbmRleCA9PT0gbGVuZ3RoICYmXG4gICAgICAgICAgICAgICAgICAoY3VyLm5leHQgPT0gbnVsbCB8fCBjdXIubmV4dC5sZW5ndGgoKSAhPT0gMCkpXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIHJldHVybiBbY3VyLCBpbmRleF07XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaW5kZXggLT0gbGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIFtudWxsLCAwXTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIExpbmtlZExpc3QucHJvdG90eXBlLmZvckVhY2ggPSBmdW5jdGlvbiAoY2FsbGJhY2spIHtcbiAgICAgICAgICAgIHZhciBjdXIsXG4gICAgICAgICAgICAgIG5leHQgPSB0aGlzLml0ZXJhdG9yKCk7XG4gICAgICAgICAgICB3aGlsZSAoKGN1ciA9IG5leHQoKSkpIHtcbiAgICAgICAgICAgICAgY2FsbGJhY2soY3VyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIExpbmtlZExpc3QucHJvdG90eXBlLmZvckVhY2hBdCA9IGZ1bmN0aW9uIChpbmRleCwgbGVuZ3RoLCBjYWxsYmFjaykge1xuICAgICAgICAgICAgaWYgKGxlbmd0aCA8PSAwKSByZXR1cm47XG4gICAgICAgICAgICB2YXIgX2EgPSB0aGlzLmZpbmQoaW5kZXgpLFxuICAgICAgICAgICAgICBzdGFydE5vZGUgPSBfYVswXSxcbiAgICAgICAgICAgICAgb2Zmc2V0ID0gX2FbMV07XG4gICAgICAgICAgICB2YXIgY3VyLFxuICAgICAgICAgICAgICBjdXJJbmRleCA9IGluZGV4IC0gb2Zmc2V0LFxuICAgICAgICAgICAgICBuZXh0ID0gdGhpcy5pdGVyYXRvcihzdGFydE5vZGUpO1xuICAgICAgICAgICAgd2hpbGUgKChjdXIgPSBuZXh0KCkpICYmIGN1ckluZGV4IDwgaW5kZXggKyBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgdmFyIGN1ckxlbmd0aCA9IGN1ci5sZW5ndGgoKTtcbiAgICAgICAgICAgICAgaWYgKGluZGV4ID4gY3VySW5kZXgpIHtcbiAgICAgICAgICAgICAgICBjYWxsYmFjayhcbiAgICAgICAgICAgICAgICAgIGN1cixcbiAgICAgICAgICAgICAgICAgIGluZGV4IC0gY3VySW5kZXgsXG4gICAgICAgICAgICAgICAgICBNYXRoLm1pbihsZW5ndGgsIGN1ckluZGV4ICsgY3VyTGVuZ3RoIC0gaW5kZXgpLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY2FsbGJhY2soXG4gICAgICAgICAgICAgICAgICBjdXIsXG4gICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgTWF0aC5taW4oY3VyTGVuZ3RoLCBpbmRleCArIGxlbmd0aCAtIGN1ckluZGV4KSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGN1ckluZGV4ICs9IGN1ckxlbmd0aDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIExpbmtlZExpc3QucHJvdG90eXBlLm1hcCA9IGZ1bmN0aW9uIChjYWxsYmFjaykge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVkdWNlKGZ1bmN0aW9uIChtZW1vLCBjdXIpIHtcbiAgICAgICAgICAgICAgbWVtby5wdXNoKGNhbGxiYWNrKGN1cikpO1xuICAgICAgICAgICAgICByZXR1cm4gbWVtbztcbiAgICAgICAgICAgIH0sIFtdKTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIExpbmtlZExpc3QucHJvdG90eXBlLnJlZHVjZSA9IGZ1bmN0aW9uIChjYWxsYmFjaywgbWVtbykge1xuICAgICAgICAgICAgdmFyIGN1cixcbiAgICAgICAgICAgICAgbmV4dCA9IHRoaXMuaXRlcmF0b3IoKTtcbiAgICAgICAgICAgIHdoaWxlICgoY3VyID0gbmV4dCgpKSkge1xuICAgICAgICAgICAgICBtZW1vID0gY2FsbGJhY2sobWVtbywgY3VyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBtZW1vO1xuICAgICAgICAgIH07XG4gICAgICAgICAgcmV0dXJuIExpbmtlZExpc3Q7XG4gICAgICAgIH0pKCk7XG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IExpbmtlZExpc3Q7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiA0NSAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgdmFyIF9fZXh0ZW5kcyA9XG4gICAgICAgICAgKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8XG4gICAgICAgICAgKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBleHRlbmRTdGF0aWNzID1cbiAgICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICAgICAgICh7X19wcm90b19fOiBbXX0gaW5zdGFuY2VvZiBBcnJheSAmJlxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICAgICAgICBkLl9fcHJvdG9fXyA9IGI7XG4gICAgICAgICAgICAgICAgfSkgfHxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICAgICAgICBmdW5jdGlvbiBfXygpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnN0cnVjdG9yID0gZDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBkLnByb3RvdHlwZSA9XG4gICAgICAgICAgICAgICAgYiA9PT0gbnVsbFxuICAgICAgICAg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YXRpb25zKSB7XG4gICAgICAgICAgICAgIF90aGlzLnVwZGF0ZShtdXRhdGlvbnMpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBfdGhpcy5vYnNlcnZlci5vYnNlcnZlKF90aGlzLmRvbU5vZGUsIE9CU0VSVkVSX0NPTkZJRyk7XG4gICAgICAgICAgICBfdGhpcy5hdHRhY2goKTtcbiAgICAgICAgICAgIHJldHVybiBfdGhpcztcbiAgICAgICAgICB9XG4gICAgICAgICAgU2Nyb2xsQmxvdC5wcm90b3R5cGUuZGV0YWNoID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5kZXRhY2guY2FsbCh0aGlzKTtcbiAgICAgICAgICAgIHRoaXMub2JzZXJ2ZXIuZGlzY29ubmVjdCgpO1xuICAgICAgICAgIH07XG4gICAgICAgICAgU2Nyb2xsQmxvdC5wcm90b3R5cGUuZGVsZXRlQXQgPSBmdW5jdGlvbiAoaW5kZXgsIGxlbmd0aCkge1xuICAgICAgICAgICAgdGhpcy51cGRhdGUoKTtcbiAgICAgICAgICAgIGlmIChpbmRleCA9PT0gMCAmJiBsZW5ndGggPT09IHRoaXMubGVuZ3RoKCkpIHtcbiAgICAgICAgICAgICAgdGhpcy5jaGlsZHJlbi5mb3JFYWNoKGZ1bmN0aW9uIChjaGlsZCkge1xuICAgICAgICAgICAgICAgIGNoaWxkLnJlbW92ZSgpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuZGVsZXRlQXQuY2FsbCh0aGlzLCBpbmRleCwgbGVuZ3RoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIFNjcm9sbEJsb3QucHJvdG90eXBlLmZvcm1hdEF0ID0gZnVuY3Rpb24gKFxuICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICBsZW5ndGgsXG4gICAgICAgICAgICBuYW1lLFxuICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5mb3JtYXRBdC5jYWxsKHRoaXMsIGluZGV4LCBsZW5ndGgsIG5hbWUsIHZhbHVlKTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIFNjcm9sbEJsb3QucHJvdG90eXBlLmluc2VydEF0ID0gZnVuY3Rpb24gKGluZGV4LCB2YWx1ZSwgZGVmKSB7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5pbnNlcnRBdC5jYWxsKHRoaXMsIGluZGV4LCB2YWx1ZSwgZGVmKTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIFNjcm9sbEJsb3QucHJvdG90eXBlLm9wdGltaXplID0gZnVuY3Rpb24gKG11dGF0aW9ucywgY29udGV4dCkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIGlmIChtdXRhdGlvbnMgPT09IHZvaWQgMCkge1xuICAgICAgICAgICAgICBtdXRhdGlvbnMgPSBbXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChjb250ZXh0ID09PSB2b2lkIDApIHtcbiAgICAgICAgICAgICAgY29udGV4dCA9IHt9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5vcHRpbWl6ZS5jYWxsKHRoaXMsIGNvbnRleHQpO1xuICAgICAgICAgICAgLy8gV2UgbXVzdCBtb2RpZnkgbXV0YXRpb25zIGRpcmVjdGx5LCBjYW5ub3QgbWFrZSBjb3B5IGFuZCB0aGVuIG1vZGlmeVxuICAgICAgICAgICAgdmFyIHJlY29yZHMgPSBbXS5zbGljZS5jYWxsKHRoaXMub2JzZXJ2ZXIudGFrZVJlY29yZHMoKSk7XG4gICAgICAgICAgICAvLyBBcnJheS5wdXNoIGN1cnJlbnRseSBzZWVtcyB0byBiZSBpbXBsZW1lbnRlZCBieSBhIG5vbi10YWlsIHJlY3Vyc2l2ZSBmdW5jdGlvblxuICAgICAgICAgICAgLy8gc28gd2UgY2Fubm90IGp1c3QgbXV0YXRpb25zLnB1c2guYXBwbHkobXV0YXRpb25zLCB0aGlzLm9ic2VydmVyLnRha2VSZWNvcmRzKCkpO1xuICAgICAgICAgICAgd2hpbGUgKHJlY29yZHMubGVuZ3RoID4gMCkgbXV0YXRpb25zLnB1c2gocmVjb3Jkcy5wb3AoKSk7XG4gICAgICAgICAgICAvLyBUT0RPIHVzZSBXZWFrTWFwXG4gICAgICAgICAgICB2YXIgbWFyayA9IGZ1bmN0aW9uIChibG90LCBtYXJrUGFyZW50KSB7XG4gICAgICAgICAgICAgIGlmIChtYXJrUGFyZW50ID09PSB2b2lkIDApIHtcbiAgICAgICAgICAgICAgICBtYXJrUGFyZW50ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAoYmxvdCA9PSBudWxsIHx8IGJsb3QgPT09IF90aGlzKSByZXR1cm47XG4gICAgICAgICAgICAgIGlmIChibG90LmRvbU5vZGUucGFyZW50Tm9kZSA9PSBudWxsKSByZXR1cm47XG4gICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgICAgaWYgKGJsb3QuZG9tTm9kZVtSZWdpc3RyeS5EQVRBX0tFWV0ubXV0YXRpb25zID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgICAgICAgYmxvdC5kb21Ob2RlW1JlZ2lzdHJ5LkRBVEFfS0VZXS5tdXRhdGlvbnMgPSBbXTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAobWFya1BhcmVudCkgbWFyayhibG90LnBhcmVudCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIG9wdGltaXplID0gZnVuY3Rpb24gKGJsb3QpIHtcbiAgICAgICAgICAgICAgLy8gUG9zdC1vcmRlciB0cmF2ZXJzYWxcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgICAgICBibG90LmRvbU5vZGVbUmVnaXN0cnkuREFUQV9LRVldID09IG51bGwgfHxcbiAgICAgICAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgICAgICAgYmxvdC5kb21Ob2RlW1JlZ2lzdHJ5LkRBVEFfS0VZXS5tdXRhdGlvbnMgPT0gbnVsbFxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYgKGJsb3QgaW5zdGFuY2VvZiBjb250YWluZXJfMS5kZWZhdWx0KSB7XG4gICAgICAgICAgICAgICAgYmxvdC5jaGlsZHJlbi5mb3JFYWNoKG9wdGltaXplKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBibG90Lm9wdGltaXplKGNvbnRleHQpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHZhciByZW1haW5pbmcgPSBtdXRhdGlvbnM7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgcmVtYWluaW5nLmxlbmd0aCA+IDA7IGkgKz0gMSkge1xuICAgICAgICAgICAgICBpZiAoaSA+PSBNQVhfT1BUSU1JWkVfSVRFUkFUSU9OUykge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICAgICdbUGFyY2htZW50XSBNYXhpbXVtIG9wdGltaXplIGl0ZXJhdGlvbnMgcmVhY2hlZCcsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICByZW1haW5pbmcuZm9yRWFjaChmdW5jdGlvbiAobXV0YXRpb24pIHtcbiAgICAgICAgICAgICAgICB2YXIgYmxvdCA9IFJlZ2lzdHJ5LmZpbmQobXV0YXRpb24udGFyZ2V0LCB0cnVlKTtcbiAgICAgICAgICAgICAgICBpZiAoYmxvdCA9PSBudWxsKSByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKGJsb3QuZG9tTm9kZSA9PT0gbXV0YXRpb24udGFyZ2V0KSB7XG4gICAgICAgICAgICAgICAgICBpZiAobXV0YXRpb24udHlwZSA9PT0gJ2NoaWxkTGlzdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgbWFyayhSZWdpc3RyeS5maW5kKG11dGF0aW9uLnByZXZpb3VzU2libGluZywgZmFsc2UpKTtcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKG11dGF0aW9uLmFkZGVkTm9kZXMsIGZ1bmN0aW9uIChub2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIGNoaWxkID0gUmVnaXN0cnkuZmluZChub2RlLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgICAgbWFyayhjaGlsZCwgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICAgIGlmIChjaGlsZCBpbnN0YW5jZW9mIGNvbnRhaW5lcl8xLmRlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkLmNoaWxkcmVuLmZvckVhY2goZnVuY3Rpb24gKGdyYW5kQ2hpbGQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyayhncmFuZENoaWxkLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChtdXRhdGlvbi50eXBlID09PSAnYXR0cmlidXRlcycpIHtcbiAgICAgICAgICAgICAgICAgICAgbWFyayhibG90LnByZXYpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBtYXJrKGJsb3QpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgdGhpcy5jaGlsZHJlbi5mb3JFYWNoKG9wdGltaXplKTtcbiAgICAgICAgICAgICAgcmVtYWluaW5nID0gW10uc2xpY2UuY2FsbCh0aGlzLm9ic2VydmVyLnRha2VSZWNvcmRzKCkpO1xuICAgICAgICAgICAgICByZWNvcmRzID0gcmVtYWluaW5nLnNsaWNlKCk7XG4gICAgICAgICAgICAgIHdoaWxlIChyZWNvcmRzLmxlbmd0aCA+IDApIG11dGF0aW9ucy5wdXNoKHJlY29yZHMucG9wKCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgICAgU2Nyb2xsQmxvdC5wcm90b3R5cGUudXBkYXRlID0gZnVuY3Rpb24gKG11dGF0aW9ucywgY29udGV4dCkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIGlmIChjb250ZXh0ID09PSB2b2lkIDApIHtcbiAgICAgICAgICAgICAgY29udGV4dCA9IHt9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbXV0YXRpb25zID0gbXV0YXRpb25zIHx8IHRoaXMub2JzZXJ2ZXIudGFrZVJlY29yZHMoKTtcbiAgICAgICAgICAgIC8vIFRPRE8gdXNlIFdlYWtNYXBcbiAgICAgICAgICAgIG11dGF0aW9uc1xuICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChtdXRhdGlvbikge1xuICAgICAgICAgICAgICAgIHZhciBibG90ID0gUmVnaXN0cnkuZmluZChtdXRhdGlvbi50YXJnZXQsIHRydWUpO1xuICAgICAgICAgICAgICAgIGlmIChibG90ID09IG51bGwpIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgICAgICBpZiAoYmxvdC5kb21Ob2RlW1JlZ2lzdHJ5LkRBVEFfS0VZXS5tdXRhdGlvbnMgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxuICAgICAgICAgICAgICAgICAgYmxvdC5kb21Ob2RlW1JlZ2lzdHJ5LkRBVEFfS0VZXS5tdXRhdGlvbnMgPSBbbXV0YXRpb25dO1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIGJsb3Q7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgICAgICAgIGJsb3QuZG9tTm9kZVtSZWdpc3RyeS5EQVRBX0tFWV0ubXV0YXRpb25zLnB1c2gobXV0YXRpb24pO1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAuZm9yRWFjaChmdW5jdGlvbiAoYmxvdCkge1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGJsb3QgPT0gbnVsbCB8fFxuICAgICAgICAgICAgICAgICAgYmxvdCA9PT0gX3RoaXMgfHxcbiAgICAgICAgICAgICAgICAgIC8vQHRzLWlnbm9yZVxuICAgICAgICAgICAgICAgICAgYmxvdC5kb21Ob2RlW1JlZ2lzdHJ5LkRBVEFfS0VZXSA9PSBudWxsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgICAgICBibG90LnVwZGF0ZShcbiAgICAgICAgICAgICAgICAgIGJsb3QuZG9tTm9kZVtSZWdpc3RyeS5EQVRBX0tFWV0ubXV0YXRpb25zIHx8IFtdLFxuICAgICAgICAgICAgICAgICAgY29udGV4dCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgIGlmICh0aGlzLmRvbU5vZGVbUmVnaXN0cnkuREFUQV9LRVldLm11dGF0aW9ucyAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS51cGRhdGUuY2FsbChcbiAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgIHRoaXMuZG9tTm9kZVtSZWdpc3RyeS5EQVRBX0tFWV0ubXV0YXRpb25zLFxuICAgICAgICAgICAgICAgIGNvbnRleHQsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLm9wdGltaXplKG11dGF0aW9ucywgY29udGV4dCk7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBTY3JvbGxCbG90LmJsb3ROYW1lID0gJ3Njcm9sbCc7XG4gICAgICAgICAgU2Nyb2xsQmxvdC5kZWZhdWx0Q2hpbGQgPSAnYmxvY2snO1xuICAgICAgICAgIFNjcm9sbEJsb3Quc2NvcGUgPSBSZWdpc3RyeS5TY29wZS5CTE9DS19CTE9UO1xuICAgICAgICAgIFNjcm9sbEJsb3QudGFnTmFtZSA9ICdESVYnO1xuICAgICAgICAgIHJldHVybiBTY3JvbGxCbG90O1xuICAgICAgICB9KShjb250YWluZXJfMS5kZWZhdWx0KTtcbiAgICAgICAgZXhwb3J0cy5kZWZhdWx0ID0gU2Nyb2xsQmxvdDtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDQ2ICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICB2YXIgX19leHRlbmRzID1cbiAgICAgICAgICAodGhpcyAmJiB0aGlzLl9fZXh0ZW5kcykgfHxcbiAgICAgICAgICAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGV4dGVuZFN0YXRpY3MgPVxuICAgICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2YgfHxcbiAgICAgICAgICAgICAgKHtfX3Byb3RvX186IFtdfSBpbnN0YW5jZW9mIEFycmF5ICYmXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgICAgICAgICAgIGQuX19wcm90b19fID0gYjtcbiAgICAgICAgICAgICAgICB9KSB8fFxuICAgICAgICAgICAgICBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIHAgaW4gYikgaWYgKGIuaGFzT3duUHJvcGVydHkocCkpIGRbcF0gPSBiW3BdO1xuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICAgIGV4dGVuZFN0YXRpY3MoZCwgYik7XG4gICAgICAgICAgICAgIGZ1bmN0aW9uIF9fKCkge1xuICAgICAgICAgICAgICAgIHRoaXMuY29uc3RydWN0b3IgPSBkO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGQucHJvdG90eXBlID1cbiAgICAgICAgICAgICAgICBiID09PSBudWxsXG4gICAgICAgICAgICAgICAgICA/IE9iamVjdC5jcmVhdGUoYilcbiAgICAgICAgICAgICAgICAgIDogKChfXy5wcm90b3R5cGUgPSBiLnByb3RvdHlwZSksIG5ldyBfXygpKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfSkoKTtcbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge3ZhbHVlOiB0cnVlfSk7XG4gICAgICAgIHZhciBmb3JtYXRfMSA9IF9fd2VicGFja19yZXF1aXJlX18oMTgpO1xuICAgICAgICB2YXIgUmVnaXN0cnkgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDEpO1xuICAgICAgICAvLyBTaGFsbG93IG9iamVjdCBjb21wYXJpc29uXG4gICAgICAgIGZ1bmN0aW9uIGlzRXF1YWwob2JqMSwgb2JqMikge1xuICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhvYmoxKS5sZW5ndGggIT09IE9iamVjdC5rZXlzKG9iajIpLmxlbmd0aClcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgZm9yICh2YXIgcHJvcCBpbiBvYmoxKSB7XG4gICAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgICBpZiAob2JqMVtwcm9wXSAhPT0gb2JqMltwcm9wXSkgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgSW5saW5lQmxvdCA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uIChfc3VwZXIpIHtcbiAgICAgICAgICBfX2V4dGVuZHMoSW5saW5lQmxvdCwgX3N1cGVyKTtcbiAgICAgICAgICBmdW5jdGlvbiBJbmxpbmVCbG90KCkge1xuICAgICAgICAgICAgcmV0dXJuIChfc3VwZXIgIT09IG51bGwgJiYgX3N1cGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cykpIHx8IHRoaXM7XG4gICAgICAgICAgfVxuICAgICAgICAgIElubGluZUJsb3QuZm9ybWF0cyA9IGZ1bmN0aW9uIChkb21Ob2RlKSB7XG4gICAgICAgICAgICBpZiAoZG9tTm9kZS50YWdOYW1lID09PSBJbmxpbmVCbG90LnRhZ05hbWUpIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICByZXR1cm4gX3N1cGVyLmZvcm1hdHMuY2FsbCh0aGlzLCBkb21Ob2RlKTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIElubGluZUJsb3QucHJvdG90eXBlLmZvcm1hdCA9IGZ1bmN0aW9uIChuYW1lLCB2YWx1ZSkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIGlmIChuYW1lID09PSB0aGlzLnN0YXRpY3MuYmxvdE5hbWUgJiYgIXZhbHVlKSB7XG4gICAgICAgICAgICAgIHRoaXMuY2hpbGRyZW4uZm9yRWFjaChmdW5jdGlvbiAoY2hpbGQpIHtcbiAgICAgICAgICAgICAgICBpZiAoIShjaGlsZCBpbnN0YW5jZW9mIGZvcm1hdF8xLmRlZmF1bHQpKSB7XG4gICAgICAgICAgICAgICAgICBjaGlsZCA9IGNoaWxkLndyYXAoSW5saW5lQmxvdC5ibG90TmFtZSwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIF90aGlzLmF0dHJpYnV0ZXMuY29weShjaGlsZCk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB0aGlzLnVud3JhcCgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5mb3JtYXQuY2FsbCh0aGlzLCBuYW1lLCB2YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcbiAgICAgICAgICBJbmxpbmVCbG90LnByb3RvdHlwZS5mb3JtYXRBdCA9IGZ1bmN0aW9uIChcbiAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgICkge1xuICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICB0aGlzLmZvcm1hdHMoKVtuYW1lXSAhPSBudWxsIHx8XG4gICAgICAgICAgICAgIFJlZ2lzdHJ5LnF1ZXJ5KG5hbWUsIFJlZ2lzdHJ5LlNjb3BlLkFUVFJJQlVURSlcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICB2YXIgYmxvdCA9IHRoaXMuaXNvbGF0ZShpbmRleCwgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgYmxvdC5mb3JtYXQobmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5mb3JtYXRBdC5jYWxsKHRoaXMsIGluZGV4LCBsZW5ndGgsIG5hbWUsIHZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIElubGluZUJsb3QucHJvdG90eXBlLm9wdGltaXplID0gZnVuY3Rpb24gKGNvbnRleHQpIHtcbiAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUub3B0aW1pemUuY2FsbCh0aGlzLCBjb250ZXh0KTtcbiAgICAgICAgICAgIHZhciBmb3JtYXRzID0gdGhpcy5mb3JtYXRzKCk7XG4gICAgICAgICAgICBpZiAoT2JqZWN0LmtleXMoZm9ybWF0cykubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgIHJldHVybiB0aGlzLnVud3JhcCgpOyAvLyB1bmZvcm1hdHRlZCBzcGFuXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgbmV4dCA9IHRoaXMubmV4dDtcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgbmV4dCBpbnN0YW5jZW9mIElubGluZUJsb3QgJiZcbiAgICAgICAgICAgICAgbmV4dC5wcmV2ID09PSB0aGlzICYmXG4gICAgICAgICAgICAgIGlzRXF1YWwoZm9ybWF0cywgbmV4dC5mb3JtYXRzKCkpXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgbmV4dC5tb3ZlQ2hpbGRyZW4odGhpcyk7XG4gICAgICAgICAgICAgIG5leHQucmVtb3ZlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcbiAgICAgICAgICBJbmxpbmVCbG90LmJsb3ROYW1lID0gJ2lubGluZSc7XG4gICAgICAgICAgSW5saW5lQmxvdC5zY29wZSA9IFJlZ2lzdHJ5LlNjb3BlLklOTElORV9CTE9UO1xuICAgICAgICAgIElubGluZUJsb3QudGFnTmFtZSA9ICdTUEFOJztcbiAgICAgICAgICByZXR1cm4gSW5saW5lQmxvdDtcbiAgICAgICAgfSkoZm9ybWF0XzEuZGVmYXVsdCk7XG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IElubGluZUJsb3Q7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiA0NyAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgdmFyIF9fZXh0ZW5kcyA9XG4gICAgICAgICAgKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8XG4gICAgICAgICAgKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBleHRlbmRTdGF0aWNzID1cbiAgICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICAgICAgICh7X19wcm90b19fOiBbXX0gaW5zdGFuY2VvZiBBcnJheSAmJlxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICAgICAgICBkLl9fcHJvdG9fXyA9IGI7XG4gICAgICAgICAgICAgICAgfSkgfHxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICAgICAgICBmdW5jdGlvbiBfXygpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnN0cnVjdG9yID0gZDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB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iBCbG9ja0Jsb3Q7XG4gICAgICAgIH0pKGZvcm1hdF8xLmRlZmF1bHQpO1xuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBCbG9ja0Jsb3Q7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiA0OCAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgdmFyIF9fZXh0ZW5kcyA9XG4gICAgICAgICAgKHRoaXMgJiYgdGhpcy5fX2V4dGVuZHMpIHx8XG4gICAgICAgICAgKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBleHRlbmRTdGF0aWNzID1cbiAgICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICAgICAgICh7X19wcm90b19fOiBbXX0gaW5zdGFuY2VvZiBBcnJheSAmJlxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICAgICAgICBkLl9fcHJvdG9fXyA9IGI7XG4gICAgICAgICAgICAgICAgfSkgfHxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICAgICAgICBmdW5jdGlvbiBfXygpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnN0cnVjdG9yID0gZDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBkLnByb3RvdHlwZSA9XG4gICAgICAgICAgICAgICAgYiA9PT0gbnVsbF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Z1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBleHRlbmRTdGF0aWNzID1cbiAgICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICAgICAgICh7X19wcm90b19fOiBbXX0gaW5zdGFuY2VvZiBBcnJheSAmJlxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICAgICAgICBkLl9fcHJvdG9fXyA9IGI7XG4gICAgICAgICAgICAgICAgfSkgfHxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBwIGluIGIpIGlmIChiLmhhc093blByb3BlcnR5KHApKSBkW3BdID0gYltwXTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoZCwgYikge1xuICAgICAgICAgICAgICBleHRlbmRTdGF0aWNzKGQsIGIpO1xuICAgICAgICAgICAgICBmdW5jdGlvbiBfXygpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnN0cnVjdG9yID0gZDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBkLnByb3RvdHlwZSA9XG4gICAgICAgICAgICAgICAgYiA9PT0gbnVsbFxuICAgICAgICAgICAgICAgICAgPyBPYmplY3QuY3JlYXRlKGIpXG4gICAgICAgICAgICAgICAgICA6ICgoX18ucHJvdG90eXBlID0gYi5wcm90b3R5cGUpLCBuZXcgX18oKSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH0pKCk7XG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAnX19lc01vZHVsZScsIHt2YWx1ZTogdHJ1ZX0pO1xuICAgICAgICB2YXIgbGVhZl8xID0gX193ZWJwYWNrX3JlcXVpcmVfXygxOSk7XG4gICAgICAgIHZhciBSZWdpc3RyeSA9IF9fd2VicGFja19yZXF1aXJlX18oMSk7XG4gIC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V4dEJsb3QucHJvdG90eXBlLmluZGV4ID0gZnVuY3Rpb24gKG5vZGUsIG9mZnNldCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuZG9tTm9kZSA9PT0gbm9kZSkge1xuICAgICAgICAgICAgICByZXR1cm4gb2Zmc2V0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICAgIH07XG4gICAgICAgICAgVGV4dEJsb3QucHJvdG90eXBlLmluc2VydEF0ID0gZnVuY3Rpb24gKGluZGV4LCB2YWx1ZSwgZGVmKSB7XG4gICAgICAgICAgICBpZiAoZGVmID09IG51bGwpIHtcbiAgICAgICAgICAgICAgdGhpcy50ZXh0ID1cbiAgICAgICAgICAgICAgICB0aGlzLnRleHQuc2xpY2UoMCwgaW5kZXgpICsgdmFsdWUgKyB0aGlzLnRleHQuc2xpY2UoaW5kZXgpO1xuICAgICAgICAgICAgICB0aGlzLmRvbU5vZGUuZGF0YSA9IHRoaXMudGV4dDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIF9zdXBlci5wcm90b3R5cGUuaW5zZXJ0QXQuY2FsbCh0aGlzLCBpbmRleCwgdmFsdWUsIGRlZik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcbiAgICAgICAgICBUZXh0QmxvdC5wcm90b3R5cGUubGVuZ3RoID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMudGV4dC5sZW5ndGg7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBUZXh0QmxvdC5wcm90b3R5cGUub3B0aW1pemUgPSBmdW5jdGlvbiAoY29udGV4dCkge1xuICAgICAgICAgICAgX3N1cGVyLnByb3RvdHlwZS5vcHRpbWl6ZS5jYWxsKHRoaXMsIGNvbnRleHQpO1xuICAgICAgICAgICAgdGhpcy50ZXh0ID0gdGhpcy5zdGF0aWNzLnZhbHVlKHRoaXMuZG9tTm9kZSk7XG4gICAgICAgICAgICBpZiAodGhpcy50ZXh0Lmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICB0aGlzLnJlbW92ZSgpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgdGhpcy5uZXh0IGluc3RhbmNlb2YgVGV4dEJsb3QgJiZcbiAgICAgICAgICAgICAgdGhpcy5uZXh0LnByZXYgPT09IHRoaXNcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICB0aGlzLmluc2VydEF0KHRoaXMubGVuZ3RoKCksIHRoaXMubmV4dC52YWx1ZSgpKTtcbiAgICAgICAgICAgICAgdGhpcy5uZXh0LnJlbW92ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgICAgVGV4dEJsb3QucHJvdG90eXBlLnBvc2l0aW9uID0gZnVuY3Rpb24gKGluZGV4LCBpbmNsdXNpdmUpIHtcbiAgICAgICAgICAgIGlmIChpbmNsdXNpdmUgPT09IHZvaWQgMCkge1xuICAgICAgICAgICAgICBpbmNsdXNpdmUgPSBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBbdGhpcy5kb21Ob2RlLCBpbmRleF07XG4gICAgICAgICAgfTtcbiAgICAgICAgICBUZXh0QmxvdC5wcm90b3R5cGUuc3BsaXQgPSBmdW5jdGlvbiAoaW5kZXgsIGZvcmNlKSB7XG4gICAgICAgICAgICBpZiAoZm9yY2UgPT09IHZvaWQgMCkge1xuICAgICAgICAgICAgICBmb3JjZSA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFmb3JjZSkge1xuICAgICAgICAgICAgICBpZiAoaW5kZXggPT09IDApIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgICBpZiAoaW5kZXggPT09IHRoaXMubGVuZ3RoKCkpIHJldHVybiB0aGlzLm5leHQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgYWZ0ZXIgPSBSZWdpc3RyeS5jcmVhdGUodGhpcy5kb21Ob2RlLnNwbGl0VGV4dChpbmRleCkpO1xuICAgICAgICAgICAgdGhpcy5wYXJlbnQuaW5zZXJ0QmVmb3JlKGFmdGVyLCB0aGlzLm5leHQpO1xuICAgICAgICAgICAgdGhpcy50ZXh0ID0gdGhpcy5zdGF0aWNzLnZhbHVlKHRoaXMuZG9tTm9kZSk7XG4gICAgICAgICAgICByZXR1cm4gYWZ0ZXI7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBUZXh0QmxvdC5wcm90b3R5cGUudXBkYXRlID0gZnVuY3Rpb24gKG11dGF0aW9ucywgY29udGV4dCkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgbXV0YXRpb25zLnNvbWUoZnVuY3Rpb24gKG11dGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgIG11dGF0aW9uLnR5cGUgPT09ICdjaGFyYWN0ZXJEYXRhJyAmJlxuICAgICAgICAgICAgICAgICAgbXV0YXRpb24udGFyZ2V0ID09PSBfdGhpcy5kb21Ob2RlXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICB0aGlzLnRleHQgPSB0aGlzLnN0YXRpY3MudmFsdWUodGhpcy5kb21Ob2RlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIFRleHRCbG90LnByb3RvdHlwZS52YWx1ZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnRleHQ7XG4gICAgICAgICAgfTtcbiAgICAgICAgICBUZXh0QmxvdC5ibG90TmFtZSA9ICd0ZXh0JztcbiAgICAgICAgICBUZXh0QmxvdC5zY29wZSA9IFJlZ2lzdHJ5LlNjb3BlLklOTElORV9CTE9UO1xuICAgICAgICAgIHJldHVybiB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G9zaXRpb24gPSBwb3NpdGlvbiB8fCAwO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuc3Vic3RyKHBvc2l0aW9uLCBzZWFyY2hTdHJpbmcubGVuZ3RoKSA9PT0gc2VhcmNoU3RyaW5nO1xuICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIVN0cmluZy5wcm90b3R5cGUuZW5kc1dpdGgpIHtcbiAgICAgICAgICBTdHJpbmcucHJvdG90eXBlLmVuZHNXaXRoID0gZnVuY3Rpb24gKHNlYXJjaFN0cmluZywgcG9zaXRpb24pIHtcbiAgICAgICAgICAgIHZhciBzdWJqZWN0U3RyaW5nID0gdGhpcy50b1N0cmluZygpO1xuICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICB0eXBlb2YgcG9zaXRpb24gIT09ICdudW1iZXInIHx8XG4gICAgICAgICAgICAgICFpc0Zpbml0ZShwb3NpdGlvbikgfHxcbiAgICAgICAgICAgICAgTWF0aC5mbG9vcihwb3NpdGlvbikgIT09IHBvc2l0aW9uIHx8XG4gICAgICAgICAgICAgIHBvc2l0aW9uID4gc3ViamVjdFN0cmluZy5sZW5ndGhcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBwb3NpdGlvbiA9IHN1YmplY3RTdHJpbmcubGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcG9zaXRpb24gLT0gc2VhcmNoU3RyaW5nLmxlbmd0aDtcbiAgICAgICAgICAgIHZhciBsYXN0SW5kZXggPSBzdWJqZWN0U3RyaW5nLmluZGV4T2Yoc2VhcmNoU3RyaW5nLCBwb3NpdGlvbik7XG4gICAgICAgICAgICByZXR1cm4gbGFzdEluZGV4ICE9PSAtMSAmJiBsYXN0SW5kZXggPT09IHBvc2l0aW9uO1xuICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIUFycmF5LnByb3RvdHlwZS5maW5kKSB7XG4gICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KEFycmF5LnByb3RvdHlwZSwgJ2ZpbmQnLCB7XG4gICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gdmFsdWUocHJlZGljYXRlKSB7XG4gICAgICAgICAgICAgIGlmICh0aGlzID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgICAgICdBcnJheS5wcm90b3R5cGUuZmluZCBjYWxsZWQgb24gbnVsbCBvciB1bmRlZmluZWQnLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYgKHR5cGVvZiBwcmVkaWNhdGUgIT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdwcmVkaWNhdGUgbXVzdCBiZSBhIGZ1bmN0aW9uJyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgdmFyIGxpc3QgPSBPYmplY3QodGhpcyk7XG4gICAgICAgICAgICAgIHZhciBsZW5ndGggPSBsaXN0Lmxlbmd0aCA+Pj4gMDtcbiAgICAgICAgICAgICAgdmFyIHRoaXNBcmcgPSBhcmd1bWVudHNbMV07XG4gICAgICAgICAgICAgIHZhciB2YWx1ZTtcblxuICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBsaXN0W2ldO1xuICAgICAgICAgICAgICAgIGlmIChwcmVkaWNhdGUuY2FsbCh0aGlzQXJnLCB2YWx1ZSwgaSwgbGlzdCkpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cblx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GlmZiBvbiB0aGUgbWlkZGxlIGJsb2NrLlxuICAgICAgICAgIHZhciBkaWZmcyA9IGRpZmZfY29tcHV0ZV8odGV4dDEsIHRleHQyKTtcblxuICAgICAgICAgIC8vIFJlc3RvcmUgdGhlIHByZWZpeCBhbmQgc3VmZml4LlxuICAgICAgICAgIGlmIChjb21tb25wcmVmaXgpIHtcbiAgICAgICAgICAgIGRpZmZzLnVuc2hpZnQoW0RJRkZfRVFVQUwsIGNvbW1vbnByZWZpeF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoY29tbW9uc3VmZml4KSB7XG4gICAgICAgICAgICBkaWZmcy5wdXNoKFtESUZGX0VRVUFMLCBjb21tb25zdWZmaXhdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgZGlmZl9jbGVhbnVwTWVyZ2UoZGlmZnMpO1xuICAgICAgICAgIGlmIChjdXJzb3JfcG9zICE9IG51bGwpIHtcbiAgICAgICAgICAgIGRpZmZzID0gZml4X2N1cnNvcihkaWZmcywgY3Vyc29yX3Bvcyk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGRpZmZzID0gZml4X2Vtb2ppKGRpZmZzKTtcbiAgICAgICAgICByZXR1cm4gZGlmZnM7XG4gICAgICAgIH1cblxuICAgICAgICAvKipcbiAgICAgICAgICogRmluZCB0aGUgZGlmZmVyZW5jZXMgYmV0d2VlbiB0d28gdGV4dHMuICBBc3N1bWVzIHRoYXQgdGhlIHRleHRzIGRvIG5vdFxuICAgICAgICAgKiBoYXZlIGFueSBjb21tb24gcHJlZml4IG9yIHN1ZmZpeC5cbiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHRleHQxIE9sZCBzdHJpbmcgdG8gYmUgZGlmZmVkLlxuICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gdGV4dDIgTmV3IHN0cmluZyB0byBiZSBkaWZmZWQuXG4gICAgICAgICAqIEByZXR1cm4ge0FycmF5fSBBcnJheSBvZiBkaWZmIHR1cGxlcy5c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ICAgICAgICAgICAvLyBTd2FwIGluc2VydGlvbnMgZm9yIGRlbGV0aW9ucyBpZiBkaWZmIGlzIHJldmVyc2VkLlxuICAgICAgICAgICAgaWYgKHRleHQxLmxlbmd0aCA+IHRleHQyLmxlbmd0aCkge1xuICAgICAgICAgICAgICBkaWZmc1swXVswXSA9IGRpZmZzWzJdWzBdID0gRElGRl9ERUxFVEU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZGlmZnM7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNob3J0dGV4dC5sZW5ndGggPT0gMSkge1xuICAgICAgICAgICAgLy8gU2luZ2xlIGNoYXJhY3RlciBzdHJpbmcuXG4gICAgICAgICAgICAvLyBBZnRlciB0aGUgcHJldmlvdXMgc3BlZWR1cCwgdGhlIGNoYXJhY3RlciBjYW4ndCBiZSBhbiBlcXVhbGl0eS5cbiAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgIFtESUZGX0RFTEVURSwgdGV4dDFdLFxuICAgICAgICAgICAgICBbRElGRl9JTlNFUlQsIHRleHQyXSxcbiAgICAgICAgICAgIF07XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLy8gQ2hlY2sgdG8gc2VlIGlmIHRoZSBwcm9ibGVtIGNhbiBiZSBzcGxpdCBpbiB0d28uXG4gICAgICAgICAgdmFyIGhtID0gZGlmZl9oYWxmTWF0Y2hfKHRleHQxLCB0ZXh0Mik7XG4gICAgICAgICAgaWYgKGhtKSB7XG4gICAgICAgICAgICAvLyBBIGhhbGYtbWF0Y2ggd2FzIGZvdW5kLCBzb3J0IG91dCB0aGUgcmV0dXJuIGRhdGEuXG4gICAgICAgICAgICB2YXIgdGV4dDFfYSA9IGhtWzBdO1xuICAgICAgICAgICAgdmFyIHRleHQxX2IgPSBobVsxXTtcbiAgICAgICAgICAgIHZhciB0ZXh0Ml9hID0gaG1bMl07XG4gICAgICAgICAgICB2YXIgdGV4dDJfYiA9IGhtWzNdO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lIGZyb250IHBhdGggd2lsbCBjb2xsaWRlXG4gICAgICAgICAgLy8gd2l0aCB0aGUgcmV2ZXJzZSBwYXRoLlxuICAgICAgICAgIHZhciBmcm9udCA9IGRlbHRhICUgMiAhPSAwO1xuICAgICAgICAgIC8vIE9mZnNldHMgZm9yIHN0YXJ0IGFuZCBlbmQgb2YgayBsb29wLlxuICAgICAgICAgIC8vIFByZXZlbnRzIG1hcHBpbmcgb2Ygc3BhY2UgYmV5b25kIHRoZSBncmlkLlxuICAgICAgICAgIHZhciBrMXN0YXJ0ID0gMDtcbiAgICAgICAgICB2YXIgazFlbmQgPSAwO1xuICAgICAgICAgIHZhciBrMnN0YXJ0ID0gMDtcbiAgICAgICAgICB2YXIgazJlbmQgPSAwO1xuICAgICAgICAgIGZvciAodmFyIGQgPSAwOyBkIDwgbWF4X2Q7IGQrKykge1xuICAgICAgICAgICAgLy8gV2FsayB0aGUgZnJvbnQgcGF0aCBvbmUgc3RlcC5cbiAgICAgICAgICAgIGZvciAodmFyIGsxID0gLWQgKyBrMXN0YXJ0OyBrMSA8PSBkIC0gazFlbmQ7IGsxICs9IDIpIHtcbiAgICAgICAgICAgICAgdmFyIGsxX29mZnNldCA9IHZfb2Zmc2V0ICsgazE7XG4gICAgICAgICAgICAgIHZhciB4MTtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIGsxID09IC1kIHx8XG4gICAgICAgICAgICAgICAgKGsxICE9IGQgJiYgdjFbazFfb2Zmc2V0IC0gMV0gPCB2MVtrMV9vZmZzZXQgKyAxXSlcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgeDEgPSB2MVtrMV9vZmZzZXQgKyAxXTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB4MSA9IHYxW2sxX29mZnNldCAtIDFdICsgMTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB2YXIgeTEgPSB4MSAtIGsxO1xuICAgICAgICAgICAgICB3aGlsZSAoXG4gICAgICAgICAgICAgICAgeDEgPCB0ZXh0MV9sZW5ndGggJiZcbiAgICAgICAgICAgICAgICB5MSA8IHRleHQyX2xlbmd0aCAmJlxuICAgICAgICAgICAgICAgIHRleHQxLmNoYXJBdCh4MSkgPT0gdGV4dDIuY2hhckF0KHkxKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICB4MSsrO1xuICAgICAgICAgICAgICAgIHkxKys7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgdjFbazFfb2Zmc2V0XSA9IHgxO1xuICAgICAgICAgICAgICBpZiAoeDEgPiB0ZXh0MV9sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAvLyBSYW4gb2ZmIHRoZSByaWdodCBvZiB0aGUgZ3JhcGguXG4gICAgICAgICAgICAgICAgazFlbmQgKz0gMjtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmICh5MSA+IHRleHQyX2xlbmd0aCkge1xuICAgICAgICAgICAgICAgIC8vIFJhbiBvZmYgdGhlIGJvdHRvbSBvZiB0aGUgZ3JhcGguXG4gICAgICAgICAgICAgICAgazFzdGFydCArPSAyO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKGZyb250KSB7XG4gICAgICAgICAgICAgICAgdmFyIGsyX29mZnNldCA9IHZfb2Zmc2V0ICsgZGVsdGEgLSBrMTtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBrMl9vZmZzZXQgPj0gMCAmJlxuICAgICAgICAgICAgICAgICAgazJfb2Zmc2V0IDwgdl9sZW5ndGggJiZcbiAgICAgICAgICAgICAgICAgIHYyW2syX29mZnNldF0gIT0gLTFcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIC8vIE1pcnJvciB4MiBvbnRvIHRvcC1sZWZ0IGNvb3JkaW5hdGUgc3lzdGVtLlxuICAgICAgICAgICAgICAgICAgdmFyIHgyID0gdGV4dDFfbGVuZ3RoIC0gdjJbazJfb2Zmc2V0XTtcbiAgICAgICAgICAgICAgICAgIGlmICh4MSA+PSB4Mikge1xuICAgICAgICAgICAgICAgICAgICAvLyBPdmVybGFwIGRldGVjdGVkLlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGlmZl9iaXNlY3RTcGxpdF8odGV4dDEsIHRleHQyLCB4MSwgeTEpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBXYWxrIHRoZSByZXZlcnNlIHBhdGggb25lIHN0ZXAuXG4gICAgICAgICAgICBmb3IgKHZhciBrMiA9IC1kICsgazJzdGFydDsgazIgPD0gZCAtIGsyZW5kOyBrMiArPSAyKSB7XG4gICAgICAgICAgICAgIHZhciBrMl9vZmZzZXQgPSB2X29mZnNldCArIGsyO1xuICAgICAgICAgICAgICB2YXIgeDI7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBrMiA9PSAtZCB8fFxuICAgICAgICAgICAgICAgIChrMiAhPSBkICYmIHYyW2syX29mZnNldCAtIDFdIDwgdjJbazJfb2Zmc2V0ICsgMV0pXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIHgyID0gdjJbazJfb2Zmc2V0ICsgMV07XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgeDIgPSB2MltrMl9vZmZzZXQgLSAxXSArIDE7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgdmFyIHkyID0geDIgLSBrMjtcbiAgICAgICAgICAgICAgd2hpbGUgKFxuICAgICAgICAgICAgICAgIHgyIDwgdGV4dDFfbGVuZ3RoICYmXG4gICAgICAgICAgICAgICAgeTIgPCB0ZXh0Ml9sZW5ndGggJiZcbiAgICAgICAgICAgICAgICB0ZXh0MS5jaGFyQXQodGV4dDFfbGVuZ3RoIC0geDIgLSAxKSA9PVxuICAgICAgICAgICAgICAgICAgdGV4dDIuY2hhckF0KHRleHQyX2xlbmd0aCAtIHkyIC0gMSlcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgeDIrKztcbiAgICAgICAgICAgICAgICB5MisrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHYyW2syX29mZnNldF0gPSB4MjtcbiAgICAgICAgICAgICAgaWYgKHgyID4gdGV4dDFfbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgLy8gUmFuIG9mZiB0aGUgbGVmdCBvZiB0aGUgZ3JhcGguXG4gICAgICAgICAgICAgICAgazJlbmQgKz0gMjtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmICh5MiA+IHRleHQyX2xlbmd0aCkge1xuICAgICAgICAgICAgICAgIC8vIFJhbiBvZmYgdGhlIHRvcCBvZiB0aGUgZ3JhcGguXG4gICAgICAgICAgICAgICAgazJzdGFydCArPSAyO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKCFmcm9udCkge1xuICAgICAgICAgICAgICAgIHZhciBrMV9vZmZzZXQgPSB2X29mZnNldCArIGRlbHRhIC0gazI7XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgazFfb2Zmc2V0ID49IDAgJiZcbiAgICAgICAgICAgICAgICAgIGsxX29mZnNldCA8IHZfbGVuZ3RoICYmXG4gICAgICAgICAgICAgICAgICB2MVtrMV9vZmZzZXRdICE9IC0xXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgeDEgPSB2MVtrMV9vZmZzZXRdO1xuICAgICAgICAgICAgICAgICAgdmFyIHkxID0gdl9vZmZzZXQgKyB4MSAtIGsxX29mZnNldDtcbiAgICAgICAgICAgICAgICAgIC8vIE1pcnJvciB4MiBvbnRvIHRvcC1sZWZ0IGNvb3JkaW5hdGUgc3lzdGVtLlxuICAgICAgICAgICAgICAgICAgeDIgPSB0ZXh0MV9sZW5ndGggLSB4MjtcbiAgICAgICAgICAgICAgICAgIGlmICh4MSA+PSB4Mikge1xuICAgICAgICAgICAgICAgICAgICAvLyBPdmVybGFwIGRldGVjdGVkLlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGlmZl9iaXNlY3RTcGxpdF8odGV4dDEsIHRleHQyLCB4MSwgeTEpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICAvLyBEaWZmIHRvb2sgdG9vIGxvbmcgYW5kIGhpdCB0aGUgZGVhZGxpbmUgb3JcbiAgICAgICAgICAvLyBudW1iZXIgb2YgZGlmZnMgZXF1YWxzIG51bWJlciBvZiBjaGFyYWN0ZXJzLCBubyBjb21tb25hbGl0eSBhdCBhbGwuXG4gICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgIFtESUZGX0RFTEVURSwgdGV4dDFdLFxuICAgICAgICAgICAgW0RJRkZfSU5TRVJULCB0ZXh0Ml0sXG4gICAgICAgICAgXTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHaXZlbiB0aGUgbG9jYXRpb24gb2YgdGhlICdtaWRkbGUgc25ha2UnLCBzcGxpdCB0aGUgZGlmZiBpbiB0d28gcGFydHNcbiAgICAgICAgICogYW5kIHJlY3Vyc2UuXG4gICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSB0ZXh0MSBPbGQgc3RyaW5nIHRvIGJlIGRpZmZlZC5cbiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHRleHQyIE5ldyBzdHJpbmcgdG8gYmUgZGlmZmVkLlxuICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0geCBJbmRleCBvZiBzcGxpdCBwb2ludCBpbiB0ZXh0MS5cbiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IHkgSW5kZXggb2Ygc3BsaXQgcG9pbnQgaW4gdGV4dDIuXG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LCB0ZXh0Mikge1xuICAgICAgICAgIC8vIFF1aWNrIGNoZWNrIGZvciBjb21tb24gbnVsbCBjYXNlcy5cbiAgICAgICAgICBpZiAoIXRleHQxIHx8ICF0ZXh0MiB8fCB0ZXh0MS5jaGFyQXQoMCkgIT0gdGV4dDIuY2hhckF0KDApKSB7XG4gICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gQmluYXJ5IHNlYXJjaC5cbiAgICAgICAgICAvLyBQZXJmb3JtYW5jZSBhbmFseXNpczogaHR0cDovL25laWwuZnJhc2VyLm5hbWUvbmV3cy8yMDA3LzEwLzA5L1xuICAgICAgICAgIHZhciBwb2ludGVybWluID0gMDtcbiAgICAgICAgICB2YXIgcG9pbnRlcm1heCA9IE1hdGgubWluKHRleHQxLmxlbmd0aCwgdGV4dDIubGVuZ3RoKTtcbiAgICAgICAgICB2YXIgcG9pbnRlcm1pZCA9IHBvaW50ZXJtYXg7XG4gICAgICAgICAgdmFyIHBvaW50ZXJzdGFydCA9IDA7XG4gICAgICAgICAgd2hpbGUgKHBvaW50ZXJtaW4gPCBwb2ludGVybWlkKSB7XG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgIHRleHQxLnN1YnN0cmluZyhwb2ludGVyc3RhcnQsIHBvaW50ZXJtaWQpID09XG4gICAgICAgICAgICAgIHRleHQyLnN1YnN0cmluZyhwb2ludGVyc3RhcnQsIHBvaW50ZXJtaWQpXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgcG9pbnRlcm1pbiA9IHBvaW50ZXJtaWQ7XG4gICAgICAgICAgICAgIHBvaW50ZXJzdGFydCA9IHBvaW50ZXJtaW47XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBwb2ludGVybWF4ID0gcG9pbnRlcm1pZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBvaW50ZXJtaWQgPSBNYXRoLmZsb29yKChwb2ludGVybWF4IC0gcG9pbnRlcm1pbikgLyAyICsgcG9pbnRlcm1pbik7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBwb2ludGVybWlkO1xuICAgICAgICB9XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIERldGVybWluZSB0aGUgY29tbW9uIHN1ZmZpeCBvZiB0d28gc3RyaW5ncy5cbiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHRleHQxIEZpcnN0IHN0cmluZy5cbiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHRleHQyIFNlY29uZCBzdHJpbmcuXG4gICAgICAgICAqIEByZXR1cm4ge251bWJlcn0gVGhlIG51bWJlciBvZiBjaGFyYWN0ZXJzIGNvbW1vbiB0byB0aGUgZW5kIG9mIGVhY2ggc3RyaW5nLlxuICAgICAgICAgKi9cbiAgICAgICAgZnVuY3Rpb24gZGlmZl9jb21tb25TdWZmaXgodGV4dDEsIHRleHQyKSB7XG4gICAgICAgICAgLy8gUXVpY2sgY2hlY2sgZm9yIGNvbW1vbiBudWxsIGNhc2VzLlxuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICF0ZXh0MSB8fFxuICAgICAgICAgICAgIXRleHQyIHx8XG4gICAgICAgICAgICB0ZXh0MS5jaGFyQXQodGV4dDEubGVuZ3RoIC0gMSkgIT0gdGV4dDIuY2hhckF0KHRleHQyLmxlbmd0aCAtIDEpXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gQmluYXJ5IHNlYXJjaC5cbiAgICAgICAgICAvLyBQZXJmb3JtYW5jZSBhbmFseXNpczogaHR0cDovL25laWwuZnJhc2VyLm5hbWUvbmV3cy8yMDA3LzEwLzA5L1xuICAgICAgICAgIHZhciBwb2ludGVybWluID0gMDtcbiAgICAgICAgICB2YXIgcG9pbnRlcm1heCA9IE1hdGgubWluKHRleHQxLmxlbmd0aCwgdGV4dDIubGVuZ3RoKTtcbiAgICAgICAgICB2YXIgcG9pbnRlcm1pZCA9IHBvaW50ZXJtYXg7XG4gICAgICAgICAgdmFyIHBvaW50ZXJlbmQgPSAwO1xuICAgICAgICAgIHdoaWxlIChwb2ludGVybWluIDwgcG9pbnRlcm1pZCkge1xuICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICB0ZXh0MS5zdWJzdHJpbmcoXG4gICAgICAgICAgICAgICAgdGV4dDEubGVuZ3RoIC0gcG9pbnRlcm1pZCxcbiAgICAgICAgICAgICAgICB0ZXh0MS5sZW5ndGggLSBwb2ludGVyZW5kLFxuICAgICAgICAgICAgICApID09XG4gICAgICAgICAgICAgIHRleHQyLnN1YnN0cmluZyhcbiAgICAgICAgICAgICAgICB0ZXh0Mi5sZW5ndGggLSBwb2ludGVybWlkLFxuICAgICAgICAgICAgICAgIHRleHQyLmxlbmd0aCAtIHBvaW50ZXJlbmQsXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBwb2ludGVybWluID0gcG9pbnRlcm1pZDtcbiAgICAgICAgICAgICAgcG9pbnRlcmVuZCA9IHBvaW50ZXJtaW47XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBwb2ludGVybWF4ID0gcG9pbnRlcm1pZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBvaW50ZXJtaWQgPSBNYXRoLmZsb29yKChwb2ludGVybWF4IC0gcG9pbnRlcm1pbikgLyAyICsgcG9pbnRlcm1pbik7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBwb2ludGVybWlkO1xuICAgICAgICB9XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIERvIHRoZSB0d28gdGV4dHMgc2hhcmUgYSBzdWJzdHJpbmcgd2hpY2ggaXMgYXQgbGVhc3QgaGFsZiB0aGUgbGVuZ3RoIG9mIHRoZVxuICAgICAgICAgKiBsb25nZXIgdGV4dD9cbiAgICAgICAgICogVGhpcyBzcGVlZHVwI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BNYXRoLmZsb29yKGxvbmd0ZXh0Lmxlbmd0aCAvIDQpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHZhciBqID0gLTE7XG4gICAgICAgICAgICB2YXIgYmVzdF9jb21tb24gPSAnJztcbiAgICAgICAgICAgIHZhciBiZXN0X2xvbmd0ZXh0X2EsXG4gICAgICAgICAgICAgIGJlc3RfbG9uZ3RleHRfYixcbiAgICAgICAgICAgICAgYmVzdF9zaG9ydHRleHRfYSxcbiAgICAgICAgICAgICAgYmVzdF9zaG9ydHRleHRfYjtcbiAgICAgICAgICAgIHdoaWxlICgoaiA9IHNob3J0dGV4dC5pbmRleE9mKHNlZWQsIGogKyAxKSkgIT0gLTEpIHtcbiAgICAgICAgICAgICAgdmFyIHByZWZpeExlbmd0aCA9IGRpZmZfY29tbW9uUHJlZml4KFxuICAgICAgICAgICAgICAgIGxvbmd0ZXh0LnN1YnN0cmluZyhpKSxcbiAgICAgICAgICAgICAgICBzaG9ydHRleHQuc3Vic3RyaW5nKGopLFxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB2YXIgc3VmZml4TGVuZ3RoID0gZGlmZl9jb21tb25TdWZmaXgoXG4gICAgICAgICAgICAgICAgbG9uZ3RleHQuc3Vic3RyaW5nKDAsIGkpLFxuICAgICAgICAgICAgICAgIHNob3J0dGV4dC5zdWJzdHJpbmcoMCwgaiksXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIGlmIChiZXN0X2NvbW1vbi5sZW5ndGggPCBzdWZmaXhMZW5ndGggKyBwcmVmaXhMZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBiZXN0X2NvbW1vbiA9XG4gICAgICAgICAgICAgICAgICBzaG9ydHRleHQuc3Vic3RyaW5nKGogLSBzdWZmaXhMZW5ndGgsIGopICtcbiAgICAgICAgICAgICAgICAgIHNob3J0dGV4dC5zdWJzdHJpbmcoaiwgaiArIHByZWZpeExlbmd0aCk7XG4gICAgICAgICAgICAgICAgYmVzdF9sb25ndGV4dF9hID0gbG9uZ3RleHQuc3Vic3RyaW5nKDAsIGkgLSBzdWZmaXhMZW5ndGgpO1xuICAgICAgICAgICAgICAgIGJlc3RfbG9uZ3RleHRfYiA9IGxvbmd0ZXh0LnN1YnN0cmluZyhpICsgcHJlZml4TGVuZ3RoKTtcbiAgICAgICAgICAgICAgICBiZXN0X3Nob3J0dGV4dF9hID0gc2hvcnR0ZXh0LnN1YnN0cmluZygwLCBqIC0gc3VmZml4TGVuZ3RoKTtcbiAgICAgICAgICAgICAgICBiZXN0X3Nob3J0dGV4dF9iID0gc2hvcnR0ZXh0LnN1YnN0cmluZyhqICsgcHJlZml4TGVuZ3RoKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGJlc3RfY29tbW9uLmxlbmd0aCAqIDIgPj0gbG9uZ3RleHQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgYmVzdF9sb25ndGV4dF9hLFxuICAgICAgICAgICAgICAgIGJlc3RfbG9uZ3RleHRfYixcbiAgICAgICAgICAgICAgICBiZXN0X3Nob3J0dGV4dF9hLFxuICAgICAgICAgICAgICAgIGJlc3Rfc2hvcnR0ZXh0X2IsXG4gICAgICAgICAgICAgICAgYmVzdF9jb21tb24sXG4gICAgICAgICAgICAgIF07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyBGaXJzdCBjaGVjayBpZiB0aGUgc2Vjb25kIHF1YXJ0ZXIgaXMgdGhlIHNlZWQgZm9yIGEgaGFsZi1tYXRjaC5cbiAgICAgICAgICB2YXIgaG0xID0gZGlmZl9oYWxmTWF0Y2hJXyhcbiAgICAgICAgICAgIGxvbmd0ZXh0LFxuICAgICAgICAgICAgc2hvcnR0ZXh0LFxuICAgICAgICAgICAgTWF0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ludGVyIDwgZGlmZnMubGVuZ3RoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKGRpZmZzW3BvaW50ZXJdWzBdKSB7XG4gICAgICAgICAgICAgIGNhc2UgRElGRl9JTlNFUlQ6XG4gICAgICAgICAgICAgICAgY291bnRfaW5zZXJ0Kys7XG4gICAgICAgICAgICAgICAgdGV4dF9pbnNlcnQgKz0gZGlmZnNbcG9pbnRlcl1bMV07XG4gICAgICAgICAgICAgICAgcG9pbnRlcisrO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICBjYXNlIERJRkZfREVMRVRFOlxuICAgICAgICAgICAgICAgIGNvdW50X2RlbGV0ZSsrO1xuICAgICAgICAgICAgICAgIHRleHRfZGVsZXRlICs9IGRpZmZzW3BvaW50ZXJdWzFdO1xuICAgICAgICAgICAgICAgIHBvaW50ZXIrKztcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgY2FzZSBESUZGX0VRVUFMOlxuICAgICAgICAgICAgICAgIC8vIFVwb24gcmVhY2hpbmcgYW4gZXF1YWxpdHksIGNoZWNrIGZvciBwcmlvciByZWR1bmRhbmNpZXMuXG4gICAgICAgICAgICAgICAgaWYgKGNvdW50X2RlbGV0ZSArIGNvdW50X2luc2VydCA+IDEpIHtcbiAgICAgICAgICAgICAgICAgIGlmIChjb3VudF9kZWxldGUgIT09IDAgJiYgY291bnRfaW5zZXJ0ICE9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIEZhY3RvciBvdXQgYW55IGNvbW1vbiBwcmVmaXhpZXMuXG4gICAgICAgICAgICAgICAgICAgIGNvbW1vbmxlbmd0aCA9IGRpZmZfY29tbW9uUHJlZml4KHRleHRfaW5zZXJ0LCB0ZXh0X2RlbGV0ZSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb21tb25sZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICBwb2ludGVyIC0gY291bnRfZGVsZXRlIC0gY291bnRfaW5zZXJ0ID4gMCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgZGlmZnNbcG9pbnRlciAtIGNvdW50X2RlbGV0ZSAtIGNvdW50X2luc2VydCAtIDFdWzBdID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgIERJRkZfRVFVQUxcbiAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpZmZzW3BvaW50ZXIgLSBjb3VudF9kZWxldGUgLSBjb3VudF9pbnNlcnQgLSAxXVsxXSArPVxuICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0X2luc2VydC5zdWJzdHJpbmcoMCwgY29tbW9ubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGlmZnMuc3BsaWNlKDAsIDAsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgRElGRl9FUVVBTCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dF9pbnNlcnQuc3Vic3RyaW5nKDAsIGNvbW1vbmxlbmd0aCksXG4gICAgICAgICAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvaW50ZXIrKztcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgdGV4dF9pbnNlcnQgPSB0ZXh0X2luc2VydC5zdWJzdHJpbmcoY29tbW9ubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgICB0ZXh0X2RlbGV0ZSA9IHRleHRfZGVsZXRlLnN1YnN0cmluZyhjb21tb25sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIEZhY3RvciBvdXQgYW55IGNvbW1vbiBzdWZmaXhpZXMuXG4gICAgICAgICAgICAgICAgICAgIGNvbW1vbmxlbmd0aCA9IGRpZmZfY29tbW9uU3VmZml4KHRleHRfaW5zZXJ0LCB0ZXh0X2RlbGV0ZSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb21tb25sZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICBkaWZmc1twb2ludGVyXVsxXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0X2luc2VydC5zdWJzdHJpbmcoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRfaW5zZXJ0Lmxlbmd0aCAtIGNvbW1vbmxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgICkgKyBkaWZmc1twb2ludGVyXVsxXTtcbiAgICAgICAgICAgICAgICAgICAgICB0ZXh0X2luc2VydCA9IHRleHRfaW5zZXJ0LnN1YnN0cmluZyhcbiAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0X2luc2VydC5sZW5ndGggLSBjb21tb25sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICB0ZXh0X2RlbGV0ZSA9IHRleHRfZGVsZXRlLnN1YnN0cmluZyhcbiAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0X2RlbGV0ZS5sZW5ndGggLSBjb21tb25sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgLy8gRGVsZXRlIHRoZSBvZmZlbmRpbmcgcmVjb3JkcyBhbmQgYWRkIHRoZSBtZXJnZWQgb25lcy5cbiAgICAgICAgICAgICAgICAgIGlmIChjb3VudF9kZWxldGUgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZGlmZnMuc3BsaWNlKFxuICAgICAgICAgICAgICAgICAgICAgIHBvaW50ZXIgLSBjb3VudF9pbnNlcnQsXG4gICAgICAgICAgICAgICAgICAgICAgY291bnRfZGVsZXRlICsgY291bnRfaW5zZXJ0LFxuICAgICAgICAgICAgICAgICAgICAgIFtESUZGX0lOU0VSVCwgdGV4dF9pbnNlcnRdLFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb3VudF9pbnNlcnQgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZGlmZnMuc3BsaWNlKFxuICAgICAgICAgICAgICAgICAgICAgIHBvaW50ZXIgLSBjb3VudF9kZWxldGUsXG4gICAgICAgICAgICAgICAgICAgICAgY291bnRfZGVsZXRlICsgY291bnRfaW5zZXJ0LFxuICAgICAgICAgICAgICAgICAgICAgIFtESUZGX0RFTEVURSwgdGV4dF9kZWxldGVdLFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZGlmZnMuc3BsaWNlKFxuICAgICAgICAgICAgICAgICAgICAgIHBvaW50ZXIgLSBjb3VudF9kZWxldGUgLSBjb3VudF9pbnNlcnQsXG4gICAgICAgICAgICAgICAgICAgICAgY291bnRfZGVsZXRlICsgY291bnRfaW5zZXJ0LFxuICAgICAgICAgICAgICAgICAgICAgIFtESUZGX0RFTEVURSwgdGV4dF9kZWxldGVdLFxuICAgICAgICAgICAgICAgICAgICAgIFtESUZGX0lOU0VSVCwgdGV4dF9pbnNlcnRdLFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgcG9pbnRlciA9XG4gICAgICAgICAgICAgICAgICAgIHBvaW50ZXIgLVxuICAgICAgICAgICAgICAgICAgICBjb3VudF9kZWxldGUgLVxuICAgICAgICAgICAgICAgICAgICBjb3VudF9pbnNlcnQgK1xuICAgICAgICAgICAgICAgICAgICAoY291bnRfZGVsZXRlID8gMSA6IDApICtcbiAgICAgICAgICAgICAgICAgICAgKGNvdW50X2luc2VydCA/IDEgOiAwKSArXG4gICAgICAgICAgICAgICAgICAgIDE7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgIHBvaW50ZXIgIT09IDAgJiZcbiAgICAgICAgICAgICAgICAgIGRpZmZzW3BvaW50ZXIgLSAxXVswXSA9PSBESUZGX0VRVUFMXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAvLyBNZXJnZSB0aGlzIGVxdWFsaXR5IHdpdGggdGhlIHByZXZpb3VzIG9uZS5cbiAgICAgICAgICAgICAgICAgIGRpZmZzW3BvaW50ZXIgLSAxXVsxXSArPSBkaWZmc1twb2ludGVyXVsxXTtcbiAgICAgICAgICAgICAgICAgIGRpZmZzLnNwbGljZShwb2ludGVyLCAxKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgcG9pbnRlcisrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb3VudF9pbnNlcnQgPSAwO1xuICAgICAgICAgICAgICAgIGNvdW50X2RlbGV0ZSA9IDA7XG4gICAgICAgICAgICAgICAgdGV4dF9kZWxldGUgPSAnJztcbiAgICAgICAgICAgICAgICB0ZXh0X2luc2VydCA9ICcnO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZGlmZnNbZGlmZnMubGVuZ3RoIC0gMV1bMV0gPT09ICcnKSB7XG4gICAgICAgICAgICBkaWZmcy5wb3AoKTsgLy8gUmVtb3ZlIHRoZSBkdW1teSBlbnRyeSBhdCB0aGUgZW5kLlxuICAgICAgICAgIH1cblxuICAgICAgICAgIC8vIFNlY29uZCBwYXNzOiBsb29rIGZvciBzaW5nbGUgZWRpdHMgc3Vycm91bmRlZCBvbiBib3RoIHNpZGVzIGJ5IGVxdWFsaXRpZXNcbiAgICAgICAgICAvLyB3aGljaCBjYW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ICtcbiAgICAgICAgICAgICAgICAgIGRpZmZzW3BvaW50ZXJdWzFdLnN1YnN0cmluZyhcbiAgICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgZGlmZnNbcG9pbnRlcl1bMV0ubGVuZ3RoIC0gZGlmZnNbcG9pbnRlciAtIDFdWzFdLmxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgZGlmZnNbcG9pbnRlciArIDFdWzFdID1cbiAgICAgICAgICAgICAgICAgIGRpZmZzW3BvaW50ZXIgLSAxXVsxXSArIGRpZmZzW3BvaW50ZXIgKyAxXVsxXTtcbiAgICAgICAgICAgICAgICBkaWZmcy5zcGxpY2UocG9pbnRlciAtIDEsIDEpO1xuICAgICAgICAgICAgICAgIGNoYW5nZXMgPSB0cnVlO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgIGRpZmZzW3BvaW50ZXJdWzFdLnN1YnN0cmluZygwLCBkaWZmc1twb2ludGVyICsgMV1bMV0ubGVuZ3RoKSA9PVxuICAgICAgICAgICAgICAgIGRpZmZzW3BvaW50ZXIgKyAxXVsxXVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAvLyBTaGlmdCB0aGUgZWRpdCBvdmVyIHRoZSBuZXh0IGVxdWFsaXR5LlxuICAgICAgICAgICAgICAgIGRpZmZzW3BvaW50ZXIgLSAxXVsxXSArPSBkaWZmc1twb2ludGVyICsgMV1bMV07XG4gICAgICAgICAgICAgICAgZGlmZnNbcG9pbnRlcl1bMV0gPVxuICAgICAgICAgICAgICAgICAgZGlmZnNbcG9pbnRlcl1bMV0uc3Vic3RyaW5nKGRpZmZzW3BvaW50ZXIgKyAxXVsxXS5sZW5ndGgpICtcbiAgICAgICAgICAgICAgICAgIGRpZmZzW3BvaW50ZXIgKyAxXVsxXTtcbiAgICAgICAgICAgICAgICBkaWZmcy5zcGxpY2UocG9pbnRlciArIDEsIDEp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Fx1RDgzRFxcdURDMkYnXVxuICAgICAgICAgKiAgICAgJ1xcdUQ4M0RcXHVEQzM2JyA9PT0gJ/CfkLYnLCAnXFx1RDgzRFxcdURDMkYnID09PSAn8J+QrydcbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHtBcnJheX0gZGlmZnMgQXJyYXkgb2YgZGlmZiB0dXBsZXNcbiAgICAgICAgICogQHJldHVybiB7QXJyYXl9IEFycmF5IG9mIGRpZmYgdHVwbGVzXG4gICAgICAgICAqL1xuICAgICAgICBmdW5jdGlvbiBmaXhfZW1vamkoZGlmZnMpIHtcbiAgICAgICAgICB2YXIgY29tcGFjdCA9IGZhbHNlO1xuICAgICAgICAgIHZhciBzdGFydHNfd2l0aF9wYWlyX2VuZCA9IGZ1bmN0aW9uIChzdHIpIHtcbiAgICAgICAgICAgIHJldHVybiBzdHIuY2hhckNvZGVBdCgwKSA+PSAweGRjMDAgJiYgc3RyLmNoYXJDb2RlQXQoMCkgPD0gMHhkZmZmO1xuICAgICAgICAgIH07XG4gICAgICAgICAgdmFyIGVuZHNfd2l0aF9wYWlyX3N0YXJ0ID0gZnVuY3Rpb24gKHN0cikge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgc3RyLmNoYXJDb2RlQXQoc3RyLmxlbmd0aCAtIDEpID49IDB4ZDgwMCAmJlxuICAgICAgICAgICAgICBzdHIuY2hhckNvZGVBdChzdHIubGVuZ3RoIC0gMSkgPD0gMHhkYmZmXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH07XG4gICAgICAgICAgZm9yICh2YXIgaSA9IDI7IGkgPCBkaWZmcy5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICBkaWZmc1tpIC0gMl1bMF0gPT09IERJRkZfRVFVQUwgJiZcbiAgICAgICAgICAgICAgZW5kc193aXRoX3BhaXJfc3RhcnQoZGlmZnNbaSAtIDJdWzFdKSAmJlxuICAgICAgICAgICAgICBkaWZmc1tpIC0gMV1bMF0gPT09IERJRkZfREVMRVRFICYmXG4gICAgICAgICAgICAgIHN0YXJ0c193aXRoX3BhaXJfZW5kKGRpZmZzW2kgLSAxXVsxXSkgJiZcbiAgICAgICAgICAgICAgZGlmZnNbaV1bMF0gPT09IERJRkZfSU5TRVJUICYmXG4gICAgICAgICAgICAgIHN0YXJ0c193aXRoX3BhaXJfZW5kKGRpZmZzW2ldWzFdKVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIGNvbXBhY3QgPSB0cnVlO1xuXG4gICAgICAgICAgICAgIGRpZmZzW2kgLSAxXVsxXSA9IGRpZmZzW2kgLSAyXVsxXS5zbGljZSgtMSkgKyBkaWZmc1tpIC0gMV1bMV07XG4gICAgICAgICAgICAgIGRpZmZzW2ldWzFdID0gZGlmZnNbaSAtIDJdWzFdLnNsaWNlKC0xKSArIGRpZmZzW2ldWzFdO1xuXG4gICAgICAgICAgICAgIGRpZmZzW2kgLSAyXVsxXSA9IGRpZmZzW2kgLSAyXVsxXS5zbGljZSgwLCAtMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICghY29tcGFjdCkge1xuICAgICAgICAgICAgcmV0dXJuIGRpZmZzO1xuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgZml4ZWRfZGlmZnMgPSBbXTtcbiAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRpZmZzLmxlbmd0aDsgaSArPSAxKSB7XG4gICAgICAgICAgICBpZiAoZGlmZnNbaV1bMV0ubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICBmaXhlZF9kaWZmcy5wdXNoKGRpZmZzW2ldKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpeGVkX2RpZmZzO1xuICAgICAgICB9XG5cbiAgICAgICAgLypcbiAgICAgICAgICogVHJ5IHRvIG1lcmdlIHR1cGxlcyB3aXRoIHRoZW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HRfZFsxXV0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBkaWZmcztcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogNTIgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHtcbiAgICAgICAgZXhwb3J0cyA9IG1vZHVsZS5leHBvcnRzID1cbiAgICAgICAgICB0eXBlb2YgT2JqZWN0LmtleXMgPT09ICdmdW5jdGlvbicgPyBPYmplY3Qua2V5cyA6IHNoaW07XG5cbiAgICAgICAgZXhwb3J0cy5zaGltID0gc2hpbTtcbiAgICAgICAgZnVuY3Rpb24gc2hpbShvYmopIHtcbiAgICAgICAgICB2YXIga2V5cyA9IFtdO1xuICAgICAgICAgIGZvciAodmFyIGtleSBpbiBvYmopIGtleXMucHVzaChrZXkpO1xuICAgICAgICAgIHJldHVybiBrZXlzO1xuICAgICAgICB9XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiA1MyAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cykge1xuICAgICAgICB2YXIgc3VwcG9ydHNBcmd1bWVudHNDbGFzcyA9XG4gICAgICAgICAgKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwoYXJndW1lbnRzKTtcbiAgICAgICAgICB9KSgpID09ICdbb2JqZWN0IEFyZ3VtZW50c10nO1xuXG4gICAgICAgIGV4cG9ydHMgPSBtb2R1bGUuZXhwb3J0cyA9IHN1cHBvcnRzQXJndW1lbnRzQ2xhc3NcbiAgICAgICAgICA/IHN1cHBvcnRlZFxuICAgICAgICAgIDogdW5zdXBwb3J0ZWQ7XG5cbiAgICAgICAgZXhwb3J0cy5zdXBwb3J0ZWQgPSBzdXBwb3J0ZWQ7XG4gICAgICAgIGZ1bmN0aW9uIHN1cHBvcnRlZChvYmplY3QpIHtcbiAgICAgICAgICByZXR1cm4gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKG9iamVjdCkgPT0gJ1tvYmplY3QgQXJndW1lbnRzXSc7XG4gICAgICAgIH1cblxuICAgICAgICBleHBvcnRzLnVuc3VwcG9ydGVkID0gdW5zdXBwb3J0ZWQ7XG4gICAgICAgIGZ1bmN0aW9uIHVuc3VwcG9ydGVkKG9iamVjdCkge1xuICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAob2JqZWN0ICYmXG4gICAgICAgICAgICAgIHR5cGVvZiBvYmplY3QgPT0gJ29iamVjdCcgJiZcbiAgICAgICAgICAgICAgdHlwZW9mIG9iamVjdC5sZW5ndGggPT0gJ251bWJlcicgJiZcbiAgICAgICAgICAgICAgT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKG9iamVjdCwgJ2NhbGxlZScpICYmXG4gICAgICAgICAgICAgICFPYmplY3QucHJvdG90eXBlLnByb3BlcnR5SXNFbnVtZXJhYmxlLmNhbGwob2JqZWN0LCAnY2FsbGVlJykpIHx8XG4gICAgICAgICAgICBmYWxzZVxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDU0ICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICB2YXIgaGFzID0gT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eSxcbiAgICAgICAgICBwcmVmaXggPSAnfic7XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIENvbnN0cnVjdG9yIHRvIGNyZWF0ZSBhIHN0b3JhZ2UgZm9yIG91ciBgRUVgIG9iamVjdHMuXG4gICAgICAgICAqIEFuIGBFdmVudHN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ZSA1LjEsIE9wZXJhIDExIGFuZCBTYWZhcmkgNS5cbiAgICAgICAgICAvL1xuICAgICAgICAgIGlmICghbmV3IEV2ZW50cygpLl9fcHJvdG9fXykgcHJlZml4ID0gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICAvKipcbiAgICAgICAgICogUmVwcmVzZW50YXRpb24gb2YgYSBzaW5nbGUgZXZlbnQgbGlzdGVuZXIuXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZuIFRoZSBsaXN0ZW5lciBmdW5jdGlvbi5cbiAgICAgICAgICogQHBhcmFtIHtNaXhlZH0gY29udGV4dCBUaGUgY29udGV4dCB0byBpbnZva2UgdGhlIGxpc3RlbmVyIHdpdGguXG4gICAgICAgICAqIEBwYXJhbSB7Qm9vbGVhbn0gW29uY2U9ZmFsc2VdIFNwZWNpZnkgaWYgdGhlIGxpc3RlbmVyIGlzIGEgb25lLXRpbWUgbGlzdGVuZXIuXG4gICAgICAgICAqIEBjb25zdHJ1Y3RvclxuICAgICAgICAgKiBAYXBpIHByaXZhdGVcbiAgICAgICAgICovXG4gICAgICAgIGZ1bmN0aW9uIEVFKGZuLCBjb250ZXh0LCBvbmNlKSB7XG4gICAgICAgICAgdGhpcy5mbiA9IGZuO1xuICAgICAgICAgIHRoaXMuY29udGV4dCA9IGNvbnRleHQ7XG4gICAgICAgICAgdGhpcy5vbmNlID0gb25jZSB8fCBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBNaW5pbWFsIGBFdmVudEVtaXR0ZXJgIGludGVyZmFjZSB0aGF0IGlzIG1vbGRlZCBhZ2FpbnN0IHRoZSBOb2RlLmpzXG4gICAgICAgICAqIGBFdmVudEVtaXR0ZXJgIGludGVyZmFjZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQGNvbnN0cnVjdG9yXG4gICAgICAgICAqIEBhcGkgcHVibGljXG4gICAgICAgICAqL1xuICAgICAgICBmdW5jdGlvbiBFdmVudEVtaXR0ZXIoKSB7XG4gICAgICAgICAgdGhpcy5fZXZlbnRzID0gbmV3IEV2ZW50cygpO1xuICAgICAgICAgIHRoaXMuX2V2ZW50c0NvdW50ID0gMDtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBSZXR1cm4gYW4gYXJyYXkgbGlzdGluZyB0aGUgZXZlbnRzIGZvciB3aGljaCB0aGUgZW1pdHRlciBoYXMgcmVnaXN0ZXJlZFxuICAgICAgICAgKiBsaXN0ZW5lcnMuXG4gICAgICAgICAqXG4gICAgICAgICAqIEByZXR1cm5zIHtBcnJheX1cbiAgICAgICAgICogQGFwaSBwdWJsaWNcbiAgICAgICAgICovXG4gICAgICAgIEV2ZW50RW1pdHRlci5wcm90b3R5cGUuZXZlbnROYW1lcyA9IGZ1bmN0aW9uIGV2ZW50TmFtZXMoKSB7XG4gICAgICAgICAgdmFyIG5hbWVzID0gW10sXG4gICAgICAgICAgICBldmVudHMsXG4gICAgICAgICAgICBuYW1lO1xuXG4gICAgICAgICAgaWYgKHRoaXMuX2V2ZW50c0NvdW50ID09PSAwKSByZXR1cm4gbmFtZXM7XG5cbiAgICAgICAgICBmb3IgKG5hbWUgaW4gKGV2ZW50cyA9IHRoaXMuX2V2ZW50cykpIHtcbiAgICAgICAgICAgIGlmIChoYXMuY2FsbChldmVudHMsIG5hbWUpKVxuICAgICAgICAgICAgICBuYW1lcy5wdXNoKHByZWZpeCA/IG5hbWUuc2xpY2UoMSkgOiBuYW1lKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoT2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scykge1xuICAgICAgICAgICAgcmV0dXJuIG5hbWVzLmNvbmNhdChPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKGV2ZW50cykpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBuYW1lcztcbiAgICAgICAgfTtcblxuICAgICAgICAvKipc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udC5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHtTdHJpbmd8U3ltYm9sfSBldmVudCBUaGUgZXZlbnQgbmFtZS5cbiAgICAgICAgICogQHJldHVybnMge0Jvb2xlYW59IGB0cnVlYCBpZiB0aGUgZXZlbnQgaGFkIGxpc3RlbmVycywgZWxzZSBgZmFsc2VgLlxuICAgICAgICAgKiBAYXBpIHB1YmxpY1xuICAgICAgICAgKi9cbiAgICAgICAgRXZlbnRFbWl0dGVyLnByb3RvdHlwZS5lbWl0ID0gZnVuY3Rpb24gZW1pdChldmVudCwgYTEsIGEyLCBhMywgYTQsIGE1KSB7XG4gICAgICAgICAgdmFyIGV2dCA9IHByZWZpeCA/IHByZWZpeCArIGV2ZW50IDogZXZlbnQ7XG5cbiAgICAgICAgICBpZiAoIXRoaXMuX2V2ZW50c1tldnRdKSByZXR1cm4gZmFsc2U7XG5cbiAgICAgICAgICB2YXIgbGlzdGVuZXJzID0gdGhpcy5fZXZlbnRzW2V2dF0sXG4gICAgICAgICAgICBsZW4gPSBhcmd1bWVudHMubGVuZ3RoLFxuICAgICAgICAgICAgYXJncyxcbiAgICAgICAgICAgIGk7XG5cbiAgICAgICAgICBpZiAobGlzdGVuZXJzLmZuKSB7XG4gICAgICAgICAgICBpZiAobGlzdGVuZXJzLm9uY2UpXG4gICAgICAgICAgICAgIHRoaXMucmVtb3ZlTGlzdGVuZXIoZXZlbnQsIGxpc3RlbmVycy5mbiwgdW5kZWZpbmVkLCB0cnVlKTtcblxuICAgICAgICAgICAgc3dpdGNoIChsZW4pIHtcbiAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgIHJldHVybiBsaXN0ZW5lcnMuZm4uY2FsbChsaXN0ZW5lcnMuY29udGV4dCksIHRydWU7XG4gICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICByZXR1cm4gbGlzdGVuZXJzLmZuLmNhbGwobGlzdGVuZXJzLmNvbnRleHQsIGExKSwgdHJ1ZTtcbiAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgIHJldHVybiBsaXN0ZW5lcnMuZm4uY2FsbChsaXN0ZW5lcnMuY29udGV4dCwgYTEsIGEyKSwgdHJ1ZTtcbiAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIHJldHVybiBsaXN0ZW5lcnMuZm4uY2FsbChsaXN0ZW5lcnMuY29udGV4dCwgYTEsIGEyLCBhMyksIHRydWU7XG4gICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgbGlzdGVuZXJzLmZuLmNhbGwobGlzdGVuZXJzLmNvbnRleHQsIGExLCBhMiwgYTMsIGE0KSwgdHJ1ZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgbGlzdGVuZXJzLmZuLmNhbGwobGlzdGVuZXJzLmNvbnRleHQsIGExLCBhMiwgYTMsIGE0LCBhNSksIHRydWVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmb3IgKGkgPSAxLCBhcmdzID0gbmV3IEFycmF5KGxlbiAtIDEpOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgICAgICAgICAgYXJnc1tpIC0gMV0gPSBhcmd1bWVudHNbaV07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxpc3RlbmVycy5mbi5hcHBseShsaXN0ZW5lcnMuY29udGV4dCwgYXJncyk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBsZW5ndGggPSBsaXN0ZW5lcnMubGVuZ3RoLFxuICAgICAgICAgICAgICBqO1xuXG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgaWYgKGxpc3RlbmVyc1tpXS5vbmNlKVxuICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlTGlzdGVuZXIoZXZlbnQsIGxpc3RlbmVyc1tpXS5mbiwgdW5kZWZpbmVkLCB0cnVlKTtcblxuICAgICAgICAgICAgICBzd2l0Y2ggKGxlbikge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgIGxpc3RlbmVyc1tpXS5mbi5jYWxsKGxpc3RlbmVyc1tpXS5jb250ZXh0KTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgIGxpc3RlbmVyc1tpXS5mbi5jYWxsKGxpc3RlbmVyc1tpXS5jb250ZXh0LCBhMSk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICBsaXN0ZW5lcnNbaV0uZm4uY2FsbChsaXN0ZW5lcnNbaV0uY29udGV4dCwgYTEsIGEyKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgIGxpc3RlbmVyc1tpXS5mbi5jYWxsKGxpc3RlbmVyc1tpXS5jb250ZXh0LCBhMSwgYTIsIGEzKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICBpZiAoIWFyZ3MpXG4gICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IDEsIGFyZ3MgPSBuZXcgQXJyYXkobGVuIC0gMSk7IGogPCBsZW47IGorKykge1xuICAgICAgICAgICAgICAgICAgICAgIGFyZ3NbaiAtIDFdID0gYXJndW1lbnRzW2pdO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgIGxpc3RlbmVyc1tpXS5mbi5hcHBseShsaXN0Z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ICBpZiAoLS10aGlzLl9ldmVudHNDb3VudCA9PT0gMCkgdGhpcy5fZXZlbnRzID0gbmV3IEV2ZW50cygpO1xuICAgICAgICAgICAgZWxzZSBkZWxldGUgdGhpcy5fZXZlbnRzW2V2dF07XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICB2YXIgbGlzdGVuZXJzID0gdGhpcy5fZXZlbnRzW2V2dF07XG5cbiAgICAgICAgICBpZiAobGlzdGVuZXJzLmZuKSB7XG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgIGxpc3RlbmVycy5mbiA9PT0gZm4gJiZcbiAgICAgICAgICAgICAgKCFvbmNlIHx8IGxpc3RlbmVycy5vbmNlKSAmJlxuICAgICAgICAgICAgICAoIWNvbnRleHQgfHwgbGlzdGVuZXJzLmNvbnRleHQgPT09IGNvbnRleHQpXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgaWYgKC0tdGhpcy5fZXZlbnRzQ291bnQgPT09IDApIHRoaXMuX2V2ZW50cyA9IG5ldyBFdmVudHMoKTtcbiAgICAgICAgICAgICAgZWxzZSBkZWxldGUgdGhpcy5fZXZlbnRzW2V2dF07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGZvciAoXG4gICAgICAgICAgICAgIHZhciBpID0gMCwgZXZlbnRzID0gW10sIGxlbmd0aCA9IGxpc3RlbmVycy5sZW5ndGg7XG4gICAgICAgICAgICAgIGkgPCBsZW5ndGg7XG4gICAgICAgICAgICAgIGkrK1xuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBsaXN0ZW5lcnNbaV0uZm4gIT09IGZuIHx8XG4gICAgICAgICAgICAgICAgKG9uY2UgJiYgIWxpc3RlbmVyc1tpXS5vbmNlKSB8fFxuICAgICAgICAgICAgICAgIChjb250ZXh0ICYmIGxpc3RlbmVyc1tpXS5jb250ZXh0ICE9PSBjb250ZXh0KVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBldmVudHMucHVzaChsaXN0ZW5lcnNbaV0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAvLyBSZXNldCB0aGUgYXJyYXksIG9yIHJlbW92ZSBpdCBjb21wbGV0ZWx5IGlmIHdlIGhhdmUgbm8gbW9yZSBsaXN0ZW5lcnMuXG4gICAgICAgICAgICAvL1xuICAgICAgICAgICAgaWYgKGV2ZW50cy5sZW5ndGgpXG4gICAgICAgICAgICAgIHRoaXMuX2V2ZW50c1tldnRdID0gZXZlbnRzLmxlbmd0aCA9PT0gMSA/IGV2ZW50c1swXSA6IGV2ZW50cztcbiAgICAgICAgICAgIGVsc2UgaWYgKC0tdGhpcy5fZXZlbnRzQ291bnQgPT09IDApIHRoaXMuX2V2ZW50cyA9IG5ldyBFdmVudHMoKTtcbiAgICAgICAgICAgIGVsc2UgZGVsZXRlIHRoaXMuX2V2ZW50c1tldnRdO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBSZW1vdmUgYWxsIGxpc3RlbmVycywgb3IgdGhvc2Ugb2YgdGhlIHNwZWNpZmllZCBldmVudC5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHtTdHJpbmd8U3ltYm9sfSBbZXZlbnRdIFRoZSBldmVudCBuYW1lLlxuICAgICAgICAgKiBAcmV0dXJucyB7RXZlbnRFbWl0dGVyfSBgdGhpc2AuXG4gICAgICAgICAqIEBhcGkgcHVibGljXG4gICAgICAgICAqL1xuICAgICAgICBFdmVudEVtaXR0ZXIucHJvdG90eXBlLnJlbW92ZUFsbExpc3RlbmVycyA9IGZ1bmN0aW9uIHJlbW92ZUFsbExpc3RlbmVycyhcbiAgICAgICAgICBldmVudCxcbiAgICAgICAgKSB7XG4gICAgICAgICAgdmFyIGV2dDtcblxuICAgICAgICAgIGlmIChldmVudCkge1xuICAgICAgICAgICAgZXZ0ID0gcHJlZml4ID8gcHJlZml4ICsgZXZlbnQgOiBldmVudDtcbiAgICAgICAgICAgIGlmICh0aGlzLl9ldmVudHNbZXZ0XSkge1xuICAgICAgICAgICAgICBpZiAoLS10aGlzLl9ldmVudHNDb3VudCA9PT0gMCkgdGhpcy5fZXZlbnRzID0gbmV3IEV2ZW50cygpO1xuICAgICAgICAgICAgICBlbHNlIGRlbGV0ZSB0aGlzLl9ldmVudHNbZXZ0XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5fZXZlbnRzID0gbmV3IEV2ZW50cygpO1xuICAgICAgICAgICAgdGhpcy5fZXZlbnRzQ291bnQgPSAwO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8vXG4gICAgICAgIC8vIEFsaWFzIG1ldGhvZHMgbmFtZXMgYmVjYXVzZSBwZW9wbGUgcm9sbCBsaWtlIHRoYXQuXG4gICAgICAgIC8vXG4gICAgICAgIEV2ZW50RW1pdHRlci5wcm90b3R5cGUub2ZmID0gRXZlbnRFbWl0dGVyLnByb3RvdHlwZS5yZW1vdmVMaXN0ZW5lcjtcbiAgICAgICAgRXZlbnRFbWl0dGVyLnByb3RvdHlwZS5hZGRMaXN0ZW5lciA9IEV2ZW50RW1pdHRlci5wcm90b3R5cGUub247XG5cbiAgICAgICAgLy9cbiAgICAgICAgLy8gVGhpcyBmdW5jdGlvbiBkb2Vzbid0IGFwcGx5IGFueW1vcmUuXG4gICAgICAgIC8vXG4gICAgICAgIEV2ZW50RW1pdHRlci5wcm90b3R5cGUuc2V0TWF4TGlzdGVuZXJzID0gZnVuY3Rpb24gc2V0TWF4TGlzdGVuZXJzKCkge1xuICAgICAgICAgIHJldHVybiB0aGlzO1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ICAgICB1bmRlZmluZWQ7XG5cbiAgICAgICAgdmFyIF90eXBlb2YgPVxuICAgICAgICAgIHR5cGVvZiBTeW1ib2wgPT09ICdmdW5jdGlvbicgJiYgdHlwZW9mIFN5bWJvbC5pdGVyYXRvciA9PT0gJ3N5bWJvbCdcbiAgICAgICAgICAgID8gZnVuY3Rpb24gKG9iaikge1xuICAgICAgICAgICAgICAgIHJldHVybiB0eXBlb2Ygb2JqO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICA6IGZ1bmN0aW9uIChvYmopIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gb2JqICYmXG4gICAgICAgICAgICAgICAgICB0eXBlb2YgU3ltYm9sID09PSAnZnVuY3Rpb24nICYmXG4gICAgICAgICAgICAgICAgICBvYmouY29uc3RydWN0b3IgPT09IFN5bWJvbCAmJlxuICAgICAgICAgICAgICAgICAgb2JqICE9PSBTeW1ib2wucHJvdG90eXBlXG4gICAgICAgICAgICAgICAgICA/ICdzeW1ib2wnXG4gICAgICAgICAgICAgICAgICA6IHR5cGVvZiBvYmo7XG4gICAgICAgICAgICAgIH07XG5cbiAgICAgICAgdmFyIF9zbGljZWRUb0FycmF5ID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBmdW5jdGlvbiBzbGljZUl0ZXJhdG9yKGFyciwgaSkge1xuICAgICAgICAgICAgdmFyIF9hcnIgPSBbXTtcbiAgICAgICAgICAgIHZhciBfbiA9IHRydWU7XG4gICAgICAgICAgICB2YXIgX2QgPSBmYWxzZTtcbiAgICAgICAgICAgIHZhciBfZSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGZvciAoXG4gICAgICAgICAgICAgICAgdmFyIF9pID0gYXJyW1N5bWJvbC5pdGVyYXRvcl0oKSwgX3M7XG4gICAgICAgICAgICAgICAgIShfbiA9IChfcyA9IF9pLm5leHQoKSkuZG9uZSk7XG4gICAgICAgICAgICAgICAgX24gPSB0cnVlXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIF9hcnIucHVzaChfcy52YWx1ZSk7XG4gICAgICAgICAgICAgICAgaWYgKGkgJiYgX2Fyci5sZW5ndGggPT09IGkpIGJyZWFrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgX2QgPSB0cnVlO1xuICAgICAgICAgICAgICBfZSA9IGVycjtcbiAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgaWYgKCFfbiAmJiBfaVsncmV0dXJuJ10pIF9pWydyZXR1cm4nXSgpO1xuICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIGlmIChfZCkgdGhyb3cgX2U7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBfYXJyO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGFyciwgaSkge1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoYXJyKSkge1xuICAgICAgICAgICAgICByZXR1cm4gYXJyO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChTeW1ib2wuaXRlcmF0b3IgaW4gT2JqZWN0KGFycikpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHNsaWNlSXRlcmF0b3IoYXJyLCBpKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICAgJ0ludmFsaWQgYXR0ZW1wdCB0byBkZXN0cnVjdHVyZSBub24taXRlcmFibGUgaW5zdGFuY2UnLFxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgIH0pKCk7XG5cbiAgICAgICAgdmFyIF9jcmVhdGVDbGFzcyA9IChmdW5jdGl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rpb24gPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDM4KTtcblxuICAgICAgICB2YXIgX2ZvbnQgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDM5KTtcblxuICAgICAgICB2YXIgX3NpemUgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDQwKTtcblxuICAgICAgICBmdW5jdGlvbiBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KG9iaikge1xuICAgICAgICAgIHJldHVybiBvYmogJiYgb2JqLl9fZXNNb2R1bGUgPyBvYmogOiB7ZGVmYXVsdDogb2JqfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9kZWZpbmVQcm9wZXJ0eShvYmosIGtleSwgdmFsdWUpIHtcbiAgICAgICAgICBpZiAoa2V5IGluIG9iaikge1xuICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KG9iaiwga2V5LCB7XG4gICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZSxcbiAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBvYmpba2V5XSA9IHZhbHVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2NsYXNzQ2FsbENoZWNrKGluc3RhbmNlLCBDb25zdHJ1Y3Rvcikge1xuICAgICAgICAgIGlmICghKGluc3RhbmNlIGluc3RhbmNlb2YgQ29uc3RydWN0b3IpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24nKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihzZWxmLCBjYWxsKSB7XG4gICAgICAgICAgaWYgKCFzZWxmKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgUmVmZXJlbmNlRXJyb3IoXG4gICAgICAgICAgICAgIFwidGhpcyBoYXNuJ3QgYmVlbiBpbml0aWFsaXNlZCAtIHN1cGVyKCkgaGFzbid0IGJlZW4gY2FsbGVkXCIsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gY2FsbCAmJlxuICAgICAgICAgICAgKHR5cGVvZiBjYWxsID09PSAnb2JqZWN0JyB8fCB0eXBlb2YgY2FsbCA9PT0gJ2Z1bmN0aW9uJylcbiAgICAgICAgICAgID8gY2FsbFxuICAgICAgICAgICAgOiBzZWxmO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2luaGVyaXRzKHN1YkNsYXNzLCBzdXBlckNsYXNzKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZiBzdXBlckNsYXNzICE9PSAnZnVuY3Rpb24nICYmIHN1cGVyQ2xhc3MgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICdTdXBlciBleHByZXNzaW9uIG11c3QgZWl0aGVyIGJlIG51bGwgb3IgYSBmdW5jdGlvbiwgbm90ICcgK1xuICAgICAgICAgICAgICAgIHR5cGVvZiBzdXBlckNsYXNzLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgc3ViQ2xhc3MucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShcbiAgICAgICAgICAgIHN1cGVyQ2xhc3MgJiYgc3VwZXJDbGFzcy5wcm90b3R5cGUsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGNvbnN0cnVjdG9yOiB7XG4gICAgICAgICAgICAgICAgdmFsdWU6IHN1YkNsYXNzLFxuIC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X01vZHVsZSk7XG5cbiAgICAgICAgICBmdW5jdGlvbiBDbGlwYm9hcmQocXVpbGwsIG9wdGlvbnMpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBDbGlwYm9hcmQpO1xuXG4gICAgICAgICAgICB2YXIgX3RoaXMgPSBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKENsaXBib2FyZC5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKENsaXBib2FyZCkpLmNhbGwoXG4gICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICBxdWlsbCxcbiAgICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgX3RoaXMucXVpbGwucm9vdC5hZGRFdmVudExpc3RlbmVyKFxuICAgICAgICAgICAgICAncGFzdGUnLFxuICAgICAgICAgICAgICBfdGhpcy5vblBhc3RlLmJpbmQoX3RoaXMpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIF90aGlzLmNvbnRhaW5lciA9IF90aGlzLnF1aWxsLmFkZENvbnRhaW5lcigncWwtY2xpcGJvYXJkJyk7XG4gICAgICAgICAgICBfdGhpcy5jb250YWluZXIuc2V0QXR0cmlidXRlKCdjb250ZW50ZWRpdGFibGUnLCB0cnVlKTtcbiAgICAgICAgICAgIF90aGlzLmNvbnRhaW5lci5zZXRBdHRyaWJ1dGUoJ3RhYmluZGV4JywgLTEpO1xuICAgICAgICAgICAgX3RoaXMubWF0Y2hlcnMgPSBbXTtcbiAgICAgICAgICAgIENMSVBCT0FSRF9DT05GSUcuY29uY2F0KF90aGlzLm9wdGlvbnMubWF0Y2hlcnMpLmZvckVhY2goZnVuY3Rpb24gKFxuICAgICAgICAgICAgICBfcmVmLFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIHZhciBfcmVmMiA9IF9zbGljZWRUb0FycmF5KF9yZWYsIDIpLFxuICAgICAgICAgICAgICAgIHNlbGVjdG9yID0gX3JlZjJbMF0sXG4gICAgICAgICAgICAgICAgbWF0Y2hlciA9IF9yZWYyWzFdO1xuXG4gICAgICAgICAgICAgIGlmICghb3B0aW9ucy5tYXRjaFZpc3VhbCAmJiBtYXRjaGVyID09PSBtYXRjaFNwYWNpbmcpIHJldHVybjtcbiAgICAgICAgICAgICAgX3RoaXMuYWRkTWF0Y2hlcihzZWxlY3RvciwgbWF0Y2hlcik7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBfdGhpcztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoQ2xpcGJvYXJkLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2FkZE1hdGNoZXInLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gYWRkTWF0Y2hlcihzZWxlY3RvciwgbWF0Y2hlcikge1xuICAgICAgICAgICAgICAgIHRoaXMubWF0Y2hlcnMucHVzaChbc2VsZWN0b3IsIG1hdGNoZXJdKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2NvbnZlcnQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gY29udmVydChodG1sKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBodG1sID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgdGhpcy5jb250YWluZXIuaW5uZXJIVE1MID0gaHRtbC5yZXBsYWNlKC9cXD5cXHI/XFxuICtcXDwvZywgJz48Jyk7IC8vIFJlbW92ZSBzcGFjZXMgYmV0d2VlbiB0YWdzXG4gICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBmb3JtYXRzID0gdGhpcy5xdWlsbC5nZXRGb3JtYXQoXG4gICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnNlbGVjdGlvbi5zYXZlZFJhbmdlLmluZGV4LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgaWYgKGZvcm1hdHNbX2NvZGUyLmRlZmF1bHQuYmxvdE5hbWVdKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgdGV4dCA9IHRoaXMuY29udGFpbmVyLmlubmVyVGV4dDtcbiAgICAgICAgICAgICAgICAgIHRoaXMuY29udGFpbmVyLmlubmVySFRNTCA9ICcnO1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpLmluc2VydChcbiAgICAgICAgICAgICAgICAgICAgdGV4dCxcbiAgICAgICAgICAgICAgICAgICAgX2RlZmluZVByb3BlcnR5KFxuICAgICAgICAgICAgICAgICAgICAgIHt9LFxuICAgICAgICAgICAgICAgICAgICAgIF9jb2RlMi5kZWZhdWx0LmJsb3ROYW1lLFxuICAgICAgICAgICAgICAgICAgICAgIGZvcm1hdHNbX2NvZGUyLmRlZmF1bHQuYmxvdE5hbWVdLFxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB2YXIgX3ByZXBhcmVNYXRjaGluZyA9IHRoaXMucHJlcGFyZU1hdGNoaW5nKCksXG4gICAgICAgICAgICAgICAgICBfcHJlcGFyZU1hdGNoaW5nMiA9IF9zbGljZWRUb0FycmF5KF9wcmVwYXJlTWF0Y2hpbmcsIDIpLFxuICAgICAgICAgICAgICAgICAgZWxlbWVudE1hdGNoZXJzID0gX3ByZXBhcmVNYXRjaGluZzJbMF0sXG4gICAgICAgICAgICAgICAgICB0ZXh0TWF0Y2hlcnMgPSBfcHJlcGFyZU1hdGNoaW5nMlsxXTtcblxuICAgICAgICAgICAgICAgIHZhciBkZWx0YSA9IHRyYXZlcnNlKFxuICAgICAgICAgICAgICAgICAgdGhpcy5jb250YWluZXIsXG4gICAgICAgICAgICAgICAgICBlbGVtZW50TWF0Y2hlcnMsXG4gICAgICAgICAgICAgICAgICB0ZXh0TWF0Y2hlcnMsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAvLyBSZW1vdmUgdHJhaWxpbmcgbmV3bGluZVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGRlbHRhRW5kc1dpdGgoZGVsdGEsICdcXG4nKSAmJlxuICAgICAgICAgICAgICAgICAgZGVsdGEub3BzW2RlbHRhLm9wcy5sZW5ndGggLSAxXS5hdHRyaWJ1dGVzID09IG51bGxcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlbHRhID0gZGVsdGEuY29tcG9zZShcbiAgICAgICAgICAgICAgICAgICAgbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KClcbiAgICAgICAgICAgICAgICAgICAgICAucmV0YWluKGRlbHRhLmxlbmd0aCgpIC0gMSlcbiAgICAgICAgICAgICAgICAgICAgICAuZGVsZXRlKDEpLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZGVidWcubG9nKCdjb252ZXJ0JywgdGhpcy5jb250YWluZXIuaW5uZXJIVE1MLCBkZWx0YSk7XG4gICAgICAgICAgICAgICAgdGhpcy5jb250YWluZXIuaW5uZXJIVE1MID0gJyc7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlbHRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZGFuZ2Vyb3VzbHlQYXN0ZUhUTUwnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZGFuZ2Vyb3VzbHlQYXN0ZUhUTUwoaW5kZXgsIGh0bWwpIHtcbiAgICAgICAgICAgICAgICB2YXIgc291cmNlID1cbiAgICAgICAgICAgICAgICAgIGFyZ3VtZW50cy5sZW5ndGggPiAyICYmIGFyZ3VtZW50c1syXSAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gYXJndW1lbnRzWzJdXG4gICAgICAgICAgICAgICAgICAgIDogX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuQVBJO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpbmRleCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuc2V0Q29udGVudHModGhpcy5jb252ZXJ0KGluZGV4KSwgaHRtbCk7XG4gICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnNldFNlbGVjdGlvbigwLCBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5TSUxFTlQpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICB2YXIgcGFzdGUgPSB0aGlzLmNvbnZlcnQoaHRtbCk7XG4gICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnVwZGF0ZUNvbnRlbnRzKFxuICAgICAgICAgICAgICAgICAgICBuZXcgX3F1aWxsRGVsdGEyLmRlZmF1bHQoKS5yZXRhaW4oaW5kZXgpLmNvbmNhdChwYXN0ZSksXG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnNldFNlbGVjdGlvbihcbiAgICAgICAgICAgICAgICAgICAgaW5kZXggKyBwYXN0ZS5sZW5ndGgoKSxcbiAgICAgICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuU0lMRU5ULFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdvblBhc3RlJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIG9uUGFzdGUoZSkge1xuICAgICAgICAgICAgICAgIHZhciBfdGhpczIgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgaWYgKGUuZGVmYXVsdFByZXZlbnRlZCB8fCAhdGhpcy5xdWlsbC5pc0VuYWJsZWQoKSkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIHZhciByYW5nZSA9IHRoaXMucXVpbGwuZ2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgICAgICAgdmFyIGRlbHRhID0gbmV3IF9xdWlsbERlbHRhMi5kZWZhdWx0KCkucmV0YWluKHJhbmdlLmluZGV4KTtcbiAgICAgICAgICAgICAgICB2YXIgc2Nyb2xsVG9wID0gdGhpcy5xdWlsbC5zY3JvbGxpbmdDb250YWluZXIuc2Nyb2xsVG9wO1xuICAgICAgICAgICAgICAgIHRoaXMuY29udGFpbmVyLmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5zZWxlY3Rpb24udXBkYXRlKF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlNJTEVOVCk7XG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICBkZWx0YSA9IGRlbHRhLmNvbmNhdChfdGhpczIuY29udmVydCgpKS5kZWxldGUocmFuZ2UubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgIF90aGlzMi5xdWlsbC51cGRhdGVDb250ZW50cyhcbiAgICAgICAgICAgICAgICAgICAgZGVsdGEsXG4gICAgICAgICAgICAgICAgICAgIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlVTRVIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgLy8gcmFuZ2UubGVuZ3RoIGNvbnRyaWJ1dGVzIHRvIGRlbHRhLmxlbmd0aCgpXG4gICAgICAgICAgICAgICAgICBfdGhpczIucXVpbGwuc2V0U2VsZWN0aW9uKFxuICAgICAgICAgICAgICAgICAgICBkZWx0YS5sZW5ndGgoKSAtIHJhbmdlLmxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuU0lMRU5ULFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIF90aGlzMi5xdWlsbC5zY3JvbGxpbmdDb250YWluZXIuc2Nyb2xsVG9wID0gc2Nyb2xsVG9wO1xuICAgICAgICAgICAgICAgICAgX3RoaXMyLnF1aWxsLmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgfSwgMSk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdwcmVwYXJlTWF0Y2hpbmcnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcHJlcGFyZU1hdGNoaW5nKCkge1xuICAgICAgICAgICAgICAgIHZhciBfdGhpczMgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgdmFyIGVsZW1lbnRNYXRjaGVycyA9IFtdLFxuICAgICAgICAgICAgICAgICAgdGV4dE1hdGNoZXJzID0gW107XG4gICAgICAgICAgICAgICAgdGhpcy5tYXRjaGVycy5mb3JFYWNoKGZ1bmN0aW9uIChwYWlyKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgX3BhaXIgPSBfc2xpY2VkVG9BcnJheShwYWlyLCAyKSxcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3IgPSBfcGFpclswXSxcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlciA9IF9wYWlyWzFdO1xuXG4gICAgICAgICAgICAgICAgICBzd2l0Y2ggKHNlbGVjdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgTm9kZS5URVhUX05PREU6XG4gICAgICAgICAgICAgICAgICAgICAgdGV4dE1hdGNoZXJzLnB1c2gobWF0Y2hlcik7XG4gICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgTm9kZS5FTEVNRU5UX05PREU6XG4gICAgICAgICAgICAgICAgICAgICAgZWxlbWVudE1hdGNoZXJzLnB1c2gobWF0Y2hlcik7XG4gICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKFxuICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMzLmNvbnRhaW5lci5xdWVyeVNlbGVjdG9yQWxsKHNlbGVjdG9yKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChub2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRPRE8gdXNlIHdlYWttYXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZVtET01fS0VZXSA9IG5vZGVbRE9NX0tFWV0gfHwgW107XG4gICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVbRE9NX0tFWV0ucHVzaChtYXRjaGVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gW2VsZW1lbnRNYXRjaGVycywgdGV4dE1hdGNoZXJzXTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG5cbiAgICAgICAgICByZXR1cm4gQ2xpcGJvYXJkO1xuICAgICAgICB9KShfbW9kdWxlMi5kZWZhdWx0KTtcblxuICAgICAgICBDbGlwYm9hcmQuREVGQVVMVFMgPSB7XG4gICAgICAgICAgbWF0Y2hlcnM6IFtdLFxuICAgICAgICAgIG1hdGNoVmlzdWFsOiB0cnVlLFxuICAgICAgICB9O1xuXG4gICAgICAgIGZ1bmN0aW9uIGFwcGx5Rm9ybWF0KGRlbHRhLCBmb3JtYXQsIHZhbHVlKSB7XG4gICAgICAgICAgaWYgKFxuICAgICAgICAgICAgKHR5cGVvZiBmb3JtYXQgPT09ICd1bmRlZmluZWQnID8gJ3VuZGVmaW5lZCcgOiBfdHlwZW9mKGZvcm1hdCkpID09PVxuICAgICAgICAgICAgJ29iamVjdCdcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIHJldHVybiBPYmplY3Qua2V5cyhmb3JtYXQpLnJlZHVjZShmdW5jdGlvbiAoZGVsdGEsIGtleSkge1xuICAgICAgICAgICAgICByZXR1cm4gYXBwbHlGb3JtYXQoZGVsdGEsIGtleSwgZm9ybWF0W2tleV0pO1xuICAgICAgICAgICAgfSwgZGVsdGEpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gZGVsdGEucmVkdWNlKGZ1bmN0aW9uIChkZWx0YSwgb3ApIHtcbiAgICAgICAgICAgICAgaWYgKG9wLmF0dHJpYnV0ZXMgJiYgb3AuYXR0cmlidXRlc1tmb3JtYXRdKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlbHRhLnB1c2gob3ApO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiBkZWx0YS5pbnNlcnQoXG4gICAgICAgICAgICAgICAgICBvcC5pbnNlcnQsXG4gICAgICAgICAgICAgICAgICAoMCwgX2V4dGVuZDMuZGVmYXVsdCkoXG4gICAgICAgICAgICAgICAgICAgIHt9LFxuICAgICAgICAgICAgICAgICAgICBfZGVmaW5lUHJvcGVydHkoe30sIGZvcm1hdCwgdmFsdWUpLFxuICAgICAgICAgICAgICAgICAgICBvcC5hdHRyaWJ1dGVzLFxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCBuZXcgX3F1aWxsRGVsdGEyLmRlZmF1bHQoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gY29tcHV0ZVN0eWxlKG5vZGUpIHtcbiAgICAgICAgICBpZiAobm9kZS5ub2RlVHlwZSAhPT0gTm9kZS5FTEVNRU5UX05PREUpIHJldHVybiB7fTtcbiAgICAgICAgICB2YXIgRE9NX0tFWSA9ICdfX3FsLWNvbXB1dGVkLXN0eWxlJztcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgbm9kZVtET01fS0VZXSB8fCAobm9kZVtET01fS0VZXSA9IHdpbmRvdy5nZXRDb21wdXRlZFN0eWxlKG5vZGUpKVxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBkZWx0YUVuZHNXaXRoKGRlbHRhLCB0ZXh0KSB7XG4gICAgICAgICAgdmFyIGVuZFRleHQgPSAnJztcbiAgICAgICAgICBmb3IgKFxuICAgICAgICAgICAgdmFyIGkgPSBkZWx0YS5vcHMubGVuZ3RoIC0gMTtcbiAgICAgICAgICAgIGkgPj0gMCAmJiBlbmRUZXh0Lmxlbmd0aCA8IHRleHQubGVuZ3RoO1xuICAgICAgICAgICAgLS1pXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICB2YXIgb3AgPSBkZWx0YS5vcHNbaV07XG4gICAgICAgICAgICBpZiAodHlwZW9mIG9wLmluc2VydCAhPT0gJ3N0cmluZycpIGJyZWFrO1xuICAgICAgICAgICAgZW5kVGV4dCA9IG9wLmluc2VydCArIGVuZFRleHQ7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBlbmRUZXh0LnNsaWNlKC0xICogdGV4dC5sZW5ndGgpID09PSB0ZXh0O1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gaXNMa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cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGlmIChjaGlsZE5vZGUubm9kZVR5cGUgPT09IG5vZGUuRUxFTUVOVF9OT0RFKSB7XG4gICAgICAgICAgICAgICAgICBjaGlsZHJlbkRlbHRhID0gZWxlbWVudE1hdGNoZXJzLnJlZHVjZShmdW5jdGlvbiAoXG4gICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuRGVsdGEsXG4gICAgICAgICAgICAgICAgICAgIG1hdGNoZXIsXG4gICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1hdGNoZXIoY2hpbGROb2RlLCBjaGlsZHJlbkRlbHRhKTtcbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICBjaGlsZHJlbkRlbHRhKTtcbiAgICAgICAgICAgICAgICAgIGNoaWxkcmVuRGVsdGEgPSAoY2hpbGROb2RlW0RPTV9LRVldIHx8IFtdKS5yZWR1Y2UoZnVuY3Rpb24gKFxuICAgICAgICAgICAgICAgICAgICBjaGlsZHJlbkRlbHRhLFxuICAgICAgICAgICAgICAgICAgICBtYXRjaGVyLFxuICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYXRjaGVyKGNoaWxkTm9kZSwgY2hpbGRyZW5EZWx0YSk7XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgY2hpbGRyZW5EZWx0YSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBkZWx0YS5jb25jYXQoY2hpbGRyZW5EZWx0YSk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIG1hdGNoQWxpYXMoZm9ybWF0LCBub2RlLCBkZWx0YSkge1xuICAgICAgICAgIHJldHVybiBhcHBseUZvcm1hdChkZWx0YSwgZm9ybWF0LCB0cnVlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIG1hdGNoQXR0cmlidXRvcihub2RlLCBkZWx0YSkge1xuICAgICAgICAgIHZhciBhdHRyaWJ1dGVzID0gX3BhcmNobWVudDIuZGVmYXVsdC5BdHRyaWJ1dG9yLkF0dHJpYnV0ZS5rZXlzKG5vZGUpO1xuICAgICAgICAgIHZhciBjbGFzc2VzID0gX3BhcmNobWVudDIuZGVmYXVsdC5BdHRyaWJ1dG9yLkNsYXNzLmtleXMobm9kZSk7XG4gICAgICAgICAgdmFyIHN0eWxlcyA9IF9wYXJjaG1lbnQyLmRlZmF1bHQuQXR0cmlidXRvci5TdHlsZS5rZXlzKG5vZGUpO1xuICAgICAgICAgIHZhciBmb3JtYXRzID0ge307XG4gICAgICAgICAgYXR0cmlidXRlc1xuICAgICAgICAgICAgLmNvbmNhdChjbGFzc2VzKVxuICAgICAgICAgICAgLmNvbmNhdChzdHlsZXMpXG4gICAgICAgICAgICAuZm9yRWFjaChmdW5jdGlvbiAobmFtZSkge1xuICAgICAgICAgICAgICB2YXIgYXR0ciA9IF9wYXJjaG1lbnQyLmRlZmF1bHQucXVlcnkoXG4gICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LlNjb3BlLkFUVFJJQlVURSxcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgaWYgKGF0dHIgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGZvcm1hdHNbYXR0ci5hdHRyTmFtZV0gPSBhdHRyLnZhbHVlKG5vZGUpO1xuICAgICAgICAgICAgICAgIGlmIChmb3JtYXRzW2F0dHIuYXR0ck5hbWVdKSByZXR1cm47XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYXR0ciA9IEFUVFJJQlVURV9BVFRSSUJVVE9SU1tuYW1lXTtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIGF0dHIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgIChhdHRyLmF0dHJOYW1lID09PSBuYW1lIHx8IGF0dHIua2V5TmFtZSA9PT0gbmFtZSlcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgZm9ybWF0c1thdHRyLmF0dHJOYW1lXSA9IGF0dHIudmFsdWUobm9kZSkgfHwgdW5kZWZpbmVkO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGF0dHIgPSBTVFlMRV9BVFRSSUJVVE9SU1tuYW1lXTtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIGF0dHIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgIChhdHRyLmF0dHJOYW1lID09PSBuYW1lIHx8IGF0dHIua2V5TmFtZSA9PT0gbmFtZSlcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgYXR0ciA9IFNUWUxFX0FUVFJJQlVUT1JTW25hbWVdO1xuICAgICAgICAgICAgICAgIGZvcm1hdHNbYXR0ci5hdHRyTmFtZV0gPSBhdHRyLnZhbHVlKG5vZGUpIHx8IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgaWYgKE9iamVjdC5rZXlzKGZvcm1hdHMpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIGRlbHRhID0gYXBwbHlGb3JtYXQoZGVsdGEsIGZvcm1hdHMpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZGVsdGE7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBtYXRjaEJsb3Qobm9kZSwgZGVsdGEpIHtcbiA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d0aCgpIC0gMSlcbiAgICAgICAgICAgICAgLnJldGFpbigxLCB7aW5kZW50OiBpbmRlbnR9KSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gbWF0Y2hOZXdsaW5lKG5vZGUsIGRlbHRhKSB7XG4gICAgICAgICAgaWYgKCFkZWx0YUVuZHNXaXRoKGRlbHRhLCAnXFxuJykpIHtcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgaXNMaW5lKG5vZGUpIHx8XG4gICAgICAgICAgICAgIChkZWx0YS5sZW5ndGgoKSA+IDAgJiZcbiAgICAgICAgICAgICAgICBub2RlLm5leHRTaWJsaW5nICYmXG4gICAgICAgICAgICAgICAgaXNMaW5lKG5vZGUubmV4dFNpYmxpbmcpKVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIGRlbHRhLmluc2VydCgnXFxuJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBkZWx0YTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIG1hdGNoU3BhY2luZyhub2RlLCBkZWx0YSkge1xuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgIGlzTGluZShub2RlKSAmJlxuICAgICAgICAgICAgbm9kZS5uZXh0RWxlbWVudFNpYmxpbmcgIT0gbnVsbCAmJlxuICAgICAgICAgICAgIWRlbHRhRW5kc1dpdGgoZGVsdGEsICdcXG5cXG4nKVxuICAgICAgICAgICkge1xuICAgICAgICAgICAgdmFyIG5vZGVIZWlnaHQgPVxuICAgICAgICAgICAgICBub2RlLm9mZnNldEhlaWdodCArXG4gICAgICAgICAgICAgIHBhcnNlRmxvYXQoY29tcHV0ZVN0eWxlKG5vZGUpLm1hcmdpblRvcCkgK1xuICAgICAgICAgICAgICBwYXJzZUZsb2F0KGNvbXB1dGVTdHlsZShub2RlKS5tYXJnaW5Cb3R0b20pO1xuICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICBub2RlLm5leHRFbGVtZW50U2libGluZy5vZmZzZXRUb3AgPlxuICAgICAgICAgICAgICBub2RlLm9mZnNldFRvcCArIG5vZGVIZWlnaHQgKiAxLjVcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBkZWx0YS5pbnNlcnQoJ1xcbicpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZGVsdGE7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBtYXRjaFN0eWxlcyhub2RlLCBkZWx0YSkge1xuICAgICAgICAgIHZhciBmb3JtYXRzID0ge307XG4gICAgICAgICAgdmFyIHN0eWxlID0gbm9kZS5zdHlsZSB8fCB7fTtcbiAgICAgICAgICBpZiAoc3R5bGUuZm9udFN0eWxlICYmIGNvbXB1dGVTdHlsZShub2RlKS5mb250U3R5bGUgPT09ICdpdGFsaWMnKSB7XG4gICAgICAgICAgICBmb3JtYXRzLml0YWxpYyA9IHRydWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgIHN0eWxlLmZvbnRXZWlnaHQgJiZcbiAgICAgICAgICAgIChjb21wdXRlU3R5bGUobm9kZSkuZm9udFdlaWdodC5zdGFydHNXaXRoKCdib2xkJykgfHxcbiAgICAgICAgICAgICAgcGFyc2VJbnQoY29tcHV0ZVN0eWxlKG5vZGUpLmZvbnRXZWlnaHQpID49IDcwMClcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIGZvcm1hdHMuYm9sZCA9IHRydWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhmb3JtYXRzKS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICBkZWx0YSA9IGFwcGx5Rm9ybWF0KGRlbHRhLCBmb3JtYXRzKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHBhcnNlRmxvYXQoc3R5bGUudGV4dEluZGVudCB8fCAwKSA+IDApIHtcbiAgICAgICAgICAgIC8vIENvdWxkIGJlIDAuNWluXG4gICAgICAgICAgICBkZWx0YSA9IG5ldyBfcXVpbGxEZWx0YTIuZGVmYXVsdCgpLmluc2VydCgnXFx0JykuY29uY2F0KGRlbHRhKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGRlbHRhO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gbWF0Y2hUZXh0KG5vZGUsIGRlbHRhKSB7XG4gICAgICAgICAgdmFyIHRleHQgPSBub2RlLmRhdGE7XG4gICAgICAgICAgLy8gV29yZCByZXByZXNlbnRzIGVtcHR5IGxpbmUgd2l0aCA8bzpwPiZuYnNwOzwvbzpwPlxuICAgICAgICAgIGlmIChub2RlLnBhcmVudE5vZGUudGFnTmFtZSA9PT0gJ086UCcpIHtcbiAgICAgICAgICAgIHJldHVybiBkZWx0YS5pbnNlcnQodGV4dC50cmltKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoXG4gICAgICAgICAgICB0ZXh0LnRyaW0oKS5sZW5ndGggPT09IDAgJiZcbiAgICAgICAgICAgIG5vZGUucGFyZW50Tm9kZS5jbGFzc0xpc3QuY29udGFpbnMoJ3FsLWNsaXBib2FyZCcpXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICByZXR1cm4gZGVsdGE7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICghY29tcHV0ZVN0eWxlKG5vZGUucGFyZW50Tm9kZSkud2hpdGVTcGFjZS5zdGFydHNXaXRoKCdwcmUnKSkge1xuICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIGZ1bmMtc3R5bGVcbiAgICAgICAgICAgIHZhciByZXBsYWNlciA9IGZ1bmN0aW9uIHJlcGxhY2VyKGNvbGxhcHNlLCBtYXRjaCkge1xuICAgICAgICAgICAgICBtYXRjaCA9IG1hdGNoLnJlcGxhY2UoL1teXFx1MDBhMF0vZywgJycpOyAvLyBcXHUwMGEwIGlzIG5ic3A7XG4gICAgICAgICAgICAgIHJldHVybiBtYXRjaC5sZW5ndGggPCAxICYmIGNvbGxhcHNlID8gJyAnIDogbWF0Y2g7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdGV4dCA9IHRleHQucmVwbGFjZSgvXFxyXFxuL2csICcgJykucmVwbGFjZSgvXFxuL2csICcgJyk7XG4gICAgICAgICAgICB0ZXh0ID0gdGV4dC5yZXBsYWNlKC9cXHNcXHMrL2csIHJlcGxhY2VyLmJpbmQocmVwbGFjZXIsIHRydWUpKTsgLy8gY29sbGFwc2Ugd2hpdGVzcGFjZVxuICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAobm9kZS5wcmV2aW91c1NpYmxpbmcgPT0gbnVsbCAmJiBpc0xpbmUobm9kZS5wYXJlbnROb2RlKSkgfHxcbiAgICAgICAgICAgICAgKG5vZGUucHJldmlvdXNTaWJsaW5nICE9IG51bGwgJiYgaXNMaW5lKG5vZGUucHJldmlvdXNTaWJsaW5nKSlcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICB0ZXh0ID0gdGV4dC5yZXBsYWNlKC9eXFxzKy8sIHJlcGxhY2VyLmJpbmQocmVwbGFjZXIsIGZhbHNlKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgIChub2RlLm5leHRTaWJsaW5nID09IG51bGwgJiYgaXNMaW5lKG5vZGUucGFyZW50Tm9kZSkpIHx8XG4gICAgICAgICAgICAgIChub2RlLm5leHRTaWJsaW5nICE9IG51bGwgJiYgaXNMaW5lKG5vZGUubmV4dFNpYmxpbmcpKVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIHRleHQgPSB0ZXh0LnJlcGxhY2UoL1xccyskLywgcmVwbGFjZXIuYmluZChyZXBsYWNlciwgZmFsc2UpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGRlbHRhLmluc2V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2FsbCkge1xuICAgICAgICAgIGlmICghc2VsZikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFJlZmVyZW5jZUVycm9yKFxuICAgICAgICAgICAgICBcInRoaXMgaGFzbid0IGJlZW4gaW5pdGlhbGlzZWQgLSBzdXBlcigpIGhhc24ndCBiZWVuIGNhbGxlZFwiLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGNhbGwgJiZcbiAgICAgICAgICAgICh0eXBlb2YgY2FsbCA9PT0gJ29iamVjdCcgfHwgdHlwZW9mIGNhbGwgPT09ICdmdW5jdGlvbicpXG4gICAgICAgICAgICA/IGNhbGxcbiAgICAgICAgICAgIDogc2VsZjtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9pbmhlcml0cyhzdWJDbGFzcywgc3VwZXJDbGFzcykge1xuICAgICAgICAgIGlmICh0eXBlb2Ygc3VwZXJDbGFzcyAhPT0gJ2Z1bmN0aW9uJyAmJiBzdXBlckNsYXNzICE9PSBudWxsKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAnU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIEJvbGQgPSAoZnVuY3Rpb24gKF9JbmxpbmUpIHtcbiAgICAgICAgICBfaW5oZXJpdHMoQm9sZCwgX0lubGluZSk7XG5cbiAgICAgICAgICBmdW5jdGlvbiBCb2xkKCkge1xuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIEJvbGQpO1xuXG4gICAgICAgICAgICByZXR1cm4gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oXG4gICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgIChCb2xkLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQm9sZCkpLmFwcGx5KFxuICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgYXJndW1lbnRzLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoXG4gICAgICAgICAgICBCb2xkLFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAnb3B0aW1pemUnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBvcHRpbWl6ZShjb250ZXh0KSB7XG4gICAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgICBCb2xkLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQm9sZC5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgICAnb3B0aW1pemUnLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIGNvbnRleHQpO1xuICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuZG9tTm9kZS50YWdOYW1lICE9PSB0aGlzLnN0YXRpY3MudGFnTmFtZVswXSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlcGxhY2VXaXRoKHRoaXMuc3RhdGljcy5ibG90TmFtZSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdjcmVhdGUnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBjcmVhdGUoKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gX2dldChcbiAgICAgICAgICAgICAgICAgICAgQm9sZC5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKEJvbGQpLFxuICAgICAgICAgICAgICAgICAgICAnY3JlYXRlJyxcbiAgICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAnZm9ybWF0cycsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGZvcm1hdHMoKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXSxcbiAgICAgICAgICApO1xuXG4gICAgICAgICAgcmV0dXJuIEJvbGQ7XG4gICAgICAgIH0pKF9pbmxpbmUyLmRlZmF1bHQpO1xuXG4gICAgICAgIEJvbGQuYmxvdE5hbWUgPSAnYm9sZCc7XG4gICAgICAgIEJvbGQudGFnTmFtZSA9IFsnU1RST05HJywgJ0InXTtcblxuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBCb2xkO1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogNTcgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAnX19lc01vZHVsZScsIHtcbiAgICAgICAgICB2YWx1ZTogdHJ1ZSxcbiAgICAgICAgfSk7XG4gICAgICAgIGV4cG9ydHMuYWRkQ29udHJvbHMgPSBleHBvcnRzLmRlZmF1bHQgPSB1bmRlZmluZWQ7XG5cbiAgICAgICAgdmFyIF9zbGljZWRUb0FycmF5ID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBmdW5jdGlvbiBzbGljZUl0ZXJhdG9yKGFyciwgaSkge1xuICAgICAgICAgICAgdmFyIF9hcnIgPSBbXTtcbiAgICAgICAgICAgIHZhciBfbiA9IHRydWU7XG4gICAgICAgICAgICB2YXIgX2QgPSBmYWxzZTtcbiAgICAgICAgICAgIHZhciBfZSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGZvciAoXG4gICAgICAgICAgICAgICAgdmFyIF9pID0gYXJyW1N5bWJvbC5pdGVyYXRvcl0oKSwgX3M7XG4gICAgICAgICAgICAgICAgIShfbiA9IChfcyA9IF9pLm5leHQoKSkuZG9uZSk7XG4gICAgICAgICAgICAgICAgX24gPSB0cnVlXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIF9hcnIucHVzaChfcy52YWx1ZSk7XG4gICAgICAgICAgICAgICAgaWYgKGkgJiYgX2Fyci5sZW5ndGggPT09IGkpIGJyZWFrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgX2QgPSB0cnVlO1xuICAgICAgICAgICAgICBfZSA9IGVycjtcbiAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgaWYgKCFfbiAmJiBfaVsncmV0dXJuJ10pIF9pWydyZXR1cm4nXSgpO1xuICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIGlmIChfZCkgdGhyb3cgX2U7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBfYXJyO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGFyciwgaSkge1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoYXJyKSkge1xuICAgICAgICAgICAgICByZXR1cm4gYXJyO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChTeW1ib2wuaXRlcmF0b3IgaW4gT2JqZWN0KGFycikpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHNsaWNlSXRlcmF0b3IoYXJyLCBpKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICAgJ0ludmFsaWQgYXR0ZW1wdCB0byBkZXN0cnVjdHVyZSBub24taXRlcmFibGUgaW5zdGFuY2UnLFxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgIH0pKCk7XG5cbiAgICAgICAgdmFyIF9jcmVhdGVDbGFzcyA9IChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgZnVuY3Rpb24gZGVmaW5lUHJvcGVydGllcyh0YXJnZXQsIHByb3BzKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHByb3BzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgIHZhciBkZXNjcmlwdG9yID0gcHJvcHNbaV07XG4gICAgICAgICAgICAgIGRlc2NyaXB0b3IuZW51bWVyYWJsZSA9IGRlc2NyaXB0b3IuZW51bWVyYWJsZSB8fCBmYWxzZTtcbiAgICAgICAgICAgICAgZGVzY3JpcHRvci5jb25maWd1cmFibGUgPSB0cnVlO1xuICAgICAgICAgICAgICBpZiAoJ3ZhbHVlJyBpbiBkZXNjcmlwdG9yKSBkZXNjcmlwdG9yLndyaXRhYmxlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRhcmdldCwgZGVzY3JpcHRvci5rZXksIGRlc2NyaXB0b3IpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKENvbnN0cnVjdG9yLCBwcm90b1Byb3BzLCBzdGF0aWNQcm9wcykge1xuICAgICAgICAgICAgaWYgKHByb3RvUHJvcHMpIGRlZmluZVByb3BlcnRpZXMoQ29uc3RydWN0b3IucHJvdG90eXBlLCBwcm90b1Byb3BzKTtcbiAgICAgICAgICAgIGlmIChzdGF0aWNQcm9wcykgZGVmaW5lUHJvcGVydGllcyhDb25zdHJ1Y3Rvciwgc3RhdGljUHJvcHMpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnN0cnVjdG9yO1xuICAgICAgICAgIH07XG4gICAgICAgIH0pKCk7XG5cbiAgICAgICAgdmFyIF9xdWlsbERlbHRhID0gX193ZWJwYWNrX3JlcXVpcmVfXygyKTtcblxuICAgIC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gIT09ICdmdW5jdGlvbicgJiYgc3VwZXJDbGFzcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgJ1N1cGVyIGV4cHJlc3Npb24gbXVzdCBlaXRoZXIgYmUgbnVsbCBvciBhIGZ1bmN0aW9uLCBub3QgJyArXG4gICAgICAgICAgICAgICAgdHlwZW9mIHN1cGVyQ2xhc3MsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBzdWJDbGFzcy5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKFxuICAgICAgICAgICAgc3VwZXJDbGFzcyAmJiBzdXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBkZWJ1ZyA9ICgwLCBfbG9nZ2VyMi5kZWZhdWx0KSgncXVpbGw6dG9vbGJhcicpO1xuXG4gICAgICAgIHZhciBUb29sYmFyID0gKGZ1bmN0aW9uIChfTW9kdWxlKSB7XG4gICAgICAgICAgX2luaGVyaXRzKFRvb2xiYXIsIF9Nb2R1bGUpO1xuXG4gICAgICAgICAgZnVuY3Rpb24gVG9vbGJhcihxdWlsbCwgb3B0aW9ucykge1xuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIFRvb2xiYXIpO1xuXG4gICAgICAgICAgICB2YXIgX3RoaXMgPSBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKFRvb2xiYXIuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihUb29sYmFyKSkuY2FsbChcbiAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgIHF1aWxsLFxuICAgICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShfdGhpcy5vcHRpb25zLmNvbnRhaW5lcikpIHtcbiAgICAgICAgICAgICAgdmFyIGNvbnRhaW5lciA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpO1xuICAgICAgICAgICAgICBhZGRDb250cm9scyhjb250YWluZXIsIF90aGlzLm9wdGlvbnMuY29udGFpbmVyKTtcbiAgICAgICAgICAgICAgcXVpbGwuY29udGFpbmVyLnBhcmVudE5vZGUuaW5zZXJ0QmVmb3JlKFxuICAgICAgICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICAgICAgICBxdWlsbC5jb250YWluZXIsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIF90aGlzLmNvbnRhaW5lciA9IGNvbnRhaW5lcjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIF90aGlzLm9wdGlvbnMuY29udGFpbmVyID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBfdGhpcy5jb250YWluZXIgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKF90aGlzLm9wdGlvbnMuY29udGFpbmVyKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIF90aGlzLmNvbnRhaW5lciA9IF90aGlzLm9wdGlvbnMuY29udGFpbmVyO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCEoX3RoaXMuY29udGFpbmVyIGluc3RhbmNlb2YgSFRNTEVsZW1lbnQpKSB7XG4gICAgICAgICAgICAgIHZhciBfcmV0O1xuXG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgKF9yZXQgPSBkZWJ1Zy5lcnJvcihcbiAgICAgICAgICAgICAgICAgICdDb250YWluZXIgcmVxdWlyZWQgZm9yIHRvb2xiYXInLFxuICAgICAgICAgICAgICAgICAgX3RoaXMub3B0aW9ucyxcbiAgICAgICAgICAgICAgICApKSxcbiAgICAgICAgICAgICAgICBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihfdGhpcywgX3JldClcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIF90aGlzLmNvbnRhaW5lci5jbGFzc0xpc3QuYWRkKCdxbC10b29sYmFyJyk7XG4gICAgICAgICAgICBfdGhpcy5jb250cm9scyA9IFtdO1xuICAgICAgICAgICAgX3RoaXMuaGFuZGxlcnMgPSB7fTtcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKF90aGlzLm9wdGlvbnMuaGFuZGxlcnMpLmZvckVhY2goZnVuY3Rpb24gKGZvcm1hdCkge1xuICAgICAgICAgICAgICBfdGhpcy5hZGRIYW5kbGVyKGZvcm1hdCwgX3RoaXMub3B0aW9ucy5oYW5kbGVyc1tmb3JtYXRdKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKFxuICAgICAgICAgICAgICBfdGhpcy5jb250YWluZXIucXVlcnlTZWxlY3RvckFsbCgnYnV0dG9uLCBzZWxlY3QnKSxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKGlucHV0KSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuYXR0YWNoKGlucHV0KTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBfdGhpcy5xdWlsbC5vbihcbiAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LmV2ZW50cy5FRElUT1JfQ0hBTkdFLFxuICAgICAgICAgICAgICBmdW5jdGlvbiAodHlwZSwgcmFuZ2UpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZSA9PT0gX3F1aWxsMi5kZWZhdWx0LmV2ZW50cy5TRUxFQ1RJT05fQ0hBTkdFKSB7XG4gICAgICAgICAgICAgICAgICBfdGhpcy51cGRhdGUocmFuZ2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBfdGhpcy5xdWlsbC5vbihfcXVpbGwyLmRlZmF1bHQuZXZlbnRzLlNDUk9MTF9PUFRJTUlaRSwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICB2YXIgX3RoaXMkcXVpbGwkc2VsZWN0aW9uID0gX3RoaXMucXVpbGwuc2VsZWN0aW9uLmdldFJhbmdlKCksXG4gICAgICAgICAgICAgICAgX3RoaXMkcXVpbGwkc2VsZWN0aW9uMiA9IF9zbGljZWRUb0FycmF5KFxuICAgICAgICAgICAgICAgICAgX3RoaXMkcXVpbGwkc2VsZWN0aW9uLFxuICAgICAgICAgICAgICAgICAgMSxcbiAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIHJhbmdlID0gX3RoaXMkcXVpbGwkc2VsZWN0aW9uMlswXTsgLy8gcXVpbGwuZ2V0U2VsZWN0aW9uIHRyaWdnZXJzIHVwZGF0ZVxuXG4gICAgICAgICAgICAgIF90aGlzLnVwZGF0ZShyYW5nZSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBfdGhpcztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoVG9vbGJhciwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdhZGRIYW5kbGVyJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGFkZEhhbmRsZXIoZm9ybWF0LCBoYW5kbGVyKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVyc1tmb3JtYXRdID0gaGFuZGxlcjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2F0dGFjaCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBhdHRhY2goaW5wdXQpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXMyID0gdGhpcztcblxuICAgICAgICAgICAgICAgIHZhciBmb3JtYXQgPSBbXS5maW5kLmNhbGwoXG4gICAgICAgICAgICAgICAgICBpbnB1dC5jbGFzc0xpc3QsXG4gICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoY2xhc3NOYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjbGFzc05hbWUuaW5kZXhPZigncWwtJykgPT09IDA7XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgaWYgKCFmb3JtYXQpIHJldHVybjtcbiAgICAgICAgICAgICAgICBmb3JtYXQgPSBmb3JtYXQuc2xpY2UoJ3FsLScubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQudGFnTmFtZSA9PT0gJ0JVVFRPTicpIHtcbiAgICAgICAgICAgICAgICAgIGlucHV0LnNldEF0dHJpYnV0ZSgndHlwZScsICdidXR0b24nKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuaGFuZGxlcnNbZm9ybWF0XSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuc2Nyb2xsLndoaXRlbGlzdCAhPSBudWxsICYmXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuc2Nyb2xsLndoaXRlbGlzdFtmb3JtYXRdID09IG51bGxcbiAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBkZWJ1Zy53YXJuKFxuICAgICAgICAgICAgICAgICAgICAgICdpZ25vcmluZyBhdHRhY2hpbmcgdG8gZGlzYWJsZWQgZm9ybWF0JyxcbiAgICAgICAgICAgICAgICAgICAgICBmb3JtYXQsXG4gICAgICAgICAgICAgICAgICAgICAgaW5wdXQsXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGlmIChfcGFyY2htZW50Mi5kZWZhdWx0LnF1ZXJ5KGZvcm1hdCkgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBkZWJ1Zy53YXJuKFxuICAgICAgICAgICAgICAgICAgICAgICdpZ25vcmluZyBhdHRhY2hpbmcgdG8gbm9uZXhpc3RlbnQgZm9ybWF0JyxcbiAgICAgICAgICAgICAgICAgICAgICBmb3JtYXQsXG4gICAgICAgICAgICAgICAgICAgICAgaW5wdXQsXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIGV2ZW50TmFtZSA9IGlucHV0LnRhZ05hbWUgPT09ICdTRUxFQ1QnID8gJ2NoYW5nZScgOiAnY2xpY2snO1xuICAgICAgICAgICAgICAgIGlucHV0LmFkZEV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gdm9pZCAwO1xuICAgICAgICAgICAgICAgICAgaWYgKGlucHV0LnRhZ05hbWUgPT09ICdTRUxFQ1QnKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dC5zZWxlY3RlZEluZGV4IDwgMCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB2YXIgc2VsZWN0ZWQgPSBpbnB1dC5vcHRpb25zW2lucHV0LnNlbGVjdGVkSW5kZXhdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZWN0ZWQuaGFzQXR0cmlidXRlKCdzZWxlY3RlZCcpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHNlbGVjdGVkLnZhbHVlIHx8IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQuY2xhc3NMaXN0LmNvbnRhaW5zKCdxbC1hY3RpdmUnKSkge1xuICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBpbnB1dC52YWx1ZSB8fCAhaW5wdXQuaGFzQXR0cmlidXRlKCd2YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIF90aGlzMi5xdWlsbC5mb2N1cygpO1xuXG4gICAgICAgICAgICAgICAgICB2YXIgX3F1aWxsJHNlbGVjdGlvbiRnZXRSID0gX3RoaXMyLnF1aWxsLnNlbGVjdGlvbi5nZXRSYW5nZSgpLFxuICAgICAgICAgICAgICAgICAgICBfcXVpbGwkc2VsZWN0aW9uJGdldFIyID0gX3NsaWNlZFRvQXJyYXkoXG4gICAgICAgICAgICAgICAgICAgICAgX3F1aWxsJHNlbGVjdGlvbiRnZXRSLFxuICAgICAgICAgICAgICAgICAgICAgIDEsXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gX3F1aWxsJHNlbGVjdGlvbiRnZXRSMlswXTtcblxuICAgICAgICAgICAgICAgICAgaWYgKF90aGlzMi5oYW5kbGVyc1tmb3JtYXRdICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMyLmhhbmRsZXJzW2Zvcm1hdF0uY2FsbChfdGhpczIsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQucXVlcnkoZm9ybWF0KS5wcm90b3R5cGUgaW5zdGFuY2VvZlxuICAgICAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LkVtYmVkXG4gICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBwcm9tcHQoJ0VudGVyICcgKyBmb3JtYXQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXZhbHVlKSByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIF90aGlzMi5xdWlsbC51cGRhdGVDb250ZW50cyhcbiAgICAgICAgICAgICAgICAgICAgICBuZXcgX3F1aWxsRGVsdGEyLmRlZmF1bHQoKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnJldGFpbihyYW5nZS5pbmRleClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5kZWxldGUocmFuZ2UubGVuZ3RoKVxuICAgICAgICAgICAgICAgICAgICAgICAgLmluc2VydChfZGVmaW5lUHJvcGVydHkoe30sIGZvcm1hdCwgdmFsdWUpKSxcbiAgICAgICAgICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSLFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMyLnF1aWxsLmZvcm1hdChcbiAgICAgICAgICAgICAgICAgICAgICBmb3JtYXQsXG4gICAgICAgICAgICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIF90aGlzMi51cGRhdGUocmFuZ2UpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIC8vIFRPRE8gdXNlIHdlYWttYXBcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnRyb2xzLnB1c2goW2Zvcm1hdCwgaW5wdXRdKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3VwZGF0ZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiB1cGRhdGUocmFuZ2UpIHtcbiAgICAgICAgICAgICAgICB2YXIgZm9ybWF0cyA9IHJhbmdlID09IG51bGwgPyB7fSA6IHRoaXMucXVpbGwuZ2V0Rm9ybWF0KHJhbmdlKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnRyb2xzLmZvckVhY2goZnVuY3Rpb24gKHBhaXIpIHtcbiAgICAgICAgICAgICAgICAgIHZhciBfcGFpciA9IF9zbGljZWRUb0FycmF5KHBhaXIsIDIpLFxuICAgICAgICAgICAgICAgICAgICBmb3JtYXQgPSBfcGFpclswXSxcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQgPSBfcGFpclsxXTtcblxuICAgICAgICAgICAgICAgICAgaWYgKGlucHV0LnRhZ05hbWUgPT09ICdTRUxFQ1QnKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBvcHRpb24gPSB2b2lkIDA7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyYW5nZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgb3B0aW9uID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChmb3JtYXRzW2Zvcm1hdF0gPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbiA9IGlucHV0LnF1ZXJ5U2VsZWN0b3IoJ29wdGlvbltzZWxlY3RlZF0nKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICghQXJyYXkuaXNBcnJheShmb3JtYXRzW2Zvcm1hdF0pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gZm9ybWF0c1tmb3JtYXRdO1xuICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlLnJlcGxhY2UoL1xcXCIvZywgJ1xcXFxcIicpO1xuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICBvcHRpb24gPSBpbnB1dC5xdWVyeVNlbGVjdG9yKFxuICAgICAgICAgICAgICAgICAgICAgICAgJ29wdGlvblt2YWx1ZT1cIicgKyB2YWx1ZSArICdcIl0nLFxuICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbiA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5wdXQudmFsdWUgPSAnJzsgLy8gVE9ETyBtYWtlIGNvbmZpZ3VyYWJsZT9cbiAgICAgICAgICAgICAgICAgICAgICBpbnB1dC5zZWxlY3RlZEluZGV4ID0gLTE7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgb3B0aW9uLnNlbGVjdGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJhbmdlID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnB1dC5jbGFzc0xpc3QucmVtb3ZlKCdxbC1hY3RpdmUnKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5oYXNBdHRyaWJ1dGUoJ3ZhbHVlJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAvLyBib3RoIGJlaW5nIG51bGwgc2hvdWxkIG1hdGNoIChkZWZhdWx0IHZhbHVlcylcbiAgICAgICAgICAgICAgICAgICAgICAvLyAnMScgc2hvdWxkIG1hdGNoIHdpdGggMSAoaGVhZGVycylcbiAgICAgICAgICAgICAgICAgICAgICB2YXIgaXNBY3RpdmUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0c1tmb3JtYXRdID09PSBpbnB1dC5nZXRBdHRyaWJ1dGUoJ3ZhbHVlJykgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIChmb3JtYXRzW2Zvcm1hdF0gIT0gbnVsbCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXRzW2Zvcm1hdF0udG9TdHJpbmcoKSA9PT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dC5nZXRBdHRyaWJ1dGUoJ3ZhbHVlJykpIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAoZm9ybWF0c1tmb3JtYXRdID09IG51bGwgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIWlucHV0LmdldEF0dHJpYnV0ZSgndmFsdWUnKSk7XG4gICAgICAgICAgICAgICAgICAgICAgaW5wdXQuY2xhc3NMaXN0LnRvZ2dsZSgncWwtYWN0aXZlJywgaXNBY3RpdmUpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIGlucHV0LmNsYXNzTGlzdC50b2dnbGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAncWwtYWN0aXZlJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1hdHNbZm9ybWF0XSAhPSBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG5cbiAgICAgICAgICByZXR1cm4gVG9vbGJhcjtcbiAgICAgICAgfSkoX21vZHVsZTIuZGVmYXVsdCk7XG5cbiAgICAgICAgVG9vbGJhci5ERUZBVUxUUyA9IHt9O1xuXG4gICAgICAgIGZ1bmN0aW9uIGFkZEJ1dHRvbihjb250YWluZXIsIGZvcm1hdCwgdmFsdWUpIHtcbiAgICAgICAgICB2YXIgaW5wdXQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdidXR0b24nKTtcbiAgICAgICAgICBpbnB1dC5zZXRBdHRyaWJ1dGUoJ3R5cGUnLCAnYnV0dG9uJyk7XG4gICAgICAgICAgaW5wdXQuY2xhc3NMaXN0LmFkZCgncWwtJyArIGZvcm1hdCk7XG4gICAgICAgICAgaWYgKHZhbHVlICE9IG51bGwpIHtcbiAgICAgICAgICAgIGlucHV0LnZhbHVlID0gdmFsdWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChpbnB1dCk7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBhZGRDb250cm9scyhjb250YWluZXIsIGdyb3Vwcykge1xuICAgICAgICAgIGlmICghQXJyYXkuaXNBcnJheShncm91cHNbMF0pKSB7XG4gICAgICAgICAgICBncm91cHMgPSBbZ3JvdXBzXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgZ3JvdXBzLmZvckVhY2goZnVuY3Rpb24gKGNvbnRyb2xzKSB7XG4gICAgICAgICAgICB2YXIgZ3JvdXAgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzcGFuJyk7XG4gICAgICAgICAgICBncm91cC5jbGFzc0xpc3QuYWRkKCdxbC1mb3JtYXRzJyk7XG4gICAgICAgICAgICBjb250cm9scy5mb3JFYWNoKGZ1bmN0aW9uIChjb250cm9sKSB7XG4gICAgICAgICAgICAgIGlmICh0eXBlb2YgY29udHJvbCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICBhZGRCdXR0b24oZ3JvdXAsIGNvbnRyb2wpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBmb3JtYXQgPSBPYmplY3Qua2V5cyhjb250cm9sKVswXTtcbiAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSBjb250cm9sW2Zvcm1hdF07XG4gICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICBhZGRTZWxlY3QoZ3JvdXAsIGZvcm1hdCwgdmFsdWUpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBhZGRCdXR0b24oZ3JvdXAsIGZvcm1hdCwgdmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjb250YWluZXIuYXBwZW5kQ2hpbGQoZ3JvdXApO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gYWRkU2VsZWN0KGNvbnRhaW5lciwgZm9ybWF0LCB2YWx1ZXMpIHtcbiAgICAgICAgICB2YXIgaW5wdXQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzZWxlY3QnKTtcbiAgICAgICAgICBpbnB1dC5jbGFzc0xpc3QuYWRkKCdxbC0nICsgZm9ybWF0KTtcbiAgICAgICAgICB2YWx1ZXMuZm9yRWFjaChmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIHZhciBvcHRpb24gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdvcHRpb24nKTtcbiAgICAgICAgICAgIGlmICh2YWx1ZSAhPT0gZmFsc2UpIHtcbiAgICAgICAgICAgICAgb3B0aW9uLnNldEF0dHJpYnV0ZSgndmFsdWUnLCB2YWx1ZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBvcHRpb24uc2V0QXR0cmlidXRlKCdzZWxlY3RlZCcsICdzZWxlY3RlZCcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaW5wdXQuYXBwZW5kQ2hpbGQob3B0aW9uKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICBjb250YWluZXIuYXBwZW5kQ2hpbGQoaW5wdXQpO1xuICAgICAgICB9XG5cbiAgICAgICAgVG9vbGJhci5ERUZBVUxUUyA9IHtcbiAgICAgICAgICBjb250YWluZXI6IG51bGwsXG4gICAgICAgICAgaGFuZGxlcnM6IHtcbiAgICAgICAgICAgIGNsZWFuOiBmdW5jdGlvbiBjbGVhbigpIHtcbiAgICAgICAgICAgICAgdmFyIF90aGlzMyA9IHRoaXM7XG5cbiAgICAgICAgICAgICAgdmFyIHJhbmdlID0gdGhpcy5xdWlsbC5nZXRTZWxlY3Rpb24oKTtcbiAgICAgICAgICAgICAgaWYgKHJhbmdlID09IG51bGwpIHJldHVybjtcbiAgICAgICAgICAgICAgaWYgKHJhbmdlLmxlbmd0aCA9PSAwKSB7XG4gICAgICAgICAgICAgICAgdmFyIGZvcm1hdHMgPSB0aGlzLnF1aWxsLmdldEZvcm1hdCgpO1xuICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKGZvcm1hdHMpLmZvckVhY2goZnVuY3Rpb24gKG5hbWUpIHtcbiAgICAgICAgICAgICAgICAgIC8vIENsZWFuIGZ1bmN0aW9uYWxpdHkgaW4gZXhpc3RpbmcgYXBwcyBvbmx5IGNsZWFuIGlubGluZSBmb3JtYXRzXG4gICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIF9wYXJjaG1lbnQyLmRlZmF1bHQucXVlcnkoXG4gICAgICAgICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICBfcGFyY2htZW50Mi5kZWZhdWx0LlNjb3BlLklOTElORSxcbiAgICAgICAgICAgICAgICAgICAgKSAhPSBudWxsXG4gICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMzLnF1aWxsLmZvcm1hdChuYW1lLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5yZW1vdmVGb3JtYXQocmFuZ2UsIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlVTRVIpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZGlyZWN0aW9uOiBmdW5jdGlvbiBkaXJlY3Rpb24odmFsdWUpIHtcbiAgICAgICAgICAgICAgdmFyIGFsaWduID0gdGhpcy5xdWlsbC5nZXRGb3JtYXQoKVsnYWxpZ24nXTtcbiAgICAgICAgICAgICAgaWYgKHZhbHVlID09PSAncnRsJyAmJiBhbGlnbiA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5mb3JtYXQoXG4gICAgICAgICAgICAgICAgICAnYWxpZ24nLFxuICAgICAgICAgICAgICAgICAgJ3JpZ2h0JyxcbiAgICAgICAgICAgICAgICAgIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlVTRVIsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmICghdmFsdWUgJiYgYWxpZ24gPT09ICdyaWdodCcpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdCgnYWxpZ24nLCBmYWxzZSwgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUik7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgdGhpcy5xdWlsbC5mb3JtYXQoXG4gICAgICAgICAgICAgICAgJ2RpcmVjdGlvbicsXG4gICAgICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpbmRlbnQ6IGZ1bmN0aW9uIGluZGVudCh2YWx1ZSkge1xuICAgICAgICAgICAgICB2YXIgcmFuZ2UgPSB0aGlzLnF1aWxsLmdldFNlbGVjdGlvbigpO1xuICAgICAgICAgICAgICB2YXIgZm9ybWF0cyA9IHRoaXMucXVpbGwuZ2V0Rm9ybWF0KHJhbmdlKTtcbiAgICAgICAgICAgICAgdmFyIGluZGVudCA9IHBhcnNlSW50KGZvcm1hdHMuaW5kZW50IHx8IDApO1xuICAgICAgICAgICAgICBpZiAodmFsdWUgPT09ICcrMScgfHwgdmFsdWUgPT09ICctMScpIHtcbiAgICAgICAgICAgICAgICB2YXIgbW9kaWZpZXIgPSB2YWx1ZSA9PT0gJysxJyA/IDEgOiAtMTtcbiAgICAgICAgICAgICAgICBpZiAoZm9ybWF0cy5kaXJlY3Rpb24gPT09ICdydGwnKSBtb2RpZmllciAqPSAtMTtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdChcbiAgICAgICAgICAgICAgICAgICdpbmRlbnQnLFxuICAgICAgICAgICAgICAgICAgaW5kZW50ICsgbW9kaWZpZXIsXG4gICAgICAgICAgICAgICAgICBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBsaW5rOiBmdW5jdGlvbiBsaW5rKHZhbHVlKSB7XG4gICAgICAgICAgICAgIGlmICh2YWx1ZSA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gcHJvbXB0KCdFbnRlciBsaW5rIFVSTDonKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdCgnbGluaycsIHZhbHVlLCBfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBsaXN0OiBmdW5jdGlvbiBsaXN0KHZhbHVlKSB7XG4gICAgICAgICAgICAgIHZhciByYW5nZSA9IHRoaXMucXVpbGwuZ2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgICAgIHZhciBmb3JtYXRzID0gdGhpcy5xdWlsbC5nZXRGb3JtYXQocmFuZ2UpO1xuICAgICAgICAgICAgICBpZiAodmFsdWUgPT09ICdjaGVjaycpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBmb3JtYXRzWydsaXN0J10gPT09ICdjaGVja2VkJyB8fFxuICAgICAgICAgICAgICAgICAgZm9ybWF0c1snbGlzdCddID09PSAndW5jaGVja2VkJ1xuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgdGhpcy5xdWlsbC5mb3JtYXQoXG4gICAgICAgICAgICAgICAgICAgICdsaXN0JyxcbiAgICAgICAgICAgICAgICAgICAgZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlVTRVIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdChcbiAgICAgICAgICAgICAgICAgICAgJ2xpc3QnLFxuICAgICAgICAgICAgICAgICAgICAndW5jaGVja2VkJyxcbiAgICAgICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuVVNFUixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuZm9ybWF0KCdsaXN0JywgdmFsdWUsIF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlVTRVIpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIH07XG5cbiAgICAgICAgZXhwb3J0cy5kZWZhdWx0ID0gVG9vbGJhcjtcbiAgICAgICAgZXhwb3J0cy5hZGRDb250cm9scyA9IGFkZENvbnRyb2xzO1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogNTggKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMpIHtcbiAgICAgICAgbW9kdWxlLmV4cG9ydHMgPVxuICAgICAgICAgICc8c3ZnIHZpZXdib3g9XCIwIDAgMTggMThcIj4gPHBvbHlsaW5lIGNsYXNzPVwicWwtZXZlbiBxbC1zdHJva2VcIiBwb2ludHM9XCI1IDcgMyA5IDUgMTFcIj48L3BvbHlsaW5lPiA8cG9seWxpbmUgY2xhc3M9XCJxbC1ldmVuIHFsLXN0cm9rZVwiIHBvaW50cz1cIjEzIDcgMTUgOSAxMyAxMVwiPjwvcG9seWxpbmU+IDxsaW5lIGNsYXNzPXFsLXN0cm9rZSB4MT0xMCB4Mj04IHkxPTUgeTI9MTM+PC9saW5lPiA8L3N2Zz4nO1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogNTkgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9u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hDb25zdHJ1Y3Rvciwgc3RhdGljUHJvcHMpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnN0cnVjdG9yO1xuICAgICAgICAgIH07XG4gICAgICAgIH0pKCk7XG5cbiAgICAgICAgdmFyIF9nZXQgPSBmdW5jdGlvbiBnZXQob2JqZWN0LCBwcm9wZXJ0eSwgcmVjZWl2ZXIpIHtcbiAgICAgICAgICBpZiAob2JqZWN0ID09PSBudWxsKSBvYmplY3QgPSBGdW5jdGlvbi5wcm90b3R5cGU7XG4gICAgICAgICAgdmFyIGRlc2MgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKG9iamVjdCwgcHJvcGVydHkpO1xuICAgICAgICAgIGlmIChkZXNjID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnQgPSBPYmplY3QuZ2V0UHJvdG90eXBlT2Yob2JqZWN0KTtcbiAgICAgICAgICAgIGlmIChwYXJlbnQgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBnZXQocGFyZW50LCBwcm9wZXJ0eSwgcmVjZWl2ZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSBpZiAoJ3ZhbHVlJyBpbiBkZXNjKSB7XG4gICAgICAgICAgICByZXR1cm4gZGVzYy52YWx1ZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGdldHRlciA9IGRlc2MuZ2V0O1xuICAgICAgICAgICAgaWYgKGdldHRlciA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZ2V0dGVyLmNhbGwocmVjZWl2ZXIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgX3B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2xhc3MsIHN1cGVyQ2xhc3MpIHtcbiAgICAgICAgICBpZiAodHlwZW9mIHN1cGVyQ2xhc3MgIT09ICdmdW5jdGlvbicgJiYgc3VwZXJDbGFzcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgJ1N1cGVyIGV4cHJlc3Npb24gbXVzdCBlaXRoZXIgYmUgbnVsbCBvciBhIGZ1bmN0aW9uLCBub3QgJyArXG4gICAgICAgICAgICAgICAgdHlwZW9mIHN1cGVyQ2xhc3MsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBzdWJDbGFzcy5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKFxuICAgICAgICAgICAgc3VwZXJDbGFzcyAmJiBzdXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBDb2xvclBpY2tlciA9IChmdW5jdGlvbiAoX1BpY2tlcikge1xuICAgICAgICAgIF9pbmhlcml0cyhDb2xvclBpY2tlciwgX1BpY2tlcik7XG5cbiAgICAgICAgICBmdW5jdGlvbiBDb2xvclBpY2tlcihzZWxlY3QsIGxhYmVsKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgQ29sb3JQaWNrZXIpO1xuXG4gICAgICAgICAgICB2YXIgX3RoaXMgPSBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKFxuICAgICAgICAgICAgICAgIENvbG9yUGlja2VyLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQ29sb3JQaWNrZXIpXG4gICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBzZWxlY3QpLFxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgX3RoaXMubGFiZWwuaW5uZXJIVE1MID0gbGFiZWw7XG4gICAgICAgICAgICBfdGhpcy5jb250YWluZXIuY2xhc3NMaXN0LmFkZCgncWwtY29sb3ItcGlja2VyJyk7XG4gICAgICAgICAgICBbXS5zbGljZVxuICAgICAgICAgICAgICAuY2FsbChfdGhpcy5jb250YWluZXIucXVlcnlTZWxlY3RvckFsbCgnLnFsLXBpY2tlci1pdGVtJyksIDAsIDcpXG4gICAgICAgICAgICAgIC5mb3JFYWNoKGZ1bmN0aW9uIChpdGVtKSB7XG4gICAgICAgICAgICAgICAgaXRlbS5jbGFzc0xpc3QuYWRkKCdxbC1wcmltYXJ5Jyk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhDb2xvclBpY2tlciwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdidWlsZEl0ZW0nLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gYnVpbGRJdGVtKG9wdGlvbikge1xuICAgICAgICAgICAgICAgIHZhciBpdGVtID0gX2dldChcbiAgICAgICAgICAgICAgICAgIENvbG9yUGlja2VyLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKENvbG9yUGlja2VyLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAnYnVpbGRJdGVtJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIG9wdGlvbik7XG4gICAgICAgICAgICAgICAgaXRlbS5zdHlsZS5iYWNrZ3JvdW5kQ29sb3IgPSBvcHRpb24uZ2V0QXR0cmlidXRlKCd2YWx1ZScpIHx8ICcnO1xuICAgICAgICAgICAgICAgIHJldHVybiBpdGVtO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnc2VsZWN0SXRlbScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBzZWxlY3RJdGVtKGl0ZW0sIHRyaWdnZXIpIHtcbiAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgQ29sb3JQaWNrZXIucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQ29sb3JQaWNrZXIucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICdzZWxlY3RJdGVtJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIGl0ZW0sIHRyaWdnZXIpO1xuICAgICAgICAgICAgICAgIHZhciBjb2xvckxhYmVsID0gdGhpcy5sYWJlbC5xdWVyeVNlbGVjdG9yKCcucWwtY29sb3ItbGFiZWwnKTtcbiAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSBpdGVtID8gaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtdmFsdWUnKSB8fCAnJyA6ICcnO1xuICAgICAgICAgICAgICAgIGlmIChjb2xvckxhYmVsKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoY29sb3JMYWJlbC50YWdOYW1lID09PSAnbGluZScpIHtcbiAgICAgICAgICAgICAgICAgICAgY29sb3JMYWJlbC5zdHlsZS5zdHJva2UgPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbG9yTGFiZWwuc3R5bGUuZmlsbCA9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG5cbiAgICAgICAgICByZXR1cm4gQ29sb3JQaWNrZXI7XG4gICAgICAgIH0pKF9waWNrZXIyLmRlZmF1bHQpO1xuXG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IENvbG9yUGlja2VyO1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogNjAgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCAnX19lc01vZHVsZScsIHtcbiAgICAgICAgICB2YWx1ZTogdHJ1ZSxcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdmFyIF9jcmVhdGVDbGFzcyA9IChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgZnVuY3Rpb24gZGVmaW5lUHJvcGVydGllcyh0YXJnZXQsIHByb3BzKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHByb3BzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgIHZhciBkZXNjcmlwdG9yID0g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JlbnQgPSBPYmplY3QuZ2V0UHJvdG90eXBlT2Yob2JqZWN0KTtcbiAgICAgICAgICAgIGlmIChwYXJlbnQgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBnZXQocGFyZW50LCBwcm9wZXJ0eSwgcmVjZWl2ZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSBpZiAoJ3ZhbHVlJyBpbiBkZXNjKSB7XG4gICAgICAgICAgICByZXR1cm4gZGVzYy52YWx1ZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGdldHRlciA9IGRlc2MuZ2V0O1xuICAgICAgICAgICAgaWYgKGdldHRlciA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZ2V0dGVyLmNhbGwocmVjZWl2ZXIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgX3BpY2tlciA9IF9fd2VicGFja19yZXF1aXJlX18oMjgpO1xuXG4gICAgICAgIHZhciBfcGlja2VyMiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX3BpY2tlcik7XG5cbiAgICAgICAgZnVuY3Rpb24gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChvYmopIHtcbiAgICAgICAgICByZXR1cm4gb2JqICYmIG9iai5fX2VzTW9kdWxlID8gb2JqIDoge2RlZmF1bHQ6IG9ian07XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfY2xhc3NDYWxsQ2hlY2soaW5zdGFuY2UsIENvbnN0cnVjdG9yKSB7XG4gICAgICAgICAgaWYgKCEoaW5zdGFuY2UgaW5zdGFuY2VvZiBDb25zdHJ1Y3RvcikpIHtcbiAgICAgICAgICAgIHR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dXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBJY29uUGlja2VyID0gKGZ1bmN0aW9uIChfUGlja2VyKSB7XG4gICAgICAgICAgX2luaGVyaXRzKEljb25QaWNrZXIsIF9QaWNrZXIpO1xuXG4gICAgICAgICAgZnVuY3Rpb24gSWNvblBpY2tlcihzZWxlY3QsIGljb25zKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgSWNvblBpY2tlcik7XG5cbiAgICAgICAgICAgIHZhciBfdGhpcyA9IF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoSWNvblBpY2tlci5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKEljb25QaWNrZXIpKS5jYWxsKFxuICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgc2VsZWN0LFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgX3RoaXMuY29udGFpbmVyLmNsYXNzTGlzdC5hZGQoJ3FsLWljb24tcGlja2VyJyk7XG4gICAgICAgICAgICBbXS5mb3JFYWNoLmNhbGwoXG4gICAgICAgICAgICAgIF90aGlzLmNvbnRhaW5lci5xdWVyeVNlbGVjdG9yQWxsKCcucWwtcGlja2VyLWl0ZW0nKSxcbiAgICAgICAgICAgICAgZnVuY3Rpb24gKGl0ZW0pIHtcbiAgICAgICAgICAgICAgICBpdGVtLmlubmVySFRNTCA9IGljb25zW2l0ZW0uZ2V0QXR0cmlidXRlKCdkYXRhLXZhbHVlJykgfHwgJyddO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIF90aGlzLmRlZmF1bHRJdGVtID0gX3RoaXMuY29udGFpbmVyLnF1ZXJ5U2VsZWN0b3IoJy5xbC1zZWxlY3RlZCcpO1xuICAgICAgICAgICAgX3RoaXMuc2VsZWN0SXRlbShfdGhpcy5kZWZhdWx0SXRlbSk7XG4gICAgICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKEljb25QaWNrZXIsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnc2VsZWN0SXRlbScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBzZWxlY3RJdGVtKGl0ZW0sIHRyaWdnZXIpIHtcbiAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgSWNvblBpY2tlci5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihJY29uUGlja2VyLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAnc2VsZWN0SXRlbScsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBpdGVtLCB0cmlnZ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ICAgICAgdGhpcy5ib3VuZHNDb250YWluZXIgPSBib3VuZHNDb250YWluZXIgfHwgZG9jdW1lbnQuYm9keTtcbiAgICAgICAgICAgIHRoaXMucm9vdCA9IHF1aWxsLmFkZENvbnRhaW5lcigncWwtdG9vbHRpcCcpO1xuICAgICAgICAgICAgdGhpcy5yb290LmlubmVySFRNTCA9IHRoaXMuY29uc3RydWN0b3IuVEVNUExBVEU7XG4gICAgICAgICAgICBpZiAodGhpcy5xdWlsbC5yb290ID09PSB0aGlzLnF1aWxsLnNjcm9sbGluZ0NvbnRhaW5lcikge1xuICAgICAgICAgICAgICB0aGlzLnF1aWxsLnJvb3QuYWRkRXZlbnRMaXN0ZW5lcignc2Nyb2xsJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIF90aGlzLnJvb3Quc3R5bGUubWFyZ2luVG9wID1cbiAgICAgICAgICAgICAgICAgIC0xICogX3RoaXMucXVpbGwucm9vdC5zY3JvbGxUb3AgKyAncHgnO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuaGlkZSgpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhUb29sdGlwLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2hpZGUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gaGlkZSgpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnJvb3QuY2xhc3NMaXN0LmFkZCgncWwtaGlkZGVuJyk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdwb3NpdGlvbicsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBwb3NpdGlvbihyZWZlcmVuY2UpIHtcbiAgICAgICAgICAgICAgICB2YXIgbGVmdCA9XG4gICAgICAgICAgICAgICAgICByZWZlcmVuY2UubGVmdCArXG4gICAgICAgICAgICAgICAgICByZWZlcmVuY2Uud2lkdGggLyAyIC1cbiAgICAgICAgICAgICAgICAgIHRoaXMucm9vdC5vZmZzZXRXaWR0aCAvIDI7XG4gICAgICAgICAgICAgICAgLy8gcm9vdC5zY3JvbGxUb3Agc2hvdWxkIGJlIDAgaWYgc2Nyb2xsQ29udGFpbmVyICE9PSByb290XG4gICAgICAgICAgICAgICAgdmFyIHRvcCA9IHJlZmVyZW5jZS5ib3R0b20gKyB0aGlzLnF1aWxsLnJvb3Quc2Nyb2xsVG9wO1xuICAgICAgICAgICAgICAgIHRoaXMucm9vdC5zdHlsZS5sZWZ0ID0gbGVmdCArICdweCc7XG4gICAgICAgICAgICAgICAgdGhpcy5yb290LnN0eWxlLnRvcCA9IHRvcCArICdweCc7XG4gICAgICAgICAgICAgICAgdGhpcy5yb290LmNsYXNzTGlzdC5yZW1vdmUoJ3FsLWZsaXAnKTtcbiAgICAgICAgICAgICAgICB2YXIgY29udGFpbmVyQm91bmRzID1cbiAgICAgICAgICAgICAgICAgIHRoaXMuYm91bmRzQ29udGFpbmVyLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpO1xuICAgICAgICAgICAgICAgIHZhciByb290Qm91bmRzID0gdGhpcy5yb290LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpO1xuICAgICAgICAgICAgICAgIHZhciBzaGlmdCA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKHJvb3RCb3VuZHMucmlnaHQgPiBjb250YWluZXJCb3VuZHMucmlnaHQpIHtcbiAgICAgICAgICAgICAgICAgIHNoaWZ0ID0gY29udGFpbmVyQm91bmRzLnJpZ2h0IC0gcm9vdEJvdW5kcy5yaWdodDtcbiAgICAgICAgICAgICAgICAgIHRoaXMucm9vdC5zdHlsZS5sZWZ0ID0gbGVmdCArIHNoaWZ0ICsgJ3B4JztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJvb3RCb3VuZHMubGVmdCA8IGNvbnRhaW5lckJvdW5kcy5sZWZ0KSB7XG4gICAgICAgICAgICAgICAgICBzaGlmdCA9IGNvbnRhaW5lckJvdW5kcy5sZWZ0IC0gcm9vdEJvdW5kcy5sZWZ0O1xuICAgICAgICAgICAgICAgICAgdGhpcy5yb290LnN0eWxlLmxlZnQgPSBsZWZ0ICsgc2hpZnQgKyAncHgnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAocm9vdEJvdW5kcy5ib3R0b20gPiBjb250YWluZXJCb3VuZHMuYm90dG9tKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgaGVpZ2h0ID0gcm9vdEJvdW5kcy5ib3R0b20gLSByb290Qm91bmRzLnRvcDtcbiAgICAgICAgICAgICAgICAgIHZhciB2ZXJ0aWNhbFNoaWZ0ID0gcmVmZXJlbmNlLmJvdHRvbSAtIHJlZmVyZW5jZS50b3AgKyBoZWlnaHQ7XG4gICAgICAgICAgICAgICAgICB0aGlzLnJvb3Quc3R5bGUudG9wID0gdG9wIC0gdmVydGljYWxTaGlmdCArICdweCc7XG4gICAgICAgICAgICAgICAgICB0aGlzLnJvb3QuY2xhc3NMaXN0LmFkZCgncWwtZmxpcCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gc2hpZnQ7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdzaG93JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHNob3coKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5yb290LmNsYXNzTGlzdC5yZW1vdmUoJ3FsLWVkaXRpbmcnKTtcbiAgICAgICAgICAgICAgICB0aGlzLnJvb3QuY2xhc3NMaXN0LnJlbW92ZSgncWwtaGlkZGVuJyk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgcmV0dXJuIFRvb2x0aXA7XG4gICAgICAgIH0pKCk7XG5cbiAgICAgICAgZXhwb3J0cy5kZWZhdWx0ID0gVG9vbHRpcDtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDYyICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgJ19fZXNNb2R1bGUnLCB7XG4gICAgICAgICAgdmFsdWU6IHRydWUsXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHZhciBfc2xpY2VkVG9BcnJheSA9IChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgZnVuY3Rpb24gc2xpY2VJdGVyYXRvcihhcnIsIGkpIHtcbiAgICAgICAgICAgIHZhciBfYXJyID0gW107XG4gICAgICAgICAgICB2YXIgX24gPSB0cnVlO1xuICAgICAgICAgICAgdmFyIF9kID0gZmFsc2U7XG4gICAgICAgICAgICB2YXIgX2UgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICBmb3IgKFxuICAgICAgICAgICAgICAgIHZhciBfaSA9IGFycltTeW1ib2wuaXRlcmF0b3JdKCksIF9zO1xuICAgICAgICAgICAgICAgICEoX24gPSAoX3MgPSBfaS5uZXh0KCkpLmRvbmUpO1xuICAgICAgICAgICAgICAgIF9uID0gdHJ1ZVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBfYXJyLnB1c2goX3MudmFsdWUpO1xuICAgICAgICAgICAgICAgIGlmIChpICYmIF9hcnIubGVuZ3RoID09PSBpKSBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgIF9kID0gdHJ1ZTtcbiAgICAgICAgICAgICAgX2UgPSBlcnI7XG4gICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIGlmICghX24gJiYgX2lbJ3JldHVybiddKSBfaVsncmV0dXJuJ10oKTtcbiAgICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICBpZiAoX2QpIHRocm93IF9lO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gX2FycjtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChhcnIsIGkpIHtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFycikpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGFycjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoU3ltYm9sLml0ZXJhdG9yIGluIE9iamVjdChhcnIpKSB7XG4gICAgICAgICAgICAgIHJldHVybiBzbGljZUl0ZXJhdG9yKGFyciwgaSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAgICdJbnZhbGlkIGF0dGVtcHQgdG8gZGVzdHJ1Y3R1cmUgbm9uLWl0ZXJhYmxlIGluc3RhbmNlJyxcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICB9KSgpO1xuXG4gICAgICAgIHZhciBfZ2V0ID0gZnVuY3Rpb24gZ2V0KG9iamVjdCwgcHJvcGVydHksIHJlY2VpdmVyKSB7XG4gICAgICAgICAgaWYgKG9iamVjdCA9PT0gbnVsbCkgb2JqZWN0ID0gRnVuY3Rpb24ucHJvdG90eXBlO1xuICAgICAgICAgIHZhciBkZXNjID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihvYmplY3QsIHByb3BlcnR5KTtcbiAgICAgICAgICBpZiAoZGVzYyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB2YXIgcGFyZW50ID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKG9iamVjdCk7XG4gICAgICAgICAgICBpZiAocGFyZW50ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gZ2V0KHBhcmVudCwgcHJvcGVydHksIHJlY2VpdmVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKCd2YWx1ZScgaW4gZGVzYykge1xuICAgICAgICAgICAgcmV0dXJuIGRlc2MudmFsdWU7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBnZXR0ZXIgPSBkZXNjLmdldDtcbiAgICAgICAgICAgIGlmIChnZXR0ZXIgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGdldHRlci5jYWxsKHJlY2VpdmVyKTtcbiAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgdmFyIF9jcmVhdGVDbGFzcyA9IChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgZnVuY3Rpb24gZGVmaW5lUHJvcGVydGllcyh0YXJnZXQsIHByb3BzKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHByb3BzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgIHZhciBkZXNjcmlwdG9yID0gcHJvcHNbaV07XG4gICAgICAgICAgICAgIGRlc2NyaXB0b3IuZW51bWVyYWJsZSA9IGRlc2NyaXB0b3IuZW51bWVyYWJsZSB8fCBmYWxzZTtcbiAgICAgICAgICAgICAgZGVzY3JpcHRvci5jb25maWd1cmFibGUgPSB0cnVlO1xuICAgICAgICAgICAgICBpZiAoJ3ZhbHVl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bicpXG4gICAgICAgICAgICA/IGNhbGxcbiAgICAgICAgICAgIDogc2VsZjtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9pbmhlcml0cyhzdWJDbGFzcywgc3VwZXJDbGFzcykge1xuICAgICAgICAgIGlmICh0eXBlb2Ygc3VwZXJDbGFzcyAhPT0gJ2Z1bmN0aW9uJyAmJiBzdXBlckNsYXNzICE9PSBudWxsKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAnU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIFRPT0xCQVJfQ09ORklHID0gW1xuICAgICAgICAgIFt7aGVhZGVyOiBbJzEnLCAnMicsICczJywgZmFsc2VdfV0sXG4gICAgICAgICAgWydib2xkJywgJ2l0YWxpYycsICd1bmRlcmxpbmUnLCAnbGluayddLFxuICAgICAgICAgIFt7bGlzdDogJ29yZGVyZWQnfSwge2xpc3Q6ICdidWxsZXQnfV0sXG4gICAgICAgICAgWydjbGVhbiddLFxuICAgICAgICBdO1xuXG4gICAgICAgIHZhciBTbm93VGhlbWUgPSAoZnVuY3Rpb24gKF9CYXNlVGhlbWUpIHtcbiAgICAgICAgICBfaW5oZXJpdHMoU25vd1RoZW1lLCBfQmFzZVRoZW1lKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIFNub3dUaGVtZShxdWlsbCwgb3B0aW9ucykge1xuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIFNub3dUaGVtZSk7XG5cbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgb3B0aW9ucy5tb2R1bGVzLnRvb2xiYXIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICBvcHRpb25zLm1vZHVsZXMudG9vbGJhci5jb250YWluZXIgPT0gbnVsbFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIG9wdGlvbnMubW9kdWxlcy50b29sYmFyLmNvbnRhaW5lciA9IFRPT0xCQVJfQ09ORklHO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgX3RoaXMgPSBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKFNub3dUaGVtZS5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKFNub3dUaGVtZSkpLmNhbGwoXG4gICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICBxdWlsbCxcbiAgICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgX3RoaXMucXVpbGwuY29udGFpbmVyLmNsYXNzTGlzdC5hZGQoJ3FsLXNub3cnKTtcbiAgICAgICAgICAgIHJldHVybiBfdGhpcztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoU25vd1RoZW1lLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2V4dGVuZFRvb2xiYXInLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZXh0ZW5kVG9vbGJhcih0b29sYmFyKSB7XG4gICAgICAgICAgICAgICAgdG9vbGJhci5jb250YWluZXIuY2xhc3NMaXN0LmFkZCgncWwtc25vdycpO1xuICAgICAgICAgICAgICAgIHRoaXMuYnVpbGRCdXR0b25zKFxuICAgICAgICAgICAgICAgICAgW10uc2xpY2UuY2FsbCh0b29sYmFyLmNvbnRhaW5lci5xdWVyeVNlbGVjdG9yQWxsKCdidXR0b24nKSksXG4gICAgICAgICAgICAgICAgICBfaWNvbnMyLmRlZmF1bHQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB0aGlzLmJ1aWxkUGlja2VycyhcbiAgICAgICAgICAgICAgICAgIFtdLnNsaWNlLmNhbGwodG9vbGJhci5jb250YWluZXIucXVlcnlTZWxlY3RvckFsbCgnc2VsZWN0JykpLFxuICAgICAgICAgICAgICAgICAgX2ljb25zMi5kZWZhdWx0LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgdGhpcy50b29sdGlwID0gbmV3IFNub3dUb29sdGlwKHRoaXMucXVpbGwsIHRoaXMub3B0aW9ucy5ib3VuZHMpO1xuICAgICAgICAgICAgICAgIGlmICh0b29sYmFyLmNvbnRhaW5lci5xdWVyeVNlbGVjdG9yKCcucWwtbGluaycpKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmtleWJvYXJkLmFkZEJpbmRpbmcoXG4gICAgICAgICAgICAgICAgICAgIHtrZXk6ICdLJywgc2hvcnRLZXk6IHRydWV9LFxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAocmFuZ2UsIGNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICB0b29sYmFyLmhhbmRsZXJzWydsaW5rJ10uY2FsbChcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvb2xiYXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAhY29udGV4dC5mb3JtYXQubGluayxcbiAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgcmV0dXJuIFNub3dUaGVtZTtcbiAgICAgICAgfSkoX2Jhc2UyLmRlZmF1bHQpO1xuXG4gICAgICAgIFNub3dUaGVtZS5ERUZBVUxUUyA9ICgwLCBfZXh0ZW5kMi5kZWZhdWx0KShcbiAgICAgICAgICB0cnVlLFxuICAgICAgICAgIHt9LFxuICAgICAgICAgIF9iYXNlMi5kZWZhdWx0LkRFRkFVTFRTLFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1vZHVsZXM6IHtcbiAgICAgICAgICAgICAgdG9vbGJhcjoge1xuICAgICAgICAgICAgICAgIGhhbmRsZXJzOiB7XG4gICAgICAgICAgICAgICAgICBsaW5rOiBmdW5jdGlvbiBsaW5rKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgIHZhciByYW5nZSA9IHRoaXMucXVpbGwuZ2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKHJhbmdlID09IG51bGwgfHwgcmFuZ2UubGVuZ3RoID09IDApIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICB2YXIgcHJldmlldyA9IHRoaXMucXVpbGwuZ2V0VGV4dChyYW5nZSk7XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgL15cXFMrQFxcUytcXC5cXFMrJC8udGVzdChwcmV2aWV3KSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlldy5pbmRleE9mKCdtYWlsdG86JykgIT09IDBcbiAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpZXcgPSAnbWFpbHRvOicgKyBwcmV2aWV3O1xuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB2YXIgdG9vbHRpcCA9IHRoaXMucXVpbGwudGhlbWUudG9vbHRpcDtcbiAgICAgICAgICAgICAgICAgICAgICB0b29sdGlwLmVkaXQoJ2xpbmsnLCBwcmV2aWV3KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmZvcm1hdCgnbGluaycsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICApO1xuXG4gICAgICAgIHZhciBTbm93VG9vbHRpcCA9IChmdW5jdGlvbiAoX0Jhc2VUb29sdGlwKSB7XG4gICAgICAgICAgX2luaGVyaXRzKFNub3dUb29sdGlwLCBfQmFzZVRvb2x0aXApO1xuXG4gICAgICAgICAgZnVuY3Rpb24gU25vd1Rvb2x0aXAocXVpbGwsIGJvdW5kcykge1xuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIFNub3dUb29sdGlwKTtcblxuICAgICAgICAgICAgdmFyIF90aGlzMiA9IF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoXG4gICAgICAgICAgICAgICAgU25vd1Rvb2x0aXAuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihTbm93VG9vbHRpcClcbiAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIHF1aWxsLCBib3VuZHMpLFxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgX3RoaXMyLnByZXZpZXcgPSBfdGhpczIucm9vdC5xdWVyeVNlbGVjdG9yKCdhLnFsLXByZXZpZXcnKTtcbiAgICAgICAgICAgIHJldHVybiBfdGhpczI7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKFNub3dUb29sdGlwLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2xpc3RlbicsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBsaXN0ZW4oKSB7XG4gICAgICAgICAgICAgICAgdmFyIF90aGlzMyA9IHRoaXM7XG5cbiAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgU25vd1Rvb2x0aXAucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoU25vd1Rvb2x0aXAucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICdsaXN0ZW4nLFxuICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICApLmNhbGwodGhpcyk7XG4gICAgICAgICAgICAgICAgdGhpcy5yb290XG4gICAgICAgICAgICAgICAgICAucXVlcnlTZWxlY3RvcignYS5xbC1hY3Rpb24nKVxuICAgICAgICAgICAgICAgICAgLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChfdGhpczMucm9vdC5jbGFzc0xpc3QuY29udGFpbnMoJ3FsLWVkaXRpbmcnKSkge1xuICAgICAgICAgICAgICAgICAgICAgIF90aGlzMy5zYXZlKCk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgX3RoaXMzLmVkaXQoJ2xpbmsnLCBfdGhpczMucHJldmlldy50ZXh0Q29udGVudCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHRoaXMucm9vdFxuICAgICAgICAgICAgICAgICAgLnF1ZXJ5U2VsZWN0b3IoJ2EucWwtcmVtb3ZlJylcbiAgICAgICAgICAgICAgICAgIC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoX3RoaXMzLmxpbmtSYW5nZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIHJhbmdlID0gX3RoaXMzLmxpbmtSYW5nZTtcbiAgICAgICAgICAgICAgICAgICAgICBfdGhpczMucmVzdG9yZUZvY3VzKCk7XG4gICAgICAgICAgICAgICAgICAgICAgX3RoaXMzLnF1aWxsLmZvcm1hdFRleHQoXG4gICAgICAgICAgICAgICAgICAgICAgICByYW5nZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICdsaW5rJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgX2VtaXR0ZXIyLmRlZmF1bHQuc291cmNlcy5VU0VSLFxuICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIF90aGlzMy5saW5rUmFuZ2U7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMzLmhpZGUoKTtcbiAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwub24oXG4gICAgICAgICAgICAgICAgICBfZW1pdHRlcjIuZGVmYXVsdC5ldmVudHMuU0VMRUNUSU9OX0NIQU5HRSxcbiAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChyYW5nZSwgb2xkUmFuZ2UsIHNvdXJjZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmFuZ2UgPT0gbnVsbCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgcmFuZ2UubGVuZ3RoID09PSAwICYmXG4gICAgICAgICAgICAgICAgICAgICAgc291cmNlID09PSBfZW1pdHRlcjIuZGVmYXVsdC5zb3VyY2VzLlVTRVJcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIF9xdWlsbCRzY3JvbGwkZGVzY2VuZCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzMy5xdWlsbC5zY3JvbGwuZGVzY2VuZGFudChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfbGluazIuZGVmYXVsdCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByYW5nZS5pbmRleCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9xdWlsbCRzY3JvbGwkZGVzY2VuZDIgPSBfc2xpY2VkVG9BcnJheShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX3F1aWxsJHNjcm9sbCRkZXNjZW5kLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAyLFxuICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsgPSBfcXVpbGwkc2Nyb2xsJGRlc2NlbmQyWzBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgb2Zmc2V0ID0gX3F1aWxsJHNjcm9sbCRkZXNjZW5kMlsxXTtcblxuICAgICAgICAgICAgICAgICAgICAgIGlmIChsaW5rICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzMy5saW5rUmFuZ2UgPSBuZXcgX3NlbGVjdGlvbi5SYW5nZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2UuaW5kZXggLSBvZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsubGVuZ3RoKCksXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHByZXZpZXcgPSBfbGluazIuZGVmYXVsdC5mb3JtYXRzKGxpbmsuZG9tTm9kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpczMucHJldmlldy50ZXh0Q29udGVudCA9IHByZXZpZXc7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpczMucHJldmlldy5zZXRBdHRyaWJ1dGUoJ2hyZWYnLCBwcmV2aWV3KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzMy5zaG93KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpczMucG9zaXRpb24oXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzMy5xdWlsbC5nZXRCb3VuZHMoX3RoaXMzLmxpbmtSYW5nZSksXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgX3RoaXMzLmxpbmtSYW5nZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBfdGhpczMuaGlkZSgpO1xuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnc2hvdycsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBzaG93KCkge1xuICAgICAgICAgICAgICAgIF9nZXQoXG4gICAgICAgICAgICAgICAgICBTbm93VG9vbHRpcC5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihTbm93VG9vbHRpcC5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgJ3Nob3cnLFxuICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICApLmNhbGwodGhpcyk7XG4gICAgICAgICAgICAgICAgdGhpcy5yb290LnJlbW92ZUF0dHJpYnV0ZSgnZGF0YS1tb2RlJyk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgcmV0dXJuIFNub3dUb29sdGlwO1xuICAgICAgICB9KShfYmFzZS5CYXNlVG9vbHRpcCk7XG5cbiAgICAgICAgU25vd1Rvb2x0aXAuVEVNUExBVEUgPSBbXG4gICAgICAgICAgJzxhIGNsYXNzPVwicWwtcHJldmlld1wiIHRhcmdldD1cIl9ibGFua1wiIGhyZWY9XCJhYm91dDpibGFua1wiPjwvYT4nLFxuICAgICAgICAgICc8aW5wdXQgdHlwZT1cInRleHRcIiBkYXRhLWZvcm11bGE9XCJlPW1jXjJcIiBkYXRhLWxpbms9XCJodHRwczovL3F1aWxsanMuY29tXCIgZGF0YS12aWRlbz1cIkVtYmVkIFVSTFwiPicsXG4gICAgICAgICAgJzxhIGNsYXNzPVwicWwtYWN0aW9uXCI+PC9hPicsXG4gICAgICAgICAgJzxhIGNsYXNzPVwicWwtcmVtb3ZlXCI+PC9hPicsX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1ZSxcbiAgICAgICAgKTtcblxuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBfY29yZTIuZGVmYXVsdDtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDY0ICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgJ19fZXNNb2R1bGUnLCB7XG4gICAgICAgICAgdmFsdWU6IHRydWUsXG4gICAgICAgIH0pO1xuICAgICAgICBleHBvcnRzLkluZGVudENsYXNzID0gdW5kZWZpbmVkO1xuXG4gICAgICAgIHZhciBfY3JlYXRlQ2xhc3MgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXModGFyZ2V0LCBwcm9wcykge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwcm9wcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICB2YXIgZGVzY3JpcHRvciA9IHByb3BzW2ldO1xuICAgICAgICAgICAgICBkZXNjcmlwdG9yLmVudW1lcmFibGUgPSBkZXNjcmlwdG9yLmVudW1lcmFibGUgfHwgZmFsc2U7XG4gICAgICAgICAgICAgIGRlc2NyaXB0b3IuY29uZmlndXJhYmxlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgaWYgKCd2YWx1ZScgaW4gZGVzY3JpcHRvcikgZGVzY3JpcHRvci53cml0YWJsZSA9IHRydWU7XG4gICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0YXJnZXQsIGRlc2NyaXB0b3Iua2V5LCBkZXNjcmlwdG9yKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChDb25zdHJ1Y3RvciwgcHJvdG9Qcm9wcywgc3RhdGljUHJvcHMpIHtcbiAgICAgICAgICAgIGlmIChwcm90b1Byb3BzKSBkZWZpbmVQcm9wZXJ0aWVzKENvbnN0cnVjdG9yLnByb3RvdHlwZSwgcHJvdG9Qcm9wcyk7XG4gICAgICAgICAgICBpZiAoc3RhdGljUHJvcHMpIGRlZmluZVByb3BlcnRpZXMoQ29uc3RydWN0b3IsIHN0YXRpY1Byb3BzKTtcbiAgICAgICAgICAgIHJldHVybiBDb25zdHJ1Y3RvcjtcbiAgICAgICAgICB9O1xuICAgICAgICB9KSgpO1xuXG4gICAgICAgIHZhciBfZ2V0ID0gZnVuY3Rpb24gZ2V0KG9iamVjdCwgcHJvcGVydHksIHJlY2VpdmVyKSB7XG4gICAgICAgICAgaWYgKG9iamVjdCA9PT0gbnVsbCkgb2JqZWN0ID0gRnVuY3Rpb24ucHJvdG90eXBlO1xuICAgICAgICAgIHZhciBkZXNjID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihvYmplY3QsIHByb3BlcnR5KTtcbiAgICAgICAgICBpZiAoZGVzYyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB2YXIgcGFyZW50ID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKG9iamVjdCk7XG4gICAgICAgICAgICBpZiAocGFyZW50ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gZ2V0KHBhcmVudCwgcHJvcGVydHksIHJlY2VpdmVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKCd2YWx1ZScgaW4gZGVzYykge1xuICAgICAgICAgICAgcmV0dXJuIGRlc2MudmFsdWU7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBnZXR0ZXIgPSBkZXNjLmdldDtcbiAgICAgICAgICAgI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JldHVybiBjYWxsICYmXG4gICAgICAgICAgICAodHlwZW9mIGNhbGwgPT09ICdvYmplY3QnIHx8IHR5cGVvZiBjYWxsID09PSAnZnVuY3Rpb24nKVxuICAgICAgICAgICAgPyBjYWxsXG4gICAgICAgICAgICA6IHNlbGY7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfaW5oZXJpdHMoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpIHtcbiAgICAgICAgICBpZiAodHlwZW9mIHN1cGVyQ2xhc3MgIT09ICdmdW5jdGlvbicgJiYgc3VwZXJDbGFzcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgJ1N1cGVyIGV4cHJlc3Npb24gbXVzdCBlaXRoZXIgYmUgbnVsbCBvciBhIGZ1bmN0aW9uLCBub3QgJyArXG4gICAgICAgICAgICAgICAgdHlwZW9mIHN1cGVyQ2xhc3MsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBzdWJDbGFzcy5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKFxuICAgICAgICAgICAgc3VwZXJDbGFzcyAmJiBzdXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBJZGVudEF0dHJpYnV0b3IgPSAoZnVuY3Rpb24gKF9QYXJjaG1lbnQkQXR0cmlidXRvcikge1xuICAgICAgICAgIF9pbmhlcml0cyhJZGVudEF0dHJpYnV0b3IsIF9QYXJjaG1lbnQkQXR0cmlidXRvcik7XG5cbiAgICAgICAgICBmdW5jdGlvbiBJZGVudEF0dHJpYnV0b3IoKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgSWRlbnRBdHRyaWJ1dG9yKTtcblxuICAgICAgICAgICAgcmV0dXJuIF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoXG4gICAgICAgICAgICAgICAgSWRlbnRBdHRyaWJ1dG9yLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihJZGVudEF0dHJpYnV0b3IpXG4gICAgICAgICAgICAgICkuYXBwbHkodGhpcywgYXJndW1lbnRzKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKElkZW50QXR0cmlidXRvciwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdhZGQnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gYWRkKG5vZGUsIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlID09PSAnKzEnIHx8IHZhbHVlID09PSAnLTEnKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgaW5kZW50ID0gdGhpcy52YWx1ZShub2RlKSB8fCAwO1xuICAgICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZSA9PT0gJysxJyA/IGluZGVudCArIDEgOiBpbmRlbnQgLSAxO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodmFsdWUgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlKG5vZGUpO1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBfZ2V0KFxuICAgICAgICAgICAgICAgICAgICBJZGVudEF0dHJpYnV0b3IucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihJZGVudEF0dHJpYnV0b3IucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICAgJ2FkZCcsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgbm9kZSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2NhbkFkZCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBjYW5BZGQobm9kZSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgICAgSWRlbnRBdHRyaWJ1dG9yLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoSWRlbnRBdHRyaWJ1dG9yLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgICdjYW5BZGQnLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIG5vZGUsIHZhbHVlKSB8fFxuICAgICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgICAgSWRlbnRBdHRyaWJ1dG9yLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoSWRlbnRBdHRyaWJ1dG9yLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgICdjYW5BZGQnLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIG5vZGUsIHBhcnNlSW50KHZhbHVlKSlcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAndmFsdWUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gdmFsdWUobm9kZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICBwYXJzZUludChcbiAgICAgICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgICAgICBJZGVudEF0dHJpYnV0b3IucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKElkZW50QXR0cmlidXRvci5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgICAgICd2YWx1ZScsXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIG5vZGUpLFxuICAgICAgICAgICAgICAgICAgKSB8fCB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICApOyAvLyBEb24ndCByZXR1cm4gTmFOXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgcmV0dXJuIElkZW50QXR0cmlidXRvcjtc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IENvbnN0cnVjdG9yKSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQ2Fubm90IGNhbGwgYSBjbGFzcyBhcyBhIGZ1bmN0aW9uJyk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oc2VsZiwgY2FsbCkge1xuICAgICAgICAgIGlmICghc2VsZikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFJlZmVyZW5jZUVycm9yKFxuICAgICAgICAgICAgICBcInRoaXMgaGFzbid0IGJlZW4gaW5pdGlhbGlzZWQgLSBzdXBlcigpIGhhc24ndCBiZWVuIGNhbGxlZFwiLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGNhbGwgJiZcbiAgICAgICAgICAgICh0eXBlb2YgY2FsbCA9PT0gJ29iamVjdCcgfHwgdHlwZW9mIGNhbGwgPT09ICdmdW5jdGlvbicpXG4gICAgICAgICAgICA/IGNhbGxcbiAgICAgICAgICAgIDogc2VsZjtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9pbmhlcml0cyhzdWJDbGFzcywgc3VwZXJDbGFzcykge1xuICAgICAgICAgIGlmICh0eXBlb2Ygc3VwZXJDbGFzcyAhPT0gJ2Z1bmN0aW9uJyAmJiBzdXBlckNsYXNzICE9PSBudWxsKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAnU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIEJsb2NrcXVvdGUgPSAoZnVuY3Rpb24gKF9CbG9jaykge1xuICAgICAgICAgIF9pbmhlcml0cyhCbG9ja3F1b3RlLCBfQmxvY2spO1xuXG4gICAgICAgICAgZnVuY3Rpb24gQmxvY2txdW90ZSgpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBCbG9ja3F1b3RlKTtcblxuICAgICAgICAgICAgcmV0dXJuIF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoQmxvY2txdW90ZS5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKEJsb2NrcXVvdGUpKS5hcHBseShcbiAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgIGFyZ3VtZW50cyxcbiAgICAgICAgICAgICA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ZnVuY3Rpb24gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oc2VsZiwgY2FsbCkge1xuICAgICAgICAgIGlmICghc2VsZikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFJlZmVyZW5jZUVycm9yKFxuICAgICAgICAgICAgICBcInRoaXMgaGFzbid0IGJlZW4gaW5pdGlhbGlzZWQgLSBzdXBlcigpIGhhc24ndCBiZWVuIGNhbGxlZFwiLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGNhbGwgJiZcbiAgICAgICAgICAgICh0eXBlb2YgY2FsbCA9PT0gJ29iamVjdCcgfHwgdHlwZW9mIGNhbGwgPT09ICdmdW5jdGlvbicpXG4gICAgICAgICAgICA/IGNhbGxcbiAgICAgICAgICAgIDogc2VsZjtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9pbmhlcml0cyhzdWJDbGFzcywgc3VwZXJDbGFzcykge1xuICAgICAgICAgIGlmICh0eXBlb2Ygc3VwZXJDbGFzcyAhPT0gJ2Z1bmN0aW9uJyAmJiBzdXBlckNsYXNzICE9PSBudWxsKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAnU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIEhlYWRlciA9IChmdW5jdGlvbiAoX0Jsb2NrKSB7XG4gICAgICAgICAgX2luaGVyaXRzKEhlYWRlciwgX0Jsb2NrKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIEhlYWRlcigpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBIZWFkZXIpO1xuXG4gICAgICAgICAgICByZXR1cm4gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oXG4gICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgIChIZWFkZXIuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihIZWFkZXIpKS5hcHBseShcbiAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgIGFyZ3VtZW50cyxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKEhlYWRlciwgbnVsbCwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdmb3JtYXRzJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIG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AgICAgICAgaWYgKHBhcmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGdldChwYXJlbnQsIHByb3BlcnR5LCByZWNlaXZlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmICgndmFsdWUnIGluIGRlc2MpIHtcbiAgICAgICAgICAgIHJldHVybiBkZXNjLnZhbHVlO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZ2V0dGVyID0gZGVzYy5nZXQ7XG4gICAgICAgICAgICBpZiAoZ2V0dGVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBnZXR0ZXIuY2FsbChyZWNlaXZlcik7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHZhciBfcGFyY2htZW50ID0gX193ZWJwYWNrX3JlcXVpcmVfXygwKTtcblxuICAgICAgICB2YXIgX3BhcmNobWVudDIgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KF9wYXJjaG1lbnQpO1xuXG4gICAgICAgIHZhciBfYmxvY2sgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDQpO1xuXG4gICAgICAgIHZhciBfYmxvY2syID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfYmxvY2spO1xuXG4gICAgICAgIHZhciBfY29udGFpbmVyID0gX193ZWJwYWNrX3JlcXVpcmVfXygyNSk7XG5cbiAgICAgICAgdmFyIF9jb250YWluZXIyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfY29udGFpbmVyKTtcblxuICAgICAgICBmdW5jdGlvbiBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KG9iaikge1xuICAgICAgICAgIHJldHVybiBvYmogJiYgb2JqLl9fZXNNb2R1bGUgPyBvYmogOiB7ZGVmYXVsdDogb2JqfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIF9kZWZpbmVQcm9wZXJ0eShvYmosIGtleSwgdmFsdWUpIHtcbiAgICAgICAgICBpZiAoa2V5IGluIG9iaikge1xuICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KG9iaiwga2V5LCB7XG4gICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZSxcbiAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBvYmpba2V5XSA9IHZhbHVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2NsYXNzQ2FsbENoZWNrKGluc3RhbmNlLCBDb25zdHJ1Y3Rvcikge1xuICAgICAgICAgIGlmICghKGluc3RhbmNlIGluc3RhbmNlb2YgQ29uc3RydWN0b3IpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24nKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihzZWxmLCBjYWxsKSB7XG4gICAgICAgICAgaWYgKCFzZWxmKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgUmVmZXJlbmNlRXJyb3IoXG4gICAgICAgICAgICAgIFwidGhpcyBoYXNuJ3QgYmVlbiBpbml0aWFsaXNlZCAtIHN1cGVyKCkgaGFzbid0IGJlZW4gY2FsbGVkXCIsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gY2FsbCAmJlxuICAgICAgICAgICAgKHR5cGVvZiBjYWxsID09PSAnb2JqZWN0JyB8fCB0eXBlb2YgY2FsbCA9PT0gJ2Z1bmN0aW9uJylcbiAgICAgICAgICAgID8gY2FsbFxuICAgICAgICAgICAgOiBzZWxmO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2luaGVyaXRzKHN1YkNsYXNzLCBzdXBlckNsYXNzKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZiBzdXBlckNsYXNzICE9PSAnZnVuY3Rpb24nICYmIHN1cGVyQ2xhc3MgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICdTdXBlciBleHByZXNzaW9uIG11c3QgZWl0aGVyIGJlIG51bGwgb3IgYSBmdW5jdGlvbiwgbm90ICcgK1xuICAgICAgICAgICAgICAgIHR5cGVvZiBzdXBlckNsYXNzLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgc3ViQ2xhc3MucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShcbiAgICAgICAgICAgIHN1cGVyQ2xhc3MgJiYgc3VwZXJDbGFzcy5wcm90b3R5cGUsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGNvbnN0cnVjdG9yOiB7XG4gICAgICAgICAgICAgICAgdmFsdWU6IHN1YkNsYXNzLFxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgKTtcbiAgICAgICAgICBpZiAoc3VwZXJDbGFzcylcbiAgICAgICAgICAgIE9iamVjdC5zZXRQcm90b3R5cGVPZlxuICAgICAgICAgICAgICA/IE9iamVjdC5zZXRQcm90b3R5cGVPZihzdWJDbGFzcywgc3VwZXJDbGFzcylcbiAgICAgICAgICAgICAgOiAoc3ViQ2xhc3MuX19wcm90b19fID0gc3VwZXJDbGFzcyk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgTGlzdEl0ZW0gPSAoZnVuY3Rpb24gKF9CbG9jaykge1xuICAgICAgICAgIF9pbmhlcml0cyhMaXN0SXRlbSwgX0Jsb2NrKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIExpc3RJdGVtKCkge1xuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIExpc3RJdGVtKTtcblxuICAgICAgICAgICAgcmV0dXJuIF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoTGlzdEl0ZW0uX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihMaXN0SXRlbSkpLmFwcGx5KFxuICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgYXJndW1lbnRzLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoXG4gICAgICAgICAgICBMaXN0SXRlbSxcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGtleTogJ2Zvcm1hdCcsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGZvcm1hdChuYW1lLCB2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgaWYgKG5hbWUgPT09IExpc3QuYmxvdE5hbWUgJiYgIXZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVwbGFjZVdpdGgoXG4gICAgICAgICAgICAgICAgICAgICAgX3BhcmNobWVudDIuZGVmYXVsdC5jcmVhdGUodGhpcy5zdGF0aWNzLnNjb3BlKSxcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIF9nZXQoXG4gICAgICAgICAgICAgICAgICAgICAgTGlzdEl0ZW0ucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKExpc3RJdGVtLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgICAgJ2Zvcm1hdCcsXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIG5hbWUsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAncmVtb3ZlJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcmVtb3ZlKCkge1xuICAgICAgICAgICAgICAgICAgaWYgKHRoaXMucHJldiA9PSBudWxsICYmIHRoaXMubmV4dCA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50LnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgICAgICBMaXN0SXRlbS5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoTGlzdEl0ZW0ucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICAgICAncmVtb3ZlJyxcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgICApLmNhbGwodGhpcyk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGtleTogJ3JlcGxhY2VXaXRoJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcmVwbGFjZVdpdGgobmFtZSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50Lmlzb2xhdGUodGhpcy5vZmZzZXQodGhpcy5wYXJlbnQpLCB0aGlzLmxlbmd0aCgpKTtcbiAgICAgICAgICAgICAgICAgIGlmIChuYW1lID09PSB0aGlzLnBhcmVudC5zdGF0aWNzLmJsb3ROYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50LnJlcGxhY2VXaXRoKG5hbWUsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBhcmVudC51bndyYXAoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9nZXQoXG4gICAgICAgICAgICAgICAgICAgICAgTGlzdEl0ZW0ucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKExpc3RJdGVtLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgICAgJ3JlcGxhY2VXaXRoJyxcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgbmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAnZm9ybWF0cycsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGZvcm1hdHMoZG9tTm9kZSkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIGRvbU5vZGUudGFnTmFtZSA9PT0gdGhpcy50YWdOYW1lXG4gICAgICAgICAgICAgICAgICAgID8gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgIDogX2dldChcbiAgICAgICAgICAgICAgICAgICAgICAgIExpc3RJdGVtLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoTGlzdEl0ZW0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2Zvcm1hdHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgZG9tTm9kZSk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIHJldHVybiBMaXN0SXRlbTtcbiAgICAgICAgfSkoX2Jsb2NrMi5kZWZhdWx0KTtcblxuICAgICAgICBMaXN0SXRlbS5ibG90TmFtZSA9ICdsaXN0LWl0ZW0nO1xuICAgICAgICBMaXN0SXRlbS50YWdOYW1lID0gJ0xJJztcblxuICAgICAgICB2YXIgTGlzdCA9IChmdW5jdGlvbiAoX0NvbnRhaW5lcikge1xuICAgICAgICAgIF9pbmhlcml0cyhMaXN0LCBfQ29udGFpbmVyKTtcblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhMaXN0LCBudWxsLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2NyZWF0ZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBjcmVhdGUodmFsdWUpIHtcbiAgICAgICAgICAgICAgICB2YXIgdGFnTmFtZSA9IHZhbHVlID09PSAnb3JkZXJlZCcgPyAnT0wnIDogJ1VMJztcbiAgICAgICAgICAgICAgICB2YXIgbm9kZSA9IF9nZXQoXG4gICAgICAgICAgICAgICAgICBMaXN0Ll9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoTGlzdCksXG4gICAgICAgICAgICAgICAgICAnY3JlYXRlJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIHRhZ05hbWUpO1xuICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA9PT0gJ2NoZWNrZWQnIHx8IHZhbHVlID09PSAndW5jaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgbm9kZS5zZXRBdHRyaWJ1dGUoJ2RhdGEtY2hlY2tlZCcsIHZhbHVlID09PSAnY2hlY2tlZCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2Zvcm1hdHMnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9ybWF0cyhkb21Ob2RlKSB7XG4gICAgICAgICAgICAgICAgaWYgKGRvbU5vZGUudGFnTmFtZSA9PT0gJ09MJykgcmV0dXJuICdvcmRlcmVkJztcbiAgICAgICAgICAgICAgICBpZiAoZG9tTm9kZS50YWdOYW1lID09PSAnVUwnKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoZG9tTm9kZS5oYXNBdHRyaWJ1dGUoJ2RhdGEtY2hlY2tlZCcpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBkb21Ob2RlLmdldEF0dHJpYnV0ZSgnZGF0YS1jaGVja2VkJykgPT09ICd0cnVlJ1xuICAgICAgICAgICAgICAgICAgICAgID8gJ2NoZWNrZWQnXG4gICAgICAgICAgICAgICAgICAgICAgOiAndW5jaGVja2VkJztcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnYnVsbGV0JztcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG5cbiAgICAgICAgICBmdW5jdGlvbiBMaXN0KGRvbU5vZGUpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBMaXN0KTtcblxuICAgICAgICAgICAgdmFyIF90aGlzMiA9IF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoTGlzdC5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKExpc3QpKS5jYWxsKFxuICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgZG9tTm9kZSxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgIHZhciBsaXN0RXZlbnRIYW5kbGVyID0gZnVuY3Rpb24gbGlzdEV2ZW50SGFuZGxlcihlKSB7XG4gICAgICAgICAgICAgIGlmIChlLnRhcmdldC5wYXJlbnROb2RlICE9PSBkb21Ob2RlKSByZXR1cm47XG4gICAgICAgICAgICAgIHZhciBmb3JtYXQgPSBfdGhpczIuc3RhdGljcy5mb3JtYXRzKGRvbU5vZGUpO1xuICAgICAgICAgICAgICB2YXIgYmxvdCA9IF9wYXJjaG1lbnQyLmRlZmF1bHQuZmluZChlLnRhcmdldCk7XG4gICAgICAgICAgICAgIGlmIChmb3JtYXQgPT09ICdjaGVja2VkJykge1xuICAgICAgICAgICAgICAgIGJsb3QuZm9ybWF0KCdsaXN0JywgJ3VuY2hlY2tlZCcpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKGZvcm1hdCA9PT0gJ3VuY2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICBibG90LmZvcm1hdCgnbGlzdCcsICdjaGVja2VkJyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGRvbU5vZGUuYWRkRXZlbnRMaXN0ZW5lcigndG91Y2hzdGFydCcsIGxpc3RFdmVudEhhbmRsZXIpO1xuICAgICAgICAgICAgZG9tTm9kZS5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWRvd24nLCBsaXN0RXZlbnRIYW5kbGVyKTtcbiAgICAgICAgICAgIHJldHVybiBfdGhpczI7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKExpc3QsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnZm9ybWF0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGZvcm1hdChuYW1lLCB2YWx1ZSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmNoaWxkcmVuLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgIHRoaXMuY2hpbGRyZW4udGFpbC5mb3JtYXQobmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2Zvcm1hdHMnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9ybWF0cygpIHtcbiAgICAgICAgICAgICAgICAvLyBXZSBkb24ndCBpbmhlcml0IGZyb20gRm9ybWF0QmxvdFxuICAgICAgICAgICAgICAgIHJldHVybiBfZGVmaW5lUHJvcGVydHkoXG4gICAgICAgICAgICAgICAgICB7fSxcbiAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdGljcy5ibG90TmFtZSxcbiAgICAgICAgICAgICAgICAgIHRoaXMuc3RhdGljcy5mb3JtYXRzKHRoaXMuZG9tTm9kZSksXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2luc2VydEJlZm9yZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBpbnNlcnRCZWZvcmUoYmxvdCwgcmVmKSB7XG4gICAgICAgICAgICAgICAgaWYgKGJsb3QgaW5zdGFuY2VvZiBMaXN0SXRlbSkge1xuICAgICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgICAgTGlzdC5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKExpc3QucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICAgJ2luc2VydEJlZm9yZScsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgYmxvdCwgcmVmKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gcmVmID09IG51bGwgPyB0aGlzLmxlbmd0aCgpIDogcmVmLm9mZnNldCh0aGlzKTtcbiAgICAgICAgICAgICAgICAgIHZhciBhZnRlciA9IHRoaXMuc3BsaXQoaW5kZXgpO1xuICAgICAgICAgICAgICAgICAgYWZ0ZXIucGFyZW50Lmluc2VydEJlZm9yZShibG90LCBhZnRlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnb3B0aW1pemUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gb3B0aW1pemUoY29udGV4dCkge1xuICAgICAgICAgICAgICAgIF9nZXQoXG4gICAgICAgICAgICAgICAgICBMaXN0LnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKExpc3QucHJvdG90eXBlKSxcbiAgICAgICAgICAgICAgICAgICdvcHRpbWl6ZScsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBjb250ZXh0KTtcbiAgICAgICAgICAgICAgICB2YXIgbmV4dCA9IHRoaXMubmV4dDtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBuZXh0ICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICAgIG5leHQucHJldiA9PT0gdGhpcyAmJlxuICAgICAgICAgICAgICAgICAgbmV4dC5zdGF0aWNzLmJsb3ROYW1lID09PSB0aGlzLnN0YXRpY3MuYmxvdE5hbWUgJiZcbiAgICAgICAgICAgICAgICAgIG5leHQuZG9tTm9kZS50YWdOYW1lID09PSB0aGlzLmRvbU5vZGUudGFnTmFtZSAmJlxuICAgICAgICAgICAgICAgICAgbmV4dC5kb21Ob2RlLmdldEF0dHJpYnV0ZSgnZGF0YS1jaGVja2VkJykgPT09XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZG9tTm9kZS5nZXRBdHRyaWJ1dGUoJ2RhdGEtY2hlY2tlZCcpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBuZXh0Lm1vdmVDaGlsZHJlbih0aGlzKTtcbiAgICAgICAgICAgICAgICAgIG5leHQucmVtb3ZlKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAncmVwbGFjZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiByZXBsYWNlKHRhcmdldCkge1xuICAgICAgICAgICAgICAgIGlmICh0YXJnZXQuc3RhdGljcy5ibG90TmFtZSAhPT0gdGhpcy5zdGF0aWNzLmJsb3ROYW1lKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgaXRlbSA9IF9wYXJjaG1lbnQyLmRlZmF1bHQuY3JlYXRlKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXRpY3MuZGVmYXVsdENoaWxkLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIHRhcmdldC5tb3ZlQ2hpbGRyZW4oaXRlbSk7XG4gICAgICAgICAgICAgICAgICB0aGlzLmFwcGVuZENoaWxkKGl0ZW0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgTGlzdC5wcm90b3R5cGUuX19wcm90b19fIHx8XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihMaXN0LnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAncmVwbGFjZScsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCB0YXJnZXQpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIHJldHVybiBMaXN0O1xuICAgICAgICB9KShfY29udGFpbmVyMi5kZWZhdWx0KTtcblxuICAgICAgICBMaXN0LmJsb3ROYW1lID0gJ2xpc3QnO1xuICAgICAgICBMaXN0LnNjb3BlID0gX3BhcmNobWVudDIuZGVmYXVsdC5TY29wZS5CTE9DS19CTE9UO1xuICAgICAgICBMaXN0LnRhZ05hbWUgPSBbJ09MJywgJ1VMJ107XG4gICAgICAgIExpc3QuZGVmYXVsdENoaWxkID0gJ2xpc3QtaXRlbSc7XG4gICAgICAgIExpc3QuYWxsb3dlZENoaWxkcmVuID0gW0xpc3RJdGVtXTtcblxuICAgICAgICBleHBvcnRzLkxpc3RJdGVtID0gTGlzdEl0ZW07XG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IExpc3Q7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiA2OCAqL1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ICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBjYWxsICYmXG4gICAgICAgICAgICAodHlwZW9mIGNhbGwgPT09ICdvYmplY3QnIHx8IHR5cGVvZiBjYWxsID09PSAnZnVuY3Rpb24nKVxuICAgICAgICAgICAgPyBjYWxsXG4gICAgICAgICAgICA6IHNlbGY7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfaW5oZXJpdHMoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpIHtcbiAgICAgICAgICBpZiAodHlwZW9mIHN1cGVyQ2xhc3MgIT09ICdmdW5jdGlvbicgJiYgc3VwZXJDbGFzcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgJ1N1cGVyIGV4cHJlc3Npb24gbXVzdCBlaXRoZXIgYmUgbnVsbCBvciBhIGZ1bmN0aW9uLCBub3QgJyArXG4gICAgICAgICAgICAgICAgdHlwZW9mIHN1cGVyQ2xhc3MsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBzdWJDbGFzcy5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKFxuICAgICAgICAgICAgc3VwZXJDbGFzcyAmJiBzdXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBJdGFsaWMgPSAoZnVuY3Rpb24gKF9Cb2xkKSB7XG4gICAgICAgICAgX2luaGVyaXRzKEl0YWxpYywgX0JvbGQpO1xuXG4gICAgICAgICAgZnVuY3Rpb24gSXRhbGljKCkge1xuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIEl0YWxpYyk7XG5cbiAgICAgICAgICAgIHJldHVybiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKEl0YWxpYy5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKEl0YWxpYykpLmFwcGx5KFxuICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgYXJndW1lbnRzLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gSXRhbGljO1xuICAgICAgICB9KShfYm9sZDIuZGVmYXVsdCk7XG5cbiAgICAgICAgSXRhbGljLmJsb3ROYW1lID0gJ2l0YWxpYyc7XG4gICAgICAgIEl0YWxpYy50YWdOYW1lID0gWydFTScsICdJJ107XG5cbiAgICAgICAgZXhwb3J0cy5kZWZhdWx0ID0gSXRhbGljO1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9LFxuICAgICAgLyogNjkgKi9cbiAgICAgIC8qKiovIGZ1bmN0aW9uIChtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuXG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnR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ZXQgPSBmdW5jdGlvbiBnZXQob2JqZWN0LCBwcm9wZXJ0eSwgcmVjZWl2ZXIpIHtcbiAgICAgICAgICBpZiAob2JqZWN0ID09PSBudWxsKSBvYmplY3QgPSBGdW5jdGlvbi5wcm90b3R5cGU7XG4gICAgICAgICAgdmFyIGRlc2MgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKG9iamVjdCwgcHJvcGVydHkpO1xuICAgICAgICAgIGlmIChkZXNjID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnQgPSBPYmplY3QuZ2V0UHJvdG90eXBlT2Yob2JqZWN0KTtcbiAgICAgICAgICAgIGlmIChwYXJlbnQgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBnZXQocGFyZW50LCBwcm9wZXJ0eSwgcmVjZWl2ZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSBpZiAoJ3ZhbHVlJyBpbiBkZXNjKSB7XG4gICAgICAgICAgICByZXR1cm4gZGVzYy52YWx1ZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGdldHRlciA9IGRlc2MuZ2V0O1xuICAgICAgICAgICAgaWYgKGdldHRlciA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZ2V0dGVyLmNhbGwocmVjZWl2ZXIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgX2lubGluZSA9IF9fd2VicGFja19yZXF1aXJlX18oNik7XG5cbiAgICAgICAgdmFyIF9pbmxpbmUyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfaW5saW5lKTtcblxuICAgICAgICBmdW5jdGlvb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dyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAnU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIFNjcmlwdCA9IChmdW5jdGlvbiAoX0lubGluZSkge1xuICAgICAgICAgIF9pbmhlcml0cyhTY3JpcHQsIF9JbmxpbmUpO1xuXG4gICAgICAgICAgZnVuY3Rpb24gU2NyaXB0KCkge1xuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIFNjcmlwdCk7XG5cbiAgICAgICAgICAgIHJldHVybiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKFNjcmlwdC5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKFNjcmlwdCkpLmFwcGx5KFxuICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgYXJndW1lbnRzLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoU2NyaXB0LCBudWxsLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2NyZWF0ZScsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBjcmVhdGUodmFsdWUpIHtcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUgPT09ICdzdXBlcicpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzdXAnKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHZhbHVlID09PSAnc3ViJykge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3N1YicpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gX2dldChcbiAgICAgICAgICAgICAgICAgICAgU2NyaXB0Ll9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoU2NyaXB0KSxcbiAgICAgICAgICAgICAgICAgICAgJ2NyZWF0ZScsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgdmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2Zvcm1hdHMnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9ybWF0cyhkb21Ob2RlKSB7XG4gICAgICAgICAgICAgICAgaWYgKGRvbU5vZGUudGFnTmFtZSA9PT0gJ1NVQicpIHJldHVybiAnc3ViJztcbiAgICAgICAgICAgICAgICBpZiAoZG9tTm9kZS50YWdOYW1lID09PSAnU1VQJykgcmV0dXJuICdzdXBlcic7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG5cbiAgICAgICAgICByZXR1cm4gU2NyaXB0O1xuICAgICAgICB9KShfaW5saW5lMi5kZWZhdWx0KTtcblxuICAgICAgICBTY3JpcHQuYmxvdE5hbWUgPSAnc2NyaXB0JztcbiAgICAgICAgU2NyaXB0LnRhZ05hbWUgPSBbJ1NVQicsICdTVVAnXTtcblxuICAgICAgICBleHBvcnRzLmRlZmF1bHQgPSBTY3JpcHQ7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiA3MCAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge1xuICAgICAgICAgIHZhbHVlOiB0cnVlLFxuICAgICAgICB9KTtcblxuICAgICAgICB2YXIgX2lubGluZSA9IF9fd2VicGFja19yZXF1aXJlX18oNik7XG5cbiAgICAgICAgdmFyIF9pbmxpbmUyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfaW5saW5lKTtcblxuICAgICAgICBmdW5jdGlvbiBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KG9iaikge1xuICAgICAgICAgIHJldHVybiBvYmogJiYgb2JqLl9fZ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iZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIFN0cmlrZSA9IChmdW5jdGlvbiAoX0lubGluZSkge1xuICAgICAgICAgIF9pbmhlcml0cyhTdHJpa2UsIF9JbmxpbmUpO1xuXG4gICAgICAgICAgZnVuY3Rpb24gU3RyaWtlKCkge1xuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIFN0cmlrZSk7XG5cbiAgICAgICAgICAgIHJldHVybiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKF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zdWJDbGFzcy5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKFxuICAgICAgICAgICAgc3VwZXJDbGFzcyAmJiBzdXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBVbmRlcmxpbmUgPSAoZnVuY3Rpb24gKF9JbmxpbmUpIHtcbiAgICAgICAgICBfaW5oZXJpdHMoVW5kZXJsaW5lLCBfSW5saW5lKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIFVuZGVybGluZSgpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBVbmRlcmxpbmUpO1xuXG4gICAgICAgICAgICByZXR1cm4gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oXG4gICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgIChVbmRlcmxpbmUuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihVbmRlcmxpbmUpKS5hcHBseShcbiAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgIGFyZ3VtZW50cyxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIFVuZGVybGluZTtcbiAgICAgICAgfSkoX2lubGluZTIuZGVmYXVsdCk7XG5cbiAgICAgICAgVW5kZXJsaW5lLmJsb3ROYW1lID0gJ3VuZGVybGluZSc7XG4gICAgICAgIFVuZGVybGluZS50YWdOYW1lID0gJ1UnO1xuXG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IFVuZGVybGluZTtcblxuICAgICAgICAvKioqL1xuICAgICAgfSxcbiAgICAgIC8qIDcyICovXG4gICAgICAvKioqLyBmdW5jdGlvbiAobW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG4gICAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgJ19fZXNNb2R1bGUnLCB7XG4gICAgICAgICAgdmFsdWU6IHRydWUsXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHZhciBfY3JlYXRlQ2xhc3MgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXModGFyZ2V0LCBwcm9wcykge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwcm9wcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICB2YXIgZGVzY3JpcHRvciA9IHByb3BzW2ldO1xuICAgICAgICAgICAgICBkZXNjcmlwdG9yLmVudW1lcmFibGUgPSBkZXNjcmlwdG9yLmVudW1lcmFibGUgfHwgZmFsc2U7XG4gICAgICAgICAgICAgIGRlc2NyaXB0b3IuY29uZmlndXJhYmxlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgaWYgKCd2YWx1ZScgaW4gZGVzY3JpcHRvcikgZGVzY3JpcHRvci53cml0YWJsZSA9IHRydWU7XG4gICA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pIHtcbiAgICAgICAgICBpZiAoIXNlbGYpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBSZWZlcmVuY2VFcnJvcihcbiAgICAgICAgICAgICAgXCJ0aGlzIGhhc24ndCBiZWVuIGluaXRpYWxpc2VkIC0gc3VwZXIoKSBoYXNuJ3QgYmVlbiBjYWxsZWRcIixcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBjYWxsICYmXG4gICAgICAgICAgICAodHlwZW9mIGNhbGwgPT09ICdvYmplY3QnIHx8IHR5cGVvZiBjYWxsID09PSAnZnVuY3Rpb24nKVxuICAgICAgICAgICAgPyBjYWxsXG4gICAgICAgICAgICA6IHNlbGY7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfaW5oZXJpdHMoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpIHtcbiAgICAgICAgICBpZiAodHlwZW9mIHN1cGVyQ2xhc3MgIT09ICdmdW5jdGlvbicgJiYgc3VwZXJDbGFzcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgJ1N1cGVyIGV4cHJlc3Npb24gbXVzdCBlaXRoZXIgYmUgbnVsbCBvciBhIGZ1bmN0aW9uLCBub3QgJyArXG4gICAgICAgICAgICAgICAgdHlwZW9mIHN1cGVyQ2xhc3MsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBzdWJDbGFzcy5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKFxuICAgICAgICAgICAgc3VwZXJDbGFzcyAmJiBzdXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBBVFRSSUJVVEVTID0gWydhbHQnLCAnaGVpZ2h0JywgJ3dpZHRoJ107XG5cbiAgICAgICAgdmFyIEltYWdlID0gKGZ1bmN0aW9uIChfUGFyY2htZW50JEVtYmVkKSB7XG4gICAgICAgICAgX2luaGVyaXRzKEltYWdlLCBfUGFyY2htZW50JEVtYmVkKTtcblxuICAgICAgICAgIGZ1bmN0aW9uIEltYWdlKCkge1xuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIEltYWdlKTtcblxuICAgICAgICAgICAgcmV0dXJuIF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoSW1hZ2UuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihJbWFnZSkpLmFwcGx5KFxuICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgYXJndW1lbnRzLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoXG4gICAgICAgICAgICBJbWFnZSxcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGtleTogJ2Zvcm1hdCcsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGZvcm1hdChuYW1lLCB2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgaWYgKEFUVFJJQlVURVMuaW5kZXhPZihuYW1lKSA+IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZG9tTm9kZS5zZXRBdHRyaWJ1dGUobmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZG9tTm9kZS5yZW1vdmVBdHRyaWJ1dGUobmFtZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIF9nZXQoXG4gICAgICAgICAgICAgICAgICAgICAgSW1hZ2UucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKEltYWdlLnByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgICAgJ2Zvcm1hdCcsXG4gICAgICAgICAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIG5hbWUsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGtleTogJ2NyZWF0ZScsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGNyZWF0ZSh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgdmFyIG5vZGUgPSBfZ2V0KFxuICAgICAgICAgICAgICAgICAgICBJbWFnZS5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKEltYWdlKSxcbiAgICAgICAgICAgICAgICAgICAgJ2NyZWF0ZScsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICApLmNhbGwodGhpcywgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5zZXRBdHRyaWJ1dGUoJ3NyYycsIHRoaXMuc2FuaXRpemUodmFsdWUpKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIHJldHVybiBub2RlO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdmb3JtYXRzJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZm9ybWF0cyhkb21Ob2RlKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gQVRUUklCVVRFUy5yZWR1Y2UoZnVuY3Rpb24gKGZvcm1hdHMsIGF0dHJpYnV0ZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZG9tTm9kZS5oYXNBdHRyaWJ1dGUoYXR0cmlidXRlKSkge1xuICAgICAgICAgICAgICAgICAgICAgIGZvcm1hdHNbYXR0cmlidXRlXSA9IGRvbU5vZGUuZ2V0QXR0cmlidXRlKGF0dHJpYnV0ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZvcm1hdHM7XG4gICAgICAgICAgICAgICAgICB9LCB7fSk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGtleTogJ21hdGNoJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gbWF0Y2godXJsKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAvXFwuKGpwZT9nfGdpZnxwbmcpJC8udGVzdCh1cmwpIHx8XG4gICAgICAgICAgICAgICAgICAgIC9eZGF0YTppbWFnZVxcLy4rO2Jhc2U2NC8udGVzdCh1cmwpXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdzYW5pdGl6ZScsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHNhbml0aXplKHVybCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuICgwLCBfbGluay5zYW5pdGl6ZSkodXJsLCBbJ2h0dHAnLCAnaHR0cHMnLCAnZGF0YSddKVxuICAgICAgICAgICAgICAgICAgICA/IHVybFxuICAgICAgICAgICAgICAgICAgICA6ICcvLzowJztcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAndmFsdWUnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiB2YWx1ZShkb21Ob2RlKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gZG9tTm9kZS5nZXRBdHRyaWJ1dGUoJ3NyYycpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICk7XG5cbiAgICAgICAgICByZXR1cm4gSW1hZ2U7XG4gICAgICAgIH0pKF9wYXJjaG1lbnQyLmRlZmF1bHQuRW1iZWQpO1xuXG4gICAgICAgIEltYWdlLmJsb3ROYW1lID0gJ2ltYWdlJztcbiAgICAgICAgSW1hZ2UudGFnTmFtZSA9ICdJTUcnO1xuXG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IEltYWdlO1xuXG4gICAgICAgIC8qKiovXG4gICAgICB9L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ICAgICAgICAgICAgPyBjYWxsXG4gICAgICAgICAgICA6IHNlbGY7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBfaW5oZXJpdHMoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpIHtcbiAgICAgICAgICBpZiAodHlwZW9mIHN1cGVyQ2xhc3MgIT09ICdmdW5jdGlvbicgJiYgc3VwZXJDbGFzcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgJ1N1cGVyIGV4cHJlc3Npb24gbXVzdCBlaXRoZXIgYmUgbnVsbCBvciBhIGZ1bmN0aW9uLCBub3QgJyArXG4gICAgICAgICAgICAgICAgdHlwZW9mIHN1cGVyQ2xhc3MsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBzdWJDbGFzcy5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKFxuICAgICAgICAgICAgc3VwZXJDbGFzcyAmJiBzdXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBBVFRSSUJVVEVTID0gWydoZWlnaHQnLCAnd2lkdGgnXTtcblxuICAgICAgICB2YXIgVmlkZW8gPSAoZnVuY3Rpb24gKF9CbG9ja0VtYmVkKSB7XG4gICAgICAgICAgX2luaGVyaXRzKFZpZGVvLCBfQmxvY2tFbWJlZCk7XG5cbiAgICAgICAgICBmdW5jdGlvbiBWaWRlbygpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBWaWRlbyk7XG5cbiAgICAgICAgICAgIHJldHVybiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKFZpZGVvLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoVmlkZW8pKS5hcHBseShcbiAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgIGFyZ3VtZW50cyxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKFxuICAgICAgICAgICAgVmlkZW8sXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdmb3JtYXQnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBmb3JtYXQobmFtZSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIGlmIChBVFRSSUJVVEVTLmluZGV4T2YobmFtZSkgPiAtMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRvbU5vZGUuc2V0QXR0cmlidXRlKG5hbWUsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRvbU5vZGUucmVtb3ZlQXR0cmlidXRlKG5hbWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgIFZpZGVvLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5nZXRQcm90b3R5cGVPZihWaWRlby5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgICAgICdmb3JtYXQnLFxuICAgICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBuYW1lLCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICdjcmVhdGUnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBjcmVhdGUodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIHZhciBub2RlID0gX2dldChcbiAgICAgICAgICAgICAgICAgICAgVmlkZW8uX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihWaWRlbyksXG4gICAgICAgICAgICAgICAgICAgICdjcmVhdGUnLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgIG5vZGUuc2V0QXR0cmlidXRlKCdmcmFtZWJvcmRlcicsICcwJyk7XG4gICAgICAgICAgICAgICAgICBub2RlLnNldEF0dHJpYnV0ZSgnYWxsb3dmdWxsc2NyZWVuJywgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICBub2RlLnNldEF0dHJpYnV0ZSgnc3JjJywgdGhpcy5zYW5pdGl6ZSh2YWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIG5vZGU7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGtleTogJ2Zvcm1hdHMnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBmb3JtYXRzKGRvbU5vZGUpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBBVFRSSUJVVEVTLnJlZHVjZShmdW5jdGlvbiAoZm9ybWF0cywgYXR0cmlidXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChkb21Ob2RlLmhhc0F0dHJpYnV0ZShhdHRyaWJ1dGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgZm9ybWF0c1thdHRyaWJ1dGVdID0gZG9tTm9kZS5nZXRBdHRyaWJ1dGUoYXR0cmlidXRlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZm9ybWF0cztcbiAgICAgICAgICAgICAgICAgIH0sIHt9KTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiAnc2FuaXRpemUnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBzYW5pdGl6ZSh1cmwpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBfbGluazIuZGVmYXVsdC5zYW5pdGl6ZSh1cmwpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6ICd2YWx1ZScsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHZhbHVlKGRvbU5vZGUpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBkb21Ob2RlLmdldEF0dHJpYnV0ZSgnc3JjJyk7XG4gICAgICAgICAgICAgIC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IHN1cGVyQ2xhc3MsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBzdWJDbGFzcy5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKFxuICAgICAgICAgICAgc3VwZXJDbGFzcyAmJiBzdXBlckNsYXNzLnByb3RvdHlwZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgY29uc3RydWN0b3I6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogc3ViQ2xhc3MsXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmIChzdXBlckNsYXNzKVxuICAgICAgICAgICAgT2JqZWN0LnNldFByb3RvdHlwZU9mXG4gICAgICAgICAgICAgID8gT2JqZWN0LnNldFByb3RvdHlwZU9mKHN1YkNsYXNzLCBzdXBlckNsYXNzKVxuICAgICAgICAgICAgICA6IChzdWJDbGFzcy5fX3Byb3RvX18gPSBzdXBlckNsYXNzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBGb3JtdWxhQmxvdCA9IChmdW5jdGlvbiAoX0VtYmVkKSB7XG4gICAgICAgICAgX2luaGVyaXRzKEZvcm11bGFCbG90LCBfRW1iZWQpO1xuXG4gICAgICAgICAgZnVuY3Rpb24gRm9ybXVsYUJsb3QoKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgRm9ybXVsYUJsb3QpO1xuXG4gICAgICAgICAgICByZXR1cm4gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oXG4gICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgIChcbiAgICAgICAgICAgICAgICBGb3JtdWxhQmxvdC5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKEZvcm11bGFCbG90KVxuICAgICAgICAgICAgICApLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyksXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhGb3JtdWxhQmxvdCwgbnVsbCwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdjcmVhdGUnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gY3JlYXRlKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdmFyIG5vZGUgPSBfZ2V0KFxuICAgICAgICAgICAgICAgICAgRm9ybXVsYUJsb3QuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihGb3JtdWxhQmxvdCksXG4gICAgICAgICAgICAgICAgICAnY3JlYXRlJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgd2luZG93LmthdGV4LnJlbmRlcih2YWx1ZSwgbm9kZSwge1xuICAgICAgICAgICAgICAgICAgICB0aHJvd09uRXJyb3I6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICBlcnJvckNvbG9yOiAnI2YwMCcsXG4gICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgIG5vZGUuc2V0QXR0cmlidXRlKCdkYXRhLXZhbHVlJywgdmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ3ZhbHVlJyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHZhb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HwgT2JqZWN0LmdldFByb3RvdHlwZU9mKEZvcm11bGEpKS5jYWxsKHRoaXMpLFxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgaWYgKHdpbmRvdy5rYXRleCA9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRm9ybXVsYSBtb2R1bGUgcmVxdWlyZXMgS2FUZVguJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gX3RoaXMyO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBGb3JtdWxhO1xuICAgICAgICB9KShfbW9kdWxlMi5kZWZhdWx0KTtcblxuICAgICAgICBleHBvcnRzLkZvcm11bGFCbG90ID0gRm9ybXVsYUJsb3Q7XG4gICAgICAgIGV4cG9ydHMuZGVmYXVsdCA9IEZvcm11bGE7XG5cbiAgICAgICAgLyoqKi9cbiAgICAgIH0sXG4gICAgICAvKiA3NSAqL1xuICAgICAgLyoqKi8gZnVuY3Rpb24gKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywge1xuICAgICAgICAgIHZhbHVlOiB0cnVlLFxuICAgICAgICB9KTtcbiAgICAgICAgZXhwb3J0cy5kZWZhdWx0ID0gZXhwb3J0cy5Db2RlVG9rZW4gPSBleHBvcnRzLkNvZGVCbG9jayA9IHVuZGVmaW5lZDtcblxuICAgICAgICB2YXIgX2NyZWF0ZUNsYXNzID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0aWVzKHRhcmdldCwgcHJvcHMpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcHJvcHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgdmFyIGRlc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ICAgICAgdmFyIHBhcmVudCA9IE9iamVjdC5nZXRQcm90b3R5cGVPZihvYmplY3QpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGdldChwYXJlbnQsIHByb3BlcnR5LCByZWNlaXZlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmICgndmFsdWUnIGluIGRlc2MpIHtcbiAgICAgICAgICAgIHJldHVybiBkZXNjLnZhbHVlO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZ2V0dGVyID0gZGVzYy5nZXQ7XG4gICAgICAgICAgICBpZiAoZ2V0dGVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBnZXR0ZXIuY2FsbChyZWNlaXZlcik7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHZhciBfcGFyY2htZW50ID0gX193ZWJwYWNrX3JlcXVpcmVfXygwKTtcblxuICAgICAgICB2YXIgX3BhcmNobWVudDIgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KF9wYXJjaG1lbnQpO1xuXG4gICAgICAgIHZhciBfcXVpbGwgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDUpO1xuXG4gICAgICAgIHZhciBfcXVpbGwyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfcXVpbGwpO1xuXG4gICAgICAgIHZhciBfbW9kdWxlID0gX193ZWJwYWNrX3JlcXVpcmVfXyg5KTtcblxuICAgICAgICB2YXIgX21vZHVsZTIgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KF9tb2R1bGUpO1xuXG4gICAgICAgIHZhciBfY29kZSA9IF9fd2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1xuICAgICAgICAgIGlmICh0eXBlb2Ygc3VwZXJDbGFzcyAhPT0gJ2Z1bmN0aW9uJyAmJiBzdXBlckNsYXNzICE9PSBudWxsKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAnU3VwZXIgZXhwcmVzc2lvbiBtdXN0IGVpdGhlciBiZSBudWxsIG9yIGEgZnVuY3Rpb24sIG5vdCAnICtcbiAgICAgICAgICAgICAgICB0eXBlb2Ygc3VwZXJDbGFzcyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN1YkNsYXNzLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoXG4gICAgICAgICAgICBzdXBlckNsYXNzICYmIHN1cGVyQ2xhc3MucHJvdG90eXBlLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBzdWJDbGFzcyxcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICBPYmplY3Quc2V0UHJvdG90eXBlT2ZcbiAgICAgICAgICAgICAgPyBPYmplY3Quc2V0UHJvdG90eXBlT2Yoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpXG4gICAgICAgICAgICAgIDogKHN1YkNsYXNzLl9fcHJvdG9fXyA9IHN1cGVyQ2xhc3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIFN5bnRheENvZGVCbG9jayA9IChmdW5jdGlvbiAoX0NvZGVCbG9jaykge1xuICAgICAgICAgIF9pbmhlcml0cyhTeW50YXhDb2RlQmxvY2ssIF9Db2RlQmxvY2spO1xuXG4gICAgICAgICAgZnVuY3Rpb24gU3ludGF4Q29kZUJsb2NrKCkge1xuICAgICAgICAgICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIFN5bnRheENvZGVCbG9jayk7XG5cbiAgICAgICAgICAgIHJldHVybiBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKFxuICAgICAgICAgICAgICAgIFN5bnRheENvZGVCbG9jay5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoU3ludGF4Q29kZUJsb2NrKVxuICAgICAgICAgICAgICApLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyksXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhTeW50YXhDb2RlQmxvY2ssIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAncmVwbGFjZVdpdGgnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcmVwbGFjZVdpdGgoYmxvY2spIHtcbiAgICAgICAgICAgICAgICB0aGlzLmRvbU5vZGUudGV4dENvbnRlbnQgPSB0aGlzLmRvbU5vZGUudGV4dENvbnRlbnQ7XG4gICAgICAgICAgICAgICAgdGhpcy5hdHRhY2goKTtcbiAgICAgICAgICAgICAgICBfZ2V0KFxuICAgICAgICAgICAgICAgICAgU3ludGF4Q29kZUJsb2NrLnByb3RvdHlwZS5fX3Byb3RvX18gfHxcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmdldFByb3RvdHlwZU9mKFN5bnRheENvZGVCbG9jay5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgJ3JlcGxhY2VXaXRoJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIGJsb2NrKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2hpZ2hsaWdodCcsXG4gICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiBoaWdobGlnaHQoX2hpZ2hsaWdodCkge1xuICAgICAgICAgICAgICAgIHZhciB0ZXh0ID0gdGhpcy5kb21Ob2RlLnRleHRDb250ZW50O1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmNhY2hlZFRleHQgIT09IHRleHQpIHtcbiAgICAgICAgICAgICAgICAgIGlmICh0ZXh0LnRyaW0oKS5sZW5ndGggPiAwIHx8IHRoaXMuY2FjaGVkVGV4dCA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZG9tTm9kZS5pbm5lckhUTUwgPSBfaGlnaGxpZ2h0KHRleHQpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmRvbU5vZGUubm9ybWFsaXplKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYXR0YWNoKCk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB0aGlzLmNhY2hlZFRleHQgPSB0ZXh0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG5cbiAgICAgICAgICByZXR1cm4gU3ludGF4Q29kZUJsb2NrO1xuICAgICAgICB9KShfY29kZTIuZGVmYXVsdCk7XG5cbiAgICAgICAgU3ludGF4Q29kZUJsb2NrLmNsYXNzTmFtZSA9ICdxbC1zeW50YXgnO1xuXG4gICAgICAgIHZhciBDb2RlVG9rZW4gPSBuZXcgX3BhcmNobWVudDIuZGVmYXVsdC5BdHRyaWJ1dG9yLkNsYXNzKFxuICAgICAgICAgICd0b2tlbicsXG4gICAgICAgICAgJ2hsanMnLFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHNjb3BlOiBfcGFyY2htZW50Mi5kZWZhdWx0LlNjb3BlLklOTElORSxcbiAgICAgICAgICB9LFxuICAgICAgICApO1xuXG4gICAgICAgIHZhciBTeW50YXggPSAoZnVuY3Rpb24gKF9Nb2R1bGUpIHtcbiAgICAgICAgICBfaW5oZXJpdHMoU3ludGF4LCBfTW9kdWxlKTtcblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhTeW50YXgsIG51bGwsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAncmVnaXN0ZXInLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcmVnaXN0ZXIoKSB7XG4gICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnJlZ2lzdGVyKENvZGVUb2tlbiwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnJlZ2lzdGVyKFN5bnRheENvZGVCbG9jaywgdHJ1ZSk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgZnVuY3Rpb24gU3ludGF4KHF1aWxsLCBvcHRpb25zKSB7XG4gICAgICAgICAgICBfY2xhc3NDYWxsQ2hlY2sodGhpcywgU3ludGF4KTtcblxuICAgICAgICAgICAgdmFyIF90aGlzMiA9IF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoU3ludGF4Ll9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoU3ludGF4KSkuY2FsbChcbiAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgIHF1aWxsLFxuICAgICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICBpZiAodHlwZW9mIF90aGlzMi5vcHRpb25zLmhpZ2hsaWdodCAhPT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgJ1N5bnRheCBtb2R1bGUgcmVxdWlyZXMgaGlnaGxpZ2h0LmpzLiBQbGVhc2UgaW5jbHVkZSB0aGUgbGlicmFyeSBvbiB0aGUgcGFnZSBiZWZvcmUgUXVpbGwuJyxcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciB0aW1lciA9IG51bGw7XG4gICAgICAgICAgICBfdGhpczIucXVpbGwub24oXG4gICAgICAgICAgICAgIF9xdWlsbDIuZGVmYXVsdC5ldmVudHMuU0NST0xMX09QVElNSVpFLFxuICAgICAgICAgICAgICBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVyKTtcbiAgICAgICAgICAgICAgICB0aW1lciA9IHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgX3RoaXMyLmhpZ2hsaWdodCgpO1xuICAgICAgICAgICAgICAgICAgdGltZXIgPSBudWxsO1xuICAgICAgICAgICAgICAgIH0sIF90aGlzMi5vcHRpb25zLmludGVydmFsKTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBfdGhpczIuaGlnaGxpZ2h0KCk7XG4gICAgICAgICAgICByZXR1cm4gX3RoaXMyO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIF9jcmVhdGVDbGFzcyhTeW50YXgsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAnaGlnaGxpZ2h0JyxcbiAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGhpZ2hsaWdodCgpIHtcbiAgICAgICAgICAgICAgICB2YXIgX3RoaXMzID0gdGhpcztcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnF1aWxsLnNlbGVjdGlvbi5jb21wb3NpbmcpIHJldHVybjtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLnVwZGF0ZShfcXVpbGwyLmRlZmF1bHQuc291cmNlcy5VU0VSKTtcbiAgICAgICAgICAgICAgICB2YXIgcmFuZ2UgPSB0aGlzLnF1aWxsLmdldFNlbGVjdGlvbigpO1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuc2Nyb2xsXG4gICAgICAgICAgICAgICAgICAuZGVzY2VuZGFudHMoU3ludGF4Q29kZUJsb2NrKVxuICAgICAgICAgICAgICAgICAgLmZvckVhY2goZnVuY3Rpb24gKGNvZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29kZS5oaWdobGlnaHQoX3RoaXMzLm9wdGlvbnMuaGlnaGxpZ2h0KTtcbiAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwudXBkYXRlKF9xdWlsbDIuZGVmYXVsdC5zb3VyY2VzLlNJTEVOVCk7XG4gICAgICAgICAgICAgICAgaWYgKHJhbmdlICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuc2V0U2VsZWN0aW9uKFxuICAgICAgICAgICAgICAgICAgICByYW5nZSxcbiAgICAgICAgICAgICAgICAgICAgX3F1aWxsMi5kZWZhdWx0LnNvdXJjZXMuU0lMRU5ULFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgcmV0dXJuIFN5bnRheDtcbiAgICAgICAgfSkoX21vZHVsZTIuZGVmYXVsdCk7XG5cbiAgICAgICAgU3ludGF4LkRFRkFVTFRTID0ge1xuICAgICAgICAgIGhpZ2hsaWdodDogKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmICh3aW5kb3cuaGxqcyA9PSBudWxsKSByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlv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wgcHJvcGVydHksIHJlY2VpdmVyKSB7XG4gICAgICAgICAgaWYgKG9iamVjdCA9PT0gbnVsbCkgb2JqZWN0ID0gRnVuY3Rpb24ucHJvdG90eXBlO1xuICAgICAgICAgIHZhciBkZXNjID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihvYmplY3QsIHByb3BlcnR5KTtcbiAgICAgICAgICBpZiAoZGVzYyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB2YXIgcGFyZW50ID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKG9iamVjdCk7XG4gICAgICAgICAgICBpZiAocGFyZW50ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gZ2V0KHBhcmVudCwgcHJvcGVydHksIHJlY2VpdmVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKCd2YWx1ZScgaW4gZGVzYykge1xuICAgICAgICAgICAgcmV0dXJuIGRlc2MudmFsdWU7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBnZXR0ZXIgPSBkZXNjLmdldDtcbiAgICAgICAgICAgIGlmIChnZXR0ZXIgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGdldHRlci5jYWxsKHJlY2VpdmVyKTtcbiAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgdmFyIF9jcmVhdGVDbGFzcyA9IChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgZnVuY3Rpb24gZGVmaW5lUHJvcGVydGllcyh0YXJnZXQsIHByb3BzKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHByb3BzLmxlbmd0aDsgaSsrKSB7XG4gICAgICA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gY2FsbCAmJlxuICAgICAgICAgICAgKHR5cGVvZiBjYWxsID09PSAnb2JqZWN0JyB8fCB0eXBlb2YgY2FsbCA9PT0gJ2Z1bmN0aW9uJylcbiAgICAgICAgICAgID8gY2FsbFxuICAgICAgICAgICAgOiBzZWxmO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gX2luaGVyaXRzKHN1YkNsYXNzLCBzdXBlckNsYXNzKSB7XG4gICAgICAgICAgaWYgKHR5cGVvZiBzdXBlckNsYXNzICE9PSAnZnVuY3Rpb24nICYmIHN1cGVyQ2xhc3MgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICdTdXBlciBleHByZXNzaW9uIG11c3QgZWl0aGVyIGJlIG51bGwgb3IgYSBmdW5jdGlvbiwgbm90ICcgK1xuICAgICAgICAgICAgICAgIHR5cGVvZiBzdXBlckNsYXNzLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgc3ViQ2xhc3MucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShcbiAgICAgICAgICAgIHN1cGVyQ2xhc3MgJiYgc3VwZXJDbGFzcy5wcm90b3R5cGUsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGNvbnN0cnVjdG9yOiB7XG4gICAgICAgICAgICAgICAgdmFsdWU6IHN1YkNsYXNzLFxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgKTtcbiAgICAgICAgICBpZiAoc3VwZXJDbGFzcylcbiAgICAgICAgICAgIE9iamVjdC5zZXRQcm90b3R5cGVPZlxuICAgICAgICAgICAgICA/IE9iamVjdC5zZXRQcm90b3R5cGVPZihzdWJDbGFzcywgc3VwZXJDbGFzcylcbiAgICAgICAgICAgICAgOiAoc3ViQ2xhc3MuX19wcm90b19fID0gc3VwZXJDbGFzcyk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgVE9PTEJBUl9DT05GSUcgPSBbXG4gICAgICAgICAgWydib2xkJywgJ2l0YWxpYycsICdsaW5rJ10sXG4gICAgICAgICAgW3toZWFkZXI6IDF9LCB7aGVhZGVyOiAyfSwgJ2Jsb2NrcXVvdGUnXSxcbiAgICAgICAgXTtcblxuICAgICAgICB2YXIgQnViYmxlVGhlbWUgPSAoZnVuY3Rpb24gKF9CYXNlVGhlbWUpIHtcbiAgICAgICAgICBfaW5oZXJpdHMoQnViYmxlVGhlbWUsIF9CYXNlVGhlbWUpO1xuXG4gICAgICAgICAgZnVuY3Rpb24gQnViYmxlVGhlbWUocXVpbGwsIG9wdGlvbnMpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBCdWJibGVUaGVtZSk7XG5cbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgb3B0aW9ucy5tb2R1bGVzLnRvb2xiYXIgIT0gbnVsbCAmJlxuICAgICAgICAgICAgICBvcHRpb25zLm1vZHVsZXMudG9vbGJhci5jb250YWluZXIgPT0gbnVsbFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIG9wdGlvbnMubW9kdWxlcy50b29sYmFyLmNvbnRhaW5lciA9IFRPT0xCQVJfQ09ORklHO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgX3RoaXMgPSBfcG9zc2libGVDb25zdHJ1Y3RvclJldHVybihcbiAgICAgICAgICAgICAgdGhpcyxcbiAgICAgICAgICAgICAgKFxuICAgICAgICAgICAgICAgIEJ1YmJsZVRoZW1lLl9fcHJvdG9fXyB8fCBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQnViYmxlVGhlbWUpXG4gICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBxdWlsbCwgb3B0aW9ucyksXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICBfdGhpcy5xdWlsbC5jb250YWluZXIuY2xhc3NMaXN0LmFkZCgncWwtYnViYmxlJyk7XG4gICAgICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NyZWF0ZUNsYXNzKEJ1YmJsZVRoZW1lLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleTogJ2V4dGVuZFRvb2xiYXInLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZXh0ZW5kVG9vbGJhcih0b29sYmFyKSB7XG4gICAgICAgICAgICAgICAgdGhpcy50b29sdGlwID0gbmV3IEJ1YmJsZVRvb2x0aXAoXG4gICAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLFxuICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLmJvdW5kcyxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHRoaXMudG9vbHRpcC5yb290LmFwcGVuZENoaWxkKHRvb2xiYXIuY29udGFpbmVyKTtcbiAgICAgICAgICAgICAgICB0aGlzLmJ1aWxkQnV0dG9ucyhcbiAgICAgICAgICAgICAgICAgIFtdLnNsaWNlLmNhbGwodG9vbGJhci5jb250YWluZXIucXVlcnlTZWxlY3RvckFsbCgnYnV0dG9uJykpLFxuICAgICAgICAgICAgICAgICAgX2ljb25zMi5kZWZhdWx0LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgdGhpcy5idWlsZFBpY2tlcnMoXG4gICAgICAgICAgICAgICAgICBbXS5zbGljZS5jYWxsKHRvb2xiYXIuY29udGFpbmVyLnF1ZXJ5U2VsZWN0b3JBbGwoJ3NlbGVjdCcpKSxcbiAgICAgICAgICAgICAgICAgIF9pY29uczIuZGVmYXVsdCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcblxuICAgICAgICAgIHJldHVybiBCdWJibGVUaGVtZTtcbiAgICAgICAgfSkoX2Jhc2UyLmRlZmF1bHQpO1xuXG4gICAgICAgIEJ1YmJsZVRoZW1lLkRFRkFVTFRTID0gKDAsIF9leHRlbmQyLmRlZmF1bHQpKFxuICAgICAgICAgIHRydWUsXG4gICAgICAgICAge30sXG4gICAgICAgICAgX2Jhc2UyLmRlZmF1bHQuREVGQVVMVFMsXG4gICAgICAgICAge1xuICAgICAgICAgICAgbW9kdWxlczoge1xuICAgICAgICAgICAgICB0b29sYmFyOiB7XG4gICAgICAgICAgICAgICAgaGFuZGxlcnM6IHtcbiAgICAgICAgICAgICAgICAgIGxpbms6IGZ1bmN0aW9uIGxpbmsodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuZm9ybWF0KCdsaW5rJywgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMucXVpbGwudGhlbWUudG9vbHRpcC5lZGl0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgKTtcblxuICAgICAgICB2YXIgQnViYmxlVG9vbHRpcCA9IChmdW5jdGlvbiAoX0Jhc2VUb29sdGlwKSB7XG4gICAgICAgICAgX2luaGVyaXRzKEJ1YmJsZVRvb2x0aXAsIF9CYXNlVG9vbHRpcCk7XG5cbiAgICAgICAgICBmdW5jdGlvbiBCdWJibGVUb29sdGlwKHF1aWxsLCBib3VuZHMpIHtcbiAgICAgICAgICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBCdWJibGVUb29sdGlwKTtcblxuICAgICAgICAgICAgdmFyIF90aGlzMiA9IF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuKFxuICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAoXG4gICAgICAgICAgICAgICAgQnViYmxlVG9vbHRpcC5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKEJ1YmJsZVRvb2x0aXApXG4gICAgICAgICAgICAgICkuY2FsbCh0aGlzLCBxdWlsbCwgYm91bmRzKSxcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgIF90aGlzMi5xdWlsbC5vbihcbiAgICAgICAgICAgICAgX2VtaXR0ZXIyLmRlZmF1bHQuZXZlbnRzLkVESVRPUl9DSEFOR0UsXG4gICAgICAgICAgICAgIGZ1bmN0aW9uICh0eXBlLCByYW5nZSwgb2xkUmFuZ2UsIHNvdXJjZSkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlICE9PSBfZW1pdHRlcjIuZGVmYXVsdC5ldmVudHMuU0VMRUNUSU9OX0NIQU5HRSkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIHJhbmdlICE9IG51bGwgJiZcbiAgICAgICAgICAgICAgICAgIHJhbmdlLmxlbmd0aCA+IDAgJiZcbiAgICAgICAgICAgICAgICAgIHNvdXJjZSA9PT0gX2VtaXR0ZXIyLmRlZmF1bHQuc291cmNlcy5VU0VSXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBfdGhpczIuc2hvdygpO1xuICAgICAgICAgICAgICAgICAgLy8gTG9jayBvdXIgd2lkdGggc28gd2Ugd2lsbCBleHBhbmQgYmV5b25kIG91ciBvZmZzZXRQYXJlbnQgYm91bmRhcmllc1xuICAgICAgICAgICAgICAgICAgX3RoaXMyLnJvb3Quc3R5bGUubGVmdCA9ICcwcHgnO1xuICAgICAgICAgICAgICAgICAgX3RoaXMyLnJvb3Quc3R5bGUud2lkdGggPSAnJztcbiAgICAgICAgICAgICAgICAgIF90aGlzMi5yb290LnN0eWxlLndpZHRoID0gX3RoaXMyLnJvb3Qub2Zmc2V0V2lkdGggKyAncHgnO1xuICAgICAgICAgICAgICAgICAgdmFyIGxpbmVzID0gX3RoaXMyLnF1aWxsLmdldExpbmVzKHJhbmdlLmluZGV4LCByYW5nZS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgaWYgKGxpbmVzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBfdGhpczIucG9zaXRpb24oX3RoaXMyLnF1aWxsLmdldEJvdW5kcyhyYW5nZSkpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxhc3RMaW5lID0gbGluZXNbbGluZXMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICAgICAgICAgIHZhciBpbmRleCA9IF90aGlzMi5xdWlsbC5nZXRJbmRleChsYXN0TGluZSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPSBNYXRoLm1pbihcbiAgICAgICAgICAgICAgICAgICAgICBsYXN0TGluZS5sZW5ndGgoKSAtIDEsXG4gICAgICAgICAgICAgICAgICAgICAgcmFuZ2UuaW5kZXggKyByYW5nZS5sZW5ndGggLSBpbmRleCxcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIF9ib3VuZHMgPSBfdGhpczIucXVpbGwuZ2V0Qm91bmRzKFxuICAgICAgICAgICAgICAgICAgICAgIG5ldyBfc2VsZWN0aW9uLlJhbmdlKGluZGV4LCBsZW5ndGgpLFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICBfdGhpczIucG9zaXRpb24oX2JvdW5kcyk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmFjdGl2ZUVsZW1lbnQgIT09IF90aGlzMi50ZXh0Ym94ICYmXG4gICAgICAgICAgICAgICAgICBfdGhpczIucXVpbGwuaGFzRm9jdXMoKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgX3RoaXMyLmhpZGUoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgcmV0dXJuIF90aGlzMjtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBfY3JlYXRlQ2xhc3MoQnViYmxlVG9vbHRpcCwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdsaXN0ZW4nLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gbGlzdGVuKCkge1xuICAgICAgICAgICAgICAgIHZhciBfdGhpczMgPSB0aGlzO1xuXG4gICAgICAgICAgICAgICAgX2dldChcbiAgICAgICAgICAgICAgICAgIEJ1YmJsZVRvb2x0aXAucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQnViYmxlVG9vbHRpcC5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgJ2xpc3RlbicsXG4gICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICkuY2FsbCh0aGlzKTtcbiAgICAgICAgICAgICAgICB0aGlzLnJvb3RcbiAgICAgICAgICAgICAgICAgIC5xdWVyeVNlbGVjdG9yKCcucWwtY2xvc2UnKVxuICAgICAgICAgICAgICAgICAgLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBfdGhpczMucm9vdC5jbGFzc0xpc3QucmVtb3ZlKCdxbC1lZGl0aW5nJyk7XG4gICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLm9uKFxuICAgICAgICAgICAgICAgICAgX2VtaXR0ZXIyLmRlZmF1bHQuZXZlbnRzLlNDUk9MTF9PUFRJTUlaRSxcbiAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gTGV0IHNlbGVjdGlvbiBiZSByZXN0b3JlZCBieSB0b29sYmFyIGhhbmRsZXJzIGJlZm9yZSByZXBvc2l0aW9uaW5nXG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgIGlmIChfdGhpczMucm9vdC5jbGFzc0xpc3QuY29udGFpbnMoJ3FsLWhpZGRlbicpKSByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIHJhbmdlID0gX3RoaXMzLnF1aWxsLmdldFNlbGVjdGlvbigpO1xuICAgICAgICAgICAgICAgICAgICAgIGlmIChyYW5nZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpczMucG9zaXRpb24oX3RoaXMzLnF1aWxsLmdldEJvdW5kcyhyYW5nZSkpO1xuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgMSk7XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBrZXk6ICdjYW5jZWwnLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gY2FuY2VsKCkge1xuICAgICAgICAgICAgICAgIHRoaXMuc2hvdygpO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAga2V5OiAncG9zaXRpb24nLFxuICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcG9zaXRpb24ocmVmZXJlbmNlKSB7XG4gICAgICAgICAgICAgICAgdmFyIHNoaWZ0ID0gX2dldChcbiAgICAgICAgICAgICAgICAgIEJ1YmJsZVRvb2x0aXAucHJvdG90eXBlLl9fcHJvdG9fXyB8fFxuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YoQnViYmxlVG9vbHRpcC5wcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgJ3Bvc2l0aW9uJyxcbiAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgKS5jYWxsKHRoaXMsIHJlZmVyZW5jZSk7XG4gICAgICAgICAgICAgICAgdmFyIGFycm93ID0gdGhpcy5yb290LnF1ZXJ5U2VsZWN0b3IoJy5xbC10b29sdGlwLWFycm93Jyk7XG4gICAgICAgICAgICAgICAgYXJyb3cuc3R5bGUubWFyZ2luTGVmdCA9ICcnO1xuICAgICAgICAgICAgICAgIGlmIChzaGlmdCA9PT0gMCkgcmV0dXJuIHNoaWZ0O1xuICAgICAgICAgICAgICAgIGFycm93LnN0eWxlLm1hcmdpbkxlZnQgPVxuICAgICAgICAgICAgICAgICAgLTEgKiBzaGlmdCAtIGFycm93Lm9mZnNldFdpZHRoIC8gMiArICdweCc7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgcmV0dXJuIEJ1YmJsZVRvb2x0aXA7XG4gICAgICAgIH0pKF9iYXNlLkJhc2VUb29sdGlwKTtcblxuICAgICAgICBCdWJibGVUb29sdGlwLlRFTVBMQVRFID0gW1xuICAgICAgICAgICc8c3BhbiBjbGFzcz1cInFsLXRvb2x0aXAtYXJyb3dcIj48L3NwYW4+JyxcbiAgICAgICAgICAnPGRpdiBjbGFzcz1cInFsLXRvb2x0aXAtZWRpdG9yXCI+JyxcbiAgICAgICAgICAnPGlucHV0IHR5cGU9XCJ0ZXh0XCIgZGF0YS1mb3JtdWxhPVwiZT1tY14yXCIgZGF0YS1saW5rPVwiaHR0cHM6Ly9xdWlsbGpzLm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pbmcsIDAgPSBjaHVuayBsb2FkZWRcbnZhciBpbnN0YWxsZWRDaHVua3MgPSB7XG5cdFwibWFpblwiOiAwXG59O1xuXG4vLyBubyBjaHVuayBvbiBkZW1hbmQgbG9hZGluZ1xuXG4vLyBubyBwcmVmZXRjaGluZ1xuXG4vLyBubyBwcmVsb2FkZWRcblxuLy8gbm8gSE1SXG5cbi8vIG5vIEhNUiBtYW5pZmVzdFxuXG4vLyBubyBvbiBjaHVua3MgbG9hZGVkXG5cbi8vIG5vIGpzb25wIGZ1bmN0aW9uIiwiX193ZWJwYWNrX3JlcXVpcmVfXy5uYyA9IHVuZGVmaW5lZDsiLCJpbXBvcnQgJy4vc3R5bGVzLmNzcyc7XG5pbXBvcnQge2luaXRCb29rc30gZnJvbSAnLi9ib29rcyc7XG5pbXBvcnQge2luaXRDb250cmlidXRvcnN9IGZyb20gJy4vY29udHJpYnV0b3JzJztcbmltcG9ydCB7aW5pdFF1aWxsfSBmcm9tICcuL2luaXRRdWlsbCc7XG5pbXBvcnQge2luaXRRdWlsbFZhbHVlVG9UZXh0QXJlYX0gZnJvbSAnLi9xdWlsbF92YWx1ZV90b190ZXh0YXJlYSc7XG5cbmRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ0RPTUNvbnRlbnRMb2FkZWQnLCAoKSA9PiB7XG4gIGluaXRCb29rcygpO1xuICBpbml0Q29udHJpYnV0b3JzKCk7XG4gIGluaXRRdWlsbCgpO1xuICBpbml0UXVpbGxWYWx1ZVRvVGV4dEFyZWEoKTtcbn0pO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/app/static/js/quill_value_to_textarea.d.ts b/app/static/js/quill_value_to_textarea.d.ts index 58d779c..da88036 100644 --- a/app/static/js/quill_value_to_textarea.d.ts +++ b/app/static/js/quill_value_to_textarea.d.ts @@ -1 +1 @@ -export declare function initQuill(): void; +export declare function initQuillValueToTextArea(): void; diff --git a/app/static/js/src/contributors.d.ts b/app/static/js/src/contributors.d.ts new file mode 100644 index 0000000..c4c3ed3 --- /dev/null +++ b/app/static/js/src/contributors.d.ts @@ -0,0 +1 @@ +export declare function initContributors(): void; diff --git a/app/static/js/src/initQuill.d.ts b/app/static/js/src/initQuill.d.ts new file mode 100644 index 0000000..58d779c --- /dev/null +++ b/app/static/js/src/initQuill.d.ts @@ -0,0 +1 @@ +export declare function initQuill(): void; diff --git a/app/static/js/src/main.d.ts b/app/static/js/src/main.d.ts new file mode 100644 index 0000000..46dea45 --- /dev/null +++ b/app/static/js/src/main.d.ts @@ -0,0 +1 @@ +import './styles.css'; diff --git a/app/static/js/src/quill.d.ts b/app/static/js/src/quill.d.ts new file mode 100644 index 0000000..58d779c --- /dev/null +++ b/app/static/js/src/quill.d.ts @@ -0,0 +1 @@ +export declare function initQuill(): void; diff --git a/app/static/js/src/quill_value_to_textarea.d.ts b/app/static/js/src/quill_value_to_textarea.d.ts new file mode 100644 index 0000000..da88036 --- /dev/null +++ b/app/static/js/src/quill_value_to_textarea.d.ts @@ -0,0 +1 @@ +export declare function initQuillValueToTextArea(): void; diff --git a/app/templates/base.html b/app/templates/base.html index d46daf6..7b79611 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -93,29 +93,6 @@ {% endblock %} - - - - - {% block scripts %} {% endblock %} diff --git a/src/initQuill.ts b/src/initQuill.ts new file mode 100644 index 0000000..06c6c73 --- /dev/null +++ b/src/initQuill.ts @@ -0,0 +1,20 @@ +const Quill = require('./quill'); + +export function initQuill() { + var toolbarOptions = [ + ['bold', 'italic', 'underline'], + [{list: 'ordered'}, {list: 'bullet'}], + [{header: [1, 2, 3, 4, 5, 6, false]}], + [{indent: '-1'}, {indent: '+1'}], + ['clean'], + ]; + const editorElement = document.querySelector('#editor'); + if (editorElement) { + var quill = new Quill('#editor', { + theme: 'snow', + modules: { + toolbar: toolbarOptions, + }, + }); + } +} diff --git a/src/main.ts b/src/main.ts index fd77dda..a2a43da 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,10 +1,12 @@ import './styles.css'; import {initBooks} from './books'; import {initContributors} from './contributors'; -import {initQuill} from './quill_value_to_textarea'; +import {initQuill} from './initQuill'; +import {initQuillValueToTextArea} from './quill_value_to_textarea'; document.addEventListener('DOMContentLoaded', () => { initBooks(); initContributors(); initQuill(); + initQuillValueToTextArea(); }); diff --git a/app/static/js/quill.js b/src/quill.js similarity index 100% rename from app/static/js/quill.js rename to src/quill.js diff --git a/src/quill_value_to_textarea.ts b/src/quill_value_to_textarea.ts index acbec54..5242470 100644 --- a/src/quill_value_to_textarea.ts +++ b/src/quill_value_to_textarea.ts @@ -3,13 +3,10 @@ const quill_value_to_textarea = (): undefined => { const qlEditor: HTMLButtonElement = document.querySelector('.ql-editor'); const editorContent = qlEditor.innerHTML; aboutInput.value = editorContent; - - console.log(editorContent); - return undefined; }; -export function initQuill() { +export function initQuillValueToTextArea() { const qlEditor: HTMLButtonElement = document.querySelector('.ql-editor'); if (!qlEditor) {