From 5c3a7f6b3b9880f75cd8420b40f63665d36d8580 Mon Sep 17 00:00:00 2001 From: Akash Date: Tue, 21 May 2024 11:44:24 +0600 Subject: [PATCH] updated instafeed gutenberg controls --- Gutenberg/dist/blocks.build.js | 2 +- Gutenberg/dist/blocks.style.build.css | 3 +- Gutenberg/src/embedpress-pdf/style.scss | 1 + .../embedpress/InspectorControl/instafeed.js | 67 ++++++++++--------- 4 files changed, 39 insertions(+), 34 deletions(-) diff --git a/Gutenberg/dist/blocks.build.js b/Gutenberg/dist/blocks.build.js index f590de3c..f61b8ebd 100644 --- a/Gutenberg/dist/blocks.build.js +++ b/Gutenberg/dist/blocks.build.js @@ -334,7 +334,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return init; });\n/* unused harmony export getInstafeedParams */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return useInstafeed; });\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = Instafeed;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_helper__ = __webpack_require__(/*! ../../common/helper */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_control_heading__ = __webpack_require__(/*! ../../common/control-heading */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__custombranding__ = __webpack_require__(/*! ./custombranding */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__functions__ = __webpack_require__(/*! ../functions */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_icons__ = __webpack_require__(/*! ./../../common/icons */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__wordpress_block_editor__ = __webpack_require__(/*! @wordpress/block-editor */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__wordpress_block_editor___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__wordpress_block_editor__);\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\n/**\n * WordPress dependencies\n */\n\n\n\n\n\n\n\nvar isShallowEqualObjects = wp.isShallowEqual.isShallowEqualObjects;\n\n\n\nvar _wp$element = wp.element,\n useState = _wp$element.useState,\n useEffect = _wp$element.useEffect;\nvar __ = wp.i18n.__;\nvar addFilter = wp.hooks.addFilter;\nvar _wp$components = wp.components,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n RangeControl = _wp$components.RangeControl,\n ToggleControl = _wp$components.ToggleControl,\n PanelBody = _wp$components.PanelBody,\n Button = _wp$components.Button,\n ColorPalette = _wp$components.ColorPalette,\n PanelRow = _wp$components.PanelRow;\n\n/**\n *\n * @param {object} attributes\n * @returns\n */\n\nvar isProPluginActive = embedpressObj.is_pro_plugin_active;\n\nvar init = function init() {\n addFilter('embedpress_block_rest_param', 'embedpress', getInstafeedParams, 10);\n};\n\nvar getInstafeedParams = function getInstafeedParams(params, attributes) {\n if (!attributes.url || !Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"i\" /* isInstagramFeed */])(attributes.url)) {\n return params;\n }\n // which attributes should be passed with rest api.\n var defaults = {\n width: '900',\n instafeedAccName: true,\n instafeedProfileImage: true,\n instafeedProfileImageUrl: '',\n instafeedFollowBtn: true,\n instafeedFollowBtnLabel: 'Follow',\n instafeedPostsCount: true,\n instafeedPostsCountText: '[count] posts',\n instafeedFollowersCount: true,\n instafeedFollowersCountText: '[count] followers',\n instaLayout: 'insta-grid',\n instafeedFeedType: 'user_account_type',\n instafeedAccountType: 'personal',\n instafeedColumns: '3',\n instafeedColumnsGap: '5',\n instafeedPostsPerPage: true,\n instafeedTab: true,\n instafeedCommentsCount: false,\n instafeedLikesCount: false,\n instafeedPopup: true,\n instafeedPopupFollowBtn: true,\n instafeedPopupFollowBtnLabel: 'Follow',\n instafeedLoadmore: true,\n instafeedLoadmoreLabel: 'Load More',\n slidesShow: '4',\n slidesScroll: '4',\n carouselAutoplay: false,\n autoplaySpeed: '3000',\n transitionSpeed: '1000',\n carouselLoop: true,\n carouselArrows: true,\n carouselSpacing: '0',\n carouselDots: false\n };\n\n return Object(__WEBPACK_IMPORTED_MODULE_3__functions__[\"a\" /* getParams */])(params, attributes, defaults);\n};\n//\nvar useInstafeed = function useInstafeed(attributes) {\n // which attribute should call embed();\n var defaults = {\n width: null,\n instaLayout: null,\n instafeedFeedType: null,\n instafeedAccountType: null,\n slidesShow: null,\n slidesScroll: null,\n carouselAutoplay: null,\n autoplaySpeed: null,\n transitionSpeed: null,\n carouselLoop: null,\n carouselArrows: null,\n carouselSpacing: null,\n instafeedProfileImage: null,\n instafeedProfileImageUrl: null,\n instafeedFollowBtn: null,\n instafeedFollowBtnLabel: null,\n instafeedPostsCount: null,\n instafeedPostsCountText: null,\n instafeedFollowersCount: null,\n instafeedFollowersCountText: null,\n instafeedAccName: null,\n instafeedColumns: null,\n instafeedColumnsGap: null,\n instafeedPostsPerPage: null,\n instafeedTab: null,\n instafeedCommentsCount: null,\n instafeedLikesCount: null,\n instafeedPopup: null,\n instafeedPopupFollowBtn: null,\n instafeedPopupFollowBtnLabel: null,\n instafeedLoadmore: null,\n instafeedLoadmoreLabel: null\n };\n\n var param = Object(__WEBPACK_IMPORTED_MODULE_3__functions__[\"a\" /* getParams */])({}, attributes, defaults);\n\n var _useState = useState(param),\n _useState2 = _slicedToArray(_useState, 2),\n atts = _useState2[0],\n setAtts = _useState2[1];\n\n useEffect(function () {\n var param = Object(__WEBPACK_IMPORTED_MODULE_3__functions__[\"a\" /* getParams */])(atts, attributes, defaults);\n if (!isShallowEqualObjects(atts || {}, param)) {\n setAtts(param);\n }\n }, [attributes]);\n\n return atts;\n};\n\nfunction Instafeed(_ref) {\n var attributes = _ref.attributes,\n setAttributes = _ref.setAttributes;\n var url = attributes.url,\n instaLayout = attributes.instaLayout,\n instafeedFeedType = attributes.instafeedFeedType,\n instafeedAccountType = attributes.instafeedAccountType,\n instafeedColumns = attributes.instafeedColumns,\n instafeedColumnsGap = attributes.instafeedColumnsGap,\n instafeedPostsPerPage = attributes.instafeedPostsPerPage,\n instafeedTab = attributes.instafeedTab,\n instafeedCommentsCount = attributes.instafeedCommentsCount,\n instafeedLikesCount = attributes.instafeedLikesCount,\n instafeedPopup = attributes.instafeedPopup,\n instafeedPopupFollowBtn = attributes.instafeedPopupFollowBtn,\n instafeedPopupFollowBtnLabel = attributes.instafeedPopupFollowBtnLabel,\n instafeedLoadmore = attributes.instafeedLoadmore,\n instafeedLoadmoreLabel = attributes.instafeedLoadmoreLabel,\n slidesShow = attributes.slidesShow,\n slidesScroll = attributes.slidesScroll,\n carouselAutoplay = attributes.carouselAutoplay,\n autoplaySpeed = attributes.autoplaySpeed,\n transitionSpeed = attributes.transitionSpeed,\n carouselLoop = attributes.carouselLoop,\n carouselArrows = attributes.carouselArrows,\n carouselSpacing = attributes.carouselSpacing,\n carouselDots = attributes.carouselDots,\n instafeedProfileImage = attributes.instafeedProfileImage,\n instafeedProfileImageUrl = attributes.instafeedProfileImageUrl,\n instafeedFollowBtn = attributes.instafeedFollowBtn,\n instafeedFollowBtnLabel = attributes.instafeedFollowBtnLabel,\n instafeedPostsCount = attributes.instafeedPostsCount,\n instafeedPostsCountText = attributes.instafeedPostsCountText,\n instafeedFollowersCount = attributes.instafeedFollowersCount,\n instafeedFollowersCountText = attributes.instafeedFollowersCountText,\n instafeedAccName = attributes.instafeedAccName;\n\n\n var _isInstagramFeed = Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"i\" /* isInstagramFeed */])(url);\n\n var onSelectImage = function onSelectImage(logo) {\n console.log(logo.sizes.full.url);\n setAttributes({ instafeedProfileImageUrl: logo.sizes.full.url });\n };\n var removeImage = function removeImage(e) {\n setAttributes({ instafeedProfileImageUrl: '' });\n };\n\n if (!document.querySelector('.pro__alert__wrap')) {\n document.querySelector('body').append(Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"k\" /* isPro */])('none'));\n Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"m\" /* removeAlert */])();\n }\n\n var columnOptions = [{ label: 'Auto', value: 'auto' }, { label: '2', value: '2' }, { label: '3', value: '3' }, { label: '4', value: '4' }, { label: '6', value: '6' }];\n\n if (instaLayout === 'insta-carousel') {\n setAttributes({ instafeedLoadmore: false });\n }\n\n return wp.element.createElement(\n 'div',\n null,\n _isInstagramFeed && wp.element.createElement(\n 'div',\n { className: 'ep__instafeed-options' },\n wp.element.createElement(\n PanelBody,\n { title: wp.element.createElement(\n 'div',\n { className: 'ep-pannel-icon' },\n __WEBPACK_IMPORTED_MODULE_4__common_icons__[\"c\" /* EPIcon */],\n ' ',\n __('Profile Settings', 'embedpress')\n ), initialOpen: false },\n wp.element.createElement(ToggleControl, {\n label: __('Profile Image', 'embedpress'),\n checked: instafeedProfileImage,\n onChange: function onChange(instafeedProfileImage) {\n return setAttributes({ instafeedProfileImage: instafeedProfileImage });\n }\n }),\n instafeedProfileImageUrl && wp.element.createElement(\n 'div',\n { className: 'ep__custom-logo', style: { position: 'relative' } },\n wp.element.createElement(\n 'button',\n { title: 'Remove Image', className: 'ep-remove__image', type: 'button', onClick: removeImage },\n wp.element.createElement('span', { 'class': 'dashicon dashicons dashicons-trash' })\n ),\n wp.element.createElement('img', {\n src: instafeedProfileImageUrl,\n alt: 'John'\n })\n ),\n wp.element.createElement(\n 'div',\n { className: isProPluginActive ? \"pro-control-active\" : \"pro-control\", onClick: function onClick(e) {\n Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"a\" /* addProAlert */])(e, isProPluginActive);\n } },\n instafeedProfileImage && wp.element.createElement(__WEBPACK_IMPORTED_MODULE_5__wordpress_block_editor__[\"MediaUpload\"], {\n onSelect: onSelectImage,\n allowedTypes: ['image'],\n value: instafeedProfileImageUrl,\n render: function render(_ref2) {\n var open = _ref2.open;\n return wp.element.createElement(\n Button,\n { className: 'ep-logo-upload-button instagram-profile-image-uploader', icon: !instafeedProfileImageUrl ? 'upload' : 'update', onClick: open },\n !instafeedProfileImageUrl ? 'Upload Image' : 'Change Image'\n );\n }\n }),\n !isProPluginActive && wp.element.createElement(\n 'span',\n { className: 'isPro' },\n __('pro', 'embedpress')\n )\n ),\n wp.element.createElement(ToggleControl, {\n label: __('Follow Button', 'embedpress'),\n checked: instafeedFollowBtn,\n onChange: function onChange(instafeedFollowBtn) {\n return setAttributes({ instafeedFollowBtn: instafeedFollowBtn });\n }\n }),\n instafeedFollowBtn && wp.element.createElement(TextControl, {\n label: __('Button Label', 'embedpress'),\n value: instafeedFollowBtnLabel,\n onChange: function onChange(instafeedFollowBtnLabel) {\n return setAttributes({ instafeedFollowBtnLabel: instafeedFollowBtnLabel });\n }\n }),\n wp.element.createElement(ToggleControl, {\n label: __('Posts Count', 'embedpress'),\n checked: instafeedPostsCount,\n onChange: function onChange(instafeedPostsCount) {\n return setAttributes({ instafeedPostsCount: instafeedPostsCount });\n }\n }),\n instafeedPostsCount && wp.element.createElement(TextControl, {\n label: __('Count Text', 'embedpress'),\n value: instafeedPostsCountText,\n onChange: function onChange(instafeedPostsCountText) {\n return setAttributes({ instafeedPostsCountText: instafeedPostsCountText });\n }\n }),\n instafeedAccountType === 'business' && wp.element.createElement(ToggleControl, {\n label: __('Followers Count', 'embedpress'),\n checked: instafeedFollowersCount,\n onChange: function onChange(instafeedFollowersCount) {\n return setAttributes({ instafeedFollowersCount: instafeedFollowersCount });\n }\n }),\n instafeedFollowersCount && instafeedAccountType === 'business' && wp.element.createElement(TextControl, {\n label: __('Count Text', 'embedpress'),\n value: instafeedFollowersCountText,\n onChange: function onChange(instafeedFollowersCountText) {\n return setAttributes({ instafeedFollowersCountText: instafeedFollowersCountText });\n }\n }),\n instafeedAccountType === 'business' && wp.element.createElement(ToggleControl, {\n label: __('Account Name', 'embedpress'),\n checked: instafeedAccName,\n onChange: function onChange(instafeedAccName) {\n return setAttributes({ instafeedAccName: instafeedAccName });\n }\n })\n ),\n wp.element.createElement(\n PanelBody,\n { title: wp.element.createElement(\n 'div',\n { className: 'ep-pannel-icon' },\n __WEBPACK_IMPORTED_MODULE_4__common_icons__[\"c\" /* EPIcon */],\n ' ',\n __('Feed Settings', 'embedpress')\n ), initialOpen: false },\n _isInstagramFeed && wp.element.createElement(\n 'div',\n { className: 'instafeed-controls' },\n wp.element.createElement(SelectControl, {\n label: __(\"Layout\"),\n value: instaLayout,\n options: [{ label: 'Grid', value: 'insta-grid' }, { label: 'Masonry', value: 'insta-masonry' }, { label: 'Carousel', value: 'insta-carousel' }],\n onChange: function onChange(instaLayout) {\n return setAttributes({ instaLayout: instaLayout });\n },\n __nextHasNoMarginBottom: true\n }),\n instaLayout === 'insta-carousel' && wp.element.createElement(\n PanelRow,\n { className: 'elementor-panel-alert elementor-panel-warning-info margin-bottom-10' },\n 'Changes will apply in frontend.'\n ),\n (instaLayout === 'insta-grid' || instaLayout === 'insta-masonry') && wp.element.createElement(\n 'div',\n null,\n wp.element.createElement(SelectControl, {\n label: __('Columns', 'embedpress'),\n value: instafeedColumns,\n options: columnOptions,\n onChange: function onChange(instafeedColumns) {\n return setAttributes({ instafeedColumns: instafeedColumns });\n }\n }),\n wp.element.createElement(TextControl, {\n label: __('Column Gap', 'embedpress'),\n value: instafeedColumnsGap,\n onChange: function onChange(instafeedColumnsGap) {\n return setAttributes({ instafeedColumnsGap: instafeedColumnsGap });\n }\n })\n ),\n console.log({ instafeedColumns: instafeedColumns }),\n instaLayout === 'insta-carousel' && wp.element.createElement(\n 'div',\n null,\n wp.element.createElement(SelectControl, {\n label: __(\"Slides to Show\", \"embedpress\"),\n value: slidesShow,\n options: [{ label: '1', value: '1' }, { label: '2', value: '2' }, { label: '3', value: '3' }, { label: '4', value: '4' }, { label: '5', value: '5' }, { label: '6', value: '6' }, { label: '7', value: '7' }, { label: '8', value: '8' }, { label: '9', value: '9' }, { label: '10', value: '10' }],\n onChange: function onChange(slidesShow) {\n return setAttributes({ slidesShow: slidesShow });\n },\n __nextHasNoMarginBottom: true\n }),\n wp.element.createElement(ToggleControl, {\n label: __(\"Autoplay\", \"embedpress\"),\n checked: carouselAutoplay,\n onChange: function onChange(carouselAutoplay) {\n return setAttributes({ carouselAutoplay: carouselAutoplay });\n }\n }),\n wp.element.createElement(TextControl, {\n label: __(\"Autoplay Speed(ms)\", \"embedpress\"),\n value: autoplaySpeed,\n onChange: function onChange(autoplaySpeed) {\n return setAttributes({ autoplaySpeed: autoplaySpeed });\n }\n }),\n wp.element.createElement(TextControl, {\n label: __(\"Transition Speed(ms)\", \"embedpress\"),\n value: transitionSpeed,\n onChange: function onChange(transitionSpeed) {\n return setAttributes({ transitionSpeed: transitionSpeed });\n }\n }),\n wp.element.createElement(ToggleControl, {\n label: __(\"Loop\", \"embedpress\"),\n checked: carouselLoop,\n onChange: function onChange(carouselLoop) {\n return setAttributes({ carouselLoop: carouselLoop });\n }\n }),\n wp.element.createElement(TextControl, {\n label: __(\"Space\", \"embedpress\"),\n value: carouselSpacing,\n onChange: function onChange(carouselSpacing) {\n return setAttributes({ carouselSpacing: carouselSpacing });\n }\n }),\n wp.element.createElement(ToggleControl, {\n label: __(\"Arrows\", \"embedpress\"),\n checked: carouselArrows,\n onChange: function onChange(carouselArrows) {\n return setAttributes({ carouselArrows: carouselArrows });\n }\n })\n ),\n wp.element.createElement(TextControl, {\n label: __('Posts Per Page', 'embedpress'),\n value: instafeedPostsPerPage,\n onChange: function onChange(instafeedPostsPerPage) {\n return setAttributes({ instafeedPostsPerPage: instafeedPostsPerPage });\n }\n }),\n wp.element.createElement(\n 'div',\n { className: isProPluginActive ? \"pro-control-active\" : \"pro-control\", onClick: function onClick(e) {\n Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"a\" /* addProAlert */])(e, isProPluginActive);\n } },\n wp.element.createElement(ToggleControl, {\n label: __('Feed Tab', 'embedpress'),\n checked: instafeedTab,\n onChange: function onChange(instafeedTab) {\n return setAttributes({ instafeedTab: instafeedTab });\n }\n }),\n !isProPluginActive && wp.element.createElement(\n 'span',\n { className: 'isPro' },\n __('pro', 'embedpress')\n )\n ),\n wp.element.createElement(\n 'div',\n { className: isProPluginActive ? \"pro-control-active\" : \"pro-control\", onClick: function onClick(e) {\n Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"a\" /* addProAlert */])(e, isProPluginActive);\n } },\n (instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && wp.element.createElement(ToggleControl, {\n label: __('Likes Count', 'embedpress'),\n checked: instafeedLikesCount,\n onChange: function onChange(instafeedLikesCount) {\n return setAttributes({ instafeedLikesCount: instafeedLikesCount });\n }\n }),\n !isProPluginActive && wp.element.createElement(\n 'span',\n { className: 'isPro' },\n __('pro', 'embedpress')\n )\n ),\n wp.element.createElement(\n 'div',\n { className: isProPluginActive ? \"pro-control-active\" : \"pro-control\", onClick: function onClick(e) {\n Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"a\" /* addProAlert */])(e, isProPluginActive);\n } },\n (instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && wp.element.createElement(ToggleControl, {\n label: __('Comments Count', 'embedpress'),\n checked: instafeedCommentsCount,\n onChange: function onChange(instafeedCommentsCount) {\n return setAttributes({ instafeedCommentsCount: instafeedCommentsCount });\n }\n }),\n !isProPluginActive && wp.element.createElement(\n 'span',\n { className: 'isPro' },\n __('pro', 'embedpress')\n )\n ),\n wp.element.createElement(ToggleControl, {\n label: __('Popup', 'embedpress'),\n checked: instafeedPopup,\n onChange: function onChange(instafeedPopup) {\n return setAttributes({ instafeedPopup: instafeedPopup });\n }\n }),\n instafeedPopup && wp.element.createElement(\n 'div',\n null,\n wp.element.createElement(ToggleControl, {\n label: __('Popup Follow Button', 'embedpress'),\n checked: instafeedPopupFollowBtn,\n onChange: function onChange(instafeedPopupFollowBtn) {\n return setAttributes({ instafeedPopupFollowBtn: instafeedPopupFollowBtn });\n }\n }),\n instafeedPopupFollowBtn && wp.element.createElement(TextControl, {\n label: __('Follow Button Label', 'embedpress'),\n value: instafeedPopupFollowBtnLabel,\n onChange: function onChange(instafeedPopupFollowBtnLabel) {\n return setAttributes({ instafeedPopupFollowBtnLabel: instafeedPopupFollowBtnLabel });\n }\n })\n ),\n (instaLayout === 'insta-grid' || instaLayout === 'insta-masonry') && wp.element.createElement(ToggleControl, {\n label: __('Load More', 'embedpress'),\n checked: instafeedLoadmore,\n onChange: function onChange(instafeedLoadmore) {\n return setAttributes({ instafeedLoadmore: instafeedLoadmore });\n }\n }),\n instafeedLoadmore && wp.element.createElement(TextControl, {\n label: __('Load More Button Label', 'embedpress'),\n value: instafeedLoadmoreLabel,\n onChange: function onChange(instafeedLoadmoreLabel) {\n return setAttributes({ instafeedLoadmoreLabel: instafeedLoadmoreLabel });\n }\n })\n )\n ),\n wp.element.createElement(__WEBPACK_IMPORTED_MODULE_2__custombranding__[\"a\" /* default */], { attributes: attributes, setAttributes: setAttributes })\n )\n );\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvZW1iZWRwcmVzcy9JbnNwZWN0b3JDb250cm9sL2luc3RhZmVlZC5qcz9kNGNkIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBfc2xpY2VkVG9BcnJheSA9IGZ1bmN0aW9uICgpIHsgZnVuY3Rpb24gc2xpY2VJdGVyYXRvcihhcnI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GVFbGVtZW50KFxuICAgICAgICAgICAgJ2RpdicsXG4gICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2VwX19pbnN0YWZlZWQtb3B0aW9ucycgfSxcbiAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICBQYW5lbEJvZHksXG4gICAgICAgICAgICAgICAgeyB0aXRsZTogd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2RpdicsXG4gICAgICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2VwLXBhbm5lbC1pY29uJyB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgRVBJY29uLFxuICAgICAgICAgICAgICAgICAgICAgICAgJyAnLFxuICAgICAgICAgICAgICAgICAgICAgICAgX18oJ1Byb2ZpbGUgU2V0dGluZ3MnLCAnZW1iZWRwcmVzcycpXG4gICAgICAgICAgICAgICAgICAgICksIGluaXRpYWxPcGVuOiBmYWxzZSB9LFxuICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUb2dnbGVDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXygnUHJvZmlsZSBJbWFnZScsICdlbWJlZHByZXNzJyksXG4gICAgICAgICAgICAgICAgICAgIGNoZWNrZWQ6IGluc3RhZmVlZFByb2ZpbGVJbWFnZSxcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKGluc3RhZmVlZFByb2ZpbGVJbWFnZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRQcm9maWxlSW1hZ2U6IGluc3RhZmVlZFByb2ZpbGVJbWFnZSB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIGluc3RhZmVlZFByb2ZpbGVJbWFnZVVybCAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICdkaXYnLFxuICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2VwX19jdXN0b20tbG9nbycsIHN0eWxlOiB7IHBvc2l0aW9uOiAncmVsYXRpdmUnIH0gfSxcbiAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2J1dHRvbicsXG4gICAgICAgICAgICAgICAgICAgICAgICB7IHRpdGxlOiAnUmVtb3ZlIEltYWdlJywgY2xhc3NOYW1lOiAnZXAtcmVtb3ZlX19pbWFnZScsIHR5cGU6ICdidXR0b24nLCBvbkNsaWNrOiByZW1vdmVJbWFnZSB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KCdzcGFuJywgeyAnY2xhc3MnOiAnZGFzaGljb24gZGFzaGljb25zIGRhc2hpY29ucy10cmFzaCcgfSlcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KCdpbWcnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzcmM6IGluc3RhZmVlZFByb2ZpbGVJbWFnZVVybCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFsdDogJ0pvaG4nXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICdkaXYnLFxuICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogaXNQcm9QbHVnaW5BY3RpdmUgPyBcInByby1jb250cm9sLWFjdGl2ZVwiIDogXCJwcm8tY29udHJvbFwiLCBvbkNsaWNrOiBmdW5jdGlvbiBvbkNsaWNrKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRQcm9BbGVydChlLCBpc1Byb1BsdWdpbkFjdGl2ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IH0sXG4gICAgICAgICAgICAgICAgICAgIGluc3RhZmVlZFByb2ZpbGVJbWFnZSAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoTWVkaWFVcGxvYWQsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uU2VsZWN0OiBvblNlbGVjdEltYWdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWxsb3dlZFR5cGVzOiBbJ2ltYWdlJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogaW5zdGFmZWVkUHJvZmlsZUltYWdlVXJsLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVuZGVyOiBmdW5jdGlvbiByZW5kZXIoX3JlZjIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgb3BlbiA9IF9yZWYyLm9wZW47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnV0dG9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2VwLWxvZ28tdXBsb2FkLWJ1dHRvbiBpbnN0YWdyYW0tcHJvZmlsZS1pbWFnZS11cGxvYWRlcicsIGljb246ICFpbnN0YWZlZWRQcm9maWxlSW1hZ2VVcmwgPyAndXBsb2FkJyA6ICd1cGRhdGUnLCBvbkNsaWNrOiBvcGVuIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICFpbnN0YWZlZWRQcm9maWxlSW1hZ2VVcmwgPyAnVXBsb2FkIEltYWdlJyA6ICdDaGFuZ2UgSW1hZ2UnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICFpc1Byb1BsdWdpbkFjdGl2ZSAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAnc3BhbicsXG4gICAgICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2lzUHJvJyB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgX18oJ3BybycsICdlbWJlZHByZXNzJylcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdGb2xsb3cgQnV0dG9uJywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogaW5zdGFmZWVkRm9sbG93QnRuLFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkRm9sbG93QnRuKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZEZvbGxvd0J0bjogaW5zdGFmZWVkRm9sbG93QnRuIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgaW5zdGFmZWVkRm9sbG93QnRuICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUZXh0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ0J1dHRvbiBMYWJlbCcsICdlbWJlZHByZXNzJyksXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBpbnN0YWZlZWRGb2xsb3dCdG5MYWJlbCxcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKGluc3RhZmVlZEZvbGxvd0J0bkxhYmVsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZEZvbGxvd0J0bkxhYmVsOiBpbnN0YWZlZWRGb2xsb3dCdG5MYWJlbCB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUb2dnbGVDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXygnUG9zdHMgQ291bnQnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBpbnN0YWZlZWRQb3N0c0NvdW50LFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkUG9zdHNDb3VudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRQb3N0c0NvdW50OiBpbnN0YWZlZWRQb3N0c0NvdW50IH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgaW5zdGFmZWVkUG9zdHNDb3VudCAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVGV4dENvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdDb3VudCBUZXh0JywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGluc3RhZmVlZFBvc3RzQ291bnRUZXh0LFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkUG9zdHNDb3VudFRleHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXRBdHRyaWJ1dGVzKHsgaW5zdGFmZWVkUG9zdHNDb3VudFRleHQ6IGluc3RhZmVlZFBvc3RzQ291bnRUZXh0IH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgaW5zdGFmZWVkQWNjb3VudFR5cGUgPT09ICdidXNpbmVzcycgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdGb2xsb3dlcnMgQ291bnQnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBpbnN0YWZlZWRGb2xsb3dlcnNDb3VudCxcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKGluc3RhZmVlZEZvbGxvd2Vyc0NvdW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZEZvbGxvd2Vyc0NvdW50OiBpbnN0YWZlZWRGb2xsb3dlcnNDb3VudCB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIGluc3RhZmVlZEZvbGxvd2Vyc0NvdW50ICYmIGluc3RhZmVlZEFjY291bnRUeXBlID09PSAnYnVzaW5lc3MnICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUZXh0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ0NvdW50IFRleHQnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogaW5zdGFmZWVkRm9sbG93ZXJzQ291bnRUZXh0LFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkRm9sbG93ZXJzQ291bnRUZXh0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZEZvbGxvd2Vyc0NvdW50VGV4dDogaW5zdGFmZWVkRm9sbG93ZXJzQ291bnRUZXh0IH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgaW5zdGFmZWVkQWNjb3VudFR5cGUgPT09ICdidXNpbmVzcycgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdBY2NvdW50IE5hbWUnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBpbnN0YWZlZWRBY2NOYW1lLFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkQWNjTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRBY2NOYW1lOiBpbnN0YWZlZWRBY2NOYW1lIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgUGFuZWxCb2R5LFxuICAgICAgICAgICAgICAgIHsgdGl0bGU6IHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICdkaXYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBjbGFzc05hbWU6ICdlcC1wYW5uZWwtaWNvbicgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIEVQSWNvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICcgJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9fKCdGZWVkIFNldHRpbmdzJywgJ2VtYmVkcHJlc3MnKVxuICAgICAgICAgICAgICAgICAgICApLCBpbml0aWFsT3BlbjogZmFsc2UgfSxcbiAgICAgICAgICAgICAgICBfaXNJbnN0YWdyYW1GZWVkICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgJ2RpdicsXG4gICAgICAgICAgICAgICAgICAgIHsgY2xhc3NOYW1lOiAnaW5zdGFmZWVkLWNvbnRyb2xzJyB9LFxuICAgICAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoU2VsZWN0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKFwiTGF5b3V0XCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGluc3RhTGF5b3V0LFxuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogW3sgbGFiZWw6ICdHcmlkJywgdmFsdWU6ICdpbnN0YS1ncmlkJyB9LCB7IGxhYmVsOiAnTWFzb25yeScsIHZhbHVlOiAnaW5zdGEtbWFzb25yeScgfSwgeyBsYWJlbDogJ0Nhcm91c2VsJywgdmFsdWU6ICdpbnN0YS1jYXJvdXNlbCcgfV0sXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFMYXlvdXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhTGF5b3V0OiBpbnN0YUxheW91dCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBfX25leHRIYXNOb01hcmdpbkJvdHRvbTogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFMYXlvdXQgPT09ICdpbnN0YS1jYXJvdXNlbCcgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgUGFuZWxSb3csXG4gICAgICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2VsZW1lbnRvci1wYW5lbC1hbGVydCBlbGVtZW50b3ItcGFuZWwtd2FybmluZy1pbmZvIG1hcmdpbi1ib3R0b20tMTAnIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAnQ2hhbmdlcyB3aWxsIGFwcGx5IGluIGZyb250ZW5kLidcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgKGluc3RhTGF5b3V0ID09PSAnaW5zdGEtZ3JpZCcgfHwgaW5zdGFMYXlvdXQgPT09ICdpbnN0YS1tYXNvbnJ5JykgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2RpdicsXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFNlbGVjdENvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ0NvbHVtbnMnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBpbnN0YWZlZWRDb2x1bW5zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IGNvbHVtbk9wdGlvbnMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKGluc3RhZmVlZENvbHVtbnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRDb2x1bW5zOiBpbnN0YWZlZWRDb2x1bW5zIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRleHRDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdDb2x1bW4gR2FwJywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogaW5zdGFmZWVkQ29sdW1uc0dhcCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkQ29sdW1uc0dhcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZENvbHVtbnNHYXA6IGluc3RhZmVlZENvbHVtbnNHYXAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coeyBpbnN0YWZlZWRDb2x1bW5zOiBpbnN0YWZlZWRDb2x1bW5zIH0pLFxuICAgICAgICAgICAgICAgICAgICBpbnN0YUxheW91dCA9PT0gJ2luc3RhLWNhcm91c2VsJyAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAnZGl2JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoU2VsZWN0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXyhcIlNsaWRlcyB0byBTaG93XCIsIFwiZW1iZWRwcmVzc1wiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogc2xpZGVzU2hvdyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiBbeyBsYWJlbDogJzEnLCB2YWx1ZTogJzEnIH0sIHsgbGFiZWw6ICcyJywgdmFsdWU6ICcyJyB9LCB7IGxhYmVsOiAnMycsIHZhbHVlOiAnMycgfSwgeyBsYWJlbDogJzQnLCB2YWx1ZTogJzQnIH0sIHsgbGFiZWw6ICc1JywgdmFsdWU6ICc1JyB9LCB7IGxhYmVsOiAnNicsIHZhbHVlOiAnNicgfSwgeyBsYWJlbDogJzcnLCB2YWx1ZTogJzcnIH0sIHsgbGFiZWw6ICc4JywgdmFsdWU6ICc4JyB9LCB7IGxhYmVsOiAnOScsIHZhbHVlOiAnOScgfSwgeyBsYWJlbDogJzEwJywgdmFsdWU6ICcxMCcgfV0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKHNsaWRlc1Nob3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBzbGlkZXNTaG93OiBzbGlkZXNTaG93IH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX19uZXh0SGFzTm9NYXJnaW5Cb3R0b206IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oXCJBdXRvcGxheVwiLCBcImVtYmVkcHJlc3NcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogY2Fyb3VzZWxBdXRvcGxheSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoY2Fyb3VzZWxBdXRvcGxheSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGNhcm91c2VsQXV0b3BsYXk6IGNhcm91c2VsQXV0b3BsYXkgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVGV4dENvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oXCJBdXRvcGxheSBTcGVlZChtcylcIiwgXCJlbWJlZHByZXNzXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBhdXRvcGxheVNwZWVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZShhdXRvcGxheVNwZWVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXRBdHRyaWJ1dGVzKHsgYXV0b3BsYXlTcGVlZDogYXV0b3BsYXlTcGVlZCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUZXh0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXyhcIlRyYW5zaXRpb24gU3BlZWQobXMpXCIsIFwiZW1iZWRwcmVzc1wiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdHJhbnNpdGlvblNwZWVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZSh0cmFuc2l0aW9uU3BlZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyB0cmFuc2l0aW9uU3BlZWQ6IHRyYW5zaXRpb25TcGVlZCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUb2dnbGVDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKFwiTG9vcFwiLCBcImVtYmVkcHJlc3NcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogY2Fyb3VzZWxMb29wLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZShjYXJvdXNlbExvb3ApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBjYXJvdXNlbExvb3A6IGNhcm91c2VsTG9vcCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUZXh0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXyhcIlNwYWNlXCIsIFwiZW1iZWRwcmVzc1wiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogY2Fyb3VzZWxTcGFjaW5nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZShjYXJvdXNlbFNwYWNpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBjYXJvdXNlbFNwYWNpbmc6IGNhcm91c2VsU3BhY2luZyB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUb2dnbGVDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKFwiQXJyb3dzXCIsIFwiZW1iZWRwcmVzc1wiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBjYXJvdXNlbEFycm93cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoY2Fyb3VzZWxBcnJvd3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBjYXJvdXNlbEFycm93czogY2Fyb3VzZWxBcnJvd3MgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRleHRDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ1Bvc3RzIFBlciBQYWdlJywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBpbnN0YWZlZWRQb3N0c1BlclBhZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkUG9zdHNQZXJQYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRQb3N0c1BlclBhZ2U6IGluc3RhZmVlZFBvc3RzUGVyUGFnZSB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICdkaXYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBjbGFzc05hbWU6IGlzUHJvUGx1Z2luQWN0aXZlID8gXCJwcm8tY29udHJvbC1hY3RpdmVcIiA6IFwicHJvLWNvbnRyb2xcIiwgb25DbGljazogZnVuY3Rpb24gb25DbGljayhlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZFByb0FsZXJ0KGUsIGlzUHJvUGx1Z2luQWN0aXZlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVG9nZ2xlQ29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXygnRmVlZCBUYWInLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrZWQ6IGluc3RhZmVlZFRhYixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkVGFiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXRBdHRyaWJ1dGVzKHsgaW5zdGFmZWVkVGFiOiBpbnN0YWZlZWRUYWIgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAhaXNQcm9QbHVnaW5BY3RpdmUgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzcGFuJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2lzUHJvJyB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fKCdwcm8nLCAnZW1iZWRwcmVzcycpXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICdkaXYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBjbGFzc05hbWU6IGlzUHJvUGx1Z2luQWN0aXZlID8gXCJwcm8tY29udHJvbC1hY3RpdmVcIiA6IFwicHJvLWNvbnRyb2xcIiwgb25DbGljazogZnVuY3Rpb24gb25DbGljayhlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZFByb0FsZXJ0KGUsIGlzUHJvUGx1Z2luQWN0aXZlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAoaW5zdGFmZWVkQWNjb3VudFR5cGUgPT09ICdidXNpbmVzcycgfHwgaW5zdGFmZWVkRmVlZFR5cGUgPT09ICdoYXNodGFnX3R5cGUnKSAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVG9nZ2xlQ29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXygnTGlrZXMgQ291bnQnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrZWQ6IGluc3RhZmVlZExpa2VzQ291bnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKGluc3RhZmVlZExpa2VzQ291bnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRMaWtlc0NvdW50OiBpbnN0YWZlZWRMaWtlc0NvdW50IH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgIWlzUHJvUGx1Z2luQWN0aXZlICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc3BhbicsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeyBjbGFzc05hbWU6ICdpc1BybycgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfXygncHJvJywgJ2VtYmVkcHJlc3MnKVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAnZGl2JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgY2xhc3NOYW1lOiBpc1Byb1BsdWdpbkFjdGl2ZSA/IFwicHJvLWNvbnRyb2wtYWN0aXZlXCIgOiBcInByby1jb250cm9sXCIsIG9uQ2xpY2s6IGZ1bmN0aW9uIG9uQ2xpY2soZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRQcm9BbGVydChlLCBpc1Byb1BsdWdpbkFjdGl2ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgKGluc3RhZmVlZEFjY291bnRUeXBlID09PSAnYnVzaW5lc3MnIHx8IGluc3RhZmVlZEZlZWRUeXBlID09PSAnaGFzaHRhZ190eXBlJykgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ0NvbW1lbnRzIENvdW50JywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBpbnN0YWZlZWRDb21tZW50c0NvdW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZShpbnN0YWZlZWRDb21tZW50c0NvdW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXRBdHRyaWJ1dGVzKHsgaW5zdGFmZWVkQ29tbWVudHNDb3VudDogaW5zdGFmZWVkQ29tbWVudHNDb3VudCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICFpc1Byb1BsdWdpbkFjdGl2ZSAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NwYW4nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgY2xhc3NOYW1lOiAnaXNQcm8nIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX18oJ3BybycsICdlbWJlZHByZXNzJylcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXygnUG9wdXAnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogaW5zdGFmZWVkUG9wdXAsXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkUG9wdXApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZFBvcHVwOiBpbnN0YWZlZWRQb3B1cCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIGluc3RhZmVlZFBvcHVwICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICdkaXYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUb2dnbGVDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdQb3B1cCBGb2xsb3cgQnV0dG9uJywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBpbnN0YWZlZWRQb3B1cEZvbGxvd0J0bixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkUG9wdXBGb2xsb3dCdG4pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRQb3B1cEZvbGxvd0J0bjogaW5zdGFmZWVkUG9wdXBGb2xsb3dCdG4gfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0YWZlZWRQb3B1cEZvbGxvd0J0biAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVGV4dENvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ0ZvbGxvdyBCdXR0b24gTGFiZWwnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBpbnN0YWZlZWRQb3B1cEZvbGxvd0J0bkxhYmVsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZShpbnN0YWZlZWRQb3B1cEZvbGxvd0J0bkxhYmVsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXRBdHRyaWJ1dGVzKHsgaW5zdGFmZWVkUG9wdXBGb2xsb3dCdG5MYWJlbDogaW5zdGFmZWVkUG9wdXBGb2xsb3dCdG5MYWJlbCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAoaW5zdGFMYXlvdXQgPT09ICdpbnN0YS1ncmlkJyB8fCBpbnN0YUxheW91dCA9PT0gJ2luc3RhLW1hc29ucnknKSAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVG9nZ2xlQ29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdMb2FkIE1vcmUnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogaW5zdGFmZWVkTG9hZG1vcmUsXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkTG9hZG1vcmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZExvYWRtb3JlOiBpbnN0YWZlZWRMb2FkbW9yZSB9KTtcbiAgICAgICAgICAgICA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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///22\n"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return init; });\n/* unused harmony export getInstafeedParams */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return useInstafeed; });\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = Instafeed;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_helper__ = __webpack_require__(/*! ../../common/helper */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_control_heading__ = __webpack_require__(/*! ../../common/control-heading */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__custombranding__ = __webpack_require__(/*! ./custombranding */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__functions__ = __webpack_require__(/*! ../functions */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_icons__ = __webpack_require__(/*! ./../../common/icons */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__wordpress_block_editor__ = __webpack_require__(/*! @wordpress/block-editor */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__wordpress_block_editor___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__wordpress_block_editor__);\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\n/**\n * WordPress dependencies\n */\n\n\n\n\n\n\n\nvar isShallowEqualObjects = wp.isShallowEqual.isShallowEqualObjects;\n\n\n\nvar _wp$element = wp.element,\n useState = _wp$element.useState,\n useEffect = _wp$element.useEffect;\nvar __ = wp.i18n.__;\nvar addFilter = wp.hooks.addFilter;\nvar _wp$components = wp.components,\n TextControl = _wp$components.TextControl,\n SelectControl = _wp$components.SelectControl,\n RangeControl = _wp$components.RangeControl,\n ToggleControl = _wp$components.ToggleControl,\n PanelBody = _wp$components.PanelBody,\n Button = _wp$components.Button,\n ColorPalette = _wp$components.ColorPalette,\n PanelRow = _wp$components.PanelRow;\n\n/**\n *\n * @param {object} attributes\n * @returns\n */\n\nvar isProPluginActive = embedpressObj.is_pro_plugin_active;\n\nvar init = function init() {\n addFilter('embedpress_block_rest_param', 'embedpress', getInstafeedParams, 10);\n};\n\nvar getInstafeedParams = function getInstafeedParams(params, attributes) {\n if (!attributes.url || !Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"i\" /* isInstagramFeed */])(attributes.url)) {\n return params;\n }\n // which attributes should be passed with rest api.\n var defaults = {\n width: '900',\n instafeedAccName: true,\n instafeedProfileImage: true,\n instafeedProfileImageUrl: '',\n instafeedFollowBtn: true,\n instafeedFollowBtnLabel: 'Follow',\n instafeedPostsCount: true,\n instafeedPostsCountText: '[count] posts',\n instafeedFollowersCount: true,\n instafeedFollowersCountText: '[count] followers',\n instaLayout: 'insta-grid',\n instafeedFeedType: 'user_account_type',\n instafeedAccountType: 'personal',\n instafeedColumns: '3',\n instafeedColumnsGap: '5',\n instafeedPostsPerPage: true,\n instafeedTab: true,\n instafeedCommentsCount: false,\n instafeedLikesCount: false,\n instafeedPopup: true,\n instafeedPopupFollowBtn: true,\n instafeedPopupFollowBtnLabel: 'Follow',\n instafeedLoadmore: true,\n instafeedLoadmoreLabel: 'Load More',\n slidesShow: '4',\n slidesScroll: '4',\n carouselAutoplay: false,\n autoplaySpeed: '3000',\n transitionSpeed: '1000',\n carouselLoop: true,\n carouselArrows: true,\n carouselSpacing: '0',\n carouselDots: false\n };\n\n return Object(__WEBPACK_IMPORTED_MODULE_3__functions__[\"a\" /* getParams */])(params, attributes, defaults);\n};\n//\nvar useInstafeed = function useInstafeed(attributes) {\n // which attribute should call embed();\n var defaults = {\n width: null,\n instaLayout: null,\n instafeedFeedType: null,\n instafeedAccountType: null,\n slidesShow: null,\n slidesScroll: null,\n carouselAutoplay: null,\n autoplaySpeed: null,\n transitionSpeed: null,\n carouselLoop: null,\n carouselArrows: null,\n carouselSpacing: null,\n instafeedProfileImage: null,\n instafeedProfileImageUrl: null,\n instafeedFollowBtn: null,\n instafeedFollowBtnLabel: null,\n instafeedPostsCount: null,\n instafeedPostsCountText: null,\n instafeedFollowersCount: null,\n instafeedFollowersCountText: null,\n instafeedAccName: null,\n instafeedColumns: null,\n instafeedColumnsGap: null,\n instafeedPostsPerPage: null,\n instafeedTab: null,\n instafeedCommentsCount: null,\n instafeedLikesCount: null,\n instafeedPopup: null,\n instafeedPopupFollowBtn: null,\n instafeedPopupFollowBtnLabel: null,\n instafeedLoadmore: null,\n instafeedLoadmoreLabel: null\n };\n\n var param = Object(__WEBPACK_IMPORTED_MODULE_3__functions__[\"a\" /* getParams */])({}, attributes, defaults);\n\n var _useState = useState(param),\n _useState2 = _slicedToArray(_useState, 2),\n atts = _useState2[0],\n setAtts = _useState2[1];\n\n useEffect(function () {\n var param = Object(__WEBPACK_IMPORTED_MODULE_3__functions__[\"a\" /* getParams */])(atts, attributes, defaults);\n if (!isShallowEqualObjects(atts || {}, param)) {\n setAtts(param);\n }\n }, [attributes]);\n\n return atts;\n};\n\nfunction Instafeed(_ref) {\n var attributes = _ref.attributes,\n setAttributes = _ref.setAttributes;\n var url = attributes.url,\n instaLayout = attributes.instaLayout,\n instafeedFeedType = attributes.instafeedFeedType,\n instafeedAccountType = attributes.instafeedAccountType,\n instafeedColumns = attributes.instafeedColumns,\n instafeedColumnsGap = attributes.instafeedColumnsGap,\n instafeedPostsPerPage = attributes.instafeedPostsPerPage,\n instafeedTab = attributes.instafeedTab,\n instafeedCommentsCount = attributes.instafeedCommentsCount,\n instafeedLikesCount = attributes.instafeedLikesCount,\n instafeedPopup = attributes.instafeedPopup,\n instafeedPopupFollowBtn = attributes.instafeedPopupFollowBtn,\n instafeedPopupFollowBtnLabel = attributes.instafeedPopupFollowBtnLabel,\n instafeedLoadmore = attributes.instafeedLoadmore,\n instafeedLoadmoreLabel = attributes.instafeedLoadmoreLabel,\n slidesShow = attributes.slidesShow,\n slidesScroll = attributes.slidesScroll,\n carouselAutoplay = attributes.carouselAutoplay,\n autoplaySpeed = attributes.autoplaySpeed,\n transitionSpeed = attributes.transitionSpeed,\n carouselLoop = attributes.carouselLoop,\n carouselArrows = attributes.carouselArrows,\n carouselSpacing = attributes.carouselSpacing,\n carouselDots = attributes.carouselDots,\n instafeedProfileImage = attributes.instafeedProfileImage,\n instafeedProfileImageUrl = attributes.instafeedProfileImageUrl,\n instafeedFollowBtn = attributes.instafeedFollowBtn,\n instafeedFollowBtnLabel = attributes.instafeedFollowBtnLabel,\n instafeedPostsCount = attributes.instafeedPostsCount,\n instafeedPostsCountText = attributes.instafeedPostsCountText,\n instafeedFollowersCount = attributes.instafeedFollowersCount,\n instafeedFollowersCountText = attributes.instafeedFollowersCountText,\n instafeedAccName = attributes.instafeedAccName;\n\n\n var _isInstagramFeed = Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"i\" /* isInstagramFeed */])(url);\n\n var onSelectImage = function onSelectImage(logo) {\n console.log(logo.sizes.full.url);\n setAttributes({ instafeedProfileImageUrl: logo.sizes.full.url });\n };\n var removeImage = function removeImage(e) {\n setAttributes({ instafeedProfileImageUrl: '' });\n };\n\n if (!document.querySelector('.pro__alert__wrap')) {\n document.querySelector('body').append(Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"k\" /* isPro */])('none'));\n Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"m\" /* removeAlert */])();\n }\n\n var columnOptions = [{ label: 'Auto', value: 'auto' }, { label: '2', value: '2' }, { label: '3', value: '3' }, { label: '4', value: '4' }, { label: '6', value: '6' }];\n\n if (instaLayout === 'insta-carousel') {\n setAttributes({ instafeedLoadmore: false });\n }\n\n return wp.element.createElement(\n 'div',\n null,\n _isInstagramFeed && wp.element.createElement(\n 'div',\n { className: 'ep__instafeed-options' },\n wp.element.createElement(\n PanelBody,\n { title: wp.element.createElement(\n 'div',\n { className: 'ep-pannel-icon' },\n __WEBPACK_IMPORTED_MODULE_4__common_icons__[\"c\" /* EPIcon */],\n ' ',\n __('Profile Settings', 'embedpress')\n ), initialOpen: false },\n wp.element.createElement(ToggleControl, {\n label: __('Profile Image', 'embedpress'),\n checked: instafeedProfileImage,\n onChange: function onChange(instafeedProfileImage) {\n return setAttributes({ instafeedProfileImage: instafeedProfileImage });\n }\n }),\n instafeedProfileImageUrl && wp.element.createElement(\n 'div',\n { className: 'ep__custom-logo', style: { position: 'relative' } },\n wp.element.createElement(\n 'button',\n { title: 'Remove Image', className: 'ep-remove__image', type: 'button', onClick: removeImage },\n wp.element.createElement('span', { 'class': 'dashicon dashicons dashicons-trash' })\n ),\n wp.element.createElement('img', {\n src: instafeedProfileImageUrl,\n alt: 'John'\n })\n ),\n instafeedProfileImage && wp.element.createElement(\n 'div',\n { className: isProPluginActive ? \"pro-control-active\" : \"pro-control\", onClick: function onClick(e) {\n Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"a\" /* addProAlert */])(e, isProPluginActive);\n } },\n wp.element.createElement(__WEBPACK_IMPORTED_MODULE_5__wordpress_block_editor__[\"MediaUpload\"], {\n onSelect: onSelectImage,\n allowedTypes: ['image'],\n value: instafeedProfileImageUrl,\n render: function render(_ref2) {\n var open = _ref2.open;\n return wp.element.createElement(\n Button,\n { className: 'ep-logo-upload-button instagram-profile-image-uploader', icon: !instafeedProfileImageUrl ? 'upload' : 'update', onClick: open },\n !instafeedProfileImageUrl ? 'Upload Image' : 'Change Image'\n );\n }\n }),\n !isProPluginActive && wp.element.createElement(\n 'span',\n { className: 'isPro' },\n __('pro', 'embedpress')\n )\n ),\n wp.element.createElement(ToggleControl, {\n label: __('Follow Button', 'embedpress'),\n checked: instafeedFollowBtn,\n onChange: function onChange(instafeedFollowBtn) {\n return setAttributes({ instafeedFollowBtn: instafeedFollowBtn });\n }\n }),\n instafeedFollowBtn && wp.element.createElement(TextControl, {\n label: __('Button Label', 'embedpress'),\n value: instafeedFollowBtnLabel,\n onChange: function onChange(instafeedFollowBtnLabel) {\n return setAttributes({ instafeedFollowBtnLabel: instafeedFollowBtnLabel });\n }\n }),\n wp.element.createElement(ToggleControl, {\n label: __('Posts Count', 'embedpress'),\n checked: instafeedPostsCount,\n onChange: function onChange(instafeedPostsCount) {\n return setAttributes({ instafeedPostsCount: instafeedPostsCount });\n }\n }),\n instafeedPostsCount && wp.element.createElement(TextControl, {\n label: __('Count Text', 'embedpress'),\n value: instafeedPostsCountText,\n onChange: function onChange(instafeedPostsCountText) {\n return setAttributes({ instafeedPostsCountText: instafeedPostsCountText });\n }\n }),\n instafeedAccountType === 'business' && wp.element.createElement(ToggleControl, {\n label: __('Followers Count', 'embedpress'),\n checked: instafeedFollowersCount,\n onChange: function onChange(instafeedFollowersCount) {\n return setAttributes({ instafeedFollowersCount: instafeedFollowersCount });\n }\n }),\n instafeedFollowersCount && instafeedAccountType === 'business' && wp.element.createElement(TextControl, {\n label: __('Count Text', 'embedpress'),\n value: instafeedFollowersCountText,\n onChange: function onChange(instafeedFollowersCountText) {\n return setAttributes({ instafeedFollowersCountText: instafeedFollowersCountText });\n }\n }),\n instafeedAccountType === 'business' && wp.element.createElement(ToggleControl, {\n label: __('Account Name', 'embedpress'),\n checked: instafeedAccName,\n onChange: function onChange(instafeedAccName) {\n return setAttributes({ instafeedAccName: instafeedAccName });\n }\n })\n ),\n wp.element.createElement(\n PanelBody,\n { title: wp.element.createElement(\n 'div',\n { className: 'ep-pannel-icon' },\n __WEBPACK_IMPORTED_MODULE_4__common_icons__[\"c\" /* EPIcon */],\n ' ',\n __('Feed Settings', 'embedpress')\n ), initialOpen: false },\n _isInstagramFeed && wp.element.createElement(\n 'div',\n { className: 'instafeed-controls' },\n wp.element.createElement(SelectControl, {\n label: __(\"Layout\"),\n value: instaLayout,\n options: [{ label: 'Grid', value: 'insta-grid' }, { label: 'Masonry', value: 'insta-masonry' }, { label: 'Carousel', value: 'insta-carousel' }],\n onChange: function onChange(instaLayout) {\n return setAttributes({ instaLayout: instaLayout });\n },\n __nextHasNoMarginBottom: true\n }),\n instaLayout === 'insta-carousel' && wp.element.createElement(\n PanelRow,\n { className: 'elementor-panel-alert elementor-panel-warning-info margin-bottom-10' },\n 'Changes will apply in frontend.'\n ),\n (instaLayout === 'insta-grid' || instaLayout === 'insta-masonry') && wp.element.createElement(\n 'div',\n null,\n wp.element.createElement(SelectControl, {\n label: __('Columns', 'embedpress'),\n value: instafeedColumns,\n options: columnOptions,\n onChange: function onChange(instafeedColumns) {\n return setAttributes({ instafeedColumns: instafeedColumns });\n }\n }),\n wp.element.createElement(TextControl, {\n label: __('Column Gap', 'embedpress'),\n value: instafeedColumnsGap,\n onChange: function onChange(instafeedColumnsGap) {\n return setAttributes({ instafeedColumnsGap: instafeedColumnsGap });\n }\n })\n ),\n console.log({ instafeedColumns: instafeedColumns }),\n instaLayout === 'insta-carousel' && wp.element.createElement(\n 'div',\n null,\n wp.element.createElement(SelectControl, {\n label: __(\"Slides to Show\", \"embedpress\"),\n value: slidesShow,\n options: [{ label: '1', value: '1' }, { label: '2', value: '2' }, { label: '3', value: '3' }, { label: '4', value: '4' }, { label: '5', value: '5' }, { label: '6', value: '6' }, { label: '7', value: '7' }, { label: '8', value: '8' }, { label: '9', value: '9' }, { label: '10', value: '10' }],\n onChange: function onChange(slidesShow) {\n return setAttributes({ slidesShow: slidesShow });\n },\n __nextHasNoMarginBottom: true\n }),\n wp.element.createElement(ToggleControl, {\n label: __(\"Autoplay\", \"embedpress\"),\n checked: carouselAutoplay,\n onChange: function onChange(carouselAutoplay) {\n return setAttributes({ carouselAutoplay: carouselAutoplay });\n }\n }),\n wp.element.createElement(TextControl, {\n label: __(\"Autoplay Speed(ms)\", \"embedpress\"),\n value: autoplaySpeed,\n onChange: function onChange(autoplaySpeed) {\n return setAttributes({ autoplaySpeed: autoplaySpeed });\n }\n }),\n wp.element.createElement(TextControl, {\n label: __(\"Transition Speed(ms)\", \"embedpress\"),\n value: transitionSpeed,\n onChange: function onChange(transitionSpeed) {\n return setAttributes({ transitionSpeed: transitionSpeed });\n }\n }),\n wp.element.createElement(ToggleControl, {\n label: __(\"Loop\", \"embedpress\"),\n checked: carouselLoop,\n onChange: function onChange(carouselLoop) {\n return setAttributes({ carouselLoop: carouselLoop });\n }\n }),\n wp.element.createElement(TextControl, {\n label: __(\"Space\", \"embedpress\"),\n value: carouselSpacing,\n onChange: function onChange(carouselSpacing) {\n return setAttributes({ carouselSpacing: carouselSpacing });\n }\n }),\n wp.element.createElement(ToggleControl, {\n label: __(\"Arrows\", \"embedpress\"),\n checked: carouselArrows,\n onChange: function onChange(carouselArrows) {\n return setAttributes({ carouselArrows: carouselArrows });\n }\n })\n ),\n wp.element.createElement(TextControl, {\n label: __('Posts Per Page', 'embedpress'),\n value: instafeedPostsPerPage,\n onChange: function onChange(instafeedPostsPerPage) {\n return setAttributes({ instafeedPostsPerPage: instafeedPostsPerPage });\n }\n }),\n wp.element.createElement(\n 'div',\n { className: isProPluginActive ? \"pro-control-active\" : \"pro-control\", onClick: function onClick(e) {\n Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"a\" /* addProAlert */])(e, isProPluginActive);\n } },\n wp.element.createElement(ToggleControl, {\n label: __('Feed Tab', 'embedpress'),\n checked: instafeedTab,\n onChange: function onChange(instafeedTab) {\n return setAttributes({ instafeedTab: instafeedTab });\n }\n }),\n !isProPluginActive && wp.element.createElement(\n 'span',\n { className: 'isPro' },\n __('pro', 'embedpress')\n )\n ),\n (instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && wp.element.createElement(\n 'div',\n { className: isProPluginActive ? \"pro-control-active\" : \"pro-control\", onClick: function onClick(e) {\n Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"a\" /* addProAlert */])(e, isProPluginActive);\n } },\n wp.element.createElement(ToggleControl, {\n label: __('Likes Count', 'embedpress'),\n checked: instafeedLikesCount,\n onChange: function onChange(instafeedLikesCount) {\n return setAttributes({ instafeedLikesCount: instafeedLikesCount });\n }\n }),\n !isProPluginActive && wp.element.createElement(\n 'span',\n { className: 'isPro' },\n __('pro', 'embedpress')\n )\n ),\n (instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && wp.element.createElement(\n 'div',\n { className: isProPluginActive ? \"pro-control-active\" : \"pro-control\", onClick: function onClick(e) {\n Object(__WEBPACK_IMPORTED_MODULE_0__common_helper__[\"a\" /* addProAlert */])(e, isProPluginActive);\n } },\n wp.element.createElement(ToggleControl, {\n label: __('Comments Count', 'embedpress'),\n checked: instafeedCommentsCount,\n onChange: function onChange(instafeedCommentsCount) {\n return setAttributes({ instafeedCommentsCount: instafeedCommentsCount });\n }\n }),\n !isProPluginActive && wp.element.createElement(\n 'span',\n { className: 'isPro' },\n __('pro', 'embedpress')\n )\n ),\n wp.element.createElement(ToggleControl, {\n label: __('Popup', 'embedpress'),\n checked: instafeedPopup,\n onChange: function onChange(instafeedPopup) {\n return setAttributes({ instafeedPopup: instafeedPopup });\n }\n }),\n instafeedPopup && wp.element.createElement(\n 'div',\n null,\n wp.element.createElement(ToggleControl, {\n label: __('Popup Follow Button', 'embedpress'),\n checked: instafeedPopupFollowBtn,\n onChange: function onChange(instafeedPopupFollowBtn) {\n return setAttributes({ instafeedPopupFollowBtn: instafeedPopupFollowBtn });\n }\n }),\n instafeedPopupFollowBtn && wp.element.createElement(TextControl, {\n label: __('Follow Button Label', 'embedpress'),\n value: instafeedPopupFollowBtnLabel,\n onChange: function onChange(instafeedPopupFollowBtnLabel) {\n return setAttributes({ instafeedPopupFollowBtnLabel: instafeedPopupFollowBtnLabel });\n }\n })\n ),\n (instaLayout === 'insta-grid' || instaLayout === 'insta-masonry') && wp.element.createElement(ToggleControl, {\n label: __('Load More', 'embedpress'),\n checked: instafeedLoadmore,\n onChange: function onChange(instafeedLoadmore) {\n return setAttributes({ instafeedLoadmore: instafeedLoadmore });\n }\n }),\n instafeedLoadmore && wp.element.createElement(TextControl, {\n label: __('Load More Button Label', 'embedpress'),\n value: instafeedLoadmoreLabel,\n onChange: function onChange(instafeedLoadmoreLabel) {\n return setAttributes({ instafeedLoadmoreLabel: instafeedLoadmoreLabel });\n }\n })\n )\n ),\n wp.element.createElement(__WEBPACK_IMPORTED_MODULE_2__custombranding__[\"a\" /* default */], { attributes: attributes, setAttributes: setAttributes })\n )\n );\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIuanMiLCJzb3VyY2VzIjpbInd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WZlZWRMb2FkbW9yZTogZmFsc2UgfSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgJ2RpdicsXG4gICAgICAgIG51bGwsXG4gICAgICAgIF9pc0luc3RhZ3JhbUZlZWQgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgJ2RpdicsXG4gICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2VwX19pbnN0YWZlZWQtb3B0aW9ucycgfSxcbiAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICBQYW5lbEJvZHksXG4gICAgICAgICAgICAgICAgeyB0aXRsZTogd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2RpdicsXG4gICAgICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2VwLXBhbm5lbC1pY29uJyB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgRVBJY29uLFxuICAgICAgICAgICAgICAgICAgICAgICAgJyAnLFxuICAgICAgICAgICAgICAgICAgICAgICAgX18oJ1Byb2ZpbGUgU2V0dGluZ3MnLCAnZW1iZWRwcmVzcycpXG4gICAgICAgICAgICAgICAgICAgICksIGluaXRpYWxPcGVuOiBmYWxzZSB9LFxuICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUb2dnbGVDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXygnUHJvZmlsZSBJbWFnZScsICdlbWJlZHByZXNzJyksXG4gICAgICAgICAgICAgICAgICAgIGNoZWNrZWQ6IGluc3RhZmVlZFByb2ZpbGVJbWFnZSxcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKGluc3RhZmVlZFByb2ZpbGVJbWFnZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRQcm9maWxlSW1hZ2U6IGluc3RhZmVlZFByb2ZpbGVJbWFnZSB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIGluc3RhZmVlZFByb2ZpbGVJbWFnZVVybCAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICdkaXYnLFxuICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2VwX19jdXN0b20tbG9nbycsIHN0eWxlOiB7IHBvc2l0aW9uOiAncmVsYXRpdmUnIH0gfSxcbiAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2J1dHRvbicsXG4gICAgICAgICAgICAgICAgICAgICAgICB7IHRpdGxlOiAnUmVtb3ZlIEltYWdlJywgY2xhc3NOYW1lOiAnZXAtcmVtb3ZlX19pbWFnZScsIHR5cGU6ICdidXR0b24nLCBvbkNsaWNrOiByZW1vdmVJbWFnZSB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KCdzcGFuJywgeyAnY2xhc3MnOiAnZGFzaGljb24gZGFzaGljb25zIGRhc2hpY29ucy10cmFzaCcgfSlcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KCdpbWcnLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzcmM6IGluc3RhZmVlZFByb2ZpbGVJbWFnZVVybCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFsdDogJ0pvaG4nXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICBpbnN0YWZlZWRQcm9maWxlSW1hZ2UgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAnZGl2JyxcbiAgICAgICAgICAgICAgICAgICAgeyBjbGFzc05hbWU6IGlzUHJvUGx1Z2luQWN0aXZlID8gXCJwcm8tY29udHJvbC1hY3RpdmVcIiA6IFwicHJvLWNvbnRyb2xcIiwgb25DbGljazogZnVuY3Rpb24gb25DbGljayhlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkUHJvQWxlcnQoZSwgaXNQcm9QbHVnaW5BY3RpdmUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LFxuICAgICAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoTWVkaWFVcGxvYWQsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uU2VsZWN0OiBvblNlbGVjdEltYWdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWxsb3dlZFR5cGVzOiBbJ2ltYWdlJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogaW5zdGFmZWVkUHJvZmlsZUltYWdlVXJsLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVuZGVyOiBmdW5jdGlvbiByZW5kZXIoX3JlZjIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgb3BlbiA9IF9yZWYyLm9wZW47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnV0dG9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2VwLWxvZ28tdXBsb2FkLWJ1dHRvbiBpbnN0YWdyYW0tcHJvZmlsZS1pbWFnZS11cGxvYWRlcicsIGljb246ICFpbnN0YWZlZWRQcm9maWxlSW1hZ2VVcmwgPyAndXBsb2FkJyA6ICd1cGRhdGUnLCBvbkNsaWNrOiBvcGVuIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICFpbnN0YWZlZWRQcm9maWxlSW1hZ2VVcmwgPyAnVXBsb2FkIEltYWdlJyA6ICdDaGFuZ2UgSW1hZ2UnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICFpc1Byb1BsdWdpbkFjdGl2ZSAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAnc3BhbicsXG4gICAgICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2lzUHJvJyB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgX18oJ3BybycsICdlbWJlZHByZXNzJylcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdGb2xsb3cgQnV0dG9uJywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogaW5zdGFmZWVkRm9sbG93QnRuLFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkRm9sbG93QnRuKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZEZvbGxvd0J0bjogaW5zdGFmZWVkRm9sbG93QnRuIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgaW5zdGFmZWVkRm9sbG93QnRuICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUZXh0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ0J1dHRvbiBMYWJlbCcsICdlbWJlZHByZXNzJyksXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBpbnN0YWZlZWRGb2xsb3dCdG5MYWJlbCxcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKGluc3RhZmVlZEZvbGxvd0J0bkxhYmVsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZEZvbGxvd0J0bkxhYmVsOiBpbnN0YWZlZWRGb2xsb3dCdG5MYWJlbCB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUb2dnbGVDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXygnUG9zdHMgQ291bnQnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBpbnN0YWZlZWRQb3N0c0NvdW50LFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkUG9zdHNDb3VudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRQb3N0c0NvdW50OiBpbnN0YWZlZWRQb3N0c0NvdW50IH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgaW5zdGFmZWVkUG9zdHNDb3VudCAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVGV4dENvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdDb3VudCBUZXh0JywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGluc3RhZmVlZFBvc3RzQ291bnRUZXh0LFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkUG9zdHNDb3VudFRleHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXRBdHRyaWJ1dGVzKHsgaW5zdGFmZWVkUG9zdHNDb3VudFRleHQ6IGluc3RhZmVlZFBvc3RzQ291bnRUZXh0IH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgaW5zdGFmZWVkQWNjb3VudFR5cGUgPT09ICdidXNpbmVzcycgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdGb2xsb3dlcnMgQ291bnQnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBpbnN0YWZlZWRGb2xsb3dlcnNDb3VudCxcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKGluc3RhZmVlZEZvbGxvd2Vyc0NvdW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZEZvbGxvd2Vyc0NvdW50OiBpbnN0YWZlZWRGb2xsb3dlcnNDb3VudCB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIGluc3RhZmVlZEZvbGxvd2Vyc0NvdW50ICYmIGluc3RhZmVlZEFjY291bnRUeXBlID09PSAnYnVzaW5lc3MnICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUZXh0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ0NvdW50IFRleHQnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogaW5zdGFmZWVkRm9sbG93ZXJzQ291bnRUZXh0LFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkRm9sbG93ZXJzQ291bnRUZXh0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZEZvbGxvd2Vyc0NvdW50VGV4dDogaW5zdGFmZWVkRm9sbG93ZXJzQ291bnRUZXh0IH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgaW5zdGFmZWVkQWNjb3VudFR5cGUgPT09ICdidXNpbmVzcycgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdBY2NvdW50IE5hbWUnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBpbnN0YWZlZWRBY2NOYW1lLFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkQWNjTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRBY2NOYW1lOiBpbnN0YWZlZWRBY2NOYW1lIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgUGFuZWxCb2R5LFxuICAgICAgICAgICAgICAgIHsgdGl0bGU6IHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICdkaXYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBjbGFzc05hbWU6ICdlcC1wYW5uZWwtaWNvbicgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIEVQSWNvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICcgJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9fKCdGZWVkIFNldHRpbmdzJywgJ2VtYmVkcHJlc3MnKVxuICAgICAgICAgICAgICAgICAgICApLCBpbml0aWFsT3BlbjogZmFsc2UgfSxcbiAgICAgICAgICAgICAgICBfaXNJbnN0YWdyYW1GZWVkICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgJ2RpdicsXG4gICAgICAgICAgICAgICAgICAgIHsgY2xhc3NOYW1lOiAnaW5zdGFmZWVkLWNvbnRyb2xzJyB9LFxuICAgICAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoU2VsZWN0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKFwiTGF5b3V0XCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGluc3RhTGF5b3V0LFxuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogW3sgbGFiZWw6ICdHcmlkJywgdmFsdWU6ICdpbnN0YS1ncmlkJyB9LCB7IGxhYmVsOiAnTWFzb25yeScsIHZhbHVlOiAnaW5zdGEtbWFzb25yeScgfSwgeyBsYWJlbDogJ0Nhcm91c2VsJywgdmFsdWU6ICdpbnN0YS1jYXJvdXNlbCcgfV0sXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFMYXlvdXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhTGF5b3V0OiBpbnN0YUxheW91dCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBfX25leHRIYXNOb01hcmdpbkJvdHRvbTogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFMYXlvdXQgPT09ICdpbnN0YS1jYXJvdXNlbCcgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgUGFuZWxSb3csXG4gICAgICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2VsZW1lbnRvci1wYW5lbC1hbGVydCBlbGVtZW50b3ItcGFuZWwtd2FybmluZy1pbmZvIG1hcmdpbi1ib3R0b20tMTAnIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAnQ2hhbmdlcyB3aWxsIGFwcGx5IGluIGZyb250ZW5kLidcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgKGluc3RhTGF5b3V0ID09PSAnaW5zdGEtZ3JpZCcgfHwgaW5zdGFMYXlvdXQgPT09ICdpbnN0YS1tYXNvbnJ5JykgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2RpdicsXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFNlbGVjdENvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ0NvbHVtbnMnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBpbnN0YWZlZWRDb2x1bW5zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IGNvbHVtbk9wdGlvbnMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKGluc3RhZmVlZENvbHVtbnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRDb2x1bW5zOiBpbnN0YWZlZWRDb2x1bW5zIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRleHRDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdDb2x1bW4gR2FwJywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogaW5zdGFmZWVkQ29sdW1uc0dhcCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkQ29sdW1uc0dhcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZENvbHVtbnNHYXA6IGluc3RhZmVlZENvbHVtbnNHYXAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coeyBpbnN0YWZlZWRDb2x1bW5zOiBpbnN0YWZlZWRDb2x1bW5zIH0pLFxuICAgICAgICAgICAgICAgICAgICBpbnN0YUxheW91dCA9PT0gJ2luc3RhLWNhcm91c2VsJyAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAnZGl2JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoU2VsZWN0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXyhcIlNsaWRlcyB0byBTaG93XCIsIFwiZW1iZWRwcmVzc1wiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogc2xpZGVzU2hvdyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiBbeyBsYWJlbDogJzEnLCB2YWx1ZTogJzEnIH0sIHsgbGFiZWw6ICcyJywgdmFsdWU6ICcyJyB9LCB7IGxhYmVsOiAnMycsIHZhbHVlOiAnMycgfSwgeyBsYWJlbDogJzQnLCB2YWx1ZTogJzQnIH0sIHsgbGFiZWw6ICc1JywgdmFsdWU6ICc1JyB9LCB7IGxhYmVsOiAnNicsIHZhbHVlOiAnNicgfSwgeyBsYWJlbDogJzcnLCB2YWx1ZTogJzcnIH0sIHsgbGFiZWw6ICc4JywgdmFsdWU6ICc4JyB9LCB7IGxhYmVsOiAnOScsIHZhbHVlOiAnOScgfSwgeyBsYWJlbDogJzEwJywgdmFsdWU6ICcxMCcgfV0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKHNsaWRlc1Nob3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBzbGlkZXNTaG93OiBzbGlkZXNTaG93IH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX19uZXh0SGFzTm9NYXJnaW5Cb3R0b206IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oXCJBdXRvcGxheVwiLCBcImVtYmVkcHJlc3NcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogY2Fyb3VzZWxBdXRvcGxheSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoY2Fyb3VzZWxBdXRvcGxheSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGNhcm91c2VsQXV0b3BsYXk6IGNhcm91c2VsQXV0b3BsYXkgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVGV4dENvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oXCJBdXRvcGxheSBTcGVlZChtcylcIiwgXCJlbWJlZHByZXNzXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBhdXRvcGxheVNwZWVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZShhdXRvcGxheVNwZWVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXRBdHRyaWJ1dGVzKHsgYXV0b3BsYXlTcGVlZDogYXV0b3BsYXlTcGVlZCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUZXh0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXyhcIlRyYW5zaXRpb24gU3BlZWQobXMpXCIsIFwiZW1iZWRwcmVzc1wiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdHJhbnNpdGlvblNwZWVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZSh0cmFuc2l0aW9uU3BlZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyB0cmFuc2l0aW9uU3BlZWQ6IHRyYW5zaXRpb25TcGVlZCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUb2dnbGVDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKFwiTG9vcFwiLCBcImVtYmVkcHJlc3NcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogY2Fyb3VzZWxMb29wLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZShjYXJvdXNlbExvb3ApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBjYXJvdXNlbExvb3A6IGNhcm91c2VsTG9vcCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUZXh0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXyhcIlNwYWNlXCIsIFwiZW1iZWRwcmVzc1wiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogY2Fyb3VzZWxTcGFjaW5nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZShjYXJvdXNlbFNwYWNpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBjYXJvdXNlbFNwYWNpbmc6IGNhcm91c2VsU3BhY2luZyB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUb2dnbGVDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKFwiQXJyb3dzXCIsIFwiZW1iZWRwcmVzc1wiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBjYXJvdXNlbEFycm93cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoY2Fyb3VzZWxBcnJvd3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBjYXJvdXNlbEFycm93czogY2Fyb3VzZWxBcnJvd3MgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRleHRDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ1Bvc3RzIFBlciBQYWdlJywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBpbnN0YWZlZWRQb3N0c1BlclBhZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkUG9zdHNQZXJQYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRQb3N0c1BlclBhZ2U6IGluc3RhZmVlZFBvc3RzUGVyUGFnZSB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICdkaXYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBjbGFzc05hbWU6IGlzUHJvUGx1Z2luQWN0aXZlID8gXCJwcm8tY29udHJvbC1hY3RpdmVcIiA6IFwicHJvLWNvbnRyb2xcIiwgb25DbGljazogZnVuY3Rpb24gb25DbGljayhlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZFByb0FsZXJ0KGUsIGlzUHJvUGx1Z2luQWN0aXZlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVG9nZ2xlQ29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXygnRmVlZCBUYWInLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrZWQ6IGluc3RhZmVlZFRhYixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkVGFiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXRBdHRyaWJ1dGVzKHsgaW5zdGFmZWVkVGFiOiBpbnN0YWZlZWRUYWIgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAhaXNQcm9QbHVnaW5BY3RpdmUgJiYgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzcGFuJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGNsYXNzTmFtZTogJ2lzUHJvJyB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fKCdwcm8nLCAnZW1iZWRwcmVzcycpXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgIChpbnN0YWZlZWRBY2NvdW50VHlwZSA9PT0gJ2J1c2luZXNzJyB8fCBpbnN0YWZlZWRGZWVkVHlwZSA9PT0gJ2hhc2h0YWdfdHlwZScpICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICdkaXYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBjbGFzc05hbWU6IGlzUHJvUGx1Z2luQWN0aXZlID8gXCJwcm8tY29udHJvbC1hY3RpdmVcIiA6IFwicHJvLWNvbnRyb2xcIiwgb25DbGljazogZnVuY3Rpb24gb25DbGljayhlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZFByb0FsZXJ0KGUsIGlzUHJvUGx1Z2luQWN0aXZlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVG9nZ2xlQ29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXygnTGlrZXMgQ291bnQnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrZWQ6IGluc3RhZmVlZExpa2VzQ291bnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKGluc3RhZmVlZExpa2VzQ291bnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRMaWtlc0NvdW50OiBpbnN0YWZlZWRMaWtlc0NvdW50IH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgIWlzUHJvUGx1Z2luQWN0aXZlICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc3BhbicsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeyBjbGFzc05hbWU6ICdpc1BybycgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfXygncHJvJywgJ2VtYmVkcHJlc3MnKVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAoaW5zdGFmZWVkQWNjb3VudFR5cGUgPT09ICdidXNpbmVzcycgfHwgaW5zdGFmZWVkRmVlZFR5cGUgPT09ICdoYXNodGFnX3R5cGUnKSAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAnZGl2JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgY2xhc3NOYW1lOiBpc1Byb1BsdWdpbkFjdGl2ZSA/IFwicHJvLWNvbnRyb2wtYWN0aXZlXCIgOiBcInByby1jb250cm9sXCIsIG9uQ2xpY2s6IGZ1bmN0aW9uIG9uQ2xpY2soZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRQcm9BbGVydChlLCBpc1Byb1BsdWdpbkFjdGl2ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ0NvbW1lbnRzIENvdW50JywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBpbnN0YWZlZWRDb21tZW50c0NvdW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZShpbnN0YWZlZWRDb21tZW50c0NvdW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXRBdHRyaWJ1dGVzKHsgaW5zdGFmZWVkQ29tbWVudHNDb3VudDogaW5zdGFmZWVkQ29tbWVudHNDb3VudCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICFpc1Byb1BsdWdpbkFjdGl2ZSAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NwYW4nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgY2xhc3NOYW1lOiAnaXNQcm8nIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX18oJ3BybycsICdlbWJlZHByZXNzJylcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgd3AuZWxlbWVudC5jcmVhdGVFbGVtZW50KFRvZ2dsZUNvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfXygnUG9wdXAnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogaW5zdGFmZWVkUG9wdXAsXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkUG9wdXApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZFBvcHVwOiBpbnN0YWZlZWRQb3B1cCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIGluc3RhZmVlZFBvcHVwICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgICAgICdkaXYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUb2dnbGVDb250cm9sLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdQb3B1cCBGb2xsb3cgQnV0dG9uJywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkOiBpbnN0YWZlZWRQb3B1cEZvbGxvd0J0bixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkUG9wdXBGb2xsb3dCdG4pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNldEF0dHJpYnV0ZXMoeyBpbnN0YWZlZWRQb3B1cEZvbGxvd0J0bjogaW5zdGFmZWVkUG9wdXBGb2xsb3dCdG4gfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0YWZlZWRQb3B1cEZvbGxvd0J0biAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVGV4dENvbnRyb2wsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogX18oJ0ZvbGxvdyBCdXR0b24gTGFiZWwnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBpbnN0YWZlZWRQb3B1cEZvbGxvd0J0bkxhYmVsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBmdW5jdGlvbiBvbkNoYW5nZShpbnN0YWZlZWRQb3B1cEZvbGxvd0J0bkxhYmVsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXRBdHRyaWJ1dGVzKHsgaW5zdGFmZWVkUG9wdXBGb2xsb3dCdG5MYWJlbDogaW5zdGFmZWVkUG9wdXBGb2xsb3dCdG5MYWJlbCB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAoaW5zdGFMYXlvdXQgPT09ICdpbnN0YS1ncmlkJyB8fCBpbnN0YUxheW91dCA9PT0gJ2luc3RhLW1hc29ucnknKSAmJiB3cC5lbGVtZW50LmNyZWF0ZUVsZW1lbnQoVG9nZ2xlQ29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdMb2FkIE1vcmUnLCAnZW1iZWRwcmVzcycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogaW5zdGFmZWVkTG9hZG1vcmUsXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogZnVuY3Rpb24gb25DaGFuZ2UoaW5zdGFmZWVkTG9hZG1vcmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZExvYWRtb3JlOiBpbnN0YWZlZWRMb2FkbW9yZSB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIGluc3RhZmVlZExvYWRtb3JlICYmIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChUZXh0Q29udHJvbCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF9fKCdMb2FkIE1vcmUgQnV0dG9uIExhYmVsJywgJ2VtYmVkcHJlc3MnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBpbnN0YWZlZWRMb2FkbW9yZUxhYmVsLFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IGZ1bmN0aW9uIG9uQ2hhbmdlKGluc3RhZmVlZExvYWRtb3JlTGFiZWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2V0QXR0cmlidXRlcyh7IGluc3RhZmVlZExvYWRtb3JlTGFiZWw6IGluc3RhZmVlZExvYWRtb3JlTGFiZWwgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIHdwLmVsZW1lbnQuY3JlYXRlRWxlbWVudChDdXN0b21CcmFuZGluZywgeyBhdHRyaWJ1dGVzOiBhdHRyaWJ1dGVzLCBzZXRBdHRyaWJ1dGVzOiBzZXRBdHRyaWJ1dGVzIH0pXG4gICAgICAgIClcbiAgICApO1xufVxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///22\n"); /***/ }), /* 23 */ diff --git a/Gutenberg/dist/blocks.style.build.css b/Gutenberg/dist/blocks.style.build.css index f8211117..424d9cd3 100644 --- a/Gutenberg/dist/blocks.style.build.css +++ b/Gutenberg/dist/blocks.style.build.css @@ -1371,7 +1371,8 @@ button.skip-ad-button { clear: both; } .pro-control { - position: relative; } + position: relative; + margin-bottom: 20px; } span.isPro { position: absolute; diff --git a/Gutenberg/src/embedpress-pdf/style.scss b/Gutenberg/src/embedpress-pdf/style.scss index 3e420026..f0d8c44d 100644 --- a/Gutenberg/src/embedpress-pdf/style.scss +++ b/Gutenberg/src/embedpress-pdf/style.scss @@ -35,6 +35,7 @@ .pro-control{ position: relative; + margin-bottom: 20px; } span.isPro { position: absolute; diff --git a/Gutenberg/src/embedpress/InspectorControl/instafeed.js b/Gutenberg/src/embedpress/InspectorControl/instafeed.js index e034a80a..13269274 100644 --- a/Gutenberg/src/embedpress/InspectorControl/instafeed.js +++ b/Gutenberg/src/embedpress/InspectorControl/instafeed.js @@ -236,8 +236,9 @@ export default function Instafeed({ attributes, setAttributes }) { } -
{ addProAlert(e, isProPluginActive) }}> - {instafeedProfileImage && ( + {instafeedProfileImage && ( +
{ addProAlert(e, isProPluginActive) }}> + )} /> - )} - { - (!isProPluginActive) && ( - {__('pro', 'embedpress')} - ) - } -
+ + + { + (!isProPluginActive) && ( + {__('pro', 'embedpress')} + ) + } +
+ )} + { + (instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && ( +
{ addProAlert(e, isProPluginActive) }}> -
{ addProAlert(e, isProPluginActive) }}> - { - (instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && ( setAttributes({ instafeedLikesCount })} /> - ) - } - { - (!isProPluginActive) && ( - {__('pro', 'embedpress')} - ) - } -
-
{ addProAlert(e, isProPluginActive) }}> - { - (instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && ( + { + (!isProPluginActive) && ( + {__('pro', 'embedpress')} + ) + } +
+ ) + } + { + (instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && ( +
{ addProAlert(e, isProPluginActive) }}> + setAttributes({ instafeedCommentsCount })} /> - ) - } - { - (!isProPluginActive) && ( - {__('pro', 'embedpress')} - ) - } -
- + { + (!isProPluginActive) && ( + {__('pro', 'embedpress')} + ) + } +
+ ) + }