function _regeneratorKeys(e) { var n = Object(e), r = []; for (var t in n) r.unshift(t); return function e() { for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; return e.done = !0, e; }; }

function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }

function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }

function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }

function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }

function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }

function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }

function _toArray(r) { return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }

function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }

function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }

function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }

function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }

function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }

function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }

function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }

function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }

function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["scenario-design-scenario-design-module"], {
  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.component.html":
  /*!******************************************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.component.html ***!
    \******************************************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_rawLoader_dist_cjsJs_src_app_pages_scenario_browserStep_browserInteraction_browserInteractionComponentHtml(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "<div class=\"w-100-p p-grid p-justify-between\">\n    <div class=\"w-100-p p-6 font-weight-600 font-14 bottom-border border-4 text-uppercase p-grid p-align-center p-justify-between\"> \n        <span>{{configurationTitle}}</span>\n        <div class=\"right text-right\">\n            <i *ngIf=\"pageSourcePath!=''\" class=\"ml-5 icons8 icons8-source-code\" pTooltip=\"Source\" (click)=\"onStepDetailsClick('source')\" ></i>\n            <i *ngIf=\"preSnapFilePath!=''\" class=\"ml-5 las-expand-solid\" pTooltip=\"Pre Snapshot\" (click)=\"onStepDetailsClick('presnap')\"></i>\n            <i *ngIf=\"snapshot!=''\" class=\"ml-5 las-image\" pTooltip=\"Post Snapshot\" (click)=\"onStepDetailsClick('postsnap')\"></i>\n\n            <button pButton type=\"button\" class=\"btn-primary-outline ml-6\" [matMenuTriggerFor]=\"prePostProcessor\" icon=\"icons8 icons8-menu-vertical\"></button>\n            <mat-menu #prePostProcessor=\"matMenu\">\n                <button mat-menu-item (click)=\"onStepDetailsClick('prestep')\">Pre-step</button>\n                <button mat-menu-item (click)=\"onStepDetailsClick('poststep')\">Post-step</button>\n                <button mat-menu-item (click)=\"conditionFunc()\">Condition</button>\n            </mat-menu>\n        </div>\n    </div>\n    <div class=\"w-100-p ns-scenario interactionRightPaneHeight\" *ngIf=\"showSourceTab\" >\n        <button style=\"padding-left:0px !important\" pButton type=\"button\" matTooltip=\"Back to Steps\" (click)=\"onStepDetailsClick('interactionDetails')\" class=\"mr-5 btn-icon\"> <i class=\"icons8 icons8-left font-20\"></i> </button>\n        <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isFileLoading\"></i>\n        <div class=\"w-100-p p-grid mb-8\">\n            <ngx-monaco-editor #editor1 [options]=\"editorOptionsHdr2\" style=\"height: 400px; width: 98%;\"  (onInit)=\"onEditorInitResponse($event)\"></ngx-monaco-editor>\n        </div>\n    </div>\n    <div class=\"w-100-p ns-scenario interactionRightPaneHeight\" *ngIf=\"showPreSnapTab\" >\n        <button style=\"padding-left:0px !important\" pButton type=\"button\" matTooltip=\"Back to Steps\" (click)=\"onStepDetailsClick('interactionDetails')\" class=\"mr-5 btn-icon\"> <i class=\"icons8 icons8-left font-20\"></i> </button>\n        <div class=\"w-100-p p-grid mb-8 p-justify-center min-height-250\">\n            <app-cav-loader [showOverlay]=\"false\" *ngIf=\"loadingSnapshot\"></app-cav-loader>\n            <img [src]=\"preSnapFilePath\" (load)=\"onLoad()\" (error)=\"onImageError($event)\" style=\"max-width: 100%;\">\n        </div>\n    </div>\n    <div class=\"w-100-p ns-scenario interactionRightPaneHeight\" *ngIf=\"showPostSnapTab\" >\n        <button style=\"padding-left:0px !important\" pButton type=\"button\" matTooltip=\"Back to Steps\" (click)=\"onStepDetailsClick('interactionDetails')\" class=\"mr-5 btn-icon\"> <i class=\"icons8 icons8-left font-20\"></i> </button>\n        <div class=\"w-100-p p-grid mb-8 p-justify-center min-height-250\">\n            <app-cav-loader [showOverlay]=\"false\" *ngIf=\"loadingSnapshot\"></app-cav-loader>\n            <img [src]=\"snapshot\" (load)=\"onLoad()\" (error)=\"onImageError($event)\" style=\"max-width: 100%;\">\n        </div>\n    </div>\n    <div class=\"w-100-p ns-scenario interactionRightPaneHeight\" *ngIf=\"showPreStepTab\" >\n        <button style=\"padding-left:0px !important\" pButton type=\"button\" matTooltip=\"Back to Steps\" (click)=\"onStepDetailsClick('interactionDetails')\" class=\"mr-5 btn-icon\"> <i class=\"icons8 icons8-left font-20\"></i> </button>\n        <div class=\"w-100-p p-grid mb-8\">\n            <ngx-monaco-editor #preEditor style=\"height:370px; width:100%\" class=\"editor-container rowText w-100-p\"\n                [options]=\"editorOptionsHdr1\"\n                [(ngModel)]=\"browserStepsConfig.preStep.inline\"\n                (ngModelChange)=\"onModelChange()\"\n                (onInit)=\"onInitEditor($event, 'pre')\">\n            </ngx-monaco-editor>\n        </div>\n    </div>\n    <div class=\"w-100-p ns-scenario interactionRightPaneHeight\" *ngIf=\"showPostStepTab\" >\n        <button style=\"padding-left:0px !important\" pButton type=\"button\" matTooltip=\"Back to Steps\" (click)=\"onStepDetailsClick('interactionDetails')\" class=\"mr-5 btn-icon\"> <i class=\"icons8 icons8-left font-20\"></i> </button>\n        <div class=\"w-100-p p-grid mb-8\">\n            <ngx-monaco-editor #postEditor style=\"height:370px; width:100%\" class=\"editor-container rowText w-100-p\"\n                [options]=\"editorOptionsHdr1\"\n                [(ngModel)]=\"browserStepsConfig.postStep.inline\"\n                (ngModelChange)=\"onModelChange()\"\n                (onInit)=\"onInitEditor($event, 'post')\">\n            </ngx-monaco-editor>\n        </div>\n    </div>\n    <div class=\"w-100-p ns-scenario interactionRightPaneHeight\" *ngIf=\"showInteractionDetails\" >\n        <div class=\"w-100-p p-grid mb-8\">\n            <div class=\"form-group p-col-12\">\n                <label class=\"p-col-2\">Select Action</label>\n                <div class=\"p-col-4\">\n                    <p-dropdown [options]=\"actionListOptions\" placeholder=\"Select Action\" [filter]=\"true\"\n                        [style]=\"{'min-width': '100%'}\" dropdownIcon=\"icons8 icons8-expand-arrow\"\n                        [(ngModel)]=\"selectedAction\" appendTo=\"body\" (onChange)=\"onChangeAction($event)\"></p-dropdown>\n                </div>\n                <label class=\"control-label p-col-2\">Step Name</label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"stepElementValue\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeStepName()\">\n                </div>\n            </div>\n            <!-- selectedAction == 'LaunchApp -->\n            <div *ngIf=\"selectedAction === 'LaunchApp' && shouldShowCrossPlatformAppIds\" class=\"form-group p-col-12\">\n                <label class=\"p-col-2\">\n                    <i class=\"las-android mr-5\" matTooltip=\"Android\"></i> App Activity\n                </label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.appActivity\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n            </div>\n\n            <div *ngIf=\"selectedAction === 'LaunchApp' && shouldShowCrossPlatformAppIds\" class=\"form-group p-col-12\">\n                <label class=\"p-col-2\">\n                    <i class=\"las-android mr-5\" matTooltip=\"Android\"></i> App Package\n                </label>\n                <div class=\"p-col-10\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.appPackage\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n            </div>\n\n            <div *ngIf=\"selectedAction === 'LaunchApp' && shouldShowCrossPlatformAppIds\" class=\"form-group p-col-12\">\n                <label class=\"p-col-2\">\n                    <i class=\"las-apple mr-5\" matTooltip=\"iOS\"></i> Bundle Id\n                </label>\n                <div class=\"p-col-10\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.bundleId\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"onBundleIdChange()\">\n                </div>\n            </div>\n\n            <div *ngIf=\"selectedAction === 'LaunchApp' && !shouldShowCrossPlatformAppIds\" class=\"form-group p-col-12\">\n                <label class=\"p-col-2\">App Package</label>\n                <div class=\"p-col-4\" *ngIf=\"groupType === 'RDT_NATIVE'; else defaultSingleAppPackage\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.appPackage\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n                <ng-template #defaultSingleAppPackage>\n                    <div class=\"p-col-4\">\n                        <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.appPackage\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                    </div>\n                </ng-template>\n\n                <label class=\"control-label p-col-2\">App Activity</label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.appActivity\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n            </div>\n\n            <div *ngIf=\"selectedAction === 'scroll' \" class=\"form-group p-col-12\">\n                 <label class=\"p-col-2\">Direction</label>\n                <div class=\"p-col-4\">\n                    <p-dropdown [options]=\"directionOption\" placeholder=\"Select Direction\" [filter]=\"true\"\n                        [style]=\"{'min-width': '100%'}\" dropdownIcon=\"icons8 icons8-expand-arrow\"\n                        [(ngModel)]=\"browserStepsConfig.direction\" appendTo=\"body\" (onChange)=\"changeCoordinates()\"></p-dropdown>\n                </div>\n                <label class=\"control-label p-col-2\">Distance (%)</label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.distancePct\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n            </div>\n\n            <div *ngIf=\"selectedAction === 'scroll' \" class=\"form-group p-col-12\">\n                 <label class=\"p-col-2\">Timeout</label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.timeout\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n            </div>\n\n            <div *ngIf=\"selectedAction === 'swipe' \" class=\"form-group p-col-12\">\n                 <label class=\"p-col-2\">StartX</label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.coordinates.startX\" (input)=\"changeCoordinates()\" class=\"w-100-p\" autocomplete=\"off\">\n                </div>\n                <label class=\"control-label p-col-2\">StartY</label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.coordinates.startY\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n            </div>\n\n            <div *ngIf=\"selectedAction === 'swipe' \" class=\"form-group p-col-12\">\n                 <label class=\"p-col-2\">EndX</label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.coordinates.endX\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n                <label class=\"control-label p-col-2\">EndY</label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.coordinates.endY\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n            </div>\n            <div *ngIf=\"selectedAction === 'swipe' \" class=\"form-group p-col-12\">\n                 <label class=\"p-col-2\">sceenWidth</label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.coordinates.screenWidth\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n                <label class=\"control-label p-col-2\">screenHeight</label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.coordinates.screenHeight\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n            </div>\n            <div *ngIf=\"selectedAction === 'swipe' \" class=\"form-group p-col-12\">\n                 <label class=\"p-col-2\">Duration</label>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.coordinates.duration\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                </div>\n                 <label class=\"control-label p-col-4\">Use Relative coordinates</label>\n                <div class=\"p-col-2\">\n                    <p-inputSwitch [(ngModel)]=\"browserStepsConfig.coordinates.isRelative\" (onChange)=\"onToggleisRelative($event)\"></p-inputSwitch>\n                </div>\n            </div>\n\n            <div *ngIf=\"selectedAction === 'input' \" class=\"form-group p-col-12\">\n                <label class=\"p-col-2\">Value</label>\n                <div class=\"p-col-10\">\n                    <input type=\"text\" cavParameterInput [cavMode]=\"'both'\" pInputText [(ngModel)]=\"inputElementValue\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeInputValue()\">\n                </div>\n            </div>\n\n            <div *ngIf=\"selectedAction === 'go' \" class=\"form-group p-col-12\">\n                <label class=\"p-col-2\">URL</label>\n                <div class=\"p-col-10\">\n                    <input type=\"text\" cavParameterInput [cavMode]=\"'both'\" pInputText [(ngModel)]=\"urlValue\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeUrlValue()\">\n                </div>\n            </div>\n\n            <div *ngIf=\"selectedAction === 'switchTab' \" class=\"form-group p-col-12\">\n                <label class=\"p-col-2\">Tab Index</label>\n                <div class=\"p-col-2\">\n                    <p-spinner [min]=\"0\" [step]=\"1\" [(ngModel)]=\"tabIndex\" inputStyleClass=\"w-100-p\" (onChange)=\"onTabIndexChanged()\"></p-spinner>\n                </div>\n            </div>\n                            <div class=\"form-group p-col-12\" *ngIf=\"!shouldShowLocators && selectedAction != 'LaunchApp' && selectedAction !== 'SwitchToPortrait' && selectedAction !== 'SwitchToLandscape' && selectedAction !== 'HideKeyboard' && selectedAction !== 'PressBack'\">\n                            <app-locators class=\"w-100-p pl-6 pr-6\" [locatorsInput]=\"elementLocatorInstance\" [showPlatformToggle]=\"shouldShowLocatorPlatformTabs\" [selectedPlatform]=\"selectedElementLocatorPlatform\" (selectedPlatformChange)=\"onElementLocatorPlatformModelChange($event)\" (changeLocatorsConfig)=\"changeLocatorsConfig($event)\"></app-locators>\n                        </div>\n <div class=\"form-group p-col-12\">\n  <div class=\"p-col-12 pl-6\">\n<p-accordion [activeIndex]=\"0\" [multiple]=\"true\"> \n    <p-accordionTab header=\"Additional Options\">\n       <div class=\"p-grid border-all border-4 mtn-7 mbn-8 pb-16\">\n         <div class=\"form-group p-col-12\" *ngIf=\"!shouldShowLocators && groupType !== 'RDT_NATIVE'\">\n                    <div class=\"control-label p-col-2\">Tag Name</div>\n                    <div class=\"p-col-2\">\n                        <input type=\"text\" pInputText [(ngModel)]=\"tagName\" class=\"w-100-p\" autocomplete=\"off\"\n                            (input)=\"changeTagName()\">\n                    </div>\n            </div>\n            \n            <div class=\"form-group p-col-12\">\n                <label class=\"control-label p-col-2\">Think Time</label>\n                <div class=\"p-col-2\">\n                    <div class=\"ui-inputgroup w-100-p\">\n                        <p-spinner [min]=\"0\" [step]=\"0.001\" [(ngModel)]=\"browserStepsConfig.thinkTime\"\n                            inputStyleClass=\"w-100-p\" (onChange)=\"changeThinkTime()\"></p-spinner>\n                        <span pTooltip=\"seconds\" class=\"ui-inputgroup-addon px-10\">sec</span>\n                    </div>\n                </div>\n            </div>\n            \n            <div class=\"form-group p-col-12\">\n                <label class=\"control-label p-col-2\">Tags</label>\n                <div class=\"p-col-10\">\n                    <app-tags-autocomplete\n                        [metadata]=\"tagMetadata\"\n                        [placeholder]=\"'Add tags (e.g. priority)'\"\n                        [chips]=\"actionTagsChips\"\n                        (chipsChange)=\"onTagsChipsChange($event)\"\n                        (chipAdded)=\"onTagChipAdded($event)\"\n                        (chipRemoved)=\"onTagChipRemoved($event)\">\n                    </app-tags-autocomplete>\n                </div>\n            </div>\n\n            <div class=\"form-group p-col-12\">\n                 <div class=\"p-col-2 control-label\">   \n                    Description \n                 </div>\n                <div class=\"p-col-10\">\n                    <input type=\"text\" pInputText [(ngModel)]=\"actionDesciption\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeActionDesciption()\" placeholder=\"optional\">\n                </div>\n            </div>\n        <!-- hero element  Locators-->\n          <div class=\"form-group p-col-12 mt-0\" *ngIf=\"!shouldShowLocators\">\n            <app-locators class=\"w-100-p pl-16 pr-12 my-16\" [locatorsInput]=\"heroLocatorInstance\" [showPlatformToggle]=\"shouldShowLocatorPlatformTabs\" [selectedPlatform]=\"selectedHeroLocatorPlatform\" (selectedPlatformChange)=\"onHeroLocatorPlatformModelChange($event)\" (changeLocatorsConfig)=\"changeLocatorsConfig($event)\"></app-locators>\n         </div>\n        <ng-container>\n            <!-- Collapsible Advanced Options -->\n            <div class=\"form-group p-col-12\">\n                <!-- Wait Element Timeout -->\n                <label class=\"control-label p-col-2 nowrap font-11\">Wait Element Timeout</label>\n                <div class=\"p-col-3\">\n                    <p-spinner [min]=\"0\" [step]=\"1\" [(ngModel)]=\"waitElementTimeout\"\n                        (onChange)=\"onWaitElementTimeoutChanged()\">\n                    </p-spinner>\n                </div>\n                <!-- Mark Step as Optional -->\n               <div class=\"p-col-3\">\n                    <p-checkbox label=\"Mark this step as optional\" [(ngModel)]=\"optional\" binary=\"true\"\n                        (onChange)=\"onOptionalChanged()\">\n                    </p-checkbox>\n                </div>\n            </div>\n        \n\n                <div *ngIf=\"selectedAction === 'go' \" class=\"form-group p-col-12\">\n                    <div class=\"control-label p-col-12 font-weight-600\">Auth Credentials</div>\n                </div>\n                <div *ngIf=\"selectedAction === 'go' \" class=\"form-group p-col-12\">\n                    <label class=\"control-label p-col-2\">User Name</label>\n                    <div class=\"p-col-4\">\n                        <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.authCredentials.username\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                    </div>\n                    <label class=\"control-label p-col-2\">Password</label>\n                    <div class=\"p-col-4\">\n                        <input type=\"text\" pInputText [(ngModel)]=\"browserStepsConfig.authCredentials.password\" class=\"w-100-p\" autocomplete=\"off\" (input)=\"changeCoordinates()\">\n                    </div>\n                </div>\n        </ng-container>\n            <!-- iFrameLocator - nested display with add/remove buttons -->\n        <ng-container *ngIf=\"groupType !== 'RDT_NATIVE'\">\n            <div class=\"w-100-p p-grid p-align-center p-justify-between p-12\">\n                <div class=\"inline-flex font-14\">\n                    <i class=\"las-layer-group-solid blueHead\"></i> <strong>Iframe Locators</strong>\n                </div>\n                <button type=\"button\" pButton icon=\"icons8 icons8-plus-math\" \n                (click)=\"addIframeLocators()\" class=\"ui-button-secondary\" label=\"Add Nested Frame\"></button>\n            </div>\n            <div *ngIf=\"iframeLocatorInstances && iframeLocatorInstances.length > 0\" class=\"w-100-p pl-16 pr-6\">\n                <div *ngFor=\"let iframeLocator of iframeLocatorInstances; let i = index; trackBy: trackByIframeIndex\" class=\"w-100-p mb-12 relative\">\n                    <div class=\"deleteBtnn\">\n                        <button type=\"button\" [matTooltip]=\"'Remove iFrame ' + (i + 1)\" pButton icon=\"icons8 icons8-delete-trash clickable\" (click)=\"removeIframeLocators(i)\" class=\"btn-icon mr-5\"></button>\n                    </div>\n                    <app-locators class=\"w-100-p\" [locatorsInput]=\"iframeLocator\" (changeLocatorsConfig)=\"changeLocatorsConfig($event)\"></app-locators>\n                </div>\n            </div>\n        </ng-container>\n\n       </div>\n\n    </p-accordionTab>\n    <p-accordionTab header=\"Assertions\">\n       <div class=\"p-grid border-all border-4 mtn-7 mbn-8\">\n        <!-- *ngIf=\"displayAssertions\" -->\n             <div class=\"p-16\" *ngIf=\"groupType === 'RDT_NATIVE'\">\n            <cav-table [value]=\"browserStepsConfig.assertions\" [headerRelativePath]=\"headerRelativePath\" [scrollable]=\"true\" [responsive]=\"true\"\n        scrollHeight=\"calc(100vh - 240px)\" (clickButtonEvent)=\"clickButtonEvent($event)\"></cav-table>\n        </div>\n        <div class=\"p-16 w-100-p\" *ngIf=\"groupType !== 'RDT_NATIVE'\">\n            <app-assertion \n                [assertConfig]=\"assertionConfig\" \n                (assertConfigChange)=\"onAssertionConfigChange($event)\"\n                [pageName]=\"pageName\"\n                [groupName]=\"groupName\"\n                [flowName]=\"flowName\"\n                [allPages]=\"allPages\"\n                [isBrowserTest]=\"isBrowserGroup()\">\n            </app-assertion>\n        </div>\n       </div>\n    </p-accordionTab>\n</p-accordion>\n </div>\n </div>\n        </div>\n    </div>\n</div>\n\n<p-dialog [(visible)]=\"displayAddAssert\" header=\"Add Assertion\" [modal]=\"true\" [resizable]=\"true\"\n[style]=\"{'width':'800px'}\">\n    <div class=\"w-100-p p-grid my-8 p-align-center\">\n        <div class=\"p-col-12\">\n            <app-locators class=\"w-100-p\" [locatorsInput]=\"assertLocatorInstances[selectedAssertionLocatorPlatform]\" [showPlatformToggle]=\"shouldShowLocatorPlatformTabs\" [selectedPlatform]=\"selectedAssertionLocatorPlatform\" (selectedPlatformChange)=\"onAssertionLocatorPlatformModelChange($event)\" (changeLocatorsConfig)=\"changeLocatorsConfig($event)\"></app-locators>\n        </div>\n    </div>\n\n    <div class=\"w-100-p p-grid my-8 p-align-center pl-28\" style=\"width:92%\">\n        <div class=\"p-col-6\">\n            <label class=\"\">Target</label>\n        </div>\n        <div class=\"p-col-6\">\n            <p-dropdown [options]=\"assertTarget\" [(ngModel)]=\"selectAssertTarget\" appendTo=\"body\"></p-dropdown>\n        </div>\n   \n    <ng-container *ngIf=\"selectAssertTarget == 'Element'\">\n        <div class=\"p-col-6\">\n            <label class=\"\">Condition</label>\n        </div>\n        <div class=\"p-col-6\">\n            <p-dropdown [options]=\"assertCondEle\" [(ngModel)]=\"selectAssertCondEle\" appendTo=\"body\"></p-dropdown>\n        </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"selectAssertTarget == 'Property'\">\n        <div class=\"p-col-6\">\n            <label class=\"\">Property</label>\n        </div>\n        <div class=\"p-col-6\">\n            <p-dropdown [options]=\"assertProertyType\" [(ngModel)]=\"assertPropType\" appendTo=\"body\"></p-dropdown>\n        </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"selectAssertTarget == 'Property' && assertPropType === 'Custom'\">\n        <div class=\"p-col-6\">\n            <label class=\"\">Custom Property</label>\n        </div>\n        <div class=\"p-col-6\">\n            <input pInputText [(ngModel)]=\"customPropertyValue\" placeholder=\"Enter custom property name\" class=\"w-100-p\" />\n        </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"selectAssertTarget == 'Text' || selectAssertTarget == 'Property'\">\n        <div class=\"p-col-6\">\n            <label class=\"\">Condition</label>\n        </div>\n        <div class=\"p-col-6\">\n            <p-dropdown [options]=\"assertCond\" [(ngModel)]=\"selectAssertCond\" appendTo=\"body\"></p-dropdown>\n        </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"selectAssertTarget == 'Element Count'\">\n        <div class=\"p-col-6\">\n            <label class=\"\">Condition</label>\n        </div>\n        <div class=\"p-col-6\">\n            <p-dropdown [options]=\"assertEleCount\" [(ngModel)]=\"selectAssertCond\" appendTo=\"body\"></p-dropdown>\n        </div>\n    </ng-container>\n\n    <!-- <div class=\"w-100-p p-grid my-8 p-align-center ml-27\" *ngIf=\"selectAssertCond == 'Between'\">\n        <div class=\"p-col-4\">\n            <label class=\"\">Condition Values</label>\n        </div>\n        <div class=\"p-col-3\">\n            <p-spinner inputStyleClass=\"w-100-p\" [(ngModel)]=\"assertCondMinVal\" [min]=\"0\" [step]=\"1\" placeholder=\"0\"></p-spinner>\n        </div>\n        <div class=\"p-col-3\">\n            <p-spinner inputStyleClass=\"w-100-p\" [(ngModel)]=\"assertCondMaxVal\" [min]=\"0\" [step]=\"1\" placeholder=\"0\"></p-spinner>\n        </div>\n    </div> -->\n\n    <ng-container *ngIf=\"selectAssertTarget != 'Element'\">\n        <div class=\"p-col-6\" *ngIf=\"hideValueField() == false\">\n            <label class=\"\">Value</label>\n        </div>\n        <div class=\"p-col-6\" *ngIf=\"selectAssertCond == 'IN'\">\n            <p-chips  placeholder=\"Define values...\" class=\"input-chips chipStyle\" [(ngModel)]=\"conditionChipValue\"  separator=\",\" addOnBlur=\"true\" addOnTab=\"true\"></p-chips>\n        </div>\n        <div class=\"p-col-6\" *ngIf=\"selectAssertCond != 'IN' && selectAssertCond != 'Between' && selectAssertCond != 'Not Between' && hideValueField() == false\">\n            <input pInputText [(ngModel)]=\"assertValue\" class=\"w-100-p\" />\n        </div>\n        <div class=\"p-col-3\" *ngIf=\"selectAssertCond == 'Between' || selectAssertCond == 'Not Between'\">\n            Min <p-spinner inputStyleClass=\"w-100-p\" [(ngModel)]=\"assertCondMinVal\" [min]=\"0\" [step]=\"1\" placeholder=\"Min\"></p-spinner>\n        </div>\n        <div class=\"p-col-3\" *ngIf=\"selectAssertCond == 'Between' || selectAssertCond == 'Not Between'\">\n            Max <p-spinner inputStyleClass=\"w-100-p\" [(ngModel)]=\"assertCondMaxVal\" [min]=\"0\" [step]=\"1\" placeholder=\"Max\"></p-spinner>\n        </div>\n    </ng-container>\n    \n    <ng-container *ngIf=\"selectAssertTarget == 'Text' || selectAssertTarget == 'Property'\">\n        <div class=\"p-col-6\">\n            <label class=\"\">Matching Pattern (Regular Expression)</label>\n        </div>\n        <div class=\"p-col-6\">\n            <div class=\"ui-inputgroup\">\n             <input id=\"matchingPattern\" type=\"text\" pInputText \n                [(ngModel)]=\"matchingPattern\" \n                placeholder=\"Enter regex pattern (optional)\"\n                class=\"w-100-p\"\n                (input)=\"onRegexPatternChange()\">\n                <button pButton type=\"button\" \n                      class=\"ui-button-secondary test-regex-btn\"\n                      label=\"Test\" \n                      icon=\"pi pi-check-circle\"\n                      [disabled]=\"!matchingPattern || !regexTestData\"\n                      (click)=\"testRegexPattern()\" style=\"height: 33.6px;\">\n                  </button>\n            </div>\n        </div>\n    </ng-container>\n    <ng-container *ngIf=\"matchingPattern && (selectAssertTarget == 'Text' || selectAssertTarget == 'Property')\">\n        <div class=\"p-col-6\">\n            <label class=\"\">Test Data (Sample input to test regex)</label>\n        </div>\n        <div class=\"p-col-6\">\n            <textarea id=\"regexTestData\" \n                    pInputTextarea \n                    [(ngModel)]=\"regexTestData\" \n                    placeholder=\"Enter sample data to test your regex pattern...\"\n                    rows=\"4\"\n                    class=\"regex-test-textarea no-resize\">\n          </textarea>\n\n        </div>\n    </ng-container>\n</div>\n\n    <!-- Regex Test Result -->\n        <div style=\"width: 87.5%; margin-left: 31px;\" \n        *ngIf=\"regexTestResult && (selectAssertTarget == 'Text' || selectAssertTarget == 'Property')\">\n          <div class=\"regex-test-result\" \n               [ngClass]=\"{'success': regexTestResult.isMatch && !regexTestResult.error, \n                          'error': !regexTestResult.isMatch || regexTestResult.error}\">\n            <div class=\"result-header\">\n              <i class=\"pi\" [ngClass]=\"regexTestResult.isMatch && !regexTestResult.error ? 'pi-check-circle' : 'pi-times-circle'\"></i>\n              <strong>{{ regexTestResult.isMatch && !regexTestResult.error ? 'Match Found' : 'No Match' }}</strong>\n            </div>\n            <div class=\"result-content\" *ngIf=\"regexTestResult.matchedValue && !regexTestResult.error\">\n              <strong>Extracted Value:</strong> {{ regexTestResult.matchedValue }}\n            </div>\n            <div class=\"result-content error-message\" *ngIf=\"regexTestResult.error\">\n              <strong>Error:</strong> {{ regexTestResult.error }}\n            </div>\n            <button type=\"button\" \n                    class=\"clear-test-btn\" \n                    (click)=\"clearRegexTest()\">\n              Clear Test\n            </button>\n          </div>\n        </div>\n\n    <div class=\"w-100-p p-grid my-8 p-align-center pl-28\" style=\"width:92%\">\n        <ng-container *ngIf=\"selectAssertTarget == 'Text' || selectAssertTarget == 'Property'\">\n        <div class=\"p-col-6\">\n            <label class=\"\">Index</label>\n        </div>\n        <div class=\"p-col-6\">\n                <p-spinner id=\"patternIndex\" inputStyleClass=\"w-100-p\" [disabled]=\"isDisabled\" [(ngModel)]=\"matchingPatternIndex\" [min]=\"0\" [step]=\"1\" placeholder=\"0\">\n              </p-spinner><!---(onChange)=\"onCaptureAllChange($event)\"-->\n        </div>\n        </ng-container>\n        <!-- <div class=\"p-col-3\">\n            <label class=\"\">\n               <p-checkbox name=\"groupname\" value=\"true\" [(ngModel)]=\"isCaptureAllValue\" label=\"Capture all values\" (onChange)=\"onCaptureAllChange($event)\"></p-checkbox> \n            </label>\n        </div> -->\n        <div class=\"p-col-6\">\n            <label class=\"\">Assertion Name</label>\n        </div>\n        <div class=\"p-col-6\">\n            <input pInputText [(ngModel)]=\"assertionName\" class=\"w-100-p\">\n        </div>\n        <div class=\"p-col-6\">\n            <label class=\"\">Description</label>\n        </div>\n        <div class=\"p-col-6\">\n            <textarea pInputTextarea [(ngModel)]=\"assertionDesc\" class=\"w-100-p\" rows=\"3\"></textarea>\n        </div>\n        <div class=\"p-col-6\">\n            <label class=\"\">Tags</label>\n        </div>\n        <div class=\"p-col-6\">\n                <p-chips placeholder=\"Define Tags...\" class=\"input-chips chipStyle\"\n                    [(ngModel)]=\"assertTags\" separator=\",\" addOnBlur=\"true\" addOnTab=\"true\"></p-chips>\n        </div>\n        <div class=\"p-col-6\">\n            <label class=\"\">Action On Failure</label>\n        </div>\n        <div class=\"p-col-6\">\n            <p-dropdown [options]=\"actionOnFail\" [filter]=\"true\" [(ngModel)]=\"actionFail\" appendTo=\"body\"></p-dropdown>\n        </div>\n         <div class=\"p-col-6\">\n            <label class=\"\">Failure Message</label>\n        </div>\n        <div class=\"p-col-6\">\n          <input pInputText  [(ngModel)]=\"assertionFailMsg\" class=\"w-100-p\">\n        </div>\n         <div class=\"p-col-6\">\n            <label>Use Assertion as Hero Element</label>\n        </div>\n        <div class=\"p-col-6\">\n            <p-inputSwitch [(ngModel)]=\"isHeroElement\"></p-inputSwitch>\n        </div>\n    </div>\n\n    <p-footer>\n        <button type=\"button\" pButton class=\"ui-button-rounded ui-button-secondary mx-6\" (click)=\"cancelAddAssert()\" label=\"Cancel\"></button>\n        <button *ngIf=\"operationFlag === 'add' \" type=\"button\" pButton class=\"ui-button-rounded\" (click)=\"addNewAssertions()\" label=\"OK\"></button>\n        <button *ngIf=\"operationFlag === 'edit' \" type=\"button\" pButton class=\"ui-button-rounded\" (click)=\"updateAssertions()\" label=\"Update\"></button>\n    </p-footer>\n</p-dialog>\n\n<p-confirmDialog class=\"confirmdialog\" header=\"Confirmation\" acceptButtonStyleClass=\"ui-button-rounded px-10\"\n    rejectButtonStyleClass=\"ui-button-rounded ui-button-secondary px-10 mx-6\" acceptIcon=\"null\" rejectIcon=\"null\"\n    acceptLabel=\"Yes\" rejectLabel=\"No\" key=\"assertConfirm\"></p-confirmDialog>\n\n<app-condition-scenario #conditionScenarioComponent></app-condition-scenario>\n";
    /***/
  },

  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/components/no-code-runlogic/no-code-runlogic.component.html":
  /*!**************************************************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/components/no-code-runlogic/no-code-runlogic.component.html ***!
    \**************************************************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_rawLoader_dist_cjsJs_src_app_pages_scenario_scenarioDesign_components_noCodeRunlogic_noCodeRunlogicComponentHtml(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "<div *ngIf=\"runlogicList && runlogicList.length > 0; else emptyRunlogicList\">\n    <div class=\"tool-bar inline-flex p-align-center p-justify-between border-all border-1 rounded-3\">\n        <div class=\"p-col-fixed p-grid p-align-center\">\n            <button pButton type=\"button\" matTooltip=\"Back to group details\" (click)=\"closePanel.emit()\"\n            class=\"mr-5 btn-icon mln-10\"> <i class=\"icons8 icons8-left font-20\"></i> </button>\n            <strong>Advanced Runlogic</strong>\n        </div>\n        \n        <div class=\"inline-flex p-align-center top-dropdown\">\n            <div *ngIf=\"showRunlogicHome\" class=\"inline-flex right-border border-1 mr-12 pr-8\">\n                <button (click)=\"createRunlogic()\" class=\"btn-icon\" pButton icon=\"icons8 icons8-add\" pTooltip=\"Create Runlogic\"\n                    tooltipPosition=\"top\"></button>\n                <button type=\"button\" pButton class=\"btn-icon\" icon=\"icons8 icons8-save\" pTooltip=\"Save(Ctrl + S)\"\n                    tooltipPosition=\"top\" (click)=\"saveRunlogic()\"></button>\n                <button type=\"button\" class=\"btn-icon\"\n                    [pTooltip]=\"!scriptTabService.runLogicExpandCollapse[scriptTabService.activeTabDataInfo['filePath'] + scriptTabService.activeTabDataInfo['fileName']] ? 'Collapse All' : 'Expand All'\"\n                    (click)=\"expandCollapse()\" tooltipPosition=\"top\">\n                    <i class=\"icons8\"\n                        [ngClass]=\"!scriptTabService.runLogicExpandCollapse[scriptTabService.activeTabDataInfo['filePath'] + scriptTabService.activeTabDataInfo['fileName']] ? 'icons8-compress' : 'icons8-enlarge'\"></i></button>\n                <button type=\"button\" pButton class=\"btn-icon\" icon=\"las-calculator-solid\" pTooltip=\"Calculator\"\n                    (click)=\"showCalculator()\" tooltipPosition=\"top\"></button>\n            \n                <!---Runlogic options---->\n                <!-- FIXME [disabled]=\"scriptTabService.renameRun\" -->\n                <button (click)=\"renameRunlogic()\" icon=\"icons8 icons8-edit\" class=\"btn-icon\" pButton pTooltip=\"Rename Runlogic\"\n                    tooltipPosition=\"top\"></button>\n            \n                <button (click)=\"copyRunlogic()\" class=\"btn-icon\" pButton icon=\"icons8 icons8-copy\" pTooltip=\"Copy Runlogic\"\n                    tooltipPosition=\"top\"></button>\n                <!--FIXME [disabled]=\"scriptTabService.setAsDefault\" -->\n                <button (click)=\"defaultRunlogic()\" class=\"btn-icon\" pButton icon=\"icons8 icons8-sync-settings\"\n                    pTooltip=\"Set as default Runlogic\" tooltipPosition=\"top\"></button>\n            \n                <button (click)=\"resetRunlogic()\" class=\"btn-icon\" pButton icon=\"las-redo-alt-solid\" pTooltip=\"Reset Runlogic\"\n                    tooltipPosition=\"top\"></button>\n            \n                <button (click)=\"downloadRunlogic()\" class=\"btn-icon\" pButton icon=\"las-download-solid\" pTooltip=\"Download\"\n                    tooltipPosition=\"top\"></button>\n                <!-- FIXME [disabled]=\"scriptTabService.deleteRun\" -->\n                <button (click)=\"deleteRunlogic()\" class=\"btn-icon\" pButton icon=\"icons8 icons8-trash\" pTooltip=\"Delete Runlogic\"\n                    tooltipPosition=\"top\"></button>\n                <app-help [helpFileName]=\"'runLogicHelp'\" [helpTitle]=\"'Runlogic'\" [helpFolder]=\"'script'\"></app-help>\n            </div>\n            <div class=\"mr-6\">Runlogic</div>\n            <p-dropdown [options]=\"runlogicListOptions\" [(ngModel)]=\"selectedRunlogic\" optionLabel=\"label\"\n                placeholder=\"Select Runlogic\" [filter]=\"true\" filterBy=\"label\"\n                [disabled]=\"!runlogicListOptions?.length\" (onChange)=\"onRunlogicSelect($event)\">\n            </p-dropdown>\n            <!-- <button type=\"button\" pButton class=\"btn-icon\" icon=\"icons8 icons8-star\" \n                pTooltip=\"Set as Default\" tooltipPosition=\"top\"\n                (click)=\"setRunlogicAsDefault()\" [disabled]=\"!selectedRunlogic\">\n            </button> -->\n        </div>\n    </div>\n    <!-- <div class=\"main-tab-background mx-5 border-1\">\n      <app-script-tab></app-script-tab>\n    </div> -->\n\n    <app-runlogic-home *ngIf=\"showRunlogicHome && runlogicObj\" #runlogicComp \n      [runlogicObj]=\"runlogicObj\" \n      [groupData]=\"groupData\"\n      [openFrom]=\"NO_CODE_RUNLOGIC\"\n      (runlogicCreated)=\"onRunlogicCreated($event)\"\n      (runlogicRenamed)=\"onRunlogicRenamed($event)\"\n      (runlogicDeleted)=\"onRunlogicDeleted($event)\"> \n    </app-runlogic-home>\n</div>\n\n<ng-template #emptyRunlogicList>\n    <div class=\"p-grid p-dir-col\" style=\"min-height: 500px; padding: 40px;\">\n       \n        <h3 class=\"font-24 p-grid p-align-center1 p-grid p-justify-center\">\n             <i class=\"pi pi-exclamation-triangle text-warning\"></i>\n            No Advanced Runlogic Found</h3>\n        <p class=\"text-neutral-700\" style=\"line-height: 1.6;\">\n            This test scenario is from a release older than 4.14.1 and does not have Advanced Runlogic enabled.\n            Click the button below to enable Advanced Runlogic feature and start using it in your test scenarios.\n        </p>\n        <span class=\"p-grid p-justify-center\">\n            <button pButton type=\"button\" icon=\"icons8 icons8-play\" label=\"Enable Advanced Runlogic\"\n                class=\"p-button-success\" (click)=\"enableAdvancedRunlogic()\"\n                style=\"padding: 12px 24px; font-size: 14px; margin-top: 10px;\">\n            </button>\n        </span>\n    </div>\n</ng-template>\n";
    /***/
  },

  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.component.html":
  /*!*******************************************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.component.html ***!
    \*******************************************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_rawLoader_dist_cjsJs_src_app_pages_scenario_scenarioDesign_conditionScenario_conditionScenarioComponentHtml(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "<p-dialog [(visible)]=\"displayDialog\" [header]=\"'Test Case Condition Configuration'\" [modal]=\"true\"\r\n    class=\"foterDialog ns-scenario\" [style]=\"{width: '1200px'}\" [draggable]=\"false\" [resizable]=\"false\" [baseZIndex]=\"9999\">\r\n\r\n    <div class=\"p-grid p-nogutter\" style=\"flex-direction: column; gap: 16px; padding: 12px;\">\r\n        <!-- Empty State - Show Add Condition Button -->\r\n        <div *ngIf=\"!requestData?.condition || requestData.condition.length === 0\" style=\"display: flex; justify-content: center; align-items: center; padding: 20px 0;\">\r\n            <button type=\"button\" pButton label=\"Add Condition\" icon=\"pi pi-plus\" \r\n                class=\"p-button-outlined\" (click)=\"addConditionRow()\">\r\n            </button>\r\n        </div>\r\n\r\n        <!-- Conditions List -->\r\n        <div *ngIf=\"requestData?.condition && requestData.condition.length > 0\" style=\"overflow-y: auto; max-height: 400px;\">\r\n            <p class=\"mb-10 font-weight-600\">Execute Page when following conditions are met :</p>\r\n            <div *ngFor=\"let row of requestData.condition; let i = index\" class=\"w-100-p p-grid p-align-center p-nogutter\" style=\"gap: 12px; margin-bottom: 16px; position: relative; z-index: 1;\">\r\n                \r\n                <!-- Row Type / Relation Column -->\r\n                <div style=\"width: 40px;\">\r\n                    <p-dropdown *ngIf=\"i === 0\" [(ngModel)]=\"row.type\" [options]=\"typeOptions\" \r\n                        name=\"type_{{i}}\" [showClear]=\"false\" appendTo=\"body\"\r\n                        [style]=\"{'width': '100%'}\" [baseZIndex]=\"9998\">\r\n                    </p-dropdown>\r\n                    <p-dropdown *ngIf=\"i > 0\" [(ngModel)]=\"row.relationalOperator\" [options]=\"relationalOperatorOptions\"\r\n                        name=\"relationalOperator_{{i}}\" [showClear]=\"false\" appendTo=\"body\"\r\n                        [style]=\"{'width': '100%'}\" [baseZIndex]=\"9998\">\r\n                    </p-dropdown>\r\n                </div>\r\n\r\n                <!-- Parameter Column -->\r\n                <div class=\"p-grid p-nogutter\" style=\"flex: 0.5; min-width: 200px; gap: 8px;\">\r\n                    <!-- Parameter Value Dropdown -->\r\n                    <div style=\"flex: 1;\">\r\n                        <p-dropdown [(ngModel)]=\"row.lhs.value\" [options]=\"scenUtilService.parameterOption\" name=\"lhsValue_{{i}}\"\r\n                            placeholder=\"Select Parameter for LHS\" appendTo=\"body\" [filter]=\"true\"\r\n                            [style]=\"{'width': '100%'}\" [baseZIndex]=\"9998\">\r\n                        </p-dropdown>\r\n                    </div>\r\n                </div>\r\n\r\n                <!-- Operator Column -->\r\n                <div style=\"flex: 0.3; min-width: 70px; gap: 8px;\">\r\n                    <p-dropdown [(ngModel)]=\"row.operator\" [options]=\"operatorOptions\" \r\n                        name=\"operator_{{i}}\" [showClear]=\"false\" appendTo=\"body\"\r\n                        [style]=\"{'width': '100%'}\" [baseZIndex]=\"9998\">\r\n                    </p-dropdown>\r\n                </div>\r\n\r\n                <!-- Value Column -->\r\n                <div class=\"p-grid p-nogutter\" style=\"flex: 1; min-width: 250px; gap: 8px;\">\r\n                    <!-- Type Dropdown -->\r\n                    <div style=\"flex: 0 0 100px;\">\r\n                        <p-dropdown [(ngModel)]=\"row.rhs.type\" [options]=\"rhsTypeOptions\" \r\n                            name=\"rhsType_{{i}}\" [showClear]=\"false\" appendTo=\"body\"\r\n                            [style]=\"{'width': '100%'}\" [baseZIndex]=\"9998\">\r\n                        </p-dropdown>\r\n                    </div>\r\n                    <!-- Value Input -->\r\n                    <div style=\"flex: 1;\">\r\n                        <input type=\"text\" pInputText [(ngModel)]=\"row.rhs.value\" name=\"rhsValue_{{i}}\" placeholder=\"Enter value for RHS\"\r\n                            [style]=\"{'width': '100%'}\" />\r\n                    </div>\r\n                </div>\r\n\r\n                <!-- Action Buttons Column -->\r\n                <div class=\"p-grid p-nogutter\" style=\"width: 100px; justify-content: flex-end;\">\r\n                    <button type=\"button\" pButton icon=\"pi pi-plus\" class=\"btn-icon clickable\"\r\n                        (click)=\"addConditionRow()\" title=\"Add Condition\">\r\n                    </button>\r\n                    <button type=\"button\" pButton class=\"btn-icon\" icon=\"icons8 icons8-trash clickable\" \r\n                        (click)=\"removeConditionRow(i)\">\r\n                    </button>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    \r\n\r\n    <p-footer>\r\n        <button type=\"button\" pButton label=\"Save\" class=\"p-button-success p-button-sm\" (click)=\"save()\">\r\n        </button>\r\n        <button type=\"button\" pButton class=\"ui-button-rounded ui-button-secondary\"\r\n            (click)=\"cancel()\">Cancel</button>\r\n    </p-footer>\r\n</p-dialog>\r\n";
    /***/
  },

  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/protocols/dns/dns.component.html":
  /*!***********************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/protocols/dns/dns.component.html ***!
    \***********************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_rawLoader_dist_cjsJs_src_app_pages_scenario_scenarioDesign_protocols_dns_dnsComponentHtml(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "<div class=\"dns-container\" *ngIf=\"requestData\">\n  <!-- Header removed. Will be handled dynamically in scenario-design. -->\n\n  <div class=\"p-grid p-align-center mb-12\">\n    <div class=\"p-grid p-col-2 p-dir-col p-nogutter1 pr-0\">\n      <div class=\"p-col-12 px-0\">Protocol</div>\n      <div class=\"p-col-12 px-0\">\n        <!-- <p-dropdown [options]=\"protocolOptions\" styleClass=\"w-100-p\" [disabled]=\"disabled\"\n          [(ngModel)]=\"requestData.protocol\"></p-dropdown> -->\n        <mat-select class=\"mat-dropdown\" [disabled]=\"disabled\"\n          [ngClass]=\"requestData.dns.protocol\"\n          [(ngModel)]=\"requestData.dns.protocol\">\n          <mat-option *ngFor=\"let apiList of protocolOptions\" [value]=\"apiList.value\">{{ apiList.label }}\n          </mat-option>\n        </mat-select>\n      </div>\n    </div>\n    <div class=\"p-grid p-col-7 p-dir-col p-nogutter1 px-0\">\n      <div class=\"p-col-12 px-0\">Domain</div>\n      <div class=\"p-col-12 px-0\">\n        <input pInputText type=\"text\" class=\"w-100-p rounded-tl-0 rounded-bl-0\" [disabled]=\"disabled\" cavInputParam\n          [(ngModel)]=\"requestData.dns.domain\" placeholder=\"example.com\">\n      </div>\n     \n    </div>\n    <div class=\"p-grid p-col-3 p-dir-col p-nogutter1\">\n      <div class=\"p-col-12\">Request Name</div>\n      <div class=\"p-col-12\">\n        <input pInputText type=\"text\" class=\"w-100-p\" [disabled]=\"disabled\" [(ngModel)]=\"requestData.reqName\"\n          placeholder=\"request name\" matTooltip=\"{{requestData.reqName}}\" tooltipPosition=\"bottom\"\n          (change)=\"onRequestNameChange()\">\n      </div>\n    </div>\n\n    <div class=\"form-group p-col-12\">\n      <div class=\"p-col-2\">DNS Server</div>\n       <div class=\"p-col-10 pl-0\">\n        <input pInputText type=\"text\" class=\"w-100-p\" [disabled]=\"disabled\" [(ngModel)]=\"requestData.dns.dnsServer\"\n          placeholder=\"e.g. 8.8.8.8 or dns.example.com:53\">\n      </div>\n    </div>\n    \n    <div class=\"form-group p-col-12\">\n      <div class=\"p-col-12 pl-0 pr-0\">\n        <p-accordion [activeIndex]=\"0\" [multiple]=\"true\">\n          <p-accordionTab header=\"Additional Options\">\n            <div class=\"form-group p-col-12\">\n              <div class=\"p-col-fixed\">Enable Recursive DNS</div>\n              <div class=\"p-col-10\" matTooltip=\"Allows the server to resolve external domains by querying other DNS servers and returning the final result to the client.\">\n                <p-inputSwitch [disabled]=\"disabled\" [ngModel]=\"requestData.dns.recursive === 1\"\n                  (ngModelChange)=\"onRecursiveChange($event)\"></p-inputSwitch>\n              </div>\n            </div>\n            <div class=\"form-group p-col-12\">\n              <div class=\"p-col-2\">Record Type</div>\n              <div class=\"p-col-2\">\n                <p-dropdown [options]=\"dnsTypeOptions\" class=\"w-100-p\" [disabled]=\"disabled\"\n                  [(ngModel)]=\"requestData.dns.type\"></p-dropdown>\n              </div>\n            </div>\n          </p-accordionTab>\n        </p-accordion>\n      </div>\n    </div>\n  </div>\n</div>";
    /***/
  },

  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/scenario-design.component.html":
  /*!*********************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/scenario-design.component.html ***!
    \*********************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_rawLoader_dist_cjsJs_src_app_pages_scenario_scenarioDesign_scenarioDesignComponentHtml(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "<div *ngIf=\"!scenUtilService.openRALScen\">\r\n    <div class=\"ml-2 mr-6 maiBottomBox ns-scenario border-radius-3\" [ngClass]=\"{ 'pb-24': isApiPanelActive, 'script-tab-open': showScriptTab }\" >\r\n        <div class=\"w-100-p p-grid p-align-center  p-justify-between\" *ngIf=\"!showRunlogicPanel\"  >\r\n            <div class=\"p-grid pb-24 p-align-center w-100-p p-justify-between\">\r\n                <div class=\"p-grid p-align-center\">\r\n                    <i (click)=\"isApiPanelActive = !isApiPanelActive \" class=\"pi pi-chevron-right mr-5 font-16 \"\r\n                        [ngClass]=\"isApiPanelActive ? 'panelIconOpen' : 'panelIconClose' \"></i>\r\n                    <span class=\"font-16 font-weight-700 text-uppercase\">Test Case configuration </span>\r\n                    <button type=\"button\" pButton matTooltip=\"Group and Additional Settings\" *ngIf=\"testMode==TEST_MODE.PERFORMANCE\"\r\n                        (click)=\"onGroupBasedSettingsClick()\" class=\"btn-icon font-16  ml-16\" icon=\"icons8 icons8-settings\">\r\n                    </button>\r\n                    <button type=\"button\" pButton matTooltip=\"Functional Settings\" *ngIf=\"testMode==TEST_MODE.FUNCTIONAL\"\r\n                        (click)=\"onFunctionalSettingsClick()\" class=\"btn-icon font-16  ml-16\" icon=\"icons8 icons8-settings\">\r\n                    </button>\r\n                    <ng-container *ngIf=\"testMode==TEST_MODE.FUNCTIONAL\">\r\n                    <app-help [helpFileName]=\"'test-case-configuration'\" [helpTitle]=\"'Test Case Configuration'\" [helpFolder]=\"'functional'\" [helpClass]=\"'font-16'\"></app-help>\r\n                    </ng-container>\r\n                </div>\r\n                <div class=\"p-grid p-align-center\">\r\n                    <ng-container *ngIf=\"groupArray[selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.CAVISSON else visualTemplate\">\r\n                        <p-selectButton [disabled]=\"scenUtilService.ScenMode == 3\" [options]=\"scenSelectBtn\" [(ngModel)]=\"selectGrpType\"\r\n                            (onChange)=\"isGrpScript()\">\r\n                        </p-selectButton>\r\n                    </ng-container>\r\n                    <ng-template #visualTemplate>\r\n                        <p-selectButton [disabled]=\"scenUtilService.ScenMode == 3\" [options]=\"scenVisualOptions\"\r\n                            [(ngModel)]=\"scriptMode\" (onChange)=\"showCodeMode($event)\">\r\n                        </p-selectButton>\r\n                    </ng-template>\r\n                </div>\r\n            </div>\r\n\r\n        </div>\r\n\r\n        <div class=\"w-100-p  p-grid\">\r\n            <div [ngClass]=\"isApiPanelActive ? showRunlogicPanel ? 'panelRL border-all border-4' :'panelOpen border-all border-4' : 'panelClose border-none' \"  class=\"w-100-p   p-grid\">\r\n                <as-split direction=\"horizontal\">\r\n                    <as-split-area [size]=\"smallSplit\" class=\"overflow-hidden\">\r\n                    <div class=\"tabBorderRight border-4\">\r\n                    <div *ngIf=\"scenUtilService.ScenMode != 3\" class=\"group-pane\">\r\n                        <div class=\"clickable\" [class]=\"{'selectedGroup': selectedTabIndex.groupIndex == i}\"\r\n                            *ngFor=\"let group of groupArray; let i = index\">\r\n                            <div class=\"w-100-p tabBorderBottom border-4\">\r\n                                <div class=\"p-grid w-100-p flex-nowrap\">\r\n                                    <div class=\"p-grid p-align-center p-justify-center pr-0 p-col-fixed\" *ngIf=\"group.grpType != SCENARIO.GROUP_TYPE.CAVISSON && (!group.scriptMode || group.scriptMode == 'visual')\">\r\n                                        <i (click)=\"groupTabExpandCollapseHandler(group)\"\r\n                                        class=\"pi pi-chevron-right font-16 mx-5\"\r\n                                        [ngClass]=\"group.isGroupPanelActive ? 'panelIconOpen' : 'panelIconClose' \"\r\n                                       ></i>\r\n                                    </div>\r\n                                    <div [ngClass]=\"group.grpType == SCENARIO.GROUP_TYPE.CAVISSON || group.scriptMode == 'code' ? 'p-grid p-align-center p-justify-center p-col-fixed pl-10 px-0' :'p-grid p-align-center p-justify-center p-col-fixed px-0' \">\r\n                                        <i *ngIf=\"(!group.scriptMode || group.scriptMode =='visual') && group.grpType == SCENARIO.GROUP_TYPE.API\" class=\"cav http-data  btn-icon font-25 mx-5\"></i>\r\n                                        <i *ngIf=\"(!group.scriptMode || group.scriptMode =='visual') &&  group.grpType == SCENARIO.GROUP_TYPE.BROWSER\" class=\"icons8 icons8-browse-page btn-icon font-25 mx-5\"></i>\r\n                                        <i *ngIf=\"(!group.scriptMode || group.scriptMode =='visual') &&  group.grpType == SCENARIO.GROUP_TYPE.RDT_NATIVE && isGroupAndroid(group)\" class=\"pi text-neutral-500 d-text-neutral-700 pi-android font-30\" [ngStyle]=\"group.primaryOS == platformAndroid ? {'color': '#48C610'} : {}\" (click)=\"isRdtGroupCrossPlatform(group) && setPrimaryOS(group, platformAndroid)\"></i>\r\n                                        <i *ngIf=\"(!group.scriptMode || group.scriptMode =='visual') &&  group.grpType == SCENARIO.GROUP_TYPE.RDT_NATIVE && isGroupIos(group)\" class=\"pi text-neutral-500 d-text-neutral-700 pi-apple font-30\" [ngStyle]=\"group.primaryOS == platformIOS ? {'color': '#007AFF'} : {}\" (click)=\"isRdtGroupCrossPlatform(group) && setPrimaryOS(group, platformIOS)\"></i>\r\n                                        <i *ngIf=\"group.scriptMode=='code' && group.scriptLanguage == 'js'\" class=\"icons8 icons8-node-js  btn-icon font-25 mx-5\"></i>\r\n                                        <i *ngIf=\"group.scriptMode=='code' && group.scriptLanguage == 'java'\" class=\"icons8 icons8-java btn-icon font-25 mx-5\"></i>\r\n                                        <i *ngIf=\"group.scriptMode=='code' && group.scriptLanguage == 'c'\" class=\"cav3 c-icon btn-icon font-25 mx-5\"></i>\r\n                                        <i *ngIf=\"group.grpType == SCENARIO.GROUP_TYPE.CAVISSON\" class=\"cav1 cavisson-logo font-25 \" style=\"color: var(--primary-1100);\"></i>\r\n                                    </div>\r\n                                    <div (click)=\"showSelectedTab(group, 0,i, -1, -1, -1)\" class=\"p-col p-grid p-dir-col w-70-p flex-nowrap\">\r\n                                        <div class=\"p-grid p-align-center flex-nowrap p-nogutter1\">\r\n                                            <!-- <div class=\"p-col-2\" *ngIf=\"getRdtGroupPlatform(group) === 'android' || \r\n                                                        getRdtGroupPlatform(group) === 'ios' || \r\n                                                        shouldShowBothRdtPlatformIcons(group)\">\r\n                                            \r\n                                                <i *ngIf=\"getRdtGroupPlatform(group) === 'android' || shouldShowBothRdtPlatformIcons(group)\"\r\n                                                    class=\"las-android font-24 group-platform-icon\" [class.blueHead]=\"getRdtGroupPlatform(group) === 'android'\"\r\n                                                    matTooltip=\"Android\">\r\n                                                </i>\r\n                                            \r\n                                                <i *ngIf=\"getRdtGroupPlatform(group) === 'ios' || shouldShowBothRdtPlatformIcons(group)\"\r\n                                                    class=\"las-apple font-24 group-platform-icon\" [class.blueHead]=\"getRdtGroupPlatform(group) === 'ios'\"\r\n                                                    matTooltip=\"iOS\">\r\n                                                </i>\r\n                                            </div> -->\r\n                                            <div class=\"p-col-10 p-grid p-dir-col\">\r\n                                                <p class=\"font-13 my-4 font-weight-500 elipseText\" matTooltip=\"{{group.grpName}}\"> {{group.grpName}} </p>\r\n                                                <p class=\"font-13 my-4 elipseText\"\r\n                                                    *ngIf=\"(!group.scriptMode || group.scriptMode =='visual') && group.grpType == SCENARIO.GROUP_TYPE.API && group?.totalRequest\">\r\n                                                    {{group.totalRequest}} {{group.totalRequest > 1 ? 'Requests' : 'Request'}}</p>\r\n                                                <p class=\"font-13 my-4 elipseText\"\r\n                                                    *ngIf=\"(!group.scriptMode || group.scriptMode =='visual') && group.grpType != SCENARIO.GROUP_TYPE.API && group?.totalBrowserSteps\">\r\n                                                    {{group.totalBrowserSteps}} {{group.totalBrowserSteps > 1 ? 'Interactions' : 'Interaction'}}</p>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                    <div *ngIf=\"group.refId!=null && group.refId != '' else sharedGroup\" (click)=\"importedGroupPanel.toggle($event)\"\r\n                                        class=\"inline-flex p-col-fixed px-0\"><i class=\"font-18 btn-icon las-cloud-download-alt-solid\"\r\n                                            matTooltip=\"Imported Group\"></i></div>\r\n                                            <p-overlayPanel #importedGroupPanel appendTo=\"body\" styleClass=\"popHover\">\r\n                                                <div class=\"p-8 line-height20 width-400\">\r\n                                                    <div class=\"font-weight-600 mb-8\">Imported Group</div>\r\n                                                    <div class=\"mb-12\">\r\n                                                        <p class=\"my-4\">This group is <strong>imported from another Test</strong>. Any changes made to the original\r\n                                                            will be automatically reflected here and vice versa.</p>\r\n                                                        <p class=\"my-4\">To make independent changes, create a copy and unlink it from the original test.</p>\r\n                                                    </div>\r\n                                                    <button type=\"button\" pButton label=\"Make Copy & Unlink\"\r\n                                                        (click)=\"makeCopyAndUnlinkGroup(i); importedGroupPanel.toggle($event)\"\r\n                                                        [disabled]=\"scenUtilService.ScenMode != 0\">\r\n                                                    </button>\r\n                                                </div>\r\n                                            </p-overlayPanel>\r\n                                    <ng-template #sharedGroup>\r\n                                        <div *ngIf=\"group.ownerId!=null && group.ownerId != ''\"\r\n                                            [ngStyle]=\"{'display': scenUtilService.isFlowInline === 'no' ? 'none' : 'flex' }\" (click)=\"sharedGroupPanel.toggle($event)\"\r\n                                            class=\"inline-flex p-col-fixed px-0\"><i class=\"font-18 btn-icon las-cloud-solid\" matTooltip=\"Shared Group\"></i>\r\n                                        </div>\r\n                                         <p-overlayPanel #sharedGroupPanel styleClass=\"popHover\">\r\n                                                    <div class=\"p-8 line-height20 width-400\">\r\n                                                        <div class=\"font-weight-600 mb-8\">Shared Group</div>\r\n                                                        <div class=\"mb-12\">\r\n                                                            <p class=\"my-4\">This group is shared with other tests.</p>\r\n                                                            <p class=\"my-4\">Any changes you make here will automatically apply to all tests using this group.</p>\r\n                                                        </div>\r\n                                                    </div>\r\n                                        </p-overlayPanel>\r\n                                    </ng-template>\r\n                                    <div (click)=\"showSelectedTab(group, 0,i, -1, -1, -1)\" class=\"p-col-fixed p-grid p-align-center p-justify-center pl-2\">\r\n\r\n                                        <button pButton type=\"button\" class=\"btn-icon-gray\" [matMenuTriggerFor]=\"addParameterData\"\r\n                                        *ngIf=\"groupArray[selectedTabIndex.groupIndex].scriptMode != 'code'\" icon=\"icons8 icons8-menu-vertical\"></button>\r\n                                    <mat-menu #addParameterData=\"matMenu\">\r\n                                        <button mat-menu-item (click)=\"onCloneSelectedGroup()\"\r\n                                            [disabled]=\"scenUtilService.ScenMode != 0\">Clone</button>\r\n                                        <button mat-menu-item *ngIf=\"groupArray[selectedTabIndex.groupIndex].scriptMode != 'code'\"\r\n                                            (click)=\"onDeleteSelectedGroup()\"\r\n                                            [disabled]=\"scenUtilService.ScenMode != 0\">Delete</button>\r\n\r\n                                          <ng-container> \r\n                                        <button mat-menu-item [matMenuTriggerFor]=\"addParameter\" [disabled]=\"scenUtilService.ScenMode != 0 || groupArray[selectedTabIndex.groupIndex].scriptMode == 'code' || groupArray[selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.CAVISSON\">Add Parameters</button>\r\n                                        <!-- <button mat-menu-item (click)=\"addAssertion()\" [disabled]=\"scenUtilService.ScenMode != 0 || groupArray[selectedTabIndex.groupIndex].scriptMode == 'code' || groupArray[selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.CAVISSON\">Add Assertions</button> -->\r\n                                        <button mat-menu-item (click)=\"makeOneStepPerFlow()\" [disabled]=\"scenUtilService.ScenMode != 0 || groupArray[selectedTabIndex.groupIndex].scriptMode == 'code' || groupArray[selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.CAVISSON\">Make One {{groupArray[selectedTabIndex.groupIndex].grpType == 'API'? 'Request':'Interaction'}} Per Flow</button>\r\n                                        <button *ngIf=\"groupArray[selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.RDT_NATIVE\" mat-menu-item (click)=\"convertToCrossPlatformTest()\" [disabled]=\"scenUtilService.ScenMode != 0 || groupArray[selectedTabIndex.groupIndex].scriptMode == 'code'\">Convert to Cross-Platform Test</button>\r\n\r\n                                        <button *ngIf=\"groupArray[selectedTabIndex.groupIndex].flowArr[0]?.stepsArr?.length > 0 && groupArray[selectedTabIndex.groupIndex].flowArr[0]?.reqArr?.length > 0\" mat-menu-item (click)=\"SwitchGroupMode()\" [disabled]=\"scenUtilService.ScenMode != 0 || groupArray[selectedTabIndex.groupIndex].scriptMode == 'code' || groupArray[selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.CAVISSON\">Switch to {{targetSwitchModeTestType}} Mode</button>\r\n                                    </ng-container>\r\n                                    </mat-menu> \r\n                                    <mat-menu #addParameter=\"matMenu\">\r\n                                    <button mat-menu-item (click)=\"showAPI('file')\">Dataset using File </button>\r\n                                    <button mat-menu-item (click)=\"showAPI('file-test-data-generator')\">Dataset using Auto Data Generation </button>\r\n                                    <button mat-menu-item (click)=\"showAPI('search')\">Search Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('declare')\">Scratch Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('xml')\">XML Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('dateTime')\">DateTime Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('random_string')\">Random String\r\n                                        Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('index_file')\">Index Dataset using File Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('random_number')\">Random Number\r\n                        Parameter</button>\r\n                        <button mat-menu-item (click)=\"showAPI('unique_number')\">Unique Number\r\n                        Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('json')\">Json Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('declare_array')\">Scratch Array\r\n                        Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('unique_range')\">Unique Range Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('sql')\">Dataset using Query Parameter</button>\r\n                                </mat-menu>\r\n\r\n                                    </div>\r\n                                </div>\r\n                                <div *ngIf=\"!groupArray[i].scriptMode || groupArray[i].scriptMode == 'visual'\" cdkDropList class=\"mx-6\" \r\n                                [ngClass]=\"group.isGroupPanelActive ? 'groupPanelOpen' : 'groupPanelClose' \"\r\n                                (cdkDropListDropped)=\"flowDrop($event,i)\">\r\n                                    <div cdkDrag  class=\"clickable\" [class]=\"{'selectedFlow': scenUtilService.isFlowInline == 'yes' && selectedTabIndex.flowIndex == j && selectedTabIndex.groupIndex == i}\"\r\n                                        *ngFor=\"let flow of groupArray[i]?.flowArr; let j = index\">\r\n                                        <div  class=\"p-grid p-align-center p-justify-between   mb-5 w-100-p\">\r\n                                            <div class=\"p-grid w-100-p\">\r\n                                                <!-- disable-card -->\r\n                                                <div class=\"p-grid p-align-center p-justify-center p-col-fixed px-0\"\r\n                                                [ngClass]=\"groupArray[i].flowArr[j].enable ? '':'disable-card'\" \r\n                                                    [ngStyle]=\"{'display': scenUtilService.isFlowInline === 'no' ? 'none' : 'flex' }\">\r\n                                                    <i class=\"las-braille-solid font-26\"></i>\r\n                                                </div>\r\n                                                <div class=\"p-grid p-align-center p-justify-center p-col-fixed\" \r\n                                                [ngClass]=\"groupArray[i].flowArr[j].enable ? '':'disable-card'\"\r\n                                                [ngStyle]=\"{'display': scenUtilService.isFlowInline === 'no' ? 'none' : 'flex' }\">\r\n                                                    <i (click)=\"flowTabExpandCollapseHandler(flow)\"\r\n                                                    class=\"pi pi-chevron-right pb-5 elipseText font-13 mr-5 \" \r\n                                                    [ngClass]=\" flow.isFlowTabPanelOpen ? 'panelIconClose' : 'panelIconOpen' \" ></i>\r\n                                                </div>\r\n                                                <div (click)=\"showSelectedTab(flow, 4, i, -1, j, -1)\" \r\n                                                [ngClass]=\"groupArray[i].flowArr[j].enable ? '':'disable-card'\"\r\n                                                class=\"p-col pl-0 pt-2 p-grid p-dir-col flowName \"\r\n                                                    [ngStyle]=\"{'display': scenUtilService.isFlowInline === 'no' ? 'none' : 'flex' }\">\r\n                                                    <div matTooltip=\"{{flow.flowName}}\" class=\"font-13 width-140 my-4 elipseText font-weight-500\"> {{flow.flowName}} </div>\r\n                                                    <div *ngIf=\"groupArray[i].grpType == SCENARIO.GROUP_TYPE.API\" class=\"font-13 width-140 elipseText my-4\"> {{ (((groupArray[i].flowArr[j]?.reqArr.length)/2) - 2) + 2 }} Requests</div>\r\n                                                     <div *ngIf=\"groupArray[i].grpType != SCENARIO.GROUP_TYPE.API\" class=\"font-13 width-140 elipseText my-4\"> {{ groupArray[i].flowArr[j]?.stepsArr.length }} {{ groupArray[i].flowArr[j]?.stepsArr.length === 1 ? 'Interaction' : 'Interactions' }}</div>\r\n                                                </div>\r\n\r\n                                                <div *ngIf=\"flow.refId!=null && flow.refId != '' else sharedFlow\" [ngStyle]=\"{'display': scenUtilService.isFlowInline === 'no' ? 'none' : 'flex' }\" class=\"inline-flex p-col-fixed px-0\">\r\n                                                    <i  (click)=\"importedFlowPanel.toggle($event)\" class=\"font-18 btn-icon las-cloud-download-alt-solid\" matTooltip=\"Imported Flow\"></i>\r\n                                                </div>\r\n                                                <p-overlayPanel #importedFlowPanel appendTo=\"body\" styleClass=\"popHover\">\r\n                                                    <div class=\"p-8 line-height20 width-400\">\r\n                                                        <div class=\"font-weight-600 mb-8\">Imported Flow</div>\r\n                                                        <div class=\"mb-12\">\r\n                                                            <p class=\"my-4\">This flow is <strong>imported from another Test</strong>. Any changes made to the original will be automatically reflected here and vice versa.</p>\r\n                                                            <p class=\"my-4\">To make independent changes, create a copy and unlink it from the original test.</p>\r\n                                                        </div>\r\n                                                        <button type=\"button\" pButton label=\"Make Copy & Unlink\"\r\n                                                            (click)=\"makeCopyAndUnlinkFlow(i, j); importedFlowPanel.toggle($event)\" \r\n                                                            [disabled]=\"scenUtilService.ScenMode != 0\">\r\n                                                        </button>\r\n                                                    </div>\r\n                                                </p-overlayPanel>\r\n                                                <ng-template #sharedFlow>\r\n                                                <div *ngIf=\"flow.ownerId!=null && flow.ownerId != ''\" [ngStyle]=\"{'display': scenUtilService.isFlowInline === 'no' ? 'none' : 'flex' }\" class=\"inline-flex p-col-fixed px-0\"><i (click)=\"sharedFlowPanel.toggle($event)\" class=\"font-18 btn-icon las-cloud-solid\" matTooltip=\"Shared Flow\"></i></div>\r\n                                                <p-overlayPanel #sharedFlowPanel styleClass=\"popHover\">\r\n                                                    <div class=\"p-8 line-height20 width-400\">\r\n                                                        <div class=\"font-weight-600 mb-8\">Shared Flow</div>\r\n                                                        <div class=\"mb-12\">\r\n                                                            <p class=\"my-4\">This flow is shared with other tests.</p>\r\n                                                            <p class=\"my-4\">Any changes you make here will automatically apply to all tests using this flow.</p>\r\n                                                        </div>\r\n                                                    </div>\r\n                                                </p-overlayPanel>\r\n                                                </ng-template>\r\n\r\n                                                <div class=\"p-col-fixed inline-flex pr-2\"\r\n                                                [ngStyle]=\"{'display': scenUtilService.isFlowInline === 'no' ? 'none' : 'flex' }\">\r\n                                                    <button type=\"button\" pButton [matMenuTriggerFor]=\"FlowMenu\" (click)=\"showSelectedTab(flow, 4, i, -1, j, -1)\"\r\n                                                        icon=\"icons8 icons8-menu-vertical font-18\" class=\"btn-icon-gray\">\r\n                                                    </button>\r\n                                                </div>\r\n                                            </div>\r\n                                            <mat-menu #FlowMenu=\"matMenu\">\r\n                                                <button (click)=\"cloneFlow(i,flow, j)\" [disabled]=\"scenUtilService.ScenMode != 0\" mat-menu-item>Clone\r\n                                                </button>\r\n                                                <button (click)=\"deleteFlows(i, j)\" [disabled]=\"scenUtilService.ScenMode != 0 || groupArray[i]?.flowArr.length == 1\"\r\n                                                    mat-menu-item>\r\n                                                    Delete</button>\r\n                                                <button *ngIf=\"groupArray[i].flowArr[j].enable\" (click)=\"onEnableDisableFlow(i,j)\"\r\n                                                    [disabled]=\"scenUtilService.ScenMode != 0\" mat-menu-item>Disable\r\n                                                </button>\r\n                                                <button *ngIf=\"!groupArray[i].flowArr[j].enable\" (click)=\"onEnableDisableFlow(i,j)\"\r\n                                                    [disabled]=\"scenUtilService.ScenMode != 0\" mat-menu-item>Enable\r\n                                                </button>\r\n                                            </mat-menu>\r\n                                            <ng-container *ngIf=\"groupArray[this.selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.API\">\r\n                                            <div class=\"w-100-p\" cdkDropList (cdkDropListDropped)=\"requestDrop($event,i, j)\"\r\n                                            [ngClass]=\"{\r\n                                                'flowPanelOpen': scenUtilService.isFlowInline == 'yes'   && flow.isFlowTabPanelOpen == false ,\r\n                                                'flowPanelClose': scenUtilService.isFlowInline == 'yes'   && flow.isFlowTabPanelOpen == true ,\r\n                                                \r\n                                                'pl-5': scenUtilService.isFlowInline == 'no',\r\n                                                'pl-20 backColorFlow': (scenUtilService.isFlowInline == 'yes' && selectedTabIndex.flowIndex == j && selectedTabIndex.groupIndex == i),\r\n                                                'pl-20 backColor': (scenUtilService.isFlowInline == 'yes' && selectedTabIndex.groupIndex == i),\r\n                                                'example-list': (selectedTabIndex.flowIndex != j && selectedTabIndex.groupIndex != i)}\" >\r\n                                               <div cdkDrag class=\"p-grid example-box p-0\"\r\n                                                    *ngFor=\"let request of groupArray[i].flowArr[j]?.reqArr; let k = index\"\r\n                                                    [ngClass]=\"{\r\n                                                        'disable-card': !groupArray[i].flowArr[j].reqArr[k].enable,\r\n                                                        'selectedRequest':\r\n                                                        selectedTabIndex.reqIndex === k &&\r\n                                                        selectedTabIndex.groupIndex === i &&\r\n                                                        selectedTabIndex.flowIndex === j\r\n                                                        }\">\r\n                                                    <div *ngIf=\"groupArray[i] && groupArray[i].flowArr && groupArray[i].flowArr[j] && groupArray[i].flowArr[j].reqArr && groupArray[i].flowArr[j].reqArr[k] && request.thinkTime == '-1'\"\r\n                                                        [ngClass]=\"groupArray[i].protocol?.type === 'DNS' ? groupArray[i].flowArr[j].reqArr[k].dns?.protocol : groupArray[i].flowArr[j].reqArr[k].method\"\r\n                                                        class=\"p-grid w-100-p responseBox p-nogutter1 flex-nowrap\">\r\n                                                        <div class=\"inline-flex notHover p-col-fixed width-32\">\r\n                                                            <i class=\"las-braille-solid font-26\"></i>\r\n                                                        </div>\r\n                                            \r\n                                                        <div (click)=\"showSelectedTab(request, 1, i, k, j, -1)\" class=\"p-grid urlWidth px-0 notHover\"\r\n                                                        >\r\n                                                            <div class=\"inline-flex w-100-p\">\r\n                                                                <i *ngIf=\"groupArray[i].flowArr[j]?.reqArr[k]?.assertions?.length > 0\" class=\"las-flag-checkered-solid\" ></i>\r\n                                                                <div class=\"elipseText p-5\" matTooltip=\"{{request.reqName}}\">\r\n                                                                    {{request.reqName}} </div>\r\n                                                            </div>\r\n                                                            <div *ngIf=\"groupArray[i].protocol?.type === 'DNS' && request.dns && request.dns.domain && request.dns.domain.length > 0\" class=\"p-5 elipseText w-100-p\">\r\n                                                                <span matTooltip=\"{{request.dns?.protocol}}\" class=\"font-weight-500 getHead\">\r\n                                                                    {{request.dns?.protocol || 'TCP'}}\r\n                                                                </span>\r\n                                                                <span [matTooltip]=\"request.dns?.domain\">{{ request.dns?.domain }}</span>\r\n                                                            </div>\r\n                                                                <div *ngIf=\"groupArray[i].protocol?.type !== 'DNS' && request.url && request.url.length > 0\" class=\"p-5 elipseText w-100-p\">\r\n                                                                <span matTooltip=\"{{request.method}}\"\r\n                                                                    class=\"font-weight-500 getHead\">\r\n                                                                    {{request.method}}\r\n                                                                </span>\r\n                                                                <span [matTooltip]=\"request.url\">{{ request.url }}</span>\r\n                                                                </div>\r\n                                                        </div>\r\n                                            \r\n                                                        <div class=\"p-col-fixed pr-2 inline-flex onHover width-32\">\r\n                                                            <button type=\"button\" pButton [matMenuTriggerFor]=\"requestMenu\" (click)=\"showSelectedTab(request, 1, i, k, j, -1)\"\r\n                                                                icon=\"icons8 icons8-menu-vertical font-18\" class=\"btn-icon-gray\">\r\n                                                            </button>\r\n                                                        </div>\r\n                                                        <mat-menu #requestMenu=\"matMenu\">\r\n                                                            <button (click)=\"cloneRequest(i,k,j,request)\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                                                mat-menu-item>Clone\r\n                                                            </button>\r\n                                                            <button (click)=\"deleteRequest(i,k,j)\"\r\n                                                                [disabled]=\"scenUtilService.ScenMode != 0 || groupArray[i].flowArr[j]?.reqArr.length == 1\"\r\n                                                                mat-menu-item>\r\n                                                                Delete</button>\r\n                                                            <button (click)=\"splitFlow(i,k,j,request)\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                                                mat-menu-item>Split Flow\r\n                                                            </button>\r\n                                                            <button *ngIf=\"groupArray[i].flowArr[j].reqArr[k].enable\" (click)=\"onEnableDisable(i,j,k,'request')\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                                                mat-menu-item>Disable\r\n                                                            </button>\r\n                                                            <button *ngIf=\"!groupArray[i].flowArr[j].reqArr[k].enable\" (click)=\"onEnableDisable(i,j,k,'request')\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                                                mat-menu-item>Enable\r\n                                                            </button>\r\n                                                        </mat-menu>\r\n                                                    </div>\r\n                                                </div>\r\n                                            </div>\r\n                                            </ng-container>\r\n                                            <ng-container *ngIf=\"groupArray[this.selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.BROWSER || groupArray[this.selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.RDT_NATIVE\">\r\n                                                <div cdkDropList class=\"w-100-p\" (cdkDropListDropped)=\"browserDrop($event,i, j)\"\r\n                                            [ngClass]=\"{\r\n                                                'flowPanelOpen': scenUtilService.isFlowInline == 'yes'   && flow.isFlowTabPanelOpen == false ,\r\n                                                'flowPanelClose': scenUtilService.isFlowInline == 'yes'   && flow.isFlowTabPanelOpen == true ,\r\n                                                'pl-5': scenUtilService.isFlowInline == 'no',\r\n                                                'pl-20 backColorFlow': (scenUtilService.isFlowInline == 'yes' && selectedTabIndex.flowIndex == j && selectedTabIndex.groupIndex == i),\r\n                                                'pl-20 backColor': (scenUtilService.isFlowInline == 'yes' && selectedTabIndex.groupIndex == i),\r\n                                                'example-list': (selectedTabIndex.flowIndex != j && selectedTabIndex.groupIndex != i)}\" >\r\n                                                <div cdkDrag class=\"clickable p-grid example-box p-0\"\r\n                                                    *ngFor=\"let steps of groupArray[i].flowArr[j]?.stepsArr; let k = index\"\r\n                                                    [ngClass]=\"{\r\n                                                        'disable-card': !groupArray[i].flowArr[j].stepsArr[k].enable,\r\n                                                        'selectedRequest':\r\n                                                        selectedTabIndex.browserStepsIndex === k &&\r\n                                                        selectedTabIndex.groupIndex === i &&\r\n                                                        selectedTabIndex.flowIndex === j}\">\r\n                                                    <div class=\"p-grid w-100-p py-0 responseBox GET step-menu-container flex-nowrap\">\r\n                                                        <div class=\"p-grid p-align-center p-justify-center p-col-fixed notHover\"\r\n                                                        [ngClass]=\"groupArray[i].flowArr[j].stepsArr[k].enable ? '':'disable-card'\">\r\n                                                            <i class=\"las-braille-solid font-26\"></i>\r\n                                                        </div>\r\n                                            \r\n                                                        <div (click)=\"showSelectedTab(steps, 5, i, 0, j, k)\" class=\"p-col p-grid px-0 notHover w-70-p\">\r\n                                                            <div class=\"w-100-p p-grid p-align-center flex-nowrap\">\r\n                                                                <i *ngIf=\"groupArray[i].flowArr[j]?.stepsArr[k]?.assertions?.length > 0\" class=\"las-flag-checkered-solid\" ></i> \r\n                                                                <div [matTooltip]=\"STEPS_ICON[steps.type]?.label || steps.type\"\r\n                                                                    class=\"p-col-fixed p-col-nogutter mr-5 font-13 my-4 font-weight-500 getHead\">\r\n                                                                     <ng-container *ngIf=\"STEPS_ICON[steps.type]?.icon; else showLabel\">\r\n                                                                    <i [ngClass]=\"STEPS_ICON[steps.type]?.icon\"></i>\r\n                                                                    </ng-container>\r\n                                                                      <ng-template #showLabel>\r\n                                                                         <!-- {{steps.type }} -->\r\n                                                                         <img [src]=\"'assets/icons-svg/' + steps.type + '.svg'\" class=\"width-16 height-16\"/>\r\n                                                                      </ng-template>\r\n                                                                </div>\r\n                                                                <div class=\"p-col-fixed pl-5 p-col-nogutter font-13 my-4 elipseText\" matTooltip=\"{{steps.stepName}}\">\r\n                                                                    {{steps.stepName}} </div>\r\n                                            \r\n                                                            </div>\r\n                                                        </div>\r\n                                            \r\n                                                        <div class=\"p-col-fixed inline-flex pr-2\">\r\n                                                            <button type=\"button\" pButton [matMenuTriggerFor]=\"browserMenu\" (click)=\"showSelectedTab(steps, 5, i, 0, j, k)\"\r\n                                                                icon=\"icons8 icons8-menu-vertical font-18\" class=\"btn-icon-gray step-menu-btn\">\r\n                                                            </button>\r\n                                                        </div>\r\n                                                        <mat-menu #browserMenu=\"matMenu\">\r\n                                                            <button (click)=\"cloneBrowsers(i,k,j,steps)\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                                                mat-menu-item>Clone\r\n                                                            </button>\r\n\r\n                                                            <button (click)=\"deleteBrowser(i,k,j)\"\r\n                                                                [disabled]=\"scenUtilService.ScenMode != 0 || groupArray[i].flowArr[j]?.reqArr.length == 1\"\r\n                                                                mat-menu-item>\r\n                                                                Delete</button>\r\n                                                            <button (click)=\"splitFlow(i,k,j,steps)\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                                                mat-menu-item>Split Flow\r\n                                                            </button>\r\n                                                            <button *ngIf=\"groupArray[i].flowArr[j].stepsArr[k].enable\" (click)=\"onEnableDisable(i,j,k,'steps')\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                                                mat-menu-item>Disable\r\n                                                            </button>\r\n                                                            <button *ngIf=\"!groupArray[i].flowArr[j].stepsArr[k].enable\" (click)=\"onEnableDisable(i,j,k,'steps')\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                                                mat-menu-item>Enable\r\n                                                            </button>\r\n                                                        </mat-menu>\r\n                                                    </div>\r\n                                                </div>\r\n                                            </div>\r\n                                            </ng-container>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div *ngIf=\"scenUtilService.ScenMode == 3\">\r\n                        No Requests\r\n                    </div>\r\n                    <div class=\"p-grid text-center border-4 tabBorderTop  w-100-p\">\r\n                        <div class=\"p-col  border-4  p-grid p-justify-center tabBorderRight p-10 p-align-center\">\r\n                        \r\n                            <p class=\"w-100-p p-grid p-align-center p-justify-center\">\r\n                                <span [matTooltip]=\"onShowReqDisabledTooltip()\" tooltipPosition=\"top\">\r\n                                <button pButton type=\"button\"\r\n                                    [disabled]=\"scenUtilService.ScenMode != 0 || groupArray[selectedTabIndex.groupIndex].scriptMode == 'code' || groupArray[selectedTabIndex.groupIndex].grpType === SCENARIO.GROUP_TYPE.CAVISSON || (scenUtilService.isFlowInline == 'yes' && selectedTabIndex.flowIndex == -1)\"\r\n                                    (click)=\"onAddClick(groupArray[selectedTabIndex.groupIndex].grpType)\" class=\"btn-icon btn-link-green\" icon=\"las-plus-circle-solid\">\r\n                                </button>\r\n                                </span>\r\n                            </p>\r\n\r\n\r\n                            <p class=\"w-100-p p-grid p-align-center p-justify-center\">  {{groupArray[selectedTabIndex.groupIndex].grpType != SCENARIO.GROUP_TYPE.API ? 'Interaction' : 'Request' }}</p>\r\n                        \r\n                        </div>\r\n\r\n                        <div class=\"p-col border-4  p-grid p-justify-center tabBorderRight p-10 p-align-center\" \r\n                        *ngIf=\"!(scenUtilService.isFlowInline === 'no')\">\r\n                            <p class=\"w-100-p p-grid p-align-center p-justify-center\">\r\n                                <span [matTooltip]=\"groupArray[selectedTabIndex.groupIndex].scriptMode == 'code' || groupArray[selectedTabIndex.groupIndex].grpType === SCENARIO.GROUP_TYPE.CAVISSON? 'Add Flow is disabled as selected group is using script and requests are recorded or added in the script' :''\" tooltipPosition=\"top\">\r\n                                <button pButton type=\"button\"\r\n                                    [disabled]=\"scenUtilService.ScenMode != 0 || groupArray[selectedTabIndex.groupIndex].scriptMode == 'code' || groupArray[selectedTabIndex.groupIndex].grpType === SCENARIO.GROUP_TYPE.CAVISSON\"\r\n                                    (click)=\"allowMultipleFlows()\" class=\"btn-icon btn-link-green\" icon=\"las-plus-circle-solid\">\r\n                                </button>\r\n                                </span>\r\n                            </p>\r\n                            <p class=\"w-100-p p-grid p-align-center p-justify-center\"> Flow</p>\r\n                        </div>\r\n\r\n                        <div class=\"p-col border-4 p-grid p-justify-center p-10 p-align-center\" \r\n                        *ngIf=\"testMode==TEST_MODE.PERFORMANCE\">\r\n                            <p class=\"w-100-p p-grid p-align-center p-justify-center\">\r\n                                <button pButton type=\"button\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                    (click)=\"showGroupDialog()\" class=\"btn-icon btn-link-green\"\r\n                                    icon=\"las-plus-circle-solid\"></button>\r\n                            </p>\r\n                            <p class=\"w-100-p p-grid p-align-center p-justify-center\"> Group</p>\r\n                            <mat-menu #aboveMenu=\"matMenu\">\r\n                                <button mat-menu-item> Manual Group </button>\r\n                                <button mat-menu-item>Recorder Group </button>\r\n                                <button mat-menu-item> Import script in a group</button>\r\n                            </mat-menu>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </as-split-area>\r\n            <as-split-area [size]=\"bigSplit\" class=\"relative as-split-area\">\r\n                <span class=\"toggleBtn border-5 border-all rounded-2 inline-flex height-30 width-10 pl-12\" (click)=\"toggleSidebar()\"\r\n                    [matTooltip]=\"isSidebarOpen ? 'Close Scenario Sidebar' : 'Open Scenario Sidebar'\">\r\n                    <i class=\"text-neutral-400 pi pi-caret-right d-text-neutral-400\"\r\n                        [ngClass]=\"isSidebarOpen ? 'la-flip-horizontal' : ''\"></i>\r\n                </span>\r\n                <div *ngIf=\"scenUtilService.ScenMode != 3\" [ngStyle]=\"{ 'overflow-x': showScriptTab ? 'visible' : 'hidden' }\" class=\"p-col\">\r\n                    \r\n                    <ng-container *ngIf=\"showScriptTab else designView\">\r\n                        <div class=\"w-100-p border-4 script-outlet-wrap\">\r\n                            <router-outlet name=\"script\"></router-outlet>\r\n                        </div>\r\n                    </ng-container>\r\n                    <ng-template #designView>\r\n                        \r\n                    \r\n                    <div *ngIf=\"selectedTabNum == 1\" class=\"w-100-p p-grid\">\r\n                        <ng-container>\r\n\r\n                        <div *ngIf=\"!manageInlineReqBtn\" class=\"w-100-p px-8 pr-0 pt-4 p-grid p-align-center p-justify-between pb-8 font-14 font-weight-500\">\r\n                            <div class=\"font-weight-600 inline-flex py-6\">\r\n                                <button type=\"button\" pButton class=\"btn-icon mr-6\" icon=\"icons8 icons8-left font-20\"\r\n                                (click)=\"backOnRequest()\" *ngIf=\"preRequest || postRequest\"></button>\r\n                                <span *ngIf=\"preRequest\">Pre Request</span>\r\n                                <span *ngIf=\"postRequest\">Post Response</span>\r\n                                <span *ngIf=\"!preRequest && !postRequest\">\r\n                                    <ng-container *ngIf=\"showDnsProtocolView; else genericRequestHeader\">\r\n                                        DNS Request\r\n                                    </ng-container>\r\n                                    <ng-template #genericRequestHeader>Request</ng-template>\r\n                                </span>\r\n                            </div>\r\n                            <div class=\"inline-flex\" *ngIf=\"!preRequest && !postRequest\">\r\n                                <ng-container *ngIf=\"!showDnsProtocolView\">\r\n                                    <button pButton type=\"button\" (click)=\"openManageInlineReq()\" label=\"Manage Inline Request\" class=\"mx-3 btn-primary-outline\"></button>\r\n                                </ng-container>\r\n                                <button pButton type=\"button\" class=\"btn-primary-outline ml-6\" [matMenuTriggerFor]=\"prePostProcessor\"\r\n                                    icon=\"icons8 icons8-menu-vertical\"></button>\r\n                                <mat-menu #prePostProcessor=\"matMenu\">\r\n                                    <button mat-menu-item (click)=\"preRequestFunc()\">Pre-request</button>\r\n                                    <button mat-menu-item (click)=\"postRequestFunc()\">Post-response  </button>\r\n                                    <button mat-menu-item (click)=\"conditionFunc()\">Condition</button>\r\n                                </mat-menu>\r\n                            </div>\r\n                        </div>\r\n                            <div class=\"w-100-p\" *ngIf=\"preRequest\">\r\n                                <ngx-monaco-editor style=\"height:370px; width:100%\" #scriptEditor class=\"editor-container rowText w-100-p\"\r\n                                    [options]=\"editorOptionsHdr1\"\r\n                                    [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex]?.preRequest.inline\"\r\n                                    (onInit)=\"onInitEditor($event)\">\r\n                                </ngx-monaco-editor>\r\n                            </div>\r\n                            <div class=\"w-100-p\" *ngIf=\"postRequest\">\r\n                                <ngx-monaco-editor style=\"height:370px; width:100%\" #scriptEditor class=\"editor-container rowText w-100-p\"\r\n                                    [options]=\"editorOptionsHdr1\"\r\n                                    [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex]?.postResponse.inline\"\r\n                                    (onInit)=\"onInitEditor($event)\">\r\n                                </ngx-monaco-editor>\r\n                            </div>\r\n                            <div class=\"p-grid w-100-p p-justify-end\" *ngIf=\"postRequest || preRequest\">\r\n                                <button pButton type=\"button\" matTooltip=\"Save & Compile\" (click)=\"savePrePostScript()\"\r\n                                    class=\"btn-primary-outline py-15 px-5\" style=\"font-weight: bold\">Save & Compile</button>\r\n                            </div>\r\n                            \r\n                            \r\n                        \r\n                        <div *ngIf=\"manageInlineReqBtn \" class=\"w-100-p px-6 pt-4 pb-8  p-grid p-align-center p-justify-between \">\r\n                            <div class=\"font-14  font-weight-600\" >Inline Request</div>\r\n                            <button pButton (click)=\"manageInlineReqBtn = false\" type=\"button\"  class=\"btn-primary-outline\">\r\n                                <i class=\"mr-5 pi pi-chevron-left font-16\" ></i>\r\n                                Back To Main Request\r\n                            </button>\r\n                        </div>\r\n                        <ng-container *ngIf=\"preRequestMethod\">\r\n                        <ng-container *ngIf=\"!manageInlineReqBtn && !showDnsProtocolView else dnsProtocolView\">\r\n                        <div class=\"p-col p-col-nogutter p-grid p-align-center\">\r\n                            <div class=\"p-col-fixed width-100 pr-0\">\r\n                                <div class=\" ww-100-p py-6 \" >\r\n                                    Method\r\n                                </div>\r\n                                    <mat-select class=\"mat-dropdown\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                        [ngClass]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].method\"\r\n                                        placeholder=\"Transaction Status\"\r\n                                        [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].method\">\r\n                                        <mat-option *ngFor=\"let apiList of methodOpt\" [value]=\"apiList.value\">{{ apiList.label }}\r\n                                        </mat-option>\r\n                                    </mat-select>\r\n                            </div>\r\n                            <div  class=\"py-5 p-col px-0\" (select)=\"selectTextFromRes('url')\">\r\n                                <div class=\"pb-5 pl-5 p-col px-0\" >\r\n                                    URL \r\n                                </div>\r\n                                <input cavParameterInput [cavMode]=\"'both'\" pInputText type=\"text\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                    [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].url\"\r\n                                    class=\"w-100-p getInput\" matTooltip=\"{{groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].url}}\" tooltipPosition=\"bottom\" (mousedown)=\"onUnselectClick()\" size=\"81\" pInputText\r\n                                    placeholder=\"Enter Your URL... Example: https://www.cavisson.com\" (change)=\"onRequestUrlChange()\">\r\n                            </div>\r\n                        </div>\r\n                    \r\n                        <div class=\"p-col-fixed\">\r\n                            <div class=\"p-col-fixed w-100-p pr-0\" >\r\n                                Request Name\r\n                            </div>\r\n                            <input placeholder=\"example\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].reqName\"\r\n                                pInputText matTooltip=\"{{groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].reqName}}\" tooltipPosition=\"bottom\" class=\"w-100-p\" type=\"text\" (change)=\"onReqNameChange(groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex])\">\r\n                        </div>\r\n                        <div *ngIf=\"scenUtilService.ScenMode == 0 && !manageInlineReqBtn\" class=\"p-col-fixed p-grid p-align-center p-justify-center\">\r\n                            <button type=\"button\" (click)=\"revertRequestUpdates()\" matTooltip=\"Revert Changes\" class=\"btn-icon pt-30 font-16 mr-5\"><i class=\"las-undo-alt-solid\"></i></button>\r\n                        </div>\r\n                        </ng-container>\r\n                        <ng-template #dnsProtocolView>\r\n                        <app-dns *ngIf=\"showDnsProtocolView && !manageInlineReqBtn\" class=\"w-100-p\"\r\n                            [requestData]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex]\"\r\n                            (requestNameChange)=\"onReqNameChange($event)\"\r\n                            [disabled]=\"scenUtilService.ScenMode != 0\"></app-dns>\r\n                        </ng-template>\r\n                        </ng-container>\r\n                        \r\n\r\n                        <!-- Here is new mat select for manage inline Request -->\r\n                        <div *ngIf=\"manageInlineReqBtn\" class=\"p-col p-col-nogutter p-grid p-align-center\" >\r\n                            <div class=\"p-col-fixed width-100 pr-0\">\r\n                                <mat-select class=\"mat-dropdown\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                    [ngClass]=\"inlineReqObj.method\"\r\n                                    placeholder=\"Transaction Status\"\r\n                                    [(ngModel)]=\"inlineReqObj.method\">\r\n                                    <mat-option *ngFor=\"let apiList of methodOpt\" [value]=\"apiList.value\">{{ apiList.label }}\r\n                                </mat-option>\r\n                            </mat-select>\r\n                            </div>\r\n                            <div style=\"width:80%\" class=\"py-5  px-0\" (select)=\"selectTextFromRes('url')\">\r\n                                <input pInputText type=\"text\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                    [(ngModel)]=\"inlineReqObj.url\"\r\n                                    class=\"w-100-p getInput\" (mousedown)=\"onUnselectClick()\" size=\"81\" pInputText\r\n                                    placeholder=\"Enter Your URL... Example: https://www.cavisson.com\" matTooltip=\"{{inlineReqObj.url}}\" tooltipPosition=\"bottom\" (change)=\"onRequestUrlChange()\">\r\n                            </div>\r\n        \r\n                        </div>\r\n                        <div  *ngIf=\"manageInlineReqBtn\"  class=\"py-5 width-70 pr-7  p-grid  p-align-center p-justify-end \">\r\n                            <button pButton type=\"button\" (click)=\"addInlineReq()\"  label=\"{{addLabel}}\"></button>\r\n                        </div>\r\n                        <ng-container *ngIf=\"preRequestMethod\">\r\n                        <div class=\"p-col-12 p-grid p-align-center \" [ngClass]=\"manageInlineReqBtn ? 'p-justify-end' : 'p-justify-between' \" >\r\n                        \r\n                            <div *ngIf=\"manageInlineReqBtn\" class=\"mt-5\">\r\n                                <button type=\"button\" (click)=\"onClickHeaderBody(true)\" class=\"btn-icon mr-5\">{{additionalSettingLabel}}</button>\r\n                            </div>\r\n                             \r\n                            <div *ngIf=\"!manageInlineReqBtn && !showDnsProtocolView\" class=\"p-grid p-align-center p-justify-between w-100-p\" >\r\n                                <div class=\"p-grid p-align-center\"  >\r\n                                    <div class=\"mr-35\">Think Time  </div>\r\n                                    <div class=\"ui-inputgroup width-105\">\r\n                                        <p-spinner [min]=\"0\" [step]=\"0.001\" \r\n\r\n                                        [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex + 1].thinkTime\"\r\n                                        [disabled]=\"scenUtilService.ScenMode != 0\" inputStyleClass=\"w-100-p\" (keypress)=\"validateQty($event)\" (keydown)=\"validateThinkTime($event)\" (select)=\"selectAllText()\" (click)=\"click($event)\"></p-spinner>\r\n                                        <span matTooltip=\"seconds\" class=\"ui-inputgroup-addon px-10\">sec</span>      \r\n                                    </div>\r\n                                </div>\r\n                                <div *ngIf=\"selectedTabNum == 1 && scenUtilService.ScenMode == 0 && !manageInlineReqBtn\" class=\"mr-40\">\r\n                                    <button *ngIf=\"!displayAdditionalInfo\" (click)=\"toggleAdditionalInfo()\" type=\"button\"\r\n                                        class=\"btn-icon\">\r\n                                        Show Additional Info\r\n                                    </button>\r\n                                    <button *ngIf=\"displayAdditionalInfo\" (click)=\"toggleAdditionalInfo()\" type=\"button\"\r\n                                        class=\"btn-icon\">\r\n                                        Hide Additional Info\r\n                                    </button>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </ng-container>\r\n                    </ng-container>\r\n                    \r\n                    </div>\r\n                    <div class=\"w-100-p p-grid\">\r\n                        <ng-container *ngIf=\"selectedTabNum == 0\">\r\n                            <ng-container *ngIf=\"showScriptTab else designView\">\r\n                                <div class=\"w-100-p border-4 script-outlet-wrap\">\r\n                                    <router-outlet name=\"script\"></router-outlet>\r\n                                </div>\r\n                            </ng-container>\r\n                            <ng-template #designView>\r\n\r\n                            \r\n                            <div *ngIf=\"!showParameterTab && !showPostScriptTab && !showPreScriptTab && !showRunlogicPanel\"\r\n                                class=\"w-100-p px-8 pr-0 p-grid mt-4 p-align-center p-justify-between\">\r\n                                <strong>GROUP</strong>\r\n                                <div class=\"p-grid p-align-center\">\r\n                                   \r\n                                   \r\n                                    <button pButton *ngIf=\"groupArray[selectedTabIndex.groupIndex].scriptMode != 'code' && groupArray[selectedTabIndex.groupIndex].grpType != SCENARIO.GROUP_TYPE.CAVISSON\" type=\"button\"\r\n                                        (click)=\"showParameterTab = true\" class=\"btn-primary-outline mx-3\" [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                        label=\"Manage Parameters\"></button>\r\n\r\n                                    <button pButton type=\"button\" class=\"btn-primary-outline ml-6\" [matMenuTriggerFor]=\"addScript\"\r\n                                        *ngIf=\"groupArray[selectedTabIndex.groupIndex].scriptMode != 'code' && groupArray[selectedTabIndex.groupIndex].grpType != SCENARIO.GROUP_TYPE.CAVISSON\" icon=\"icons8 icons8-menu-vertical\"></button>\r\n                                    <mat-menu #addScript=\"matMenu\">\r\n                                        <button mat-menu-item (click)=\"getCodeForScript('0', groupArray[selectedTabIndex.groupIndex])\"\r\n                                            [disabled]=\"scenUtilService.ScenMode != 0\">Pre Script</button>\r\n                                        <button mat-menu-item *ngIf=\"groupArray[selectedTabIndex.groupIndex].scriptMode != 'code'\"\r\n                                            (click)=\"getCodeForScript('1', groupArray[selectedTabIndex.groupIndex])\"\r\n                                            [disabled]=\"scenUtilService.ScenMode != 0\">Post Script</button>\r\n                                          <ng-container>  \r\n                                        <button mat-menu-item (click)=\"allowMultipleFlows()\" [disabled]=\"scenUtilService.ScenMode != 0 || groupArray[selectedTabIndex.groupIndex].scriptMode == 'code' || groupArray[selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.CAVISSON\">Add Flow</button>\r\n                                          </ng-container>\r\n                                        <button mat-menu-item (click)=\"openRunlogicPanel()\" [disabled]=\"!scenUtilService.isEditMode ||scenUtilService.ScenMode != 0 || groupArray[selectedTabIndex.groupIndex].scriptMode == 'code' || groupArray[selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.CAVISSON\">Advanced Runlogic</button>\r\n                                    </mat-menu>\r\n\r\n\r\n                                </div>\r\n                                <div class=\"w-100-p p-grid mb-8 mt-16 my-16 p-align-center p-nogutter\">\r\n                                    <div class=\"width-120\">Group Name</div>\r\n                                    <div class=\"p-col\">\r\n                                        <input type=\"text\" class=\"w-100-p\" pInputText\r\n                                            [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                            [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].grpName\"\r\n                                            (change)=\"onGroupChange($event)\">\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"w-100-p p-grid my-8 p-align-center p-nogutter\" *ngIf=\"testMode != TEST_MODE.FUNCTIONAL\">\r\n                                    <div class=\"width-120\" *ngIf=\"(scenScheduleData.scenarioType == 'Mix Mode' && groupArray[selectedTabIndex.groupIndex].scenType == 'Fix Concurrent Users' && scenScheduleData.distributeMode == 'By Numbers') || \r\n                                    (scenScheduleData.scenarioType == 'Fix Concurrent Users' && scenScheduleData.distributeMode == 'By Numbers')\">Users </div>\r\n                                    <div class=\"width-120\" *ngIf=\"((scenScheduleData.scenarioType == 'Mix Mode' && groupArray[selectedTabIndex.groupIndex].scenType == 'Fix Session Rate' && scenScheduleData.distributeMode == 'By Numbers') || \r\n                                    (scenScheduleData.scenarioType == 'Fix Session Rate' && scenScheduleData.distributeMode == 'By Numbers'))\">Sessions/Minute</div>\r\n                                    <div class=\"width-120\" *ngIf=\"scenScheduleData.distributeMode == 'By Percentage'\">Percentage</div>\r\n                                    <div class=\"p-col-2\" *ngIf=\"scenScheduleData.distributeMode == 'By Numbers'\">\r\n                                        <p-spinner inputStyleClass=\"w-100-p\" [min]=\"0\" [max]=\"100000000000\"\r\n                                            [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                            [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].numVUser\"\r\n                                            (onChange)=\"updateGroupAndPhaseData('change')\" (keypress)=\"validateQty($event)\"></p-spinner>\r\n                                    </div>\r\n                                    <div class=\"p-col-2\" *ngIf=\"scenScheduleData.distributeMode == 'By Percentage'\">\r\n                                        <p-spinner inputStyleClass=\"w-100-p\" [min]=\"0\"\r\n                                            [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                            [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].percentage\"\r\n                                            (onChange)=\"updateGroupAndPhaseData('change')\" (keypress)=\"validateQty($event)\"></p-spinner>\r\n                                    </div>\r\n\r\n                                    <div class=\"w-100-p p-grid p-align-center my-8\" *ngIf=\"scenScheduleData.scenarioType == 'Mix Mode'\">      \r\n                                        <div class=\"width-120 p-col-nogutter\">\r\n                                        Test Type\r\n                                        </div>\r\n                                        <div class=\"p-col-4 p-col-nogutter\">\r\n                                            <p-dropdown [options]=\"scenTypeOptionsAd\" [style]=\"{'min-width': '100%'}\"  dropdownIcon=\"icons8 icons8-expand-arrow\" [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].scenType\"></p-dropdown>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"w-100-p p-grid my-8 p-align-center p-nogutter\"\r\n                                    *ngIf=\"groupArray[selectedTabIndex.groupIndex].grpType == SCENARIO.GROUP_TYPE.CAVISSON || groupArray[selectedTabIndex.groupIndex].scriptMode == 'code'\">\r\n                                    <div class=\"width-120 \">Script Name</div>\r\n                                    <div class=\"p-col-9\">\r\n                                        <input type=\"text\" class=\"w-100-p\" pInputText\r\n                                            [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].scriptName.split('/')[2]\"\r\n                                            disabled readonly>\r\n                                    </div>\r\n                                    <div>\r\n                \t\t\t\t\t<button pButton type=\"button\" tooltipPosition=\"bottom\" matTooltip=\"Customize the script by editing it from the Group Details section of Load Configuration.\" \r\n                                        class=\"btn-icon\" icon=\"icons8 icons8-info font-18\" style=\"cursor: default;\"></button>\r\n                                    </div>\r\n                                </div>\r\n                                \r\n                                <div class=\"p-grid p-align-center pr-10\"\r\n                                *ngIf=\"selectText && scenUtilService.ScenMode == 0 && groupArray[selectedTabIndex.groupIndex].scriptMode != 'code' && scenUtilService.parameterOption.length > 1\">\r\n                                <ng-container>\r\n                                    <label>Replace selected text by</label>\r\n                                    <p-dropdown class=\"mx-5\" [options]=\"scenUtilService.parameterOption\" [(ngModel)]=\"selectedParameter\"\r\n                                        [style]=\"{'min-width':'205px'}\" dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\r\n                                    <button type=\"button\" pButton class=\"btn-icon\" icon=\"pi pi-check-circle font-22\"\r\n                                        matTooltip=\"Apply\" (click)=\"addReplaceAction()\"></button>\r\n                                </ng-container>\r\n                            </div> \r\n                            </div>\r\n                            <div *ngIf=\"showParameterTab\" class=\"w-100-p pl-0 p-grid p-align-center relative font-14\">\r\n\r\n                                <div *ngIf=\"showParameterTab\" class=\"p-grid p-align-center w-100-p my-8 p-justify-between \">\r\n                                    <button style=\"padding-left:0px !important\" pButton type=\"button\" matTooltip=\"Back to group details\" (click)=\"showParameterTab = false\"\r\n                                        class=\"mr-5 btn-icon\"> <i class=\"icons8 icons8-left font-20\"></i> </button> \r\n                                    <div>\r\n                                        <button pButton type=\"button\" class=\"btn-primary-outline\" [matMenuTriggerFor]=\"addParameter\">Add Parameters</button>\r\n                                        <!-- <button pButton class=\"btn-primary-outline mx-3 btn-primary-outline\"\r\n                                            (click)=\"addAssertion()\">Add Assertions</button> -->\r\n                                    </div>\r\n                                </div>\r\n\r\n                                <mat-menu #addParameter=\"matMenu\">\r\n                                    <button mat-menu-item (click)=\"showAPI('file')\">Dataset using File </button>\r\n                                    <button mat-menu-item (click)=\"showAPI('file-test-data-generator')\">Dataset using Auto Data Generation </button>\r\n                                    <button mat-menu-item (click)=\"showAPI('search')\">Search Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('declare')\">Scratch Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('xml')\">XML Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('dateTime')\">DateTime Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('random_string')\">Random String\r\n                                        Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('index_file')\">Index Dataset using File Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('random_number')\">Random Number\r\n                        Parameter</button>\r\n                        <button mat-menu-item (click)=\"showAPI('unique_number')\">Unique Number\r\n                        Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('json')\">Json Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('declare_array')\">Scratch Array\r\n                        Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('unique_range')\">Unique Range Parameter</button>\r\n                                    <button mat-menu-item (click)=\"showAPI('sql')\">Dataset using Query Parameter</button>\r\n                                </mat-menu>\r\n                                <!-- <mat-menu #checkpoints=\"matMenu\">\r\n                                    <button mat-menu-item (click)=\"addAssertion()\">Add Assertion</button>\r\n                                </mat-menu> -->\r\n                                \r\n                                <div class=\"tableScroll\">\r\n                                    <div *ngIf=\"showParameterTab\">\r\n                                        <cav-table [value]=\"paramTableData\" [headerRelativePath]=\"relativeParaHead\"\r\n                                            (clickButtonEvent)=\"clickButtonEvent($event)\" [scrollable]=\"true\" [responsive]=\"true\"\r\n                                            scrollHeight=\"calc(100vh - 240px)\"></cav-table>\r\n                                    </div>\r\n                                    <!-- <div class=\"my-16\">\r\n                                        <cav-table [value]=\"assertionTableData\" [headerRelativePath]=\"relativetableAssertionHead\"\r\n                                            (clickButtonEvent)=\"clickButtonEvent($event)\" [scrollable]=\"true\" [responsive]=\"true\"\r\n                                            scrollHeight=\"calc(100vh - 240px)\"></cav-table>\r\n                                \r\n                                    </div> -->\r\n                                </div>\r\n\r\n\r\n                                <div *ngIf=\"!showParameterTab\" class=\"p-col-12  p-grid p-align-center p-justify-end\">\r\n                                    <button pButton (click)=\"revertGroupUpdates()\" type=\"button\"\r\n                                        label=\"Discard Changes \"></button>\r\n                                </div>\r\n                            </div>\r\n\r\n                            <div *ngIf=\"showPreScriptTab\" class=\"w-100-p\">\r\n                                <div class=\"p-grid p-align-center p-justify-between w-100-p\">\r\n                                    <div class=\"p-col-fixed p-grid p-align-center\">\r\n                                        <button pButton type=\"button\" matTooltip=\"Back to group details\" (click)=\"showPreScriptTab = false\"\r\n                                            class=\"mr-5 btn-icon mln-15\"> <i class=\"icons8 icons8-left font-20\"></i> </button>\r\n                                        <strong>Pre-Script</strong>\r\n                                        <app-help  [helpFileName]=\"'pre-script'\"  [helpTitle]=\"'Pre Script'\" [helpFolder]=\"'scenario'\"></app-help>           \r\n                                    </div>\r\n                                    <button pButton type=\"button\" icon=\"icons8 icons8-enlarge\" matTooltip=\"Enlarge\" (click)=\"prePostScriptDialogHandler('pre')\"\r\n                                        class=\"mr-5 btn-icon mln-15\"> </button>\r\n                                </div>\r\n\r\n                                <div class=\"w-100-p\">\r\n                                    <ngx-monaco-editor style=\"height:370px; width:100%\" #scriptEditor class=\"editor-container rowText w-100-p\"\r\n                                        [options]=\"editorOptionsHdr1\" [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].prescript\"\r\n                                        (onInit)=\"onInitEditor($event)\">\r\n                                    </ngx-monaco-editor>\r\n                                </div>\r\n                                <div class=\"p-grid w-100-p p-justify-end\">\r\n                                    <button pButton type=\"button\" matTooltip=\"Save & Compile\" (click)=\"savePrePostScript()\"\r\n                                            class=\"btn-primary-outline py-15 px-5\" style=\"font-weight: bold\">Save & Compile</button>  \r\n                                </div>\r\n                            \r\n                            </div>\r\n                            <div *ngIf=\"showPostScriptTab\" class=\"w-100-p\">\r\n                                <div class=\"p-grid p-align-center p-justify-between w-100-p\">\r\n                                    <div class=\"p-col-fixed p-grid p-align-center\">\r\n                                        <button pButton type=\"button\" matTooltip=\"Back to group details\" (click)=\"showPostScriptTab = false\"\r\n                                        class=\"mr-5 btn-icon mln-15\"> <i class=\"icons8 icons8-left font-20\"></i> </button>\r\n                                        <strong>Post-Script</strong>\r\n                                        <app-help  [helpFileName]=\"'post-script'\"  [helpTitle]=\"'Post Script'\" [helpFolder]=\"'scenario'\"></app-help>              \r\n                                    </div>\r\n                                    <button pButton type=\"button\" icon=\"icons8 icons8-enlarge\" matTooltip=\"Enlarge\" (click)=\"prePostScriptDialogHandler('post')\"\r\n                                        class=\"mr-5 btn-icon mln-15\"> </button>\r\n                                </div>\r\n                                <div class=\"w-100-p\">\r\n                                    <ngx-monaco-editor style=\"height:370px; width:100%\" #scriptEditor class=\"editor-container rowText w-100-p\"\r\n                                        [options]=\"editorOptionsHdr1\" [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].postscript\"\r\n                                        (onInit)=\"onInitEditor($event)\">\r\n                                    </ngx-monaco-editor>\r\n                                </div>\r\n                                <div class=\"p-grid w-100-p p-justify-end\">\r\n                                    <button pButton type=\"button\" matTooltip=\"Save & Compile\" (click)=\"savePrePostScript()\"\r\n                                            class=\"btn-primary-outline py-15 px-5\" style=\"font-weight: bold\">Save & Compile</button>  \r\n                                </div>\r\n                            </div>\r\n                            <div *ngIf=\"showRunlogicPanel\" class=\"w-100-p\">\r\n                                <div class=\"w-100-p\">\r\n                                    <app-no-code-runlogic [groupData]=\"groupArray[selectedTabIndex.groupIndex]\" (closePanel)=\"closeRunlogicPanel()\"></app-no-code-runlogic>\r\n                                </div>\r\n                            </div>\r\n                           </ng-template> \r\n                        </ng-container>\r\n                        <div *ngIf=\"selectedTabNum == 3\" class=\"w-100-p p-10\">\r\n                            <router-outlet name=\"recorder\"></router-outlet>\r\n                        </div>\r\n\r\n                        <div class=\"p-grid p-align-center pr-10\"\r\n                            *ngIf=\"selectText && scenUtilService.ScenMode == 0 && groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex]?.thinkTime == '-1' && scenUtilService.parameterOption.length > 1\">\r\n                            <ng-container>\r\n                                <label>Replace selected text by</label>\r\n                                <p-dropdown class=\"mx-5\" [options]=\"scenUtilService.parameterOption\" [(ngModel)]=\"selectedParameter\"\r\n                                    [style]=\"{'min-width':'205px'}\" dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\r\n                                <button type=\"button\" pButton class=\"btn-icon\" icon=\"pi pi-check-circle font-22\"\r\n                                    matTooltip=\"Apply\" (click)=\"addReplaceAction(manageInlineReqBtn ? true : false)\"></button>\r\n                            </ng-container>\r\n                        </div>\r\n                        \r\n                        <div *ngIf=\"manageInlineReqBtn && groupArray[selectedTabIndex.groupIndex]?.flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex]?.inlineReqArr && groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex].reqArr[selectedTabIndex.reqIndex].inlineReqArr.length != 0\" class=\"w-100-p\">\r\n                            <div class=\"mt-24 mb-8 pr-7 p-grid p-align-center p-justify-end\">\r\n                                <p-multiSelect [panelStyle]=\"{'maxWidth' : '128px'}\" [style]=\"{width:'160px'}\" appendTo=\"body\" defaultLabel=\"Show Columns\" [options]=\"showColumnsOptions\" optionLabel=\"header\" [(ngModel)]=\"showColumnsOptionsValue\" (onChange)=\"addColumnsOnChange($event)\"></p-multiSelect>\r\n                            </div>    \r\n                            <div  class=\"w-100-p pr-7\">\r\n                                <p-table  [columns]=\"inlineReqTableHead\"  [value]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex].reqArr[selectedTabIndex.reqIndex].inlineReqArr\" [scrollable]=\"true\" scrollHeight=\"150px\"  class=\"new-table\">\r\n                                    <ng-template pTemplate=\"caption\">\r\n                                        Inline Request List\r\n                                    </ng-template>\r\n                                    <ng-template pTemplate=\"colgroup\" let-columns>\r\n\r\n                                        <colgroup *ngFor=\"let cols of inlineReqTableHead\">\r\n                                            <col *ngIf=\"cols.field == 'url'\" style=\"width:45px\">\r\n                                            <col *ngIf=\"cols.field == 'method'\" style=\"width:13px\">\r\n                                            <col *ngIf=\"cols.field == 'reqName'\" style=\"width:21px\">\r\n                                            <col *ngIf=\"cols.field == 'repeatInline'\" style=\"width:16px\">\r\n                                        </colgroup>  \r\n                                        <colgroup>\r\n                                            <col style=\"width:15px\">\r\n                                        </colgroup>                                  \r\n                                    </ng-template>\r\n                                    <ng-template pTemplate=\"header\" let-columns>\r\n                                        <tr>\r\n                                        \r\n                                            <th *ngFor=\"let col of columns\" [pSortableColumn]=\"col.field\" >\r\n                                                {{col.header}}\r\n                                                <p-sortIcon [field]=\"col.field\" ></p-sortIcon>\r\n                                            </th>\r\n                                            <th>Action</th>\r\n                                        </tr>\r\n                                    </ng-template>\r\n                                    <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n                                        <tr [pSelectableRow]=\"rowData\" [pSelectableRowIndex]=\"rowIndex\">\r\n                                        \r\n                                            <td [ngClass]=\"'text-left'\" *ngFor=\"let col of columns\">\r\n                                                <span *ngIf=\"col.field == 'url'\" [matTooltip]=\"rowData[col.field]\" class=\"elipseText\">{{rowData[col.field]}}</span>\r\n                                                <span *ngIf=\"col.field == 'method'\" [matTooltip]=\"rowData[col.field]\" class=\"elipseText\">{{rowData[col.field]}}</span>\r\n                                                <span *ngIf=\"col.field == 'reqName'\" [matTooltip]=\"rowData[col.field] ? rowData[col.field] : '-'\" class=\"elipseText\">{{rowData[col.field] ? rowData[col.field] : \"-\"}}</span>\r\n                                                <span *ngIf=\"col.field == 'repeatInline'\" [matTooltip]=\"rowData[col.field] ? setTooltipForInlineVal(rowData[col.field]) : 'Inline URL will not repeat.'\" class=\"elipseText\">{{rowData[col.field] ? rowData[col.field] : \"-\"}}</span>\r\n                                            </td>\r\n                                            <td class=\"text-center\">\r\n                                                    <button  class=\"btn-icon\" pButton icon=\"las-edit\" (click)=\"onInlineReqMenuClick(rowData, rowIndex);editInlineRequest()\" tooltipPosition=\"top\" matTooltip=\"Edit\" [disabled]=\"scenUtilService.ScenMode != 0\"></button>\r\n                                                    <button  class=\"btn-icon\" pButton icon=\"icons8 icons8-trash\" (click)=\"onInlineReqMenuClick(rowData, rowIndex);deleteInlineRequest()\" tooltipPosition=\"top\" matTooltip=\"Delete\" [disabled]=\"scenUtilService.ScenMode != 0\"></button>\r\n                                                    <button type=\"button\" pButton [matMenuTriggerFor]=\"inlineReqListMenu\" (click)=\"onInlineReqMenuClick(rowData, rowIndex)\"\r\n                                                        icon=\"icons8 icons8-menu-vertical font-18\" class=\"btn-icon-gray\" [disabled]=\"scenUtilService.ScenMode != 0\">\r\n                                                    </button>\r\n                                                <mat-menu #inlineReqListMenu=\"matMenu\">\r\n                                                    <button  mat-menu-item (click)=\"setRepeatInline()\">Repeat Inline</button>\r\n                                                    <button  mat-menu-item (click)=\"setTxnName()\">Set Transaction name</button>\r\n                                                    <button  mat-menu-item (click)=\"onSplitPage()\">Split Request</button>\r\n                                                    <button  mat-menu-item (click)=\"onClickHeaderBody(false, rowIndex)\">Additional Info</button>                                      \r\n                                                </mat-menu>\r\n                                            </td>\r\n                                        </tr>\r\n                                    </ng-template>\r\n                                </p-table>\r\n                            </div>\r\n                        </div>\r\n                        <div *ngIf=\"displayAdditionalInfo && selectedTabNum == 1 && !manageInlineReqBtn && !showDnsProtocolView\" class=\"mx-10 w-100-p\">\r\n                            <p-tabView (onChange)=\"onAdditionalInfoTabChange($event)\">\r\n                                <p-tabPanel header=\"HEADERS\">\r\n                                    <div class=\"border-4 w-100-p tabBorder\">\r\n                                        <div class=\"p-grid border-4 tabBorderBottom w-100-p p-align-center p-5 p-justify-between\">\r\n                                        \r\n                                        <button type=\"button\" pButton class=\"btn-secondary-outline btn-sm\" (click)=\"hideDefaultHeaders()\" [disabled]=\"isHeaderEditorDisplay\">\r\n                                        <span class=\"p-grid p-align-center\">  \r\n                                        <i [ngClass]=\"!showHeaders ? 'las-eye-solid mx-3' : 'las-eye-slash-solid mx-3'\" ></i>  \r\n                                        <strong *ngIf=\"!showHeaders\" matTooltip=\"These headers will be automatically added and sent with the request. Click to view these headers. \" > Show auto-generated headers </strong>\r\n                                        <strong *ngIf=\"showHeaders\" matTooltip=\"Click to hide these headers. They will still be automatically added and sent with the reguest.\" > Hide auto-generated headers </strong></span>\r\n                                        </button>\r\n                                        \r\n                                            <div class=\"p-grid p-align-center\">\r\n                                            <span class=\"mx-5\">\r\n                                                View : Key-Value\r\n                                            </span>\r\n                                            <span class=\"mx-5\">\r\n                                                <p-inputSwitch [(ngModel)]=\"isHeaderEditorDisplay\"\r\n                                                    (onChange)=\"onHeaderInpSwitchChange($event)\"></p-inputSwitch>\r\n                                            </span>\r\n                                            <span>Text</span>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"p-5 first2Disable\" [ngClass]=\"isHeaderEditorDisplay ? 'd-none': 'd-block'\" style=\"max-height: 184px;overflow: auto;\">\r\n                                            <div *ngFor=\"let header of groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].headers; let i = index\"\r\n                                                class=\"p-grid p-align-center w-100-p\">\r\n                                                <ng-template [ngIf]=\"header['del'] || showHeaders || (!header['del'] && (header['headerKey']['name'] == '' || header['headerValue']['name'] == ''))\">\r\n                                                    <div class=\" p-col-1 text-center\">\r\n                                                        <p-checkbox name=\"groupname\" value=\"val1\" [(ngModel)]=\"header['chk']\"\r\n                                                            binary=\"true\"\r\n                                                            [disabled]=\"!header['del'] && (i != groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].headers.length - 1)\">\r\n                                                        </p-checkbox>\r\n                                                    </div>\r\n                                                    <div class=\"p-col-5 relative\"\r\n                                                        (select)=\"selectTextFromRes('tableHeader',i,'headerKey')\">\r\n                                                        <p-autoComplete [(ngModel)]=\"header['headerKey']\"\r\n                                                            [disabled]=\"!header['del'] && (i != groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].headers.length - 1)\"\r\n                                                            [suggestions]=\"headersKeySuggestions\"\r\n                                                            (completeMethod)=\"filterHeaderSuggestions($event,'headerKey',header)\"\r\n                                                            field=\"name\" [inputStyle]=\"{'width' : '100%'}\"\r\n                                                            (keyup)=\"onHeaderKeyUp(i, $event,'headerKey')\" appendTo=\"body\"\r\n                                                            [minLength]=\"1\">\r\n                                                        </p-autoComplete>\r\n                                                        <i *ngIf=\"header['toolTip'] != undefined && !header['del']\" class=\"infoI icons8 icons8-info\" tooltipStyleClass=\"max-width-400\" [matTooltip]=\"header['toolTip']\"></i>\r\n                                                    </div>\r\n                                                    <div class=\"p-col-5 relative\"\r\n                                                        (select)=\"selectTextFromRes('tableHeader',i,'headerValue')\">\r\n                                                        <p-autoComplete [(ngModel)]=\"header['headerValue']\"\r\n                                                            [disabled]=\"!header['del'] && (i != groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].headers.length - 1)\"\r\n                                                            [suggestions]=\"headersValueSuggestions\"\r\n                                                            (completeMethod)=\"filterHeaderSuggestions($event,'headerValue',header)\"\r\n                                                            field=\"name\" [inputStyle]=\"{'width' : '100%'}\"\r\n                                                            (keyup)=\"onHeaderKeyUp(i, $event,'headerValue')\" appendTo=\"body\"\r\n                                                            [minLength]=\"1\">\r\n                                                        </p-autoComplete>\r\n                                                    </div>\r\n                                                    <div class=\"p-col-1 text-center\">\r\n                                                        <button type=\"button\" [disabled]=\"!header['del']\"\r\n                                                            (click)=\"deleteHeader(i)\" class=\"btn-icon mr-5\"><i\r\n                                                                class=\"icons8 icons8-trash\"></i></button>\r\n                                                    </div>\r\n                                                </ng-template>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"p-5\" [ngClass]=\"isHeaderEditorDisplay ? 'd-block': 'd-none'\">\r\n                                            <div style=\"height: 195px;\" (select)=\"selectTextFromRes('header')\">\r\n                                                <ngx-monaco-editor class=\"rowText\" #editor style=\"height: 100%;\"\r\n                                                    [options]=\"editorOptionsHdr\" (mousedown)=\"onUnselectClick()\"\r\n                                                    [(ngModel)]=\"headerEditorData\">\r\n                                                </ngx-monaco-editor>\r\n                                            </div>\r\n                                        </div>\r\n\r\n                                    </div>\r\n                                </p-tabPanel>\r\n                                <p-tabPanel header=\"BODY\">\r\n                                    <div class=\"border-4 w-100-p tabBorder\">\r\n                                        <div class=\"bodyEditor border-4\">\r\n                                            <ul class=\"cusTab\">\r\n                                                <li *ngFor=\"let resTab of resTabList\" (click)=\"onBodyTabSelect(resTab)\"\r\n                                                    [ngClass]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].bodyType == resTab.name.toLowerCase() ? 'active' : ''\">\r\n                                                    {{resTab.name}}\r\n                                                </li>\r\n                                            </ul>\r\n                                            <div class=\"p-grid p-align-center\">\r\n                                                <div *ngIf=\"fetchingBody\" class=\"mb-3 p-grid\">\r\n                                                    <i class=\"pi pi-spin pi-spinner\"></i> <span class=\"mt-3\">Fetching body...</span>\r\n                                                </div>\r\n                                                <div *ngIf=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].isBodyEditor\">\r\n                                                    <button pButton (click)=\"resetBody(false)\" pTooltip=\"Reset body\"\r\n                                                        class=\"btn-icon mr-5\" icon=\"icons8 icons8-reboot\"></button>                                                \r\n                                                </div>\r\n                                            <div class=\"upload-btn-wrapper\"\r\n                                                *ngIf=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].isBodyEditor\">\r\n                                                 <label for=\"bodyFile\" class=\"fileLabel btn-icon\">\r\n                                                    <i class=\"icons8 icons8-upload mr-2\"></i>\r\n                                                    <span>Upload</span>\r\n                                                </label>   \r\n                                                <input pInputText type=\"file\" name=\"myBody\" id=\"bodyFile\"\r\n                                                    (change)=\"onImportBody($event.target.files, false)\"\r\n                                                    class=\"fileInput\"/>\r\n                                            </div>\r\n                                            <button type=\"button\" pButton icon=\"pi pi-window-maximize\" *ngIf=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].isBodyEditor\"\r\n                                            class=\"btn-icon ml-5\" matTooltip=\"Maximize\" (click)=\"onBodyMaximize()\"></button>\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"p-5 from-data\"\r\n                                            [ngClass]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].isBodyEditor ? 'd-none': 'd-block'\">\r\n                                            <div *ngFor=\"let body of groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].bodyArr; let i = index\"\r\n                                                class=\"p-grid p-align-center w-100-p\">\r\n                                                <div class=\" p-col-1 p-grid p-align-center p-justify-center \">\r\n                                                    <p-checkbox name=\"groupname\" value=\"val1\" [(ngModel)]=\"body['chk']\"\r\n                                                        binary=\"true\">\r\n                                                    </p-checkbox>\r\n                                                </div>\r\n                                                <div class=\"p-col-5 relative myHover\">\r\n                                                    <ng-container (select)=\"selectTextFromRes('tableBody',i,'bodyKey')\">\r\n                                                    <p-autoComplete [(ngModel)]=\"body['bodyKey']\"\r\n                                                        [disabled]=\"!body['del'] && (i != groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].bodyArr.length - 1)\"\r\n                                                        [suggestions]=\"bodyKeySuggestions\"\r\n                                                        (completeMethod)=\"filterBodySuggestions($event,'bodyKey',body)\"\r\n                                                        field=\"name\" (keyup)=\"onBodyKeyUp(i, $event,'bodyKey')\"\r\n                                                        appendTo=\"body\" [minLength]=\"1\" inputStyleClass=\"w-100-p\">\r\n                                                    </p-autoComplete>\r\n                                                    </ng-container>\r\n                                                    \r\n                                                <ng-container *ngIf=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].bodyType == 'form-data'\">\r\n                                                    <p-dropdown [options]=\"body['bodyKeyOpt']\" [(ngModel)]=\"body['bodyKeySel']\" class=\"randomLinst\" dropdownIcon=\"icons8 icons8-expand-arrow\"\r\n                                                        appendTo=\"body\"  [style]=\"{'min-width':'70px','max-width': '70px'}\">\r\n                                                    </p-dropdown>\r\n                                                </ng-container>\r\n                                                </div>\r\n\r\n\r\n                                                <div class=\"p-col\" (select)=\"selectTextFromRes('tableBody',i,'bodyValue')\">\r\n                                                    <p-autoComplete [(ngModel)]=\"body['bodyValue']\"\r\n                                                        [disabled]=\"!body['del'] && (i != groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].bodyArr.length - 1)\"\r\n                                                        [suggestions]=\"bodyValueSuggestions\" (completeMethod)=\"filterBodySuggestions($event,'bodyValue',body)\"\r\n                                                        field=\"name\" (keyup)=\"onBodyKeyUp(i, $event,'bodyValue')\" appendTo=\"body\" [minLength]=\"1\" inputStyleClass=\"w-100-p\"\r\n                                                        *ngIf=\"(groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].bodyType == 'form-data' && body['bodyKeySel'] == 'text') || groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].bodyType == 'x-www-form-urlencoded'\">\r\n                                                    </p-autoComplete>\r\n                                                    <div class=\"ui-inputgroup relative\" *ngIf=\"(body['bodyKeySel'] == 'file' && groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].bodyType == 'form-data')\">\r\n                                                        <input type=\"text\" class=\"w-100-p\" pInputText placeholder=\"\" title=\"Upload file\"\r\n                                                            [(ngModel)]=\"body['bodyValue']['name']\">\r\n                                                        <button pButton icon=\"icons8 icons8-folder\"></button>\r\n                                                        <input type=\"file\" name=\"bodyKeyFile\" id=\"bodyKeyFile\"\r\n                                                            accept=\".txt,.csv,.xls,.xlsx,.pdf,.btr,.btt,.cd,.err,.mml,.eml,.ecf,.hmc,.png,.jpg,.log,.jmx,.json,.xml,.adr,.conf,.dat,.ads,.pem,.cer,.crt,.p7b,.p7r,.p12,.pfx,.text,.yaml\"\r\n                                                            title=\"\" class=\"upload\" (change)=\"onChangeBodyKeyFile($event.target.files, body)\">\r\n                                                    </div>\r\n                                                </div>\r\n                                                <div class=\"p-col-fixed text-center\">\r\n                                                    <button type=\"button\" [disabled]=\"!body['del']\" (click)=\"deleteBody(i)\"\r\n                                                        class=\"btn-icon mr-5\"><i class=\"icons8 icons8-trash\"></i></button>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                       \r\n                                        <div class=\"p-5\" [ngClass]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].isBodyEditor ? 'd-block': 'd-none'\">\r\n                                            <div style=\"height: 195px;\" (select)=\"selectTextFromRes('body')\">\r\n                                                <ngx-monaco-editor class=\"rowText\" style=\"height: 100%;\" #bodyEditor\r\n                                                    (onInit)=\"onInitEditorBody($event)\" (mousedown)=\"onUnselectClick()\"\r\n                                                    [options]=\"bodyEditorOptions\"\r\n                                                    [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].isLargeBody ? groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].largeBody : groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].body\">\r\n                                                </ngx-monaco-editor>\r\n                                            </div>\r\n                                        </div>\r\n                                      \r\n                                    </div>\r\n                                </p-tabPanel>\r\n                                   <p-tabPanel header=\"ASSERTIONS\">\r\n                                    <div>\r\n                                        <!-- gropupIndex: {{selectedTabIndex.groupIndex}}\r\n                                        flowIndex: {{selectedTabIndex.flowIndex}}\r\n                                        requestIndex: {{selectedTabIndex.reqIndex}} -->\r\n                                        <app-assertion [assertConfig]=\"assertionConfig\" (assertConfigChange)=\"onAssertionConfigChange($event)\" [pageName]=\"currentPageName\" [groupName]=\"groupArray[selectedTabIndex.groupIndex].grpName\" [flowName]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.flowName\" [allPages]=\"pageNames\"></app-assertion>\r\n                                    </div>\r\n                                    <!-- <pre>{{ assertionConfig | json }}</pre> -->\r\n                                   </p-tabPanel>\r\n                            </p-tabView>\r\n                        </div>\r\n                    </div>\r\n                    <div *ngIf=\"selectedTabNum == 2\">\r\n                        <div class=\"w-100-p p-10\">\r\n                            <div class=\"p-grid p-align-center w-100-p\">\r\n                                <div class=\"p-col-2 p-col-nogutter\">\r\n                                    Think Time\r\n                                </div>\r\n                                <div class=\"p-col-10 p-col-nogutter\">\r\n                                    <p-spinner [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].thinkTime\"\r\n                                    [min]=\"1\" (keypress)=\"validateQty($event)\" [disabled]=\"scenUtilService.ScenMode == 1\"></p-spinner> sec(s)\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"p-col-12  p-grid p-align-center p-justify-end\">\r\n                                <button pButton (click)=\"revertRequestUpdates()\" type=\"button\"\r\n                                    label=\"Discard Changes \"></button>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div *ngIf=\"selectedTabNum == 4\">\r\n                        <div class=\"w-100-p p-10\">\r\n                            <div class=\"w-100-p pl-0 p-grid p-align-center p-justify-between font-14 p-nogutter\">\r\n                                <div class=\"p-col-2\">\r\n                                    <strong>Flow</strong>\r\n                                </div>\r\n                                <div class=\"w-100-p p-grid mb-8 mt-16 my-16 p-align-center p-nogutter\">\r\n                                    <div class=\"width-120\">Flow Name</div>\r\n                                    <div class=\"p-col-9\">\r\n                                        <input type=\"text\" class=\"w-100-p\" pInputText\r\n                                            [disabled]=\"scenUtilService.ScenMode != 0\"\r\n                                            [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex].flowName\" (change)=\"onFlowNameChange()\">\r\n                                    </div>\r\n                                    <button type=\"button\" (click)=\"revertFlowUpdates()\" matTooltip=\"Revert Changes\" class=\"btn-icon font-16 mr-5 ml-10\"><i class=\"las-undo-alt-solid\"></i></button>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n\r\n                    <ng-container *ngIf=\"selectedTabNum == 5\">\r\n                        <app-browser-interaction \r\n                        [browserStepsConfig]=\"selectedBrowserData\" \r\n                        [groupType]=\"groupArray[this.selectedTabIndex.groupIndex].grpType\" \r\n                        [isCrossPlatformGroup]=\"isRdtGroupCrossPlatform(groupArray[this.selectedTabIndex.groupIndex])\" \r\n                        [rdtNativeConfig]=\"groupArray[this.selectedTabIndex.groupIndex][SCENARIO.GROUP_TYPE.RDT_NATIVE]\"\r\n                        [assertConfig]=\"assertionConfig\"\r\n                        (assertConfigChange)=\"onAssertionConfigChange($event)\"\r\n                        [pageName]=\"currentPageName\"\r\n                        [groupName]=\"groupArray[this.selectedTabIndex.groupIndex].grpName\"\r\n                        [flowName]=\"groupArray[this.selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.flowName\"\r\n                        [allPages]=\"pageNames\"\r\n                        (changedBrowserStepsConfig)=\"changedBrowserStepsConfig($event)\">\r\n                    </app-browser-interaction>    \r\n                    </ng-container>\r\n                    \r\n                    </ng-template>                    \r\n            \r\n                </div>\r\n            </as-split-area>\r\n         </as-split>\r\n            </div>\r\n        </div>\r\n\r\n        \r\n    </div>\r\n    <div class=\"w-100-p pl-2 pr-6\" *ngIf=\"testMode==TEST_MODE.PERFORMANCE\">\r\n        <app-load-configuration [(groupArray)]=\"groupArray\" *ngIf=\"scenUtilService.isScenRead\"></app-load-configuration>\r\n    </div>\r\n\r\n</div>\r\n\r\n<router-outlet name=\"replay\"></router-outlet>\r\n\r\n    <p-sidebar [(visible)]=\"scenUtilService.advSidebar\" [modal]=\"false\" [showCloseIcon]=\"isImportSideBar ? true: false\" class=\"sedebarHeightClass\" position=\"bottom\" [baseZIndex]=\"-900\"\r\n        (onHide)=\"onSettingHide()\">\r\n        <router-outlet></router-outlet>\r\n    </p-sidebar>\r\n\r\n    <p-sidebar [(visible)]=\"scenUtilService.paramSidebar\"  [modal]=\"false\" [style]=\"psideBarStyle\" position=\"right\" [dismissible] = \"false\"\r\n        [showCloseIcon]=\"false\" (onHide)=\"closeAPI()\">\r\n        \r\n        <div class=\"heightDiv\" >\r\n            <div style=\"position: sticky; top: 0; z-index: 9;\" class=\"helpHeader \">\r\n                <div>\r\n                    <span *ngIf=\"parameterDataService.mode != 'UpdateParam'\"> ADD PARAMETER</span>\r\n                    <span *ngIf=\"parameterDataService.mode == 'UpdateParam'\"> UPDATE PARAMETER</span>\r\n                </div>\r\n                <div>\r\n                    <button type=\"button\" pButton class=\"btn-icon btn-white\" icon=\"icons8 icons8-help clickable\" matTooltip=\"Help\"\r\n                    (click)=\"showHelp()\" tooltipZIndex=\"12000\"></button> \r\n\r\n                    <button type=\"button\" pButton appendTo=\"body\"\r\n                        [ngClass]=\"fullscreen == true ? 'btn-icon btn-white font-16 mr-10 icons8 icons8-compress clickable' : 'btn-icon btn-white font-16 mr-10  icons8 icons8-enlarge clickable'\"\r\n                        (click)=\"toggleView()\" [matTooltip]=\"psideBarToolTip\" tooltipZIndex=\"12000\">\r\n                    </button>\r\n                    <button type=\"button\" (click)=\"scenUtilService.paramSidebar=false\"\r\n                    class=\"btn-icon font-16 mr-5 btn-white \"><i class=\"icons8 icons8-delete\"></i></button>\r\n                </div>\r\n            </div>\r\n\r\n            <router-outlet name=\"parameter\"></router-outlet>\r\n        </div>\r\n        \r\n    </p-sidebar> \r\n    <p-sidebar [(visible)]=\"scenUtilService.checkSidebar\" [modal]=\"false\"  position=\"right\" \r\n    [style]=\"psideBarStyle\" [showCloseIcon]=\"false\" (onHide)=\"closeAssertion()\">\r\n        <div class=\"heightDiv\">\r\n            <div class=\"helpHeader\">\r\n                <div class=\"p-grid p-align-center\">\r\n                <span *ngIf=\"parameterDataService.mode != 'Update'\"> ADD ASSERTIONS</span>\r\n                <span *ngIf=\"parameterDataService.mode == 'Update'\"> UPDATE ASSERTIONS</span>\r\n                </div>\r\n                <div class=\"p-grid p-align-center\">\r\n                    <button type=\"button\" pButton class=\"btn-icon btn-white\" icon=\"icons8 icons8-help clickable\" matTooltip=\"Help\"\r\n                    (click)=\"showHelp1()\" tooltipZIndex=\"12000\"></button> \r\n                    <i class=\"icons8 font-15 mx-8 clickable\" (click)=\"toggleView()\"\r\n                        [ngClass]=\"fullscreen == true ? 'icons8-compress' : 'icons8-enlarge'\" [matTooltip]=\"psideBarToolTip\"\r\n                        tooltipZIndex=\"12000\"></i>\r\n                    <i class=\"icons8 icons8-delete font-15 mx-8 clickable\" (click)=\"scenUtilService.checkSidebar=false\" matTooltip=\"Close\"\r\n                        tooltipZIndex=\"12000\"></i>\r\n                </div>\r\n            </div>\r\n            <router-outlet name=\"checkpoint\"></router-outlet>\r\n        </div>\r\n    </p-sidebar>\r\n\r\n    <!-- // Dialog Boxes -->\r\n    <p-dialog header=\"Add Group\" class=\"foterDialog ns-scenario\" [(visible)]=\"isGroupDialogShown\" [modal]=\"true\"\r\n         [draggable]=\"false\" [resizable]=\"false\" (onHide)=\"onCardClose()\">\r\n        <div class=\"my-12 p-grid p-justify-center w-100-p\">\r\n            <div class=\"mx-12\">\r\n              <p-card class=\"myCard\">\r\n                   <p-header class=\"p-grid p-justify-center\">\r\n                        <p class=\"font-18 font-weight-600 text-center bottom-border border-2 nowrap pb-12 w-100-p\">Design Script Manually</p>\r\n                    </p-header>\r\n                      <p class=\"text-center my-24\">\r\n                        Design script using interactive UI to compose HTTP requests with different methods.\r\n                    </p>\r\n                     <p-footer class=\"p-grid relative p-justify-center\">\r\n                        <button class=\"w-70-p\" (click)=\"addGroup()\" pButton type=\"button\" label=\"Add\"></button>\r\n                    </p-footer>\r\n                </p-card>\r\n            </div>\r\n              <div class=\"mx-12\">\r\n                <p-card class=\"myCard\"  >\r\n                    <p-header class=\"p-grid p-justify-center \">\r\n                       <p class=\"font-18 font-weight-600 text-center bottom-border border-2 nowrap pb-12 w-100-p\">Record Script</p>\r\n                    </p-header>\r\n                    <p class=\"text-center my-24\">\r\n                        Record the Script and automatically generate a Test Script  by capturing a user's interactions with an application\r\n                    </p>\r\n                    <p-footer class=\" p-grid relative  p-justify-center\">\r\n                        <button class=\"w-70-p\" pButton type=\"button\" label=\"Start\"></button>\r\n                    </p-footer>\r\n                </p-card> \r\n            </div>\r\n            <div class=\"mx-12\">\r\n               <p-card class=\"myCard\">\r\n                    <p-header class=\"p-grid p-justify-center\">\r\n                        <p class=\"font-18 font-weight-600 text-center bottom-border border-2 nowrap pb-12 w-100-p\">Import Scripts</p>\r\n                    </p-header>\r\n                     <p class=\"text-center my-24\">\r\n                        A Script represents a typical session of web applications's user interaction. We support Postman and Cavisson scripts.\r\n                    </p>\r\n                      <p-footer class=\"p-grid relative p-justify-center\">\r\n                        <button class=\"w-70-p\" pButton type=\"button\" (click)=\"importScript()\" label=\"Add\"></button>\r\n                    </p-footer>\r\n                </p-card>\r\n            </div>\r\n        </div>\r\n    </p-dialog>\r\n    <p-dialog header=\"Add Flow\" class=\"foterDialog ns-scenario\" [(visible)]=\"isFlowDialogShown\" [modal]=\"true\"\r\n         [draggable]=\"false\" [resizable]=\"false\" (onHide)=\"onCardClose()\">\r\n        <div class=\"my-12 p-grid p-justify-center w-100-p\">\r\n            <div class=\"mx-12\">\r\n              <p-card class=\"myCard\">\r\n                   <p-header class=\"p-grid p-justify-center\">\r\n                        <p class=\"font-18 font-weight-600 text-center bottom-border border-2 nowrap pb-12 w-100-p\">Design Flow Manually</p>\r\n                    </p-header>\r\n                      <p class=\"text-center my-24\">\r\n                        Design Test Flow using interactive UI to compose HTTP requests with different methods.\r\n                    </p>\r\n                     <p-footer class=\"p-grid relative p-justify-center\">\r\n                        <button class=\"w-70-p\" (click)=\"addFlow()\" pButton type=\"button\" label=\"Add\"></button>\r\n                    </p-footer>\r\n                </p-card>\r\n            </div>\r\n              <div class=\"mx-12\">\r\n                <p-card class=\"myCard\"  >\r\n                    <p-header class=\"p-grid p-justify-center \">\r\n                       <p class=\"font-18 font-weight-600 text-center bottom-border border-2 nowrap pb-12 w-100-p\">Record Script</p>\r\n                    </p-header>\r\n                    <p class=\"text-center my-24\">\r\n                        Record the Test Flow and automatically generate a Test Script  by capturing a user's interactions with an application\r\n                    </p>\r\n                    <p-footer class=\" p-grid relative  p-justify-center\">\r\n                        <button class=\"w-70-p\" pButton type=\"button\" label=\"Start\"></button>\r\n                    </p-footer>\r\n                </p-card> \r\n            </div>\r\n            <div class=\"mx-12\">\r\n               <p-card class=\"myCard\">\r\n                    <p-header class=\"p-grid p-justify-center\">\r\n                        <p class=\"font-18 font-weight-600 text-center bottom-border border-2 nowrap pb-12 w-100-p\">Import Flow(s)</p>\r\n                    </p-header>\r\n                     <p class=\"text-center my-24\">\r\n                        A Flow represents a typical session of web applications's user interaction.\r\n                    </p>\r\n                      <p-footer class=\"p-grid relative p-justify-center\">\r\n                        <button class=\"w-70-p\" pButton type=\"button\" (click)=\"importFlow()\" label=\"Add\"></button>\r\n                    </p-footer>\r\n                </p-card>\r\n            </div>\r\n        </div>\r\n    </p-dialog>\r\n\r\n\r\n    <p-dialog [(visible)]=\"scenUtilService.displayErrorDialog\" header=\"Error in test execution\" modal=\"modal\" [resizable]=\"false\" [draggable]=\"false\"\r\n    [style]=\"{'width':'650px'}\">\r\n    <div [innerHTML]=\"scenUtilService.testRunError\" class=\"text-danger\" style=\"line-height: 20px;\"></div>\r\n    <p-footer class=\"p-grid p-justify-end\">\r\n        <button type=\"button\" pButton class=\"ui-button-rounded ui-button-secondary\"\r\n            (click)=\"scenUtilService.displayErrorDialog=false;\">Close</button>\r\n    </p-footer>\r\n    </p-dialog>\r\n\r\n    <p-confirmDialog class=\"confirmdialog\" header=\"Delete Confirmation\" [style]=\"{width: '30vw'}\"\r\n    acceptButtonStyleClass=\"ui-button-rounded px-10\"\r\n    rejectButtonStyleClass=\"ui-button-rounded ui-button-secondary px-10 mx-6\" key=\"paramAssertionList\" acceptLabel=\"Yes\"\r\n    rejectLabel=\"No\" [baseZIndex]=\"12000\"></p-confirmDialog>\r\n\r\n\r\n\r\n<p-confirmDialog class=\"confirmdialog\" header=\"Confirmation\" acceptButtonStyleClass=\"ui-button-rounded px-10\"\r\n    rejectButtonStyleClass=\"ui-button-rounded ui-button-secondary px-10 mx-6\" acceptIcon=\"null\" rejectIcon=\"null\"\r\n    acceptLabel=\"Yes\" rejectLabel=\"No\" key=\"smtrees\" [baseZIndex]=\"12000\"></p-confirmDialog>\r\n\r\n <!-- displayAdditionalInfo Dialog -->\r\n<p-dialog header=\"Additional Information\" class=\"foterDialog\" [(visible)]=\"showManageInlineReqDialog\" [modal]=\"true\"\r\n[style]=\"{width: '55vw'}\" [draggable]=\"false\" [resizable]=\"false\" (onHide)=\"closeInlineSettingDialog()\">\r\n    <div *ngIf=\"selectedTabNum == 1\" class=\"m-10 w-100-p\">\r\n        <div *ngIf=\"selectText && scenUtilService.ScenMode == 0 && scenUtilService.parameterOption.length > 1\">\r\n            <ng-container>\r\n                <label>Replace selected text by</label>\r\n                <p-dropdown class=\"mx-5\" [options]=\"scenUtilService.parameterOption\" [(ngModel)]=\"selectedParameter\"\r\n                    [style]=\"{'min-width':'205px'}\" dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\r\n                <button type=\"button\" pButton class=\"btn-icon\" icon=\"pi pi-check-circle font-22\" matTooltip=\"Apply\"\r\n                    (click)=\"addReplaceAction(true)\"></button>\r\n            </ng-container>\r\n        </div>\r\n        <p-tabView class=\"myTabPanel\" (onChange)=\"onAdditionalInfoTabChange($event)\" #tabView>\r\n            <p-tabPanel header=\"HEADER\">\r\n                <div class=\"border-4 w-100-p tabBorder\">\r\n                    <div class=\"p-grid border-4 tabBorderBottom w-100-p p-align-center p-5 p-justify-between\">\r\n                    \r\n                    <button type=\"button\" pButton class=\"btn-icon-gray\" (click)=\"hideDefaultHeaders()\" [disabled]=\"isHeaderEditorDisplay\">\r\n                    <span class=\"p-grid p-align-center\">  \r\n                    <i [ngClass]=\"!showHeaders ? 'las-eye-solid mx-3' : 'las-eye-slash-solid mx-3'\" ></i>  \r\n                    <strong *ngIf=\"!showHeaders\" matTooltip=\"These headers will be automatically added and sent with the request. Click to view these headers. \" > Show auto-generated headers </strong>\r\n                    <strong *ngIf=\"showHeaders\" matTooltip=\"Click to hide these headers. They will still be automatically added and sent with the reguest.\" > Hide auto-generated headers </strong></span>\r\n                    </button>\r\n                    \r\n                        <div class=\"p-grid p-align-center\">\r\n                        <span class=\"mx-5\">\r\n                            View : Key-Value\r\n                        </span>\r\n                        <span class=\"mx-5\">\r\n                            <p-inputSwitch [(ngModel)]=\"isHeaderEditorDisplay\"\r\n                                (onChange)=\"onHeaderInpSwitchChange($event, true)\"></p-inputSwitch>\r\n                        </span>\r\n                        <span>Text</span>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"p-5 first2Disable\" [ngClass]=\"isHeaderEditorDisplay ? 'd-none': 'd-block'\">\r\n                        <div *ngFor=\"let header of currentReqObj.headers; let i = index\"\r\n                            class=\"p-grid p-align-center w-100-p\">\r\n                            <ng-template [ngIf]=\"header['del'] || showHeaders || (!header['del'] && (header['headerKey']['name'] == '' || header['headerValue']['name'] == ''))\">\r\n                                <div class=\" p-col-1 text-center\">\r\n                                    <p-checkbox name=\"groupname\" value=\"val1\" [(ngModel)]=\"header['chk']\"\r\n                                        binary=\"true\"\r\n                                        [disabled]=\"!header['del'] && (i != currentReqObj.headers.length - 1)\">\r\n                                    </p-checkbox>\r\n                                </div>\r\n                                <div class=\"p-col-5 relative\"\r\n                                    (select)=\"selectTextFromRes('tableHeader',i,'headerKey')\">\r\n                                    <p-autoComplete [(ngModel)]=\"header['headerKey']\"\r\n                                        [disabled]=\"!header['del'] && (i != currentReqObj.headers.length - 1)\"\r\n                                        [suggestions]=\"headersKeySuggestions\"\r\n                                        (completeMethod)=\"filterHeaderSuggestions($event,'headerKey',header)\"\r\n                                        field=\"name\" [inputStyle]=\"{'width' : '100%'}\"\r\n                                        (keyup)=\"onHeaderKeyUp(i, $event,'headerKey', true)\" appendTo=\"body\"\r\n                                        [minLength]=\"1\">\r\n                                    </p-autoComplete>\r\n                                    <i *ngIf=\"header['toolTip'] != undefined && !header['del']\" class=\"infoI icons8 icons8-info\" tooltipStyleClass=\"max-width-400\" [matTooltip]=\"header['toolTip']\"></i>\r\n                                </div>\r\n                                <div class=\"p-col-5 relative\"\r\n                                    (select)=\"selectTextFromRes('tableHeader',i,'headerValue')\">\r\n                                    <p-autoComplete [(ngModel)]=\"header['headerValue']\"\r\n                                        [disabled]=\"!header['del'] && (i != currentReqObj.headers.length - 1)\"\r\n                                        [suggestions]=\"headersValueSuggestions\"\r\n                                        (completeMethod)=\"filterHeaderSuggestions($event,'headerValue',header)\"\r\n                                        field=\"name\" [inputStyle]=\"{'width' : '100%'}\"\r\n                                        (keyup)=\"onHeaderKeyUp(i, $event,'headerValue', true)\" appendTo=\"body\"\r\n                                        [minLength]=\"1\">\r\n                                    </p-autoComplete>\r\n                                </div>\r\n                                <div class=\"p-col-1 text-center\">\r\n                                    <button type=\"button\" [disabled]=\"!header['del']\"\r\n                                        (click)=\"deleteHeader(i, true)\" class=\"btn-icon mr-5\"><i\r\n                                            class=\"icons8 icons8-trash\"></i></button>\r\n                                </div>\r\n                            </ng-template>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"p-5\" [ngClass]=\"isHeaderEditorDisplay ? 'd-block': 'd-none'\">\r\n                        <div style=\"height: 195px;\" (select)=\"selectTextFromRes('header')\">\r\n                            <ngx-monaco-editor class=\"rowText\" #editor style=\"height: 100%;\"\r\n                                [options]=\"editorOptionsHdr\" (mousedown)=\"onUnselectClick()\"\r\n                                [(ngModel)]=\"headerEditorDataInline\">\r\n                            </ngx-monaco-editor>\r\n                        </div>\r\n                    </div>\r\n\r\n                </div>\r\n            </p-tabPanel>\r\n            <p-tabPanel header=\"BODY\">\r\n                <div class=\"border-4 w-100-p tabBorder\">\r\n                    <div class=\"bodyEditor border-4\">\r\n                        <ul class=\"cusTab\">\r\n                            <li *ngFor=\"let resTab of resTabList\" (click)=\"onBodyTabSelect(resTab, true)\"\r\n                                [ngClass]=\"currentReqObj.bodyType == resTab.name.toLowerCase() ? 'active' : ''\">\r\n                                {{resTab.name}}</li>\r\n                        </ul>\r\n                        <div class=\"p-grid p-align-center\">\r\n                        <div *ngIf=\"fetchingBody\" class=\"mb-3 p-grid\">\r\n                            <i class=\"pi pi-spin pi-spinner\"></i> <span class=\"mt-3\">Fetching body...</span>\r\n                        </div>\r\n                        <div>\r\n                            <button pButton (click)=\"resetBody(true)\" pTooltip=\"Reset body\"\r\n                                class=\"btn-icon mr-5\" icon=\"icons8 icons8-reboot\"></button>                                                \r\n                        </div>\r\n                        <div class=\"upload-btn-wrapper\"\r\n                            *ngIf=\"currentReqObj.isBodyEditor\">\r\n                            <label for=\"inlineBodyFile\" class=\"fileLabel btn-icon\">\r\n                                <i class=\"icons8 icons8-upload mr-2\"></i>\r\n                                <span>Upload</span>\r\n                            </label> \r\n                            <input pInputText type=\"file\" name=\"myBody\" id=\"inlineBodyFile\"\r\n                                (change)=\"onImportBody($event.target.files, true)\" class=\"fileInput\"/>\r\n                        </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"p-5\"\r\n                        [ngClass]=\"currentReqObj.isBodyEditor ? 'd-none': 'd-block'\">\r\n                        <div *ngFor=\"let body of currentReqObj.bodyArr; let i = index\"\r\n                            class=\"p-grid p-align-center w-100-p\">\r\n                            <div class=\" p-col-1 p-grid p-align-center p-justify-center \">\r\n                                <p-checkbox name=\"groupname\" value=\"val1\" [(ngModel)]=\"body['chk']\"\r\n                                    binary=\"true\">\r\n                                </p-checkbox>\r\n                            </div>\r\n                            <div class=\"p-col-5 relative myHover\">\r\n                                <ng-container (select)=\"selectTextFromRes('tableBody',i,'bodyKey')\">\r\n                                <p-autoComplete [(ngModel)]=\"body['bodyKey']\"\r\n                                    [disabled]=\"!body['del'] && (i != currentReqObj.bodyArr.length - 1)\"\r\n                                    [suggestions]=\"bodyKeySuggestions\"\r\n                                    (completeMethod)=\"filterBodySuggestions($event,'bodyKey',body)\"\r\n                                    field=\"name\" (keyup)=\"onBodyKeyUp(i, $event,'bodyKey', true)\"\r\n                                    appendTo=\"body\" [minLength]=\"1\" inputStyleClass=\"w-100-p\">\r\n                                </p-autoComplete>\r\n                                </ng-container>\r\n                                \r\n                            <ng-container *ngIf=\"currentReqObj.bodyType == 'form-data'\">\r\n                                <p-dropdown [options]=\"body['bodyKeyOpt']\" [(ngModel)]=\"body['bodyKeySel']\" class=\"randomLinst\" dropdownIcon=\"icons8 icons8-expand-arrow\"\r\n                                    appendTo=\"body\"  [style]=\"{'min-width':'70px','max-width': '70px'}\">\r\n                                </p-dropdown>\r\n                            </ng-container>\r\n                            </div>\r\n\r\n\r\n                            <div class=\"p-col\" (select)=\"selectTextFromRes('tableBody',i,'bodyValue')\">\r\n                                <p-autoComplete [(ngModel)]=\"body['bodyValue']\"\r\n                                    [disabled]=\"!body['del'] && (i != currentReqObj.bodyArr.length - 1)\"\r\n                                    [suggestions]=\"bodyValueSuggestions\" (completeMethod)=\"filterBodySuggestions($event,'bodyValue',body)\"\r\n                                    field=\"name\" (keyup)=\"onBodyKeyUp(i, $event,'bodyValue', true)\" appendTo=\"body\" [minLength]=\"1\" inputStyleClass=\"w-100-p\"\r\n                                    *ngIf=\"(currentReqObj.bodyType == 'form-data' && body['bodyKeySel'] == 'text') || currentReqObj.bodyType == 'x-www-form-urlencoded'\">\r\n                                </p-autoComplete>\r\n                                <div class=\"ui-inputgroup relative\" *ngIf=\"(body['bodyKeySel'] == 'file' && currentReqObj.bodyType == 'form-data')\">\r\n                                    <input type=\"text\" class=\"w-100-p\" pInputText placeholder=\"\" title=\"Upload file\"\r\n                                        [(ngModel)]=\"body['bodyValue']['name']\">\r\n                                    <button pButton icon=\"icons8 icons8-folder\"></button>\r\n                                    <input type=\"file\" name=\"bodyKeyFile\" id=\"bodyKeyFile\"\r\n                                        accept=\".txt,.csv,.xls,.xlsx,.pdf,.btr,.btt,.cd,.err,.mml,.eml,.ecf,.hmc,.png,.jpg,.log,.jmx,.json,.xml,.adr,.conf,.dat,.ads,.pem,.cer,.crt,.p7b,.p7r,.p12,.pfx,.text,.yaml\"\r\n                                        title=\"\" class=\"upload\" (change)=\"onChangeBodyKeyFile($event.target.files, body)\">\r\n                                </div>\r\n                            </div>\r\n                            <div class=\"p-col-fixed text-center\">\r\n                                <button type=\"button\" [disabled]=\"!body['del']\" (click)=\"deleteBody(i, true)\"\r\n                                    class=\"btn-icon mr-5\"><i class=\"icons8 icons8-trash\"></i></button>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"p-5\" [ngClass]=\"currentReqObj.isBodyEditor ? 'd-block': 'd-none'\">\r\n                        <div style=\"height: 195px;\" (select)=\"selectTextFromRes('body')\">\r\n                            <ngx-monaco-editor  *ngIf=\"showManageInlineReqDialog\" class=\"rowText\" style=\"height: 100%;\" #bodyEditor\r\n                                (onInit)=\"onInitEditorBody($event, true)\" (mousedown)=\"onUnselectClick()\"\r\n                                [options]=\"bodyEditorOptions\"\r\n                                [(ngModel)]=\"currentReqObj.isLargeBody ? currentReqObj.largeBody : currentReqObj.body\">\r\n                            </ngx-monaco-editor>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </p-tabPanel>\r\n        </p-tabView>\r\n    </div>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"openRepeatInlineDialog\" header=\"Repeat Inline\" modal=\"modal\" [resizable]=\"false\"\r\n    [draggable]=\"false\" [style]=\"{'width':'650px'}\">\r\n    <div class=\"w-100-p p-grid p-align-center\">\r\n\r\n        <div class=\" w-100-p my-16 p-grid p-align-center\">\r\n            <div>\r\n                <p-radioButton name=\"groupname\" value=1 label=\"Repeat inline URL \" [(ngModel)]=\"repeatInline\" (onClick)=\"setRepeatInlineVal()\"></p-radioButton>\r\n            </div>\r\n            <div class=\"mx-5 width-100\">\r\n                <p-spinner [min]=\"0\" [(ngModel)]=\"repeatInlineNum\" inputStyleClass=\"w-100-p\"  [disabled]=\"repeatInline != 1\" (keypress)=\"validateQty($event,true)\"></p-spinner>\r\n            </div>\r\n            <div class=\"mx-5\">\r\n               more times.\r\n            </div>\r\n        </div>\r\n\r\n        <div class=\" w-100-p p-grid my-16 p-align-center\">\r\n            <div>\r\n                <p-radioButton name=\"groupname\" class=\"mr-8\" value=0 label=\"Repeat inline URL with value of parameter \" (onClick)=\"setRepeatInlineVal(true)\" [(ngModel)]=\"repeatInline\"></p-radioButton>\r\n            </div>\r\n            <div class=\"mx-5 width-130 p-0 m-0\">\r\n                    <p-dropdown [style]=\"{'min-width' : '100%'}\" [options]=\"scenUtilService.parameterOption\" [disabled]=\"repeatInline != 0\" [(ngModel)]=\"currentReqObj.repeatInline\"\r\n                    dropdownIcon=\"icons8 icons8-expand-arrow\" [matTooltip]=\"repeatInline == 0 ? currentReqObj.repeatInline : ''\" appendTo=\"body\"></p-dropdown>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    \r\n    <p-footer class=\"p-grid p-justify-end\">\r\n        <button type=\"button\" pButton class=\"ui-button-rounded ui-button-secondary\"\r\n            (click)=\"saveInline(false, true);\">Cancel</button>\r\n        <button type=\"button\" pButton \r\n            (click)=\"saveInline(true, true);\">OK</button>\r\n    </p-footer>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"openInlineTxName\" header=\"{{dialogHeader}}\" modal=\"modal\" [resizable]=\"false\"\r\n    [draggable]=\"false\" [style]=\"{'width':'650px'}\">\r\n    <div class=\"p-grid p-align-center  \" >\r\n        <div class=\"p-col-4 pl-0\">\r\n             {{requestName}}\r\n        </div>\r\n        <div class=\"p-col-8\">\r\n            <input pInputText type=\"text\" [(ngModel)]=\"currentReqObj.reqName\" class=\"w-100-p \" pInputText>\r\n        </div>\r\n    </div>\r\n    <p-footer class=\"p-grid p-justify-end\">\r\n        <button type=\"button\" pButton class=\"ui-button-rounded ui-button-secondary\"\r\n            (click)=\"saveInline(false, false);\">Cancel</button>\r\n        <button type=\"button\" pButton \r\n            (click)=\"saveInline(true, false);\">OK</button>\r\n    </p-footer>\r\n</p-dialog>\r\n\r\n<p-dialog class=\"p-footer\" [modal]=\"true\" [(visible)]=\"scenUtilService.saveandcompilemessage\" header=\"Error in script compilation\"\r\n    [style]=\"{'width':'fit-content'}\">\r\n    <pre class=\"text-wrap\" [innerHTML]=\"scenUtilService.statusString\"></pre>\r\n    <p-footer>\r\n        <div class=\"p-grid p-align-center p-justify-end my-8 w-100-p\">\r\n            <button pButton type=\"button\" label=\"Close\" (click)=\"scenUtilService.saveandcompilemessage = false\"\r\n                class=\"ui-button-secondary mr-5\"></button>\r\n        </div>\r\n    </p-footer>\r\n</p-dialog>\r\n\r\n<p-dialog class=\"secondary-dialog foterDialog\" [(visible)]=\"isShowScriptDialogOpen\" [closable]=\"false\" modal=\"true\" [resizable]=\"false\"\r\n    [draggable]=\"false\" [style]=\"{'width':'80vw'}\" [contentStyle]=\"{ 'height':'520px' }\">\r\n    <p-header>\r\n        <div *ngIf=\"isPreScriptEditorVisible\" class=\"w-100-p p-grid p-justify-between\">\r\n            <div class=\"p-col-fixed p-0 p-grid p-align-center\">\r\n                <strong>Pre-Script</strong>\r\n                <app-help  [helpFileName]=\"'pre-script'\"  [helpTitle]=\"'Pre Script'\" [helpFolder]=\"'scenario'\"></app-help>               \r\n            </div>\r\n            <button type=\"button\" pButton class=\"btn-icon\" icon=\"icons8 icons8-delete clickable\" \r\n            (click)=\"this.isShowScriptDialogOpen = false\" tooltipZIndex=\"12000\"></button>                 \r\n        </div>\r\n        <div *ngIf=\"!isPreScriptEditorVisible\" class=\"w-100-p p-grid p-justify-between\">\r\n            <div class=\"p-col-fixed p-0 p-grid p-align-center\">\r\n                <strong>Post-Script</strong>\r\n                <app-help  [helpFileName]=\"'post-script'\"  [helpTitle]=\"'Post Script'\" [helpFolder]=\"'scenario'\"></app-help>                     \r\n            </div>\r\n            <button type=\"button\" pButton class=\"btn-icon\" icon=\"icons8 icons8-delete clickable\" \r\n            (click)=\"this.isShowScriptDialogOpen = false\" tooltipZIndex=\"12000\"></button>                 \r\n        </div>\r\n    </p-header>\r\n    <div *ngIf=\"isPreScriptEditorVisible\" class=\"w-100-p\">\r\n        <ngx-monaco-editor style=\"height:470px; width:100%\" #scriptEditor class=\"editor-container rowText w-100-p\"\r\n            [options]=\"editorOptionsHdr1\" [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].prescript\"\r\n            (onInit)=\"onInitEditor($event)\">\r\n        </ngx-monaco-editor>\r\n    </div>\r\n    <div *ngIf=\"!isPreScriptEditorVisible\" class=\"w-100-p\">\r\n        <ngx-monaco-editor style=\"height:470px; width:100%\" #scriptEditor class=\"editor-container rowText w-100-p\"\r\n            [options]=\"editorOptionsHdr1\" [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].postscript\"\r\n            (onInit)=\"onInitEditor($event)\">\r\n        </ngx-monaco-editor>\r\n    </div>\r\n    <div class=\"p-grid w-100-p p-justify-end\">\r\n        <button pButton type=\"button\" matTooltip=\"Save & Compile\" (click)=\"savePrePostScript()\"\r\n                class=\"btn-primary-outline py-15 px-5\" style=\"font-weight: bold\">Save & Compile</button>  \r\n    </div>\r\n</p-dialog>\r\n\r\n<p-dialog [header]=\"maximizeBodyDialogHeader\" [(visible)]=\"ngxInOverlay\" [style]=\"{width: '900px'}\" [contentStyle]=\"{'overflow':'hidden', 'height':'500px'}\"\r\n [baseZIndex]=\"10000\" [modal]=\"true\">\r\n    <div (select)=\"selectTextFromRes('body')\" *ngIf=\"maximizedBody\">\r\n        <ngx-monaco-editor class=\"rowText\" style=\"height: 488px; width: 880px\" #bodyEditor\r\n            (onInit)=\"onInitEditorBody($event)\" (mousedown)=\"onUnselectClick()\"\r\n            [options]=\"bodyEditorOptions\"\r\n            [(ngModel)]=\"groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].isLargeBody ? groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].largeBody : groupArray[selectedTabIndex.groupIndex].flowArr[selectedTabIndex.flowIndex]?.reqArr[selectedTabIndex.reqIndex].body\">\r\n        </ngx-monaco-editor>\r\n    </div>\r\n    <p-footer>\r\n        <button type=\"button\" pButton  (click)=\"ngxInOverlay=false;maximizedBody=false;\" label=\"Close\" class=\"btn-secondary-outline\"></button>\r\n    </p-footer>\r\n</p-dialog>\r\n<p-dialog class=\"ns-scenario\"\r\n    [header]=\"groupArray[this.selectedTabIndex.groupIndex].scriptMode ? 'Visual Mode': 'Code Mode'\" (onHide)=\"scriptMode = scriptMode === 'visual' ? 'code' : 'visual'\"\r\n    [(visible)]=\"showScriptModeDialog\" [modal]=\"true\" [style]=\"{width: '500px'}\" [resizable]=\"false\">\r\n    <ng-container *ngIf=\"groupArray[this.selectedTabIndex.groupIndex].scriptMode=='code'; else codeModeText\">\r\n        <p class=\"my-15\">\r\n            When you switch from Code Mode to Visual Mode, the script will no longer be visible.\r\n            Any changes made in Code Mode will be lost.\r\n        </p>\r\n    </ng-container>\r\n\r\n    <ng-template #codeModeText>\r\n        <p class=\"my-15\">\r\n            When you switch from Visual Mode to Code Mode, you can view and edit the script.\r\n        </p>\r\n        <div *ngIf=\"groupArray[this.selectedTabIndex.groupIndex].grpType !== SCENARIO.GROUP_TYPE.RDT_NATIVE\" class=\"p-grid p-align-center my-15\">\r\n            <div class=\"font-13 font-weight-500 mr-20 \">\r\n                Choose language for script:\r\n            </div>\r\n            <p-selectButton class=\"radio-selectButton\" [options]=\"selectScriptType\"\r\n                [(ngModel)]=\"groupWiseScriptType\"></p-selectButton>\r\n        </div>\r\n    </ng-template>\r\n\r\n    <p-footer class=\"p-grid p-justify-end\">\r\n        <button type=\"button\" pButton label=\"Cancel\"\r\n            (click)=\"showScriptModeDialog = false\"\r\n            class=\"ui-button-secondary ui-button-rounded px-15\"></button>\r\n        <button type=\"button\" pButton label=\"Ok\" (click)=\"toggleScriptModeView()\" class=\"ui-button-rounded px-15\"></button>\r\n    </p-footer>\r\n</p-dialog>\r\n\r\n<p-dialog [closable]=\"false\" class=\"foterDialog ns-scenario\" [(visible)]=\"showCrossPlatformModeDialog\" [modal]=\"true\"\r\n    [draggable]=\"false\" [resizable]=\"false\" [style]=\"{'width':'520px'}\">\r\n<p-header>\r\n    <div class=\"p-grid p-justify-between p-align-center w-100-p\">\r\n        <div class=\"inline-flex\">\r\n            <strong>Convert to Cross-Platform Test</strong>\r\n        </div>\r\n        <div>\r\n            <button pButton type=\"button\" tooltipPosition=\"bottom\" matTooltip=\"close\" class=\"btn-icon\"\r\n                icon=\"icons8 icons8-delete font-18\" (click)=\"showCrossPlatformModeDialog = false\"></button>\r\n        </div>\r\n    </div>\r\n</p-header>\r\n\r\n    <div class=\"p-grid p-align-center mb-15\">\r\n        <div class=\"p-col-12 line-height18 opc-90 mb-12 pt-12\">\r\n            Choose how you want to convert this test.\r\n        </div>\r\n        <div class=\"p-col-12 line-height18 opc-90 mb-12\">\r\n            Automatic conversion generates target-platform locators in the background. Manual conversion creates cross-platform structure and lets you fill target locators yourself.\r\n        </div>\r\n    </div>\r\n\r\n    <p-footer class=\"p-grid p-justify-end\">\r\n        <button type=\"button\" pButton label=\"Manual\" class=\"ui-button-secondary mr-8\" (click)=\"onCrossPlatformModeSelect('manual')\"></button>\r\n        <button type=\"button\" pButton label=\"Automatic\" (click)=\"onCrossPlatformModeSelect('auto')\"></button>\r\n    </p-footer>\r\n</p-dialog>\r\n\r\n<p-dialog [closable]=\"false\" class=\"foterDialog ns-scenario\" [(visible)]=\"showCrossPlatformDialog\" [modal]=\"true\"\r\n    [draggable]=\"false\" [resizable]=\"false\" [style]=\"{'width':'600px'}\">\r\n<p-header>\r\n    <div class=\"p-grid p-justify-between p-align-center w-100-p\">\r\n        <div class=\"inline-flex\">\r\n            <strong>Convert to Cross-Platform Test</strong>\r\n            <!-- <i class=\"icons8 icons8-info font-14 ml-4\"\r\n                matTooltip=\"\"></i> -->\r\n        </div>\r\n        <div>\r\n            <button pButton type=\"button\" tooltipPosition=\"bottom\" matTooltip=\"close\" class=\"btn-icon\"\r\n                icon=\"icons8 icons8-delete font-18\" (click)=\"showCrossPlatformDialog = false\"></button>\r\n        </div>\r\n    </div>\r\n</p-header>\r\n\r\n    <div class=\"p-grid p-align-center mb-15\">\r\n        <div class=\"p-col-12 line-height18 opc-90 mb-12 pt-12\">\r\n            This test currently runs only on {{ crossPlatformSourcePlatform === platformIOS ? platformIOS : platformAndroid }}. After converting it to a cross-platform test, iOS locators are generated automatically, allowing it to run on both Android and iOS by selecting the target device at execution time.\r\n        </div>\r\n        <div *ngIf=\"crossPlatformSourcePlatform === platformIOS\" class=\"p-col-4 font-weight-500\">Android Application</div>\r\n        <div *ngIf=\"crossPlatformSourcePlatform === platformAndroid\" class=\"p-col-4 font-weight-500\">iOS Application</div>\r\n        <div class=\"p-col\">\r\n            <p-dropdown [options]=\"crossPlatformApplicationOpt\" [(ngModel)]=\"crossPlatformSelectedApp\" [style]=\"{'min-width':'100%'}\"\r\n                optionLabel=\"label\" optionValue=\"value\" placeholder=\"Select Application\" filter=\"true\"\r\n                dropdownIcon=\"icons8 icons8-expand-arrow\" appendTo=\"body\">\r\n            </p-dropdown>\r\n        </div>\r\n            <div class=\"relative p-col-fixed\">\r\n                <button pButton type=\"button\" class=\"w-100-p ui-button-secondary\">\r\n                    <i class=\"pi pi-upload font-16 \"></i>\r\n                    <span>Upload App</span>\r\n                </button>\r\n                <span class=\"custom-upload-button\">\r\n                    <p-fileUpload #crossPlatformUploadRef class=\"fileUpload ui-button-rounded ml-5 \" name=\"file[]\" mode=\"basic\" [url]=\"\"\r\n                        auto=\"true\" chooseLabel=\"Upload App\"\r\n                        (onSelect)=\"onCrossPlatformAppFileSelect($event, crossPlatformUploadRef)\"></p-fileUpload>\r\n                </span>\r\n                <span class=\"ml-5 spin_icon_position\" *ngIf=\"crossPlatformIsUploading\">\r\n                    <i class=\"icons8 icons8-spinner spin\"></i>\r\n                </span>\r\n            </div>\r\n    </div>\r\n\r\n    <div *ngIf=\"crossPlatformSourcePlatform === platformIOS\" class=\"p-grid p-align-center mb-15\">\r\n        <div class=\"p-col-4 font-weight-500\">App Package</div>\r\n        <div class=\"p-col-8\">\r\n            <input pInputText type=\"text\" [(ngModel)]=\"crossPlatformAppPackage\" class=\"w-100-p\">\r\n        </div>\r\n    </div>\r\n\r\n    <div *ngIf=\"crossPlatformSourcePlatform === platformIOS\" class=\"p-grid p-align-center mb-15\">\r\n        <div class=\"p-col-4 font-weight-500\">App Activity</div>\r\n        <div class=\"p-col-8\">\r\n            <input pInputText type=\"text\" [(ngModel)]=\"crossPlatformAppActivity\" class=\"w-100-p\">\r\n        </div>\r\n    </div>\r\n\r\n    <div *ngIf=\"crossPlatformSourcePlatform === platformAndroid\" class=\"p-grid p-align-center mb-15\">\r\n        <div class=\"p-col-4 font-weight-500\">Bundle Id</div>\r\n        <div class=\"p-col-8\">\r\n            <input pInputText type=\"text\" [(ngModel)]=\"crossPlatformBundleId\" class=\"w-100-p\">\r\n        </div>\r\n    </div>\r\n\r\n    <p-footer class=\"p-grid p-justify-end\">\r\n        <button type=\"button\" pButton label=\"Convert\" (click)=\"triggerCrossPlatformConversionFromDialog()\"></button>\r\n    </p-footer>\r\n</p-dialog>\r\n\r\n<!-- Condition Scenario Component -->\r\n<app-condition-scenario #conditionScenarioComponent></app-condition-scenario>\r\n\r\n<app-browse-test-sidebar (visibleChange)=\"checkForImportFlow($event)\" [(visible)]=\"showImportFlowSidebar\" [mode]=\"BRWOSE_TEST_MODE.IMPORT_FLOW\"></app-browse-test-sidebar>\r\n<!-- Show Customized prompt when switch to other protocol in unified recorded test -->\r\n<p-dialog [closable]=\"false\" class=\"foterDialog ns-scenario\" [(visible)]=\"showCustomizedRecordedTestPrompt\"\r\n    [modal]=\"true\" [draggable]=\"false\" [resizable]=\"false\" [style]=\"{'width':'600px'}\">\r\n    <p-header>\r\n        <div class=\"p-grid p-justify-between p-align-center w-100-p\">\r\n            <div class=\"inline-flex\">\r\n                <strong>Switch to {{targetSwitchModeTestType}} Mode</strong>\r\n            </div>\r\n            <div>\r\n                <button pButton type=\"button\" tooltipPosition=\"bottom\" matTooltip=\"close\" class=\"btn-icon\"\r\n                    icon=\"icons8 icons8-delete font-18\" (click)=\"showCustomizedRecordedTestPrompt = false\"></button>\r\n            </div>\r\n        </div>\r\n    </p-header>\r\n    <div class=\"p-grid mb-16\">\r\n        <div class=\"form-group w-100-p p-grid\">\r\n            <div class=\"p-col-12\">\r\n                <div class=\"alert alert-info line-height16 mb-16\">\r\n                    This group has been modified from the original recorded steps, so it cannot be converted to an {{targetSwitchModeTestType}} Test.\r\n                    You can create a new {{targetSwitchModeTestType}} Test using the available recorded details.\r\n                </div>\r\n            </div>\r\n            <div class=\"p-col-4\">Enter New Test Name</div>\r\n            <div class=\"p-col-8\">\r\n                <input pInputText type=\"text\" [(ngModel)]=\"newSwitchModeTestName\" class=\"w-100-p\">\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <p-footer class=\"p-grid p-justify-end\">\r\n        <button type=\"button\" pButton label=\"Create New Test\"\r\n            (click)=\"createNewSwitchModeTest()\"></button>\r\n    </p-footer>\r\n</p-dialog>\r\n";
    /***/
  },

  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.component.html":
  /*!*************************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.component.html ***!
    \*************************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_rawLoader_dist_cjsJs_src_app_pages_scenario_tagsAutocomplete_tagsAutocompleteComponentHtml(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "<div class=\"tags-autocomplete-container\" #trigger=\"cdkOverlayOrigin\" cdkOverlayOrigin>\n  <!-- Chips Container -->\n  <div class=\"w-100-p ui-inputtext ui-corner-all ui-state-default ui-widget\" (click)=\"focusInput()\">\n    <!-- Display existing chips -->\n    <div class=\"chip bg-secondary-900 d-bg-secondary-900 text-white\" *ngFor=\"let chip of chips; let i = index; trackBy: trackByChip\">\n      <span class=\"chip-text\">{{ chip.display }}</span>\n      <button \n        type=\"button\" \n        class=\"chip-remove\" \n        (click)=\"removeChip(i); $event.stopPropagation()\"\n        aria-label=\"Remove chip\">\n        <i class=\"pi pi-times\"></i>\n      </button>\n    </div>\n\n    <!-- Input field -->\n    <input\n      #inputElement\n      type=\"text\"\n      class=\"tags-input\"\n      [formControl]=\"inputControl\"\n      [placeholder]=\"chips.length === 0 ? placeholder : ''\"\n      (input)=\"onInputChange($any($event.target).value)\"\n      (keydown)=\"onKeyDown($event)\"\n      (blur)=\"onInputBlur()\"\n      autocomplete=\"off\"\n    />\n  </div>\n</div>\n\n<!-- Suggestions Overlay -->\n<ng-template\n  cdkConnectedOverlay\n  [cdkConnectedOverlayOrigin]=\"trigger\"\n  [cdkConnectedOverlayOpen]=\"isOverlayOpen\"\n  [cdkConnectedOverlayHasBackdrop]=\"false\"\n  [cdkConnectedOverlayPositions]=\"[\n    { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },\n    { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 }\n  ]\"\n  (detach)=\"closeOverlay()\">\n  \n  <div class=\"suggestions-dropdown mat-elevation-z1 border-all border-3\">\n    <ng-container *ngIf=\"filteredSuggestions.length > 0; else noMatches\">\n      <div class=\"suggestions-list\">\n        <div\n          *ngFor=\"let suggestion of filteredSuggestions; let i = index; trackBy: trackByIndex\"\n          class=\"suggestion-item\"\n          [class.selected]=\"i === selectedIndex\"\n          (mouseenter)=\"selectedIndex = i\"\n          (click)=\"selectSuggestion(suggestion)\">\n          <span class=\"suggestion-text\">{{ suggestion }}</span>\n        </div>\n      </div>\n    </ng-container>\n    <ng-template #noMatches>\n      <div class=\"no-results\">Not match any key value</div>\n    </ng-template>\n  </div>\n</ng-template>\n";
    /***/
  },

  /***/
  "./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.component.scss":
  /*!****************************************************************************************************!*\
    !*** ./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.component.scss ***!
    \****************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _src_app_pages_scenario_browserStep_browserInteraction_browserInteractionComponentScss(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "app-browser-interaction .interactionRightPaneHeight {\n  height: 390px;\n  overflow: auto;\n}\napp-browser-interaction .input-chips.chipStyle {\n  width: 100%;\n}\napp-browser-interaction .inputHeight {\n  min-height: 38px;\n  padding: 6px 12px;\n}\napp-browser-interaction ::ng-deep .ui-autocomplete-chip {\n  display: inline-flex !important;\n  align-items: center !important;\n  background-color: #2196F3 !important;\n  border-radius: 16px !important;\n  padding: 6px 12px !important;\n  margin: 2px 4px !important;\n  gap: 6px !important;\n  font-size: 13px !important;\n  color: white !important;\n  border: none !important;\n}\napp-browser-interaction ::ng-deep .ui-autocomplete-chip-icon,\napp-browser-interaction ::ng-deep .ui-autocomplete-chip .pi {\n  cursor: pointer !important;\n  font-size: 13px !important;\n  color: white !important;\n  margin-left: 4px !important;\n}\napp-browser-interaction ::ng-deep .ui-autocomplete-chip .pi:hover {\n  color: #ffebee !important;\n}\napp-browser-interaction ::ng-deep .ui-autocomplete-panel {\n  z-index: 1000 !important;\n}\napp-browser-interaction ::ng-deep .ui-autocomplete-item {\n  padding: 8px 12px !important;\n}\napp-browser-interaction .regex-test-textarea {\n  width: 100%;\n  min-height: 80px;\n  resize: vertical;\n  font-family: \"Courier New\", monospace;\n  border: 1px solid #ced4da;\n  border-radius: 0.25rem;\n  padding: 0.5rem;\n}\napp-browser-interaction .extra-wide-input {\n  width: 100%;\n  min-width: 318px;\n}\napp-browser-interaction .regex-test-result {\n  border: 1px solid #ddd;\n  border-radius: 0.375rem;\n  padding: 1rem;\n  background-color: #f8f9fa;\n  position: relative;\n  margin-top: 0.5rem;\n}\napp-browser-interaction .regex-test-result.success {\n  border-color: #28a745;\n  background-color: #d4edda;\n  color: #155724;\n}\napp-browser-interaction .regex-test-result.success .result-header i {\n  color: #28a745;\n}\napp-browser-interaction .regex-test-result.error {\n  border-color: #dc3545;\n  background-color: #f8d7da;\n  color: #721c24;\n}\napp-browser-interaction .regex-test-result.error .result-header i {\n  color: #dc3545;\n}\napp-browser-interaction .regex-test-result .result-header {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  margin-bottom: 0.5rem;\n}\napp-browser-interaction .regex-test-result .result-header i {\n  font-size: 1.1rem;\n}\napp-browser-interaction .regex-test-result .result-content {\n  margin: 0.5rem 0;\n  padding: 0.5rem;\n  background-color: rgba(255, 255, 255, 0.7);\n  border-radius: 0.25rem;\n  font-family: \"Courier New\", monospace;\n  font-size: 0.9rem;\n}\napp-browser-interaction .regex-test-result .result-content.error-message {\n  background-color: rgba(248, 215, 218, 0.5);\n  color: #721c24;\n}\napp-browser-interaction .regex-test-result .clear-test-btn {\n  position: absolute;\n  top: 0.5rem;\n  right: 0.5rem;\n  background: none;\n  border: none;\n  color: #6c757d;\n  cursor: pointer;\n  font-size: 0.8rem;\n  text-decoration: underline;\n  padding: 0.2rem 0.4rem;\n}\napp-browser-interaction .regex-test-result .clear-test-btn:hover {\n  color: #495057;\n}\napp-browser-interaction .regex-test-result .no-resize {\n  resize: none;\n}\napp-browser-interaction .deleteBtnn {\n  right: 3px;\n  top: 6px;\n  position: absolute;\n}";
    /***/
  },

  /***/
  "./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.component.ts":
  /*!**************************************************************************************************!*\
    !*** ./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.component.ts ***!
    \**************************************************************************************************/

  /*! exports provided: BrowserInteractionComponent */

  /***/
  function _src_app_pages_scenario_browserStep_browserInteraction_browserInteractionComponentTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "BrowserInteractionComponent", function () {
      return BrowserInteractionComponent;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var primeng__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! primeng */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
    /* harmony import */


    var _browser_step_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../browser-step.model */
    "./src/app/pages/scenario/browser-step/browser-step.model.ts");
    /* harmony import */


    var _browser_step_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../browser-step.service */
    "./src/app/pages/scenario/browser-step/browser-step.service.ts");
    /* harmony import */


    var src_app_pages_home_load_test_services_load_test_common_services__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! src/app/pages/home/load-test/services/load-test-common.services */
    "./src/app/pages/home/load-test/services/load-test-common.services.ts");
    /* harmony import */


    var _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! ../../constants/scen-schedule-constants */
    "./src/app/pages/scenario/constants/scen-schedule-constants.ts");
    /* harmony import */


    var _tagsAutocomplete_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! ./tagsAutocomplete.service */
    "./src/app/pages/scenario/browser-step/browser-interaction/tagsAutocomplete.service.ts");
    /* harmony import */


    var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! src/app/core/session/session.service */
    "./src/app/core/session/session.service.ts");
    /* harmony import */


    var src_app_shared_header_work_profile_services_work_profile_active_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! src/app/shared/header/work-profile/services/work-profile-active.service */
    "./src/app/shared/header/work-profile/services/work-profile-active.service.ts");
    /* harmony import */


    var _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
    /*! ../../service/scenario-utils.service */
    "./src/app/pages/scenario/service/scenario-utils.service.ts");
    /* harmony import */


    var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
    /*! @angular/platform-browser */
    "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js");
    /* harmony import */


    var src_app_pages_home_script_manager_services_script_rest_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
    /*! src/app/pages/home/script-manager/services/script-rest.service */
    "./src/app/pages/home/script-manager/services/script-rest.service.ts");
    /* harmony import */


    var src_app_pages_home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
    /*! src/app/pages/home/script-manager/services/script.state */
    "./src/app/pages/home/script-manager/services/script.state.ts");
    /* harmony import */


    var _scenario_design_condition_scenario_condition_scenario_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
    /*! ../../scenario-design/condition-scenario/condition-scenario.component */
    "./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.component.ts");
    /* harmony import */


    var _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(
    /*! ../../constants/scen-common-constants */
    "./src/app/pages/scenario/constants/scen-common-constants.ts");

    var DEFAULT_LOCATOR_PLATFORM = _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"];

    var BrowserInteractionComponent = /*#__PURE__*/function () {
      function BrowserInteractionComponent(browserStepService, confirmationService, loadtestCommonService, tagAutoCompleteService, scenUtilsService, sessionService, workProfile, sanitizer, restService, changeDetectorRef) {
        _classCallCheck(this, BrowserInteractionComponent);

        this.browserStepService = browserStepService;
        this.confirmationService = confirmationService;
        this.loadtestCommonService = loadtestCommonService;
        this.tagAutoCompleteService = tagAutoCompleteService;
        this.scenUtilsService = scenUtilsService;
        this.sessionService = sessionService;
        this.workProfile = workProfile;
        this.sanitizer = sanitizer;
        this.restService = restService;
        this.changeDetectorRef = changeDetectorRef;
        this.platformAndroid = _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"];
        this.platformIOS = _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"];
        this.locatorPlatformOptions = [{
          label: 'Android Locators',
          value: _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]
        }, {
          label: 'iOS Locators',
          value: _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]
        }];
        this.selectedElementLocatorPlatform = DEFAULT_LOCATOR_PLATFORM;
        this.selectedHeroLocatorPlatform = DEFAULT_LOCATOR_PLATFORM;
        this.selectedAssertionLocatorPlatform = DEFAULT_LOCATOR_PLATFORM; // Keeps locator-tab selection independent for each step so switching steps does not overwrite tab choice globally.

        this.stepPlatformSelectionMap = {};
        this.actionName = '';
        this.actionDesciption = '';
        this.isDescription = false;
        this.isTags = false;
        this.actionTags = [];
        this.actionTagsChips = [];
        this.tagMetadata = {};
        this.conditionChipValue = [];
        this.assertTags = [];
        this.actionListOptions = [];
        this.directionOption = [];
        this.selectedAction = 'go';
        this.stepElementValue = '';
        this.inputElementValue = '';
        this.locatorlessActions = ['thinkTime', 'switchTab', 'go', 'goBack', 'goForward'];
        this.urlValue = '';
        this.tagName = '';
        this.thinkTime = 0;
        this.tabIndex = 0;
        this.waitElementTimeout = 60;
        this.optional = false;
        this.actionFail = '';
        this.selectAssertTarget = 'Text';
        this.selectAssertCondEle = 'EXIST';
        this.assertPropType = 'Height';
        this.selectAssertCond = 'Equal';
        this.assertValue = '';
        this.assertionName = '';
        this.assertionFailMsg = '';
        this.isCaptureAllValue = false;
        this.id = '';
        this["class"] = '';
        this.xpath = '';
        this.isHeroElement = false;
        this.displayIframeLocators = false;
        this.displayAssertions = false;
        this.headerRelativePath = "scenario/scenarios/assertionPerfData.json";
        this.elementLocatorInstance = {
          heading: "Element Locators"
        };
        this.elementLocatorInstances = _defineProperty(_defineProperty({}, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"], {
          heading: "Element Locators",
          locators: [{
            locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ID,
            value: ''
          }]
        }), _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"], {
          heading: "Element Locators",
          locators: [{
            locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ID,
            value: ''
          }]
        });
        this.iframeLocatorInstances = [];
        this.heroLocatorInstance = {
          heading: "Hero Element Locators"
        };
        this.heroLocatorInstances = _defineProperty(_defineProperty({}, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"], {
          heading: "Hero Element Locators",
          locators: [{
            locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ID,
            value: ''
          }]
        }), _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"], {
          heading: "Hero Element Locators",
          locators: [{
            locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ID,
            value: ''
          }]
        });
        this.assertLocatorInstance = {
          heading: "Assertion Locators"
        };
        this.assertLocatorInstances = _defineProperty(_defineProperty({}, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"], {
          heading: "Assertion Locators",
          locators: [{
            locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH,
            value: ''
          }]
        }), _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"], {
          heading: "Assertion Locators",
          locators: [{
            locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH,
            value: ''
          }]
        });
        this.groupType = "";
        this.isCrossPlatformGroup = false;
        this.rdtNativeConfig = []; // assertion-related inputs/outputs, mirroring scenario-design.component

        this.assertConfig = null;
        this.assertConfigChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.assertionConfig = {
          assertions: []
        }; // allow parent to supply full page list so assertion child can offer alternate page selection

        this.allPages = []; // page/flow/group name used by assertion component

        this.pageName = '';
        this.groupName = '';
        this.flowName = '';
        this.changedBrowserStepsConfig = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.displayAddAssert = false;
        this.advanceSettings = false;
        this.operationFlag = "add";
        this.oldAssertName = "";
        this.filteredTags = [];
        this.tagInput = '';
        this.showInteractionDetails = true;
        this.showSourceTab = false;
        this.showPreSnapTab = false;
        this.showPostSnapTab = false;
        this.configurationTitle = "Configure Interaction";
        this.loadingSnapshot = false;
        this.editorOptionsHdr2 = {
          theme: 'Light',
          language: 'xml',
          lineDecorationsWidth: 1,
          foldingStrategy: "auto",
          showFoldingControls: "mouseover",
          renderIndentGuides: false,
          renderLineHighlight: 'line',
          glyphMargin: true,
          lineNumbersMinChars: 0,
          minimap: {
            enabled: false
          },
          fontFamily: 'inherit',
          scrollbar: {
            verticalScrollbarSize: 5
          },
          wordWrap: 'off',
          lineNumbers: "off",
          readOnly: true,
          automaticLayout: true
        };
        this.editorOptionsHdr1 = {
          theme: 'Light',
          language: 'c',
          lineDecorationsWidth: 1,
          foldingStrategy: "auto",
          showFoldingControls: "mouseover",
          renderIndentGuides: false,
          renderLineHighlight: 'line',
          glyphMargin: true,
          lineNumbersMinChars: 0,
          minimap: {
            enabled: false
          },
          fontFamily: 'inherit',
          scrollbar: {
            verticalScrollbarSize: 5
          },
          wordWrap: 'off',
          readOnly: false,
          automaticLayout: true
        };
        this.isFileLoading = false;
        this.matchingPattern = "";
        this.regexTestData = "";
        this.regexTestResult = null;
        this.isDisabled = false;
        this.assertionDesc = '';
        this.customPropertyValue = '';
        this.predefinedProperties = ['Height', 'Shadow', 'Valign', 'ID', 'Class', 'Max Length'];
        this.showPreStepTab = false;
        this.showPostStepTab = false;
      }

      return _createClass(BrowserInteractionComponent, [{
        key: "isBrowserGroup",
        value: function isBrowserGroup() {
          return this.groupType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_6__["GROUP_TYPE"].BROWSER;
        }
      }, {
        key: "shouldShowLocators",
        get: function get() {
          return this.selectedAction && this.locatorlessActions.includes(this.selectedAction);
        } // Show Android/iOS locator toggle only for RDT steps that belong to a converted cross-platform group.

      }, {
        key: "shouldShowLocatorPlatformTabs",
        get: function get() {
          if (!this.browserStepsConfig || !this.isCrossPlatformGroup || this.groupType !== _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_6__["GROUP_TYPE"].RDT_NATIVE) {
            return false;
          } // For cross-platform LaunchApp, always show Android/iOS tabs in hero locator UI even when platform hero fields are not yet created.


          if (this.selectedAction === 'LaunchApp') {
            return true;
          }

          return !!(this.browserStepsConfig.androidLocators || this.browserStepsConfig.iosLocators || this.browserStepsConfig.androidHeroElement || this.browserStepsConfig.iosHeroElement);
        } // Cross-platform app ID inputs are shown only when both platform app IDs exist on the step.

      }, {
        key: "shouldShowCrossPlatformAppIds",
        get: function get() {
          if (!this.browserStepsConfig || this.groupType !== _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_6__["GROUP_TYPE"].RDT_NATIVE || this.selectedAction !== 'LaunchApp') {
            return false;
          } // Keep both platform app-id fields visible for cross-platform groups so manual conversion can fill missing side.


          var androidAppPackage = this.browserStepsConfig.appPackage;
          var iosBundleId = this.browserStepsConfig.bundleId;
          return this.isCrossPlatformGroup || !!(androidAppPackage && iosBundleId);
        } // Resolves app package from RDT_NATIVE config by platform using `os`.

      }, {
        key: "getRdtAppIdByPlatform",
        value: function getRdtAppIdByPlatform(platform) {
          var devices = Array.isArray(this.rdtNativeConfig) ? this.rdtNativeConfig : [];
          var normalizedPlatform = ((platform || '') + '').toLowerCase();
          var matchingDevice = devices.find(function (device) {
            return (((device === null || device === void 0 ? void 0 : device.os) || '') + '').toLowerCase() === normalizedPlatform;
          });

          if (!matchingDevice) {
            return '';
          }

          return ((matchingDevice.appPackage || '') + '').trim();
        } // Normalizes LaunchApp app-id fields so cross-platform JSON persists only `appPackage` (Android) and `bundleId` (iOS).

      }, {
        key: "ensureCrossPlatformAppIds",
        value: function ensureCrossPlatformAppIds() {
          if (!this.browserStepsConfig || this.groupType !== _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_6__["GROUP_TYPE"].RDT_NATIVE) {
            return;
          }

          var isLaunchAppStep = ((this.browserStepsConfig.type || '') + '').toLowerCase() === 'launchapp';

          if (!isLaunchAppStep) {
            return;
          } // For RDT_NATIVE, LaunchApp ids are sourced only from group-level RDT device configuration by platform.


          var resolvedAndroidAppPackage = ((this.getRdtAppIdByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]) || '') + '').trim();
          var resolvedIosBundleId = ((this.getRdtAppIdByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]) || '') + '').trim();
          this.browserStepsConfig.appPackage = resolvedAndroidAppPackage;
          this.browserStepsConfig.bundleId = resolvedIosBundleId; // Temporary debug for RDT_NATIVE LaunchApp mapping validation.

          console.log('[RDT_NATIVE][LaunchApp] appPackage/bundleId resolved', {
            stepName: this.browserStepsConfig.stepName,
            rawAppPackage: this.browserStepsConfig.appPackage,
            rawBundleId: this.browserStepsConfig.bundleId,
            rawBundleID: this.browserStepsConfig.bundleID,
            rawBundleid: this.browserStepsConfig.bundleid,
            rawIosAppId: this.browserStepsConfig.iosAppId,
            rdtNativeConfig: this.rdtNativeConfig,
            rdtAndroidAppPackage: this.getRdtAppIdByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]),
            rdtIosAppPackage: this.getRdtAppIdByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]),
            resolvedAndroidAppPackage: resolvedAndroidAppPackage,
            resolvedIosBundleId: resolvedIosBundleId
          });
        } // Supports imported iOS locator payloads that still use lowercase keys like `accessibilityid`/`iosnspredicatestring`.

      }, {
        key: "normalizeLocatorAliases",
        value: function normalizeLocatorAliases(rawLocators) {
          var locators = rawLocators && typeof rawLocators === 'object' ? Object.assign({}, rawLocators) : {};

          if (locators.accessibilityId == null && locators.accessibilityid != null) {
            locators.accessibilityId = locators.accessibilityid;
          }

          if (locators.iOSClassChain == null && locators.iosclasschain != null) {
            locators.iOSClassChain = locators.iosclasschain;
          }

          if (locators.iOSNsPredicateString == null && locators.iosnspredicatestring != null) {
            locators.iOSNsPredicateString = locators.iosnspredicatestring;
          }

          if (locators.ai_locator == null && locators.ai_locators != null) {
            locators.ai_locator = locators.ai_locators;
          }

          return locators;
        } // Normalizes locator-key aliases on every step load so each step shows its own iOS locator/hero data in UI.

      }, {
        key: "normalizeCurrentStepLocatorAliases",
        value: function normalizeCurrentStepLocatorAliases() {
          var _this = this;

          if (!this.browserStepsConfig) {
            return;
          }

          if (this.browserStepsConfig.iosLocators) {
            this.browserStepsConfig.iosLocators = this.normalizeLocatorAliases(this.browserStepsConfig.iosLocators);
          }

          if (this.browserStepsConfig.iosHeroElement) {
            this.browserStepsConfig.iosHeroElement = this.normalizeLocatorAliases(this.browserStepsConfig.iosHeroElement);
          }

          if (Array.isArray(this.browserStepsConfig.assertions)) {
            this.browserStepsConfig.assertions.forEach(function (assertion) {
              if (assertion === null || assertion === void 0 ? void 0 : assertion.iosLocators) {
                assertion.iosLocators = _this.normalizeLocatorAliases(assertion.iosLocators);
              }
            });
          }
        } // merged ngOnChanges below includes assertion-handling logic

      }, {
        key: "onAssertionConfigChange",
        value: function onAssertionConfigChange(cfg) {
          this.assertionConfig = cfg || {
            assertions: []
          };
          this.assertConfigChange.emit(this.assertionConfig);
        }
      }, {
        key: "ngOnInit",
        value: function ngOnInit() {
          var _a, _b;

          this.loadAllTags(); // Trigger fetch of tag metadata

          try {
            var workprofile = this.sessionService.session.cctx.u == "cavisson" ? "admin" : this.sessionService.session.cctx.u + "/" + this.workProfile.profile;
            this.tagAutoCompleteService.getTagMetaData(this.scenUtilsService.Project, this.scenUtilsService.subProject, workprofile);
          } catch (err) {
            console.error('[BrowserInteractionComponent] getTagMetaData call failed', err);
          }

          this.headerRelativePath = "scenario/scenarios/assertionPerfData.json";
          this.directionOption = _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["DirectionOtpions"];
          this.updateStepTypeOptions();

          if (!this.browserStepsConfig.coordinates || Object.keys(this.browserStepsConfig.coordinates).length === 0) {
            this.browserStepsConfig.coordinates = {
              startX: 0,
              startY: 0,
              endX: 0,
              endY: 0,
              screenWidth: 0,
              screenHeight: 0,
              isRelative: false,
              duration: 0
            };
          }

          this.browserStepsConfig.preStep = {
            inline: ((_a = this.browserStepsConfig.preStep) === null || _a === void 0 ? void 0 : _a.inline) || ""
          };
          this.browserStepsConfig.postStep = {
            inline: ((_b = this.browserStepsConfig.postStep) === null || _b === void 0 ? void 0 : _b.inline) || ""
          };
          this.browserStepsConfig.authCredentials = this.browserStepsConfig.authCredentials || {
            username: '',
            password: ''
          };
          this.ensureCrossPlatformAppIds();
          this.normalizeCurrentStepLocatorAliases();

          if (this.browserStepsConfig) {
            // Convert string array to Chip array for tags-autocomplete component
            if (this.browserStepsConfig.tags && this.browserStepsConfig.tags.length > 0) {
              this.actionTagsChips = this.browserStepsConfig.tags.map(function (tag) {
                if (tag.includes('=')) {
                  var _tag$split = tag.split('='),
                      _tag$split2 = _toArray(_tag$split),
                      key = _tag$split2[0],
                      valueParts = _arrayLikeToArray(_tag$split2).slice(1);

                  var value = valueParts.join('=');
                  return {
                    key: key.trim(),
                    value: value.trim(),
                    display: tag
                  };
                } else {
                  return {
                    key: tag,
                    display: tag
                  };
                }
              });
            }

            this.selectedAction = this.browserStepsConfig.type;
            this.stepElementValue = this.browserStepsConfig.stepName;
            this.preSnapFilePath = this.browserStepsConfig.preSnapshot ? this.browserStepsConfig.preSnapshot : "";
            this.snapshot = this.browserStepsConfig.snapshot ? this.browserStepsConfig.snapshot : "";
            this.pageSourcePath = this.browserStepsConfig.pageSource ? this.browserStepsConfig.pageSource : "";
          }

          this.assertTarget = [{
            label: 'Text',
            value: 'Text'
          }, {
            label: 'Element',
            value: 'Element'
          }, {
            label: 'Element Count',
            value: 'Element Count'
          }, {
            label: 'Property',
            value: 'Property'
          }]; // if assertype1 == Text

          this.assertCond = [{
            label: 'Equal',
            value: 'Equal'
          }, {
            label: 'Not Equal',
            value: 'Not Equal'
          }, {
            label: 'Contains',
            value: 'Contains'
          }, {
            label: 'Not Contains',
            value: 'Not Contains'
          }, {
            label: 'IN',
            value: 'IN'
          }, {
            label: 'Greater Than',
            value: 'Greater Than'
          }, {
            label: 'Less Than',
            value: 'Less Than'
          }, {
            label: 'Between',
            value: 'Between'
          }, {
            label: 'Not Between',
            value: 'Not Between'
          }, {
            label: 'Ascending (Alphanumeric)',
            value: 'ASC_ALPHA'
          }, {
            label: 'Descending (Alphanumeric)',
            value: 'DESC_ALPHA'
          }, {
            label: 'Ascending (Numeric)',
            value: 'ASC_NUM'
          }, {
            label: 'Descending (Numeric)',
            value: 'DESC_NUM'
          }]; //in case of element count

          this.assertEleCount = [{
            label: 'Equal',
            value: 'Equal'
          }, {
            label: 'Not Equal',
            value: 'Not Equal'
          }, {
            label: 'Greater Than',
            value: 'Greater Than'
          }, {
            label: 'Less Than',
            value: 'Less Than'
          }, {
            label: 'IN',
            value: 'IN'
          }, {
            label: 'Between',
            value: 'Between'
          }, {
            label: 'Not Between',
            value: 'Not Between'
          }]; // if assertype1 == Element

          this.assertCondEle = [{
            label: 'EXIST',
            value: 'EXIST'
          }, {
            label: 'EXISTS AND VISIBLE',
            value: 'EXISTS AND VISIBLE'
          }, {
            label: 'EXISTS AND CLICKABLE',
            value: 'EXISTS AND CLICKABLE'
          }, {
            label: 'EXISTS, VISIBLE AND CLICKABLE',
            value: 'EXISTS, VISIBLE AND CLICKABLE'
          }, {
            label: 'NOT EXIST',
            value: 'NOT EXIST'
          }]; // if assertype1 == Property

          this.assertProertyType = [{
            label: 'Height',
            value: 'Height'
          }, {
            label: 'Shadow',
            value: 'Shadow'
          }, {
            label: 'Valign',
            value: 'Valign'
          }, {
            label: 'ID',
            value: 'ID'
          }, {
            label: 'Class',
            value: 'Class'
          }, {
            label: 'Max Length',
            value: 'Max Length'
          }, {
            label: 'Custom',
            value: 'Custom'
          }];
          this.actionOnFail = [{
            label: 'Continue Session',
            value: 'Continue Session'
          }, {
            label: 'Stop Session',
            value: 'Stop Session'
          }];
        }
      }, {
        key: "loadAllTags",
        value: function loadAllTags() {
          // Use the new metadata-based service API
          // Get a fresh copy of metadata each time to ensure latest tags are available
          var metadata = this.tagAutoCompleteService.getMetadata();
          this.tagMetadata = metadata; // For legacy UI bits that expect a flat list, expose keys as options

          var keys = Object.keys(metadata || {});
          this.filteredTags = keys.map(function (k) {
            return {
              label: k,
              value: k
            };
          }); // Convert existing browserStepsConfig.tags to Chip format

          if (this.browserStepsConfig && this.browserStepsConfig.tags && this.browserStepsConfig.tags.length > 0) {
            this.actionTagsChips = this.browserStepsConfig.tags.map(function (tag) {
              if (tag.includes('=')) {
                var _tag$split3 = tag.split('='),
                    _tag$split4 = _toArray(_tag$split3),
                    key = _tag$split4[0],
                    valueParts = _arrayLikeToArray(_tag$split4).slice(1);

                var value = valueParts.join('=');
                return {
                  key: key.trim(),
                  value: value.trim(),
                  display: tag
                };
              } else {
                return {
                  key: tag,
                  display: tag
                };
              }
            });
          } else {
            this.actionTagsChips = [];
          }
        }
      }, {
        key: "updateStepTypeOptions",
        value: function updateStepTypeOptions() {
          if (this.groupType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_6__["GROUP_TYPE"].BROWSER) this.actionListOptions = _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionList"];else if (this.groupType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_6__["GROUP_TYPE"].RDT_NATIVE) this.actionListOptions = _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionListForRDT"];else this.actionListOptions = _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionList"];
        }
      }, {
        key: "clickButtonEvent",
        value: function clickButtonEvent(event) {
          var _a, _b, _c, _d, _e, _f;

          var me = this;

          if (((_b = (_a = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _a === void 0 ? void 0 : _a.actionConfig) === null || _b === void 0 ? void 0 : _b.action) === "addAssert") {
            this.addAssertions();
          } else if (((_d = (_c = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _c === void 0 ? void 0 : _c.actionConfig) === null || _d === void 0 ? void 0 : _d.action) === "edit") {
            this.editAssertions(event.cavEventExt.row);
          } else if (((_f = (_e = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _e === void 0 ? void 0 : _e.actionConfig) === null || _f === void 0 ? void 0 : _f.action) === "delete") {
            this.deleteAssertions(event.cavEventExt.row);
          }
        }
      }, {
        key: "deleteAssertions",
        value: function deleteAssertions(row) {
          var _this2 = this;

          this.confirmationService.confirm({
            message: "Are you sure want to remove <b>" + row.assertionName + "</b> ?",
            header: 'Confirmation',
            key: "assertConfirm",
            accept: function accept() {
              var removeNames = [row.assertionName];
              _this2.browserStepsConfig.assertions = _this2.browserStepsConfig.assertions.filter(function (a) {
                return !removeNames.includes(a.assertionName);
              });

              _this2.changedBrowserStepsConfig.emit(_this2.browserStepsConfig);
            },
            reject: function reject() {}
          });
        }
      }, {
        key: "editAssertions",
        value: function editAssertions(row) {
          this.operationFlag = "edit";
          this.displayAddAssert = true; // Handle property type: if custom, set accordingly

          var assertPropType = row.assertOnPropName || "";
          var customPropertyValue = "";

          if (this.predefinedProperties.includes(row.assertOnPropName)) {
            assertPropType = row.assertOnPropName;
          } else {
            assertPropType = 'Custom';
            customPropertyValue = row.assertOnPropName || "";
          } // Set main assertion fields


          Object.assign(this, {
            selectAssertTarget: row.assertOnType || "",
            selectAssertCond: row.assertOnCondition || "",
            selectAssertCondEle: row.assertConditionEle || "",
            assertPropType: assertPropType,
            customPropertyValue: customPropertyValue,
            assertionName: row.assertionName || "",
            assertionDesc: row.assertionDesc || "",
            oldAssertName: row.assertionName || "",
            assertValue: row.assertionValue || "",
            matchingPattern: row.matchingPattern || "",
            matchingPatternIndex: Number(row.matchingIndex) || 0,
            assertCondMinVal: Number(row.min) || 0,
            assertCondMaxVal: Number(row.max) || 0,
            actionFail: row.failureVal || "",
            assertionFailMsg: row.failMessage || "",
            assertTags: row.tags ? row.tags.split(",") : [],
            isHeroElement: String(row.isHeroElement).toLowerCase() === "true",
            conditionChipValue: row.assertOnCondition === "IN" ? row.assertionValue.split(",").map(function (v) {
              return v.trim();
            }) : []
          });
          var androidAssertionLocators = this.getAssertionLocatorsByPlatform(row, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]);
          var iosAssertionLocators = this.getAssertionLocatorsByPlatform(row, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]);
          this.assertLocatorInstances = _defineProperty(_defineProperty({}, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"], this.ensureLocatorInputForUI(this.mapToLocatorOutput(androidAssertionLocators, "Assertion Locators"), "Assertion Locators", _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH)), _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"], this.ensureLocatorInputForUI(this.mapToLocatorOutput(iosAssertionLocators, "Assertion Locators"), "Assertion Locators", _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH));
          this.syncAssertionLocatorInstanceFromPlatform();
        }
      }, {
        key: "hideValueField",
        value: function hideValueField() {
          var _a, _b;

          return ((_a = this.selectAssertCond) === null || _a === void 0 ? void 0 : _a.includes('ASC_')) || ((_b = this.selectAssertCond) === null || _b === void 0 ? void 0 : _b.includes('DESC_'));
        }
      }, {
        key: "updateAssertions",
        value: function updateAssertions() {
          var _this3 = this;

          var _a, _b, _c, _d;

          if (!this.browserStepsConfig || !Array.isArray(this.browserStepsConfig.assertions)) {
            this.browserStepsConfig.assertions = [];
          } // Validate assertion name


          if (!this.assertionName || !this.assertionName.trim()) {
            this.loadtestCommonService.errorMessage("Assertion name cannot be empty.");
            return;
          }

          if (this.selectAssertTarget === 'Property' && this.assertPropType === 'Custom' && !((_a = this.customPropertyValue) === null || _a === void 0 ? void 0 : _a.trim())) {
            this.loadtestCommonService.errorMessage("Please enter custom property name.");
            return;
          } // Find the row to update


          var existingIndex = this.browserStepsConfig.assertions.findIndex(function (a) {
            return a.assertionName === _this3.oldAssertName;
          });

          if (existingIndex === -1) {
            this.loadtestCommonService.errorMessage("Error: Assertion not found for update.");
            return;
          } // Prevent duplicate names


          var duplicateIndex = this.browserStepsConfig.assertions.findIndex(function (a) {
            return a.assertionName === _this3.assertionName;
          });

          if (duplicateIndex !== -1 && duplicateIndex !== existingIndex) {
            this.loadtestCommonService.errorMessage("Assertion name \"".concat(this.assertionName, "\" already exists."));
            return;
          }

          var existingAssertion = this.browserStepsConfig.assertions[existingIndex] || {};
          var androidAssertLocatorsConfig = this.mergeLocatorConfigPreservingExtras(this.createLocatorsConfig(this.assertLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]]), existingAssertion.androidLocators || this.buildLegacyAssertionLocators(existingAssertion));
          var iosAssertLocatorsConfig = this.mergeLocatorConfigPreservingExtras(this.createLocatorsConfig(this.assertLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]]), existingAssertion.iosLocators); // Build updated assertion object exactly like "addNewAssertions"

          var updatedAssertion = {
            assertionName: this.assertionName,
            assertionDesc: this.assertionDesc,
            assertOnType: this.selectAssertTarget || "",
            assertOnPropName: this.assertPropType === 'Custom' ? this.customPropertyValue : this.assertPropType || "",
            assertOnCondition: this.selectAssertCond || "",
            assertConditionEle: this.selectAssertCondEle || "",
            assertionValue: this.selectAssertCond === 'IN' ? this.conditionChipValue.join(", ") : this.assertValue,
            min: ((_b = this.assertCondMinVal) === null || _b === void 0 ? void 0 : _b.toString()) || "",
            max: ((_c = this.assertCondMaxVal) === null || _c === void 0 ? void 0 : _c.toString()) || "",
            matchingPattern: this.matchingPattern || "",
            matchingIndex: ((_d = this.matchingPatternIndex) === null || _d === void 0 ? void 0 : _d.toString()) || "",
            failureVal: this.actionFail || "",
            failMessage: this.assertionFailMsg || "",
            tags: this.assertTags && this.assertTags.length > 0 ? this.assertTags.join(",") : "",
            // Updated locator fields (same as Add)
            xpath: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.xpath,
            xpath1: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.xpath1,
            xpath2: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.xpath2,
            cssPath: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.csspath,
            "class": androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig["class"],
            id: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.id,
            domString: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.domstring,
            role: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.role,
            coordinates: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.coordinates,
            accessibilityId: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.accessibilityId,
            androidUIAutomator: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.androidUIAutomator,
            androidDataMatcher: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.androidDataMatcher,
            androidViewTag: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.androidViewTag,
            iOSClassChain: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.iOSClassChain,
            iOSNsPredicateString: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.iOSNsPredicateString,
            androidLocators: androidAssertLocatorsConfig,
            iosLocators: iosAssertLocatorsConfig,
            isHeroElement: this.isHeroElement ? "true" : "false"
          }; // Apply update

          this.browserStepsConfig.assertions[existingIndex] = Object.assign(Object.assign({}, this.browserStepsConfig.assertions[existingIndex]), updatedAssertion);
          this.loadtestCommonService.successMessage("Assertion updated successfully.");
          this.displayAddAssert = false;
          this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
        }
      }, {
        key: "addAssertions",
        value: function addAssertions() {
          var _a, _b, _c, _d, _e, _f, _g, _h;

          this.displayAddAssert = true;
          this.operationFlag = "add";
          Object.assign(this, {
            selectAssertTarget: ((_b = (_a = this.assertTarget) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.value) || "",
            selectAssertCond: ((_d = (_c = this.assertCond) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.value) || "",
            selectAssertCondEle: ((_f = (_e = this.assertCondEle) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.value) || "",
            assertPropType: ((_h = (_g = this.assertProertyType) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.value) || "",
            assertionName: "",
            assertionDesc: "",
            oldAssertName: "",
            assertValue: "",
            matchingPattern: "",
            regexTestData: "",
            regexTestResult: null,
            matchingPatternIndex: 0,
            isCaptureAllValue: false,
            assertCondMinVal: 0,
            assertCondMaxVal: 0,
            actionFail: "",
            assertionFailMsg: "",
            assertTags: [],
            conditionChipValue: [],
            isHeroElement: false,
            customPropertyValue: ""
          });
          this.assertLocatorInstances = _defineProperty(_defineProperty({}, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"], {
            heading: "Assertion Locators",
            locators: [{
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH,
              value: ''
            }]
          }), _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"], {
            heading: "Assertion Locators",
            locators: [{
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH,
              value: ''
            }]
          });
          this.syncAssertionLocatorInstanceFromPlatform();
        }
      }, {
        key: "cancelAddAssert",
        value: function cancelAddAssert() {
          this.displayAddAssert = false;
        }
      }, {
        key: "addNewAssertions",
        value: function addNewAssertions() {
          var _this4 = this;

          var _a, _b, _c, _d, _e;

          this.operationFlag = "add"; // Basic validation

          if (!((_a = this.assertionName) === null || _a === void 0 ? void 0 : _a.trim())) {
            this.loadtestCommonService.errorMessage("Please enter assertion name.");
            return false;
          } // if (!this.assertionFailMsg?.trim()) {
          //     this.loadtestCommonService.errorMessage("Please enter failure message.");
          //     return false;
          // }


          if (this.selectAssertTarget === 'Property' && this.assertPropType === 'Custom' && !((_b = this.customPropertyValue) === null || _b === void 0 ? void 0 : _b.trim())) {
            this.loadtestCommonService.errorMessage("Please enter custom property name.");
            return false;
          } // Initialize assertions array if missing


          if (!this.browserStepsConfig.assertions) {
            this.browserStepsConfig.assertions = [];
          } // Check for duplicate assertion name (case-insensitive)


          var isDuplicate = this.browserStepsConfig.assertions.some(function (a) {
            var _a;

            return ((_a = a.assertionName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === _this4.assertionName.toLowerCase();
          });

          if (isDuplicate) {
            this.loadtestCommonService.errorMessage("Assertion \"".concat(this.assertionName, "\" already exists."));
            return;
          }

          var androidAssertLocatorsConfig = this.createLocatorsConfig(this.assertLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]]);
          var iosAssertLocatorsConfig = this.createLocatorsConfig(this.assertLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]]); // Build assertion object (aligned with AssertionConfig)

          var assertionData = {
            assertionName: this.assertionName,
            assertionDesc: this.assertionDesc,
            assertOnType: this.selectAssertTarget || "",
            assertOnPropName: this.assertPropType === 'Custom' ? this.customPropertyValue : this.assertPropType || "",
            assertOnCondition: this.selectAssertCond || "",
            assertConditionEle: this.selectAssertCondEle || "",
            assertionValue: this.selectAssertCond == 'IN' ? this.conditionChipValue.join(", ") : this.assertValue,
            min: ((_c = this.assertCondMinVal) === null || _c === void 0 ? void 0 : _c.toString()) || "",
            max: ((_d = this.assertCondMaxVal) === null || _d === void 0 ? void 0 : _d.toString()) || "",
            matchingPattern: this.matchingPattern || "",
            matchingIndex: ((_e = this.matchingPatternIndex) === null || _e === void 0 ? void 0 : _e.toString()) || "",
            failureVal: this.actionFail || "",
            failMessage: this.assertionFailMsg || "",
            tags: this.assertTags && this.assertTags.length > 0 ? this.assertTags.join(",") : "",
            xpath: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.xpath,
            xpath1: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.xpath1,
            xpath2: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.xpath2,
            cssPath: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.csspath,
            "class": androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig["class"],
            id: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.id,
            domString: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.domstring,
            role: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.role,
            coordinates: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.coordinates,
            accessibilityId: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.accessibilityId,
            androidUIAutomator: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.androidUIAutomator,
            androidDataMatcher: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.androidDataMatcher,
            androidViewTag: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.androidViewTag,
            iOSClassChain: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.iOSClassChain,
            iOSNsPredicateString: androidAssertLocatorsConfig === null || androidAssertLocatorsConfig === void 0 ? void 0 : androidAssertLocatorsConfig.iOSNsPredicateString,
            androidLocators: androidAssertLocatorsConfig,
            iosLocators: iosAssertLocatorsConfig,
            isHeroElement: this.isHeroElement ? "true" : "false"
          }; // Push to browserStepsConfig.assertions

          this.browserStepsConfig.assertions.push(assertionData); // Notify success and close dialog

          this.loadtestCommonService.successMessage("Assertion saved successfully.");
          this.displayAddAssert = false;
          this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
          console.log("this.browserStepService: ", this.browserStepsConfig);
        }
      }, {
        key: "ngOnChanges",
        value: function ngOnChanges(changes) {
          var _this5 = this;

          var _a, _b, _c, _d, _e, _f; // assertion config from parent


          if (changes.assertConfig && this.assertConfig) {
            // deep clone to avoid mutating parent object
            this.assertionConfig = JSON.parse(JSON.stringify(this.assertConfig || {
              assertions: []
            }));
          }

          console.log("ng On changed called .......", this.groupType);
          var workspace = this.sessionService.session.cctx.u == 'cavisson' ? 'admin' : this.sessionService.session.cctx.u;

          if (this.browserStepsConfig) {
            this.pageName = this.browserStepsConfig.stepName;
            this.browserStepsConfig.authCredentials = this.browserStepsConfig.authCredentials || {
              username: '',
              password: ''
            };
            this.ensureCrossPlatformAppIds();
            this.normalizeCurrentStepLocatorAliases();

            if (!this.browserStepsConfig.coordinates || Object.keys(this.browserStepsConfig.coordinates).length === 0) {
              this.browserStepsConfig.coordinates = {
                startX: 0,
                startY: 0,
                endX: 0,
                endY: 0,
                screenWidth: 0,
                screenHeight: 0,
                isRelative: false,
                duration: 0
              };
            }

            this.browserStepsConfig.preStep = {
              inline: ((_a = this.browserStepsConfig.preStep) === null || _a === void 0 ? void 0 : _a.inline) || ""
            };
            this.browserStepsConfig.postStep = {
              inline: ((_b = this.browserStepsConfig.postStep) === null || _b === void 0 ? void 0 : _b.inline) || ""
            };
            this.selectedAction = this.browserStepsConfig.type;
            this.stepElementValue = this.browserStepsConfig.stepName;
            this.actionDesciption = this.browserStepsConfig.description ? this.browserStepsConfig.description : '';
            this.isDescription = this.browserStepsConfig.descOptional ? true : false;
            this.actionTags = ((_c = this.browserStepsConfig.tags) === null || _c === void 0 ? void 0 : _c.length) != 0 ? this.browserStepsConfig.tags : [];
            this.optional = this.browserStepsConfig.optional ? this.browserStepsConfig.optional : false;
            this.urlValue = this.browserStepsConfig.url ? this.browserStepsConfig.url : '';
            this.tagName = this.browserStepsConfig.tagName ? this.browserStepsConfig.tagName : '';
            this.waitElementTimeout = this.browserStepsConfig.waitElementTimeout ? this.browserStepsConfig.waitElementTimeout : 60;
            this.inputElementValue = this.browserStepsConfig.value ? this.browserStepsConfig.value : '';
            this.tabIndex = this.browserStepsConfig.tabIndex ? this.browserStepsConfig.tabIndex : 0;
            this.preSnapFilePath = this.browserStepsConfig.preSnapshot ? this.browserStepsConfig.preSnapshot : "";

            if (this.preSnapFilePath != '') {
              this.loadingSnapshot = true;
              this.preSnapFilePath = this.sanitizer.bypassSecurityTrustResourceUrl("".concat(window.location.origin, "/workspace/").concat(workspace, "/").concat(this.workProfile.profile, "/cavisson/").concat(this.scenUtilsService.Project, "/").concat(this.scenUtilsService.subProject, "/scenarios/").concat(this.scenUtilsService.scenarioName, "/Snapshots/").concat(this.browserStepsConfig.preSnapshot));
            }

            this.snapshot = this.browserStepsConfig.snapshot ? this.browserStepsConfig.snapshot : "";

            if (this.snapshot != '') {
              this.loadingSnapshot = true;
              this.snapshot = this.sanitizer.bypassSecurityTrustResourceUrl("".concat(window.location.origin, "/workspace/").concat(workspace, "/").concat(this.workProfile.profile, "/cavisson/").concat(this.scenUtilsService.Project, "/").concat(this.scenUtilsService.subProject, "/scenarios/").concat(this.scenUtilsService.scenarioName, "/Snapshots/").concat(this.browserStepsConfig.snapshot));
            }

            this.pageSourcePath = this.browserStepsConfig.pageSource ? this.browserStepsConfig.pageSource : "";

            if (this.pageSourcePath != '') {
              this.pageSourcePath = "".concat(this.scenUtilsService.Project, "/").concat(this.scenUtilsService.subProject, "/scenarios/").concat(this.scenUtilsService.scenarioName, "/").concat(this.browserStepsConfig.pageSource);
            } // Load the page source content if available


            this.loadPageSource();
            var androidLocators = this.getStepLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]);
            var iosLocators = this.getStepLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]);
            this.elementLocatorInstances = _defineProperty(_defineProperty({}, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"], this.ensureLocatorInputForUI(this.mapToLocatorOutput(androidLocators, "Element Locators"), "Element Locators", _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ID)), _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"], this.ensureLocatorInputForUI(this.mapToLocatorOutput(iosLocators, "Element Locators"), "Element Locators", _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ID));
            this.iframeLocatorInstances = Array.isArray((_d = this.browserStepsConfig) === null || _d === void 0 ? void 0 : _d.iFrameLocator) ? this.browserStepsConfig.iFrameLocator.map(function (iframeLocators, index) {
              return _this5.mapToLocatorOutput(iframeLocators, "Iframe ".concat(index + 1));
            }) : [];
            var heroAssertionCount = 0;
            if (((_f = (_e = this.browserStepsConfig) === null || _e === void 0 ? void 0 : _e.assertions) === null || _f === void 0 ? void 0 : _f.length) > 0) heroAssertionCount = this.browserStepsConfig.assertions.filter(function (a) {
              return String(a.isHeroElement).toLowerCase() === 'true';
            }).length;
            var androidHeroLocators = this.getStepHeroLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]);
            var iosHeroLocators = this.getStepHeroLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]);
            this.heroLocatorInstances = _defineProperty(_defineProperty({}, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"], this.ensureLocatorInputForUI(this.mapToLocatorOutput(androidHeroLocators, "Hero Element Locators", heroAssertionCount), "Hero Element Locators", _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ID)), _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"], this.ensureLocatorInputForUI(this.mapToLocatorOutput(iosHeroLocators, "Hero Element Locators", heroAssertionCount), "Hero Element Locators", _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ID));
            this.restorePlatformSelectionForCurrentStep();
            this.syncElementLocatorInstanceFromPlatform();
            this.syncHeroLocatorInstanceFromPlatform();
            this.syncAssertionLocatorInstanceFromPlatform(); //console.log("this.browserStepsConfig.assertions", this.browserStepsConfig.assertions);
            // Convert string array to Chip array for tags-autocomplete component

            if (this.browserStepsConfig.tags && this.browserStepsConfig.tags.length > 0) {
              this.actionTagsChips = this.browserStepsConfig.tags.map(function (tag) {
                if (tag.includes('=')) {
                  var _tag$split5 = tag.split('='),
                      _tag$split6 = _toArray(_tag$split5),
                      key = _tag$split6[0],
                      valueParts = _arrayLikeToArray(_tag$split6).slice(1);

                  var value = valueParts.join('=');
                  return {
                    key: key.trim(),
                    value: value.trim(),
                    display: tag
                  };
                } else {
                  return {
                    key: tag,
                    display: tag
                  };
                }
              });
            } else {
              this.actionTagsChips = [];
            } // Refresh tag metadata from service to get latest tags from all steps


            this.loadAllTags();
          }

          this.updateStepTypeOptions();
        }
      }, {
        key: "onElementLocatorPlatformChanged",
        value: function onElementLocatorPlatformChanged(index) {
          this.selectedElementLocatorPlatform = index === 1 ? _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"] : _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"];
          this.syncElementLocatorInstanceFromPlatform();
          this.persistPlatformSelectionForCurrentStep();
        }
      }, {
        key: "onElementLocatorPlatformModelChange",
        value: function onElementLocatorPlatformModelChange(platform) {
          if (platform) {
            this.selectedElementLocatorPlatform = platform;
          }

          this.syncElementLocatorInstanceFromPlatform();
          this.persistPlatformSelectionForCurrentStep();
        }
      }, {
        key: "onHeroLocatorPlatformChanged",
        value: function onHeroLocatorPlatformChanged(index) {
          this.selectedHeroLocatorPlatform = index === 1 ? _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"] : _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"];
          this.syncHeroLocatorInstanceFromPlatform();
          this.persistPlatformSelectionForCurrentStep();
        }
      }, {
        key: "onHeroLocatorPlatformModelChange",
        value: function onHeroLocatorPlatformModelChange(platform) {
          if (platform) {
            this.selectedHeroLocatorPlatform = platform;
          }

          this.syncHeroLocatorInstanceFromPlatform();
          this.persistPlatformSelectionForCurrentStep();
        }
      }, {
        key: "onAssertionLocatorPlatformChanged",
        value: function onAssertionLocatorPlatformChanged(index) {
          this.selectedAssertionLocatorPlatform = index === 1 ? _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"] : _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"];
          this.syncAssertionLocatorInstanceFromPlatform();
          this.persistPlatformSelectionForCurrentStep();
        }
      }, {
        key: "onAssertionLocatorPlatformModelChange",
        value: function onAssertionLocatorPlatformModelChange(platform) {
          if (platform) {
            this.selectedAssertionLocatorPlatform = platform;
          }

          this.syncAssertionLocatorInstanceFromPlatform();
          this.persistPlatformSelectionForCurrentStep();
        } // Uses step identity key to remember locator tab selection independently for every step.

      }, {
        key: "getCurrentStepPlatformSelectionKey",
        value: function getCurrentStepPlatformSelectionKey() {
          var _a, _b;

          var stepName = (((_a = this.browserStepsConfig) === null || _a === void 0 ? void 0 : _a.stepName) || '').toString();
          var stepType = (((_b = this.browserStepsConfig) === null || _b === void 0 ? void 0 : _b.type) || '').toString();
          return "".concat(stepName, "::").concat(stepType);
        } // Restores per-step tab selection; defaults to Android when step has no cached selection yet.

      }, {
        key: "restorePlatformSelectionForCurrentStep",
        value: function restorePlatformSelectionForCurrentStep() {
          var selectionKey = this.getCurrentStepPlatformSelectionKey();
          var savedSelection = this.stepPlatformSelectionMap[selectionKey];

          if (!savedSelection) {
            this.selectedElementLocatorPlatform = DEFAULT_LOCATOR_PLATFORM;
            this.selectedHeroLocatorPlatform = DEFAULT_LOCATOR_PLATFORM;
            this.selectedAssertionLocatorPlatform = DEFAULT_LOCATOR_PLATFORM;
            return;
          }

          this.selectedElementLocatorPlatform = savedSelection.element;
          this.selectedHeroLocatorPlatform = savedSelection.hero;
          this.selectedAssertionLocatorPlatform = savedSelection.assertion;
        } // Persists the active tabs for current step so user choice remains isolated per step.

      }, {
        key: "persistPlatformSelectionForCurrentStep",
        value: function persistPlatformSelectionForCurrentStep() {
          var selectionKey = this.getCurrentStepPlatformSelectionKey();
          this.stepPlatformSelectionMap[selectionKey] = {
            element: this.selectedElementLocatorPlatform,
            hero: this.selectedHeroLocatorPlatform,
            assertion: this.selectedAssertionLocatorPlatform
          };
        }
      }, {
        key: "syncElementLocatorInstanceFromPlatform",
        value: function syncElementLocatorInstanceFromPlatform() {
          this.elementLocatorInstance = this.elementLocatorInstances[this.selectedElementLocatorPlatform];
        }
      }, {
        key: "syncHeroLocatorInstanceFromPlatform",
        value: function syncHeroLocatorInstanceFromPlatform() {
          this.heroLocatorInstance = this.heroLocatorInstances[this.selectedHeroLocatorPlatform];
        }
      }, {
        key: "syncAssertionLocatorInstanceFromPlatform",
        value: function syncAssertionLocatorInstanceFromPlatform() {
          this.assertLocatorInstance = this.assertLocatorInstances[this.selectedAssertionLocatorPlatform];
        } // Reads step element locators from the platform-specific shape, with android fallback to legacy `locators`.

      }, {
        key: "getStepLocatorsByPlatform",
        value: function getStepLocatorsByPlatform(platform) {
          if (platform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]) {
            return this.browserStepsConfig.androidLocators || this.browserStepsConfig.locators || {};
          }

          return this.browserStepsConfig.iosLocators || {};
        } // Reads hero locators from platform-specific fields, with android fallback to legacy `heroElement`.

      }, {
        key: "getStepHeroLocatorsByPlatform",
        value: function getStepHeroLocatorsByPlatform(platform) {
          if (platform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]) {
            return this.browserStepsConfig.androidHeroElement || this.browserStepsConfig.heroElement || {};
          }

          return this.browserStepsConfig.iosHeroElement || {};
        } // Reads assertion locators by platform; android falls back to legacy flat assertion locator fields.

      }, {
        key: "getAssertionLocatorsByPlatform",
        value: function getAssertionLocatorsByPlatform(assertionRow, platform) {
          if (platform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]) {
            return (assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.androidLocators) || this.buildLegacyAssertionLocators(assertionRow);
          }

          return (assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.iosLocators) || {};
        } // Normalizes old assertion locator schema into BrowserLocators so old scenarios still edit correctly.

      }, {
        key: "buildLegacyAssertionLocators",
        value: function buildLegacyAssertionLocators(assertionRow) {
          return {
            xpath: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.xpath,
            xpath1: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.xpath1,
            xpath2: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.xpath2,
            csspath: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.cssPath,
            id: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.id,
            "class": assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow["class"],
            domstring: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.domString,
            role: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.role,
            coordinates: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.coordinates,
            accessibilityId: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.accessibilityId,
            androidUIAutomator: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.androidUIAutomator,
            androidDataMatcher: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.androidDataMatcher,
            androidViewTag: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.androidViewTag,
            iOSClassChain: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.iOSClassChain,
            iOSNsPredicateString: assertionRow === null || assertionRow === void 0 ? void 0 : assertionRow.iOSNsPredicateString
          };
        } // Preserves unknown locator metadata keys (e.g. ai locator hints) while updating known locator fields from UI.

      }, {
        key: "mergeLocatorConfigPreservingExtras",
        value: function mergeLocatorConfigPreservingExtras(updatedLocators, existingLocators) {
          var existing = existingLocators && typeof existingLocators === 'object' ? existingLocators : {};
          var updated = updatedLocators && typeof updatedLocators === 'object' ? updatedLocators : {};
          return Object.assign(Object.assign({}, existing), updated);
        } // Ensures locator editor always has one editable row to prevent empty UI state.

      }, {
        key: "ensureLocatorInputForUI",
        value: function ensureLocatorInputForUI(input, heading, defaultLocator) {
          if (!input || !Array.isArray(input.locators) || input.locators.length === 0) {
            return {
              heading: heading,
              locators: [{
                locator: defaultLocator,
                value: ''
              }]
            };
          }

          return input;
        }
      }, {
        key: "toggleIframeLocators",
        value: function toggleIframeLocators() {
          this.displayIframeLocators = !this.displayIframeLocators;
        }
        /**
         * Add a new iFrame locators set
         */

      }, {
        key: "addIframeLocators",
        value: function addIframeLocators() {
          if (!this.browserStepsConfig.iFrameLocator) {
            this.browserStepsConfig.iFrameLocator = [];
          } // Add a new BrowserLocators object with default XPATH locator


          var newIframeLocators = {
            xpath: ''
          };
          this.browserStepsConfig.iFrameLocator.push(newIframeLocators); // Add corresponding instance to display array

          this.iframeLocatorInstances.push({
            heading: "Iframe ".concat(this.iframeLocatorInstances.length + 1),
            locators: [{
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH,
              value: ''
            }]
          });
          this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
        }
        /**
         * Remove an iFrame locators set by index
         */

      }, {
        key: "removeIframeLocators",
        value: function removeIframeLocators(index) {
          if (this.browserStepsConfig.iFrameLocator && index >= 0 && index < this.browserStepsConfig.iFrameLocator.length) {
            this.browserStepsConfig.iFrameLocator.splice(index, 1);
            this.iframeLocatorInstances.splice(index, 1); // Update headings for remaining items (modify in-place, don't reassign array)

            this.iframeLocatorInstances.forEach(function (instance, idx) {
              instance.heading = "Iframe ".concat(idx + 1);
            });
            this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
          }
        }
        /**
         * TrackBy function for iFrame locators list to prevent re-rendering on array changes
         */

      }, {
        key: "trackByIframeIndex",
        value: function trackByIframeIndex(index, item) {
          return index;
        }
      }, {
        key: "toggleAssertions",
        value: function toggleAssertions() {
          this.displayAssertions = !this.displayAssertions;
        }
      }, {
        key: "toggleAdvanceSetting",
        value: function toggleAdvanceSetting() {
          this.advanceSettings = !this.advanceSettings;
        }
      }, {
        key: "onChangeAction",
        value: function onChangeAction(event) {
          var label = this.browserStepService.getLabelFromValue(this.selectedAction); // Set common properties

          Object.assign(this.browserStepsConfig, {
            stepName: this.stepElementValue,
            label: label,
            type: this.selectedAction,
            optional: this.optional,
            descOptional: this.isDescription,
            description: this.isDescription ? this.actionDesciption : '',
            tags: this.actionTags ? this.actionTags : []
          });

          switch (this.selectedAction) {
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].GO:
              this.browserStepsConfig.url = this.urlValue;
              break;

            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].GO_BACK:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].GO_FORWARD:
              // No extra config needed
              break;

            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].CLICK:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].LAUNCH_APP:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].SWITCH_TO_LANDSCAPE:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].SWITCH_TO_PORTRAIT:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].HIDE_KEYBOARD:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].PRESS_BACK:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].SWIPE:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].SCROLL:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].DOUBLE_CLICK:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].HOVER:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].SEND_KEYS:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].SELECT:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].SELECT_RADIO:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].CHECK:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].MULTI_SELECT:
            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].INPUT_FILES:
              this.assignElementConfig();
              break;

            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].INPUT:
              this.assignElementConfig();
              this.browserStepsConfig.value = this.inputElementValue;
              break;

            case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["InteractionType"].SWITCH_TAB:
              this.browserStepsConfig.tabIndex = this.tabIndex;
              break;
          }

          this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
        }
        /**
            * Applies locator/tag fields back to `browserStepsConfig` and preserves extra metadata for step/hero locators.
         */

      }, {
        key: "assignElementConfig",
        value: function assignElementConfig() {
          var _this6 = this;

          var _a, _b, _c, _d;

          Object.assign(this.browserStepsConfig, {
            tagName: this.tagName,
            waitElementTimeout: this.waitElementTimeout
          });

          if ((_a = this.elementLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]]) === null || _a === void 0 ? void 0 : _a.locators) {
            this.browserStepsConfig.androidLocators = this.mergeLocatorConfigPreservingExtras(this.createLocatorsConfig(this.elementLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]]), this.getStepLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]));
            this.browserStepsConfig.locators = this.browserStepsConfig.androidLocators;
          }

          if ((_b = this.elementLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]]) === null || _b === void 0 ? void 0 : _b.locators) {
            this.browserStepsConfig.iosLocators = this.mergeLocatorConfigPreservingExtras(this.createLocatorsConfig(this.elementLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]]), this.getStepLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]));
          }

          if (this.iframeLocatorInstances && this.iframeLocatorInstances.length > 0) {
            this.browserStepsConfig.iFrameLocator = this.iframeLocatorInstances.map(function (instance) {
              return _this6.createLocatorsConfig(instance);
            });
          }

          if ((_c = this.heroLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]]) === null || _c === void 0 ? void 0 : _c.locators) {
            this.browserStepsConfig.androidHeroElement = this.mergeLocatorConfigPreservingExtras(this.createLocatorsConfig(this.heroLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]]), this.getStepHeroLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]));
            this.browserStepsConfig.heroElement = this.browserStepsConfig.androidHeroElement;
          }

          if ((_d = this.heroLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]]) === null || _d === void 0 ? void 0 : _d.locators) {
            this.browserStepsConfig.iosHeroElement = this.mergeLocatorConfigPreservingExtras(this.createLocatorsConfig(this.heroLocatorInstances[_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]]), this.getStepHeroLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]));
          }
        }
      }, {
        key: "changeStepName",
        value: function changeStepName() {
          this.debounceUpdate('stepName', this.stepElementValue, 500);
        }
      }, {
        key: "changeLocatorsConfig",
        value: function changeLocatorsConfig(locatorsConfig) {
          console.log("locatorsConfig ------ > ", locatorsConfig); // Element locator edits update only current platform while preserving non-UI metadata keys.

          if (locatorsConfig && locatorsConfig.heading === "Element Locators") {
            this.elementLocatorInstances[this.selectedElementLocatorPlatform].locators = locatorsConfig.locators;
            var existingLocators = this.selectedElementLocatorPlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"] ? this.getStepLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]) : this.getStepLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]);
            var platformLocators = this.mergeLocatorConfigPreservingExtras(this.createLocatorsConfig(locatorsConfig), existingLocators);

            if (this.selectedElementLocatorPlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]) {
              this.browserStepsConfig.androidLocators = platformLocators;
              this.browserStepsConfig.locators = platformLocators;
            } else {
              this.browserStepsConfig.iosLocators = platformLocators;
            }
          } // Handle iFrameLocator array


          if (locatorsConfig && locatorsConfig.heading && locatorsConfig.heading.startsWith("Iframe")) {
            // Extract index from heading (e.g., "Iframe Locators 1" -> index 0)
            var match = locatorsConfig.heading.match(/Iframe (\d+)/);

            if (match) {
              var index = parseInt(match[1], 10) - 1; // Ensure iFrameLocator array exists

              if (!this.browserStepsConfig.iFrameLocator) {
                this.browserStepsConfig.iFrameLocator = [];
              } // Update the specific iframe locators set


              var locatorsConfig_obj = this.createLocatorsConfig(locatorsConfig);

              if (index >= 0 && index <= this.browserStepsConfig.iFrameLocator.length) {
                if (index === this.browserStepsConfig.iFrameLocator.length) {
                  this.browserStepsConfig.iFrameLocator.push(locatorsConfig_obj);
                } else {
                  this.browserStepsConfig.iFrameLocator[index] = locatorsConfig_obj;
                } // Update the display instance in-place to avoid triggering re-render


                if (this.iframeLocatorInstances[index]) {
                  Object.assign(this.iframeLocatorInstances[index], {
                    heading: locatorsConfig.heading,
                    locators: locatorsConfig.locators
                  });
                }
              }
            }
          }

          if (locatorsConfig && locatorsConfig.heading === "Hero Element Locators") {
            // Hero locator edits update only current platform while preserving non-UI metadata keys.
            this.heroLocatorInstances[this.selectedHeroLocatorPlatform].locators = locatorsConfig.locators;
            var existingHeroLocators = this.selectedHeroLocatorPlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"] ? this.getStepHeroLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]) : this.getStepHeroLocatorsByPlatform(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_IOS"]);
            var platformHeroLocators = this.mergeLocatorConfigPreservingExtras(this.createLocatorsConfig(locatorsConfig), existingHeroLocators);

            if (this.selectedHeroLocatorPlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_15__["PLATFORM_ANDROID"]) {
              this.browserStepsConfig.androidHeroElement = platformHeroLocators;
              this.browserStepsConfig.heroElement = platformHeroLocators;
            } else {
              this.browserStepsConfig.iosHeroElement = platformHeroLocators;
            }
          } // Assertion locator changes → handled separately


          if (locatorsConfig.heading === "Assertion Locators") {
            this.assertLocatorInstances[this.selectedAssertionLocatorPlatform].locators = locatorsConfig.locators;
            return; // Don't modify browserStepsConfig.locators
          }

          this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
        }
      }, {
        key: "createLocatorsConfig",
        value: function createLocatorsConfig(input) {
          var _a;

          var result = {};

          if (input && (input === null || input === void 0 ? void 0 : input.locators) && ((_a = input === null || input === void 0 ? void 0 : input.locators) === null || _a === void 0 ? void 0 : _a.length) > 0) {
            input.locators.forEach(function (l) {
              switch (l.locator) {
                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ID:
                  result.id = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH:
                  result.xpath = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH1:
                  result.xpath1 = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH2:
                  result.xpath2 = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].CSSPATH:
                  result.csspath = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].CLASS:
                  result["class"] = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].DOMSTRING:
                  result.domstring = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ROLE:
                  result.role = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].COORDINATES:
                  var _l$value$split$map = l.value.split(',').map(Number),
                      _l$value$split$map2 = _slicedToArray(_l$value$split$map, 2),
                      x = _l$value$split$map2[0],
                      y = _l$value$split$map2[1];

                  result.coordinates = [x, y];
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ACCESSIBILITY_ID:
                  result.accessibilityId = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ANDROID_UI_AUTOMATOR:
                  result.androidUIAutomator = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ANDROID_DATA_MATCHER:
                  result.androidDataMatcher = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ANDROID_VIEW_TAG:
                  result.androidViewTag = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].IOS_CLASS_CHAIN:
                  result.iOSClassChain = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].IOS_NS_PREDICATE_STRING:
                  result.iOSNsPredicateString = l.value;
                  break;

                case _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].AI_LOCATOR:
                  result.ai_locator = l.value;
                  break;
              }
            });
          }

          return result;
        }
      }, {
        key: "mapToLocatorOutput",
        value: function mapToLocatorOutput(browserLocators) {
          var heading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Element Locators";
          var heroElemAssertionCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
          var locators = [];
          var lastLocator = null;

          if (browserLocators.id !== undefined && browserLocators.id !== null) {
            if (browserLocators.id !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ID,
              value: browserLocators.id
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ID,
              value: ''
            };
          }

          if (browserLocators.xpath !== undefined && browserLocators.xpath !== null) {
            if (browserLocators.xpath !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH,
              value: browserLocators.xpath
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH,
              value: ''
            };
          }

          if (browserLocators.xpath1 !== undefined && browserLocators.xpath1 !== null) {
            if (browserLocators.xpath1 !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH1,
              value: browserLocators.xpath1
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH1,
              value: ''
            };
          }

          if (browserLocators.xpath2 !== undefined && browserLocators.xpath2 !== null) {
            if (browserLocators.xpath2 !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH2,
              value: browserLocators.xpath2
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].XPATH2,
              value: ''
            };
          }

          if (browserLocators.csspath !== undefined && browserLocators.csspath !== null) {
            if (browserLocators.csspath !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].CSSPATH,
              value: browserLocators.csspath
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].CSSPATH,
              value: ''
            };
          }

          if (browserLocators["class"] !== undefined && browserLocators["class"] !== null) {
            if (browserLocators["class"] !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].CLASS,
              value: browserLocators["class"]
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].CLASS,
              value: ''
            };
          }

          if (browserLocators.domstring !== undefined && browserLocators.domstring !== null) {
            if (browserLocators.domstring !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].DOMSTRING,
              value: browserLocators.domstring
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].DOMSTRING,
              value: ''
            };
          }

          if (browserLocators.role !== undefined && browserLocators.role !== null) {
            if (browserLocators.role !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ROLE,
              value: browserLocators.role
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ROLE,
              value: ''
            };
          }

          if (browserLocators.coordinates !== undefined && browserLocators.coordinates !== null) {
            var _browserLocators$coor = _slicedToArray(browserLocators.coordinates, 2),
                x = _browserLocators$coor[0],
                y = _browserLocators$coor[1];

            if (x !== undefined && x !== null && y !== undefined && y !== null) {
              locators.push({
                locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].COORDINATES,
                value: "".concat(x, ",").concat(y)
              });
            } else {
              lastLocator = {
                locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].COORDINATES,
                value: ''
              };
            }
          }

          if (browserLocators.accessibilityId !== undefined && browserLocators.accessibilityId !== null) {
            if (browserLocators.accessibilityId !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ACCESSIBILITY_ID,
              value: browserLocators.accessibilityId
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ACCESSIBILITY_ID,
              value: ''
            };
          }

          if (browserLocators.androidUIAutomator !== undefined && browserLocators.androidUIAutomator !== null) {
            if (browserLocators.androidUIAutomator !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ANDROID_UI_AUTOMATOR,
              value: browserLocators.androidUIAutomator
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ANDROID_UI_AUTOMATOR,
              value: ''
            };
          }

          if (browserLocators.androidDataMatcher !== undefined && browserLocators.androidDataMatcher !== null) {
            if (browserLocators.androidDataMatcher !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ANDROID_DATA_MATCHER,
              value: browserLocators.androidDataMatcher
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ANDROID_DATA_MATCHER,
              value: ''
            };
          }

          if (browserLocators.androidViewTag !== undefined && browserLocators.androidViewTag !== null) {
            if (browserLocators.androidViewTag !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ANDROID_VIEW_TAG,
              value: browserLocators.androidViewTag
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].ANDROID_VIEW_TAG,
              value: ''
            };
          }

          if (browserLocators.iOSClassChain !== undefined && browserLocators.iOSClassChain !== null) {
            if (browserLocators.iOSClassChain !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].IOS_CLASS_CHAIN,
              value: browserLocators.iOSClassChain
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].IOS_CLASS_CHAIN,
              value: ''
            };
          }

          if (browserLocators.iOSNsPredicateString !== undefined && browserLocators.iOSNsPredicateString !== null) {
            if (browserLocators.iOSNsPredicateString !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].IOS_NS_PREDICATE_STRING,
              value: browserLocators.iOSNsPredicateString
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].IOS_NS_PREDICATE_STRING,
              value: ''
            };
          }

          if (browserLocators.ai_locator !== undefined && browserLocators.ai_locator !== null) {
            if (browserLocators.ai_locator !== '') locators.push({
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].AI_LOCATOR,
              value: browserLocators.ai_locator
            });else lastLocator = {
              locator: _browser_step_model__WEBPACK_IMPORTED_MODULE_3__["LocatorModel"].AI_LOCATOR,
              value: ''
            };
          }

          if (lastLocator !== null) {
            locators.push(lastLocator);
          }

          return {
            heading: heading,
            assertCount: heroElemAssertionCount,
            locators: locators
          };
        }
      }, {
        key: "changeUrlValue",
        value: function changeUrlValue() {
          this.debounceUpdate('url', this.urlValue, 500);
        }
      }, {
        key: "onThinkTimeChanged",
        value: function onThinkTimeChanged() {
          this.debounceUpdate('thinkTime', this.thinkTime, 300);
        }
      }, {
        key: "changeTagName",
        value: function changeTagName() {
          this.debounceUpdate('tagName', this.tagName, 500);
        }
      }, {
        key: "onWaitElementTimeoutChanged",
        value: function onWaitElementTimeoutChanged() {
          this.debounceUpdate('waitElementTimeout', this.waitElementTimeout, 300);
        }
      }, {
        key: "onOptionalChanged",
        value: function onOptionalChanged() {
          this.browserStepsConfig.optional = this.optional;
          this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
        }
      }, {
        key: "changeCoordinates",
        value: function changeCoordinates() {
          this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
        } // Writes iOS Bundle Id only in `bundleId` and drops legacy `iosAppId` for cross-platform LaunchApp saves.

      }, {
        key: "onBundleIdChange",
        value: function onBundleIdChange() {
          var _a;

          var value = ((((_a = this.browserStepsConfig) === null || _a === void 0 ? void 0 : _a.bundleId) || '') + '').trim();
          this.browserStepsConfig.bundleId = value;
          this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
        }
      }, {
        key: "changeThinkTime",
        value: function changeThinkTime() {
          this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
        }
      }, {
        key: "onToggleisRelative",
        value: function onToggleisRelative(event) {
          this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
        }
      }, {
        key: "changeActionDesciption",
        value: function changeActionDesciption() {
          this.debounceUpdate('description', this.actionDesciption, 500);
        } //Event handlers for onTagChipAdded

      }, {
        key: "onTagChipAdded",
        value: function onTagChipAdded(event) {//TODO hading onTagChipAdded
        } //Event handlrs for onTagChipRemoved

      }, {
        key: "onTagChipRemoved",
        value: function onTagChipRemoved(event) {//TODO hading onTagChipRemoved
        } // Event handlers for tags-autocomplete component

      }, {
        key: "onTagsChipsChange",
        value: function onTagsChipsChange(chips) {
          var _this7 = this;

          // Update the chips array
          this.actionTagsChips = chips; // Convert chips back to string array format for browserStepsConfig

          var tagsArray = chips.map(function (chip) {
            return chip.display;
          }); // Persist learned tags (compat with new API): add/update key/value pairs

          if (tagsArray.length > 0) {
            tagsArray.forEach(function (tag) {
              var eqIdx = tag.indexOf('=');

              if (eqIdx > -1) {
                var key = tag.substring(0, eqIdx).trim();
                var val = tag.substring(eqIdx + 1).trim();

                _this7.tagAutoCompleteService.addTagKeyValuePair(key, val);
              } else {
                // key-only tag
                _this7.tagAutoCompleteService.addTagKeyValuePair(tag.trim(), '');
              }
            });
          } // Update the configuration with debounce


          this.debounceUpdate('tags', tagsArray, 500);
        }
      }, {
        key: "changeInputValue",
        value: function changeInputValue() {
          this.debounceUpdate('value', this.inputElementValue, 500);
        }
      }, {
        key: "onTabIndexChanged",
        value: function onTabIndexChanged() {
          this.debounceUpdate('tabIndex', this.tabIndex, 300);
        }
      }, {
        key: "debounceUpdate",
        value: function debounceUpdate(key, value) {
          var _this8 = this;

          var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;

          if (this.debounceTimer) {
            clearTimeout(this.debounceTimer);
          }

          this.debounceTimer = setTimeout(function () {
            _this8.browserStepsConfig[key] = value;

            _this8.changedBrowserStepsConfig.emit(_this8.browserStepsConfig);
          }, delay);
        }
      }, {
        key: "onStepDetailsClick",
        value: function onStepDetailsClick(type) {
          var tabMap = {
            source: 'showSourceTab',
            presnap: 'showPreSnapTab',
            postsnap: 'showPostSnapTab',
            prestep: 'showPreStepTab',
            poststep: 'showPostStepTab'
          };
          var titleMap = {
            source: 'Page Source',
            presnap: 'Pre Snapshot',
            postsnap: 'Post Snapshot',
            prestep: 'Pre Step',
            poststep: 'Post Step',
            interactionDetails: 'Configure Interaction'
          };
          this.showInteractionDetails = type === 'interactionDetails';
          this.showSourceTab = false;
          this.showPreSnapTab = false;
          this.showPostSnapTab = false;
          this.showPreStepTab = false;
          this.showPostStepTab = false;

          if (tabMap[type]) {
            this[tabMap[type]] = true;
          }

          this.configurationTitle = titleMap[type] || '';
        }
        /**
         * Open condition scenario dialog for browser steps
         */

      }, {
        key: "conditionFunc",
        value: function conditionFunc() {
          var _this9 = this;

          if (!this.conditionScenarioComponent) {
            console.error('Condition Scenario Component reference not found');
            return;
          } // Show the dialog with browserStepsConfig


          this.conditionScenarioComponent.showDialog(this.browserStepsConfig); // Use a timeout to detect when dialog closes and emit changes

          var checkDialogClosed = setInterval(function () {
            if (!_this9.conditionScenarioComponent.displayDialog) {
              // Dialog has closed, emit the updated config
              _this9.changedBrowserStepsConfig.emit(_this9.browserStepsConfig);

              clearInterval(checkDialogClosed);
            }
          }, 100);
        }
      }, {
        key: "onLoad",
        value: function onLoad() {
          this.loadingSnapshot = false;
        }
      }, {
        key: "loadPageSource",
        value: function loadPageSource() {
          var _a;

          if (this.pageSourcePath && this.pageSourcePath.trim() !== '') {
            var offset = 0;
            var limit = 1024;
            var isEditMode = true;
            var cctx = this.sessionService.session.cctx;
            var brkDat = null;
            this.readFileData(this.pageSourcePath, offset, limit, isEditMode, cctx, brkDat);
          } else {
            if (this.editorInstance1) {
              (_a = this.editorInstance1.getModel()) === null || _a === void 0 ? void 0 : _a.setValue('');
            }
          }
        }
      }, {
        key: "onEditorInitResponse",
        value: function onEditorInitResponse(editor) {
          this.editorInstance1 = editor;
          this.loadPageSource();
        }
      }, {
        key: "readFileData",
        value: function readFileData(fp, offset, limit, isEditMode, cctx, brkDat) {
          var _this0 = this;

          this.restService.getFileData({
            fp: fp,
            offset: offset,
            limit: limit,
            isEditMode: isEditMode,
            cctx: cctx,
            brkDat: brkDat
          }).subscribe(function (state) {
            if (state instanceof src_app_pages_home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_13__["ScriptRestLoading"]) {
              _this0.onLoading(state);

              return;
            }

            if (state instanceof src_app_pages_home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_13__["ScriptRestLoaded"]) {
              _this0.onLoaded(state);

              return;
            }
          }, function (state) {
            _this0.onLoadingError(state);
          });
        }
      }, {
        key: "onLoadingError",
        value: function onLoadingError(state) {
          this.isFileLoading = false;
        }
      }, {
        key: "onLoading",
        value: function onLoading(state) {
          this.isFileLoading = true;
        }
      }, {
        key: "onLoaded",
        value: function onLoaded(state) {
          var _a;

          var data = state.data;

          if (this.editorInstance1) {
            (_a = this.editorInstance1.getModel()) === null || _a === void 0 ? void 0 : _a.setValue(data.data);
            this.isFileLoading = false;
          }
        }
      }, {
        key: "onRegexPatternChange",
        value: function onRegexPatternChange() {
          // Clear test results when pattern changes
          this.clearRegexTest();
        }
      }, {
        key: "clearRegexTest",
        value: function clearRegexTest() {
          this.regexTestData = '';
          this.regexTestResult = null;
        }
      }, {
        key: "testRegexPattern",
        value: function testRegexPattern() {
          var _a;

          if (!this.matchingPattern || !this.regexTestData) {
            this.regexTestResult = {
              isMatch: false,
              error: 'Please provide both regex pattern and test data'
            };
            return;
          }

          try {
            var regex = new RegExp(this.matchingPattern, 'g');
            var match;
            var matches = []; // Collect all matches

            while ((match = regex.exec(this.regexTestData)) !== null) {
              // If capturing groups exist, take the first group, else full match
              var value = match.length > 1 ? match[1] : match[0];
              matches.push(value);
            }

            var matchIndex = (_a = this.matchingPatternIndex) !== null && _a !== void 0 ? _a : 0;

            if (matchIndex === -1) {
              // return all matches
              this.regexTestResult = {
                isMatch: matches.length > 0,
                matchedValue: matches.length > 0 ? matches : 'No match found'
              };
            } else if (matchIndex >= 0 && matches.length > matchIndex) {
              // return specific match
              var matchedValue = matches[matchIndex];
              this.regexTestResult = {
                isMatch: true,
                matchedValue: matchedValue
              };
            } else {
              // no match
              this.regexTestResult = {
                isMatch: false,
                matchedValue: 'No match found'
              };
            }
          } catch (error) {
            this.regexTestResult = {
              isMatch: false,
              error: 'Invalid regex pattern: ' + error.message
            };
          }
        }
      }, {
        key: "onCaptureAllChange",
        value: function onCaptureAllChange(event) {
          console.log("isCaptureAllValue ", event, "      ", this.isCaptureAllValue);

          if (event === null || event === void 0 ? void 0 : event.checked) {
            this.matchingPatternIndex = -1;
            this.isDisabled = true;
          } else {
            this.isDisabled = false;
            this.matchingPatternIndex = 0;
          }
        }
      }, {
        key: "onInitEditor",
        value: function onInitEditor(e, type) {
          this.changeDetectorRef.detectChanges();

          if (type === 'pre') {
            this.preEditorInstance = e;
            setTimeout(function () {
              if (e && e.layout) {
                e.layout();
              }
            }, 0);
          } else if (type === 'post') {
            this.postEditorInstance = e;
            setTimeout(function () {
              if (e && e.layout) {
                e.layout();
              }
            }, 0);
          }
        }
      }, {
        key: "onModelChange",
        value: function onModelChange() {
          this.changedBrowserStepsConfig.emit(this.browserStepsConfig);
        }
      }, {
        key: "onImageError",
        value: function onImageError(event) {
          this.loadingSnapshot = false;
          this.loadtestCommonService.errorMessage("Failed to load image.");
        }
      }]);
    }();

    BrowserInteractionComponent.ctorParameters = function () {
      return [{
        type: _browser_step_service__WEBPACK_IMPORTED_MODULE_4__["BrowserStepService"]
      }, {
        type: primeng__WEBPACK_IMPORTED_MODULE_2__["ConfirmationService"]
      }, {
        type: src_app_pages_home_load_test_services_load_test_common_services__WEBPACK_IMPORTED_MODULE_5__["LoadTestCommonService"]
      }, {
        type: _tagsAutocomplete_service__WEBPACK_IMPORTED_MODULE_7__["TagAutoCompleteService"]
      }, {
        type: _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_10__["ScenarioUtilsService"]
      }, {
        type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_8__["SessionService"]
      }, {
        type: src_app_shared_header_work_profile_services_work_profile_active_service__WEBPACK_IMPORTED_MODULE_9__["WorkProfileActiveService"]
      }, {
        type: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_11__["DomSanitizer"]
      }, {
        type: src_app_pages_home_script_manager_services_script_rest_service__WEBPACK_IMPORTED_MODULE_12__["ScriptRestService"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
      }];
    };

    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], BrowserInteractionComponent.prototype, "browserStepsConfig", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], BrowserInteractionComponent.prototype, "groupType", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], BrowserInteractionComponent.prototype, "isCrossPlatformGroup", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], BrowserInteractionComponent.prototype, "rdtNativeConfig", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], BrowserInteractionComponent.prototype, "assertConfig", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], BrowserInteractionComponent.prototype, "assertConfigChange", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], BrowserInteractionComponent.prototype, "allPages", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], BrowserInteractionComponent.prototype, "pageName", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], BrowserInteractionComponent.prototype, "groupName", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], BrowserInteractionComponent.prototype, "flowName", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], BrowserInteractionComponent.prototype, "changedBrowserStepsConfig", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('editor')], BrowserInteractionComponent.prototype, "editorInstance1", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('conditionScenarioComponent', {
      read: _scenario_design_condition_scenario_condition_scenario_component__WEBPACK_IMPORTED_MODULE_14__["ConditionScenarioComponent"]
    })], BrowserInteractionComponent.prototype, "conditionScenarioComponent", void 0);
    BrowserInteractionComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'app-browser-interaction',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./browser-interaction.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.component.html"))["default"],
      encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./browser-interaction.component.scss */
      "./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.component.scss"))["default"]]
    })], BrowserInteractionComponent);
    /***/
  },

  /***/
  "./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.module.ts":
  /*!***********************************************************************************************!*\
    !*** ./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.module.ts ***!
    \***********************************************************************************************/

  /*! exports provided: onMonacoLoad, BrowserInteractionModule */

  /***/
  function _src_app_pages_scenario_browserStep_browserInteraction_browserInteractionModuleTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "onMonacoLoad", function () {
      return onMonacoLoad;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "BrowserInteractionModule", function () {
      return BrowserInteractionModule;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/common */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
    /* harmony import */


    var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
    /* harmony import */


    var _angular_common_http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! @angular/common/http */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
    /* harmony import */


    var primeng__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! primeng */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
    /* harmony import */


    var primeng_dropdown__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! primeng/dropdown */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
    /* harmony import */


    var primeng_button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! primeng/button */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
    /* harmony import */


    var primeng_inputtext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! primeng/inputtext */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
    /* harmony import */


    var primeng_sidebar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! primeng/sidebar */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js");
    /* harmony import */


    var primeng_inputnumber__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
    /*! primeng/inputnumber */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputnumber.js");
    /* harmony import */


    var _angular_material_menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
    /*! @angular/material/menu */
    "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/menu.js");
    /* harmony import */


    var primeng_chips__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
    /*! primeng/chips */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-chips.js");
    /* harmony import */


    var primeng_tabmenu__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
    /*! primeng/tabmenu */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tabmenu.js");
    /* harmony import */


    var _angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
    /*! @angular/cdk/drag-drop */
    "./node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/drag-drop.js");
    /* harmony import */


    var primeng_dialog__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(
    /*! primeng/dialog */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
    /* harmony import */


    var _angular_material_select__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(
    /*! @angular/material/select */
    "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/select.js");
    /* harmony import */


    var primeng_confirmdialog__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(
    /*! primeng/confirmdialog */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-confirmdialog.js");
    /* harmony import */


    var src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(
    /*! src/app/shared/help/help.module */
    "./src/app/shared/help/help.module.ts");
    /* harmony import */


    var primeng_tree__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(
    /*! primeng/tree */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tree.js");
    /* harmony import */


    var primeng_multiselect__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(
    /*! primeng/multiselect */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-multiselect.js");
    /* harmony import */


    var _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(
    /*! @angular/material/tooltip */
    "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/tooltip.js");
    /* harmony import */


    var _browser_interaction_component__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(
    /*! ./browser-interaction.component */
    "./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.component.ts");
    /* harmony import */


    var _locators_locators_module__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(
    /*! ../locators/locators.module */
    "./src/app/pages/scenario/browser-step/locators/locators.module.ts");
    /* harmony import */


    var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(
    /*! src/app/shared/cav-table/cav-table.module */
    "./src/app/shared/cav-table/cav-table.module.ts");
    /* harmony import */


    var _cav_parameter_input_cav_parameter_input_module__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(
    /*! ../../cav-parameter-input/cav-parameter-input.module */
    "./src/app/pages/scenario/cav-parameter-input/cav-parameter-input.module.ts");
    /* harmony import */


    var _tags_autocomplete_tags_autocomplete_module__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(
    /*! ../../tags-autocomplete/tags-autocomplete.module */
    "./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.module.ts");
    /* harmony import */


    var ngx_monaco_editor__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(
    /*! ngx-monaco-editor */
    "./node_modules/ngx-monaco-editor/__ivy_ngcc__/fesm2015/ngx-monaco-editor.js");
    /* harmony import */


    var src_app_shared_cav_loader_cav_loader_module__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(
    /*! src/app/shared/cav-loader/cav-loader.module */
    "./src/app/shared/cav-loader/cav-loader.module.ts");
    /* harmony import */


    var _scenario_design_condition_scenario_condition_scenario_module__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(
    /*! ../../scenario-design/condition-scenario/condition-scenario.module */
    "./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.module.ts");
    /* harmony import */


    var _assertion_assertion_module__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(
    /*! ../../assertion/assertion.module */
    "./src/app/pages/scenario/assertion/assertion.module.ts");
    /* harmony import */


    var primeng_accordion__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(
    /*! primeng/accordion */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-accordion.js");

    function onMonacoLoad() {
      return window.monaco;
    }

    var monacoConfig = {
      baseUrl: './assets',
      defaultOptions: {
        scrollBeyondLastLine: false
      },
      onMonacoLoad: onMonacoLoad // here monaco object will be available as window.monaco use this function to extend monaco editor functionalities.

    };

    var BrowserInteractionModule = /*#__PURE__*/_createClass(function BrowserInteractionModule() {
      _classCallCheck(this, BrowserInteractionModule);
    });

    BrowserInteractionModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
      declarations: [_browser_interaction_component__WEBPACK_IMPORTED_MODULE_22__["BrowserInteractionComponent"]],
      imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_24__["CavTableModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"], _angular_common_http__WEBPACK_IMPORTED_MODULE_4__["HttpClientModule"], primeng_dropdown__WEBPACK_IMPORTED_MODULE_6__["DropdownModule"], primeng_button__WEBPACK_IMPORTED_MODULE_7__["ButtonModule"], primeng_inputtext__WEBPACK_IMPORTED_MODULE_8__["InputTextModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["CheckboxModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["TooltipModule"], primeng_sidebar__WEBPACK_IMPORTED_MODULE_9__["SidebarModule"], primeng_inputnumber__WEBPACK_IMPORTED_MODULE_10__["InputNumberModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["SelectButtonModule"], _angular_material_select__WEBPACK_IMPORTED_MODULE_16__["MatSelectModule"], _angular_material_menu__WEBPACK_IMPORTED_MODULE_11__["MatMenuModule"], primeng_tabmenu__WEBPACK_IMPORTED_MODULE_13__["TabMenuModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["TabViewModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["InputSwitchModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["SpinnerModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["TableModule"], _angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_14__["DragDropModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["RadioButtonModule"], primeng_dialog__WEBPACK_IMPORTED_MODULE_15__["DialogModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["CardModule"], primeng_multiselect__WEBPACK_IMPORTED_MODULE_20__["MultiSelectModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["AutoCompleteModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["InputTextareaModule"], primeng_confirmdialog__WEBPACK_IMPORTED_MODULE_17__["ConfirmDialogModule"], src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_18__["HelpModule"], primeng_tree__WEBPACK_IMPORTED_MODULE_19__["TreeModule"], _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_21__["MatTooltipModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["ListboxModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["ToggleButtonModule"], _locators_locators_module__WEBPACK_IMPORTED_MODULE_23__["LocatorsModule"], _cav_parameter_input_cav_parameter_input_module__WEBPACK_IMPORTED_MODULE_25__["CavParameterInputModule"], primeng_chips__WEBPACK_IMPORTED_MODULE_12__["ChipsModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["AutoCompleteModule"], _tags_autocomplete_tags_autocomplete_module__WEBPACK_IMPORTED_MODULE_26__["TagsAutocompleteModule"], src_app_shared_cav_loader_cav_loader_module__WEBPACK_IMPORTED_MODULE_28__["CavLoaderModule"], ngx_monaco_editor__WEBPACK_IMPORTED_MODULE_27__["MonacoEditorModule"].forRoot(monacoConfig), _scenario_design_condition_scenario_condition_scenario_module__WEBPACK_IMPORTED_MODULE_29__["ConditionScenarioModule"], _assertion_assertion_module__WEBPACK_IMPORTED_MODULE_30__["AssertionModule"], primeng_accordion__WEBPACK_IMPORTED_MODULE_31__["AccordionModule"]],
      exports: [_browser_interaction_component__WEBPACK_IMPORTED_MODULE_22__["BrowserInteractionComponent"]]
    })], BrowserInteractionModule);
    /***/
  },

  /***/
  "./src/app/pages/scenario/browser-step/browser-interaction/tagsAutocomplete.service.ts":
  /*!*********************************************************************************************!*\
    !*** ./src/app/pages/scenario/browser-step/browser-interaction/tagsAutocomplete.service.ts ***!
    \*********************************************************************************************/

  /*! exports provided: TagAutoCompleteService */

  /***/
  function _src_app_pages_scenario_browserStep_browserInteraction_tagsAutocompleteServiceTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "TagAutoCompleteService", function () {
      return TagAutoCompleteService;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _service_scenario_http_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../../service/scenario-http.service */
    "./src/app/pages/scenario/service/scenario-http.service.ts");
    /* harmony import */


    var _interface_scenario_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../../interface/scenario-state */
    "./src/app/pages/scenario/interface/scenario-state.ts");

    var TagAutoCompleteService = /*#__PURE__*/function () {
      function TagAutoCompleteService(scenarioHttpService) {
        _classCallCheck(this, TagAutoCompleteService);

        this.scenarioHttpService = scenarioHttpService; // Change the type to store key-value pairs

        this.tagMetaData = {};
        console.log('[TagAutoCompleteService] Service initialized');
        this.loadTagsFromStorage();
      } // --- Data Loading/Storage Methods (Updated) ---

      /**
       * Called when getTagMetaData API returns successful data.
       */


      return _createClass(TagAutoCompleteService, [{
        key: "onLoadedGetTagMetaData",
        value: function onLoadedGetTagMetaData(state) {
          var newTags = state.data; // Assuming API response matches TagMetaData structure
          // Merge new metadata with existing/sample data
          // New data overwrites sample data for the same key

          this.tagMetaData = Object.assign({}, newTags); // Clean up empty string values from API which interfere with UI logic

          for (var key in this.tagMetaData) {
            this.tagMetaData[key] = this.tagMetaData[key].filter(function (v) {
              return v !== '';
            });
          } // Save the merged data to storage


          this.saveTagsToStorage();
        }
      }, {
        key: "getTagMetaData",
        value: function getTagMetaData(project, subproject, workspace) {
          var _this1 = this;

          this.scenarioHttpService.getTagMetaData(project, subproject, workspace).subscribe(function (state) {
            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_3__["GetTagMetaDataLoadingState"]) {
              return;
            }

            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_3__["GetTagMetaDataLoadedState"]) {
              _this1.onLoadedGetTagMetaData(state);

              return;
            }
          }, function (state) {
            console.error('[TagAutoCompleteService.getTagMetaData] Error fetching tag metadata:', state); // If API fails, ensure fallback to sample data is loaded

            _this1.loadTagsFromStorage();
          });
        }
      }, {
        key: "saveTagsToStorage",
        value: function saveTagsToStorage() {
          try {
            var jsonData = JSON.stringify(this.tagMetaData);
            localStorage.setItem('app_tag_metadata_kv', jsonData); // Changed key
          } catch (error) {
            console.error('[TagAutoCompleteService.saveTagsToStorage] Error saving to localStorage:', error);
          }
        }
      }, {
        key: "loadTagsFromStorage",
        value: function loadTagsFromStorage() {
          try {
            // Look for the new key-value structured data first
            var stored = localStorage.getItem('app_tag_metadata_kv');

            if (stored) {
              this.tagMetaData = JSON.parse(stored);
            } else {
              // Fallback to sample if no stored data
              this.tagMetaData = {};
              this.saveTagsToStorage();
            }
          } catch (error) {
            console.error('[TagAutoCompleteService.loadTagsFromStorage] Error loading from localStorage:', error);
            this.tagMetaData = {};
          }
        }
        /**
         * Return a snapshot of the full tag metadata (key -> values[])
         */

      }, {
        key: "getMetadata",
        value: function getMetadata() {
          // Return a shallow copy to avoid accidental external mutation
          var copy = {};

          for (var _i = 0, _Object$keys = Object.keys(this.tagMetaData); _i < _Object$keys.length; _i++) {
            var k = _Object$keys[_i];
            copy[k] = _toConsumableArray(this.tagMetaData[k]);
          }

          return copy;
        } // --- Filtering Methods for Key/Value Auto-completion ---

        /**
         * Get all available tag keys (e.g., 'name', 'age').
         */

      }, {
        key: "getAllKeys",
        value: function getAllKeys() {
          return Object.keys(this.tagMetaData).sort();
        }
        /**
         * Get values for a specific tag key.
         * @param key The tag key (e.g., 'name').
         */

      }, {
        key: "getValuesForKey",
        value: function getValuesForKey(key) {
          return this.tagMetaData[key] ? _toConsumableArray(this.tagMetaData[key]).sort() : [];
        }
        /**
         * Get keys that start with the search term.
         */

      }, {
        key: "getFilteredKeys",
        value: function getFilteredKeys(searchTerm) {
          var term = searchTerm.toLowerCase().trim();
          if (!term) return this.getAllKeys();
          return this.getAllKeys().filter(function (key) {
            return key.toLowerCase().startsWith(term);
          });
        }
        /**
         * Get values for a specific key that start with the search term.
         */

      }, {
        key: "getFilteredValues",
        value: function getFilteredValues(key, searchTerm) {
          var term = searchTerm.toLowerCase().trim();
          var values = this.getValuesForKey(key);
          if (!term) return values;
          return values.filter(function (value) {
            return value.toLowerCase().startsWith(term);
          });
        }
        /**
         * Adds a new value to an existing or new key in the metadata.
         */

      }, {
        key: "addTagKeyValuePair",
        value: function addTagKeyValuePair(key, value) {
          var trimmedKey = key.trim();
          var trimmedValue = value.trim();

          if (!trimmedKey) {
            return;
          } // If the key exists and the value is not present, add it.


          if (this.tagMetaData[trimmedKey]) {
            if (trimmedValue && !this.tagMetaData[trimmedKey].includes(trimmedValue)) {
              this.tagMetaData[trimmedKey].push(trimmedValue);
              this.saveTagsToStorage();
            }
          } else {
            // If the key is new, create it with the value (if value exists)
            this.tagMetaData[trimmedKey] = trimmedValue ? [trimmedValue] : [];
            this.saveTagsToStorage();
          }
        }
      }]);
    }();

    TagAutoCompleteService.ctorParameters = function () {
      return [{
        type: _service_scenario_http_service__WEBPACK_IMPORTED_MODULE_2__["ScenarioHttpService"]
      }];
    };

    TagAutoCompleteService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
      providedIn: 'root'
    })], TagAutoCompleteService);
    /***/
  },

  /***/
  "./src/app/pages/scenario/commons/sch-save-scenario.ts":
  /*!*************************************************************!*\
    !*** ./src/app/pages/scenario/commons/sch-save-scenario.ts ***!
    \*************************************************************/

  /*! exports provided: SchSaveScenario */

  /***/
  function _src_app_pages_scenario_commons_schSaveScenarioTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "SchSaveScenario", function () {
      return SchSaveScenario;
    });
    /* harmony import */


    var _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../constants/scen-schedule-constants */
    "./src/app/pages/scenario/constants/scen-schedule-constants.ts");
    /* harmony import */


    var _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../constants/scen-keyword-constants */
    "./src/app/pages/scenario/constants/scen-keyword-constants.ts");
    /* harmony import */


    var _commons_sch_utility__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../commons/sch-utility */
    "./src/app/pages/scenario/commons/sch-utility.ts");
    /* harmony import */


    var _scen_utility__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./scen-utility */
    "./src/app/pages/scenario/commons/scen-utility.ts");
    /* harmony import */


    var _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../constants/scen-common-constants */
    "./src/app/pages/scenario/constants/scen-common-constants.ts");
    /* harmony import */


    var _home_script_manager_script_recorder_interface_recorder_interface__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ../../home/script-manager/script-recorder/interface/recorder.interface */
    "./src/app/pages/home/script-manager/script-recorder/interface/recorder.interface.ts");

    var SCH_KEYWORD = {
      SCHEDULE: 'SCHEDULE',
      SCHEDULE_TYPE: 'SCHEDULE_TYPE',
      SCHEDULE_BY: 'SCHEDULE_BY',
      PROF_PCT_MODE: 'PROF_PCT_MODE',
      NUM_USERS: 'NUM_USERS',
      TARGET_RATE: 'TARGET_RATE',
      STYPE: 'STYPE',
      SGRP: 'SGRP',
      NS_GENERATOR: 'NS_GENERATOR',
      GEN_LOCATION: 'GEN_LOCATION',
      NS_GENERATOR_MODE: 'NS_GENERATOR_MODE',
      NVM_DISTRIBUTION: 'NVM_DISTRIBUTION',
      G_URL: 'G_URL',
      NJVM_CLASS_PATH: 'NJVM_CLASS_PATH',
      NH_SCENARIO: 'NH_SCENARIO',
      RUNTIME_USER_SESSION_PCT: 'RUNTIME_USER_SESSION_PCT',
      GEN_LOCATION_MODE: "GEN_LOCATION_MODE",
      G_DATADIR: 'G_DATADIR',
      G_SCRIPT_RUNLOGIC: 'G_SCRIPT_RUNLOGIC',
      G_TRACING: 'G_TRACING'
    };
    var SCENARIO_TYPE = {
      FIX_CONCURRENT_USERS: "FIX_CONCURRENT_USERS",
      FIX_SESSION_RATE: "FIX_SESSION_RATE",
      MIXED_MODE: "MIXED_MODE",
      REPLAY_ACCESS_LOGS: "REPLAY_ACCESS_LOGS"
    };

    var SchSaveScenario = /*#__PURE__*/function () {
      function SchSaveScenario(scenUtilsService, saveAndReadService, testModeService, browserStepService) {
        _classCallCheck(this, SchSaveScenario);

        this.scenUtilsService = scenUtilsService;
        this.saveAndReadService = saveAndReadService;
        this.testModeService = testModeService;
        this.browserStepService = browserStepService;
        this.className = "SchSaveScenario";
        this.isFunctional = false;
        this.schUtility = new _commons_sch_utility__WEBPACK_IMPORTED_MODULE_2__["SchUtility"](this.scenUtilsService);
        this.isFunctional = this.testModeService.isFunctional();
      }

      return _createClass(SchSaveScenario, [{
        key: "createPropertiesFromObj",
        value: function createPropertiesFromObj(scenScheduleData, data) {
          this.scenScheduleData = scenScheduleData;
          this.data = data;

          try {
            this.setScenarioType(data[SCH_KEYWORD.STYPE]);
            this.setScheduleType(data[SCH_KEYWORD.SCHEDULE_TYPE]);
            this.setScheduleBy(data[SCH_KEYWORD.SCHEDULE_BY]);
            this.setDistributeMode(data[SCH_KEYWORD.PROF_PCT_MODE]);
            this.setGroupData(data[SCH_KEYWORD.SGRP]);
            this.setScheduleData(data[SCH_KEYWORD.SCHEDULE]);
            this.setNethavocScenarioData(data[SCH_KEYWORD.NH_SCENARIO]);
            this.setRunLogic(data[SCH_KEYWORD.G_SCRIPT_RUNLOGIC]);
            this.setDataDir(data[SCH_KEYWORD.G_DATADIR]); //In case of functional, Network logs will be enable every time

            if (this.isFunctional) {
              this.setTracing(SCH_KEYWORD.G_TRACING);
            }

            if (!this.scenScheduleData.$funtionalImplementation) {
              if (this.scenScheduleData.selectedGenaratorType == '0') {
                data[SCH_KEYWORD.GEN_LOCATION] = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]);
                this.setGeneratorData(data[SCH_KEYWORD.NS_GENERATOR]);
                this.setGeneratorMode(data[SCH_KEYWORD.NS_GENERATOR_MODE]);
                data[SCH_KEYWORD.RUNTIME_USER_SESSION_PCT] = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]);
                this.setGeneratorDataForPreferedLocation(data[SCH_KEYWORD.GEN_LOCATION_MODE].data);
              } else {
                if (data[SCH_KEYWORD.NS_GENERATOR] != undefined) data[SCH_KEYWORD.NS_GENERATOR] = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]);
                this.setGeneratorDataForLocation(data[SCH_KEYWORD.GEN_LOCATION]);
                this.setGeneratorMode(data[SCH_KEYWORD.NS_GENERATOR_MODE]);

                if (this.scenScheduleData.locationPerMode) {
                  this.setGeneratorDataForRunTime(data[SCH_KEYWORD.RUNTIME_USER_SESSION_PCT]);
                } else {
                  data[SCH_KEYWORD.RUNTIME_USER_SESSION_PCT] = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]);
                }

                this.setGeneratorDataForPreferedLocation(data[SCH_KEYWORD.GEN_LOCATION_MODE]);
              }
            }

            this.setNumUserTargetRate(data[SCH_KEYWORD.NUM_USERS], data[SCH_KEYWORD.TARGET_RATE]);
          } catch (error) {
            console.error(this.className, "Exception-", error);
          }
        }
      }, {
        key: "setTracing",
        value: function setTracing(KEYWORD) {
          this.data[KEYWORD] = {
            ALL: [[4, 1, 2, 0, 0, 1, 100, 100]]
          };
          this.data['DEBUG_TRACE'] = {
            '_G': [[1]]
          };
        }
      }, {
        key: "setDataDir",
        value: function setDataDir(data) {
          if (data == undefined || data['ALL'].length == 0) data = {
            "ALL": [[]]
          }; //Create new data array

          var groupNameList = this.scenScheduleData.groupDataList;

          if (this.scenScheduleData.chkForSelectAllDataDir) {
            data = {
              "ALL": [[]]
            }; //Create new data array

            var val = this.scenScheduleData.selectedDataDirectory;
            if (!val || val == 'as per script') val = "NA";
            if (val == "NA") data["ALL"] = [["0", val]];else data["ALL"] = [["1", val]];
            this.data[SCH_KEYWORD.G_DATADIR] = data;
            return;
          }

          for (var i = 0; i < groupNameList.length; i++) {
            var options = [];
            var grpName = "";

            if (!groupNameList[i].dataDirectory || groupNameList[i].dataDirectory == "as per script") {
              grpName = groupNameList[i].grpName;
              options.push("0");
              options.push("NA");
            } else {
              grpName = groupNameList[i].grpName;
              options.push('1');
              options.push(groupNameList[i]['dataDirectory']);
            }

            data[grpName] = [options];
          }

          this.data[SCH_KEYWORD.G_DATADIR] = data;
        }
      }, {
        key: "setRunLogic",
        value: function setRunLogic(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array

          var runlogic = this.scenScheduleData.groupDataList;

          for (var i = 0; i < runlogic.length; i++) {
            var options = [];

            if (!runlogic[i].runLogic || runlogic[i].runLogic == null || runlogic[i].runLogic == "-" || runlogic[i].runLogic == "as per script") {
              runlogic[i].isRunlogicPresent = false;
            } else {
              options.push(runlogic[i].grpName);
              options.push(runlogic[i]['runLogic']);
              runlogic[i].isRunlogicPresent = true;
            }

            data['_G'][i] = options;
          }

          this.data[SCH_KEYWORD.G_SCRIPT_RUNLOGIC] = data;
        }
      }, {
        key: "setScenarioType",
        value: function setScenarioType(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array
          // Set scenario type

          var scenarioType = "FIX_CONCURRENT_USERS";

          if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FSR || this.scenScheduleData.getIsReplayActive()) {
            if (this.scenScheduleData.getIsReplayActive()) scenarioType = "REPLAY_ACCESS_LOGS";else scenarioType = "FIX_SESSION_RATE";
          } else if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].MIXED_MODE) scenarioType = "MIXED_MODE";

          data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = scenarioType;
          this.data[SCH_KEYWORD.STYPE] = data;
          if (this.scenScheduleData.scheduleBy == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_BY"].SCENARIO) this.scenScheduleData.scenGroupData.scenType = this.scenScheduleData.scenarioType;
        }
      }, {
        key: "setScheduleType",
        value: function setScheduleType(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array
          // Set schedule type

          var sheduleType = "SIMPLE";
          if (this.scenScheduleData.scheduleType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_TYPE"].ADVANCE) sheduleType = "ADVANCED";
          data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = sheduleType;
          this.data[SCH_KEYWORD.SCHEDULE_TYPE] = data;
        }
      }, {
        key: "setScheduleBy",
        value: function setScheduleBy(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array
          // Add schedule by

          var scheduleBy = "SCENARIO";
          if (this.scenScheduleData.scheduleBy == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_BY"].GROUP) scheduleBy = "GROUP";
          data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = scheduleBy;
          this.data[SCH_KEYWORD.SCHEDULE_BY] = data;
        }
      }, {
        key: "setDistributeMode",
        value: function setDistributeMode(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array
          // set PROF_PCT_MODE

          var distribution = "NUM";
          if (this.scenScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].BY_PERCENTAGE) distribution = "PCT";else if (this.scenScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].AUTO_MODE) distribution = "NUM_AUTO";
          data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = distribution;
          this.data[SCH_KEYWORD.PROF_PCT_MODE] = data;
        }
      }, {
        key: "setGroupData",
        value: function setGroupData(data) {
          var _a;

          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]);
          var list = [];
          var genWeightage = -1;
          if (this.scenScheduleData.$funtionalImplementation) list = this.scenScheduleData.$selectedGroupDataList;else list = this.scenScheduleData.groupDataList;
          var options;

          for (var i = 0; i < list.length; i++) {
            options = [];
            var gpData = list[i];
            var groupName = gpData.grpName;
            var stype = "NA";

            if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].MIXED_MODE) {
              if (gpData.scenType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FCU) stype = SCENARIO_TYPE.FIX_CONCURRENT_USERS;else stype = SCENARIO_TYPE.FIX_SESSION_RATE;
            }

            var profile = gpData.userProfile; //unnecessary Code

            var type = "0";
            if (gpData.scriptType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCRIPT_TYPE"].URL) type = "1";else if (gpData.scriptType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCRIPT_TYPE"].SCRIPT) type = "0";else if (gpData.scriptType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCRIPT_TYPE"].RDT_URL) type = "10";else if (gpData.scriptType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCRIPT_TYPE"].JMETER_SCRIPT) type = "100"; //

            var scriptOrUrl = gpData.scriptName;
            if (gpData.scriptType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCRIPT_TYPE"].URL) scriptOrUrl = gpData.scriptName; //Done for bug 128221: If user changes the scenario name and does not save it again then scriptname in for api group is not updated due to which request in group in scenario and in script may differ.

            if (gpData.grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["GROUP_TYPE"].API && gpData.scriptName != this.scenUtilsService.Project + "/" + this.scenUtilsService.subProject + "/" + this.scenUtilsService.scenarioName + "_" + groupName) {
              scriptOrUrl = this.scenUtilsService.Project + "/" + this.scenUtilsService.subProject + "/" + this.scenUtilsService.scenarioName + "_" + groupName;
              gpData.scriptName = scriptOrUrl;
            }

            scriptOrUrl = this.buildScriptOrUrl(i, gpData, groupName, scriptOrUrl); // write as per group STYPE

            var numOrPct = "";
            if (gpData.scenType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FSR || this.scenScheduleData.getIsReplayActive()) numOrPct = this.schUtility.getNumberFormatForPct(gpData.numVUser);else numOrPct = gpData.numVUser + "";
            if (this.scenScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].BY_PERCENTAGE) numOrPct = this.schUtility.getNumberFormatForPct(gpData.percentage);
            var id = "-1";
            if (this.scenScheduleData.saveKeywordData['NVM_DISTRIBUTION'] && this.scenScheduleData.saveKeywordData['NVM_DISTRIBUTION']['_G'][0][0] == '2') id = gpData.clusterID + "";
            var idForController = "NA"; // default value for idForController is set to NA in case if Generator is not applied to the scenario.

            if (this.scenScheduleData.isGeneratorOpt) {
              //this.scenScheduleData.getIsController()
              idForController = gpData.generatorNames + "";
              genWeightage = (_a = gpData.genWeightage) !== null && _a !== void 0 ? _a : 1 + "";
            }

            options.push(groupName);
            options.push(idForController);
            options.push(stype);

            if (type == '100') {
              options.push('JMeter');
            } else {
              options.push(profile || "Internet");
            }

            options.push(type);
            options.push(scriptOrUrl || this.scenUtilsService.Project + "/" + this.scenUtilsService.subProject + "/" + this.scenUtilsService.scenarioName + "_" + groupName);
            options.push(numOrPct);

            if (genWeightage != -1) {
              options.push(id);
              options.push(genWeightage);
            } else {
              options.push(id == "-1" ? "" : id); //id

              options.push(""); //weightage
            }

            if (gpData.rdtScriptType == 'Native App' || gpData.rdtScriptType == 'Click Script') {
              options.push(gpData.jsonFilePath);
              if (gpData.proxyPort != undefined && gpData.useProxyPort == true) options.push(gpData.proxyPort.toString());
            }

            if (gpData.rdtScriptType == 'Native App') {
              options.push(gpData.appName);
              if (gpData.cavMonAppName != undefined && gpData.cavMonAppName != '') options.push(gpData.cavMonAppName);
            }

            data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][i] = options;
          }

          this.data[SCH_KEYWORD.SGRP] = data;
        }
      }, {
        key: "buildScriptOrUrl",
        value: function buildScriptOrUrl(i, gpData, groupName, scriptOrUrl) {
          if (gpData.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["GROUP_TYPE"].CAVISSON) {
            return scriptOrUrl;
          }

          var basePath = this.scenUtilsService.Project + "/" + this.scenUtilsService.subProject + "/";
          var fileName = this.scenUtilsService.scenarioName + "_" + groupName; // Code mode: show filename (no prefix)
          // Visual mode: hide filename (prefix with ".")

          var isVisualMode = gpData.scriptMode == null || gpData.scriptMode == '' || gpData.scriptMode === 'visual';
          var prefix = isVisualMode ? '.' : '';
          return basePath + prefix + fileName;
        }
      }, {
        key: "setNethavocScenarioData",
        value: function setNethavocScenarioData(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]);

          if (this.scenScheduleData.scheduleBy == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_BY"].SCENARIO) {
            var gpData = this.scenScheduleData.scenGroupData;
            var runAfterGpName = "";
            if (gpData.runAfterGroup != null) runAfterGpName = gpData.runAfterGroup.grpName;
            var listOfPhases = gpData.phaseList;

            for (var i = 0; i < listOfPhases.length; i++) {
              var strToAdd = [];
              var phaseData = listOfPhases[i];
              if (phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].START) strToAdd = this.getNHScenarioPhaseData(phaseData, "START");else if (phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RAMP_UP) {
                strToAdd = this.getNHScenarioPhaseData(phaseData, "RAMP_UP");
              } else if (phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].STABILIZATION) strToAdd = this.getNHScenarioPhaseData(phaseData, "STABILIZATION");else if (phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RUN_TIME) strToAdd = this.getNHScenarioPhaseData(phaseData, "DURATION");else if (phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RAMP_DOWN) {
                strToAdd = this.getNHScenarioPhaseData(phaseData, "RAMP_DOWN");
              }

              data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]].push(strToAdd);
            }
          } else {
            for (var _i2 = 0; _i2 < this.scenScheduleData.groupDataList.length; _i2++) {
              var _gpData = this.scenScheduleData.groupDataList[_i2];
              var gpName = _gpData.grpName;
              var _listOfPhases = _gpData.phaseList;

              for (var j = 0; j < _listOfPhases.length; j++) {
                var gpNameRunAfter = "";
                var runAfterGrpData = _gpData.runAfterGroup;
                if (runAfterGrpData != null) gpNameRunAfter = runAfterGrpData.grpName;
                var _strToAdd = [];
                var _phaseData = _listOfPhases[j];
                if (_phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].START) _strToAdd = this.getNHScenarioPhaseData(_phaseData, "START"); //gpData.getRunAfter()
                else if (_phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RAMP_UP) {
                  _strToAdd = this.getNHScenarioPhaseData(_phaseData, "RAMP_UP");
                } else if (_phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].STABILIZATION) _strToAdd = this.getNHScenarioPhaseData(_phaseData, "STABILIZATION");else if (_phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RUN_TIME) _strToAdd = this.getNHScenarioPhaseData(_phaseData, "DURATION");else if (_phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RAMP_DOWN) {
                  _strToAdd = this.getNHScenarioPhaseData(_phaseData, "RAMP_DOWN");
                }

                data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]].push(_strToAdd);
              }
            }
          }

          this.data[SCH_KEYWORD.NH_SCENARIO] = data;
        }
      }, {
        key: "getNHScenarioPhaseData",
        value: function getNHScenarioPhaseData(phaseData, phaseType) {
          var tempArray = [];
          var isPhaseStatus = "";

          if (phaseData.phaseStatus == true) {
            isPhaseStatus = "1";
          } else {
            isPhaseStatus = "0";
          }

          if (phaseData.netScenSetting == true) {
            tempArray.push(phaseData.nethavocScenario);
            tempArray.push(phaseData.phaseName);
            tempArray.push(phaseData.delayTime);
            tempArray.push(isPhaseStatus);
            tempArray.push(phaseType);
          }

          return tempArray;
        }
      }, {
        key: "setScheduleData",
        value: function setScheduleData(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], []); // Add Schedule KeyWord

          if (this.scenScheduleData.scheduleBy == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_BY"].SCENARIO) {
            var gpData = this.scenScheduleData.scenGroupData;
            if (!this.scenUtilsService.scheduleSettingType) gpData = this.scenScheduleData.basicScenData;
            var gpName = "ALL";
            var runAfterGpName = "";
            if (gpData.runAfterGroup != null) runAfterGpName = gpData.runAfterGroup.grpName;
            var listOfPhases = gpData.phaseList;

            for (var i = 0; i < listOfPhases.length; i++) {
              var strToAdd = "";
              var phaseData = listOfPhases[i];
              if (phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].START) strToAdd = this.getStrToWriteForStartPhase(phaseData, gpName, phaseData.groupName, phaseData.afterTime); //gpData.getRunAfter()
              else if (phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RAMP_UP) {
                if (gpData.scenType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FCU) strToAdd = this.getStrToWriteForRampUpFCU(phaseData, gpName);else strToAdd = this.getStrToWriteForRampUpFSR(phaseData, gpName);
              } else if (phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].STABILIZATION) strToAdd = this.getStrToWriteForStabilization(phaseData, gpName);else if (phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RUN_TIME) strToAdd = this.getStrToWriteForRunTime(phaseData, gpName);else if (phaseData.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RAMP_DOWN) {
                if (gpData.scenType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FCU) strToAdd = this.getStrToWriteForRampDownFCU(phaseData, gpName);else strToAdd = this.getStrToWriteForRampDownFSR(phaseData, gpName);
              }

              data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]].push(strToAdd.split(" "));
            }
          } else {
            for (var _i3 = 0; _i3 < this.scenScheduleData.groupDataList.length; _i3++) {
              var _gpData2 = this.scenScheduleData.groupDataList[_i3];
              var _gpName = _gpData2.grpName;
              var _listOfPhases2 = _gpData2.phaseList;
              if (!this.scenUtilsService.scheduleSettingType) _listOfPhases2 = _gpData2.schBasicPhaseList;

              for (var j = 0; j < _listOfPhases2.length; j++) {
                var gpNameRunAfter = "";
                var runAfterGrpData = _gpData2.runAfterGroup;
                if (runAfterGrpData != null) gpNameRunAfter = runAfterGrpData.grpName;
                var _strToAdd2 = "";
                var _phaseData2 = _listOfPhases2[j];
                if (_phaseData2.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].START) _strToAdd2 = this.getStrToWriteForStartPhase(_phaseData2, _gpName, _phaseData2.afterGroup, _phaseData2.afterTime); //gpData.getRunAfter()
                else if (_phaseData2.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RAMP_UP) {
                  if (_gpData2.scenType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FCU) _strToAdd2 = this.getStrToWriteForRampUpFCU(_phaseData2, _gpName);else _strToAdd2 = this.getStrToWriteForRampUpFSR(_phaseData2, _gpName);
                } else if (_phaseData2.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].STABILIZATION) _strToAdd2 = this.getStrToWriteForStabilization(_phaseData2, _gpName);else if (_phaseData2.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RUN_TIME) _strToAdd2 = this.getStrToWriteForRunTime(_phaseData2, _gpName);else if (_phaseData2.phaseType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["PHASE_TYPE_NAME"].RAMP_DOWN) {
                  if (_gpData2.scenType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FCU) _strToAdd2 = this.getStrToWriteForRampDownFCU(_phaseData2, _gpName);else _strToAdd2 = this.getStrToWriteForRampDownFSR(_phaseData2, _gpName);
                }

                data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]].push(_strToAdd2.split(" "));
              }
            }
          }

          this.data[SCH_KEYWORD.SCHEDULE] = data;
        }
      }, {
        key: "getStrToWriteForStartPhase",
        value: function getStrToWriteForStartPhase(phaseData, gpName, runAfterGp, runAfter) {
          console.log(this.className, "getStrToWriteForStartPhase", "phaseData= ", phaseData, "gpName= ", gpName);
          var str = "";
          str = gpName + " " + phaseData.phaseName + " " + "START";

          if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["START_UP"].IMMEDIATELY) {
            str = str + " " + "IMMEDIATELY";
          } else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["START_UP"].AFTER_TIME) {
            str = str + " " + "AFTER TIME " + this.schUtility.getTimeInStringFromDate(runAfter);
          } else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["START_UP"].AFTER_GROUP) {
            str = str + " " + "AFTER" + " GROUP " + runAfterGp;
          } else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["START_UP"].AFTER_GROUP_WITH_DELAY) {
            str = str + " " + "AFTER" + " GROUP " + runAfterGp + " " + this.schUtility.getTimeInStringFromDate(runAfter);
          }

          return str;
        } // G9 G9RampUp RAMP_UP ALL RATE 100 M RANDOMLY

      }, {
        key: "getStrToWriteForRampUpFCU",
        value: function getStrToWriteForRampUpFCU(phaseData, gpName) {
          console.log(this.className, "getStrToWriteForRampUpFCU", "", "", "Method Called. gpName = " + gpName + ", rampUpMode = " + phaseData.phaseMode);
          var str = "";
          var numUser;
          numUser = phaseData.cumNumUser;
          str = gpName + " " + phaseData.phaseName + " RAMP_UP" + " " + (this.scenScheduleData.scheduleType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_TYPE"].SIMPLE ? "ALL" : numUser);
          if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_UP"].IMMEDIATELY) str = str + " " + "IMMEDIATELY";else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_UP"].DEFAULT) {
            var type = "LINEARLY";
            if (phaseData.rampType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_UP"].RANDOMLY) type = "RANDOMLY";
            var time = phaseData.timeUnit;
            var strTime = "M";
            if (time == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["TIME_UNIT"].SECOND) strTime = "S";else if (time == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["TIME_UNIT"].HOUR) strTime = "H";
            str = str + " " + "RATE" + " " + phaseData.users + " " + strTime + " " + type;
          } else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_UP"].NUM_USER_IN_TIME) {
            str = str + " " + "STEP " + phaseData.users + " " + this.schUtility.getTimeInStringFromDate(phaseData.afterTime);
          } else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_UP"].ALL_IN_TIME) {
            var _type = "LINEARLY";
            if (phaseData.rampType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_UP"].RANDOMLY) _type = "RANDOMLY";
            str = str + " " + "TIME " + this.schUtility.getTimeInStringFromDate(phaseData.afterTime) + " " + _type;
          }
          return str;
        }
      }, {
        key: "getStrToWriteForRampUpFSR",
        value: function getStrToWriteForRampUpFSR(phaseData, gpName) {
          console.log(this.className, "getStrToWriteForRampUpFSR", "", "", "Method Called. gpName = ", gpName, " phaseData = ", phaseData);
          var str = "";
          var numUser;
          numUser = this.schUtility.getNumberFormatForPct(+phaseData.cumNumUser);
          str = gpName + " " + phaseData.phaseName + " RAMP_UP" + " " + (this.scenScheduleData.scheduleType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_TYPE"].SIMPLE ? "ALL" : numUser);
          if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_UP"].IMMEDIATELY) str = str + " " + "IMMEDIATELY";else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_UP"].ALL_IN_TIME) {
            var type = "";
            if (phaseData.fsrMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_UP"].FSR_DEFAULT) type = "0";else if (phaseData.fsrMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_UP"].FSR_IN_SECONDS) type = "1 " + phaseData.fsrValue;else if (phaseData.fsrMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_UP"].FSR_IN_STEPS) type = "2 " + phaseData.fsrValue;
            str = str + " " + "TIME_SESSIONS " + this.schUtility.getTimeInStringFromDate(phaseData.afterTime) + " " + type;
          }
          return str;
        }
      }, {
        key: "getStrToWriteForStabilization",
        value: function getStrToWriteForStabilization(phaseData, gpName) {
          var str = "";
          str = gpName + " " + phaseData.phaseName + " STABILIZATION";
          var strTime = this.schUtility.getTimeInStringFromDate(phaseData.afterTime);
          if (strTime == "00:00:00") strTime = "0";
          str = str + " " + "TIME" + " " + strTime;
          return str;
        }
      }, {
        key: "getStrToWriteForRunTime",
        value: function getStrToWriteForRunTime(phaseData, gpName) {
          var str = "";
          str = gpName + " " + phaseData.phaseName + " DURATION";
          if (phaseData.afterTime instanceof Date) phaseData.afterTime = this.schUtility.getTimeInStringFromDate(phaseData.afterTime);

          if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RUN"].INDEFINITELY) {
            str = str + " " + "INDEFINITE";
          } else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RUN"].FOR_TIME) {
            str = str + " " + "TIME" + " " + phaseData.afterTime;
          } else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RUN"].FOR_SESSION) {
            if (phaseData.isUserSesion == true) str = str + " " + "SESSIONS" + " " + phaseData.users + " " + 1;else str = str + " " + "SESSIONS" + " " + phaseData.users + " " + 0;
          }

          return str;
        } // G2 G2Rampdown RAMP_DOWN ALL TIME 00:01:00 RANDOMLY

      }, {
        key: "getStrToWriteForRampDownFCU",
        value: function getStrToWriteForRampDownFCU(phaseData, gpName) {
          var str = "";
          var numUser;
          var type = "LINEARLY";
          if (phaseData.rampType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_DOWN"].RANDOMLY) type = "RANDOMLY";
          numUser = phaseData.cumNumUser;
          str = gpName + " " + phaseData.phaseName + " RAMP_DOWN" + " " + (this.scenScheduleData.scheduleType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_TYPE"].SIMPLE ? "ALL" : numUser);

          if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_DOWN"].IMMEDIATELY) {
            str = str + " " + "IMMEDIATELY";
          } else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_DOWN"].ALL_IN_TIME) {
            str = str + " " + "TIME" + " " + this.schUtility.getTimeInStringFromDate(phaseData.afterTime) + " " + type;
          } else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_DOWN"].NUM_USER_IN_TIME) {
            str = str + " " + "STEP " + phaseData.users + " " + this.schUtility.getTimeInStringFromDate(phaseData.afterTime);
          }

          return str;
        }
      }, {
        key: "getStrToWriteForRampDownFSR",
        value: function getStrToWriteForRampDownFSR(phaseData, gpName) {
          console.log(this.className, "getStrToWriteForRampDownFSR", "", "", "Method Called. gpName = ", gpName, " phaseData = ", phaseData);
          var str = "";
          var numUser;
          numUser = this.schUtility.getNumberFormatForPct(+phaseData.cumNumUser);
          str = gpName + " " + phaseData.phaseName + " RAMP_DOWN" + " " + (this.scenScheduleData.scheduleType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_TYPE"].SIMPLE ? "ALL" : numUser);
          if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_DOWN"].IMMEDIATELY) str = str + " " + "IMMEDIATELY";else if (phaseData.phaseMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_DOWN"].ALL_IN_TIME) {
            var type = "";
            if (phaseData.fsrMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_DOWN"].FSR_DEFAULT) type = "0";else if (phaseData.fsrMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_DOWN"].FSR_IN_SECONDS) type = "1 " + phaseData.fsrValue;else if (phaseData.fsrMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["RAMP_DOWN"].FSR_IN_STEPS) type = "2 " + phaseData.fsrValue;
            str = str + " " + "TIME_SESSIONS " + this.schUtility.getTimeInStringFromDate(phaseData.afterTime) + " " + type;
          }
          return str;
        }
      }, {
        key: "setGeneratorData",
        value: function setGeneratorData(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array
          // Set gen name

          var genArr = this.scenScheduleData.genArr;

          for (var index in genArr) {
            var tmp = [];
            tmp.push(genArr[index]);
            data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][index] = tmp;
          }

          console.log(this.className, "setGeneratorData", "data", data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]]);
          this.data[SCH_KEYWORD.NS_GENERATOR] = data;
        }
      }, {
        key: "setGeneratorDataForLocation",
        value: function setGeneratorDataForLocation(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array
          // Set gen name

          var genArr = this.scenScheduleData.genArr;

          for (var index in genArr) {
            var tmp = [];
            tmp.push(genArr[index]);
            data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][index] = tmp;
          }

          console.log(this.className, "setGeneratorDataForLocation", "data", data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]]);
          this.data[SCH_KEYWORD.GEN_LOCATION] = data;
        }
      }, {
        key: "setGeneratorDataForRunTime",
        value: function setGeneratorDataForRunTime(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array
          // Set scenario type

          var genMode = this.scenScheduleData.locationPerValue.toString();
          data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = genMode;
          this.data[SCH_KEYWORD.RUNTIME_USER_SESSION_PCT] = data;
          console.log("data setGeneratorDataForRunTime ---->>", data);
        }
      }, {
        key: "setGeneratorDataForPreferedLocation",
        value: function setGeneratorDataForPreferedLocation(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array

          var genMode = "0";

          if (this.scenScheduleData.selectedGenaratorType == '1') {
            genMode = "1";
          } else if (this.scenScheduleData.selectedGenaratorType == '2') {
            genMode = "2";
          } else if (this.scenScheduleData.selectedGenaratorType == '3') {
            genMode = "3";
          } // Set scenario type


          if (this.scenScheduleData.genArr && this.scenScheduleData.genArr.length == 0) genMode = "0";
          data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = genMode;
          this.data[SCH_KEYWORD.GEN_LOCATION_MODE] = data;
          console.log("data setGeneratorDataForRunTime ---->>", data);
        }
      }, {
        key: "setGeneratorMode",
        value: function setGeneratorMode(data) {
          data = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array
          // Set scenario type

          var genMode = "";

          if (this.scenScheduleData.isGeneratorOpt) {
            if (this.scenScheduleData.genMode) genMode = "0";else if (!this.scenScheduleData.genMode) genMode = "1";
          }

          data[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = genMode;
          this.data[SCH_KEYWORD.NS_GENERATOR_MODE] = data;
        }
      }, {
        key: "setNumUserTargetRate",
        value: function setNumUserTargetRate(dataNumUser, dataTargetRate) {
          dataNumUser = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array

          dataTargetRate = _defineProperty({}, _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"], [[]]); //Create new data array
          // If percentage mode      

          if (this.scenScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].BY_PERCENTAGE && !this.scenScheduleData.isHWMDependent) {
            if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FCU) {
              dataNumUser[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = this.scenScheduleData.cumNumUser;
            } else if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FSR || this.scenScheduleData.getIsReplayActive()) {
              dataTargetRate[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = this.scenScheduleData.cumNumUser;
            } else // MIXED_MODE
              {
                dataNumUser[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = this.scenScheduleData.cumNumUser;
                dataTargetRate[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = this.scenScheduleData.cumNumUser;
              }
          } else if (this.scenScheduleData.isHWMDependent) {
            var quantity = this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FCU ? this.scenScheduleData.cumNumUser.toFixed(0) : this.scenScheduleData.cumNumUser.toFixed(2);

            if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FCU) {
              dataNumUser[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = quantity;
            } else if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FSR || this.scenScheduleData.getIsReplayActive()) {
              dataTargetRate[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = quantity;
            } else // MIXED_MODE
              {
                dataNumUser[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = quantity;
                dataTargetRate[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = quantity;
              }
          }
          /***
           * NUM_USER is set for Advanced Distribution case locally i.e. NUM_USER is set to zero before saving the scenario if Distribtuion mode is Advance.
           */
          else if (this.scenScheduleData.scheduleType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_TYPE"].ADVANCE) {
            dataNumUser[_constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_KEY"]][0][0] = this.scenScheduleData.cumNumUser;
          }

          this.data[SCH_KEYWORD.NUM_USERS] = dataNumUser;
          this.data[SCH_KEYWORD.TARGET_RATE] = dataTargetRate;
        }
      }, {
        key: "eventSaveScenario",
        value: function eventSaveScenario(schScheduleData) {
          //return true;
          var errMsg = new _scen_utility__WEBPACK_IMPORTED_MODULE_3__["StringBuffer"]();

          if (this.scenScheduleData.scenarioType != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].REPLAY_ACESS_LOGS) {
            if (!this.validateWholeScenario(schScheduleData, errMsg)) {
              this.scenScheduleData.loadingScen = false;
              return false;
            }

            if (!this.validateBeforeSave()) {
              this.scenScheduleData.loadingScen = false;
              return false;
            }
          }

          return true;
        }
      }, {
        key: "validateBeforeSave",
        value: function validateBeforeSave() {
          var _a;

          if (this.scenUtilsService.ScenMode == 2) return true;
          var scenNameArr = "".concat(this.scenUtilsService.Project, "/").concat(this.scenUtilsService.subProject, "/").concat(this.scenUtilsService.scenarioName).split("/");

          if (scenNameArr.length != 3) {
            this.scenUtilsService.errorMessage("Test name must consist of project, subproject and test name separated by forward slash (/)");
            return false;
          }

          if (!/^[a-zA-Z][a-zA-Z0-9_:]*$/.test(scenNameArr[2])) {
            this.scenUtilsService.errorMessage("Please enter valid test name, it must start with alpha. Allowed characters are alpha, numeric, colon and underscore.");
            return false;
          }

          if (scenNameArr[2].length > 64) {
            this.scenUtilsService.errorMessage("Test name cannot be greater than 64 characters.");
            return false;
          }

          var grpNameObj = {};

          for (var i in this.scenScheduleData.groupDataList) {
            if (grpNameObj[this.scenScheduleData.groupDataList[i].grpName]) {
              this.scenUtilsService.errorMessage("Group name cannot have duplicate entries.");
              return false;
            } else grpNameObj[this.scenScheduleData.groupDataList[i].grpName] = true;

            if (!this.scenScheduleData.groupDataList[i].grpName) {
              this.scenUtilsService.errorMessage("Group name cannot be blank.");
              return false;
            }

            var pattern = /^[a-zA-Z][a-zA-Z0-9_]*$/;

            if (!pattern.test(this.scenScheduleData.groupDataList[i].grpName)) {
              this.scenUtilsService.errorMessage("Please enter valid group name ".concat(this.scenScheduleData.groupDataList[i].grpName, ", it must start with alpha.Allowed characters are alpha, numeric and underscore."));
              return false;
            }

            if (this.scenScheduleData.groupDataList[i].grpName.length > 32) {
              this.scenUtilsService.errorMessage("Group name ".concat(this.scenScheduleData.groupDataList[i].grpName, " cannot be greater than 32 characters."));
              return false;
            }

            if (this.scenScheduleData.groupDataList[i].grpType != "Cavisson") {
              var flowNameObj = {};
              var reqNameObj = {};

              for (var fIndex in this.scenScheduleData.groupDataList[i].flowArr) {
                if (flowNameObj[this.scenScheduleData.groupDataList[i].flowArr[fIndex].flowName]) {
                  this.scenUtilsService.errorMessage("Flow name cannot have duplicate entries.");
                  return false;
                } else flowNameObj[this.scenScheduleData.groupDataList[i].flowArr[fIndex].flowName] = true;

                if (!this.scenScheduleData.groupDataList[i].flowArr[fIndex].flowName) {
                  this.scenUtilsService.errorMessage("Flow name cannot be blank.");
                  return false;
                }

                var _pattern = /^[a-zA-Z][a-zA-Z0-9_]*$/;

                if (!_pattern.test(this.scenScheduleData.groupDataList[i].flowArr[fIndex].flowName)) {
                  this.scenUtilsService.errorMessage("Please enter valid flow name ".concat(this.scenScheduleData.groupDataList[i].flowArr[fIndex].flowName, ", it must start with alpha.Allowed characters are alpha, numeric and underscore."));
                  return false;
                }

                if (this.scenScheduleData.groupDataList[i].flowArr[fIndex].flowName.length > 64) {
                  this.scenUtilsService.errorMessage("Flow name ".concat(this.scenScheduleData.groupDataList[i].flowArr[fIndex].flowName, " cannot be greater than 64 characters."));
                  return false;
                }

                if (this.scenScheduleData.groupDataList[i].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["GROUP_TYPE"].BROWSER || this.scenScheduleData.groupDataList[i].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["GROUP_TYPE"].RDT_NATIVE) {
                  if (this.scenScheduleData.groupDataList[i].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["GROUP_TYPE"].RDT_NATIVE) {
                    if (this.scenScheduleData.groupDataList[i]['RDT_NATIVE'] == null || this.scenScheduleData.groupDataList[i]['RDT_NATIVE'].length == 0) {
                      this.scenUtilsService.errorMessage("At least one Device must be added in group '".concat(this.scenScheduleData.groupDataList[i].grpName, "' from Real Device Settings page."));
                      return false;
                    }
                  }

                  var uniqueStepName = new Set();

                  for (var ii = 0; ii < this.scenScheduleData.groupDataList[i].flowArr[fIndex].stepsArr.length; ii++) {
                    var step = this.scenScheduleData.groupDataList[i].flowArr[fIndex].stepsArr[ii];
                    var result = this.browserStepService.validateStep(step, this.scenScheduleData.groupDataList[i].grpName, this.scenScheduleData.groupDataList[i].flowArr[fIndex].flowName, this.scenUtilsService.isFlowInline, uniqueStepName, this.scenScheduleData.groupDataList[i].grpType);

                    if (!result.isValid) {
                      this.scenUtilsService.errorMessage(result.message);
                      return false;
                    }
                  }
                } else {
                  for (var _ii in this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr) {
                    if (this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].thinkTime == "-1") {
                      if (reqNameObj[this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName]) {
                        this.scenUtilsService.errorMessage("Request name cannot have duplicate entries.");
                        return false;
                      } else reqNameObj[this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName] = true;

                      if (!this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName) {
                        this.scenUtilsService.errorMessage("Request name cannot be blank.");
                        return false;
                      }

                      var _pattern2 = /^[a-zA-Z][a-zA-Z0-9_]*$/;

                      if (!_pattern2.test(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName)) {
                        this.scenUtilsService.errorMessage("Please enter valid request name ".concat(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName, ", it must start with alpha.Allowed characters are alpha, numeric and underscore."));
                        return false;
                      }

                      if (this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName.length > 64) {
                        if (this.scenUtilsService.isFlowInline == "yes") this.scenUtilsService.errorMessage("Request '".concat(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName, "' of flow name '").concat(this.scenScheduleData.groupDataList[i].flowArr[fIndex].flowName, "' in group name '").concat(this.scenScheduleData.groupDataList[i].grpName, "' cannot be greater than 64 characters."));else this.scenUtilsService.errorMessage("Request '".concat(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName, "' in group name '").concat(this.scenScheduleData.groupDataList[i].grpName, "' cannot be greater than 64 characters."));
                        return false;
                      }

                      if (this.scenScheduleData.groupDataList[i].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["GROUP_TYPE"].API && ((_a = this.scenScheduleData.groupDataList[i].protocol) === null || _a === void 0 ? void 0 : _a.type) == _home_script_manager_script_recorder_interface_recorder_interface__WEBPACK_IMPORTED_MODULE_5__["RecorderProtocol"].DNS) {
                        // DNS protocol validation
                        var req = this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii];
                        var dns = req.dns;
                        var groupName = this.scenScheduleData.groupDataList[i].grpName;
                        var flowName = this.scenScheduleData.groupDataList[i].flowArr[fIndex].flowName;
                        var dnsValidation = this.validateDnsRequest(dns, req.reqName, groupName, flowName);

                        if (!dnsValidation.isValid) {
                          this.scenUtilsService.errorMessage(dnsValidation.message);
                          return false;
                        }

                        continue;
                      }

                      if (!this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].url) {
                        this.scenUtilsService.errorMessage("Provide url before saving scenario for request ".concat(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName, " ."));
                        return false;
                      }

                      var protocol = _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_4__["URL_REGEX"].PROTOCOL_URL;
                      var numericUrl = _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_4__["URL_REGEX"].NUMERIC_URL;
                      var stringUrl = _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_4__["URL_REGEX"].STRING_URL;
                      var isValidUrl = protocol.test(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].url) ? stringUrl.test(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].url) ? true : numericUrl.test(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].url) ? true : false : false; //This is special check to validate when whole url is parametrize. For ex: {url}/v2/index.html or {url}

                      if (/^{[\w\W]+}(([\w\-\._~:\/?#[\]@!\$&'\(\)\*\+,;=.%"^|]+)|({[\w]+}))*$/.test(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].url)) isValidUrl = true;

                      if (!isValidUrl) {
                        var reqName = this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName;
                        var _groupName = this.scenScheduleData.groupDataList[i].grpName;
                        this.scenUtilsService.errorMessage("Enter valid URL for request '".concat(reqName, "' in group '").concat(_groupName, "'. For example: https://www.cavisson.com"));
                        return false;
                      }

                      if (!this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName) {
                        this.scenUtilsService.errorMessage("Provide request name before saving scenario.");
                        return false;
                      }

                      for (var iii in this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].inlineReqArr) {
                        var protocol = _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_4__["URL_REGEX"].PROTOCOL_URL;
                        var numericUrl = _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_4__["URL_REGEX"].NUMERIC_URL;
                        var stringUrl = _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_4__["URL_REGEX"].STRING_URL;
                        var isValidUrl = protocol.test(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].inlineReqArr[iii].url) ? stringUrl.test(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].inlineReqArr[iii].url) ? true : numericUrl.test(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].inlineReqArr[iii].url) ? true : false : false; //This is special check to validate when whole url is parametrize. For ex: {url}/v2/index.html or {url}

                        if (/^{[\w\W]+}(([\w\-\._~:\/?#[\]@!\$&'\(\)\*\+,;=.%"^|]+)|({[\w]+}))*$/.test(this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].inlineReqArr[iii].url)) isValidUrl = true;

                        if (!isValidUrl) {
                          //Inline Url 'gdsgsagsdg' provided in request 'index' of group 'Group_4' and flow 'Flowname'.
                          var _reqName = this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].reqName;
                          var _groupName2 = this.scenScheduleData.groupDataList[i].grpName;
                          var _flowName = this.scenScheduleData.groupDataList[i].flowArr[fIndex].flowName;
                          var InlineUrl = this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].inlineReqArr[iii].url;
                          if (this.scenUtilsService.isFlowInline == "yes") this.scenUtilsService.errorMessage("Inline Url '".concat(InlineUrl, "' provided in request '").concat(_reqName, "' of group '").concat(_groupName2, "' and flow '").concat(_flowName, "' is invalid."));else this.scenUtilsService.errorMessage("Inline Url '".concat(InlineUrl, "' provided in request '").concat(_reqName, "' of group '").concat(_groupName2, "' is invalid."));
                          return false;
                        }
                      }
                    } else {
                      if (this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].thinkTime != "0" && !this.scenScheduleData.groupDataList[i].flowArr[fIndex].reqArr[_ii].thinkTime) {
                        this.scenUtilsService.errorMessage("Provide thinktime before saving scenario for group ".concat(this.scenScheduleData.groupDataList[i].grpName, " ."));
                        return false;
                      }
                    }
                  }
                }
              }
            }
          }

          return true;
        }
      }, {
        key: "validateWholeScenario",
        value: function validateWholeScenario(schScheduleData, errMsg) {
          try {
            if (schScheduleData.groupDataList.length < 1) return true;

            if (schScheduleData.scheduleType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_TYPE"].SIMPLE) // Simple
              {
                if (schScheduleData.scheduleBy == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_BY"].SCENARIO) // Simple Test Based
                  {
                    var gpData = schScheduleData.scenGroupData;

                    if (schScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].MIXED_MODE) {
                      this.scenUtilsService.errorMessage("Can not be test based in mixed mode");
                      return false;
                    }

                    if (this.scenUtilsService.scheduleSettingType && schScheduleData.scenGroupData.phaseList.length > 0) {
                      if (!this.schUtility.isValidListForPhases(gpData.phaseList, schScheduleData, gpData, false, gpData.numVUser, errMsg)) return false;
                    } else {
                      if (!this.schUtility.isValidBasicScenPhases(schScheduleData.basicScenData.phaseList, schScheduleData.scenarioType, schScheduleData)) return false;
                    }

                    if (schScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].BY_NUMBERS) // Simple Test Number Mode
                      {
                        if (!this.validateQuantityInNumMode(schScheduleData.scheduleBy, schScheduleData.groupDataList, errMsg)) return false;
                      } else if (schScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].BY_PERCENTAGE) // Simple Test Percentage Mode
                      {
                        if (!this.validatePercentage(schScheduleData.groupDataList, errMsg)) return false;
                        if (!this.validateNumUser(schScheduleData.scheduleBy, schScheduleData.cumNumUser, schScheduleData.groupDataList, errMsg)) return false;
                      } else // Auto mode
                      {}
                  } else // Simple Group Based
                  {
                    for (var i = 0; i < schScheduleData.groupDataList.length; i++) {
                      var _gpData3 = schScheduleData.groupDataList[i];
                      if (this.scenUtilsService.scheduleSettingType && !this.schUtility.isValidListForPhases(_gpData3.phaseList, schScheduleData, _gpData3, false, _gpData3.numVUser, errMsg)) return false;
                    }

                    if (!this.scenUtilsService.scheduleSettingType) {
                      for (var _i4 in schScheduleData.groupDataList) {
                        if (!this.schUtility.isValidBasicScenPhases(schScheduleData.groupDataList[_i4].schBasicPhaseList, schScheduleData.scenarioType, schScheduleData)) return false;
                      }
                    }

                    if (schScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].BY_NUMBERS) // Simple Group Number Mode
                      {
                        if (!this.validateQuantityInNumMode(schScheduleData.scheduleBy, schScheduleData.groupDataList, errMsg)) return false;
                      } else // Simple group percentage mode
                      {
                        if (!this.validatePercentage(schScheduleData.groupDataList, errMsg)) return false;
                        if (!this.validateNumUser(schScheduleData.scheduleBy, schScheduleData.cumNumUser, schScheduleData.groupDataList, errMsg)) return false;
                      }
                  }
              } else // Advance Mode
              {
                if (schScheduleData.scheduleBy == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_BY"].SCENARIO) {
                  var _gpData4 = schScheduleData.scenGroupData;
                  if (schScheduleData.groupDataList.length <= 0) return true;

                  if (schScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].MIXED_MODE) {
                    this.scenUtilsService.errorMessage("Can not be scenario based in mixed mode");
                    return false;
                  }

                  if (!this.schUtility.isValidListForPhases(_gpData4.phaseList, schScheduleData, _gpData4, false, _gpData4.numVUser, errMsg)) return false;

                  if (schScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].BY_NUMBERS) {
                    console.log(this.className, "validateWholeScenario", "", "", "Advance Test based number mode");
                  } else if (schScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].AUTO_MODE) {
                    console.log(this.className, "validateWholeScenario", "", "", "Advance Test based auto mode");
                  } else // Advance Test percentage Mode
                    {
                      this.validatePercentage(schScheduleData.groupDataList, errMsg);
                    }
                } else // Advance Group Based
                  {
                    for (var _i5 = 0; _i5 < schScheduleData.groupDataList.length; _i5++) {
                      var _gpData5 = schScheduleData.groupDataList[_i5];
                      if (!this.schUtility.isValidListForPhases(_gpData5.phaseList, schScheduleData, _gpData5, false, _gpData5.numVUser, errMsg)) return false;
                    }

                    if (schScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].BY_NUMBERS) {
                      console.log(this.className, "validateWholeScenario", "", "", "Advance group based number mode");
                    } else if (schScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].AUTO_MODE) {
                      console.log(this.className, "validateWholeScenario", "", "", "Advance group based auto mode");
                    } else if (schScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["DISTRIBUTE_MODE"].BY_PERCENTAGE) {
                      this.scenUtilsService.errorMessage("Percentage mode in advance type group based scenario is not allowed.\n");
                    }
                  }
              }
            /**For checking generator name should be NA in any Group */


            if (this.scenScheduleData.isGeneratorOpt) {
              var tempGen;
              var totalUsers = 0;
              var flagAll = false;
              var groupDataList = this.scenScheduleData.groupDataList;

              for (var _i6 = 0; _i6 < groupDataList.length; _i6++) {
                if (groupDataList[_i6].generatorNames[0] == "NA") {
                  this.scenUtilsService.errorMessage("Atleast one generator should be selected for each group ");
                  return false;
                }

                if (groupDataList[_i6].generatorNames[0] == "ALL") {
                  flagAll = true;
                }

                tempGen = groupDataList[0]["generatorNames"].concat(groupDataList[_i6]["generatorNames"]);
                totalUsers = groupDataList[_i6]["users"] + totalUsers;
              }

              var totalGen = this.removeDuplicateUsingGens(tempGen);

              if (totalUsers < totalGen.length) {
                if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FSR) {
                  this.scenUtilsService.errorMessage("Total session rate must be greater than or equal to generators.");
                  return false;
                } else {
                  this.scenUtilsService.errorMessage("Total users must be greater than or equal to generators.");
                  return false;
                }
              } else {
                if (flagAll) {
                  if (totalUsers < this.scenScheduleData["_genArr"].length) {
                    if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCENARIO_TYPE"].FSR) {
                      this.scenUtilsService.errorMessage("Total session rate must be greater than or equal to generators");
                      return false;
                    } else {
                      this.scenUtilsService.errorMessage("Total users must be greater than or equal to generators");
                      return false;
                    }
                  }
                }
              }

              if (errMsg.toString() == "") {
                var invalidGenNames = [];

                var _iterator = _createForOfIteratorHelper(this.scenScheduleData["_genArr"]),
                    _step;

                try {
                  for (_iterator.s(); !(_step = _iterator.n()).done;) {
                    var gen = _step.value;

                    if (this.scenScheduleData.selectedGenaratorType == '0') {
                      for (var _i7 = 0; _i7 < this.scenScheduleData.$genInfoList.length; _i7++) {
                        if (gen == this.scenScheduleData.$genInfoList[_i7]["gn"]) break;else if (_i7 == this.scenScheduleData.$genInfoList.length - 1) invalidGenNames.push(gen);
                      }
                    } else {
                      for (var _i8 = 0; _i8 < this.scenScheduleData.$genInfoListForLocation.length; _i8++) {
                        if (gen.split(" ")[0] == this.scenScheduleData.$genInfoListForLocation[_i8]["Name"]) break;else if (_i8 == this.scenScheduleData.$genInfoListForLocation.length - 1) invalidGenNames.push(gen.split(" ")[0]);
                      }
                    }
                  }
                } catch (err) {
                  _iterator.e(err);
                } finally {
                  _iterator.f();
                }

                if (invalidGenNames.length > 0) {
                  this.scenUtilsService.errorMessage("Generator(s) ".concat(invalidGenNames.join(", "), " not available."));
                  return false;
                }
              }
            }

            if (errMsg.toString() != "") {
              this.scenScheduleData.message = {
                severity: 'error',
                detail: errMsg.toString()
              };
              return false;
            } else {
              this.scenScheduleData.clearMessage();
            }

            return true;
          } catch (e) {
            console.error(this.className, "validateWholeScenario", "", e);
            return false;
          }
        } //remove duplicate generators

      }, {
        key: "removeDuplicateUsingGens",
        value: function removeDuplicateUsingGens(arr) {
          var unique_array = arr.filter(function (elem, index, self) {
            return index == self.indexOf(elem);
          });
          return unique_array;
        }
        /** *********** Validation Methods ********** */

        /*
           * In number mode of simple scenario and group, if quantity is zero
           * case1: only one group G1 - quantity is zero give error msg
           * case2: two group G1 1 and G2 0 - quantity is zero give error msg for G2
           */

      }, {
        key: "validateQuantityInNumMode",
        value: function validateQuantityInNumMode(scheduleBy, listOfGps, errMsg) {
          console.log(this.className, "validateQuantityInNumMode", "", "", "Method Called. List Size = " + listOfGps.length);

          try {
            var bolTotalUser = true;
            var quantity = 0;

            for (var i = 0; i < listOfGps.length; i++) {
              var gpData = listOfGps[i];
              quantity = quantity + Math.floor(gpData.numVUser);
            }

            if (quantity == 0) {
              this.scenUtilsService.errorMessage("All scenario group(s) cannot have Zero Vusers/Session_rate_per_minute.");
              return false;
            }

            for (var _i9 = 0; _i9 < listOfGps.length; _i9++) {
              var _gpData6 = listOfGps[_i9]; //checking in each group

              if (_gpData6.numVUser < 0.0) {
                bolTotalUser = false;
                this.scenUtilsService.errorMessage("Quantity cannot be zero for group " + _gpData6.grpName + ".\n");
                return false;
              }
            }

            return bolTotalUser;
          } catch (e) {
            console.trace(this.className, "validateQuantityInNumMode", "", "", "in validateQuantityInNumMode()", e);
            return false;
          }
        }
      }, {
        key: "validatePercentage",
        value: function validatePercentage(listOfGps, errMsg) {
          console.log(this.className, "validatePercentage", "", "", "Method Called. List Size = " + listOfGps.length);

          try {
            var pct = 0;
            var pctArray = [];

            for (var i = 0; i < listOfGps.length; i++) {
              var gpData = listOfGps[i];
              pctArray.push(gpData.percentage);
            } //It is done to handle case when sum of array is 100 but still it comes 100.00000000000001.Bug id:78312


            pct = Number(_scen_utility__WEBPACK_IMPORTED_MODULE_3__["ScenUtility"].sumOfArray(pctArray).toFixed(2)); // for bug-68195 for percentage error message.
            // pct = Math.round(pct);

            console.log(this.className, "validatePercentage", "", "", "Total Percentage = " + pct);

            if (pct > _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["HUNDRED_PCT"]) {
              this.scenUtilsService.errorMessage("Total of Percentage of all groups cannot be more than 100.\n");
              return false;
            } else if (pct != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["HUNDRED_PCT"] && pct < 99.000000000001) {
              this.scenUtilsService.errorMessage("Total of Percentage of all groups must be 100.\n");
              return false;
            }

            return true;
          } catch (e) {
            console.trace(this.className, "validatePercentage", "", "", "in validatePercentage()", e);
            return false;
          }
        }
        /**
         * This function validate the virtual user in number mode
         * case 1 Simple Test :- Num_User is 0, One group present
         *        NumUser should not be zero
         * case 2 Simple Group :- Num_User is 0, one group present
         *        NumUser should not be zero
         * case 3 Simple Group :- Num_User is 1, two groups present
         *        NumUser should not be equal and greater than number of groups
         * case 4 Simple Group :- Num_User is 1, one group 100% and second group 0%
         *        Percentage in group G2 cannot be zero.
         *        NumUser should not be equal and greater than number of groups
         * @param scheduleBy
         * @param virtualUser
         * @param listOfGps
         * @param errMsg
         * @return
         */

      }, {
        key: "validateNumUser",
        value: function validateNumUser(scheduleBy, virtualUser, listOfGps, errMsg) {
          console.log(this.className, "validateNumUser", "", "", "Method Called. Virtual User = " + virtualUser + ", Number of groups = " + listOfGps.length);

          try {
            var vUser = 0;

            for (var i = 0; i < listOfGps.length; i++) {
              var gpData = listOfGps[i];
              vUser = vUser + gpData.numVUser; //If schedule by is group

              if (scheduleBy == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_0__["SCHEDULE_BY"].GROUP) {
                if (gpData.numVUser < 0.0) {
                  this.scenUtilsService.errorMessage("Virtual users in group " + gpData.grpName + " cannot be negative.\n");
                  return false;
                }
              }
            }

            if (virtualUser <= 0.0) {
              this.scenUtilsService.errorMessage("All scenario group(s) cannot have Zero Vusers/Session_rate_per_minute.");
              return false;
            } //If virtual user is zero in scenario and group base


            if (virtualUser < 0.0) {
              this.scenUtilsService.errorMessage("Total of virtual users in percentage mode should be greater than zero.\n");
              return false;
            }

            return true;
          } catch (e) {
            console.trace(this.className, "validatePercentage", "", "", "in validatePercentage()", e);
            return false;
          }
        }
      }, {
        key: "validateDnsRequest",
        value: function validateDnsRequest(dns, reqName, groupName, flowName) {
          if (!dns.domain || dns.domain.trim() === "") {
            return {
              isValid: false,
              message: "Need to provide Domain to lookup before saving scenario for request '".concat(reqName, "' in group '").concat(groupName, "' and flow '").concat(flowName, "'.")
            };
          }

          if (!dns.dnsServer || dns.dnsServer.trim() === "") {
            return {
              isValid: false,
              message: "Need to provide DNS Server for request '".concat(reqName, "' in group '").concat(groupName, "' and flow '").concat(flowName, "'.")
            };
          }

          return {
            isValid: true,
            message: ''
          };
        }
      }]);
    }();
    /***/

  },

  /***/
  "./src/app/pages/scenario/constants/headers-key-value-constants.ts":
  /*!*************************************************************************!*\
    !*** ./src/app/pages/scenario/constants/headers-key-value-constants.ts ***!
    \*************************************************************************/

  /*! exports provided: KEY_ARRAY, VALUE_ARRAY */

  /***/
  function _src_app_pages_scenario_constants_headersKeyValueConstantsTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "KEY_ARRAY", function () {
      return KEY_ARRAY;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "VALUE_ARRAY", function () {
      return VALUE_ARRAY;
    });

    var KEY_ARRAY = [{
      name: 'Accept'
    }, {
      name: 'Accept-Charset'
    }, {
      name: 'Accept-Encoding'
    }, {
      name: 'Accept-Language'
    }, {
      name: 'Access-Control-Request-Headers'
    }, {
      name: 'Access-Control-Request-Method'
    }, {
      name: 'Authorization'
    }, {
      name: 'Cache-Control'
    }, {
      name: 'Content-Transfer-Encoding'
    }, {
      name: 'Content-Type'
    }, {
      name: 'Content-Length'
    }, {
      name: 'Connection'
    }, {
      name: 'Date'
    }, {
      name: 'If-Match'
    }, {
      name: 'If-None-Match'
    }, {
      name: 'If-Range'
    }, {
      name: 'Keep-Alive'
    }, {
      name: 'Max-Forwards'
    }, {
      name: 'Pragma'
    }, {
      name: 'Proxy-Authorization'
    }, {
      name: 'Range'
    }, {
      name: 'Trailer'
    }, {
      name: 'Transfer-Encoding'
    }, {
      name: 'Upgrade'
    }, {
      name: 'User-Agent'
    }, {
      name: 'Via'
    }, {
      name: 'Warning'
    }, {
      name: 'X-Do-Not-Track'
    }, {
      name: 'x-api-key'
    }]; //CHANGE-9

    var VALUE_ARRAY = {
      'Accept': [{
        name: 'application/java-archive'
      }, {
        name: 'application/EDI-X12'
      }],
      'Accept-Charset': [{
        name: 'application/EDIFACT'
      }],
      'Accept-Encoding': [{
        name: 'application/pdf'
      }, {
        name: 'application/xhtml+xml'
      }, {
        name: 'application/x-shockwave-flash'
      }, {
        name: 'application/json'
      }],
      'Accept-Language': [{
        name: 'application/ld+json'
      }],
      'Access-Control-Request-Headers': [{
        name: 'application/xml'
      }, {
        name: 'application/zip'
      }, {
        name: 'application/x-www-form-urlencoded'
      }, {
        name: 'audio/mpeg'
      }, {
        name: 'audio/x-ms-wma'
      }],
      'Access-Control-Request-Method': [{
        name: 'audio/vnd.rn-realaudio'
      }, {
        name: 'audio/x-wav'
      }, {
        name: 'image/gif'
      }, {
        name: 'image/jpeg'
      }, {
        name: 'image/png'
      }],
      'Authorization': [{
        name: 'image/tiff'
      }, {
        name: 'image/vnd.microsoft.icon'
      }, {
        name: 'image/x-icon'
      }, {
        name: 'image/vnd.djvu'
      }],
      'Cache-Control': [{
        name: 'image/svg+xml'
      }, {
        name: 'multipart/mixed'
      }, {
        name: 'multipart/alternative'
      }, {
        name: 'multipart/related (using by MHTML (HTML mail).)'
      }],
      'Content-Transfer-Encoding': [{
        name: 'multipart/form-data'
      }],
      'Content-Type': [{
        name: 'text/css'
      }, {
        name: 'text/csv'
      }, {
        name: 'text/html'
      }, {
        name: 'text/javascript (obsolete)'
      }, {
        name: 'text/plain'
      }, {
        name: 'text/xml'
      }],
      'Content-Length': [{
        name: 'video/mpeg'
      }, {
        name: 'video/mp4'
      }],
      'Connection': [{
        name: 'video/quicktime'
      }],
      'Date': [{
        name: 'video/x-ms-wmv'
      }],
      'If-Match': [{
        name: 'video/x-msvideo'
      }],
      'Keep-Alive': [{
        name: 'video/x-flv'
      }],
      'Pragma': [{
        name: 'video/webm'
      }],
      'Proxy-Authorization': [{
        name: 'application/javascript'
      }, {
        name: 'application/octet-stream'
      }, {
        name: 'application/ogg'
      }],
      'Range': [{
        name: 'application/pdf'
      }],
      'Trailer': [{
        name: 'application/ld+json'
      }, {
        name: 'application/json'
      }],
      'User-Agent': [{
        name: 'User-Agent'
      }, {
        name: 'application/pdf'
      }],
      'Via': [{
        name: 'Via'
      }, {
        name: 'application/ld+json'
      }, {
        name: 'application/json'
      }],
      'Warning': [{
        name: 'Warning{ name: '
      }, {
        name: 'application/ld+json'
      }, {
        name: 'application/json'
      }],
      'X-Do-Not-Track': [{
        name: 'X-Do-Not-Track'
      }, {
        name: 'application/ld+json'
      }, {
        name: 'application/json'
      }]
    };
    /***/
  },

  /***/
  "./src/app/pages/scenario/interface/browser-steps-data.ts":
  /*!****************************************************************!*\
    !*** ./src/app/pages/scenario/interface/browser-steps-data.ts ***!
    \****************************************************************/

  /*! exports provided: SchBrowserSteps */

  /***/
  function _src_app_pages_scenario_interface_browserStepsDataTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "SchBrowserSteps", function () {
      return SchBrowserSteps;
    });

    var SchBrowserSteps = /*#__PURE__*/_createClass(function SchBrowserSteps() {
      _classCallCheck(this, SchBrowserSteps);

      this.optional = false;
      this.tags = [];
      this.thinkTime = 0;
      this.har = true;
      this.enable = true;
      this.preStep = {
        inline: ""
      };
      this.postStep = {
        inline: ""
      };
    });
    /***/

  },

  /***/
  "./src/app/pages/scenario/interface/scenario.model.ts":
  /*!************************************************************!*\
    !*** ./src/app/pages/scenario/interface/scenario.model.ts ***!
    \************************************************************/

  /*! exports provided: RDTENV, SOURCE */

  /***/
  function _src_app_pages_scenario_interface_scenarioModelTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "RDTENV", function () {
      return RDTENV;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "SOURCE", function () {
      return SOURCE;
    });

    var RDTENV;

    (function (RDTENV) {
      RDTENV[RDTENV["cloud"] = 0] = "cloud";
      RDTENV[RDTENV["local"] = 1] = "local";
    })(RDTENV || (RDTENV = {}));

    var SOURCE;

    (function (SOURCE) {
      SOURCE["tool"] = "tool";
      SOURCE["mongo"] = "mongo";
    })(SOURCE || (SOURCE = {}));
    /***/

  },

  /***/
  "./src/app/pages/scenario/scenario-design/components/no-code-runlogic/no-code-runlogic.component.scss":
  /*!************************************************************************************************************!*\
    !*** ./src/app/pages/scenario/scenario-design/components/no-code-runlogic/no-code-runlogic.component.scss ***!
    \************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _src_app_pages_scenario_scenarioDesign_components_noCodeRunlogic_noCodeRunlogicComponentScss(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "app-no-code-runlogic .tool-bar {\n  display: flex;\n  flex-wrap: wrap;\n  padding: 0px 8px;\n}\napp-no-code-runlogic .top-dropdown {\n  z-index: 999;\n  margin: 3px 0px;\n}";
    /***/
  },

  /***/
  "./src/app/pages/scenario/scenario-design/components/no-code-runlogic/no-code-runlogic.component.ts":
  /*!**********************************************************************************************************!*\
    !*** ./src/app/pages/scenario/scenario-design/components/no-code-runlogic/no-code-runlogic.component.ts ***!
    \**********************************************************************************************************/

  /*! exports provided: NoCodeRunlogicComponent */

  /***/
  function _src_app_pages_scenario_scenarioDesign_components_noCodeRunlogic_noCodeRunlogicComponentTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "NoCodeRunlogicComponent", function () {
      return NoCodeRunlogicComponent;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _runlogic_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./runlogic.model */
    "./src/app/pages/scenario/scenario-design/components/no-code-runlogic/runlogic.model.ts");
    /* harmony import */


    var src_app_pages_home_script_manager_script_edit_home_script_topmenu_script_tab_script_tab_data_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! src/app/pages/home/script-manager/script-edit-home/script-topmenu/script-tab/script-tab-data.service */
    "./src/app/pages/home/script-manager/script-edit-home/script-topmenu/script-tab/script-tab-data.service.ts");
    /* harmony import */


    var _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../../../service/scenario-utils.service */
    "./src/app/pages/scenario/service/scenario-utils.service.ts");
    /* harmony import */


    var src_app_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! src/app/shared/cav-toast/service/cav-message.service */
    "./src/app/shared/cav-toast/service/cav-message.service.ts");

    var NoCodeRunlogicComponent = /*#__PURE__*/function () {
      function NoCodeRunlogicComponent(scriptTabService, scenUtilService, cavMsgService, cdr) {
        _classCallCheck(this, NoCodeRunlogicComponent);

        this.scriptTabService = scriptTabService;
        this.scenUtilService = scenUtilService;
        this.cavMsgService = cavMsgService;
        this.cdr = cdr;
        this.NO_CODE_RUNLOGIC = _runlogic_model__WEBPACK_IMPORTED_MODULE_2__["NO_CODE_RUNLOGIC"];
        this.groupName = '';
        this.runlogicList = [];
        this.closePanel = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.runlogicListOptions = [];
        this.fullScenarioPath = '';
        this.showRunlogicHome = true;
        this.subscriptions = [];
      }

      return _createClass(NoCodeRunlogicComponent, [{
        key: "ngOnInit",
        value: function ngOnInit() {
          var project = this.scenUtilService.Project;
          var subProject = this.scenUtilService.subProject;
          var scenario = this.scenUtilService.scenarioName;
          this.fullScenarioPath = "".concat(project, "/").concat(subProject, "/scenarios/").concat(scenario, "/").concat(this.groupName, "/runlogic");
          this.buildRunlogicListOptions(true);
        }
      }, {
        key: "ngOnChanges",
        value: function ngOnChanges() {
          if (this.groupData) {
            this.groupName = this.groupData.grpName;
            this.runlogicList = this.groupData.runlogicList || [];
            this.buildRunlogicListOptions(true);
          }
        }
      }, {
        key: "buildRunlogicListOptions",
        value: function buildRunlogicListOptions() {
          var refresh = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
          this.refreshRunlogicListOptions();
          this.selectedRunlogic = this.runlogicListOptions.find(function (option) {
            return option.isDefault;
          });

          if (this.selectedRunlogic == null && this.runlogicListOptions.length > 0) {
            this.selectedRunlogic = this.runlogicListOptions[0];
          }

          if (refresh && this.selectedRunlogic) this.onRunlogicSelect(this.selectedRunlogic);
        }
      }, {
        key: "refreshRunlogicListOptions",
        value: function refreshRunlogicListOptions() {
          this.runlogicListOptions = this.runlogicList.map(function (runlogic, index) {
            return {
              label: runlogic.name + (runlogic.isDefault ? ' (Default)' : ''),
              value: runlogic,
              isDefault: runlogic.isDefault,
              system: runlogic.system
            };
          });
        }
      }, {
        key: "onRunlogicSelect",
        value: function onRunlogicSelect(selectedRunlogic) {
          var _this10 = this;

          if (this.selectedRunlogic && this.fullScenarioPath != null && this.fullScenarioPath !== '') {
            // Destroy the child component
            this.showRunlogicHome = false;
            this.cdr.detectChanges(); // Set new runlogic data

            this.runlogicObj = {
              filePath: this.fullScenarioPath,
              fileName: this.selectedRunlogic.value.name,
              tabIndex: this.selectedRunlogic.value.tabIndex || 0,
              type: 8
            };
            this.scriptTabService.createRunlogicTab(this.runlogicObj); // Recreate the child component after a brief delay

            setTimeout(function () {
              _this10.showRunlogicHome = true;
              console.log('Runlogic tab reloaded');

              _this10.cdr.detectChanges();
            }, 0);
          }
        }
      }, {
        key: "setRunlogicAsDefault",
        value: function setRunlogicAsDefault() {
          var _this11 = this;

          if (this.selectedRunlogic && this.selectedRunlogic.value) {
            // Update the runlogicList to mark this as default
            this.runlogicList.forEach(function (rl) {
              return rl.isDefault = false;
            }); // Find the actual runlogic item and mark it as default

            var selectedItem = this.runlogicList.find(function (rl) {
              return rl.name === _this11.selectedRunlogic.value.name;
            });

            if (selectedItem) {
              selectedItem.isDefault = true;
            } // Sync with groupData


            if (this.groupData && this.groupData.runlogicList) {
              this.groupData.runlogicList.forEach(function (rl) {
                return rl.isDefault = false;
              });
              var groupItem = this.groupData.runlogicList.find(function (rl) {
                return rl.name === _this11.selectedRunlogic.value.name;
              });

              if (groupItem) {
                groupItem.isDefault = true;
              }
            } // Rebuild options to reflect the updated default label


            this.buildRunlogicListOptions();
            this.cavMsgService.showSuccess("Runlogic \"".concat(this.selectedRunlogic.value.name, "\" set as default successfully."), 'Success'); // Save the changes

            this.scenUtilService.saveComponentData(0, {});
          }
        }
      }, {
        key: "copyRunlogic",
        value: function copyRunlogic() {
          this.scriptTabService.copyRunlogic.next();
        }
      }, {
        key: "renameRunlogic",
        value: function renameRunlogic() {
          if (this.selectedRunlogic.value.system) {
            this.cavMsgService.showError("System Default runlogic \"".concat(this.selectedRunlogic.value.name, "\" cannot be renamed."), 'Error');
            return;
          }

          this.scriptTabService.renameRunlogic.next();
        }
      }, {
        key: "downloadRunlogic",
        value: function downloadRunlogic() {
          this.scriptTabService.downloadRunlogic.next();
        }
      }, {
        key: "deleteRunlogic",
        value: function deleteRunlogic() {
          if (this.selectedRunlogic.value.isDefault) {
            this.cavMsgService.showError("Default runlogic \"".concat(this.selectedRunlogic.value.name, "\" cannot be deleted. Please set another runlogic as default before deleting this."), 'Error');
            return;
          }

          if (this.selectedRunlogic.value.system) {
            this.cavMsgService.showError("System Default runlogic \"".concat(this.selectedRunlogic.value.name, "\" cannot be deleted."), 'Error');
            return;
          }

          this.scriptTabService.deleteRunlogic.next();
        }
      }, {
        key: "createRunlogic",
        value: function createRunlogic() {
          this.scriptTabService.createRunlogic.next();
        }
      }, {
        key: "defaultRunlogic",
        value: function defaultRunlogic() {
          // set selected runlogic as default
          // old default to false
          this.setRunlogicAsDefault();
        }
      }, {
        key: "showCalculator",
        value: function showCalculator() {
          this.scriptTabService.calculator.next();
        }
      }, {
        key: "expandCollapse",
        value: function expandCollapse() {
          this.scriptTabService.expandCollapse.next();
        }
      }, {
        key: "saveRunlogic",
        value: function saveRunlogic() {
          if (this.selectedRunlogic.value.system) {
            this.cavMsgService.showError("System Default runlogic \"".concat(this.selectedRunlogic.value.name, "\" cannot be modified."), 'Error');
            return;
          }

          this.scriptTabService.saveRunlogic.next();
        }
      }, {
        key: "resetRunlogic",
        value: function resetRunlogic() {
          this.scriptTabService.resetRunlogic.next();
        }
      }, {
        key: "createRunlogicAndSelect",
        value: function createRunlogicAndSelect(newRunlogic) {
          // This method will be called when a new runlogic is created
          // Add it to the list and select it
          this.runlogicList.push(newRunlogic);
          this.buildRunlogicListOptions();
          this.selectedRunlogic = newRunlogic;
          this.onRunlogicSelect(newRunlogic);
        }
      }, {
        key: "enableAdvancedRunlogic",
        value: function enableAdvancedRunlogic() {
          var _this12 = this;

          if (this.groupData && !this.groupData.runlogicList) {
            this.groupData.runlogicList = [];
          } // Add default runlogic


          var newRunlogic = {
            name: 'runlogic',
            isDefault: true,
            system: true
          };
          this.groupData.runlogicList.push(newRunlogic);
          this.runlogicList = this.groupData.runlogicList; // Save and convert scenario

          this.subscriptions.push(this.scenUtilService.$notifySaveScenCompleted.subscribe(function (data) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this12, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee() {
              return _regenerator().w(function (_context) {
                while (1) switch (_context.n) {
                  case 0:
                    // Rebuild options and reload
                    this.buildRunlogicListOptions(true);

                  case 1:
                    return _context.a(2);
                }
              }, _callee, this);
            }));
          }));
          this.scenUtilService.saveComponentData(0, {});
        }
      }, {
        key: "onRunlogicCreated",
        value: function onRunlogicCreated(event) {
          // Add new runlogic to the list
          var newRunlogic = {
            name: event.name,
            isDefault: false
          };
          this.runlogicList.push(newRunlogic);
          this.refreshRunlogicListOptions(); // Select the newly created runlogic

          var newOption = this.runlogicListOptions.find(function (option) {
            return option.value.name === event.name;
          });

          if (newOption) {
            this.selectedRunlogic = newOption;
            this.onRunlogicSelect(newOption);
            this.scenUtilService.saveComponentData(0, {});
          }
        }
      }, {
        key: "onRunlogicRenamed",
        value: function onRunlogicRenamed(event) {
          // Find and update the renamed runlogic
          var item = this.runlogicList.find(function (r) {
            return r.name === event.oldName;
          });

          if (item) {
            item.name = event.newName;
            this.refreshRunlogicListOptions(); // Update selection if the renamed runlogic was selected

            {
              var updatedOption = this.runlogicListOptions.find(function (option) {
                return option.value.name === event.newName;
              });

              if (updatedOption) {
                this.selectedRunlogic = updatedOption;
                this.onRunlogicSelect(updatedOption);
                this.scenUtilService.saveComponentData(0, {});
              }
            }
          }
        }
      }, {
        key: "onRunlogicDeleted",
        value: function onRunlogicDeleted(event) {
          // Remove the deleted runlogic from the list
          this.groupData.runlogicList = this.runlogicList = this.runlogicList.filter(function (r) {
            return r.name !== event.name;
          });
          this.refreshRunlogicListOptions(); // If the deleted runlogic was selected, select default or first available

          if (this.selectedRunlogic && this.selectedRunlogic.value.name === event.name) {
            if (this.runlogicList.length > 0) {
              var defaultOption = this.runlogicListOptions.find(function (option) {
                return option.isDefault;
              });
              this.selectedRunlogic = defaultOption || this.runlogicListOptions[0];
              this.onRunlogicSelect(this.selectedRunlogic);
              this.scenUtilService.saveComponentData(0, {});
            } else {
              this.selectedRunlogic = null;
              this.runlogicObj = null;
            }
          }
        }
      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this.scriptTabService.resetTabs();

          if (this.subscriptions) {
            this.subscriptions.forEach(function (sub) {
              return sub.unsubscribe();
            });
          }
        }
      }]);
    }();

    NoCodeRunlogicComponent.ctorParameters = function () {
      return [{
        type: src_app_pages_home_script_manager_script_edit_home_script_topmenu_script_tab_script_tab_data_service__WEBPACK_IMPORTED_MODULE_3__["ScriptTabDataService"]
      }, {
        type: _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_4__["ScenarioUtilsService"]
      }, {
        type: src_app_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_5__["CavMessageService"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
      }];
    };

    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], NoCodeRunlogicComponent.prototype, "groupData", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], NoCodeRunlogicComponent.prototype, "closePanel", void 0);
    NoCodeRunlogicComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'app-no-code-runlogic',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./no-code-runlogic.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/components/no-code-runlogic/no-code-runlogic.component.html"))["default"],
      encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./no-code-runlogic.component.scss */
      "./src/app/pages/scenario/scenario-design/components/no-code-runlogic/no-code-runlogic.component.scss"))["default"]]
    })], NoCodeRunlogicComponent);
    /***/
  },

  /***/
  "./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.component.scss":
  /*!*****************************************************************************************************!*\
    !*** ./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.component.scss ***!
    \*****************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _src_app_pages_scenario_scenarioDesign_conditionScenario_conditionScenarioComponentScss(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = ".foterDialog ::ng-deep .p-dialog-content {\n  padding: 1.5rem;\n}\n\n.conditions-wrapper {\n  display: flex;\n  flex-direction: column;\n  gap: 1rem;\n}\n\n.condition-item {\n  align-items: center;\n  gap: 0.75rem;\n}\n\n.my-15 {\n  margin-top: 1.5rem;\n  margin-bottom: 1.5rem;\n}\n\n::ng-deep .p-dropdown {\n  width: 100%;\n}\n\n::ng-deep .p-button-danger {\n  color: #f48771;\n}\n\n::ng-deep .p-button-danger:hover {\n  background-color: #ffe3dd;\n}";
    /***/
  },

  /***/
  "./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.component.ts":
  /*!***************************************************************************************************!*\
    !*** ./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.component.ts ***!
    \***************************************************************************************************/

  /*! exports provided: ConditionScenarioComponent */

  /***/
  function _src_app_pages_scenario_scenarioDesign_conditionScenario_conditionScenarioComponentTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ConditionScenarioComponent", function () {
      return ConditionScenarioComponent;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../../service/scenario-utils.service */
    "./src/app/pages/scenario/service/scenario-utils.service.ts"); // Enums for type safety


    var ConditionType;

    (function (ConditionType) {
      ConditionType["IF"] = "if";
    })(ConditionType || (ConditionType = {}));

    var OperatorType;

    (function (OperatorType) {
      OperatorType["EQUALS"] = "EQUALS";
      OperatorType["NOT_EQUALS"] = "NOT_EQUALS";
      OperatorType["GREATER"] = "GREATER";
      OperatorType["GREATER_EQUALS"] = "GREATER_EQUALS";
      OperatorType["LESSER"] = "LESSER";
      OperatorType["LESSER_EQUALS"] = "LESSER_EQUALS";
    })(OperatorType || (OperatorType = {}));

    var RelationalOperator;

    (function (RelationalOperator) {
      RelationalOperator["AND"] = "and";
      RelationalOperator["OR"] = "or";
      RelationalOperator["NONE"] = "none";
    })(RelationalOperator || (RelationalOperator = {}));

    var ValueType;

    (function (ValueType) {
      ValueType["PARAMETER"] = "parameter";
      ValueType["STRING"] = "String";
      ValueType["INTEGER"] = "Integer";
      ValueType["DOUBLE"] = "Double";
    })(ValueType || (ValueType = {}));

    var ConditionScenarioComponent = /*#__PURE__*/function () {
      function ConditionScenarioComponent(scenUtilService, cd) {
        _classCallCheck(this, ConditionScenarioComponent);

        this.scenUtilService = scenUtilService;
        this.cd = cd;
        this.displayDialog = false; // Keep reference to request or step data

        this.requestData = null; // Store original condition state for cancel operation

        this.originalCondition = null;
        this.typeOptions = [{
          label: 'if',
          value: ConditionType.IF
        }];
        this.operatorOptions = [{
          label: '==',
          value: OperatorType.EQUALS
        }, {
          label: '>',
          value: OperatorType.GREATER
        }, {
          label: '>=',
          value: OperatorType.GREATER_EQUALS
        }, {
          label: '<',
          value: OperatorType.LESSER
        }, {
          label: '<=',
          value: OperatorType.LESSER_EQUALS
        }, {
          label: '!=',
          value: OperatorType.NOT_EQUALS
        }];
        this.relationalOperatorOptions = [{
          label: 'and',
          value: RelationalOperator.AND
        }, {
          label: 'or',
          value: RelationalOperator.OR
        }];
        this.rhsTypeOptions = [{
          label: 'Integer',
          value: ValueType.INTEGER
        }, {
          label: 'String',
          value: ValueType.STRING
        }, {
          label: 'Double',
          value: ValueType.DOUBLE
        }];
      }

      return _createClass(ConditionScenarioComponent, [{
        key: "ngOnInit",
        value: function ngOnInit() {// Initialize - scenUtilService.parameterOption is already populated
        }
        /**
         * Show the dialog with initial data
         * Work directly with requestData.condition or stepData.condition
         * Supports both SchRequestData and SchBrowserSteps
         */

      }, {
        key: "showDialog",
        value: function showDialog(requestData) {
          this.requestData = requestData; // Store backup of original condition for cancel operation

          this.originalCondition = this.requestData.condition ? JSON.parse(JSON.stringify(this.requestData.condition)) : null;

          if (this.requestData.condition) {
            this.requestData.condition.forEach(function (row) {
              // Fix type if it's an object
              if (typeof row.type === 'object' && row.type !== null) {
                console.log('Fixing type object-to-string mismatch for:', row.type);
                row.type = row.type.value;
              } // Fix lhs.value if it's an object


              if (row.lhs && typeof row.lhs.value === 'object' && row.lhs.value !== null) {
                console.log('Fixing lhs.value object-to-string mismatch for:', row.lhs.value);
                row.lhs.value = row.lhs.value.value;
              } // Fix lhs.type if it's an object


              if (row.lhs && typeof row.lhs.type === 'object' && row.lhs.type !== null) {
                console.log('Fixing lhs.type object-to-string mismatch for:', row.lhs.type);
                row.lhs.type = row.lhs.type.value;
              } // Fix operator if it's an object


              if (typeof row.operator === 'object' && row.operator !== null) {
                console.log('Fixing operator object-to-string mismatch for:', row.operator);
                row.operator = row.operator.value;
              } // Fix rhs.type if it's an object


              if (row.rhs && typeof row.rhs.type === 'object' && row.rhs.type !== null) {
                console.log('Fixing rhs.type object-to-string mismatch for:', row.rhs.type);
                row.rhs.type = row.rhs.type.value;
              } // Fix relationalOperator if it's an object


              if (typeof row.relationalOperator === 'object' && row.relationalOperator !== null) {
                console.log('Fixing relationalOperator object-to-string mismatch for:', row.relationalOperator);
                row.relationalOperator = row.relationalOperator.value;
              }
            });
          }

          this.displayDialog = true;
          this.cd.detectChanges(); // Use ChangeDetectorRef here
        }
        /**
         * Add a new condition row directly to requestData.condition
         */

      }, {
        key: "addConditionRow",
        value: function addConditionRow() {
          if (!this.requestData) return;

          if (!this.requestData.condition) {
            this.requestData.condition = [];
          }

          var newRow = {
            type: ConditionType.IF,
            lhs: {
              value: '',
              type: ValueType.PARAMETER
            },
            operator: OperatorType.EQUALS,
            rhs: {
              value: '',
              type: ValueType.INTEGER
            },
            relationalOperator: RelationalOperator.AND
          };
          this.requestData.condition.push(newRow);
        }
        /**
         * Remove a specific condition row from requestData.condition
         */

      }, {
        key: "removeConditionRow",
        value: function removeConditionRow(index) {
          var _a;

          if (((_a = this.requestData) === null || _a === void 0 ? void 0 : _a.condition) && index >= 0 && index < this.requestData.condition.length) {
            this.requestData.condition.splice(index, 1);
          }
        }
        /**
         * Cancel the dialog
         */

      }, {
        key: "cancel",
        value: function cancel() {
          // Restore original condition state
          if (this.requestData) {
            if (this.originalCondition) {
              this.requestData.condition = JSON.parse(JSON.stringify(this.originalCondition));
            } else {
              this.requestData.condition = [];
            }
          }

          this.displayDialog = false;
          this.requestData = null;
          this.originalCondition = null;
        }
        /**
         * Save and close dialog - ensure all data is in proper TestCondition format
         */

      }, {
        key: "save",
        value: function save() {
          var _a, _b; // Validate all conditions before saving (only if conditions exist)


          if (((_a = this.requestData) === null || _a === void 0 ? void 0 : _a.condition) && this.requestData.condition.length > 0) {
            for (var i = 0; i < this.requestData.condition.length; i++) {
              var row = this.requestData.condition[i]; // Check if all required fields are filled

              if (!row.type || row.type === '') {
                this.scenUtilService.errorMessage("Please fill Condition Type for condition ".concat(i + 1));
                return;
              }

              if (!row.lhs || !row.lhs.value || row.lhs.value === '') {
                this.scenUtilService.errorMessage("Please fill Left Hand Side value for condition ".concat(i + 1));
                return;
              }

              if (!row.lhs.type || row.lhs.type === '') {
                this.scenUtilService.errorMessage("Please fill Left Hand Side type for condition ".concat(i + 1));
                return;
              }

              if (!row.operator || row.operator === '') {
                this.scenUtilService.errorMessage("Please fill Operator for condition ".concat(i + 1));
                return;
              }

              if (!row.rhs || !row.rhs.value || row.rhs.value === '') {
                this.scenUtilService.errorMessage("Please fill Right Hand Side value for condition ".concat(i + 1));
                return;
              }

              if (!row.rhs.type || row.rhs.type === '') {
                this.scenUtilService.errorMessage("Please fill Right Hand Side type for condition ".concat(i + 1));
                return;
              } // For rows after first, relational operator is required


              if (i > 0 && (!row.relationalOperator || row.relationalOperator === '')) {
                this.scenUtilService.errorMessage("Please fill Relational Operator for condition ".concat(i + 1));
                return;
              }
            }
          } // Clean up any object values to ensure proper TestCondition format


          if ((_b = this.requestData) === null || _b === void 0 ? void 0 : _b.condition) {
            this.requestData.condition.forEach(function (row, index) {
              // Extract primitive values from any SelectItem objects
              if (typeof row.type === 'object' && row.type !== null) {
                row.type = row.type.value || '';
              }

              if (row.lhs) {
                if (typeof row.lhs.value === 'object' && row.lhs.value !== null) {
                  row.lhs.value = row.lhs.value.value || '';
                }

                if (typeof row.lhs.type === 'object' && row.lhs.type !== null) {
                  row.lhs.type = row.lhs.type.value || '';
                }
              }

              if (typeof row.operator === 'object' && row.operator !== null) {
                row.operator = row.operator.value || '';
              }

              if (row.rhs) {
                if (typeof row.rhs.type === 'object' && row.rhs.type !== null) {
                  row.rhs.type = row.rhs.type.value || '';
                } // rhs.value should remain as is (user input string)

              } // First row should have empty relationalOperator


              if (index === 0) {
                row.relationalOperator = '';
              } else if (typeof row.relationalOperator === 'object' && row.relationalOperator !== null) {
                row.relationalOperator = row.relationalOperator.value || '';
              }
            });
          }

          this.scenUtilService.successMessage('Conditions saved successfully');
          this.displayDialog = false;
          this.requestData = null;
          this.originalCondition = null;
        }
      }]);
    }();

    ConditionScenarioComponent.ctorParameters = function () {
      return [{
        type: _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_2__["ScenarioUtilsService"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
      }];
    };

    ConditionScenarioComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'app-condition-scenario',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./condition-scenario.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.component.html"))["default"],
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./condition-scenario.component.scss */
      "./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.component.scss"))["default"]]
    })], ConditionScenarioComponent);
    /***/
  },

  /***/
  "./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.module.ts":
  /*!************************************************************************************************!*\
    !*** ./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.module.ts ***!
    \************************************************************************************************/

  /*! exports provided: ConditionScenarioModule */

  /***/
  function _src_app_pages_scenario_scenarioDesign_conditionScenario_conditionScenarioModuleTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ConditionScenarioModule", function () {
      return ConditionScenarioModule;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/common */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
    /* harmony import */


    var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
    /* harmony import */


    var _condition_scenario_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./condition-scenario.component */
    "./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.component.ts");
    /* harmony import */


    var primeng_dialog__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! primeng/dialog */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
    /* harmony import */


    var primeng_button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! primeng/button */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
    /* harmony import */


    var primeng_dropdown__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! primeng/dropdown */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
    /* harmony import */


    var primeng_inputtext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! primeng/inputtext */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");

    var ConditionScenarioModule = /*#__PURE__*/_createClass(function ConditionScenarioModule() {
      _classCallCheck(this, ConditionScenarioModule);
    });

    ConditionScenarioModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
      declarations: [_condition_scenario_component__WEBPACK_IMPORTED_MODULE_4__["ConditionScenarioComponent"]],
      imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"], primeng_dialog__WEBPACK_IMPORTED_MODULE_5__["DialogModule"], primeng_button__WEBPACK_IMPORTED_MODULE_6__["ButtonModule"], primeng_dropdown__WEBPACK_IMPORTED_MODULE_7__["DropdownModule"], primeng_inputtext__WEBPACK_IMPORTED_MODULE_8__["InputTextModule"]],
      exports: [_condition_scenario_component__WEBPACK_IMPORTED_MODULE_4__["ConditionScenarioComponent"]]
    })], ConditionScenarioModule);
    /***/
  },

  /***/
  "./src/app/pages/scenario/scenario-design/protocols/dns/dns.component.scss":
  /*!*********************************************************************************!*\
    !*** ./src/app/pages/scenario/scenario-design/protocols/dns/dns.component.scss ***!
    \*********************************************************************************/

  /*! exports provided: default */

  /***/
  function _src_app_pages_scenario_scenarioDesign_protocols_dns_dnsComponentScss(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = ".dns-container {\n  min-height: 180px;\n}\n\n.width-180 {\n  width: 180px;\n}";
    /***/
  },

  /***/
  "./src/app/pages/scenario/scenario-design/protocols/dns/dns.component.ts":
  /*!*******************************************************************************!*\
    !*** ./src/app/pages/scenario/scenario-design/protocols/dns/dns.component.ts ***!
    \*******************************************************************************/

  /*! exports provided: DnsComponent */

  /***/
  function _src_app_pages_scenario_scenarioDesign_protocols_dns_dnsComponentTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "DnsComponent", function () {
      return DnsComponent;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");

    var DnsComponent = /*#__PURE__*/function () {
      function DnsComponent() {
        _classCallCheck(this, DnsComponent);

        this.disabled = false;
        this.requestNameChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.protocolOptions = [{
          label: 'UDP',
          value: 'UDP'
        }, {
          label: 'TCP',
          value: 'TCP'
        }];
        this.dnsTypeOptions = [{
          label: 'A',
          value: 'A'
        }, {
          label: 'NS',
          value: 'NS'
        }, {
          label: 'MD',
          value: 'MD'
        }, {
          label: 'MF',
          value: 'MF'
        }, {
          label: 'CNAME',
          value: 'CNAME'
        }, {
          label: 'SOA',
          value: 'SOA'
        }, {
          label: 'MB',
          value: 'MB'
        }, {
          label: 'MG',
          value: 'MG'
        }, {
          label: 'MR',
          value: 'MR'
        }, {
          label: 'NULL',
          value: 'NULL'
        }, {
          label: 'WKS',
          value: 'WKS'
        }, {
          label: 'PTR',
          value: 'PTR'
        }, {
          label: 'HINFO',
          value: 'HINFO'
        }, {
          label: 'MINFO',
          value: 'MINFO'
        }, {
          label: 'MX',
          value: 'MX'
        }, {
          label: 'TXT',
          value: 'TXT'
        }, {
          label: 'RP',
          value: 'RP'
        }, {
          label: 'AFSDB',
          value: 'AFSDB'
        }, {
          label: 'X25',
          value: 'X25'
        }, {
          label: 'ISDN',
          value: 'ISDN'
        }, {
          label: 'RT',
          value: 'RT'
        }, {
          label: 'NSAP',
          value: 'NSAP'
        }, {
          label: 'NSAP_PTR',
          value: 'NSAP_PTR'
        }, {
          label: 'SIG',
          value: 'SIG'
        }, {
          label: 'KEY',
          value: 'KEY'
        }, {
          label: 'PX',
          value: 'PX'
        }, {
          label: 'GPOS',
          value: 'GPOS'
        }, {
          label: 'AAAA',
          value: 'AAAA'
        }, {
          label: 'LOC',
          value: 'LOC'
        }, {
          label: 'SRV',
          value: 'SRV'
        }, {
          label: 'AXFR',
          value: 'AXFR'
        }, {
          label: 'MAILB',
          value: 'MAILB'
        }, {
          label: 'MAILA',
          value: 'MAILA'
        }, {
          label: 'NAPTR',
          value: 'NAPTR'
        }, {
          label: 'ANY',
          value: 'ANY'
        }];
      }

      return _createClass(DnsComponent, [{
        key: "ngOnChanges",
        value: function ngOnChanges(changes) {
          if (changes.requestData && this.requestData) {
            if (!this.requestData.dns.protocol) {
              this.requestData.dns.protocol = 'TCP';
            }

            if (this.requestData.dns.recursive === null || this.requestData.dns.recursive === undefined) {
              this.requestData.dns.recursive = 1;
            }

            if (!this.requestData.dns.type) {
              this.requestData.dns.type = 'A';
            }

            if (!this.requestData.dns.domain) {
              this.requestData.dns.domain = '';
            }
          }
        }
      }, {
        key: "onRecursiveChange",
        value: function onRecursiveChange(value) {
          if (!this.requestData) {
            return;
          }

          this.requestData.dns.recursive = value ? 1 : 0;
        }
      }, {
        key: "onRequestNameChange",
        value: function onRequestNameChange() {
          if (!this.requestData) {
            return;
          }

          this.requestNameChange.emit(this.requestData);
        }
      }]);
    }();

    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], DnsComponent.prototype, "requestData", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], DnsComponent.prototype, "disabled", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], DnsComponent.prototype, "requestNameChange", void 0);
    DnsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'app-dns',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./dns.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/protocols/dns/dns.component.html"))["default"],
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./dns.component.scss */
      "./src/app/pages/scenario/scenario-design/protocols/dns/dns.component.scss"))["default"]]
    })], DnsComponent);
    /***/
  },

  /***/
  "./src/app/pages/scenario/scenario-design/scenario-design.component.scss":
  /*!*******************************************************************************!*\
    !*** ./src/app/pages/scenario/scenario-design/scenario-design.component.scss ***!
    \*******************************************************************************/

  /*! exports provided: default */

  /***/
  function _src_app_pages_scenario_scenarioDesign_scenarioDesignComponentScss(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "scenario-design {\n  overflow: auto;\n  display: block;\n  margin-right: 5px;\n  padding-bottom: 4px;\n  /* Hide the button by default */\n  /* Show the button when parent is hovered */\n}\nscenario-design app-runlogic-home .tree-container .tree-section {\n  border: none;\n}\nscenario-design .heightDivHelp {\n  height: calc(100vh - 100px);\n  overflow: auto;\n}\nscenario-design .sedebarHeightClass .ui-sidebar {\n  height: calc(100vh - 42px);\n}\nscenario-design .ui-autocomplete {\n  display: block;\n}\nscenario-design .spin_icon_position {\n  position: absolute;\n  right: -8px;\n  top: 13px;\n}\nscenario-design .custom-upload-button {\n  left: 0;\n  position: absolute;\n  opacity: 0;\n}\nscenario-design .myCard .ui-card {\n  width: 250px;\n  padding: 24px;\n  box-shadow: 0px 0px 5px rgba(5, 32, 58, 0.1);\n  border-radius: 5px;\n  border: solid 2px transparent;\n  transition: all 0.3s ease-in-out;\n}\nscenario-design .myCard .ui-card .ui-card-header {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\nscenario-design .myCard .ui-card .ui-card-body .ui-card-content p {\n  font-size: 13px;\n  line-height: 23px;\n  opacity: 0.8;\n  display: -webkit-box;\n  -webkit-line-clamp: 4;\n  line-clamp: 4;\n  -webkit-box-orient: vertical;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  height: 92px;\n}\nscenario-design .myCard:hover .ui-card {\n  box-shadow: 0px 0px 10px rgba(5, 32, 58, 0.1);\n  border: solid 2px var(--primary-base);\n}\nscenario-design .example-container {\n  width: 400px;\n  max-width: 100%;\n  margin: 0 25px 25px 0;\n  display: inline-block;\n  vertical-align: top;\n}\nscenario-design .example-list {\n  border: solid 1px white;\n  background: white;\n  border-radius: 4px;\n  overflow: hidden;\n  display: block;\n}\nscenario-design .example-box {\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: space-between;\n  box-sizing: border-box;\n  cursor: pointer;\n}\nscenario-design .example-box .onHover {\n  opacity: 0;\n}\nscenario-design .example-box:hover .onHover {\n  opacity: 1;\n}\nscenario-design .disable-card {\n  opacity: 0.4;\n}\nscenario-design .disable-card .notHover {\n  pointer-events: none;\n}\nscenario-design .disable-card.example-box {\n  cursor: not-allowed;\n}\nscenario-design .cdk-drag-preview {\n  box-sizing: border-box;\n  border-radius: 4px;\n  box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);\n}\nscenario-design .cdk-drag-placeholder {\n  opacity: 0;\n}\nscenario-design .cdk-drag-animating {\n  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n}\nscenario-design .example-box:last-child {\n  border: none;\n}\nscenario-design .example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder) {\n  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n}\nscenario-design .group-pane {\n  height: calc(100vh - 246px);\n  overflow: auto;\n}\nscenario-design .mat-dropdown {\n  border-top-right-radius: 0px;\n  border-bottom-right-radius: 0px;\n}\nscenario-design .closeSidebar {\n  position: absolute;\n  right: 8px;\n  top: 22px;\n}\nscenario-design .saveSidebar {\n  position: absolute;\n  right: 38px;\n  top: 22px;\n}\nscenario-design .maiBottomBox {\n  background-color: var(--background_color_1);\n  box-shadow: 0px 0px 3px 0px var(--background_color_4);\n  margin-top: 4px;\n  padding: 12px 12px 0 12px;\n}\nscenario-design .border-all {\n  border-style: solid;\n  border-width: 1px;\n}\nscenario-design .tabBorderTop {\n  border-style: solid;\n  border-width: 1px 0 0 0;\n}\nscenario-design .tabBorderRight {\n  border-style: solid;\n  border-width: 0 1px 0 0;\n}\nscenario-design .tabBorderBottom {\n  border-style: solid;\n  border-width: 0 0 1px 0;\n}\nscenario-design .OPTIONS.mat-dropdown, scenario-design .HEAD.mat-dropdown, scenario-design .CONNECT.mat-dropdown, scenario-design .TRACE.mat-dropdown {\n  border-style: solid;\n  border-width: 1px;\n  border-top-right-radius: 0px;\n  border-bottom-right-radius: 0px;\n}\nscenario-design .think-time {\n  border-style: solid;\n  border-width: 2px;\n  border-radius: 4px;\n  border-color: var(--secondary-900);\n  padding: 10px;\n}\nscenario-design .responseBox {\n  background-color: var(--background_color_1);\n  border-radius: 4px;\n  margin: 3px 0px;\n}\nscenario-design .tabBorderLeft {\n  border-style: solid;\n  border-width: 0 0 0 1px;\n}\nscenario-design .colorContainer {\n  background-color: var(--background_color_8);\n}\nscenario-design .getList .ui-dropdown.ui-corner-all {\n  border-top-right-radius: 0px;\n  border-bottom-right-radius: 0px;\n}\nscenario-design .getInput.ui-corner-all {\n  border-top-left-radius: 0px;\n  border-bottom-left-radius: 0px;\n  border-left: 0px;\n}\nscenario-design .myTabPanel .ui-tabview .ui-tabview-panels {\n  border: none;\n}\nscenario-design .colorRed {\n  color: var(background_color_21);\n}\nscenario-design #chart-line2, scenario-design #chart-line {\n  display: block;\n  min-width: 150px;\n  max-width: 345px;\n  height: 200px;\n  margin: 5px auto;\n}\nscenario-design .invisible {\n  display: none;\n}\nscenario-design .d-none {\n  display: none;\n}\nscenario-design .d-block {\n  display: block;\n}\nscenario-design .from-data {\n  max-height: 200px;\n  overflow: auto;\n}\nscenario-design .group-platform-icon {\n  font-size: 16px;\n  color: var(--text-color);\n  line-height: 1;\n  margin-top: 1px;\n}\nscenario-design .cusTab {\n  display: flex;\n  list-style: none;\n  margin: 5px 0 0;\n  padding: 0;\n  z-index: 52;\n  cursor: pointer;\n  right: 0;\n  top: 4px;\n}\nscenario-design .cusTab li {\n  padding: 4px 8px;\n  list-style: none;\n  border-bottom-style: solid;\n  border-width: 3px;\n  border-color: transparent;\n  cursor: pointer;\n  font-weight: 500;\n}\nscenario-design .cusTab li.active {\n  border-bottom: 3px solid #25A75D;\n  opacity: 1;\n  color: #25A75D;\n}\nscenario-design .bodyEditor {\n  position: relative;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  border-bottom-style: solid;\n  border-width: 1px;\n  padding-left: 10px;\n  padding-right: 10px;\n  height: 27px;\n  margin: 0 -12px;\n}\nscenario-design .empty-text {\n  width: 100%;\n  text-align: center;\n}\nscenario-design .randomLinst {\n  opacity: 0;\n}\nscenario-design .randomLinst .ui-dropdown.ui-widget {\n  border: none;\n  position: absolute;\n  top: 11px;\n  right: 9px;\n  transition: all 300ms ease;\n}\nscenario-design .randomLinst .ui-dropdown.ui-widget .ui-dropdown-label-container {\n  height: 22px;\n}\nscenario-design .myHover:hover .randomLinst {\n  opacity: 1;\n}\nscenario-design .upload {\n  width: 36px;\n  position: absolute;\n  right: 0px;\n  opacity: 0;\n}\nscenario-design .infoI {\n  position: absolute;\n  right: 9px;\n  top: 16px;\n  opacity: 0.7;\n}\nscenario-design .backColor {\n  background-color: var(--secondary-100);\n  border-color: var(--secondary-100);\n}\nscenario-design .backColorFlow {\n  background-color: var(--secondary-200);\n  border-color: var(--secondary-200);\n}\nscenario-design .editor-container .overflow-guard {\n  border-style: solid;\n  border-width: 1px;\n  border-color: var(--border_bottom_color_2);\n}\nscenario-design .editor-container .overflow-guard .decorationsOverviewRuler {\n  opacity: 0;\n}\nscenario-design .panelIconOpen {\n  cursor: pointer;\n  transition: all 200ms ease-in;\n  transform: rotate(90deg);\n}\nscenario-design .panelIconClose {\n  cursor: pointer;\n  transition: all 200ms ease-in;\n}\nscenario-design .panelRL {\n  overflow: auto;\n  height: calc(100vh - 130px);\n}\nscenario-design .panelOpen {\n  transition: all 250ms ease-in;\n  overflow: auto;\n  height: calc(100vh - 190px);\n}\nscenario-design .panelClose {\n  height: 0px;\n  transition: all 250ms ease-in;\n  border: none;\n  overflow: auto;\n}\nscenario-design .groupPanelOpen {\n  height: auto;\n}\nscenario-design .groupPanelClose {\n  height: 0px !important;\n  overflow: auto;\n}\nscenario-design .flowPanelOpen {\n  height: auto;\n}\nscenario-design .flowPanelClose {\n  height: 0px !important;\n  overflow: auto;\n}\nscenario-design .text-wrap {\n  word-break: break-all;\n  white-space: break-spaces;\n}\nscenario-design .upload-btn-wrapper {\n  position: relative;\n}\nscenario-design .upload-btn-wrapper .fileLabel {\n  position: relative;\n  z-index: 2;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n}\nscenario-design .upload-btn-wrapper .fileInput {\n  left: auto;\n  right: 13px;\n  width: 93px;\n  z-index: 1;\n  height: 27px;\n  top: -16px;\n}\nscenario-design .ngxOverlay {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 900px;\n  position: fixed;\n  z-index: 99;\n  left: 50%;\n  top: 50%;\n  transform: translate(-50%, -50%);\n  height: 500px;\n  background-color: red;\n  border-radius: 10px;\n}\nscenario-design .ngxOverlay::after {\n  content: \"\";\n}\nscenario-design .tableScroll {\n  height: 395px;\n  overflow: auto;\n}\nscenario-design .script-outlet-wrap {\n  display: flex;\n  flex-direction: column;\n  flex: 1 1 auto;\n  width: 100%;\n  max-width: 100%;\n  min-width: 0;\n  min-height: 0;\n  overflow: hidden;\n}\nscenario-design .script-outlet-wrap app-script-edit-home,\nscenario-design .script-outlet-wrap app-script-editor {\n  display: block;\n  width: 100%;\n  max-width: 100%;\n  min-width: 0;\n}\nscenario-design .script-outlet-wrap .monaco-editor,\nscenario-design .script-outlet-wrap .overflow-guard,\nscenario-design .script-outlet-wrap .monaco-scrollable-element {\n  width: 100% !important;\n  max-width: 100% !important;\n}\nscenario-design .step-menu-btn {\n  opacity: 0;\n  visibility: hidden;\n  transition: opacity 0.2s ease, visibility 0.2s ease;\n}\nscenario-design .step-menu-container:hover .step-menu-btn {\n  opacity: 1;\n  visibility: visible;\n}\n.popHover.ui-overlaypanel .ui-overlaypanel-content,\n.popHover .ui-overlaypanel .ui-overlaypanel-content {\n  opacity: 1 !important;\n}";
    /***/
  },

  /***/
  "./src/app/pages/scenario/scenario-design/scenario-design.component.ts":
  /*!*****************************************************************************!*\
    !*** ./src/app/pages/scenario/scenario-design/scenario-design.component.ts ***!
    \*****************************************************************************/

  /*! exports provided: ScenarioDesignComponent */

  /***/
  function _src_app_pages_scenario_scenarioDesign_scenarioDesignComponentTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ScenarioDesignComponent", function () {
      return ScenarioDesignComponent;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var primeng__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! primeng */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
    /* harmony import */


    var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! @angular/router */
    "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
    /* harmony import */


    var _angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! @angular/cdk/drag-drop */
    "./node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/drag-drop.js");
    /* harmony import */


    var _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ../service/scenario-utils.service */
    "./src/app/pages/scenario/service/scenario-utils.service.ts");
    /* harmony import */


    var _condition_scenario_condition_scenario_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! ./condition-scenario/condition-scenario.component */
    "./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.component.ts");
    /* harmony import */


    var _interface_sch_group_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! ../interface/sch-group-data */
    "./src/app/pages/scenario/interface/sch-group-data.ts");
    /* harmony import */


    var _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! ../constants/scen-schedule-constants */
    "./src/app/pages/scenario/constants/scen-schedule-constants.ts");
    /* harmony import */


    var _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! ../interface/sch-request-data */
    "./src/app/pages/scenario/interface/sch-request-data.ts");
    /* harmony import */


    var _service_scen_keyword_definition_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
    /*! ../service/scen-keyword-definition.service */
    "./src/app/pages/scenario/service/scen-keyword-definition.service.ts");
    /* harmony import */


    var _service_scenario_http_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
    /*! ../service/scenario-http.service */
    "./src/app/pages/scenario/service/scenario-http.service.ts");
    /* harmony import */


    var _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
    /*! ../interface/scenario-state */
    "./src/app/pages/scenario/interface/scenario-state.ts");
    /* harmony import */


    var _interface_scenario_model__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
    /*! ../interface/scenario.model */
    "./src/app/pages/scenario/interface/scenario.model.ts");
    /* harmony import */


    var _commons_sch_read_scenario__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
    /*! ../commons/sch-read-scenario */
    "./src/app/pages/scenario/commons/sch-read-scenario.ts");
    /* harmony import */


    var _commons_sch_save_scenario__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(
    /*! ../commons/sch-save-scenario */
    "./src/app/pages/scenario/commons/sch-save-scenario.ts");
    /* harmony import */


    var _service_sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(
    /*! ../service/sch-schedule-data.service */
    "./src/app/pages/scenario/service/sch-schedule-data.service.ts");
    /* harmony import */


    var _commons_sch_utility__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(
    /*! ../commons/sch-utility */
    "./src/app/pages/scenario/commons/sch-utility.ts");
    /* harmony import */


    var _commons_immutable_array__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(
    /*! ../commons/immutable-array */
    "./src/app/pages/scenario/commons/immutable-array.ts");
    /* harmony import */


    var _interface_scen_schedule_graph_data__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(
    /*! ../interface/scen-schedule-graph.data */
    "./src/app/pages/scenario/interface/scen-schedule-graph.data.ts");
    /* harmony import */


    var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(
    /*! src/app/core/session/session.service */
    "./src/app/core/session/session.service.ts");
    /* harmony import */


    var lodash__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(
    /*! lodash */
    "./node_modules/lodash/lodash.js");
    /* harmony import */


    var lodash__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_21__);
    /* harmony import */


    var _constants_headers_key_value_constants__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(
    /*! ../constants/headers-key-value-constants */
    "./src/app/pages/scenario/constants/headers-key-value-constants.ts");
    /* harmony import */


    var _service_script_parameter_service__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(
    /*! ../service/script-parameter.service */
    "./src/app/pages/scenario/service/script-parameter.service.ts");
    /* harmony import */


    var _interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(
    /*! ../interface/script-parameter.constant */
    "./src/app/pages/scenario/interface/script-parameter.constant.ts");
    /* harmony import */


    var _service_save_and_read_service__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(
    /*! ../service/save-and-read.service */
    "./src/app/pages/scenario/service/save-and-read.service.ts");
    /* harmony import */


    var src_app_shared_header_work_profile_services_work_profile_active_service__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(
    /*! src/app/shared/header/work-profile/services/work-profile-active.service */
    "./src/app/shared/header/work-profile/services/work-profile-active.service.ts");
    /* harmony import */


    var _angular_common_http__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(
    /*! @angular/common/http */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
    /* harmony import */


    var _home_script_manager_parameter_components_add_parameter_parameter_data_service__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(
    /*! ../../home/script-manager/parameter/components/add-parameter/parameter-data.service */
    "./src/app/pages/home/script-manager/parameter/components/add-parameter/parameter-data.service.ts");
    /* harmony import */


    var _service_scenario_share_service__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(
    /*! ../service/scenario-share.service */
    "./src/app/pages/scenario/service/scenario-share.service.ts");
    /* harmony import */


    var src_app_shared_help_help_component__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(
    /*! src/app/shared/help/help.component */
    "./src/app/shared/help/help.component.ts");
    /* harmony import */


    var _home_script_manager_runlogic_home_runlogic_home_component__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(
    /*! ../../home/script-manager/runlogic-home/runlogic-home.component */
    "./src/app/pages/home/script-manager/runlogic-home/runlogic-home.component.ts");
    /* harmony import */


    var src_app_shared_header_user_menu_service_user_options_service__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(
    /*! src/app/shared/header/user-menu/service/user-options.service */
    "./src/app/shared/header/user-menu/service/user-options.service.ts");
    /* harmony import */


    var _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(
    /*! ../constants/scen-keyword-constants */
    "./src/app/pages/scenario/constants/scen-keyword-constants.ts");
    /* harmony import */


    var _home_load_test_services_load_test_utils_service__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(
    /*! ../../home/load-test/services/load-test-utils.service */
    "./src/app/pages/home/load-test/services/load-test-utils.service.ts");
    /* harmony import */


    var _service_test_mode_service__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(
    /*! ../service/test-mode.service */
    "./src/app/pages/scenario/service/test-mode.service.ts");
    /* harmony import */


    var _home_script_manager_services_script_utils_service__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(
    /*! ../../home/script-manager/services/script-utils.service */
    "./src/app/pages/home/script-manager/services/script-utils.service.ts");
    /* harmony import */


    var _home_script_manager_script_recorder_interface_recorder_interface__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(
    /*! ../../home/script-manager/script-recorder/interface/recorder.interface */
    "./src/app/pages/home/script-manager/script-recorder/interface/recorder.interface.ts");
    /* harmony import */


    var _browser_step_browser_step_service__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(
    /*! ../browser-step/browser-step.service */
    "./src/app/pages/scenario/browser-step/browser-step.service.ts");
    /* harmony import */


    var _interface_browser_steps_data__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(
    /*! ../interface/browser-steps-data */
    "./src/app/pages/scenario/interface/browser-steps-data.ts");
    /* harmony import */


    var _home_log_viewer_log_viewer_service__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(
    /*! ../../home/log-viewer/log-viewer.service */
    "./src/app/pages/home/log-viewer/log-viewer.service.ts");
    /* harmony import */


    var _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(
    /*! ../import-script/browse-test-sidebar/constants/browse-test.constants */
    "./src/app/pages/scenario/import-script/browse-test-sidebar/constants/browse-test.constants.ts");
    /* harmony import */


    var _browser_step_browser_step_model__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(
    /*! ../browser-step/browser-step.model */
    "./src/app/pages/scenario/browser-step/browser-step.model.ts");
    /* harmony import */


    var uuid__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(
    /*! uuid */
    "./node_modules/uuid/dist/esm-browser/index.js");
    /* harmony import */


    var src_app_shared_running_task_running_task_interface__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(
    /*! src/app/shared/running-task/running-task.interface */
    "./src/app/shared/running-task/running-task.interface.ts");
    /* harmony import */


    var src_app_shared_running_task_services_running_task_service__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(
    /*! src/app/shared/running-task/services/running-task.service */
    "./src/app/shared/running-task/services/running-task.service.ts");
    /* harmony import */


    var src_app_shared_common_services_rdt_app_list_service__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(
    /*! src/app/shared/common-services/rdt-app-list.service */
    "./src/app/shared/common-services/rdt-app-list.service.ts");
    /* harmony import */


    var _constants_scenario_config_data__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(
    /*! ../constants/scenario-config-data */
    "./src/app/pages/scenario/constants/scenario-config-data.ts");
    /* harmony import */


    var _assertion_contents_assertion_validation__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(
    /*! ../assertion/contents/assertion-validation */
    "./src/app/pages/scenario/assertion/contents/assertion-validation.ts");
    /* harmony import */


    var _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(
    /*! ../constants/scen-common-constants */
    "./src/app/pages/scenario/constants/scen-common-constants.ts");

    var ScenarioDesignComponent = /*#__PURE__*/function () {
      function ScenarioDesignComponent(router, scenUtilService, scenKeywordDefinitionService, scenarioHttpService, scenScheduleData, sessionService, workProfile, scriptParameterService, saveAndReadService, parameterDataService, confirmationService, schShareService, changeDetectorRef, userOptionsService, loadTestUtils, testModeService, utilservice, route, browserStepService, logViewerService, rdtAppListService, runingTaskService) {
        var _this13 = this;

        _classCallCheck(this, ScenarioDesignComponent);

        this.router = router;
        this.scenUtilService = scenUtilService;
        this.scenKeywordDefinitionService = scenKeywordDefinitionService;
        this.scenarioHttpService = scenarioHttpService;
        this.scenScheduleData = scenScheduleData;
        this.sessionService = sessionService;
        this.workProfile = workProfile;
        this.scriptParameterService = scriptParameterService;
        this.saveAndReadService = saveAndReadService;
        this.parameterDataService = parameterDataService;
        this.confirmationService = confirmationService;
        this.schShareService = schShareService;
        this.changeDetectorRef = changeDetectorRef;
        this.userOptionsService = userOptionsService;
        this.loadTestUtils = loadTestUtils;
        this.testModeService = testModeService;
        this.utilservice = utilservice;
        this.route = route;
        this.browserStepService = browserStepService;
        this.logViewerService = logViewerService;
        this.rdtAppListService = rdtAppListService;
        this.runingTaskService = runingTaskService;
        this.platformAndroid = _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"];
        this.platformIOS = _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"];
        this.browserProtcol = _home_script_manager_script_recorder_interface_recorder_interface__WEBPACK_IMPORTED_MODULE_37__["RecorderProtocol"].BROWSER;
        this.STEPS_ICON = _browser_step_browser_step_model__WEBPACK_IMPORTED_MODULE_42__["STEPS_ICON"];
        this.SCENARIO = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__;
        this.scenVisualOptions = [{
          label: "Visual",
          value: 'visual'
        }, {
          label: "Code",
          value: 'code'
        }];
        this.scriptMode = 'visual';
        this.groupTypeModeSupport = {
          API: ['visual', 'code'],
          Browser: ['visual', 'code'],
          RDT_NATIVE: ['visual', 'code'],
          CAVISSON: ['procode']
        };
        this.fileType = 'flow';
        this.isHeaderEditorDisplay = false;
        this.displayAdditionalInfo = true;
        this.classname = "mainScenario";
        this.showColumnsOptions = [];
        this.showHeaders = false;
        this.repeatInlineNum = 0;
        this.thinkTimeSelected = false;
        this.maximizedBody = false;
        this.TEST_MODE = _service_test_mode_service__WEBPACK_IMPORTED_MODULE_35__["TEST_MODE"];
        this.BRWOSE_TEST_MODE = _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_41__["BROWSE_TEST_MODE"];
        this.testMode = _service_test_mode_service__WEBPACK_IMPORTED_MODULE_35__["TEST_MODE"].PERFORMANCE;
        this.defaultGroupData = {
          grpName: "Group_1",
          scriptName: "".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.subProject, "/").concat(this.scenUtilService.scenarioName, "_Group_1"),
          isGroupPanelActive: true,
          grpType: _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API,
          numVUser: 1,
          percentage: 1,
          phaseList: [],
          scenType: _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCENARIO_TYPE"].FCU,
          scheduleType: _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCHEDULE_BY"].SCENARIO,
          parameters: {},
          assertions: [],
          assertionsV2: [],
          runLogic: 'as per script',
          dataDirectory: 'as per script',
          userProfile: 'Internet',
          headers: [{
            headerKey: {
              name: "Content-Length"
            },
            headerValue: {
              name: "<calculated when request is sent>"
            },
            toolTip: "The Content-Length is added to help the server for HTTP request body . If specified Content-Length is less than actual request body then the message is truncated else if specified Content-Length is more than actual request body then the server will wait for complete response and timeout.\n                   \n        Note that this setting is applied to all requests of the group.        ",
            del: false,
            chk: true
          }, {
            headerKey: {
              name: "Host"
            },
            headerValue: {
              name: "<calculated when request is sent>"
            },
            toolTip: "The Host header is added to identify the domain name for which a request is being sent to the server. This header is implicitly sent with every HTTP request.\n        It is most likely that without this header, your request will return an HTTP 400 error",
            del: false,
            chk: true
          }, {
            headerKey: {
              name: "Accept-Encoding"
            },
            headerValue: {
              name: " gzip, deflate, br, compress;q=0.9"
            },
            toolTip: "The Accept-Encoding header is added to indicate to the server that LoadTest supports a defined list of content-encoding or compression algorithms as response. \n        You can remove this header or enter a different value. \n            For this to be considered, you need to enable Accept-Encoding header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n        Doing that may not accurately render the response within the app.\n            Note that this setting is applied to all requests of the group.",
            del: false,
            chk: true
          }, {
            headerKey: {
              name: "Accept"
            },
            headerValue: {
              name: "text/plain,application/json,text/html,application/javascript,application/xml"
            },
            toolTip: " Accept header is added to tell the server that LoadTest can understand and process all forms of response content types.\n        It is recommended that this header be sent. But You can remove this header or enter a different value. \n            For this to be considered, you need to enable Accept header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n            Note that this setting is applied to all requests of the group.\n        ",
            del: false,
            chk: true
          }, {
            headerKey: {
              name: "User-Agent"
            },
            headerValue: {
              name: "Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1"
            },
            toolTip: "The User-Agent header is added to help the server identify Mozilla as the HTTP requesting application or client.\n        It is recommended that this header be sent. But you can remove this header or enter a different value. \n            For this to be considered, you need to enable User-Agent header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n            Note that this setting is applied to all requests of the group.\n        ",
            del: false,
            chk: true
          }, {
            headerKey: {
              name: "Connection"
            },
            headerValue: {
              name: "keep-alive"
            },
            toolTip: "LoadTest added the Connection header to indicate the server to keep the underlying network connection open once the current response is received. This allows LoadTest to reuse the same connection for faster response times in subsequent requests to the same server.\n        You can remove this header or enter a new one with a different value, such as 'Connection: Close' to control this behaviour.\n            For this to be considered, you need to enable Accept header in Group Based Settings -> Protocol Settings -> HTTP -> keep-alive section. \n            Note that this setting is applied to all requests of the group.\n        ",
            del: false,
            chk: true
          }, {
            headerKey: {
              name: "Keep-Alive"
            },
            headerValue: {
              name: "300"
            },
            toolTip: "Keep Alive header is added to set a timeout and a maximum amount of requests. It can also be used to allow a single TCP connection to remain open for multiple HTTP requests/responses\n        You can remove this header or enter a different value. \n        For this to be considered, you need to set a custom value in Group Based Settings -> Protocol Settings -> HTTP -> Keep Alive -> \"Keep Alive Timeout\" section\n        Note that this setting is applied to all requests of the group and it is not applicable for HTTP/2",
            del: false,
            chk: true
          }, {
            headerKey: {
              name: ""
            },
            headerValue: {
              name: ""
            },
            del: false,
            chk: false
          }],
          flowArr: [{
            flowName: "Flow_1",
            isFlowTabPanelOpen: false,
            enable: true,
            reqArr: [{
              thinkTime: "-1",
              enable: true,
              assertions: [],
              body: "",
              bodyArr: [],
              bodyType: "text",
              isBodyEditor: true,
              method: "GET",
              reqName: "Request_1",
              searchParameters: [],
              url: "",
              headers: [{
                headerKey: {
                  name: "Content-Length"
                },
                headerValue: {
                  name: "<calculated when request is sent>"
                },
                toolTip: "The Content-Length is added to help the server for HTTP request's size. If Content-Length is specified and it does not match the length of the message-line, the message is either truncated, or padded with nulls to the specified length.\n            Note that this setting is applied to all requests of the group and for GET or DELETE  method type the length will be zero.",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "Host"
                },
                headerValue: {
                  name: "<calculated when request is sent>"
                },
                toolTip: "The Host header is added to identify the domain name for which a request is being sent to the server. This header is implicitly sent with every HTTP request.\n            It is most likely that without this header, your request will return an HTTP 400 error",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "Accept-Encoding"
                },
                headerValue: {
                  name: " gzip, deflate, br, compress;q=0.9"
                },
                toolTip: "The Accept-Encoding header is added to indicate to the server that LoadTest supports a defined list of content-encoding or compression algorithms as response. \n            You can remove this header or enter a different value. \n                For this to be considered, you need to enable Accept-Encoding header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n            Doing that may not accurately render the response within the app.\n                Note that this setting is applied to all requests of the group.",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "Accept"
                },
                headerValue: {
                  name: "text/plain,application/json,text/html,application/javascript,application/xml"
                },
                toolTip: " Accept header is added to tell the server that LoadTest can understand and process all forms of response content types.\n            It is recommended that this header be sent. But You can remove this header or enter a different value. \n                For this to be considered, you need to enable Accept header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n                Note that this setting is applied to all requests of the group.\n            ",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "User-Agent"
                },
                headerValue: {
                  name: "Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1"
                },
                toolTip: "The User-Agent header is added to help the server identify Mozilla as the HTTP requesting application or client.\n            It is recommended that this header be sent. But you can remove this header or enter a different value. \n                For this to be considered, you need to enable User-Agent header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n                Note that this setting is applied to all requests of the group.\n            ",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "Connection"
                },
                headerValue: {
                  name: "keep-alive"
                },
                toolTip: "LoadTest added the Connection header to indicate the server to keep the underlying network connection open once the current response is received. This allows LoadTest to reuse the same connection for faster response times in subsequent requests to the same server.\n            You can remove this header or enter a new one with a different value, such as 'Connection: Close' to control this behaviour.\n                For this to be considered, you need to enable Accept header in Group Based Settings -> Protocol Settings -> HTTP -> keep-alive section. \n                Note that this setting is applied to all requests of the group.\n            ",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "Keep-Alive"
                },
                headerValue: {
                  name: "300"
                },
                toolTip: "Keep Alive header is added to set a timeout and a maximum amount of requests. It can also be used to allow a single TCP connection to remain open for multiple HTTP requests/responses\n            You can remove this header or enter a different value. \n            For this to be considered, you need to set a custom value in Group Based Settings -> Protocol Settings -> HTTP -> Keep Alive -> \"Keep Alive Timeout\" section\n            Note that this setting is applied to all requests of the group and it is not applicable for HTTP/2",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: ""
                },
                headerValue: {
                  name: ""
                },
                del: false,
                chk: false
              }],
              preRequest: {
                inline: ''
              },
              postResponse: {
                inline: ''
              }
            }, {
              thinkTime: "0",
              enable: true,
              assertions: [],
              body: "",
              bodyArr: [],
              bodyType: "text",
              isBodyEditor: true,
              method: "GET",
              reqName: "Request_1",
              searchParameters: [],
              url: "",
              headers: [{
                headerKey: {
                  name: "Content-Length"
                },
                headerValue: {
                  name: "<calculated when request is sent>"
                },
                toolTip: "The Content-Length is added to help the server for HTTP request's size. If Content-Length is specified and it does not match the length of the message-line, the message is either truncated, or padded with nulls to the specified length.\n            Note that this setting is applied to all requests of the group and for GET or DELETE  method type the length will be zero.",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "Host"
                },
                headerValue: {
                  name: "<calculated when request is sent>"
                },
                toolTip: "The Host header is added to identify the domain name for which a request is being sent to the server. This header is implicitly sent with every HTTP request.\n            It is most likely that without this header, your request will return an HTTP 400 error",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "Accept-Encoding"
                },
                headerValue: {
                  name: " gzip, deflate, br, compress;q=0.9"
                },
                toolTip: "The Accept-Encoding header is added to indicate to the server that LoadTest supports a defined list of content-encoding or compression algorithms as response. \n            You can remove this header or enter a different value. \n                For this to be considered, you need to enable Accept-Encoding header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n            Doing that may not accurately render the response within the app.\n                Note that this setting is applied to all requests of the group.",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "Accept"
                },
                headerValue: {
                  name: "text/plain,application/json,text/html,application/javascript,application/xml"
                },
                toolTip: " Accept header is added to tell the server that LoadTest can understand and process all forms of response content types.\n            It is recommended that this header be sent. But You can remove this header or enter a different value. \n                For this to be considered, you need to enable Accept header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n                Note that this setting is applied to all requests of the group.\n            ",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "User-Agent"
                },
                headerValue: {
                  name: "Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1"
                },
                toolTip: "The User-Agent header is added to help the server identify Mozilla as the HTTP requesting application or client.\n            It is recommended that this header be sent. But you can remove this header or enter a different value. \n                For this to be considered, you need to enable User-Agent header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n                Note that this setting is applied to all requests of the group.\n            ",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "Connection"
                },
                headerValue: {
                  name: "keep-alive"
                },
                toolTip: "LoadTest added the Connection header to indicate the server to keep the underlying network connection open once the current response is received. This allows LoadTest to reuse the same connection for faster response times in subsequent requests to the same server.\n            You can remove this header or enter a new one with a different value, such as 'Connection: Close' to control this behaviour.\n                For this to be considered, you need to enable Accept header in Group Based Settings -> Protocol Settings -> HTTP -> keep-alive section. \n                Note that this setting is applied to all requests of the group.\n            ",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: "Keep-Alive"
                },
                headerValue: {
                  name: "300"
                },
                toolTip: "Keep Alive header is added to set a timeout and a maximum amount of requests. It can also be used to allow a single TCP connection to remain open for multiple HTTP requests/responses\n            You can remove this header or enter a different value. \n            For this to be considered, you need to set a custom value in Group Based Settings -> Protocol Settings -> HTTP -> Keep Alive -> \"Keep Alive Timeout\" section\n            Note that this setting is applied to all requests of the group and it is not applicable for HTTP/2",
                del: false,
                chk: true
              }, {
                headerKey: {
                  name: ""
                },
                headerValue: {
                  name: ""
                },
                del: false,
                chk: false
              }]
            }],
            stepsArr: [{
              type: "go",
              label: "Go",
              stepName: "Step_1",
              url: "",
              enable: true,
              thinkTime: 0
            }],
            totalRequest: 1
          }],
          totalFlow: 1,
          schBasicPhaseList: [],
          chkDataDirectory: false,
          runAfterGroup: null,
          arrLstProcededGrp: [],
          totalRequest: 1,
          totalBrowserSteps: 1,
          prescript: "",
          postscript: "",
          genWeightage: 1,
          clusterID: 0,
          genCapacity: 0,
          scriptLanguage: this.scenUtilService.scriptType,
          scriptMode: 'visual',
          runlogicList: [{
            name: 'runlogic',
            isDefault: true,
            system: true
          }]
        }; //TODO: Flow will have 1 element only for now.

        this.groupArray = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"]([this.defaultGroupData]);
        this.selectedTabNum = 1; //0-Group Tab Selected, 1-Request Tab Selected, 2-Think Time Tab Selected, 3-Recorder Tab Selected, 4-Flow Tab.

        this.showDnsProtocolView = false;
        this.selectedTabIndex = {
          groupIndex: 0,
          reqIndex: 0,
          flowIndex: 0,
          browserStepsIndex: 0
        };
        this.showCrossPlatformDialog = false;
        this.showCrossPlatformModeDialog = false;
        this.showCustomizedRecordedTestPrompt = false;
        this.newSwitchModeTestName = "";
        this.crossPlatformApplicationOpt = [];
        this.crossPlatformSelectedApp = '';
        this.crossPlatformSourcePlatform = '';
        this.crossPlatformAppPackage = '';
        this.crossPlatformAppActivity = '';
        this.crossPlatformBundleId = '';
        this.crossPlatformIsUploading = false;
        this.crossPlatformPollingIntervalId = null;
        this.headerArray = [{
          id: 'header1',
          inputValue: ''
        }];
        this.isScenarioEditMode = false;
        this.scenarioName = "";
        this.groupName = "Group_1";
        this.isEditMode = false; //This is used to determine if group, request, think tab etc is in edit mode or add mode.

        this.screenKeywordList = Object.keys(_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["KEYWORD"]);
        this.originalName = ""; // Used for storing orignial name of trns or flow or parameter which is being copied

        this.headersKeySuggestions = [];
        this.headersValueSuggestions = [];
        this.headerEditorData = '// Row are seperated by new lines \n' + '// Keys and values are seperated by colon(:) \n' + '// Add // to any row you want to keep unchecked \n';
        this.editorOptionsHdr = {
          theme: 'vs-light',
          language: 'text',
          renderIndentGuides: false,
          renderLineHighlight: 'none',
          glyphMargin: true,
          lineNumbersMinChars: 0,
          minimap: {
            enabled: false
          },
          fontFamily: 'Inter',
          automaticLayout: true,
          scrollbar: {
            verticalScrollbarSize: 0
          }
        };
        this.resTabList = [{
          name: "Text",
          label: "Tab 0",
          isBodyEditor: true
        }, {
          name: "JSON",
          label: "Tab 1",
          isBodyEditor: true
        }, {
          name: "HTML",
          label: "Tab 2",
          isBodyEditor: true
        }, {
          name: "JS",
          label: "Tab 3",
          isBodyEditor: true
        }, {
          name: "XML",
          label: "Tab 4",
          isBodyEditor: true
        }, {
          name: "form-data",
          label: "Tab 5",
          isBodyEditor: false
        }, {
          name: "x-www-form-urlencoded",
          label: "Tab 6",
          isBodyEditor: false
        }];
        this.bodyKeySuggestions = [];
        this.bodyValueSuggestions = [];
        this.bodyEditorOptions = {
          theme: 'vs-light',
          language: "text",
          renderIndentGuides: false,
          renderLineHighlight: 'none',
          glyphMargin: true,
          lineNumbersMinChars: 0,
          minimap: {
            enabled: false
          },
          fontFamily: 'Inter',
          wordWrap: 'wordWrapColumn',
          wordWrapColumn: 140,
          automaticLayout: true,
          scrollbar: {
            verticalScrollbarSize: 5
          },
          renderValidationDecorations: 'off',
          readOnly: false
        };
        this.editorOptions = {
          theme: 'vs-dark',
          language: 'javascript'
        };
        this.paramTableData = [];
        this.assertionTableData = [];
        this.tableAssertionHead = [];
        this.loading = false;
        this.grpScript = "";
        this.grpType = "API";
        this.selectGrpType = 'design';
        this.showScriptTab = false;
        this.selectedParameter = null;
        this.selectedTextType = ""; //This is used for selected text type i.e. which section is selected for replacing with parameter like header, body, url, etc.

        this.subscriptionObj = {}; //All subscription in this component are in this object which are cleared in ngOnDestroy

        this.isRouterActive = false; //This is used to keep state of whether router-outlet is active which is used in scenario desing. Note: This is only for standard router outlet not named router outlet.

        this.isScenExist = false;
        this.allReqName = undefined;
        this.scriptFlowFileOpt = [];
        this.runLogicOptions = [];
        this.scriptFlowFile = null;
        this.fullscreen = false;
        this.psideBarStyle = {
          'min-width': '40em',
          'height': 'calc(100vh - 40px)',
          'top': '39px'
        };
        this.psideBarToolTip = "Maximize View";
        this.selectedNextThinkTime = "0";
        this.manageInlineReqBtn = false; //This shows manage inline request ui if true

        this.showManageInlineReqDialog = false; //Headers/body of inline request

        this.inlineReqObj = new _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_9__["SchRequestData"]();
        this.addLabel = "Add";
        this.isAddHeaders = false; // This is used mainly for reading and saving inline requests.

        this.currentReqObj = new _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_9__["SchRequestData"]();
        this.openRepeatInlineDialog = false;
        this.repeatInline = 1;
        this.openInlineTxName = false;
        this.additionalSettingLabel = "Add Additional Info";
        this.fetchingBody = false; //This array keeps list of all bodyFiles of those requests which has empty body in it.

        this.bodyFilesToDelete = [];
        this.editorOptionsHdr1 = {
          theme: 'Light',
          language: 'c',
          lineDecorationsWidth: 1,
          foldingStrategy: "auto",
          showFoldingControls: "mouseover",
          renderIndentGuides: false,
          renderLineHighlight: 'line',
          glyphMargin: true,
          lineNumbersMinChars: 0,
          minimap: {
            enabled: false
          },
          fontFamily: 'inherit',
          automaticLayout: true,
          scrollbar: {
            verticalScrollbarSize: 5
          },
          wordWrap: 'off',
          readOnly: false
        };
        this.editorOptionsHdrC = {
          theme: 'Light',
          language: 'c',
          lineDecorationsWidth: 1,
          foldingStrategy: "auto",
          showFoldingControls: "mouseover",
          renderIndentGuides: false,
          renderLineHighlight: 'line',
          glyphMargin: true,
          lineNumbersMinChars: 0,
          minimap: {
            enabled: false
          },
          fontFamily: 'inherit',
          automaticLayout: true,
          scrollbar: {
            verticalScrollbarSize: 5
          },
          wordWrap: 'off',
          readOnly: false
        };
        this.editorOptionsHdrJava = {
          theme: 'Light',
          language: 'java',
          lineDecorationsWidth: 1,
          foldingStrategy: "auto",
          showFoldingControls: "mouseover",
          renderIndentGuides: false,
          renderLineHighlight: 'line',
          glyphMargin: true,
          lineNumbersMinChars: 0,
          minimap: {
            enabled: false
          },
          fontFamily: 'inherit',
          automaticLayout: true,
          scrollbar: {
            verticalScrollbarSize: 5
          },
          wordWrap: 'off',
          readOnly: false
        };
        this.editorOptionsHdrJavaScript = {
          theme: 'Light',
          language: 'javascript',
          lineDecorationsWidth: 1,
          foldingStrategy: "auto",
          showFoldingControls: "mouseover",
          renderIndentGuides: false,
          renderLineHighlight: 'line',
          glyphMargin: true,
          lineNumbersMinChars: 0,
          minimap: {
            enabled: false
          },
          fontFamily: 'inherit',
          automaticLayout: true,
          scrollbar: {
            verticalScrollbarSize: 5
          },
          wordWrap: 'off',
          readOnly: false
        };
        this.showPreScriptTab = false;
        this.showPostScriptTab = false;
        this.showRunlogicPanel = false;
        this.bigSplit = 74;
        this.smallSplit = 26;
        this.isSidebarOpen = true; // collapse/expand feature

        this.isApiPanelActive = true;
        this.isGroupSearchActive = false;
        this.dialogHeader = "";
        this.requestName = "";
        this.updatedScenNameArr = []; //This keeps scenario name when scenario is moved, scen name edit, etc.

        this.isShowScriptDialogOpen = false;
        this.groupWiseScriptType = 'java';
        this.selectScriptType = [];
        this.scriptLanguage = 'c'; //This variable is used for fetching scripts flow content of cavisson type scripts when we click on "Edit Script" in API configuration

        this.maximizeBodyDialogHeader = "";
        this.showScriptModeDialog = false; // hold latest assertion config coming from child

        this.assertionConfig = {
          assertions: []
        };
        /**
         * Cached page names to avoid expensive getter re‑execution on every change
         * detection cycle.  When the group/flow/request indices change we'll
         * recompute the list; otherwise we just return the cached array reference.
         */

        this._pageNamesCache = [];
        this._lastGroupArrayRef = null;
        this._lastSelectedTabIndex = null;
        this.preRequest = false;
        this.preRequestMethod = true;
        this.postRequest = false;
        this.editorCode = "\n  this.selectGrpType = 'design';\n  this.groupArray = that.cloneDeep([this.defaultGroupData]);";
        this.prePostEditor = {
          theme: 'vs',
          language: 'javascript'
        }; // Strategy interface for group type parsing

        this.groupTypeParsers = {
          API: function API(recordedData, defaultGroupData) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this13, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee2() {
              var _this14 = this;

              var _a, _b, _c, result, firstFlow, dummyTH;

              return _regenerator().w(function (_context2) {
                while (1) switch (_context2.n) {
                  case 0:
                    result = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](defaultGroupData);
                    result.protocol = {
                      type: ((_c = (_b = (_a = recordedData === null || recordedData === void 0 ? void 0 : recordedData.scripts) === null || _a === void 0 ? void 0 : _a['Group_1']) === null || _b === void 0 ? void 0 : _b.protocol) === null || _c === void 0 ? void 0 : _c.type) || _home_script_manager_script_recorder_interface_recorder_interface__WEBPACK_IMPORTED_MODULE_37__["RecorderProtocol"].API
                    };
                    firstFlow = result.flowArr[0];
                    firstFlow.reqArr = [];

                    if (recordedData.scripts && recordedData.scripts['Group_1'] && recordedData.scripts['Group_1'].flows && recordedData.scripts['Group_1'].flows['Flow_1'] && Array.isArray(recordedData.scripts['Group_1'].flows['Flow_1'].requests)) {
                      recordedData.scripts['Group_1'].flows['Flow_1'].requests.forEach(function (element) {
                        var _a;

                        var requestData = new _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_9__["SchRequestData"]();
                        requestData.reqName = element.label;
                        requestData.url = element.url;
                        requestData.method = element.method;
                        requestData.headers = _this14.transformHeaders(element.headers);
                        requestData.thinkTime = '-1';
                        requestData.enable = true;

                        if (((_a = result.protocol) === null || _a === void 0 ? void 0 : _a.type) === _home_script_manager_script_recorder_interface_recorder_interface__WEBPACK_IMPORTED_MODULE_37__["RecorderProtocol"].DNS) {
                          _this14.applyDnsDefaults(requestData);
                        }

                        firstFlow.reqArr.push(requestData);
                      });
                      dummyTH = new _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_9__["SchRequestData"]();
                      dummyTH.thinkTime = "0";
                      firstFlow.reqArr.push(dummyTH);
                      result.totalRequest = firstFlow.reqArr.length;
                    }

                    return _context2.a(2, result);
                }
              }, _callee2);
            }));
          },
          BROWSER: function BROWSER(recordedData, defaultGroupData) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this13, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee3() {
              var result, firstFlow;
              return _regenerator().w(function (_context3) {
                while (1) switch (_context3.n) {
                  case 0:
                    // Example: parse browser steps if present
                    result = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](defaultGroupData);
                    result.grpType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER;
                    firstFlow = result.flowArr[0];
                    firstFlow.reqArr = [];
                    firstFlow.stepsArr = [];

                    if (recordedData.scripts && recordedData.scripts['Group_1'] && recordedData.scripts['Group_1'].flows && recordedData.scripts['Group_1'].flows['Flow_1'] && Array.isArray(recordedData.scripts['Group_1'].flows['Flow_1'].steps)) {
                      recordedData.scripts['Group_1'].flows['Flow_1'].steps.forEach(function (element) {
                        var stepData = new _interface_browser_steps_data__WEBPACK_IMPORTED_MODULE_39__["SchBrowserSteps"]();
                        stepData.type = element.type;
                        stepData.label = element.type;
                        stepData.stepName = element.label;
                        stepData.url = element.url;
                        stepData.tagName = element.tagName;
                        stepData.value = element.value; //Locators data

                        stepData.locators = {};

                        if (element.locators) {
                          Object.keys(element.locators).forEach(function (key) {
                            var val = element.locators[key];

                            if (val && val.toString().trim() !== '') {
                              stepData.locators[key] = val;
                            }
                          });
                        } //heroElement data


                        stepData.heroElement = {};

                        if (element.heroElement) {
                          Object.keys(element.heroElement).forEach(function (key) {
                            var heroVal = element.heroElement[key];

                            if (heroVal && heroVal.toString().trim() !== '') {
                              stepData.heroElement[key] = heroVal;
                            }
                          });
                        }

                        firstFlow.stepsArr.push(stepData);
                      });
                      result.totalBrowserSteps = firstFlow.stepsArr.length;
                    }

                    return _context3.a(2, result);
                }
              }, _callee3);
            }));
          },
          RDT_NATIVE: function RDT_NATIVE(recordedData, defaultGroupData) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this13, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee4() {
              var path, tenMBLimit, state, capJson, result, rdtDeviceInfo, firstFlow;
              return _regenerator().w(function (_context4) {
                while (1) switch (_context4.n) {
                  case 0:
                    path = 'webapps/netstorm/temp/' + this.scenUtilService.recordedScriptUUID + '/cap.json';
                    tenMBLimit = 10240;
                    _context4.n = 1;
                    return this.logViewerService.readLogFilesData({
                      fp: path,
                      limit: tenMBLimit
                    }).toPromise();

                  case 1:
                    state = _context4.v;
                    capJson = JSON.parse(state.data.data); // Example: parse browser steps if present

                    result = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](defaultGroupData);
                    result.grpType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE;
                    rdtDeviceInfo = {
                      os: capJson['platformName'],
                      os_version: capJson['appium:os_version'],
                      deviceName: capJson['appium:deviceName'],
                      network: "4G",
                      appId: capJson['appium:app'],
                      env: _interface_scenario_model__WEBPACK_IMPORTED_MODULE_13__["RDTENV"].cloud,
                      browser: "NA",
                      browser_version: "NA",
                      proxyport: 0,
                      profilingEnabled: "off"
                    };
                    result.primaryOS = rdtDeviceInfo.os;
                    result[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE] = [rdtDeviceInfo];
                    firstFlow = result.flowArr[0];
                    firstFlow.reqArr = [];
                    firstFlow.stepsArr = [];

                    if (recordedData.scripts && recordedData.scripts['Group_1'] && recordedData.scripts['Group_1'].flows && recordedData.scripts['Group_1'].flows['Flow_1'] && Array.isArray(recordedData.scripts['Group_1'].flows['Flow_1'].steps)) {
                      recordedData.scripts['Group_1'].flows['Flow_1'].steps.forEach(function (element) {
                        var stepData = new _interface_browser_steps_data__WEBPACK_IMPORTED_MODULE_39__["SchBrowserSteps"]();
                        stepData.type = element.type;
                        stepData.label = element.type;
                        stepData.stepName = element.label;
                        stepData.url = element.url;
                        stepData.tagName = element.tagName;
                        stepData.value = element.value;
                        stepData.assertions = element.assertions; //Locators data

                        stepData.locators = {};

                        if (element.locators) {
                          Object.keys(element.locators).forEach(function (key) {
                            var val = element.locators[key];

                            if (val && val.toString().trim() !== '') {
                              if (key == "classname") stepData.locators["class"] = val;else stepData.locators[key] = val;
                            }
                          });
                        } //heroElement data


                        stepData.heroElement = {};

                        if (element.heroElement) {
                          Object.keys(element.heroElement).forEach(function (key) {
                            var heroVal = element.heroElement[key];

                            if (heroVal && heroVal.toString().trim() !== '') {
                              stepData.heroElement[key] = heroVal;
                            }
                          });
                        } //swipe coordinates


                        stepData.coordinates = {};

                        if (element.coordinates && element.coordinates.length > 0) {
                          stepData.coordinates = element.coordinates[0];
                        } else {
                          stepData.coordinates = {};
                        }

                        firstFlow.stepsArr.push(stepData);
                      });
                      result.totalBrowserSteps = firstFlow.stepsArr.length;
                    }

                    return _context4.a(2, result);
                }
              }, _callee4, this);
            }));
          } // Add more group type parsers here as needed

        };
        this.isImportSideBar = false;
        /**This method is used to calculate number of users from the percentage when Update CumNumUser in Percentage Mode */

        this.globalTotalUsers = 0;
        this.helpMetaData = {
          "file": {
            title: "Dataset Using File",
            help: "datasetUsingFile"
          },
          "search": {
            title: "Search Parameter",
            help: "searchParameter"
          },
          "declare": {
            title: "Scratch Parameter",
            help: "scratchParameter"
          },
          "xml": {
            title: "XML Parameter",
            help: "xmlParameter"
          },
          "index_file": {
            title: "Index Dataset Using File",
            help: "indexDataset"
          },
          "dateTime": {
            title: "Date Time Parameter",
            help: "dateTimeParameter"
          },
          "random_string": {
            title: "Random String Parameter",
            help: "randomStringParameter"
          },
          "random_number": {
            title: "Random Number Parameter",
            help: "randomNumberParameter"
          },
          "unique_number": {
            title: "Unique Number Parameter",
            help: "uniqueNumberParameter"
          },
          "declare_array": {
            title: "Scratch Array Parameter",
            help: "scratchArrayParameter"
          },
          "json": {
            title: "JSON Parameter",
            help: "jsonParameter"
          },
          "unique_range": {
            title: "Unique Range Parameter",
            help: "uniqueRangeParameter"
          },
          "sql": {
            title: "Dataset Using Query",
            help: "datasetUsingQueryParameter"
          },
          "addCheckpoint": {
            title: "Assertion",
            help: "assertion"
          },
          "startTx": {
            title: "Start Transaction",
            help: "startTransaction"
          },
          "endTx": {
            title: "End Transaction",
            help: "endTransaction"
          },
          "startEndTx": {
            title: "Start End Transaction",
            help: "startEndTransaction"
          }
        };
        this.schReadScenario = new _commons_sch_read_scenario__WEBPACK_IMPORTED_MODULE_14__["SchReadScenario"](this.scenScheduleData, this.router, this.scenUtilService);
        this.schSaveScenario = new _commons_sch_save_scenario__WEBPACK_IMPORTED_MODULE_15__["SchSaveScenario"](scenUtilService, saveAndReadService, testModeService, browserStepService);
        this.schUtility = new _commons_sch_utility__WEBPACK_IMPORTED_MODULE_17__["SchUtility"](this.scenUtilService);
        this.scheduleGraph = new _interface_scen_schedule_graph_data__WEBPACK_IMPORTED_MODULE_19__["ScheduleGraph"](scenScheduleData, scenUtilService);
        this.isScenarioEditMode = this.scenUtilService.isEditMode;
        if (this.isScenarioEditMode) this.scenarioName = this.scenUtilService.scenarioName;
        this.scenUtilService.parameterOption = [{
          label: 'Select parameter',
          value: null,
          paramType: null
        }];
        /**Subscription for parameter add/update. */

        this.subscriptionObj['scenParamSubscription'] = this.scenUtilService.$scenParamObjObs.subscribe(function (res) {
          if (res['obj']) {
            if (_this13.scenUtilService.validateParameters(res)) {
              if (res['mode'] == 'edit') {
                _this13.updateParameter(res); //Need to update parameter name in case of edit, because error comes on updating same parameter again.


                _this13.scenUtilService.editParamName = res['obj'][_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName];
                return;
              } else {
                _this13.addParameters(res);

                _this13.paramTableData.push(_this13.scriptParameterService.getParamTableRow(res));
              }
            }
          } else if (res['message']) {
            if (res['message']['severity'] == "error") _this13.scenUtilService.errorMessage(res['message']['detail']);
            if (res['message']['severity'] == "success") _this13.scenUtilService.successMessage(res['message']['detail']);
          } //Need to reset editParamName so that there is no issue in add


          _this13.scenUtilService.editParamName = "";
        });
        /**Subscription for assertion add/update */

        this.subscriptionObj['scenCheckpointSubscription'] = this.scenUtilService.$scenCheckpointObjObs.subscribe(function (res) {
          if (res['obj']) {
            if (res['mode'] == 'edit') {
              _this13.updateAssertion(res['obj']);
            } else {
              _this13.addAssertions(res['obj']);

              _this13.assertionTableData.push(_this13.scriptParameterService.getAssertionTableRow(res['obj']));
            }
          } else if (res['message']) {
            if (res['message']['severity'] == "error") _this13.scenUtilService.errorMessage(res['message']['detail']);
          }
        });
        /**Subscription for reseting scenario. */

        var that = lodash__WEBPACK_IMPORTED_MODULE_21__;
        this.subscriptionObj['resetSubscription'] = this.scenUtilService.resetDataToScenDesign$.subscribe(function (scenNameToReset) {
          _this13.scenScheduleData.groupDataList = [];
          _this13.selectedTabIndex = {
            groupIndex: 0,
            reqIndex: 0,
            flowIndex: 0,
            browserStepsIndex: 0
          };
          _this13.selectGrpType = 'design';
          _this13.groupArray = that.cloneDeep([_this13.defaultGroupData]);
          _this13.isScenarioEditMode = _this13.scenUtilService.isEditMode;

          _this13.scenKeywordDefinitionService.resetService(true, scenNameToReset);

          _this13.scenScheduleData.basicScenData.phaseList = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](_this13.schUtility.createdefaultPhaseList(_this13.defaultGroupData));

          _this13.getAndSetKeywordData();
        }); //When we update or revert in version commit or git following subscription reloads the scenario.

        this.subscriptionObj['versionLogUpdateSubs'] = this.scenUtilService.versionLogUpdate$.subscribe(function (res) {
          _this13.scenUtilService.resetData$.next();

          _this13.selectedTabIndex = {
            groupIndex: 0,
            reqIndex: 0,
            flowIndex: 0,
            browserStepsIndex: 0
          };
          _this13.groupArray = that.cloneDeep([_this13.defaultGroupData]);

          _this13.getAndSetKeywordData();
        });
        this.subscriptionObj['buildVerion'] = this.userOptionsService.loadBuildVersion().subscribe(function (data) {
          _this13.buildVersionData = data;

          _this13.createPrePostScript(false, _this13.buildVersionData, _this13.groupArray[_this13.selectedTabIndex.groupIndex].scriptLanguage);
        });
      }
      /**
       * Computed page name depending on configuration type (API vs Browser).
       * Used by both inline assertions and when delegating to browser-interaction.
       */


      return _createClass(ScenarioDesignComponent, [{
        key: "currentPageName",
        get: function get() {
          var _a, _b, _c, _d;

          if (!this.groupArray || !this.selectedTabIndex) return '';
          var grp = this.groupArray[this.selectedTabIndex.groupIndex];
          if (!grp) return '';
          var flow = grp.flowArr && grp.flowArr[this.selectedTabIndex.flowIndex];
          if (!flow) return '';

          if (grp.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API) {
            return ((_b = (_a = flow.reqArr) === null || _a === void 0 ? void 0 : _a[this.selectedTabIndex.reqIndex]) === null || _b === void 0 ? void 0 : _b.reqName) || '';
          } else if (grp.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER) {
            // browser flows use stepsArr not stepArr
            return ((_d = (_c = flow.stepsArr) === null || _c === void 0 ? void 0 : _c[this.selectedTabIndex.reqIndex]) === null || _d === void 0 ? void 0 : _d.stepName) || '';
          }

          return '';
        }
      }, {
        key: "pageNames",
        get: function get() {
          // fast path: same inputs as last time
          if (this.groupArray === this._lastGroupArrayRef && this.selectedTabIndex === this._lastSelectedTabIndex) {
            return this._pageNamesCache;
          }

          this._lastGroupArrayRef = this.groupArray;
          this._lastSelectedTabIndex = this.selectedTabIndex;
          this._pageNamesCache = [];

          if (!this.groupArray || !this.selectedTabIndex) {
            return this._pageNamesCache;
          }

          var grp = this.groupArray[this.selectedTabIndex.groupIndex];

          if (!grp) {
            return this._pageNamesCache;
          }

          var flow = grp.flowArr && grp.flowArr[this.selectedTabIndex.flowIndex];

          if (!flow) {
            return this._pageNamesCache;
          }

          if (grp.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API) {
            this._pageNamesCache = (flow.reqArr || []).map(function (r) {
              return r.reqName;
            }).filter(function (n) {
              return !!n;
            });
          } else if (grp.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER) {
            this._pageNamesCache = (flow.stepsArr || []).map(function (s) {
              return s.stepName;
            }).filter(function (n) {
              return !!n;
            });
          }

          return this._pageNamesCache;
        }
      }, {
        key: "ngOnInit",
        value: function ngOnInit() {
          var _this15 = this;

          this.testMode = this.testModeService.currentMode;
          this.inlineReqTableHead = [{
            field: 'method',
            header: 'Method'
          }, {
            field: 'url',
            header: 'URL'
          }];
          this.tmpGrpTableHeaders = this.inlineReqTableHead.slice();
          this.tableParaHead = [{
            field: 'name',
            header: 'Name'
          }, {
            field: 'type',
            header: 'Type'
          }, {
            field: 'specification',
            header: 'Specification'
          }];
          this.relativeParaHead = "scenario/parameter_list/parameter_list.json";
          this.tableAssertionHead = [{
            field: 'page',
            header: 'Page(s)'
          }, {
            field: 'criteria',
            header: 'Criteria'
          }, {
            field: 'criteriaValue',
            header: 'Check criteria value'
          }, {
            field: 'messageOnFailure',
            header: 'Message on Failure'
          }];
          this.relativetableAssertionHead = "scenario/assertion_list/assertion_list.json";
          this.scenTypeOptionsAd = [{
            label: "Fixed session rate",
            value: _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCENARIO_TYPE"].FSR
          }, {
            label: "Fixed concurrent users",
            value: _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCENARIO_TYPE"].FCU
          }];
          this.fileTypeOpt = [{
            label: "Flow",
            value: 'flow'
          }, {
            label: "Runlogic",
            value: 'runlogic'
          }];
          this.showColumnsOptions = [{
            header: "Transaction Name",
            field: 'reqName'
          }, {
            header: "Repeat Inline",
            field: 'repeatInline'
          }];
          this.selectScriptType = [{
            label: "C",
            value: 'c'
          }, {
            label: "Java",
            value: 'java'
          }, {
            label: "JS",
            value: 'js'
          }];
          this.fillDropDownData(); //Following check is for when user imports group while creating new scenario.

          if (Object.keys(this.scenUtilService.ImportScriptData).length != 0 && this.scenUtilService.isImportFromNewScen && !this.isScenarioEditMode) {
            this.groupArray = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"]([this.scenUtilService.ImportScriptData]);

            if (this.groupArray[0].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].CAVISSON) {
              this.selectedTabIndex.reqIndex = -1;
              this.selectedTabIndex.flowIndex = -1;
              this.selectedTabIndex.flowIndex = 0;
              this.selectedTabIndex.browserStepsIndex = -1;
              this.selectedTabNum = 0;
            }

            this.scenUtilService.ImportScriptData = new _interface_sch_group_data__WEBPACK_IMPORTED_MODULE_7__["SchGroupData"]();
            this.scenUtilService.isImportFromNewScen = false;
            this.showSelectedTab(this.groupArray[0], 0, 0, -1, -1, -1);
          } else if (this.browserStepService.groupTypeForScenario === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER || this.browserStepService.groupTypeForScenario === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) // true 
            {
              if (this.browserStepService.groupTypeForScenario === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER) this.groupArray[this.selectedTabIndex.groupIndex].grpType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER;else if (this.browserStepService.groupTypeForScenario === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) this.groupArray[this.selectedTabIndex.groupIndex].grpType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE;
              var browserStepData = new _interface_browser_steps_data__WEBPACK_IMPORTED_MODULE_39__["SchBrowserSteps"]();
              browserStepData.type = "go";
              browserStepData.label = "Go";
              browserStepData.stepName = "Step_1";
              browserStepData.url = "";
              browserStepData.assertions = [];
              this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].stepsArr[this.selectedTabIndex.browserStepsIndex] = browserStepData;
              this.showSelectedTab(browserStepData, 5, 0, -1, 0, 0); //this.browserStepService.groupTypeForScenario = SCENARIO.GROUP_TYPE.API;

              if (this.scenUtilService.recordedScriptUUID != null) this.importAndOpenRecordedScript(); // this.readAndParseRecordedScript();
              //Need to enable RBU for browser in functional

              if (this.testMode === _service_test_mode_service__WEBPACK_IMPORTED_MODULE_35__["TEST_MODE"].FUNCTIONAL) {
                this.enableRBUForBrowserType();
              }

              this.browserStepService.groupTypeForScenario = null;
              this.setTypeSpecificKeyword(this.groupArray[this.selectedTabIndex.groupIndex].grpType);
            } else if (this.browserStepService.groupTypeForScenario === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API) {
            this.groupArray[this.selectedTabIndex.groupIndex].grpType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API;

            if (this.browserStepService.selectedProtocolForScenario != null && this.browserStepService.selectedProtocolForScenario != '' && this.browserStepService.selectedProtocolForScenario != _home_script_manager_script_recorder_interface_recorder_interface__WEBPACK_IMPORTED_MODULE_37__["RecorderProtocol"].API) {
              this.groupArray[this.selectedTabIndex.groupIndex].protocol = {
                type: this.browserStepService.selectedProtocolForScenario
              };
              var reqData = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex];
              this.applyDnsDefaults(reqData);
              this.showSelectedTab(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[0].reqArr[0], 1, 0, 0, 0, -1);
              this.browserStepService.groupTypeForScenario = null;
              this.browserStepService.selectedProtocolForScenario = '';
              this.setTypeSpecificKeyword(this.groupArray[this.selectedTabIndex.groupIndex].grpType);
            }
          } else if (this.scenUtilService.recordedScriptUUID != null) {
            // this.readAndParseRecordedScript();
            this.importAndOpenRecordedScript();
          } else if (this.scenUtilService.sharedGroupData != null) {
            this.importVisualModeGroups(this.scenUtilService.sharedGroupData);
            this.scenUtilService.sharedGroupData = null;
          }
          /**
           * This call get and set scenario data from server.
           */


          this.getAndSetKeywordData();
          this.scenUtilService.setSelectedComponent(this.classname); // It will trigger when user click on save button.

          this.subscriptionObj['subscription'] = this.scenUtilService.triggerSaveEventGlobally.subscribe(function (data) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this15, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee5() {
              var skipSave;
              return _regenerator().w(function (_context5) {
                while (1) switch (_context5.n) {
                  case 0:
                    if (!(this.sessionService.session.cctx.u == 'guest')) {
                      _context5.n = 1;
                      break;
                    }

                    this.scenUtilService.errorMessage("Guest user doesn't have workspace to save scenario.");
                    return _context5.a(2);

                  case 1:
                    this.saveAndReadService.groupIndex = this.selectedTabIndex.groupIndex;
                    /**
                     * data consists of selected component, and saveType -> whetehr it be debugging or running or just saving scenario.
                     * Will be using type later ~TODO
                     */
                    //Adding request or group data whenever user switches from on request/group/flow to another.
                    //Usecase: When user is editing some particular request or group and decides to save it without switching to any other flow.

                    if (!(this.scenUtilService.ScenMode == 0)) {
                      _context5.n = 10;
                      break;
                    }

                    this.grpTypeAPI();

                    if (!this.setKeywordData()) {
                      _context5.n = 9;
                      break;
                    }

                    /***
                     * storeTmpNumUser is called to decide whether to keep NUM_USER value or remove it .
                     */
                    this.schUtility.storeTmpNumUser(this.scenScheduleData, this.arrKeywordData);
                    skipSave = false;

                    if (!this.scenUtilService.openRALScen) {
                      _context5.n = 3;
                      break;
                    }

                    this.scenUtilService.savRALData();
                    _context5.n = 2;
                    return this.scenUtilService.isRALValidatedPromise().then(function (res) {
                      if (!res) {
                        skipSave = true;
                      }

                      skipSave = false;
                    });

                  case 2:
                    this.scenUtilService.isRALValidated = -1;

                  case 3:
                    if (skipSave) {
                      _context5.n = 9;
                      break;
                    }

                    if (this.isScenarioEditMode) {
                      _context5.n = 7;
                      break;
                    }

                    _context5.n = 4;
                    return this.isScenAlreadyExists("".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.subProject, "/").concat(this.scenUtilService.scenarioName));

                  case 4:
                    if (!this.isScenExist) {
                      _context5.n = 5;
                      break;
                    }

                    this.scenScheduleData.loadingScen = false;
                    return _context5.a(2);

                  case 5:
                    _context5.n = 6;
                    return this.createNewFolder();

                  case 6:
                    this.isScenarioEditMode = this.scenUtilService.isEditMode = true;

                  case 7:
                    this.clearFSRKeyword();
                    _context5.n = 8;
                    return this.saveAndReadService.convertGroupArrayToJSON(this.groupArray);

                  case 8:
                    this.scenUtilService.scenJson = _context5.v;
                    this.scenKeywordDefinitionService.setAndSaveDataJson(data['testRunObj'], data['testMode']);

                  case 9:
                    _context5.n = 11;
                    break;

                  case 10:
                    if (this.setKeywordData()) {
                      this.clearFSRKeyword();
                      this.scenKeywordDefinitionService.setAndSaveDataJson(data['testRunObj'], data['testMode']);
                    }

                  case 11:
                    if (this.bodyFilesToDelete.length > 0) this.scenarioHttpService.deleteBodyFiles(this.bodyFilesToDelete, "".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.subProject, "/").concat(this.scenUtilService.scenarioName), this.sessionService.session.cctx.u).subscribe(function (state) {
                      if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["ScenarioRestLoadedState"]) {//do nothing
                      }
                    });
                    this.bodyFilesToDelete = [];

                  case 12:
                    return _context5.a(2);
                }
              }, _callee5, this);
            }));
          });
          this.loadTestUtils.getPermissions().then(function (res) {
            _this15.privilege = JSON.parse(res);

            _this15.getNethavocScenarioDetails();
          });
          /**This subscription is for import group from inside scenario. */

          this.subscriptionObj['subscribeImportScen'] = this.scenUtilService.commonObservable$.subscribe(function (data) {
            if (data.whichType == "import") {
              _this15.updateGroupAndPhaseData("add", data.groupData, null, null, true);

              _this15.onSettingHide("import");

              _this15.scenUtilService.successMessage("".concat(data.groupData.grpName, " imported successfully."));

              _this15.isSelectGrpData(data.groupData);
            } else {
              _this15.isScenarioEditMode = true;

              if (Object.keys(_this15.scenUtilService.scenJson).length > 0) {
                _this15.parseScenarioJsonDataWrapper(_this15.scenUtilService.scenJson);
              } else _this15.getScenarioJsonData();
            }
          });
          /**This subscription is used to update script name when scenario name is updated.*/

          this.subscriptionObj['updateGrpNameSubs'] = this.scenUtilService.updateGrpname$.subscribe(function (scenName) {
            _this15.updatedScenNameArr = scenName.split("####");

            for (var i in _this15.scenScheduleData.groupDataList) {
              if (_this15.scenScheduleData.groupDataList[i].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API) {
                //Updating script name
                _this15.scenScheduleData.groupDataList[i].scriptName = _this15.updatedScenNameArr[0] + "_" + _this15.scenScheduleData.groupDataList[i].grpName;
              }
            }

            _this15.replacePackageName();
          });
          /**Subscription for overriding data directory in all group when global data directory is selected. */

          this.subscriptionObj['overrideDataDir'] = this.scenUtilService.overrideDataDir.subscribe(function (data) {
            for (var i in _this15.scenScheduleData.groupDataList) {
              _this15.scenScheduleData.groupDataList[i].dataDirectory = data['globalDD'];
            }
          });
          /**Generic Subscription */

          this.subscriptionObj['genericSub'] = this.scenUtilService.genericSub$.subscribe(function (object) {
            switch (object['type']) {
              case "deleteGrp":
                _this15.deleteGrpLoadConfig();

                break;

              default:
                break;
            }
          });
          this.scenUtilService.scriptName = this.groupArray[this.selectedTabIndex.groupIndex].scriptName.split("/")[2];
          this.groupWiseScriptType = this.scenUtilService.scriptType;
          /*save scenario rest call completed*/

          this.subscriptionObj['notifyAfterSave'] = this.scenUtilService.$notifySaveScenCompleted.subscribe(function (data) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this15, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee6() {
              return _regenerator().w(function (_context6) {
                while (1) switch (_context6.n) {
                  case 0:
                    this.handleScenarioSaveCompleteEvt(data);

                  case 1:
                    return _context6.a(2);
                }
              }, _callee6, this);
            }));
          });
          this.initTargetSwitchModeGroupType();
        }
        /**
         * Updates the md5FromServer values for imported groups and flows after a successful save.
         *
         * This method synchronizes the local groupData/flowData md5FromServer values with the
         * server-returned md5sum values from shareTestInfoList. This prevents false positive
         * "changes detected" warnings on subsequent saves when no actual modifications have been made.
         *
         * The method handles two types of imported items:
         * - IMPORT_SCRIPT: Updates groups by matching their refId with shareTestInfo.refID
         * - IMPORT_FLOW: Updates flows by matching their refId with shareTestInfo.refID
         *
         * Flow:
         * 1. Validates that shareTestInfoList exists and contains entries
         * 2. Iterates through each shared test info item returned from server
         * 3. For IMPORT_SCRIPT type: finds the matching group and updates its md5FromServer
         * 4. For IMPORT_FLOW type: searches all groups to find and update the matching flow's md5FromServer
         *
         * @returns void
         */

      }, {
        key: "updateMd5FromServerAfterSave",
        value: function updateMd5FromServerAfterSave() {
          var _this16 = this;

          // Check if shareTestInfoList exists and has entries
          if (!this.scenUtilService.shareTestInfoList || this.scenUtilService.shareTestInfoList.length === 0) {
            return;
          } // Iterate through each shared test info item returned from server


          this.scenUtilService.shareTestInfoList.forEach(function (shareTestInfo) {
            // Only process if md5sum was returned from server
            if (!shareTestInfo.md5sum) {
              return;
            } // Handle imported groups (IMPORT_SCRIPT type)


            if (shareTestInfo.type === _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_41__["BROWSE_TEST_MODE"].IMPORT_SCRIPT) {
              // Find the group by matching its refId with the shareTestInfo refID
              var group = _this16.groupArray.find(function (grp) {
                return grp.refId === shareTestInfo.refID;
              }); // Update the group's md5FromServer with the server's new md5sum


              if (group) {
                group.md5FromServer = shareTestInfo.md5sum;
              }
            } // Handle imported flows (IMPORT_FLOW type)
            else if (shareTestInfo.type === _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_41__["BROWSE_TEST_MODE"].IMPORT_FLOW) {
              // Search through all groups to find the flow by matching its refId
              var _iterator2 = _createForOfIteratorHelper(_this16.groupArray),
                  _step2;

              try {
                for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
                  var _group = _step2.value;

                  // Check if group has flows array and find the matching flow
                  var flow = _group.flowArr && _group.flowArr.find(function (f) {
                    return f.refId === shareTestInfo.refID;
                  });

                  if (flow) {
                    // Update the flow's md5FromServer with the server's new md5sum
                    flow.md5FromServer = shareTestInfo.md5sum; // Exit loop once flow is found and updated

                    break;
                  }
                }
              } catch (err) {
                _iterator2.e(err);
              } finally {
                _iterator2.f();
              }
            }
          });
        }
        /**
         * Handles the scenario save completion event.
         *
         * This method is triggered when a scenario save operation completes (either successfully or with error).
         * On successful save, it:
         * 1. Updates md5FromServer values for imported groups/flows to sync with server values
         * 2. Syncs the script mode UI state (visual or code mode)
         * 3. Handles navigation based on current script mode
         *
         * @param data - Response data from the save operation containing status and other metadata
         * @returns void
         */

      }, {
        key: "handleScenarioSaveCompleteEvt",
        value: function handleScenarioSaveCompleteEvt(data) {
          if (data['status'] == 'pass') {
            if (this.showCustomizedRecordedTestPrompt) {
              // Optionally, close the prompt dialog
              this.showCustomizedRecordedTestPrompt = false;
              var prevName = "".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.Project, "/").concat(this.previosScenName);
              this.scenUtilService.sendResetDataToScenDesign(prevName);
              this.scenUtilService.updateNewScenNameInLeftPanel(this.scenUtilService.scenarioName); // Optionally, show a message or trigger UI update

              this.scenUtilService.successMessage('New test created and opened successfully.');
              return;
            } // Update md5FromServer values for imported groups/flows to sync with server values.
            // This prevents false positive "changes detected" warnings on next save.


            this.updateMd5FromServerAfterSave();
            var currentScriptMode = this.groupArray[this.selectedTabIndex.groupIndex].scriptMode; // Sync the ngModel-bound property after save completes

            this.scriptMode = currentScriptMode;

            if (currentScriptMode == 'code') {
              // Mode switch to code: open code editor
              this.openCodeEditor();
            } else if (currentScriptMode == 'visual') {
              // Mode switch to visual: clear the script outlet
              var grpType = this.groupArray[this.selectedTabIndex.groupIndex].grpType; // Properly clear the script outlet by nullifying it

              this.showScriptTab = false;
              this.router.navigate([{
                outlets: {
                  script: null
                }
              }]);
            }
          }
        }
      }, {
        key: "openCodeEditor",
        value: function openCodeEditor(isAgain) {
          this.showScriptTab = true;
          this.selectGrpType = 'script';
          var scriptName = null;
          var projectSubProject = this.scenUtilService.Project + "/" + this.scenUtilService.subProject;

          if (this.groupArray[this.selectedTabIndex.groupIndex].grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].CAVISSON) {
            var testAsset = this.groupArray[this.selectedTabIndex.groupIndex].scriptName.split("/");

            if (testAsset.length >= 3) {
              projectSubProject = testAsset[0] + "/" + testAsset[1];
              scriptName = testAsset[2];
            }
          } else scriptName = this.scenUtilService.scenarioName + "_" + this.selectedGroupData.grpName;

          this.utilservice.sendEditScriptObj(projectSubProject, scriptName, 'Edit', false, 0, 0, true); // Only navigate to activate the script outlet if it's not already active
          // Check if we're not already showing the script tab to avoid "already activated outlet" error

          if (!this.router.url.includes('script-editor')) {
            this.scenUtilService.activatedUrlMap.pop();
          }

          this.router.navigate(['/scenario/basicScenario/design/scenDesign', {
            outlets: {
              script: ['script-editor']
            }
          }], {
            queryParams: {
              menu: false
            }
          });
        }
      }, {
        key: "isSelectedGroupTypeVisual",
        value: function isSelectedGroupTypeVisual() {
          // let groupType = this.groupArray[this.selectedTabIndex.groupIndex].grpType;
          // return groupType == SCENARIO.GROUP_TYPE.API || groupType == SCENARIO.GROUP_TYPE.BROWSER
          return this.isModeSupported('visual');
        }
      }, {
        key: "isSelectedGroupTypeCode",
        value: function isSelectedGroupTypeCode() {
          return this.isModeSupported('code');
        }
      }, {
        key: "updateDnsProtocolViewState",
        value: function updateDnsProtocolViewState() {
          var _a, _b, _c;

          var selectedGroup = (_a = this.groupArray) === null || _a === void 0 ? void 0 : _a[(_b = this.selectedTabIndex) === null || _b === void 0 ? void 0 : _b.groupIndex];
          this.showDnsProtocolView = !!(this.selectedTabNum === 1 && selectedGroup && selectedGroup.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API && ((_c = selectedGroup.protocol) === null || _c === void 0 ? void 0 : _c.type) === _home_script_manager_script_recorder_interface_recorder_interface__WEBPACK_IMPORTED_MODULE_37__["RecorderProtocol"].DNS);
        }
      }, {
        key: "isDnsApiGroup",
        value: function isDnsApiGroup() {
          var groupIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectedTabIndex.groupIndex;

          var _a, _b;

          var group = (_a = this.groupArray) === null || _a === void 0 ? void 0 : _a[groupIndex];
          return !!(group && group.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API && ((_b = group.protocol) === null || _b === void 0 ? void 0 : _b.type) === _home_script_manager_script_recorder_interface_recorder_interface__WEBPACK_IMPORTED_MODULE_37__["RecorderProtocol"].DNS);
        }
      }, {
        key: "applyDnsDefaults",
        value: function applyDnsDefaults(requestData) {
          if (!requestData) {
            return;
          }

          var dns = {
            dnsServer: "",
            domain: "",
            recursive: 1,
            protocol: "TCP",
            type: "A"
          };
          requestData.dns = dns;
        }
      }, {
        key: "importAndOpenRecordedScript",
        value: function importAndOpenRecordedScript() {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee7() {
            var payload, response;
            return _regenerator().w(function (_context7) {
              while (1) switch (_context7.n) {
                case 0:
                  this.scenScheduleData.loadingScen = true;
                  payload = {
                    recording_uuid: this.scenUtilService.recordedScriptUUID,
                    'project/subproject': "".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.subProject),
                    testName: this.scenUtilService.scenarioName,
                    userName: this.sessionService.session.cctx.u,
                    type: this.testMode
                  };
                  _context7.n = 1;
                  return this.scenarioHttpService.saveTest(payload).toPromise();

                case 1:
                  response = _context7.v;

                  //TODO: check response for updated Test name if changed by saveTest and open that scenario
                  if (response.data.status === "pass") {
                    this.scenScheduleData.loadingScen = true;
                    this.getScenarioJsonData();
                    this.isScenarioEditMode = this.scenUtilService.isEditMode = true;
                  } else {
                    this.scenUtilService.errorMessage("Failed to Load recorded script." + response.data.msg);
                    this.scenScheduleData.loadingScen = false;
                  }

                  this.scenUtilService.recordedScriptUUID = null;

                case 2:
                  return _context7.a(2);
              }
            }, _callee7, this);
          }));
        }
      }, {
        key: "readAndParseRecordedScript",
        value: function readAndParseRecordedScript() {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee8() {
            var path, tenMBLimit, state, recordedData, groupType, parser, result, _t2;

            return _regenerator().w(function (_context8) {
              while (1) switch (_context8.p = _context8.n) {
                case 0:
                  this.scenScheduleData.loadingScen = true;
                  _context8.p = 1;
                  path = 'webapps/netstorm/temp/' + this.scenUtilService.recordedScriptUUID + '/nocodescript.json';
                  tenMBLimit = 10240;
                  _context8.n = 2;
                  return this.logViewerService.readLogFilesData({
                    fp: path,
                    limit: tenMBLimit
                  }).toPromise();

                case 2:
                  state = _context8.v;
                  recordedData = JSON.parse(state.data.data); // Determine group type (default to API if not found)

                  groupType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API;

                  if (recordedData.scripts && recordedData.scripts['Group_1'] && recordedData.scripts['Group_1'].type) {
                    groupType = recordedData.scripts['Group_1'].type;
                  } // Use parser based on group type


                  parser = this.groupTypeParsers[groupType] || this.groupTypeParsers['API'];
                  _context8.n = 3;
                  return parser(recordedData, this.defaultGroupData);

                case 3:
                  result = _context8.v;
                  this.groupArray = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"]([result]);
                  this.showSelectedTab(this.groupArray[0], 0, 0, -1, -1, -1);
                  this.scenUtilService.recordedScriptUUID = null;
                  this.setTypeSpecificKeyword(result.grpType);
                  _context8.n = 5;
                  break;

                case 4:
                  _context8.p = 4;
                  _t2 = _context8.v;
                  this.scenUtilService.errorMessage('Failed to parse recorded script.');
                  console.error(_t2);

                case 5:
                  _context8.p = 5;
                  this.scenScheduleData.loadingScen = false;
                  return _context8.f(5);

                case 6:
                  return _context8.a(2);
              }
            }, _callee8, this, [[1, 4, 5, 6]]);
          }));
        }
      }, {
        key: "transformHeaders",
        value: function transformHeaders(headers) {
          return Object.entries(headers).map(function (_ref) {
            var _ref2 = _slicedToArray(_ref, 2),
                key = _ref2[0],
                value = _ref2[1];

            return {
              headerKey: {
                name: key
              },
              headerValue: {
                name: value
              },
              del: true,
              chk: true
            };
          });
        }
      }, {
        key: "clickButtonEvent",
        value: function clickButtonEvent(event) {
          var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;

          var me = this;
          console.log('Event: ', event);

          if (((_b = (_a = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _a === void 0 ? void 0 : _a.actionConfig) === null || _b === void 0 ? void 0 : _b.action) === "editPara") {
            me.editParameter((_c = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _c === void 0 ? void 0 : _c.row);
          }

          if (((_e = (_d = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _d === void 0 ? void 0 : _d.actionConfig) === null || _e === void 0 ? void 0 : _e.action) === "deletePara") {
            me.deleteParameter((_g = (_f = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _f === void 0 ? void 0 : _f.row) === null || _g === void 0 ? void 0 : _g.name, (_j = (_h = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _h === void 0 ? void 0 : _h.row) === null || _j === void 0 ? void 0 : _j.type, (_k = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _k === void 0 ? void 0 : _k.rowIndex);
          }

          if (((_m = (_l = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _l === void 0 ? void 0 : _l.actionConfig) === null || _m === void 0 ? void 0 : _m.action) === "editAssert") {
            me.editAssertion((_o = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _o === void 0 ? void 0 : _o.row);
          }

          if (((_q = (_p = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _p === void 0 ? void 0 : _p.actionConfig) === null || _q === void 0 ? void 0 : _q.action) === "deleteAssert") {
            me.deleteAssertion((_s = (_r = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _r === void 0 ? void 0 : _r.row) === null || _s === void 0 ? void 0 : _s.criteriaValue);
          }

          if (((_u = (_t = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _t === void 0 ? void 0 : _t.actionConfig) === null || _u === void 0 ? void 0 : _u.action) === "deleteParams") {
            this.selectedParameters = (_v = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _v === void 0 ? void 0 : _v.rowData.map(function (obj) {
              return Object.assign({}, obj);
            });
            ;
            me.deleteParameters();
          }

          if (((_x = (_w = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _w === void 0 ? void 0 : _w.actionConfig) === null || _x === void 0 ? void 0 : _x.action) === "deleteAssertions") {
            this.selectedAssertions = (_y = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _y === void 0 ? void 0 : _y.rowData.map(function (obj) {
              return Object.assign({}, obj);
            });
            ;
            me.deleteAssertions();
          }
        }
        /**
         * This is used to replace package name in pre/post java type script.
         */

      }, {
        key: "replacePackageName",
        value: function replacePackageName() {
          if (this.updatedScenNameArr.length == 0) return;
          var newScenName = this.updatedScenNameArr[0].split("/")[2];
          var oldScenName = this.updatedScenNameArr[1];

          for (var i in this.scenScheduleData.groupDataList) {
            if (this.scenScheduleData.groupDataList[i].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API && this.scenScheduleData.groupDataList[i].scriptLanguage == "java") {
              //Updating pre/post script for java type script.
              var oldPackName = 'package ' + oldScenName + "_" + this.scenScheduleData.groupDataList[i].grpName;
              var newPackName = 'package ' + newScenName + "_" + this.scenScheduleData.groupDataList[i].grpName;

              if (this.scenScheduleData.groupDataList[i].prescript) {
                if (this.scenScheduleData.groupDataList[i].prescript.indexOf(oldPackName) > -1) {
                  var newPrescript = this.scenScheduleData.groupDataList[i].prescript.replace(oldPackName, newPackName);
                  this.scenScheduleData.groupDataList[i].prescript = newPrescript;
                }
              }

              if (this.scenScheduleData.groupDataList[i].postscript) {
                if (this.scenScheduleData.groupDataList[i].postscript.indexOf(oldPackName) > -1) {
                  var newPostscript = this.scenScheduleData.groupDataList[i].postscript.replace(oldPackName, newPackName);
                  this.scenScheduleData.groupDataList[i].postscript = newPostscript;
                }
              }
            }
          }
        }
        /**
         * This method is called whenever we are deleting group from load configuration component.
         * Here, we are reseting tabIndex of group and request so that undefined error doesn't persist.
         */

      }, {
        key: "deleteGrpLoadConfig",
        value: function deleteGrpLoadConfig() {
          var reqFlowIndex = 0;
          if (this.groupArray[0].grpType != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API) reqFlowIndex = -1;
          this.selectedTabIndex = {
            groupIndex: 0,
            flowIndex: reqFlowIndex,
            reqIndex: reqFlowIndex,
            browserStepsIndex: -1
          };
          this.showSelectedTab(this.groupArray[0], 0, 0, reqFlowIndex, reqFlowIndex, -1);
        }
        /**
         * This method is used for replacing the selected text in url, body, or headers with the selected parameter.
         */

      }, {
        key: "addReplaceAction",
        value: function addReplaceAction(isInline) {
          try {
            if (!this.selectedParameter) {
              this.scenUtilService.errorMessage("Please select any Parameter");
              return;
            }

            var data = this.selectedParameter;
            var replaceText = '{' + data + '}';

            if (this.selectedTextType == "body" && this.selectText != "") {
              var dataInResp = this.selectText;
              this.setValueInReqData('body', null, false, {
                op: 'replace',
                txtToBeReplaced: dataInResp,
                txtToReplace: replaceText
              });
              this.onUnselectClick();
            }

            if (this.selectedTextType == "url" && this.selectText != "") {
              var _dataInResp = this.selectText;
              if (!isInline) this.setValueInReqData('url', null, false, {
                op: 'replace',
                txtToBeReplaced: _dataInResp,
                txtToReplace: replaceText
              });else this.inlineReqObj.url = this.inlineReqObj.url.replace(_dataInResp, replaceText);
              this.onUnselectClick();
            }

            if (this.selectedTextType == "header" && this.selectText != "") {
              var _dataInResp2 = this.selectText;
              if (!isInline) this.headerEditorData = this.headerEditorData.replace(_dataInResp2, replaceText);else this.headerEditorDataInline = this.headerEditorDataInline.replace(_dataInResp2, replaceText);
              this.onUnselectClick();
            }

            if (this.selectedTextType == "tableHeaderGrp" && this.selectText != "") {
              var _dataInResp3 = this.selectText;

              for (var i = 0; i < this.groupArray[this.selectedTabIndex.groupIndex].headers.length; i++) {
                if (i == this.selectedRowInAutoComplete) {
                  var replacedValue = this.groupArray[this.selectedTabIndex.groupIndex].headers[i][this.selectedFieldInAutoComplete]['name'].replace(_dataInResp3, replaceText);
                  this.groupArray[this.selectedTabIndex.groupIndex].headers[i][this.selectedFieldInAutoComplete] = {
                    'name': replacedValue
                  };
                }
              }

              this.groupArray[this.selectedTabIndex.groupIndex].headers = _toConsumableArray(this.groupArray[this.selectedTabIndex.groupIndex].headers);
              this.onUnselectClick();
            }

            if (this.selectedTextType == "tableHeader" && this.selectText != "") {
              var _dataInResp4 = this.selectText;

              if (!isInline) {
                for (var _i0 = 0; _i0 < this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].headers.length; _i0++) {
                  if (_i0 == this.selectedRowInAutoComplete) {
                    var _replacedValue = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].headers[_i0][this.selectedFieldInAutoComplete]['name'].replace(_dataInResp4, replaceText);

                    this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].headers[_i0][this.selectedFieldInAutoComplete] = {
                      'name': _replacedValue
                    };
                  }
                }

                this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].headers = _toConsumableArray(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].headers);
              } else {
                for (var _i1 = 0; _i1 < this.currentReqObj.headers.length; _i1++) {
                  if (_i1 == this.selectedRowInAutoComplete) {
                    var _replacedValue2 = this.currentReqObj.headers[_i1][this.selectedFieldInAutoComplete]['name'].replace(_dataInResp4, replaceText);

                    this.currentReqObj.headers[_i1][this.selectedFieldInAutoComplete] = {
                      'name': _replacedValue2
                    };
                  }
                }

                this.currentReqObj.headers = _toConsumableArray(this.currentReqObj.headers);
              }

              this.onUnselectClick();
            }

            if (this.selectedTextType == "tableBody" && this.selectText != "") {
              var _dataInResp5 = this.selectText;

              if (!isInline) {
                for (var _i10 = 0; _i10 < this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].bodyArr.length; _i10++) {
                  if (_i10 == this.selectedRowInAutoComplete) {
                    var _replacedValue3 = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].bodyArr[_i10][this.selectedFieldInAutoComplete]['name'].replace(_dataInResp5, replaceText);

                    this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].bodyArr[_i10][this.selectedFieldInAutoComplete] = {
                      'name': _replacedValue3
                    };
                  }
                }

                this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].bodyArr = _toConsumableArray(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].bodyArr);
              } else {
                for (var _i11 = 0; _i11 < this.currentReqObj.bodyArr.length; _i11++) {
                  if (_i11 == this.selectedRowInAutoComplete) {
                    var _replacedValue4 = this.currentReqObj.bodyArr[_i11][this.selectedFieldInAutoComplete]['name'].replace(_dataInResp5, replaceText);

                    this.currentReqObj.bodyArr[_i11][this.selectedFieldInAutoComplete] = {
                      'name': _replacedValue4
                    };
                  }
                }

                this.currentReqObj.bodyArr = _toConsumableArray(this.currentReqObj.bodyArr);
              }

              this.onUnselectClick();
            }

            this.selectedTextType = "";
          } catch (error) {
            console.error("error in addReplaceAction ---->>>", error);
          }
        }
        /**
         *
         * @param selectionType - This have info about from where text is selected
         * @param index - This is used only in case of headers autocomplete or body autocomplete.
         * @param field - This is used only in case of headers autocomplete or body autocomplete.
         */

      }, {
        key: "selectTextFromRes",
        value: function selectTextFromRes(selectionType, index, field) {
          try {
            this.selectedTextType = selectionType;

            if (selectionType == 'url') {
              this.selectText = window.getSelection() + '';
            }

            if (selectionType == 'body') {
              this.selectText = window.getSelection() + '';
            }

            if (selectionType == 'header') {
              this.selectText = window.getSelection() + '';
            }

            if (selectionType == 'tableBody' || selectionType == 'tableHeaderGrp' || selectionType == 'tableHeader') {
              this.selectedRowInAutoComplete = index;
              this.selectedFieldInAutoComplete = field;
              this.selectText = window.getSelection() + '';
            }
          } catch (error) {
            console.error('error in selection', error);
          }
        }
      }, {
        key: "onUnselectClick",
        value: function onUnselectClick() {
          try {
            this.selectedTextType = "";
            this.selectText = "";
            this.selectedFieldInAutoComplete = '';
            this.selectedRowInAutoComplete = '';
          } catch (error) {
            console.error(" error in onselectClick1", error);
          }

          return true;
        }
        /**
         * This method is used to update parameter and replace it in group array.
         * This method is called when user updates parameter from common parameter code (script code).
         * @param res updated parameter object.
         */

      }, {
        key: "updateParameter",
        value: function updateParameter(res) {
          var _this17 = this;

          var parameter = this.groupArray[this.selectedTabIndex.groupIndex].parameters;

          var _loop = function _loop(key) {
            if (key != res['paramType']) return 1; // continue

            var paramArr = parameter[key];
            paramArr = paramArr.map(function (ele) {
              if (ele[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName] == _this17.scenUtilService.editParamName) {
                ele = res['obj']; //Updating parameter list in replace dropdown.

                var tmpParamArr = [];
                var oldFileParamNameArr = [];
                var newFileParamNameArr = [];

                if (key == 'file' || key == 'index_file') {
                  var oldFileParamNameArrWithColon = _this17.scenUtilService.editParamName.split(",");

                  var _iterator3 = _createForOfIteratorHelper(oldFileParamNameArrWithColon),
                      _step3;

                  try {
                    for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
                      var paramName = _step3.value;
                      oldFileParamNameArr.push(paramName.split(":")[0]);
                    }
                  } catch (err) {
                    _iterator3.e(err);
                  } finally {
                    _iterator3.f();
                  }

                  var newFileParamNameArrWithColon = res['obj'][_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName].split(",");

                  var _iterator4 = _createForOfIteratorHelper(newFileParamNameArrWithColon),
                      _step4;

                  try {
                    for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
                      var _paramName = _step4.value;
                      newFileParamNameArr.push(_paramName.split(":")[0]);
                    }
                  } catch (err) {
                    _iterator4.e(err);
                  } finally {
                    _iterator4.f();
                  }
                }

                var _iterator5 = _createForOfIteratorHelper(_this17.scenUtilService.parameterOption),
                    _step5;

                try {
                  for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
                    var paramOpt = _step5.value;

                    if (key == 'file' || key == 'index_file') {
                      if (oldFileParamNameArr.indexOf(paramOpt.value) > -1) {
                        continue;
                      } else {
                        tmpParamArr.push(paramOpt);
                      }
                    } else {
                      if (paramOpt.value == _this17.scenUtilService.editParamName) {
                        tmpParamArr.push({
                          label: ele[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName],
                          value: ele[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName],
                          paramType: key
                        });
                      } else {
                        tmpParamArr.push(paramOpt);
                      }
                    }
                  }
                } catch (err) {
                  _iterator5.e(err);
                } finally {
                  _iterator5.f();
                }

                if (key == 'file' || key == 'index_file') {
                  var _iterator6 = _createForOfIteratorHelper(newFileParamNameArr),
                      _step6;

                  try {
                    for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
                      var param = _step6.value;
                      tmpParamArr.push({
                        label: param,
                        value: param,
                        paramType: key
                      });
                    }
                  } catch (err) {
                    _iterator6.e(err);
                  } finally {
                    _iterator6.f();
                  }
                }

                _this17.scenUtilService.parameterOption = tmpParamArr;
              }

              return ele;
            });
            _this17.groupArray[_this17.selectedTabIndex.groupIndex].parameters[key] = paramArr;
          };

          for (var key in parameter) {
            if (_loop(key)) continue;
          }

          for (var i = 0; i < this.paramTableData.length; i++) {
            if (this.paramTableData[i]['name'] == this.scenUtilService.editParamName) {
              this.paramTableData[i] = this.scriptParameterService.getParamTableRow(res);
            }
          }

          this.scenUtilService.successMessage("Parameter updated successfully.");
          this.scenUtilService.paramSidebar = false;
        }
        /**
         * This method is used to update assertion and replace it in group array.
         * This method is called when user updates assertion from common assertion code (script code).
         * @param res updated assertion object.
         */

      }, {
        key: "updateAssertion",
        value: function updateAssertion(res) {
          var _this18 = this;

          var assertion = this.groupArray[this.selectedTabIndex.groupIndex].assertions;
          assertion = assertion.map(function (ele) {
            if (ele[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["ASSERTION_CONST"].assertionTxt].replace(/(TextPfx=|TextSfx=|TEXT=|TEXT\/|RE\/|IC=)/g, '').replace(/"/g, '') == _this18.scenUtilService.editAssertionName) {
              ele = res;
            }

            return ele;
          });
          this.groupArray[this.selectedTabIndex.groupIndex].assertions = assertion;

          for (var i = 0; i < this.assertionTableData.length; i++) {
            if (this.assertionTableData[i]['criteriaValue'] == this.scenUtilService.editAssertionName) {
              this.assertionTableData[i] = this.scriptParameterService.getAssertionTableRow(res);
            }
          }

          this.scenUtilService.successMessage("Assertion updated successfully.");
        }
        /**
         * This method creates parameter table data when user clicks on showSelectedTab for group.
         */

      }, {
        key: "createParameterTableData",
        value: function createParameterTableData() {
          this.scenUtilService.parameterOption = [];
          this.scenUtilService.parameterOption.push({
            label: 'Select Parameter',
            value: null,
            paramType: null
          });
          var parameter = this.groupArray[this.selectedTabIndex.groupIndex].parameters;
          this.paramTableData = [];

          for (var key in parameter) {
            var paramArr = parameter[key];

            var _iterator7 = _createForOfIteratorHelper(paramArr),
                _step7;

            try {
              for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
                var param = _step7.value;
                this.paramTableData.push(this.scriptParameterService.getParamTableRow({
                  paramType: key,
                  obj: param
                }));

                if (key == 'file' || key == 'index_file') {
                  var paramNameArr = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName].split(",");

                  var _iterator8 = _createForOfIteratorHelper(paramNameArr),
                      _step8;

                  try {
                    for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
                      var params = _step8.value;
                      this.scenUtilService.parameterOption.push({
                        label: params.split(":")[0],
                        value: params.split(":")[0],
                        paramType: key
                      });
                    }
                  } catch (err) {
                    _iterator8.e(err);
                  } finally {
                    _iterator8.f();
                  }
                } else {
                  this.scenUtilService.parameterOption.push({
                    label: param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName],
                    value: param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName],
                    paramType: key
                  });
                }
              }
            } catch (err) {
              _iterator7.e(err);
            } finally {
              _iterator7.f();
            }
          }
        }
        /**
         * This method creates assertion table data when user clicks on showSelectedTab for group.
         */

      }, {
        key: "createAssertionTableData",
        value: function createAssertionTableData() {
          var assertions = this.groupArray[this.selectedTabIndex.groupIndex].assertions;
          this.assertionTableData = [];

          if (assertions == undefined) {
            assertions = [];
            return;
          }

          var _iterator9 = _createForOfIteratorHelper(assertions),
              _step9;

          try {
            for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
              var assertion = _step9.value;
              this.assertionTableData.push(this.scriptParameterService.getAssertionTableRow(assertion));
            }
          } catch (err) {
            _iterator9.e(err);
          } finally {
            _iterator9.f();
          }
        }
      }, {
        key: "addParameters",
        value: function addParameters(res) {
          var params = this.groupArray[this.selectedTabIndex.groupIndex].parameters;

          if (params && params[res.paramType] != undefined) {
            params[res.paramType].push(res.obj);
          } else {
            if (this.groupArray[this.selectedTabIndex.groupIndex].parameters) this.groupArray[this.selectedTabIndex.groupIndex].parameters[res.paramType] = [res.obj];else this.groupArray[this.selectedTabIndex.groupIndex].parameters = _defineProperty({}, res.paramType, [res.obj]);
          }

          if (res.paramType == 'file' || res.paramType == 'index_file') {
            var paramNameArr = res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName].split(",");

            var _iterator0 = _createForOfIteratorHelper(paramNameArr),
                _step0;

            try {
              for (_iterator0.s(); !(_step0 = _iterator0.n()).done;) {
                var param = _step0.value;
                this.scenUtilService.parameterOption.push({
                  label: param.split(":")[0],
                  value: param.split(":")[0],
                  paramType: res.paramType
                });
              }
            } catch (err) {
              _iterator0.e(err);
            } finally {
              _iterator0.f();
            }
          } else {
            this.scenUtilService.parameterOption.push({
              label: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName],
              value: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName],
              paramType: res.paramType
            });
          }

          this.scenUtilService.successMessage("Parameter added successfully");
          this.scenUtilService.paramSidebar = false;
        }
      }, {
        key: "addAssertions",
        value: function addAssertions(res) {
          var assertions = this.groupArray[this.selectedTabIndex.groupIndex].assertions;

          if (assertions != undefined) {
            assertions.push(res);
          } else {
            this.groupArray[this.selectedTabIndex.groupIndex].assertions = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"]([res]);
          }

          this.scenUtilService.successMessage("Assertion added successfully");
        }
      }, {
        key: "deleteParameters",
        value: function deleteParameters() {
          var _this19 = this;

          if (!this.selectedParameters || this.selectedParameters.length === 0) {
            this.scenUtilService.errorMessage("Please select atleast one row to delete.");
            return;
          }

          this.confirmationService.confirm({
            message: 'Are you sure you want to delete the selected Parameter(s)?',
            key: "paramAssertionList",
            accept: function accept() {
              _this19.scenUtilService.parameterOption = [];
              _this19.scenUtilService.parameterOption = [{
                label: 'Select Parameter',
                value: null,
                paramType: null
              }];

              var _iterator1 = _createForOfIteratorHelper(_this19.selectedParameters),
                  _step1;

              try {
                for (_iterator1.s(); !(_step1 = _iterator1.n()).done;) {
                  var selectedParam = _step1.value;

                  var index = _this19.paramTableData.indexOf(selectedParam);

                  _this19.deleteParameterOnselect(selectedParam['name'], selectedParam['type'], index);
                }
              } catch (err) {
                _iterator1.e(err);
              } finally {
                _iterator1.f();
              }

              _this19.selectedParameters = [];

              _this19.scenUtilService.successMessage("Parameter(s) deleted successfully");

              var _iterator10 = _createForOfIteratorHelper(_this19.paramTableData),
                  _step10;

              try {
                for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
                  var param = _step10.value;

                  if (param['type'] === 'file') {
                    var paramNameArr = param['name'].split(",");

                    var _iterator11 = _createForOfIteratorHelper(paramNameArr),
                        _step11;

                    try {
                      for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
                        var params = _step11.value;

                        _this19.scenUtilService.parameterOption.push({
                          label: params.split(":")[0],
                          value: params.split(":")[0],
                          paramType: param['type']
                        });
                      }
                    } catch (err) {
                      _iterator11.e(err);
                    } finally {
                      _iterator11.f();
                    }
                  } else {
                    _this19.scenUtilService.parameterOption.push({
                      label: param['name'],
                      value: param['name'],
                      paramType: param['type']
                    });
                  }
                }
              } catch (err) {
                _iterator10.e(err);
              } finally {
                _iterator10.f();
              }
            },
            reject: function reject() {}
          });
        }
      }, {
        key: "deleteParameterOnselect",
        value: function deleteParameterOnselect(paramName, paramType, paramIndex) {
          var _this20 = this;

          var parameter = this.groupArray[this.selectedTabIndex.groupIndex].parameters;

          for (var key in parameter) {
            var paramArr = parameter[key];
            if (paramType != key) continue;
            paramArr = paramArr.filter(function (value, index) {
              if (value[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName] != paramName && index != paramIndex) return true;else {
                _this20.paramTableData.splice(paramIndex, 1);

                return false;
              }
            });
            if (paramArr && paramArr.length > 0) this.groupArray[this.selectedTabIndex.groupIndex].parameters[key] = paramArr;else delete this.groupArray[this.selectedTabIndex.groupIndex].parameters[key];
          }
        }
      }, {
        key: "deleteParameter",
        value: function deleteParameter(paramName, paramType, paramIndex) {
          var _this21 = this;

          this.confirmationService.confirm({
            message: 'Are you sure to delete the selected Parameter.',
            key: "paramAssertionList",
            accept: function accept() {
              _this21.scenUtilService.parameterOption = [];

              _this21.scenUtilService.parameterOption.push({
                label: 'Select Parameter',
                value: null,
                paramType: null
              });

              var parameter = _this21.groupArray[_this21.selectedTabIndex.groupIndex].parameters;

              for (var key in parameter) {
                var paramArr = parameter[key];
                if (paramType != key) continue;
                paramArr = paramArr.filter(function (value, index) {
                  if (value[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName] != paramName && index != paramIndex) return true;else {
                    _this21.paramTableData.splice(paramIndex, 1);

                    return false;
                  }
                });
                if (paramArr && paramArr.length > 0) _this21.groupArray[_this21.selectedTabIndex.groupIndex].parameters[key] = paramArr;else delete _this21.groupArray[_this21.selectedTabIndex.groupIndex].parameters[key];

                var _iterator12 = _createForOfIteratorHelper(_this21.paramTableData),
                    _step12;

                try {
                  for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
                    var param = _step12.value;

                    if (param['type'] == 'file') {
                      var paramNameArr = param['name'].split(",");

                      var _iterator13 = _createForOfIteratorHelper(paramNameArr),
                          _step13;

                      try {
                        for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
                          var params = _step13.value;

                          _this21.scenUtilService.parameterOption.push({
                            label: params.split(":")[0],
                            value: params.split(":")[0],
                            paramType: param['type']
                          });
                        }
                      } catch (err) {
                        _iterator13.e(err);
                      } finally {
                        _iterator13.f();
                      }
                    } else {
                      _this21.scenUtilService.parameterOption.push({
                        label: param['name'],
                        value: param['name'],
                        paramType: param['type']
                      });
                    }
                  }
                } catch (err) {
                  _iterator12.e(err);
                } finally {
                  _iterator12.f();
                }
              }

              _this21.scenUtilService.successMessage("Parameter deleted successfully");
            },
            reject: function reject() {}
          });
        }
        /**
         * Loads file content for file type parameters.
         * For newly added parameters, shows data from textAreas property.
         * For old parameters, uses the cached Blob object from file property.
         */

      }, {
        key: "loadFileParameterContent",
        value: function loadFileParameterContent(rowData, parameter) {
          var _this22 = this;

          if (rowData['type'] !== 'file') return;

          try {
            var paramArr = parameter && parameter['file'] ? parameter['file'] : []; // Match by parameter-name property which contains the parameter identifier

            var param = paramArr.find(function (p) {
              return p['parameter-name'] === rowData['name'];
            });
            if (!param) return; // Clear previous data before loading new parameter

            this.parameterDataService.textArea = ''; // Detect new vs old parameter by checking file object type:
            // New parameter: file is a File object (from user file upload)
            // Old parameter: file is a Blob object (cached from backend)

            var isNewParam = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].file] instanceof File;

            if (isNewParam) {
              // For newly added parameters, use the textAreas property (user-entered content)
              if (param['textAreas']) {
                this.parameterDataService.textArea = param['textAreas'];
              } else if (param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].file] instanceof File) {
                // If no textAreas, read the File object asynchronously
                var fileObj = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].file];
                fileObj.text().then(function (text) {
                  _this22.parameterDataService.textArea = text;
                })["catch"](function () {
                  _this22.parameterDataService.textArea = '';
                });
              }

              return;
            } // For old parameters, use the cached Blob in the file property
            // This avoids REST call caching issues


            if (param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].file] instanceof Blob) {
              var _fileObj = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].file];

              _fileObj.text().then(function (text) {
                _this22.parameterDataService.textArea = text;
              })["catch"](function () {
                _this22.parameterDataService.textArea = '';
              });
            }
          } catch (e) {// Ignore errors
          }
        }
      }, {
        key: "editParameter",
        value: function editParameter(rowData) {
          this.scenUtilService.paramSidebar = true;
          var type = rowData['type'];
          if (type == 'scratch') type = 'declare';else if (type == 'scratch_array') type = 'declare_array';else if (type == 'Dataset using Query') type = 'sql';else if (type == 'file' && rowData['specification'].includes("config")) {
            this.toggleView(true);
            type = "file-test-data-generator";
          }
          this.router.navigate(['/scenario/basicScenario/design/scenDesign/parameter', {
            outlets: {
              parameter: ['addParameter', type]
            }
          }]);
          var parameter = this.groupArray[this.selectedTabIndex.groupIndex].parameters;
          this.parameterDataService.mode = 'UpdateParam';
          this.scriptParameterService.updateParameterData(parameter[rowData['type']], rowData, rowData['type'], this.allReqsOfSelectedGrp()); // Load file content if it's a file parameter

          this.loadFileParameterContent(rowData, parameter);
        }
      }, {
        key: "editAssertion",
        value: function editAssertion(rowData) {
          this.scenUtilService.checkSidebar = true;
          this.router.navigate(['/scenario/basicScenario/design/scenDesign/checkpoint', {
            outlets: {
              checkpoint: ['addAssertion']
            }
          }]);
          var assertion = this.groupArray[this.selectedTabIndex.groupIndex].assertions;
          this.parameterDataService.mode = 'Update';
          var assertionData;

          var _iterator14 = _createForOfIteratorHelper(assertion),
              _step14;

          try {
            for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
              var data = _step14.value;

              if (data[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["ASSERTION_CONST"].assertionTxt].replace(/(TextPfx=|TextSfx=|TEXT=|TEXT\/|RE\/|IC=)/g, '').replace(/"/g, '') == rowData['criteriaValue']) {
                assertionData = data;
              }
            }
          } catch (err) {
            _iterator14.e(err);
          } finally {
            _iterator14.f();
          }

          this.scriptParameterService.updateAssertionData(assertion, rowData, this.allReqsOfSelectedGrp());
          this.emitAssertionsToScript(assertionData);
        }
      }, {
        key: "deleteAssertions",
        value: function deleteAssertions() {
          var _this23 = this;

          if (!this.selectedAssertions || this.selectedAssertions.length === 0) {
            this.scenUtilService.errorMessage("Please select atleast one row to delete.");
            return;
          }

          this.confirmationService.confirm({
            message: 'Are you sure you want to delete the selected Assertion.',
            key: "paramAssertionList",
            accept: function accept() {
              var _iterator15 = _createForOfIteratorHelper(_this23.selectedAssertions),
                  _step15;

              try {
                for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
                  var selectedAsser = _step15.value;

                  _this23.deleteAssertionOnselect(selectedAsser['criteriaValue']);
                }
              } catch (err) {
                _iterator15.e(err);
              } finally {
                _iterator15.f();
              }

              _this23.scenUtilService.successMessage("Assertion(s) deleted successfully");

              _this23.selectedAssertions = [];
            },
            reject: function reject() {}
          });
        }
      }, {
        key: "deleteAssertionOnselect",
        value: function deleteAssertionOnselect(assertionName) {
          var _this24 = this;

          var assertions = this.groupArray[this.selectedTabIndex.groupIndex].assertions;
          assertions = assertions.filter(function (value, index) {
            if (value[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["ASSERTION_CONST"].assertionTxt].replace(/(TextPfx=|TextSfx=|TEXT=|TEXT\/|RE\/|IC=)/g, '').replace(/"/g, '') != assertionName) {
              return true;
            } else {
              _this24.assertionTableData.splice(index, 1);

              return false;
            }
          });
          if (assertions && assertions.length > 0) this.groupArray[this.selectedTabIndex.groupIndex].assertions = assertions;else delete this.groupArray[this.selectedTabIndex.groupIndex].assertions;
        }
      }, {
        key: "deleteAssertion",
        value: function deleteAssertion(assertionName) {
          var _this25 = this;

          this.confirmationService.confirm({
            message: 'Are you sure to delete the selected Assertion.',
            key: "paramAssertionList",
            accept: function accept() {
              var assertions = _this25.groupArray[_this25.selectedTabIndex.groupIndex].assertions;
              assertions = assertions.filter(function (value, index) {
                if (value[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["ASSERTION_CONST"].assertionTxt].replace(/(TextPfx=|TextSfx=|TEXT=|TEXT\/|RE\/|IC=)/g, '').replace(/"/g, '') != assertionName) {
                  return true;
                } else {
                  _this25.assertionTableData.splice(index, 1);

                  return false;
                }
              });
              if (assertions && assertions.length > 0) _this25.groupArray[_this25.selectedTabIndex.groupIndex].assertions = assertions;else delete _this25.groupArray[_this25.selectedTabIndex.groupIndex].assertions;

              _this25.scenUtilService.successMessage("Assertion deleted successfully");
            },
            reject: function reject() {}
          });
        }
      }, {
        key: "fillDropDownData",
        value: function fillDropDownData() {
          this.respOptions = [{
            label: "body",
            value: 'body'
          }, {
            label: "header",
            value: 'header'
          }, {
            label: "all",
            value: 'all'
          }];
          this.respTypeOptions = [{
            label: "regex",
            value: 'regex'
          }, {
            label: "json path",
            value: 'json'
          }, {
            label: "xpath",
            value: 'xpath'
          }, {
            label: "boundary",
            value: 'boundary'
          }];
          this.methodOpt = [{
            label: "GET",
            value: "GET"
          }, {
            label: "POST",
            value: "POST"
          }, {
            label: "PUT",
            value: "PUT"
          }, {
            label: "DELETE",
            value: "DELETE"
          }, {
            label: "PATCH",
            value: "PATCH"
          }, {
            label: "OPTIONS",
            value: "OPTIONS"
          }, {
            label: "HEAD",
            value: "HEAD"
          }, {
            label: "CONNECT ",
            value: "CONNECT "
          }, {
            label: "TRACE ",
            value: "TRACE "
          }];
          this.scenSelectBtn = [{
            label: "Design",
            value: 'design'
          }, {
            label: "Edit Script",
            value: 'script'
          }];
          this.scenTypeOptions = [{
            label: "Fixed session rate",
            value: 'session'
          }];
          this.scheduleTypeOptions = [{
            label: "Test",
            value: 'scenario'
          }];
          this.scenTableHeader = [{
            field: 'col1',
            header: 'Group Name'
          }, {
            field: 'col2',
            header: 'Test Type'
          }, {
            field: 'col3',
            header: 'User'
          }];
          this.scenTableBody = [{
            "col1": "G1",
            "col2": "Fixed concurrent user",
            "col3": "1"
          }, {
            "col1": "G2",
            "col2": "Fixed concurrent user",
            "col3": "1"
          }, {
            "col1": "G3",
            "col2": "Fixed concurrent user",
            "col3": "1"
          }];
          this.phaseTableHeader = [{
            field: 'col1',
            header: 'Phase Type'
          }, {
            field: 'col2',
            header: 'Phase Name'
          }, {
            field: 'col3',
            header: 'Properties'
          }];
          this.phaseTableBody = [{
            "col1": "Start",
            "col2": "TestStart",
            "col3": "Start immediately after scenario begin "
          }, {
            "col1": "Ramp Up",
            "col2": "TestStart",
            "col3": "Start immediately after scenario begin "
          }, {
            "col1": "Stabilize",
            "col2": "TestStart",
            "col3": "Start immediately after scenario begin "
          }, {
            "col1": "Duration",
            "col2": "TestStart",
            "col3": "Start immediately after scenario begin "
          }, {
            "col1": "Ramp Down",
            "col2": "TestStart",
            "col3": "Start immediately after scenario begin "
          }];
          this.checkIfOptions = [{
            label: "response code",
            value: 'resp'
          }, {
            label: "header",
            value: 'head'
          }, {
            label: "body",
            value: 'body'
          }, {
            label: "all",
            value: 'all'
          }];
          this.containsOptions = [{
            label: "contains",
            value: 'contains'
          }, {
            label: "not contains",
            value: 'ncontains'
          }];
          this.textTypeOptions = [{
            label: "text",
            value: 'text'
          }, {
            label: "regex",
            value: 'regex'
          }];
        }
      }, {
        key: "toggleAdditionalInfo",
        value: function toggleAdditionalInfo() {
          this.displayAdditionalInfo = !this.displayAdditionalInfo;
        } //add Group

      }, {
        key: "addGroup",
        value: function addGroup() {
          //Adding request or group data whenever user switches from on request/group/flow to another.
          //Usecase: When user is editing some particular request or group and decides to add request/thinktime/group without switching to any other flow.
          this.grpTypeAPI();
          this.isEditMode = false;
          var groupData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.defaultGroupData);
          groupData.grpName = this.schShareService.getLatestGroupName(this.groupArray);
          groupData.scriptName = "".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.subProject, "/").concat(this.scenUtilService.scenarioName) + "_" + groupData.grpName;
          groupData.scriptLanguage = this.groupWiseScriptType; // here, we are providing generator to newly added API group

          if (this.scenScheduleData.isGeneratorOpt) {
            if (this.scenScheduleData.genMode) groupData.generatorNames = ["ALL"];else groupData.generatorNames = ["NA"];
          }

          if (!this.scenUtilService.isValidGroup(this.groupWiseScriptType, this.scenScheduleData.groupDataList)) return;
          this.updateGroupAndPhaseData('add', groupData); //Passing groupIndex and reqIndex here so that latest group added can be the selected group.

          if (this.groupArray[0].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER || this.groupArray[0].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            groupData.grpType = this.groupArray[0].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER ? _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER : _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE;
            this.isBrowserTabShown(groupData.flowArr[0].stepsArr[0], this.groupArray.length - 1, -1, 0, 0);
          } else {
            this.isRequestTabShown(groupData.flowArr[0].reqArr[0], this.groupArray.length - 1, 0, 0, 0);
          }

          this.isGroupDialogShown = false;
          this.isSelectGrpData(groupData);
          this.groupWiseScriptType = this.scenUtilService.scriptType;
        }
      }, {
        key: "onCloneSelectedGroup",
        value: function onCloneSelectedGroup() {
          var i = this.selectedTabIndex.groupIndex;

          if (i == null || i < 0) {
            return;
          }

          var grp = this.groupArray[i];
          this.cloneGroup(i, grp);
        }
      }, {
        key: "onDeleteSelectedGroup",
        value: function onDeleteSelectedGroup() {
          var i = this.selectedTabIndex.groupIndex;

          if (i == null || i < 0) {
            return;
          }

          this.deleteGroup(i);
        }
      }, {
        key: "deleteGroup",
        value: function deleteGroup(i) {
          var _this26 = this;

          if (this.groupArray.length < 2) {
            this.scenUtilService.errorMessage("Cannot delete group.");
            return;
          } else {
            this.confirmationService.confirm({
              message: 'Are you sure to delete the selected Group?',
              accept: function accept() {
                if (_this26.groupArray[i].grpType != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].CAVISSON) {
                  for (var ii in _this26.groupArray[i].flowArr) {
                    for (var iii in _this26.groupArray[i].flowArr[ii].reqArr) {
                      _this26.deleteBodyFromScenDir(i, ii, iii);
                    }
                  }
                }

                _this26.scenKeywordDefinitionService.deleteAllGrpKeyword(_this26.groupArray[i].grpName);

                _this26.schUtility.removeGroup(_this26.scenScheduleData, _this26.groupArray[i].grpName, i, false);

                _this26.groupArray.splice(i, 1);

                _this26.scenScheduleData.groupDataList = _this26.groupArray;
                var groupIndex = i > 0 ? i - 1 : 0;
                var reqFlowIndex = 0;
                if (_this26.groupArray[groupIndex].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].CAVISSON) reqFlowIndex = -1; //Need flow index 0 for now as only showing one flow as of now.

                _this26.selectedTabIndex = {
                  groupIndex: groupIndex,
                  flowIndex: 0,
                  reqIndex: reqFlowIndex,
                  browserStepsIndex: 0
                };

                _this26.updateGroupAndPhaseData("delete", null, null, null, false);

                _this26.isSelectGrpData(_this26.groupArray[groupIndex]);
              },
              reject: function reject() {}
            });
          }
        }
      }, {
        key: "cloneGroup",
        value: function cloneGroup(i, group) {
          var clonedGroup = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](group);
          this.originalName = clonedGroup.grpName;
          clonedGroup.grpName = this.getDuplicateGroupName(this.originalName);
          if (clonedGroup.grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API) clonedGroup.scriptName = "".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.subProject, "/").concat(this.scenUtilService.scenarioName) + "_" + clonedGroup.grpName; // This is done to create different body file name when cloning a group of api type .

          if (clonedGroup.grpType != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].CAVISSON) {
            var _iterator16 = _createForOfIteratorHelper(clonedGroup.flowArr),
                _step16;

            try {
              for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
                var flow = _step16.value;

                var _iterator17 = _createForOfIteratorHelper(flow.reqArr),
                    _step17;

                try {
                  for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
                    var req = _step17.value;
                    this.makeCopyOfBodyFile(req, clonedGroup, flow);
                  }
                } catch (err) {
                  _iterator17.e(err);
                } finally {
                  _iterator17.f();
                }
              }
            } catch (err) {
              _iterator16.e(err);
            } finally {
              _iterator16.f();
            }
          } //Renaming phasename in each phaseList for cloned Group. Done for Bug: 147721.


          if (this.scenScheduleData.scheduleBy == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCHEDULE_BY"].GROUP) {
            for (var _i12 = 0; _i12 < clonedGroup.phaseList.length; _i12++) {
              clonedGroup.phaseList[_i12].phaseName = clonedGroup.phaseList[_i12].phaseName.replace(this.originalName, clonedGroup.grpName);

              if (clonedGroup.schBasicPhaseList[_i12] && clonedGroup.schBasicPhaseList[_i12].phaseName) {
                clonedGroup.schBasicPhaseList[_i12].phaseName = clonedGroup.schBasicPhaseList[_i12].phaseName.replace(this.originalName, clonedGroup.grpName);
              }
            }
          }

          this.updateGroupAndPhaseData("add", clonedGroup, i, true);
        }
      }, {
        key: "getDuplicateGroupName",
        value: function getDuplicateGroupName(name) {
          var duplicateGroupNameCount = -1; //Count to track latest duplicate name: like flow_1, Copy_flow_1, Copy_1_flow_1, Copy_2_flow_1 will be the latest flow name.

          var duplicateGroupName = "";
          var isNan = false;

          for (var i in this.groupArray) {
            if (this.groupArray[i].grpName.startsWith("Copy_") && this.groupArray[i].grpName.endsWith(name)) {
              var num = parseInt(this.groupArray[i].grpName.substring(6, 7)); //Checking if tens digit is NaN or not

              if (isNaN(num)) num = parseInt(this.groupArray[i].grpName.substring(5, 6));else num = parseInt(this.groupArray[i].grpName.substring(5, 7));

              if (!isNaN(num)) {
                if (duplicateGroupNameCount < num) {
                  duplicateGroupNameCount = num;
                  duplicateGroupName = this.groupArray[i].grpName;
                }
              } else {
                isNan = true;
              }
            } else if (name.startsWith("Copy_") && parseInt(i) == this.groupArray.length - 1) {
              return "Copy_" + name;
            }
          } //When isNan is true then it means that there is only one copy of given flow name, so need to latest duplicate flow name which is Copy_Group_1


          if (!duplicateGroupName && isNan) duplicateGroupName = "Copy_" + name;
          return this.getDuplicateName(duplicateGroupName || name); // Getting duplicate flow name by passing latest duplicate flow name
        }
      }, {
        key: "getDuplicateName",
        value: function getDuplicateName(name) {
          var duplicateName = "";

          if (name.startsWith("Copy_") && name != this.originalName) {
            duplicateName = name.substring(0, 5);
            var copyNum = name.substring(6, 7); //Checking if tens digit is NaN or not

            if (isNaN(parseInt(copyNum))) copyNum = name.substring(5, 6);else copyNum = name.substring(5, 7);

            if (!isNaN(parseInt(copyNum))) {
              duplicateName += parseInt(copyNum) + 1 + (isNaN(parseInt(name.substring(6, 7))) ? name.substring(6) : name.substring(7));
            } else {
              duplicateName += "1_" + name.substring(5);
            }
          } else {
            duplicateName = "Copy_" + name;
          }

          return duplicateName;
        }
      }, {
        key: "getLatestRequestName",
        value: function getLatestRequestName() {
          var totalRequest = 0;
          var requestNameArr = [];
          var index = -1;

          var _iterator18 = _createForOfIteratorHelper(this.groupArray),
              _step18;

          try {
            for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
              var grpObj = _step18.value;
              index++;

              if (index == this.selectedTabIndex.groupIndex) {
                var flowIndex = -1;

                var _iterator19 = _createForOfIteratorHelper(grpObj.flowArr),
                    _step19;

                try {
                  for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
                    var flowObj = _step19.value;
                    flowIndex++;

                    if (flowIndex == this.selectedTabIndex.flowIndex) {
                      var _iterator20 = _createForOfIteratorHelper(flowObj.reqArr),
                          _step20;

                      try {
                        for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
                          var reqObj = _step20.value;

                          if (reqObj.thinkTime == "-1") {
                            totalRequest++;
                            requestNameArr.push(reqObj.reqName);
                          }
                        }
                      } catch (err) {
                        _iterator20.e(err);
                      } finally {
                        _iterator20.f();
                      }
                    }
                  }
                } catch (err) {
                  _iterator19.e(err);
                } finally {
                  _iterator19.f();
                }
              }
            }
          } catch (err) {
            _iterator18.e(err);
          } finally {
            _iterator18.f();
          }

          return this.getNewRequestName(totalRequest, requestNameArr);
        }
      }, {
        key: "getNewRequestName",
        value: function getNewRequestName(totalRequest, requestNameArr) {
          if (requestNameArr.indexOf("Request_".concat(totalRequest + 1)) > -1) return this.getNewRequestName(totalRequest + 1, requestNameArr);else return "Request_".concat(totalRequest + 1);
        }
      }, {
        key: "addBrowserStep",
        value: function addBrowserStep() {
          var isBrowserStepsValid = this.browserStepService.checkValidation(this.groupArray, this.selectedTabIndex, this.scenUtilService.isFlowInline);

          if (isBrowserStepsValid && !isBrowserStepsValid.isValid) {
            this.scenUtilService.errorMessage(isBrowserStepsValid.message);
            return;
          }

          this.isEditMode = false;
          this.groupArray[this.selectedTabIndex.groupIndex].totalBrowserSteps++;
          var arr = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].stepsArr;
          var browserStepData = new _interface_browser_steps_data__WEBPACK_IMPORTED_MODULE_39__["SchBrowserSteps"]();
          browserStepData.type = "go";
          browserStepData.label = "Go";
          browserStepData.stepName = this.browserStepService.getLatestStepName(this.groupArray, this.selectedTabIndex);
          browserStepData.url = "";
          arr.push(browserStepData);
          this.isBrowserTabShown(browserStepData, this.selectedTabIndex.groupIndex, -1, this.selectedTabIndex.flowIndex, this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].stepsArr.length - 1);
          this.updateGroupStateToCustomized(this.groupArray[this.selectedTabIndex.groupIndex]);
        }
      }, {
        key: "onAddClick",
        value: function onAddClick(grpType) {
          var isDnsProtocol = grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API && this.isDnsApiGroup();

          if (_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER == grpType || _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE == grpType) {
            this.addBrowserStep();
          } else if (isDnsProtocol) {
            this.addRequest(true);
          } else {
            this.addRequest();
          }
        } //add request

      }, {
        key: "addRequest",
        value: function addRequest() {
          var isDnsProtocol = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

          var _a, _b, _c, _d;

          var shouldAddDnsDefaults = isDnsProtocol || this.isDnsApiGroup();

          if (isDnsProtocol) {
            var dns = this.getKeyFromReqData('dns');
            var groupName = ((_a = this.groupArray[this.selectedTabIndex.groupIndex]) === null || _a === void 0 ? void 0 : _a.grpName) || '';
            var flowName = ((_d = (_c = (_b = this.groupArray[this.selectedTabIndex.groupIndex]) === null || _b === void 0 ? void 0 : _b.flowArr) === null || _c === void 0 ? void 0 : _c[this.selectedTabIndex.flowIndex]) === null || _d === void 0 ? void 0 : _d.flowName) || '';
            var reqName = this.getKeyFromReqData('reqName');
            var dnsValidation = this.schSaveScenario.validateDnsRequest(dns, reqName, groupName, flowName);

            if (!dnsValidation.isValid) {
              this.scenUtilService.errorMessage(dnsValidation.message);
              return;
            }
          } else if (this.getKeyFromReqData('thinkTime') == "-1" && this.getKeyFromReqData('url').length == 0) {
            this.scenUtilService.errorMessage("Need to provide url of above request before adding a new one.");
            return;
          } //Adding request or group data whenever user switches from on request/group/flow to another.
          //Usecase: When user is editing some particular request or group and decides to add request/thinktime/group without switching to any other flow.


          this.grpTypeAPI();
          this.isEditMode = false; //Incrementing totalRequest so that correct number of request is displayed in Test Config Left panel.

          this.groupArray[this.selectedTabIndex.groupIndex].totalRequest++;
          if (this.scenUtilService.isFlowInline == 'no' && this.selectedTabIndex.flowIndex == -1) this.selectedTabIndex.flowIndex = 0;
          var arr = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr;
          var reqData = {
            thinkTime: "-1",
            enable: true,
            assertions: [],
            body: "",
            bodyArr: [],
            bodyType: "text",
            isBodyEditor: true,
            method: "GET",
            reqName: this.getLatestRequestName(),
            searchParameters: [],
            url: "",
            headers: [{
              headerKey: {
                name: "Content-Length"
              },
              headerValue: {
                name: "<calculated when request is sent>"
              },
              toolTip: "The Content-Length is added to help the server for HTTP request's size. If Content-Length is specified and it does not match the length of the message-line, the message is either truncated, or padded with nulls to the specified length.\n          Note that this setting is applied to all requests of the group and for GET or DELETE  method type the length will be zero.",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "Host"
              },
              headerValue: {
                name: "<calculated when request is sent>"
              },
              toolTip: "The Host header is added to identify the domain name for which a request is being sent to the server. This header is implicitly sent with every HTTP request.\n          It is most likely that without this header, your request will return an HTTP 400 error",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "Accept-Encoding"
              },
              headerValue: {
                name: " gzip, deflate, br, compress;q=0.9"
              },
              toolTip: "The Accept-Encoding header is added to indicate to the server that LoadTest supports a defined list of content-encoding or compression algorithms as response. \n          You can remove this header or enter a different value. \n              For this to be considered, you need to enable Accept-Encoding header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n          Doing that may not accurately render the response within the app.\n              Note that this setting is applied to all requests of the group.",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "Accept"
              },
              headerValue: {
                name: "text/plain,application/json,text/html,application/javascript,application/xml"
              },
              toolTip: " Accept header is added to tell the server that LoadTest can understand and process all forms of response content types.\n          It is recommended that this header be sent. But You can remove this header or enter a different value. \n              For this to be considered, you need to enable Accept header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n              Note that this setting is applied to all requests of the group.\n          ",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "User-Agent"
              },
              headerValue: {
                name: "Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1"
              },
              toolTip: "The User-Agent header is added to help the server identify Mozilla as the HTTP requesting application or client.\n          It is recommended that this header be sent. But you can remove this header or enter a different value. \n              For this to be considered, you need to enable User-Agent header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n              Note that this setting is applied to all requests of the group.\n          ",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "Connection"
              },
              headerValue: {
                name: "keep-alive"
              },
              toolTip: "LoadTest added the Connection header to indicate the server to keep the underlying network connection open once the current response is received. This allows LoadTest to reuse the same connection for faster response times in subsequent requests to the same server.\n          You can remove this header or enter a new one with a different value, such as 'Connection: Close' to control this behaviour.\n              For this to be considered, you need to enable Accept header in Group Based Settings -> Protocol Settings -> HTTP -> keep-alive section. \n              Note that this setting is applied to all requests of the group.\n          ",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "Keep-Alive"
              },
              headerValue: {
                name: "300"
              },
              toolTip: "Keep Alive header is added to set a timeout and a maximum amount of requests. It can also be used to allow a single TCP connection to remain open for multiple HTTP requests/responses\n          You can remove this header or enter a different value. \n          For this to be considered, you need to set a custom value in Group Based Settings -> Protocol Settings -> HTTP -> Keep Alive -> \"Keep Alive Timeout\" section\n          Note that this setting is applied to all requests of the group and it is not applicable for HTTP/2",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: ""
              },
              headerValue: {
                name: ""
              },
              del: false,
              chk: false
            }],
            preRequest: {
              inline: ''
            },
            postResponse: {
              inline: ''
            }
          };

          if (shouldAddDnsDefaults) {
            this.applyDnsDefaults(reqData);
          }

          arr.push(reqData);
          this.addThinkTime(arr);
          this.isRequestTabShown(reqData, this.selectedTabIndex.groupIndex, this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr.length - 2, this.selectedTabIndex.flowIndex);
          this.updateGroupStateToCustomized(this.groupArray[this.selectedTabIndex.groupIndex]);
        }
      }, {
        key: "onRequestAdd",
        value: function onRequestAdd() {
          //If header text is selected in request data then convert header text data to formatted data.
          if (this.isHeaderEditorDisplay && this.selectedTabIndex.reqIndex != -1) this.setValueInReqData('headers', this.getFormattedHeaderData(), false, {
            op: 'add',
            localSelTabIndex: null
          });
          this.resetRequestData();
        }
        /**
         * This method reverts update in request data if user haven't clicked on update after making changes in request data.
         * i.e. If user clicks on left menu, add request, add thinktime or add group after making changes in particular request then this method
         * will revert the changes.
         * This is needed as binding is directly with this.groupArray.
         * Note: revert needs to be done only when isEditMode is true.
         */

      }, {
        key: "revertRequestUpdates",
        value: function revertRequestUpdates() {
          if (this.selectedRequestData) {
            this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex] = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.selectedRequestData);
          }

          this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex + 1].thinkTime = this.selectedNextThinkTime;
        }
      }, {
        key: "revertGroupUpdates",
        value: function revertGroupUpdates() {
          if (this.selectedGroupData) this.groupArray[this.selectedTabIndex.groupIndex] = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.selectedGroupData);
        }
      }, {
        key: "resetRequestData",
        value: function resetRequestData() {
          this.isEditMode = false;
          this.selectedRequestData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex]);
          this.isHeaderEditorDisplay = false;
        }
      }, {
        key: "onGroupAdd",
        value: function onGroupAdd() {
          this.resetGroupData();
        }
        /**
         * This method runs when group is changed. It is used to update script name of that group if it is of API type group.
         * @param e event on group change.
         */

      }, {
        key: "onGroupChange",
        value: function onGroupChange(e) {
          this.scenKeywordDefinitionService.onGrpNameChanged(this.isGroupTabShown['grpName'], this.groupArray[this.selectedTabIndex.groupIndex].grpName);

          if (this.groupArray[this.selectedTabIndex.groupIndex].grpType != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].CAVISSON) {
            if (this.groupArray[this.selectedTabIndex.groupIndex].refId == null || this.groupArray[this.selectedTabIndex.groupIndex].refId == '') {
              var _iterator21 = _createForOfIteratorHelper(this.groupArray[this.selectedTabIndex.groupIndex].flowArr),
                  _step21;

              try {
                for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
                  var flow = _step21.value;

                  if (flow.refId == null || flow.refId == '') {
                    var _iterator22 = _createForOfIteratorHelper(flow.reqArr),
                        _step22;

                    try {
                      for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
                        var req = _step22.value;
                        this.makeCopyOfBodyFile(req, this.groupArray[this.selectedTabIndex.groupIndex], flow, true);
                      }
                    } catch (err) {
                      _iterator22.e(err);
                    } finally {
                      _iterator22.f();
                    }
                  }
                }
              } catch (err) {
                _iterator21.e(err);
              } finally {
                _iterator21.f();
              }
            }
          }

          if (this.groupArray[this.selectedTabIndex.groupIndex].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API) {
            this.groupArray[this.selectedTabIndex.groupIndex].scriptName = "".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.subProject, "/").concat(this.scenUtilService.scenarioName, "_").concat(this.groupArray[this.selectedTabIndex.groupIndex].grpName);
          }

          this.isGroupTabShown['grpName'] = this.groupArray[this.selectedTabIndex.groupIndex].grpName;
        }
      }, {
        key: "resetGroupData",
        value: function resetGroupData() {
          this.isEditMode = false;
          this.isHeaderEditorDisplay = false;
          this.selectedGroupData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.groupArray[this.selectedTabIndex.groupIndex]);
        }
      }, {
        key: "cloneRequest",
        value: function cloneRequest(i, k, j, request) {
          if (this.getKeyFromReqData('thinkTime') == "-1" && this.getKeyFromReqData('url').length == 0) {
            this.scenUtilService.errorMessage("Need to provide url of above request before adding a new one.");
            return;
          }

          this.originalName = request.reqName;
          var duplicateRequestName = this.getDuplicateRequestName(request.reqName, i, j, k);
          var requestData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](request);
          requestData.reqName = duplicateRequestName;

          if (this.isDnsApiGroup(i)) {
            this.applyDnsDefaults(requestData);
          }

          this.makeCopyOfBodyFile(requestData, this.groupArray[i], this.groupArray[i].flowArr[j]);
          var searchParamArr = requestData['searchParameters'] && requestData['searchParameters'].length > 0 ? lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](requestData['searchParameters'][0]['paramData']) : [];
          var tmpParamArr = [];

          var _iterator23 = _createForOfIteratorHelper(searchParamArr),
              _step23;

          try {
            for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
              var searchParam = _step23.value;
              var tmpData = searchParam;
              this.originalName = searchParam['paramName'];
              var duplicateParamName = this.getDuplicateAssertionName(lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](requestData['searchParameters'][0]), searchParam['paramName'], false, i, k);
              tmpData['paramName'] = duplicateParamName;
              tmpParamArr.push(tmpData);
            }
          } catch (err) {
            _iterator23.e(err);
          } finally {
            _iterator23.f();
          }

          if (tmpParamArr.length > 0) {
            requestData['searchParameters'][0]['paramData'] = tmpParamArr;
            requestData['searchParameters'][0]['paramName'] = requestData.reqName;
          }

          this.groupArray[i].flowArr[this.selectedTabIndex.flowIndex].reqArr.push(requestData);
          this.addThinkTime(this.groupArray[i].flowArr[this.selectedTabIndex.flowIndex].reqArr);
          this.groupArray[i].totalRequest++;
        }
      }, {
        key: "cloneBrowsers",
        value: function cloneBrowsers(i, k, j, stepBrowser) {
          var browserData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](stepBrowser);
          browserData.stepName = this.browserStepService.getLatestStepName(this.groupArray, this.selectedTabIndex);
          this.groupArray[i].flowArr[this.selectedTabIndex.flowIndex].stepsArr.push(browserData);
          this.groupArray[i].totalBrowserSteps++;
        }
      }, {
        key: "splitFlow",
        value: function splitFlow(i, k, j, step) {
          var steps = [];
          var iSGroupAPI = this.groupArray[i].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API;

          if (iSGroupAPI) {
            steps = this.groupArray[i].flowArr[this.selectedTabIndex.flowIndex].reqArr.splice(k);
          } else {
            steps = this.groupArray[i].flowArr[this.selectedTabIndex.flowIndex].stepsArr.splice(k);
          }

          var splitFlow = {
            flowName: this.getLatestFlowName(),
            isFlowTabPanelOpen: false,
            enable: true,
            reqArr: iSGroupAPI ? steps : [],
            totalRequest: 1,
            totalBrowserSteps: 1,
            stepsArr: iSGroupAPI ? [] : steps
          };
          this.groupArray[i].flowArr.push(splitFlow);
          if (this.groupArray[i].flowArr.length > 1) this.scenUtilService.isFlowInline = 'yes';
        }
      }, {
        key: "getDuplicateRequestName",
        value: function getDuplicateRequestName(name, groupIndex, flowIndex, requestIndex) {
          var transArr = [];

          var _iterator24 = _createForOfIteratorHelper(this.groupArray[groupIndex].flowArr[flowIndex].reqArr),
              _step24;

          try {
            for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
              var transData = _step24.value;
              if (transData.thinkTime == "-1") transArr.push(transData.reqName);
            }
          } catch (err) {
            _iterator24.e(err);
          } finally {
            _iterator24.f();
          }

          var duplicateRequestNameCount = -1; //Count to track latest duplicate name: like Request_1, Copy_Request, Copy_1_Request, Copy_2_Request will be the latest request name.

          var duplicateRequestName = "";
          var isNan = false;

          for (var i = 0; i < transArr.length; i++) {
            //If request selected then continue
            if (this.groupArray[groupIndex].flowArr[flowIndex].reqArr[requestIndex].reqName == transArr[i]) continue;
            if (transArr[i] == name) continue;

            if (transArr[i].startsWith("Copy_") && transArr[i].endsWith(name)) {
              var num = parseInt(transArr[i].substring(6, 7)); //Checking if tens digit is NaN or not

              if (isNaN(num)) num = parseInt(transArr[i].substring(5, 6));else num = parseInt(transArr[i].substring(5, 7));

              if (!isNaN(num)) {
                if (duplicateRequestNameCount < num) {
                  duplicateRequestNameCount = num;
                  duplicateRequestName = transArr[i];
                }
              } else {
                isNan = true;
              }
            } else if (name.startsWith("Copy_") && i == transArr.length - 1) {
              return "Copy_" + name;
            }
          } //When isNan is true then it means that there is only one copy of given request name, so need to latest duplicate request name which is Copy_Request_1


          if (!duplicateRequestName && isNan) duplicateRequestName = "Copy_" + name;
          return this.getDuplicateName(duplicateRequestName || name); // Getting duplicate request name by passing latest duplicate request name
        }
      }, {
        key: "getDuplicateAssertionName",
        value: function getDuplicateAssertionName(parameter, name, fromAssertion, groupIndex, requestIndex) {
          var arr = [];

          var _iterator25 = _createForOfIteratorHelper(this.groupArray[groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr),
              _step25;

          try {
            for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
              var request = _step25.value;
              if (request.thinkTime != "-1") continue;
              var searchParamArr = {};

              if (request['searchParameters'] && request['searchParameters'].length > 0) {
                searchParamArr = request['searchParameters'][0];

                var _iterator26 = _createForOfIteratorHelper(searchParamArr['paramData']),
                    _step26;

                try {
                  for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {
                    var assertion = _step26.value;
                    arr.push(assertion['paramName']);
                  }
                } catch (err) {
                  _iterator26.e(err);
                } finally {
                  _iterator26.f();
                }
              }
            }
          } catch (err) {
            _iterator25.e(err);
          } finally {
            _iterator25.f();
          }

          var duplicateAsserNameCount = -1; //Count to track latest duplicate name: like Request_1, Copy_Request, Copy_1_Request, Copy_2_Request will be the latest request name.

          var duplicateAsserName = "";
          var isNan = false;

          for (var i = 0; i < arr.length; i++) {
            if (name == arr[i]) continue;

            if (arr[i].startsWith("Copy_") && arr[i].endsWith(name)) {
              var num = parseInt(arr[i].substring(6, 7)); //Checking if tens digit is NaN or not

              if (isNaN(num)) num = parseInt(arr[i].substring(5, 6));else num = parseInt(arr[i].substring(5, 7));

              if (!isNaN(num)) {
                if (duplicateAsserNameCount < num) {
                  duplicateAsserNameCount = num;
                  duplicateAsserName = arr[i];
                }
              } else {
                isNan = true;
              }
            } else if (name.startsWith("Copy_") && i == arr.length - 1) {
              return "Copy_" + name;
            }
          } //When isNan is true then it means that there is only one copy of given assertion name, so need to latest duplicate assertion name which is Copy_assertion


          if (!duplicateAsserName && isNan) duplicateAsserName = "Copy_" + name;
          return this.getDuplicateName(duplicateAsserName || name); // Getting duplicate request name by passing latest duplicate request name
        }
      }, {
        key: "filterHeaderSuggestions",
        value: function filterHeaderSuggestions(event, keyOrValue, header) {
          var query = event.query;
          var suggestionsArray = [];
          if (keyOrValue == 'headerKey') suggestionsArray = _constants_headers_key_value_constants__WEBPACK_IMPORTED_MODULE_22__["KEY_ARRAY"];else suggestionsArray = _constants_headers_key_value_constants__WEBPACK_IMPORTED_MODULE_22__["VALUE_ARRAY"][header['headerKey'].name];
          var filteredArray = [];

          try {
            if (suggestionsArray != undefined) filteredArray = suggestionsArray.filter(function (ele) {
              return ele.name.toLowerCase().indexOf(query.toLowerCase()) == 0;
            });
            if (keyOrValue == 'headerKey') this.headersKeySuggestions = filteredArray;else this.headersValueSuggestions = filteredArray;
          } catch (e) {
            console.error(e);
          }
        }
      }, {
        key: "onHeaderKeyUp",
        value: function onHeaderKeyUp(index, event, keyOrValue, isInline) {
          try {
            var headersArr = [];
            if (isInline) headersArr = this.getKeyFromReqData('headers', true);else headersArr = this.selectedTabIndex.reqIndex != -1 ? this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].headers : this.groupArray[this.selectedTabIndex.groupIndex].headers;
            headersArr[index][keyOrValue] = {
              name: event.target.value
            };
            headersArr[index]['del'] = true;
            headersArr[index]['chk'] = true;

            if (headersArr.length - 1 == index) {
              var defaultHeaderObj = {
                "headerKey": {
                  'name': ""
                },
                "headerValue": {
                  'name': ""
                },
                "del": false,
                "chk": false
              };
              headersArr.push(defaultHeaderObj);
            }

            if (isInline) this.setValueInReqData('headers', headersArr, true);
          } catch (e) {
            console.log(e);
          }
        }
      }, {
        key: "deleteHeader",
        value: function deleteHeader(index, isInline) {
          var headersArr = this.selectedTabIndex.reqIndex != -1 ? this.getKeyFromReqData('headers', isInline) : this.groupArray[this.selectedTabIndex.groupIndex].headers;
          headersArr.splice(index, 1);
          this.setValueInReqData('headers', headersArr, isInline, {
            op: 'add',
            localSelTabIndex: null
          });
        }
      }, {
        key: "onHeaderInpSwitchChange",
        value: function onHeaderInpSwitchChange(event, isInline) {
          this.showHeaders = false;

          if (this.isHeaderEditorDisplay) {
            if (isInline) this.headerEditorDataInline = '// Row are seperated by new lines \n' + '// Keys and values are seperated by colon(:) \n' + '// Add // to any row you want to keep unchecked \n';else this.headerEditorData = '// Row are seperated by new lines \n' + '// Keys and values are seperated by colon(:) \n' + '// Add // to any row you want to keep unchecked \n';
            var headersArr = this.selectedTabIndex.reqIndex != -1 ? this.getKeyFromReqData('headers', isInline) : this.groupArray[this.selectedTabIndex.groupIndex].headers;
            this.editorOptionsHdr = Object.assign(Object.assign({}, this.editorOptionsHdr), {
              language: 'text'
            });

            for (var i = 0; i < headersArr.length; i++) {
              if (!headersArr[i].del || headersArr[i].headerKey.name == "") {
                continue;
              }

              var keyValueString = "".concat(headersArr[i].headerKey.name, ": ").concat(headersArr[i].headerValue.name, "\n");
              if (!headersArr[i].chk) keyValueString = "//" + keyValueString;
              if (!isInline) this.headerEditorData += keyValueString;else this.headerEditorDataInline += keyValueString;
            }
          } else {
            this.setValueInReqData('headers', this.getFormattedHeaderData(isInline), isInline, {
              op: 'add',
              localSelTabIndex: null
            });
          }
        }
      }, {
        key: "getFormattedHeaderData",
        value: function getFormattedHeaderData(isInline) {
          var headersTextArr = isInline ? this.headerEditorDataInline.split("\n") : this.headerEditorData.split("\n");
          var headersArr = [];
          if (!this.showHeaders) headersArr = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.scenUtilService.defaultheaders);

          for (var i = 0; i < headersTextArr.length; i++) {
            var headerLine = headersTextArr[i];
            if (headerLine == "") continue;

            if (headerLine.startsWith("//")) {
              if (headerLine.substring(2).trim().startsWith("Row are seperated by new lines") || headerLine.substring(2).trim().startsWith("Keys and values are seperated by colon(:)") || headerLine.substring(2).trim().startsWith("Add // to any row you want to keep unchecked")) continue;
              var headerObj = this.parseHeaderLine(headerLine.substring(2).trim(), true, false);
              if (headerObj) headersArr.push(headerObj);
            } else {
              var _headerObj = this.parseHeaderLine(headerLine.trim(), true, true);

              if (_headerObj) headersArr.push(_headerObj);
            }
          }

          headersArr.push({
            headerKey: {
              name: ""
            },
            headerValue: {
              name: ""
            },
            del: false,
            chk: true
          });
          return headersArr;
        }
      }, {
        key: "parseHeaderLine",
        value: function parseHeaderLine(headerLine, del, chk) {
          if (headerLine.indexOf(":") > -1) {
            var keyValueArr = headerLine.split(":");
            return {
              headerKey: {
                name: keyValueArr[0].trim()
              },
              headerValue: {
                name: keyValueArr[1].trim()
              },
              del: del,
              chk: chk
            };
          } else return null;
        }
      }, {
        key: "onImportBody",
        value: function onImportBody(fileList, isInline) {
          try {
            var bodyFileSelected = fileList[0];
            var fileReader = new FileReader();
            var self = this;
            var ONE_MB = 1048576;

            fileReader.onloadend = function (x) {
              var uploadSize = bodyFileSelected['size'] / ONE_MB;

              if (uploadSize >= 1) {
                self.setValueInReqData('isLargeBody', true, isInline, {
                  op: 'add',
                  localSelTabIndex: null
                });
                self.setValueInReqData('largeBody', fileReader.result.toString().substring(0, ONE_MB), isInline, {
                  op: 'add',
                  localSelTabIndex: null
                });
                self.bodyEditorOptions = Object.assign(Object.assign({}, self.bodyEditorOptions), {
                  readOnly: true
                });
              } else {
                self.bodyEditorOptions = Object.assign(Object.assign({}, self.bodyEditorOptions), {
                  readOnly: false
                });
                self.setValueInReqData('isLargeBody', false, isInline, {
                  op: 'add',
                  localSelTabIndex: null
                });
              }

              self.setValueInReqData('body', fileReader.result.toString(), isInline, {
                op: 'add',
                localSelTabIndex: null
              });
              self.saveAndReadService.bodyKeyFiles["".concat(self.groupArray[self.selectedTabIndex.groupIndex].scriptName, ".txt")] = _defineProperty({}, bodyFileSelected['name'], bodyFileSelected);
              self.scenUtilService.successMessage("Body file uploaded successfully.");
              self.clearSelectedFileInput(isInline);
            };

            fileReader.readAsText(bodyFileSelected);
          } catch (error) {
            console.error("An error occurred:", error);
          }
        }
      }, {
        key: "clearSelectedFileInput",
        value: function clearSelectedFileInput(isInline) {
          var fileInput = document.getElementById(isInline ? 'inlineBodyFile' : 'bodyFile');

          if (fileInput) {
            fileInput.value = '';
          }
        }
      }, {
        key: "onBodyInput",
        value: function onBodyInput(event, isInline) {
          var _a, _b, _c;

          var bodyTxt = isInline ? this.currentReqObj.isLargeBody ? this.currentReqObj.largeBody : this.currentReqObj.body : ((_a = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex]) === null || _a === void 0 ? void 0 : _a.reqArr[this.selectedTabIndex.reqIndex].isLargeBody) ? (_b = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex]) === null || _b === void 0 ? void 0 : _b.reqArr[this.selectedTabIndex.reqIndex].largeBody : (_c = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex]) === null || _c === void 0 ? void 0 : _c.reqArr[this.selectedTabIndex.reqIndex].body;
          var ONE_MB = 1048576;
          var size = bodyTxt.length / ONE_MB;

          if (size >= 1) {
            //Showing only limited body here. Entier content is in 'body' 
            this.setValueInReqData('isLargeBody', true, isInline, {
              op: 'add',
              localSelTabIndex: null
            });
            this.setValueInReqData('largeBody', bodyTxt.toString().substring(0, ONE_MB), isInline, {
              op: 'add',
              localSelTabIndex: null
            });

            if (!this.bodyEditorOptions.readOnly) {
              this.bodyEditorOptions = Object.assign(Object.assign({}, this.bodyEditorOptions), {
                readOnly: true
              }); // Set lockReason to distinguish from referenced lock

              if (isInline) {
                this.currentReqObj['lockReason'] = 'largeFile';
              } else {
                this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex]['lockReason'] = 'largeFile';
              }

              var messageContribution = this.bodyEditor._editor.getContribution('editor.contrib.messageController');

              messageContribution.showMessage("The file size exceeds 1 MB. A preview of the first 1 MB is displayed below (read-only).", this.bodyEditor._editor.getPosition());
            }
          }
        }
      }, {
        key: "onBodyTabSelect",
        value: function onBodyTabSelect(bodyType, isInline) {
          var _a, _b, _c, _d; //bodyData will be reinitialzed only if user changes body type from url encoded or formdata to json,text,xml or js and vice-versa.


          var bodyData;
          if (bodyType.isBodyEditor) bodyData = "";else {
            bodyData = this.getKeyFromReqData('bodyArr', isInline);

            if (bodyType.name == "form-data") {
              var isData = false;

              if (bodyData) {
                var _iterator27 = _createForOfIteratorHelper(bodyData),
                    _step27;

                try {
                  for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
                    var data = _step27.value;

                    if (((_a = data === null || data === void 0 ? void 0 : data.bodyKey) === null || _a === void 0 ? void 0 : _a.name) || ((_b = data === null || data === void 0 ? void 0 : data.bodyValue) === null || _b === void 0 ? void 0 : _b.name)) {
                      isData = true;
                    }

                    if (!(data === null || data === void 0 ? void 0 : data.bodyKeySel)) {
                      data['bodyKeySel'] = 'text';
                      data['bodyKeyOpt'] = [{
                        label: "Text",
                        value: 'text'
                      }, {
                        label: "File",
                        value: 'file'
                      }];
                    }
                  }
                } catch (err) {
                  _iterator27.e(err);
                } finally {
                  _iterator27.f();
                }
              }

              if (!isData) {
                bodyData = [{
                  bodyKey: {
                    name: ""
                  },
                  bodyValue: {
                    name: ""
                  },
                  del: false,
                  chk: true,
                  bodyKeySel: 'text',
                  bodyKeyOpt: [{
                    label: "Text",
                    value: 'text'
                  }, {
                    label: "File",
                    value: 'file'
                  }]
                }];
              } else if (bodyData && bodyData[bodyData.length - 1]['bodyKey']['name'] != '') {
                bodyData.push({
                  bodyKey: {
                    name: ""
                  },
                  bodyValue: {
                    name: ""
                  },
                  del: false,
                  chk: true,
                  bodyKeySel: 'text',
                  bodyKeyOpt: [{
                    label: "Text",
                    value: 'text'
                  }, {
                    label: "File",
                    value: 'file'
                  }]
                });
              }
            } else {
              var _isData = false;

              if (bodyData) {
                var _iterator28 = _createForOfIteratorHelper(bodyData),
                    _step28;

                try {
                  for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {
                    var _data12 = _step28.value;

                    if (((_c = _data12 === null || _data12 === void 0 ? void 0 : _data12.bodyKey) === null || _c === void 0 ? void 0 : _c.name) || ((_d = _data12 === null || _data12 === void 0 ? void 0 : _data12.bodyValue) === null || _d === void 0 ? void 0 : _d.name)) {
                      _isData = true;
                    }

                    if (_data12 === null || _data12 === void 0 ? void 0 : _data12.bodyKeySel) {
                      delete _data12['bodyKeySel'];
                      if (_data12 === null || _data12 === void 0 ? void 0 : _data12.bodyKeyOpt) delete _data12['bodyKeyOpt'];
                    }
                  }
                } catch (err) {
                  _iterator28.e(err);
                } finally {
                  _iterator28.f();
                }
              }

              if (!_isData) bodyData = [{
                bodyKey: {
                  name: ""
                },
                bodyValue: {
                  name: ""
                },
                del: false,
                chk: true
              }];else if (bodyData && bodyData[bodyData.length - 1]['bodyKey']['name'] != '') bodyData.push({
                bodyKey: {
                  name: ""
                },
                bodyValue: {
                  name: ""
                },
                del: false,
                chk: true
              });
            }
          }

          if (bodyType.isBodyEditor) {
            this.bodyEditorOptions = Object.assign(Object.assign({}, this.bodyEditorOptions), {
              language: bodyType.name.toLowerCase()
            });
          }

          this.setValueInReqData('bodyType', bodyType.name.toLowerCase(), isInline, {
            op: 'add',
            localSelTabIndex: null
          });

          if (!this.isGroupOrFlowReferenced(this.groupArray[this.selectedTabIndex.groupIndex], this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex])) {
            if (this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].bodyFile) this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].bodyFile = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].bodyFile.split(".")[0].concat(".".concat(this.getBodyExt(bodyType.name.toLowerCase())));
          }

          this.setValueInReqData('isBodyEditor', bodyType.isBodyEditor, isInline, {
            op: 'add',
            localSelTabIndex: null
          });
          if (bodyData && bodyType.isBodyEditor) this.setValueInReqData('body', bodyData, isInline, {
            op: 'add',
            localSelTabIndex: null
          });else if (bodyData) this.setValueInReqData('bodyArr', bodyData, isInline, {
            op: 'add',
            localSelTabIndex: null
          });
        }
      }, {
        key: "isGroupOrFlowReferenced",
        value: function isGroupOrFlowReferenced(group, flow) {
          if (group.refId && group.refId != '') return true;else if (flow.refId && flow.refId != '') return true;else return false;
        }
      }, {
        key: "getBodyExt",
        value: function getBodyExt(bodyType) {
          if (bodyType == 'form-data') {
            return 'formdata';
          } else if (bodyType == 'x-www-form-urlencoded') {
            return 'urlencoded';
          } else {
            return bodyType;
          }
        }
      }, {
        key: "filterBodySuggestions",
        value: function filterBodySuggestions(event, bodyKeyVal, body) {
          this.bodyKeySuggestions = [];
          this.bodyValueSuggestions = [];
        }
      }, {
        key: "onBodyKeyUp",
        value: function onBodyKeyUp(index, event, keyOrValue, isInline) {
          try {
            var bodyArr = [];
            if (isInline) bodyArr = this.getKeyFromReqData('bodyArr', true);else bodyArr = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex]['bodyArr'];
            bodyArr[index][keyOrValue] = {
              name: event.target.value
            };
            bodyArr[index]['del'] = true;
            bodyArr[index]['chk'] = true;

            if (bodyArr.length - 1 == index) {
              var defaultHeaderObj = {
                "bodyKey": {
                  'name': ""
                },
                "bodyValue": {
                  'name': ""
                },
                "del": false,
                "chk": false
              };

              if (this.getKeyFromReqData('bodyType', isInline) == "form-data") {
                defaultHeaderObj['bodyKeyOpt'] = [{
                  label: "Text",
                  value: "text"
                }, {
                  label: "File",
                  value: "file"
                }];
                defaultHeaderObj['bodyKeySel'] = "text";
              }

              bodyArr.push(defaultHeaderObj);
            }
          } catch (e) {
            console.log(e);
          }
        }
      }, {
        key: "deleteBody",
        value: function deleteBody(index, isInline) {
          var bodyArr = this.getKeyFromReqData('bodyArr', isInline);
          this.setValueInReqData('bodyArr', null, isInline, {
            op: 'splice',
            spliceIndex: index,
            spliceCount: 1
          });
        }
      }, {
        key: "onInitEditorBody",
        value: function onInitEditorBody(event, isInline) {
          var _this27 = this;

          setTimeout(function () {
            if (event === null || event === void 0 ? void 0 : event.layout) {
              event.layout();
            }
          }, 0);

          this.bodyEditor._editor.onKeyUp(function (event) {
            var keyCode = event.keyCode,
                ctrlKey = event.ctrlKey,
                metaKey = event.metaKey;
            if (keyCode === 52 && ctrlKey) _this27.beautify();

            _this27.onBodyInput(event, isInline);

            if (_this27.bodyEditorOptions.readOnly) {
              var messageContribution = _this27.bodyEditor._editor.getContribution('editor.contrib.messageController');

              var reqData = isInline ? _this27.currentReqObj : _this27.groupArray[_this27.selectedTabIndex.groupIndex].flowArr[_this27.selectedTabIndex.flowIndex].reqArr[_this27.selectedTabIndex.reqIndex];
              var lockReason = reqData['lockReason'];
              var message = "The file size exceeds 1 MB. A preview of the first 1 MB is displayed below (read-only).";

              if (lockReason === 'referenced') {
                message = "Post body of Imported Group/Flow cannot be edited here. You can edit from source test.";
              }

              messageContribution.showMessage(message, _this27.bodyEditor._editor.getPosition());
            }
          });
        }
      }, {
        key: "beautify",
        value: function beautify() {
          var _this28 = this;

          try {
            if (!this.getKeyFromReqData('body')) return;
            setTimeout(function () {
              _this28.bodyEditor._editor.getAction('editor.action.formatDocument').run();
            }, 100);
          } catch (e) {}
        }
      }, {
        key: "onAdditionalInfoTabChange",
        value: function onAdditionalInfoTabChange(e) {
          var _this29 = this;

          if (e.index === 1) {
            this.bodyEditorOptions = Object.assign(Object.assign({}, this.bodyEditorOptions), {
              language: 'text'
            });
            setTimeout(function () {
              _this29.bodyEditor._editor.layout();
            }, 100);
          }
        }
      }, {
        key: "getKeyFromReqData",
        value: function getKeyFromReqData(key, isInline) {
          if (this.selectedTabIndex.reqIndex < 0) return null;

          if (isInline) {
            return this.currentReqObj[key];
          } else return lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex][key]);
        }
        /**
         * This is generic method to set key data in group/flow/request of groupArray.
         * index is fetched from 'selectedTabIndex'.
         * @param key key to modify
         * @param value value to set
         * @param isInline isInline
         * @param setDataObj If this object is present then data from this will be used to do operation in groupArray.
         *        Ex: {op = '', localSelTabIndex = null, spliceIndex = -1, spliceCount = -1, type = ''}
         */

      }, {
        key: "setValueInReqData",
        value: function setValueInReqData(key, value, isInline, setDataObj) {
          if (isInline) {
            this.currentReqObj[key] = value;
          } else {
            if (setDataObj) {
              var _Object$assign = Object.assign({}, setDataObj),
                  _Object$assign$op = _Object$assign.op,
                  op = _Object$assign$op === void 0 ? '' : _Object$assign$op,
                  _Object$assign$localS = _Object$assign.localSelTabIndex,
                  localSelTabIndex = _Object$assign$localS === void 0 ? null : _Object$assign$localS,
                  _Object$assign$splice = _Object$assign.spliceIndex,
                  spliceIndex = _Object$assign$splice === void 0 ? -1 : _Object$assign$splice,
                  _Object$assign$splice2 = _Object$assign.spliceCount,
                  spliceCount = _Object$assign$splice2 === void 0 ? -1 : _Object$assign$splice2,
                  _Object$assign$type = _Object$assign.type,
                  type = _Object$assign$type === void 0 ? '' : _Object$assign$type,
                  _Object$assign$txtToR = _Object$assign.txtToReplace,
                  txtToReplace = _Object$assign$txtToR === void 0 ? '' : _Object$assign$txtToR,
                  _Object$assign$txtToB = _Object$assign.txtToBeReplaced,
                  txtToBeReplaced = _Object$assign$txtToB === void 0 ? '' : _Object$assign$txtToB;

              if (!localSelTabIndex) {
                localSelTabIndex = this.selectedTabIndex;
              }

              var data;
              if (localSelTabIndex.reqIndex == -1 && localSelTabIndex.flowIndex == -1) data = this.groupArray[localSelTabIndex.groupIndex];else if (localSelTabIndex.reqIndex == -1) data = this.groupArray[localSelTabIndex.groupIndex].flowArr[localSelTabIndex.flowIndex];else data = this.groupArray[localSelTabIndex.groupIndex].flowArr[localSelTabIndex.flowIndex].reqArr[localSelTabIndex.reqIndex];
              if (op == 'add') data[key] = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](value);else if (op == 'push') {
                if (data[key]) data[key].push(lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](value));else data[key] = [lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](value)];
              } else if (op == 'splice' && spliceIndex != -1 && spliceCount != -1) data[key].splice(spliceIndex, spliceCount);else if (op == 'update' && spliceIndex != -1 && spliceCount != -1) data[key].splice(spliceIndex, spliceCount, value);else if (op == 'replace' && txtToBeReplaced != '' && txtToReplace != '') data[key] = data[key].replace(txtToBeReplaced, txtToReplace);
            } else {
              if (this.selectedTabIndex.reqIndex != -1) {
                this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex][key] = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](value);
              } else this.groupArray[this.selectedTabIndex.groupIndex][key] = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](value);
            }
          }
        }
      }, {
        key: "deleteRequest",
        value: function deleteRequest(i, k, j) {
          var _this30 = this;

          var _a;

          if (this.groupArray[i].flowArr[j].reqArr.length < 2) {
            this.scenUtilService.errorMessage("Cannot delete request.");
            return;
          }

          var deleteCount = 1; //Checking if req is surronded by think time. if it is then delete think time also. also if deleting first request then delete subsequent thinktime also

          if ((k == 0 || this.groupArray[i].flowArr[j].reqArr[k - 1].thinkTime != "-1") && ((_a = this.groupArray[i].flowArr[j].reqArr[k + 1]) === null || _a === void 0 ? void 0 : _a.thinkTime) != "-1") {
            if (this.groupArray[i].flowArr[j].reqArr.length == 2) {
              this.scenUtilService.errorMessage("Cannot delete request.");
              return;
            }

            deleteCount = 2;
          }

          this.confirmationService.confirm({
            message: 'Are you sure to delete the selected request?',
            //key: "paramAssertionList",
            accept: function accept() {
              _this30.deleteBodyFromScenDir(i, j, k);

              _this30.deleteAssertionsFromAssertList(_this30.groupArray[i].flowArr[j].reqArr[k].reqName);

              _this30.groupArray[i].flowArr[j].reqArr.splice(k, deleteCount);

              _this30.groupArray[i].totalRequest--;
              _this30.selectedTabIndex = {
                groupIndex: i,
                flowIndex: j,
                reqIndex: k > 0 ? k - 2 : 0,
                browserStepsIndex: k > 0 ? k - 2 : 0
              };
            },
            reject: function reject() {}
          });
        }
      }, {
        key: "deleteAssertionsFromAssertList",
        value: function deleteAssertionsFromAssertList(pageName) {
          this.assertionConfig.assertions = this.assertionConfig.assertions.filter(function (a) {
            var _a;

            return !((_a = a.page) === null || _a === void 0 ? void 0 : _a.includes(pageName));
          });
          this.onAssertionConfigChange(this.assertionConfig);
        }
      }, {
        key: "deleteBrowser",
        value: function deleteBrowser(i, k, j) {
          var _this31 = this;

          if (this.groupArray[i].flowArr[j].stepsArr.length <= 1) {
            this.scenUtilService.errorMessage("Cannot delete Interaction.");
            return;
          }

          this.confirmationService.confirm({
            message: 'Are you sure to delete the selected interaction?',
            //key: "paramAssertionList",
            accept: function accept() {
              _this31.groupArray[i].flowArr[j].stepsArr.splice(k, 1);

              _this31.groupArray[i].totalBrowserSteps--;
              var index = k > 0 ? k - 1 : 0;

              _this31.isBrowserTabShown(_this31.groupArray[i].flowArr[j].stepsArr[index], i, -1, j, index);
            },
            reject: function reject() {}
          });
        }
      }, {
        key: "isGroupTabShown",
        value: function isGroupTabShown(groupData, groupIndex, reqIndex, flowIndex, browserStepsIndex) {
          this.isGroupTabShown['grpName'] = groupData.grpName;
          this.selectedTabNum = 0; //Set tab name first for group because changing indexes first will cause template error

          if (groupIndex != undefined && reqIndex != undefined) {
            this.selectedTabIndex = {
              groupIndex: groupIndex,
              reqIndex: reqIndex,
              flowIndex: flowIndex,
              browserStepsIndex: browserStepsIndex
            };
          }

          this.createParameterTableData();
          this.createAssertionTableData();
          this.assertionConfig = {
            assertions: groupData.assertionsV2 || []
          };
          this.selectedGroupData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](groupData);
          this.fillGroupData(groupData);
          this.fillPrePostScriptData(groupData);
          this.scenUtilService.selectedScript = groupData.grpName;
          this.selectGrpType = 'design';
          this.showParameterTab = false;
          this.showPostScriptTab = false;
          this.showPreScriptTab = false;
          if (this.selectedGroupData.scriptMode == null || this.selectedGroupData.scriptMode == '') this.scriptMode = 'visual';else {
            this.scriptMode = this.selectedGroupData.scriptMode;
          }

          if (this.selectedGroupData.scriptMode == 'code') {
            this.openCodeEditor();
            this.changeDetectorRef.detectChanges();
            this.showScriptTab = true;
          } else {
            // Properly clear the script outlet before switching to visual mode
            this.router.navigate([{
              outlets: {
                script: null
              }
            }]);
            this.showScriptTab = false;
          }

          this.updateDnsProtocolViewState();
        }
      }, {
        key: "fillGroupData",
        value: function fillGroupData(groupData) {
          var _this32 = this;

          this.groupName = groupData.grpName;

          if (groupData.grpType != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].CAVISSON) {
            var _loop2 = function _loop2() {
              if (key == 'file') {
                var fileParamArr = [];

                var _iterator29 = _createForOfIteratorHelper(groupData.parameters[key]),
                    _step29;

                try {
                  var _loop3 = function _loop3() {
                    var param = _step29.value;

                    _this32.saveAndReadService.getFileFromScenario(param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].fileName], "".concat(_this32.scenUtilService.Project, "/").concat(_this32.scenUtilService.subProject, "/").concat(_this32.scenUtilService.scenarioName)).then(function (file) {
                      param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].file] = file;
                      fileParamArr.push(param);
                    });
                  };

                  for (_iterator29.s(); !(_step29 = _iterator29.n()).done;) {
                    _loop3();
                  }
                } catch (err) {
                  _iterator29.e(err);
                } finally {
                  _iterator29.f();
                }

                groupData.parameters[key] = fileParamArr;
              }
            };

            for (var key in groupData.parameters) {
              _loop2();
            }
          }
        }
      }, {
        key: "fillPrePostScriptData",
        value: function fillPrePostScriptData(groupData) {
          var _this33 = this;

          var offset = 0;
          var limit = 2048;
          var cctx = this.sessionService.session.cctx;
          var isEditMode = false;
          var data = "";
          var fileName = "".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.subProject, "/scenarios/").concat(this.scenUtilService.scenarioName, "/").concat(this.groupArray[this.selectedTabIndex.groupIndex].grpName, ".pre");

          if (!groupData.prescript) {
            this.getPrePostScriptData(fileName, offset, isEditMode, limit, cctx).then(function (res) {
              if (res.data) {
                groupData.prescript = res.data.toString();
              } else {
                _this33.createPrePostScript(true, _this33.buildVersionData, groupData.scriptLanguage);

                groupData.prescript = _this33.scenUtilService.defaultPreScript;
              }

              _this33.replacePackageName();
            });
          }

          fileName = "".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.subProject, "/scenarios/").concat(this.scenUtilService.scenarioName, "/").concat(this.groupArray[this.selectedTabIndex.groupIndex].grpName, ".post");

          if (!groupData.postscript) {
            this.getPrePostScriptData(fileName, offset, isEditMode, limit, cctx).then(function (res) {
              if (res.data) {
                groupData.postscript = res.data.toString();
              } else {
                _this33.createPrePostScript(true, _this33.buildVersionData, groupData.scriptLanguage);

                groupData.postscript = _this33.scenUtilService.defaultPostScript;
              }

              _this33.replacePackageName();
            });
          }
        }
      }, {
        key: "showSelectedTab",
        value: function showSelectedTab(data, selectedTabNum, groupIndex, reqIndex, flowIndex, browserStepsIndex) {
          this.isEditMode = true; //Adding request or group data whenever user switches from on request/group/flow to another. This should run before updating selectedTabIndex.

          this.resetInlineReqObj();

          switch (selectedTabNum) {
            case 0:
              this.isGroupTabShown(data, groupIndex, reqIndex, flowIndex, browserStepsIndex);
              break;

            case 1:
              this.isRequestTabShown(data, groupIndex, reqIndex, flowIndex, browserStepsIndex);
              break;

            case 2:
              this.isThinkTabShown(data, groupIndex, reqIndex, flowIndex, browserStepsIndex);
              break;

            case 4:
              this.isFlowTabShown(data, groupIndex, reqIndex, flowIndex, browserStepsIndex);
              break;

            case 5:
              this.isBrowserTabShown(data, groupIndex, reqIndex, flowIndex, browserStepsIndex);
              break;
          }

          this.grpTypeAPI();
          this.isSelectGrpData(data); // this.router.navigateByUrl('/scenario/basicScenario/design/scenDesign'); 
          // if(data['scriptMode'] != undefined && data['scriptMode']=="code") {
          //   this.openCodeEditor(true);
          // }
          // if(data['scriptMode'] != undefined && data['scriptMode']) {
          //   if(this.router.url.includes('script-editor')) {
          //     this.openCodeEditor();
          //     this.changeDetectorRef.detectChanges();
          //   }
          // } else {
          //   this.router.navigate(['../'], { relativeTo: this.route });
          // }
        }
      }, {
        key: "isBrowserTabShown",
        value: function isBrowserTabShown(data, groupIndex, reqIndex, flowIndex, browserStepsIndex) {
          this.selectedTabIndex = {
            groupIndex: groupIndex,
            reqIndex: reqIndex,
            flowIndex: flowIndex,
            browserStepsIndex: browserStepsIndex
          };
          this.selectedTabNum = 5;
          this.selectedBrowserData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.normalizeLaunchAppStepForEdit(data));
          this.updateDnsProtocolViewState();
        } // Normalizes LaunchApp ids for edit-mode rendering so UI always reads Android appPackage and iOS bundleId.

      }, {
        key: "normalizeLaunchAppStepForEdit",
        value: function normalizeLaunchAppStepForEdit(stepData) {
          if (!stepData || ((stepData.type || '') + '').toLowerCase() !== 'launchapp') {
            return stepData;
          }

          var normalizedStep = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](stepData);
          var normalizedAndroidAppPackage = ((normalizedStep.appPackage || '') + '').trim();
          var normalizedIosBundleId = ((normalizedStep.bundleId || '') + '').trim();
          normalizedStep.appPackage = normalizedAndroidAppPackage;
          normalizedStep.bundleId = normalizedIosBundleId;
          return normalizedStep;
        }
        /**
         * Ensure assertionConfig and selectedGroupData reflect the provided group index.
         */

      }, {
        key: "setAssertionConfigForGroup",
        value: function setAssertionConfigForGroup(groupIndex) {
          if (this.groupArray && this.groupArray.length > groupIndex && this.groupArray[groupIndex]) {
            this.selectedGroupData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.groupArray[groupIndex]);
            this.assertionConfig = {
              assertions: this.groupArray[groupIndex].assertionsV2 || []
            };
          } else {
            console.warn('setAssertionConfigForGroup: invalid groupIndex', groupIndex);
            this.selectedGroupData = null;
            this.assertionConfig = {
              assertions: []
            };
          }
        }
      }, {
        key: "isRequestTabShown",
        value: function isRequestTabShown(reqData, groupIndex, reqIndex, flowIndex, browserStepsIndex) {
          if (groupIndex != undefined && reqIndex != undefined) {
            this.selectedTabIndex = {
              groupIndex: groupIndex,
              reqIndex: reqIndex,
              flowIndex: flowIndex,
              browserStepsIndex: browserStepsIndex
            };
          }

          this.selectedTabNum = 1;
          this.selectedRequestData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](reqData); // make sure assertions shown correspond to this group

          if (typeof groupIndex === 'number') this.setAssertionConfigForGroup(groupIndex);
          this.selectedNextThinkTime = this.groupArray[groupIndex].flowArr[flowIndex].reqArr[reqIndex + 1].thinkTime;
          var shareTestInfo = {
            refId: this.groupArray[groupIndex].flowArr[flowIndex].refId,
            type: _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_41__["BROWSE_TEST_MODE"].IMPORT_FLOW
          };
          this.fillRequestData(reqData, null, shareTestInfo); // we are doing this to go back to request ui from inline request ui when clicking on a request.

          if (this.manageInlineReqBtn) this.manageInlineReqBtn = false;
          this.updateDnsProtocolViewState();
        }
      }, {
        key: "fillRequestData",
        value: function fillRequestData(reqData, oldBodyFile, shareTestInfo) {
          var _this34 = this;

          var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;

          var bodyObj = {};
          this.bodyEditorOptions = Object.assign(Object.assign({}, this.bodyEditorOptions), {
            readOnly: false
          }); // If this request/flow/group is referenced (shared), disable editing of request body.

          var isReferenced = !!((shareTestInfo === null || shareTestInfo === void 0 ? void 0 : shareTestInfo.refId) || ((_c = (_a = this.groupArray) === null || _a === void 0 ? void 0 : _a[(_b = this.selectedTabIndex) === null || _b === void 0 ? void 0 : _b.groupIndex]) === null || _c === void 0 ? void 0 : _c.refId) || ((_j = (_g = (_f = (_d = this.groupArray) === null || _d === void 0 ? void 0 : _d[(_e = this.selectedTabIndex) === null || _e === void 0 ? void 0 : _e.groupIndex]) === null || _f === void 0 ? void 0 : _f.flowArr) === null || _g === void 0 ? void 0 : _g[(_h = this.selectedTabIndex) === null || _h === void 0 ? void 0 : _h.flowIndex]) === null || _j === void 0 ? void 0 : _j.refId));

          if (reqData.bodyFile && !reqData.body && ((_k = reqData.bodyArr) === null || _k === void 0 ? void 0 : _k.length) == 0 && this.bodyFilesToDelete.indexOf(reqData.bodyFile) == -1) {
            this.fetchingBody = true;
            this.saveAndReadService.getBodyInString(reqData, oldBodyFile, shareTestInfo).then(function (res) {
              _this34.fetchingBody = false;

              if (!res || res['status'] == "fail") {
                reqData['bodyType'] = "text";
                reqData['isBodyEditor'] = true;
                return;
              }

              bodyObj = _this34.saveAndReadService.setReqBody(reqData, res);
              reqData['isBodyEditor'] = bodyObj['isBodyEditor'];
              reqData['body'] = bodyObj['body'];
              reqData['bodyArr'] = bodyObj['bodyArr'];
              reqData['bodyType'] = bodyObj['bodyType']; // Make editor read-only when body belongs to a referenced/shared flow or group

              var ONE_MB = 1048576;

              if (isReferenced) {
                // reqData['isBodyEditor'] = false;
                _this34.bodyEditorOptions = Object.assign(Object.assign({}, _this34.bodyEditorOptions), {
                  readOnly: true
                });
                reqData['bodyLocked'] = true;
                reqData['lockReason'] = 'referenced'; // flag to show: "Post body of Imported Group/Flow cannot be edited here, you can edit from source test"
              } else if (reqData['body'] && reqData['body'].toString().length / ONE_MB >= 1) {
                reqData['isLargeBody'] = true;
                reqData['largeBody'] = reqData['body'].toString().substring(0, ONE_MB);
                _this34.bodyEditorOptions = Object.assign(Object.assign({}, _this34.bodyEditorOptions), {
                  readOnly: true
                });

                if (!reqData['lockReason']) {
                  reqData['lockReason'] = 'largeFile'; // distinguish from referenced lock
                }
              } else {
                _this34.bodyEditorOptions = Object.assign(Object.assign({}, _this34.bodyEditorOptions), {
                  readOnly: false
                });
                reqData['isLargeBody'] = false;
              }

              if (reqData['bodyFile'].includes("form-data")) {
                for (var i in reqData['bodyArr']) {
                  if (reqData['bodyArr'][i]['bodyKeySel'] == "file") {}
                }
              }
            });
          } else if (!reqData.bodyFile && reqData.bodyType == 'text' && !reqData.isBodyEditor) {
            reqData.isBodyEditor = true;

            if (reqData.body) {
              try {
                JSON.parse(reqData.body);
                reqData.bodyType = 'json';
              } catch (e) {
                reqData.bodyType = 'text';
              }
            }
          } else {
            if (!isReferenced) {
              if (reqData.isLargeBody) {
                this.bodyEditorOptions = Object.assign(Object.assign({}, this.bodyEditorOptions), {
                  readOnly: true
                });
                reqData['lockReason'] = 'largeFile';
              } else if (!reqData.isLargeBody) this.bodyEditorOptions = Object.assign(Object.assign({}, this.bodyEditorOptions), {
                readOnly: false
              });
            } else {
              // referenced body should remain read-only
              this.bodyEditorOptions = Object.assign(Object.assign({}, this.bodyEditorOptions), {
                readOnly: true
              });
              reqData['bodyLocked'] = true;
              reqData['lockReason'] = 'referenced';
            }
          }
        }
      }, {
        key: "isThinkTabShown",
        value: function isThinkTabShown(reqData, groupIndex, reqIndex, flowIndex, browserStepsIndex) {
          if (groupIndex != undefined && reqIndex != undefined) {
            this.selectedTabIndex = {
              groupIndex: groupIndex,
              reqIndex: reqIndex,
              flowIndex: flowIndex,
              browserStepsIndex: browserStepsIndex
            };
          }

          this.selectedTabNum = 2;
          this.selectedRequestData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](reqData);
          this.updateDnsProtocolViewState();
          if (typeof groupIndex === 'number') this.setAssertionConfigForGroup(groupIndex);
        }
      }, {
        key: "addThinkTime",
        value: function addThinkTime(arr) {
          //Adding request or group data whenever user switches from on request/group/flow to another.
          //Usecase: When user is editing some particular request or group and decides to add request/thinktime/group without switching to any other flow.
          this.grpTypeAPI();
          var reqData = {
            thinkTime: "0",
            assertions: [],
            body: "",
            bodyArr: [],
            bodyType: "text",
            isBodyEditor: true,
            method: "GET",
            reqName: "",
            searchParameters: [],
            url: "",
            headers: [{
              headerKey: {
                name: "Content-Length"
              },
              headerValue: {
                name: "<calculated when request is sent>"
              },
              toolTip: "The Content-Length is added to help the server for HTTP request's size. If Content-Length is specified and it does not match the length of the message-line, the message is either truncated, or padded with nulls to the specified length.\n          Note that this setting is applied to all requests of the group and for GET or DELETE  method type the length will be zero.",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "Host"
              },
              headerValue: {
                name: "<calculated when request is sent>"
              },
              toolTip: "The Host header is added to identify the domain name for which a request is being sent to the server. This header is implicitly sent with every HTTP request.\n          It is most likely that without this header, your request will return an HTTP 400 error",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "Accept-Encoding"
              },
              headerValue: {
                name: " gzip, deflate, br, compress;q=0.9"
              },
              toolTip: "The Accept-Encoding header is added to indicate to the server that LoadTest supports a defined list of content-encoding or compression algorithms as response. \n          You can remove this header or enter a different value. \n              For this to be considered, you need to enable Accept-Encoding header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n          Doing that may not accurately render the response within the app.\n              Note that this setting is applied to all requests of the group.",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "Accept"
              },
              headerValue: {
                name: "text/plain,application/json,text/html,application/javascript,application/xml"
              },
              toolTip: " Accept header is added to tell the server that LoadTest can understand and process all forms of response content types.\n          It is recommended that this header be sent. But You can remove this header or enter a different value. \n              For this to be considered, you need to enable Accept header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n              Note that this setting is applied to all requests of the group.\n          ",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "User-Agent"
              },
              headerValue: {
                name: "Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1"
              },
              toolTip: "The User-Agent header is added to help the server identify Mozilla as the HTTP requesting application or client.\n          It is recommended that this header be sent. But you can remove this header or enter a different value. \n              For this to be considered, you need to enable User-Agent header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n              Note that this setting is applied to all requests of the group.\n          ",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "Connection"
              },
              headerValue: {
                name: "keep-alive"
              },
              toolTip: "LoadTest added the Connection header to indicate the server to keep the underlying network connection open once the current response is received. This allows LoadTest to reuse the same connection for faster response times in subsequent requests to the same server.\n          You can remove this header or enter a new one with a different value, such as 'Connection: Close' to control this behaviour.\n              For this to be considered, you need to enable Accept header in Group Based Settings -> Protocol Settings -> HTTP -> keep-alive section. \n              Note that this setting is applied to all requests of the group.\n          ",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: "Keep-Alive"
              },
              headerValue: {
                name: "300"
              },
              toolTip: "Keep Alive header is added to set a timeout and a maximum amount of requests. It can also be used to allow a single TCP connection to remain open for multiple HTTP requests/responses\n          You can remove this header or enter a different value. \n          For this to be considered, you need to set a custom value in Group Based Settings -> Protocol Settings -> HTTP -> Keep Alive -> \"Keep Alive Timeout\" section\n          Note that this setting is applied to all requests of the group and it is not applicable for HTTP/2",
              del: false,
              chk: true
            }, {
              headerKey: {
                name: ""
              },
              headerValue: {
                name: ""
              },
              del: false,
              chk: false
            }]
          };
          arr.push(reqData);
        }
      }, {
        key: "onSettingHide",
        value: function onSettingHide(whichGrp) {
          if (!this.isRouterActive) return;

          if (whichGrp == "import") {
            if (this.groupArray[this.groupArray.length - 1].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API) this.isRequestTabShown(this.groupArray[this.groupArray.length - 1].flowArr[0]['reqArr'][0], this.groupArray.length - 1, 0, 0);else this.isGroupTabShown(this.groupArray[this.groupArray.length - 1], this.groupArray.length - 1, -1, -1);
          } else {
            //On hide settings, if group is API then read from reqArr else from stepsArr
            if (this.groupArray[0].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API) {
              if (this.groupArray[0].flowArr.length != 0) this.isRequestTabShown(this.groupArray[0].flowArr[0]['reqArr'][0], 0, 0, 0);
            } else {
              this.isBrowserTabShown(this.groupArray[0].flowArr[0]['stepsArr'][0], 0, -1, 0, 0);
            }

            this.scenUtilService.onSidebarClose.next();
          }

          this.scenUtilService.advSidebar = false;
          this.isImportSideBar = false;
          this.isRouterActive = false;
          this.router.navigate(['/scenario/basicScenario/design/scenDesign']);
          this.isGroupDialogShown = false; //This is to scroll request list to starting when closing side bar manually.

          if (whichGrp != "import") this.scrollToReqList(0);
        }
      }, {
        key: "clearAPIRoute",
        value: function clearAPIRoute() {
          this.router.navigate(['/scenario/basicScenario/design/scenDesign/parameter', {
            outlets: {
              parameter: null
            }
          }]);
          this.router.navigate(['/scenario/basicScenario/design/scenDesign']);
        }
      }, {
        key: "clearAssertionRoute",
        value: function clearAssertionRoute() {
          this.router.navigate(['/scenario/basicScenario/design/scenDesign/checkpoint', {
            outlets: {
              checkpoint: null
            }
          }]);
          this.router.navigate(['/scenario/basicScenario/design/scenDesign']);
        }
        /**
         *
         * if request moved above -> then check i+1 and i+2 check currentIndex+2<=length-1
         * if request moved below -> then check i-1 and i-2 check currentIndex-2>0
         * @param event
         * @param i
         * @returns
         */

      }, {
        key: "flowDrop",
        value: function flowDrop(event, i) {
          Object(_angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_4__["moveItemInArray"])(this.groupArray[i].flowArr, event.previousIndex, event.currentIndex);
        }
      }, {
        key: "requestDrop",
        value: function requestDrop(event, i, j) {
          if (event.previousIndex == event.currentIndex) return; // Here, we are moving requests and thinktime together.
          else if (event.previousIndex < event.currentIndex) {
            Object(_angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_4__["moveItemInArray"])(this.groupArray[i].flowArr[j].reqArr, event.previousIndex, event.currentIndex + 1);
            Object(_angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_4__["moveItemInArray"])(this.groupArray[i].flowArr[j].reqArr, event.previousIndex, event.currentIndex + 1);
          } else {
            Object(_angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_4__["moveItemInArray"])(this.groupArray[i].flowArr[j].reqArr, event.previousIndex, event.currentIndex);
            Object(_angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_4__["moveItemInArray"])(this.groupArray[i].flowArr[j].reqArr, event.previousIndex + 1, event.currentIndex + 1);
          }
          this.selectedTabIndex.reqIndex = event.currentIndex;
        }
      }, {
        key: "browserDrop",
        value: function browserDrop(event, i, j) {
          if (event.previousIndex == event.currentIndex) return;
          Object(_angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_4__["moveItemInArray"])(this.groupArray[i].flowArr[j].stepsArr, event.previousIndex, event.currentIndex);
          this.selectedTabIndex.browserStepsIndex = event.currentIndex;
        }
      }, {
        key: "showGroupDialog",
        value: function showGroupDialog() {
          if (this.groupArray[0].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER || this.groupArray[0].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            var isBrowserStepsValid = this.browserStepService.checkValidation(this.groupArray, this.selectedTabIndex, this.scenUtilService.isFlowInline);

            if (isBrowserStepsValid && !isBrowserStepsValid.isValid) {
              this.scenUtilService.errorMessage(isBrowserStepsValid.message);
              return;
            }
          }

          this.isGroupDialogShown = true;
        }
      }, {
        key: "importScript",
        value: function importScript() {
          //Adding request or group data whenever user switches from on request/group/flow to another.
          //Usecase: When user is editing some particular request or group and decides to add request/thinktime/group without switching to any other flow.
          this.grpTypeAPI();
          this.isEditMode = false;
          this.scenUtilService.advSidebar = true;
          this.isImportSideBar = true;
          this.isRouterActive = true;
          this.router.navigate(['/scenario/basicScenario/design/scenDesign/importScript']);
          this.isGroupDialogShown = false;
        }
      }, {
        key: "importFlow",
        value: function importFlow() {
          //Adding request or group data whenever user switches from on request/group/flow to another.
          //Usecase: When user is editing some particular request or group and decides to add request/thinktime/group without switching to any other flow.
          this.grpTypeAPI();
          this.showImportFlowSidebar = true;
        }
      }, {
        key: "onGroupBasedSettingsClick",
        value: function onGroupBasedSettingsClick() {
          this.scenUtilService.advSidebar = true;
          this.scenUtilService.isGroupBased = true;
          this.isRouterActive = true;
          this.router.navigate(['/scenario/basicScenario/design/scenDesign/settings']);
        }
      }, {
        key: "onFunctionalSettingsClick",
        value: function onFunctionalSettingsClick() {
          this.scenUtilService.advSidebar = true;
          this.scenUtilService.isGroupBased = true;
          this.isRouterActive = true;
          this.router.navigate(['/scenario/basicScenario/design/scenDesign/settings']);
        }
      }, {
        key: "showAPI",
        value: function showAPI(routeName) {
          this.scenUtilService.responseArray = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.groupArray[this.selectedTabIndex.groupIndex].parameters);
          this.router.navigate(['/scenario/basicScenario/design/scenDesign/parameter', {
            outlets: {
              parameter: ['addParameter', routeName]
            }
          }]);

          if (routeName == "file-test-data-generator") {
            this.fullscreen = true;
            this.toggleView(true);
          }

          this.scenUtilService.paramSidebar = true;
          this.scenUtilService.editParamName = '';
          this.scriptParameterService.getTransactions(this.allReqsOfSelectedGrp());
        }
      }, {
        key: "addAssertion",
        value: function addAssertion() {
          this.scenUtilService.checkSidebar = true;
          this.router.navigate(['/scenario/basicScenario/design/scenDesign/checkpoint', {
            outlets: {
              checkpoint: ['addAssertion']
            }
          }]);
          this.scriptParameterService.getTransactions(this.allReqsOfSelectedGrp());
          this.emitAssertionsToScript();
        } // Entry point for conversion UI: validates selected group/platform and loads opposite-platform app list.

      }, {
        key: "convertToCrossPlatformTest",
        value: function convertToCrossPlatformTest() {
          var group = this.getSelectedRdtNativeGroupForCrossPlatform();

          if (!group || !this.setCrossPlatformSourcePlatform(group)) {
            return;
          }

          this.showCrossPlatformModeDialog = true;
        } // Lets user choose automatic or manual conversion from a single menu entry.

      }, {
        key: "onCrossPlatformModeSelect",
        value: function onCrossPlatformModeSelect(mode) {
          this.showCrossPlatformModeDialog = false;

          if (mode === 'manual') {
            this.convertToCrossPlatformTestManually();
            return;
          }

          this.openCrossPlatformAutoDialog();
        } // Opens automatic conversion dialog and loads opposite-platform app list.

      }, {
        key: "openCrossPlatformAutoDialog",
        value: function openCrossPlatformAutoDialog() {
          var _this35 = this;

          var group = this.getSelectedRdtNativeGroupForCrossPlatform();

          if (!group || !this.setCrossPlatformSourcePlatform(group)) {
            return;
          }

          this.crossPlatformSelectedApp = '';
          this.crossPlatformIsUploading = false;
          this.prefillCrossPlatformAppIdentifiers();
          this.showCrossPlatformDialog = true;
          this.rdtAppListService.getApplicationOptions().subscribe(function (options) {
            _this35.crossPlatformApplicationOpt = _this35.getOppositePlatformApps(_this35.crossPlatformSourcePlatform, options || []);
          }, function () {
            _this35.crossPlatformApplicationOpt = [];
          });
        } // Manual conversion mode: creates dual-platform locator structure in UI without triggering backend conversion API.

      }, {
        key: "convertToCrossPlatformTestManually",
        value: function convertToCrossPlatformTestManually() {
          var group = this.getSelectedRdtNativeGroupForCrossPlatform();

          if (!group || !this.setCrossPlatformSourcePlatform(group)) {
            return;
          }

          var sourcePlatform = this.crossPlatformSourcePlatform;

          if (sourcePlatform !== _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] && sourcePlatform !== _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"]) {
            return;
          }

          this.applyManualCrossPlatformStructure(group, sourcePlatform);
          this.applyCrossPlatformDeviceConfig(group, sourcePlatform);
          this.changeDetectorRef.detectChanges();
          this.scenUtilService.successMessage('Manual cross-platform conversion applied. Fill locators for the other platform before saving.');
        } // Shared guard for cross-platform conversion actions to avoid duplicated selected-group checks.

      }, {
        key: "getSelectedRdtNativeGroupForCrossPlatform",
        value: function getSelectedRdtNativeGroupForCrossPlatform() {
          var groupIdx = this.selectedTabIndex.groupIndex;

          if (groupIdx == null || groupIdx < 0) {
            return null;
          }

          var group = this.groupArray[groupIdx];

          if (!group || group.grpType !== _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            this.scenUtilService.warnMessage('Convert to Cross-Platform Test is currently available only for Mobile application test groups.');
            return null;
          }

          return group;
        } // Resolves and stores source platform for the selected RDT group.

      }, {
        key: "setCrossPlatformSourcePlatform",
        value: function setCrossPlatformSourcePlatform(group) {
          this.crossPlatformSourcePlatform = this.getRdtGroupPlatform(group);

          if (!this.crossPlatformSourcePlatform) {
            this.scenUtilService.errorMessage("At least one Device must be added in group '".concat(group.grpName, "' from Real Device Settings page."));
            return false;
          }

          return true;
        } // Converts in-memory step/assertion locator model to cross-platform format with source copied and target initialized blank.

      }, {
        key: "applyManualCrossPlatformStructure",
        value: function applyManualCrossPlatformStructure(group, sourcePlatform) {
          var _this36 = this;

          var flows = Array.isArray(group === null || group === void 0 ? void 0 : group.flowArr) ? group.flowArr : [];
          flows.forEach(function (flow) {
            var steps = Array.isArray(flow === null || flow === void 0 ? void 0 : flow.stepsArr) ? flow.stepsArr : [];
            steps.forEach(function (step) {
              var isLaunchAppStep = (((step === null || step === void 0 ? void 0 : step.type) || '') + '').toLowerCase() === 'launchapp'; // LaunchApp is package-based, so keep source app package prefilled and opposite platform blank for manual input.

              if (isLaunchAppStep) {
                _this36.applyManualCrossPlatformLaunchAppIds(step, sourcePlatform);
              } // Element/hero locator conversion is not applicable for LaunchApp.


              if (isLaunchAppStep) {
                return;
              }

              var sourceStepLocators = _this36.cloneLocatorObject(sourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] ? step.androidLocators || step.locators : step.iosLocators || step.locators);

              var sourceHeroLocators = _this36.cloneLocatorObject(sourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] ? step.androidHeroElement || step.heroElement : step.iosHeroElement || step.heroElement);

              if (sourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"]) {
                step.androidLocators = sourceStepLocators;
                step.iosLocators = _this36.cloneLocatorObject(step.iosLocators);
                step.locators = sourceStepLocators;
                step.androidHeroElement = sourceHeroLocators;
                step.iosHeroElement = _this36.cloneLocatorObject(step.iosHeroElement);
                step.heroElement = sourceHeroLocators;
              } else {
                step.iosLocators = sourceStepLocators;
                step.androidLocators = _this36.cloneLocatorObject(step.androidLocators);
                step.locators = step.androidLocators;
                step.iosHeroElement = sourceHeroLocators;
                step.androidHeroElement = _this36.cloneLocatorObject(step.androidHeroElement);
                step.heroElement = step.androidHeroElement;
              }

              var assertions = Array.isArray(step.assertions) ? step.assertions : [];
              assertions.forEach(function (assertion) {
                var legacyAssertionLocators = _this36.getLegacyAssertionLocatorObject(assertion);

                var sourceAssertionLocators = _this36.cloneLocatorObject(sourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] ? assertion.androidLocators || legacyAssertionLocators : assertion.iosLocators || legacyAssertionLocators);

                if (sourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"]) {
                  assertion.androidLocators = sourceAssertionLocators;
                  assertion.iosLocators = _this36.cloneLocatorObject(assertion.iosLocators);
                } else {
                  assertion.iosLocators = sourceAssertionLocators;
                  assertion.androidLocators = _this36.cloneLocatorObject(assertion.androidLocators);
                }
              });
            });
          });
        } // Applies source-platform app package to LaunchApp and clears opposite platform package for manual entry.

      }, {
        key: "applyManualCrossPlatformLaunchAppIds",
        value: function applyManualCrossPlatformLaunchAppIds(step, sourcePlatform) {
          // For manual conversion, support existing iOS recordings where app id may still be present in appPackage.
          // This fallback is intentionally scoped only to manual conversion source copy.
          var sourceAppId = sourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"] ? (((step === null || step === void 0 ? void 0 : step.bundleId) || (step === null || step === void 0 ? void 0 : step.appPackage) || '') + '').trim() : this.getStepAppPackageByPlatform(step, sourcePlatform);

          if (sourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"]) {
            step.appPackage = sourceAppId;
            step.bundleId = '';
          } else {
            step.appPackage = '';
            step.bundleId = sourceAppId;
          }
        } // Persists cross-platform group state at group level using RDT_NATIVE config only.

      }, {
        key: "applyCrossPlatformDeviceConfig",
        value: function applyCrossPlatformDeviceConfig(group, sourcePlatform) {
          var _this37 = this;

          if (!group || group.grpType !== _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            return;
          }

          var rdtConfig = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](group[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE] || []) || [];
          var sourceDevices = rdtConfig.filter(function (device) {
            return _this37.getDevicePlatform(device) === sourcePlatform;
          });
          var targetPlatform = sourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] ? _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"] : _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"];
          var targetDevices = rdtConfig.filter(function (device) {
            return _this37.getDevicePlatform(device) === targetPlatform;
          });

          if (sourceDevices.length === 0) {
            return;
          }

          if (targetDevices.length === 0) {
            var sourceSeed = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](sourceDevices[0]);
            sourceSeed.os = targetPlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] ? _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] : _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"];
            sourceSeed.deviceName = '';
            sourceSeed.os_version = '';
            sourceSeed.appId = '';
            rdtConfig.push(sourceSeed);
          }

          group[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE] = rdtConfig;
        } // Resolves app package for a given platform using exact keys: appPackage (android), bundleId (ios).

      }, {
        key: "getStepAppPackageByPlatform",
        value: function getStepAppPackageByPlatform(step, platform) {
          if (!step) {
            return '';
          }

          var value = platform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] ? step.appPackage || '' : step.bundleId || '';
          return ((value || '') + '').trim();
        } // Returns a safe cloned locator object or an empty object for blank target-platform tabs.

      }, {
        key: "cloneLocatorObject",
        value: function cloneLocatorObject(locators) {
          if (!locators || typeof locators !== 'object') {
            return {};
          }

          return lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](locators);
        } // Builds assertion locator map from legacy flat locator fields so manual conversion can reuse existing locator data.

      }, {
        key: "getLegacyAssertionLocatorObject",
        value: function getLegacyAssertionLocatorObject(assertion) {
          if (!assertion || typeof assertion !== 'object') {
            return {};
          }

          var locatorKeys = ['xpath', 'xpath1', 'xpath2', 'csspath', 'id', 'class', 'domstring', 'role', 'accessibilityId', 'androidUIAutomator', 'androidDataMatcher', 'androidViewTag', 'iOSClassChain', 'iOSNsPredicateString', 'coordinates'];
          var legacyLocators = {};
          locatorKeys.forEach(function (key) {
            if (assertion[key] !== '' && assertion[key] !== null && assertion[key] !== undefined) {
              legacyLocators[key] = assertion[key];
            }
          });
          return legacyLocators;
        } // Uses the same model bound to Browser Interaction ngModel fields; avoids re-fetching/scanning flow steps.

      }, {
        key: "getCurrentLaunchAppStepFromUI",
        value: function getCurrentLaunchAppStepFromUI() {
          var _a, _b, _c, _d, _e, _f, _g;

          var selectedType = ((((_a = this.selectedBrowserData) === null || _a === void 0 ? void 0 : _a.type) || '') + '').toLowerCase();

          if (selectedType === 'launchapp') {
            return this.selectedBrowserData;
          }

          var group = (_b = this.groupArray) === null || _b === void 0 ? void 0 : _b[(_c = this.selectedTabIndex) === null || _c === void 0 ? void 0 : _c.groupIndex];
          var flow = (_d = group === null || group === void 0 ? void 0 : group.flowArr) === null || _d === void 0 ? void 0 : _d[(_e = this.selectedTabIndex) === null || _e === void 0 ? void 0 : _e.flowIndex];
          var step = (_f = flow === null || flow === void 0 ? void 0 : flow.stepsArr) === null || _f === void 0 ? void 0 : _f[(_g = this.selectedTabIndex) === null || _g === void 0 ? void 0 : _g.browserStepsIndex];
          var stepType = (((step === null || step === void 0 ? void 0 : step.type) || '') + '').toLowerCase();
          return stepType === 'launchapp' ? step : null;
        } // Picks source app identifier from current LaunchApp model based on source platform.

      }, {
        key: "getCurrentSourceAppIdentifierFromUI",
        value: function getCurrentSourceAppIdentifierFromUI() {
          var launchStep = this.getCurrentLaunchAppStepFromUI();

          if (!launchStep) {
            return '';
          }

          if (this.crossPlatformSourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"]) {
            // For Android source, prefill from the current step's appPackage used in non-cross LaunchApp.
            return ((launchStep.appPackage || '') + '').trim();
          }

          if (this.crossPlatformSourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"]) {
            // For iOS source (REST conversion dialog), support existing iOS tests where value may still be in appPackage.
            return ((launchStep.bundleId || launchStep.appPackage || '') + '').trim();
          }

          return '';
        } // Reads app activity from current LaunchApp model shown in Browser Interaction UI.

      }, {
        key: "getCurrentSourceAppActivityFromUI",
        value: function getCurrentSourceAppActivityFromUI() {
          var launchStep = this.getCurrentLaunchAppStepFromUI();
          return (((launchStep === null || launchStep === void 0 ? void 0 : launchStep.appActivity) || '') + '').trim();
        } // Prefills conversion dialog from current LaunchApp ngModel values.

      }, {
        key: "prefillCrossPlatformAppIdentifiers",
        value: function prefillCrossPlatformAppIdentifiers() {
          var sourceAppId = this.getCurrentSourceAppIdentifierFromUI();
          var sourceAppActivity = this.getCurrentSourceAppActivityFromUI();
          this.crossPlatformAppPackage = '';
          this.crossPlatformBundleId = '';
          this.crossPlatformAppActivity = '';

          if (this.crossPlatformSourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"]) {
            this.crossPlatformBundleId = sourceAppId;
            return;
          }

          if (this.crossPlatformSourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"]) {
            this.crossPlatformAppPackage = sourceAppId;
            this.crossPlatformAppActivity = sourceAppActivity;
          }
        }
      }, {
        key: "getCrossPlatformTargetExtensions",
        value: function getCrossPlatformTargetExtensions() {
          if (this.crossPlatformSourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"]) {
            return ['.ipa'];
          }

          return [];
        }
      }, {
        key: "onCrossPlatformAppFileSelect",
        value: function onCrossPlatformAppFileSelect(fileList, formRef) {
          var _this38 = this;

          var _a;

          var fileObj = (_a = fileList === null || fileList === void 0 ? void 0 : fileList['files']) === null || _a === void 0 ? void 0 : _a[0];

          if (!fileObj) {
            return;
          }

          if (this.crossPlatformSourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"] && this.rdtAppListService.isAllowedAppFile(fileObj.name, ['.ipa', '.ios'])) {
            formRef === null || formRef === void 0 ? void 0 : formRef.clear();
            this.scenUtilService.warnMessage('For iOS source, iOS app files are not allowed. Please upload target Android app file.');
            return;
          }

          this.crossPlatformIsUploading = true;
          var allowedExtensions = this.getCrossPlatformTargetExtensions();
          this.rdtAppListService.uploadApplication(fileObj, allowedExtensions.length > 0 ? allowedExtensions : undefined).subscribe(function (options) {
            _this38.crossPlatformApplicationOpt = _this38.getOppositePlatformApps(_this38.crossPlatformSourcePlatform, options || []);

            if (_this38.crossPlatformApplicationOpt.length > 0) {
              _this38.crossPlatformSelectedApp = _this38.crossPlatformApplicationOpt[0].value;
            }

            _this38.crossPlatformIsUploading = false;
            formRef === null || formRef === void 0 ? void 0 : formRef.clear();
          }, function (error) {
            _this38.crossPlatformIsUploading = false;
            formRef === null || formRef === void 0 ? void 0 : formRef.clear();

            _this38.scenUtilService.warnMessage((error === null || error === void 0 ? void 0 : error.message) || 'Failed to upload application.');
          });
        } // Validates dialog inputs, builds async job metadata, and triggers backend cross-platform conversion API.

      }, {
        key: "triggerCrossPlatformConversionFromDialog",
        value: function triggerCrossPlatformConversionFromDialog() {
          var _this39 = this;

          var _a, _b, _c;

          var groupIdx = this.selectedTabIndex.groupIndex;
          var group = this.groupArray[groupIdx];
          var testcase = "".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.subProject, "/").concat(this.scenUtilService.scenarioName);

          if (!testcase || testcase === '//') {
            this.scenUtilService.warnMessage('Unable to build testcase path for cross-platform conversion.');
            return;
          }

          var selectedApp = this.crossPlatformSelectedApp;
          var app = (typeof selectedApp === 'string' ? selectedApp : (selectedApp === null || selectedApp === void 0 ? void 0 : selectedApp.value) || '') + '';
          var appValue = app.trim();

          if (!appValue) {
            this.scenUtilService.warnMessage('Please select application.');
            return;
          }

          var appPackage = this.crossPlatformSourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] ? ((this.crossPlatformBundleId || '') + '').trim() : ((this.crossPlatformAppPackage || '') + '').trim();

          if (!appPackage) {
            this.scenUtilService.warnMessage(this.crossPlatformSourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] ? 'Bundle Id is required.' : 'App Package is required.');
            return;
          }

          var crossPlatformPayload = {
            testcase: testcase,
            app: appValue,
            appPackage: appPackage
          };

          if (this.crossPlatformSourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"]) {
            crossPlatformPayload.appActivity = ((this.crossPlatformAppActivity || '') + '').trim();
          }

          var jobId = Object(uuid__WEBPACK_IMPORTED_MODULE_43__["v4"])();
          var jobName = "CrossPlatform-".concat(this.scenUtilService.scenarioName || 'Scenario');
          var jobDescription = "Convert testcase '".concat(testcase, "' to cross-platform test.");
          var jobCtx = {
            redirectUrl: '/scenario/basicScenario/design/scenDesign',
            redirectUrlParam: {
              project: this.scenUtilService.Project,
              subProject: this.scenUtilService.subProject,
              scenario: this.scenUtilService.scenarioName,
              groupName: group.grpName
            },
            tags: []
          };
          var queryParams = new _angular_common_http__WEBPACK_IMPORTED_MODULE_27__["HttpParams"]().set('job-id', jobId).set('job-name', jobName).set('job-description', jobDescription).set('job-owner', ((_c = (_b = (_a = this.sessionService) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.cctx) === null || _c === void 0 ? void 0 : _c.u) || 'unknown').set('job-ctx', JSON.stringify(jobCtx));
          this.loading = true;
          this.scenarioHttpService.triggerCrossPlatformConversion(crossPlatformPayload, queryParams).subscribe(function (response) {
            _this39.loading = false;

            if ((response === null || response === void 0 ? void 0 : response.success) === false) {
              _this39.scenUtilService.errorMessage((response === null || response === void 0 ? void 0 : response.message) || 'Cross-platform conversion async task was not triggered successfully.');

              return;
            }

            _this39.showCrossPlatformDialog = false;
            var taskId = (response === null || response === void 0 ? void 0 : response.taskId) || jobId;

            _this39.startPollingTaskStatus(taskId);

            _this39.scenUtilService.successMessage("Cross-platform conversion started in background (Job ID: ".concat(taskId, "). Use Show Task Status to track progress."));
          }, function (error) {
            _this39.loading = false;

            _this39.scenUtilService.errorMessage((error === null || error === void 0 ? void 0 : error.message) || 'Failed to trigger cross-platform conversion.');
          });
        } // Polls running-task service until conversion completes/fails, then refreshes scenario and icon state.

      }, {
        key: "startPollingTaskStatus",
        value: function startPollingTaskStatus(taskId) {
          var _this40 = this;

          if (!taskId) {
            return;
          }

          var pollingInterval = 10000;
          this.clearCrossPlatformPolling();
          this.crossPlatformPollingIntervalId = window.setInterval(function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this40, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee9() {
              var taskResponse, overallStatus, _t3;

              return _regenerator().w(function (_context9) {
                while (1) switch (_context9.p = _context9.n) {
                  case 0:
                    _context9.p = 0;
                    _context9.n = 1;
                    return this.runingTaskService.getTaskById(taskId);

                  case 1:
                    taskResponse = _context9.v;

                    if ((taskResponse === null || taskResponse === void 0 ? void 0 : taskResponse.success) && (taskResponse === null || taskResponse === void 0 ? void 0 : taskResponse.data)) {
                      overallStatus = taskResponse.data.overall_status;

                      if (overallStatus === src_app_shared_running_task_running_task_interface__WEBPACK_IMPORTED_MODULE_44__["TaskStatus"].COMPLETED) {
                        this.clearCrossPlatformPolling();
                        this.scenScheduleData.loadingScen = true;
                        this.getScenarioJsonData();
                      } else if (overallStatus === src_app_shared_running_task_running_task_interface__WEBPACK_IMPORTED_MODULE_44__["TaskStatus"].FAILED) {
                        this.clearCrossPlatformPolling();
                        this.scenUtilService.errorMessage('Cross-platform conversion task failed.');
                      }
                    } else {
                      this.clearCrossPlatformPolling();
                      this.scenUtilService.errorMessage((taskResponse === null || taskResponse === void 0 ? void 0 : taskResponse.message) || 'Unable to fetch cross-platform conversion task status.');
                    }

                    _context9.n = 3;
                    break;

                  case 2:
                    _context9.p = 2;
                    _t3 = _context9.v;
                    this.clearCrossPlatformPolling();
                    this.scenUtilService.errorMessage('Unable to fetch cross-platform conversion task status.');

                  case 3:
                    return _context9.a(2);
                }
              }, _callee9, this, [[0, 2]]);
            }));
          }, pollingInterval);
        } // Ensures only one polling loop is active and prevents interval leak on view switch/destroy.

      }, {
        key: "clearCrossPlatformPolling",
        value: function clearCrossPlatformPolling() {
          if (this.crossPlatformPollingIntervalId) {
            clearInterval(this.crossPlatformPollingIntervalId);
            this.crossPlatformPollingIntervalId = null;
          }
        } // Filters candidate target apps by opposite OS during cross-platform conversion flow.

      }, {
        key: "getOppositePlatformApps",
        value: function getOppositePlatformApps(sourcePlatform, appOptions) {
          if (!sourcePlatform || !Array.isArray(appOptions) || appOptions.length === 0) {
            return [];
          }

          return appOptions.filter(function (appOpt) {
            var label = (((appOpt === null || appOpt === void 0 ? void 0 : appOpt.label) || '') + '').toLowerCase().trim();
            var isIpa = /\.ipa(\b|\s|\)|$)/i.test(label);

            if (sourcePlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"]) {
              return isIpa;
            }

            return !isIpa;
          });
        }
      }, {
        key: "getDevicePlatform",
        value: function getDevicePlatform(device) {
          var os = (((device === null || device === void 0 ? void 0 : device.os) || '') + '').toLowerCase().trim();
          var deviceName = (((device === null || device === void 0 ? void 0 : device.deviceName) || '') + '').toLowerCase().trim();
          var isIos = os.includes(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"].toLowerCase()) || deviceName.includes(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"].toLowerCase());

          if (isIos) {
            return _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"];
          }

          var isAndroid = os.includes(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"].toLowerCase()) || deviceName.includes(_constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"].toLowerCase());

          if (isAndroid) {
            return _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"];
          }

          return '';
        } // Resolves RDT source platform from group device configuration.

      }, {
        key: "getRdtGroupPlatform",
        value: function getRdtGroupPlatform(group) {
          if (!group || group.grpType !== _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            return '';
          }

          var rdtConfig = group[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE] || [];
          var primary = ((group.primaryOS || '') + '').toLowerCase().trim();

          if (primary === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"].toLowerCase()) {
            return _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"];
          }

          if (primary === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"].toLowerCase()) {
            return _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"];
          }

          var _iterator30 = _createForOfIteratorHelper(rdtConfig),
              _step30;

          try {
            for (_iterator30.s(); !(_step30 = _iterator30.n()).done;) {
              var device = _step30.value;
              var platform = this.getDevicePlatform(device);

              if (platform) {
                return platform;
              }
            }
          } catch (err) {
            _iterator30.e(err);
          } finally {
            _iterator30.f();
          }

          return '';
        } // Used by group tree icons; supports both in-session async conversion and persisted scenario reload.

      }, {
        key: "shouldShowBothRdtPlatformIcons",
        value: function shouldShowBothRdtPlatformIcons(group) {
          if (!group || group.grpType !== _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            return false;
          }

          return this.isRdtGroupCrossPlatform(group);
        } // Generic utility to check if an object contains at least one meaningful value.

      }, {
        key: "isNonEmptyObject",
        value: function isNonEmptyObject(value) {
          if (!value || typeof value !== 'object') {
            return false;
          }

          return Object.keys(value).some(function (key) {
            var fieldValue = value[key];
            return fieldValue !== '' && fieldValue !== null && fieldValue !== undefined;
          });
        }
      }, {
        key: "isGroupIos",
        value: function isGroupIos(group) {
          return this.hasGroupPlatform(group, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"]);
        }
      }, {
        key: "isGroupAndroid",
        value: function isGroupAndroid(group) {
          return this.hasGroupPlatform(group, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"]);
        }
      }, {
        key: "setPrimaryOS",
        value: function setPrimaryOS(group, os) {
          group.primaryOS = os;
        }
      }, {
        key: "hasGroupPlatform",
        value: function hasGroupPlatform(group, platform) {
          var _this41 = this;

          if (!group || group.grpType !== _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            return false;
          }

          var rdtConfig = group[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE] || [];
          return rdtConfig.some(function (device) {
            return _this41.getDevicePlatform(device) === platform;
          });
        } // Main detector now uses only group-level RDT_NATIVE device configuration.

      }, {
        key: "isRdtGroupCrossPlatform",
        value: function isRdtGroupCrossPlatform(group) {
          var _this42 = this;

          if (!group || group.grpType !== _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            return false;
          }

          var rdtConfig = group[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE] || [];
          var hasAndroid = rdtConfig.some(function (device) {
            return _this42.getDevicePlatform(device) === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"];
          });
          var hasIos = rdtConfig.some(function (device) {
            return _this42.getDevicePlatform(device) === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"];
          });
          return hasAndroid && hasIos;
        }
      }, {
        key: "makeOneStepPerFlow",
        value: function makeOneStepPerFlow() {
          var _this43 = this;

          var groupIdx = this.selectedTabIndex.groupIndex;
          var group = this.groupArray[groupIdx];

          if (!group || !group.flowArr || group.flowArr.length === 0) {
            return;
          }

          var isBrowserGrp = group.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER || group.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE;
          var requestStepLabel = isBrowserGrp ? 'interaction' : 'request';
          this.confirmationService.confirm({
            message: "Split each ".concat(requestStepLabel, " into a separate flow? Flows having only one ").concat(requestStepLabel, " will be left unchanged."),
            accept: function accept() {
              var _a, _b, _c, _d, _e;

              var existingNames = new Set(group.flowArr.map(function (f) {
                return f.flowName;
              }));

              var nextFlowName = function nextFlowName() {
                var counter = existingNames.size + 1;
                var candidate = "Flow_".concat(counter);

                while (existingNames.has(candidate)) {
                  counter++;
                  candidate = "Flow_".concat(counter);
                }

                existingNames.add(candidate);
                return candidate;
              };

              var newFlows = [];

              var _iterator31 = _createForOfIteratorHelper(group.flowArr),
                  _step31;

              try {
                for (_iterator31.s(); !(_step31 = _iterator31.n()).done;) {
                  var flow = _step31.value;
                  var items = isBrowserGrp ? flow.stepsArr || [] : flow.reqArr || [];
                  var actionableItems = items; //isBrowserGrp ? items : items.filter(req => req.thinkTime === "-1");

                  var minSteps = isBrowserGrp ? 1 : 2;

                  if (!actionableItems || actionableItems.length <= minSteps) {
                    newFlows.push(flow);
                    continue;
                  }

                  for (var i = 0; i < actionableItems.length; i++) {
                    var item = actionableItems[i];
                    var flowName = item['reqName'] || item["stepName"] || nextFlowName();
                    var baseFlow = {
                      flowName: flowName,
                      isFlowTabPanelOpen: false,
                      enable: (_a = flow.enable) !== null && _a !== void 0 ? _a : true,
                      reqArr: [],
                      stepsArr: [],
                      totalRequest: 1,
                      order: null,
                      refId: (_b = flow.refId) !== null && _b !== void 0 ? _b : null,
                      ownerId: (_c = flow.ownerId) !== null && _c !== void 0 ? _c : null,
                      md5FromServer: (_d = flow.md5FromServer) !== null && _d !== void 0 ? _d : null
                    };

                    if (isBrowserGrp) {
                      baseFlow.stepsArr = [lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](item)]; // baseFlow.totalRequest = baseFlow.stepsArr.length;
                    } else {
                      var thinkTimeReq = actionableItems[i + 1];
                      baseFlow.reqArr = [lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](item), lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](thinkTimeReq)].filter(function (r) {
                        return r;
                      }); // baseFlow.totalRequest = baseFlow.reqArr.filter(r => r.thinkTime !== '0').length;

                      i++; // Skip next think time as it's already added
                    }

                    newFlows.push(baseFlow);
                  }
                }
              } catch (err) {
                _iterator31.e(err);
              } finally {
                _iterator31.f();
              }

              if (!newFlows.length) {
                return;
              }

              group.flowArr = newFlows;
              group.totalFlow = newFlows.length;
              group.totalRequest = isBrowserGrp ? group.totalRequest : newFlows.reduce(function (sum, f) {
                var _a, _b;

                return sum + ((_b = (_a = f.reqArr) === null || _a === void 0 ? void 0 : _a.filter(function (r) {
                  return r.thinkTime !== '0';
                }).length) !== null && _b !== void 0 ? _b : 0);
              }, 0);
              group.totalBrowserSteps = newFlows.reduce(function (sum, f) {
                var _a, _b;

                return sum + ((_b = (_a = f.stepsArr) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
              }, 0);
              _this43.scenUtilService.isFlowInline = newFlows.length > 1 ? 'yes' : 'no';
              _this43.groupArray = _toConsumableArray(_this43.groupArray);

              if (newFlows[0]) {
                if (isBrowserGrp) {
                  _this43.showSelectedTab((_e = newFlows[0].stepsArr) === null || _e === void 0 ? void 0 : _e[0], 5, groupIdx, -1, 0, 0);
                } else {
                  var firstReqIndex = newFlows[0].reqArr.findIndex(function (r) {
                    return r.thinkTime !== '0';
                  });
                  var reqIdx = firstReqIndex >= 0 ? firstReqIndex : 0;

                  _this43.showSelectedTab(newFlows[0].reqArr[reqIdx], 1, groupIdx, reqIdx, 0, -1);
                }
              } //show success toast


              _this43.scenUtilService.successMessage("All Flows of Group '".concat(group.grpName, "' now have one ").concat(requestStepLabel, "."));
            }
          });
        }
      }, {
        key: "closeAPI",
        value: function closeAPI() {
          this.scenUtilService.paramSidebar = false;
          this.clearAPIRoute();
        }
      }, {
        key: "closeAssertion",
        value: function closeAssertion() {
          this.scenUtilService.checkSidebar = false;
          this.clearAssertionRoute();
        }
        /**Getting keyword data from sever and set keyword data in schedule data service for showing in GUI. */

      }, {
        key: "getAndSetKeywordData",
        value: function getAndSetKeywordData() {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee1() {
            var _this44 = this;

            return _regenerator().w(function (_context1) {
              while (1) switch (_context1.n) {
                case 0:
                  this.scenScheduleData.loadingScen = true; //Checking for Schedule setting keyword data already exists in data service.

                  this.arrKeywordData = this.scenKeywordDefinitionService.checkAndGetKeywordData(this.screenKeywordList); //IF Keywords data doesn't exist then we get keyword data from server.

                  this.scenKeywordDefinitionService.setRequestKeywordListInBody(this.screenKeywordList, "");
                  setTimeout(function () {
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this44, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee0() {
                      return _regenerator().w(function (_context0) {
                        while (1) switch (_context0.n) {
                          case 0:
                            if (this.isScenarioEditMode) {
                              if (Object.keys(this.scenUtilService.scenJson).length > 0) {
                                this.parseScenarioJsonDataWrapper(this.scenUtilService.scenJson);
                              } else this.getScenarioJsonData();
                            } else {
                              this.getDefaultKeyword(this.scenKeywordDefinitionService.getRequestJsonParm());
                              this.scenUtilService.isScenRead = true;
                            }

                          case 1:
                            return _context0.a(2);
                        }
                      }, _callee0, this);
                    }));
                  }, 2000);

                case 1:
                  return _context1.a(2);
              }
            }, _callee1, this);
          }));
        }
      }, {
        key: "getDefaultKeyword",
        value: function getDefaultKeyword(obj, onlySchedule) {
          var _this45 = this;

          this.scenarioHttpService.getDefaultKeywordData(obj).subscribe(function (state) {
            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["GetDefaultKeywordDataLoadingState"]) {
              return;
            }

            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["GetDefaultKeywordDataLoadedState"]) {
              _this45.onLoadedGetKeyword(state.data, onlySchedule);

              return;
            }
          }, function (state) {
            _this45.scenScheduleData.loadingScen = false;
          });
        }
      }, {
        key: "onLoadedGetKeyword",
        value: function onLoadedGetKeyword(data, onlySchedule) {
          this.arrKeywordData = this.scenKeywordDefinitionService.setScenKeywordDataNewScen(data);
          this.schReadScenario.setDataInSchService(this.arrKeywordData, onlySchedule); //Purpose: Here we are sending keyword data to basic scenario left panel component to fill tags and scenario profile data.

          this.scenUtilService.sendSaveKeyword(this.arrKeywordData);
          this.scenScheduleData.loadingScen = false;

          if (this.scenUtilService.openRALScen) {
            this.scenScheduleData.scenarioType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCENARIO_TYPE"].REPLAY_ACESS_LOGS;
            this.scenScheduleData.distributeMode = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DISTRIBUTE_MODE"].BY_PERCENTAGE;
            this.scenScheduleData.scheduleBy = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCHEDULE_BY"].SCENARIO;
            this.router.navigate(["/scenario/basicScenario/design/scenDesign/replay", {
              outlets: {
                replay: ['replayAccessLog']
              }
            }]);
            return;
          }

          if (data && data['SGRP'] && Object.keys(data['SGRP']['data']).length == 0) {
            this.updateGroupAndPhaseData("addFirst", this.groupArray[0]);
            this.isSelectGrpData(this.groupArray[0]);
          } //need to update user data and total user in cas eof RTC mode


          if (this.scenUtilService.ScenMode == _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_33__["SCEN_MODE"].RTC_MODE && onlySchedule) {
            var mode = data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCH_KEYWORD"].PROF_PCT_MODE] ? data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCH_KEYWORD"].PROF_PCT_MODE]['data']["_G"][0][0] : "NUM";

            if (data && data['SGRP'] && Object.keys(data['SGRP']['data']).length && data['SGRP']['data']['_G'].length) {
              var sgrpDataArr = data['SGRP']['data']['_G'];

              var _iterator32 = _createForOfIteratorHelper(sgrpDataArr),
                  _step32;

              try {
                for (_iterator32.s(); !(_step32 = _iterator32.n()).done;) {
                  var srgpData = _step32.value;

                  var _iterator33 = _createForOfIteratorHelper(this.groupArray),
                      _step33;

                  try {
                    for (_iterator33.s(); !(_step33 = _iterator33.n()).done;) {
                      var grpData = _step33.value;

                      if (grpData.grpName == srgpData[0]) {
                        if (mode == "NUM") grpData.numVUser = parseInt(srgpData[6]);else if (mode == "PCT") grpData.percentage = srgpData[6];
                      }
                    }
                  } catch (err) {
                    _iterator33.e(err);
                  } finally {
                    _iterator33.f();
                  }
                }
              } catch (err) {
                _iterator32.e(err);
              } finally {
                _iterator32.f();
              }
            }

            if (mode == "NUM") this.scenScheduleData.cumNumUser = this.schUtility.getTotalNumUsersOfGrps(this.scenScheduleData.groupDataList);else if (mode == "PCT") {
              var totalUser = 0;
              if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCENARIO_TYPE"].FCU) totalUser = data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCH_KEYWORD"].NUM_USERS] ? data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCH_KEYWORD"].NUM_USERS]['data']["_G"][0][0] : "";
              if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCENARIO_TYPE"].FSR) totalUser = data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCH_KEYWORD"].TARGET_RATE] ? data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCH_KEYWORD"].TARGET_RATE]['data']["_G"][0][0] : "";
              this.scenScheduleData.cumNumUser = totalUser;
            }
            if (this.scenScheduleData.scheduleBy == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCHEDULE_BY"].SCENARIO) this.scenScheduleData.updatePhasesObser();else this.scenScheduleData.updatePhasesObser("rtcCase");
          }
        }
      }, {
        key: "getScenarioJsonData",
        value: function getScenarioJsonData() {
          var _this46 = this;

          var scenarioName = "".concat(this.scenUtilService.Project, "/").concat(this.scenUtilService.subProject, "/").concat(this.scenUtilService.scenarioName);
          var isRTC = false;

          if (this.scenUtilService.ScenMode == 2) {
            scenarioName = this.scenUtilService.scenarioName;
            isRTC = true;
          } else if (this.scenUtilService.ScenMode == 1 && this.scenUtilService.scenarioName.indexOf("TestRun") > -1) {
            scenarioName = this.scenUtilService.scenarioName;
            isRTC = true;
          }

          var obj = {
            scenarioName: scenarioName,
            userName: this.sessionService.session.cctx.u,
            productKey: this.sessionService.session.cctx.pk,
            isRTC: isRTC,
            testRunNum: isRTC ? this.sessionService.session.testRun.id.toString() : "-1"
          };
          this.scenarioHttpService.getScenarioJsonData(obj).subscribe(function (state) {
            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["ScenarioRestLoadingErrorState"]) {
              return;
            }

            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["ScenarioRestLoadedState"]) {
              _this46.parseScenarioJsonDataWrapper(state.data);

              return;
            }
          }, function (state) {
            _this46.scenUtilService.errorMessage("This scenario's json is corrupt.");

            _this46.scenScheduleData.loadingScen = false;
          });
        }
        /**
         * This method intakes scenario.json data and passes it to parseScenarioJsonData to parse json data.
         * This method either takes data from data returned from rest api or from scenUtilService.scenJson when data is already present so no need to call rest api.
         * @param data senarioJson data.
         */

      }, {
        key: "parseScenarioJsonDataWrapper",
        value: function parseScenarioJsonDataWrapper(data) {
          var _this47 = this;

          this.parseScenarioJsonData(data).then(function (_) {
            _this47.scenScheduleData.loadingScen = false; //Check if cavisson scripts present, if present then update scriptLanguage.
            //Running this after 550 ms delay as groupArray is also updated after 500 ms delay.

            setTimeout(function () {
              //Calling getDefaultKeywordData api to set update values (values updated during rtc) for all keywords present in scenario.json 
              if (_this47.scenUtilService.ScenMode == _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_33__["SCEN_MODE"].RTC_MODE) {
                _this47.scenKeywordDefinitionService.setRequestKeywordListInBody(Object.keys(_this47.scenUtilService.scenJson['scenario']), "");

                _this47.getDefaultKeyword(_this47.scenKeywordDefinitionService.getRequestJsonParm(), true);
              }

              var _loop4 = function _loop4() {
                var grpData = _this47.groupArray[i];

                if (grpData.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].CAVISSON) {
                  var scriptName = grpData.scriptName.split("/");

                  _this47.doOperation({
                    reqData: "-w " + (_this47.sessionService.session.cctx.u == "cavisson" ? "admin" : _this47.sessionService.session.cctx.u) + "/" + _this47.workProfile.profile + " -o GetScriptType -s " + scriptName[0] + "/" + scriptName[1] + "/scripts/" + scriptName[2]
                  }).then(function (res) {
                    var scriptLanguage = res === null || res === void 0 ? void 0 : res.data.output;
                    grpData.scriptLanguage = scriptLanguage === null || scriptLanguage === void 0 ? void 0 : scriptLanguage.toString().toLowerCase();
                    _this47.scenScheduleData.groupDataList = _this47.groupArray;
                  });
                }
              };

              for (var i = 0; i < _this47.groupArray.length; i++) {
                _loop4();
              }
            }, 550);
          });
        }
        /**
         * This methods parses scenario.json data and makes groupArray for request list and also sets data in SchScheduleDataService service.
         * @param data scenaiorJson data.
         */

      }, {
        key: "parseScenarioJsonData",
        value: function parseScenarioJsonData(data) {
          var _a;

          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee10() {
            var _this48 = this;

            var phaseListofGrp, i, _i13, tmpGroupData, _i14, group, runlogicData, grpArr1, grpKey, i1, j, gp, idx, tempGrpArr, orderingFlag, _iterator34, _step34, grp, _i15, shareTestInfo, phaseList, currentPhaseList, _t4, _t5, _t6, _t7, _t8, _t9, _t0;

            return _regenerator().w(function (_context10) {
              while (1) switch (_context10.p = _context10.n) {
                case 0:
                  _context10.p = 0;

                  if (!(data != null)) {
                    _context10.n = 27;
                    break;
                  }

                  // ✅ Clean unwanted empty keys before processing
                  this.removeEmptyKeysInSteps(data);
                  this.scenUtilService.isFlowInline = data.configuration.isFlow;
                  phaseListofGrp = {};
                  this.scenUtilService.scenJson = data;

                  if (data['postTest'] && data['postTest'].length > 0) {
                    this.scenScheduleData.postTest = data['postTest'];
                  }

                  if (data['preTest'] && data['preTest'].length > 0) {
                    this.scenScheduleData.preTest = data['preTest'];
                  }

                  if (data['description'] && data['description'] != '') {
                    this.scenScheduleData.scenDescription = data['description'];
                  } else {
                    this.scenScheduleData.scenDescription = "";
                  }

                  if (data['comment'] && Object.keys(data['comment']).length > 0) {
                    this.scenScheduleData.comment = data['comment'];
                  } else {
                    this.scenScheduleData.comment = null;
                  }

                  if (data.scenario && Object.keys(data.scenario).length != 0) {
                    this.arrKeywordData = this.scenKeywordDefinitionService.setScenKeywordData(data.scenario); //Removing default user profile location

                    this.removeDefaultUserProfileLocation(this.arrKeywordData);
                    this.schReadScenario.setDataInSchService(this.arrKeywordData);

                    if (!this.scenUtilService.scheduleSettingType) {
                      for (i in this.scenScheduleData.groupDataList) phaseListofGrp[this.scenScheduleData.groupDataList[i].grpName] = this.scenScheduleData.groupDataList[i].schBasicPhaseList;
                    } else {
                      for (_i13 in this.scenScheduleData.groupDataList) {
                        phaseListofGrp[this.scenScheduleData.groupDataList[_i13].grpName] = this.scenScheduleData.groupDataList[_i13].phaseList;
                      }
                    } //Purpose: Here we are sending keyword data to basic scenario left panel component to fill tags and scenario profile data.


                    this.scenUtilService.sendSaveKeyword(this.arrKeywordData);
                  }

                  if (!(data.scripts && Object.keys(data.scripts).length != 0)) {
                    _context10.n = 26;
                    break;
                  }

                  tmpGroupData = [];
                  _t4 = _regeneratorKeys(data.scripts);

                case 1:
                  if ((_t5 = _t4()).done) {
                    _context10.n = 3;
                    break;
                  }

                  _i14 = _t5.value;
                  _context10.n = 2;
                  return this.saveAndReadService.parsedGrpFromJson(_i14, data.scripts[_i14], phaseListofGrp, this.arrKeywordData, data.defaultScriptType);

                case 2:
                  group = _context10.v;

                  // Restore protocol if present at group level
                  if (data.scripts[_i14].protocol) {
                    group.protocol = Object.assign({}, data.scripts[_i14].protocol);
                  }

                  tmpGroupData.push(group);
                  _context10.n = 1;
                  break;

                case 3:
                  // Apply runLogic to tmpGroupData BEFORE it becomes groupArray
                  // This ensures the runLogic values are properly synced with the parsed group data
                  runlogicData = ((_a = this.arrKeywordData[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCH_KEYWORD"].G_SCRIPT_RUNLOGIC]) === null || _a === void 0 ? void 0 : _a.data) || this.arrKeywordData[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCH_KEYWORD"].G_SCRIPT_RUNLOGIC];

                  if (!runlogicData) {
                    _context10.n = 14;
                    break;
                  }

                  if (!runlogicData[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GLOBAL_KEY"]]) {
                    _context10.n = 9;
                    break;
                  }

                  grpArr1 = Object.values(runlogicData[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GLOBAL_KEY"]]);
                  grpKey = Object.keys(runlogicData[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GLOBAL_KEY"]]);
                  i1 = 0;

                case 4:
                  if (!(i1 < grpArr1.length)) {
                    _context10.n = 8;
                    break;
                  }

                  if (!(grpArr1[i1][0] != 'default' || grpKey[i1][0] != 'ALL')) {
                    _context10.n = 7;
                    break;
                  }

                  j = 0;

                case 5:
                  if (!(j < tmpGroupData.length)) {
                    _context10.n = 7;
                    break;
                  }

                  if (!(grpArr1[i1][0] === tmpGroupData[j].grpName)) {
                    _context10.n = 6;
                    break;
                  }

                  tmpGroupData[j].runLogic = grpArr1[i1][1];
                  tmpGroupData[j].isRunlogicPresent = true;
                  return _context10.a(3, 7);

                case 6:
                  j++;
                  _context10.n = 5;
                  break;

                case 7:
                  i1++;
                  _context10.n = 4;
                  break;

                case 8:
                  _context10.n = 14;
                  break;

                case 9:
                  _t6 = _regeneratorKeys(runlogicData);

                case 10:
                  if ((_t7 = _t6()).done) {
                    _context10.n = 14;
                    break;
                  }

                  gp = _t7.value;
                  idx = 0;

                case 11:
                  if (!(idx < tmpGroupData.length)) {
                    _context10.n = 13;
                    break;
                  }

                  if (!(gp === tmpGroupData[idx].grpName)) {
                    _context10.n = 12;
                    break;
                  }

                  tmpGroupData[idx].runLogic = runlogicData[gp][0][0];
                  tmpGroupData[idx].isRunlogicPresent = true;
                  return _context10.a(3, 13);

                case 12:
                  idx++;
                  _context10.n = 11;
                  break;

                case 13:
                  _context10.n = 10;
                  break;

                case 14:
                  _context10.p = 14;

                  if (!(tmpGroupData[0].order != null && tmpGroupData[0].order != undefined && tmpGroupData[0].order >= 0)) {
                    _context10.n = 23;
                    break;
                  }

                  tempGrpArr = []; // tempGrpArr.length = tmpGroupData.length;

                  orderingFlag = true;
                  _iterator34 = _createForOfIteratorHelper(tmpGroupData);
                  _context10.p = 15;

                  _iterator34.s();

                case 16:
                  if ((_step34 = _iterator34.n()).done) {
                    _context10.n = 19;
                    break;
                  }

                  grp = _step34.value;

                  if (!(grp.order != null && grp.order != undefined && grp.order >= 0)) {
                    _context10.n = 17;
                    break;
                  }

                  if (tempGrpArr[grp.order] == null) tempGrpArr[grp.order] = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](grp);else tempGrpArr.push(lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](grp));
                  _context10.n = 18;
                  break;

                case 17:
                  orderingFlag = false;
                  return _context10.a(3, 19);

                case 18:
                  _context10.n = 16;
                  break;

                case 19:
                  _context10.n = 21;
                  break;

                case 20:
                  _context10.p = 20;
                  _t8 = _context10.v;

                  _iterator34.e(_t8);

                case 21:
                  _context10.p = 21;

                  _iterator34.f();

                  return _context10.f(21);

                case 22:
                  if (orderingFlag) {
                    tempGrpArr.length = tmpGroupData.length;
                    tmpGroupData = [];
                    tmpGroupData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](tempGrpArr);
                  }

                case 23:
                  _context10.n = 25;
                  break;

                case 24:
                  _context10.p = 24;
                  _t9 = _context10.v;
                  console.error(_t9);

                case 25:
                  //Setting request index -1 for cavisson type group as it is only needed for api group
                  if (tmpGroupData[0].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].CAVISSON) {
                    this.selectedTabIndex.reqIndex = -1;
                    this.selectedTabIndex.flowIndex = -1;
                    this.selectedTabNum = 0;
                  } else if (tmpGroupData[0].scriptMode == "code") {
                    this.scriptMode = 'code';
                    this.showScriptTab = true;
                    this.showSelectedTab(tmpGroupData[0], 0, 0, -1, -1, -1);
                  } else {
                    for (_i15 in tmpGroupData) {
                      if (tmpGroupData[_i15].flowArr == undefined) tmpGroupData[_i15] = this.defaultGroupData;
                    } // initialize assertionConfig from the first group only (group-scoped assertions)


                    if (tmpGroupData && tmpGroupData.length > 0) {
                      this.assertionConfig = {
                        assertions: tmpGroupData[0].assertionsV2 || []
                      };
                    }

                    if (tmpGroupData[0].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER || tmpGroupData[0].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
                      this.selectedBrowserData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](tmpGroupData[0].flowArr[0].stepsArr[0]);
                      this.selectedTabNum = 5;
                    } else {
                      shareTestInfo = {
                        refId: tmpGroupData[0].flowArr[0].refId,
                        type: _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_41__["BROWSE_TEST_MODE"].IMPORT_FLOW
                      };
                      this.fillRequestData(tmpGroupData[0].flowArr[0].reqArr[0], null, shareTestInfo);
                      this.selectedRequestData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](tmpGroupData[0].flowArr[0].reqArr[0]);
                    }

                    this.scenSelectBtn = [{
                      label: "Design",
                      value: 'design'
                    }, {
                      label: "Edit Script",
                      value: 'script'
                    }];
                  } //This will set load configuration child component display to true.


                  this.scenUtilService.isScenRead = true;
                  phaseList = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.scenScheduleData.scenGroupData.phaseList); // if(this.scenScheduleData.currGroupData == null)
                  //   this.scenScheduleData.currGroupData = _.cloneDeep(this.scenScheduleData.scenGroupData);

                  currentPhaseList = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.scenScheduleData.currGroupData.phaseList);
                  setTimeout(function () {
                    //This is done because somehow phaselist for scenGroupData is emptied when coming inside timeout. TODO: need to debug this.
                    _this48.scenScheduleData.scenGroupData.phaseList = phaseList;
                    if (_this48.scenScheduleData.scheduleBy == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCHEDULE_BY"].GROUP) _this48.scenScheduleData.currGroupData.phaseList = currentPhaseList;
                    _this48.groupArray = tmpGroupData;

                    _this48.updateDnsProtocolViewState();

                    _this48.createParameterTableData();

                    _this48.updateGroupAndPhaseData("add");

                    _this48.initTargetSwitchModeGroupType();
                  }, 500);

                case 26:
                  _context10.n = 28;
                  break;

                case 27:
                  this.getDefaultKeyword(this.scenKeywordDefinitionService.getRequestJsonParm());

                case 28:
                  _context10.n = 30;
                  break;

                case 29:
                  _context10.p = 29;
                  _t0 = _context10.v;
                  this.scenUtilService.errorMessage("".concat(this.scenUtilService.scenarioName, " has been corrupted i.e., json file has been changed."));
                  console.log('error in getScenarioJsonData--->', _t0);

                case 30:
                  this.groupWiseScriptType = this.scenUtilService.scriptType;

                case 31:
                  return _context10.a(2);
              }
            }, _callee10, this, [[15, 20, 21, 22], [14, 24], [0, 29]]);
          }));
        }
      }, {
        key: "removeEmptyKeysInSteps",
        value: function removeEmptyKeysInSteps(data) {
          if (!(data === null || data === void 0 ? void 0 : data.scripts) || typeof data.scripts !== 'object') return; // Helper to remove empty/null/undefined values from objects

          var cleanObject = function cleanObject(obj) {
            if (!obj || typeof obj !== 'object') return obj;
            var cleaned = {};

            for (var key in obj) {
              var value = obj[key];

              if (value !== '' && value !== null && value !== undefined) {
                cleaned[key] = value;
              }
            }

            return cleaned;
          };

          for (var groupKey in data.scripts) {
            var group = data.scripts[groupKey];
            if (!group || typeof group !== 'object') continue;
            var flows = group.flows; // ✅ fixed key

            if (!flows || typeof flows !== 'object') continue; // iterate over all Flow_x or similar keys

            for (var flowKey in flows) {
              var flow = flows[flowKey];
              if (!flow || typeof flow !== 'object') continue;
              var stepsArray = flow.steps;
              if (!Array.isArray(stepsArray) || stepsArray.length === 0) continue;

              var _iterator35 = _createForOfIteratorHelper(stepsArray),
                  _step35;

              try {
                for (_iterator35.s(); !(_step35 = _iterator35.n()).done;) {
                  var step = _step35.value;
                  if (!step || typeof step !== 'object') continue; // Clean heroElement

                  if (step.heroElement && typeof step.heroElement === 'object') {
                    step.heroElement = cleanObject(step.heroElement);
                    console.log("HERO ELEMENT ==>> ", step.heroElement);
                    if (Object.keys(step.heroElement).length === 0) delete step.heroElement;
                  } // Clean locators


                  if (step.locators && typeof step.locators === 'object') {
                    step.locators = cleanObject(step.locators);
                    console.log("LOCATORS ==>> ", step.locators);
                    if (Object.keys(step.locators).length === 0) delete step.locators;
                  }

                  if (step.androidLocators && typeof step.androidLocators === 'object') {
                    step.androidLocators = cleanObject(step.androidLocators);
                    if (Object.keys(step.androidLocators).length === 0) delete step.androidLocators;
                  }

                  if (step.iosLocators && typeof step.iosLocators === 'object') {
                    step.iosLocators = cleanObject(step.iosLocators);
                    if (Object.keys(step.iosLocators).length === 0) delete step.iosLocators;
                  }

                  if (step.androidHeroElement && typeof step.androidHeroElement === 'object') {
                    step.androidHeroElement = cleanObject(step.androidHeroElement);
                    if (Object.keys(step.androidHeroElement).length === 0) delete step.androidHeroElement;
                  }

                  if (step.iosHeroElement && typeof step.iosHeroElement === 'object') {
                    step.iosHeroElement = cleanObject(step.iosHeroElement);
                    if (Object.keys(step.iosHeroElement).length === 0) delete step.iosHeroElement;
                  } // Clean iFrameLocator array: remove empty locator objects


                  if (step.iFrameLocator && Array.isArray(step.iFrameLocator)) {
                    step.iFrameLocator = step.iFrameLocator.map(function (entry) {
                      return entry && typeof entry === 'object' ? cleanObject(entry) : entry;
                    }).filter(function (entry) {
                      return entry && typeof entry === 'object' && Object.keys(entry).length > 0;
                    });
                    console.log("IFRAME LOCATORS ==>> ", step.iFrameLocator);
                    if (!step.iFrameLocator || step.iFrameLocator.length === 0) delete step.iFrameLocator;
                  }
                }
              } catch (err) {
                _iterator35.e(err);
              } finally {
                _iterator35.f();
              }
            }
          }
        }
      }, {
        key: "removeDefaultUserProfileLocation",
        value: function removeDefaultUserProfileLocation(arrKeywordData) {
          var _this49 = this;

          var UserProfileKeywords = ['UPLOCATION', 'UPBROWSER', 'UPAL', 'UPACCESS']; // if above UserProfileKeywords exist in scenario keyword json for default / READ ONLY Userprofile then 
          // remove those keywords in scenario json , 

          if (UserProfileKeywords.some(function (keyword) {
            return keyword in arrKeywordData;
          })) {
            var dataServiceObj = {
              getScenMode: function getScenMode() {
                return _this49.scenUtilService.ScenMode;
              },
              getScenName: function getScenName() {
                return _this49.scenUtilService.scenarioName;
              }
            };
            this.scenarioHttpService.getUserProfileData(UserProfileKeywords.join('|'), 0, null, dataServiceObj).subscribe(function (state) {
              if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["GetUserProfileDataLoadedState"]) {
                _this49.getUserProfileDataOnLoaded(state.data);
              }
            }, function (state) {});
          }
        }
      }, {
        key: "getUserProfileDataOnLoaded",
        value: function getUserProfileDataOnLoaded(res) {
          var _this50 = this;

          var keywordMap = {
            UPLOCATION: res.UPLOCATION,
            UPACCESS: res.UPACCESS,
            UPAL: res.UPAL,
            UPBROWSER: res.UPBROWSER
          };
          Object.keys(keywordMap).forEach(function (keyword) {
            var _a;

            var vendorDefaultkeywordValArr = (_a = keywordMap[keyword]) !== null && _a !== void 0 ? _a : [];

            _this50.removeDefaultFromArrKeywordData(vendorDefaultkeywordValArr, keyword);
          });
        }
      }, {
        key: "removeDefaultFromArrKeywordData",
        value: function removeDefaultFromArrKeywordData(vendorDefaultkeywordValArr, keyword) {
          var _a;

          if ((_a = this.arrKeywordData[keyword]) === null || _a === void 0 ? void 0 : _a["_G"]) {
            this.arrKeywordData[keyword]["_G"] = this.arrKeywordData[keyword]["_G"].filter(function (scenKeywordVal) {
              return !vendorDefaultkeywordValArr.some(function (vendorDefaultkeywordVal) {
                return vendorDefaultkeywordVal[0] === scenKeywordVal[0] && vendorDefaultkeywordVal[3] === _constants_scen_keyword_constants__WEBPACK_IMPORTED_MODULE_33__["PROFILE_STATUS_MODE"].READ_ONLY;
              });
            });
          }
        }
        /**Set keyword data in object for save data on server. */

      }, {
        key: "setKeywordData",
        value: function setKeywordData() {
          if (this.validateScen()) this.schSaveScenario.createPropertiesFromObj(this.scenScheduleData, this.arrKeywordData);else {
            this.scenScheduleData.loadingScen = false;
            return false;
          }
          /** For Bug Id:25760 */

          if (this.scenKeywordDefinitionService.scenkeywordData["SCENARIO_SETTINGS_PROFILE"] != undefined) {
            if (this.scenKeywordDefinitionService.scenkeywordData["SCENARIO_SETTINGS_PROFILE"]["data"] != undefined) {
              this.arrKeywordData["SCENARIO_SETTINGS_PROFILE"]["data"]["_G"] = this.scenKeywordDefinitionService.scenkeywordData["SCENARIO_SETTINGS_PROFILE"]["data"]["_G"];
            }
          }

          if (!this.schSaveScenario.eventSaveScenario(this.scenScheduleData)) return false;
          /***
          * This is to handle the edit case . Sometimes when in edit case if we switch from non-goal based to goal based then we want update the group table for changes
          * to reflect in the table.
          * Commenting it for now, will use this after scenario is able to save keywords.
          */
          //All validation this.SUCCESS

          for (var i = 0; i < this.screenKeywordList.length; i++) {
            this.scenScheduleData.saveKeywordData[this.screenKeywordList[i]] = this.arrKeywordData[this.screenKeywordList[i]];
          }

          return true;
        }
      }, {
        key: "validateScen",
        value: function validateScen() {
          var grpList = this.scenScheduleData.groupDataList;

          for (var i = 0; i < grpList.length; i++) {
            var users = grpList[i].numVUser;

            if (users > 100000000000 && this.scenScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DISTRIBUTE_MODE"].BY_NUMBERS) {
              this.scenUtilService.errorMessage("Number of users cannot be greater than 100000000000.");
              return false;
            }

            var validationMessage = Object(_assertion_contents_assertion_validation__WEBPACK_IMPORTED_MODULE_48__["getAssertionsValidationMessage"])(grpList[i].assertionsV2);

            if (validationMessage) {
              this.scenUtilService.errorMessage(validationMessage);
              return false;
            }
          } // Validates both platform locator tabs for converted RDT groups before save.


          var crossPlatformLocatorValidation = this.validateCrossPlatformLocatorsBeforeSave(grpList);

          if (!crossPlatformLocatorValidation.isValid) {
            this.scenUtilService.errorMessage(crossPlatformLocatorValidation.message);
            return false;
          }

          return true;
        } // Save-time validation to ensure required Android/iOS locator sets are both provided for cross-platform RDT steps.

      }, {
        key: "validateCrossPlatformLocatorsBeforeSave",
        value: function validateCrossPlatformLocatorsBeforeSave(groupList) {
          if (!Array.isArray(groupList) || groupList.length === 0) {
            return {
              isValid: true,
              message: ''
            };
          }

          var _iterator36 = _createForOfIteratorHelper(groupList),
              _step36;

          try {
            for (_iterator36.s(); !(_step36 = _iterator36.n()).done;) {
              var group = _step36.value;

              if (!this.shouldApplyCrossPlatformValidation(group)) {
                continue;
              }

              var flows = Array.isArray(group.flowArr) ? group.flowArr : [];

              var _iterator37 = _createForOfIteratorHelper(flows),
                  _step37;

              try {
                for (_iterator37.s(); !(_step37 = _iterator37.n()).done;) {
                  var flow = _step37.value;
                  var steps = Array.isArray(flow === null || flow === void 0 ? void 0 : flow.stepsArr) ? flow.stepsArr : [];

                  var _iterator38 = _createForOfIteratorHelper(steps),
                      _step38;

                  try {
                    for (_iterator38.s(); !(_step38 = _iterator38.n()).done;) {
                      var step = _step38.value;
                      var isLaunchAppStep = (((step === null || step === void 0 ? void 0 : step.type) || '') + '').toLowerCase() === 'launchapp';
                      var stepName = (step === null || step === void 0 ? void 0 : step.stepName) || '';
                      var flowName = (flow === null || flow === void 0 ? void 0 : flow.flowName) || '';
                      var groupName = (group === null || group === void 0 ? void 0 : group.grpName) || ''; // LaunchApp validation only checks app packages; locator validation is not applicable.

                      if (isLaunchAppStep) {
                        var androidAppId = this.getStepAppPackageByPlatform(step, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"]);
                        var iosAppId = this.getStepAppPackageByPlatform(step, _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"]); // Persist normalized cross-platform LaunchApp app identifiers.

                        step.appPackage = androidAppId;
                        step.bundleId = iosAppId;

                        if (!androidAppId) {
                          return {
                            isValid: false,
                            message: "Android app package is required for LaunchApp step '".concat(stepName, "' in flow '").concat(flowName, "' under group '").concat(groupName, "'.")
                          };
                        }

                        if (!iosAppId) {
                          return {
                            isValid: false,
                            message: "iOS Bundle Id is required for LaunchApp step '".concat(stepName, "' in flow '").concat(flowName, "' under group '").concat(groupName, "'.")
                          };
                        }
                      }

                      var androidElementLocators = (step === null || step === void 0 ? void 0 : step.androidLocators) || (step === null || step === void 0 ? void 0 : step.locators) || {};
                      var iosElementLocators = (step === null || step === void 0 ? void 0 : step.iosLocators) || {};
                      var hasElementLocators = this.isNonEmptyObject(androidElementLocators) || this.isNonEmptyObject(iosElementLocators) || this.isNonEmptyObject(step === null || step === void 0 ? void 0 : step.locators); // Element locators must be present and valid for both platforms when locator-based interaction is cross-platform.

                      if (!isLaunchAppStep && hasElementLocators) {
                        if (!this.isNonEmptyObject(androidElementLocators)) {
                          return {
                            isValid: false,
                            message: "Android element locators are required for step '".concat(stepName, "' in flow '").concat(flowName, "' under group '").concat(groupName, "'.")
                          };
                        }

                        if (!this.isNonEmptyObject(iosElementLocators)) {
                          return {
                            isValid: false,
                            message: "iOS element locators are required for step '".concat(stepName, "' in flow '").concat(flowName, "' under group '").concat(groupName, "'.")
                          };
                        }

                        var androidLocatorValidation = this.browserStepService.isLocatorValid(androidElementLocators, stepName, flowName, groupName, this.scenUtilService.isFlowInline);

                        if (!androidLocatorValidation.isValid) {
                          return androidLocatorValidation;
                        }

                        var iosLocatorValidation = this.browserStepService.isLocatorValid(iosElementLocators, stepName, flowName, groupName, this.scenUtilService.isFlowInline);

                        if (!iosLocatorValidation.isValid) {
                          return iosLocatorValidation;
                        }
                      }

                      var androidHeroLocators = (step === null || step === void 0 ? void 0 : step.androidHeroElement) || (step === null || step === void 0 ? void 0 : step.heroElement) || {};
                      var iosHeroLocators = (step === null || step === void 0 ? void 0 : step.iosHeroElement) || {};
                      var hasHeroLocators = this.isNonEmptyObject(androidHeroLocators) || this.isNonEmptyObject(iosHeroLocators) || this.isNonEmptyObject(step === null || step === void 0 ? void 0 : step.heroElement); // Hero element locators must be present and valid for both platforms when enabled on step (including LaunchApp).

                      if (hasHeroLocators) {
                        if (!this.isNonEmptyObject(androidHeroLocators)) {
                          return {
                            isValid: false,
                            message: "Android hero element locators are required for step '".concat(stepName, "' in flow '").concat(flowName, "' under group '").concat(groupName, "'.")
                          };
                        }

                        if (!this.isNonEmptyObject(iosHeroLocators)) {
                          return {
                            isValid: false,
                            message: "iOS hero element locators are required for step '".concat(stepName, "' in flow '").concat(flowName, "' under group '").concat(groupName, "'.")
                          };
                        }

                        var androidHeroValidation = this.browserStepService.isLocatorValid(androidHeroLocators, stepName, flowName, groupName, this.scenUtilService.isFlowInline);

                        if (!androidHeroValidation.isValid) {
                          return androidHeroValidation;
                        }

                        var iosHeroValidation = this.browserStepService.isLocatorValid(iosHeroLocators, stepName, flowName, groupName, this.scenUtilService.isFlowInline);

                        if (!iosHeroValidation.isValid) {
                          return iosHeroValidation;
                        }
                      }

                      var assertions = Array.isArray(step === null || step === void 0 ? void 0 : step.assertions) ? step.assertions : [];

                      var _iterator39 = _createForOfIteratorHelper(assertions),
                          _step39;

                      try {
                        for (_iterator39.s(); !(_step39 = _iterator39.n()).done;) {
                          var assertion = _step39.value;
                          var legacyAssertionLocators = this.getLegacyAssertionLocatorObject(assertion);
                          var hasPlatformAssertionLocators = !!((assertion === null || assertion === void 0 ? void 0 : assertion.androidLocators) || (assertion === null || assertion === void 0 ? void 0 : assertion.iosLocators) || this.isNonEmptyObject(legacyAssertionLocators));

                          if (!hasPlatformAssertionLocators) {
                            continue;
                          }

                          var androidAssertionLocators = (assertion === null || assertion === void 0 ? void 0 : assertion.androidLocators) || legacyAssertionLocators;
                          var iosAssertionLocators = (assertion === null || assertion === void 0 ? void 0 : assertion.iosLocators) || {};

                          if (!this.isNonEmptyObject(androidAssertionLocators)) {
                            return {
                              isValid: false,
                              message: "Android assertion locators are required for step '".concat((step === null || step === void 0 ? void 0 : step.stepName) || '', "' in flow '").concat((flow === null || flow === void 0 ? void 0 : flow.flowName) || '', "' under group '").concat((group === null || group === void 0 ? void 0 : group.grpName) || '', "'.")
                            };
                          }

                          if (!this.isNonEmptyObject(iosAssertionLocators)) {
                            return {
                              isValid: false,
                              message: "iOS assertion locators are required for step '".concat((step === null || step === void 0 ? void 0 : step.stepName) || '', "' in flow '").concat((flow === null || flow === void 0 ? void 0 : flow.flowName) || '', "' under group '").concat((group === null || group === void 0 ? void 0 : group.grpName) || '', "'.")
                            };
                          }

                          var androidAssertionValidation = this.browserStepService.isLocatorValid(androidAssertionLocators, (step === null || step === void 0 ? void 0 : step.stepName) || '', (flow === null || flow === void 0 ? void 0 : flow.flowName) || '', (group === null || group === void 0 ? void 0 : group.grpName) || '', this.scenUtilService.isFlowInline);

                          if (!androidAssertionValidation.isValid) {
                            return androidAssertionValidation;
                          }

                          var iosAssertionValidation = this.browserStepService.isLocatorValid(iosAssertionLocators, (step === null || step === void 0 ? void 0 : step.stepName) || '', (flow === null || flow === void 0 ? void 0 : flow.flowName) || '', (group === null || group === void 0 ? void 0 : group.grpName) || '', this.scenUtilService.isFlowInline);

                          if (!iosAssertionValidation.isValid) {
                            return iosAssertionValidation;
                          }
                        }
                      } catch (err) {
                        _iterator39.e(err);
                      } finally {
                        _iterator39.f();
                      }
                    }
                  } catch (err) {
                    _iterator38.e(err);
                  } finally {
                    _iterator38.f();
                  }
                }
              } catch (err) {
                _iterator37.e(err);
              } finally {
                _iterator37.f();
              }
            }
          } catch (err) {
            _iterator36.e(err);
          } finally {
            _iterator36.f();
          }

          return {
            isValid: true,
            message: ''
          };
        } // Applies cross-platform validations only for groups that are explicitly/manual converted or persisted as cross-platform.

      }, {
        key: "shouldApplyCrossPlatformValidation",
        value: function shouldApplyCrossPlatformValidation(group) {
          if (!group || group.grpType !== _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            return false;
          }

          return this.isRdtGroupCrossPlatform(group);
        }
        /**
         * This method update scenScheduleData.groupDataList after reading groupArray because scenScheduleData.groupDataList is used for saving data in scenario json or it
         * is used to make keyword data whereas groupArray is used in UI for rendering request list only.
         * @param operation add/delete
         * @param groupData groupData which is being added/deleted.
         */

      }, {
        key: "updateGroupAndPhaseData",
        value: function updateGroupAndPhaseData(operation, groupData, index, isCloned, isImport) {
          try {
            if (operation.includes('add') && groupData != undefined) {
              if (this.scenScheduleData.groupDataList.length == 0 && this.scenScheduleData.scenarioType != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCENARIO_TYPE"].MIXED_MODE) this.schUtility.createScenarioPhaseData(this.scenScheduleData);
              this.schUtility.createGroupPhaseData(groupData, this.scenScheduleData, true);

              if (this.scenScheduleData.groupDataList.length > 0) {
                if (isCloned) {
                  this.scenScheduleData.groupDataList.splice(index + 1, 0, groupData);
                  this.groupArray = this.scenScheduleData.groupDataList;
                } else {
                  for (var i = 0; i < this.scenScheduleData.groupDataList.length; i++) {
                    if (this.scenScheduleData.groupDataList[i].grpName == groupData.grpName) break;else if (i == this.scenScheduleData.groupDataList.length - 1) {
                      this.scenScheduleData.groupDataList = _commons_immutable_array__WEBPACK_IMPORTED_MODULE_18__["ImmutableArray"].push(this.scenScheduleData.groupDataList, groupData);
                      this.groupArray = this.scenScheduleData.groupDataList;
                    }
                  }
                }
              } else {
                this.scenScheduleData.groupDataList = _commons_immutable_array__WEBPACK_IMPORTED_MODULE_18__["ImmutableArray"].push(this.scenScheduleData.groupDataList, groupData);
                this.groupArray = this.scenScheduleData.groupDataList;
              }

              this.scenScheduleData.currGroupData = groupData; // This is used to scroll into the view of newly added group.

              this.scrollToReqList();
              if (this.scenScheduleData.selectedDataDirectory != "" && this.scenScheduleData.chkForSelectAllDataDir) groupData.dataDirectory = this.scenScheduleData.selectedDataDirectory;
            } else if (operation.includes('add') && groupData == undefined) {
              this.scenScheduleData.groupDataList = this.groupArray;
              this.schReadScenario.setDefaultPhaselist(); //TODO: need to see if we can move this to sch-read.scenario.ts.
              // This is used to scroll into the view of newly added group.

              this.scrollToReqList();
              if (this.scenScheduleData.selectedDataDirectory != "" && this.scenScheduleData.chkForSelectAllDataDir && groupData) groupData.dataDirectory = this.scenScheduleData.selectedDataDirectory;
            }

            if (groupData) {
              //When group is added from import dialog need to check for global data dir check
              if (this.scenScheduleData.chkForSelectAllDataDir) {
                var _iterator40 = _createForOfIteratorHelper(this.scenScheduleData.groupDataList),
                    _step40;

                try {
                  for (_iterator40.s(); !(_step40 = _iterator40.n()).done;) {
                    var grpData = _step40.value;
                    grpData.dataDirectory = groupData.dataDirectory;
                    this.scenScheduleData.chkForSelectAllDataDir = true;
                    this.scenScheduleData.selectedDataDirectory = groupData.dataDirectory;
                  }
                } catch (err) {
                  _iterator40.e(err);
                } finally {
                  _iterator40.f();
                }
              } else {
                this.scenScheduleData.chkForSelectAllDataDir = false;
                this.scenScheduleData.selectedDataDirectory = 'as per script';
              }
            }

            if (this.scenScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DISTRIBUTE_MODE"].BY_PERCENTAGE) this.calculateUserFromPercentage();else this.calculatePercentageFromUser();
            /**If distribution mode is by percentage then no need to update cumnumuser */

            if (this.scenScheduleData.distributeMode != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["DISTRIBUTE_MODE"].BY_PERCENTAGE) {
              this.scenScheduleData.cumNumUser = this.schUtility.getTotalNumUsersOfGrps(this.scenScheduleData.groupDataList);
              this.scenScheduleData.scenGroupData.numVUser = this.scenScheduleData.cumNumUser;
            } // this.isGrpScript();


            this.scheduleGraph = this.schUtility.scheduleGraph;

            if (this.scheduleGraph == null) {
              this.scheduleGraph = new _interface_scen_schedule_graph_data__WEBPACK_IMPORTED_MODULE_19__["ScheduleGraph"](this.scenScheduleData, this.scenUtilService);
            } //Graph data json series and store in group data object


            if (this.scenScheduleData.scheduleBy == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCHEDULE_BY"].GROUP) this.scheduleGraph.setGroupPhaseJson(this.scenScheduleData.currGroupData, 1);else this.scheduleGraph.setGroupPhaseJson(this.scenScheduleData.scenGroupData, 0);
            this.schUtility.updateGraph(this.scenScheduleData); //Calling Observer for update Phases data

            this.scenScheduleData.updatePhasesObser(isImport ? "import" : "");
            this.scenUtilService.onChangeDistributionMode();
          } catch (e) {
            console.log('updateGroupAndPhaseData | exception is = ', e);
          }
        }
      }, {
        key: "getNethavocScenarioDetails",
        value: function getNethavocScenarioDetails() {
          var _this51 = this;

          try {
            var data = {
              'permissionKeyMap': this.privilege
            };
            this.scenarioHttpService.scenarioListForReport(data).subscribe(function (state) {
              if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["ScenarioListForReportLoadingState"]) {
                return;
              }

              if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["ScenarioListForReportLoadedState"]) {
                _this51.onLoadedGetNHScenario(state.data);

                return;
              }
            }, function (state) {
              _this51.scenScheduleData.errorMessageForNethavoc = state.data;
              return;
            });
          } catch (e) {
            console.log('error in getNethavocScenarioDetails--->', e);
          }
        }
      }, {
        key: "onLoadedGetNHScenario",
        value: function onLoadedGetNHScenario(data) {
          var scenarioList;
          this.scenScheduleData.errorMessageForNethavoc = "";
          this.scenScheduleData.nethavocData = data;
          this.scenScheduleData.nethavocScenarioList = [];
          var scenarioObj = data['scenarioList'] || {};
          scenarioList = Object.keys(scenarioObj);
          this.scenScheduleData.nethavocScenarioList.push({
            label: "--Select Test--",
            value: null
          });

          if (scenarioList) {
            for (var i = 0; i < scenarioList.length; i++) {
              this.scenScheduleData.nethavocScenarioList.push({
                label: scenarioList[i],
                value: scenarioList[i]
              });
            }
          }

          if (scenarioList.length) this.scenScheduleData.isScenarioKeywordEnabled = true;else if (!scenarioList.length) this.scenScheduleData.isScenarioKeywordEnabled = false;
        }
      }, {
        key: "emitAssertionsToScript",
        value: function emitAssertionsToScript(assertionData) {
          var _this52 = this;

          var _a;

          var parameters = this.groupArray[this.selectedTabIndex.groupIndex].parameters;
          var scratchParameters = (_a = this.groupArray[this.selectedTabIndex.groupIndex].parameters['scratch']) !== null && _a !== void 0 ? _a : [];
          var paramArr = [];
          var declareParamArr = [];

          for (var key in parameters) {
            var _iterator41 = _createForOfIteratorHelper(parameters[key]),
                _step41;

            try {
              for (_iterator41.s(); !(_step41 = _iterator41.n()).done;) {
                var param = _step41.value;
                paramArr.push(param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["FILE_PARAM_CONST"].paramName]);
              }
            } catch (err) {
              _iterator41.e(err);
            } finally {
              _iterator41.f();
            }
          }

          var _iterator42 = _createForOfIteratorHelper(scratchParameters),
              _step42;

          try {
            for (_iterator42.s(); !(_step42 = _iterator42.n()).done;) {
              var scratchParam = _step42.value;
              declareParamArr.push(scratchParam[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_24__["DECLARE_PARAM_CONST"].paramName]);
            } //Interval so that code is initialzed for assertion

          } catch (err) {
            _iterator42.e(err);
          } finally {
            _iterator42.f();
          }

          var interval = setInterval(function () {
            if (_this52.scriptParameterService.isAssertionOpen) {
              setTimeout(function () {
                _this52.scenUtilService.emitScenDataToScript({
                  emitFor: "searchparams",
                  data: paramArr
                });

                _this52.scenUtilService.emitScenDataToScript({
                  emitFor: "declareparams",
                  data: declareParamArr
                });

                if (_this52.parameterDataService.mode == 'Update') _this52.scenUtilService.emitScenDataToScript({
                  emitFor: "aseertionData",
                  data: assertionData
                });
              }, 250);
              clearInterval(interval);
            }
          }, 100);
        }
      }, {
        key: "isGrpScript",
        value: function isGrpScript() {
          if (this.selectGrpType == "script") {
            this.openCodeEditor();
          } else {
            this.showScriptTab = false;
          }
        }
      }, {
        key: "onChangeFileType",
        value: function onChangeFileType() {
          if (this.fileType == 'flow') this.readScriptFile();else this.readRunlogicFile();
        }
      }, {
        key: "readScriptFile",
        value: function readScriptFile() {
          var _this53 = this;

          var scriptName = this.groupArray[this.selectedTabIndex.groupIndex].scriptName.split("/");
          var flow;
          var user = this.sessionService.session.cctx.u;
          var payload;
          var offset = 0;
          var limit = 2048;
          var cctx = this.sessionService.session.cctx;
          var isEditMode = false;
          this.doOperation({
            reqData: "-w " + (user == "cavisson" ? "admin" : user) + "/" + this.workProfile.profile + " -o GetScriptType -s " + scriptName[0] + "/" + scriptName[1] + "/scripts/" + scriptName[2]
          }).then(function (res) {
            var scriptLanguage = res.data.output;
            _this53.scriptLanguage = scriptLanguage.toString().toLowerCase();
          });
          payload = {
            reqData: "-w " + (user == "cavisson" ? "admin" : user) + "/" + this.workProfile.profile + " -o AllFlowList -s " + scriptName[0] + "/" + scriptName[1] + "/scripts/" + scriptName[2]
          };
          this.doOperation(payload).then(function (res) {
            flow = res.data.output;
            _this53.scriptFlowFileOpt = [];
            _this53.scriptFlowFile = flow[0];

            var _iterator43 = _createForOfIteratorHelper(flow),
                _step43;

            try {
              for (_iterator43.s(); !(_step43 = _iterator43.n()).done;) {
                var flowArr = _step43.value;

                _this53.scriptFlowFileOpt.push({
                  label: flowArr,
                  value: flowArr
                });
              }
            } catch (err) {
              _iterator43.e(err);
            } finally {
              _iterator43.f();
            }

            var flowName = "".concat(scriptName[0], "/").concat(scriptName[1], "/scripts/").concat(scriptName[2], "/").concat(flow[0], ".").concat(_this53.scriptLanguage);

            _this53.readData(flowName, offset, isEditMode, limit, cctx);
          });
        }
      }, {
        key: "doOperation",
        value: function doOperation(payload) {
          var _this54 = this;

          return new Promise(function (onfullfill, onerror) {
            _this54.scenarioHttpService.doScriptOperation(payload).subscribe(function (state) {
              if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["CreateScriptLoadingState"]) {}

              if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["CreateScriptLoadedState"]) {
                onfullfill(state);
              }
            }, function (state) {
              onfullfill(null);
            });
          });
        }
      }, {
        key: "readRunlogicFile",
        value: function readRunlogicFile() {
          var _this55 = this;

          var user = this.sessionService.session.cctx.u;
          var params = new _angular_common_http__WEBPACK_IMPORTED_MODULE_27__["HttpParams"]();
          var scriptName = this.groupArray[this.selectedTabIndex.groupIndex].scriptName.split("/");
          params = params.set('productKey', this.sessionService.session.cctx.pk);
          params = params.set("workspace", user == "cavisson" ? "admin" : user);
          params = params.set("project", scriptName[0]);
          params = params.set("subProject", scriptName[1]);
          params = params.set("scriptName", scriptName[2]);
          params = params.set("profile", this.workProfile.profile);
          this.scenarioHttpService.GetScriptRunlogicList(params).subscribe(function (state) {
            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["GetScriptRunlogicListLoadingState"]) {
              _this55.scenUtilService.loadingScen = true;
              return;
            }

            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["GetScriptRunlogicListLoadedState"]) {
              try {
                var res = state.data;
                var filePath = "";
                _this55.runLogicOptions = [];

                if (res && Object.keys(res).length == 0) {
                  _this55.runLogicOptions.push({
                    label: "runlogic (default)",
                    value: 'runlogic'
                  });

                  res['default'] = _this55.runLogicOptions[0].value;
                  filePath = "".concat(scriptName[0], "/").concat(scriptName[1], "/scripts/").concat(scriptName[2], "/");
                } else {
                  res.list.sort();

                  for (var i = 0; i < res['list'].length; i++) {
                    if (res['default'] == res['list'][i]) {
                      _this55.runLogicOptions.push({
                        label: "".concat(res['list'][i], " (default)"),
                        value: res['list'][i]
                      });
                    } else if (res['default'] != res['list'][i]) _this55.runLogicOptions.push({
                      label: res['list'][i],
                      value: res['list'][i]
                    });
                  }

                  filePath = "".concat(scriptName[0], "/").concat(scriptName[1], "/scripts/").concat(scriptName[2], "/runlogic/");
                }

                if (res['default']) _this55.runLogicFile = res['default'];else _this55.runLogicFile = res['list'][0];
                _this55.scriptObj = {
                  filePath: filePath,
                  fileName: _this55.runLogicFile,
                  treePath: null,
                  type: null
                };

                _this55.runLogic.onRunLogicChange(_this55.scriptObj);

                _this55.scenUtilService.loadingScen = false;
              } catch (e) {
                _this55.scenUtilService.loadingScen = false;
                console.log(e);
              }

              return;
            }
          }, function (state) {
            _this55.scenUtilService.loadingScen = false;
          });
        }
      }, {
        key: "onRunLogicChange",
        value: function onRunLogicChange(event) {
          var scriptName = this.groupArray[this.selectedTabIndex.groupIndex].scriptName.split("/");
          var filePath = "".concat(scriptName[0], "/").concat(scriptName[1], "/scripts/").concat(scriptName[2], "/runlogic/");
          this.scriptObj = {
            filePath: filePath,
            fileName: event.value,
            treePath: null,
            type: null
          };
          this.runLogic.onRunLogicChange(this.scriptObj);
        }
      }, {
        key: "onChangeScriptFlow",
        value: function onChangeScriptFlow() {
          var scriptName = this.groupArray[this.selectedTabIndex.groupIndex].scriptName.split("/");
          var offset = 0;
          var limit = 2048;
          var cctx = this.sessionService.session.cctx;
          var isEditMode = false;
          var flowName = "".concat(scriptName[0], "/").concat(scriptName[1], "/scripts/").concat(scriptName[2], "/").concat(this.scriptFlowFile, ".").concat(this.scriptLanguage);
          this.readData(flowName, offset, isEditMode, limit, cctx);
        }
      }, {
        key: "readData",
        value: function readData(flowName, offset, isEditMode, limit, cctx) {
          var _this56 = this;

          this.scenarioHttpService.getFileData({
            fp: flowName,
            offset: offset,
            isEditMode: true,
            limit: limit,
            brkDat: true,
            cctx: cctx
          }).subscribe(function (state) {
            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["FileReadLoading"]) {
              _this56.scenScheduleData.loadingScen = true;
              return;
            }

            if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["FileReadLoaded"]) {
              _this56.scenScheduleData.loadingScen = false;
              _this56.scriptContent = state.data.data;
              return;
            }
          }, function (state) {
            _this56.scenScheduleData.loadingScen = false;
            return;
          });
        }
        /**
         * This method sets script flow file data. It calls for script data with flow name as "flow.c" if data does not exist in flow.c.
         * @param state rest call output
         * @param fp
         */

        /**
         * This method checks if selected grpData is of type cavisson or not
         */

      }, {
        key: "isSelectGrpData",
        value: function isSelectGrpData(data) {
          if (data.grpType != _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].CAVISSON) {
            this.scenSelectBtn = [{
              label: "Design",
              value: 'design'
            }, {
              label: "Edit Script",
              value: 'script',
              disabled: true
            }];
          } else {
            this.scenSelectBtn = [{
              label: "Design",
              value: 'design'
            }, {
              label: "Edit Script",
              value: 'script',
              disabled: false
            }];
          }
        }
      }, {
        key: "createNewFolder",
        value: function createNewFolder() {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee11() {
            var _this57 = this;

            return _regenerator().w(function (_context11) {
              while (1) switch (_context11.n) {
                case 0:
                  return _context11.a(2, new Promise(function (onFulfill, onReject) {
                    _this57.scenarioHttpService.newFolder({
                      "testName": "".concat(_this57.scenUtilService.Project, "/").concat(_this57.scenUtilService.subProject, "/").concat(_this57.scenUtilService.scenarioName),
                      "userName": _this57.sessionService.session.cctx.u,
                      "isForScen": "true",
                      "productKey": _this57.sessionService.session.cctx.pk
                    }).subscribe(function (state) {
                      if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["NewFolderLoadingState"]) {
                        return;
                      }

                      if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["NewFolderLoadedState"]) {
                        var res = state.data;

                        if (res.success == "false") {
                          _this57.scenUtilService.errorMessage("Error in uploading file.");

                          onReject(false);
                        }

                        onFulfill(true);
                        return;
                      }
                    }, function (state) {
                      onReject(false);
                    });
                  }));
              }
            }, _callee11);
          }));
        }
      }, {
        key: "grpTypeAPI",
        value: function grpTypeAPI() {
          var _a, _b, _c, _d, _e;

          if (this.selectedTabIndex.reqIndex != -1) {
            this.onRequestAdd();

            if (((_a = this.selectedRequestData) === null || _a === void 0 ? void 0 : _a.bodyType) == 'form-data' || ((_b = this.selectedRequestData) === null || _b === void 0 ? void 0 : _b.bodyType) == 'x-www-form-urlencoded') {
              if (this.selectedRequestData.bodyArr.length == 0 || this.selectedRequestData.bodyArr.length == 1 && !this.selectedRequestData.bodyArr[0]['bodyKey']['name']) this.bodyFilesToDelete.push(this.selectedRequestData.bodyFile);else {
                var index = this.bodyFilesToDelete.indexOf(this.selectedRequestData.bodyFile);
                if (index > -1) this.bodyFilesToDelete.splice(index, 1);
              }
            } else if (((_c = this.selectedRequestData) === null || _c === void 0 ? void 0 : _c.body) && !((_d = this.selectedRequestData) === null || _d === void 0 ? void 0 : _d.body.trim())) {
              this.bodyFilesToDelete.push(this.selectedRequestData.bodyFile);
            } else {
              var _index = this.bodyFilesToDelete.indexOf((_e = this.selectedRequestData) === null || _e === void 0 ? void 0 : _e.bodyFile);

              if (_index > -1) this.bodyFilesToDelete.splice(_index, 1);
            }
          }

          if (this.selectedTabIndex.flowIndex != -1) this.onFlowAdd();
          this.onGroupAdd();
        }
      }, {
        key: "calculateUserFromPercentage",
        value: function calculateUserFromPercentage() {
          var arr = this.scenScheduleData.groupDataList;
          var totalUser = this.scenScheduleData.cumNumUser;

          for (var index in arr) {
            arr[index].numVUser = Math.round(totalUser * arr[index].percentage / 100);
          }

          this.schUtility.balanceUsersInPctMode(this.scenScheduleData);
        }
      }, {
        key: "calculatePercentageFromUser",
        value: function calculatePercentageFromUser() {
          var arr = this.scenScheduleData.groupDataList;
          var totalUser = this.schUtility.getTotalNumUsersOfGrps(this.scenScheduleData.groupDataList);

          for (var index in arr) {
            if (totalUser > 0) arr[index].percentage = Number((arr[index].numVUser / totalUser * 100).toFixed(2)); //For converting upto 2 decimals.
            else arr[index].percentage = 0.00;
          }

          this.scenScheduleData.cumNumUser = this.schUtility.getTotalNumUsersOfGrps(this.scenScheduleData.groupDataList);
        }
      }, {
        key: "onChangeBodyKeyFile",
        value: function onChangeBodyKeyFile(files, body) {
          body['bodyValue']['name'] = files[0]['name'];
          body['bodyValue']['file'] = files[0];
        }
        /**
         * This method is used to scroll to given position or to selected group position.
         * @param pos Position to scrollto.
         */

      }, {
        key: "scrollToReqList",
        value: function scrollToReqList(pos) {
          setTimeout(function () {
            try {
              if (pos) document.getElementsByClassName("group-pane")[0].scrollTop = pos;else {
                document.getElementsByClassName("selectedGroup")[0].scrollIntoView();
                document.getElementsByTagName("scenario-design")[0].scrollTop = 0;
              }
            } catch (e) {
              console.log(e);
            }
          }, 300);
        }
      }, {
        key: "isScenAlreadyExists",
        value: function isScenAlreadyExists(scenarioPath) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee12() {
            var _this58 = this;

            return _regenerator().w(function (_context12) {
              while (1) switch (_context12.n) {
                case 0:
                  return _context12.a(2, new Promise(function (onFulfill, onReject) {
                    _this58.scenarioHttpService.isScenarioAlreadyExistOnServer(scenarioPath, _this58.sessionService.session.cctx.u).subscribe(function (state) {
                      if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["IsScenarioAlreadyExistOnServerLoadingState"]) {
                        return;
                      }

                      if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["IsScenarioAlreadyExistOnServerLoadedState"]) {
                        _this58.onLoadedisScenAlreadyExists(state);

                        onFulfill(state.data);
                        return;
                      }
                    }, function (state) {
                      onReject();
                    });
                  }));
              }
            }, _callee12);
          }));
        }
      }, {
        key: "onLoadedisScenAlreadyExists",
        value: function onLoadedisScenAlreadyExists(state) {
          this.isScenExist = state.data;

          if (state.data) {
            this.scenUtilService.errorMessage("Test Name Already Exist");
            return;
          }
        }
      }, {
        key: "onRequestUrlChange",
        value: function onRequestUrlChange() {
          var _a;

          try {
            if (this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].reqName.startsWith('Request_')) {
              if (this.allReqName == undefined || this.allReqName[this.selectedTabIndex.groupIndex] == undefined) {
                this.initALLReqName();
              }

              var url = new URL((_a = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex]) === null || _a === void 0 ? void 0 : _a.reqArr[this.selectedTabIndex.reqIndex].url);
              var pageName = this.getRequestNameFromUrl(url);
              this.setValueInReqData('reqName', pageName, false, {
                op: 'add',
                localSelTabIndex: null
              });
            }
          } catch (e) {
            console.log('invalid url', e);
          }
        }
      }, {
        key: "getRequestNameFromUrl",
        value: function getRequestNameFromUrl(url) {
          var path = url.pathname;
          if (path.charAt(0) == '/') path = path.substring(1);
          if (path.charAt(path.length - 1) == '/') path = path.substring(0, path.length - 1);
          if (path.lastIndexOf('/') != -1) path = path.substring(path.lastIndexOf('/') + 1);
          path = path.trim().replace(/[^a-zA-Z0-9]/g, '_');
          if (path.length == 0) path = 'index';
          return this.getUniqueRequestNameFromUrl(path);
        }
      }, {
        key: "getUniqueRequestNameFromUrl",
        value: function getUniqueRequestNameFromUrl(reqName) {
          if (reqName.length > 64) reqName = reqName.substring(0, 60); // truncate to 61 character and _NN (3 char) total 64 char

          if (this.allReqName[this.selectedTabIndex.groupIndex][reqName] == undefined) // uniqueName
            {
              this.allReqName[this.selectedTabIndex.groupIndex][reqName] = 1;
              return reqName;
            } else {
            var index = this.allReqName[this.selectedTabIndex.groupIndex][reqName];
            var uniqueName = reqName + '_' + index;

            while (true) {
              if (this.allReqName[this.selectedTabIndex.groupIndex][uniqueName] == undefined) break;else index++;
              uniqueName = reqName + '_' + index;
            }

            index++;
            this.allReqName[this.selectedTabIndex.groupIndex][reqName] = index;
            return uniqueName;
          }
        }
      }, {
        key: "initALLReqName",
        value: function initALLReqName() {
          var _this59 = this;

          this.allReqName = {};
          this.allReqName[this.selectedTabIndex.groupIndex] = {};
          this.groupArray[this.selectedTabIndex.groupIndex].flowArr.forEach(function (flowName) {
            flowName.reqArr.forEach(function (request) {
              if (_this59.allReqName[request.reqName] == undefined) // uniqueName
                _this59.allReqName[_this59.selectedTabIndex.groupIndex][request.reqName] = 1;else _this59.allReqName[_this59.selectedTabIndex.groupIndex][request.reqName] = _this59.allReqName[request.reqName] + 1;
            });
          });
        }
        /**
         * This method is used to clear MAX_USERS and SESSION_RATE_MODE from savekeywordData when scenario type is not FSR
         * that is when switching from FSR to FCU or mixed mode, these keywords values must be reset while saving.
         */

      }, {
        key: "clearFSRKeyword",
        value: function clearFSRKeyword() {
          try {
            var keywordData = this.scenScheduleData.saveKeywordData;

            if (this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCENARIO_TYPE"].FCU || this.scenScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCENARIO_TYPE"].MIXED_MODE) {
              if (keywordData.hasOwnProperty("MAX_USERS")) keywordData["MAX_USERS"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GLOBAL_KEY"]] = [];
              if (keywordData.hasOwnProperty("SESSION_RATE_MODE")) keywordData["SESSION_RATE_MODE"][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GLOBAL_KEY"]] = [];
            }
          } catch (e) {
            console.trace("Method clearGoalKeyword..Exception =", e);
          }
        }
      }, {
        key: "hideDefaultHeaders",
        value: function hideDefaultHeaders() {
          this.showHeaders = !this.showHeaders;
        }
      }, {
        key: "validateQty",
        value: function validateQty(event, isInline) {
          if (!(event.charCode >= 48 && event.charCode <= 57 || event.charCode == 0 || event.charCode == 8 || event.charCode == 46)) return false;

          if (isInline) {
            if (event.charCode == 46) return false;
          }

          return true;
        }
      }, {
        key: "validateThinkTime",
        value: function validateThinkTime(event) {
          var value = event.target.value;

          if (this.thinkTimeSelected) {
            this.thinkTimeSelected = false;
            return true;
          }

          if (value.toString().indexOf(".") > -1) {
            var valAfterDecimal = value.toString().substring(value.toString().indexOf(".") + 1);
            if (valAfterDecimal.length >= 3 && event.key >= 0 && event.key <= 9) return false;else if (event.key == ".") return false;
          }

          return true;
        }
      }, {
        key: "selectAllText",
        value: function selectAllText() {
          this.thinkTimeSelected = true;
        }
      }, {
        key: "click",
        value: function click(event) {
          this.thinkTimeSelected = false;
        }
      }, {
        key: "toggleView",
        value: function toggleView(isFullForAutoTestData) {
          if (isFullForAutoTestData) {
            this.fullscreen = true;
          } else {
            this.fullscreen = !this.fullscreen;
          }

          if (this.fullscreen) {
            this.psideBarStyle = {
              'min-width': '100em',
              'top': '39px',
              'height': 'calc(100vh - 40px)'
            };
            this.psideBarToolTip = "Minimize View";
          } else {
            this.psideBarToolTip = "Maximize View";
            this.psideBarStyle = {
              'min-width': '40em',
              'height': 'calc(100vh - 40px)',
              'top': '39px'
            };
          }
        }
      }, {
        key: "showHelp",
        value: function showHelp() {
          this.help.show(this.helpMetaData[this.parameterDataService.selectedParameter].help, this.helpMetaData[this.parameterDataService.selectedParameter].title, 'script');
        }
      }, {
        key: "showHelp1",
        value: function showHelp1() {
          this.help.show('assertion', 'Assertion', 'script');
        }
      }, {
        key: "isFlowTabShown",
        value: function isFlowTabShown(flowData, groupIndex, reqIndex, flowIndex, browserStepsIndex) {
          if (groupIndex != undefined && reqIndex != undefined) {
            this.selectedTabIndex = {
              groupIndex: groupIndex,
              reqIndex: reqIndex,
              flowIndex: flowIndex,
              browserStepsIndex: browserStepsIndex
            };
          }

          this.selectedTabNum = 4;
          this.selectedFlowData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](flowData);
          this.updateDnsProtocolViewState();
        }
      }, {
        key: "allowMultipleFlows",
        value: function allowMultipleFlows() {
          this.isFlowDialogShown = true;
        }
      }, {
        key: "addFlow",
        value: function addFlow(flow) {
          this.scenUtilService.isFlowInline = 'yes';
          this.grpTypeAPI();
          this.isEditMode = false;
          var arr = this.groupArray[this.selectedTabIndex.groupIndex].flowArr;

          if (this.groupArray[this.selectedTabIndex.groupIndex].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER || this.groupArray[this.selectedTabIndex.groupIndex].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            var isBrowserStepsValid = this.browserStepService.checkValidation(this.groupArray, this.selectedTabIndex, this.scenUtilService.isFlowInline);

            if (isBrowserStepsValid && !isBrowserStepsValid.isValid) {
              this.scenUtilService.errorMessage(isBrowserStepsValid.message);
              return;
            }

            var reqData = {
              flowName: this.getLatestFlowName(),
              isFlowTabPanelOpen: false,
              enable: true,
              reqArr: [{
                thinkTime: "-1",
                enable: true,
                assertions: [],
                body: "",
                bodyArr: [],
                bodyType: "text",
                isBodyEditor: true,
                method: "GET",
                reqName: this.getLatestRequestName(),
                searchParameters: [],
                url: "",
                headers: [{
                  headerKey: {
                    name: "Content-Length"
                  },
                  headerValue: {
                    name: "<calculated when request is sent>"
                  },
                  toolTip: "The Content-Length is added to help the server for HTTP request's size. If Content-Length is specified and it does not match the length of the message-line, the message is either truncated, or padded with nulls to the specified length.\n                Note that this setting is applied to all requests of the group and for GET or DELETE  method type the length will be zero.",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "Host"
                  },
                  headerValue: {
                    name: "<calculated when request is sent>"
                  },
                  toolTip: "The Host header is added to identify the domain name for which a request is being sent to the server. This header is implicitly sent with every HTTP request.\n                It is most likely that without this header, your request will return an HTTP 400 error",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "Accept-Encoding"
                  },
                  headerValue: {
                    name: " gzip, deflate, br, compress;q=0.9"
                  },
                  toolTip: "The Accept-Encoding header is added to indicate to the server that LoadTest supports a defined list of content-encoding or compression algorithms as response. \n                You can remove this header or enter a different value. \n                    For this to be considered, you need to enable Accept-Encoding header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n                Doing that may not accurately render the response within the app.\n                    Note that this setting is applied to all requests of the group.",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "Accept"
                  },
                  headerValue: {
                    name: "text/plain,application/json,text/html,application/javascript,application/xml"
                  },
                  toolTip: " Accept header is added to tell the server that LoadTest can understand and process all forms of response content types.\n                It is recommended that this header be sent. But You can remove this header or enter a different value. \n                    For this to be considered, you need to enable Accept header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n                    Note that this setting is applied to all requests of the group.\n                ",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "User-Agent"
                  },
                  headerValue: {
                    name: "Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1"
                  },
                  toolTip: "The User-Agent header is added to help the server identify Mozilla as the HTTP requesting application or client.\n                It is recommended that this header be sent. But you can remove this header or enter a different value. \n                    For this to be considered, you need to enable User-Agent header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n                    Note that this setting is applied to all requests of the group.\n                ",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "Connection"
                  },
                  headerValue: {
                    name: "keep-alive"
                  },
                  toolTip: "LoadTest added the Connection header to indicate the server to keep the underlying network connection open once the current response is received. This allows LoadTest to reuse the same connection for faster response times in subsequent requests to the same server.\n                You can remove this header or enter a new one with a different value, such as 'Connection: Close' to control this behaviour.\n                    For this to be considered, you need to enable Accept header in Group Based Settings -> Protocol Settings -> HTTP -> keep-alive section. \n                    Note that this setting is applied to all requests of the group.\n                ",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "Keep-Alive"
                  },
                  headerValue: {
                    name: "300"
                  },
                  toolTip: "Keep Alive header is added to set a timeout and a maximum amount of requests. It can also be used to allow a single TCP connection to remain open for multiple HTTP requests/responses\n                You can remove this header or enter a different value. \n                For this to be considered, you need to set a custom value in Group Based Settings -> Protocol Settings -> HTTP -> Keep Alive -> \"Keep Alive Timeout\" section\n                Note that this setting is applied to all requests of the group and it is not applicable for HTTP/2",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: ""
                  },
                  headerValue: {
                    name: ""
                  },
                  del: false,
                  chk: false
                }]
              }],
              totalRequest: 1,
              totalBrowserSteps: 1,
              stepsArr: [{
                type: "go",
                label: "Go",
                stepName: this.browserStepService.getLatestStepName(this.groupArray, this.selectedTabIndex),
                url: ""
              }]
            };
            this.groupArray[this.selectedTabIndex.groupIndex].totalBrowserSteps++;
            this.groupArray[this.selectedTabIndex.groupIndex].totalRequest++;
            this.addThinkTime(reqData.reqArr);
            if (flow == null) arr.push(reqData);else arr.push(flow);
            this.isBrowserTabShown(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.groupArray[this.selectedTabIndex.groupIndex].flowArr.length - 1].stepsArr[0], this.selectedTabIndex.groupIndex, -1, this.groupArray[this.selectedTabIndex.groupIndex].flowArr.length - 1, 0);
          } else {
            var _reqData = {
              flowName: this.getLatestFlowName(),
              isFlowTabPanelOpen: false,
              enable: true,
              reqArr: [{
                thinkTime: "-1",
                enable: true,
                assertions: [],
                body: "",
                bodyArr: [],
                bodyType: "text",
                isBodyEditor: true,
                method: "GET",
                reqName: this.getLatestRequestName(),
                searchParameters: [],
                url: "",
                headers: [{
                  headerKey: {
                    name: "Content-Length"
                  },
                  headerValue: {
                    name: "<calculated when request is sent>"
                  },
                  toolTip: "The Content-Length is added to help the server for HTTP request's size. If Content-Length is specified and it does not match the length of the message-line, the message is either truncated, or padded with nulls to the specified length.\n                Note that this setting is applied to all requests of the group and for GET or DELETE  method type the length will be zero.",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "Host"
                  },
                  headerValue: {
                    name: "<calculated when request is sent>"
                  },
                  toolTip: "The Host header is added to identify the domain name for which a request is being sent to the server. This header is implicitly sent with every HTTP request.\n                It is most likely that without this header, your request will return an HTTP 400 error",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "Accept-Encoding"
                  },
                  headerValue: {
                    name: " gzip, deflate, br, compress;q=0.9"
                  },
                  toolTip: "The Accept-Encoding header is added to indicate to the server that LoadTest supports a defined list of content-encoding or compression algorithms as response. \n                You can remove this header or enter a different value. \n                    For this to be considered, you need to enable Accept-Encoding header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n                Doing that may not accurately render the response within the app.\n                    Note that this setting is applied to all requests of the group.",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "Accept"
                  },
                  headerValue: {
                    name: "text/plain,application/json,text/html,application/javascript,application/xml"
                  },
                  toolTip: " Accept header is added to tell the server that LoadTest can understand and process all forms of response content types.\n                It is recommended that this header be sent. But You can remove this header or enter a different value. \n                    For this to be considered, you need to enable Accept header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n                    Note that this setting is applied to all requests of the group.\n                ",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "User-Agent"
                  },
                  headerValue: {
                    name: "Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1"
                  },
                  toolTip: "The User-Agent header is added to help the server identify Mozilla as the HTTP requesting application or client.\n                It is recommended that this header be sent. But you can remove this header or enter a different value. \n                    For this to be considered, you need to enable User-Agent header in Group Based Settings -> Developer Options -> HTTP -> \"Send following Headers with HTTP request from script\" section. \n                    Note that this setting is applied to all requests of the group.\n                ",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "Connection"
                  },
                  headerValue: {
                    name: "keep-alive"
                  },
                  toolTip: "LoadTest added the Connection header to indicate the server to keep the underlying network connection open once the current response is received. This allows LoadTest to reuse the same connection for faster response times in subsequent requests to the same server.\n                You can remove this header or enter a new one with a different value, such as 'Connection: Close' to control this behaviour.\n                    For this to be considered, you need to enable Accept header in Group Based Settings -> Protocol Settings -> HTTP -> keep-alive section. \n                    Note that this setting is applied to all requests of the group.\n                ",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: "Keep-Alive"
                  },
                  headerValue: {
                    name: "300"
                  },
                  toolTip: "Keep Alive header is added to set a timeout and a maximum amount of requests. It can also be used to allow a single TCP connection to remain open for multiple HTTP requests/responses\n                You can remove this header or enter a different value. \n                For this to be considered, you need to set a custom value in Group Based Settings -> Protocol Settings -> HTTP -> Keep Alive -> \"Keep Alive Timeout\" section\n                Note that this setting is applied to all requests of the group and it is not applicable for HTTP/2",
                  del: false,
                  chk: true
                }, {
                  headerKey: {
                    name: ""
                  },
                  headerValue: {
                    name: ""
                  },
                  del: false,
                  chk: false
                }]
              }],
              totalRequest: 1
            };

            if (this.isDnsApiGroup(this.selectedTabIndex.groupIndex)) {
              this.applyDnsDefaults(_reqData.reqArr[0]);
            }

            this.groupArray[this.selectedTabIndex.groupIndex].totalRequest++;
            this.addThinkTime(_reqData.reqArr);
            if (flow == null) arr.push(_reqData);else arr.push(flow);
            this.isRequestTabShown(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.groupArray[this.selectedTabIndex.groupIndex].flowArr.length - 1].reqArr[0], this.selectedTabIndex.groupIndex, 0, this.groupArray[this.selectedTabIndex.groupIndex].flowArr.length - 1, 0);
          }

          this.resetFlowData();
          this.isFlowDialogShown = false;
        }
      }, {
        key: "getLatestFlowName",
        value: function getLatestFlowName() {
          var totalFlows = 0;
          var flowNameArr = [];
          var index = -1;

          var _iterator44 = _createForOfIteratorHelper(this.groupArray),
              _step44;

          try {
            for (_iterator44.s(); !(_step44 = _iterator44.n()).done;) {
              var grpObj = _step44.value;
              index++;

              if (index == this.selectedTabIndex.groupIndex) {
                var _iterator45 = _createForOfIteratorHelper(grpObj.flowArr),
                    _step45;

                try {
                  for (_iterator45.s(); !(_step45 = _iterator45.n()).done;) {
                    var flowObj = _step45.value;
                    totalFlows++;
                    flowNameArr.push(flowObj.flowName);
                  }
                } catch (err) {
                  _iterator45.e(err);
                } finally {
                  _iterator45.f();
                }
              }
            }
          } catch (err) {
            _iterator44.e(err);
          } finally {
            _iterator44.f();
          }

          return this.getNewFlowName(totalFlows, flowNameArr);
        }
      }, {
        key: "getNewFlowName",
        value: function getNewFlowName(totalFlows, flowNameArr) {
          if (flowNameArr.indexOf("Flow_".concat(totalFlows + 1)) > -1) return this.getNewFlowName(totalFlows + 1, flowNameArr);else return "Flow_".concat(totalFlows + 1);
        }
      }, {
        key: "onFlowAdd",
        value: function onFlowAdd() {
          var arr = this.groupArray[this.groupArray.length - 1].flowArr;
          var obj = arr[arr.length - 1];
          this.resetFlowData();
        }
      }, {
        key: "resetFlowData",
        value: function resetFlowData() {
          this.isEditMode = false;
          this.selectedFlowData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex]);
        }
      }, {
        key: "revertFlowUpdates",
        value: function revertFlowUpdates() {
          if (this.selectedFlowData) this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex] = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.selectedFlowData);
        }
      }, {
        key: "deleteFlow",
        value: function deleteFlow(i, j) {
          var _this60 = this;

          if (this.groupArray[i].flowArr.length < 2) {
            this.scenUtilService.errorMessage("Cannot delete flow.");
            return;
          }

          var deleteCount = 1; //Checking if req is surronded by think time. if it is then delete think time also. also if deleting first request then delete subsequent thinktime also

          var reqLength = 0;
          this.confirmationService.confirm({
            message: 'Are you sure to delete the selected flow?',
            accept: function accept() {
              for (var req in _this60.groupArray[i].flowArr[j].reqArr) {
                _this60.deleteBodyFromScenDir(i, j, req);

                if (_this60.groupArray[i].flowArr[j].reqArr[req].thinkTime == '-1') reqLength++;
              }

              _this60.groupArray[i].flowArr.splice(j, deleteCount);

              _this60.groupArray[i].totalRequest = _this60.groupArray[i].totalRequest - reqLength;
              _this60.selectedTabIndex = {
                groupIndex: i,
                flowIndex: j > 0 ? j - 1 : 0,
                reqIndex: 0,
                browserStepsIndex: 0
              };
            },
            reject: function reject() {
              return false;
            }
          });
        }
      }, {
        key: "deleteFlows",
        value: function deleteFlows(i, j) {
          if (this.groupArray[i].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER || this.groupArray[i].grpType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            this.deleteStepFlow(i, j);
          } else {
            this.deleteFlow(i, j);
          }
        }
      }, {
        key: "deleteStepFlow",
        value: function deleteStepFlow(i, j) {
          var _this61 = this;

          if (this.groupArray[i].flowArr.length < 2) {
            this.scenUtilService.errorMessage("Cannot delete flow.");
            return;
          }

          var deleteCount = 1; //Checking if req is surronded by think time. if it is then delete think time also. also if deleting first request then delete subsequent thinktime also

          var reqLength = 0;
          this.confirmationService.confirm({
            message: 'Are you sure to delete the selected flow?',
            accept: function accept() {
              for (var req in _this61.groupArray[i].flowArr[j].stepsArr) {
                reqLength++;
              }

              _this61.groupArray[i].flowArr.splice(j, deleteCount);

              _this61.groupArray[i].totalBrowserSteps = _this61.groupArray[i].totalBrowserSteps - reqLength;
              _this61.selectedTabIndex = {
                groupIndex: i,
                flowIndex: j > 0 ? j - 1 : 0,
                reqIndex: 0,
                browserStepsIndex: 0
              };
            },
            reject: function reject() {
              return false;
            }
          });
        }
      }, {
        key: "cloneFlow",
        value: function cloneFlow(i, flow, j) {
          var clonedFlow = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](flow);
          var reqLength = 0;

          for (var req in flow.reqArr) {
            if (flow.reqArr[req].thinkTime == '-1') reqLength++;
          }

          this.groupArray[i].totalRequest = this.groupArray[i].totalRequest + reqLength;
          this.originalName = clonedFlow.flowName;
          clonedFlow.flowName = this.getDuplicateGroupName(this.originalName);
          clonedFlow.flowName = this.getDuplicateFlowName(flow.flowName, i, j);
          var flowData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](flow); //This is for storing all request name in flow which is used in calculating unique flow name.

          this.cloneFlow['reqObj'] = {};
          this.allReqData(i);
          flowData.flowName = clonedFlow.flowName;

          for (var ii in flowData.reqArr) {
            if (flowData.reqArr[ii].thinkTime == "-1") flowData.reqArr[ii].reqName = this.getDuplicateReqnameAcrossAllFlows(flowData.reqArr[ii].reqName);
          } // This is done to create different body file name when cloning a group.


          var _iterator46 = _createForOfIteratorHelper(flowData.reqArr),
              _step46;

          try {
            for (_iterator46.s(); !(_step46 = _iterator46.n()).done;) {
              var _req = _step46.value;
              this.makeCopyOfBodyFile(_req, this.groupArray[i], flowData);
            }
          } catch (err) {
            _iterator46.e(err);
          } finally {
            _iterator46.f();
          }

          this.groupArray[i].flowArr.push(flowData);
          this.cloneFlow['reqObj'] = {};
        }
      }, {
        key: "makeCopyAndUnlinkGroup",
        value: function makeCopyAndUnlinkGroup(groupIndex) {
          var _this62 = this;

          this.confirmationService.confirm({
            message: 'This will create an independent copy and unlink it from the original test. Do you want to continue?',
            accept: function accept() {
              try {
                var group = _this62.groupArray[groupIndex];
                var refId = lodash__WEBPACK_IMPORTED_MODULE_21__["clone"](group.refId);
                group.refId = null;
                var shareTestInfo = {
                  refID: refId,
                  md5sum: "",
                  operation: _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_41__["SHARE_TEST_OPERATION"].DELETE,
                  type: _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_41__["BROWSE_TEST_MODE"].IMPORT_SCRIPT
                };

                _this62.scenUtilService.shareTestInfoList.push(shareTestInfo); //TODO: need to a delete operation ShareTestInfo for saveAndConvert


                _this62.scenUtilService.successMessage("Group \"".concat(group.grpName, "\" has been unlinked and converted to an independent copy."));
              } catch (error) {
                console.error('Error converting imported flow to copy:', error);

                _this62.scenUtilService.errorMessage('Failed to convert imported flow to copy.');
              }
            },
            reject: function reject() {
              return false;
            }
          });
        }
      }, {
        key: "makeCopyAndUnlinkFlow",
        value: function makeCopyAndUnlinkFlow(groupIndex, flowIndex) {
          var _this63 = this;

          this.confirmationService.confirm({
            message: 'This will create an independent copy and unlink it from the original test. Do you want to continue?',
            accept: function accept() {
              try {
                var flow = _this63.groupArray[groupIndex].flowArr[flowIndex];
                var refId = lodash__WEBPACK_IMPORTED_MODULE_21__["clone"](flow.refId);
                flow.refId = null;
                var shareTestInfo = {
                  refID: refId,
                  md5sum: "",
                  operation: _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_41__["SHARE_TEST_OPERATION"].DELETE,
                  type: _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_41__["BROWSE_TEST_MODE"].IMPORT_FLOW
                };

                _this63.scenUtilService.shareTestInfoList.push(shareTestInfo); //TODO: need to a delete operation ShareTestInfo for saveAndConvert


                _this63.scenUtilService.successMessage("Flow \"".concat(flow.flowName, "\" has been unlinked and converted to an independent copy."));
              } catch (error) {
                console.error('Error converting imported flow to copy:', error);

                _this63.scenUtilService.errorMessage('Failed to convert imported flow to copy.');
              }
            },
            reject: function reject() {
              return false;
            }
          });
        }
      }, {
        key: "allReqData",
        value: function allReqData(i) {
          for (var ii in this.groupArray[i].flowArr) {
            for (var iii in this.groupArray[i].flowArr[ii].reqArr) {
              if (this.groupArray[i].flowArr[ii].reqArr[iii].thinkTime == '-1') this.cloneFlow['reqObj'][this.groupArray[i].flowArr[ii].reqArr[iii].reqName] = true;
            }
          }
        }
      }, {
        key: "getDuplicateReqnameAcrossAllFlows",
        value: function getDuplicateReqnameAcrossAllFlows(reqName) {
          if (this.cloneFlow['reqObj'][reqName]) {
            reqName = "Copy_".concat(reqName);
            return this.getDuplicateReqnameAcrossAllFlows(reqName);
          } else {
            this.cloneFlow['reqObj'][reqName] = true;
            return reqName;
          }
        }
      }, {
        key: "getDuplicateFlowName",
        value: function getDuplicateFlowName(name, groupIndex, flowIndex) {
          var transArr = [];

          var _iterator47 = _createForOfIteratorHelper(this.groupArray[groupIndex].flowArr),
              _step47;

          try {
            for (_iterator47.s(); !(_step47 = _iterator47.n()).done;) {
              var transData = _step47.value;
              transArr.push(transData.flowName);
            }
          } catch (err) {
            _iterator47.e(err);
          } finally {
            _iterator47.f();
          }

          var duplicateFlowNameCount = -1; //Count to track latest duplicate name: like Flow_1, Copy_Flow, Copy_1_Flow, Copy_2_Flow will be the latest flow name.

          var duplicateFlowName = "";
          var isNan = false;

          for (var i = 0; i < transArr.length; i++) {
            //If Flow selected then continue
            if (this.groupArray[groupIndex].flowArr[flowIndex].flowName == transArr[i]) continue;
            if (transArr[i] == name) continue;

            if (transArr[i].startsWith("Copy_") && transArr[i].endsWith(name)) {
              var num = parseInt(transArr[i].substring(6, 7)); //Checking if tens digit is NaN or not

              if (isNaN(num)) num = parseInt(transArr[i].substring(5, 6));else num = parseInt(transArr[i].substring(5, 7));

              if (!isNaN(num)) {
                if (duplicateFlowNameCount < num) {
                  duplicateFlowNameCount = num;
                  duplicateFlowName = transArr[i];
                }
              } else {
                isNan = true;
              }
            } else if (name.startsWith("Copy_") && i == transArr.length - 1) {
              return "Copy_" + name;
            }
          } //When isNan is true then it means that there is only one copy of given Flow name, so need to latest duplicate Flow name which is Copy_Flow_1


          if (!duplicateFlowName && isNan) duplicateFlowName = "Copy_" + name;
          return this.getDuplicateName(duplicateFlowName || name); // Getting duplicate Flow name by passing latest duplicate Flow name
        } // When adding inline request in inlineReq Table.

      }, {
        key: "addInlineReq",
        value: function addInlineReq() {
          if (!this.validateInlineReq()) return;

          if (this.addLabel == "Add") {
            this.setValueInReqData('inlineReqArr', this.inlineReqObj, false, {
              op: 'push',
              localSelTabIndex: null
            });
          } else {
            this.setValueInReqData('inlineReqArr', this.inlineReqObj, false, {
              op: 'update',
              localSelTabIndex: null,
              spliceIndex: this.onInlineReqMenuClick['index'],
              spliceCount: 1
            });
            this.addLabel = "Add";
            this.additionalSettingLabel = "Add Additional Info";
          }

          this.inlineReqObj = new _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_9__["SchRequestData"]();
        }
      }, {
        key: "validateInlineReq",
        value: function validateInlineReq() {
          if (!this.inlineReqObj.url) {
            this.scenUtilService.errorMessage("Please provide url.");
            return false;
          }

          if (!this.inlineReqObj.method) {
            this.scenUtilService.errorMessage("Please provide method.");
            return false;
          }

          return true;
        } // This is used to set index of selected row of inline req table.

      }, {
        key: "onInlineReqMenuClick",
        value: function onInlineReqMenuClick(row, index) {
          this.onInlineReqMenuClick['row'] = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](row);
          this.onInlineReqMenuClick['index'] = index;
        } // When clicked edit from menu of inline req table.

      }, {
        key: "editInlineRequest",
        value: function editInlineRequest() {
          this.inlineReqObj = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.onInlineReqMenuClick['row']);
          this.addLabel = "Update";
          this.additionalSettingLabel = "Update Additional Settings";
        } // When deleting a row of inline req table.

      }, {
        key: "deleteInlineRequest",
        value: function deleteInlineRequest() {
          if (this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']].bodyFile) {
            this.bodyFilesToDelete.push(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']].bodyFile);
          }

          this.setValueInReqData('inlineReqArr', null, false, {
            op: 'splice',
            spliceIndex: this.onInlineReqMenuClick['index'],
            spliceCount: 1
          });
        } // When opening additional settings, either from inline req table (Click here) or from add additional setting label.

      }, {
        key: "onClickHeaderBody",
        value: function onClickHeaderBody(isAddHeaders, rowIndex) {
          this.showManageInlineReqDialog = true;
          this.isAddHeaders = isAddHeaders;
          this.currentReqObj = new _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_9__["SchRequestData"]();

          if (!isAddHeaders) {
            this.onInlineReqMenuClick['index'] = rowIndex;
            this.currentReqObj = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']]);
          } else {
            this.currentReqObj = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.inlineReqObj);
          }

          if (this.isHeaderEditorDisplay && this.onInlineReqMenuClick['index'] != -1) this.setValueInReqData('headers', this.getFormattedHeaderData(), false, {
            op: 'add',
            localSelTabIndex: null
          });
          this.isHeaderEditorDisplay = false;
          this.fillRequestData(this.currentReqObj);
          this.tabView.tabs[1].selected = false;
          this.tabView.tabs[0].selected = true;
        }
      }, {
        key: "closeInlineSettingDialog",
        value: function closeInlineSettingDialog() {
          if (this.isHeaderEditorDisplay) this.setValueInReqData('headers', this.getFormattedHeaderData(true), true); //Update bodyFile extension because once saved bodyFile ext is not updated even if we change body tab in UI, only bodyType is changed.

          if (this.currentReqObj.bodyFile) {
            this.currentReqObj.bodyFile = this.currentReqObj.bodyFile.split(".")[0].concat(".".concat(this.getBodyExt(this.currentReqObj.bodyType.toLowerCase())));
          }

          if (!this.isAddHeaders) this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']] = this.currentReqObj;else this.inlineReqObj = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.currentReqObj);
          this.showManageInlineReqDialog = false;
        }
        /**
         * This function is called when clicking ok button either form repeat inline dialog or from set txn name in inline requests.
         * @param isSave
         * @param isRepeat - true if repeat inline dialog is getting closed and saved and false if set transaction dialog is getting closed and saved.
         */

      }, {
        key: "saveInline",
        value: function saveInline(isSave, isRepeat) {
          if (isRepeat) {
            if (isSave) {
              if (this.repeatInline == 0) {
                if (!this.currentReqObj.repeatInline) {
                  this.scenUtilService.errorMessage("Parameter not selected for repeat inline.");
                  return;
                }

                this.currentReqObj.repeatInline = "{".concat(this.currentReqObj.repeatInline, "}");
              } else this.currentReqObj.repeatInline = this.repeatInlineNum;

              this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']].repeatInline = this.currentReqObj.repeatInline;
              this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']].repeatNum = this.repeatInline;
            }

            this.openRepeatInlineDialog = false;
          } else {
            if (isSave) this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']].reqName = this.currentReqObj.reqName;
            this.openInlineTxName = false;
          } //This piece of code is for splittting page after setting transaction name of the inline request.


          if (isSave && this.onSplitPage['isSplit']) {
            this.moveInlineReqToMain();
            this.onSplitPage['isSplit'] = false;
          }

          this.currentReqObj = new _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_9__["SchRequestData"]();
        }
        /**
         * first for loop from i + 1 to end of array -> array ; splice
         * reqArr.piush -> i -> splice
         * length -1 . inlinereq -> array;
         *
         */

      }, {
        key: "onSplitPage",
        value: function onSplitPage() {
          if (!this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']].reqName) {
            this.openInlineTxName = true;
            this.dialogHeader = "Split Request";
            this.requestName = "Request Name";
            this.onSplitPage['isSplit'] = true;
          } else this.moveInlineReqToMain();
        } // This method is extension of onSplitPage.

      }, {
        key: "moveInlineReqToMain",
        value: function moveInlineReqToMain() {
          var j = this.onInlineReqMenuClick['index'];
          var tempArr = [];

          for (var i = j + 1; i <= this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr.length - 1; i++) tempArr.push(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[i]);

          this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr.push(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']]);
          this.setValueInReqData("inlineReqArr", null, false, {
            op: 'splice',
            localSelTabIndex: null,
            spliceIndex: this.onInlineReqMenuClick['index'],
            spliceCount: this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr.length
          });
          this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr.length - 1].inlineReqArr = [].concat(tempArr);
          this.addThinkTime(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr);
        } //openInlineTxName = truesetTxnName

      }, {
        key: "setTxnName",
        value: function setTxnName() {
          this.dialogHeader = "Set Transaction Name";
          this.requestName = "Transaction Name";
          this.openInlineTxName = true;
          this.currentReqObj.reqName = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']].reqName;
        } // When opening repeat inline dialog, data is set in currrentReObj.

      }, {
        key: "setRepeatInline",
        value: function setRepeatInline() {
          this.repeatInline = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']].repeatNum;
          if (this.repeatInline == undefined) this.repeatInline = 1;
          this.currentReqObj.repeatInline = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex].inlineReqArr[this.onInlineReqMenuClick['index']].repeatInline;
          if (!this.currentReqObj.repeatInline) this.currentReqObj.repeatInline = 0;
          this.repeatInlineNum = this.currentReqObj.repeatInline;
          if (this.repeatInline == 0) this.currentReqObj.repeatInline = this.currentReqObj.repeatInline.replace(/[{}]/g, '');
          this.openRepeatInlineDialog = true;
        }
      }, {
        key: "openManageInlineReq",
        value: function openManageInlineReq() {
          this.manageInlineReqBtn = true;
          if (this.isHeaderEditorDisplay && this.selectedTabIndex.reqIndex != -1) this.setValueInReqData('headers', this.getFormattedHeaderData(), false, {
            op: 'add',
            localSelTabIndex: null
          });
          this.isHeaderEditorDisplay = false;
        }
        /**
         * This method is used to return all requests of a sleected group
         * Right now using only for parameters and assertions (API Group)
         * @returns reqArr - Request Array of a group
         */

      }, {
        key: "allReqsOfSelectedGrp",
        value: function allReqsOfSelectedGrp() {
          var reqArr = [];
          var group = this.groupArray[this.selectedTabIndex.groupIndex];
          var isBrowserGrp = group.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER || group.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE;

          if (isBrowserGrp) {
            for (var i in this.groupArray[this.selectedTabIndex.groupIndex].flowArr) {
              for (var ii in this.groupArray[this.selectedTabIndex.groupIndex].flowArr[i].stepsArr) {
                reqArr.push(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[i].stepsArr[ii]);
              }
            }
          } else {
            for (var _i16 in this.groupArray[this.selectedTabIndex.groupIndex].flowArr) {
              for (var _ii2 in this.groupArray[this.selectedTabIndex.groupIndex].flowArr[_i16].reqArr) {
                if (this.groupArray[this.selectedTabIndex.groupIndex].flowArr[_i16].reqArr[_ii2].thinkTime == "-1") {
                  reqArr.push(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[_i16].reqArr[_ii2]);
                }
              }
            }
          }

          return reqArr;
        }
        /**
         * This is a common method, and it serves purpose to create new body file name for requests, and inline requests when cloning request or flow or group.
         * @param requestData - SchRequest Class
         * @param groupData - SchGroupData Class
         * @param FlowData - APIFlow Class
         */

      }, {
        key: "makeCopyOfBodyFile",
        value: function makeCopyOfBodyFile(requestData, groupData, FlowData, isBodyDelete) {
          if (requestData.bodyFile && requestData.thinkTime == '-1') {
            var oldReqBody = requestData.bodyFile;
            var bodyType = oldReqBody ? oldReqBody.split(".")[1] : 'text';
            requestData.bodyFile = "".concat(groupData.grpName, "_").concat(FlowData.flowName, "_").concat(requestData.reqName, ".").concat(bodyType);
            this.fillRequestData(requestData, oldReqBody);
            if (isBodyDelete) this.bodyFilesToDelete.push(oldReqBody);
          }

          if (requestData.inlineReqArr && requestData.inlineReqArr.length > 0) {
            for (var inlineReqIndex in requestData.inlineReqArr) {
              if (requestData.inlineReqArr[inlineReqIndex].bodyFile) {
                var oldInlineReqBodyFile = requestData.inlineReqArr[inlineReqIndex].bodyFile;

                var _bodyType = oldInlineReqBodyFile ? oldInlineReqBodyFile.split(".")[1] : 'text';

                requestData.inlineReqArr[inlineReqIndex].bodyFile = "".concat(groupData.grpName, "_").concat(FlowData.flowName, "_").concat(requestData.reqName, "_").concat(inlineReqIndex, ".").concat(_bodyType);
                this.fillRequestData(requestData.inlineReqArr[inlineReqIndex], oldInlineReqBodyFile);
                if (isBodyDelete) this.bodyFilesToDelete.push(oldInlineReqBodyFile);
              }
            }
          }
        }
        /**
         * This method is invoked to store all body files to be deleted when a group/request is deleted
         * @param i return group's index
         * @param j return flow's index
         * @param k return request's index
         */

      }, {
        key: "deleteBodyFromScenDir",
        value: function deleteBodyFromScenDir(i, j, k) {
          for (var l in this.groupArray[i].flowArr[j].reqArr[k].inlineReqArr) {
            if (this.groupArray[i].flowArr[j].reqArr[k].inlineReqArr[l].bodyFile) this.bodyFilesToDelete.push(this.groupArray[i].flowArr[j].reqArr[k].inlineReqArr[l].bodyFile);
          }

          if (this.groupArray[i].flowArr[j].reqArr[k].bodyFile) {
            this.bodyFilesToDelete.push(this.groupArray[i].flowArr[j].reqArr[k].bodyFile);
          }

          if (this.groupArray[i].prescript && this.groupArray[i].postscript) {
            this.bodyFilesToDelete.push("".concat(this.groupArray[i].grpName, ".pre"));
            this.bodyFilesToDelete.push("".concat(this.groupArray[i].grpName, ".post"));
            this.showPreScriptTab = false;
            this.showPostScriptTab = false;
          }
        }
      }, {
        key: "addColumnsOnChange",
        value: function addColumnsOnChange(evt) {
          this.inlineReqTableHead = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.tmpGrpTableHeaders);
          var dataArray = [];

          if (evt.value.length == 0) {
            this.inlineReqTableHead = this.tmpGrpTableHeaders;
          } else {
            for (var i = 0; i < evt.value.length; i++) {
              dataArray.push(evt.value[i]);
            }

            var unique = dataArray.filter(this.onlyUnique);
            this.inlineReqTableHead = [].concat(_toConsumableArray(this.inlineReqTableHead), _toConsumableArray(unique));
          }

          console.log(evt);
        }
      }, {
        key: "onlyUnique",
        value: function onlyUnique(value, index, self) {
          return self.indexOf(value) === index;
        }
      }, {
        key: "onBodyMaximize",
        value: function onBodyMaximize() {
          var _this64 = this;

          this.ngxInOverlay = true;
          setTimeout(function () {
            _this64.maximizedBody = true;
            _this64.bodyEditorOptions = Object.assign({}, _this64.bodyEditorOptions);

            _this64.bodyEditor._editor.layout();

            if (_this64.getKeyFromReqData('isLargeBody')) {
              _this64.maximizeBodyDialogHeader = "Body (The file size exceeds 1MB, preventing any modifications here. You can edit the file locally and then upload the updated version.)";
            } else _this64.maximizeBodyDialogHeader = "Body";
          }, 500);
        }
      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this.clearCrossPlatformPolling();
          var keys = Object.keys(this.subscriptionObj);

          for (var i = 0; i < keys.length; i++) {
            if (this.subscriptionObj[keys[i]]) this.subscriptionObj[keys[i]].unsubscribe();
          }

          this.saveAndReadService.reqBodyPoolList = {};
          this.saveAndReadService.bodyKeyFiles = [];
          this.saveAndReadService.paramScenPoolList = {};
        }
      }, {
        key: "setRepeatInlineVal",
        value: function setRepeatInlineVal(fromParameter) {
          if (fromParameter) this.currentReqObj.repeatInline = null;else this.currentReqObj.repeatInline = 0;
        }
      }, {
        key: "resetInlineReqObj",
        value: function resetInlineReqObj() {
          this.inlineReqObj = new _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_9__["SchRequestData"]();
          this.addLabel = "Add";
        }
      }, {
        key: "onShowReqDisabledTooltip",
        value: function onShowReqDisabledTooltip() {
          if (this.groupArray[this.selectedTabIndex.groupIndex].grpType == 'Cavisson') return 'Add Request is disabled as selected group is using script and requests are recorded or added in the script';else {
            if (this.scenUtilService.isFlowInline == 'yes' && this.selectedTabIndex.flowIndex == -1) return 'Select flow to add request';
          }
        }
      }, {
        key: "setTooltipForInlineVal",
        value: function setTooltipForInlineVal(val) {
          if (Number.isInteger(val)) this.toolTipforInlineVal = "Inline URL will repeat ".concat(val, " times.");else this.toolTipforInlineVal = "Inline URL will repeat with value of ".concat(val, " parameter.");
          return this.toolTipforInlineVal;
        }
      }, {
        key: "onFlowNameChange",
        value: function onFlowNameChange() {
          if (this.isGroupOrFlowReferenced(this.groupArray[this.selectedTabIndex.groupIndex], this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex])) return;

          var _iterator48 = _createForOfIteratorHelper(this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr),
              _step48;

          try {
            for (_iterator48.s(); !(_step48 = _iterator48.n()).done;) {
              var req = _step48.value;
              this.makeCopyOfBodyFile(req, this.groupArray[this.selectedTabIndex.groupIndex], this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex], true);
            }
          } catch (err) {
            _iterator48.e(err);
          } finally {
            _iterator48.f();
          }
        }
      }, {
        key: "onReqNameChange",
        value: function onReqNameChange(reqData) {
          this.makeCopyOfBodyFile(reqData, this.groupArray[this.selectedTabIndex.groupIndex], this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex], true);
        }
      }, {
        key: "getPrePostScriptData",
        value: function getPrePostScriptData(fileName, offset, isEditMode, limit, cctx) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee13() {
            var _this65 = this;

            return _regenerator().w(function (_context13) {
              while (1) switch (_context13.n) {
                case 0:
                  return _context13.a(2, new Promise(function (onFulfill, onReject) {
                    _this65.scenarioHttpService.getFileData({
                      fp: fileName,
                      offset: offset,
                      isEditMode: true,
                      limit: limit,
                      brkDat: true,
                      cctx: cctx
                    }).subscribe(function (state) {
                      if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["FileReadLoading"]) {
                        _this65.scenScheduleData.loadingScen = true;
                        return;
                      }

                      if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_12__["FileReadLoaded"]) {
                        _this65.scenScheduleData.loadingScen = false;
                        onFulfill(state.data);
                        return;
                      }
                    }, function (state) {
                      _this65.scenScheduleData.loadingScen = false;
                      onReject(null);
                      return;
                    });
                  }));
              }
            }, _callee13);
          }));
        }
      }, {
        key: "getCodeForScript",
        value: function getCodeForScript(scriptType, grpData) {
          if (scriptType == "0") {
            this.showPreScriptTab = true;
            this.showPostScriptTab = false;
          } else if (scriptType == "1") {
            this.showPostScriptTab = true;
            this.showPreScriptTab = false;
          }

          if (grpData.scriptLanguage == 'java') this.editorOptionsHdr1 = this.editorOptionsHdrJava;else if (grpData.scriptLanguage == 'js') this.editorOptionsHdr1 = this.editorOptionsHdrJavaScript;else if (grpData.scriptLanguage == 'c') this.editorOptionsHdr1 = this.editorOptionsHdrC;
        }
      }, {
        key: "onInitEditor",
        value: function onInitEditor(e) {
          this.changeDetectorRef.detectChanges();
          setTimeout(function () {
            if (e === null || e === void 0 ? void 0 : e.layout) {
              e.layout();
            }
          }, 0);
        }
      }, {
        key: "savePrePostScript",
        value: function savePrePostScript() {
          var scriptName = this.groupArray[this.selectedTabIndex.groupIndex].scriptName.split("/");
          var path = "".concat(scriptName[0], "/").concat(scriptName[1], "/").concat(scriptName[2], "/"); // for first save - scriptname comes with . and for update it comes without .

          if (!scriptName[2].startsWith(".")) path = "".concat(scriptName[0], "/").concat(scriptName[1], "/.").concat(scriptName[2], "/");
          this.scenUtilService.saveComponentData(0, {
            path: path
          });
        }
      }, {
        key: "groupTabExpandCollapseHandler",
        value: function groupTabExpandCollapseHandler(group) {
          group.isGroupPanelActive = !group.isGroupPanelActive;
        }
      }, {
        key: "flowTabExpandCollapseHandler",
        value: function flowTabExpandCollapseHandler(flow) {
          flow.isFlowTabPanelOpen = !flow.isFlowTabPanelOpen;
        }
      }, {
        key: "createPrePostScript",
        value: function createPrePostScript(isUpdateScriptName, data, grpScriptType) {
          if (isUpdateScriptName) this.scenUtilService.scriptName = this.groupArray[this.selectedTabIndex.groupIndex].scriptName.split("/")[2];
          var currentTimestamp = Date.now();
          var currentTime = this.sessionService.convertTimestampIntoFormattedString(currentTimestamp);
          this.scenUtilService.createDefaultPreScript(data === null || data === void 0 ? void 0 : data.latestBuild, currentTime, grpScriptType);
          this.scenUtilService.createDefaultPostScript(data === null || data === void 0 ? void 0 : data.latestBuild, currentTime, grpScriptType);
        }
      }, {
        key: "prePostScriptDialogHandler",
        value: function prePostScriptDialogHandler(script) {
          this.isShowScriptDialogOpen = true;

          if (script == 'pre') {
            this.isPreScriptEditorVisible = true;
          } else {
            this.isPreScriptEditorVisible = false;
          }
        }
      }, {
        key: "onCardClose",
        value: function onCardClose() {
          this.groupWiseScriptType = this.scenUtilService.scriptType;
        }
      }, {
        key: "resetBody",
        value: function resetBody(isInline) {
          this.setValueInReqData('isLargeBody', false, isInline, {
            op: 'add',
            localSelTabIndex: null
          });
          this.setValueInReqData('largeBody', '', isInline, {
            op: 'add',
            localSelTabIndex: null
          });
          this.setValueInReqData('body', '', isInline, {
            op: 'add',
            localSelTabIndex: null
          });
          this.bodyEditorOptions = Object.assign(Object.assign({}, this.bodyEditorOptions), {
            readOnly: false
          });
        }
      }, {
        key: "changedBrowserStepsConfig",
        value: function changedBrowserStepsConfig(browserStepsConfig) {
          this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].stepsArr[this.selectedTabIndex.browserStepsIndex] = browserStepsConfig;
          this.selectedBrowserData = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](browserStepsConfig);
        }
      }, {
        key: "showCodeMode",
        value: function showCodeMode(evt) {
          var _a;

          var currentScriptMode = ((_a = this.groupArray[this.selectedTabIndex.groupIndex]) === null || _a === void 0 ? void 0 : _a.scriptMode) || 'visual';

          if (this.scriptMode === currentScriptMode) {
            return; // no action needed on click of same mode.
          } // Revert the UI selection back to current mode before showing dialog
          // (ngModel already updated this.scriptMode, but we need to revert it until user confirms)


          this.scriptMode = currentScriptMode;
          this.showScriptModeDialog = true;
        }
      }, {
        key: "toggleScriptModeView",
        value: function toggleScriptModeView() {
          var _a;

          if (((_a = this.groupArray[this.selectedTabIndex.groupIndex]) === null || _a === void 0 ? void 0 : _a.scriptMode) == "code") {
            this.scenUtilService.isScriptMode = false;
          } else {
            this.scenUtilService.isScriptMode = true;
          }

          this.showScriptModeDialog = false;
          this.saveAndReadService.groupIndex = this.selectedTabIndex.groupIndex;

          if (this.groupArray[this.selectedTabIndex.groupIndex].grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            this.groupArray[this.selectedTabIndex.groupIndex].scriptLanguage = 'java';
          } else {
            this.groupArray[this.selectedTabIndex.groupIndex].scriptLanguage = this.groupWiseScriptType;
          } // Update groupArray[index].scriptMode BEFORE saving (do NOT update this.scriptMode here to avoid ngModel change event)


          if (this.scenUtilService.isScriptMode) {
            this.groupArray[this.selectedTabIndex.groupIndex].scriptMode = 'code';
            this.showScriptTab = true;
          } else {
            this.groupArray[this.selectedTabIndex.groupIndex].scriptMode = 'visual';
            this.showScriptTab = false;
          }

          this.scenUtilService.saveComponentData(0, {});
        }
      }, {
        key: "importVisualModeGroups",
        value: function importVisualModeGroups(recordedData) {
          var _this66 = this;

          this.groupArray = []; // reset before populating
          // iterate over all groups

          Object.entries(recordedData.scripts).forEach(function (_ref3) {
            var _ref4 = _slicedToArray(_ref3, 2),
                groupName = _ref4[0],
                groupObj = _ref4[1];

            var result = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](_this66.defaultGroupData);
            result.grpName = groupName; // ✅ use grpName instead of groupName

            if (groupObj.refId) {
              result.refId = groupObj.refId; // capture server md5 when provided on import

              result.md5FromServer = groupObj.md5FromServer || groupObj.md5 || groupObj.md5sum || null; // initialize shareTestInfo container for later md5 tracking

              result.shareTestInfo = [];
            }

            result.parameters = groupObj.parameters || {};
            result.assertions = groupObj.assertions || [];
            result.grpType = groupObj.type || _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API; // default to API if type not provided

            result.flowArr = []; // reset flows for this group

            var flowArr = _this66.saveAndReadService.buildFlowArr(groupObj.flows, result);

            result.flowArr = flowArr;
            if (groupObj[result.grpType]) result[result.grpType] = groupObj[result.grpType];

            if (flowArr.length > 1) {
              _this66.scenUtilService.isFlowInline = 'yes';
            }

            result.totalRequest = flowArr.reduce(function (acc, flow) {
              var _a, _b;

              return acc + ((_b = (_a = flow.reqArr) === null || _a === void 0 ? void 0 : _a.filter(function (req) {
                return req.thinkTime != '0';
              }).length) !== null && _b !== void 0 ? _b : 0);
            }, 0);
            result.totalBrowserSteps = flowArr.reduce(function (acc, flow) {
              var _a, _b;

              return acc + ((_b = (_a = flow.stepsArr) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
            }, 0);

            _this66.groupArray.push(lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](result));
          }); // load first group/flow in UI if available

          if (this.groupArray.length > 0) {
            this.groupArray.forEach(function (grp, grpIdx) {
              grp.flowArr.forEach(function (flow, flowIdx) {
                _this66.showSelectedTab(grp, 0, 0, -1, -1, -1);
              });
            });
          }

          this.groupArray = _toConsumableArray(this.groupArray);
        } // Helper to get supported modes for current group type

      }, {
        key: "getSupportedModesForCurrentGroup",
        value: function getSupportedModesForCurrentGroup() {
          var _a, _b;

          var type = (_b = (_a = this.groupArray) === null || _a === void 0 ? void 0 : _a[this.selectedTabIndex.groupIndex]) === null || _b === void 0 ? void 0 : _b.grpType;
          return this.groupTypeModeSupport[type] || [];
        } // Helper to check if a mode is supported for current group

      }, {
        key: "isModeSupported",
        value: function isModeSupported(mode) {
          return this.getSupportedModesForCurrentGroup().includes(mode);
        } // Helper to get current group type

      }, {
        key: "getCurrentGroupType",
        value: function getCurrentGroupType() {
          var _a, _b;

          return (_b = (_a = this.groupArray) === null || _a === void 0 ? void 0 : _a[this.selectedTabIndex.groupIndex]) === null || _b === void 0 ? void 0 : _b.grpType;
        } // Helper to set mode safely

      }, {
        key: "setScriptMode",
        value: function setScriptMode(mode) {
          if (this.isModeSupported(mode)) {
            this.scriptMode = mode; // Optionally, update group data or trigger UI changes here
          } else {
            // fallback or error
            this.scenUtilService.errorMessage("Mode '".concat(mode, "' not supported for group type '").concat(this.getCurrentGroupType(), "'"));
          }
        }
      }, {
        key: "enableRBUForBrowserType",
        value: function enableRBUForBrowserType() {
          this.scenScheduleData.saveKeywordData['G_RBU'] = {
            ALL: [["ALL", 1, 1, 1, 1, 1, 2]]
          };
        } //TODO : Currently handle for selected group only

      }, {
        key: "setTypeSpecificKeyword",
        value: function setTypeSpecificKeyword(type) {
          if (type == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER || type == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            var temObj = []; //ALL ALL 0 1 0 1 1 0

            temObj.push('ALL');
            temObj.push(1);
            temObj.push(1);
            temObj.push(1);
            temObj.push(1);
            temObj.push(1);
            if (type == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) temObj.push(1);else temObj.push(0);
            if (this.scenScheduleData.saveKeywordData['G_RBU'] == undefined) this.scenScheduleData.saveKeywordData['G_RBU'] = _defineProperty({}, this.groupArray[this.selectedTabIndex.groupIndex].grpName, [temObj]);else this.scenScheduleData.saveKeywordData['G_RBU'][this.groupArray[this.selectedTabIndex.groupIndex].grpName] = [temObj];

            if (this.scenKeywordDefinitionService.scenKeyDataWithAdditionalKey['G_RBU'] != undefined && this.scenKeywordDefinitionService.scenKeyDataWithAdditionalKey['G_RBU']['data'] != undefined) {
              this.scenKeywordDefinitionService.scenKeyDataWithAdditionalKey['G_RBU']['data'][this.groupArray[this.selectedTabIndex.groupIndex].grpName] = [temObj];
            } else {
              this.scenKeywordDefinitionService.scenKeyDataWithAdditionalKey['G_RBU'] = _defineProperty({}, 'data', _defineProperty({}, this.groupArray[this.selectedTabIndex.groupIndex].grpName, [temObj]));
            }

            if (type == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) this.groupArray[this.selectedTabIndex.groupIndex].scriptType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCRIPT_TYPE"].RDT_URL;else this.groupArray[this.selectedTabIndex.groupIndex].scriptType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCRIPT_TYPE"].SCRIPT;
          } else {
            var default_grbu = [[]];
            this.scenScheduleData.saveKeywordData['G_RBU'] = _defineProperty({}, this.groupArray[this.selectedTabIndex.groupIndex].grpName, default_grbu);

            if (!this.scenKeywordDefinitionService.scenKeyDataWithAdditionalKey['G_RBU']) {
              this.scenKeywordDefinitionService.scenKeyDataWithAdditionalKey['G_RBU'] = _defineProperty({}, 'data', {});
            }

            this.scenKeywordDefinitionService.scenKeyDataWithAdditionalKey['G_RBU']['data'][this.groupArray[this.selectedTabIndex.groupIndex].grpName] = default_grbu;
          }
        }
      }, {
        key: "checkForImportFlow",
        value: function checkForImportFlow(evt) {
          console.log('checkForImportFlow' + evt, this.scenUtilService.sharedGroupData);

          if (!evt && this.scenUtilService.sharedGroupData != null) {
            this.importFlowInGroup(this.scenUtilService.sharedGroupData);
            this.scenUtilService.sharedGroupData = null;
          }
        }
      }, {
        key: "importFlowInGroup",
        value: function importFlowInGroup(importPayload) {
          var grpData = this.groupArray[this.selectedTabIndex.groupIndex];
          var flows = (importPayload === null || importPayload === void 0 ? void 0 : importPayload.flows) || {};
          var parameters = (importPayload === null || importPayload === void 0 ? void 0 : importPayload.parameters) || {};
          var assertions = (importPayload === null || importPayload === void 0 ? void 0 : importPayload.assertions) || [];
          var importedConfig = (importPayload === null || importPayload === void 0 ? void 0 : importPayload.config) || {};
          var isTargetRdtNative = !!grpData && grpData.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE;
          var importedRdtConfig = importedConfig === null || importedConfig === void 0 ? void 0 : importedConfig[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE];
          var isImportedRdtNative = Array.isArray(importedRdtConfig) && importedRdtConfig.length > 0;
          var isTargetCrossPlatform = isTargetRdtNative ? this.isRdtConfigCrossPlatform(grpData[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE]) : false;
          var isImportedCrossPlatform = isImportedRdtNative ? this.isRdtConfigCrossPlatform(importedRdtConfig) : false; // Import mode is derived only from RDT_NATIVE.androidAppId + RDT_NATIVE.iosAppId.
          // If target is cross and imported is non-cross, block immediately before any flow build/resolve work.

          if (isTargetRdtNative && isImportedRdtNative) {
            if (isTargetCrossPlatform && !isImportedCrossPlatform) {
              this.isFlowDialogShown = false;
              this.scenUtilService.errorMessage('Import blocked: source flow is non-cross platform but selected group is cross-platform.');
              return;
            }
          } // Apply imported metadata only after validation passes.


          grpData.parameters = parameters;
          grpData.assertions = assertions;

          if (importedConfig && importedConfig[grpData.grpType]) {
            grpData[grpData.grpType] = importedConfig[grpData.grpType];
          } // Build flow array only after import compatibility checks are passed.


          var flowArr = this.saveAndReadService.buildFlowArr(flows, this.selectedGroupData); // If target RDT group is non-cross and imported RDT group is cross, flatten imported flow to target platform.

          if (isTargetRdtNative && isImportedRdtNative) {
            if (!isTargetCrossPlatform && isImportedCrossPlatform) {
              var targetPlatform = this.getRdtGroupPlatform(grpData);
              flowArr = this.normalizeImportedCrossFlowsToNonCross(flowArr, targetPlatform);
            }
          }

          if (this.isFirstDefaultFlow(grpData.flowArr)) grpData.flowArr = grpData.flowArr.slice(1);
          flowArr = grpData.flowArr.concat(flowArr);
          grpData.flowArr = flowArr;
          this.scenUtilService.isFlowInline = 'yes';
          this.isFlowDialogShown = false;
        } // Cross-platform for import flow supports both legacy group keys and per-device appPackage format.

      }, {
        key: "isRdtConfigCrossPlatform",
        value: function isRdtConfigCrossPlatform(rdtConfig) {
          var configList = Array.isArray(rdtConfig) ? rdtConfig : [];
          var primaryConfig = configList[0] || null;

          if (!primaryConfig || typeof primaryConfig !== 'object') {
            return false;
          }

          var hasAndroidAppId = !!((primaryConfig.androidAppId || '') + '').trim();
          var hasIosAppId = !!((primaryConfig.iosAppId || '') + '').trim();

          if (hasAndroidAppId && hasIosAppId) {
            return true;
          } // Newer RDT_NATIVE payload keeps app package per device row (android/ios).


          var hasAndroidDeviceAppPackage = configList.some(function (device) {
            var os = (((device === null || device === void 0 ? void 0 : device.os) || '') + '').toLowerCase();
            return os === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] && !!(((device === null || device === void 0 ? void 0 : device.appPackage) || '') + '').trim();
          });
          var hasIosDeviceAppPackage = configList.some(function (device) {
            var os = (((device === null || device === void 0 ? void 0 : device.os) || '') + '').toLowerCase();
            return os === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"] && !!(((device === null || device === void 0 ? void 0 : device.appPackage) || '') + '').trim();
          });
          return hasAndroidDeviceAppPackage && hasIosDeviceAppPackage;
        } // Flattens cross-platform step data to non-cross shape for selected target platform.

      }, {
        key: "normalizeImportedCrossFlowsToNonCross",
        value: function normalizeImportedCrossFlowsToNonCross(flows, targetPlatform) {
          var _this67 = this;

          if (!Array.isArray(flows) || flows.length === 0 || !targetPlatform) {
            return flows;
          }

          return flows.map(function (flow) {
            var normalizedFlow = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](flow);
            var steps = Array.isArray(normalizedFlow === null || normalizedFlow === void 0 ? void 0 : normalizedFlow.stepsArr) ? normalizedFlow.stepsArr : [];
            steps.forEach(function (step) {
              var isLaunchAppStep = (((step === null || step === void 0 ? void 0 : step.type) || '') + '').toLowerCase() === 'launchapp';

              if (isLaunchAppStep) {
                // For non-cross LaunchApp keep only appPackage and clear bundleId.
                var resolvedAppPackage = targetPlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_IOS"] ? (((step === null || step === void 0 ? void 0 : step.bundleId) || (step === null || step === void 0 ? void 0 : step.appPackage) || '') + '').trim() : (((step === null || step === void 0 ? void 0 : step.appPackage) || '') + '').trim();
                step.appPackage = resolvedAppPackage;
                delete step.bundleId;
              }

              var platformLocators = targetPlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] ? (step === null || step === void 0 ? void 0 : step.androidLocators) || (step === null || step === void 0 ? void 0 : step.locators) || {} : (step === null || step === void 0 ? void 0 : step.iosLocators) || (step === null || step === void 0 ? void 0 : step.locators) || {};
              var platformHeroLocators = targetPlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] ? (step === null || step === void 0 ? void 0 : step.androidHeroElement) || (step === null || step === void 0 ? void 0 : step.heroElement) || {} : (step === null || step === void 0 ? void 0 : step.iosHeroElement) || (step === null || step === void 0 ? void 0 : step.heroElement) || {};
              step.locators = _this67.cloneLocatorObject(platformLocators);
              step.heroElement = _this67.cloneLocatorObject(platformHeroLocators); // Remove cross-platform fields so this step remains non-cross in UI/save/edit flow.

              delete step.androidLocators;
              delete step.iosLocators;
              delete step.androidHeroElement;
              delete step.iosHeroElement;
              var assertions = Array.isArray(step === null || step === void 0 ? void 0 : step.assertions) ? step.assertions : [];
              assertions.forEach(function (assertion) {
                var sourceAssertionLocators = targetPlatform === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_49__["PLATFORM_ANDROID"] ? (assertion === null || assertion === void 0 ? void 0 : assertion.androidLocators) || _this67.getLegacyAssertionLocatorObject(assertion) : (assertion === null || assertion === void 0 ? void 0 : assertion.iosLocators) || _this67.getLegacyAssertionLocatorObject(assertion);

                var src = _this67.cloneLocatorObject(sourceAssertionLocators);

                assertion.xpath = src.xpath;
                assertion.xpath1 = src.xpath1;
                assertion.xpath2 = src.xpath2;
                assertion.cssPath = src.csspath;
                assertion.id = src.id;
                assertion["class"] = src["class"];
                assertion.domString = src.domstring;
                assertion.role = src.role;
                assertion.coordinates = src.coordinates;
                assertion.accessibilityId = src.accessibilityId;
                assertion.androidUIAutomator = src.androidUIAutomator;
                assertion.androidDataMatcher = src.androidDataMatcher;
                assertion.androidViewTag = src.androidViewTag;
                assertion.iOSClassChain = src.iOSClassChain;
                assertion.iOSNsPredicateString = src.iOSNsPredicateString;
                delete assertion.androidLocators;
                delete assertion.iosLocators;
              });
            });
            return normalizedFlow;
          });
        }
      }, {
        key: "isFirstDefaultFlow",
        value: function isFirstDefaultFlow(flowArr) {
          var isFirstDefaultFlow = flowArr && flowArr.length > 0 && flowArr[0].reqArr && flowArr[0].reqArr.length == 2 && flowArr[0].reqArr[0].url == "";

          if (isFirstDefaultFlow == false) {
            isFirstDefaultFlow = flowArr && flowArr.length > 0 && flowArr[0].stepsArr && flowArr[0].stepsArr.length == 1 && flowArr[0].stepsArr[0].url == "";
          }

          return isFirstDefaultFlow;
        }
      }, {
        key: "onEnableDisable",
        value: function onEnableDisable(groupIndex, flowIndex, stepIndex, type) {
          if (type === 'steps') {
            this.groupArray[groupIndex].flowArr[flowIndex].stepsArr[stepIndex].enable = !this.groupArray[groupIndex].flowArr[flowIndex].stepsArr[stepIndex].enable;
          }

          if (type === 'request') {
            this.groupArray[groupIndex].flowArr[flowIndex].reqArr[stepIndex].enable = !this.groupArray[groupIndex].flowArr[flowIndex].reqArr[stepIndex].enable;
          }
        }
      }, {
        key: "onEnableDisableFlow",
        value: function onEnableDisableFlow(groupIndex, flowIndex) {
          this.groupArray[groupIndex].flowArr[flowIndex].enable = !this.groupArray[groupIndex].flowArr[flowIndex].enable;
        }
      }, {
        key: "onAssertionConfigChange",
        value: function onAssertionConfigChange(cfg) {
          var _this68 = this;

          var _a, _b; // receive updated config from child component


          this.assertionConfig = cfg || {
            assertions: []
          };
          console.log('TabPanel received assertionConfig:', this.assertionConfig); // Determine target group index: prefer current selected tab index, otherwise try saved index, otherwise 0

          var groupIndex = this.selectedTabIndex && typeof this.selectedTabIndex.groupIndex === 'number' ? this.selectedTabIndex.groupIndex : (_b = (_a = this.saveAndReadService) === null || _a === void 0 ? void 0 : _a.groupIndex) !== null && _b !== void 0 ? _b : 0; // If selectedGroupData is available, try to match by group name to avoid accidental wrong-index writes

          if (this.selectedGroupData && this.selectedGroupData.grpName) {
            var idxByName = this.groupArray ? this.groupArray.findIndex(function (g) {
              return g.grpName === _this68.selectedGroupData.grpName;
            }) : -1;

            if (idxByName >= 0) {
              groupIndex = idxByName;
            }
          }

          if (this.groupArray && this.groupArray.length > groupIndex && this.groupArray[groupIndex]) {
            this.groupArray[groupIndex].assertionsV2 = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](this.assertionConfig['assertions'] || []);
          } else {
            console.warn('Unable to store assertionConfig: invalid groupIndex', groupIndex, 'selectedGroupData:', this.selectedGroupData && this.selectedGroupData.grpName);
          }
        }
      }, {
        key: "preRequestFunc",
        value: function preRequestFunc() {
          this.preRequest = true;
          this.preRequestMethod = false;

          if (this.postRequest) {
            this.postRequest = false;
          }
        }
      }, {
        key: "postRequestFunc",
        value: function postRequestFunc() {
          this.postRequest = true;
          this.preRequestMethod = false;

          if (this.preRequest) {
            this.preRequest = false;
          }
        }
      }, {
        key: "backOnRequest",
        value: function backOnRequest() {
          this.preRequest = false;
          this.postRequest = false;
          this.preRequestMethod = true;
        }
        /**
         * Open condition scenario dialog
         * This function opens a dialog for configuring test conditions per request
         */

      }, {
        key: "conditionFunc",
        value: function conditionFunc() {
          // Check if component reference exists
          if (!this.conditionScenarioComponent) {
            console.error('Condition Scenario Component reference not found');
            return;
          } // Show the dialog with requestData (same level as preRequest/postResponse)
          // Component will use scenUtilService.parameterOption for parameters


          var requestData = this.groupArray[this.selectedTabIndex.groupIndex].flowArr[this.selectedTabIndex.flowIndex].reqArr[this.selectedTabIndex.reqIndex];
          this.conditionScenarioComponent.showDialog(requestData);
        }
      }, {
        key: "openRunlogicPanel",
        value: function openRunlogicPanel() {
          this.showRunlogicPanel = true;
          this.showPreScriptTab = false;
          this.showPostScriptTab = false;
          this.showParameterTab = false;
          this.toggleSidebar();
        }
      }, {
        key: "closeRunlogicPanel",
        value: function closeRunlogicPanel() {
          this.showRunlogicPanel = false;
          this.toggleSidebar();
        }
      }, {
        key: "toggleSidebar",
        value: function toggleSidebar() {
          this.isSidebarOpen = !this.isSidebarOpen;

          if (this.isSidebarOpen) {
            this.bigSplit = 74;
            this.smallSplit = 26;
          } else {
            this.bigSplit = 100;
            this.smallSplit = 0;
          }

          setTimeout(function () {
            return window.dispatchEvent(new Event('resize'));
          }, 120);
        }
      }, {
        key: "initTargetSwitchModeGroupType",
        value: function initTargetSwitchModeGroupType() {
          var currentGroup = this.groupArray[this.selectedTabIndex.groupIndex];
          var scriptType;
          var targetType;

          if (currentGroup.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API) {
            var rdtConfig = currentGroup[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE];

            if (rdtConfig && Array.isArray(rdtConfig) && rdtConfig.length > 0) {
              targetType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE;
              this.targetSwitchModeTestType = 'Mobile Application';
            } else targetType = this.targetSwitchModeTestType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER;

            scriptType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCRIPT_TYPE"].SCRIPT;
          } else if (currentGroup.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].BROWSER || currentGroup.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].RDT_NATIVE) {
            targetType = this.targetSwitchModeTestType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API;
            scriptType = null;
          }

          return {
            scriptType: scriptType,
            targetType: targetType
          };
        }
      }, {
        key: "SwitchGroupMode",
        value: function SwitchGroupMode() {
          var currentGroup = this.groupArray[this.selectedTabIndex.groupIndex];

          var _this$initTargetSwitc = this.initTargetSwitchModeGroupType(),
              scriptType = _this$initTargetSwitc.scriptType,
              targetType = _this$initTargetSwitc.targetType;

          if (currentGroup.state == _constants_scenario_config_data__WEBPACK_IMPORTED_MODULE_47__["NO_CODE_TEST_STATE"].RECORDED_CUSTOMIZED) {
            this.showCustomizedRecordedTestPrompt = true;
            this.newSwitchModeTestName = this.scenUtilService.formatScenariowrtTimeZone();
            return;
          }

          currentGroup.grpType = targetType;
          currentGroup.scriptType = scriptType;
          this.setTypeSpecificKeyword(currentGroup.grpType);
          this.initTargetSwitchModeGroupType();
        }
        /*
        Create New Test and open that test / scenario
        */

      }, {
        key: "createNewSwitchModeTest",
        value: function createNewSwitchModeTest() {
          // Deep copy the selected group
          var currentGroup = this.groupArray[this.selectedTabIndex.groupIndex];
          var newGroup = lodash__WEBPACK_IMPORTED_MODULE_21__["cloneDeep"](currentGroup);
          this.previosScenName = this.scenUtilService.scenarioName;
          this.scenUtilService.scenarioName = this.newSwitchModeTestName; // Switch type to targetSwitchModeTestType

          newGroup.grpType = this.targetSwitchModeTestType; // Optionally reset scriptMode/scriptType as per SwitchGroupMode logic

          if (this.targetSwitchModeTestType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["GROUP_TYPE"].API) {
            newGroup.scriptType = null;
          } else {
            newGroup.scriptType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_8__["SCRIPT_TYPE"].SCRIPT;
          } // Set type-specific keywords for the new group


          this.setTypeSpecificKeyword(newGroup.grpType); // Add the new group to groupArray

          this.groupArray = [newGroup]; // Optionally, update UI selection to the new group

          this.selectedTabIndex = {
            groupIndex: this.groupArray.length - 1,
            flowIndex: 0,
            reqIndex: 0,
            browserStepsIndex: 0
          };
          this.isScenarioEditMode = false; // Save and open the new scenario (simulate as per existing save logic)

          this.scenUtilService.saveComponentData(0, {});
        }
        /**
        * Updates the state of the selected group from RECORDED to RECORDED_CUSTOMIZED if applicable.
        */

      }, {
        key: "updateGroupStateToCustomized",
        value: function updateGroupStateToCustomized(group) {
          if (group && group.state === _constants_scenario_config_data__WEBPACK_IMPORTED_MODULE_47__["NO_CODE_TEST_STATE"].RECORDED) {
            group.state = _constants_scenario_config_data__WEBPACK_IMPORTED_MODULE_47__["NO_CODE_TEST_STATE"].RECORDED_CUSTOMIZED;
          }
        }
      }]);
    }();

    ScenarioDesignComponent.ctorParameters = function () {
      return [{
        type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"]
      }, {
        type: _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_5__["ScenarioUtilsService"]
      }, {
        type: _service_scen_keyword_definition_service__WEBPACK_IMPORTED_MODULE_10__["ScenKeywordDefinitionService"]
      }, {
        type: _service_scenario_http_service__WEBPACK_IMPORTED_MODULE_11__["ScenarioHttpService"]
      }, {
        type: _service_sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_16__["SchScheduleDataService"]
      }, {
        type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_20__["SessionService"]
      }, {
        type: src_app_shared_header_work_profile_services_work_profile_active_service__WEBPACK_IMPORTED_MODULE_26__["WorkProfileActiveService"]
      }, {
        type: _service_script_parameter_service__WEBPACK_IMPORTED_MODULE_23__["ScriptParameterService"]
      }, {
        type: _service_save_and_read_service__WEBPACK_IMPORTED_MODULE_25__["SaveAndReadService"]
      }, {
        type: _home_script_manager_parameter_components_add_parameter_parameter_data_service__WEBPACK_IMPORTED_MODULE_28__["ParameterDataService"]
      }, {
        type: primeng__WEBPACK_IMPORTED_MODULE_2__["ConfirmationService"]
      }, {
        type: _service_scenario_share_service__WEBPACK_IMPORTED_MODULE_29__["ScenarioSharedService"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
      }, {
        type: src_app_shared_header_user_menu_service_user_options_service__WEBPACK_IMPORTED_MODULE_32__["OptionsService"]
      }, {
        type: _home_load_test_services_load_test_utils_service__WEBPACK_IMPORTED_MODULE_34__["LoadTestUtilsService"]
      }, {
        type: _service_test_mode_service__WEBPACK_IMPORTED_MODULE_35__["TestModeService"]
      }, {
        type: _home_script_manager_services_script_utils_service__WEBPACK_IMPORTED_MODULE_36__["ScriptUtilService"]
      }, {
        type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["ActivatedRoute"]
      }, {
        type: _browser_step_browser_step_service__WEBPACK_IMPORTED_MODULE_38__["BrowserStepService"]
      }, {
        type: _home_log_viewer_log_viewer_service__WEBPACK_IMPORTED_MODULE_40__["LogViewerService"]
      }, {
        type: src_app_shared_common_services_rdt_app_list_service__WEBPACK_IMPORTED_MODULE_46__["RdtAppListService"]
      }, {
        type: src_app_shared_running_task_services_running_task_service__WEBPACK_IMPORTED_MODULE_45__["RunningTaskService"]
      }];
    };

    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(src_app_shared_help_help_component__WEBPACK_IMPORTED_MODULE_30__["HelpComponent"], {
      read: src_app_shared_help_help_component__WEBPACK_IMPORTED_MODULE_30__["HelpComponent"]
    })], ScenarioDesignComponent.prototype, "help", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('conditionScenarioComponent', {
      read: _condition_scenario_condition_scenario_component__WEBPACK_IMPORTED_MODULE_6__["ConditionScenarioComponent"]
    })], ScenarioDesignComponent.prototype, "conditionScenarioComponent", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])("editor")], ScenarioDesignComponent.prototype, "editor", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])("bodyEditor")], ScenarioDesignComponent.prototype, "bodyEditor", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(_home_script_manager_runlogic_home_runlogic_home_component__WEBPACK_IMPORTED_MODULE_31__["RunlogicHomeComponent"], {
      read: _home_script_manager_runlogic_home_runlogic_home_component__WEBPACK_IMPORTED_MODULE_31__["RunlogicHomeComponent"]
    })], ScenarioDesignComponent.prototype, "runLogic", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(primeng__WEBPACK_IMPORTED_MODULE_2__["TabView"])], ScenarioDesignComponent.prototype, "tabView", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])("scriptEditor")], ScenarioDesignComponent.prototype, "scriptEditor", void 0);
    ScenarioDesignComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'scenario-design',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./scenario-design.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario-design/scenario-design.component.html"))["default"],
      encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./scenario-design.component.scss */
      "./src/app/pages/scenario/scenario-design/scenario-design.component.scss"))["default"]]
    })], ScenarioDesignComponent);
    /***/
  },

  /***/
  "./src/app/pages/scenario/scenario-design/scenario-design.module.ts":
  /*!**************************************************************************!*\
    !*** ./src/app/pages/scenario/scenario-design/scenario-design.module.ts ***!
    \**************************************************************************/

  /*! exports provided: onMonacoLoad, ScenarioDesignModule */

  /***/
  function _src_app_pages_scenario_scenarioDesign_scenarioDesignModuleTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "onMonacoLoad", function () {
      return onMonacoLoad;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ScenarioDesignModule", function () {
      return ScenarioDesignModule;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/common */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
    /* harmony import */


    var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
    /* harmony import */


    var _angular_common_http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! @angular/common/http */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
    /* harmony import */


    var primeng__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! primeng */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
    /* harmony import */


    var primeng_dropdown__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! primeng/dropdown */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
    /* harmony import */


    var primeng_button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! primeng/button */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
    /* harmony import */


    var primeng_inputtext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! primeng/inputtext */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
    /* harmony import */


    var primeng_sidebar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! primeng/sidebar */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js");
    /* harmony import */


    var primeng_inputnumber__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
    /*! primeng/inputnumber */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputnumber.js");
    /* harmony import */


    var _scenario_design_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
    /*! ./scenario-design.component */
    "./src/app/pages/scenario/scenario-design/scenario-design.component.ts");
    /* harmony import */


    var _condition_scenario_condition_scenario_module__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
    /*! ./condition-scenario/condition-scenario.module */
    "./src/app/pages/scenario/scenario-design/condition-scenario/condition-scenario.module.ts");
    /* harmony import */


    var _angular_router__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
    /*! @angular/router */
    "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
    /* harmony import */


    var _angular_material_menu__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
    /*! @angular/material/menu */
    "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/menu.js");
    /* harmony import */


    var primeng_tabmenu__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(
    /*! primeng/tabmenu */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tabmenu.js");
    /* harmony import */


    var _angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(
    /*! @angular/cdk/drag-drop */
    "./node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/drag-drop.js");
    /* harmony import */


    var _load_configuration_load_configuration_module__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(
    /*! ../load-configuration/load-configuration.module */
    "./src/app/pages/scenario/load-configuration/load-configuration.module.ts");
    /* harmony import */


    var primeng_dialog__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(
    /*! primeng/dialog */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
    /* harmony import */


    var _angular_material_select__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(
    /*! @angular/material/select */
    "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/select.js");
    /* harmony import */


    var ngx_monaco_editor__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(
    /*! ngx-monaco-editor */
    "./node_modules/ngx-monaco-editor/__ivy_ngcc__/fesm2015/ngx-monaco-editor.js");
    /* harmony import */


    var primeng_inputtextarea__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(
    /*! primeng/inputtextarea */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtextarea.js");
    /* harmony import */


    var primeng_confirmdialog__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(
    /*! primeng/confirmdialog */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-confirmdialog.js");
    /* harmony import */


    var src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(
    /*! src/app/shared/help/help.module */
    "./src/app/shared/help/help.module.ts");
    /* harmony import */


    var primeng_tree__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(
    /*! primeng/tree */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tree.js");
    /* harmony import */


    var _home_script_manager_runlogic_home_runlogic_home_module__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(
    /*! ../../home/script-manager/runlogic-home/runlogic-home.module */
    "./src/app/pages/home/script-manager/runlogic-home/runlogic-home.module.ts");
    /* harmony import */


    var primeng_multiselect__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(
    /*! primeng/multiselect */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-multiselect.js");
    /* harmony import */


    var _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(
    /*! @angular/material/tooltip */
    "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/tooltip.js");
    /* harmony import */


    var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(
    /*! src/app/shared/cav-table/cav-table.module */
    "./src/app/shared/cav-table/cav-table.module.ts");
    /* harmony import */


    var _browser_step_browser_interaction_browser_interaction_module__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(
    /*! ../browser-step/browser-interaction/browser-interaction.module */
    "./src/app/pages/scenario/browser-step/browser-interaction/browser-interaction.module.ts");
    /* harmony import */


    var angular_split__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(
    /*! angular-split */
    "./node_modules/angular-split/__ivy_ngcc__/fesm2015/angular-split.js");
    /* harmony import */


    var _import_script_browse_test_sidebar_browse_test_sidebar_module__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(
    /*! ../import-script/browse-test-sidebar/browse-test-sidebar.module */
    "./src/app/pages/scenario/import-script/browse-test-sidebar/browse-test-sidebar.module.ts");
    /* harmony import */


    var _assertion_assertion_module__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(
    /*! ../assertion/assertion.module */
    "./src/app/pages/scenario/assertion/assertion.module.ts");
    /* harmony import */


    var _components_no_code_runlogic_no_code_runlogic_component__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(
    /*! ./components/no-code-runlogic/no-code-runlogic.component */
    "./src/app/pages/scenario/scenario-design/components/no-code-runlogic/no-code-runlogic.component.ts");
    /* harmony import */


    var _home_script_manager_script_edit_home_script_topmenu_script_tab_script_tab_module__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(
    /*! ../../home/script-manager/script-edit-home/script-topmenu/script-tab/script-tab.module */
    "./src/app/pages/home/script-manager/script-edit-home/script-topmenu/script-tab/script-tab.module.ts");
    /* harmony import */


    var _protocols_dns_dns_component__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(
    /*! ./protocols/dns/dns.component */
    "./src/app/pages/scenario/scenario-design/protocols/dns/dns.component.ts");
    /* harmony import */


    var primeng_accordion__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(
    /*! primeng/accordion */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-accordion.js");
    /* harmony import */


    var primeng_fileupload__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(
    /*! primeng/fileupload */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-fileupload.js");
    /* harmony import */


    var _cav_parameter_input_cav_parameter_input_module__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(
    /*! ../cav-parameter-input/cav-parameter-input.module */
    "./src/app/pages/scenario/cav-parameter-input/cav-parameter-input.module.ts");

    var route = [{
      path: "",
      pathMatch: "full",
      redirectTo: "scenDesign"
    }, {
      path: 'scenDesign',
      component: _scenario_design_component__WEBPACK_IMPORTED_MODULE_11__["ScenarioDesignComponent"],
      children: [{
        path: 'settings',
        loadChildren: function loadChildren() {
          return __webpack_require__.e(
          /*! import() | scenario-common-settings-scenario-common-settings-module */
          "scenario-common-settings-scenario-common-settings-module").then(__webpack_require__.bind(null,
          /*! ../scenario-common-settings/scenario-common-settings.module */
          "./src/app/pages/scenario/scenario-common-settings/scenario-common-settings.module.ts")).then(function (m) {
            return m.CommonSettingsModule;
          });
        }
      }, {
        path: 'importScript',
        loadChildren: function loadChildren() {
          return Promise.all(
          /*! import() | import-script-import-script-module */
          [__webpack_require__.e("default~basic-scenario-basic-scenario-module~basic-scenario-left-panel-basic-scenario-left-panel-mod~48e9c3b9"), __webpack_require__.e("default~import-script-import-script-module~scenario-design-scenario-design-module"), __webpack_require__.e("import-script-import-script-module")]).then(__webpack_require__.bind(null,
          /*! ../import-script/import-script.module */
          "./src/app/pages/scenario/import-script/import-script.module.ts")).then(function (m) {
            return m.ImportScriptModule;
          });
        }
      }, {
        path: 'recorder',
        children: [{
          path: 'scriptRecorder',
          loadChildren: function loadChildren() {
            return __webpack_require__.e(
            /*! import() | home-script-manager-script-recorder-script-recorder-module */
            "default~home-script-manager-script-recorder-script-recorder-module~script-recorder-script-recorder-module").then(__webpack_require__.bind(null,
            /*! ../../home/script-manager/script-recorder/script-recorder.module */
            "./src/app/pages/home/script-manager/script-recorder/script-recorder.module.ts")).then(function (m) {
              return m.ScriptRecorderModule;
            });
          },
          outlet: "recorder"
        }]
      }, {
        path: 'parameter',
        children: [{
          path: 'addParameter',
          loadChildren: function loadChildren() {
            return Promise.all(
            /*! import() | home-script-manager-parameter-components-add-parameter-add-parameter-module */
            [__webpack_require__.e("default~checkpoint-add-checkpoints-add-checkpoints-module~parameter-components-add-parameter-add-par~1954d724"), __webpack_require__.e("parameter-components-add-parameter-add-parameter-module")]).then(__webpack_require__.bind(null,
            /*! ../../home/script-manager/parameter/components/add-parameter/add-parameter.module */
            "./src/app/pages/home/script-manager/parameter/components/add-parameter/add-parameter.module.ts")).then(function (m) {
              return m.AddParameterModule;
            });
          },
          outlet: "parameter"
        }]
      }, {
        path: 'checkpoint',
        children: [{
          path: 'addAssertion',
          loadChildren: function loadChildren() {
            return Promise.all(
            /*! import() | home-script-manager-checkpoint-add-checkpoints-add-checkpoints-module */
            [__webpack_require__.e("default~checkpoint-add-checkpoints-add-checkpoints-module~parameter-components-add-parameter-add-par~1954d724"), __webpack_require__.e("checkpoint-add-checkpoints-add-checkpoints-module")]).then(__webpack_require__.bind(null,
            /*! ../../home/script-manager/checkpoint/add-checkpoints/add-checkpoints.module */
            "./src/app/pages/home/script-manager/checkpoint/add-checkpoints/add-checkpoints.module.ts")).then(function (m) {
              return m.AddCheckpointsModule;
            });
          },
          outlet: "checkpoint"
        }]
      }, {
        path: 'replay',
        children: [{
          path: 'replayAccessLog',
          loadChildren: function loadChildren() {
            return Promise.all(
            /*! import() | replay-access-log-replay-access-log-module */
            [__webpack_require__.e("common"), __webpack_require__.e("replay-access-log-replay-access-log-module")]).then(__webpack_require__.bind(null,
            /*! ../replay-access-log/replay-access-log.module */
            "./src/app/pages/scenario/replay-access-log/replay-access-log.module.ts")).then(function (m) {
              return m.ReplayAccessLogModule;
            });
          },
          outlet: 'replay'
        }]
      }, {
        path: 'script-editor',
        loadChildren: function loadChildren() {
          return __webpack_require__.e(
          /*! import() | home-script-manager-script-edit-home-script-edit-home-module */
          "home-script-manager-script-edit-home-script-edit-home-module").then(__webpack_require__.bind(null,
          /*! ../../home/script-manager/script-edit-home/script-edit-home.module */
          "./src/app/pages/home/script-manager/script-edit-home/script-edit-home.module.ts")).then(function (m) {
            return m.ScriptEditHomeModule;
          });
        },
        outlet: 'script'
      }]
    }];

    function onMonacoLoad() {
      console.log(window.monaco);
      return window.monaco;
    }

    var monacoConfig = {
      baseUrl: './assets',
      defaultOptions: {
        scrollBeyondLastLine: false
      },
      onMonacoLoad: onMonacoLoad // here monaco object will be available as window.monaco use this function to extend monaco editor functionalities.

    };

    var ScenarioDesignModule = /*#__PURE__*/_createClass(function ScenarioDesignModule() {
      _classCallCheck(this, ScenarioDesignModule);
    });

    ScenarioDesignModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
      declarations: [_scenario_design_component__WEBPACK_IMPORTED_MODULE_11__["ScenarioDesignComponent"], _components_no_code_runlogic_no_code_runlogic_component__WEBPACK_IMPORTED_MODULE_33__["NoCodeRunlogicComponent"], _protocols_dns_dns_component__WEBPACK_IMPORTED_MODULE_35__["DnsComponent"]],
      imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"], _angular_common_http__WEBPACK_IMPORTED_MODULE_4__["HttpClientModule"], primeng_dropdown__WEBPACK_IMPORTED_MODULE_6__["DropdownModule"], primeng_button__WEBPACK_IMPORTED_MODULE_7__["ButtonModule"], primeng_inputtext__WEBPACK_IMPORTED_MODULE_8__["InputTextModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["CheckboxModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["TooltipModule"], primeng_sidebar__WEBPACK_IMPORTED_MODULE_9__["SidebarModule"], primeng_inputnumber__WEBPACK_IMPORTED_MODULE_10__["InputNumberModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["SelectButtonModule"], _angular_material_select__WEBPACK_IMPORTED_MODULE_19__["MatSelectModule"], _angular_material_menu__WEBPACK_IMPORTED_MODULE_14__["MatMenuModule"], _angular_router__WEBPACK_IMPORTED_MODULE_13__["RouterModule"].forChild(route), primeng_tabmenu__WEBPACK_IMPORTED_MODULE_15__["TabMenuModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["TabViewModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["InputSwitchModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["SpinnerModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["TableModule"], _angular_cdk_drag_drop__WEBPACK_IMPORTED_MODULE_16__["DragDropModule"], _load_configuration_load_configuration_module__WEBPACK_IMPORTED_MODULE_17__["LoadConfigurationModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["RadioButtonModule"], primeng_dialog__WEBPACK_IMPORTED_MODULE_18__["DialogModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["OverlayPanelModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["CardModule"], primeng_multiselect__WEBPACK_IMPORTED_MODULE_26__["MultiSelectModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["AutoCompleteModule"], primeng_inputtextarea__WEBPACK_IMPORTED_MODULE_21__["InputTextareaModule"], primeng_confirmdialog__WEBPACK_IMPORTED_MODULE_22__["ConfirmDialogModule"], src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_23__["HelpModule"], primeng_tree__WEBPACK_IMPORTED_MODULE_24__["TreeModule"], _home_script_manager_runlogic_home_runlogic_home_module__WEBPACK_IMPORTED_MODULE_25__["RunLogicHomeModule"], _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_27__["MatTooltipModule"], ngx_monaco_editor__WEBPACK_IMPORTED_MODULE_20__["MonacoEditorModule"].forRoot(monacoConfig), src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_28__["CavTableModule"], angular_split__WEBPACK_IMPORTED_MODULE_30__["AngularSplitModule"], _browser_step_browser_interaction_browser_interaction_module__WEBPACK_IMPORTED_MODULE_29__["BrowserInteractionModule"], _import_script_browse_test_sidebar_browse_test_sidebar_module__WEBPACK_IMPORTED_MODULE_31__["BrowseTestSidebarModule"], _assertion_assertion_module__WEBPACK_IMPORTED_MODULE_32__["AssertionModule"], _home_script_manager_script_edit_home_script_topmenu_script_tab_script_tab_module__WEBPACK_IMPORTED_MODULE_34__["ScriptTabModule"], _condition_scenario_condition_scenario_module__WEBPACK_IMPORTED_MODULE_12__["ConditionScenarioModule"], primeng_accordion__WEBPACK_IMPORTED_MODULE_36__["AccordionModule"], primeng_fileupload__WEBPACK_IMPORTED_MODULE_37__["FileUploadModule"], _cav_parameter_input_cav_parameter_input_module__WEBPACK_IMPORTED_MODULE_38__["CavParameterInputModule"]],
      exports: [_scenario_design_component__WEBPACK_IMPORTED_MODULE_11__["ScenarioDesignComponent"]]
    })], ScenarioDesignModule);
    /***/
  },

  /***/
  "./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.component.scss":
  /*!***********************************************************************************!*\
    !*** ./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.component.scss ***!
    \***********************************************************************************/

  /*! exports provided: default */

  /***/
  function _src_app_pages_scenario_tagsAutocomplete_tagsAutocompleteComponentScss(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = ".tags-autocomplete-container {\n  position: relative;\n  width: 100%;\n  display: inline-block;\n}\n\n.chip {\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n  padding: 2px 6px;\n  border-radius: 4px;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  user-select: none;\n  animation: chipFadeIn 0.2s ease;\n  margin-right: 2px;\n}\n\n.chip:hover {\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);\n}\n\n@keyframes chipFadeIn {\n  from {\n    opacity: 0;\n    transform: scale(0.8);\n  }\n  to {\n    opacity: 1;\n    transform: scale(1);\n  }\n}\n\n.chip-text {\n  max-width: 200px;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  line-height: 1.4;\n}\n\n.chip-remove {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 16px;\n  height: 16px;\n  padding: 0;\n  border: none;\n  background: rgba(255, 255, 255, 0.2);\n  border-radius: 50%;\n  color: #ffffff;\n  font-size: 10px;\n  cursor: pointer;\n  transition: all 0.15s ease;\n}\n\n.chip-remove:hover {\n  background: rgba(255, 255, 255, 0.3);\n  transform: scale(1.1);\n}\n\n.chip-remove:active {\n  transform: scale(0.95);\n}\n\n.chip-remove i {\n  font-size: 10px;\n}\n\n.tags-input {\n  min-width: 100px;\n  height: 23px !important;\n  padding: 0 !important;\n  border: none;\n  outline: none;\n  background: transparent;\n}\n\n.suggestions-dropdown {\n  min-width: 200px;\n  max-width: 400px;\n  max-height: 240px;\n  background: var(--background_color_1);\n  border-radius: 6px;\n  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n  overflow: hidden;\n  animation: dropdownFadeIn 0.15s ease;\n  z-index: 1000;\n  position: relative;\n}\n\n@keyframes dropdownFadeIn {\n  from {\n    opacity: 0;\n    transform: translateY(-4px);\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n\n.suggestions-list {\n  max-height: 240px;\n  overflow-y: auto;\n  padding: 4px;\n}\n\n.no-results {\n  padding: 10px 12px;\n  color: var(--text_color_3, #777);\n  font-style: italic;\n}\n\n.suggestion-item {\n  padding: 8px 12px;\n  cursor: pointer;\n  border-radius: 4px;\n  line-height: 1.5;\n  transition: all 0.12s ease;\n  -webkit-user-select: none;\n     -moz-user-select: none;\n          user-select: none;\n}\n\n.suggestion-item:hover, .suggestion-item.selected {\n  background: rgba(239, 246, 255, 0.4);\n}\n\n.suggestion-item:active {\n  background: rgba(219, 234, 254, 0.5);\n}\n\n.suggestion-text {\n  display: block;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  line-height: 1.4;\n}";
    /***/
  },

  /***/
  "./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.component.ts":
  /*!*********************************************************************************!*\
    !*** ./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.component.ts ***!
    \*********************************************************************************/

  /*! exports provided: TagsAutocompleteComponent */

  /***/
  function _src_app_pages_scenario_tagsAutocomplete_tagsAutocompleteComponentTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "TagsAutocompleteComponent", function () {
      return TagsAutocompleteComponent;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");

    var InputMode;

    (function (InputMode) {
      InputMode["KEY"] = "KEY";
      InputMode["VALUE"] = "VALUE";
    })(InputMode || (InputMode = {}));

    var TagsAutocompleteComponent = /*#__PURE__*/function () {
      function TagsAutocompleteComponent(cdr) {
        _classCallCheck(this, TagsAutocompleteComponent);

        this.cdr = cdr;
        this.metadata = {};
        this.placeholder = 'Type to add tags...';
        this.chips = [];
        this.chipsChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.chipAdded = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.chipRemoved = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.inputControl = new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"]('');
        this.isOverlayOpen = false;
        this.filteredSuggestions = [];
        this.selectedIndex = -1;
        this.currentMode = InputMode.KEY;
        this.currentKey = '';
        this.ignoreNextBlur = false;
        this.lastMetadataKeys = new Set();
      }

      return _createClass(TagsAutocompleteComponent, [{
        key: "ngOnInit",
        value: function ngOnInit() {
          this.updateLastMetadataKeys();
        }
      }, {
        key: "ngOnChanges",
        value: function ngOnChanges(changes) {
          if (changes['metadata'] && !changes['metadata'].firstChange) {
            // Metadata changed, re-filter suggestions with new metadata
            this.refreshSuggestionsWithNewMetadata();
          }
        }
        /**
         * Refresh suggestions based on updated metadata
         */

      }, {
        key: "refreshSuggestionsWithNewMetadata",
        value: function refreshSuggestionsWithNewMetadata() {
          var _a;

          var currentInput = ((_a = this.inputControl.value) === null || _a === void 0 ? void 0 : _a.trim()) || '';

          if (currentInput && this.isOverlayOpen) {
            // Re-filter suggestions with the latest metadata
            this.onInputChange(currentInput);
          }
        }
        /**
         * Track metadata changes for later reference
         */

      }, {
        key: "updateLastMetadataKeys",
        value: function updateLastMetadataKeys() {
          this.lastMetadataKeys = new Set(Object.keys(this.metadata || {}));
        }
        /**
         * Handle input changes and filter suggestions
         */

      }, {
        key: "onInputChange",
        value: function onInputChange(value) {
          var trimmedValue = value.trim();

          if (!trimmedValue) {
            this.closeOverlay();
            return;
          } // Check if user typed '=' to switch to value mode


          if (trimmedValue.includes('=') && this.currentMode === InputMode.KEY) {
            var parts = trimmedValue.split('=');
            this.currentKey = parts[0].trim();

            if (this.currentKey && this.metadata[this.currentKey]) {
              this.currentMode = InputMode.VALUE;
              var valueInput = parts.slice(1).join('=').trim();
              this.filterSuggestions(valueInput, this.metadata[this.currentKey]); // Ensure caret stays at the end while typing '='

              this.setCaretToEnd();
            } else {
              this.closeOverlay();
            }
          } else if (this.currentMode === InputMode.VALUE) {
            // Already in value mode, filter values
            var _parts = trimmedValue.split('=');

            var _valueInput = _parts.slice(1).join('=').trim();

            this.filterSuggestions(_valueInput, this.metadata[this.currentKey] || []);
          } else {
            // Key mode - filter keys from the latest metadata
            var keys = Object.keys(this.metadata || {});
            this.filterSuggestions(trimmedValue, keys);
          }
        }
        /**
         * Filter suggestions based on input
         */

      }, {
        key: "filterSuggestions",
        value: function filterSuggestions(input, options) {
          this.filteredSuggestions = options.filter(function (option) {
            return option.toLowerCase().includes(input.toLowerCase());
          });
          this.selectedIndex = -1; // Keep overlay open even when empty to show empty-state message

          this.isOverlayOpen = true;
          this.cdr.markForCheck();
        }
        /**
         * Handle suggestion selection
         */

      }, {
        key: "selectSuggestion",
        value: function selectSuggestion(suggestion) {
          // Prevent blur from creating a chip when selecting with mouse
          this.ignoreNextBlur = true;

          if (this.currentMode === InputMode.KEY) {
            // Replace input with selected key
            this.inputControl.setValue(suggestion, {
              emitEvent: false
            });
            this.currentKey = suggestion;
            this.closeOverlay();
          } else {
            // Complete the key-value pair
            this.inputControl.setValue("".concat(this.currentKey, "=").concat(suggestion), {
              emitEvent: false
            });
            this.closeOverlay();
          }

          this.focusInput();
          this.setCaretToEnd();
        }
        /**
         * Handle Enter key press
         */

      }, {
        key: "onEnterPress",
        value: function onEnterPress() {
          // If suggestion is highlighted, select it
          if (this.selectedIndex >= 0 && this.filteredSuggestions.length > 0) {
            this.selectSuggestion(this.filteredSuggestions[this.selectedIndex]);
            return;
          } // Otherwise, create chip from current input


          this.createChipFromInput();
        }
        /**
         * Create chip from current input value
         */

      }, {
        key: "createChipFromInput",
        value: function createChipFromInput() {
          var _a;

          var value = (_a = this.inputControl.value) === null || _a === void 0 ? void 0 : _a.trim();
          if (!value) return;
          var chip = this.parseInputToChip(value);

          if (chip) {
            this.addChip(chip);
            this.resetInput();
          }
        }
        /**
         * Parse input string to chip object
         */

      }, {
        key: "parseInputToChip",
        value: function parseInputToChip(input) {
          if (input.includes('=')) {
            var _input$split = input.split('='),
                _input$split2 = _toArray(_input$split),
                key = _input$split2[0],
                valueParts = _arrayLikeToArray(_input$split2).slice(1);

            var value = valueParts.join('=').trim();

            if (key.trim() && value) {
              return {
                key: key.trim(),
                value: value,
                display: "".concat(key.trim(), "=").concat(value)
              };
            }
          } else if (input) {
            // Key-only chip
            return {
              key: input,
              display: input
            };
          }

          return null;
        }
        /**
         * Add chip to the list
         */

      }, {
        key: "addChip",
        value: function addChip(chip) {
          // Avoid duplicates
          var exists = this.chips.some(function (c) {
            return c.display === chip.display;
          });
          if (exists) return;
          this.chips = [].concat(_toConsumableArray(this.chips), [chip]);
          this.chipAdded.emit(chip);
          this.chipsChange.emit(this.chips);
          this.cdr.markForCheck();
        }
        /**
         * Remove chip from the list
         */

      }, {
        key: "removeChip",
        value: function removeChip(index) {
          var removedChip = this.chips[index];
          this.chips = this.chips.filter(function (_, i) {
            return i !== index;
          });
          this.chipRemoved.emit(removedChip);
          this.chipsChange.emit(this.chips);
          this.cdr.markForCheck();
        }
        /**
         * Handle backspace key
         */

      }, {
        key: "onBackspace",
        value: function onBackspace() {
          var _a;

          var value = (_a = this.inputControl.value) === null || _a === void 0 ? void 0 : _a.trim(); // If input is empty and there are chips, remove last chip

          if (!value && this.chips.length > 0) {
            this.removeChip(this.chips.length - 1);
          }
        }
        /**
         * Handle keyboard navigation
         */

      }, {
        key: "onKeyDown",
        value: function onKeyDown(event) {
          if (!this.isOverlayOpen) {
            if (event.key === 'Enter') {
              this.onEnterPress();
            } else if (event.key === 'Backspace') {
              this.onBackspace();
            }

            return;
          }

          switch (event.key) {
            case 'ArrowDown':
              event.preventDefault();
              this.selectedIndex = Math.min(this.selectedIndex + 1, this.filteredSuggestions.length - 1);
              this.scrollToSelected();
              this.cdr.markForCheck();
              break;

            case 'ArrowUp':
              event.preventDefault();
              this.selectedIndex = Math.max(this.selectedIndex - 1, 0);
              this.scrollToSelected();
              this.cdr.markForCheck();
              break;

            case 'Enter':
              event.preventDefault();

              if (this.selectedIndex >= 0) {
                this.selectSuggestion(this.filteredSuggestions[this.selectedIndex]);
              } else {
                this.createChipFromInput();
              }

              break;

            case 'Escape':
              event.preventDefault();
              this.closeOverlay();
              break;

            case 'Backspace':
              this.onBackspace();
              break;
          }
        }
        /**
         * Scroll to selected suggestion
         */

      }, {
        key: "scrollToSelected",
        value: function scrollToSelected() {
          setTimeout(function () {
            var selectedElement = document.querySelector('.suggestion-item.selected');

            if (selectedElement) {
              selectedElement.scrollIntoView({
                block: 'nearest',
                behavior: 'smooth'
              });
            }
          });
        }
        /**
         * Handle input blur
         */

      }, {
        key: "onInputBlur",
        value: function onInputBlur() {
          var _this69 = this;

          // Delay to allow click on suggestions
          setTimeout(function () {
            var _a;

            if (_this69.ignoreNextBlur) {
              // Reset the flag and do not create a chip
              _this69.ignoreNextBlur = false;
            } else if ((_a = _this69.inputControl.value) === null || _a === void 0 ? void 0 : _a.trim()) {
              _this69.createChipFromInput();
            }

            _this69.closeOverlay();
          }, 200);
        }
        /**
         * Focus the input element
         */

      }, {
        key: "focusInput",
        value: function focusInput() {
          var _this70 = this;

          setTimeout(function () {
            var _a;

            (_a = _this70.inputElement) === null || _a === void 0 ? void 0 : _a.nativeElement.focus();
          });
        }
        /**
         * Place caret to the end of the current input value
         */

      }, {
        key: "setCaretToEnd",
        value: function setCaretToEnd() {
          var _this71 = this;

          setTimeout(function () {
            var _a, _b;

            var el = (_a = _this71.inputElement) === null || _a === void 0 ? void 0 : _a.nativeElement;
            if (!el) return;

            try {
              var len = _this71.inputControl.value ? String(_this71.inputControl.value).length : 0;
              (_b = el.setSelectionRange) === null || _b === void 0 ? void 0 : _b.call(el, len, len);
            } catch (_c) {// no-op if selection is not supported
            }
          });
        }
        /**
         * Close overlay and reset state
         */

      }, {
        key: "closeOverlay",
        value: function closeOverlay() {
          this.isOverlayOpen = false;
          this.selectedIndex = -1;
          this.filteredSuggestions = [];
          this.cdr.markForCheck();
        }
        /**
         * Reset input and state
         */

      }, {
        key: "resetInput",
        value: function resetInput() {
          this.inputControl.setValue('', {
            emitEvent: false
          });
          this.currentMode = InputMode.KEY;
          this.currentKey = '';
          this.closeOverlay();
        }
        /**
         * Track by function for ngFor
         */

      }, {
        key: "trackByIndex",
        value: function trackByIndex(index) {
          return index;
        }
        /**
         * Track by function for chips
         */

      }, {
        key: "trackByChip",
        value: function trackByChip(index, chip) {
          return chip.display;
        }
      }]);
    }();

    TagsAutocompleteComponent.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
      }];
    };

    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], TagsAutocompleteComponent.prototype, "metadata", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], TagsAutocompleteComponent.prototype, "placeholder", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], TagsAutocompleteComponent.prototype, "chips", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], TagsAutocompleteComponent.prototype, "chipsChange", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], TagsAutocompleteComponent.prototype, "chipAdded", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], TagsAutocompleteComponent.prototype, "chipRemoved", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('inputElement', {
      "static": false
    })], TagsAutocompleteComponent.prototype, "inputElement", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('trigger', {
      "static": true,
      read: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
    })], TagsAutocompleteComponent.prototype, "trigger", void 0);
    TagsAutocompleteComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'app-tags-autocomplete',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./tags-autocomplete.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.component.html"))["default"],
      changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./tags-autocomplete.component.scss */
      "./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.component.scss"))["default"]]
    })], TagsAutocompleteComponent);
    /***/
  },

  /***/
  "./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.module.ts":
  /*!******************************************************************************!*\
    !*** ./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.module.ts ***!
    \******************************************************************************/

  /*! exports provided: TagsAutocompleteModule */

  /***/
  function _src_app_pages_scenario_tagsAutocomplete_tagsAutocompleteModuleTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "TagsAutocompleteModule", function () {
      return TagsAutocompleteModule;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/common */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
    /* harmony import */


    var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
    /* harmony import */


    var _tags_autocomplete_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./tags-autocomplete.component */
    "./src/app/pages/scenario/tags-autocomplete/tags-autocomplete.component.ts");
    /* harmony import */


    var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! @angular/cdk/overlay */
    "./node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/overlay.js");

    var TagsAutocompleteModule = /*#__PURE__*/_createClass(function TagsAutocompleteModule() {
      _classCallCheck(this, TagsAutocompleteModule);
    });

    TagsAutocompleteModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
      declarations: [_tags_autocomplete_component__WEBPACK_IMPORTED_MODULE_4__["TagsAutocompleteComponent"]],
      exports: [_tags_autocomplete_component__WEBPACK_IMPORTED_MODULE_4__["TagsAutocompleteComponent"]],
      imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__["ReactiveFormsModule"], _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__["OverlayModule"]]
    })], TagsAutocompleteModule);
    /***/
  },

  /***/
  "./src/app/shared/common-services/rdt-app-list.service.ts":
  /*!****************************************************************!*\
    !*** ./src/app/shared/common-services/rdt-app-list.service.ts ***!
    \****************************************************************/

  /*! exports provided: RdtAppListService */

  /***/
  function _src_app_shared_commonServices_rdtAppListServiceTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "RdtAppListService", function () {
      return RdtAppListService;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! rxjs */
    "./node_modules/rxjs/_esm2015/index.js");
    /* harmony import */


    var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! rxjs/operators */
    "./node_modules/rxjs/_esm2015/operators/index.js");
    /* harmony import */


    var src_app_pages_home_script_manager_services_script_rest_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! src/app/pages/home/script-manager/services/script-rest.service */
    "./src/app/pages/home/script-manager/services/script-rest.service.ts");
    /* harmony import */


    var src_app_pages_home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! src/app/pages/home/script-manager/services/script.state */
    "./src/app/pages/home/script-manager/services/script.state.ts");

    var RdtAppListService = /*#__PURE__*/function () {
      function RdtAppListService(scriptRestService) {
        _classCallCheck(this, RdtAppListService);

        this.scriptRestService = scriptRestService;
        this.applicationOpt = [];
        this.defaultAllowedExtensions = ['.apk', '.ipa'];
      }

      return _createClass(RdtAppListService, [{
        key: "normalizeAllowedExtensions",
        value: function normalizeAllowedExtensions(allowedExtensions) {
          var source = Array.isArray(allowedExtensions) && allowedExtensions.length > 0 ? allowedExtensions : this.defaultAllowedExtensions;
          return source.map(function (ext) {
            return (ext || '').trim().toLowerCase();
          }).filter(function (ext) {
            return ext.startsWith('.');
          });
        }
      }, {
        key: "extractFileExtension",
        value: function extractFileExtension(fileName) {
          var normalizedName = (fileName || '').trim().toLowerCase();
          var lastDotIdx = normalizedName.lastIndexOf('.');

          if (lastDotIdx < 0) {
            return '';
          }

          return normalizedName.substring(lastDotIdx);
        }
      }, {
        key: "isAllowedAppFile",
        value: function isAllowedAppFile(fileName, allowedExtensions) {
          var ext = this.extractFileExtension(fileName);

          if (!ext) {
            return false;
          }

          return this.normalizeAllowedExtensions(allowedExtensions).includes(ext);
        }
      }, {
        key: "getAcceptString",
        value: function getAcceptString(allowedExtensions) {
          return this.normalizeAllowedExtensions(allowedExtensions).join(',');
        }
      }, {
        key: "uploadApplication",
        value: function uploadApplication(fileObj, allowedExtensions) {
          var _this72 = this;

          if (!fileObj || !fileObj.name) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["throwError"])(function () {
              return new Error('No file selected for upload.');
            });
          }

          if (!this.isAllowedAppFile(fileObj.name, allowedExtensions)) {
            var acceptText = this.getAcceptString(allowedExtensions);
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["throwError"])(function () {
              return new Error("Invalid file type. Allowed type(s): ".concat(acceptText));
            });
          }

          var formData = new FormData();
          formData.append('file', fileObj, fileObj.name);
          var payload = {
            appID: '',
            appName: fileObj.name
          };
          return this.scriptRestService.uploadFile('RDT/app', formData).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (uploadState) {
            if (!(uploadState instanceof src_app_pages_home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_5__["ScriptRestLoaded"])) {
              return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
            }

            return _this72.scriptRestService.rdtOperation(payload, 'UPLOAD');
          }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (registerState) {
            var _a;

            if (!(registerState instanceof src_app_pages_home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_5__["ScriptRestLoaded"])) {
              return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
            }

            var uploadRes = {};

            try {
              uploadRes = JSON.parse(((_a = registerState.data) === null || _a === void 0 ? void 0 : _a.res) || '{}');
            } catch (e) {
              uploadRes = {};
            }

            if (uploadRes === null || uploadRes === void 0 ? void 0 : uploadRes.error) {
              return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["throwError"])(function () {
                return new Error(uploadRes.error);
              });
            }

            return _this72.getApplicationOptions(true);
          }));
        }
      }, {
        key: "getApplicationOptions",
        value: function getApplicationOptions() {
          var _this73 = this;

          var forceRefresh = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

          if (!forceRefresh && this.applicationOpt.length > 0) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(_toConsumableArray(this.applicationOpt));
          }

          var payload = {
            appID: '',
            appName: ''
          };
          return this.scriptRestService.rdtOperation(payload, 'LIST').pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (state) {
            var _a;

            if (!(state instanceof src_app_pages_home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_5__["ScriptRestLoaded"])) {
              return _this73.applicationOpt;
            }

            var res = [];

            try {
              res = JSON.parse(((_a = state.data) === null || _a === void 0 ? void 0 : _a.res) || '[]');
            } catch (e) {
              res = [];
            }

            _this73.applicationOpt = (Array.isArray(res) ? res : []).map(function (element) {
              return {
                label: "".concat((element === null || element === void 0 ? void 0 : element.app_name) || '', "(").concat((element === null || element === void 0 ? void 0 : element.app_version) || '', ")"),
                value: (element === null || element === void 0 ? void 0 : element.app_url) || ''
              };
            });
            return _this73.applicationOpt;
          }));
        }
      }]);
    }();

    RdtAppListService.ctorParameters = function () {
      return [{
        type: src_app_pages_home_script_manager_services_script_rest_service__WEBPACK_IMPORTED_MODULE_4__["ScriptRestService"]
      }];
    };

    RdtAppListService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
      providedIn: 'root'
    })], RdtAppListService);
    /***/
  }
}]);