"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["dynamic-editview-primevue-calendar","dynamic-editview-primevue-button"],{4325:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var primevue_ripple__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4019);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5166);\n\n\n\nvar script = {\n name: 'Button',\n props: {\n label: {\n type: String\n },\n icon: {\n type: String\n },\n iconPos: {\n type: String,\n default: 'left'\n },\n badge: {\n type: String\n },\n badgeClass: {\n type: String,\n default: null\n },\n loading: {\n type: Boolean,\n default: false\n },\n loadingIcon: {\n type: String,\n default: 'pi pi-spinner pi-spin'\n }\n },\n computed: {\n buttonClass() {\n return {\n 'p-button p-component': true,\n 'p-button-icon-only': this.icon && !this.label,\n 'p-button-vertical': (this.iconPos === 'top' || this.iconPos === 'bottom') && this.label,\n 'p-disabled': this.$attrs.disabled || this.loading,\n 'p-button-loading': this.loading,\n 'p-button-loading-label-only': this.loading && !this.icon && this.label\n }\n },\n iconClass() {\n return [\n this.loading ? 'p-button-loading-icon ' + this.loadingIcon : this.icon,\n 'p-button-icon',\n {\n 'p-button-icon-left': this.iconPos === 'left' && this.label,\n 'p-button-icon-right': this.iconPos === 'right' && this.label,\n 'p-button-icon-top': this.iconPos === 'top' && this.label,\n 'p-button-icon-bottom': this.iconPos === 'bottom' && this.label\n }\n ]\n },\n badgeStyleClass() {\n return [\n 'p-badge p-component', this.badgeClass, {\n 'p-badge-no-gutter': this.badge && String(this.badge).length === 1\n }]\n },\n disabled() {\n return this.$attrs.disabled || this.loading;\n }\n },\n directives: {\n 'ripple': primevue_ripple__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z\n }\n};\n\nconst _hoisted_1 = { class: \"p-button-label\" };\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _directive_ripple = (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .resolveDirective */ .Q2)(\"ripple\");\n\n return (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .withDirectives */ .wy)(((0,vue__WEBPACK_IMPORTED_MODULE_1__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .createBlock */ .j4)(\"button\", {\n class: $options.buttonClass,\n type: \"button\",\n disabled: $options.disabled\n }, [\n (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .renderSlot */ .WI)(_ctx.$slots, \"default\", {}, () => [\n ($props.loading && !$props.icon)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_1__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .createBlock */ .j4)(\"span\", {\n key: 0,\n class: $options.iconClass\n }, null, 2))\n : (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .createCommentVNode */ .kq)(\"\", true),\n ($props.icon)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_1__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .createBlock */ .j4)(\"span\", {\n key: 1,\n class: $options.iconClass\n }, null, 2))\n : (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .createCommentVNode */ .kq)(\"\", true),\n (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .createVNode */ .Wm)(\"span\", _hoisted_1, (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .toDisplayString */ .zw)($props.label||' '), 1),\n ($props.badge)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_1__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .createBlock */ .j4)(\"span\", {\n key: 2,\n class: $options.badgeStyleClass\n }, (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .toDisplayString */ .zw)($props.badge), 3))\n : (0,vue__WEBPACK_IMPORTED_MODULE_1__/* .createCommentVNode */ .kq)(\"\", true)\n ])\n ], 10, [\"disabled\"])), [\n [_directive_ripple]\n ])\n}\n\nscript.render = render;\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (script);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMyNS5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBcUM7QUFDd0c7O0FBRTdJO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQSxhQUFhO0FBQ2IsU0FBUztBQUNUO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBLGtCQUFrQixnRUFBTTtBQUN4QjtBQUNBOztBQUVBLHFCQUFxQjs7QUFFckI7QUFDQSw0QkFBNEIsK0RBQWdCOztBQUU1QyxTQUFTLDZEQUFjLEVBQUUsd0RBQVMsSUFBSSwwREFBVztBQUNqRDtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0gsSUFBSSx5REFBVSwyQkFBMkI7QUFDekM7QUFDQSxXQUFXLHdEQU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ICAgfSxcbiAgICAgICAgYmFkZ2U6IHtcbiAgICAgICAgICAgIHR5cGU6IFN0cmluZ1xuICAgICAgICB9LFxuICAgICAgICBiYWRnZUNsYXNzOiB7XG4gICAgICAgICAgICB0eXBlOiBTdHJpbmcsXG4gICAgICAgICAgICBkZWZhdWx0OiBudWxsXG4gICAgICAgIH0sXG4gICAgICAgIGxvYWRpbmc6IHtcbiAgICAgICAgICAgIHR5cGU6IEJvb2xlYW4sXG4gICAgICAgICAgICBkZWZhdWx0OiBmYWxzZVxuICAgICAgICB9LFxuICAgICAgICBsb2FkaW5nSWNvbjoge1xuICAgICAgICAgICAgdHlwZTogU3RyaW5nLFxuICAgICAgICAgICAgZGVmYXVsdDogJ3BpIHBpLXNwaW5uZXIgcGktc3BpbidcbiAgICAgICAgfVxuICAgIH0sXG4gICAgY29tcHV0ZWQ6IHtcbiAgICAgICAgYnV0dG9uQ2xhc3MoKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICdwLWJ1dHRvbiBwLWNvbXBvbmVudCc6IHRydWUsXG4gICAgICAgICAgICAgICAgJ3AtYnV0dG9uLWljb24tb25seSc6IHRoaXMuaWNvbiAmJiAhdGhpcy5sYWJlbCxcbiAgICAgICAgICAgICAgICAncC1idXR0b24tdmVydGljYWwnOiAodGhpcy5pY29uUG9zID09PSAndG9wJyB8fCB0aGlzLmljb25Qb3MgPT09ICdib3R0b20nKSAmJiB0aGlzLmxhYmVsLFxuICAgICAgICAgICAgICAgICdwLWRpc2FibGVkJzogdGhpcy4kYXR0cnMuZGlzYWJsZWQgfHwgdGhpcy5sb2FkaW5nLFxuICAgICAgICAgICAgICAgICdwLWJ1dHRvbi1sb2FkaW5nJzogdGhpcy5sb2FkaW5nLFxuICAgICAgICAgICAgICAgICdwLWJ1dHRvbi1sb2FkaW5nLWxhYmVsLW9ubHknOiB0aGlzLmxvYWRpbmcgJiYgIXRoaXMuaWNvbiAmJiB0aGlzLmxhYmVsXG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGljb25DbGFzcygpIHtcbiAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgdGhpcy5sb2FkaW5nID8gJ3AtYnV0dG9uLWxvYWRpbmctaWNvbiAnICsgdGhpcy5sb2FkaW5nSWNvbiA6IHRoaXMuaWNvbixcbiAgICAgICAgICAgICAgICAncC1idXR0b24taWNvbicsXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAncC1idXR0b24taWNvbi1sZWZ0JzogdGhpcy5pY29uUG9zID09PSAnbGVmdCcgJiYgdGhpcy5sYWJlbCxcbiAgICAgICAgICAgICAgICAgICAgJ3AtYnV0dG9uLWljb24tcmlnaHQnOiB0aGlzLmljb25Qb3MgPT09ICdyaWdodCcgJiYgdGhpcy5sYWJlbCxcbiAgICAgICAgICAgICAgICAgICAgJ3AtYnV0dG9uLWljb24tdG9wJzogdGhpcy5pY29uUG9zID09PSAndG9wJyAmJiB0aGlzLmxhYmVsLFxuICAgICAgICAgICAgICAgICAgICAncC1idXR0b24taWNvbi1ib3R0b20nOiB0aGlzLmljb25Qb3MgPT09ICdib3R0b20nICYmIHRoaXMubGFiZWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBdXG4gICAgICAgIH0sXG4gICAgICAgIGJhZGdlU3R5bGVDbGFzcygpIHtcbiAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgJ3AtYmFkZ2UgcC1jb21wb25lbnQnLCB0aGlzLmJhZGdlQ2xhc3MsIHtcbiAgICAgICAgICAgICAgICAncC1iYWRnZS1uby1ndXR0ZXInOiB0aGlzLmJhZGdlICYmIFN0cmluZyh0aGlzLmJhZGdlKS5sZW5ndGggPT09IDFcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH0sXG4gICAgICAgIGRpc2FibGVkKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuJGF0dHJzLmRpc2FibGVkIHx8IH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ICAgfSwgbnVsbCwgMikpXG4gICAgICAgIDogY3JlYXRlQ29tbWVudFZOb2RlKFwiXCIsIHRydWUpLFxuICAgICAgY3JlYXRlVk5vZGUoXCJzcGFuXCIsIF9ob2lzdGVkXzEsIHRvRGlzcGxheVN0cmluZygkcHJvcHMubGFiZWx8fCfCoCcpLCAxKSxcbiAgICAgICgkcHJvcHMuYmFkZ2UpXG4gICAgICAgID8gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcInNwYW5cIiwge1xuICAgICAgICAgICAga2V5OiAyLFxuICAgICAgICAgICAgY2xhc3M6ICRvcHRpb25zLmJhZGdlU3R5bGVDbGFzc1xuICAgICAgICAgIH0sIHRvRGlzcGxheVN0cmluZygkcHJvcHMuYmFkZ2UpLCAzKSlcbiAgICAgICAgOiBjcmVhdGVDb21tZW50Vk5vZGUoXCJcIiwgdHJ1ZSlcbiAgICBdKVxuICBdLCAxMCwgW1wiZGlzYWJsZWRcIl0pKSwgW1xuICAgIFtfZGlyZWN0aXZlX3JpcHBsZV1cbiAgXSlcbn1cblxuc2NyaXB0LnJlbmRlciA9IHJlbmRlcjtcblxuZXhwb3J0IGRlZmF1bHQgc2NyaXB0O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///4325\n")},8223:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var primevue_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6954);\n/* harmony import */ var primevue_overlayeventbus__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(590);\n/* harmony import */ var primevue_inputtext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6076);\n/* harmony import */ var primevue_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4325);\n/* harmony import */ var primevue_ripple__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4019);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5166);\n\n\n\n\n\n\n\nvar script = {\n name: \'Calendar\',\n inheritAttrs: false,\n emits: [\'show\', \'hide\', \'month-change\', \'year-change\', \'date-select\', \'update:modelValue\', \'today-click\', \'clear-click\'],\n props: {\n modelValue: null,\n selectionMode: {\n type: String,\n default: \'single\'\n },\n dateFormat: {\n type: String,\n default: null\n },\n inline: {\n type: Boolean,\n default: false\n },\n showOtherMonths: {\n type: Boolean,\n default: true\n },\n selectOtherMonths: {\n type: Boolean,\n default: false\n },\n showIcon: {\n type: Boolean,\n default: false\n },\n icon: {\n type: String,\n default: \'pi pi-calendar\'\n },\n numberOfMonths: {\n type: Number,\n default: 1\n },\n responsiveOptions: Array,\n view: {\n type: String,\n default: \'date\'\n },\n touchUI: {\n type: Boolean,\n default: false\n },\n monthNavigator: {\n type: Boolean,\n default: false\n },\n yearNavigator: {\n type: Boolean,\n default: false\n },\n yearRange: {\n type: String,\n default: null\n },\n panelClass: {\n type: String,\n default: null\n },\n minDate: {\n type: Date,\n value: null\n },\n maxDate: {\n type: Date,\n value: null\n },\n disabledDates: {\n type: Array,\n value: null\n },\n disabledDays: {\n type: Array,\n value: null\n },\n maxDateCount: {\n type: Number,\n value: null\n },\n showOnFocus: {\n type: Boolean,\n default: true\n },\n autoZIndex: {\n type: Boolean,\n default: true\n },\n baseZIndex: {\n type: Number,\n default: 0\n },\n showButtonBar: {\n type: Boolean,\n default: false\n },\n shortYearCutoff: {\n type: String,\n default: \'+10\'\n },\n showTime: {\n type: Boolean,\n default: false\n },\n timeOnly: {\n type: Boolean,\n default: false\n },\n hourFormat: {\n type: String,\n default: \'24\'\n },\n stepHour: {\n type: Number,\n default: 1\n },\n stepMinute: {\n type: Number,\n default: 1\n },\n stepSecond: {\n type: Number,\n default: 1\n },\n showSeconds: {\n type: Boolean,\n default: false\n },\n hideOnDateTimeSelect: {\n type: Boolean,\n default: false\n },\n timeSeparator: {\n type: String,\n default: \':\'\n },\n showWeek: {\n type: Boolean,\n default: false\n },\n manualInput: {\n type: Boolean,\n default: true\n },\n appendTo: {\n type: String,\n default: \'body\'\n },\n keepInvalid: {\n type: Boolean,\n default: false\n },\n inputClass: null,\n inputStyle: null,\n class: null,\n style: null\n },\n navigationState: null,\n timePickerChange: false,\n scrollHandler: null,\n outsideClickListener: null,\n maskClickListener: null,\n resizeListener: null,\n overlay: null,\n mask: null,\n timePickerTimer: null,\n created() {\n this.updateCurrentMetaData();\n },\n mounted() {\n this.createResponsiveStyle();\n\n if (this.inline) {\n this.overlay && this.overlay.setAttribute(this.attributeSelector, \'\');\n\n if (!this.$attrs.disabled) {\n this.initFocusableCell();\n\n if (this.numberOfMonths === 1) {\n this.overlay.style.width = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getOuterWidth */ .p7.getOuterWidth(this.$el) + \'px\';\n }\n }\n }\n },\n updated() {\n if (this.overlay) {\n this.updateFocus();\n }\n\n if (this.$refs.input && this.selectionStart != null && this.selectionEnd != null) {\n this.$refs.input.$el.selectionStart = this.selectionStart;\n this.$refs.input.$el.selectionEnd = this.selectionEnd;\n this.selectionStart = null;\n this.selectionEnd = null;\n }\n },\n beforeUnmount() {\n if (this.timePickerTimer) {\n clearTimeout(this.timePickerTimer);\n }\n\n if (this.mask) {\n this.destroyMask();\n }\n this.destroyResponsiveStyleElement();\n\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n\n if (this.overlay && this.autoZIndex) {\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .ZIndexUtils.clear */ .P9.clear(this.overlay);\n }\n this.overlay = null;\n },\n data() {\n return {\n currentMonth: null,\n currentYear: null,\n currentHour: null,\n currentMinute: null,\n currentSecond: null,\n pm: null,\n\t\t\tfocused: false,\n overlayVisible: false,\n currentView: this.view\n }\n },\n watch: {\n modelValue() {\n this.updateCurrentMetaData();\n },\n showTime() {\n this.updateCurrentMetaData();\n },\n months() {\n if (this.overlay) {\n setTimeout(this.updateFocus, 0);\n }\n },\n numberOfMonths() {\n this.destroyResponsiveStyleElement();\n this.createResponsiveStyle();\n },\n responsiveOptions() {\n this.destroyResponsiveStyleElement();\n this.createResponsiveStyle();\n }\n },\n methods: {\n isComparable() {\n return this.modelValue != null && typeof this.modelValue !== \'string\';\n },\n isSelected(dateMeta) {\n if (!this.isComparable()) {\n return false;\n }\n\n if (this.modelValue) {\n if (this.isSingleSelection()) {\n return this.isDateEquals(this.modelValue, dateMeta);\n }\n else if (this.isMultipleSelection()) {\n let selected = false;\n for (let date of this.modelValue) {\n selected = this.isDateEquals(date, dateMeta);\n if (selected) {\n break;\n }\n }\n\n return selected;\n }\n else if( this.isRangeSelection()) {\n if (this.modelValue[1])\n return this.isDateEquals(this.modelValue[0], dateMeta) || this.isDateEquals(this.modelValue[1], dateMeta) || this.isDateBetween(this.modelValue[0], this.modelValue[1], dateMeta);\n else {\n return this.isDateEquals(this.modelValue[0], dateMeta);\n }\n\n }\n }\n\n return false;\n },\n isMonthSelected(month) {\n return this.isComparable() ? (this.modelValue.getMonth() === month && this.modelValue.getFullYear() === this.currentYear) : false;\n },\n isYearSelected(year) {\n return this.isComparable() ? (this.modelValue.getFullYear() === year) : false;\n },\n isDateEquals(value, dateMeta) {\n if (value)\n return value.getDate() === dateMeta.day && value.getMonth() === dateMeta.month && value.getFullYear() === dateMeta.year;\n else\n return false;\n },\n isDateBetween(start, end, dateMeta) {\n let between = false;\n if (start && end) {\n let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);\n return start.getTime() <= date.getTime() && end.getTime() >= date.getTime();\n }\n\n return between;\n },\n getFirstDayOfMonthIndex(month, year) {\n let day = new Date();\n day.setDate(1);\n day.setMonth(month);\n day.setFullYear(year);\n\n let dayIndex = day.getDay() + this.sundayIndex;\n return dayIndex >= 7 ? dayIndex - 7 : dayIndex;\n },\n getDaysCountInMonth(month, year) {\n return 32 - this.daylightSavingAdjust(new Date(year, month, 32)).getDate();\n },\n getDaysCountInPrevMonth(month, year) {\n let prev = this.getPreviousMonthAndYear(month, year);\n return this.getDaysCountInMonth(prev.month, prev.year);\n },\n getPreviousMonthAndYear(month, year) {\n let m, y;\n\n if (month === 0) {\n m = 11;\n y = year - 1;\n }\n else {\n m = month - 1;\n y = year;\n }\n\n return {\'month\':m, \'year\': y};\n },\n getNextMonthAndYear(month, year) {\n let m, y;\n\n if (month === 11) {\n m = 0;\n y = year + 1;\n }\n else {\n m = month + 1;\n y = year;\n }\n\n return {\'month\':m,\'year\':y};\n },\n daylightSavingAdjust(date) {\n if (!date) {\n return null;\n }\n\n date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);\n\n return date;\n },\n isToday(today, day, month, year) {\n return today.getDate() === day && today.getMonth() === month && today.getFullYear() === year;\n },\n isSelectable(day, month, year, otherMonth) {\n let validMin = true;\n let validMax = true;\n let validDate = true;\n let validDay = true;\n\n if (otherMonth && !this.selectOtherMonths) {\n return false;\n }\n\n if (this.minDate) {\n if (this.minDate.getFullYear() > year) {\n validMin = false;\n }\n else if (this.minDate.getFullYear() === year) {\n if (this.minDate.getMonth() > month) {\n validMin = false;\n }\n else if (this.minDate.getMonth() === month) {\n if (this.minDate.getDate() > day) {\n validMin = false;\n }\n }\n }\n }\n\n if (this.maxDate) {\n if (this.maxDate.getFullYear() < year) {\n validMax = false;\n }\n else if (this.maxDate.getFullYear() === year) {\n if (this.maxDate.getMonth() < month) {\n validMax = false;\n }\n else if (this.maxDate.getMonth() === month) {\n if (this.maxDate.getDate() < day) {\n validMax = false;\n }\n }\n }\n }\n\n if (this.disabledDates) {\n validDate = !this.isDateDisabled(day,month,year);\n }\n\n if (this.disabledDays) {\n validDay = !this.isDayDisabled(day,month,year);\n }\n\n return validMin && validMax && validDate && validDay;\n },\n onOverlayEnter(el) {\n el.setAttribute(this.attributeSelector, \'\');\n\n if (this.autoZIndex) {\n if (this.touchUI)\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .ZIndexUtils.set */ .P9.set(\'modal\', el, this.baseZIndex || this.$primevue.config.zIndex.modal);\n else\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .ZIndexUtils.set */ .P9.set(\'overlay\', el, this.baseZIndex || this.$primevue.config.zIndex.overlay);\n }\n\n this.alignOverlay();\n this.$emit(\'show\');\n },\n onOverlayEnterComplete() {\n this.bindOutsideClickListener();\n this.bindScrollListener();\n this.bindResizeListener();\n },\n onOverlayAfterLeave(el) {\n if (this.autoZIndex) {\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .ZIndexUtils.clear */ .P9.clear(el);\n }\n },\n onOverlayLeave() {\n this.currentView = this.view;\n this.unbindOutsideClickListener();\n this.unbindScrollListener();\n this.unbindResizeListener();\n this.$emit(\'hide\');\n\n if (this.mask) {\n this.disableModality();\n }\n\n this.overlay = null;\n },\n onPrevButtonClick(event) {\n if(this.showOtherMonths) {\n this.navigationState = {backward: true, button: true};\n this.navBackward(event);\n }\n },\n onNextButtonClick(event) {\n if(this.showOtherMonths) {\n this.navigationState = {backward: false, button: true};\n this.navForward(event);\n }\n },\n navBackward(event) {\n event.preventDefault();\n\n if (!this.isEnabled()) {\n return;\n }\n\n if (this.currentView === \'month\') {\n this.decrementYear();\n }\n else if (this.currentView === \'year\') {\n this.decrementDecade();\n }\n else {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.decrementYear();\n }\n else {\n this.currentMonth--;\n }\n\n this.$emit(\'month-change\', {month: this.currentMonth, year: this.currentYear});\n }\n },\n navForward(event) {\n event.preventDefault();\n\n if (!this.isEnabled()) {\n return;\n }\n\n if (this.currentView === \'month\') {\n this.incrementYear();\n }\n else if (this.currentView === \'year\') {\n this.incrementDecade();\n }\n else {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.incrementYear();\n }\n else {\n this.currentMonth++;\n }\n\n this.$emit(\'month-change\', {month: this.currentMonth , year: this.currentYear});\n }\n },\n decrementYear() {\n this.currentYear--;\n },\n decrementDecade() {\n this.currentYear = this.currentYear - 10;\n },\n incrementYear() {\n this.currentYear++;\n },\n incrementDecade() {\n this.currentYear = this.currentYear + 10;\n },\n switchToMonthView(event) {\n this.currentView = \'month\';\n setTimeout(this.updateFocus, 0);\n event.preventDefault();\n },\n switchToYearView(event) {\n this.currentView = \'year\';\n setTimeout(this.updateFocus, 0);\n event.preventDefault();\n },\n isEnabled() {\n return !this.$attrs.disabled && !this.$attrs.readonly;\n },\n updateCurrentTimeMeta(date) {\n let currentHour = date.getHours();\n\n if (this.hourFormat === \'12\') {\n this.pm = currentHour > 11;\n\n if (currentHour >= 12)\n currentHour = (currentHour == 12) ? 12 : currentHour - 12;\n else\n currentHour = (currentHour == 0) ? 12 : currentHour;\n }\n\n this.currentHour = Math.floor(currentHour / this.stepHour) * this.stepHour;\n this.currentMinute = Math.floor(date.getMinutes() / this.stepMinute) * this.stepMinute;\n this.currentSecond = Math.floor(date.getSeconds() / this.stepSecond) * this.stepSecond;\n },\n bindOutsideClickListener() {\n if (!this.outsideClickListener) {\n this.outsideClickListener = (event) => {\n if (this.overlayVisible && this.isOutsideClicked(event)) {\n this.overlayVisible = false;\n }\n };\n document.addEventListener(\'mousedown\', this.outsideClickListener);\n }\n },\n unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener(\'mousedown\', this.outsideClickListener);\n this.outsideClickListener = null;\n }\n },\n bindScrollListener() {\n if (!this.scrollHandler) {\n this.scrollHandler = new primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .ConnectedOverlayScrollHandler */ .Vr(this.$refs.container, () => {\n if (this.overlayVisible) {\n this.overlayVisible = false;\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n },\n unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n },\n bindResizeListener() {\n if (!this.resizeListener) {\n this.resizeListener = () => {\n if (this.overlayVisible) {\n this.overlayVisible = false;\n }\n };\n window.addEventListener(\'resize\', this.resizeListener);\n }\n },\n unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener(\'resize\', this.resizeListener);\n this.resizeListener = null;\n }\n },\n isOutsideClicked(event) {\n return !(this.$el.isSameNode(event.target) || this.isNavIconClicked(event) ||\n this.$el.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));\n },\n isNavIconClicked(event) {\n return (primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.hasClass */ .p7.hasClass(event.target, \'p-datepicker-prev\') || primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.hasClass */ .p7.hasClass(event.target, \'p-datepicker-prev-icon\')\n || primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.hasClass */ .p7.hasClass(event.target, \'p-datepicker-next\') || primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.hasClass */ .p7.hasClass(event.target, \'p-datepicker-next-icon\'));\n },\n alignOverlay() {\n if (this.touchUI) {\n this.enableModality();\n }\n else if (this.overlay) {\n if (this.appendDisabled) {\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.relativePosition */ .p7.relativePosition(this.overlay, this.$el);\n }\n else {\n if (this.view === \'date\') {\n this.overlay.style.width = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getOuterWidth */ .p7.getOuterWidth(this.overlay) + \'px\';\n this.overlay.style.minWidth = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getOuterWidth */ .p7.getOuterWidth(this.$el) + \'px\';\n }\n else {\n this.overlay.style.width = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getOuterWidth */ .p7.getOuterWidth(this.$el) + \'px\';\n }\n\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.absolutePosition */ .p7.absolutePosition(this.overlay, this.$el);\n }\n }\n },\n onButtonClick() {\n if (this.isEnabled()) {\n if (!this.overlayVisible) {\n this.$refs.input.$el.focus();\n this.overlayVisible = true;\n }\n else {\n this.overlayVisible = false;\n }\n }\n },\n isDateDisabled(day, month, year) {\n if (this.disabledDates) {\n for (let disabledDate of this.disabledDates) {\n if (disabledDate.getFullYear() === year && disabledDate.getMonth() === month && disabledDate.getDate() === day) {\n return true;\n }\n }\n }\n\n return false;\n },\n isDayDisabled(day, month, year) {\n if (this.disabledDays) {\n let weekday = new Date(year, month, day);\n let weekdayNumber = weekday.getDay();\n return this.disabledDays.indexOf(weekdayNumber) !== -1;\n }\n return false;\n },\n onMonthDropdownChange(value) {\n this.currentMonth = parseInt(value);\n this.$emit(\'month-change\', {month: this.currentMonth + 1, year: this.currentYear});\n },\n onYearDropdownChange(value) {\n this.currentYear = parseInt(value);\n this.$emit(\'year-change\', {month: this.currentMonth + 1, year: this.currentYear});\n },\n onDateSelect(event, dateMeta) {\n if (this.$attrs.disabled || !dateMeta.selectable) {\n return;\n }\n\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.find */ .p7.find(this.overlay, \'.p-datepicker-calendar td span:not(.p-disabled)\').forEach(cell => cell.tabIndex = -1);\n\n if (event) {\n event.currentTarget.focus();\n }\n\n if (this.isMultipleSelection() && this.isSelected(dateMeta)) {\n let newValue = this.modelValue.filter(date => !this.isDateEquals(date, dateMeta));\n this.updateModel(newValue);\n }\n else {\n if (this.shouldSelectDate(dateMeta)) {\n if (dateMeta.otherMonth) {\n this.currentMonth = dateMeta.month;\n this.currentYear = dateMeta.year;\n this.selectDate(dateMeta);\n }\n else {\n this.selectDate(dateMeta);\n }\n }\n }\n\n if (this.isSingleSelection() && (!this.showTime || this.hideOnDateTimeSelect)) {\n setTimeout(() => {\n this.overlayVisible = false;\n }, 150);\n }\n },\n selectDate(dateMeta) {\n let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);\n\n if (this.showTime) {\n if (this.hourFormat === \'12\' && this.pm && this.currentHour != 12)\n date.setHours(this.currentHour + 12);\n else\n date.setHours(this.currentHour);\n\n date.setMinutes(this.currentMinute);\n date.setSeconds(this.currentSecond);\n }\n\n if (this.minDate && this.minDate > date) {\n date = this.minDate;\n this.currentHour = date.getHours();\n this.currentMinute = date.getMinutes();\n this.currentSecond = date.getSeconds();\n }\n\n if (this.maxDate && this.maxDate < date) {\n date = this.maxDate;\n this.currentHour = date.getHours();\n this.currentMinute = date.getMinutes();\n this.currentSecond = date.getSeconds();\n }\n\n let modelVal = null;\n\n if (this.isSingleSelection()) {\n modelVal = date;\n }\n else if (this.isMultipleSelection()) {\n modelVal = this.modelValue ? [...this.modelValue, date] : [date];\n }\n else if (this.isRangeSelection()) {\n if (this.modelValue && this.modelValue.length) {\n let startDate = this.modelValue[0];\n let endDate = this.modelValue[1];\n\n if (!endDate && date.getTime() >= startDate.getTime()) {\n endDate = date;\n }\n else {\n startDate = date;\n endDate = null;\n }\n modelVal = [startDate, endDate];\n }\n else {\n modelVal = [date, null];\n }\n }\n\n if (modelVal !== null) {\n this.updateModel(modelVal);\n }\n this.$emit(\'date-select\', date);\n },\n updateModel(value) {\n this.$emit(\'update:modelValue\', value);\n },\n shouldSelectDate() {\n if (this.isMultipleSelection())\n return this.maxDateCount != null ? this.maxDateCount > (this.modelValue ? this.modelValue.length : 0) : true;\n else\n return true;\n },\n isSingleSelection() {\n return this.selectionMode === \'single\';\n },\n isRangeSelection() {\n return this.selectionMode === \'range\';\n },\n isMultipleSelection() {\n return this.selectionMode === \'multiple\';\n },\n formatValue(value) {\n if (typeof value === \'string\') {\n return value;\n }\n\n let formattedValue = \'\';\n if (value) {\n try {\n if (this.isSingleSelection()) {\n formattedValue = this.formatDateTime(value);\n }\n else if (this.isMultipleSelection()) {\n for(let i = 0; i < value.length; i++) {\n let dateAsString = this.formatDateTime(value[i]);\n formattedValue += dateAsString;\n if(i !== (value.length - 1)) {\n formattedValue += \', \';\n }\n }\n }\n else if (this.isRangeSelection()) {\n if (value && value.length) {\n let startDate = value[0];\n let endDate = value[1];\n\n formattedValue = this.formatDateTime(startDate);\n if (endDate) {\n formattedValue += \' - \' + this.formatDateTime(endDate);\n }\n }\n }\n }\n catch(err) {\n formattedValue = value;\n }\n }\n\n return formattedValue;\n },\n formatDateTime(date) {\n let formattedValue = null;\n if (date) {\n if(this.timeOnly) {\n formattedValue = this.formatTime(date);\n }\n else {\n formattedValue = this.formatDate(date, this.datePattern);\n if(this.showTime) {\n formattedValue += \' \' + this.formatTime(date);\n }\n }\n }\n\n return formattedValue;\n },\n formatDate(date, format) {\n if (!date) {\n return \'\';\n }\n\n let iFormat;\n const lookAhead = (match) => {\n const matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n if (matches) {\n iFormat++;\n }\n return matches;\n },\n formatNumber = (match, value, len) => {\n let num = \'\' + value;\n if (lookAhead(match)) {\n while (num.length < len) {\n num = \'0\' + num;\n }\n }\n return num;\n },\n formatName = (match, value, shortNames, longNames) => {\n return (lookAhead(match) ? longNames[value] : shortNames[value]);\n };\n let output = \'\';\n let literal = false;\n\n if (date) {\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === \'\\\'\' && !lookAhead(\'\\\'\')) {\n literal = false;\n } else {\n output += format.charAt(iFormat);\n }\n } else {\n switch (format.charAt(iFormat)) {\n case \'d\':\n output += formatNumber(\'d\', date.getDate(), 2);\n break;\n case \'D\':\n output += formatName(\'D\', date.getDay(), this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);\n break;\n case \'o\':\n output += formatNumber(\'o\',\n Math.round((\n new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() -\n new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);\n break;\n case \'m\':\n output += formatNumber(\'m\', date.getMonth() + 1, 2);\n break;\n case \'M\':\n output += formatName(\'M\',date.getMonth(), this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);\n break;\n case \'y\':\n output += lookAhead(\'y\') ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? \'0\' : \'\') + (date.getFullYear() % 100);\n break;\n case \'@\':\n output += date.getTime();\n break;\n case \'!\':\n output += date.getTime() * 10000 + this.ticksTo1970;\n break;\n case \'\\\'\':\n if (lookAhead(\'\\\'\')) {\n output += \'\\\'\';\n } else {\n literal = true;\n }\n break;\n default:\n output += format.charAt(iFormat);\n }\n }\n }\n }\n return output;\n },\n formatTime(date) {\n if (!date) {\n return \'\';\n }\n\n let output = \'\';\n let hours = date.getHours();\n let minutes = date.getMinutes();\n let seconds = date.getSeconds();\n\n if (this.hourFormat === \'12\' && hours > 11 && hours !== 12) {\n hours -= 12;\n }\n\n if (this.hourFormat === \'12\') {\n output += hours === 0 ? 12 : (hours < 10) ? \'0\' + hours : hours;\n }\n else {\n output += (hours < 10) ? \'0\' + hours : hours;\n }\n output += \':\';\n output += (minutes < 10) ? \'0\' + minutes : minutes;\n\n if (this.showSeconds) {\n output += \':\';\n output += (seconds < 10) ? \'0\' + seconds : seconds;\n }\n\n if (this.hourFormat === \'12\') {\n output += date.getHours() > 11 ? \' PM\' : \' AM\';\n }\n\n return output;\n },\n onTodayButtonClick(event) {\n let date = new Date();\n let dateMeta = {\n day: date.getDate(),\n month: date.getMonth(),\n year: date.getFullYear(),\n otherMonth: date.getMonth() !== this.currentMonth || date.getFullYear() !== this.currentYear,\n today: true,\n selectable: true\n };\n\n this.onDateSelect(null, dateMeta);\n this.$emit(\'today-click\', date);\n event.preventDefault();\n },\n onClearButtonClick(event) {\n this.updateModel(null);\n this.overlayVisible = false;\n this.$emit(\'clear-click\', event);\n event.preventDefault();\n },\n onTimePickerElementMouseDown(event, type, direction) {\n if (this.isEnabled()) {\n this.repeat(event, null, type, direction);\n event.preventDefault();\n }\n },\n onTimePickerElementMouseUp(event) {\n if (this.isEnabled()) {\n this.clearTimePickerTimer();\n this.updateModelTime();\n event.preventDefault();\n }\n },\n onTimePickerElementMouseLeave() {\n this.clearTimePickerTimer();\n },\n repeat(event, interval, type, direction) {\n let i = interval||500;\n\n this.clearTimePickerTimer();\n this.timePickerTimer = setTimeout(() => {\n this.repeat(event, 100, type, direction);\n }, i);\n\n switch(type) {\n case 0:\n if (direction === 1)\n this.incrementHour(event);\n else\n this.decrementHour(event);\n break;\n\n case 1:\n if (direction === 1)\n this.incrementMinute(event);\n else\n this.decrementMinute(event);\n break;\n\n case 2:\n if (direction === 1)\n this.incrementSecond(event);\n else\n this.decrementSecond(event);\n break;\n }\n },\n convertTo24Hour(hours, pm) {\n if (this.hourFormat == \'12\') {\n if (hours === 12) {\n return (pm ? 12 : 0);\n } else {\n return (pm ? hours + 12 : hours);\n }\n }\n return hours;\n },\n validateTime(hour, minute, second, pm) {\n let value = this.isComparable() ? this.modelValue : this.viewDate;\n const convertedHour = this.convertTo24Hour(hour, pm);\n\n if (this.isRangeSelection()) {\n value = this.modelValue[1] || this.modelValue[0];\n }\n if (this.isMultipleSelection()) {\n value = this.modelValue[this.modelValue.length - 1];\n }\n const valueDateString = value ? value.toDateString() : null;\n if (this.minDate && valueDateString && this.minDate.toDateString() === valueDateString) {\n if (this.minDate.getHours() > convertedHour) {\n return false;\n }\n if (this.minDate.getHours() === convertedHour) {\n if (this.minDate.getMinutes() > minute) {\n return false;\n }\n if (this.minDate.getMinutes() === minute) {\n if (this.minDate.getSeconds() > second) {\n return false;\n }\n }\n }\n }\n\n if (this.maxDate && valueDateString && this.maxDate.toDateString() === valueDateString) {\n if (this.maxDate.getHours() < convertedHour) {\n return false;\n }\n if (this.maxDate.getHours() === convertedHour) {\n if (this.maxDate.getMinutes() < minute) {\n return false;\n }\n if (this.maxDate.getMinutes() === minute) {\n if (this.maxDate.getSeconds() < second) {\n return false;\n }\n }\n }\n }\n return true;\n },\n incrementHour(event) {\n let prevHour = this.currentHour;\n let newHour = this.currentHour + this.stepHour;\n let newPM = this.pm;\n\n if (this.hourFormat == \'24\')\n newHour = (newHour >= 24) ? (newHour - 24) : newHour;\n else if (this.hourFormat == \'12\') {\n // Before the AM/PM break, now after\n if (prevHour < 12 && newHour > 11) {\n newPM= !this.pm;\n }\n newHour = (newHour >= 13) ? (newHour - 12) : newHour;\n }\n\n if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {\n this.currentHour = newHour;\n this.pm = newPM;\n }\n event.preventDefault();\n },\n decrementHour(event) {\n let newHour = this.currentHour - this.stepHour;\n let newPM = this.pm;\n\n if (this.hourFormat == \'24\')\n newHour = (newHour < 0) ? (24 + newHour) : newHour;\n else if (this.hourFormat == \'12\') {\n // If we were at noon/midnight, then switch\n if (this.currentHour === 12) {\n newPM = !this.pm;\n }\n newHour = (newHour <= 0) ? (12 + newHour) : newHour;\n }\n if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {\n this.currentHour = newHour;\n this.pm = newPM;\n }\n event.preventDefault();\n },\n incrementMinute(event) {\n let newMinute = this.currentMinute + this.stepMinute;\n if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) {\n this.currentMinute = (newMinute > 59) ? newMinute - 60 : newMinute;\n }\n event.preventDefault();\n },\n decrementMinute(event) {\n let newMinute = this.currentMinute - this.stepMinute;\n newMinute = (newMinute < 0) ? 60 + newMinute : newMinute;\n if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) {\n this.currentMinute = newMinute;\n }\n\n event.preventDefault();\n },\n incrementSecond(event) {\n let newSecond = this.currentSecond + this.stepSecond;\n if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) {\n this.currentSecond = (newSecond > 59) ? newSecond - 60 : newSecond;\n }\n\n event.preventDefault();\n },\n decrementSecond(event) {\n let newSecond = this.currentSecond - this.stepSecond;\n newSecond = (newSecond < 0) ? 60 + newSecond : newSecond;\n if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) {\n this.currentSecond = newSecond;\n }\n\n event.preventDefault();\n },\n updateModelTime() {\n this.timePickerChange = true;\n let value = this.isComparable() ? this.modelValue : this.viewDate;\n\n if (this.isRangeSelection()) {\n value = this.modelValue[1] || this.modelValue[0];\n }\n if (this.isMultipleSelection()) {\n value = this.modelValue[this.modelValue.length - 1];\n }\n value = value ? new Date(value.getTime()) : new Date();\n\n if (this.hourFormat == \'12\') {\n if (this.currentHour === 12)\n value.setHours(this.pm ? 12 : 0);\n else\n value.setHours(this.pm ? this.currentHour + 12 : this.currentHour);\n }\n else {\n value.setHours(this.currentHour);\n }\n\n value.setMinutes(this.currentMinute);\n value.setSeconds(this.currentSecond);\n\n if (this.isRangeSelection()) {\n if (this.modelValue[1])\n value = [this.modelValue[0], value];\n else\n value = [value, null];\n }\n\n if (this.isMultipleSelection()){\n value = [...this.modelValue.slice(0, -1), value];\n }\n\n this.updateModel(value);\n this.$emit(\'date-select\', value);\n setTimeout(() => this.timePickerChange = false, 0);\n },\n toggleAMPM(event) {\n this.pm = !this.pm;\n this.updateModelTime();\n event.preventDefault();\n },\n clearTimePickerTimer() {\n if (this.timePickerTimer) {\n clearInterval(this.timePickerTimer);\n }\n },\n onMonthSelect(event, index) {\n if (this.view === \'month\') {\n this.onDateSelect(event, {year: this.currentYear, month: index, day: 1, selectable: true});\n }\n else {\n this.currentMonth = index;\n this.currentView = \'date\';\n this.$emit(\'month-change\', {month: this.currentMonth + 1, year: this.currentYear});\n }\n\n setTimeout(this.updateFocus, 0);\n },\n onYearSelect(event, year) {\n if (this.view === \'year\') {\n this.onDateSelect(event, {year: year, month: 0, day: 1, selectable: true});\n }\n else {\n this.currentYear = year;\n this.currentView = \'month\';\n this.$emit(\'year-change\', {month: this.currentMonth + 1, year: this.currentYear});\n }\n\n setTimeout(this.updateFocus, 0);\n },\n enableModality() {\n if (!this.mask) {\n this.mask = document.createElement(\'div\');\n this.mask.style.zIndex = String(parseInt(this.overlay.style.zIndex, 10) - 1);\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.addMultipleClasses */ .p7.addMultipleClasses(this.mask, \'p-datepicker-mask p-datepicker-mask-scrollblocker p-component-overlay p-component-overlay-enter\');\n\n this.maskClickListener = () => {\n this.overlayVisible = false;\n };\n this.mask.addEventListener(\'click\', this.maskClickListener);\n\n document.body.appendChild(this.mask);\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.addClass */ .p7.addClass(document.body, \'p-overflow-hidden\');\n }\n },\n disableModality() {\n if (this.mask) {\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.addClass */ .p7.addClass(this.mask, \'p-component-overlay-leave\');\n this.mask.addEventListener(\'animationend\', () => {\n this.destroyMask();\n });\n }\n },\n destroyMask() {\n this.mask.removeEventListener(\'click\', this.maskClickListener);\n this.maskClickListener = null;\n document.body.removeChild(this.mask);\n this.mask = null;\n\n let bodyChildren = document.body.children;\n let hasBlockerMasks;\n for (let i = 0; i < bodyChildren.length; i++) {\n let bodyChild = bodyChildren[i];\n if(primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.hasClass */ .p7.hasClass(bodyChild, \'p-datepicker-mask-scrollblocker\')) {\n hasBlockerMasks = true;\n break;\n }\n }\n\n if (!hasBlockerMasks) {\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.removeClass */ .p7.removeClass(document.body, \'p-overflow-hidden\');\n }\n },\n updateCurrentMetaData() {\n const viewDate = this.viewDate;\n this.currentMonth = viewDate.getMonth();\n this.currentYear = viewDate.getFullYear();\n\n if (this.showTime || this.timeOnly) {\n this.updateCurrentTimeMeta(viewDate);\n }\n },\n isValidSelection(value) {\n if (value == null) {\n return true;\n }\n\n let isValid = true;\n if (this.isSingleSelection()) {\n if (!this.isSelectable(value.getDate(), value.getMonth(), value.getFullYear(), false)) {\n isValid = false;\n }\n } else if (value.every(v => this.isSelectable(v.getDate(), v.getMonth(), v.getFullYear(), false))) {\n if (this.isRangeSelection()) {\n isValid = value.length > 1 && value[1] > value[0] ? true : false;\n }\n }\n return isValid;\n },\n parseValue(text) {\n if (!text || text.trim().length === 0) {\n return null;\n }\n\n let value;\n\n if (this.isSingleSelection()) {\n value = this.parseDateTime(text);\n }\n else if (this.isMultipleSelection()) {\n let tokens = text.split(\',\');\n value = [];\n for (let token of tokens) {\n value.push(this.parseDateTime(token.trim()));\n }\n }\n else if (this.isRangeSelection()) {\n let tokens = text.split(\' - \');\n value = [];\n for (let i = 0; i < tokens.length; i++) {\n value[i] = this.parseDateTime(tokens[i].trim());\n }\n }\n\n return value;\n },\n parseDateTime(text) {\n let date;\n let parts = text.split(\' \');\n\n if (this.timeOnly) {\n date = new Date();\n this.populateTime(date, parts[0], parts[1]);\n }\n else {\n const dateFormat = this.datePattern;\n if (this.showTime) {\n date = this.parseDate(parts[0], dateFormat);\n this.populateTime(date, parts[1], parts[2]);\n }\n else {\n date = this.parseDate(text, dateFormat);\n }\n }\n\n return date;\n },\n populateTime(value, timeString, ampm) {\n if (this.hourFormat == \'12\' && !ampm) {\n throw \'Invalid Time\';\n }\n\n this.pm = (ampm === \'PM\' || ampm === \'pm\');\n let time = this.parseTime(timeString);\n value.setHours(time.hour);\n value.setMinutes(time.minute);\n value.setSeconds(time.second);\n },\n parseTime(value) {\n let tokens = value.split(\':\');\n let validTokenLength = this.showSeconds ? 3 : 2;\n let regex = (/^[0-9][0-9]$/);\n\n if (tokens.length !== validTokenLength || !tokens[0].match(regex) || !tokens[1].match(regex) || (this.showSeconds && !tokens[2].match(regex))) {\n throw "Invalid time";\n }\n\n let h = parseInt(tokens[0]);\n let m = parseInt(tokens[1]);\n let s = this.showSeconds ? parseInt(tokens[2]) : null;\n\n if (isNaN(h) || isNaN(m) || h > 23 || m > 59 || (this.hourFormat == \'12\' && h > 12) || (this.showSeconds && (isNaN(s) || s > 59))) {\n throw "Invalid time";\n }\n else {\n if (this.hourFormat == \'12\' && h !== 12 && this.pm) {\n h+= 12;\n }\n\n return {hour: h, minute: m, second: s};\n }\n },\n parseDate(value, format) {\n if (format == null || value == null) {\n throw "Invalid arguments";\n }\n\n value = (typeof value === "object" ? value.toString() : value + "");\n if (value === "") {\n return null;\n }\n\n let iFormat, dim, extra,\n iValue = 0,\n shortYearCutoff = (typeof this.shortYearCutoff !== "string" ? this.shortYearCutoff : new Date().getFullYear() % 100 + parseInt(this.shortYearCutoff, 10)),\n year = -1,\n month = -1,\n day = -1,\n doy = -1,\n literal = false,\n date,\n lookAhead = (match) => {\n let matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n if (matches) {\n iFormat++;\n }\n return matches;\n },\n getNumber = (match) => {\n let isDoubled = lookAhead(match),\n size = (match === "@" ? 14 : (match === "!" ? 20 :\n (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),\n minSize = (match === "y" ? size : 1),\n digits = new RegExp("^\\\\d{" + minSize + "," + size + "}"),\n num = value.substring(iValue).match(digits);\n if (!num) {\n throw "Missing number at position " + iValue;\n }\n iValue += num[ 0 ].length;\n return parseInt(num[ 0 ], 10);\n },\n getName = (match, shortNames, longNames) => {\n let index = -1;\n let arr = lookAhead(match) ? longNames : shortNames;\n let names = [];\n\n for (let i = 0; i < arr.length; i++) {\n names.push([i,arr[i]]);\n }\n names.sort((a,b) => {\n return -(a[ 1 ].length - b[ 1 ].length);\n });\n\n for (let i = 0; i < names.length; i++) {\n let name = names[i][1];\n if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n index = names[i][0];\n iValue += name.length;\n break;\n }\n }\n\n if (index !== -1) {\n return index + 1;\n } else {\n throw "Unknown name at position " + iValue;\n }\n },\n checkLiteral = () => {\n if (value.charAt(iValue) !== format.charAt(iFormat)) {\n throw "Unexpected literal at position " + iValue;\n }\n iValue++;\n };\n\n if (this.currentView === \'month\') {\n day = 1;\n }\n\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === "\'" && !lookAhead("\'")) {\n literal = false;\n } else {\n checkLiteral();\n }\n } else {\n switch (format.charAt(iFormat)) {\n case "d":\n day = getNumber("d");\n break;\n case "D":\n getName("D", this.$primevue.config.locale.dayNamesShort, this.$primevue.config.locale.dayNames);\n break;\n case "o":\n doy = getNumber("o");\n break;\n case "m":\n month = getNumber("m");\n break;\n case "M":\n month = getName("M", this.$primevue.config.locale.monthNamesShort, this.$primevue.config.locale.monthNames);\n break;\n case "y":\n year = getNumber("y");\n break;\n case "@":\n date = new Date(getNumber("@"));\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n case "!":\n date = new Date((getNumber("!") - this.ticksTo1970) / 10000);\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n case "\'":\n if (lookAhead("\'")) {\n checkLiteral();\n } else {\n literal = true;\n }\n break;\n default:\n checkLiteral();\n }\n }\n }\n\n if (iValue < value.length) {\n extra = value.substr(iValue);\n if (!/^\\s+/.test(extra)) {\n throw "Extra/unparsed characters found in date: " + extra;\n }\n }\n\n if (year === -1) {\n year = new Date().getFullYear();\n } else if (year < 100) {\n year += new Date().getFullYear() - new Date().getFullYear() % 100 +\n (year <= shortYearCutoff ? 0 : -100);\n }\n\n if (doy > -1) {\n month = 1;\n day = doy;\n do {\n dim = this.getDaysCountInMonth(year, month - 1);\n if (day <= dim) {\n break;\n }\n month++;\n day -= dim;\n // eslint-disable-next-line\n } while (true);\n }\n\n date = this.daylightSavingAdjust(new Date(year, month - 1, day));\n if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n throw "Invalid date"; // E.g. 31/02/00\n }\n\n return date;\n },\n getWeekNumber(date) {\n let checkDate = new Date(date.getTime());\n checkDate.setDate(checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ));\n let time = checkDate.getTime();\n checkDate.setMonth( 0 );\n checkDate.setDate( 1 );\n return Math.floor( Math.round((time - checkDate.getTime()) / 86400000 ) / 7 ) + 1;\n },\n onDateCellKeydown(event, date, groupIndex) {\n const cellContent = event.currentTarget;\n const cell = cellContent.parentElement;\n\n switch (event.which) {\n //down arrow\n case 40: {\n cellContent.tabIndex = \'-1\';\n let cellIndex = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.index */ .p7.index(cell);\n let nextRow = cell.parentElement.nextElementSibling;\n if (nextRow) {\n let focusCell = nextRow.children[cellIndex].children[0];\n if (primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.hasClass */ .p7.hasClass(focusCell, \'p-disabled\')) {\n this.navigationState = {backward: false};\n this.navForward(event);\n }\n else {\n nextRow.children[cellIndex].children[0].tabIndex = \'0\';\n nextRow.children[cellIndex].children[0].focus();\n }\n }\n else {\n this.navigationState = {backward: false};\n this.navForward(event);\n }\n event.preventDefault();\n break;\n }\n\n //up arrow\n case 38: {\n cellContent.tabIndex = \'-1\';\n let cellIndex = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.index */ .p7.index(cell);\n let prevRow = cell.parentElement.previousElementSibling;\n if (prevRow) {\n let focusCell = prevRow.children[cellIndex].children[0];\n if (primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.hasClass */ .p7.hasClass(focusCell, \'p-disabled\')) {\n this.navigationState = {backward: true};\n this.navBackward(event);\n }\n else {\n focusCell.tabIndex = \'0\';\n focusCell.focus();\n }\n }\n else {\n this.navigationState = {backward: true};\n this.navBackward(event);\n }\n event.preventDefault();\n break;\n }\n\n //left arrow\n case 37: {\n cellContent.tabIndex = \'-1\';\n let prevCell = cell.previousElementSibling;\n if (prevCell) {\n let focusCell = prevCell.children[0];\n if (primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.hasClass */ .p7.hasClass(focusCell, \'p-disabled\')) {\n this.navigateToMonth(true, groupIndex);\n }\n else {\n focusCell.tabIndex = \'0\';\n focusCell.focus();\n }\n }\n else {\n this.navigateToMonth(true, groupIndex);\n }\n event.preventDefault();\n break;\n }\n\n //right arrow\n case 39: {\n cellContent.tabIndex = \'-1\';\n let nextCell = cell.nextElementSibling;\n if (nextCell) {\n let focusCell = nextCell.children[0];\n if (primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.hasClass */ .p7.hasClass(focusCell, \'p-disabled\')) {\n this.navigateToMonth(false, groupIndex);\n }\n else {\n focusCell.tabIndex = \'0\';\n focusCell.focus();\n }\n }\n else {\n this.navigateToMonth(false, groupIndex);\n }\n event.preventDefault();\n break;\n }\n\n //enter\n //space\n case 13:\n case 32: {\n this.onDateSelect(event, date);\n event.preventDefault();\n break;\n }\n\n //escape\n case 27: {\n this.overlayVisible = false;\n event.preventDefault();\n break;\n }\n\n //tab\n case 9: {\n if (!this.inline) {\n this.trapFocus(event);\n }\n break;\n }\n }\n },\n navigateToMonth(prev, groupIndex) {\n if (prev) {\n if (this.numberOfMonths === 1 || (groupIndex === 0)) {\n this.navigationState = {backward: true};\n this.navBackward(event);\n }\n else {\n let prevMonthContainer = this.overlay.children[groupIndex - 1];\n let cells = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.find */ .p7.find(prevMonthContainer, \'.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)\');\n let focusCell = cells[cells.length - 1];\n focusCell.tabIndex = \'0\';\n focusCell.focus();\n }\n }\n else {\n if (this.numberOfMonths === 1 || (groupIndex === this.numberOfMonths - 1)) {\n this.navigationState = {backward: false};\n this.navForward(event);\n }\n else {\n let nextMonthContainer = this.overlay.children[groupIndex + 1];\n let focusCell = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.findSingle */ .p7.findSingle(nextMonthContainer, \'.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)\');\n focusCell.tabIndex = \'0\';\n focusCell.focus();\n }\n }\n },\n onMonthCellKeydown(event, index) {\n const cell = event.currentTarget;\n\n switch (event.which) {\n //arrows\n case 38:\n case 40: {\n cell.tabIndex = \'-1\';\n var cells = cell.parentElement.children;\n var cellIndex = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.index */ .p7.index(cell);\n let nextCell = cells[event.which === 40 ? cellIndex + 3 : cellIndex -3];\n if (nextCell) {\n nextCell.tabIndex = \'0\';\n nextCell.focus();\n }\n event.preventDefault();\n break;\n }\n\n //left arrow\n case 37: {\n cell.tabIndex = \'-1\';\n let prevCell = cell.previousElementSibling;\n if (prevCell) {\n prevCell.tabIndex = \'0\';\n prevCell.focus();\n }\n else {\n this.navigationState = {backward: true};\n this.navBackward(event);\n }\n event.preventDefault();\n break;\n }\n\n //right arrow\n case 39: {\n cell.tabIndex = \'-1\';\n let nextCell = cell.nextElementSibling;\n if (nextCell) {\n nextCell.tabIndex = \'0\';\n nextCell.focus();\n }\n else {\n this.navigationState = {backward: false};\n this.navForward(event);\n }\n event.preventDefault();\n break;\n }\n\n //enter\n //space\n case 13:\n case 32: {\n this.onMonthSelect(event, index);\n event.preventDefault();\n break;\n }\n\n //escape\n case 27: {\n this.overlayVisible = false;\n event.preventDefault();\n break;\n }\n\n //tab\n case 9: {\n this.trapFocus(event);\n break;\n }\n }\n },\n onYearCellKeydown(event, index) {\n const cell = event.currentTarget;\n\n switch (event.which) {\n //arrows\n case 38:\n case 40: {\n cell.tabIndex = \'-1\';\n var cells = cell.parentElement.children;\n var cellIndex = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.index */ .p7.index(cell);\n let nextCell = cells[event.which === 40 ? cellIndex + 2 : cellIndex - 2];\n if (nextCell) {\n nextCell.tabIndex = \'0\';\n nextCell.focus();\n }\n event.preventDefault();\n break;\n }\n\n //left arrow\n case 37: {\n cell.tabIndex = \'-1\';\n let prevCell = cell.previousElementSibling;\n if (prevCell) {\n prevCell.tabIndex = \'0\';\n prevCell.focus();\n }\n else {\n this.navigationState = {backward: true};\n this.navBackward(event);\n }\n event.preventDefault();\n break;\n }\n\n //right arrow\n case 39: {\n cell.tabIndex = \'-1\';\n let nextCell = cell.nextElementSibling;\n if (nextCell) {\n nextCell.tabIndex = \'0\';\n nextCell.focus();\n }\n else {\n this.navigationState = {backward: false};\n this.navForward(event);\n }\n event.preventDefault();\n break;\n }\n\n //enter\n //space\n case 13:\n case 32: {\n this.onYearSelect(event, index);\n event.preventDefault();\n break;\n }\n\n //escape\n case 27: {\n this.overlayVisible = false;\n event.preventDefault();\n break;\n }\n\n //tab\n case 9: {\n this.trapFocus(event);\n break;\n }\n }\n },\n updateFocus() {\n let cell;\n\n if (this.navigationState) {\n if (this.navigationState.button) {\n this.initFocusableCell();\n\n if (this.navigationState.backward)\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.findSingle */ .p7.findSingle(this.overlay, \'.p-datepicker-prev\').focus();\n else\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.findSingle */ .p7.findSingle(this.overlay, \'.p-datepicker-next\').focus();\n }\n else {\n if (this.navigationState.backward) {\n let cells;\n\n if (this.currentView === \'month\') {\n cells = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.find */ .p7.find(this.overlay, \'.p-monthpicker .p-monthpicker-month:not(.p-disabled)\');\n }\n else if (this.currentView === \'year\') {\n cells = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.find */ .p7.find(this.overlay, \'.p-yearpicker .p-yearpicker-year:not(.p-disabled)\');\n }\n else {\n cells = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.find */ .p7.find(this.overlay, \'.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)\');\n }\n\n if (cells && cells.length > 0) {\n cell = cells[cells.length - 1];\n }\n }\n else {\n if (this.currentView === \'month\') {\n cell = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.findSingle */ .p7.findSingle(this.overlay, \'.p-monthpicker .p-monthpicker-month:not(.p-disabled)\');\n }\n else if (this.currentView === \'year\') {\n cell = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.findSingle */ .p7.findSingle(this.overlay, \'.p-yearpicker .p-yearpicker-year:not(.p-disabled)\');\n }\n else {\n cell = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.findSingle */ .p7.findSingle(this.overlay, \'.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)\');\n }\n }\n\n if (cell) {\n cell.tabIndex = \'0\';\n cell.focus();\n }\n }\n\n this.navigationState = null;\n }\n else {\n this.initFocusableCell();\n }\n },\n initFocusableCell() {\n let cell;\n\n if (this.currentView === \'month\') {\n let cells = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.find */ .p7.find(this.overlay, \'.p-monthpicker .p-monthpicker-month\');\n let selectedCell= primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.findSingle */ .p7.findSingle(this.overlay, \'.p-monthpicker .p-monthpicker-month.p-highlight\');\n cells.forEach(cell => cell.tabIndex = -1);\n cell = selectedCell || cells[0];\n }\n else if (this.currentView === \'year\') {\n let cells = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.find */ .p7.find(this.overlay, \'.p-yearpicker .p-yearpicker-year\');\n let selectedCell= primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.findSingle */ .p7.findSingle(this.overlay, \'.p-yearpicker .p-yearpicker-year.p-highlight\');\n cells.forEach(cell => cell.tabIndex = -1);\n cell = selectedCell || cells[0];\n }\n else {\n cell = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.findSingle */ .p7.findSingle(this.overlay, \'span.p-highlight\');\n if (!cell) {\n let todayCell = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.findSingle */ .p7.findSingle(this.overlay, \'td.p-datepicker-today span:not(.p-disabled):not(.p-ink\');\n if (todayCell)\n cell = todayCell;\n else\n cell = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.findSingle */ .p7.findSingle(this.overlay, \'.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink\');\n }\n }\n\n if (cell) {\n cell.tabIndex = \'0\';\n\n if ((!this.navigationState || !this.navigationState.button) && !this.timePickerChange) {\n cell.focus();\n }\n }\n },\n trapFocus(event) {\n event.preventDefault();\n let focusableElements = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getFocusableElements */ .p7.getFocusableElements(this.overlay);\n\n if (focusableElements && focusableElements.length > 0) {\n if (!document.activeElement) {\n focusableElements[0].focus();\n }\n else {\n let focusedIndex = focusableElements.indexOf(document.activeElement);\n\n if (event.shiftKey) {\n if (focusedIndex == -1 || focusedIndex === 0)\n focusableElements[focusableElements.length - 1].focus();\n else\n focusableElements[focusedIndex - 1].focus();\n }\n else {\n if (focusedIndex == -1 || focusedIndex === (focusableElements.length - 1))\n focusableElements[0].focus();\n else\n focusableElements[focusedIndex + 1].focus();\n }\n }\n }\n },\n onContainerButtonKeydown(event) {\n switch (event.which) {\n //tab\n case 9:\n this.trapFocus(event);\n break;\n\n //escape\n case 27:\n this.overlayVisible = false;\n event.preventDefault();\n break;\n }\n },\n onInput(event) {\n try {\n this.selectionStart = this.$refs.input.$el.selectionStart;\n this.selectionEnd = this.$refs.input.$el.selectionEnd;\n\n let value = this.parseValue(event.target.value);\n if (this.isValidSelection(value)) {\n this.updateModel(value);\n }\n }\n catch(err) {\n if (this.keepInvalid) {\n this.updateModel(event.target.value);\n }\n }\n },\n onFocus() {\n if (this.showOnFocus && this.isEnabled()) {\n this.overlayVisible = true;\n }\n this.focused = true;\n },\n onBlur() {\n this.focused = false;\n },\n onKeyDown() {\n if (event.keyCode === 40 && this.overlay) {\n this.trapFocus(event);\n }\n else if (event.keyCode === 27) {\n if (this.overlayVisible) {\n this.overlayVisible = false;\n event.preventDefault();\n }\n }\n else if (event.keyCode === 9) {\n if (this.overlay) {\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getFocusableElements */ .p7.getFocusableElements(this.overlay).forEach(el => el.tabIndex = \'-1\');\n }\n\n if (this.overlayVisible) {\n this.overlayVisible = false;\n }\n }\n },\n overlayRef(el) {\n this.overlay = el;\n },\n getMonthName(index) {\n return this.$primevue.config.locale.monthNames[index];\n },\n onOverlayClick(event) {\n if (!this.inline) {\n primevue_overlayeventbus__WEBPACK_IMPORTED_MODULE_1__/* ["default"].emit */ .Z.emit(\'overlay-click\', {\n originalEvent: event,\n target: this.$el\n });\n }\n },\n onOverlayMouseUp(event) {\n this.onOverlayClick(event);\n },\n createResponsiveStyle() {\n if (this.numberOfMonths > 1 && this.responsiveOptions) {\n if (!this.responsiveStyleElement) {\n this.responsiveStyleElement = document.createElement(\'style\');\n this.responsiveStyleElement.type = \'text/css\';\n document.body.appendChild(this.responsiveStyleElement);\n }\n\n let innerHTML = \'\';\n if (this.responsiveOptions) {\n let responsiveOptions = [...this.responsiveOptions]\n .filter(o => !!(o.breakpoint && o.numMonths))\n .sort((o1, o2) => -1 * o1.breakpoint.localeCompare(o2.breakpoint, undefined, { numeric: true }));\n\n for (let i = 0; i < responsiveOptions.length; i++) {\n let { breakpoint, numMonths } = responsiveOptions[i];\n let styles = `\n .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${numMonths}) .p-datepicker-next {\n display: inline-flex !important;\n }\n `;\n\n for (let j = numMonths; j < this.numberOfMonths; j++) {\n styles += `\n .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${j + 1}) {\n display: none !important;\n }\n `;\n }\n\n innerHTML += `\n @media screen and (max-width: ${breakpoint}) {\n ${styles}\n }\n `;\n }\n }\n\n this.responsiveStyleElement.innerHTML = innerHTML;\n }\n\t\t},\n destroyResponsiveStyleElement() {\n if (this.responsiveStyleElement) {\n this.responsiveStyleElement.remove();\n this.responsiveStyleElement = null;\n }\n }\n },\n computed: {\n viewDate() {\n let propValue = this.modelValue;\n if (propValue && Array.isArray(propValue)) {\n propValue = propValue[0];\n }\n\n if (propValue && typeof propValue !== \'string\') {\n return propValue;\n }\n else {\n let today = new Date();\n if (this.maxDate && this.maxDate < today) {\n return this.maxDate;\n }\n if (this.minDate && this.minDate > today) {\n return this.minDate;\n }\n return today;\n }\n },\n inputFieldValue() {\n return this.formatValue(this.modelValue);\n },\n containerClass() {\n return [\n \'p-calendar p-component p-inputwrapper\', this.class,\n {\n \'p-calendar-w-btn\': this.showIcon,\n \'p-calendar-timeonly\': this.timeOnly,\n \'p-inputwrapper-filled\': this.modelValue,\n \'p-inputwrapper-focus\': this.focused\n }\n ];\n },\n panelStyleClass() {\n return [\'p-datepicker p-component\', this.panelClass, {\n \'p-datepicker-inline\': this.inline,\n \'p-disabled\': this.$attrs.disabled,\n \'p-datepicker-timeonly\': this.timeOnly,\n \'p-datepicker-multiple-month\': this.numberOfMonths > 1,\n \'p-datepicker-monthpicker\': (this.currentView === \'month\'),\n \'p-datepicker-yearpicker\': (this.currentView === \'year\'),\n \'p-datepicker-touch-ui\': this.touchUI,\n \'p-input-filled\': this.$primevue.config.inputStyle === \'filled\',\n \'p-ripple-disabled\': this.$primevue.config.ripple === false\n }];\n },\n months() {\n let months = [];\n for (let i = 0 ; i < this.numberOfMonths; i++) {\n let month = this.currentMonth + i;\n let year = this.currentYear;\n if (month > 11) {\n month = month % 11 - 1;\n year = year + 1;\n }\n\n let dates = [];\n let firstDay = this.getFirstDayOfMonthIndex(month, year);\n let daysLength = this.getDaysCountInMonth(month, year);\n let prevMonthDaysLength = this.getDaysCountInPrevMonth(month, year);\n let dayNo = 1;\n let today = new Date();\n let weekNumbers = [];\n let monthRows = Math.ceil((daysLength + firstDay) / 7);\n\n for (let i = 0; i < monthRows; i++) {\n let week = [];\n\n if (i == 0) {\n for (let j = (prevMonthDaysLength - firstDay + 1); j <= prevMonthDaysLength; j++) {\n let prev = this.getPreviousMonthAndYear(month, year);\n week.push({day: j, month: prev.month, year: prev.year, otherMonth: true,\n today: this.isToday(today, j, prev.month, prev.year), selectable: this.isSelectable(j, prev.month, prev.year, true)});\n }\n\n let remainingDaysLength = 7 - week.length;\n for (let j = 0; j < remainingDaysLength; j++) {\n week.push({day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year),\n selectable: this.isSelectable(dayNo, month, year, false)});\n dayNo++;\n }\n }\n else {\n for (let j = 0; j < 7; j++) {\n if (dayNo > daysLength) {\n let next = this.getNextMonthAndYear(month, year);\n week.push({day: dayNo - daysLength, month: next.month, year: next.year, otherMonth: true,\n today: this.isToday(today, dayNo - daysLength, next.month, next.year),\n selectable: this.isSelectable((dayNo - daysLength), next.month, next.year, true)});\n }\n else {\n week.push({day: dayNo, month: month, year: year, today: this.isToday(today, dayNo, month, year),\n selectable: this.isSelectable(dayNo, month, year, false)});\n }\n\n dayNo++;\n }\n }\n\n if (this.showWeek) {\n weekNumbers.push(this.getWeekNumber(new Date(week[0].year, week[0].month, week[0].day)));\n }\n\n dates.push(week);\n }\n\n months.push({\n month: month,\n year: year,\n dates: dates,\n weekNumbers: weekNumbers\n });\n }\n\n return months;\n },\n weekDays() {\n let weekDays = [];\n let dayIndex = this.$primevue.config.locale.firstDayOfWeek;\n for (let i = 0; i < 7; i++) {\n weekDays.push(this.$primevue.config.locale.dayNamesMin[dayIndex]);\n dayIndex = (dayIndex == 6) ? 0 : ++dayIndex;\n }\n\n return weekDays;\n },\n ticksTo1970() {\n return (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000);\n },\n sundayIndex() {\n return this.$primevue.config.locale.firstDayOfWeek > 0 ? 7 - this.$primevue.config.locale.firstDayOfWeek : 0;\n },\n datePattern() {\n return this.dateFormat || this.$primevue.config.locale.dateFormat;\n },\n yearOptions() {\n if (this.yearRange) {\n let $vm = this;\n const years = this.yearRange.split(\':\');\n let yearStart = parseInt(years[0]);\n let yearEnd = parseInt(years[1]);\n let yearOptions = [];\n\n if (this.currentYear < yearStart) {\n $vm.currentYear = yearEnd;\n }\n else if (this.currentYear > yearEnd) {\n $vm.currentYear = yearStart;\n }\n\n for (let i = yearStart; i <= yearEnd; i++) {\n yearOptions.push(i);\n }\n\n return yearOptions;\n }\n else {\n return null;\n }\n },\n monthPickerValues() {\n let monthPickerValues = [];\n for (let i = 0; i <= 11; i++) {\n monthPickerValues.push(this.$primevue.config.locale.monthNamesShort[i]);\n }\n\n return monthPickerValues;\n },\n yearPickerValues() {\n let yearPickerValues = [];\n let base = this.currentYear - (this.currentYear % 10);\n for (let i = 0; i < 10; i++) {\n yearPickerValues.push(base + i);\n }\n\n return yearPickerValues;\n },\n formattedCurrentHour() {\n return this.currentHour < 10 ? \'0\' + this.currentHour : this.currentHour;\n },\n formattedCurrentMinute() {\n return this.currentMinute < 10 ? \'0\' + this.currentMinute : this.currentMinute;\n },\n formattedCurrentSecond() {\n return this.currentSecond < 10 ? \'0\' + this.currentSecond : this.currentSecond;\n },\n todayLabel() {\n return this.$primevue.config.locale.today;\n },\n clearLabel() {\n return this.$primevue.config.locale.clear;\n },\n weekHeaderLabel() {\n return this.$primevue.config.locale.weekHeader;\n },\n monthNames() {\n return this.$primevue.config.locale.monthNames;\n },\n appendDisabled() {\n return this.appendTo === \'self\' || this.inline;\n },\n appendTarget() {\n return this.appendDisabled ? null : this.appendTo;\n },\n attributeSelector() {\n return (0,primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .UniqueComponentId */ .Th)();\n },\n switchViewButtonDisabled() {\n return this.numberOfMonths > 1 || this.$attrs.disabled;\n }\n },\n components: {\n \'CalendarInputText\': primevue_inputtext__WEBPACK_IMPORTED_MODULE_2__["default"],\n \'CalendarButton\': primevue_button__WEBPACK_IMPORTED_MODULE_3__["default"]\n },\n directives: {\n \'ripple\': primevue_ripple__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z\n }\n};\n\nconst _hoisted_1 = { class: "p-datepicker-group-container" };\nconst _hoisted_2 = { class: "p-datepicker-header" };\nconst _hoisted_3 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", { class: "p-datepicker-prev-icon pi pi-chevron-left" }, null, -1);\nconst _hoisted_4 = { class: "p-datepicker-title" };\nconst _hoisted_5 = {\n key: 2,\n class: "p-datepicker-decade"\n};\nconst _hoisted_6 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", { class: "p-datepicker-next-icon pi pi-chevron-right" }, null, -1);\nconst _hoisted_7 = {\n key: 0,\n class: "p-datepicker-calendar-container"\n};\nconst _hoisted_8 = { class: "p-datepicker-calendar" };\nconst _hoisted_9 = {\n key: 0,\n scope: "col",\n class: "p-datepicker-weekheader p-disabled"\n};\nconst _hoisted_10 = {\n key: 0,\n class: "p-datepicker-weeknumber"\n};\nconst _hoisted_11 = { class: "p-disabled" };\nconst _hoisted_12 = {\n key: 0,\n style: {"visibility":"hidden"}\n};\nconst _hoisted_13 = {\n key: 0,\n class: "p-monthpicker"\n};\nconst _hoisted_14 = {\n key: 1,\n class: "p-yearpicker"\n};\nconst _hoisted_15 = {\n key: 1,\n class: "p-timepicker"\n};\nconst _hoisted_16 = { class: "p-hour-picker" };\nconst _hoisted_17 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", { class: "pi pi-chevron-up" }, null, -1);\nconst _hoisted_18 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", { class: "pi pi-chevron-down" }, null, -1);\nconst _hoisted_19 = { class: "p-separator" };\nconst _hoisted_20 = { class: "p-minute-picker" };\nconst _hoisted_21 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", { class: "pi pi-chevron-up" }, null, -1);\nconst _hoisted_22 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", { class: "pi pi-chevron-down" }, null, -1);\nconst _hoisted_23 = {\n key: 0,\n class: "p-separator"\n};\nconst _hoisted_24 = {\n key: 1,\n class: "p-second-picker"\n};\nconst _hoisted_25 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", { class: "pi pi-chevron-up" }, null, -1);\nconst _hoisted_26 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", { class: "pi pi-chevron-down" }, null, -1);\nconst _hoisted_27 = {\n key: 2,\n class: "p-separator"\n};\nconst _hoisted_28 = {\n key: 3,\n class: "p-ampm-picker"\n};\nconst _hoisted_29 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", { class: "pi pi-chevron-up" }, null, -1);\nconst _hoisted_30 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", { class: "pi pi-chevron-down" }, null, -1);\nconst _hoisted_31 = {\n key: 2,\n class: "p-datepicker-buttonbar"\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_CalendarInputText = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .resolveComponent */ .up)("CalendarInputText");\n const _component_CalendarButton = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .resolveComponent */ .up)("CalendarButton");\n const _directive_ripple = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .resolveDirective */ .Q2)("ripple");\n\n return ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("span", {\n ref: "container",\n class: $options.containerClass,\n style: $props.style\n }, [\n (!$props.inline)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)(_component_CalendarInputText, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .mergeProps */ .dG)({\n key: 0,\n ref: "input",\n type: "text"\n }, _ctx.$attrs, {\n value: $options.inputFieldValue,\n onInput: $options.onInput,\n onFocus: $options.onFocus,\n onBlur: $options.onBlur,\n onKeydown: $options.onKeyDown,\n readonly: !$props.manualInput,\n inputmode: "none",\n class: $props.inputClass,\n style: $props.inputStyle\n }), null, 16, ["value", "onInput", "onFocus", "onBlur", "onKeydown", "readonly", "class", "style"]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ($props.showIcon)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)(_component_CalendarButton, {\n key: 1,\n icon: $props.icon,\n tabindex: "-1",\n class: "p-datepicker-trigger",\n disabled: _ctx.$attrs.disabled,\n onClick: $options.onButtonClick,\n type: "button",\n "aria-label": $options.inputFieldValue\n }, null, 8, ["icon", "disabled", "onClick", "aria-label"]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)(vue__WEBPACK_IMPORTED_MODULE_5__/* .Teleport */ .lR, {\n to: $options.appendTarget,\n disabled: $options.appendDisabled\n }, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)(vue__WEBPACK_IMPORTED_MODULE_5__/* .Transition */ .uT, {\n name: "p-connected-overlay",\n onEnter: _cache[61] || (_cache[61] = $event => ($options.onOverlayEnter($event))),\n onAfterEnter: $options.onOverlayEnterComplete,\n onAfterLeave: $options.onOverlayAfterLeave,\n onLeave: $options.onOverlayLeave\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withCtx */ .w5)(() => [\n ($props.inline ? true : $data.overlayVisible)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("div", {\n key: 0,\n ref: $options.overlayRef,\n class: $options.panelStyleClass,\n role: $props.inline ? null : \'dialog\',\n onClick: _cache[59] || (_cache[59] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args))),\n onMouseup: _cache[60] || (_cache[60] = (...args) => ($options.onOverlayMouseUp && $options.onOverlayMouseUp(...args)))\n }, [\n (!$props.timeOnly)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)(vue__WEBPACK_IMPORTED_MODULE_5__/* .Fragment */ .HY, { key: 0 }, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("div", _hoisted_1, [\n ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(true), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)(vue__WEBPACK_IMPORTED_MODULE_5__/* .Fragment */ .HY, null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .renderList */ .Ko)($options.months, (month, groupIndex) => {\n return ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("div", {\n class: "p-datepicker-group",\n key: month.month + month.year\n }, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("div", _hoisted_2, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .renderSlot */ .WI)(_ctx.$slots, "header"),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("button", {\n class: "p-datepicker-prev p-link",\n onClick: _cache[1] || (_cache[1] = (...args) => ($options.onPrevButtonClick && $options.onPrevButtonClick(...args))),\n type: "button",\n onKeydown: _cache[2] || (_cache[2] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),\n disabled: _ctx.$attrs.disabled\n }, [\n _hoisted_3\n ], 40, ["disabled"]), [\n [vue__WEBPACK_IMPORTED_MODULE_5__/* .vShow */ .F8, groupIndex === 0],\n [_directive_ripple]\n ]),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("div", _hoisted_4, [\n ($data.currentView === \'date\')\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("button", {\n key: 0,\n type: "button",\n onClick: _cache[3] || (_cache[3] = (...args) => ($options.switchToMonthView && $options.switchToMonthView(...args))),\n class: "p-datepicker-month p-link",\n disabled: $options.switchViewButtonDisabled\n }, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($options.getMonthName(month.month)), 9, ["disabled"]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ($data.currentView !== \'year\')\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("button", {\n key: 1,\n type: "button",\n onClick: _cache[4] || (_cache[4] = (...args) => ($options.switchToYearView && $options.switchToYearView(...args))),\n class: "p-datepicker-year p-link",\n disabled: $options.switchViewButtonDisabled\n }, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($data.currentYear), 9, ["disabled"]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ($data.currentView === \'year\')\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("span", _hoisted_5, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .renderSlot */ .WI)(_ctx.$slots, "decade", { years: $options.yearPickerValues }, () => [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createTextVNode */ .Uk)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($options.yearPickerValues[0]) + " - " + (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($options.yearPickerValues[$options.yearPickerValues.length - 1]), 1)\n ])\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true)\n ]),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("button", {\n class: "p-datepicker-next p-link",\n onClick: _cache[5] || (_cache[5] = (...args) => ($options.onNextButtonClick && $options.onNextButtonClick(...args))),\n type: "button",\n onKeydown: _cache[6] || (_cache[6] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),\n disabled: _ctx.$attrs.disabled\n }, [\n _hoisted_6\n ], 40, ["disabled"]), [\n [vue__WEBPACK_IMPORTED_MODULE_5__/* .vShow */ .F8, $props.numberOfMonths === 1 ? true : (groupIndex === $props.numberOfMonths - 1)],\n [_directive_ripple]\n ])\n ]),\n ($data.currentView ===\'date\')\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("div", _hoisted_7, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("table", _hoisted_8, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("thead", null, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("tr", null, [\n ($props.showWeek)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("th", _hoisted_9, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($options.weekHeaderLabel), 1)\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(true), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)(vue__WEBPACK_IMPORTED_MODULE_5__/* .Fragment */ .HY, null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .renderList */ .Ko)($options.weekDays, (weekDay) => {\n return ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("th", {\n scope: "col",\n key: weekDay\n }, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)(weekDay), 1)\n ]))\n }), 128))\n ])\n ]),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("tbody", null, [\n ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(true), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)(vue__WEBPACK_IMPORTED_MODULE_5__/* .Fragment */ .HY, null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .renderList */ .Ko)(month.dates, (week, i) => {\n return ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("tr", {\n key: week[0].day + \'\' + week[0].month\n }, [\n ($props.showWeek)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("td", _hoisted_10, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", _hoisted_11, [\n (month.weekNumbers[i] < 10)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("span", _hoisted_12, "0"))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createTextVNode */ .Uk)(" " + (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)(month.weekNumbers[i]), 1)\n ])\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(true), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)(vue__WEBPACK_IMPORTED_MODULE_5__/* .Fragment */ .HY, null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .renderList */ .Ko)(week, (date) => {\n return ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("td", {\n key: date.day + \'\' + date.month,\n class: {\'p-datepicker-other-month\': date.otherMonth, \'p-datepicker-today\': date.today}\n }, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", {\n class: {\'p-highlight\': $options.isSelected(date), \'p-disabled\': !date.selectable},\n onClick: $event => ($options.onDateSelect($event, date)),\n draggable: "false",\n onKeydown: $event => ($options.onDateCellKeydown($event,date,groupIndex))\n }, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .renderSlot */ .WI)(_ctx.$slots, "date", { date: date }, () => [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createTextVNode */ .Uk)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)(date.day), 1)\n ])\n ], 42, ["onClick", "onKeydown"]), [\n [_directive_ripple]\n ])\n ], 2))\n }), 128))\n ]))\n }), 128))\n ])\n ])\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true)\n ]))\n }), 128))\n ]),\n ($data.currentView === \'month\')\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("div", _hoisted_13, [\n ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(true), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)(vue__WEBPACK_IMPORTED_MODULE_5__/* .Fragment */ .HY, null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .renderList */ .Ko)($options.monthPickerValues, (m, i) => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)(((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("span", {\n key: m,\n onClick: $event => ($options.onMonthSelect($event, i)),\n onKeydown: $event => ($options.onMonthCellKeydown($event,i)),\n class: ["p-monthpicker-month", {\'p-highlight\': $options.isMonthSelected(i)}]\n }, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createTextVNode */ .Uk)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)(m), 1)\n ], 42, ["onClick", "onKeydown"])), [\n [_directive_ripple]\n ])\n }), 128))\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ($data.currentView === \'year\')\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("div", _hoisted_14, [\n ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(true), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)(vue__WEBPACK_IMPORTED_MODULE_5__/* .Fragment */ .HY, null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .renderList */ .Ko)($options.yearPickerValues, (y) => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)(((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("span", {\n key: y,\n onClick: $event => ($options.onYearSelect($event, y)),\n onKeydown: $event => ($options.onYearCellKeydown($event,y)),\n class: ["p-yearpicker-year", {\'p-highlight\': $options.isYearSelected(y)}]\n }, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createTextVNode */ .Uk)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)(y), 1)\n ], 42, ["onClick", "onKeydown"])), [\n [_directive_ripple]\n ])\n }), 128))\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true)\n ], 64))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ($props.showTime||$props.timeOnly)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("div", _hoisted_15, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("div", _hoisted_16, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("button", {\n class: "p-link",\n onMousedown: _cache[7] || (_cache[7] = $event => ($options.onTimePickerElementMouseDown($event, 0, 1))),\n onMouseup: _cache[8] || (_cache[8] = $event => ($options.onTimePickerElementMouseUp($event))),\n onKeydown: [\n _cache[9] || (_cache[9] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),\n _cache[11] || (_cache[11] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 0, 1)), ["enter"])),\n _cache[12] || (_cache[12] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 0, 1)), ["space"]))\n ],\n onMouseleave: _cache[10] || (_cache[10] = $event => ($options.onTimePickerElementMouseLeave())),\n onKeyup: [\n _cache[13] || (_cache[13] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),\n _cache[14] || (_cache[14] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))\n ],\n type: "button"\n }, [\n _hoisted_17\n ], 544), [\n [_directive_ripple]\n ]),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($options.formattedCurrentHour), 1),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("button", {\n class: "p-link",\n onMousedown: _cache[15] || (_cache[15] = $event => ($options.onTimePickerElementMouseDown($event, 0, -1))),\n onMouseup: _cache[16] || (_cache[16] = $event => ($options.onTimePickerElementMouseUp($event))),\n onKeydown: [\n _cache[17] || (_cache[17] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),\n _cache[19] || (_cache[19] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 0, -1)), ["enter"])),\n _cache[20] || (_cache[20] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 0, -1)), ["space"]))\n ],\n onMouseleave: _cache[18] || (_cache[18] = $event => ($options.onTimePickerElementMouseLeave())),\n onKeyup: [\n _cache[21] || (_cache[21] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),\n _cache[22] || (_cache[22] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))\n ],\n type: "button"\n }, [\n _hoisted_18\n ], 544), [\n [_directive_ripple]\n ])\n ]),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("div", _hoisted_19, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($props.timeSeparator), 1)\n ]),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("div", _hoisted_20, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("button", {\n class: "p-link",\n onMousedown: _cache[23] || (_cache[23] = $event => ($options.onTimePickerElementMouseDown($event, 1, 1))),\n onMouseup: _cache[24] || (_cache[24] = $event => ($options.onTimePickerElementMouseUp($event))),\n onKeydown: [\n _cache[25] || (_cache[25] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),\n _cache[27] || (_cache[27] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 1, 1)), ["enter"])),\n _cache[28] || (_cache[28] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 1, 1)), ["space"]))\n ],\n disabled: _ctx.$attrs.disabled,\n onMouseleave: _cache[26] || (_cache[26] = $event => ($options.onTimePickerElementMouseLeave())),\n onKeyup: [\n _cache[29] || (_cache[29] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),\n _cache[30] || (_cache[30] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))\n ],\n type: "button"\n }, [\n _hoisted_21\n ], 40, ["disabled"]), [\n [_directive_ripple]\n ]),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($options.formattedCurrentMinute), 1),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("button", {\n class: "p-link",\n onMousedown: _cache[31] || (_cache[31] = $event => ($options.onTimePickerElementMouseDown($event, 1, -1))),\n onMouseup: _cache[32] || (_cache[32] = $event => ($options.onTimePickerElementMouseUp($event))),\n onKeydown: [\n _cache[33] || (_cache[33] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),\n _cache[35] || (_cache[35] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 1, -1)), ["enter"])),\n _cache[36] || (_cache[36] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 1, -1)), ["space"]))\n ],\n disabled: _ctx.$attrs.disabled,\n onMouseleave: _cache[34] || (_cache[34] = $event => ($options.onTimePickerElementMouseLeave())),\n onKeyup: [\n _cache[37] || (_cache[37] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),\n _cache[38] || (_cache[38] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))\n ],\n type: "button"\n }, [\n _hoisted_22\n ], 40, ["disabled"]), [\n [_directive_ripple]\n ])\n ]),\n ($props.showSeconds)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("div", _hoisted_23, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($props.timeSeparator), 1)\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ($props.showSeconds)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("div", _hoisted_24, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("button", {\n class: "p-link",\n onMousedown: _cache[39] || (_cache[39] = $event => ($options.onTimePickerElementMouseDown($event, 2, 1))),\n onMouseup: _cache[40] || (_cache[40] = $event => ($options.onTimePickerElementMouseUp($event))),\n onKeydown: [\n _cache[41] || (_cache[41] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),\n _cache[43] || (_cache[43] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 2, 1)), ["enter"])),\n _cache[44] || (_cache[44] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 2, 1)), ["space"]))\n ],\n disabled: _ctx.$attrs.disabled,\n onMouseleave: _cache[42] || (_cache[42] = $event => ($options.onTimePickerElementMouseLeave())),\n onKeyup: [\n _cache[45] || (_cache[45] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),\n _cache[46] || (_cache[46] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))\n ],\n type: "button"\n }, [\n _hoisted_25\n ], 40, ["disabled"]), [\n [_directive_ripple]\n ]),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($options.formattedCurrentSecond), 1),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("button", {\n class: "p-link",\n onMousedown: _cache[47] || (_cache[47] = $event => ($options.onTimePickerElementMouseDown($event, 2, -1))),\n onMouseup: _cache[48] || (_cache[48] = $event => ($options.onTimePickerElementMouseUp($event))),\n onKeydown: [\n _cache[49] || (_cache[49] = (...args) => ($options.onContainerButtonKeydown && $options.onContainerButtonKeydown(...args))),\n _cache[51] || (_cache[51] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 2, -1)), ["enter"])),\n _cache[52] || (_cache[52] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseDown($event, 2, -1)), ["space"]))\n ],\n disabled: _ctx.$attrs.disabled,\n onMouseleave: _cache[50] || (_cache[50] = $event => ($options.onTimePickerElementMouseLeave())),\n onKeyup: [\n _cache[53] || (_cache[53] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["enter"])),\n _cache[54] || (_cache[54] = (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withKeys */ .D2)($event => ($options.onTimePickerElementMouseUp($event)), ["space"]))\n ],\n type: "button"\n }, [\n _hoisted_26\n ], 40, ["disabled"]), [\n [_directive_ripple]\n ])\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ($props.hourFormat==\'12\')\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("div", _hoisted_27, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($props.timeSeparator), 1)\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ($props.hourFormat==\'12\')\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("div", _hoisted_28, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("button", {\n class: "p-link",\n onClick: _cache[55] || (_cache[55] = $event => ($options.toggleAMPM($event))),\n type: "button",\n disabled: _ctx.$attrs.disabled\n }, [\n _hoisted_29\n ], 8, ["disabled"]), [\n [_directive_ripple]\n ]),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .toDisplayString */ .zw)($data.pm ? \'PM\' : \'AM\'), 1),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .withDirectives */ .wy)((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)("button", {\n class: "p-link",\n onClick: _cache[56] || (_cache[56] = $event => ($options.toggleAMPM($event))),\n type: "button",\n disabled: _ctx.$attrs.disabled\n }, [\n _hoisted_30\n ], 8, ["disabled"]), [\n [_directive_ripple]\n ])\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true)\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n ($props.showButtonBar)\n ? ((0,vue__WEBPACK_IMPORTED_MODULE_5__/* .openBlock */ .wg)(), (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createBlock */ .j4)("div", _hoisted_31, [\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)(_component_CalendarButton, {\n type: "button",\n label: $options.todayLabel,\n onClick: _cache[57] || (_cache[57] = $event => ($options.onTodayButtonClick($event))),\n class: "p-button-text",\n onKeydown: $options.onContainerButtonKeydown\n }, null, 8, ["label", "onKeydown"]),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createVNode */ .Wm)(_component_CalendarButton, {\n type: "button",\n label: $options.clearLabel,\n onClick: _cache[58] || (_cache[58] = $event => ($options.onClearButtonClick($event))),\n class: "p-button-text",\n onKeydown: $options.onContainerButtonKeydown\n }, null, 8, ["label", "onKeydown"])\n ]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true),\n (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .renderSlot */ .WI)(_ctx.$slots, "footer")\n ], 42, ["role"]))\n : (0,vue__WEBPACK_IMPORTED_MODULE_5__/* .createCommentVNode */ .kq)("", true)\n ]),\n _: 3\n }, 8, ["onAfterEnter", "onAfterLeave", "onLeave"])\n ], 8, ["to", "disabled"]))\n ], 6))\n}\n\nfunction styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === \'undefined\') { return; }\n\n var head = document.head || document.getElementsByTagName(\'head\')[0];\n var style = document.createElement(\'style\');\n style.type = \'text/css\';\n\n if (insertAt === \'top\') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = "\\n.p-calendar {\\n position: relative;\\n display: -webkit-inline-box;\\n display: -ms-inline-flexbox;\\n display: inline-flex;\\n max-width: 100%;\\n}\\n.p-calendar .p-inputtext {\\n -webkit-box-flex: 1;\\n -ms-flex: 1 1 auto;\\n flex: 1 1 auto;\\n width: 1%;\\n}\\n.p-calendar-w-btn .p-inputtext {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n}\\n.p-calendar-w-btn .p-datepicker-trigger {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n}\\n\\n/* Fluid */\\n.p-fluid .p-calendar {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n}\\n.p-fluid .p-calendar .p-inputtext {\\n width: 1%;\\n}\\n\\n/* Datepicker */\\n.p-calendar .p-datepicker {\\n min-width: 100%;\\n}\\n.p-datepicker {\\n\\twidth: auto;\\n position: absolute;\\n top: 0;\\n left: 0;\\n}\\n.p-datepicker-inline {\\n display: inline-block;\\n position: static;\\n overflow-x: auto;\\n}\\n\\n/* Header */\\n.p-datepicker-header {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n -webkit-box-pack: justify;\\n -ms-flex-pack: justify;\\n justify-content: space-between;\\n}\\n.p-datepicker-header .p-datepicker-title {\\n margin: 0 auto;\\n}\\n.p-datepicker-prev,\\n.p-datepicker-next {\\n cursor: pointer;\\n display: -webkit-inline-box;\\n display: -ms-inline-flexbox;\\n display: inline-flex;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n overflow: hidden;\\n position: relative;\\n}\\n\\n/* Multiple Month DatePicker */\\n.p-datepicker-multiple-month .p-datepicker-group-container {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n}\\n.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group {\\n -webkit-box-flex: 1;\\n -ms-flex: 1 1 auto;\\n flex: 1 1 auto;\\n}\\n\\n/* DatePicker Table */\\n.p-datepicker table {\\n\\twidth: 100%;\\n\\tborder-collapse: collapse;\\n}\\n.p-datepicker td > span {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n cursor: pointer;\\n margin: 0 auto;\\n overflow: hidden;\\n position: relative;\\n}\\n\\n/* Month Picker */\\n.p-monthpicker-month {\\n width: 33.3%;\\n display: -webkit-inline-box;\\n display: -ms-inline-flexbox;\\n display: inline-flex;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n cursor: pointer;\\n overflow: hidden;\\n position: relative;\\n}\\n\\n/* Year Picker */\\n.p-yearpicker-year {\\n width: 50%;\\n display: -webkit-inline-box;\\n display: -ms-inline-flexbox;\\n display: inline-flex;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n cursor: pointer;\\n overflow: hidden;\\n position: relative;\\n}\\n\\n/* Button Bar */\\n.p-datepicker-buttonbar {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-pack: justify;\\n -ms-flex-pack: justify;\\n justify-content: space-between;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n}\\n\\n/* Time Picker */\\n.p-timepicker {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n}\\n.p-timepicker button {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n cursor: pointer;\\n overflow: hidden;\\n position: relative;\\n}\\n.p-timepicker > div {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n -webkit-box-orient: vertical;\\n -webkit-box-direction: normal;\\n -ms-flex-direction: column;\\n flex-direction: column;\\n}\\n\\n/* Touch UI */\\n.p-datepicker-touch-ui,\\n.p-calendar .p-datepicker-touch-ui {\\n position: fixed;\\n top: 50%;\\n left: 50%;\\n min-width: 80vw;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n}\\n";\nstyleInject(css_248z);\n\nscript.render = render;\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (script);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODIyMy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQTJHO0FBQ3BEO0FBQ1o7QUFDTjtBQUNBO0FBQzZOOztBQUVsUTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ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AgICAgICBzZWxlY3Rpb25Nb2RlOiB7XG4gICAgICAgICAgICB0eXBlOiBTdHJpbmcsXG4gICAgICAgICAgICBkZWZhdWx0OiAnc2luZ2xlJ1xuICAgICAgICB9LFxuICAgICAgICBkYXRlRm9ybWF0OiB7XG4gICAgICAgICAgICB0eXBlOiBTdHJpbmcsXG4gICAgICAgICAgICBkZWZhdWx0OiBudWxsXG4gICAgICAgIH0sXG4gICAgICAgIGlubGluZToge1xuICAgICAgICAgICAgdHlwZTogQm9vbGVhbixcbiAgICAgICAgICAgIGRlZmF1bHQ6IGZhbHNlXG4gICAgICAgIH0sXG4gICAgICAgIHNob3dPdGhlck1vbnRoczoge1xuICAgICAgICAgICAgdHlwZTogQm9vbGVhbixcbiAgICAgICAgICAgIGRlZmF1bHQ6IHRydWVcbiAgICAgICAgfSxcbiAgICAgICAgc2VsZWN0T3RoZXJNb250aHM6IHtcbiAgICAgICAgICAgIHR5cGU6IEJvb2xlYW4sXG4gICAgICAgICAgICBkZWZhdWx0OiBmYWxzZVxuICAgICAgICB9LFxuICAgICAgICBzaG93SWNvbjoge1xuICAgICAgICAgICAgdHlwZTogQm9vbGVhbixcbiAgICAgICAgICAgIGRlZmF1bHQ6IGZhbHNlXG4gICAgICAgIH0sXG4gICAgICAgIGljb246IHtcbiAgICAgICAgICAgIHR5cGU6IFN0cmluZyxcbiAgICAgICAgICAgIGRlZmF1bHQ6ICdwaSBwaS1jYWxlbmRhcidcbiAgICAgICAgfSxcbiAgICAgICAgbnVtYmVyT2ZNb250aHM6IHtcbiAgICAgICAgICAgIHR5cGU6IE51bWJlcixcbiAgICAgICAgICAgIGRlZmF1bHQ6IDFcbiAgICAgICAgfSxcbiAgICAgICAgcmVzcG9uc2l2ZU9wdGlvbnM6IEFycmF5LFxuICAgICAgICB2aWV3OiB7XG4gICAgICAgICAgICB0eXBlOiBTdHJpbmcsXG4gICAgICAgICAgICBkZWZhdWx0OiAnZGF0ZSdcbiAgICAgICAgfSxcbiAgICAgICAgdG91Y2hVSToge1xuICAgICAgICAgICAgdHlwZTogQm9vbGVhbixcbiAgICAgICAgICAgIGRlZmF1bHQ6IGZhbHNlXG4gICAgICAgIH0sXG4gICAgICAgIG1vbnRoTmF2aWdhdG9yOiB7XG4gICAgICAgICAgICB0eXBlOiBCb29sZWFuLFxuICAgICAgICAgICAgZGVmYXVsdDogZmFsc2VcbiAgICAgICAgfSxcbiAgICAgICAgeWVhck5hdmlnYXRvcjoge1xuICAgICAgICAgICAgdHlwZTogQm9vbGVhbixcbiAgICAgICAgICAgIGRlZmF1bHQ6IGZhbHNlXG4gICAgICAgIH0sXG4gICAgICAgIHllYXJSYW5nZToge1xuICAgICAgICAgICAgdHlwZTogU3RyaW5nLFxuICAgICAgICAgICAgZGVmYXVsdDogbnVsbFxuICAgICAgICB9LFxuICAgICAgICBwYW5lbENsYXNzOiB7XG4gICAgICAgICAgICB0eXBlOiBTdHJpbmcsXG4gICAgICAgICAgICBkZWZhdWx0OiBudWxsXG4gICAgICAgIH0sXG4gICAgICAgIG1pbkRhdGU6IHtcbiAgICAgICAgICAgIHR5cGU6IERhdGUsXG4gICAgICAgICAgICB2YWx1ZTogbnVsbFxuICAgICAgICB9LFxuICAgICAgICBtYXhEYXRlOiB7XG4gICAgICAgICAgICB0eXBlOiBEYXRlLFxuICAgICAgICAgICAgdmFsdWU6IG51bGxcbiAgICAgICAgfSxcbiAgICAgICAgZGlzYWJsZWREYXRlczoge1xuICAgICAgICAgICAgdHlwZTogQXJyYXksXG4gICAgICAgICAgICB2YWx1ZTogbnVsbFxuICAgICAgICB9LFxuICAgICAgICBkaXNhYmxlZERheXM6IHtcbiAgICAgICAgICAgIHR5cGU6IEFycmF5LFxuICAgICAgICAgICAgdmFsdWU6IG51bGxcbiAgICAgICAgfSxcbiAgICAgICAgbWF4RGF0ZUNvdW50OiB7XG4gICAgICAgICAgICB0eXBlOiBOdW1iZXIsXG4gICAgICAgICAgICB2YWx1ZTogbnVsbFxuICAgICAgICB9LFxuICAgICAgICBzaG93T25Gb2N1czoge1xuICAgICAgICAgICAgdHlwZTogQm9vbGVhbixcbiAgICAgICAgICAgIGRlZmF1bHQ6IHRydWVcbiAgICAgICAgfSxcbiAgICAgICAgYXV0b1pJbmRleDoge1xuICAgICAgICAgICAgdHlwZTogQm9vbGVhbixcbiAgICAgICAgICAgIGRlZmF1bHQ6IHRydWVcbiAgICAgICAgfSxcbiAgICAgICAgYmFzZVpJbmRleDoge1xuICAgICAgICAgICAgdHlwZTogTnVtYmVyLFxuICAgICAgICAgICAgZGVmYXVsdDogMFxuICAgICAgICB9LFxuICAgICAgICBzaG93QnV0dG9uQmFyOiB7XG4gICAgICAgICAgICB0eXBlOiBCb29sZWFuLFxuICAgICAgICAgICAgZGVmYXVsdDogZmFsc2VcbiAgICAgICAgfSxcbiAgICAgICAgc2hvcnRZZWFyQ3V0b2ZmOiB7XG4gICAgICAgICAgICB0eXBlOiBTdHJpbmcsXG4gICAgICAgICAgICBkZWZhdWx0OiAnKzEwJ1xuICAgICAgICB9LFxuICAgICAgICBzaG93VGltZToge1xuICAgICAgICAgICAgdHlwZTogQm9vbGVhbixcbiAgICAgICAgICAgIGRlZmF1bHQ6IGZhbHNlXG4gICAgICAgIH0sXG4gICAgICAgIHRpbWVPbmx5OiB7XG4gICAgICAgICAgICB0eXBlOiBCb29sZWFuLFxuICAgICAgICAgICAgZGVmYXVsdDogZmFsc2VcbiAgICAgICAgfSxcbiAgICAgICAgaG91ckZvcm1hdDoge1xuICAgICAgICAgICAgdHlwZTogU3RyaW5nLFxuICAgICAgICAgICAgZGVmYXVsdDogJzI0J1xuICAgICAgICB9LFxuICAgICAgICBzdGVwSG91cjoge1xuICAgICAgICAgICAgdHlwZTogTnVtYmVyLFxuICAgICAgICAgICAgZGVmYXVsdDogMVxuICAgICAgICB9LFxuICAgICAgICBzdGVwTWludXRlOiB7XG4gICAgICAgICAgICB0eXBlOiBOdW1iZXIsXG4gICAgICAgICAgICBkZWZhdWx0OiAxXG4gICAgICAgIH0sXG4gICAgICAgIHN0ZXBTZWNvbmQ6IHtcbiAgICAgICAgICAgIHR5cGU6IE51bWJlcixcbiAgICAgICAgICAgIGRlZmF1bHQ6IDFcbiAgICAgICAgfSxcbiAgICAgICAgc2hvd1NlY29uZHM6IHtcbiAgICAgICAgICAgIHR5cGU6IEJvb2xlYW4sXG4gICAgICAgICAgICBkZWZhdWx0OiBmYWxzZVxuICAgICAgICB9LFxuICAgICAgICBoaWRlT25EYXRlVGltZVNlbGVjdDoge1xuICAgICAgICAgICAgdHlwZTogQm9vbGVhbixcbiAgICAgICAgICAgIGRlZmF1bHQ6IGZhbHNlXG4gICAgICAgIH0sXG4gICAgICAgIHRpbWVTZXBhcmF0b3I6IHtcbiAgICAgICAgICAgIHR5cGU6IFN0cmluZyxcbiAgICAgICAgICAgIGRlZmF1bHQ6ICc6J1xuICAgICAgICB9LFxuICAgICAgICBzaG93V2Vlazoge1xuICAgICAgICAgICAgdHlwZTogQm9vbGVhbixcbiAgICAgICAgICAgIGRlZmF1bHQ6IGZhbHNlXG4gICAgICAgIH0sXG4gICAgICAgIG1hbnVhbElucHV0OiB7XG4gICAgICAgICAgICB0eXBlOiBCb29sZWFuLFxuICAgICAgICAgICAgZGVmYXVsdDogdHJ1ZVxuICAgICAgICB9LFxuICAgICAgICBhcHBlbmRUbzoge1xuICAgICAgICAgICAgdHlwZTogU3RyaW5nLFxuICAgICAgICAgICAgZGVmYXVsdDogJ2JvZHknXG4gICAgICAgIH0sXG4gICAgICAgIGtlZXBJbnZhbGlkOiB7XG4gICAgICAgICAgICB0eXBlOiBCb29sZWFuLFxuICAgICAgICAgICAgZGVmYXVsdDogZmFsc2VcbiAgICAgICAgfSxcbiAgICAgICAgaW5wdXRDbGFzczogbnVsbCxcbiAgICAgICAgaW5wdXRTdHlsZTogbnVsbCxcbiAgICAgICAgY2xhc3M6IG51bGwsXG4gICAgICAgIHN0eWxlOiBudWxsXG4gICAgfSxcbiAgICBuYXZpZ2F0aW9uU3Rhd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gICAgIFpJbmRleFV0aWxzLmNsZWFyKHRoaXMub3ZlcmxheSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5vdmVybGF5ID0gbnVsbDtcbiAgICB9LFxuICAgIGRhdGEoKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjdXJyZW50TW9udGg6IG51bGwsXG4gICAgICAgICAgICBjdXJyZW50WWVhcjogbnVsbCxcbiAgICAgICAgICAgIGN1cnJlbnRIb3VyOiBudWxsLFxuICAgICAgICAgICAgY3VycmVudE1pbnV0ZTogbnVsbCxcbiAgICAgICAgICAgIGN1cnJlbnRTZWNvbmQ6IG51bGwsXG4gICAgICAgICAgICBwbTogbnVsbCxcblx0XHRcdGZvY3VzZWQ6IGZhbHNlLFxuICAgICAgICAgICAgb3ZlcmxheVZpc2libGU6IGZhbHNlLFxuICAgICAgICAgICAgY3VycmVudFZpZXc6IHRoaXMudmlld1xuICAgICAgICB9XG4gICAgfSxcbiAgICB3YXRjaDoge1xuICAgICAgICBtb2RlbFZhbHVlKCkge1xuICAgICAgICAgICAgdGhpcy51cGRhdGVDdXJyZW50TWV0YURhdGEoKTtcbiAgICAgICAgfSxcbiAgICAgICAgc2hvd1RpbWUoKSB7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZUN1cnJlbnRNZXRhRGF0YSgpO1xuICAgICAgICB9LFxuICAgICAgICBtb250aHMoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5vdmVybGF5KSB7XG4gICAgICAgICAgICAgICAgc2V0VGltZW91dCh0aGlzLnVwZGF0ZUZvY3VzLCAwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbnVtYmVyT2ZNb250aHMoKSB7XG4gICAgICAgICAgICB0aGlzLmRlc3Ryb3lSZXNwb25zaXZlU3R5bGVFbGVtZW50KCk7XG4gICAgICAgICAgICB0aGlzLmNyZWF0ZVJlc3BvbnNpdmVTdHlsZSgpO1xuICAgICAgICB9LFxuICAgICAgICByZXNwb25zaXZlT3B0aW9ucygpIHtcbiAgICAgICAgICAgIHRoaXMuZGVzdHJveVJlc3BvbnNpdmVTdHlsZUVsZW1lbnQoKTtcbiAgICAgICAgICAgIHRoaXMuY3JlYXRlUmVzcG9uc2l2ZVN0eWxlKCk7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1ldGhvZHM6IHtcbiAgICAgICAgaXNDb21wYXJhYmxlKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMubW9kZWxWYWx1ZSAhPSBudWxsICYmIHR5cGVvZiB0aGlzLm1vZGVsVmFsdWUgIT09ICdzdHJpbmcnO1xuICAgICAgICB9LFxuICAgICAgICBpc1NlbGVjdGVkKGRhdGVNZXRhKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuaXNDb21wYXJhYmxlKCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0aGlzLm1vZGVsVmFsdWUpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5pc1NpbmdsZVNlbGVjdGlvbigpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmlzRGF0ZUVxdWFscyh0aGlzLm1vZGVsVmFsdWUsIGRhdGVNZXRhKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5pc011bHRpcGxlU2VsZWN0aW9uKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGRhdGUgb2YgdGhpcy5tb2RlbFZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCA9IHRoaXMuaXNEYXRlRXF1YWxzKGRhdGUsIGRhdGVNZXRhKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdGVkO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmKCB0aGlzLmlzUmFuZ2VTZWxlY3Rpb24oKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5tb2RlbFZhbHVlWzFdKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuaXNEYXRlRXF1YWxzKHRoaXMubW9kZWxWYWx1ZVswXSwgZGF0ZU1ldGEpIHx8IHRoaXMuaXNEYXRlRXF1YWxzKHRoaXMubW9kZWxWYWx1ZVsxXSwgZGF0ZU1ldGEpIHx8IHRoaXMuaXNEYXRlQmV0d2Vlbih0aGlzLm1vZGVsVmFsdWVbMF0sIHRoaXMubW9kZWxWYWx1ZVsxXSwgZGF0ZU1ldGEpO1xuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmlzRGF0ZUVxdWFscyh0aGlzLm1vZGVsVmFsdWVbMF0sIGRhdGVNZXRhKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH0sXG4gICAgICAgIGlzTW9udGhTZWxlY3RlZChtb250aCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuaXNDb21wYXJhYmxlKCkgPyAodGhpcy5tb2RlbFZhbHVlLmdldE1vbnRoKCkgPT09IG1vbnRoICYmIHRoaXMubW9kZWxWYWx1ZS5nZXRGdWxsWWVhcigpID09PSB0aGlzLmN1cnJlbnRZZWFyKSA6IGZhbHNlO1xuICAgICAgICB9LFxuICAgICAgICBpc1llYXJTZWx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uICAgICAgICAgICAgZGF5LnNldE1vbnRoKG1vbnRoKTtcbiAgICAgICAgICAgIGRheS5zZXRGdWxsWWVhcih5ZWFyKTtcblxuICAgICAgICAgICAgbGV0IGRheUluZGV4ID0gZGF5LmdldERheSgpICsgdGhpcy5zdW5kYXlJbmRleDtcbiAgICAgICAgICAgIHJldHVybiBkYXlJbmRleCA+PSA3ID8gZGF5SW5kZXggLSA3IDogZGF5SW5kZXg7XG4gICAgICAgIH0sXG4gICAgICAgIGdldERheXNDb3VudEluTW9udGgobW9udGgsIHllYXIpIHtcbiAgICAgICAgICAgIHJldHVybiAzMiAtIHRoaXMuZGF5bGlnaHRTYXZpbmdBZGp1c3QobmV3IERhdGUoeWVhciwgbW9udGgsIDMyKSkuZ2V0RGF0ZSgpO1xuICAgICAgICB9LFxuICAgICAgICBnZXREYXlzQ291bnRJblByZXZNb250aChtb250aCwgeWVhcikge1xuICAgICAgICAgICAgbGV0IHByZXYgPSB0aGlzLmdldFByZXZpb3VzTW9udGhBbmRZZWFyKG1vbnRoLCB5ZWFyKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmdldERheXNDb3VudEluTW9udGgocHJldi5tb250aCwgcHJldi55ZWFyKTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0UHJldmlvdXNNb250aEFuZFllYXIobW9udGgsIHllYXIpIHtcbiAgICAgICAgICAgIGxldCBtLCB5O1xuXG4gICAgICAgICAgICBpZiAobW9udGggPT09IDApIHtcbiAgICAgICAgICAgICAgICBtID0gMTE7XG4gICAgICAgICAgICAgICAgeSA9IHllYXIgLSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgbSA9IG1vbnRoIC0gMTtcbiAgICAgICAgICAgICAgICB5ID0geWVhcjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHsnbW9udGgnOm0sICd5ZWFyJzogeX07XG4gICAgICAgIH0sXG4gICAgICAgIGdldE5leHRNb250aEFuZFllYXIobW9udGgsIHllYXIpIHtcbiAgICAgICAgICAgIGxldCBtLCB5O1xuXG4gICAgICAgICAgICBpZiAobW9udGggPT09IDExKSB7XG4gICAgICAgICAgICAgICAgbSA9IDA7XG4gICAgICAgICAgICAgICAgeSA9IHllYXIgKyAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgbSA9IG1vbnRoICsgMTtcbiAgICAgICAgICAgICAgICB5ID0geWVhcjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHsnbW9udGgnOm0sJ3llYXInOnl9O1xuICAgICAgICB9LFxuICAgICAgICBkYXlsaWdodFNhdmluZ0FkanVzdChkYXRlKSB7XG4gICAgICAgICAgICBpZiAoIWRhdGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZGF0ZS5zZXRIb3VycyhkYXRlLmdldEhvdXJzKCkgPiAxMiA/IGRhdGUuZ2V0SG91cnMoKSArIDIgOiAwKTtcblxuICAgICAgICAgICAgcmV0dXJuIGRhdGU7XG4gICAgICAgIH0sXG4gICAgICAgIGlzVG9kYXkodG9kYXksIGRheSwgbW9udGgsIHllYXIpIHtcbiAgICAgICAgICAgIHJldHVybiB0b2RheS5nZXREYXRlKCkgPT09IGRheSAmJiB0b2RheS5nZXRNb250aCgpID09PSBtb250aCAmJiB0b2RheS5nZXRGdWxsWWVhcigpID09PSB5ZWFyO1xuICAgICAgICB9LFxuICAgICAgICBpc1NlbGVjdGFibGUoZGF5LCBtb250aCwgeWVhciwgb3RoZXJNb250aCkge1xuICAgICAgICAgICAgbGV0IHZhbGlkTWluID0gdHJ1ZTtcbiAgICAgICAgICAgIGxldCB2YWxpZE1heCA9IHRydWU7XG4gICAgICAgICAgICBsZXQgdmFsaWREYXRlID0gdHJ1ZTtcbiAgICAgICAgICAgIGxldCB2YWxpZERheSA9IHRydWU7XG5cbiAgICAgICAgICAgIGlmIChvdGhlck1vbnRoICYmICF0aGlzLnNlbGVjdE90aGVyTW9udGhzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5taW5EYXRlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubWluRGF0ZS5nZXRGdWxsWWVhcigpID4geWVhcikge1xuICAgICAgICAgICAgICAgICAgICB2YWxpZE1pbiA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh0aGlzLm1pbkRhdGUuZ2V0RnVsbFllYXIoKSA9PT0geWVhcikge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5taW5EYXRlLmdldE1vbnRoKCkgPiBtb250aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWRNaW4gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh0aGlzLm1pbkRhdGUuZ2V0TW9udGgoKSA9PT0gbW9udGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLm1pbkRhdGUuZ2V0RGF0ZSgpID4gZGF5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWRNaW4gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMubWF4RGF0ZSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLm1heERhdGUuZ2V0RnVsbFllYXIoKSA8IHllYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsaWRNYXggPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5tYXhEYXRlLmdldEZ1bGxZZWFyKCkgPT09IHllYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubWF4RGF0ZS5nZXRNb250aCgpIDwgbW9udGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkTWF4ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5tYXhEYXRlLmdldE1vbnRoKCkgPT09IG1vbnRoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5tYXhEYXRlLmdldERhdGUoKSA8IGRheSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkTWF4ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0aGlzLmRpc2FibGVkRGF0ZXMpIHtcbiAgICAgICAgICAgICAgICB2YWxpZERhdGUgPSAhdGhpcy5pc0RhdGVEaXNhYmxlZChkYXksbW9udGgseWVhcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0aGlzLmRpc2FibGVkRGF5cykge1xuICAgICAgICAgICAgICAgIHZhbGlkRGF5ID0gIXRoaXMuaXNEYXlEaXNhYmxlZChkYXksbW9udGgseWVhcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB2YWxpZE1pbiAmJiB2YWxpZE1heCAmJiB2YWxpZERhdGUgJiYgdmFsaWREYXk7XG4gICAgICAgIH0sXG4gICAgICAgIG9uT3ZlcmxheUVudGVyKGVsKSB7XG4gICAgICAgICAgICBlbC5zZXRBdHRyaWJ1dGUodGhpcy5hdHRyaWJ1dGVTZWxlY3RvciwgJycpO1xuXG4gICAgICAgICAgICBpZiAodGhpcy5hdXRvWkluZGV4KSB7XG4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ICAgICAgICAgIHRoaXMudW5iaW5kUmVzaXplTGlzdGVuZXIoKTtcbiAgICAgICAgICAgIHRoaXMuJGVtaXQoJ2hpZGUnKTtcblxuICAgICAgICAgICAgaWYgKHRoaXMubWFzaykge1xuICAgICAgICAgICAgICAgIHRoaXMuZGlzYWJsZU1vZGFsaXR5KCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMub3ZlcmxheSA9IG51bGw7XG4gICAgICAgIH0sXG4gICAgICAgIG9uUHJldkJ1dHRvbkNsaWNrKGV2ZW50KSB7XG4gICAgICAgICAgICBpZih0aGlzLnNob3dPdGhlck1vbnRocykge1xuICAgICAgICAgICAgICAgIHRoaXMubmF2aWdhdGlvblN0YXRlID0ge2JhY2t3YXJkOiB0cnVlLCBidXR0b246IHRydWV9O1xuICAgICAgICAgICAgICAgIHRoaXMubmF2QmFja3dhcmQoZXZlbnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBvbk5leHRCdXR0b25DbGljayhldmVudCkge1xuICAgICAgICAgICAgaWYodGhpcy5zaG93T3RoZXJNb250aHMpIHtcbiAgICAgICAgICAgICAgICB0aGlzLm5hdmlnYXRpb25TdGF0ZSA9IHtiYWNrd2FyZDogZmFsc2UsIGJ1dHRvbjogdHJ1ZX07XG4gICAgICAgICAgICAgICAgdGhpcy5uYXZGb3J3YXJkKGV2ZW50KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbmF2QmFja3dhcmQoZXZlbnQpIHtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG5cbiAgICAgICAgICAgIGlmICghdGhpcy5pc0VuYWJsZWQoKSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuY3VycmVudFZpZXcgPT09ICdtb250aCcpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmRlY3JlbWVudFllYXIoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuY3VycmVudFZpZXcgPT09ICd5ZWFyJykge1xuICAgICAgICAgICAgICAgIHRoaXMuZGVjcmVtZW50RGVjYWRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5jdXJyZW50TW9udGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50TW9udGggPSAxMTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kZWNyZW1lbnRZZWFyKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRNb250aC0tO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMuJGVtaXQoJ21vbnRoLWNoYW5nZScsIHttb250aDogdGhpcy5jdXJyZW50TW9udGgsIHllYXI6IHRoaXMuY3VycmVudFllYXJ9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbmF2Rm9yd2FyZChldmVudCkge1xuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcblxuICAgICAgICAgICAgaWYgKCF0aGlzLmlzRW5hYmxlZCgpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5jdXJyZW50VmlldyA9PT0gJ21vbnRoJykge1xuICAgICAgICAgICAgICAgIHRoaXMuaW5jcmVtZW50WWVhcigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5jdXJyZW50VmlldyA9PT0gJ3llYXInKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5pbmNyZW1lbnREZWNhZGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmN1cnJlbnRNb250aCA9PT0gMTEpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50TW9udGggPSAwO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmluY3JlbWVudFllYXIoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudE1vbnRoKys7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy4kZW1pdCgnbW9udGgtY2hhbmdlJywge21vbnRoOiB0aGlzLmN1cnJlbnRNb250aCAsIHllYXI6IHRoaXMuY3VycmVudFllYXJ9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZGVjcmVtZW50WWVhcigpIHtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudFllYXItLTtcbiAgICAgICAgfSxcbiAgICAgICAgZGVjcmVtZW50RGVjYWRlKCkge1xuICAgICAgICAgICAgdGhpcy5jdXJyZW50WWVhciA9IHRoaXMuY3VycmVudFllYXIgLSAxMDtcbiAgICAgICAgfSxcbiAgICAgICAgaW5jcmVtZW50WWVhcigpIHtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudFllYXIrKztcbiAgICAgICAgfSxcbiAgICAgICAgaW5jcmVtZW50RGVjYWRlKCkge1xuICAgICAgICAgICAgdGhpcy5jdXJyZW50WWVhciA9IHRoaXMuY3VycmVudFllYXIgKyAxMDtcbiAgICAgICAgfSxcbiAgICAgICAgc3dpdGNoVG9Nb250aFZpZXcoZXZlbnQpIHtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudFZpZXcgPSAnbW9udGgnO1xuICAgICAgICAgICAgc2V0VGltZW91dCh0aGlzLnVwZGF0ZUZvY3VzLCAwKTtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH0sXG4gICAgICAgIHN3aXRjaFRvWWVhclZpZXcoZXZlbnQpIHtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudFZpZXcgPSAneWVhcic7XG4gICAgICAgICAgICBzZXRUaW1lb3V0KHRoaXMudXBkYXRlRm9jdXMsIDApO1xuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfSxcbiAgICAgICAgaXNFbmFibGVkKCkge1xuICAgICAgICAgICAgcmV0dXJuICF0aGlzLiRhdHRycy5kaXNhYmxlZCAmJiAhdGhpcy4kYXR0cnMucmVhZG9ubHk7XG4gICAgICAgIH0sXG4gICAgICAgIHVwZGF0ZUN1cnJlbnRUaW1lTWV0YShkYXRlKSB7XG4gICAgICAgICAgICBsZXQgY3VycmVudEhvdXIgPSBkYXRlLmdldEhvdXJzKCk7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLmhvdXJGb3JtYXQgPT09ICcxMicpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnBtID0gY3VycmVudEhvdXIgPiAxMTtcblxuICAgICAgICAgICAgICAgIGlmIChjdXJyZW50SG91ciA+PSAxMilcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudEhvdXIgPSAoY3VycmVudEhvdXIgPT0gMTIpID8gMTIgOiBjdXJyZW50SG91ciAtIDEyO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudEhvdXIgPSAoY3VycmVudEhvdXIgPT0gMCkgPyAxMiA6IGN1cnJlbnRIb3VyO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRIb3VyID0gTWF0aC5mbG9vcihjdXJyZW50SG91ciAvIHRoaXMuc3RlcEhvdXIpICogdGhpcy5zdGVwSG91cjtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudE1pbnV0ZSA9IE1hdGguZmxvb3IoZGF0ZS5nZXRNaW51dGVzKCkgLyB0aGlzLnN0ZXBNaW51dGUpICogdGhpcy5zdGVwTWludXRlO1xuICAgICAgICAgICAgdGhpcy5jdXJyZW50U2Vjb25kID0gTWF0aC5mbG9vcihkYXRlLmdldFNlY29uZHMoKSAvIHRoaXMuc3RlcFNlY29uZCkgKiB0aGlzLnN0ZXBTZWNvbmQ7XG4gICAgICAgIH0sXG4gICAgICAgIGJpbmRPdXRzaWRlQ2xpY2tMaXN0ZW5lcigpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5vdXRzaWRlQ2xpY2tMaXN0ZW5lcikge1xuICAgICAgICAgICAgICAgIHRoaXMub3V0c2lkZUNsaWNrTGlzdGVuZXIgPSAoZXZlbnQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMub3ZlcmxheVZpc2libGUgJiYgdGhpcy5pc091dHNpZGVDbGlja2VkKGV2ZW50KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5vdmVybGF5VmlzaWJsZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWRvd24nLCB0aGlzLm91dHNpZGVDbGlja0xpc3RlbmVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgdW5iaW5kT3V0c2lkZUNsaWNrTGlzdGVuZXIoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5vdXRzaWRlQ2xpY2tMaXN0ZW5lcikge1xuICAgICAgICAgICAgICAgIGRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ21vdXNlZG93bicsIHRoaXMub3V0c2lkZUNsaWNrTGlzdGVuZXIpO1xuICAgICAgICAgICAgICAgIHRoaXMub3V0c2lkZUNsaWNrTGlzdGVuZXIgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBiaW5kU2Nyb2xsTGlzdGVuZXIoKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuc2Nyb2xsSGFuZGxlcikge1xuICAgICAgICAgICAgICAgIHRoaXMuc2Nyb2xsSGFuZGxlciA9IG5ldyBDb25uZWN0ZWRPdmVybGF5U2Nyb2xsSGFuZGxlcih0aGlzLiRyZWZzLmNvbnRhaW5lciwgKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5vdmVybGF5VmlzaWJsZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5vdmVybGF5VmlzaWJsZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuc2Nyb2xsSGFuZGxlci5iaW5kU2Nyb2xsTGlzdGVuZXIoKTtcbiAgICAgICAgfSxcbiAgICAgICAgdW5iaW5kU2Nyb2xsTGlzdGVuZXIoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5zY3JvbGxIYW5kbGVyKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zY3JvbGxIYW5kbGVyLnVuYmluZFNjcm9sbExpc3RlbmVyKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGJpbmRSZXNpemVMaXN0ZW5lcigpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5yZXNpemVMaXN0ZW5lcikge1xuICAgICAgICAgICAgICAgIHRoaXMucmVzaXplTGlzdGVuZXIgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLm92ZXJsYXlWaXNpYmxlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm92ZXJsYXlWaXNpYmxlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdyZXNpemUnLCB0aGlzLnJlc2l6ZUxpc3RlbmVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgdW5iaW5kUmVzaXplTGlzdGVuZXIoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5yZXNpemVMaXN0ZW5lcikge1xuICAgICAgICAgICAgICAgIHdpbmRvdy5yZW1vdmVFdmVudExpc3RlbmVyKCdyZXNpemUnLCB0aGlzLnJlc2l6ZUxpc3RlbmVyKTtcbiAgICAgICAgICAgICAgICB0aGlzLnJlc2l6ZUxpc3RlbmVyID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgaXNPdXRzaWRlQ2xpY2tlZChldmVudCkge1xuICAgICAgICAgICAgcmV0dXJuICEodGhpcy4kZWwuaXNTYW1lTm9kZShldmVudC50YXJnZXQpIHx8IHRoaXMuaXNOYXZJY29uQ2xpY2tlZChldmVudCkgfHxcbiAgICAgICAgICAgICAgICAgICAgdGhpcy4kZWwuY29udGFpbnMoZXZlbnQudGFyZ2V0KSB8fCAodGhpcy5vdmVybGF5ICYmIHRoaXMub3ZlcmxheS5jb250YWlucyhldmVudC50YXJnZXQpKSk7XG4gICAgICAgIH0sXG4gICAgICAgIGlzTmF2SWNvbkNsaWNrZWQoZXZlbnQpIHtcbiAgICAgICAgICAgIHJldHVybiAoRG9tSGFuZGxlci5oYXNDbGFzcyhldmVudC50YXJnZXQsICdwLWRhdGVwaWNrZXItcHJldicpIHx8IERvbUhhbmRsZXIuaGFzQ2xhc3MoZXZlbnQudGFyZ2V0LCAncC1kYXRlcGlja2VyLXByZXYtaWNvbicpXG4gICAgICAgICAgICAgICAgICAgIHx8IERvbUhhbmRsZXIuaGFzQ2xhc3MoZXZlbnQudGFyZ2V0LCAncC1kYXRlcGlja2VyLW5leHQnKSB8fCBEb21IYW5kbGVyLmhhc0NsYXNzKGV2ZW50LnRhcmdldCwgJ3AtZGF0ZXBpY2tlci1uZXh0LWljb24nKSk7XG4gICAgICAgIH0sXG4gICAgICAgIGFsaWduT3ZlcmxheSgpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnRvdWNoVUkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVuYWJsZU1vZGFsaXR5KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICh0aGlzLm92ZXJsYXkpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5hcHBlbmREaXNhYmxlZCkge1xuICAgICAgICAgICAgICAgICAgICBEb21IYW5kbGVyLnJlbGF0aXZlUG9zaXRpb24odGhpcy5vdmVybGF5LCB0aGlzLiRlbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy52aWV3ID09PSAnZGF0ZScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMub3ZlcmxheS5zdHlsZS53aWR0aCA9IERvbUhhbmRsZXIuZ2V0T3V0ZXJXaWR0aCh0aGlzLm92ZXJsYXkpICsgJ3B4JztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMub3ZlcmxheS5zdHlsZS5taW5XaWR0aCA9IERvbUhhbmRsZXIuZ2V0T3V0ZXJXaWR0aCh0aGlzLiRlbCkgKyAncHgnO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5vdmVybGF5LnN0eWxlLndpZHRoID0gRG9tSGFuZGxlci5nZXRPdXRlcldpZHRoKHRoaXMuJGVsKSArICdweCc7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBEb21IYW5kbGVyLmFic29sdXRlUG9zaXRpb24odGhpcy5vdmVybGF5LCB0aGlzLiRlbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBvbkJ1dHRvbkNsaWNrKCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuaXNFbmFibGVkKCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMub3ZlcmxheVZpc2libGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy4kcmVmcy5pbnB1dC4kZWwuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vdmVybGF5VmlzaWJsZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm92ZXJsYXlWaXNpYmxlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBpc0RhdGVEaXNhYmxlZChkYXksIG1vbnRoLCB5ZWFyKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5kaXNhYmxlZERhdGVzKSB7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgZGlzYWJsZWREYXRlIG9mIHRoaXMuZGlzYWJsZWREYXRlcykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGlzYWJsZWREYXRlLmdldEZ1bGxZZWFyKCkgPT09IHllYXIgJiYgZGlzYWJsZWREYXRlLmdldE1vbnRoKCkgPT09IG1vbnRoICYmIGRpc2FibGVkRGF0ZS5nZXREYXRlKCkgPT09IGRheSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfSxcbiAgICAgICAgaXNEYXlEaXNhYmxlZChkYXksIG1vbnRoLCB5ZWFyKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5kaXNhYmxlZERheXMpIHtcbiAgICAgICAgICAgICAgICBsZXQgd2Vla2RheSA9IG5ldyBEYXRlKHllYXIsIG1vbnRoLCBkYXkpO1xuICAgICAgICAgICAgICAgIGxldCB3ZWVrZGF5TnVtYmVyID0gd2Vla2RheS5nZXREYXkoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kaXNhYmxlZERheXMuaW5kZXhPZih3ZWVrZGF5TnVtYmVyKSAhPT0gLTE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH0sXG4gICAgICAgIG9uTW9udGhEcm9wZG93bkNoYW5nZSh2YWx1ZSkge1xuICAgICAgICAgICAgdGhpcy5jdXJyZW50TW9udGggPSBwYXJzZUludCh2YWx1ZSk7XG4gICAgICAgICAgICB0aGlzLiRlbWl0KCdtb250aC1jaGFuZ2UnLCB7bW9udGg6IHRoaXMuY3VycmVudE1vbnRoICsgMSwgeWVhcjogdGhpcy5jdXJyZW50WWVhcn0pO1xuICAgICAgICB9LFxuICAgICAgICBvblllYXJEcm9wZG93bkNoYW5nZSh2YWx1ZSkge1xuICAgICAgICAgICAgdGhpcy5jdXJyZW50WWVhciA9IHBhcnNlSW50KHZhbHVlKTtcbiAgICAgICAgICAgIHRoaXMuJGVtaXQoJ3llYXItY2hhbmdlJywge21vbnRoOiB0aGlzLmN1cnJlbnRNb250aCArIDEsIHllYXI6IHRoaXMuY3VycmVudFllYXJ9KTtcbiAgICAgICAgfSxcbiAgICAgICAgb25EYXRlU2VsZWN0KGV2ZW50LCBkYXRlTWV0YSkge1xuICAgICAgICAgICAgaWYgKHRoaXMuJGF0dHJzLmRpc2FibGVkIHx8ICFkYXRlTWV0YS5zZWxlY3RhYmxlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBEb21IYW5kbGVyLmZpbmQodGhpcy5vdmVybGF5LCAnLnAtZGF0ZXBpY2tlci1jYWxlbmRhciB0ZCBzcGFuOm5vdCgucC1kaXNhYmxlZCknKS5mb3JFYWNoKGNlbGwgPT4gY2VsbC50YWJJbmRleCA9IC0xKTtcblxuICAgICAgICAgICAgaWYgKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgZXZlbnQuY3VycmVudFRhcmdldC5mb2N1cygpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5pc011bHRpcGxlU2VsZWN0aW9uKCkgJiYgdGhpcy5pc1NlbGVjdGVkKGRhdGVNZXRhKSkge1xuICAgICAgICAgICAgICAgIGxldCBuZXdWYWx1ZSA9IHRoaXMubW9kZWxWYWx1ZS5maWx0ZXIoZGF0ZSA9PiAhdGhpcy5pc0RhdGVFcXVhbHMoZGF0ZSwgZGF0ZU1ldGEpKTtcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZU1vZGVsKG5ld1ZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNob3VsZFNlbGVjdERhdGUoZGF0ZU1ldGEpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRlTWV0YS5vdGhlck1vbnRoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRNb250aCA9IGRhdGVNZXRhLm1vbnRoO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50WWVhciA9IGRhdGVNZXRhLnllYXI7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdERhdGUoZGF0ZU1ldGEpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3REYXRlKGRhdGVNZXRhKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuaXNTaW5nbGVTZWxlY3Rpb24oKSAmJiAoIXRoaXMuc2hvd1RpbWUgfHwgdGhpcy5oaWRlT25EYXRlVGltZVNlbGVjdCkpIHtcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vdmVybGF5VmlzaWJsZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH0sIDE1MCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHNlbGVjdERhdGUoZGF0ZU1ldGEpIHtcbiAgICAgICAgICAgIGxldCBkYXRlID0gbmV3IERhdGUoZGF0ZU1ldGEueWVhciwgZGF0ZU1ldGEubW9udGgsIGRhdGVNZXRhLmRheSk7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnNob3dUaW1lKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuaG91ckZvcm1hdCA9PT0gJzEyJyAmJiB0aGlzLnBtICYmIHRoaXMuY3VycmVudEhvdXIgIT0gMTIpXG4gICAgICAgICAgICAgICAgICAgIGRhdGUuc2V0SG91cnModGhpcy5jdXJyZW50SG91ciArIDEyKTtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIGRhdGUuc2V0SG91cnModGhpcy5jdXJyZW50SG91cik7XG5cbiAgICAgICAgICAgICAgICBkYXRlLnNldE1pbnV0ZXModGhpcy5jdXJyZW50TWludXRlKTtcbiAgICAgICAgICAgICAgICBkYXRlLnNldFNlY29uZHModGhpcy5jdXJyZW50U2Vjb25kKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMubWluRGF0ZSAmJiB0aGlzLm1pbkRhdGUgPiBkYXRlKSB7XG4gICAgICAgICAgICAgICAgZGF0ZSA9IHRoaXMubWluRGF0ZTtcbiAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRIb3VyID0gZGF0ZS5nZXRIb3VycygpO1xuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudE1pbnV0ZSA9IGRhdGUuZ2V0TWludXRlcygpO1xuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFNlY29uZCA9IGRhdGUuZ2V0U2Vjb25kcygpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5tYXhEYXRlICYmIHRoaXMubWF4RGF0ZSA8IGRhdGUpIHtcbiAgICAgICAgICAgICAgICBkYXRlID0gdGhpcy5tYXhEYXRlO1xuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudEhvdXIgPSBkYXRlLmdldEhvdXJzKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50TWludXRlID0gZGF0ZS5nZXRNaW51dGVzKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50U2Vjb25kID0gZGF0ZS5nZXRTZWNvbmRzKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxldCBtb2RlbFZhbCA9IG51bGw7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLmlzU2luZ2xlU2VsZWN0aW9uKCkpIHtcbiAgICAgICAgICAgICAgICBtb2RlbFZhbCA9IGRhdGU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICh0aGlzLmlzTXVsdGlwbGVTZWxlY3Rpb24oKSkge1xuICAgICAgICAgICAgICAgIG1vZGVsVmFsID0gdGhpcy5tb2RlbFZhbHVlID8gWy4uLnRoaXMubW9kZWxWYWx1ZSwgZGF0ZV0gOiBbZGF0ZV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICh0aGlzLmlzUmFuZ2VTZWxlY3Rpb24oKSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLm1vZGVsVmFsdWUgJiYgdGhpcy5tb2RlbFZhbHVlLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgc3RhcnREYXRlID0gdGhpcy5tb2RlbFZhbHVlWzBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgZW5kRGF0ZSA9IHRoaXMubW9kZWxWYWx1ZVsxXTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoIWVuZERhdGUgJiYgZGF0ZS5nZXRUaW1lKCkgPj0gc3RhcnREYXRlLmdldFRpbWUoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZW5kRGF0ZSA9IGRhdGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdGFydERhdGUgPSBkYXRlO1xuICAgICAgICAgICAgICAgICAgICAgICAgZW5kRGF0ZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbW9kZWxWYWwgPSBbc3RhcnREYXRlLCBlbmREYXRlXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1vZGVsVmFsID0gW2RhdGUsIG51bGxdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKG1vZGVsVmFsICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhpcy51cGRhdGVNb2RlbChtb2RlbFZhbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLiRlbWl0KCdkYXRlLXNlbGVjdCcsIGRhdGUpO1xuICAgICAgICB9LFxuICAgICAgICB1cGRhdGVNb2RlbCh2YWx1ZSkge1xuICAgICAgICAgICAgdGhpcy4kZW1pdCgndXBkYXRlOm1vZGVsVmFsdWUnLCB2YWx1ZSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNob3VsZFNlbGVjdERhdGUoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5pc011bHRpcGxlU2VsZWN0aW9uKCkpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMubWF4RGF0ZUNvdW50ICE9IG51bGwgPyB0aGlzLm1heERhdGVDb3VudCA+ICh0aGlzLm1vZGVsVmFsdWUgPyB0aGlzLm1vZGVsVmFsdWUubGVuZ3RoIDogMCkgOiB0cnVlO1xuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9LFxuICAgICAgICBpc1NpbmdsZVNlbGVjdGlvbigpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnNlbGVjdGlvbk1vZGUgPT09ICdzaW5nbGUnO1xuICAgICAgICB9LFxuICAgICAgICBpc1JhbmdlU2VsZWN0aW9uKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuc2VsZWN0aW9uTW9kZSA9PT0gJ3JhbmdlJztcbiAgICAgICAgfSxcbiAgICAgICAgaXNNdWx0aXBsZVNlbGVjdGlvbigpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnNlbGVjdGlvbk1vZGUgPT09ICdtdWx0aXBsZSc7XG4gICAgICAgIH0sXG4gICAgICAgIGZvcm1hdFZhbHVlKHZhbHVlKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGV0IGZvcm1hdHRlZFZhbHVlID0gJyc7XG4gICAgICAgICAgICBpZiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5pc1NpbmdsZVNlbGVjdGlvbigpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXR0ZWRWYWx1ZSA9IHRoaXMuZm9ybWF0RGF0ZVRpbWUodmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuaXNNdWx0aXBsZVNlbGVjdGlvbigpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgdmFsdWUubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0ZUFzU3RyaW5nID0gdGhpcy5mb3JtYXREYXRlVGltZSh2YWx1ZVtpXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0dGVkVmFsdWUgKz0gZGF0ZUFzU3RyaW5nO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGkgIT09ICh2YWx1ZS5sZW5ndGggLSAxKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXR0ZWRWYWx1ZSArPSAnLCAnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh0aGlzLmlzUmFuZ2VTZWxlY3Rpb24oKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlICYmIHZhbHVlLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdGFydERhdGUgPSB2YWx1ZVswXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZW5kRGF0ZSA9IHZhbHVlWzFdO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0dGVkVmFsdWUgPSB0aGlzLmZvcm1hdERhdGVUaW1lKHN0YXJ0RGF0ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVuZERhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0dGVkVmFsdWUgKz0gJyAtICcgKyB0aGlzLmZvcm1hdERhdGVUaW1lKGVuZERhdGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXRjaChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9ybWF0dGVkVmFsdWUgPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBmb3JtYXR0ZWRWYWx1ZTtcbiAgICAgICAgfSxcbiAgICAgICAgZm9ybWF0RGF0ZVRpbWUoZGF0ZSkge1xuICAgICAgICAgICAgbGV0IGZvcm1hdHRlZFZhbHVlID0gbnVsbDtcbiAgICAgICAgICAgIGlmIChkYXRlKSB7XG4gICAgICAgICAgICAgICAgaWYodGhpcy50aW1lT25seSkge1xuICAgICAgICAgICAgICAgICAgICBmb3JtYXR0ZWRWYWx1ZSA9IHRoaXMuZm9ybWF0VGltZShkYXRlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdHRlZFZhbHVlID0gdGhpcy5mb3JtYXREYXRlKGRhdGUsIHRoaXMuZGF0ZVBhdHRlcm4pO1xuICAgICAgICAgICAgICAgICAgICBpZih0aGlzLnNob3dUaW1lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXR0ZWRWYWx1ZSArPSAnICcgKyB0aGlzLmZvcm1hdFRpbWUoZGF0ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBmb3JtYXR0ZWRWYWx1ZTtcbiAgICAgICAgfSxcbiAgICAgICAgZm9ybWF0RGF0ZShkYXRlLCBmb3JtYXQpIHtcbiAgICAgICAgICAgIGlmICghZGF0ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAnJztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGV0IGlGb3JtYXQ7XG4gICAgICAgICAgICBjb25zdCBsb29rQWhlYWQgPSAobWF0Y2gpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBtYXRjaGVzID0gKGlGb3JtYXQgKyAxIDwgZm9ybWF0Lmxlbmd0aCAmJiBmb3JtYXQuY2hhckF0KGlGb3JtYXQgKyAxKSA9PT0gbWF0Y2gpO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaGVzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlGb3JtYXQrKztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIG1hdGNoZXM7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGZvcm1hdE51bWJlciA9IChtYXRjaCwgdmFsdWUsIGxlbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBsZXQgbnVtID0gJycgKyB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxvb2tBaGVhZChtYXRjaCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChudW0ubGVuZ3RoIDwgbGVuKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtID0gJzAnICsgbnVtO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudW07XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBmb3JtYXROYW1lID0gKG1hdGNoLCB2YWx1ZSwgc2hvcnROYW1lcywgbG9uZ05hbWVzKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAobG9va0FoZWFkKG1hdGNoKSA/IGxvbmdOYW1lc1t2YWx1ZV0gOiBzaG9ydE5hbWVzW3ZhbHVlXSk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGxldCBvdXRwdXQgPSAnJztcbiAgICAgICAgICAgIGxldCBsaXRlcmFsID0gZmFsc2U7XG5cbiAgICAgICAgICAgIGlmIChkYXRlKSB7XG4gICAgICAgICAgICAgICAgZm9yIChpRm9ybWF0ID0gMDsgaUZvcm1hdCA8IGZvcm1hdC5sZW5ndGg7IGlGb3JtYXQrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAobGl0ZXJhbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZvcm1hdC5jaGFyQXQoaUZvcm1hdCkgPT09ICdcXCcnICYmICFsb29rQWhlYWQoJ1xcJycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGl0ZXJhbCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgKz0gZm9ybWF0LmNoYXJBdChpRm9ybWF0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoZm9ybWF0LmNoYXJBdChpRm9ybWF0KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2QnOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgKz0gZm9ybWF0TnVtYmVyKCdkJywgZGF0ZS5nZXREYXRlKCksIDIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdEJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0ICs9IGZvcm1hdE5hbWUoJ0QnLCBkYXRlLmdldERheSgpLCB0aGlzLiRwcmltZXZ1ZS5jb25maWcubG9jYWxlLmRheU5hbWVzU2hvcnQsIHRoaXMuJHByaW1ldnVlLmNvbmZpZy5sb2NhbGUuZGF5TmFtZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdvJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0ICs9IGZvcm1hdE51bWJlcignbycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1hdGgucm91bmQoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3IERhdGUoZGF0ZS5nZXRGdWxsWWVhcigpLCBkYXRlLmdldE1vbnRoKCksIGRhdGUuZ2V0RGF0ZSgpKS5nZXRUaW1lKCkgLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3IERhdGUoZGF0ZS5nZXRGdWxsWWVhcigpLCAwLCAwKS5nZXRUaW1lKCkpIC8gODY0MDAwMDApLCAzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbSc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dCArPSBmb3JtYXROdW1iZXIoJ20nLCBkYXRlLmdldE1vbnRoKCkgKyAxLCAyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnTSc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dCArPSBmb3JtYXROYW1lKCdNJyxkYXRlLmdldE1vbnRoKCksIHRoaXMuJHByaW1ldnVlLmNvbmZpZy5sb2NhbGUubW9udGhOYW1lc1Nob3J0LCB0aGlzLiRwcmltZXZ1ZS5jb25maWcubG9jYWxlLm1vbnRoTmFtZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd5JzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0ICs9IGxvb2tBaGVhZCgneScpID8gZGF0ZS5nZXRGdWxsWWVhcigpIDogKGRhdGUuZ2V0RnVsbFllYXIoKSAlIDEwMCA8IDEwID8gJzAnIDogJycpICsgKGRhdGUuZ2V0RnVsbFllYXIoKSAlIDEwMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ0AnOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgKz0gZGF0ZS5nZXRUaW1lKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJyEnOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgKz0gZGF0ZS5nZXRUaW1lKCkgKiAxMDAwMCArIHRoaXMudGlja3NUbzE5NzA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ1xcJyc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsb29rQWhlYWQoJ1xcJycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgKz0gJ1xcJyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXRlcmFsID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgKz0gZm9ybWF0LmNoYXJBdChpRm9ybWF0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBvdXRwdXQ7XG4gICAgICAgIH0sXG4gICAgICAgIGZvcm1hdFRpbWUoZGF0ZSkge1xuICAgICAgICAgICAgaWYgKCFkYXRlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICcnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsZXQgb3V0cHV0ID0gJyc7XG4gICAgICAgICAgICBsZXQgaG91cnMgPSBkYXRlLmdldEhvdXJzKCk7XG4gICAgICAgICAgICBsZXQgbWludXRlcyA9IGRhdGUuZ2V0TWludXRlcygpO1xuICAgICAgICAgICAgbGV0IHNlY29uZHMgPSBkYXRlLmdldFNlY29uZHMoKTtcblxuICAgICAgICAgICAgaWYgKHRoaXMuaG91ckZvcm1hdCA9PT0gJzEyJyAmJiBob3VycyA+IDExICYmIGhvdXJzICE9PSAxMikge1xuICAgICAgICAgICAgICAgIGhvdXJzIC09IDEyO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5ob3VyRm9ybWF0ID09PSAnMTInKSB7XG4gICAgICAgICAgICAgICAgb3V0cHV0ICs9IGhvdXJzID09PSAwID8gMTIgOiAoaG91cnMgPCAxMCkgPyAnMCcgKyBob3VycyA6IGhvdXJzO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgb3V0cHV0ICs9IChob3VycyA8IDEwKSA/ICcwJyArIGhvdXJzIDogaG91cnM7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBvdXRwdXQgKz0gJzonO1xuICAgICAgICAgICAgb3V0cHV0ICs9IChtaW51dGVzIDwgMTApID8gJzAnICsgbWludXRlcyA6IG1pbnV0ZXM7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnNob3dTZWNvbmRzKSB7XG4gICAgICAgICAgICAgICAgb3V0cHV0ICs9ICc6JztcbiAgICAgICAgICAgICAgICBvdXRwdXQgKz0gKHNlY29uZHMgPCAxMCkgPyAnMCcgKyBzZWNvbmRzIDogc2Vjb25kcztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuaG91ckZvcm1hdCA9PT0gJzEyJykge1xuICAgICAgICAgICAgICAgIG91dHB1dCArPSBkYXRlLmdldEhvdXJzKCkgPiAxMSA/ICcgUE0nIDogJyBBTSc7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBvdXRwdXQ7XG4gICAgICAgIH0sXG4gICAgICAgIG9uVG9kYXlCdXR0b25DbGljayhldmVudCkge1xuICAgICAgICAgICAgbGV0IGRhdGUgPSBuZXcgRGF0ZSgpO1xuICAgICAgICAgICAgbGV0IGRhdGVNZXRhID0ge1xuICAgICAgICAgICAgICAgIGRheTogZGF0ZS5nZXREYXRlKCksXG4gICAgICAgICAgICAgICAgbW9udGg6IGRhdGUuZ2V0TW9udGgoKSxcbiAgICAgICAgICAgICAgICB5ZWFyOiBkYXRlLmdldEZ1bGxZZWFyKCksXG4gICAgICAgICAgICAgICAgb3RoZXJNb250aDogZGF0ZS5nZXRNb250aCgpICE9PSB0aGlzLmN1cnJlbnRNb250aCB8fCBkYXRlLmdldEZ1bGxZZWFyKCkgIT09IHRoaXMuY3VycmVudFllYXIsXG4gICAgICAgICAgICAgICAgdG9kYXk6IHRydWUsXG4gICAgICAgICAgICAgICAgc2VsZWN0YWJsZTogdHJ1ZVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdGhpcy5vbkRhdGVTZWxlY3QobnVsbCwgZGF0ZU1ldGEpO1xuICAgICAgICAgICAgdGhpcy4kZW1pdCgndG9kYXktY2xpY2snLCBkYXRlKTtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH0sXG4gICAgICAgIG9uQ2xlYXJCdXR0b25DbGljayhldmVudCkge1xuICAgICAgICAgICAgdGhpcy51cGRhdGVNb2RlbChudWxsKTtcbiAgICAgICAgICAgIHRoaXMub3ZlcmxheVZpc2libGUgPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuJGVtaXQoJ2NsZWFyLWNsaWNrJywgZXZlbnQpO1xuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfSxcbiAgICAgICAgb25UaW1lUGlja2VyRWxlbWVudE1vdXNlRG93bihldmVudCwgdHlwZSwgZGlyZWN0aW9uKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5pc0VuYWJsZWQoKSkge1xuICAgICAgICAgICAgICAgIHRoaXMucmVwZWF0KGV2ZW50LCBudWxsLCB0eXBlLCBkaXJlY3Rpb24pO1xuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIG9uVGltZVBpY2tlckVsZW1lbnRNb3VzZVVwKGV2ZW50KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5pc0VuYWJsZWQoKSkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2xlYXJUaW1lUGlja2VyVGltZXIoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZU1vZGVsVGltZSgpO1xuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIG9uVGltZVBpY2tlckVsZW1lbnRNb3VzZUxlYXZlKCkge1xuICAgICAgICAgICAgdGhpcy5jbGVhclRpbWVQaWNrZXJUaW1lcigpO1xuICAgICAgICB9LFxuICAgICAgICByZXBlYXQoZXZlbnQsIGludGVydmFsLCB0eXBlLCBkaXJlY3Rpb24pIHtcbiAgICAgICAgICAgIGxldCBpID0gaW50ZXJ2YWx8fDUwMDtcblxuICAgICAgICAgICAgdGhpcy5jbGVhclRpbWVQaWNrZXJUaW1lcigpO1xuICAgICAgICAgICAgdGhpcy50aW1lUGlja2VyVGltZXIgPSBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLnJlcGVhdChldmVudCwgMTAwLCB0eXBlLCBkaXJlY3Rpb24pO1xuICAgICAgICAgICAgfSwgaSk7XG5cbiAgICAgICAgICAgIHN3aXRjaCh0eXBlKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICBpZiAoZGlyZWN0aW9uID09PSAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5pbmNyZW1lbnRIb3VyKGV2ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kZWNyZW1lbnRIb3VyKGV2ZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRpcmVjdGlvbiA9PT0gMSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaW5jcmVtZW50TWludXRlKGV2ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kZWNyZW1lbnRNaW51dGUoZXZlbnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAoZGlyZWN0aW9uID09PSAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5pbmNyZW1lbnRTZWNvbmQoZXZlbnQpO1xuICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmRlY3JlbWVudFNlY29uZChldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNvbnZlcnRUbzI0SG91cihob3VycywgcG0pIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmhvdXJGb3JtYXQgPT0gJzEyJykge1xuICAgICAgICAgICAgICAgIGlmIChob3VycyA9PT0gMTIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChwbSA/IDEyIDogMCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChwbSA/IGhvdXJzICsgMTIgOiBob3Vycyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGhvdXJzO1xuICAgICAgICB9LFxuICAgICAgICB2YWxpZGF0ZVRpbWUoaG91ciwgbWludXRlLCBzZWNvbmQsIHBtKSB7XG4gICAgICAgICAgICBsZXQgdmFsdWUgPSB0aGlzLmlzQ29tcGFyYWJsZSgpID8gdGhpcy5tb2RlbFZhbHVlIDogdGhpcy52aWV3RGF0ZTtcbiAgICAgICAgICAgIGNvbnN0IGNvbnZlcnRlZEhvdXIgPSB0aGlzLmNvbnZlcnRUbzI0SG91cihob3VyLCBwbSk7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLmlzUmFuZ2VTZWxlY3Rpb24oKSkge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gdGhpcy5tb2RlbFZhbHVlWzFdIHx8IHRoaXMubW9kZWxWYWx1ZVswXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLmlzTXVsdGlwbGVTZWxlY3Rpb24oKSkge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gdGhpcy5tb2RlbFZhbHVlW3RoaXMubW9kZWxWYWx1ZS5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IHZhbHVlRGF0ZVN0cmluZyA9IHZhbHVlID8gdmFsdWUudG9EYXRlU3RyaW5nKCkgOiBudWxsO1xuICAgICAgICAgICAgaWYgKHRoaXMubWluRGF0ZSAmJiB2YWx1ZURhdGVTdHJpbmcgJiYgdGhpcy5taW5EYXRlLnRvRGF0ZVN0cmluZygpID09PSB2YWx1ZURhdGVTdHJpbmcpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5taW5EYXRlLmdldEhvdXJzKCkgPiBjb252ZXJ0ZWRIb3VyKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubWluRGF0ZS5nZXRIb3VycygpID09PSBjb252ZXJ0ZWRIb3VyKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLm1pbkRhdGUuZ2V0TWludXRlcygpID4gbWludXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubWluRGF0ZS5nZXRNaW51dGVzKCkgPT09IG1pbnV0ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubWluRGF0ZS5nZXRTZWNvbmRzKCkgPiBzZWNvbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0aGlzLm1heERhdGUgJiYgdmFsdWVEYXRlU3RyaW5nICYmIHRoaXMubWF4RGF0ZS50b0RhdGVTdHJpbmcoKSA9PT0gdmFsdWVEYXRlU3RyaW5nKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubWF4RGF0ZS5nZXRIb3VycygpIDwgY29udmVydGVkSG91cikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh0aGlzLm1heERhdGUuZ2V0SG91cnMoKSA9PT0gY29udmVydGVkSG91cikge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5tYXhEYXRlLmdldE1pbnV0ZXMoKSA8IG1pbnV0ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLm1heERhdGUuZ2V0TWludXRlcygpID09PSBtaW51dGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5tYXhEYXRlLmdldFNlY29uZHMoKSA8IHNlY29uZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0sXG4gICAgICAgIGluY3JlbWVudEhvdXIoZXZlbnQpIHtcbiAgICAgICAgICAgIGxldCBwcmV2SG91ciA9IHRoaXMuY3VycmVudEhvdXI7XG4gICAgICAgICAgICBsZXQgbmV3SG91ciA9IHRoaXMuY3VycmVudEhvdXIgKyB0aGlzLnN0ZXBIb3VyO1xuICAgICAgICAgICAgbGV0IG5ld1BNID0gdGhpcy5wbTtcblxuICAgICAgICAgICAgaWYgKHRoaXMuaG91ckZvcm1hdCA9PSAnMjQnKVxuICAgICAgICAgICAgICAgIG5ld0hvdXIgPSAobmV3SG91ciA+PSAyNCkgPyAobmV3SG91ciAtIDI0KSA6IG5ld0hvdXI7XG4gICAgICAgICAgICBlbHNlIGlmICh0aGlzLmhvdXJGb3JtYXQgPT0gJzEyJykge1xuICAgICAgICAgICAgICAgIC8vIEJlZm9yZSB0aGUgQU0vUE0gYnJlYWssIG5vdyBhZnRlclxuICAgICAgICAgICAgICAgIGlmIChwcmV2SG91ciA8IDEyICYmIG5ld0hvdXIgPiAxMSkge1xuICAgICAgICAgICAgICAgICAgICBuZXdQTT0gIXRoaXMucG07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG5ld0hvdXIgPSAobmV3SG91ciA+PSAxMykgPyAobmV3SG91ciAtIDEyKSA6IG5ld0hvdXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnZhbGlkYXRlVGltZShuZXdIb3VyLCB0aGlzLmN1cnJlbnRNaW51dGUsIHRoaXMuY3VycmVudFNlY29uZCwgbmV3UE0pKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50SG91ciA9IG5ld0hvdXI7XG4gICAgICAgICAgICAgICAgdGhpcy5wbSA9IG5ld1BNO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfSxcbiAgICAgICAgZGVjcmVtZW50SG91cihldmVudCkge1xuICAgICAgICAgICAgbGV0IG5ld0hvdXIgPSB0aGlzLmN1cnJlbnRIb3VyIC0gdGhpcy5zdGVwSG91cjtcbiAgICAgICAgICAgIGxldCBuZXdQTSA9IHRoaXMucG07XG5cbiAgICAgICAgICAgIGlmICh0aGlzLmhvdXJGb3JtYXQgPT0gJzI0JylcbiAgICAgICAgICAgICAgICBuZXdIb3VyID0gKG5ld0hvdXIgPCAwKSA/ICgyNCArIG5ld0hvdXIpIDogbmV3SG91cjtcbiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuaG91ckZvcm1hdCA9PSAnMTInKSB7XG4gICAgICAgICAgICAgICAgLy8gSWYgd2Ugd2VyZSBhdCBub29uL21pZG5pZ2h0LCB0aGVuIHN3aXRjaFxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmN1cnJlbnRIb3VyID09PSAxMikge1xuICAgICAgICAgICAgICAgICAgICBuZXdQTSA9ICF0aGlzLnBtO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBuZXdIb3VyID0gKG5ld0hvdXIgPD0gMCkgPyAoMTIgKyBuZXdIb3VyKSA6IG5ld0hvdXI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGhpcy52YWxpZGF0ZVRpbWUobmV3SG91ciwgdGhpcy5jdXJyZW50TWludXRlLCB0aGlzLmN1cnJlbnRTZWNvbmQsIG5ld1BNKSkge1xuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudEhvdXIgPSBuZXdIb3VyO1xuICAgICAgICAgICAgICAgIHRoaXMucG0gPSBuZXdQTTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH0sXG4gICAgICAgIGluY3JlbWVudE1pbnV0ZShldmVudCkge1xuICAgICAgICAgICAgbGV0IG5ld01pbnV0ZSA9IHRoaXMuY3VycmVudE1pbnV0ZSArIHRoaXMuc3RlcE1pbnV0ZTtcbiAgICAgICAgICAgIGlmICh0aGlzLnZhbGlkYXRlVGltZSh0aGlzLmN1cnJlbnRIb3VyLCBuZXdNaW51dGUsIHRoaXMuY3VycmVudFNlY29uZCwgdHJ1ZSkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRNaW51dGUgPSAobmV3TWludXRlID4gNTkpID8gbmV3TWludXRlIC0gNjAgOiBuZXdNaW51dGU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICB9LFxuICAgICAgICBkZWNyZW1lbnRNaW51dGUoZXZlbnQpIHtcbiAgICAgICAgICAgIGxldCBuZXdNaW51dGUgPSB0aGlzLmN1cnJlbnRNaW51dGUgLSB0aGlzLnN0ZXBNaW51dGU7XG4gICAgICAgICAgICBuZXdNaW51dGUgPSAobmV3TWludXRlIDwgMCkgPyA2MCArIG5ld01pbnV0ZSA6IG5ld01pbnV0ZTtcbiAgICAgICAgICAgIGlmICh0aGlzLnZhbGlkYXRlVGltZSh0aGlzLmN1cnJlbnRIb3VyLCBuZXdNaW51dGUsIHRoaXMuY3VycmVudFNlY29uZCwgdHJ1ZSkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRNaW51dGUgPSBuZXdNaW51dGU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH0sXG4gICAgICAgIGluY3JlbWVudFNlY29uZChldmVudCkge1xuICAgICAgICAgICAgbGV0IG5ld1NlY29uZCA9IHRoaXMuY3VycmVudFNlY29uZCArIHRoaXMuc3RlcFNlY29uZDtcbiAgICAgICAgICAgIGlmICh0aGlzLnZhbGlkYXRlVGltZSh0aGlzLmN1cnJlbnRIb3VyLCB0aGlzLmN1cnJlbnRNaW51dGUsIG5ld1NlY29uZCwgdHJ1ZSkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRTZWNvbmQgPSAobmV3U2Vjb25kID4gNTkpID8gbmV3U2Vjb25kIC0gNjAgOiBuZXdTZWNvbmQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH0sXG4gICAgICAgIGRlY3JlbWVudFNlY29uZChldmVudCkge1xuICAgICAgICAgICAgbGV0IG5ld1NlY29uZCA9IHRoaXMuY3VycmVudFNlY29uZCAtIHRoaXMuc3RlcFNlY29uZDtcbiAgICAgICAgICAgIG5ld1NlY29uZCA9IChuZXdTZWNvbmQgPCAwKSA/IDYwICsgbmV3U2Vjb25kIDogbmV3U2Vjb25kO1xuICAgICAgICAgICAgaWYgKHRoaXMudmFsaWRhdGVUaW1lKHRoaXMuY3VycmVudEhvdXIsIHRoaXMuY3VycmVudE1pbnV0ZSwgbmV3U2Vjb25kLCB0cnVlKSkge1xuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFNlY29uZCA9IG5ld1NlY29uZDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfSxcbiAgICAgICAgdXBkYXRlTW9kZWxUaW1lKCkge1xuICAgICAgICAgICAgdGhpcy50aW1lUGlja2VyQ2hhbmdlID0gdHJ1ZTtcbiAgICAgICAgICAgIGxldCB2YWx1ZSA9IHRoaXMuaXNDb21wYXJhYmxlKCkgPyB0aGlzLm1vZGVsVmFsdWUgOiB0aGlzLnZpZXdEYXRlO1xuXG4gICAgICAgICAgICBpZiAodGhpcy5pc1JhbmdlU2VsZWN0aW9uKCkpIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHRoaXMubW9kZWxWYWx1ZVsxXSB8fCB0aGlzLm1vZGVsVmFsdWVbMF07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGhpcy5pc011bHRpcGxlU2VsZWN0aW9uKCkpIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHRoaXMubW9kZWxWYWx1ZVt0aGlzLm1vZGVsVmFsdWUubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YWx1ZSA9IHZhbHVlID8gbmV3IERhdGUodmFsdWUuZ2V0VGltZSgpKSA6IG5ldyBEYXRlKCk7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLmhvdXJGb3JtYXQgPT0gJzEyJykge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmN1cnJlbnRIb3VyID09PSAxMilcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUuc2V0SG91cnModGhpcy5wbSA/IDEyIDogMCk7XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICB2YWx1ZS5zZXRIb3Vycyh0aGlzLnBtID8gdGhpcy5jdXJyZW50SG91ciArIDEyIDogdGhpcy5jdXJyZW50SG91cik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YWx1ZS5zZXRIb3Vycyh0aGlzLmN1cnJlbnRIb3VyKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsdWUuc2V0TWludXRlcyh0aGlzLmN1cnJlbnRNaW51dGUpO1xuICAgICAgICAgICAgdmFsdWUuc2V0U2Vjb25kcyh0aGlzLmN1cnJlbnRTZWNvbmQpO1xuXG4gICAgICAgICAgICBpZiAodGhpcy5pc1JhbmdlU2VsZWN0aW9uKCkpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5tb2RlbFZhbHVlWzFdKVxuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IFt0aGlzLm1vZGVsVmFsdWVbMF0sIHZhbHVlXTtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gW3ZhbHVlLCBudWxsXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuaXNNdWx0aXBsZVNlbGVjdGlvbigpKXtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IFsuLi50aGlzLm1vZGVsVmFsdWUuc2xpY2UoMCwgLTEpLCB2YWx1ZV07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMudXBkYXRlTW9kZWwodmFsdWUpO1xuICAgICAgICAgICAgdGhpcy4kZW1pdCgnZGF0ZS1zZWxlY3QnLCB2YWx1ZSk7XG4gICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHRoaXMudGltZVBpY2tlckNoYW5nZSA9IGZhbHNlLCAwKTtcbiAgICAgICAgfSxcbiAgICAgICAgdG9nZ2xlQU1QTShldmVudCkge1xuICAgICAgICAgICAgdGhpcy5wbSA9ICF0aGlzLnBtO1xuICAgICAgICAgICAgdGhpcy51cGRhdGVNb2RlbFRpbWUoKTtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH0sXG4gICAgICAgIGNsZWFyVGltZVBpY2tlclRpbWVyKCkge1xuICAgICAgICAgICAgaWYgKHRoaXMudGltZVBpY2tlclRpbWVyKSB7XG4gICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aGlzLnRpbWVQaWNrZXJUaW1lcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIG9uTW9udGhTZWxlY3QoZXZlbnQsIGluZGV4KSB7XG4gICAgICAgICAgICBpZiAodGhpcy52aWV3ID09PSAnbW9udGgnKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5vbkRhdGVTZWxlY3QoZXZlbnQsIHt5ZWFyOiB0aGlzLmN1cnJlbnRZZWFyLCBtb250aDogaW5kZXgsIGRheTogMSwgc2VsZWN0YWJsZTogdHJ1ZX0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50TW9udGggPSBpbmRleDtcbiAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRWaWV3ID0gJ2RhdGUnO1xuICAgICAgICAgICAgICAgIHRoaXMuJGVtaXQoJ21vbnRoLWNoYW5nZScsIHttb250aDogdGhpcy5jdXJyZW50TW9udGggKyAxLCB5ZWFyOiB0aGlzLmN1cnJlbnRZZWFyfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNldFRpbWVvdXQodGhpcy51cGRhdGVGb2N1cywgMCk7XG4gICAgICAgIH0sXG4gICAgICAgIG9uWWVhclNlbGVjdChldmVudCwgeWVhcikge1xuICAgICAgICAgICAgaWYgKHRoaXMudmlldyA9PT0gJ3llYXInKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5vbkRhdGVTZWxlY3QoZXZlbnQsIHt5ZWFyOiB5ZWFyLCBtb250aDogMCwgZGF5OiAxLCBzZWxlY3RhYmxlOiB0cnVlfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRZZWFyID0geWVhcjtcbiAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRWaWV3ID0gJ21vbnRoJztcbiAgICAgICAgICAgICAgICB0aGlzLiRlbWl0KCd5ZWFyLWNoYW5nZScsIHttb250aDogdGhpcy5jdXJyZW50TW9udGggKyAxLCB5ZWFyOiB0aGlzLmN1cnJlbnRZZWFyfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNldFRpbWVvdXQodGhpcy51cGRhdGVGb2N1cywgMCk7XG4gICAgICAgIH0sXG4gICAgICAgIGVuYWJsZU1vZGFsaXR5KCkge1xuICAgICAgICAgICAgaWYgKCF0aGlzLm1hc2spIHtcbiAgICAgICAgICAgICAgICB0aGlzLm1hc2sgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcbiAgICAgICAgICAgICAgICB0aGlzLm1hc2suc3R5bGUuekluZGV4ID0gU3RyaW5nKHBhcnNlSW50KHRoaXMub3ZlcmxheS5zdHlsZS56SW5kZXgsIDEwKSAtIDEpO1xuICAgICAgICAgICAgICAgIERvbUhhbmRsZXIuYWRkTXVsdGlwbGVDbGFzc2VzKHRoaXMubWFzaywgJ3AtZGF0ZXBpY2tlci1tYXNrIHAtZGF0ZXBpY2tlci1tYXNrLXNjcm9sbGJsb2NrZXIgcC1jb21wb25lbnQtb3ZlcmxheSBwLWNvbXBvbmVudC1vdmVybGF5LWVudGVyJyk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLm1hc2tDbGlja0xpc3RlbmVyID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm92ZXJsYXlWaXNpYmxlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB0aGlzLm1hc2suYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCB0aGlzLm1hc2tDbGlja0xpc3RlbmVyKTtcblxuICAgICAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQodGhpcy5tYXNrKTtcbiAgICAgICAgICAgICAgICBEb21IYW5kbGVyLmFkZENsYXNzKGRvY3VtZW50LmJvZHksICdwLW92ZXJmbG93LWhpZGRlbicpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBkaXNhYmxlTW9kYWxpdHkoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5tYXNrKSB7XG4gICAgICAgICAgICAgICAgRG9tSGFuZGxlci5hZGRDbGFzcyh0aGlzLm1hc2ssICdwLWNvbXBvbmVudC1vdmVybGF5LWxlYXZlJyk7XG4gICAgICAgICAgICAgICAgdGhpcy5tYXNrLmFkZEV2ZW50TGlzdGVuZXIoJ2FuaW1hdGlvbmVuZCcsICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kZXN0cm95TWFzaygpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBkZXN0cm95TWFzaygpIHtcbiAgICAgICAgICAgIHRoaXMubWFzay5yZW1vdmVFdmVudExpc3RlbmVyKCdjbGljaycsIHRoaXMubWFza0NsaWNrTGlzdGVuZXIpO1xuICAgICAgICAgICAgdGhpcy5tYXNrQ2xpY2tMaXN0ZW5lciA9IG51bGw7XG4gICAgICAgICAgICBkb2N1bWVudC5ib2R5LnJlbW92ZUNoaWxkKHRoaXMubWFzayk7XG4gICAgICAgICAgICB0aGlzLm1hc2sgPSBudWxsO1xuXG4gICAgICAgICAgICBsZXQgYm9keUNoaWxkcmVuID0gZG9jdW1lbnQuYm9keS5jaGlsZHJlbjtcbiAgICAgICAgICAgIGxldCBoYXNCbG9ja2VyTWFza3M7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGJvZHlDaGlsZHJlbi5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGxldCBib2R5Q2hpbGQgPSBib2R5Q2hpbGRyZW5baV07XG4gICAgICAgICAgICAgICAgaWYoRG9tSGFuZGxlci5oYXNDbGFzcyhib2R5Q2hpbGQsICdwLWRhdGVwaWNrZXItbWFzay1zY3JvbGxibG9ja2VyJykpIHtcbiAgICAgICAgICAgICAgICAgICAgaGFzQmxvY2tlck1hc2tzID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIWhhc0Jsb2NrZXJNYXNrcykge1xuICAgICAgICAgICAgICAgIERvbUhhbmRsZXIucmVtb3ZlQ2xhc3MoZG9jdW1lbnQuYm9keSwgJ3Atb3ZlcmZsb3ctaGlkZGVuJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHVwZGF0ZUN1cnJlbnRNZXRhRGF0YSgpIHtcbiAgICAgICAgICAgIGNvbnN0IHZpZXdEYXRlID0gdGhpcy52aWV3RGF0ZTtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudE1vbnRoID0gdmlld0RhdGUuZ2V0TW9udGgoKTtcbiAgICAgICAgICAgIHRoaXMuY3VycmVudFllYXIgPSB2aWV3RGF0ZS5nZXRGdWxsWWVhcigpO1xuXG4gICAgICAgICAgICBpZiAodGhpcy5zaG93VGltZSB8fCB0aGlzLnRpbWVPbmx5KSB7XG4gICAgICAgICAgICAgICAgdGhpcy51cGRhdGVDdXJyZW50VGltZU1ldGEodmlld0RhdGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBpc1ZhbGlkU2VsZWN0aW9uKHZhbHVlKSB7XG4gICAgICAgICAgICBpZiAodmFsdWUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsZXQgaXNWYWxpZCA9IHRydWU7XG4gICAgICAgICAgICBpZiAodGhpcy5pc1NpbmdsZVNlbGVjdGlvbigpKSB7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLmlzU2VsZWN0YWJsZSh2YWx1ZS5nZXREYXRlKCksIHZhbHVlLmdldE1vbnRoKCksIHZhbHVlLmdldEZ1bGxZZWFyKCksIGZhbHNlKSkge1xuICAgICAgICAgICAgICAgICAgICBpc1ZhbGlkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh2YWx1ZS5ldmVyeSh2ID0+IHRoaXMuaXNTZWxlY3RhYmxlKHYuZ2V0RGF0ZSgpLCB2LmdldE1vbnRoKCksIHYuZ2V0RnVsbFllYXIoKSwgZmFsc2UpKSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmlzUmFuZ2VTZWxlY3Rpb24oKSkge1xuICAgICAgICAgICAgICAgICAgICBpc1ZhbGlkID0gdmFsdWUubGVuZ3RoID4gMSAmJiB2YWx1ZVsxXSA+IHZhbHVlWzBdID8gdHJ1ZSA6IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBpc1ZhbGlkO1xuICAgICAgICB9LFxuICAgICAgICBwYXJzZVZhbHVlKHRleHQpIHtcbiAgICAgICAgICAgIGlmICghdGV4dCB8fCB0ZXh0LnRyaW0oKS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGV0IHZhbHVlO1xuXG4gICAgICAgICAgICBpZiAodGhpcy5pc1NpbmdsZVNlbGVjdGlvbigpKSB7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnBhcnNlRGF0ZVRpbWUodGV4dCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICh0aGlzLmlzTXVsdGlwbGVTZWxlY3Rpb24oKSkge1xuICAgICAgICAgICAgICAgIGxldCB0b2tlbnMgPSB0ZXh0LnNwbGl0KCcsJyk7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCB0b2tlbiBvZiB0b2tlbnMpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUucHVzaCh0aGlzLnBhcnNlRGF0ZVRpbWUodG9rZW4udHJpbSgpKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5pc1JhbmdlU2VsZWN0aW9uKCkpIHtcbiAgICAgICAgICAgICAgICBsZXQgdG9rZW5zID0gdGV4dC5zcGxpdCgnIC0gJyk7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZVtpXSA9IHRoaXMucGFyc2VEYXRlVGltZSh0b2tlbnNbaV0udHJpbSgpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICAgICAgfSxcbiAgICAgICAgcGFyc2VEYXRlVGltZSh0ZXh0KSB7XG4gICAgICAgICAgICBsZXQgZGF0ZTtcbiAgICAgICAgICAgIGxldCBwYXJ0cyA9IHRleHQuc3BsaXQoJyAnKTtcblxuICAgICAgICAgICAgaWYgKHRoaXMudGltZU9ubHkpIHtcbiAgICAgICAgICAgICAgICBkYXRlID0gbmV3IERhdGUoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnBvcHVsYXRlVGltZShkYXRlLCBwYXJ0c1swXSwgcGFydHNbMV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc3QgZGF0ZUZvcm1hdCA9IHRoaXMuZGF0ZVBhdHRlcm47XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc2hvd1RpbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0ZSA9IHRoaXMucGFyc2VEYXRlKHBhcnRzWzBdLCBkYXRlRm9ybWF0KTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wb3B1bGF0ZVRpbWUoZGF0ZSwgcGFydHNbMV0sIHBhcnRzWzJdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGUgPSB0aGlzLnBhcnNlRGF0ZSh0ZXh0LCBkYXRlRm9ybWF0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBkYXRlO1xuICAgICAgICB9LFxuICAgICAgICBwb3B1bGF0ZVRpbWUodmFsdWUsIHRpbWVTdHJpbmcsIGFtcG0pIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmhvdXJGb3JtYXQgPT0gJzEyJyAmJiAhYW1wbSkge1xuICAgICAgICAgICAgICAgIHRocm93ICdJbnZhbGlkIFRpbWUnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLnBtID0gKGFtcG0gPT09ICdQTScgfHwgYW1wbSA9PT0gJ3BtJyk7XG4gICAgICAgICAgICBsZXQgdGltZSA9IHRoaXMucGFyc2VUaW1lKHRpbWVTdHJpbmcpO1xuICAgICAgICAgICAgdmFsdWUuc2V0SG91cnModGltZS5ob3VyKTtcbiAgICAgICAgICAgIHZhbHVlLnNldE1pbnV0ZXModGltZS5taW51dGUpO1xuICAgICAgICAgICAgdmFsdWUuc2V0U2Vjb25kcyh0aW1lLnNlY29uZCk7XG4gICAgICAgIH0sXG4gICAgICAgIHBhcnNlVGltZSh2YWx1ZSkge1xuICAgICAgICAgICAgbGV0IHRva2VucyA9IHZhbHVlLnNwbGl0KCc6Jyk7XG4gICAgICAgICAgICBsZXQgdmFsaWRUb2tlbkxlbmd0aCA9IHRoaXMuc2hvd1NlY29uZHMgPyAzIDogMjtcbiAgICAgICAgICAgIGxldCByZWdleCA9ICgvXlswLTldWzAtOV0kLyk7XG5cbiAgICAgICAgICAgIGlmICh0b2tlbnMubGVuZ3RoICE9PSB2YWxpZFRva2VuTGVuZ3RoIHx8ICF0b2tlbnNbMF0ubWF0Y2gocmVnZXgpIHx8ICF0b2tlbnNbMV0ubWF0Y2gocmVnZXgpIHx8ICh0aGlzLnNob3dTZWNvbmRzICYmICF0b2tlbnNbMl0ubWF0Y2gocmVnZXgpKSkge1xuICAgICAgICAgICAgICAgIHRocm93IFwiSW52YWxpZCB0aW1lXCI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxldCBoID0gcGFyc2VJbnQodG9rZW5zWzBdKTtcbiAgICAgICAgICAgIGxldCBtID0gcGFyc2VJbnQodG9rZW5zWzFdKTtcbiAgICAgICAgICAgIGxldCBzID0gdGhpcy5zaG93U2Vjb25kcyA/IHBhcnNlSW50KHRva2Vuc1syXSkgOiBudWxsO1xuXG4gICAgICAgICAgICBpZiAoaXNOYU4oaCkgfHwgaXNOYU4obSkgfHwgaCA+IDIzIHx8IG0gPiA1OSB8fCAodGhpcy5ob3VyRm9ybWF0ID09ICcxMicgJiYgaCA+IDEyKSB8fCAodGhpcy5zaG93U2Vjb25kcyAmJiAoaXNOYU4ocykgfHwgcyA+IDU5KSkpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBcIkludmFsaWQgdGltZVwiO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuaG91ckZvcm1hdCA9PSAnMTInICYmIGggIT09IDEyICYmIHRoaXMucG0pIHtcbiAgICAgICAgICAgICAgICAgICAgaCs9IDEyO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB7aG91cjogaCwgbWludXRlOiBtLCBzZWNvbmQ6IHN9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBwYXJzZURhdGUodmFsdWUsIGZvcm1hdCkge1xuICAgICAgICAgICAgaWYgKGZvcm1hdCA9PSBudWxsIHx8IHZhbHVlID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBcIkludmFsaWQgYXJndW1lbnRzXCI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbHVlID0gKHR5cGVvZiB2YWx1ZSA9PT0gXCJvYmplY3RcIiA/IHZhbHVlLnRvU3RyaW5nKCkgOiB2YWx1ZSArIFwiXCIpO1xuICAgICAgICAgICAgaWYgKHZhbHVlID09PSBcIlwiKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxldCBpRm9ybWF0LCBkaW0sIGV4dHJhLFxuICAgICAgICAgICAgaVZhbHVlID0gMCxcbiAgICAgICAgICAgIHNob3J0WWVhckN1dG9mZiA9ICh0eXBlb2YgdGhpcy5zaG9ydFllYXJDdXRvZmYgIT09IFwic3RyaW5nXCIgPyB0aGlzLnNob3J0WWVhckN1dG9mZiA6IG5ldyBEYXRlKCkuZ2V0RnVsbFllYXIoKSAlIDEwMCArIHBhcnNlSW50KHRoaXMuc2hvcnRZZWFyQ3V0b2ZmLCAxMCkpLFxuICAgICAgICAgICAgeWVhciA9IC0xLFxuICAgICAgICAgICAgbW9udGggPSAtMSxcbiAgICAgICAgICAgIGRheSA9IC0xLFxuICAgICAgICAgICAgZG95ID0gLTEsXG4gICAgICAgICAgICBsaXRlcmFsID0gZmFsc2UsXG4gICAgICAgICAgICBkYXRlLFxuICAgICAgICAgICAgbG9va0FoZWFkID0gKG1hdGNoKSA9PiB7XG4gICAgICAgICAgICAgICAgbGV0IG1hdGNoZXMgPSAoaUZvcm1hdCArIDEgPCBmb3JtYXQubGVuZ3RoICYmIGZvcm1hdC5jaGFyQXQoaUZvcm1hdCArIDEpID09PSBtYXRjaCk7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgaUZvcm1hdCsrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hlcztcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBnZXROdW1iZXIgPSAobWF0Y2gpID0+IHtcbiAgICAgICAgICAgICAgICBsZXQgaXNEb3VibGVkID0gbG9va0FoZWFkKG1hdGNoKSxcbiAgICAgICAgICAgICAgICAgICAgc2l6ZSA9IChtYXRjaCA9PT0gXCJAXCIgPyAxNCA6IChtYXRjaCA9PT0gXCIhXCIgPyAyMCA6XG4gICAgICAgICAgICAgICAgICAgIChtYXRjaCA9PT0gXCJ5XCIgJiYgaXNEb3VibGVkID8gNCA6IChtYXRjaCA9PT0gXCJvXCIgPyAzIDogMikpKSksXG4gICAgICAgICAgICAgICAgICAgIG1pblNpemUgPSAobWF0Y2ggPT09IFwieVwiID8gc2l6ZSA6IDEpLFxuICAgICAgICAgICAgICAgICAgICBkaWdpdHMgPSBuZXcgUmVnRXhwKFwiXlxcXFxke1wiICsgbWluU2l6ZSArIFwiLFwiICsgc2l6ZSArIFwifVwiKSxcbiAgICAgICAgICAgICAgICAgICAgbnVtID0gdmFsdWUuc3Vic3RyaW5nKGlWYWx1ZSkubWF0Y2goZGlnaXRzKTtcbiAgICAgICAgICAgICAgICBpZiAoIW51bSkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBcIk1pc3NpbmcgbnVtYmVyIGF0IHBvc2l0aW9uIFwiICsgaVZhbHVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpVmFsdWUgKz0gbnVtWyAwIF0ubGVuZ3RoO1xuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUludChudW1bIDAgXSwgMTApO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdldE5hbWUgPSAobWF0Y2gsIHNob3J0TmFtZXMsIGxvbmdOYW1lcykgPT4ge1xuICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IC0xO1xuICAgICAgICAgICAgICAgIGxldCBhcnIgPSBsb29rQWhlYWQobWF0Y2gpID8gbG9uZ05hbWVzIDogc2hvcnROYW1lcztcbiAgICAgICAgICAgICAgICBsZXQgbmFtZXMgPSBbXTtcblxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWVzLnB1c2goW2ksYXJyW2ldXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG5hbWVzLnNvcnQoKGEsYikgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gLShhWyAxIF0ubGVuZ3RoIC0gYlsgMSBdLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG5hbWVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBuYW1lID0gbmFtZXNbaV1bMV07XG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5zdWJzdHIoaVZhbHVlLCBuYW1lLmxlbmd0aCkudG9Mb3dlckNhc2UoKSA9PT0gbmFtZS50b0xvd2VyQ2FzZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleCA9IG5hbWVzW2ldWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgaVZhbHVlICs9IG5hbWUubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBpbmRleCArIDE7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgXCJVbmtub3duIG5hbWUgYXQgcG9zaXRpb24gXCIgKyBpVmFsdWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNoZWNrTGl0ZXJhbCA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUuY2hhckF0KGlWYWx1ZSkgIT09IGZvcm1hdC5jaGFyQXQoaUZvcm1hdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgXCJVbmV4cGVjdGVkIGxpdGVyYWwgYXQgcG9zaXRpb24gXCIgKyBpVmFsdWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlWYWx1ZSsrO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgaWYgKHRoaXMuY3VycmVudFZpZXcgPT09ICdtb250aCcpIHtcbiAgICAgICAgICAgICAgICBkYXkgPSAxO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmb3IgKGlGb3JtYXQgPSAwOyBpRm9ybWF0IDwgZm9ybWF0Lmxlbmd0aDsgaUZvcm1hdCsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxpdGVyYWwpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZvcm1hdC5jaGFyQXQoaUZvcm1hdCkgPT09IFwiJ1wiICYmICFsb29rQWhlYWQoXCInXCIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaXRlcmFsID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGVja0xpdGVyYWwoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoZm9ybWF0LmNoYXJBdChpRm9ybWF0KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcImRcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXkgPSBnZXROdW1iZXIoXCJkXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcIkRcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXROYW1lKFwiRFwiLCB0aGlzLiRwcmltZXZ1ZS5jb25maWcubG9jYWxlLmRheU5hbWVzU2hvcnQsIHRoaXMuJHByaW1ldnVlLmNvbmZpZy5sb2NhbGUuZGF5TmFtZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcIm9cIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb3kgPSBnZXROdW1iZXIoXCJvXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcIm1cIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb250aCA9IGdldE51bWJlcihcIm1cIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwiTVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vbnRoID0gZ2V0TmFtZShcIk1cIiwgdGhpcy4kcHJpbWV2dWUuY29uZmlnLmxvY2FsZS5tb250aE5hbWVzU2hvcnQsIHRoaXMuJHByaW1ldnVlLmNvbmZpZy5sb2NhbGUubW9udGhOYW1lcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwieVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHllYXIgPSBnZXROdW1iZXIoXCJ5XCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcIkBcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRlID0gbmV3IERhdGUoZ2V0TnVtYmVyKFwiQFwiKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeWVhciA9IGRhdGUuZ2V0RnVsbFllYXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb250aCA9IGRhdGUuZ2V0TW9udGgoKSArIDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF5ID0gZGF0ZS5nZXREYXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwiIVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGUgPSBuZXcgRGF0ZSgoZ2V0TnVtYmVyKFwiIVwiKSAtIHRoaXMudGlja3NUbzE5NzApIC8gMTAwMDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHllYXIgPSBkYXRlLmdldEZ1bGxZZWFyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9udGggPSBkYXRlLmdldE1vbnRoKCkgKyAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRheSA9IGRhdGUuZ2V0RGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcIidcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobG9va0FoZWFkKFwiJ1wiKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja0xpdGVyYWwoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXRlcmFsID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTGl0ZXJhbCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoaVZhbHVlIDwgdmFsdWUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgZXh0cmEgPSB2YWx1ZS5zdWJzdHIoaVZhbHVlKTtcbiAgICAgICAgICAgICAgICBpZiAoIS9eXFxzKy8udGVzdChleHRyYSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgXCJFeHRyYS91bnBhcnNlZCBjaGFyYWN0ZXJzIGZvdW5kIGluIGRhdGU6IFwiICsgZXh0cmE7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoeWVhciA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgICB5ZWFyID0gbmV3IERhdGUoKS5nZXRGdWxsWWVhcigpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh5ZWFyIDwgMTAwKSB7XG4gICAgICAgICAgICAgICAgeWVhciArPSBuZXcgRGF0ZSgpLmdldEZ1bGxZZWFyKCkgLSBuZXcgRGF0ZSgpLmdldEZ1bGxZZWFyKCkgJSAxMDAgK1xuICAgICAgICAgICAgICAgICAgICAoeWVhciA8PSBzaG9ydFllYXJDdXRvZmYgPyAwIDogLTEwMCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChkb3kgPiAtMSkge1xuICAgICAgICAgICAgICAgIG1vbnRoID0gMTtcbiAgICAgICAgICAgICAgICBkYXkgPSBkb3k7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBkaW0gPSB0aGlzLmdldERheXNDb3VudEluTW9udGgoeWVhciwgbW9udGggLSAxKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRheSA8PSBkaW0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1vbnRoKys7XG4gICAgICAgICAgICAgICAgICAgIGRheSAtPSBkaW07XG4gICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lXG4gICAgICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGRhdGUgPSB0aGlzLmRheWxpZ2h0U2F2aW5nQWRqdXN0KG5ldyBEYXRlKHllYXIsIG1vbnRoIC0gMSwgZGF5KSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRlLmdldEZ1bGxZZWFyKCkgIT09IHllYXIgfHwgZGF0ZS5nZXRNb250aCgpICsgMSAhPT0gbW9udGggfHwgZGF0ZS5nZXREYXRlKCkgIT09IGRheSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgXCJJbnZhbGlkIGRhdGVcIjsgLy8gRS5nLiAzMS8wMi8wMFxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBkYXRlO1xuICAgICAgICB9LFxuICAgICAgICBnZXRXZWVrTnVtYmVyKGRhdGUpIHtcbiAgICAgICAgICAgIGxldCBjaGVja0RhdGUgPSBuZXcgRGF0ZShkYXRlLmdldFRpbWUoKSk7XG4gICAgICAgICAgICBjaGVja0RhdGUuc2V0RGF0ZShjaGVja0RhdGUuZ2V0RGF0ZSgpICsgNCAtICggY2hlY2tEYXRlLmdldERheSgpIHx8IDcgKSk7XG4gICAgICAgICAgICBsZXQgdGltZSA9IGNoZWNrRGF0ZS5nZXRUaW1lKCk7XG4gICAgICAgICAgICBjaGVja0RhdGUuc2V0TW9udGgoIDAgKTtcbiAgICAgICAgICAgIGNoZWNrRGF0ZS5zZXREYXRlKCAxICk7XG4gICAgICAgICAgICByZXR1cm4gTWF0aC5mbG9vciggTWF0aC5yb3VuZCgodGltZSAtIGNoZWNrRGF0ZS5nZXRUaW1lKCkpIC8gODY0MDAwMDAgKSAvIDcgKSArIDE7XG4gICAgICAgIH0sXG4gICAgICAgIG9uRGF0ZUNlbGxLZXlkb3duKGV2ZW50LCBkYXRlLCBncm91cEluZGV4KSB7XG4gICAgICAgICAgICBjb25zdCBjZWxsQ29udGVudCA9IGV2ZW50LmN1cnJlbnRUYXJnZXQ7XG4gICAgICAgICAgICBjb25zdCBjZWxsID0gY2VsbENvbnRlbnQucGFyZW50RWxlbWVudDtcblxuICAgICAgICAgICAgc3dpdGNoIChldmVudC53aGljaCkge1xuICAgICAgICAgICAgICAgIC8vZG93biBhcnJvd1xuICAgICAgICAgICAgICAgIGNhc2UgNDA6IHtcbiAgICAgICAgICAgICAgICAgICAgY2VsbENvbnRlbnQudGFiSW5kZXggPSAnLTEnO1xuICAgICAgICAgICAgICAgICAgICBsZXQgY2VsbEluZGV4ID0gRG9tSGFuZGxlci5pbmRleChjZWxsKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5leHRSb3cgPSBjZWxsLnBhcmVudEVsZW1lbnQubmV4dEVsZW1lbnRTaWJsaW5nO1xuICAgICAgICAgICAgICAgICAgICBpZiAobmV4dFJvdykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZvY3VzQ2VsbCA9IG5leHRSb3cuY2hpbGRyZW5bY2VsbEluZGV4XS5jaGlsZHJlblswXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChEb21IYW5kbGVyLmhhc0NsYXNzKGZvY3VzQ2VsbCwgJ3AtZGlzYWJsZWQnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubmF2aWdhdGlvblN0YXRlID0ge2JhY2t3YXJkOiBmYWxzZX07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5uYXZGb3J3YXJkKGV2ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5leHRSb3cuY2hpbGRyZW5bY2VsbEluZGV4XS5jaGlsZHJlblswXS50YWJJbmRleCA9ICcwJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXh0Um93LmNoaWxkcmVuW2NlbGxJbmRleF0uY2hpbGRyZW5bMF0uZm9jdXMoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubmF2aWdhdGlvblN0YXRlID0ge2JhY2t3YXJkOiBmYWxzZX07XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5hdkZvcndhcmQoZXZlbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vdXAgYXJyb3dcbiAgICAgICAgICAgICAgICBjYXNlIDM4OiB7XG4gICAgICAgICAgICAgICAgICAgIGNlbGxDb250ZW50LnRhYkluZGV4ID0gJy0xJztcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNlbGxJbmRleCA9IERvbUhhbmRsZXIuaW5kZXgoY2VsbCk7XG4gICAgICAgICAgICAgICAgICAgIGxldCBwcmV2Um93ID0gY2VsbC5wYXJlbnRFbGVtZW50LnByZXZpb3VzRWxlbWVudFNpYmxpbmc7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwcmV2Um93KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZm9jdXNDZWxsID0gcHJldlJvdy5jaGlsZHJlbltjZWxsSW5kZXhdLmNoaWxkcmVuWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKERvbUhhbmRsZXIuaGFzQ2xhc3MoZm9jdXNDZWxsLCAncC1kaXNhYmxlZCcpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5uYXZpZ2F0aW9uU3RhdGUgPSB7YmFja3dhcmQ6IHRydWV9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubmF2QmFja3dhcmQoZXZlbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9jdXNDZWxsLnRhYkluZGV4ID0gJzAnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvY3VzQ2VsbC5mb2N1cygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5uYXZpZ2F0aW9uU3RhdGUgPSB7YmFja3dhcmQ6IHRydWV9O1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5uYXZCYWNrd2FyZChldmVudCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy9sZWZ0IGFycm93XG4gICAgICAgICAgICAgICAgY2FzZSAzNzoge1xuICAgICAgICAgICAgICAgICAgICBjZWxsQ29udGVudC50YWJJbmRleCA9ICctMSc7XG4gICAgICAgICAgICAgICAgICAgIGxldCBwcmV2Q2VsbCA9IGNlbGwucHJldmlvdXNFbGVtZW50U2libGluZztcbiAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZDZWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZm9jdXNDZWxsID0gcHJldkNlbGwuY2hpbGRyZW5bMF07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoRG9tSGFuZGxlci5oYXNDbGFzcyhmb2N1c0NlbGwsICdwLWRpc2FibGVkJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5hdmlnYXRlVG9Nb250aCh0cnVlLCBncm91cEluZGV4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvY3VzQ2VsbC50YWJJbmRleCA9ICcwJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb2N1c0NlbGwuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubmF2aWdhdGVUb01vbnRoKHRydWUsIGdyb3VwSW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vcmlnaHQgYXJyb3dcbiAgICAgICAgICAgICAgICBjYXNlIDM5OiB7XG4gICAgICAgICAgICAgICAgICAgIGNlbGxDb250ZW50LnRhYkluZGV4ID0gJy0xJztcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5leHRDZWxsID0gY2VsbC5uZXh0RWxlbWVudFNpYmxpbmc7XG4gICAgICAgICAgICAgICAgICAgIGlmIChuZXh0Q2VsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZvY3VzQ2VsbCA9IG5leHRDZWxsLmNoaWxkcmVuWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKERvbUhhbmRsZXIuaGFzQ2xhc3MoZm9jdXNDZWxsLCAncC1kaXNhYmxlZCcpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5uYXZpZ2F0ZVRvTW9udGgoZmFsc2UsIGdyb3VwSW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9jdXNDZWxsLnRhYkluZGV4ID0gJzAnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvY3VzQ2VsbC5mb2N1cygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5uYXZpZ2F0ZVRvTW9udGgoZmFsc2UsIGdyb3VwSW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vZW50ZXJcbiAgICAgICAgICAgICAgICAvL3NwYWNlXG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICBjYXNlIDMyOiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMub25EYXRlU2VsZWN0KGV2ZW50LCBkYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy9lc2NhcGVcbiAgICAgICAgICAgICAgICBjYXNlIDI3OiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMub3ZlcmxheVZpc2libGUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy90YWJcbiAgICAgICAgICAgICAgICBjYXNlIDk6IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLmlubGluZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50cmFwRm9jdXMoZXZlbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbmF2aWdhdGVUb01vbnRoKHByZXYsIGdyb3VwSW5kZXgpIHtcbiAgICAgICAgICAgIGlmIChwcmV2KSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubnVtYmVyT2ZNb250aHMgPT09IDEgfHwgKGdyb3VwSW5kZXggPT09IDApKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubmF2aWdhdGlvblN0YXRlID0ge2JhY2t3YXJkOiB0cnVlfTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5uYXZCYWNrd2FyZChldmVudCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBsZXQgcHJldk1vbnRoQ29udGFpbmVyID0gdGhpcy5vdmVybGF5LmNoaWxkcmVuW2dyb3VwSW5kZXggLSAxXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNlbGxzID0gRG9tSGFuZGxlci5maW5kKHByZXZNb250aENvbnRhaW5lciwgJy5wLWRhdGVwaWNrZXItY2FsZW5kYXIgdGQgc3Bhbjpub3QoLnAtZGlzYWJsZWQpOm5vdCgucC1pbmspJyk7XG4gICAgICAgICAgICAgICAgICAgIGxldCBmb2N1c0NlbGwgPSBjZWxsc1tjZWxscy5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgICAgICAgICAgZm9jdXNDZWxsLnRhYkluZGV4ID0gJzAnO1xuICAgICAgICAgICAgICAgICAgICBmb2N1c0NlbGwuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5udW1iZXJPZk1vbnRocyA9PT0gMSB8fCAoZ3JvdXBJbmRleCA9PT0gdGhpcy5udW1iZXJPZk1vbnRocyAtIDEpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubmF2aWdhdGlvblN0YXRlID0ge2JhY2t3YXJkOiBmYWxzZX07XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubmF2Rm9yd2FyZChldmVudCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBsZXQgbmV4dE1vbnRoQ29udGFpbmVyID0gdGhpcy5vdmVybGF5LmNoaWxkcmVuW2dyb3VwSW5kZXggKyAxXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGZvY3VzQ2VsbCA9IERvbUhhbmRsZXIuZmluZFNpbmdsZShuZXh0TW9udGhDb250YWluZXIsICcucC1kYXRlcGlja2VyLWNhbGVuZGFyIHRkIHNwYW46bm90KC5wLWRpc2FibGVkKTpub3QoLnAtaW5rKScpO1xuICAgICAgICAgICAgICAgICAgICBmb2N1c0NlbGwudGFiSW5kZXggPSAnMCc7XG4gICAgICAgICAgICAgICAgICAgIGZvY3VzQ2VsbC5mb2N1cygpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgb25Nb250aENlbGxLZXlkb3duKGV2ZW50LCBpbmRleCkge1xuICAgICAgICAgICAgY29uc3QgY2VsbCA9IGV2ZW50LmN1cnJlbnRUYXJnZXQ7XG5cbiAgICAgICAgICAgIHN3aXRjaCAoZXZlbnQud2hpY2gpIHtcbiAgICAgICAgICAgICAgICAvL2Fycm93c1xuICAgICAgICAgICAgICAgIGNhc2UgMzg6XG4gICAgICAgICAgICAgICAgY2FzZSA0MDoge1xuICAgICAgICAgICAgICAgICAgICBjZWxsLnRhYkluZGV4ID0gJy0xJztcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNlbGxzID0gY2VsbC5wYXJlbnRFbGVtZW50LmNoaWxkcmVuO1xuICAgICAgICAgICAgICAgICAgICB2YXIgY2VsbEluZGV4ID0gRG9tSGFuZGxlci5pbmRleChjZWxsKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5leHRDZWxsID0gY2VsbHNbZXZlbnQud2hpY2ggPT09IDQwID8gY2VsbEluZGV4ICsgMyA6IGNlbGxJbmRleCAtM107XG4gICAgICAgICAgICAgICAgICAgIGlmIChuZXh0Q2VsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dENlbGwudGFiSW5kZXggPSAnMCc7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0Q2VsbC5mb2N1cygpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vbGVmdCBhcnJvd1xuICAgICAgICAgICAgICAgIGNhc2UgMzc6IHtcbiAgICAgICAgICAgICAgICAgICAgY2VsbC50YWJJbmRleCA9ICctMSc7XG4gICAgICAgICAgICAgICAgICAgIGxldCBwcmV2Q2VsbCA9IGNlbGwucHJldmlvdXNFbGVtZW50U2libGluZztcbiAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZDZWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcmV2Q2VsbC50YWJJbmRleCA9ICcwJztcbiAgICAgICAgICAgICAgICAgICAgICAgIHByZXZDZWxsLmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5hdmlnYXRpb25TdGF0ZSA9IHtiYWNrd2FyZDogdHJ1ZX07XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5hdkJhY2t3YXJkKGV2ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvL3JpZ2h0IGFycm93XG4gICAgICAgICAgICAgICAgY2FzZSAzOToge1xuICAgICAgICAgICAgICAgICAgICBjZWxsLnRhYkluZGV4ID0gJy0xJztcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5leHRDZWxsID0gY2VsbC5uZXh0RWxlbWVudFNpYmxpbmc7XG4gICAgICAgICAgICAgICAgICAgIGlmIChuZXh0Q2VsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dENlbGwudGFiSW5kZXggPSAnMCc7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0Q2VsbC5mb2N1cygpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5uYXZpZ2F0aW9uU3RhdGUgPSB7YmFja3dhcmQ6IGZhbHNlfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubmF2Rm9yd2FyZChldmVudCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy9lbnRlclxuICAgICAgICAgICAgICAgIC8vc3BhY2VcbiAgICAgICAgICAgICAgICBjYXNlIDEzOlxuICAgICAgICAgICAgICAgIGNhc2UgMzI6IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vbk1vbnRoU2VsZWN0KGV2ZW50LCBpbmRleCk7XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vZXNjYXBlXG4gICAgICAgICAgICAgICAgY2FzZSAyNzoge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm92ZXJsYXlWaXNpYmxlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vdGFiXG4gICAgICAgICAgICAgICAgY2FzZSA5OiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudHJhcEZvY3VzKGV2ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBvblllYXJDZWxsS2V5ZG93bihldmVudCwgaW5kZXgpIHtcbiAgICAgICAgICAgIGNvbnN0IGNlbGwgPSBldmVudC5jdXJyZW50VGFyZ2V0O1xuXG4gICAgICAgICAgICBzd2l0Y2ggKGV2ZW50LndoaWNoKSB7XG4gICAgICAgICAgICAgICAgLy9hcnJvd3NcbiAgICAgICAgICAgICAgICBjYXNlIDM4OlxuICAgICAgICAgICAgICAgIGNhc2UgNDA6IHtcbiAgICAgICAgICAgICAgICAgICAgY2VsbC50YWJJbmRleCA9ICctMSc7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjZWxscyA9IGNlbGwucGFyZW50RWxlbWVudC5jaGlsZHJlbjtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNlbGxJbmRleCA9IERvbUhhbmRsZXIuaW5kZXgoY2VsbCk7XG4gICAgICAgICAgICAgICAgICAgIGxldCBuZXh0Q2VsbCA9IGNlbGxzW2V2ZW50LndoaWNoID09PSA0MCA/IGNlbGxJbmRleCArIDIgOiBjZWxsSW5kZXggLSAyXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5leHRDZWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0Q2VsbC50YWJJbmRleCA9ICcwJztcbiAgICAgICAgICAgICAgICAgICAgICAgIG5leHRDZWxsLmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy9sZWZ0IGFycm93XG4gICAgICAgICAgICAgICAgY2FzZSAzNzoge1xuICAgICAgICAgICAgICAgICAgICBjZWxsLnRhYkluZGV4ID0gJy0xJztcbiAgICAgICAgICAgICAgICAgICAgbGV0IHByZXZDZWxsID0gY2VsbC5wcmV2aW91c0VsZW1lbnRTaWJsaW5nO1xuICAgICAgICAgICAgICAgICAgICBpZiAocHJldkNlbGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByZXZDZWxsLnRhYkluZGV4ID0gJzAnO1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJldkNlbGwuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubmF2aWdhdGlvblN0YXRlID0ge2JhY2t3YXJkOiB0cnVlfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubmF2QmFja3dhcmQoZXZlbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vcmlnaHQgYXJyb3dcbiAgICAgICAgICAgICAgICBjYXNlIDM5OiB7XG4gICAgICAgICAgICAgICAgICAgIGNlbGwudGFiSW5kZXggPSAnLTEnO1xuICAgICAgICAgICAgICAgICAgICBsZXQgbmV4dENlbGwgPSBjZWxsLm5leHRFbGVtZW50U2libGluZztcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5leHRDZWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0Q2VsbC50YWJJbmRleCA9ICcwJztcbiAgICAgICAgICAgICAgICAgICAgICAgIG5leHRDZWxsLmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5hdmlnYXRpb25TdGF0ZSA9IHtiYWNrd2FyZDogZmFsc2V9O1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5uYXZGb3J3YXJkKGV2ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvL2VudGVyXG4gICAgICAgICAgICAgICAgLy9zcGFjZVxuICAgICAgICAgICAgICAgIGNhc2UgMTM6XG4gICAgICAgICAgICAgICAgY2FzZSAzMjoge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm9uWWVhclNlbGVjdChldmVudCwgaW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvL2VzY2FwZVxuICAgICAgICAgICAgICAgIGNhc2UgMjc6IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vdmVybGF5VmlzaWJsZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvL3RhYlxuICAgICAgICAgICAgICAgIGNhc2UgOToge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRyYXBGb2N1cyhldmVudCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgdXBkYXRlRm9jdXMoKSB7XG4gICAgICAgICAgICBsZXQgY2VsbDtcblxuICAgICAgICAgICAgaWYgKHRoaXMubmF2aWdhdGlvblN0YXRlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubmF2aWdhdGlvblN0YXRlLmJ1dHRvbikge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmluaXRGb2N1c2FibGVDZWxsKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubmF2aWdhdGlvblN0YXRlLmJhY2t3YXJkKVxuICAgICAgICAgICAgICAgICAgICAgICAgRG9tSGFuZGxlci5maW5kU2luZ2xlKHRoaXMub3ZlcmxheSwgJy5wLWRhdGVwaWNrZXItcHJldicpLmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIERvbUhhbmRsZXIuZmluZFNpbmdsZSh0aGlzLm92ZXJsYXksICcucC1kYXRlcGlja2VyLW5leHQnKS5mb2N1cygpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubmF2aWdhdGlvblN0YXRlLmJhY2t3YXJkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2VsbHM7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmN1cnJlbnRWaWV3ID09PSAnbW9udGgnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2VsbHMgPSBEb21IYW5kbGVyLmZpbmQodGhpcy5vdmVybGF5LCAnLnAtbW9udGhwaWNrZXIgLnAtbW9udGhwaWNrZXItbW9udGg6bm90KC5wLWRpc2FibGVkKScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5jdXJyZW50VmlldyA9PT0gJ3llYXInKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2VsbHMgPSBEb21IYW5kbGVyLmZpbmQodGhpcy5vdmVybGF5LCAnLnAteWVhcnBpY2tlciAucC15ZWFycGlja2VyLXllYXI6bm90KC5wLWRpc2FibGVkKScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2VsbHMgPSBEb21IYW5kbGVyLmZpbmQodGhpcy5vdmVybGF5LCAnLnAtZGF0ZXBpY2tlci1jYWxlbmRhciB0ZCBzcGFuOm5vdCgucC1kaXNhYmxlZCk6bm90KC5wLWluayknKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNlbGxzICYmIGNlbGxzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjZWxsID0gY2VsbHNbY2VsbHMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5jdXJyZW50VmlldyA9PT0gJ21vbnRoJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNlbGwgPSBEb21IYW5kbGVyLmZpbmRTaW5nbGUodGhpcy5vdmVybGF5LCAnLnAtbW9udGhwaWNrZXIgLnAtbW9udGhwaWNrZXItbW9udGg6bm90KC5wLWRpc2FibGVkKScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5jdXJyZW50VmlldyA9PT0gJ3llYXInKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2VsbCA9IERvbUhhbmRsZXIuZmluZFNpbmdsZSh0aGlzLm92ZXJsYXksICcucC15ZWFycGlja2VyIC5wLXllYXJwaWNrZXIteWVhcjpub3QoLnAtZGlzYWJsZWQpJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjZWxsID0gRG9tSGFuZGxlci5maW5kU2luZ2xlKHRoaXMub3ZlcmxheSwgJy5wLWRhdGVwaWNrZXItY2FsZW5kYXIgdGQgc3Bhbjpub3QoLnAtZGlzYWJsZWQpOm5vdCgucC1pbmspJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAoY2VsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2VsbC50YWJJbmRleCA9ICcwJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNlbGwuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMubmF2aWdhdGlvblN0YXRlID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuaW5pdEZvY3VzYWJsZUNlbGwoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgaW5pdEZvY3VzYWJsZUNlbGwoKSB7XG4gICAgICAgICAgICBsZXQgY2VsbDtcblxuICAgICAgICAgICAgaWYgKHRoaXMuY3VycmVudFZpZXcgPT09ICdtb250aCcpIHtcbiAgICAgICAgICAgICAgICBsZXQgY2VsbHMgPSBEb21IYW5kbGVyLmZpbmQodGhpcy5vdmVybGF5LCAnLnAtbW9udGhwaWNrZXIgLnAtbW9udGhwaWNrZXItbW9udGgnKTtcbiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0ZWRDZWxsPSBEb21IYW5kbGVyLmZpbmRTaW5nbGUodGhpcy5vdmVybGF5LCAnLnAtbW9udGhwaWNrZXIgLnAtbW9udGhwaWNrZXItbW9udGgucC1oaWdobGlnaHQnKTtcbiAgICAgICAgICAgICAgICBjZWxscy5mb3JFYWNoKGNlbGwgPT4gY2VsbC50YWJJbmRleCA9IC0xKTtcbiAgICAgICAgICAgICAgICBjZWxsID0gc2VsZWN0ZWRDZWxsIHx8IGNlbGxzWzBdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5jdXJyZW50VmlldyA9PT0gJ3llYXInKSB7XG4gICAgICAgICAgICAgICAgbGV0IGNlbGxzID0gRG9tSGFuZGxlci5maW5kKHRoaXMub3ZlcmxheSwgJy5wLXllYXJwaWNrZXIgLnAteWVhcnBpY2tlci15ZWFyJyk7XG4gICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkQ2VsbD0gRG9tSGFuZGxlci5maW5kU2luZ2xlKHRoaXMub3ZlcmxheSwgJy5wLXllYXJwaWNrZXIgLnAteWVhcnBpY2tlci15ZWFyLnAtaGlnaGxpZ2h0Jyk7XG4gICAgICAgICAgICAgICAgY2VsbHMuZm9yRWFjaChjZWxsID0+IGNlbGwudGFiSW5kZXggPSAtMSk7XG4gICAgICAgICAgICAgICAgY2VsbCA9IHNlbGVjdGVkQ2VsbCB8fCBjZWxsc1swXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGNlbGwgPSBEb21IYW5kbGVyLmZpbmRTaW5nbGUodGhpcy5vdmVybGF5LCAnc3Bhbi5wLWhpZ2hsaWdodCcpO1xuICAgICAgICAgICAgICAgIGlmICghY2VsbCkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgdG9kYXlDZWxsID0gRG9tSGFuZGxlci5maW5kU2luZ2xlKHRoaXMub3ZlcmxheSwgJ3RkLnAtZGF0ZXBpY2tlci10b2RheSBzcGFuOm5vdCgucC1kaXNhYmxlZCk6bm90KC5wLWluaycpO1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9kYXlDZWxsKVxuICAgICAgICAgICAgICAgICAgICAgICAgY2VsbCA9IHRvZGF5Q2VsbDtcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgY2VsbCA9IERvbUhhbmRsZXIuZmluZFNpbmdsZSh0aGlzLm92ZXJsYXksICcucC1kYXRlcGlja2VyLWNhbGVuZGFyIHRkIHNwYW46bm90KC5wLWRpc2FibGVkKTpub3QoLnAtaW5rJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY2VsbCkge1xuICAgICAgICAgICAgICAgIGNlbGwudGFiSW5kZXggPSAnMCc7XG5cbiAgICAgICAgICAgICAgICBpZiAoKCF0aGlzLm5hdmlnYXRpb25TdGF0ZSB8fCAhdGhpcy5uYXZpZ2F0aW9uU3RhdGUuYnV0dG9uKSAmJiAhdGhpcy50aW1lUGlja2VyQ2hhbmdlKSB7XG4gICAgICAgICAgICAgICAgICAgIGNlbGwuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHRyYXBGb2N1cyhldmVudCkge1xuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIGxldCBmb2N1c2FibGVFbGVtZW50cyA9IERvbUhhbmRsZXIuZ2V0Rm9jdXNhYmxlRWxlbWVudHModGhpcy5vdmVybGF5KTtcblxuICAgICAgICAgICAgaWYgKGZvY3VzYWJsZUVsZW1lbnRzICYmIGZvY3VzYWJsZUVsZW1lbnRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICBpZiAoIWRvY3VtZW50LmFjdGl2ZUVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9jdXNhYmxlRWxlbWVudHNbMF0uZm9jdXMoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBmb2N1c2VkSW5kZXggPSBmb2N1c2FibGVFbGVtZW50cy5pbmRleE9mKGRvY3VtZW50LmFjdGl2ZUVsZW1lbnQpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChldmVudC5zaGlmdEtleSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZvY3VzZWRJbmRleCA9PSAtMSB8fCBmb2N1c2VkSW5kZXggPT09IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9jdXNhYmxlRWxlbWVudHNbZm9jdXNhYmxlRWxlbWVudHMubGVuZ3RoIC0gMV0uZm9jdXMoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb2N1c2FibGVFbGVtZW50c1tmb2N1c2VkSW5kZXggLSAxXS5mb2N1cygpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZvY3VzZWRJbmRleCA9PSAtMSB8fCBmb2N1c2VkSW5kZXggPT09IChmb2N1c2FibGVFbGVtZW50cy5sZW5ndGggLSAxKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb2N1c2FibGVFbGVtZW50c1swXS5mb2N1cygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvY3VzYWJsZUVsZW1lbnRzW2ZvY3VzZWRJbmRleCArIDFdLmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIG9uQ29udGFpbmVyQnV0dG9uS2V5ZG93bihldmVudCkge1xuICAgICAgICAgICAgIHN3aXRjaCAoZXZlbnQud2hpY2gpIHtcbiAgICAgICAgICAgICAgICAvL3RhYlxuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50cmFwRm9jdXMoZXZlbnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgLy9lc2NhcGVcbiAgICAgICAgICAgICAgICBjYXNlIDI3OlxuICAgICAgICAgICAgICAgICAgICB0aGlzLm92ZXJsYXlWaXNpYmxlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBvbklucHV0KGV2ZW50KSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uU3RhcnQgPSB0aGlzLiRyZWZzLmlucHV0LiRlbC5zZWxlY3Rpb25TdGFydDtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbkVuZCA9IHRoaXMuJHJlZnMuaW5wdXQuJGVsLnNlbGVjdGlvbkVuZDtcblxuICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9IHRoaXMucGFyc2VWYWx1ZShldmVudC50YXJnZXQudmFsdWUpO1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmlzVmFsaWRTZWxlY3Rpb24odmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlTW9kZWwodmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhdGNoKGVycikge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmtlZXBJbnZhbGlkKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlTW9kZWwoZXZlbnQudGFyZ2V0LnZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIG9uRm9jdXMoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5zaG93T25Gb2N1cyAmJiB0aGlzLmlzRW5hYmxlZCgpKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5vdmVybGF5VmlzaWJsZSA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmZvY3VzZWQgPSB0cnVlO1xuICAgICAgICB9LFxuICAgICAgICBvbkJsdXIoKSB7XG4gICAgICAgICAgICB0aGlzLmZvY3VzZWQgPSBmYWxzZTtcbiAgICAgICAgfSxcbiAgICAgICAgb25LZXlEb3duKCkge1xuICAgICAgICAgICAgaWYgKGV2ZW50LmtleUNvZGUgPT09IDQwICYmIHRoaXMub3ZlcmxheSkge1xuICAgICAgICAgICAgICAgIHRoaXMudHJhcEZvY3VzKGV2ZW50KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGV2ZW50LmtleUNvZGUgPT09IDI3KSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMub3ZlcmxheVZpc2libGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vdmVybGF5VmlzaWJsZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGV2ZW50LmtleUNvZGUgPT09IDkpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5vdmVybGF5KSB7XG4gICAgICAgICAgICAgICAgICAgIERvbUhhbmRsZXIuZ2V0Rm9jdXNhYmxlRWxlbWVudHModGhpcy5vdmVybGF5KS5mb3JFYWNoKGVsID0+IGVsLnRhYkluZGV4ID0gJy0xJyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMub3ZlcmxheVZpc2libGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vdmVybGF5VmlzaWJsZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgb3ZlcmxheVJlZihlbCkge1xuICAgICAgICAgICAgdGhpcy5vdmVybGF5ID0gZWw7XG4gICAgICAgIH0sXG4gICAgICAgIGdldE1vbnRoTmFtZShpbmRleCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuJHByaW1ldnVlLmNvbmZpZy5sb2NhbGUubW9udGhOYW1lc1tpbmRleF07XG4gICAgICAgIH0sXG4gICAgICAgIG9uT3ZlcmxheUNsaWNrKGV2ZW50KSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuaW5saW5lKSB7XG4gICAgICAgICAgICAgICAgT3ZlcmxheUV2ZW50QnVzLmVtaXQoJ292ZXJsYXktY2xpY2snLCB7XG4gICAgICAgICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGV2ZW50LFxuICAgICAgICAgICAgICAgICAgICB0YXJnZXQ6IHRoaXMuJGVsXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIG9uT3ZlcmxheU1vdXNlVXAoZXZlbnQpIHtcbiAgICAgICAgICAgIHRoaXMub25PdmVybGF5Q2xpY2soZXZlbnQpO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGVSZXNwb25zaXZlU3R5bGUoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5udW1iZXJPZk1vbnRocyA+IDEgJiYgdGhpcy5yZXNwb25zaXZlT3B0aW9ucykge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5yZXNwb25zaXZlU3R5bGVFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVzcG9uc2l2ZVN0eWxlRWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3N0eWxlJyk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVzcG9uc2l2ZVN0eWxlRWxlbWVudC50eXBlID0gJ3RleHQvY3NzJztcbiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZCh0aGlzLnJlc3BvbnNpdmVTdHlsZUVsZW1lbnQpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGxldCBpbm5lckhUTUwgPSAnJztcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5yZXNwb25zaXZlT3B0aW9ucykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgcmVzcG9uc2l2ZU9wdGlvbnMgPSBbLi4udGhpcy5yZXNwb25zaXZlT3B0aW9uc11cbiAgICAgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIobyA9PiAhIShvLmJyZWFrcG9pbnQgJiYgby5udW1Nb250aHMpKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnNvcnQoKG8xLCBvMikgPT4gLTEgKiBvMS5icmVha3BvaW50LmxvY2FsZUNvbXBhcmUobzIuYnJlYWtwb2ludCwgdW5kZWZpbmVkLCB7IG51bWVyaWM6IHRydWUgfSkpO1xuXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcmVzcG9uc2l2ZU9wdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB7IGJyZWFrcG9pbnQsIG51bU1vbnRocyB9ID0gcmVzcG9uc2l2ZU9wdGlvbnNbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3R5bGVzID0gYFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5wLWRhdGVwaWNrZXJbJHt0aGlzLmF0dHJpYnV0ZVNlbGVjdG9yfV0gLnAtZGF0ZXBpY2tlci1ncm91cDpudGgtY2hpbGQoJHtudW1Nb250aHN9KSAucC1kYXRlcGlja2VyLW5leHQge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtZmxleCAhaW1wb3J0YW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGA7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSBudW1Nb250aHM7IGogPCB0aGlzLm51bWJlck9mTW9udGhzOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZXMgKz0gYFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAucC1kYXRlcGlja2VyWyR7dGhpcy5hdHRyaWJ1dGVTZWxlY3Rvcn1dIC5wLWRhdGVwaWNrZXItZ3JvdXA6bnRoLWNoaWxkKCR7aiArIDF9KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpbm5lckhUTUwgKz0gYFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6ICR7YnJlYWtwb2ludH0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtzdHlsZXN9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMucmVzcG9uc2l2ZVN0eWxlRWxlbWVudC5pbm5lckhUTUwgPSBpbm5lckhUTUw7XG4gICAgICAgICAgICB9XG5cdFx0fSxcbiAgICAgICAgZGVzdHJveVJlc3BvbnNpdmVTdHlsZUVsZW1lbnQoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5yZXNwb25zaXZlU3R5bGVFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXNwb25zaXZlU3R5bGVFbGVtZW50LnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgIHRoaXMucmVzcG9uc2l2ZVN0eWxlRWxlbWVudCA9IG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9LFxuICAgIGNvbXB1dGVkOiB7XG4gICAgICAgIHZpZXdEYXRlKCkge1xuICAgICAgICAgICAgbGV0IHByb3BWYWx1ZSA9IHRoaXMubW9kZWxWYWx1ZTtcbiAgICAgICAgICAgIGlmIChwcm9wVmFsdWUgJiYgQXJyYXkuaXNBcnJheShwcm9wVmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgcHJvcFZhbHVlID0gcHJvcFZhbHVlWzBdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAocHJvcFZhbHVlICYmIHR5cGVvZiBwcm9wVmFsdWUgIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHByb3BWYWx1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGxldCB0b2RheSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubWF4RGF0ZSAmJiB0aGlzLm1heERhdGUgPCB0b2RheSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5tYXhEYXRlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5taW5EYXRlICYmIHRoaXMubWluRGF0ZSA+IHRvZGF5KSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLm1pbkRhdGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB0b2RheTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgaW5wdXRGaWVsZFZhbHVlKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZm9ybWF0VmFsdWUodGhpcy5tb2RlbFZhbHVlKTtcbiAgICAgICAgfSxcbiAgICAgICAgY29udGFpbmVyQ2xhc3MoKSB7XG4gICAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgICAgICdwLWNhbGVuZGFyIHAtY29tcG9uZW50IHAtaW5wdXR3cmFwcGVyJywgdGhpcy5jbGFzcyxcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICdwLWNhbGVuZGFyLXctYnRuJzogdGhpcy5zaG93SWNvbixcbiAgICAgICAgICAgICAgICAgICAgJ3AtY2FsZW5kYXItdGltZW9ubHknOiB0aGlzLnRpbWVPbmx5LFxuICAgICAgICAgICAgICAgICAgICAncC1pbnB1dHdyYXBwZXItZmlsbGVkJzogdGhpcy5tb2RlbFZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAncC1pbnB1dHdyYXBwZXItZm9jdXMnOiB0aGlzLmZvY3VzZWRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBdO1xuICAgICAgICB9LFxuICAgICAgICBwYW5lbFN0eWxlQ2xhc3MoKSB7XG4gICAgICAgICAgICByZXR1cm4gWydwLWRhdGVwaWNrZXIgcC1jb21wb25lbnQnLCB0aGlzLnBhbmVsQ2xhc3MsIHtcbiAgICAgICAgICAgICAgICAncC1kYXRlcGlja2VyLWlubGluZSc6IHRoaXMuaW5saW5lLFxuICAgICAgICAgICAgICAgICdwLWRpc2FibGVkJzogdGhpcy4kYXR0cnMuZGlzYWJsZWQsXG4gICAgICAgICAgICAgICAgJ3AtZGF0ZXBpY2tlci10aW1lb25seSc6IHRoaXMudGltZU9ubHksXG4gICAgICAgICAgICAgICAgJ3AtZGF0ZXBpY2tlci1tdWx0aXBsZS1tb250aCc6IHRoaXMubnVtYmVyT2ZNb250aHMgPiAxLFxuICAgICAgICAgICAgICAgICdwLWRhdGVwaWNrZXItbW9udGhwaWNrZXInOiAodGhpcy5jdXJyZW50VmlldyA9PT0gJ21vbnRoJyksXG4gICAgICAgICAgICAgICAgJ3AtZGF0ZXBpY2tlci15ZWFycGlja2VyJzogKHRoaXMuY3VycmVudFZpZXcgPT09ICd5ZWFyJyksXG4gICAgICAgICAgICAgICAgJ3AtZGF0ZXBpY2tlci10b3VjaC11aSc6IHRoaXMudG91Y2hVSSxcbiAgICAgICAgICAgICAgICAncC1pbnB1dC1maWxsZWQnOiB0aGlzLiRwcmltZXZ1ZS5jb25maWcuaW5wdXRTdHlsZSA9PT0gJ2ZpbGxlZCcsXG4gICAgICAgICAgICAgICAgJ3AtcmlwcGxlLWRpc2FibGVkJzogdGhpcy4kcHJpbWV2dWUuY29uZmlnLnJpcHBsZSA9PT0gZmFsc2VcbiAgICAgICAgICAgIH1dO1xuICAgICAgICB9LFxuICAgICAgICBtb250aHMoKSB7XG4gICAgICAgICAgICBsZXQgbW9udGhzID0gW107XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMCA7IGkgPCB0aGlzLm51bWJlck9mTW9udGhzOyBpKyspIHtcbiAgICAgICAgICAgICAgICBsZXQgbW9udGggPSB0aGlzLmN1cnJlbnRNb250aCArIGk7XG4gICAgICAgICAgICAgICAgbGV0IHllYXIgPSB0aGlzLmN1cnJlbnRZZWFyO1xuICAgICAgICAgICAgICAgIGlmIChtb250aCA+IDExKSB7XG4gICAgICAgICAgICAgICAgICAgIG1vbnRoID0gbW9udGggJSAxMSAtIDE7XG4gICAgICAgICAgICAgICAgICAgIHllYXIgPSB5ZWFyICsgMTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBsZXQgZGF0ZXMgPSBbXTtcbiAgICAgICAgICAgICAgICBsZXQgZmlyc3REYXkgPSB0aGlzLmdldEZpcnN0RGF5T2ZNb250aEluZGV4KG1vbnRoLCB5ZWFyKTtcbiAgICAgICAgICAgICAgICBsZXQgZGF5c0xlbmd0aCA9IHRoaXMuZ2V0RGF5c0NvdW50SW5Nb250aChtb250aCwgeWVhcik7XG4gICAgICAgICAgICAgICAgbGV0IHByZXZNb250aERheXNMZW5ndGggPSB0aGlzLmdldERheXNDb3VudEluUHJldk1vbnRoKG1vbnRoLCB5ZWFyKTtcbiAgICAgICAgICAgICAgICBsZXQgZGF5Tm8gPSAxO1xuICAgICAgICAgICAgICAgIGxldCB0b2RheSA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICAgICAgbGV0IHdlZWtOdW1iZXJzID0gW107XG4gICAgICAgICAgICAgICAgbGV0IG1vbnRoUm93cyA9IE1hdGguY2VpbCgoZGF5c0xlbmd0aCArIGZpcnN0RGF5KSAvIDcpO1xuXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBtb250aFJvd3M7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgd2VlayA9IFtdO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChpID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAocHJldk1vbnRoRGF5c0xlbmd0aCAtIGZpcnN0RGF5ICsgMSk7IGogPD0gcHJldk1vbnRoRGF5c0xlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHByZXYgPSB0aGlzLmdldFByZXZpb3VzTW9udGhBbmRZZWFyKG1vbnRoLCB5ZWFyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ZWVrLnB1c2goe2RheTogaiwgbW9udGg6IHByZXYubW9udGgsIHllYXI6IHByZXYueWVhciwgb3RoZXJNb250aDogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvZGF5OiB0aGlzLmlzVG9kYXkodG9kYXksIGosIHByZXYubW9udGgsIHByZXYueWVhciksIHNlbGVjdGFibGU6IHRoaXMuaXNTZWxlY3RhYmxlKGosIHByZXYubW9udGgsIHByZXYueWVhciwgdHJ1ZSl9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlbWFpbmluZ0RheXNMZW5ndGggPSA3IC0gd2Vlay5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IHJlbWFpbmluZ0RheXNMZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdlZWsucHVzaCh7ZGF5OiBkYXlObywgbW9udGg6IG1vbnRoLCB5ZWFyOiB5ZWFyLCB0b2RheTogdGhpcy5pc1RvZGF5KHRvZGF5LCBkYXlObywgbW9udGgsIHllYXIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0YWJsZTogdGhpcy5pc1NlbGVjdGFibGUoZGF5Tm8sIG1vbnRoLCB5ZWFyLCBmYWxzZSl9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXlObysrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCA3OyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF5Tm8gPiBkYXlzTGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXh0ID0gdGhpcy5nZXROZXh0TW9udGhBbmRZZWFyKG1vbnRoLCB5ZWFyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2Vlay5wdXNoKHtkYXk6IGRheU5vIC0gZGF5c0xlbmd0aCwgbW9udGg6IG5leHQubW9udGgsIHllYXI6IG5leHQueWVhciwgb3RoZXJNb250aDogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9kYXk6IHRoaXMuaXNUb2RheSh0b2RheSwgZGF5Tm8gLSBkYXlzTGVuZ3RoLCBuZXh0Lm1vbnRoLCBuZXh0LnllYXIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RhYmxlOiB0aGlzLmlzU2VsZWN0YWJsZSgoZGF5Tm8gLSBkYXlzTGVuZ3RoKSwgbmV4dC5tb250aCwgbmV4dC55ZWFyLCB0cnVlKX0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2Vlay5wdXNoKHtkYXk6IGRheU5vLCBtb250aDogbW9udGgsIHllYXI6IHllYXIsIHRvZGF5OiB0aGlzLmlzVG9kYXkodG9kYXksIGRheU5vLCBtb250aCwgeWVhciksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RhYmxlOiB0aGlzLmlzU2VsZWN0YWJsZShkYXlObywgbW9udGgsIHllYXIsIGZhbHNlKX0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRheU5vKys7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5zaG93V2Vlaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgd2Vla051bWJlcnMucHVzaCh0aGlzLmdldFdlZWtOdW1iZXIobmV3IERhdGUod2Vla1swXS55ZWFyLCB3ZWVrWzBdLm1vbnRoLCB3ZWVrWzBdLmRheSkpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGRhdGVzLnB1c2god2Vlayk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbW9udGhzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBtb250aDogbW9udGgsXG4gICAgICAgICAgICAgICAgICAgIHllYXI6IHllYXIsXG4gICAgICAgICAgICAgICAgICAgIGRhdGVzOiBkYXRlcyxcbiAgICAgICAgICAgICAgICAgICAgd2Vla051bWJlcnM6IHdlZWtOdW1iZXJzXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBtb250aHM7XG4gICAgICAgIH0sXG4gICAgICAgIHdlZWtEYXlzKCkge1xuICAgICAgICAgICAgbGV0IHdlZWtEYXlzID0gW107XG4gICAgICAgICAgICBsZXQgZGF5SW5kZXggPSB0aGlzLiRwcmltZXZ1ZS5jb25maWcubG9jYWxlLmZpcnN0RGF5T2ZXZWVrO1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCA3OyBpKyspIHtcbiAgICAgICAgICAgICAgICB3ZWVrRGF5cy5wdXNoKHRoaXMuJHByaW1ldnVlLmNvbmZpZy5sb2NhbGUuZGF5TmFtZXNNaW5bZGF5SW5kZXhdKTtcbiAgICAgICAgICAgICAgICBkYXlJbmRleCA9IChkYXlJbmRleCA9PSA2KSA/IDAgOiArK2RheUluZGV4O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gd2Vla0RheXM7XG4gICAgICAgIH0sXG4gICAgICAgIHRpY2tzVG8xOTcwKCkge1xuICAgICAgICAgICAgcmV0dXJuICgoKDE5NzAgLSAxKSAqIDM2NSArIE1hdGguZmxvb3IoMTk3MCAvIDQpIC0gTWF0aC5mbG9vcigxOTcwIC8gMTAwKSArIE1hdGguZmxvb3IoMTk3MCAvIDQwMCkpICogMjQgKiA2MCAqIDYwICogMTAwMDAwMDApO1xuICAgICAgICB9LFxuICAgICAgICBzdW5kYXlJbmRleCgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLiRwcmltZXZ1ZS5jb25maWcubG9jYWxlLmZpcnN0RGF5T2ZXZWVrID4gMCA/IDcgLSB0aGlzLiRwcmltZXZ1ZS5jb25maWcubG9jYWxlLmZpcnN0RGF5T2ZXZWVrIDogMDtcbiAgICAgICAgfSxcbiAgICAgICAgZGF0ZVBhdHRlcm4oKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5kYXRlRm9ybWF0IHx8IHRoaXMuJHByaW1ldnVlLmNvbmZpZy5sb2NhbGUuZGF0ZUZvcm1hdDtcbiAgICAgICAgfSxcbiAgICAgICAgeWVhck9wdGlvbnMoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy55ZWFyUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICBsZXQgJHZtID0gdGhpcztcbiAgICAgICAgICAgICAgICBjb25zdCB5ZWFycyA9IHRoaXMueWVhclJhbmdlLnNwbGl0KCc6Jyk7XG4gICAgICAgICAgICAgICAgbGV0IHllYXJTdGFydCA9IHBhcnNlSW50KHllYXJzWzBdKTtcbiAgICAgICAgICAgICAgICBsZXQgeWVhckVuZCA9IHBhcnNlSW50KHllYXJzWzFdKTtcbiAgICAgICAgICAgICAgICBsZXQgeWVhck9wdGlvbnMgPSBbXTtcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmN1cnJlbnRZZWFyIDwgeWVhclN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgICR2bS5jdXJyZW50WWVhciA9IHllYXJFbmQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuY3VycmVudFllYXIgPiB5ZWFyRW5kKSB7XG4gICAgICAgICAgICAgICAgICAgICR2bS5jdXJyZW50WWVhciA9IHllYXJTdGFydDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0geWVhclN0YXJ0OyBpIDw9IHllYXJFbmQ7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICB5ZWFyT3B0aW9ucy5wdXNoKGkpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB5ZWFyT3B0aW9ucztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBtb250aFBpY2tlclZhbHVlcygpIHtcbiAgICAgICAgICAgIGxldCBtb250aFBpY2tlclZhbHVlcyA9IFtdO1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPD0gMTE7IGkrKykge1xuICAgICAgICAgICAgICAgIG1vbnRoUGlja2VyVmFsdWVzLnB1c2godGhpcy4kcHJpbWV2dWUuY29uZmlnLmxvY2FsZS5tb250aE5hbWVzU2hvcnRbaV0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gbW9udGhQaWNrZXJWYWx1ZXM7XG4gICAgICAgIH0sXG4gICAgICAgIHllYXJQaWNrZXJWYWx1ZXMoKSB7XG4gICAgICAgICAgICBsZXQgeWVhclBpY2tlclZhbHVlcyA9IFtdO1xuICAgICAgICAgICAgbGV0IGJhc2UgPSB0aGlzLmN1cnJlbnRZZWFyIC0gICh0aGlzLmN1cnJlbnRZZWFyICUgMTApO1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCAxMDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgeWVhclBpY2tlclZhbHVlcy5wdXNoKGJhc2UgKyBpKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHllYXJQaWNrZXJWYWx1ZXM7XG4gICAgICAgIH0sXG4gICAgICAgIGZvcm1hdHRlZEN1cnJlbnRIb3VyKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3VycmVudEhvdXIgPCAxMCA/ICcwJyArIHRoaXMuY3VycmVudEhvdXIgOiB0aGlzLmN1cnJlbnRIb3VyO1xuICAgICAgICB9LFxuICAgICAgICBmb3JtYXR0ZWRDdXJyZW50TWludXRlKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3VycmVudE1pbnV0ZSA8IDEwID8gJzAnICsgdGhpcy5jdXJyZW50TWludXRlIDogdGhpcy5jdXJyZW50TWludXRlO1xuICAgICAgICB9LFxuICAgICAgICBmb3JtYXR0ZWRDdXJyZW50U2Vjb25kKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3VycmVudFNlY29uZCA8IDEwID8gJzAnICsgdGhpcy5jdXJyZW50U2Vjb25kIDogdGhpcy5jdXJyZW50U2Vjb25kO1xuICAgICAgICB9LFxuICAgICAgICB0b2RheUxhYmVsKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuJHByaW1ldnVlLmNvbmZpZy5sb2NhbGUudG9kYXk7XG4gICAgICAgIH0sXG4gICAgICAgIGNsZWFyTGFiZWwoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy4kcHJpbWV2dWUuY29uZmlnLmxvY2FsZS5jbGVhcjtcbiAgICAgICAgfSxcbiAgICAgICAgd2Vla0hlYWRlckxhYmVsKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuJHByaW1ldnVlLmNvbmZpZy5sb2NhbGUud2Vla0hlYWRlcjtcbiAgICAgICAgfSxcbiAgICAgICAgbW9udGhOYW1lcygpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLiRwcmltZXZ1ZS5jb25maWcubG9jYWxlLm1vbnR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wgY3JlYXRlQmxvY2soRnJhZ21lbnQsIHsga2V5OiAwIH0sIFtcbiAgICAgICAgICAgICAgICAgICAgICBjcmVhdGVWTm9kZShcImRpdlwiLCBfaG9pc3RlZF8xLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAob3BlbkJsb2NrKHRydWUpLCBjcmVhdGVCbG9jayhGcmFnbWVudCwgbnVsbCwgcmVuZGVyTGlzdCgkb3B0aW9ucy5tb250aHMsIChtb250aCwgZ3JvdXBJbmRleCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcImRpdlwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwicC1kYXRlcGlja2VyLWdyb3VwXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBtb250aC5tb250aCArIG1vbnRoLnllYXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVZOb2RlKFwiZGl2XCIsIF9ob2lzdGVkXzIsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbmRlclNsb3QoX2N0eC4kc2xvdHMsIFwiaGVhZGVyXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aERpcmVjdGl2ZXMoY3JlYXRlVk5vZGUoXCJidXR0b25cIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJwLWRhdGVwaWNrZXItcHJldiBwLWxpbmtcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogX2NhY2hlWzFdIHx8IChfY2FjaGVbMV0gPSAoLi4uYXJncykgPT4gKCRvcHRpb25zLm9uUHJldkJ1dHRvbkNsaWNrICYmICRvcHRpb25zLm9uUHJldkJ1dHRvbkNsaWNrKC4uLmFyZ3MpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFwiYnV0dG9uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uS2V5ZG93bjogX2NhY2hlWzJdIHx8IChfY2FjaGVbMl0gPSAoLi4uYXJncykgPT4gKCRvcHRpb25zLm9uQ29udGFpbmVyQnV0dG9uS2V5ZG93biAmJiAkb3B0aW9ucy5vbkNvbnRhaW5lckJ1dHRvbktleWRvd24oLi4uYXJncykpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ6IF9jdHguJGF0dHJzLmRpc2FibGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9ob2lzdGVkXzNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sIDQwLCBbXCJkaXNhYmxlZFwiXSksIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW3ZTaG93LCBncm91cEluZGV4ID09PSAwXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW19kaXJlY3RpdmVfcmlwcGxlXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmVhdGVWTm9kZShcImRpdlwiLCBfaG9pc3RlZF80LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgkZGF0YS5jdXJyZW50VmlldyA9PT0gJ2RhdGUnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcImJ1dHRvblwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJidXR0b25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogX2NhY2hlWzNdIHx8IChfY2FjaGVbM10gPSAoLi4uYXJncykgPT4gKCRvcHRpb25zLnN3aXRjaFRvTW9udGhWaWV3ICYmICRvcHRpb25zLnN3aXRjaFRvTW9udGhWaWV3KC4uLmFyZ3MpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcInAtZGF0ZXBpY2tlci1tb250aCBwLWxpbmtcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ6ICRvcHRpb25zLnN3aXRjaFZpZXdCdXR0b25EaXNhYmxlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdG9EaXNwbGF5U3RyaW5nKCRvcHRpb25zLmdldE1vbnRoTmFtZShtb250aC5tb250aCkpLCA5LCBbXCJkaXNhYmxlZFwiXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjcmVhdGVDb21tZW50Vk5vZGUoXCJcIiwgdHJ1ZSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgkZGF0YS5jdXJyZW50VmlldyAhPT0gJ3llYXInKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcImJ1dHRvblwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJidXR0b25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogX2NhY2hlWzRdIHx8IChfY2FjaGVbNF0gPSAoLi4uYXJncykgPT4gKCRvcHRpb25zLnN3aXRjaFRvWWVhclZpZXcgJiYgJG9wdGlvbnMuc3dpdGNoVG9ZZWFyVmlldyguLi5hcmdzKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJwLWRhdGVwaWNrZXIteWVhciBwLWxpbmtcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ6ICRvcHRpb25zLnN3aXRjaFZpZXdCdXR0b25EaXNhYmxlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdG9EaXNwbGF5U3RyaW5nKCRkYXRhLmN1cnJlbnRZZWFyKSwgOSwgW1wiZGlzYWJsZWRcIl0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3JlYXRlQ29tbWVudFZOb2RlKFwiXCIsIHRydWUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoJGRhdGEuY3VycmVudFZpZXcgPT09ICd5ZWFyJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IChvcGVuQmxvY2soKSwgY3JlYXRlQmxvY2soXCJzcGFuXCIsIF9ob2lzdGVkXzUsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVuZGVyU2xvdChfY3R4LiRzbG90cywgXCJkZWNhZGVcIiwgeyB5ZWFyczogJG9wdGlvbnMueWVhclBpY2tlclZhbHVlcyB9LCAoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVGV4dFZOb2RlKHRvRGlzcGxheVN0cmluZygkb3B0aW9ucy55ZWFyUGlja2VyVmFsdWVzWzBdKSArIFwiIC0gXCIgKyB0b0Rpc3BsYXlTdHJpbmcoJG9wdGlvbnMueWVhclBpY2tlclZhbHVlc1skb3B0aW9ucy55ZWFyUGlja2VyVmFsdWVzLmxlbmd0aCAtIDFdKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3JlYXRlQ29tbWVudFZOb2RlKFwiXCIsIHRydWUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhEaXJlY3RpdmVzKGNyZWF0ZVZOb2RlKFwiYnV0dG9uXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwicC1kYXRlcGlja2VyLW5leHQgcC1saW5rXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6IF9jYWNoZVs1XSB8fCAoX2NhY2hlWzVdID0gKC4uLmFyZ3MpID0+ICgkb3B0aW9ucy5vbk5leHRCdXR0b25DbGljayAmJiAkb3B0aW9ucy5vbk5leHRCdXR0b25DbGljayguLi5hcmdzKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImJ1dHRvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbktleWRvd246IF9jYWNoZVs2XSB8fCAoX2NhY2hlWzZdID0gKC4uLmFyZ3MpID0+ICgkb3B0aW9ucy5vbkNvbnRhaW5lckJ1dHRvbktleWRvd24gJiYgJG9wdGlvbnMub25Db250YWluZXJCdXR0b25LZXlkb3duKC4uLmFyZ3MpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVkOiBfY3R4LiRhdHRycy5kaXNhYmxlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfaG9pc3RlZF82XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLCA0MCwgW1wiZGlzYWJsZWRcIl0pLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFt2U2hvdywgJHByb3BzLm51bWJlck9mTW9udGhzID09PSAxID8gdHJ1ZSA6IChncm91cEluZGV4ID09PSAkcHJvcHMubnVtYmVyT2ZNb250aHMgLSAxKV0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtfZGlyZWN0aXZlX3JpcHBsZV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKCRkYXRhLmN1cnJlbnRWaWV3ID09PSdkYXRlJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcImRpdlwiLCBfaG9pc3RlZF83LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVk5vZGUoXCJ0YWJsZVwiLCBfaG9pc3RlZF84LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmVhdGVWTm9kZShcInRoZWFkXCIsIG51bGwsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVk5vZGUoXCJ0clwiLCBudWxsLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCRwcm9wcy5zaG93V2VlaylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcInRoXCIsIF9ob2lzdGVkXzksIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmVhdGVWTm9kZShcInNwYW5cIiwgbnVsbCwgdG9EaXNwbGF5U3RyaW5nKCRvcHRpb25zLndlZWtIZWFkZXJMYWJlbCksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjcmVhdGVDb21tZW50Vk5vZGUoXCJcIiwgdHJ1ZSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG9wZW5CbG9jayh0cnVlKSwgY3JlYXRlQmxvY2soRnJhZ21lbnQsIG51bGwsIHJlbmRlckxpc3QoJG9wdGlvbnMud2Vla0RheXMsICh3ZWVrRGF5KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcInRoXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGU6IFwiY29sXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogd2Vla0RheVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmVhdGVWTm9kZShcInNwYW5cIiwgbnVsbCwgdG9EaXNwbGF5U3RyaW5nKHdlZWtEYXkpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksIDEyOCkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVZOb2RlKFwidGJvZHlcIiwgbnVsbCwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3BlbkJsb2NrKHRydWUpLCBjcmVhdGVCbG9jayhGcmFnbWVudCwgbnVsbCwgcmVuZGVyTGlzdChtb250aC5kYXRlcywgKHdlZWssIGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcInRyXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleTogd2Vla1swXS5kYXkgKyAnJyArIHdlZWtbMF0ubW9udGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoJHByb3BzLnNob3dXZWVrKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IChvcGVuQmxvY2soKSwgY3JlYXRlQmxvY2soXCJ0ZFwiLCBfaG9pc3RlZF8xMCwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVk5vZGUoXCJzcGFuXCIsIF9ob2lzdGVkXzExLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtb250aC53ZWVrTnVtYmVyc1tpXSA8IDEwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcInNwYW5cIiwgX2hvaXN0ZWRfMTIsIFwiMFwiKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGNyZWF0ZUNvbW1lbnRWTm9kZShcIlwiLCB0cnVlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVGV4dFZOb2RlKFwiIFwiICsgdG9EaXNwbGF5U3RyaW5nKG1vbnRoLndlZWtOdW1iZXJzW2ldKSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3JlYXRlQ29tbWVudFZOb2RlKFwiXCIsIHRydWUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG9wZW5CbG9jayh0cnVlKSwgY3JlYXRlQmxvY2soRnJhZ21lbnQsIG51bGwsIHJlbmRlckxpc3Qod2VlaywgKGRhdGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChvcGVuQmxvY2soKSwgY3JlYXRlQmxvY2soXCJ0ZFwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBkYXRlLmRheSArICcnICsgZGF0ZS5tb250aCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogeydwLWRhdGVwaWNrZXItb3RoZXItbW9udGgnOiBkYXRlLm90aGVyTW9udGgsICdwLWRhdGVwaWNrZXItdG9kYXknOiBkYXRlLnRvZGF5fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aERpcmVjdGl2ZXMoY3JlYXRlVk5vZGUoXCJzcGFuXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiB7J3AtaGlnaGxpZ2h0JzogJG9wdGlvbnMuaXNTZWxlY3RlZChkYXRlKSwgJ3AtZGlzYWJsZWQnOiAhZGF0ZS5zZWxlY3RhYmxlfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6ICRldmVudCA9PiAoJG9wdGlvbnMub25EYXRlU2VsZWN0KCRldmVudCwgZGF0ZSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJhZ2dhYmxlOiBcImZhbHNlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbktleWRvd246ICRldmVudCA9PiAoJG9wdGlvbnMub25EYXRlQ2VsbEtleWRvd24oJGV2ZW50LGRhdGUsZ3JvdXBJbmRleCkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVuZGVyU2xvdChfY3R4LiRzbG90cywgXCJkYXRlXCIsIHsgZGF0ZTogZGF0ZSB9LCAoKSA9PiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVRleHRWTm9kZSh0b0Rpc3BsYXlTdHJpbmcoZGF0ZS5kYXkpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLCA0MiwgW1wib25DbGlja1wiLCBcIm9uS2V5ZG93blwiXSksIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtfZGlyZWN0aXZlX3JpcHBsZV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLCAyKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLCAxMjgpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSwgMTI4KSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGNyZWF0ZUNvbW1lbnRWTm9kZShcIlwiLCB0cnVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLCAxMjgpKVxuICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICgkZGF0YS5jdXJyZW50VmlldyA9PT0gJ21vbnRoJylcbiAgICAgICAgICAgICAgICAgICAgICAgID8gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcImRpdlwiLCBfaG9pc3RlZF8xMywgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChvcGVuQmxvY2sodHJ1ZSksIGNyZWF0ZUJsb2NrKEZyYWdtZW50LCBudWxsLCByZW5kZXJMaXN0KCRvcHRpb25zLm1vbnRoUGlja2VyVmFsdWVzLCAobSwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdpdGhEaXJlY3RpdmVzKChvcGVuQmxvY2soKSwgY3JlYXRlQmxvY2soXCJzcGFuXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBtLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiAkZXZlbnQgPT4gKCRvcHRpb25zLm9uTW9udGhTZWxlY3QoJGV2ZW50LCBpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uS2V5ZG93bjogJGV2ZW50ID0+ICgkb3B0aW9ucy5vbk1vbnRoQ2VsbEtleWRvd24oJGV2ZW50LGkpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFtcInAtbW9udGhwaWNrZXItbW9udGhcIiwgeydwLWhpZ2hsaWdodCc6ICRvcHRpb25zLmlzTW9udGhTZWxlY3RlZChpKX1dXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVRleHRWTm9kZSh0b0Rpc3BsYXlTdHJpbmcobSksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLCA0MiwgW1wib25DbGlja1wiLCBcIm9uS2V5ZG93blwiXSkpLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtfZGlyZWN0aXZlX3JpcHBsZV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksIDEyOCkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBjcmVhdGVDb21tZW50Vk5vZGUoXCJcIiwgdHJ1ZSksXG4gICAgICAgICAgICAgICAgICAgICAgKCRkYXRhLmN1cnJlbnRWaWV3ID09PSAneWVhcicpXG4gICAgICAgICAgICAgICAgICAgICAgICA/IChvcGVuQmxvY2soKSwgY3JlYXRlQmxvY2soXCJkaXZcIiwgX2hvaXN0ZWRfMTQsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3BlbkJsb2NrKHRydWUpLCBjcmVhdGVCbG9jayhGcmFnbWVudCwgbnVsbCwgcmVuZGVyTGlzdCgkb3B0aW9ucy55ZWFyUGlja2VyVmFsdWVzLCAoeSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdpdGhEaXJlY3RpdmVzKChvcGVuQmxvY2soKSwgY3JlYXRlQmxvY2soXCJzcGFuXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiB5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiAkZXZlbnQgPT4gKCRvcHRpb25zLm9uWWVhclNlbGVjdCgkZXZlbnQsIHkpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25LZXlkb3duOiAkZXZlbnQgPT4gKCRvcHRpb25zLm9uWWVhckNlbGxLZXlkb3duKCRldmVudCx5KSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBbXCJwLXllYXJwaWNrZXIteWVhclwiLCB7J3AtaGlnaGxpZ2h0JzogJG9wdGlvbnMuaXNZZWFyU2VsZWN0ZWQoeSl9XVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmVhdGVUZXh0Vk5vZGUodG9EaXNwbGF5U3RyaW5nKHkpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSwgNDIsIFtcIm9uQ2xpY2tcIiwgXCJvbktleWRvd25cIl0pKSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbX2RpcmVjdGl2ZV9yaXBwbGVdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLCAxMjgpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIDogY3JlYXRlQ29tbWVudFZOb2RlKFwiXCIsIHRydWUpXG4gICAgICAgICAgICAgICAgICAgIF0sIDY0KSlcbiAgICAgICAgICAgICAgICAgIDogY3JlYXRlQ29tbWVudFZOb2RlKFwiXCIsIHRydWUpLFxuICAgICAgICAgICAgICAgICgkcHJvcHMuc2hvd1RpbWV8fCRwcm9wcy50aW1lT25seSlcbiAgICAgICAgICAgICAgICAgID8gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcImRpdlwiLCBfaG9pc3RlZF8xNSwgW1xuICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVZOb2RlKFwiZGl2XCIsIF9ob2lzdGVkXzE2LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoRGlyZWN0aXZlcyhjcmVhdGVWTm9kZShcImJ1dHRvblwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcInAtbGlua1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBvbk1vdXNlZG93bjogX2NhY2hlWzddIHx8IChfY2FjaGVbN10gPSAkZXZlbnQgPT4gKCRvcHRpb25zLm9uVGltZVBpY2tlckVsZW1lbnRNb3VzZURvd24oJGV2ZW50LCAwLCAxKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBvbk1vdXNldXA6IF9jYWNoZVs4XSB8fCAoX2NhY2hlWzhdID0gJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VVcCgkZXZlbnQpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG9uS2V5ZG93bjogW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jYWNoZVs5XSB8fCAoX2NhY2hlWzldID0gKC4uLmFyZ3MpID0+ICgkb3B0aW9ucy5vbkNvbnRhaW5lckJ1dHRvbktleWRvd24gJiYgJG9wdGlvbnMub25Db250YWluZXJCdXR0b25LZXlkb3duKC4uLmFyZ3MpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzExXSB8fCAoX2NhY2hlWzExXSA9IHdpdGhLZXlzKCRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlRG93bigkZXZlbnQsIDAsIDEpKSwgW1wiZW50ZXJcIl0pKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbMTJdIHx8IChfY2FjaGVbMTJdID0gd2l0aEtleXMoJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VEb3duKCRldmVudCwgMCwgMSkpLCBbXCJzcGFjZVwiXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG9uTW91c2VsZWF2ZTogX2NhY2hlWzEwXSB8fCAoX2NhY2hlWzEwXSA9ICRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlTGVhdmUoKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBvbktleXVwOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzEzXSB8fCAoX2NhY2hlWzEzXSA9IHdpdGhLZXlzKCRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlVXAoJGV2ZW50KSksIFtcImVudGVyXCJdKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzE0XSB8fCAoX2NhY2hlWzE0XSA9IHdpdGhLZXlzKCRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlVXAoJGV2ZW50KSksIFtcInNwYWNlXCJdKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJidXR0b25cIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICBfaG9pc3RlZF8xN1xuICAgICAgICAgICAgICAgICAgICAgICAgXSwgNTQ0KSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICBbX2RpcmVjdGl2ZV9yaXBwbGVdXG4gICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVZOb2RlKFwic3BhblwiLCBudWxsLCB0b0Rpc3BsYXlTdHJpbmcoJG9wdGlvbnMuZm9ybWF0dGVkQ3VycmVudEhvdXIpLCAxKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhEaXJlY3RpdmVzKGNyZWF0ZVZOb2RlKFwiYnV0dG9uXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwicC1saW5rXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG9uTW91c2Vkb3duOiBfY2FjaGVbMTVdIHx8IChfY2FjaGVbMTVdID0gJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VEb3duKCRldmVudCwgMCwgLTEpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG9uTW91c2V1cDogX2NhY2hlWzE2XSB8fCAoX2NhY2hlWzE2XSA9ICRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlVXAoJGV2ZW50KSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBvbktleWRvd246IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbMTddIHx8IChfY2FjaGVbMTddID0gKC4uLmFyZ3MpID0+ICgkb3B0aW9ucy5vbkNvbnRhaW5lckJ1dHRvbktleWRvd24gJiYgJG9wdGlvbnMub25Db250YWluZXJCdXR0b25LZXlkb3duKC4uLmFyZ3MpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzE5XSB8fCAoX2NhY2hlWzE5XSA9IHdpdGhLZXlzKCRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlRG93bigkZXZlbnQsIDAsIC0xKSksIFtcImVudGVyXCJdKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzIwXSB8fCAoX2NhY2hlWzIwXSA9IHdpdGhLZXlzKCRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlRG93bigkZXZlbnQsIDAsIC0xKSksIFtcInNwYWNlXCJdKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgb25Nb3VzZWxlYXZlOiBfY2FjaGVbMThdIHx8IChfY2FjaGVbMThdID0gJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VMZWF2ZSgpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG9uS2V5dXA6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbMjFdIHx8IChfY2FjaGVbMjFdID0gd2l0aEtleXMoJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VVcCgkZXZlbnQpKSwgW1wiZW50ZXJcIl0pKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbMjJdIHx8IChfY2FjaGVbMjJdID0gd2l0aEtleXMoJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VVcCgkZXZlbnQpKSwgW1wic3BhY2VcIl0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImJ1dHRvblwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF9ob2lzdGVkXzE4XG4gICAgICAgICAgICAgICAgICAgICAgICBdLCA1NDQpLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgIFtfZGlyZWN0aXZlX3JpcHBsZV1cbiAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVk5vZGUoXCJkaXZcIiwgX2hvaXN0ZWRfMTksIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVZOb2RlKFwic3BhblwiLCBudWxsLCB0b0Rpc3BsYXlTdHJpbmcoJHByb3BzLnRpbWVTZXBhcmF0b3IpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVZOb2RlKFwiZGl2XCIsIF9ob2lzdGVkXzIwLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoRGlyZWN0aXZlcyhjcmVhdGVWTm9kZShcImJ1dHRvblwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcInAtbGlua1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBvbk1vdXNlZG93bjogX2NhY2hlWzIzXSB8fCAoX2NhY2hlWzIzXSA9ICRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlRG93bigkZXZlbnQsIDEsIDEpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG9uTW91c2V1cDogX2NhY2hlWzI0XSB8fCAoX2NhY2hlWzI0XSA9ICRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlVXAoJGV2ZW50KSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBvbktleWRvd246IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbMjVdIHx8IChfY2FjaGVbMjVdID0gKC4uLmFyZ3MpID0+ICgkb3B0aW9ucy5vbkNvbnRhaW5lckJ1dHRvbktleWRvd24gJiYgJG9wdGlvbnMub25Db250YWluZXJCdXR0b25LZXlkb3duKC4uLmFyZ3MpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzI3XSB8fCAoX2NhY2hlWzI3XSA9IHdpdGhLZXlzKCRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlRG93bigkZXZlbnQsIDEsIDEpKSwgW1wiZW50ZXJcIl0pKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbMjhdIHx8IChfY2FjaGVbMjhdID0gd2l0aEtleXMoJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VEb3duKCRldmVudCwgMSwgMSkpLCBbXCJzcGFjZVwiXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVkOiBfY3R4LiRhdHRycy5kaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgb25Nb3VzZWxlYXZlOiBfY2FjaGVbMjZdIHx8IChfY2FjaGVbMjZdID0gJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VMZWF2ZSgpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG9uS2V5dXA6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbMjldIHx8IChfY2FjaGVbMjldID0gd2l0aEtleXMoJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VVcCgkZXZlbnQpKSwgW1wiZW50ZXJcIl0pKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbMzBdIHx8IChfY2FjaGVbMzBdID0gd2l0aEtleXMoJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VVcCgkZXZlbnQpKSwgW1wic3BhY2VcIl0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImJ1dHRvblwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF9ob2lzdGVkXzIxXG4gICAgICAgICAgICAgICAgICAgICAgICBdLCA0MCwgW1wiZGlzYWJsZWRcIl0pLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgIFtfZGlyZWN0aXZlX3JpcHBsZV1cbiAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVk5vZGUoXCJzcGFuXCIsIG51bGwsIHRvRGlzcGxheVN0cmluZygkb3B0aW9ucy5mb3JtYXR0ZWRDdXJyZW50TWludXRlKSwgMSksXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoRGlyZWN0aXZlcyhjcmVhdGVWTm9kZShcImJ1dHRvblwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcInAtbGlua1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBvbk1vdXNlZG93bjogX2NhY2hlWzMxXSB8fCAoX2NhY2hlWzMxXSA9ICRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlRG93bigkZXZlbnQsIDEsIC0xKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBvbk1vdXNldXA6IF9jYWNoZVszMl0gfHwgKF9jYWNoZVszMl0gPSAkZXZlbnQgPT4gKCRvcHRpb25zLm9uVGltZVBpY2tlckVsZW1lbnRNb3VzZVVwKCRldmVudCkpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgb25LZXlkb3duOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzMzXSB8fCAoX2NhY2hlWzMzXSA9ICguLi5hcmdzKSA9PiAoJG9wdGlvbnMub25Db250YWluZXJCdXR0b25LZXlkb3duICYmICRvcHRpb25zLm9uQ29udGFpbmVyQnV0dG9uS2V5ZG93biguLi5hcmdzKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jYWNoZVszNV0gfHwgKF9jYWNoZVszNV0gPSB3aXRoS2V5cygkZXZlbnQgPT4gKCRvcHRpb25zLm9uVGltZVBpY2tlckVsZW1lbnRNb3VzZURvd24oJGV2ZW50LCAxLCAtMSkpLCBbXCJlbnRlclwiXSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jYWNoZVszNl0gfHwgKF9jYWNoZVszNl0gPSB3aXRoS2V5cygkZXZlbnQgPT4gKCRvcHRpb25zLm9uVGltZVBpY2tlckVsZW1lbnRNb3VzZURvd24oJGV2ZW50LCAxLCAtMSkpLCBbXCJzcGFjZVwiXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVkOiBfY3R4LiRhdHRycy5kaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgb25Nb3VzZWxlYXZlOiBfY2FjaGVbMzRdIHx8IChfY2FjaGVbMzRdID0gJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VMZWF2ZSgpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG9uS2V5dXA6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbMzddIHx8IChfY2FjaGVbMzddID0gd2l0aEtleXMoJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VVcCgkZXZlbnQpKSwgW1wiZW50ZXJcIl0pKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbMzhdIHx8IChfY2FjaGVbMzhdID0gd2l0aEtleXMoJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VVcCgkZXZlbnQpKSwgW1wic3BhY2VcIl0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImJ1dHRvblwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF9ob2lzdGVkXzIyXG4gICAgICAgICAgICAgICAgICAgICAgICBdLCA0MCwgW1wiZGlzYWJsZWRcIl0pLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgIFtfZGlyZWN0aXZlX3JpcHBsZV1cbiAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgKCRwcm9wcy5zaG93U2Vjb25kcylcbiAgICAgICAgICAgICAgICAgICAgICAgID8gKG9wZW5CbG9jaygpLCBjcmVhdGVCbG9jayhcImRpdlwiLCBfaG9pc3RlZF8yMywgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVZOb2RlKFwic3BhblwiLCBudWxsLCB0b0Rpc3BsYXlTdHJpbmcoJHByb3BzLnRpbWVTZXBhcmF0b3IpLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIDogY3JlYXRlQ29tbWVudFZOb2RlKFwiXCIsIHRydWUpLFxuICAgICAgICAgICAgICAgICAgICAgICgkcHJvcHMuc2hvd1NlY29uZHMpXG4gICAgICAgICAgICAgICAgICAgICAgICA/IChvcGVuQmxvY2soKSwgY3JlYXRlQmxvY2soXCJkaXZcIiwgX2hvaXN0ZWRfMjQsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoRGlyZWN0aXZlcyhjcmVhdGVWTm9kZShcImJ1dHRvblwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJwLWxpbmtcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uTW91c2Vkb3duOiBfY2FjaGVbMzldIHx8IChfY2FjaGVbMzldID0gJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VEb3duKCRldmVudCwgMiwgMSkpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uTW91c2V1cDogX2NhY2hlWzQwXSB8fCAoX2NhY2hlWzQwXSA9ICRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlVXAoJGV2ZW50KSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25LZXlkb3duOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jYWNoZVs0MV0gfHwgKF9jYWNoZVs0MV0gPSAoLi4uYXJncykgPT4gKCRvcHRpb25zLm9uQ29udGFpbmVyQnV0dG9uS2V5ZG93biAmJiAkb3B0aW9ucy5vbkNvbnRhaW5lckJ1dHRvbktleWRvd24oLi4uYXJncykpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzQzXSB8fCAoX2NhY2hlWzQzXSA9IHdpdGhLZXlzKCRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlRG93bigkZXZlbnQsIDIsIDEpKSwgW1wiZW50ZXJcIl0pKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzQ0XSB8fCAoX2NhY2hlWzQ0XSA9IHdpdGhLZXlzKCRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlRG93bigkZXZlbnQsIDIsIDEpKSwgW1wic3BhY2VcIl0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVkOiBfY3R4LiRhdHRycy5kaXNhYmxlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uTW91c2VsZWF2ZTogX2NhY2hlWzQyXSB8fCAoX2NhY2hlWzQyXSA9ICRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlTGVhdmUoKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25LZXl1cDogW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbNDVdIHx8IChfY2FjaGVbNDVdID0gd2l0aEtleXMoJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VVcCgkZXZlbnQpKSwgW1wiZW50ZXJcIl0pKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzQ2XSB8fCAoX2NhY2hlWzQ2XSA9IHdpdGhLZXlzKCRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlVXAoJGV2ZW50KSksIFtcInNwYWNlXCJdKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImJ1dHRvblwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2hvaXN0ZWRfMjVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLCA0MCwgW1wiZGlzYWJsZWRcIl0pLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbX2RpcmVjdGl2ZV9yaXBwbGVdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVk5vZGUoXCJzcGFuXCIsIG51bGwsIHRvRGlzcGxheVN0cmluZygkb3B0aW9ucy5mb3JtYXR0ZWRDdXJyZW50U2Vjb25kKSwgMSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aERpcmVjdGl2ZXMoY3JlYXRlVk5vZGUoXCJidXR0b25cIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwicC1saW5rXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbk1vdXNlZG93bjogX2NhY2hlWzQ3XSB8fCAoX2NhY2hlWzQ3XSA9ICRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlRG93bigkZXZlbnQsIDIsIC0xKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25Nb3VzZXVwOiBfY2FjaGVbNDhdIHx8IChfY2FjaGVbNDhdID0gJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VVcCgkZXZlbnQpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbktleWRvd246IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzQ5XSB8fCAoX2NhY2hlWzQ5XSA9ICguLi5hcmdzKSA9PiAoJG9wdGlvbnMub25Db250YWluZXJCdXR0b25LZXlkb3duICYmICRvcHRpb25zLm9uQ29udGFpbmVyQnV0dG9uS2V5ZG93biguLi5hcmdzKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfY2FjaGVbNTFdIHx8IChfY2FjaGVbNTFdID0gd2l0aEtleXMoJGV2ZW50ID0+ICgkb3B0aW9ucy5vblRpbWVQaWNrZXJFbGVtZW50TW91c2VEb3duKCRldmVudCwgMiwgLTEpKSwgW1wiZW50ZXJcIl0pKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzUyXSB8fCAoX2NhY2hlWzUyXSA9IHdpdGhLZXlzKCRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlRG93bigkZXZlbnQsIDIsIC0xKSksIFtcInNwYWNlXCJdKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNhYmxlZDogX2N0eC4kYXR0cnMuZGlzYWJsZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbk1vdXNlbGVhdmU6IF9jYWNoZVs1MF0gfHwgKF9jYWNoZVs1MF0gPSAkZXZlbnQgPT4gKCRvcHRpb25zLm9uVGltZVBpY2tlckVsZW1lbnRNb3VzZUxlYXZlKCkpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uS2V5dXA6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2NhY2hlWzUzXSB8fCAoX2NhY2hlWzUzXSA9IHdpdGhLZXlzKCRldmVudCA9PiAoJG9wdGlvbnMub25UaW1lUGlja2VyRWxlbWVudE1vdXNlVXAoJGV2ZW50KSksIFtcImVudGVyXCJdKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jYWNoZVs1NF0gfHwgKF9jYWNoZVs1NF0gPSB3aXRoS2V5cygkZXZlbnQgPT4gKCRvcHRpb25zLm9uVGltZVBpY2tlckVsZW1lbnRNb3VzZVVwKCRldmVudCkpLCBbXCJzcGFjZVwiXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJidXR0b25cIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9ob2lzdGVkXzI2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSwgNDAsIFtcImRpc2FibGVkXCJdKSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW19kaXJlY3RpdmVfcmlwcGxlXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBjcmVhdGVDb21tZW50Vk5vZGUoXCJcIiwgdHJ1ZSksXG4gICAgICAgICAgICAgICAgICAgICAgKCRwcm9wcy5ob3VyRm9ybWF0PT0nMTInKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyAob3BlbkJsb2NrKCksIGNyZWF0ZUJsb2NrKFwiZGl2XCIsIF9ob2lzdGVkXzI3LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVk5vZGUoXCJzcGFuXCIsIG51bGwsIHRvRGlzcGxheVN0cmluZygkcHJvcHMudGltZVNlcGFyYXRvciksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBjcmVhdGVDb21tZW50Vk5vZGUoXCJcIiwgdHJ1ZSksXG4gICAgICAgICAgICAgICAgICAgICAgKCRwcm9wcy5ob3VyRm9ybWF0PT0nMTInKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyAob3BlbkJsb2NrKCksIGNyZWF0ZUJsb2NrKFwiZGl2XCIsIF9ob2lzdGVkXzI4LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aERpcmVjdGl2ZXMoY3JlYXRlVk5vZGUoXCJidXR0b25cIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwicC1saW5rXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrOiBfY2FjaGVbNTVdIHx8IChfY2FjaGVbNTVdID0gJGV2ZW50ID0+ICgkb3B0aW9ucy50b2dnbGVBTVBNKCRldmVudCkpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFwiYnV0dG9uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNhYmxlZDogX2N0eC4kYXR0cnMuZGlzYWJsZWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfaG9pc3RlZF8yOVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sIDgsIFtcImRpc2FibGVkXCJdKSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW19kaXJlY3RpdmVfcmlwcGxlXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVZOb2RlKFwic3BhblwiLCBudWxsLCB0b0Rpc3BsYXlTdHJpbmcoJGRhdGEucG0gPyAnUE0nIDogJ0FNJyksIDEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhEaXJlY3RpdmVzKGNyZWF0ZVZOb2RlKFwiYnV0dG9uXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcInAtbGlua1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogX2NhY2hlWzU2XSB8fCAoX2NhY2hlWzU2XSA9ICRldmVudCA9PiAoJG9wdGlvbnMudG9nZ2xlQU1QTSgkZXZlbnQpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImJ1dHRvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ6IF9jdHguJGF0dHJzLmRpc2FibGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2hvaXN0ZWRfMzBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLCA4LCBbXCJkaXNhYmxlZFwiXSksIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtfZGlyZWN0aXZlX3JpcHBsZV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIDogY3JlYXRlQ29tbWVudFZOb2RlKFwiXCIsIHRydWUpXG4gICAgICAgICAgICAgICAgICAgIF0pKVxuICAgICAgICAgICAgICAgICAgOiBjcmVhdGVDb21tZW50Vk5vZGUoXCJcIiwgdHJ1ZSksXG4gICAgICAgICAgICAgICAgKCRwcm9wcy5zaG93QnV0dG9uQmFyKVxuICAgICAgICAgICAgICAgICAgPyAob3BlbkJsb2NrKCksIGNyZWF0ZUJsb2NrKFwiZGl2XCIsIF9ob2lzdGVkXzMxLCBbXG4gICAgICAgICAgICAgICAgICAgICAgY3JlYXRlVk5vZGUoX2NvbXBvbmVudF9DYWxlbmRhckJ1dHRvbiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJidXR0b25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiAkb3B0aW9ucy50b2RheUxhYmVsLFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljazogX2NhY2hlWzU3XSB8fCAoX2NhY2hlWzU3XSA9ICRldmVudCA9PiAoJG9wdGlvbnMub25Ub2RheUJ1dHRvbkNsaWNrKCRldmVudCkpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzOiBcInAtYnV0dG9uLXRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uS2V5ZG93bjogJG9wdGlvbnMub25Db250YWluZXJCdXR0b25LZXlkb3duXG4gICAgICAgICAgICAgICAgICAgICAgfSwgbnVsbCwgOCwgW1wibGFiZWxcIiwgXCJvbktleWRvd25cIl0pLFxuICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZVZOb2RlKF9jb21wb25lbnRfQ2FsZW5kYXJCdXR0b24sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFwiYnV0dG9uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogJG9wdGlvbnMuY2xlYXJMYWJlbCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6IF9jYWNoZVs1OF0gfHwgKF9jYWNoZVs1OF0gPSAkZXZlbnQgPT4gKCRvcHRpb25zLm9uQ2xlYXJCdXR0b25DbGljaygkZXZlbnQpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJwLWJ1dHRvbi10ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBvbktleWRvd246ICRvcHRpb25zLm9uQ29udGFpbmVyQnV0dG9uS2V5ZG93blxuICAgICAgICAgICAgICAgICAgICAgIH0sIG51bGwsIDgsIFtcImxhYmVsXCIsIFwib25LZXlkb3duXCJdKVxuICAgICAgICAgICAgICAgICAgICBdKSlcbiAgICAgICAgICAgICAgICAgIDogY3JlYXRlQ29tbWVudFZOb2RlKFwiXCIsIHRydWUpLFxuICAgICAgICAgICAgIC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OiAtbXMtZmxleGJveDtcXG4gICAgZGlzcGxheTogZmxleDtcXG4gICAgLXdlYmtpdC1ib3gtcGFjazogY2VudGVyO1xcbiAgICAgICAgLW1zLWZsZXgtcGFjazogY2VudGVyO1xcbiAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xcbiAgICAtd2Via2l0LWJveC1hbGlnbjogY2VudGVyO1xcbiAgICAgICAgLW1zLWZsZXgtYWxpZ246IGNlbnRlcjtcXG4gICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xcbn1cXG4ucC10aW1lcGlja2VyIGJ1dHRvbiB7XFxuICAgIGRpc3BsYXk6IC13ZWJraXQtYm94O1xcbiAgICBkaXNwbGF5OiAtbXMtZmxleGJveDtcXG4gICAgZGlzcGxheTogZmxleDtcXG4gICAgLXdlYmtpdC1ib3gtYWxpZ246IGNlbnRlcjtcXG4gICAgICAgIC1tcy1mbGV4LWFsaWduOiBjZW50ZXI7XFxuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcXG4gICAgLXdlYmtpdC1ib3gtcGFjazogY2VudGVyO1xcbiAgICAgICAgLW1zLWZsZXgtcGFjazogY2VudGVyO1xcbiAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xcbiAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgIG92ZXJmbG93OiBoaWRkZW47XFxuICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcXG59XFxuLnAtdGltZXBpY2tlciA+IGRpdiB7XFxuICAgIGRpc3BsYXk6IC13ZWJraXQtYm94O1xcbiAgICBkaXNwbGF5OiAtbXMtZmxleGJveDtcXG4gICAgZGlzcGxheTogZmxleDtcXG4gICAgLXdlYmtpdC1ib3gtYWxpZ246IGNlbnRlcjtcXG4gICAgICAgIC1tcy1mbGV4LWFsaWduOiBjZW50ZXI7XFxuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcXG4gICAgLXdlYmtpdC1ib3gtb3JpZW50OiB2ZXJ0aWNhbDtcXG4gICAgLXdlYmtpdC1ib3gtZGlyZWN0aW9uOiBub3JtYWw7XFxuICAgICAgICAtbXMtZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcXG4gICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xcbn1cXG5cXG4vKiBUb3VjaCBVSSAqL1xcbi5wLWRhdGVwaWNrZXItdG91Y2gtdWksXFxuLnAtY2FsZW5kYXIgLnAtZGF0ZXBpY2tlci10b3VjaC11aSB7XFxuICAgIHBvc2l0aW9uOiBmaXhlZDtcXG4gICAgdG9wOiA1MCU7XFxuICAgIGxlZnQ6IDUwJTtcXG4gICAgbWluLXdpZHRoOiA4MHZ3O1xcbiAgICAtd2Via2l0LXRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIC01MCUpO1xcbiAgICAgICAgICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIC01MCUpO1xcbn1cXG5cIjtcbnN0eWxlSW5qZWN0KGNzc18yNDh6KTtcblxuc2NyaXB0LnJlbmRlciA9IHJlbmRlcjtcblxuZXhwb3J0IGRlZmF1bHQgc2NyaXB0O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///8223\n')},4019:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Z\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var primevue_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6954);\n\n\nfunction bindEvents(el) {\n el.addEventListener('mousedown', onMouseDown);\n}\n\nfunction unbindEvents(el) {\n el.removeEventListener('mousedown', onMouseDown);\n}\n\nfunction create(el) {\n let ink = document.createElement('span');\n ink.className = 'p-ink';\n el.appendChild(ink);\n\n ink.addEventListener('animationend', onAnimationEnd);\n}\n\nfunction remove(el) {\n let ink = getInk(el);\n if (ink) {\n unbindEvents(el);\n ink.removeEventListener('animationend', onAnimationEnd);\n ink.remove();\n }\n}\n\nfunction onMouseDown(event) {\n let target = event.currentTarget;\n let ink = getInk(target);\n if (!ink || getComputedStyle(ink, null).display === 'none') {\n return;\n }\n\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.removeClass */ .p7.removeClass(ink, 'p-ink-active');\n if (!primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getHeight */ .p7.getHeight(ink) && !primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getWidth */ .p7.getWidth(ink)) {\n let d = Math.max(primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getOuterWidth */ .p7.getOuterWidth(target), primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getOuterHeight */ .p7.getOuterHeight(target));\n ink.style.height = d + 'px';\n ink.style.width = d + 'px';\n }\n\n let offset = primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getOffset */ .p7.getOffset(target);\n let x = event.pageX - offset.left + document.body.scrollTop - primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getWidth */ .p7.getWidth(ink) / 2;\n let y = event.pageY - offset.top + document.body.scrollLeft - primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.getHeight */ .p7.getHeight(ink) / 2;\n\n ink.style.top = y + 'px';\n ink.style.left = x + 'px';\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.addClass */ .p7.addClass(ink, 'p-ink-active');\n}\n\nfunction onAnimationEnd(event) {\n primevue_utils__WEBPACK_IMPORTED_MODULE_0__/* .DomHandler.removeClass */ .p7.removeClass(event.currentTarget, 'p-ink-active');\n}\n\nfunction getInk(el) {\n for (let i = 0; i < el.children.length; i++) {\n if (typeof el.children[i].className === 'string' && el.children[i].className.indexOf('p-ink') !== -1) {\n return el.children[i];\n }\n }\n return null;\n}\n\nconst Ripple = {\n mounted(el, binding) {\n if (binding.instance.$primevue && binding.instance.$primevue.config && binding.instance.$primevue.config.ripple) {\n create(el);\n bindEvents(el);\n }\n },\n unmounted(el) {\n remove(el);\n }\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Ripple);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAxOS5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQTRDOztBQUU1QztBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsSUFBSSx3RkFBc0I7QUFDMUIsU0FBUyxvRkFBb0IsVUFBVSxrRkFBbUI7QUFDMUQseUJBQXlCLDRGQUF3QixVQUFVLDhGQUF5QjtBQUNwRjtBQUNBO0FBQ0E7O0FBRUEsaUJBQWlCLG9GQUFvQjtBQUNyQyxrRUFBa0Usa0ZBQW1CO0FBQ3JGLGtFQUFrRSxvRkFBb0I7O0FBRXRGO0FBQ0E7QUFDQSxJQUFJLGtGQUFtQjtBQUN2Qjs7QUFFQTtBQUNBLElBQUksd0ZBQXNCO0FBQzFCOztBQUVBO0FBQ0Esb0JBQW9CLHdCQUF3QjtBQUM1QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7QUFDQTtBQUNBOztBQUVBLGlFQUFlLE1BQU0sRUFBQyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9wcmltZXZ1ZS9yaXBwbGUvcmlwcGxlLmVzb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