(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{

/***/ "+8dm":
/*!****************************************************************************!*\
  !*** ./src/app/modules/dynamic-parameter/dynamic-parameter.component.scss ***!
  \****************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJkeW5hbWljLXBhcmFtZXRlci5jb21wb25lbnQuc2NzcyJ9 */");

/***/ }),

/***/ "+K4X":
/*!**************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/ivr-menus/ivr-menus.component.html ***!
  \**************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n      \r\n      <div class=\"main-content\">\r\n        \r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                    <div class=\"row\" style=\"margin-top: 20px;\r\n                    \">\r\n                        <div class=\"col-8\">\r\n                            <div class=\"card-header\">\r\n                            <h4>IVR Menus</h4></div>\r\n                        </div>\r\n                        <div class=\"col-4 text-right mt-2\">\r\n                            <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                               <button routerLink=\"/new-ivr-menu\" class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon p-2 mr-2\"><i class=\"fa fa-plus\"></i> New Menu\r\n                                </button>\r\n                                <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"        ></i> Delete Selected\r\n                                </button>   \r\n                              </div>                       \r\n                        </div>                  \r\n                    </div>            \r\n                    \r\n                  <div class=\"card-body\">\r\n                    <div class=\"table-responsive\">\r\n                    <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                        <thead>\r\n                          <tr>\r\n                            <th style=\"padding: 10px;\">\r\n                              <div class=\"custom-control custom-checkbox\" *ngIf=\"IVRMenus?.length != 0\">\r\n                              <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                              <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                              </div>\r\n                          </th>\r\n                            <th>Name</th>\r\n                            <th>Buyer</th>\r\n                            <th>Created Date</th>\r\n                            <th>Action</th>\r\n                          </tr>\r\n                        </thead>\r\n                        <tbody *ngIf=\"IVRMenus?.length != 0\">\r\n                            <tr *ngFor=\"let IVRMenu of IVRMenus\">\r\n                                <td>\r\n                                    <div class=\"custom-control custom-checkbox\">\r\n                                    <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{IVRMenu.uuid}}\"  [checked]=\"IVRMenu.selected\" [value]=\"IVRMenu.id\" >\r\n                                    <label class=\"custom-control-label\" for=\"customCheck_{{IVRMenu.uuid}}\"></label>\r\n                                    </div>                                \r\n                                </td>\r\n                                <td><a routerLink=\"/edit-ivr/{{ IVRMenu.uuid }}\" class=\"text-white actionedit\">{{ IVRMenu.name }}</a></td>\r\n                                <td>{{ IVRMenu.buyer }}</td>\r\n                                <td>{{ IVRMenu.created_at }}</td>\r\n                                <!-- <td>\r\n                                  <button (click)=\"Clone(IVRMenu.uuid)\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-clone\"></i></button>&nbsp;\r\n                                  <a routerLink=\"/edit-ivr/{{ IVRMenu.uuid }}\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;<button (click)=\"Delete((IVRMenu.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button>\r\n                                </td> -->\r\n                                <td style=\"cursor:pointer;\">\r\n                                  <i style=\"font-size: 12px;\" placement=\"bottom\" ngbTooltip=\"Duplicate Target\" (click)=\"Clone(IVRMenu.uuid)\" class=\"far fa-clone\"></i>&nbsp;&nbsp;\r\n                                  <a style=\"font-size: 12px;\" placement=\"bottom\" ngbTooltip=\"Edit Target\" routerLink=\"/edit-ivr/{{ IVRMenu.uuid }}\" class=\"actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;&nbsp;\r\n                                  <i style=\"font-size: 12px;\" placement=\"bottom\" ngbTooltip=\"Delete Target\" (click)=\"Delete((IVRMenu.uuid))\" class=\"fas fa-trash\"></i>\r\n                                </td>\r\n                            </tr>\r\n                        </tbody>\r\n                        <tbody *ngIf=\"IVRMenus?.length == 0\">\r\n                          <tr>\r\n                            <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                          </tr>\r\n                        <tbody>\r\n                      </table>\r\n                    </div>\r\n                  </div>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </section>\r\n        \r\n      </div>");

/***/ }),

/***/ "+SKC":
/*!************************************************!*\
  !*** ./src/app/modules/sms/sms.component.scss ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzbXMuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "+dkL":
/*!*******************************************!*\
  !*** ./src/app/modules/modules.module.ts ***!
  \*******************************************/
/*! exports provided: MY_MOMENT_FORMATS, ModulesModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MY_MOMENT_FORMATS", function() { return MY_MOMENT_FORMATS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModulesModule", function() { return ModulesModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ "ofXK");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/platform-browser */ "jhN1");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _modules_routing_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules-routing.module */ "pPcP");
/* harmony import */ var _number_number_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number/number.component */ "1tHk");
/* harmony import */ var _number_number_upload_number_upload_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./number/number-upload/number-upload.component */ "pAh+");
/* harmony import */ var _dashboard_dashboard_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./dashboard/dashboard.component */ "M95H");
/* harmony import */ var _number_numberedit_numberedit_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./number/numberedit/numberedit.component */ "Oj11");
/* harmony import */ var _number_numberadd_numberadd_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./number/numberadd/numberadd.component */ "9xfD");
/* harmony import */ var ng_pick_datetime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ng-pick-datetime */ "z17N");
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/platform-browser/animations */ "R1ws");
/* harmony import */ var _label_label_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./label/label.component */ "OGpY");
/* harmony import */ var _notes_notes_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./notes/notes.component */ "aopE");
/* harmony import */ var _ivr_menus_ivr_menus_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ivr-menus/ivr-menus.component */ "uIGq");
/* harmony import */ var _ivr_menus_add_ivrmenu_add_ivrmenu_component__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ivr-menus/add-ivrmenu/add-ivrmenu.component */ "Kcc5");
/* harmony import */ var angular2_multiselect_dropdown__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! angular2-multiselect-dropdown */ "e/mZ");
/* harmony import */ var _ivr_menus_edit_ivrmenu_edit_ivrmenu_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./ivr-menus/edit-ivrmenu/edit-ivrmenu.component */ "nhKR");
/* harmony import */ var _rules_rules_component__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./rules/rules.component */ "XiNR");
/* harmony import */ var _rules_rulesadd_rulesadd_component__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./rules/rulesadd/rulesadd.component */ "GGN3");
/* harmony import */ var _rules_rulesedit_rulesedit_component__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./rules/rulesedit/rulesedit.component */ "No3H");
/* harmony import */ var _dynamic_parameter_dynamic_parameter_component__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./dynamic-parameter/dynamic-parameter.component */ "1Igz");
/* harmony import */ var _blacklist_blacklist_component__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./blacklist/blacklist.component */ "gP4o");
/* harmony import */ var _whitelist_whitelist_component__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./whitelist/whitelist.component */ "aDqy");
/* harmony import */ var _reports_reports_component__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./reports/reports.component */ "AzsU");
/* harmony import */ var _verification_management_verification_management_component__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./verification-management/verification-management.component */ "BrIt");
/* harmony import */ var _audible_ring_audible_ring_component__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./audible-ring/audible-ring.component */ "aoLm");
/* harmony import */ var ngx_daterangepicker_material__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ngx-daterangepicker-material */ "YhS8");
/* harmony import */ var _shortlist_shortlist_component__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./shortlist/shortlist.component */ "ALpe");
/* harmony import */ var _longlist_longlist_component__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./longlist/longlist.component */ "0NxV");
/* harmony import */ var _number_number_batchedit_number_batchedit_component__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./number/number-batchedit/number-batchedit.component */ "dwv9");
/* harmony import */ var _number_number_addfslrules_number_addfslrules_component__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./number/number-addfslrules/number-addfslrules.component */ "uUag");
/* harmony import */ var _label_label_view_label_view_component__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./label/label-view/label-view.component */ "wlcQ");
/* harmony import */ var angular_highcharts__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! angular-highcharts */ "a0Xn");
/* harmony import */ var _sms_sms_component__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sms/sms.component */ "b9xQ");
/* harmony import */ var _recordings_recordings_component__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./recordings/recordings.component */ "YEf4");
/* harmony import */ var ng_pick_datetime_moment__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ng-pick-datetime-moment */ "6HvG");
/* harmony import */ var ngx_audio_player__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ngx-audio-player */ "cDwd");
/* harmony import */ var _reports_report_calls_report_calls_component__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./reports/report-calls/report-calls.component */ "ppwt");
/* harmony import */ var _reports_report_labelsummary_report_labelsummary_component__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./reports/report-labelsummary/report-labelsummary.component */ "lby/");
/* harmony import */ var _number_number_buyer_number_buyer_component__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./number/number-buyer/number-buyer.component */ "O/SN");
/* harmony import */ var _publishers_publishers_component__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./publishers/publishers.component */ "k/nl");
/* harmony import */ var _campaigns_campaigns_component__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./campaigns/campaigns.component */ "27PW");
/* harmony import */ var _campaigns_campaign_create_campaign_create_component__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./campaigns/campaign-create/campaign-create.component */ "hVN+");
/* harmony import */ var _numbers_numbers_component__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./numbers/numbers.component */ "jUJr");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! angular-datatables */ "njyG");
/* harmony import */ var _tinymce_tinymce_angular__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! @tinymce/tinymce-angular */ "fB2i");
/* harmony import */ var _ngx_formly_core__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! @ngx-formly/core */ "0FS3");
/* harmony import */ var _ngx_formly_bootstrap__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! @ngx-formly/bootstrap */ "bquJ");
/* harmony import */ var _angular_material_stepper__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! @angular/material/stepper */ "xHqg");
/* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! @angular/material/input */ "qFsG");
/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! @angular/material/button */ "bTqV");
/* harmony import */ var _angular_material_select__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! @angular/material/select */ "d3UM");
/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! @angular/material/form-field */ "kmnG");
/* harmony import */ var ng_select2__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ng-select2 */ "eSIH");
/* harmony import */ var _campaigns_campaign_edit_campaign_edit_component__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./campaigns/campaign-edit/campaign-edit.component */ "n9+t");
/* harmony import */ var _numbers_blocked_numbers_blocked_numbers_component__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./numbers/blocked-numbers/blocked-numbers.component */ "/LYL");
/* harmony import */ var _settings_manage_users_manage_users_component__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./settings/manage-users/manage-users.component */ "ZxR3");
/* harmony import */ var _publishers_publisher_settings_publisher_settings_component__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./publishers/publisher-settings/publisher-settings.component */ "1lbj");
/* harmony import */ var _publishers_publisher_terms_publisher_terms_component__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./publishers/publisher-terms/publisher-terms.component */ "trv3");
/* harmony import */ var _publishers_advertiser_terms_advertiser_terms_component__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./publishers/advertiser-terms/advertiser-terms.component */ "gc2d");
/* harmony import */ var _settings_basic_setting_basic_setting_component__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./settings/basic-setting/basic-setting.component */ "IUaP");
/* harmony import */ var _angular_material_moment_adapter__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! @angular/material-moment-adapter */ "1yaQ");
/* harmony import */ var _settings_alert_configuration_alert_configuration_component__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./settings/alert-configuration/alert-configuration.component */ "uN0H");
/* harmony import */ var _numbers_number_pool_number_pool_component__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./numbers/number-pool/number-pool.component */ "HVG7");
/* harmony import */ var _settings_manage_company_manage_company_component__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./settings/manage-company/manage-company.component */ "YLqG");
/* harmony import */ var _changelog_changelog_component__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./changelog/changelog.component */ "qT+o");
/* harmony import */ var _ivr_menus_ivr_routing_plans_ivr_routing_plans_component__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./ivr-menus/ivr-routing-plans/ivr-routing-plans.component */ "R3RD");
/* harmony import */ var _ivr_menus_ivr_routing_plans_add_plan_add_plan_component__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./ivr-menus/ivr-routing-plans/add-plan/add-plan.component */ "hVKj");
/* harmony import */ var _ivr_menus_ivr_routing_plans_edit_plan_edit_plan_component__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./ivr-menus/ivr-routing-plans/edit-plan/edit-plan.component */ "qNU9");
/* harmony import */ var _mail_verification_mail_verification_component__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./mail-verification/mail-verification.component */ "Ng4N");
/* harmony import */ var _swimlane_ngx_datatable__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! @swimlane/ngx-datatable */ "lDzL");
/* harmony import */ var _label_ngxdemo_ngxdemo_component__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./label/ngxdemo/ngxdemo.component */ "I7EK");
/* harmony import */ var ng2_scroll_to_el__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ng2-scroll-to-el */ "u+tA");
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ "1kSV");
/* harmony import */ var ngx_ui_loader__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ngx-ui-loader */ "gren");
/* harmony import */ var _reports_comparison_reports_comparison_component__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./reports-comparison/reports-comparison.component */ "T5Kb");
/* harmony import */ var _voicemail_voicemail_component__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./voicemail/voicemail.component */ "n6rN");
/* harmony import */ var _publishers_thankyou_thankyou_component__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./publishers/thankyou/thankyou.component */ "djt6");
/* harmony import */ var _campaigns_campaign_view_campaign_view_component__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./campaigns/campaign-view/campaign-view.component */ "zd4u");

// import { NgxUiLoaderService } from 'ngx-ui-loader';
















































// import { NgxTinymceModule } from 'ngx-tinymce';
const MY_MOMENT_FORMATS = {
    //   fullPickerInput: 'YYYY-MM-DD HH:mm:ss',
    // parseInput: 'YYYY-MM-DD HH:mm:ss',
    // datePickerInput: 'YYYY-MM-DD HH:mm:ss',
    timePickerInput: 'HH:mm',
};




























// import { NgxUiLoaderModule } from "ngx-ui-loader";





const ngxUiLoaderConfig = {
    // bgsColor: '#3858E7',
    bgsPosition: ngx_ui_loader__WEBPACK_IMPORTED_MODULE_77__["POSITION"].centerCenter,
};
let ModulesModule = class ModulesModule {
};
ModulesModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_number_number_component__WEBPACK_IMPORTED_MODULE_7__["NumberComponent"], _dashboard_dashboard_component__WEBPACK_IMPORTED_MODULE_9__["DashboardComponent"], _number_numberedit_numberedit_component__WEBPACK_IMPORTED_MODULE_10__["NumbereditComponent"], _number_numberadd_numberadd_component__WEBPACK_IMPORTED_MODULE_11__["NumberaddComponent"], _label_label_component__WEBPACK_IMPORTED_MODULE_14__["LabelComponent"], _notes_notes_component__WEBPACK_IMPORTED_MODULE_15__["NotesComponent"], _ivr_menus_ivr_menus_component__WEBPACK_IMPORTED_MODULE_16__["IvrMenusComponent"], _ivr_menus_add_ivrmenu_add_ivrmenu_component__WEBPACK_IMPORTED_MODULE_17__["AddIVRMenuComponent"], _ivr_menus_edit_ivrmenu_edit_ivrmenu_component__WEBPACK_IMPORTED_MODULE_19__["EditIvrmenuComponent"], _rules_rules_component__WEBPACK_IMPORTED_MODULE_20__["RulesComponent"], _rules_rulesadd_rulesadd_component__WEBPACK_IMPORTED_MODULE_21__["RulesaddComponent"], _rules_rulesedit_rulesedit_component__WEBPACK_IMPORTED_MODULE_22__["RuleseditComponent"], _dynamic_parameter_dynamic_parameter_component__WEBPACK_IMPORTED_MODULE_23__["DynamicParameterComponent"], _blacklist_blacklist_component__WEBPACK_IMPORTED_MODULE_24__["BlacklistComponent"], _whitelist_whitelist_component__WEBPACK_IMPORTED_MODULE_25__["WhitelistComponent"], _reports_reports_component__WEBPACK_IMPORTED_MODULE_26__["ReportsComponent"], _verification_management_verification_management_component__WEBPACK_IMPORTED_MODULE_27__["VerificationManagementComponent"], _audible_ring_audible_ring_component__WEBPACK_IMPORTED_MODULE_28__["AudibleRingComponent"], _number_number_upload_number_upload_component__WEBPACK_IMPORTED_MODULE_8__["NumberUploadComponent"], _shortlist_shortlist_component__WEBPACK_IMPORTED_MODULE_30__["ShortlistComponent"], _longlist_longlist_component__WEBPACK_IMPORTED_MODULE_31__["LonglistComponent"], _number_number_batchedit_number_batchedit_component__WEBPACK_IMPORTED_MODULE_32__["NumberBatcheditComponent"], _number_number_addfslrules_number_addfslrules_component__WEBPACK_IMPORTED_MODULE_33__["NumberAddfslrulesComponent"], _label_label_view_label_view_component__WEBPACK_IMPORTED_MODULE_34__["LabelViewComponent"], _sms_sms_component__WEBPACK_IMPORTED_MODULE_36__["SmsComponent"], _recordings_recordings_component__WEBPACK_IMPORTED_MODULE_37__["RecordingsComponent"], _reports_report_calls_report_calls_component__WEBPACK_IMPORTED_MODULE_40__["ReportCallsComponent"], _reports_report_labelsummary_report_labelsummary_component__WEBPACK_IMPORTED_MODULE_41__["ReportLabelsummaryComponent"], _number_number_buyer_number_buyer_component__WEBPACK_IMPORTED_MODULE_42__["NumberBuyerComponent"], _publishers_publishers_component__WEBPACK_IMPORTED_MODULE_43__["PublishersComponent"], _campaigns_campaigns_component__WEBPACK_IMPORTED_MODULE_44__["CampaignsComponent"], _campaigns_campaign_create_campaign_create_component__WEBPACK_IMPORTED_MODULE_45__["CampaignCreateComponent"], _numbers_numbers_component__WEBPACK_IMPORTED_MODULE_46__["NumbersComponent"], _campaigns_campaign_edit_campaign_edit_component__WEBPACK_IMPORTED_MODULE_57__["CampaignEditComponent"], _numbers_blocked_numbers_blocked_numbers_component__WEBPACK_IMPORTED_MODULE_58__["BlockedNumbersComponent"], _settings_manage_users_manage_users_component__WEBPACK_IMPORTED_MODULE_59__["ManageUsersComponent"], _publishers_publisher_settings_publisher_settings_component__WEBPACK_IMPORTED_MODULE_60__["PublisherSettingsComponent"], _publishers_publisher_terms_publisher_terms_component__WEBPACK_IMPORTED_MODULE_61__["PublisherTermsComponent"], _publishers_advertiser_terms_advertiser_terms_component__WEBPACK_IMPORTED_MODULE_62__["AdvertiserTermsComponent"], _settings_basic_setting_basic_setting_component__WEBPACK_IMPORTED_MODULE_63__["BasicSettingComponent"], _settings_alert_configuration_alert_configuration_component__WEBPACK_IMPORTED_MODULE_65__["AlertConfigurationComponent"], _numbers_number_pool_number_pool_component__WEBPACK_IMPORTED_MODULE_66__["NumberPoolComponent"], _settings_manage_company_manage_company_component__WEBPACK_IMPORTED_MODULE_67__["ManageCompanyComponent"], _changelog_changelog_component__WEBPACK_IMPORTED_MODULE_68__["ChangelogComponent"], _ivr_menus_ivr_routing_plans_ivr_routing_plans_component__WEBPACK_IMPORTED_MODULE_69__["IVRRoutingPlansComponent"], _ivr_menus_ivr_routing_plans_add_plan_add_plan_component__WEBPACK_IMPORTED_MODULE_70__["AddPlanComponent"], _ivr_menus_ivr_routing_plans_edit_plan_edit_plan_component__WEBPACK_IMPORTED_MODULE_71__["EditPlanComponent"], _mail_verification_mail_verification_component__WEBPACK_IMPORTED_MODULE_72__["MailVerificationComponent"], _label_ngxdemo_ngxdemo_component__WEBPACK_IMPORTED_MODULE_74__["NgxdemoComponent"], _reports_comparison_reports_comparison_component__WEBPACK_IMPORTED_MODULE_78__["ReportsComparisonComponent"], _voicemail_voicemail_component__WEBPACK_IMPORTED_MODULE_79__["VoicemailComponent"], _publishers_thankyou_thankyou_component__WEBPACK_IMPORTED_MODULE_80__["ThankyouComponent"], _campaigns_campaign_view_campaign_view_component__WEBPACK_IMPORTED_MODULE_81__["CampaignViewComponent"]],
        imports: [
            _tinymce_tinymce_angular__WEBPACK_IMPORTED_MODULE_48__["EditorModule"],
            _angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"],
            _modules_routing_module__WEBPACK_IMPORTED_MODULE_6__["ModulesRoutingModule"],
            _angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__["BrowserModule"],
            _angular_router__WEBPACK_IMPORTED_MODULE_5__["RouterModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"],
            _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_13__["BrowserAnimationsModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_2__["ReactiveFormsModule"],
            ng_pick_datetime__WEBPACK_IMPORTED_MODULE_12__["OwlDateTimeModule"],
            ng_pick_datetime__WEBPACK_IMPORTED_MODULE_12__["OwlNativeDateTimeModule"],
            angular2_multiselect_dropdown__WEBPACK_IMPORTED_MODULE_18__["AngularMultiSelectModule"],
            angular_highcharts__WEBPACK_IMPORTED_MODULE_35__["ChartModule"],
            _angular_material_form_field__WEBPACK_IMPORTED_MODULE_55__["MatFormFieldModule"],
            ngx_audio_player__WEBPACK_IMPORTED_MODULE_39__["NgxAudioPlayerModule"],
            ngx_daterangepicker_material__WEBPACK_IMPORTED_MODULE_29__["NgxDaterangepickerMd"].forRoot(),
            ng2_scroll_to_el__WEBPACK_IMPORTED_MODULE_75__["ScrollToModule"].forRoot(),
            _angular_material_stepper__WEBPACK_IMPORTED_MODULE_51__["MatStepperModule"],
            _angular_material_select__WEBPACK_IMPORTED_MODULE_54__["MatSelectModule"],
            _ngx_formly_bootstrap__WEBPACK_IMPORTED_MODULE_50__["FormlyBootstrapModule"],
            _angular_material_input__WEBPACK_IMPORTED_MODULE_52__["MatInputModule"],
            _angular_material_button__WEBPACK_IMPORTED_MODULE_53__["MatButtonModule"],
            ng_select2__WEBPACK_IMPORTED_MODULE_56__["NgSelect2Module"],
            _swimlane_ngx_datatable__WEBPACK_IMPORTED_MODULE_73__["NgxDatatableModule"],
            _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_76__["NgbTooltipModule"],
            angular_datatables__WEBPACK_IMPORTED_MODULE_47__["DataTablesModule"],
            // NgxTinymceModule,
            ngx_ui_loader__WEBPACK_IMPORTED_MODULE_77__["NgxUiLoaderModule"].forRoot(ngxUiLoaderConfig),
            _ngx_formly_core__WEBPACK_IMPORTED_MODULE_49__["FormlyModule"].forRoot({
                validationMessages: [
                    { name: 'required', message: 'This field is required' },
                ],
            }),
        ],
        schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"]],
        exports: [
            _angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__["BrowserModule"],
            _number_number_component__WEBPACK_IMPORTED_MODULE_7__["NumberComponent"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"]
        ],
        providers: [
            { provide: ng_pick_datetime__WEBPACK_IMPORTED_MODULE_12__["DateTimeAdapter"], useClass: ng_pick_datetime_moment__WEBPACK_IMPORTED_MODULE_38__["MomentDateTimeAdapter"], deps: [ng_pick_datetime__WEBPACK_IMPORTED_MODULE_12__["OWL_DATE_TIME_LOCALE"]] },
            { provide: ng_pick_datetime__WEBPACK_IMPORTED_MODULE_12__["OWL_DATE_TIME_FORMATS"], useValue: MY_MOMENT_FORMATS },
            { provide: _angular_material_moment_adapter__WEBPACK_IMPORTED_MODULE_64__["MAT_MOMENT_DATE_ADAPTER_OPTIONS"], useValue: { useUtc: true } },
        ]
    })
], ModulesModule);



/***/ }),

/***/ "/40X":
/*!*****************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/number/number-upload/number-upload.component.html ***!
  \*****************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n\r\n  <!-- Add Label Modal -->\r\n  <div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n  aria-hidden=\"true\">\r\n  <div class=\"modal-dialog\" role=\"document\">\r\n    <div class=\"modal-content\">\r\n      <div class=\"modal-header\">\r\n        <h5 class=\"modal-title\" id=\"formModal\">Create Label</h5>\r\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n          <span aria-hidden=\"true\">&times;</span>\r\n        </button>\r\n      </div>\r\n      <div class=\"modal-body\">\r\n        <form id=\"addLabel\" [formGroup]=\"addLabelForm\" (ngSubmit)=\"onLabelSubmit()\">\r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n             <div class=\"form-group\">\r\n              <label>Label Name</label>\r\n              <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': LabelSubmitted && labelcontrol.name.errors }\" (input)=\"validatename()\">\r\n              <div *ngIf=\"LabelSubmitted && labelcontrol.name.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"labelcontrol.name.errors.required\">Name is required</div>\r\n              </div>   \r\n              <div *ngIf=\"isName == 'success'  && isName != ''\" style=\"color:green;\">\r\n                 Name Is Available\r\n               </div> \r\n                <div *ngIf=\"isName == 'fail' && isName != ''\" style=\"color:red;\">\r\n                 Name Is Not Available\r\n               </div>           \r\n           </div>\r\n  \r\n            <div class=\"form-group\">\r\n              <label  class=\"d-block\">Notes:</label>\r\n              <textarea formControlName=\"notes\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': LabelSubmitted && labelcontrol.notes.errors }\"></textarea>                   \r\n              <div *ngIf=\"LabelSubmitted && labelcontrol.notes.errors\" class=\"invalid-feedback\">\r\n                 <div *ngIf=\"labelcontrol.notes.errors.required\">Notes is required</div>\r\n             </div>         \r\n            </div>\r\n  \r\n              </div>     \r\n      </div>  \r\n     \r\n          <div class=\"modal-footer\" style=\"padding: 0;\">\r\n             <button [disabled]=\"isName == 'fail'\" (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Label</button>\r\n             <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n            </div>\r\n        </form>\r\n      </div>\r\n    </div>\r\n  </div>\r\n  </div>      \r\n<div class=\"main-content\">\r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12 col-md-12 col-lg-12\">\r\n                <form [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n                <div class=\"card\">\r\n                  <div class=\"card-header\">\r\n                    <h4>{{pageTitle}}</h4>\r\n                  </div>\r\n                  <div class=\"card-body\">                    \r\n                    <!-- <div class=\"form-group\">\r\n                      <label>Select CSV File</label>\r\n                      <div class=\"custom-file\">\r\n                          <input formControlName=\"number\" type=\"file\" class=\"custom-file-input\" id=\"customFile\" [ngClass]=\"{ 'is-invalid': submitted && f.number.errors }\" (change)=\"onFileChange($event)\">\r\n                          <label class=\"custom-file-label\" for=\"customFile\">Choose file</label>\r\n                          <small *ngIf=\"filename\">Selected File: {{filename}}</small><br>\r\n                          <div *ngIf=\"submitted && f.number.errors\" class=\"invalid-feedback\">\r\n                              <div *ngIf=\"f.number.errors.required\">File is required</div>\r\n                          </div> \r\n                          <small class=\"text-danger\">Note : File should be in .csv format and file have only numbers.</small><br>\r\n                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<small class=\"text-danger\">: You can upload Maximum 1000 Numbers</small>\r\n                      </div>                        \r\n                    </div> -->\r\n\r\n                    <div class=\"form-group\">\r\n                      <label>Enter Number</label>\r\n                          <textarea [ngClass]=\"{ 'is-invalid': submitted && f.number.errors }\" formControlName=\"number\" class=\"form-control\" name=\"\" id=\"\" cols=\"30\" rows=\"4\"></textarea>\r\n                          <div *ngIf=\"submitted && f.number.errors\" class=\"invalid-feedback\">\r\n                              <div *ngIf=\"f.number.errors.required\">File is required</div>\r\n                          </div> \r\n                          <!-- <small class=\"text-danger\">Note : File should be in .csv format and file have only numbers.</small><br>\r\n                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<small class=\"text-danger\">: You can upload Maximum 1000 Numbers</small> -->\r\n                    </div>\r\n                    <!-- <label style=\"font-weight: 600;color: #34395e;font-size: 12px;letter-spacing: 0.5px;\">Select FSL Rules:</label> -->\r\n                    <!-- <div class=\"form-group\">\r\n                            <select formControlName=\"fslrulesname\" class=\"form-control\" (change)=\"getRulesByName($event.target.value)\" [ngClass]=\"{ 'is-invalid': submitted && f.fslrulesname.errors }\">\r\n                              <option value=\"\" selected>Select FSL Rules</option>\r\n                              <option *ngFor=\"let rules of allRulesData;\" [value]=\"rules.name\">\r\n                                  {{rules.name}}\r\n                                </option>\r\n                            </select>\r\n                            <div *ngIf=\"submitted && f.fslrulesname.errors\" class=\"invalid-feedback\">\r\n                                <div *ngIf=\"f.fslrulesname.errors.required\">FSL Rules Name is required</div>\r\n                            </div>                          \r\n                        \r\n                          <div class=\"row\" *ngIf=\"allRulesbyname?.length > 0\" >\r\n                            <div class=\"col-md-12\">\r\n                                <div class=\"card\">\r\n                                  <div class=\"card-body\">\r\n                                    <div class=\"table-responsive\">\r\n                                      <table class=\"table table-striped\">\r\n                                        <tbody><tr style=\"font-size: 13px;\">\r\n                                          <th style=\"width:15%;\">Name</th>\r\n                                          <th style=\"width:15%;\">Day</th>\r\n                                          <th style=\"width:15%;\">Start Time</th>\r\n                                          <th style=\"width:15%;\">End Time</th>\r\n                                        </tr>\r\n                                        <div style=\"display: contents!important;\" *ngFor =\"let rules of allRulesbyname;\">\r\n                                        <tr style=\"font-size: 13px;\">\r\n                                          <td>\r\n                                              {{rules.name}}\r\n                                          </td>\r\n                                          <td>\r\n                                              <div *ngIf=\"rules.timeofday == 1\">\r\n                                                  Monday to Friday\r\n                                                </div>\r\n                                                <div *ngIf=\"rules.timeofday == 2\">\r\n                                                  Monday to Saturday\r\n                                                </div>\r\n                                                <div *ngIf=\"rules.timeofday == 3\">\r\n                                                  Monday to Monday\r\n                                                </div>\r\n                                                <div *ngIf=\"rules.timeofday == 4\">\r\n                                                  Friday to Monday\r\n                                                </div>\r\n                                                <div *ngIf=\"rules.timeofday == 5\">\r\n                                                  Saturday to Monday\r\n                                                </div>\r\n                                          </td>\r\n                                          <td>\r\n                                              {{rules.start_time}}\r\n                                          </td>\r\n                                          <td>\r\n                                              {{rules.end_time}}\r\n                                             \r\n                                          </td>\r\n                                             \r\n                                        </tr>\r\n                                        <tr><br>\r\n                                          <td colspan=\"4\" style=\"display: contents;width: 168%;\">\r\n                                              <table class=\"table fortbl table-striped\">\r\n                                              <tbody>\r\n                                                <tr style=\"display: -webkit-box;\">\r\n                                                  <th>Location Index</th>\r\n                                                  <th>Primary Location Type</th>\r\n                                                  <th>Primary Location Value</th>\r\n                                                </tr>\r\n                                                <tr>\r\n                                                    <div *ngFor='let key of  [0,1,2,3,4,5,6,7,8,9,10]; let i = index'>\r\n                                                        <div *ngIf='rules.noofforwardinglocation>=key' style=\"width: 100%;display: inline-table;\">\r\n                                                          <tr style=\"font-size: 13px;width: 100%;\">\r\n                                                            <td>{{key+1}}</td>\r\n                                                            <td>\r\n                                                                <span *ngIf=\"rules[i].primary_forwarding_type == 0 || rules[i].primary_forwarding_type == null\">\r\n                                                                    Number\r\n                                                                  </span>\r\n                                                                <span *ngIf=\"rules[i].primary_forwarding_type == 1\">\r\n                                                                  IVR Menu                            </span>\r\n                                                                <span *ngIf=\"rules[i].primary_forwarding_type == 2\">\r\n                                                                  SIP (IP Address)\r\n                                                                </span>\r\n                                                            </td>\r\n                                                            <td>\r\n                                                                <p *ngIf=\"rules[i].primary_forwarding_type == 0 || rules[i].primary_forwarding_type == null\">\r\n                                                                    {{rules[i].primary_forwarding_number}}\r\n                                                                  </p>\r\n                                                                <p *ngIf=\"rules[i].primary_forwarding_type == 1\">\r\n                                                                  {{rules[i].primary_forwarding_ivr}}\r\n                                                                </p>\r\n                                                                <p *ngIf=\"rules[i].primary_forwarding_type == 2\">\r\n                                                                  {{rules[i].primary_forwarding_sip}}\r\n                                                                </p>\r\n                                                            </td>\r\n                                                          \r\n                                                      \r\n                                                        </tr>\r\n                                                        </div>\r\n                                                      </div> \r\n                                                    </tr>\r\n\r\n                                              </tbody>\r\n                                              </table>\r\n                                              <br>\r\n                                          </td>\r\n                                        </tr> \r\n                                      </div>                                       \r\n                                      </tbody></table>\r\n                                    </div>\r\n                                  </div>\r\n                                </div>\r\n                              </div>\r\n                        </div>\r\n                     \r\n                    </div> -->\r\n                  \r\n                  <!-- <div class=\"form-group\">\r\n                      <div class=\"control-label\">JKL Rules</div>\r\n                      <label class=\"custom-switch mt-2 pl-0\">\r\n                        <input type=\"checkbox\" (change)=\"get_jklrules($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                        <span class=\"custom-switch-indicator\"></span>                     \r\n                      </label>\r\n                  </div>   -->\r\n\r\n                  <div class=\"form-group\">\r\n                    <label>Select Campaign</label>\r\n                    <!-- [ngClass]=\"{ 'is-invalid': submitted && f.campaign.errors }\" -->\r\n                    <!-- <select formControlName=\"campaign\" class=\"form-control\" [value]=\"\">\r\n                      <option value=\"\">Select Campaign</option>\r\n                      <option value=\"{{data.id}}\" *ngFor=\"let data of getallcampain\">{{data.text}}</option>\r\n                    </select> -->\r\n                    <angular2-multiselect [data]=\"getallcampain\" formControlName=\"campaign\" [settings]=\r\n                    \"{\r\n                      enableSearchFilter: true,\r\n                      showCheckbox:false,\r\n                      singleSelection: true, text:'Assign Campaign'}\">\r\n                  </angular2-multiselect> \r\n\r\n                    <!-- <ng-select2 formControlName=\"campaign\" [placeholder]=\"'Please select a Campaign'\"  [ngClass]=\"{ 'is-invalid': submitted && f.campaign.errors }\"  [options]=\"options\" [data]=\"getallcampain\" [width]=\"1000\">\r\n                    </ng-select2> -->\r\n                    <!-- <div *ngIf=\"submitted && f.campaign.errors\" class=\"invalid-feedback\">\r\n                      <div *ngIf=\"f.campaign.errors.required\">Campaign is required</div>\r\n                  </div>  -->\r\n                  </div>\r\n                 \r\n                  <div class=\"form-group\">\r\n                    <label>Select Publisher</label><br>\r\n                    <angular2-multiselect [data]=\"Allpublisher\" [ngClass]=\"{ 'is-invalid': submitted && f.publisher.errors }\"  formControlName=\"publisher\" [settings]=\r\n                    \"{\r\n                      enableSearchFilter: true,\r\n                      showCheckbox:false,\r\n                      singleSelection: true, text:'Assign Publisher'}\">\r\n                  </angular2-multiselect>\r\n                    <!-- <select formControlName=\"publisher\" [ngClass]=\"{ 'is-invalid': submitted && f.publisher.errors }\" class=\"form-control\" [value]=\"\">\r\n                      <option value=\"\">Select Publisher</option>\r\n                      <option value=\"{{data.id}}\" *ngFor=\"let data of Allpublisher\">{{data.text}}</option>\r\n                    </select> -->\r\n                    <!-- <ng-select2 formControlName=\"publisher\" [placeholder]=\"'Please select a Publisher'\"  [ngClass]=\"{ 'is-invalid': submitted && f.publisher.errors }\"  [options]=\"options\" [data]=\"Allpublisher\" [width]=\"1000\">\r\n                        </ng-select2> -->\r\n                    <div *ngIf=\"submitted && f.publisher.errors\" class=\"invalid-feedback\">\r\n                      <div *ngIf=\"f.publisher.errors.required\">Publisher is required</div>\r\n                    </div> \r\n                  </div>\r\n\r\n                  <div class=\"control-group mt-2\" *ngIf=\"this.addForm.get('publisher').value!=''\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Payout Type :</label>\r\n                    <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==0}\" (click)=\"payout_typevaledit(0)\"> \r\n                          <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                          None\r\n                        </label>\r\n                        <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payout_typevaledit(1)\">\r\n                          <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                          Fixed Payout\r\n                        </label>\r\n                        <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                          <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                          Revenue %\r\n                        </label>\r\n                      </div>\r\n                      <div *ngIf=\"publisherSubmitted && publisherFormcontrol.payout_typeedit.errors\" class=\"invalid-feedback\">\r\n                        <div *ngIf=\"publisherFormcontrol.payout_typeedit.errors.required\">Payout Type is required</div>\r\n                    </div>   \r\n                    </div>\r\n                    <div *ngIf=\"payout_typevalueedit != 0\">\r\n                      <div class=\"control-group mt-2\">\r\n                          <label class=\"control-label input-label\" for=\"startTime\">Payout Amount :</label>\r\n                            <div class=\"input-group\">\r\n                              <div class=\"input-group-prepend\">\r\n                                <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                              </div>\r\n                              <input type=\"text\" formControlName=\"payout_amount\" class=\"form-control\" placeholder=\"Enter Payout Amount\" aria-label=\"Enter Payout Amount\" aria-describedby=\"btnGroupAddon\">\r\n                            </div>                 \r\n                      </div>\r\n                      \r\n                    <div class=\"control-group mt-2\">\r\n                      <label class=\"control-label input-label\" for=\"startTime\">Payout Trigger :</label>\r\n                        <select class=\"form-control\" formControlName=\"payout_trigger\">\r\n                          <option value=\"0\">Inbound Call</option>\r\n                          <option value=\"1\">Call Length</option>\r\n                          <option value=\"2\">Call Successfully Connected</option>\r\n                        </select>              \r\n                    </div>\r\n                    <div class=\"control-group mt-2\" *ngIf=\"this.addForm.get('payout_trigger').value == 1\">\r\n                        <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                        <input type=\"text\"  class=\"form-control\" type=\"text\" formControlName=\"payout_seconds\" placeholder=\"Enter Seconds\" />         \r\n                    </div>\r\n                  </div>\r\n               \r\n\r\n                  <div class=\"form-group\">\r\n                       <label>Associated Label</label>\r\n                        <angular2-multiselect [data]=\"dropdownList\" formControlName=\"assosciated_labels\" [settings]=\"dropdownSettings\" ></angular2-multiselect>\r\n                        <!-- [ngClass]=\"{ 'is-invalid': submitted && f.assosciated_labels.errors }\"  -->\r\n                        <!-- <div *ngIf=\"submitted && f.assosciated_labels.errors\" class=\"invalid-feedback\">\r\n                          <div *ngIf=\"f.assosciated_labels.errors.required\">Assosciated Labels is required</div>\r\n                      </div>  -->\r\n                      <small><a href=\"#\" class=\"\" data-toggle=\"modal\" data-target=\"#addLabels\">Add New Label</a></small>\r\n                    </div>\r\n                    \r\n                 \r\n                  </div>\r\n                  <div class=\"card-footer text-right\">\r\n                        <button  class=\"btn btn-primary mr-1\" type=\"submit\">Import Numbers</button>\r\n                        <button style=\"margin-right: 4px;\" routerLink=\"/numbers\" class=\"btn btn-primary\">Back To Numbers</button>\r\n                        <!-- <button (click)=\"onReset()\" class=\"btn btn-secondary\" type=\"reset\">Reset</button> -->\r\n                  </div>\r\n                </div>\r\n              </form>\r\n\r\n    </div>\r\n");

/***/ }),

/***/ "/5BY":
/*!****************************************************************************!*\
  !*** ./src/app/modules/mail-verification/mail-verification.component.scss ***!
  \****************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJtYWlsLXZlcmlmaWNhdGlvbi5jb21wb25lbnQuc2NzcyJ9 */");

/***/ }),

/***/ "/H0Y":
/*!***************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/number/number-addfslrules/number-addfslrules.component.html ***!
  \***************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n<!-- Weekday Modal -->\r\n<div class=\"modal fade\" id=\"addWeekDays\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\">\r\n   <div class=\"modal-content\">\r\n     <div class=\"modal-header\">\r\n       <h5 class=\"modal-title\" id=\"formModal\">Create Weekdays</h5>\r\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n         <span aria-hidden=\"true\">&times;</span>\r\n       </button>\r\n     </div>\r\n     <div class=\"modal-body\">\r\n       <form id=\"addWeekDaysfrm\" [formGroup]=\"addWeekDaysForm\" (ngSubmit)=\"onWeekdaySubmit()\">\r\n         <div class=\"row\">\r\n           <div class=\"col-6\">\r\n            <div class=\"form-group\">\r\n              <label>Start Day</label>\r\n              <select formControlName=\"start_day\" name=\"start_day\" id=\"start_day\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': daysSubmitted && daycontrol.start_day.errors }\" [value]=\"''\">\r\n                <option value=\"\">Select Start Day</option>\r\n                <option value=\"Monday\">Monday</option>\r\n                <option value=\"Tuesday\">Tuesday</option>\r\n                <option value=\"Wednesday\">Wednesday</option>\r\n                <option value=\"Thursday\">Thursday</option>\r\n                <option value=\"Friday\">Friday</option>\r\n                <option value=\"Saturday\">Saturday</option>\r\n                <option value=\"Sunday\">Sunday</option>\r\n              </select>      \r\n              <div *ngIf=\"daysSubmitted && daycontrol.start_day.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"daycontrol.start_day.errors.required\">Start Day is required</div>\r\n              </div>   \r\n              \r\n           </div>\r\n           </div>\r\n           <div class=\"col-6\">\r\n            <div class=\"form-group\">\r\n              <label>End Day</label>\r\n              <select formControlName=\"end_day\" name=\"end_day\" id=\"end_day\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': daysSubmitted && daycontrol.end_day.errors }\" [value]=\"''\">\r\n                <option value=\"\">Select End Day</option>\r\n                <option value=\"Monday\">Monday</option>\r\n                <option value=\"Tuesday\">Tuesday</option>\r\n                <option value=\"Wednesday\">Wednesday</option>\r\n                <option value=\"Thursday\">Thursday</option>\r\n                <option value=\"Friday\">Friday</option>\r\n                <option value=\"Saturday\">Saturday</option>\r\n                <option value=\"Sunday\">Sunday</option>\r\n              </select>      \r\n              <div *ngIf=\"daysSubmitted && daycontrol.end_day.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"daycontrol.end_day.errors.required\">End Day is required</div>\r\n              </div>   \r\n           </div>\r\n           </div>\r\n         </div>\r\n\r\n         <div class=\"modal-footer\" style=\"padding: 0;\">\r\n            <button (click)=\"addweekcloseModal()\"  type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Weekday</button>\r\n            <button type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n           </div>\r\n       </form>\r\n     </div>\r\n   </div>\r\n </div>\r\n </div>  \r\n\r\n <div class=\"modal fade\" id=\"editweekdays\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\">\r\n   <div class=\"modal-content\">\r\n     <div class=\"modal-header\">\r\n       <h5 class=\"modal-title\" id=\"formModal\">Edit Weekdays</h5>\r\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n         <span aria-hidden=\"true\">&times;</span>\r\n       </button>\r\n     </div>\r\n     <div class=\"modal-body\">\r\n       <form id=\"editWeekDaysfrm\" [formGroup]=\"editWeekDaysForm\" (ngSubmit)=\"oneditWeekdaySubmit()\">\r\n        <input formControlName=\"uuid\" type=\"hidden\" class=\"form-control\">    \r\n         <div class=\"row\">\r\n           <div class=\"col-6\">\r\n            <div class=\"form-group\">\r\n              <label>Start Day</label>\r\n              <select formControlName=\"start_day\" name=\"start_day\" id=\"start_day\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': daysEditSubmitted && dayeditcontrol.start_day.errors }\">\r\n                <option value=\"\">Select Start Day</option>\r\n                <option value=\"Monday\">Monday</option>\r\n                <option value=\"Tuesday\">Tuesday</option>\r\n                <option value=\"Wednesday\">Wednesday</option>\r\n                <option value=\"Thursday\">Thursday</option>\r\n                <option value=\"Friday\">Friday</option>\r\n                <option value=\"Saturday\">Saturday</option>\r\n                <option value=\"Sunday\">Sunday</option>\r\n              </select>      \r\n              <div *ngIf=\"daysEditSubmitted && dayeditcontrol.start_day.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"dayeditcontrol.start_day.errors.required\">Start Day is required</div>\r\n              </div>   \r\n              \r\n           </div>\r\n           </div>\r\n           <div class=\"col-6\">\r\n            <div class=\"form-group\">\r\n              <label>End Day</label>\r\n              <select formControlName=\"end_day\" name=\"end_day\" id=\"end_day\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': daysEditSubmitted && dayeditcontrol.end_day.errors }\">\r\n                <option value=\"\">Select End Day</option>\r\n                <option value=\"Monday\">Monday</option>\r\n                <option value=\"Tuesday\">Tuesday</option>\r\n                <option value=\"Wednesday\">Wednesday</option>\r\n                <option value=\"Thursday\">Thursday</option>\r\n                <option value=\"Friday\">Friday</option>\r\n                <option value=\"Saturday\">Saturday</option>\r\n                <option value=\"Sunday\">Sunday</option>\r\n              </select>      \r\n              <div *ngIf=\"daysEditSubmitted && dayeditcontrol.end_day.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"dayeditcontrol.end_day.errors.required\">End Day is required</div>\r\n              </div>   \r\n           </div>\r\n           </div>\r\n         </div>\r\n\r\n         <div class=\"modal-footer\" style=\"padding: 0;\">\r\n            <button (click)=\"editweekcloseModal()\"  type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Save Weekday</button>\r\n            <button type=\"button\" class=\"btn btn-secondary m-t-15 waves-effect\"  data-dismiss=\"modal\" aria-label=\"Close\">Close</button>\r\n           </div>\r\n       </form>\r\n     </div>\r\n   </div>\r\n </div>\r\n </div>  \r\n\r\n<!-- End Model -->\r\n\r\n\r\n\r\n\r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <!-- <div class=\"col-6\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-6\">\r\n                        <div class=\"card-header\">\r\n                        <h4>FSL Rule Data</h4></div>\r\n                    </div>\r\n                    <div class=\"col-6 text-right mt-2\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                        <button  data-toggle=\"modal\" data-target=\"#addFSLRules\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\" (click)=\"addFSL()\"><i class=\"fa fa-plus\"></i> Add New FSL Rules\r\n                        </button>\r\n                        </div>                       \r\n                    </div>\r\n              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                    <thead>\r\n                      <tr>\r\n                        <th>Name</th>\r\n                        <th>Created Date</th>\r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    \r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let number of numbers\">\r\n                            <td>{{ number.name }}</td>\r\n                            <td>{{ number.created_at }}</td>\r\n                            <td><button data-toggle=\"modal\" data-target=\"#editFSLRules\"  class=\"btn btn-primary btn-sm actionedit\" (click)=\"getFSLbyuuid(number.uuid)\"><i class=\"far fa-edit\"></i></button>&nbsp;<button (click)=\"Delete((number.fsl_rules_uniqueid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"3\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div> -->\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n              <div class=\"row\" style=\"margin-top: 20px;\r\n              \">\r\n                  <div class=\"col-6\">\r\n                      <div class=\"card-header\">\r\n                      <h4>Week Days</h4></div>\r\n                  </div>\r\n                  <div class=\"col-6 text-right mt-2\">\r\n                      <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                      <button  data-toggle=\"modal\" data-target=\"#addWeekDays\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-plus\"></i> Add Week Days\r\n                      </button>\r\n                      </div>                       \r\n                  </div>\r\n            \r\n              </div>            \r\n              \r\n            <div class=\"card-body\">\r\n              <div class=\"table-responsive\">\r\n              <table #daysdataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                  <thead>\r\n                    <tr>\r\n                      <th>Start Day</th>\r\n                      <th>End Day</th>\r\n                      <th>Created Date</th>\r\n                      <th>Action</th>\r\n                    </tr>\r\n                  </thead>\r\n                  \r\n                  <tbody *ngIf=\"days?.length != 0\">\r\n                      <tr *ngFor=\"let day of days\">\r\n                          <td>{{ day.start_day }}</td>\r\n                          <td>{{ day.end_day }}</td>\r\n                          <td>{{ day.created_at }}</td>\r\n                          <td><button data-toggle=\"modal\" data-target=\"#editweekdays\"  class=\"btn btn-primary btn-sm actionedit\" (click)=\"getWeekbyuuid(day.uuid,day.start_day,day.end_day)\"><i class=\"far fa-edit\"></i></button>&nbsp;<button (click)=\"DeleteWeekDay((day.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                      </tr>\r\n                  </tbody>\r\n                  <tbody *ngIf=\"days?.length == 0\">\r\n                    <tr>\r\n                      <td colspan=\"4\" class=\"no-data-available\">No data Available!</td>\r\n                    </tr>\r\n                  <tbody>\r\n                </table>\r\n              </div>\r\n            </div>\r\n          </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>");

/***/ }),

/***/ "/Krq":
/*!****************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/ivr-menus/ivr-routing-plans/add-plan/add-plan.component.html ***!
  \****************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n  <!-- Edit Routing Modal -->\r\n  <div class=\"modal fade\" id=\"editRouting\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n  aria-hidden=\"true\">\r\n  <div class=\"modal-dialog\" role=\"document\">\r\n    <div class=\"modal-content\">\r\n      <div class=\"modal-header\">\r\n        <h5 class=\"modal-title\" id=\"formModal\">Edit Routing Plan</h5>\r\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n          <span aria-hidden=\"true\">&times;</span>\r\n        </button>\r\n      </div>\r\n      <div class=\"modal-body\">\r\n        <form id=\"addLabel\" [formGroup]=\"editRoutingForm\" (ngSubmit)=\"oneditRoutingSubmit()\">\r\n            <fieldset class=\"scheduler-border\">\r\n               <legend class=\"scheduler-border\">Update Routing Plan</legend>\r\n                 <div class=\"control-group mt-2\">\r\n                   <input type=\"hidden\" name=\"\" formControlName=\"uuid\">\r\n                  <label class=\"control-label input-label\" for=\"startTime\">Pririty :</label>\r\n                  <input type=\"number\" formControlName=\"priority\" class=\"form-control\"/>    \r\n                </div>\r\n                \r\n                <div class=\"control-group mt-2\">\r\n                  <label class=\"control-label input-label\" for=\"startTime\">Weight :</label>\r\n                  <input type=\"number\" formControlName=\"weight\" class=\"form-control\"/>    \r\n                </div>\r\n              \r\n                 <div class=\"control-group mt-2\">\r\n                     <label class=\"control-label input-label\">Conversation Revenue :</label>\r\n                     <div class=\"input-group\">\r\n                      <div class=\"input-group-prepend\">\r\n                        <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                      </div>\r\n                      <input type=\"text\" formControlName=\"conversation_revenue\" class=\"form-control\" placeholder=\"Enter Conversation Revenue\" aria-label=\"Enter Conversation Revenue\" aria-describedby=\"btnGroupAddon\" [ngClass]=\"{ 'is-invalid': submitted && f.conversation_revenue.errors }\">\r\n                      <div *ngIf=\"submitted && f.conversation_revenue.errors\" class=\"invalid-feedback\">\r\n                        <div *ngIf=\"f.conversation_revenue.errors.required\">Conversation Revenue is required</div>\r\n                    </div>   \r\n                    </div>        \r\n                 </div>\r\n                \r\n                 <div class=\"control-group mt-2\">\r\n                     <label class=\"control-label input-label\" for=\"startTime\">Conversation Event :</label>\r\n                     <select formControlName=\"conversation_event\" class=\"form-control\"  [ngClass]=\"{ 'is-invalid': submitted && f.conversation_event.errors }\">\r\n                      <option value=\"0\">Call Length</option>\r\n                      <option value=\"1\">Call Successfully Connected</option>\r\n                    </select>  \r\n                     <div *ngIf=\"submitted && f.conversation_event.errors\" class=\"invalid-feedback\">\r\n                         <div *ngIf=\"f.conversation_event.errors.required\">Conversation Event is required</div>\r\n                    </div>       \r\n                 </div>\r\n  \r\n                   <div class=\"control-group mt-2\">\r\n                     <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                     <input type=\"text\" formControlName=\"conversation_seconds\" class=\"form-control\" type=\"text\" placeholder=\"Enter Seconds\" />                  \r\n                    \r\n                   </div>\r\n  \r\n  \r\n                   <div class=\"control-group mt-2\">\r\n                    <label>Restrict Duplicate</label>\r\n                    <select #restrictdup formControlName=\"restrictdup\" name=\"restrictdup\" id=\"restrictdup\" class=\"form-control\">\r\n                      <option value=\"0\">Buyer Settings (Do not Restrict)</option>\r\n                      <option value=\"1\">Do not Restrict</option>\r\n                      <option value=\"2\">By Campaign - Individual Target</option>\r\n                    </select>                              \r\n                 </div>\r\n                 <div *ngIf=\"restrictdup.value==2\">\r\n                 <div class=\"control-group mt-2\">\r\n                    <label>Restrict After</label>\r\n                    <select formControlName=\"restrictafter\" name=\"restrictafter\" id=\"restrictafter\" class=\"form-control\">\r\n                      <option value=\"0\">Converted</option>\r\n                      <option value=\"1\">Connected</option>                          \r\n                    </select>                              \r\n                 </div>\r\n                  <div class=\"control-group\">\r\n                      <label class=\"control-label input-label\" for=\"startTime\">Duration:</label>\r\n                      <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                      <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleDurationvalue==0}\" (click)=\"settingToggleDuration(0)\"> \r\n                            <input class=\"form-check-input\" name=\"settingToggleDuration\" formControlName=\"settingToggleDuration\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                            Always\r\n                      </label>\r\n                      <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleDurationvalue==1}\" (click)=\"settingToggleDuration(1)\">\r\n                        <input class=\"form-check-input\" name=\"settingToggleDuration\" formControlName=\"settingToggleDuration\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                        Time Limit\r\n                      </label>                              \r\n                        </div>                \r\n                 </div>                       \r\n                  <br>\r\n                  <div class=\"control-group row mt-2\" *ngIf=\"this.editRoutingForm.get('settingToggleDurationval').value==1\">\r\n                    <div class=\"col-3\"><input  formControlName=\"days\" style=\"width: 80px;\" type=\"number\"  class=\"form-control formcontrol\" name=\"\" id=\"\"></div>\r\n                    <div class=\"col-2 mt-2\"><span>Days</span></div>                           \r\n                  </div>\r\n                  </div>\r\n  \r\n               </fieldset>\r\n           \r\n          <div class=\"modal-footer\" style=\"padding: 0;\">\r\n           <!-- !addLabelForm.valid || -->\r\n             <button (click)=\"closeroutingModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Edit Routing Plan</button>\r\n             <button data-dismiss=\"modal\" aria-label=\"Close\" type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Close</button>\r\n            </div>\r\n        </form>\r\n      \r\n  </div>\r\n  </div>   \r\n  </div>   \r\n  </div>   \r\n  \r\n  <div class=\"main-content\">\r\n      <section class=\"section\">\r\n        <div class=\"section-body\">\r\n          <div class=\"row\">\r\n            <div class=\"col-12 col-md-12 col-lg-12\">\r\n              <form [formGroup]=\"editForm\" (ngSubmit)=\"onSubmit()\">\r\n              <div class=\"card\" >\r\n                <div class=\"card-header\">\r\n                  <h4> Setup Your IVR Routing Plan</h4>\r\n                </div>\r\n                <div class=\"card-body\" >\r\n            \r\n            <fieldset class=\"scheduler-border\">\r\n            <legend class=\"scheduler-border\">Setup Your Routing Plan</legend>\r\n            <section>\r\n              <strong>Name your Routing Plan.</strong>\r\n              <hr>\r\n              <div class=\"form-group row\">\r\n                <div class=\"col-sm-2\"></div>  \r\n                <label class=\"col-sm-1 col-form-label\">Name</label>\r\n                <div class=\"col-sm-5\" *ngIf=\"nameadded==0\">\r\n                  <input formControlName=\"name\" type=\"text\" class=\"form-control\"  [ngClass]=\"{ 'is-invalid': Submitted && editFormcontrol.name.errors }\">\r\n                  <div *ngIf=\"Submitted && editFormcontrol.name.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"editFormcontrol.name.errors.required\">Name is required</div>\r\n                </div>                              \r\n                </div>\r\n                <div class=\"col-sm-5\" *ngIf=\"nameadded==1\">                  \r\n                  <input formControlName=\"name\" type=\"text\" class=\"form-control\"  value=\"namvalue\" readonly>             \r\n                </div>\r\n                <div class=\"col-sm-2\" *ngIf=\"nameadded==0\">\r\n                  <button class=\"btn btn-primary mr-2 btn-sm p-2\" type=\"submit\">Submit</button>\r\n                </div>  \r\n              </div>\r\n            </section>\r\n            </fieldset>\r\n            \r\n          <fieldset class=\"scheduler-border\">\r\n           <legend class=\"scheduler-border\">Target</legend>    \r\n           <section>\r\n             \r\n          <div class=\"row\">\r\n            <div class=\"col-md-6\">\r\n              <strong>Forward your calls to buyers, call centers, or anywhere you'd like them to go.</strong><hr>\r\n             \r\n              <table #dataTableTarget class=\"table table-striped  dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n              <thead>\r\n                <tr>\r\n                  <th>Name</th>\r\n                  <th>Destination</th>\r\n                  <th>Add</th>                                        \r\n                </tr>\r\n              </thead>\r\n              <tbody *ngIf=\"allTargets?.length != 0\">\r\n                  <tr *ngFor=\"let data of allTargets\">\r\n                       <td>{{data.name}}</td>\r\n                       <td *ngIf=\"data.valtype =='IVR Menu'\"><a class=\"text-white\" routerLink=\"/edit-ivr/{{ data.ivrmenu_uuid }}\" >{{data.valtype}} - {{data.typeval}}</a></td>\r\n                       <td *ngIf=\"data.valtype !='IVR Menu'\">{{data.valtype}} - {{data.typeval}}</td>\r\n                       <td *ngIf=\"data.isavailinpayout==0\"><div (click)=\"setRouting(data.uuid)\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"fa fa-arrow-right\"></i></div>\r\n                      </td>\r\n                       <td *ngIf=\"data.isavailinpayout!=0\">\r\n                         <span class=\"badge badge-success\">Added</span>\r\n                      </td>\r\n                  </tr>\r\n              </tbody>\r\n              <tbody *ngIf=\"allTargets?.length == 0\">\r\n                <tr>\r\n                  <td colspan=\"5\" class=\"no-data-available\">No data Available!</td>\r\n                </tr>\r\n              <tbody>\r\n            </table>\r\n          </div>\r\n          <div class=\"col-md-6\">\r\n            <strong>Routing Plan</strong><hr>\r\n            <table #dataTableRouting class=\"table table-striped table-responsive dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n            <thead>\r\n              <tr>\r\n                <th>Priority</th>\r\n                <th>Name</th>\r\n                <th>Destination</th>\r\n                <th>Revenue</th>                                        \r\n                <th>Status</th>                                        \r\n                <th>Action</th>                                        \r\n              </tr>\r\n            </thead>\r\n            <tbody *ngIf=\"allRoutingPlan?.length != 0\">\r\n                <tr *ngFor=\"let data of allRoutingPlan;let i = index;\">\r\n                  <td>{{data.priority}}</td>\r\n                  <td *ngIf=\"data.destinationtype ==1\"><a class=\"text-white\" routerLink=\"/edit-ivr/{{ data.destinationuuid }}\" >\r\n                    {{data.name}}</a></td>\r\n                  <td *ngIf=\"data.destinationtype !=1\">{{data.name}}</td>\r\n                  \r\n                  <td *ngIf=\"data.destinationtype ==1\">IVR Menu -<a class=\"text-white\" routerLink=\"/edit-ivr/{{ data.destinationuuid }}\" >\r\n                    {{data.destination}}</a></td>\r\n                  <td *ngIf=\"data.destinationtype ==0\">Number - {{data.destination}}</td>       \r\n                  <td *ngIf=\"data.destinationtype ==2\">SIP - {{data.destination}}</td>       \r\n                     \r\n                  <td>{{data.revenue}}</td>\r\n                  <td>\r\n                    <div *ngIf=\"data.status==1\" class=\"fa fa-circle text-success\"></div>\r\n                    <div *ngIf=\"data.status==0\" class=\"fa fa-circle text-danger\"></div>\r\n                  </td>\r\n                  <td><div (click) =\"editRoutingdata(data.uuid,data.priority,data.weight,data.revenuevalue,data.type,data.seconds,data.restrictdup,data.restrictafter,data.settingToggleDurationval,data.days)\" data-toggle=\"modal\" data-target=\"#editRouting\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"fa fa-edit\"></i></div>&nbsp;<div (click)=\"DeleteRoutingPlan((data.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></div>\r\n                 </td>\r\n                </tr>\r\n            </tbody>\r\n            <tbody *ngIf=\"allRoutingPlan?.length == 0\">\r\n              <tr>\r\n                <td colspan=\"6\" class=\"no-data-available\">No data Available!</td>\r\n              </tr>\r\n            <tbody>\r\n          </table>\r\n          </div>\r\n        </div>\r\n           </section>    \r\n           </fieldset>\r\n      \r\n           <br>\r\n                <!-- <button class=\"btn btn-primary mr-2 btn-sm p-2\" type=\"submit\">Submit</button> -->\r\n                <button style=\"margin-right: 4px;\" routerLink=\"/ivr-routing-plans\" class=\"btn btn-primary  btn-sm p-2\">Back To All Plans</button>                    \r\n        \r\n                </div>              \r\n              </div>\r\n            </form>\r\n  \r\n  </div>\r\n  ");

/***/ }),

/***/ "/LYL":
/*!******************************************************************************!*\
  !*** ./src/app/modules/numbers/blocked-numbers/blocked-numbers.component.ts ***!
  \******************************************************************************/
/*! exports provided: BlockedNumbersComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockedNumbersComponent", function() { return BlockedNumbersComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_blocked_numbers_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./blocked-numbers.component.html */ "pYM1");
/* harmony import */ var _blocked_numbers_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blocked-numbers.component.scss */ "oNgd");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../global */ "XrUY");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-csv/ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__);












class DataTablesResponse {
}
let BlockedNumbersComponent = class BlockedNumbersComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.Submitted = false;
        this.ischecked = '1';
        this.data = {};
        this.block = 0;
        this.iscampaign = 0;
        this.isspecifyduration = 0;
        this.editblock = 0;
        this.editiscampaign = 0;
        this.editisspecifyduration = 0;
        this.checkboxes = [];
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadblocknumbers();
        this.addForm = this.fb.group({
            block_type: [''],
            blocked_number: [''],
            blocked_prefix: [''],
            scope: [''],
            campaign_uuid: [''],
            duration: [''],
        });
        this.addForm.get('block_type').setValue(0);
        // this.editForm.get('editblock_type').setValue(0);
        this.editForm = this.fb.group({
            uuid: [''],
            editblock_type: [''],
            blocked_number: [''],
            blocked_prefix: [''],
            scope: [''],
            campaign_uuid: [''],
            duration: [''],
        });
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getallcampain(this.currentCompany.uuid).subscribe(res => {
            // console.log(res);return false;    
            this.allcampaign = res;
        }, error => this.error = error);
    }
    block_numbertype(val) {
        this.block = val;
        this.addForm.get('block_type').setValue(this.block);
    }
    scopetype(val) {
        this.iscampaign = val;
        this.addForm.get('scope').setValue(this.iscampaign);
    }
    isduration(event) {
        // console.log(event.target.checked);
        if (event.target.checked == true) {
            this.editisspecifyduration = 1;
            this.isspecifyduration = 1;
        }
        if (event.target.checked == false) {
            this.editisspecifyduration = 0;
            this.isspecifyduration = 0;
        }
    }
    editblock_numbertype(val) {
        // alert(val);
        this.editblock = val;
        this.editForm.get('editblock_type').setValue(val);
    }
    editscopetype(val) {
        this.editiscampaign = val;
        this.editForm.get('scope').setValue(val);
    }
    editisduration(event) {
        // console.log(event.target.checked);
        if (event.target.checked == true) {
            this.editisspecifyduration = 1;
        }
        if (event.target.checked == false) {
            this.editisspecifyduration = 0;
        }
    }
    loadblocknumbers() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[2, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getblocked_numbers/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    // console.log(resp.data);
                    this.blocknumbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "blocked_number" }, { data: "campaign" }, { data: "blocked_until" }, { data: "created_at" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    Delete(uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.deleteblckedno(uuid).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                    this.loadblocknumbers();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                }, 2000);
            }
        });
    }
    //Add Labels
    get labelcontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        // alert(this.isspecifyduration);return false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('block_type', this.addForm.get('block_type').value);
        formData.append('blocked_number', this.addForm.get('blocked_number').value);
        formData.append('blocked_prefix', this.addForm.get('blocked_prefix').value);
        formData.append('scope', this.addForm.get('scope').value);
        formData.append('campaign_uuid', this.addForm.get('campaign_uuid').value);
        formData.append('is_duration', this.isspecifyduration);
        formData.append('duration', this.addForm.get('duration').value);
        this.moduleservice.addblockedcalls(formData, this.currentCompany.uuid).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Number Blocked Successfully');
                this.loadblocknumbers();
                this.Submitted = false;
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    closeModal() {
        $("#addLabels").modal("hide");
        if (this.addForm.get('block_type').value == 0 || this.addForm.get('block_type').value == 1 || this.addForm.get('block_type').value == 2) {
            $(".custom-switch-input").prop('checked', false);
            this.Submitted = false;
            setTimeout(() => {
                this.addForm.reset();
                this.block = 0;
                this.isspecifyduration = 0;
                this.iscampaign = 0;
                this.block_numbertype(0);
                this.scopetype(0);
            }, 2000);
        }
    }
    editcloseModal() {
        $("#editLabels").modal("hide");
        $(".custom-switch-input").prop('checked', false);
        this.Submitted = false;
    }
    // Edit data
    editdata(uuid, block_type, blocked_number, blocked_prefix, scope, campaign_uuid, is_duration, blocked_until) {
        this.editblock = block_type;
        this.editiscampaign = scope;
        // console.log(is_duration);
        // if(blocked_until!='' && blocked_until!='∞'){
        this.editisspecifyduration = is_duration;
        // }else{
        //   this.editisspecifyduration=0;
        // }
        this.editForm.patchValue({
            uuid: uuid,
            blocked_number: blocked_number,
            blocked_prefix: blocked_number,
            campaign_uuid: campaign_uuid,
            duration: blocked_until,
        });
    }
    get labeleditcontrol() { return this.editForm.controls; }
    onEditSubmit() {
        const formData = new FormData();
        if (this.editForm.invalid) {
            return;
        }
        // alert(this.editForm.get('editblock_type').value);
        // alert(this.editblock)
        // alert(this.editisspecifyduration);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('block_type', this.editForm.get('editblock_type').value);
        formData.append('blocked_number', this.editForm.get('blocked_number').value);
        formData.append('blocked_prefix', this.editForm.get('blocked_prefix').value);
        formData.append('scope', this.editForm.get('scope').value);
        formData.append('campaign_uuid', this.editForm.get('campaign_uuid').value);
        formData.append('duration', this.editForm.get('duration').value);
        formData.append('is_duration', this.editisspecifyduration);
        this.moduleservice.editblockednumbers(formData, this.editForm.get('uuid').value).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.loadblocknumbers();
                this.toastrService.success('Blocked Number data Updated Successfully');
            }
            else {
                this.toastrService.error('Failed To Update Data');
            }
        }, error => this.error = error);
    }
    exportdata() {
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            // showTitle: true,
            // title: 'Your title',
            useBom: true,
            // noDownload: true,
            headers: ["Label Name", "Notes", "Created At"]
        };
        new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__["ngxCsv"](this.blocknumbers, 'All Blocked Numbers', options);
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.blocknumbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.blocknumbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.blocknumbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedLabels(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                        }, 2000);
                        this.loadblocknumbers();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                }
            });
        }
    }
};
BlockedNumbersComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
BlockedNumbersComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
BlockedNumbersComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-blocked-numbers',
        template: _raw_loader_blocked_numbers_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_blocked_numbers_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], BlockedNumbersComponent);



/***/ }),

/***/ 0:
/*!***************************!*\
  !*** multi ./src/main.ts ***!
  \***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! C:\xampp\htdocs\DD BKP\dialdigit\src\main.ts */"zUnb");


/***/ }),

/***/ "04+N":
/*!*************************************************************************!*\
  !*** ./src/app/modules/number/number-buyer/number-buyer.component.scss ***!
  \*************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJudW1iZXItYnV5ZXIuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "0HjI":
/*!************************************************************!*\
  !*** ./src/app/modules/whitelist/whitelist.component.scss ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJ3aGl0ZWxpc3QuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "0NxV":
/*!********************************************************!*\
  !*** ./src/app/modules/longlist/longlist.component.ts ***!
  \********************************************************/
/*! exports provided: LonglistComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LonglistComponent", function() { return LonglistComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_longlist_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./longlist.component.html */ "tqqR");
/* harmony import */ var _longlist_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./longlist.component.scss */ "RFB6");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! moment */ "wd/R");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! datatables.net */ "FlOX");
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(datatables_net__WEBPACK_IMPORTED_MODULE_10__);











const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let LonglistComponent = class LonglistComponent {
    constructor(moduleservice, handler, fb) {
        this.moduleservice = moduleservice;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_8__["GlobalVariable"].BASE_API_URL;
        this.numbers = '';
        // maxDate: moment.Moment;
        // minDate: moment.Moment;
        // invalidDates: moment.Moment[] = [];
        this.ranges = {
            Today: [moment__WEBPACK_IMPORTED_MODULE_9__(), moment__WEBPACK_IMPORTED_MODULE_9__()],
            Yesterday: [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(1, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__().subtract(1, 'days')],
            'Last 7 Days': [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(6, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__()],
            'Last 30 Days': [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(29, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__()],
            'This Month': [moment__WEBPACK_IMPORTED_MODULE_9__().startOf('month'), moment__WEBPACK_IMPORTED_MODULE_9__().endOf('month')],
            'Last Month': [
                moment__WEBPACK_IMPORTED_MODULE_9__()
                    .subtract(1, 'month')
                    .startOf('month'),
                moment__WEBPACK_IMPORTED_MODULE_9__()
                    .subtract(1, 'month')
                    .endOf('month')
            ],
        };
        this.dtOptions = {};
        this.submitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        // this.maxDate = moment().add(2,  'weeks');
        // this.minDate = moment().subtract(3, 'days');
        this.alwaysShowCalendars = true;
        this.keepCalendarOpeningWithRange = true;
        this.showRangeLabelOnInput = true;
        this.selected = { startDate: moment__WEBPACK_IMPORTED_MODULE_9__().startOf('day'), endDate: moment__WEBPACK_IMPORTED_MODULE_9__().endOf('day') };
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadcalls();
    }
    get f() { return this.searchcallsform.controls; }
    loadcalls() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "order": [[1, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getshortlonglistnumbers/' + this.currentCompany.uuid + '/1', { 'dataTablesParameters': dataTablesParameters, 'number': this.numbers, 'date': this.selected }, {}).subscribe(resp => {
                    // console.log(resp); return false;
                    this.alldata = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "number" }, { data: "forward_to" }, { data: "created_at" }
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
};
LonglistComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
LonglistComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
LonglistComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-longlist',
        template: _raw_loader_longlist_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_longlist_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], LonglistComponent);



/***/ }),

/***/ "0bLM":
/*!********************************************!*\
  !*** ./src/app/http-interceptors/index.ts ***!
  \********************************************/
/*! exports provided: httpInterceptorProviders */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "httpInterceptorProviders", function() { return httpInterceptorProviders; });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _auth_interceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./auth-interceptor */ "OhBw");


const httpInterceptorProviders = [
    { provide: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HTTP_INTERCEPTORS"], useClass: _auth_interceptor__WEBPACK_IMPORTED_MODULE_1__["AuthInterceptor"], multi: true }
];


/***/ }),

/***/ 1:
/*!********************!*\
  !*** fs (ignored) ***!
  \********************/
/*! no static exports found */
/***/ (function(module, exports) {

/* (ignored) */

/***/ }),

/***/ "16os":
/*!******************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/ivr-menus/edit-ivrmenu/edit-ivrmenu.component.html ***!
  \******************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n<div *ngIf=\"showLoadingIndicator\">\r\n  <div class=\"loader\"></div>\r\n</div>\r\n<div class=\"main-content\">\r\n        <div class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12 col-md-12 col-lg-12\">\r\n                <form method=\"post\" [formGroup]=\"editIVRMenuForm\" (ngSubmit)=\"onSubmit()\">\r\n                <div class=\"card\">\r\n                  <div class=\"card-header\">\r\n                    <h4>Edit IVR Menu</h4>\r\n                  </div>\r\n                  <div class=\"card-body\">                    \r\n                    <div class=\"form-group\">\r\n                      <label>Name</label>\r\n                      <div class=\"input-group\">\r\n                        <input formControlName=\"name\" id=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': submitted && f.name.errors }\"> \r\n                        <div *ngIf=\"submitted && f.name.errors\" class=\"invalid-feedback\">\r\n                            <div *ngIf=\"f.name.errors.required\">Name is required</div>          \r\n                        </div>                      \r\n                        </div>  \r\n                    </div>\r\n \r\n                    <div class=\"form-group\">\r\n                       <label>Number Of Retries</label>\r\n                       <div class=\"input-group\">\r\n                         <input formControlName=\"noofretries\" id=\"noofretries\" type=\"number\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': submitted && f.noofretries.errors }\" min=\"0\"> \r\n                         <div *ngIf=\"submitted && f.noofretries.errors\" class=\"invalid-feedback\">\r\n                             <div *ngIf=\"f.noofretries.errors.required\">Number Of Retries is required</div>                            \r\n                         </div>                      \r\n                         </div>  \r\n                     </div>                    \r\n \r\n                   <div class=\"form-group\">\r\n                     <label>Timeout</label>\r\n                     <div class=\"input-group\">\r\n                       <input formControlName=\"timeout\" id=\"timeout\" type=\"number\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': submitted && f.timeout.errors }\" min=\"0\"> \r\n                       <div *ngIf=\"submitted && f.timeout.errors\" class=\"invalid-feedback\">\r\n                           <div *ngIf=\"f.timeout.errors.required\">Timeout is required</div>    \r\n                       </div>                      \r\n                       </div>  \r\n                   </div>\r\n                   \r\n                   <div class=\"form-group\">\r\n                       <label>How many options in the IVR (1-9)</label>\r\n                       <select formControlName=\"ivr_options\" class=\"form-control\" (change)=\"IVR_Options($event)\">\r\n                         <option value=\"0\">0</option>\r\n                         <option value=\"1\" selected>1</option>\r\n                         <option value=\"2\">2</option>\r\n                         <option value=\"3\">3</option>\r\n                         <option value=\"4\">4</option>\r\n                         <option value=\"5\">5</option>\r\n                         <option value=\"6\">6</option>\r\n                         <option value=\"7\">7</option>\r\n                         <option value=\"8\">8</option>\r\n                         <option value=\"9\">9</option>\r\n                       </select>\r\n                      \r\n                     </div>\r\n                  \r\n                   <div class=\"form-group\" *ngIf=\"selectedIVR_Options!=''\">\r\n                       <label>Default response if no response by caller</label>\r\n                       <select formControlName=\"default_response\" class=\"form-control\" >\r\n                         <option disabled>Select default option for no response</option>\r\n                         <option *ngFor=\"let in of selectedIVR();let i = index\" [value]=\"in+1\">\r\n                            {{in+1}}\r\n                           </option>                  \r\n                       </select>\r\n                     </div>\r\n\r\n                     \r\n                    <div class=\"form-group\" *ngIf=\"allBuyers?.length>0\">\r\n                      <label>Buyer</label>\r\n                      <!-- <select formControlName=\"buyer\" class=\"form-control\" value=\"''\">\r\n                        <option value=\"\" selected>Select Buyer</option>\r\n                        <option *ngFor=\"let buyers of allBuyers;\" [value]=\"buyers.id\">\r\n                            {{buyers.text}}\r\n                          </option>\r\n                      </select> -->\r\n                      <angular2-multiselect [data]=\"allBuyers\" [(ngModel)]=\"selectedItems\" formControlName=\"buyer\" [settings]=\"settings\"></angular2-multiselect>       \r\n                    </div>\r\n \r\n                     <table style=\"font-size: 13px;\" class=\"table table-striped dataTable no-footer\">\r\n                       <thead>\r\n                           <tr>\r\n                               <th></th>\r\n                               <th>Link to File</th>\r\n                               <th>Select Audio</th>\r\n                               <th>Upload Audio File</th>\r\n                               <th>Forward to IVR or Routing</th>\r\n                           </tr>\r\n                       </thead>\r\n                       <tbody>\r\n                           <tr style=\"background: #fff;\">\r\n                               <td>Opening Menu Recording</td>\r\n                               <td>\r\n                                   <audio *ngIf=\"url_0!==''\" style=\"width: 147px;\" controls>\r\n                                     <source src=\"{{url_0}}\" type=\"audio/mp3\">\r\n                                   </audio>\r\n                               </td>\r\n                               <td>\r\n                                   <select class=\"form-control\" name='audio_uuid_0' formControlName=\"audio_uuid_0\" (change)=\"audiochange($event,0)\">\r\n                                     <option value=\"\" selected=\"\">No audio file</option>\r\n                                     <option *ngFor=\"let aud of audio;\" [value]=\"aud.uuid\">\r\n                                         {{aud.original_filename}}\r\n                                     </option>\r\n                                   </select>\r\n                               </td>\r\n                               <td>\r\n                                 <div class=\"qq-upload-button-selector btn btn-primary pull-left\" style=\"position: relative; overflow: hidden; direction: ltr;font-size: 12px;width: 39px;\">\r\n                                   <div><i class=\"fa fa-upload\"></i></div>\r\n                                   <input (change)=\"selectFile($event,0)\" formControlName=\"upload_audio_0\" title=\"file input\"  type=\"file\" style=\"position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0; height: 100%;\">\r\n                                 </div><br><br>\r\n                                 <!-- <div *ngIf=\"currentFileUpload\" class=\"progress\">\r\n                                     <div class=\"progress-bar progress-bar-info progress-bar-striped\" \r\n                                     role=\"progressbar\" attr.aria-valuenow=\"{{progress.percentage}}\"\r\n                                       aria-valuemin=\"0\" aria-valuemax=\"100\" [ngStyle]=\"{width:progress.percentage+'%'}\">\r\n                                       {{progress.percentage}}%</div>\r\n                                   </div> -->\r\n                               </td>\r\n                                 <td>\r\n                                     <div class=\"row\">\r\n                                         <div class=\"col-md-6\">\r\n                                           <select formControlName=\"forward_to_0\" class=\"form-control\" (change)=\"forward_to($event,0)\" [value]=\"'FORWARD_TO_NUMBER'\">\r\n                                              <option value=\"CONTINUE\">Continue</option>\r\n                                              <option value=\"FORWARD_TO_NUMBER\">Forward to Phone Number</option>\r\n                                               <!-- <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                   {{name.name}} \r\n                                               </option> -->\r\n                                             </select>\r\n                                         </div>\r\n                                         <div class=\"col-md-6\" *ngIf=\"forward_0 == 'FORWARD_TO_NUMBER'\">\r\n                                           <input formControlName=\"forwardto_phone_0\" placeholder=\"(000) 000-000\" class=\"form-control\" id=\"forwardto_phone_0\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                         </div>\r\n                                     </div>\r\n                                 </td>\r\n                                 </tr>\r\n                                \r\n                                 <tr style=\"background: #fff;\">\r\n                                  <td>#</td>\r\n                                  <td>\r\n                                      <audio *ngIf=\"url_1!==''\" style=\"width: 147px;\" controls>\r\n                                        <source src=\"{{url_1}}\" type=\"audio/mp3\">\r\n                                      </audio>                                 \r\n                                  </td>\r\n                                  <td>\r\n                                      <select class=\"form-control\" name='audio_uuid_1' formControlName=\"audio_uuid_1\" (change)=\"audiochange($event,1)\">\r\n                                        <option value=\"\" selected=\"\">No audio file</option>\r\n                                        <option *ngFor=\"let aud of audio;\" [value]=\"aud.uuid\">\r\n                                            {{aud.original_filename}}\r\n                                        </option>\r\n                                      </select>\r\n                                  </td>\r\n                                  <td>\r\n                                    <div class=\"qq-upload-button-selector btn btn-primary pull-left\" style=\"position: relative; overflow: hidden; direction: ltr;font-size: 12px;width: 39px;\">\r\n                                      <div><i class=\"fa fa-upload\"></i></div>\r\n                                      <input (change)=\"selectFile($event,1)\" formControlName=\"upload_audio_1\" title=\"file input\"  type=\"file\" style=\"position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0; height: 100%;\">\r\n                                    </div><br><br>                            \r\n                                  </td>\r\n                                  <td>\r\n                                      <div class=\"row\">\r\n                                          <div class=\"col-md-6\">\r\n                                            <select formControlName=\"forward_to_1\" class=\"form-control\" (change)=\"forward_to($event,1)\" [value]=\"'FORWARD_TO_NUMBER'\">\r\n                                              <option value=\"CONTINUE\">Continue</option>\r\n                                                <option value=\"FORWARD_TO_NUMBER\">Forward to Phone Number</option>\r\n                                              </select>\r\n                                          </div>\r\n                                          <div class=\"col-md-6\" *ngIf=\"forward_1 == 'FORWARD_TO_NUMBER'\">\r\n                                            <input formControlName=\"forwardto_phone_1\" placeholder=\"(000) 000-000\" class=\"form-control\" id=\"forwardto_phone_1\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                          </div>\r\n                                      </div>\r\n                                  </td>\r\n                                  </tr>\r\n                                   \r\n                                 <tr *ngFor=\"let i of selectedIVR();\" style=\"background: #fff;\">\r\n                                       <td>Press {{i+1}} Recording</td>\r\n                                       <td>\r\n                                           <div *ngIf=\"url_1!=='' && i+2==1\">\r\n                                             <audio style=\"width: 147px;\" controls>\r\n                                               <source src=\"{{url_1}}\" type=\"audio/mp3\">\r\n                                             </audio>\r\n                                           </div>\r\n                                           <div *ngIf=\"url_2!=='' && i+2==2\">\r\n                                               <audio style=\"width: 147px;\" controls>\r\n                                                 <source src=\"{{url_2}}\" type=\"audio/mp3\">\r\n                                               </audio>\r\n                                           </div>\r\n                                           <div *ngIf=\"url_3!=='' && i+2==3\">\r\n                                               <audio style=\"width: 147px;\" controls>\r\n                                                 <source src=\"{{url_3}}\" type=\"audio/mp3\">\r\n                                               </audio>\r\n                                           </div>\r\n                                           <div *ngIf=\"url_4!=='' && i+2==4\">\r\n                                               <audio style=\"width: 147px;\" controls>\r\n                                                 <source src=\"{{url_4}}\" type=\"audio/mp3\">\r\n                                               </audio>\r\n                                           </div>\r\n                                           <div *ngIf=\"url_5!=='' && i+2==5\">\r\n                                               <audio style=\"width: 147px;\" controls>\r\n                                                 <source src=\"{{url_5}}\" type=\"audio/mp3\">\r\n                                               </audio>\r\n                                           </div>\r\n                                           <div *ngIf=\"url_6!=='' && i+2==6\">\r\n                                               <audio style=\"width: 147px;\" controls>\r\n                                                 <source src=\"{{url_6}}\" type=\"audio/mp3\">\r\n                                               </audio>\r\n                                           </div>\r\n                                           <div *ngIf=\"url_7!=='' && i+2==7\">\r\n                                               <audio style=\"width: 147px;\" controls>\r\n                                                 <source src=\"{{url_7}}\" type=\"audio/mp3\">\r\n                                               </audio>\r\n                                           </div>\r\n                                           <div *ngIf=\"url_8!=='' && i+2==8\" id=\"url_8\">\r\n                                               <audio style=\"width: 147px;\" controls>\r\n                                                 <source src=\"{{url_8}}\" type=\"audio/mp3\">\r\n                                               </audio>\r\n                                           </div>\r\n                                           <div *ngIf=\"url_9!=='' && i+2==9\" id=\"url_9\" >\r\n                                               <audio style=\"width: 147px;\" controls>\r\n                                                 <source src=\"{{url_9}}\" type=\"audio/mp3\">\r\n                                               </audio>\r\n                                           </div>\r\n                                           <div *ngIf=\"url_10!=='' && i+2==10\" id=\"url_10\" >\r\n                                               <audio style=\"width: 147px;\" controls>\r\n                                                 <source src=\"{{url_10}}\" type=\"audio/mp3\">\r\n                                               </audio>\r\n                                           </div>\r\n                                       </td>\r\n                                       <td>\r\n                                       <select class=\"form-control\" formControlName=\"audio_uuid_{{i+2}}\" (change)=\"audiochange($event,i+2)\">\r\n                                         <option value=\"\" selected=\"\" >No audio file</option>\r\n                                         <option *ngFor=\"let aud of audio;\" [value]=\"aud.uuid\">\r\n                                             {{aud.original_filename}}\r\n                                         </option>\r\n                                       </select>\r\n                                     </td>\r\n                                     <td>\r\n                                     <div>\r\n                                         <div class=\"btn btn-primary pull-left\" style=\"position: relative; overflow: hidden; direction: ltr;font-size: 12px;width: 39px;\">\r\n                                         <div><i class=\"fa fa-upload\"></i></div>\r\n                                         <input (change)=\"selectFile($event,i+2)\" formControlName=\"upload_audio_{{i+2}}\" title=\"file input\" type=\"file\"  style=\"position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0; height: 100%;\">\r\n                                         </div>                     \r\n                                     </div>\r\n                                     </td>\r\n                                     <td>\r\n                                         <div class=\"row\">\r\n                                             <div class=\"col-md-6\">\r\n                                                 <select formControlName=\"forward_to_{{i+2}}\" class=\"form-control\" (change)=\"forward_to($event,i+2)\">\r\n                                                    <option value=\"FORWARD_TO_IVR\">Forward to IVR</option>\r\n                                                    <option value=\"FORWARD_TO_ROUTING\">Forward to Targets</option>\r\n                                                    <option value=\"FORWARD_TO_IVRROUTING\">Forward to IVR Routing</option>\r\n                                                    <option value=\"FORWARD_TO_NUMBER\">Forward to Phone Number</option>\r\n                                                    <!-- <option value=\"FORWARD_TO_CAMPAIGN\">Forward to Campaign</option> -->\r\n                                                    <!-- <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                       {{name.name}}\r\n                                                   </option> -->\r\n                                                 </select>\r\n                                             </div>                                     \r\n \r\n                                             <div class=\"col-md-6\" >\r\n                                              <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_NUMBER'\">\r\n                                                <input id=\"forwardto_phone_2\" formControlName=\"forwardto_phone_2\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                              </div>\r\n                                              <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_NUMBER'\">\r\n                                                  <input formControlName=\"forwardto_phone_3\" id=\"forwardto_phone_3\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                              </div>\r\n                                              <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_NUMBER'\">\r\n                                                  <input id=\"forwardto_phone_4\" formControlName=\"forwardto_phone_4\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                              </div>\r\n                                              <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_NUMBER'\">\r\n                                                  <input id=\"forwardto_phone_5\" formControlName=\"forwardto_phone_5\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                              </div>\r\n                                              <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_NUMBER'\">\r\n                                                  <input id=\"forwardto_phone_6\" formControlName=\"forwardto_phone_6\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                              </div>\r\n                                              <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_NUMBER'\">\r\n                                                  <input id=\"forwardto_phone_7\" formControlName=\"forwardto_phone_7\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                              </div>\r\n                                              <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_NUMBER'\">\r\n                                                  <input id=\"forwardto_phone_8\" formControlName=\"forwardto_phone_8\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                              </div>\r\n                                              <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_NUMBER'\">\r\n                                                  <input id=\"forwardto_phone_9\" formControlName=\"forwardto_phone_9\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                              </div>\r\n                                              <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_NUMBER'\">\r\n                                                  <input id=\"forwardto_phone_10\" formControlName=\"forwardto_phone_10\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                              </div>  \r\n                                              \r\n                                              \r\n                                              <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_IVR'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivr_2\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Menu</option>\r\n                                                  <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                      {{name.name}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_2\" formControlName=\"forwardto_ivr_2\" [settings]=\r\n                                                \"{\r\n                                                  enableSearchFilter: true,\r\n                                                  showCheckbox:false,\r\n                                                  singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_ivr_2\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_2[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_IVR'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivr_3\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Menu</option>\r\n                                                  <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                      {{name.name}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"menuname\" class=\"pb-2\" [(ngModel)]=\"forwardto_ivr_3\" formControlName=\"forwardto_ivr_3\" [settings]=\r\n                                                \"{\r\n                                                  enableSearchFilter: true,\r\n                                                  showCheckbox:false,\r\n                                                  singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_ivr_3\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_3[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n\r\n                                              </div>\r\n                                              <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_IVR'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivr_4\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Menu</option>\r\n                                                  <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                      {{name.name}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_4\" formControlName=\"forwardto_ivr_4\" [settings]=\r\n                                                \"{\r\n                                                  enableSearchFilter: true,\r\n                                                  showCheckbox:false,\r\n                                                  singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_ivr_4\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_4[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_IVR'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivr_5\" class=\"form-control\" >\r\n                                                  <option value=\"\">Select IVR Menu</option>\r\n                                                  <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                      {{name.name}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_5\" formControlName=\"forwardto_ivr_5\" [settings]=\r\n                                                \"{\r\n                                                  enableSearchFilter: true,\r\n                                                  showCheckbox:false,\r\n                                                  singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_ivr_5\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_5[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_IVR'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivr_6\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Menu</option>\r\n                                                  <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                      {{name.name}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_6\" formControlName=\"forwardto_ivr_6\" [settings]=\r\n                                                \"{\r\n                                                  enableSearchFilter: true,\r\n                                                  showCheckbox:false,\r\n                                                  singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_ivr_6\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_6[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_IVR'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivr_7\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Menu</option>\r\n                                                  <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                      {{name.name}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_7\" formControlName=\"forwardto_ivr_7\" [settings]=\r\n                                                \"{\r\n                                                  enableSearchFilter: true,\r\n                                                  showCheckbox:false,\r\n                                                  singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_ivr_7\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_7[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_IVR'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivr_8\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Menu</option>\r\n                                                  <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                      {{name.name}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_8\" formControlName=\"forwardto_ivr_8\" [settings]=\r\n                                                \"{\r\n                                                  enableSearchFilter: true,\r\n                                                  showCheckbox:false,\r\n                                                  singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_ivr_8\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_8[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_IVR'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivr_9\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Menu</option>\r\n                                                  <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                      {{name.name}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_9\" formControlName=\"forwardto_ivr_9\" [settings]=\r\n                                                \"{\r\n                                                  enableSearchFilter: true,\r\n                                                  showCheckbox:false,\r\n                                                  singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_ivr_9\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_9[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_IVR'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivr_10\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Menu</option>\r\n                                                  <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                      {{name.name}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_10\" formControlName=\"forwardto_ivr_10\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR'}\">\r\n                                                </angular2-multiselect> \r\n                                                <a *ngIf=\"forwardto_ivr_10\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_10[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                              </div>   \r\n                                             \r\n\r\n\r\n\r\n                                              <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_ROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_routing_2\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Targets</option>\r\n                                                  <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_2\" formControlName=\"forwardto_routing_2\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                </angular2-multiselect> \r\n                                                <a *ngIf=\"forwardto_routing_2\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_2[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_ROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_routing_3\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Targets</option>\r\n                                                  <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_3\" formControlName=\"forwardto_routing_3\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                </angular2-multiselect> \r\n                                                <a *ngIf=\"forwardto_routing_3\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_3[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_ROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_routing_4\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Targets</option>\r\n                                                  <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_4\" formControlName=\"forwardto_routing_4\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                </angular2-multiselect> \r\n                                                <a *ngIf=\"forwardto_routing_4\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_4[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_ROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_routing_5\" class=\"form-control\" >\r\n                                                  <option value=\"\">Select Targets</option>\r\n                                                  <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_5\" formControlName=\"forwardto_routing_5\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                </angular2-multiselect> \r\n                                                <a *ngIf=\"forwardto_routing_5\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_5[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_ROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_routing_6\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Targets</option>\r\n                                                  <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_6\" formControlName=\"forwardto_routing_6\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                </angular2-multiselect> \r\n                                                <a *ngIf=\"forwardto_routing_6\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_6[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_ROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_routing_7\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Targets</option>\r\n                                                  <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_7\" formControlName=\"forwardto_routing_7\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                </angular2-multiselect> \r\n                                                <a *ngIf=\"forwardto_routing_7\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_7[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_ROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_routing_8\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Targets</option>\r\n                                                  <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_8\" formControlName=\"forwardto_routing_8\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                </angular2-multiselect> \r\n                                                <a *ngIf=\"forwardto_routing_8\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_8[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_ROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_routing_9\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Targets</option>\r\n                                                  <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_9\" formControlName=\"forwardto_routing_9\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                </angular2-multiselect> \r\n                                                <a *ngIf=\"forwardto_routing_9\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_9[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_ROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_routing_10\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Targets</option>\r\n                                                  <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_10\" formControlName=\"forwardto_routing_10\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                </angular2-multiselect> \r\n                                                <a *ngIf=\"forwardto_routing_10\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_10[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                              </div>   \r\n\r\n\r\n\r\n                                              \r\n                                              \r\n                                              <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivrrouting_2\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Routing</option>\r\n                                                  <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_2\" formControlName=\"forwardto_ivrrouting_2\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                </angular2-multiselect> \r\n                                                <a *ngIf=\"forwardto_ivrrouting_2\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_2[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivrrouting_3\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Routing</option>\r\n                                                  <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_3\" formControlName=\"forwardto_ivrrouting_3\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                </angular2-multiselect>\r\n                                                <a *ngIf=\"forwardto_ivrrouting_3\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_3[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivrrouting_4\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Routing</option>\r\n                                                  <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_4\" formControlName=\"forwardto_ivrrouting_4\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                </angular2-multiselect>\r\n                                                <a *ngIf=\"forwardto_ivrrouting_4\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_4[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivrrouting_5\" class=\"form-control\" >\r\n                                                  <option value=\"\">Select IVR Routing</option>\r\n                                                  <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_5\" formControlName=\"forwardto_ivrrouting_5\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                </angular2-multiselect>\r\n                                                <a *ngIf=\"forwardto_ivrrouting_5\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_5[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivrrouting_6\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Routing</option>\r\n                                                  <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_6\" formControlName=\"forwardto_ivrrouting_6\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                </angular2-multiselect>\r\n                                                <a *ngIf=\"forwardto_ivrrouting_6\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_6[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivrrouting_7\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Routing</option>\r\n                                                  <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_7\" formControlName=\"forwardto_ivrrouting_7\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                </angular2-multiselect>\r\n                                                <a *ngIf=\"forwardto_ivrrouting_7\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_7[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivrrouting_8\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Routing</option>\r\n                                                  <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_8\" formControlName=\"forwardto_ivrrouting_8\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                </angular2-multiselect>\r\n                                                <a *ngIf=\"forwardto_ivrrouting_8\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_8[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivrrouting_9\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Routing</option>\r\n                                                  <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_9\" formControlName=\"forwardto_ivrrouting_9\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                </angular2-multiselect>\r\n                                                <a *ngIf=\"forwardto_ivrrouting_9\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_9[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                <!-- <select formControlName=\"forwardto_ivrrouting_10\" class=\"form-control\">\r\n                                                  <option value=\"\">Select IVR Routing</option>\r\n                                                  <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select> -->\r\n                                                <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_10\" formControlName=\"forwardto_ivrrouting_10\" [settings]=\r\n                                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                </angular2-multiselect>\r\n                                                <a *ngIf=\"forwardto_ivrrouting_10\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_10[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                              </div>   \r\n\r\n                                              <!-- <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                <select formControlName=\"forwardto_campaign_2\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Campaign</option>\r\n                                                  <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                <select formControlName=\"forwardto_campaign_3\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Campaign</option>\r\n                                                  <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                <select formControlName=\"forwardto_campaign_4\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Campaign</option>\r\n                                                  <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                <select formControlName=\"forwardto_campaign_5\" class=\"form-control\" >\r\n                                                  <option value=\"\">Select Campaign</option>\r\n                                                  <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                <select formControlName=\"forwardto_campaign_6\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Campaign</option>\r\n                                                  <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                <select formControlName=\"forwardto_campaign_7\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Campaign</option>\r\n                                                  <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                <select formControlName=\"forwardto_campaign_8\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Campaign</option>\r\n                                                  <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                <select formControlName=\"forwardto_campaign_9\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Campaign</option>\r\n                                                  <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select>\r\n                                              </div>\r\n                                              <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                <select formControlName=\"forwardto_campaign_10\" class=\"form-control\">\r\n                                                  <option value=\"\">Select Campaign</option>\r\n                                                  <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                      {{name.text}}\r\n                                                  </option>\r\n                                                </select>\r\n                                              </div>    -->\r\n                                          </div>\r\n                                         </div>\r\n                                       </td>\r\n                                  </tr>\r\n                           </tbody>\r\n                       </table>\r\n                 \r\n                  </div>\r\n                  <div class=\"card-footer text-right\">\r\n                        <button  class=\"btn btn-primary mr-1 btn-sm p-2\" type=\"submit\"><i class=\"fa fa-save\"></i> Update IVR Menu</button>\r\n                        <button style=\"margin-right: 4px;\" routerLink=\"/ivr-menu\" class=\"btn btn-primary btn-sm p-2\"><i class=\"fa fa-arrow-left\" aria-hidden=\"true\"></i>\r\n                          Back To IVR Menus</button>\r\n                      </div>\r\n                </div>\r\n              </form>\r\n \r\n    </div>\r\n ");

/***/ }),

/***/ "1F1i":
/*!****************************************************************!*\
  !*** ./src/app/modules/rules/rulesadd/rulesadd.component.scss ***!
  \****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".rule-input {\n  width: 76%;\n  display: inline-block;\n}\n\n.rule-text-block {\n  width: 15%;\n  display: inline-block;\n  margin-right: 9%;\n  font-size: 13px;\n  font-weight: 500;\n}\n\n.btn-primary {\n  font-size: 12px !important;\n}\n\n.trashbtn {\n  font-size: 13px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxccnVsZXNhZGQuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDSSxVQUFBO0VBQ0EscUJBQUE7QUFDSjs7QUFDQTtFQUNJLFVBQUE7RUFDQSxxQkFBQTtFQUNBLGdCQUFBO0VBQ0EsZUFBQTtFQUNBLGdCQUFBO0FBRUo7O0FBQUE7RUFDSSwwQkFBQTtBQUdKOztBQURBO0VBQ0ksZUFBQTtBQUlKIiwiZmlsZSI6InJ1bGVzYWRkLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLnJ1bGUtaW5wdXQge1xyXG4gICAgd2lkdGg6IDc2JTtcclxuICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcclxufVxyXG4ucnVsZS10ZXh0LWJsb2NrIHtcclxuICAgIHdpZHRoOiAxNSU7XHJcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XHJcbiAgICBtYXJnaW4tcmlnaHQ6IDklO1xyXG4gICAgZm9udC1zaXplOiAxM3B4O1xyXG4gICAgZm9udC13ZWlnaHQ6IDUwMDtcclxufVxyXG4uYnRuLXByaW1hcnkge1xyXG4gICAgZm9udC1zaXplOiAxMnB4IWltcG9ydGFudDtcclxufVxyXG4udHJhc2hidG57XHJcbiAgICBmb250LXNpemU6IDEzcHg7XHJcbn0iXX0= */");

/***/ }),

/***/ "1Igz":
/*!**************************************************************************!*\
  !*** ./src/app/modules/dynamic-parameter/dynamic-parameter.component.ts ***!
  \**************************************************************************/
/*! exports provided: DynamicParameterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DynamicParameterComponent", function() { return DynamicParameterComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_dynamic_parameter_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./dynamic-parameter.component.html */ "26k2");
/* harmony import */ var _dynamic_parameter_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dynamic-parameter.component.scss */ "+8dm");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _modules_module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../modules/module.service */ "zTpG");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");








let DynamicParameterComponent = class DynamicParameterComponent {
    constructor(fb, moduleService, router, route, toastrService) {
        this.fb = fb;
        this.moduleService = moduleService;
        this.router = router;
        this.route = route;
        this.toastrService = toastrService;
        this.submitted = false;
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.addparaForm = this.fb.group({
            xyzcalltimespan: ['', ''],
            default_rule: ['', ''],
            abc_rule_expiration: ['', ''],
            sho_rel_period: ['', ''],
            long_rel_period: ['', ''],
            short_call_time_win: ['', ''],
            call_threshold: ['', ''],
        });
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        if (this.currentCompany.uuid) {
            this.moduleService.getDynParadata(this.currentCompany.uuid).subscribe(res => {
                for (let index = 0; index < res.length + 1; index++) {
                    // console.log(res[index]);
                    if (res[index]['label'] == 'XYZ Call Time Span') {
                        this.addparaForm.patchValue({
                            xyzcalltimespan: res[index]['value'],
                        });
                    }
                    if (res[index]['label'] == 'Default Rule') {
                        this.addparaForm.patchValue({
                            default_rule: res[index]['value'],
                        });
                    }
                    if (res[index]['label'] == 'ABC Rule Expiration') {
                        this.addparaForm.patchValue({
                            abc_rule_expiration: res[index]['value'],
                        });
                    }
                    if (res[index]['label'] == 'Shortlist Release Period') {
                        this.addparaForm.patchValue({
                            sho_rel_period: res[index]['value'],
                        });
                    }
                    if (res[index]['label'] == 'Longlist Release Period') {
                        this.addparaForm.patchValue({
                            long_rel_period: res[index]['value'],
                        });
                    }
                    if (res[index]['label'] == 'Shortlist Call Time Window') {
                        console.log(res[index]['value']);
                        this.addparaForm.patchValue({
                            short_call_time_win: res[index]['value'],
                        });
                    }
                    if (res[index]['label'] == 'Call Threshold') {
                        this.addparaForm.patchValue({
                            call_threshold: res[index]['value'],
                        });
                    }
                }
            });
        }
    }
    get f() { return this.addparaForm.controls; }
    onSubmit() {
        const formData = new FormData();
        if (this.addparaForm.invalid) {
            return;
        }
        this.submitted = true;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('call_threshold', this.addparaForm.get('call_threshold').value);
        const company_uuid = this.currentCompany.uuid;
        if (company_uuid) {
            this.moduleService.addDyPara(this.addparaForm.value, company_uuid).subscribe(res => {
                // console.log(res); return false;
                if (res.status == 'success') {
                    this.toastrService.success('Dynamic Parameter Saved Successfully');
                }
                else {
                    this.toastrService.success('Failed To Save! Please Try Again Later..');
                }
            }, error => this.error = error);
        }
    }
};
DynamicParameterComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"] },
    { type: _modules_module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["ActivatedRoute"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] }
];
DynamicParameterComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-dynamic-parameter',
        template: _raw_loader_dynamic_parameter_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_dynamic_parameter_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], DynamicParameterComponent);



/***/ }),

/***/ "1lbj":
/*!***************************************************************************************!*\
  !*** ./src/app/modules/publishers/publisher-settings/publisher-settings.component.ts ***!
  \***************************************************************************************/
/*! exports provided: PublisherSettingsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PublisherSettingsComponent", function() { return PublisherSettingsComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_publisher_settings_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./publisher-settings.component.html */ "V2oL");
/* harmony import */ var _publisher_settings_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./publisher-settings.component.scss */ "FQwQ");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../../../global */ "XrUY");











const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
let PublisherSettingsComponent = class PublisherSettingsComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.BaseUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_URL;
        this.ispubreg = true;
        this.tcenable = true;
        this.Submitted = false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.Companyuuid = this.currentCompany.uuid;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        this.publicregistration = true;
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.getAllpublisherssetting();
        this.addForm = this.fb.group({
            // , Validators.required
            user_uuid: [''],
            public_registration: [''],
            intro: [''],
            email: [''],
            terms_cond: [''],
            tc_url: [''],
        });
    }
    getAllpublisherssetting() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAllpublisherssetting(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            if (res['public_registration'] == 1) {
                this.publicregistration = true;
                this.ispubreg = true;
            }
            else {
                this.publicregistration = false;
                this.ispubreg = false;
            }
            if (res['terms_cond'] == 1) {
                this.terms_condstatus = true;
            }
            else {
                this.terms_condstatus = false;
            }
            if (res['tc_url'] != '') {
                this.terms_condurl = res['tc_url'];
            }
            else {
                this.terms_condurl = 'https://ringlabmedia.com/publisher-terms';
            }
            this.addForm.patchValue({
                intro: res['intro'],
                email: res['email'],
                tc_url: this.terms_condurl,
            });
        }, error => this.error = error);
    }
    pubreg_enable(event) {
        this.ispubreg = event.target.checked;
    }
    tc_enable(event) {
        this.tcenable = event.target.checked;
    }
    //Add Publisher
    get addformcontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('uuid', this.currentCompany.uuid);
        formData.append('public_registration', this.ispubreg);
        formData.append('intro', this.addForm.get('intro').value);
        formData.append('email', this.addForm.get('email').value);
        formData.append('terms_cond', this.tcenable);
        formData.append('tc_url', this.addForm.get('tc_url').value);
        // console.log(formData); return false;
        this.moduleservice.addPublisherSettingdata(formData).subscribe(res => {
            // console.log(res.status); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Publisher Setting Saved Successfully');
                this.getAllpublisherssetting();
                this.Submitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
};
PublisherSettingsComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
PublisherSettingsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-publisher-settings',
        template: _raw_loader_publisher_settings_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_publisher_settings_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], PublisherSettingsComponent);



/***/ }),

/***/ "1tHk":
/*!****************************************************!*\
  !*** ./src/app/modules/number/number.component.ts ***!
  \****************************************************/
/*! exports provided: NumberComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberComponent", function() { return NumberComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_number_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./number.component.html */ "Tjvc");
/* harmony import */ var _number_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number.component.scss */ "OJc4");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-csv/ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__);












const router = _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"];
class DataTablesResponse {
}
let NumberComponent = class NumberComponent {
    constructor(moduleservice, toastrService, router, handler) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.router = router;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.SiteUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.checkboxes = [];
        this.filter = [];
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadTargets();
    }
    loadTargets() {
        // console.log('ok');
        // return false;
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 50, 100, 500, 2000, 5000], ["All", 20, 50, 100, 500, 2000, 5000]],
            "order": [[1, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'gettargets/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                // {data:"checkall"},{data:"details"},
                { data: "name" }, { data: "subid" }, { data: "valtype" }, { data: "typeval" }, { data: "is_ringtree" }, { data: "created_at" }, { data: "active_status" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedNumbers(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Records Deleted Successfully.');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                        }, 2000);
                        this.loadTargets();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                }
            });
        }
    }
    Delete(id) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteNumber(id, currentUser.uuid).subscribe(res => {
                    this.loadTargets();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Record Deleted Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                }, 2000);
            }
        });
    }
    Clone(id) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to clone this target!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, clone it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.cloneNumber(id, currentUser.uuid).subscribe(res => {
                    this.filter = [res];
                    if (this.filter[0]['status'] == 'success') {
                        this.loadTargets();
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Success!', 'Target Clone Successfully.');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                        }, 2000);
                        this.router.navigate(['/edit-numbers/' + this.filter[0]['uuid']]);
                    }
                    else {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Error', 'Target Clone failed.');
                    }
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', '');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                }, 2000);
            }
        });
    }
    exportdata() {
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            // showTitle: true,
            // title: 'Your title',
            useBom: true,
            // noDownload: true,
            headers: ["Number", "FSL Rule Name", "Rule Set", "Note", "Associated abel", "Created At"]
        };
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getNumberForExport(this.currentCompany.uuid, "all").subscribe(res => {
            console.log(res);
            new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__["ngxCsv"](res, 'All Targets', options);
        }, error => this.error = error);
    }
    change_status(event, tagetUuid) {
        this.status = event.target.checked;
        let activestatus, activestring;
        if (this.status == true) {
            activestatus = 1;
            activestring = "Activate";
        }
        else {
            activestatus = 0;
            activestring = "De-activate";
        }
        // alert(activestatus); return
        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to ' + activestring + ' Target!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, ' + activestring + ' it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.changeTargetStatus(activestatus, currentUser.uuid, tagetUuid).subscribe(res => {
                    this.loadTargets();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Changed!', 'Target ' + activestring + ' Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                }, 2000);
                this.loadTargets();
                return;
            }
        });
    }
    closeref(i) {
        $(".appendedtbl_" + i).remove();
        $(".detailrow_" + i).removeClass('shown');
    }
    details(i, data) {
        var tr = $('details-control').closest('tr').eq(i);
        // var divClass = $(".detailrow_"+i).eq(0).attr('class'); 
        var divClass1 = $('#home_' + i).attr('class');
        // console.log(divClass1);
        // if (divClass.indexOf('shown') > -1) {
        if (divClass1 != undefined) {
            $(".appendedtbl_" + i).remove();
            $(".detailrow_" + i).removeClass('shown');
        }
        else {
            let currentUser = JSON.parse(localStorage.getItem('currentUser'));
            this.moduleservice.getTagetdetailsdata(data.uuid, currentUser.uuid).subscribe(res => {
                var SiteUrl = this.SiteUrl;
                var campaigns = '';
                var campaignsdata = '<div class="">' +
                    '<div class="mt-2 mb-2">' +
                    '<div class="row" style="border-bottom: 1px solid #403f3f;">' +
                    '<div class="col-md-2">' +
                    '<h6 style="font-size:13px;padding: 2px;">Target Reference</h6>' +
                    '</div>' +
                    '<div class="col-md-9"></div>' +
                    '<div class="col-md-1 text-right">' +
                    // '<button class="btn btn-sm btn-danger" onClick="closeref('+i+')">Close</button>'+
                    '</div>' +
                    '</div>' +
                    '</div>' +
                    '<table class="table  table-striped targetreferencetable">' +
                    '<tr style="background: #252d48!important;"><th>Type</th>' +
                    '<th>Name</th>' +
                    '<th>Reference</th></tr>';
                if (res.data.length > 0) {
                    for (let index = 0; index < res.data.length; index++) {
                        const data = res.data[index];
                        // var count = index+1;
                        campaignsdata += `<tr style="background:#1F263D!important">
                    <td>Campaign Routing</td>
                    <td><a class="expandlink" style="color:white;text-decoration:underline" target="_blank" href="${SiteUrl}edit-campaign/${data.uuid}">${data.name}</a></td>
                    <td>${data.uuid}</td>
                  </tr>`;
                        // '<div class="mb-2">'+
                        //   '<span class="text-job text-primary">Assigned Campaign - '+count+'</span>'+'</div>'+
                        //   '<div class="row">'+
                        //     '<div class="col-md-2">Campaign Name</div>'+
                        //     '<div class="col-md-3"><a class="expandlink" style="color:white;text-decoration:underline" target="_blank" href="'+SiteUrl+'/edit-campaign/'+data.uuid+'">'+data.name+'</a></div>'+
                        //   '</div>'+                           
                        //   '<div class="row">'+
                        //     '<div class="col-md-2">Country</div>'+
                        //     '<div class="col-md-3">'+
                        //     data.country+'</div>'+
                        //   '</div>'+                           
                    }
                }
                // else{
                //   campaignsdata +=`<tr>
                //   <td colspan="3">No Campaign Assigned</td>              
                // </tr>`;
                //   // campaignsdata +='<div class="activity">'+
                //   //               '<div class="activity-icon bg-blue text-white">'+
                //   //               '<i class="fas fa-info"></i>'+
                //   //             '</div>'+
                //   //             '<div class="activity-detail">'+
                //   //               '<div class="mb-2">'+
                //   //                 '<span class="text-job text-primary">No Campaign Assigned</span>'+'</div>'+                              
                //   //             '</div>'+
                //   //           '</div>';                        
                // }
                console.log(res.data1);
                if (res.data1.length > 0) {
                    for (let index = 0; index < res.data1.length; index++) {
                        const data1 = res.data1[index];
                        // var count = index+1;
                        campaignsdata += `<tr>
                    <td>IVR Routing</td>
                    <td><a class="expandlink" style="color:white;text-decoration:underline" target="_blank" href="${SiteUrl}edit-ivr/${data1.uuid}">${data1.name}</a></td>
                    <td>${data1.uuid}</td>
                  </tr>`;
                    }
                }
                if (res.data1.length == 0 && res.data.length == 0) {
                    campaignsdata += `<tr>
                <td colspan="3" class="text-center">This target does not have any references</td>              
              </tr>`;
                }
                campaignsdata += '</th>' +
                    '</div>';
                '</div>';
                // if(res.data1.length>0){
                //   for (let index = 0; index < res.data1.length; index++) {
                //     const data1 =  res.data1[index];
                //     var count = index+1;
                //     campaignsdata +='<div class="activity">'+
                //             '<div class="activity-icon bg-blue text-white">'+
                //             '<i class="fas fa-info"></i>'+
                //           '</div>'+
                //           '<div class="activity-detail">'+
                //             '<div class="mb-2">'+
                //               '<span class="text-job text-primary">Assigned IVR</span>'+'</div>'+
                //               '<div class="row">'+
                //                 '<div class="col-md-2">IVR Name</div>'+
                //                 '<div class="col-md-3"><a class="expandlink" style="color:white;text-decoration:underline" target="_blank" href="'+SiteUrl+'/edit-ivr/'+data1.uuid+'">'+data1.name+'</a></div>'+
                //               '</div>'+                                                    
                //           '</div>'+
                //         '</div>';
                //   }
                //   }else{
                //     campaignsdata +='<div class="activity">'+
                //                   '<div class="activity-icon bg-blue text-white">'+
                //                   '<i class="fas fa-info"></i>'+
                //                 '</div>'+
                //                 '<div class="activity-detail">'+
                //                   '<div class="mb-2">'+
                //                     '<span class="text-job text-primary">No IVR Assigned</span>'+'</div>'+                              
                //                 '</div>'+
                //               '</div>';
                //   }
                campaignsdata += '</th>' +
                    '</div>';
                '</div>';
                campaigns += campaigns.concat(campaignsdata);
                // console.log(campaigns);            
                $(".detailrow_" + i).after('<div class="appendedtbl_' + i + '">' +
                    // '<ul class="nav nav-tabs expandtabs">'+
                    //   '<li id="eventtgl" style="padding: 6px 6px 0px 5px;border-radius: 3px;border: 1px solid #747e9a;margin-right: 2px;    margin-bottom: 3px;" class="active"><a class="active" data-toggle="tab" href="#home_'+i+'">Event</a></li>'+
                    // '<li style="padding: 6px 6px 0px 5px;border-radius: 3px;border: 1px solid #747e9a;margin-right: 2px;    margin-bottom: 3px;"><a  data-toggle="tab" href="#menu_'+i+'">Record</a></li>'+
                    // '<li style="padding: 6px 6px 0px 5px;border-radius: 3px;border: 1px solid #747e9a;margin-right: 2px;    margin-bottom: 3px;"><a data-toggle="tab" href="#tag_'+i+'">Tag</a></li>'+
                    // '</ul>'+
                    '<div class="tab-content">' +
                    '<div id="home_' + i + '" class="tab-pane fade in active show">' +
                    '<section class="section" style="width: 0px;">' +
                    '<div class="section-body">' +
                    '<div class="activities1" style="display: block;width: 1553px!important;">' +
                    // '<div class="activity">'+
                    //   '<div class="activity-icon bg-blue text-white">'+
                    //     '<i class="fas fa-info"></i>'+
                    //   '</div>'+
                    //   '<div class="activity-detail">'+
                    //     '<div class="mb-2">'+
                    //       '<span class="text-job text-primary">Assigned Campaigns</span>'+'</div>'+
                    //       '<div class="row">'+
                    //         '<div class="col-md-1">Campaign Name</div>'+
                    //         '<div class="col-md-3">'+name+'</div>'+
                    //       '</div>'+                           
                    //       '<div class="row">'+
                    //         '<div class="col-md-1">Country</div>'+
                    //         '<div class="col-md-3">'+
                    //         country+'</div>'+
                    //       '</div>'+                           
                    //   '</div>'+
                    // '</div>'+
                    campaigns +
                    '</span>' +
                    '</div>' +
                    '</section> ' +
                    '</div>' +
                    '</div>' +
                    '</div>');
                tr.addClass('shown');
            }, error => this.error = error);
        }
    }
};
NumberComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_3__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpBackend"] }
];
NumberComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
NumberComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-number',
        template: _raw_loader_number_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_number_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], NumberComponent);



/***/ }),

/***/ "26k2":
/*!******************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/dynamic-parameter/dynamic-parameter.component.html ***!
  \******************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n<div class=\"main-content\">\r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12 col-md-12 col-lg-12\">\r\n                <form [formGroup]=\"addparaForm\" (ngSubmit)=\"onSubmit()\">\r\n                <div class=\"card\">\r\n                  <div class=\"card-header\">\r\n                    <h4>Dynamic Forwarding Parameters</h4>\r\n                  </div>\r\n                  <div class=\"card-body\">                    \r\n                    <div class=\"form-group\">\r\n                      <label>XYZ Call Time Span</label>\r\n                      <input type=\"text\" formControlName=\"xyzcalltimespan\" class=\"form-control\" >\r\n                      </div>\r\n\r\n                    <div class=\"form-group\">\r\n                            <label>Default Rule</label>\r\n                            <input type=\"text\" formControlName=\"default_rule\" class=\"form-control\">\r\n                    </div>\r\n\r\n                    <div class=\"form-group\">\r\n                            <label>ABC Rule Expiration</label>\r\n                            <input type=\"text\" formControlName=\"abc_rule_expiration\" class=\"form-control\">\r\n                    </div>\r\n\r\n                    <div class=\"form-group\">\r\n                            <label>Shortlist Release Period</label>\r\n                            <input type=\"text\" formControlName=\"sho_rel_period\" class=\"form-control\">\r\n                    </div>\r\n                    <div class=\"form-group\">\r\n                            <label>Longlist Release Period</label>\r\n                            <input type=\"text\" formControlName=\"long_rel_period\" class=\"form-control\">\r\n                    </div>\r\n                    <div class=\"form-group\">\r\n                            <label>Shortlist Call Time Window</label>\r\n                            <input type=\"text\" formControlName=\"short_call_time_win\" class=\"form-control\">\r\n                    </div>\r\n                    <div class=\"form-group\">\r\n                            <label>Call Threshold</label>\r\n                            <input type=\"text\" formControlName=\"call_threshold\" class=\"form-control\">\r\n                    </div>\r\n                  </div>\r\n                  <div class=\"card-footer text-right\">\r\n                     <button  class=\"btn btn-primary mr-1\" type=\"submit\"><i class=\"fa fa-save\"></i> Save Parameters</button>\r\n                 </div>\r\n                </div>\r\n              </form>\r\n \r\n    </div>\r\n \r\n ");

/***/ }),

/***/ "27PW":
/*!**********************************************************!*\
  !*** ./src/app/modules/campaigns/campaigns.component.ts ***!
  \**********************************************************/
/*! exports provided: CampaignsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CampaignsComponent", function() { return CampaignsComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_campaigns_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./campaigns.component.html */ "6UsO");
/* harmony import */ var _campaigns_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./campaigns.component.scss */ "M/dJ");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rxjs */ "qCKp");
/* harmony import */ var ngx_ui_loader__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ngx-ui-loader */ "gren");














const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let CampaignsComponent = class CampaignsComponent {
    constructor(moduleservice, toastrService, handler, fb, changedetect, ngxLoader) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.changedetect = changedetect;
        this.ngxLoader = ngxLoader;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_12__["Subject"]();
        this.ischecked = '1';
        // loadpublishers(){
        //       // console.log('ok');
        //       // return false;
        //         if ($.fn.DataTable.isDataTable(this.table.nativeElement) ) {
        //           $(this.table.nativeElement).dataTable().fnDestroy();
        //         }    
        //        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        //        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        //       //  console.log(currentUser); return
        //        this.dtOptions = {
        //           "pagingType": 'full_numbers',
        //           "processing": true,
        //           "serverSide": true,          
        //           "pageLength": 20,            
        //           "order": [[ 0, "asc" ]],
        //           ajax: (dataTablesParameters: any, callback) => {
        //             this.http.post<DataTablesResponse>(
        //               this.ServerUrl+'getCampaign/'+this.currentCompany.uuid +'/'+ currentUser.timezone,
        //               dataTablesParameters, {}
        //             ).subscribe(resp => {
        //                       this.numbers = resp.data;   
        //                       callback({
        //                           recordsTotal: resp.recordsTotal,
        //                           recordsFiltered: resp.recordsFiltered,
        //                           data: [],
        //                       });
        //                   });
        //           },
        //           columns: [
        //             {data:"name"},{data:"country"},{data:"status"},{data:"is_recording"},{data:"created_at"},{data:"action"},
        //           ],
        //           columnDefs: [
        //             { 
        //                 "targets": [0], 
        //                 "orderable": false,
        //             },
        //             ],
        //       };
        //     this.dataTable = $(this.table.nativeElement);
        //     this.dataTable.dataTable(this.dtOptions);
        // }
        this.settingToggleAccessToRecordingsvaldata = 0;
        this.settingToggleBlockCallsIfCappeddata = 0;
        this.checkboxes = [];
        this.settingToggleBlockCallsIfCappededit = 0;
        this.settingToggleAccessToRecordingsedit = 0;
        this.Submitted = false;
        this.editSubmitted = false;
        this.payoutdata = [];
        this.conf = "";
        this.isoffer = false;
        this.isrevshareper = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
    }
    ngOnDestroy() {
        this.dtTrigger.unsubscribe();
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadpublishers();
        // this.loadNumbers();
        this.addForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            sub_id: [''],
            number_creation: [''],
            settingToggleBlockCallsIfCapped: [''],
            settingToggleAccessToRecordings: [''],
        });
        this.editForm = this.fb.group({
            uuid: [''],
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            sub_id: [''],
            number_creation: [''],
            settingToggleBlockCallsIfCapped: [''],
            settingToggleAccessToRecordings: [''],
        });
    }
    ngAfterViewInit() {
        this.changedetect.detectChanges();
    }
    // numberdata:any;
    // loadNumbers(){
    //   this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
    //   this.moduleservice.loadNumbersfordropdown(this.currentCompany.uuid).subscribe(
    //     res => {
    //       this.numberdata= res
    //       },
    //       error => this.error = error
    //   );
    // }
    loadpublishers() {
        $("#campaigntbl").dataTable().fnDestroy();
        this.ngxLoader.startLoader('loader-03');
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.http.post(this.ServerUrl + 'getCampaign/' + this.currentCompany.uuid + '/' + currentUser.timezone, { role: currentUser.role, uuid: currentUser.uuid }).subscribe(resp => {
            // console.log(resp);                    
            this.numbers = resp.data;
            this.dtTrigger.next();
            this.ngxLoader.stopLoader('loader-03');
        }, error => this.error = error);
    }
    editdata(uuid, name, sub_id, create_number, settingToggleBlockCallsIfCapped, settingToggleAccessToRecordings) {
        this.settingToggleAccessToRecordingsvaldata = settingToggleAccessToRecordings;
        this.settingToggleBlockCallsIfCappeddata = settingToggleBlockCallsIfCapped;
        this.editForm.patchValue({
            uuid: uuid,
            name: name,
            sub_id: sub_id,
            number_creation: create_number,
            settingToggleBlockCallsIfCapped: settingToggleBlockCallsIfCapped,
            settingToggleAccessToRecordings: settingToggleAccessToRecordings,
        });
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    // onDeleteSubmit(){    
    //   if(this.checkboxes.length==0){
    //     this.toastrService.error('Please Select Row To Delete');
    //   }else{
    //     // console.log(this.checkboxes);  
    //     Swal.fire({
    //       title: 'Are you sure?',
    //       text: 'You want to Delete Selected Record!',
    //       type: 'warning',
    //       showCancelButton: true,
    //       confirmButtonText: 'Yes, delete it!',
    //       cancelButtonText: 'No, keep it'
    //     }).then((result) => {
    //       if (result.value) {
    //         this.moduleservice.deleteSelectedNumbers(this.checkboxes).subscribe(
    //           res => {
    //               Swal.fire(
    //                 'Deleted!',
    //                 'Records Deleted Successfully.',
    //                 'success',                
    //               )
    //               setTimeout(() => {
    //                 Swal.close()
    //               }, 2000);
    //               this.loadpublishers();
    //             },
    //             error => this.error = error
    //         );      
    //       } else if (result.dismiss === Swal.DismissReason.cancel) {
    //         Swal.fire(
    //           'Cancelled',
    //           'Your Record is safe :)',
    //           'error'
    //         )
    //         setTimeout(() => {
    //           Swal.close()
    //         }, 2000);
    //       }
    //     });
    //   }
    // }
    Delete(id) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.deleteCampaign(+id).subscribe(res => {
                    // console.log(res);return false;
                    this.loadpublishers();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    settingToggleBlockCallsIfCappedval(val) {
        this.addForm.get('settingToggleBlockCallsIfCapped').setValue(val);
    }
    settingToggleAccessToRecordingsval(val) {
        this.addForm.get('settingToggleAccessToRecordings').setValue(val);
    }
    settingToggleBlockCallsIfCappedvaledit(val) {
        this.settingToggleBlockCallsIfCappededit = val;
        this.editForm.get('settingToggleBlockCallsIfCapped').setValue(val);
    }
    settingToggleAccessToRecordingsvaledit(val) {
        this.settingToggleAccessToRecordingsedit = val;
        this.editForm.get('settingToggleAccessToRecordings').setValue(val);
    }
    //Add Publisher
    get addformcontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('name', this.addForm.get('name').value);
        formData.append('sub_id', this.addForm.get('sub_id').value);
        formData.append('number_creation', this.addForm.get('number_creation').value);
        formData.append('settingToggleBlockCallsIfCapped', this.addForm.get('settingToggleBlockCallsIfCapped').value);
        formData.append('settingToggleAccessToRecordings', this.addForm.get('settingToggleAccessToRecordings').value);
        // console.log(formData); return false;
        this.moduleservice.addPublisher(formData).subscribe(res => {
            // console.log(res.status); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Publisher Added Successfully');
                this.loadpublishers();
                this.Submitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    //Add Buyer
    get editFormcontrol() { return this.editForm.controls; }
    onEditSubmit() {
        // alert('ok');return false;
        const formData = new FormData();
        this.editSubmitted = true;
        if (this.editForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('uuid', this.editForm.get('uuid').value);
        formData.append('name', this.editForm.get('name').value);
        formData.append('sub_id', this.editForm.get('sub_id').value);
        formData.append('number_creation', this.editForm.get('number_creation').value);
        formData.append('settingToggleBlockCallsIfCapped', this.editForm.get('settingToggleBlockCallsIfCapped').value);
        formData.append('settingToggleAccessToRecordings', this.editForm.get('settingToggleAccessToRecordings').value);
        // console.log(formData); 
        this.moduleservice.editPublisher(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Publisher Updated Successfully');
                this.loadpublishers();
                this.editSubmitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (this.addForm.get('name').value != '') {
            $("#addLabels").modal("hide");
            // $(".custom-switch-input").prop('checked',false);
            this.Submitted = false;
            setTimeout(() => { this.addForm.reset(); }, 2000);
        }
    }
    closeEditModal() {
        if (this.editForm.get('name').value != '') {
            $("#editLabels").modal("hide");
            this.editSubmitted = false;
            setTimeout(() => { this.editForm.reset(); }, 2000);
        }
    }
    Status(id, status) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to change Status!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, Change it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.changeCampaignstatus(id, status).subscribe(res => {
                    this.loadpublishers();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Changed!', 'Status Changes Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    applyoffer(conf, payoutdata, details, campaign, offer_apply_status) {
        this.offerdetails = details;
        this.offer_apply_status = offer_apply_status;
        this.campaign = campaign;
        this.payoutdata = payoutdata;
        this.conf = conf;
        // console.log(conf);
    }
    isofferpayout() {
        this.isoffer = !this.isoffer;
    }
    isrevsharepertg() {
        this.isrevshareper = !this.isrevshareper;
    }
    offer_hide(uuid, status) {
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        $("#addpublisher").modal("hide");
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            text: 'Are you sure you want to hide offer?',
            showCancelButton: true,
            confirmButtonText: "Apply",
            cancelButtonText: 'Cancel'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.hideoffer(uuid, currentUser.uuid, status).subscribe(res => {
                    // console.log(res);return false;
                    this.loadpublishers();
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Success!', 'Offer hide Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    apply_offer() {
        const formData = new FormData();
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('apply_message', this.apply_message);
        formData.append('offerdetails', JSON.stringify(this.offerdetails));
        this.moduleservice.apply_offer(formData).subscribe(res => {
            // console.log(res);return false;
            $('#offer_apply').modal('hide');
            this.loadpublishers();
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
                title: 'Success!',
                text: 'Offer applied Successfully.',
            });
            setTimeout(() => {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
            }, 2000);
            // this.loadparticipationrequest(this.uuid);
        }, error => this.error = error);
    }
};
CampaignsComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ChangeDetectorRef"] },
    { type: ngx_ui_loader__WEBPACK_IMPORTED_MODULE_13__["NgxUiLoaderService"] }
];
CampaignsComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewChild"], args: ['dataTable', { static: true },] }]
};
CampaignsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-campaigns',
        template: _raw_loader_campaigns_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_campaigns_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], CampaignsComponent);



/***/ }),

/***/ "2QNl":
/*!********************************************************!*\
  !*** ./src/app/modules/numbers/numbers.component.scss ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("input#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n\ntable.dataTable img {\n  border: 1px solid #ffffff !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFxudW1iZXJzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0ksYUFBQTtBQUNKOztBQUNBO0VBQ0ksWUFBQTtBQUVKOztBQU9BO0VBQ0ksb0NBQUE7QUFKSiIsImZpbGUiOiJudW1iZXJzLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiaW5wdXQjb3B0aW9uMSwgaW5wdXQjb3B0aW9uMiwgaW5wdXQjb3B0aW9uM3tcclxuICAgIGRpc3BsYXk6IG5vbmU7XHJcbn0gICAgXHJcbi5idG4tZ3JvdXAuZm9ybS1jb250cm9sIHtcclxuICAgIGhlaWdodDogNjBweDtcclxufVxyXG5cclxuLy8gLmRyb3Bkb3duLWxpc3Qge1xyXG4vLyAgICAgcG9zaXRpb246IGFic29sdXRlIWltcG9ydGFudDtcclxuLy8gICAgIHBhZGRpbmctdG9wOiAxNHB4O1xyXG4vLyAgICAgd2lkdGg6IDEwMCU7XHJcbi8vICAgICB6LWluZGV4OiA5OTk5OTtcclxuLy8gfVxyXG50YWJsZS5kYXRhVGFibGUgaW1nIHtcclxuICAgIGJvcmRlcjogMXB4IHNvbGlkICNmZmZmZmYhaW1wb3J0YW50OyBcclxufSJdfQ== */");

/***/ }),

/***/ "2Qyi":
/*!**************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/changelog/changelog.component.html ***!
  \**************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <h4>Change Logs</h4></div>\r\n                    </div>\r\n                    <div class=\"col-9 text-right mt-2\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                          <!-- <button routerLink=\"/add-target\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-plus\"></i> New Target\r\n                          </button>\r\n                          <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Delete Selected\r\n                          </button>                          -->\r\n                          \r\n                          </div>                       \r\n                    </div>\r\n              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                    <thead>\r\n                      <tr>\r\n                        <!-- <th style=\"padding: 10px;width: 1px;\">\r\n                            <div class=\"custom-control custom-checkbox\" *ngIf=\"numbers?.length != 0\">\r\n                            <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                            <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                            </div>\r\n                        </th> -->\r\n                        <th>User</th>\r\n                        <th>Module Name</th>\r\n                        <th>Operation Type</th>\r\n                        <th>Description</th>\r\n                        <th>Log Date</th>\r\n                        <!-- <th>Action</th>                     -->\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let data of numbers\">\r\n                            <!-- <td>\r\n                                <div class=\"custom-control custom-checkbox\">\r\n                                <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{data.uuid}}\"  [checked]=\"data.selected\" [value]=\"data.id\" >\r\n                                <label class=\"custom-control-label\" for=\"customCheck_{{data.uuid}}\"></label>\r\n                                </div>                                \r\n                            </td> -->\r\n                            <td>{{ data.user }}</td>\r\n                            <td>{{ data.modulename }}</td>\r\n                            <td>{{ data.operation_type }}</td>\r\n                            <td>{{ data.description_string }}</td>\r\n                            <td>{{ data.created_at }}</td>\r\n                            <!-- <td><a routerLink=\"/edit-numbers/{{ data.uuid }}\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;<button (click)=\"Delete((data.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td> -->\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"9\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>");

/***/ }),

/***/ "2msN":
/*!***************************************************************************!*\
  !*** ./src/app/modules/settings/manage-users/manage-users.component.scss ***!
  \***************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJtYW5hZ2UtdXNlcnMuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "34H9":
/*!*********************************************************************!*\
  !*** ./src/app/auth/login-componunt/login-componunt.component.scss ***!
  \*********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {\n  .login {\n    width: 101% !important;\n  }\n}\n@media only screen and (min-device-width: 480px) and (max-device-width: 1400px) {\n  .login {\n    margin-left: 0px !important;\n    width: 101% !important;\n  }\n\n  .card .card-header {\n    padding: 12px 0px 0px 73px;\n  }\n}\n@media only screen and (min-device-width: 1400px) and (max-device-width: 2200px) {\n  .login {\n    width: 101% !important;\n    min-height: 558px !important;\n    padding-top: 100px !important;\n  }\n\n  .card .card-header {\n    padding: 9px 0px 0px 66px;\n  }\n}\n.card.card-primary.logincard {\n  background: #0d1735 !important;\n}\nfooter.footer {\n  background: #1F263D;\n  color: white;\n  border-top: 1px solid #535660;\n}\n.fas, .far, .fab, .fal {\n  font-size: 20px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFxsb2dpbi1jb21wb251bnQuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFJSTtJQUlJLHNCQUFBO0VBTE47QUFDRjtBQVFBO0VBR0s7SUFHRywyQkFBQTtJQUNBLHNCQUFBO0VBVk47O0VBWUU7SUFDSSwwQkFBQTtFQVROO0FBQ0Y7QUFXQTtFQUlJO0lBR0ksc0JBQUE7SUFDQSw0QkFBQTtJQUNBLDZCQUFBO0VBZE47O0VBbUJFO0lBQ0kseUJBQUE7RUFoQk47QUFDRjtBQW1CQTtFQUNJLDhCQUFBO0FBakJKO0FBc0JBO0VBRUksbUJBQUE7RUFDQSxZQUFBO0VBRUEsNkJBQUE7QUFyQko7QUF1QkE7RUFDSSxlQUFBO0FBcEJKIiwiZmlsZSI6ImxvZ2luLWNvbXBvbnVudC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIkBtZWRpYSBvbmx5IHNjcmVlbiBcclxuICBhbmQgKG1pbi1kZXZpY2Utd2lkdGg6IDMyMHB4KSBcclxuICBhbmQgKG1heC1kZXZpY2Utd2lkdGg6IDQ4MHB4KVxyXG4gIGFuZCAoLXdlYmtpdC1taW4tZGV2aWNlLXBpeGVsLXJhdGlvOiAyKSB7XHJcbiAgICAubG9naW57XHJcbiAgICAgICAgLy8gcGFkZGluZy10b3A6IDkzcHg7XHJcbiAgICAgICAgLy8gcGFkZGluZy1ib3R0b206IDE0MHB4O1xyXG4gICAgICAgIC8vIHBhZGRpbmctcmlnaHQ6IDE1NXB4O1xyXG4gICAgICAgIHdpZHRoOiAxMDElIWltcG9ydGFudDtcclxuICAgIH1cclxufVxyXG5cclxuQG1lZGlhIG9ubHkgc2NyZWVuIFxyXG4gIGFuZCAobWluLWRldmljZS13aWR0aDogNDgwcHgpIFxyXG4gIGFuZCAobWF4LWRldmljZS13aWR0aDogMTQwMHB4KVxyXG4geyAgIC5sb2dpbntcclxuICAgICAgICAvLyBwYWRkaW5nLXRvcDogMTUwcHg7XHJcbiAgICAgICAgLy8gcGFkZGluZy1ib3R0b206IDEzMHB4O1xyXG4gICAgICAgIG1hcmdpbi1sZWZ0OiAwcHghaW1wb3J0YW50O1xyXG4gICAgICAgIHdpZHRoOiAxMDElIWltcG9ydGFudDtcclxuICAgIH1cclxuICAgIC5jYXJkIC5jYXJkLWhlYWRlciB7XHJcbiAgICAgICAgcGFkZGluZzogMTJweCAwcHggMHB4IDczcHg7XHJcbiAgICB9XHJcbn1cclxuQG1lZGlhIG9ubHkgc2NyZWVuIFxyXG4gIGFuZCAobWluLWRldmljZS13aWR0aDogMTQwMHB4KSBcclxuICBhbmQgKG1heC1kZXZpY2Utd2lkdGg6IDIyMDBweClcclxuICB7XHJcbiAgICAubG9naW57XHJcbiAgICAgICAgLy8gcGFkZGluZy10b3A6IDEyN3B4IWltcG9ydGFudDtcclxuICAgICAgICAvLyBwYWRkaW5nLWJvdHRvbTogMzQwcHghaW1wb3J0YW50O1xyXG4gICAgICAgIHdpZHRoOiAxMDElICFpbXBvcnRhbnQ7XHJcbiAgICAgICAgbWluLWhlaWdodDogNTU4cHghaW1wb3J0YW50O1xyXG4gICAgICAgIHBhZGRpbmctdG9wOiAxMDBweCFpbXBvcnRhbnQ7ICAgICAgICAgICAgICAgIFxyXG4gICAgfVxyXG4gICAgLy8gLmxvZ2luY29se1xyXG4gICAgLy8gICAgIG1hcmdpbi1sZWZ0OiA0MHB4IWltcG9ydGFudDtcclxuICAgIC8vIH1cclxuICAgIC5jYXJkIC5jYXJkLWhlYWRlciB7XHJcbiAgICAgICAgcGFkZGluZzogOXB4IDBweCAwcHggNjZweFxyXG4gICAgfVxyXG59XHJcblxyXG4uY2FyZC5jYXJkLXByaW1hcnkubG9naW5jYXJkIHtcclxuICAgIGJhY2tncm91bmQ6ICMwZDE3MzUhaW1wb3J0YW50O1xyXG59XHJcblxyXG4vL2xhcmdlXHJcblxyXG5mb290ZXIuZm9vdGVyIHtcclxuICAgIC8vIGJhY2tncm91bmQ6ICMyMjIzNWY7XHJcbiAgICBiYWNrZ3JvdW5kOiAjMUYyNjNEO1xyXG4gICAgY29sb3I6IHdoaXRlO1xyXG4gICAgLy8gYm9yZGVyLXRvcDogMXB4IHNvbGlkICM0NjNjOTU7XHJcbiAgICBib3JkZXItdG9wOiAxcHggc29saWQgIzUzNTY2MDtcclxufVxyXG4uZmFzLCAuZmFyLCAuZmFiLCAuZmFsIHtcclxuICAgIGZvbnQtc2l6ZTogMjBweDtcclxufSJdfQ== */");

/***/ }),

/***/ "3FVy":
/*!********************************************!*\
  !*** ./src/app/sidebar/sidebar.service.ts ***!
  \********************************************/
/*! exports provided: SidebarService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SidebarService", function() { return SidebarService; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ "qCKp");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "kU1M");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! .././global */ "XrUY");






let SidebarService = class SidebarService {
    constructor(handler) {
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_5__["GlobalVariable"].BASE_API_URL;
        this.httpOptions = {
            headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpHeaders"]({ 'Content-Type': 'application/json' })
        };
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"](handler);
    }
    getMenu(role) {
        return this.http.get(this.ServerUrl + 'getmenu/' + role).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    handleError(error) {
        if (error.error instanceof ErrorEvent) {
            console.error('An error occurred:', error.error.message);
        }
        else {
            console.error(`Backend returned code ${error.status}, ` + `body was: ${error.error}`);
        }
        this.errorData = {
            errorTitle: 'Oops! Request for document failed',
            errorDesc: 'Something bad happened. Please try again later.'
        };
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["throwError"])(this.errorData);
    }
};
SidebarService.ctorParameters = () => [
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpBackend"] }
];
SidebarService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
        providedIn: 'root'
    })
], SidebarService);



/***/ }),

/***/ "47Jg":
/*!**********************************************!*\
  !*** ./src/app/sidebar/sidebar.component.ts ***!
  \**********************************************/
/*! exports provided: SidebarComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SidebarComponent", function() { return SidebarComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_sidebar_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./sidebar.component.html */ "zvoc");
/* harmony import */ var _sidebar_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sidebar.component.scss */ "UaI1");
/* harmony import */ var _sidebar_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sidebar.service */ "3FVy");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _modules_module_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modules/module.service */ "zTpG");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../global */ "XrUY");








let SidebarComponent = class SidebarComponent {
    constructor(route, sidebarservice, moduleservice, router) {
        this.route = route;
        this.sidebarservice = sidebarservice;
        this.moduleservice = moduleservice;
        this.router = router;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_7__["GlobalVariable"].BASE_URL;
        this.role = "";
        // subscribe to sender component messages
        this.subscriptionName = this.moduleservice.getUpdate().subscribe(message => {
            if (message.text == 1) {
                this.ngOnInit();
            }
        });
        this.routerurl = window.location.href.replace(this.ServerUrl, "");
    }
    ngOnDestroy() {
        this.subscriptionName.unsubscribe();
    }
    ngOnInit() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentUser'));
        // console.log(this.currentCompany); return
        if (this.currentCompany == null) {
            return;
        }
        var loggedinuser = JSON.parse(localStorage.getItem('currentUser'));
        var loggedincompany = JSON.parse(localStorage.getItem('currentCompany'));
        // console.log(loggedinuser.role)
        if (loggedinuser != null) {
            this.role = loggedinuser.role;
            if (loggedinuser) {
                this.firstName = loggedinuser.first_name;
                this.lastName = loggedinuser.last_name;
                this.companyName = loggedincompany.name;
            }
            const allParams = this.route.snapshot.params; // allParams is an object
            const param1 = allParams.param1; // retrieve the parameter "param1"
            // this.sidebarservice.getMenu().subscribe((data)=>{
            // console.log(loggedinuser);      
            // },    
            //   error => this.error = error
            // );
            //   (Menu: any) => {
            //     // console.log(Menu)
            //     // location.reload()
            // }, 
            // (error: any) => {
            //     // console.log(error)
            // } 
        }
        this.getAllbasicsetting();
        this.getAllsavedreport();
        this.getmenu(loggedinuser.role);
        // console.log(this.routerurl)
    }
    getmenu(role) {
        this.sidebarservice.getMenu(role).subscribe((data) => this.menu = data, error => this.error = error);
    }
    getAllbasicsetting() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentUser'));
        this.moduleservice.getAllbasicsetting(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            this.google_sheet_link = res['google_sheet_link'];
        }, error => this.error = error);
    }
    getAllsavedreport() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAllsavedreport(this.currentCompany.uuid).subscribe(res => {
            this.allsavedreports = res;
            //  console.log(res); return false;  
            // this.google_sheet_link = res['google_sheet_link'];
        }, error => this.error = error);
    }
    showSubmenu(id) {
        if (id == 0) {
            // if($(".target-item").hasClass("show")){
            //   $('.target-item').removeClass("show"); 
            // }      
            $('.target-item').fadeToggle("show");
        }
        if (id == 1) {
            // $('.report-item').removeClass("show");      
            $('.report-item').fadeToggle("show");
        }
        if (id == 2) {
            // $('.report-item').removeClass("show");      
            $('.blocklist-item').fadeToggle("show");
        }
        if (id == 3) {
            // $('.report-item').removeClass("show");      
            $('.numbers-item').fadeToggle("show");
        }
        if (id == 4) {
            // $('.report-item').removeClass("show");      
            $('.settings-item').fadeToggle("show");
        }
        if (id == 5) {
            // $('.report-item').removeClass("show");      
            $('.ivr-item').fadeToggle("show");
        }
    }
};
SidebarComponent.ctorParameters = () => [
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_5__["ActivatedRoute"] },
    { type: _sidebar_service__WEBPACK_IMPORTED_MODULE_3__["SidebarService"] },
    { type: _modules_module_service__WEBPACK_IMPORTED_MODULE_6__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_5__["Router"] }
];
SidebarComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-sidebar',
        template: _raw_loader_sidebar_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_sidebar_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], SidebarComponent);



/***/ }),

/***/ "4REg":
/*!***********************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/publishers/thankyou/thankyou.component.html ***!
  \***********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"mt-5\">\n    <div class=\"container\" >\n      <div class=\"row text-center\">\n        <div class=\"col-md-12 mt-5\">\n          <img alt=\"image\" width=\"250px\" src=\"./assets/img/logo.png\" class=\"header-logo mb-5  mt-5 mb-0\">\n          <h6 class=\"text-white\">Thank you for Publisher Registration, Please check your mail.</h6>\n          <h6 class=\"text-white\">Visit dialdigit.com to learn more about Dialdigits</h6>\n          <div class=\"mt-5\">\n            <h6><a [routerLink]=\"'/publisher-registration/'+company\" routerLinkActive=\"router-link-active\" class=\"btn btn-primary\" >Back to Publisher Registration</a></h6>\n          </div>\n        </div>\n      </div>\n  \n    </div>\n  </div>");

/***/ }),

/***/ "4ZxZ":
/*!**********************************************************************************!*\
  !*** ./src/app/page-not-found-component/page-not-found-component.component.scss ***!
  \**********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJwYWdlLW5vdC1mb3VuZC1jb21wb25lbnQuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "5B5M":
/*!*************************************************************************************!*\
  !*** ./src/app/modules/publishers/advertiser-terms/advertiser-terms.component.scss ***!
  \*************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJhZHZlcnRpc2VyLXRlcm1zLmNvbXBvbmVudC5zY3NzIn0= */");

/***/ }),

/***/ "6A3S":
/*!**************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/sms/sms.component.html ***!
  \**************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n      <div class=\"main-content\">  \r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                  <div class=\"row\" style=\"margin-top: 20px;\r\n                  \">\r\n                      <div class=\"col-9\">\r\n                          <div class=\"card-header\">\r\n                          <h4>SMS Logs</h4></div>\r\n                      </div>\r\n                      <div class=\"col-3 text-right mt-2\">\r\n                         <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                          <button (click)=\"exportdata()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Export\r\n                          </button>                     \r\n                            </div>                       \r\n                      </div>\r\n                \r\n                  </div> \r\n                  <form  (ngSubmit)=\"loadcalls()\">\r\n                  <div class=\"row\" style=\"margin-top: 10px;margin-left: 11px;\" > \r\n                  <div class=\"col-3\">\r\n                    <input type=\"text\" [(ngModel)]=\"sms\" [ngModelOptions]=\"{standalone: true}\" class=\"form-control\" placeholder=\"Search SMS\" >                   \r\n                  </div>                  \r\n                  <div class=\"col-8\">\r\n                    <input type=\"text\"\r\n                    ngxDaterangepickerMd\r\n                    [(ngModel)]=\"selected\" [ngModelOptions]=\"{standalone: true}\"\r\n                    [showCustomRangeLabel]=\"true\"\r\n                    [alwaysShowCalendars]=\"alwaysShowCalendars\"\r\n                    [ranges]=\"ranges\"                \r\n                    [showCancel]=\"true\"\r\n                    [linkedCalendars]=\"true\"\r\n                    [locale]=\"{applyLabel: 'Done'}\"                \r\n                    [keepCalendarOpeningWithRange]=\"keepCalendarOpeningWithRange\"\r\n                    [showRangeLabelOnInput]=\"showRangeLabelOnInput\"\r\n                    class=\"form-control\"\r\n                    placeholder=\"Select please...\"/>\r\n                  </div>\r\n                  \r\n                  <div class=\"col-1\" style=\"margin-left: -22px;\">\r\n                    <button type=\"submit\" class=\"btn btn-success btn-lg\"><i class=\"fas fa-search\"></i></button>\r\n                  </div>\r\n                </div>\r\n                </form>         \r\n    \r\n                  <div class=\"card-body\">\r\n                    <div class=\"table-responsive\">\r\n                    <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                        <thead>\r\n                          <tr>\r\n                            <th>From</th>\r\n                            <th>To</th>\r\n                            <th>Time</th>\r\n                            <th>Message</th>\r\n                            <th>Source Network</th>\r\n                            <th>Date Received</th>\r\n                          </tr>\r\n                        </thead>\r\n                        <tbody *ngIf=\"smses?.length != 0\">\r\n                            <tr *ngFor=\"let data of smses\">\r\n                                <td>{{ data.sms_from }}</td>\r\n                                <td>{{ data.sms_to }}</td>\r\n                                <td>{{ data.time }}</td>\r\n                                <td>{{ data.message }}</td>\r\n                                <td>{{ data.source_network }}</td>\r\n                                <td>{{ data.date_received }}</td>                                \r\n                            </tr>\r\n                        </tbody>\r\n                        <tbody *ngIf=\"smses?.length == 0\">\r\n                          <tr>\r\n                            <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                          </tr>\r\n                        <tbody>\r\n                      </table>\r\n                    </div>\r\n                  </div>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </section>\r\n        \r\n      </div>  ");

/***/ }),

/***/ "6FZE":
/*!************************************************************!*\
  !*** ./src/app/modules/changelog/changelog.component.scss ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJjaGFuZ2Vsb2cuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "6UsO":
/*!**************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/campaigns/campaigns.component.html ***!
  \**************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n   <!-- offer details -->\r\n<div class=\"modal fade\" id=\"addpublisher\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog modal-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <b class=\"modal-title\" id=\"formModal\">Offer Details</b>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <div class=\"row\">\r\n        <div class=\"col-md-3 font-12\">Offer Title</div>\r\n        <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.name:null}}</div>\r\n      </div>\r\n      <div class=\"row mt-2\">\r\n        <div class=\"col-md-3 font-12\">Campaign Name</div>\r\n        <div class=\"col-md-3 font-12\">{{campaign ? campaign:null}}</div>\r\n      </div>\r\n      <div class=\"row mt-2\">\r\n        <div class=\"col-md-3 font-12\">Description</div>\r\n        <div class=\"col-md-3 font-12\">\r\n          <div [innerHTML]=\"offerdetails ? offerdetails.description:null\"></div>                            \r\n          </div>\r\n      </div>\r\n      <div class=\"row mt-2\">\r\n        <div class=\"col-md-3 font-12\">Payout</div>\r\n        <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.payout:null}}</div>\r\n      </div>\r\n      <div class=\"row mt-2\">\r\n        <div class=\"col-md-3 font-12\">Duration</div>\r\n        <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.duration:null}}</div>\r\n      </div>\r\n      <div class=\"row mt-2\">\r\n        <div class=\"col-md-3 font-12\">Hours Of Operation</div>\r\n        <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.hoursofoperation:null}}</div>\r\n      </div>\r\n      <div class=\"row mt-2\">\r\n        <div class=\"col-md-3 font-12\">Expiry Date</div>\r\n        <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.exp_date:null}}</div>\r\n      </div>\r\n      <div class=\"row mt-2\">\r\n        <div class=\"col-md-3 font-12\">Require Approval</div>\r\n        <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.req_approval==1\"><i class=\"fa fa-check\"></i></div>\r\n        <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.req_approval==0\"><i class=\"fa fa-times\"></i></div>\r\n      </div>\r\n      <br>\r\n      <strong class=\"font-15\">Publisher Number Limits</strong>\r\n      <div class=\"row mt-2\">\r\n        <div class=\"col-md-3 font-12\">Max Numbers Per Publisher</div>\r\n        <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.max_no_per_publisher:null}}</div>\r\n      </div>\r\n      <div class=\"row mt-2\">\r\n        <div class=\"col-md-3 font-12\">Allow Toll-Free Number</div>\r\n        <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_tollfree_no==1\"><i class=\"fa fa-check\"></i></div>\r\n        <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_tollfree_no==0\"><i class=\"fa fa-times\"></i></div>\r\n      </div>\r\n      <div class=\"row mt-2\">\r\n        <div class=\"col-md-3 font-12\">Allow DID Numbers</div>\r\n        <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_did_no==1\"><i class=\"fa fa-check\"></i></div>\r\n        <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_did_no==0\"><i class=\"fa fa-times\"></i></div>\r\n      </div>\r\n      <br>\r\n\r\n      <div class=\"row mt-2\" *ngIf=\"!payoutdata && conf!='-'\">\r\n        <div class=\"col-md-3 font-12\">Offer Payouts</div>                \r\n        <div class=\"col-md-5 font-12\"><span style=\"color: gray;\">1 | </span> {{conf}}</div>                \r\n      </div>   \r\n\r\n      <div *ngIf=\"payoutdata && payoutdata.length>0\">\r\n      <!-- <div class=\"row mt-2 mb-0 pb-0\">\r\n        <div class=\"col-md-12 font-16\">Real Time Bidding is not available for this Campaign.</div>        \r\n      </div> -->\r\n      <hr style=\"background: #606060;\" class=\"mt-2\" >\r\n      <div class=\"row\" (click)=\"isofferpayout()\">\r\n        <div class=\"col-md-10 font-16\">Offer Payouts</div>        \r\n        <div class=\"col-md-2 text-right pr-4 font-16\" ><i class=\"fa fa-angle-down\"></i></div>        \r\n        \r\n      </div>\r\n      <hr style=\"background: #606060;\" class=\"mt-1\">\r\n\r\n      <div style=\"border-left: 4px solid #3858e7 !important;left: 16px;background: #13161f;padding: 8px\" *ngIf=\"isoffer\">\r\n        <div class=\"row\" (click)=\"isrevsharepertg()\">\r\n          <div class=\"col-md-10 font-13\" *ngIf=\"payoutdata && payoutdata.length>0\"><span style=\"color: gray;\">1 | {{conf}}</span> </div>        \r\n          <div class=\"col-md-10 font-13\" *ngIf=\"!payoutdata\"><span style=\"color: gray;\">1 | </span> Revshare Percentage</div>        \r\n          <div class=\"col-md-2 text-right pr-4 font-13\" ><i class=\"fa fa-angle-down\"></i></div>        \r\n        </div>\r\n        <div *ngIf=\"isrevshareper\">\r\n        <div class=\"row mt-2 mt-2 mb-0 pb-0\">\r\n          <div class=\"col-md-12 font-13\">Payout Setting</div>        \r\n        </div>\r\n        <hr style=\"background: #606060;\" class=\"mt-2\">\r\n        <div class=\"row\">\r\n          <div class=\"col-md-2\"></div>        \r\n          <div class=\"col-md-3 font-13 text-right\">Payout Type</div>        \r\n          <div class=\"col-md-5 font-13\" >\r\n            <div class=\"control-group\">\r\n              <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                  <label class=\"btn btn-primary form-check-label font-10\" [ngClass]=\"{'active': payoutdata && payoutdata[0].payout_type==1}\" >\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\" >\r\n                    None\r\n                  </label>\r\n                  <label class=\"btn btn-primary form-check-label font-10\" [ngClass]=\"{'active': payoutdata && payoutdata[0].payout_type==1}\" >\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                    Fixed Amount\r\n                  </label>\r\n                  <label class=\"btn btn-primary form-check-label font-10\" [ngClass]=\"{'active': payoutdata && payoutdata[0].payout_type==2}\" >\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                    Revenue %\r\n                  </label>\r\n                </div>             \r\n              </div>   \r\n          </div>        \r\n        </div> <br>\r\n        <div *ngIf=\"payoutdata && payoutdata[0].payout_type!=0\">\r\n        <div class=\"row control-group mt-2 mb-4\">\r\n           <div class=\"col-md-2\"></div>        \r\n          <div class=\"col-md-3 font-13 text-right\">Payout Amount</div>        \r\n          <div class=\"col-md-5 font-13\" >\r\n\r\n              <div class=\"input-group\">\r\n                <div class=\"input-group-prepend\">\r\n                  <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                </div>\r\n                <input type=\"text\" class=\"form-control\" [disabled]=\"true\" [value]=\"payoutdata && payoutdata[0].payout_amount\" placeholder=\"Enter Payout Amount\" aria-label=\"Enter Payout Amount\" aria-describedby=\"btnGroupAddon\">\r\n              </div>                 \r\n            </div>                 \r\n        </div>\r\n \r\n        <div class=\"row control-group mt-2 mb-4\">\r\n           <div class=\"col-md-2\"></div>        \r\n          <div class=\"col-md-3 font-13 text-right\">Payout Trigger</div>        \r\n          <div class=\"col-md-5 font-13\" >\r\n            <select class=\"form-control\" formControlName=\"payout_trigger\" [value]=\"payoutdata && payoutdata[0].payout_trigger\" [disabled]=\"true\">\r\n              <option value=\"0\">Inbound Call</option>\r\n              <option value=\"1\">Call Length</option>\r\n              <option value=\"2\">Call Successfully Connected</option>\r\n            </select>       \r\n          </div>\r\n        </div>\r\n        </div>\r\n        \r\n        <div class=\"row control-group mt-2 mb-4\" *ngIf=\"payoutdata && payoutdata[0].payout_trigger==1\">\r\n           <div class=\"col-md-2\"></div>        \r\n          <div class=\"col-md-3 font-13 text-right\">Enter Seconds</div>        \r\n          <div class=\"col-md-5 font-13\" >\r\n            <input type=\"text\"  class=\"form-control\" type=\"text\" [disabled]=\"true\" [value]=\"payoutdata && payoutdata[0].payout_seconds\" placeholder=\"Enter Seconds\" />         \r\n          </div>\r\n        </div>\r\n      </div>\r\n        <!-- <div class=\"row\">\r\n          <div class=\"col-md-2\"></div>        \r\n          <div class=\"col-md-3 font-13 text-right\" >Duplicate Payouts <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"When enabled the publisher will be credited on duplicate or repeat calls. Disabling this option will prevent them from being paid multiple times. Time limits allow for duplicate payouts after a specific length of time.\"></i></div>        \r\n          <div class=\"col-md-5 font-13\" >\r\n            <div class=\"control-group\">\r\n              <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                  <label class=\"btn btn-primary form-check-label font-10\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payout_typevaledit(1)\">\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                    Disable\r\n                  </label>\r\n                  <label class=\"btn btn-primary form-check-label font-10\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                    Enable\r\n                  </label>\r\n                  <label class=\"btn btn-primary form-check-label font-10\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                    Time Limit\r\n                  </label>\r\n                </div>\r\n               \r\n              </div>   \r\n          </div>        \r\n        </div>\r\n        <div class=\"row\">\r\n          <div class=\"col-md-5\"></div>                  \r\n          <div class=\"col-md-2 font-13 d-flex\" >\r\n              <input type=\"number\" class=\"form-control appleinput\" >\r\n              <label for=\"\" class=\"mt-3\">Days</label>\r\n          </div>        \r\n          <div class=\"col-md-2 font-13 d-flex\" >\r\n              <input type=\"number\" class=\"form-control appleinput\" >\r\n              <label for=\"\" class=\"mt-3\">Hours</label>\r\n          </div>        \r\n        </div><br>\r\n        <div class=\"row\">\r\n          <div class=\"col-md-2\"></div>        \r\n          <div class=\"col-md-3 font-13 text-right\" >Payout Hours <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"The hours of operation where your publisher should be credited for calls.\"></i></div>        \r\n          <div class=\"col-md-3 font-13\" >\r\n            <div class=\"form-group\">\r\n              <label class=\"custom-switch pl-0\">\r\n                <input type=\"checkbox\" [checked]=\"isrecording==1\" (change)=\"get_recordingstatus($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                <span class=\"custom-switch-indicator\"></span>                     \r\n              </label>              \r\n            </div>  \r\n          </div>        \r\n        </div><br>\r\n        <div class=\"row\">\r\n          <div class=\"col-md-2\"></div>        \r\n          <div class=\"col-md-3 font-13 text-right\" >Limit Payout <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"Set caps to payouts based on calls, amount, and concurrency\"></i> </div>        \r\n          <div class=\"col-md-3 font-13\">\r\n            <div class=\"form-group\">\r\n              <label class=\"custom-switch pl-0\">\r\n                <input type=\"checkbox\" [checked]=\"isrecording==1\" (change)=\"get_recordingstatus($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                <span class=\"custom-switch-indicator\"></span>                     \r\n              </label>              \r\n            </div>  \r\n          </div>        \r\n        </div><br>\r\n        <div class=\"row mt-2 mt-2 mb-0 pb-0\">\r\n          <div class=\"col-md-12 font-13\">Tag Filters for Payout <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"Specify Tag Filters to give payout only if the call satisfies the filters.\"></i></div>        \r\n        </div>\r\n        <hr style=\"background: #606060;\" class=\"mt-2\">\r\n        <p>No Tag Filters</p> -->\r\n\r\n        <input (click)=\"isrevsharepertg()\" type=\"button\" value=\"Close\" class=\"btn btn-primary btn-sm\">  \r\n        </div>\r\n      </div>\r\n      <br>\r\n      <div class=\"row\">\r\n        <div class=\"col-md-12 d-flex\">\r\n          <input type=\"button\" *ngIf=\"offer_apply_status==0\" onclick=\"$('#addpublisher').modal('hide');\"  data-toggle=\"modal\" data-target=\"#offer_apply\" value=\"Apply\" class=\"w-auto btn btn-primary btn-sm\" style=\"background: #3858E7;\">  \r\n          <input type=\"button\" *ngIf=\"offer_apply_status==0\" (click)=\"offer_hide(offerdetails ? offerdetails.campaign_uuid:null,1)\" value=\"Hide Offer\" class=\"w-auto ml-2 btn btn-primary btn-sm\">  \r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>  \r\n\r\n\r\n<!-- offer apply -->\r\n<div class=\"modal fade\" id=\"offer_apply\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <b class=\"modal-title\" id=\"formModal\">Apply to join Offer: {{offerdetails ? offerdetails.name:null}}?</b>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <div class=\"row mt-2\">\r\n        <div class=\"col-md-12 font-12\">Describe why you decided to participate in the offer (optional)    \r\n          <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"Your notes will be included into the notification to the offer administrator. This can be a good way to initiate a business conversation with an administrator or provide notes about your traffic. If the offer requires participation approval, make sure to provide enough information for the administrator to make a decision.\"></i></div>\r\n        <div class=\"col-md-12 mt-2 font-12\">\r\n          <input type=\"text\" class=\"form-control\"  [(ngModel)]=\"apply_message\"/>\r\n        </div>        \r\n      </div><br>\r\n      <div class=\"row\">\r\n        <div class=\"col-md-12 d-flex\">\r\n          <input type=\"button\"  (click)=\"apply_offer()\" value=\"Apply\" class=\"w-auto btn btn-primary btn-sm\" style=\"background: #3858E7;\">  \r\n          <input type=\"button\" class=\"close\" data-dismiss=\"modal\"  value=\"Cancel\" class=\"w-auto ml-2 btn btn-primary btn-sm\">  \r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>  \r\n  \r\n\r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <h4> Manage Campaigns</h4></div>\r\n                    </div>\r\n                    <div class=\"col-9 text-right mt-2\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\" *ngIf=\"currentUser.role!=3\">\r\n                          <a [routerLink]=\"['/campaign-wizard']\" routerLinkActive=\"router-link-active\"  class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon mr-2 p-2\"><i class=\"fa fa-plus\"></i> Create Campaign\r\n                          </a>\r\n                          <!-- <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Delete Selected\r\n                          </button>                          -->\r\n                          \r\n                          </div>                       \r\n                    </div>\r\n              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <ngx-ui-loader [loaderId]=\"'loader-03'\"></ngx-ui-loader>\r\n                <div class=\"table-responsive\">\r\n                <!-- <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\"> -->\r\n                  <table id=\"campaigntbl\" class=\"table table-striped dataTable no-footer row-border hover\" datatable [dtOptions]=\"dtOptions\" [dtTrigger]=\"dtTrigger\">\r\n\r\n                    <thead>\r\n                      <tr>\r\n                        <!-- <th style=\"padding: 10px;width: 1px;\">\r\n                            <div class=\"custom-control custom-checkbox\" *ngIf=\"numbers?.length != 0\">\r\n                            <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                            <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                            </div>\r\n                        </th> -->\r\n                        <th>Status</th>\r\n                        <th>Name</th>\r\n                        <th>Offer Name</th>\r\n                        <th>Country</th>\r\n                        <th>By Day</th>\r\n                        <th>By Hour</th>\r\n                        <th>By Month</th>\r\n                        <th>Total</th>                        \r\n                        <th>Recording</th>\r\n                        <th>Created At</th>                        \r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let number of numbers\">\r\n                              <!-- <td>\r\n                                <div class=\"custom-control custom-checkbox\">\r\n                                <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{number.uuid}}\"  [checked]=\"number.selected\" [value]=\"number.id\" >\r\n                                <label class=\"custom-control-label\" for=\"customCheck_{{number.uuid}}\"></label>\r\n                                </div>                                \r\n                            </td> -->\r\n                            <td *ngIf=\"currentUser.role!=3\">\r\n                              <div title=\"Accepting Calls\" *ngIf=\"number.status==1\" class=\"badge badge-success\">Live</div>\r\n                              <div title=\"Not Accepting Calls\" *ngIf=\"number.status==0\" class=\"badge badge-warning\">Paused</div>\r\n                            </td>\r\n                            <td *ngIf=\"currentUser.role==3\">\r\n                              <div *ngIf=\"number.offer_apply_status=='0'\" title=\"Apply to run offer\" data-toggle=\"modal\" data-target=\"#addpublisher\" class=\"btn btn-primary font-10 btn-sm text-white\" (click)=\"applyoffer(number.conf, number.payoutdata,number.offerdetails,number.name,number.offer_apply_status)\">Apply</div>\r\n                              <div *ngIf=\"number.offer_apply_status=='1'\" title=\"Application Pending\" class=\"btn btn-warning font-10 btn-sm text-white\">Pending</div>\r\n                              <div *ngIf=\"number.offer_apply_status=='2'\" title=\"Application Live\" class=\"btn btn-success font-10 btn-sm text-white\">Live</div>\r\n                              <div *ngIf=\"number.offer_apply_status=='3'\" title=\"Application Rejected\" class=\"btn btn-danger font-10 btn-sm text-white\">Rejected</div>\r\n                              <div *ngIf=\"number.offer_apply_status=='4'\" title=\"Application Live\" class=\"btn btn-success font-10 btn-sm text-white\">No Number</div>\r\n                            </td>\r\n                            <td *ngIf=\"currentUser.role!=3\" style=\"width: 100px;\"><a href=\"#\" routerLink=\"/edit-campaign/{{number.uuid}}\" routerLinkActive=\"router-link-active\"  class=\"text-white actionedit\">{{ number.name }}</a></td>\r\n                            <td *ngIf=\"currentUser.role==3\" style=\"width: 100px;\">{{ number.name }}</td>\r\n                            <td>{{ number.offername }}</td>\r\n                            <td>{{ number.country }}</td>\r\n                            <td>{{ number.byday }}</td>\r\n                            <td>{{ number.byhour }}</td>\r\n                            <td>{{ number.bymonth }}</td>\r\n                            <td>{{ number.total }}</td>\r\n                            \r\n                            <td>\r\n                              <div *ngIf=\"number.is_recording==1\" class=\"badge badge-success\">Yes</div>\r\n                              <div *ngIf=\"number.is_recording==0\" class=\"badge badge-danger\">No</div>\r\n                            </td>\r\n                            <td>{{ number.created_at }}</td>\r\n                            <td>\r\n                              <div *ngIf=\"currentUser.role!=3\">\r\n                              <a href=\"#\" routerLink=\"/edit-campaign/{{number.uuid}}\" routerLinkActive=\"router-link-active\"  class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;<button (click)=\"Delete((number.id))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button>&nbsp;\r\n                              <div title=\"Pause Campaign\" (click)=\"Status(number.id,1)\" *ngIf=\"number.status==0\" class=\"btn btn-warning btn-sm\"><i class=\"fa fa-pause\"></i></div>\r\n                              <div title=\"Pause Campaign\" (click)=\"Status(number.id,0)\" *ngIf=\"number.status==1\" class=\"btn btn-success btn-sm\"><i class=\"fa fa-pause\"></i></div>\r\n                              </div>\r\n                              <div *ngIf=\"currentUser.role==3\">\r\n                                <div title=\"Hide Offer\" *ngIf=\"number.offer_apply_status==0\" (click)=\"offer_hide(number.uuid,1)\" class=\"btn btn-primary btn-sm\"><i class=\"fa fa-eye\"></i></div>\r\n                                <div title=\"View Details\" *ngIf=\"number.offer_apply_status==0 || number.offer_apply_status==1 || number.offer_apply_status==2\" data-toggle=\"modal\" data-target=\"#addpublisher\" (click)=\"applyoffer(number.conf, number.payoutdata, number.offerdetails,number.name,number.offer_apply_status)\" class=\"btn btn-primary btn-sm\"><i class=\"fa fa-list\"></i></div>\r\n                               \r\n                                <a *ngIf=\"number.offer_apply_status==4\" href=\"#\" routerLink=\"/view-campaign/{{number.uuid}}\" routerLinkActive=\"router-link-active\"  class=\"btn btn-primary btn-sm actionedit\"><i class=\"fa fa-list\"></i></a>\r\n\r\n                                <!-- <a href=\"#\" *ngIf=\"number.offer_apply_status=='4' || number.offer_apply_status=='2'\" routerLink=\"/view-campaign/{{number.uuid}}\" routerLinkActive=\"router-link-active\"  class=\"btn btn-primary btn-sm actionedit\"><i class=\"fa fa-list\"></i></a> -->\r\n                                <!-- <div *ngIf=\"number.offer_apply_status!='1' && number.offer_apply_status!=0\">-</div> -->\r\n                              </div>\r\n                            </td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"11\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>\r\n");

/***/ }),

/***/ "6epW":
/*!*********************************************!*\
  !*** ./src/app/auth/auth-routing.module.ts ***!
  \*********************************************/
/*! exports provided: AuthRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthRoutingModule", function() { return AuthRoutingModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _login_componunt_login_componunt_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./login-componunt/login-componunt.component */ "sYaG");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "3Pt+");





const routes = [
    { path: 'login', component: _login_componunt_login_componunt_component__WEBPACK_IMPORTED_MODULE_3__["LoginComponuntComponent"] },
];
let AuthRoutingModule = class AuthRoutingModule {
};
AuthRoutingModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        imports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"].forChild(routes), _angular_forms__WEBPACK_IMPORTED_MODULE_4__["ReactiveFormsModule"]],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"],]
    })
], AuthRoutingModule);



/***/ }),

/***/ "6uQ3":
/*!********************************************************!*\
  !*** ./src/app/modules/reports/reports.component.scss ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("i {\n  font-size: 14px;\n}\n\nspan.badge.badge-transparent {\n  font-size: 7px;\n  background: no-repeat;\n}\n\nbutton.btn.btn-primary.btn-icon.icon-left.mr-2 {\n  font-size: 15px;\n}\n\n/*Bhavik Patel*/\n\n.ngx-datatable .datatable-header {\n  display: block;\n  overflow: hidden;\n}\n\n.card .card-header .btn:not(.note-btn) {\n  border-radius: 4px;\n  width: 72px;\n  font-size: 10px;\n}\n\nbutton.btn.btn-primary.btn-icon.icon-left.mr-2 {\n  font-size: 12px;\n}\n\n.card .card-header .form-control {\n  width: auto !important;\n  border-radius: 0px !important;\n  height: 32px !important;\n}\n\nlabel.input-group-btn {\n  border: 1px solid #ced4da;\n  border-left: none;\n}\n\ntable td, table th {\n  font-size: 11px;\n}\n\n.error {\n  color: red;\n  font-size: 10px;\n}\n\nselect.form-control {\n  height: 38px !important;\n  font-size: 12px !important;\n  padding: 10px !important;\n}\n\nbutton.btn.btn-primary.btn-icon.icon-left.mr-2 {\n  font-size: 10px !important;\n  background: #262b42;\n}\n\ni.fa.fa-filter {\n  font-size: 8px;\n}\n\n.separator {\n  display: flex;\n  align-items: center;\n  text-align: center;\n}\n\n.separator::before,\n.separator::after {\n  content: \"\";\n  flex: 1;\n  border-bottom: 1px solid #000;\n}\n\n.separator:not(:empty)::before {\n  margin-right: 0.25em;\n}\n\n.separator:not(:empty)::after {\n  margin-left: 0.25em;\n}\n\nul.nav.nav-tabs li {\n  padding: 5px;\n  border: 1px solid #dee2e6;\n  border-bottom: none;\n  border-radius: 3px;\n}\n\n.tab-pane.fade.recorded.active.show {\n  font-size: 10px !important;\n}\n\n.nav-tabs {\n  border-bottom: 1px solid #3e4b75 !important;\n}\n\n.col-md-1 {\n  padding: 3px;\n  text-align: center !important;\n}\n\n.datatable-row-detail {\n  display: flex;\n}\n\nngb-tooltip-window .tooltip-inner {\n  pointer-events: auto;\n  width: 60px;\n  display: flex;\n  margin-top: 20px !important;\n}\n\n.material-icons {\n  font-size: 14px;\n}\n\n@media (max-width: 641px) {\n  .buttons_input {\n    text-align: start;\n  }\n}\n\n.buttons_input button {\n  padding: 3px !important;\n}\n\n#toast-container > div {\n  box-shadow: 0 4px 25px 0 rgba(0, 0, 0, 0.1);\n  padding: 13px 20px 10px 0px;\n  opacity: 1;\n  background: #ffffff;\n  border-radius: 8px;\n}\n\naudio::-webkit-media-controls-play-button,\naudio::-webkit-media-controls-panel {\n  background-color: #ffffff;\n  color: #000;\n}\n\n.toast-title {\n  font-weight: bold;\n  padding-left: 19px;\n  color: #000;\n}\n\nbutton.toast-close-button {\n  color: black;\n}\n\n.dark .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell {\n  background: #111319;\n  color: white;\n}\n\n.dark .ngx-datatable .datatable-footer .datatable-footer-inner {\n  color: #ffffff;\n  background: #111319;\n}\n\n.dark .ngx-datatable.material .datatable-footer .datatable-pager a {\n  color: rgba(255, 255, 255, 0.54);\n}\n\n.dark .ngx-datatable.material .datatable-body .datatable-row-detail {\n  background: #111319;\n  padding: 10px;\n  color: white;\n}\n\n.dark .ngx-datatable.material {\n  background: #111319;\n}\n\n.dark .ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell {\n  color: rgba(255, 255, 255, 0.87) !important;\n  background: #111319 !important;\n}\n\n.md-drppicker.drops-down-auto.ltr.shown {\n  top: 43px !important;\n  width: 615px !important;\n}\n/*# sourceMappingURL=data:application/json;base64,  */");

/***/ }),

/***/ "7kfw":
/*!***************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/publishers/advertiser-terms/advertiser-terms.component.html ***!
  \***************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"bg-black\">\r\n    <div class=\"container\">\r\n      <div class=\"row\">\r\n        <div class=\"col-md-12\">\r\n          <img alt=\"image\" width=\"250px\" src=\"assets/img/logo.png\" class=\"header-logo mb-2  mt-10\">\r\n        </div>\r\n      </div>\r\n    \r\n      <div class=\"row text-center\">\r\n        <div class=\"col-md-12\">\r\n          <h1>ADVERTISER TERMS</h1>\r\n        </div>\r\n      </div>\r\n      <div class=\"row\">\r\n        <div class=\"col-md-2\"></div>\r\n        <div class=\"col-md-8\">\r\n          <b>TERMS AND CONDITIONS</b>\r\n          <p class=\"text-justify\">This Ringlab Affiliate Network Advertiser Agreement (\"Advertiser Agreement\") governs the relationship between Ringlab Affiliate Network (\"Ringlab Affiliate Network\" or \"we\") and the entity accepting these terms (\"Advertiser\"), whereby Advertiser may obtain access to registered third party affiliates (\"Affiliates\") and publishers (\"Publishers\"), and related technology and software (\"Ad Server\"), to market customized advertisements and links provided by Advertiser and/or Ringlab Affiliate Network (\"Ads,\" as further defined below). The Ringlab Affiliate Network, as well as the services provided by Ringlab Affiliate Network in connection therewith (collectively \"Services\"), are further described in the Insertion Order (\"IO\") incorporated herein by reference (the IO, together with this Advertiser Agreement, the \"Agreement\"). The terms of the IO shall supersede all contrary terms set forth in this Advertiser Agreement, unless expressly set forth to the contrary. In any instance where Advertiser is an agency entering into the Agreement on behalf of a client, any reference to \"Advertiser\" shall refer jointly to Advertiser as well as the applicable underlying client.\r\n            </p>\r\n            <b>Ringlab Affiliate Network/Services\r\n            </b>\r\n          <p class=\"text-justify\">In connection with the Services set forth in the Agreement, Ringlab Affiliate Network shall undertake marketing campaigns with Advertiser (each an \"Ad Campaign\") whereby Ringlab Affiliate Network will distribute Advertiser's proprietary advertising materials including, without limitation, banners, buttons, text-links, clicks, co-registrations, pop-ups, pop-unders, e-mail, graphic files and similar online media (collectively, \"Advertiser Ads\") and/or, where applicable, Ringlab Affiliate Network Ads (as defined below) through the Ringlab Affiliate Network either: on Publisher websites via the Ad Server for impressions-based Ad Campaigns (\"CPM\"); or by Affiliates via e-mail based marketing, search engine marketing, website based marketing and/or other online marketing means. In connection with such Ad Campaigns, Advertiser shall pay Ringlab Affiliate Network commissions depending on the number of valid clicks, impressions, sales/actions (\"CPA\"), applications and leads (\"Leads\"), and/or such other compensable activities generated on behalf of Advertiser as set forth in the subject IO (collectively, \"Actions\"). The applicable Actions, the fees due to Ringlab Affiliate Network for each Action and other applicable terms and conditions of the Ad Campaigns entered into hereunder shall be specified in each IO. Ringlab Affiliate Network shall not be held liable or responsible for any actions or inactions of its Publishers or Affiliates.\r\n\r\n        </p>\r\n        <b>Account        </b>\r\n          <p class=\"text-justify\">Upon the execution of the Agreement, Advertiser must register on the Ringlab Affiliate Network website and create a unique, password-protected account (\"Account\"). Advertiser will be responsible for safeguarding and maintaining the confidentiality of its Account and associated password. Advertiser shall remain fully and solely responsibility for any and all actions taken under Advertiser's Account , whether authorized by Advertiser or not. Advertiser must immediately notify Ringlab Affiliate Network of any unauthorized use of Advertiser's Account. Advertiser is responsible for keeping its Account information current, complete and accurate, and Advertiser acknowledges and agrees that Ringlab Affiliate Network will have no responsibility or liability, directly or indirectly, for failure to deliver notices as a result of inaccurate Account information.\r\n        </p>\r\n        <b>Ads</b>\r\n          <p class=\"text-justify\">Unless stated otherwise in an IO, Advertiser shall develop all aspects of the Advertiser Ads, other than where the parties agree that Ringlab Affiliate Network shall assist in the development of Ads . The parties understand and agree that Advertiser is the sole owner of any and all intellectual property rights associated with any Advertiser Ads; other than those portions that Ringlab Affiliate Network prepares on Advertiser's behalf (such portions hereinafter referred to as, the \"Ringlab Affiliate Network Ads\" and together with the Advertiser Ads, the \"Ads\"). The parties understand and agree that Ringlab Affiliate Network is the sole owner of any and all intellectual property rights associated with the Ringlab Affiliate Network Ads, other than Advertiser's trademarks , logos, copyrights and other pre-existing Advertiser intellectual property incorporated in the Ringlab Affiliate Network Ads.  Under no circumstances shall Ringlab Affiliate Network be authorized to use the Ads other than in connection with Advertiser's Ad Campaigns as set forth in the IO(s). Advertiser shall submit all Advertiser Ads to Ringlab Affiliate Network for approval prior to the commencement of the subject Ad Campaign set forth in the applicable IO. After the applicable Ad has been approved by Ringlab Affiliate Network, Advertiser shall not alter, modify or otherwise change the Ads, or any other Ads-related feature, in any manner whatsoever, without obtaining Ringlab Affiliate Network's prior express written consent. Notwithstanding the foregoing, Ringlab Affiliate Network shall have sole discretion with respect to the creation of the \"subject\" and \"from\" lines used in its e-mailing of any Ads.  Ringlab Affiliate Network reserves the right, in its sole discretion and without liability, to:change any of its Ad Guidelines at any time; and reject, omit, exclude or terminate any Ad for any reason at any time, with subsequent notice to the Advertiser, whether or not such Ad was previously acknowledged, accepted or published by Ringlab Affiliate Network. Such reasons for rejection, omission or exclusion of Ads include, but are not limited to, Ringlab Affiliate Network's determination, in its sole discretion, that the Ads, including the applicable products and/or services promoted by such Ads (\"Advertiser Products\"), and any website linked to from such Ads, are in violation of any applicable law, rule, regulation or other judicial or administrative order or where the content thereof may tend to bring disparagement, ridicule or scorn upon Ringlab Affiliate Network or any of its Publishers and/or Affiliates.    Advertiser reserves the right to reject, omit, exclude, terminate or request a change to the Ads at any time and Ringlab Affiliate Network shall, subject to the provisions set forth herein, comply with such request as soon as practical but in no event later than three (3) business days after its receipt thereof. Advertiser may cancel or suspend a CPM-based Ad Campaign, or an Ad associated with such a CPM-based Ad Campaign, effective within approximately twenty-four (24) business hours of Ringlab Affiliate Network's receipt of Advertiser's cancellation notice, which Advertiser can deliver by logging into its Account and following the instructions on the applicable menu.</p>\r\n    \r\n          <p class=\"text-justify\">4.) Creative Changes: Editing of Ringlab Media’s Creative is strictly prohibited, without prior written\r\n            approval from Ringlab Media. Creative includes, but is not limited to, text ads, graphic ads, from and subject\r\n            line, any copy associated with the campaign including survey questions and answers. Any changes to Creative,\r\n            without prior written permission will result in the loss of payment of Leads.</p>\r\n           <b>Placement</b>\r\n          <p class=\"text-justify\">The positioning, placement, frequency and other editorial decisions related to Ads shall be made by Ringlab Affiliate Network and/or its Affiliates and Publishers, as applicable, in their respective sole discretion. The applicable IO may set forth the particular place(s) where Ads may appear and/or be distributed. Advertiser agrees that in a case where no points of placement or distributions are set forth in the applicable IO or, in cases where \"Run of Affiliate Network\" or similar designation is specified in the applicable IO, the Ads may appear at any point of placement and/or distribution that Ringlab Affiliate Network and/or its Affiliates and Publishers may determine, in their respective sole discretion.\r\n        </p>\r\n\r\n        <b>Ad Codes\r\n\r\n        </b>\r\n    \r\n          <p class=\"text-justify\">6.) Advertising Guidelines: PUBLISHER may, in its complete discretion, reject, cancel or remove at any time any\r\n            Advertisement from the service for any reason without prior notice to Ringlab Media. PUBLISHER must notify\r\n            Ringlab Media following the rejection, cancellation or removal of any Advertisement from the service within 24\r\n            hours.</p>\r\n    \r\n          <p class=\"text-justify\">7.) Term & Target Launch: Term will be one (1) month from the target launch of the initial campaign as noted in\r\n            the Insertion Order. Agreement may continue thereafter by mutual consent but may be terminated by either party\r\n            for any reason whatsoever. All legitimate moneys due to PUBLISHER will be paid during the next billing cycle. If\r\n            PUBLISHER defrauds the system, then payment is revoked as determined solely by Ringlab Media.</p>\r\n    \r\n          <p class=\"text-justify\">8.) Payment: PUBLISHER will invoice Ringlab Media on a monthly basis at the payout rates reflected in the\r\n            Insertion Order. The invoice will reflect delivery of final Qualified Lead numbers that are based upon numbers\r\n            reported by Ringlab Media to PUBLISHER pursuant to the terms of this Agreement. In the event Ringlab Media does\r\n            not receive payment from its ADVERTISER for reasons that directly relate to PUBLISHER’s traffic quality or\r\n            fraudulent issues that can be proven by the Advertiser, and that PUBLISHER’s traffic or proven fraud is a direct\r\n            result for non-payment, Ringlab Media shall have no obligation to make payment to PUBLISHER.</p>\r\n    \r\n          <p class=\"text-justify\">9.) Payment Term: Ringlab Media shall make all payments to PUBLISHER within 30 days of the Invoice Date. All\r\n            payments made to PUBLISHER do not include, and PUBLISHER shall pay, any sales, use or similar tax associated\r\n            with such payment. All past due amounts shall accrue interest at the rate of one and one-half percent (1.5%) per\r\n            month or the maximum rate allowed by law, whichever is greater. Parties shall keep, maintain and preserve, for\r\n            the term of this Agreement and for one (1) year thereafter, accurate records relating to amounts due hereunder\r\n            (the “Relevant Records”). Either party shall have a right at least once per calendar year to audit the Relevant\r\n            Records of the other party for the purpose of verifying fulfillment of party’s payment obligations pursuant to\r\n            this Agreement. Each audit will be conducted at a place agreed to by the parties, during the normal business\r\n            hours, with at least ten (10) business days prior written notice to party to be audited. Auditing party shall\r\n            pay the fees and expenses of the audit, unless the audit reveals a payment discrepancy of more than ten percent\r\n            (10%) of all payments due in any consecutive six (6) month period, in which case audited party shall pay the\r\n            reasonable fees and expenses of the audit, and shall immediately pay to auditing party all amounts found to be\r\n            due.\r\n          </p>\r\n    \r\n          <p class=\"text-justify\">10. Ringlab Media Representations and Warranties. The execution, delivery, and performance of this Agreement by\r\n            Ringlab Media has been duly approved by its board of directors or managing partners/members, and no further\r\n            corporate action is necessary on the part of Ringlab Media to consummate the transactions contemplated by this\r\n            Agreement.\r\n    \r\n          </p>\r\n    \r\n          <p class=\"text-justify\">11.) PUBLISHER Representations and Warranties: Publisher represents and warrants that: (1) the recipients of\r\n            all email addresses used by PUBLISHER in connection with this Agreement have manifested affirmative consent to\r\n            receive commercial emails from PUBLISHER and none of the email addresses were obtained through email harvesting\r\n            or dictionary attacks; (2) PUBLISHER will not fraudulently add leads or clicks or inflate leads or clicks by\r\n            fraudulent traffic generation (as determined solely by Ringlab Media, such as pre-population of forms or\r\n            mechanisms not approved by Ringlab Media); (3) PUBLISHER will not attempt in any way to alter, modify,\r\n            eliminate, conceal, or otherwise render inoperable or ineffective the Site tags, source codes, links, pixels,\r\n            modules or other data provided by or obtained from Ringlab Media that allows Ringlab Media to measure ad\r\n            performance and provide its services and (4) all of PUBLISHER’s efforts associated with this Agreement comply\r\n            with the laws of the United States, and any other laws of any other jurisdictions which are applicable to\r\n            PUBLISHER. PUBLISHER will not engage in or promote any illegal activities of any kind in association with this\r\n            Agreement.\r\n          </p>\r\n          <p class=\"text-justify\">12.) Other Obligations: PUBLISHER shall: NOT PROVIDE Incentivized traffic. This includes but is not limited to\r\n            any spoofing, redirecting or trafficking from adult related websites in an effort to gain traffic or websites\r\n            that are point, lottery, coupon or rewards based and encourage users to click on Advertisements or use\r\n            Advertisements to generate revenue for users to win points, get rewards, or other any other incentive.\r\n    \r\n          </p>\r\n          <p class=\"text-justify\">NOT PROVIDE leads generated from content, email or websites that are not subject matter related to the category\r\n            of the Advertisement represented. Such websites must be content-based (not a list of links or advertisements),\r\n            be written in English, receive a minimum of unique page views per month, have a top-level name and must not\r\n            infringe on any personal, intellectual property or copyrights. This can be waived only by SPECIFICALLY providing\r\n            the name of the proposed website to Ringlab Media.\r\n          </p>\r\n          <p class=\"text-justify\">Be able to provide the name of the Website where the lead was generated. This information is only delivered to\r\n            Ringlab Media upon request, but MUST be made available in case there is a dispute or problem with the lead.\r\n    \r\n          </p>\r\n    \r\n          <p class=\"text-justify\">NOT PROVIDE inappropriate content, which includes, but is not limited to, content that (i) promotes the use of\r\n            alcohol, tobacco or illegal substances, nudity, sex, pornography adult-oriented content such as phone sex or\r\n            escort services, expletives or inappropriate language, (ii) promotes violence or the use of illegal substances\r\n            or activities such as how to build a bomb, counterfeiting money and software pirating (iii) promotes illegal or\r\n            unethical activity, racism, hate, \"spam\", mail fraud, gambling, sweepstakes, pyramid schemes, or illegal advice\r\n            (iv) is otherwise prohibited by Federal or state law; and/or (v) will bring Ringlab Media and/or its associated\r\n            Advertisers negative publicity.\r\n    \r\n          </p>\r\n    \r\n          <p class=\"text-justify\">At no time, engage in, disseminate, promote or otherwise distribute any Advertisement through the use of\r\n            contextual media, specifically downloadable software (also called adware, pop-up/pop-under technologies,\r\n            plug-ins, and other names as applicable) </p>\r\n    \r\n          <p class=\"text-justify\">Email Campaigns. PUBLISHER further represents and warrants that with respect to email campaigns transmitted by\r\n            PUBLISHER for Ringlab Media, PUBLISHER shall at all times only use the Ringlab Media email creative provided by\r\n            Ringlab Media, maintain strict compliance with the Controlling the Assault on Non-solicited Pornography and\r\n            Marketing Act of 2003 (CAN-SPAM) and any amendments and modifications thereto. </p>\r\n    \r\n          <p class=\"text-justify\">13.) Confidentiality: The terms of this Agreement are confidential and shall not be disclosed to any third\r\n            party except where required by law. All information submitted by end-user customers pursuant to this Agreement\r\n            is proprietary to and owned by Ringlab Media. Such customer information is confidential and may not be disclosed\r\n            by Ringlab Media or PUBLISHER. In addition, the parties acknowledge that all non-public information, data and\r\n            reports received from the Disclosing Party hereunder or as part of the services hereunder is proprietary to and\r\n            owned by the Disclosing Party. (“Confidential Information”). The parties agree not to disclose the terms of this\r\n            Agreement, including the CPA value, to any third party without the express written consent of the Disclosing\r\n            Party, and that such constitutes Confidential Information. All Confidential Information is or may be protected\r\n            by copyright, trademark, trade secret and other intellectual property law, as appropriate. The parties agree not\r\n            to reproduce, disseminate, sell, distribute or commercially exploit any proprietary or Confidential Information\r\n            in any manner. These non-disclosure obligations shall survive the termination of this Agreement for a period of\r\n            five (5) years. This section does not bind Ringlab Media or PUBLISHER in the event such information is required\r\n            to be disclosed by operation of law. If a request is made of either party to disclose such information, the\r\n            Disclosing Party must immediately inform the other party via written notice sufficiently promptly to allow the\r\n            non-Disclosing Party to seek a Protective Order prior to the time commanded to produce or disclose such\r\n            Confidential Information, and each party agrees to cooperate in whatever way either party requests to attempt to\r\n            protect that information from disclosure by operation of law. Subject to prior approval, either party may\r\n            publicly announce its contractual relationship under this Agreement, which includes being on a listing of\r\n            Ringlab Media publishers in general corporate materials and in industry standard press releases.\r\n    \r\n          </p>\r\n    \r\n          <p class=\"text-justify\">14. DISCLAIMER OF WARRANTIES: Ringlab Media PROVIDES ITS SITES AND THE SITES OF ITS AFFILIATES AND PARTNERS,\r\n            AND ALL ITS SERVICES AND THE SERVICES OF ITS AFFILIATES AND PARTNERS, AS PERFORMED HEREUNDER, ON AN \"AS IS,\"\r\n            “WHERE IS” AND \"AS AVAILABLE\" BASIS. Ringlab Media DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS OR\r\n            IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR\r\n            PURPOSE AND IMPLIED WARRANTIES ARISING FROM COURSE OF DEALING OR COURSE OF PERFORMANCE.\r\n    \r\n          </p>\r\n    \r\n          <p class=\"text-justify\">15. LIMITATIONS OF LIABILITY: IN NO EVENT SHALL EITHER PARTY BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\r\n            CONSEQUENTIAL DAMAGES (INCLUDING, WITHOUT LIMITATION, FOR BREACH OF CONTRACT, WARRANTY, NEGLIGENCE OR STRICT\r\n            LIABILITY), OR FOR INTERRUPTED COMMUNICATIONS, LOSS OF USE, LOST BUSINESS, LOST DATA OR LOST PROFITS, ARISING\r\n            OUT OF OR IN CONNECTION WITH THIS AGREEMENT. UNDER NO CIRCUMSTANCES SHALL EITHER PARTY BE LIABLE TO THE OTHER OR\r\n            ANY THIRD PARTIES FOR AN AMOUNT GREATER THAN THE AMOUNTS PAID BY Ringlab Media TO PUBLISHER DURING THE PRIOR\r\n            THREE MONTHS.\r\n    \r\n          </p>\r\n    \r\n          <p class=\"text-justify\">16.) Indemnification: Each party agrees to indemnify, defend and hold harmless the other party and its\r\n            employees, agents, officers and directors, against any and all claims, causes of actions, judgments, demands,\r\n            damages, losses or liabilities, including costs and expenses (including reasonable attorneys fees and costs of\r\n            suit), arising out of or relating to (a) any claim based upon infringement of copyright, trademark, patent, or\r\n            trade secret or other intellectual property right of any third party; (b) any claim, representation, or\r\n            statement made in the Advertisement; (c) any breach of any representation or warranty contained in this\r\n            Agreement.\r\n    \r\n          </p>\r\n    \r\n          <p class=\"text-justify\">17. Dispute Resolution: If any dispute arises under this Agreement, the Parties agree to first try to resolve\r\n            the dispute with the help of a mutually agreed upon mediator in the following location: State of Florida,\r\n            Sarasota Count. Any costs and fees other than attorneys’ fees associated with the mediation shall be shared\r\n            equally by the parties. If it proves impossible to arrive at a mutually satisfactory solution through mediation,\r\n            the Parties agree to submit the dispute to binding arbitration in the following location: State of California,\r\n            Los Angeles County. The Parties agree that the binding arbitration will be conducted under the rules of the\r\n            American Arbitration Association. Judgment upon the award rendered by the arbitrator may be entered in any court\r\n            with proper jurisdiction. If any litigation or arbitration is absolutely necessary to enforce this Agreement or\r\n            the terms thereof, the prevailing Party shall be entitled to reimbursement by the other Party for reasonable\r\n            attorneys’ fees, costs and expenses. This Agreement will be governed by the laws of the State of AZ\r\n    \r\n          </p>\r\n    \r\n          <p class=\"text-justify\">18. No Assignment: Neither Party shall have the right to assign or otherwise transfer its rights and\r\n            obligations under this Agreement except with the prior written consent of the other Party; provided, however,\r\n            that a successor in interest by merger, by operation of law, assignment, purchase or otherwise of all or\r\n            substantially all the business of a Party may acquire its rights and obligations hereunder. Any prohibited\r\n            assignment shall be null and void.\r\n    \r\n          </p>\r\n    \r\n          <p class=\"text-justify\">19. Independent Contractor: Each party is an independent contractor. Except as set forth in this Agreement,\r\n            neither party is authorized or empowered to obligate the other or incur any costs on behalf of the other without\r\n            the party’s prior written consent.\r\n    \r\n          </p>\r\n    \r\n          <p class=\"text-justify\">20. Severability: If any term, provision, covenant, or condition of this Agreement is held by a court of\r\n            competent jurisdiction to be invalid or unenforceable, the remainder of the Agreement shall remain in full force\r\n            and effect and shall in no way be affected or invalidated.\r\n    \r\n          </p>\r\n          <p class=\"text-justify\">21. Entire Agreement; Modification: This constitutes the entire agreement between the parties and supersedes\r\n            any prior or inconsistent agreements, negotiations, representations and promises, written or oral, regarding the\r\n            subject matter. No modification, course of conduct, amendment, supplement to or waiver of this Agreement or any\r\n            provisions hereof shall be binding upon the parties unless made in writing and duly signed by both parties.\r\n          </p>\r\n    \r\n          <p class=\"text-justify\">22. Agreement in Counterparts: This agreement may be signed by Ringlab Media and PUBLISHER in counterparts, and\r\n            facsimile signatures shall have the same force and effect as an original signature.</p>\r\n    \r\n        </div>\r\n        <div class=\"col-md-2\"></div>\r\n      </div>\r\n    \r\n      <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n              <p>Copyright © 2020 Ringlab Media LLC - All Rights Reserved.</p>\r\n          </div>\r\n          <div class=\"col-md-12 text-center mb-3\">\r\n              <a [routerLink]=\"['/publisher-terms']\" routerLinkActive=\"router-link-active\" >Publisher Terms</a> <span class=\"mr-4\"></span>\r\n              <a [routerLink]=\"['/advertiser-terms']\" routerLinkActive=\"router-link-active\"  href=\"\">Advertiser Terms</a>\r\n          </div>\r\n      </div>\r\n    \r\n    </div>\r\n    </div>");

/***/ }),

/***/ "8PEf":
/*!**********************************************!*\
  !*** ./src/app/header/header.component.scss ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".media-body {\n  padding-left: 7px !important;\n  font-size: 13px;\n}\n\nh6.media-heading {\n  margin-bottom: -2px;\n  margin-top: -4px;\n  color: lightgreen;\n}\n\nh6.media-heading-completed {\n  margin-bottom: -2px;\n  margin-top: -4px;\n  color: lightgreen;\n}\n\n@media (min-width: 1281px) {\n  ul.navbar-nav.navbar-right {\n    padding-top: 3px;\n  }\n}\n\n@media (min-width: 1281px) {\n  .sidebartogglebtn {\n    display: none;\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXGhlYWRlci5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRQTtFQUNJLDRCQUFBO0VBQ0EsZUFBQTtBQVBKOztBQVNBO0VBQ0ksbUJBQUE7RUFDQSxnQkFBQTtFQUNBLGlCQUFBO0FBTko7O0FBUUE7RUFDSSxtQkFBQTtFQUNBLGdCQUFBO0VBQ0EsaUJBQUE7QUFMSjs7QUFhQTtFQUNBO0lBQ0ksZ0JBQUE7RUFWRjtBQUNGOztBQVlBO0VBQ0E7SUFDSSxhQUFBO0VBVkY7QUFDRiIsImZpbGUiOiJoZWFkZXIuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIvLyAucGhvbmV7XHJcbi8vIGZvbnQtc2l6ZTogMzNweCFpbXBvcnRhbnQ7XHJcbi8vIGNvbG9yOiBncmVlbjtcclxuLy8gfVxyXG4vLyAucGhvbmUtY29tcGxldGVke1xyXG4vLyBmb250LXNpemU6IDMzcHghaW1wb3J0YW50O1xyXG4vLyBjb2xvcjogIzNjOTRkNjtcclxuLy8gfVxyXG4ubWVkaWEtYm9keSB7XHJcbiAgICBwYWRkaW5nLWxlZnQ6IDdweCFpbXBvcnRhbnQ7XHJcbiAgICBmb250LXNpemU6IDEzcHg7XHJcbn1cclxuaDYubWVkaWEtaGVhZGluZ3tcclxuICAgIG1hcmdpbi1ib3R0b206IC0ycHg7XHJcbiAgICBtYXJnaW4tdG9wOiAtNHB4O1xyXG4gICAgY29sb3I6IGxpZ2h0Z3JlZW47XHJcbn1cclxuaDYubWVkaWEtaGVhZGluZy1jb21wbGV0ZWR7XHJcbiAgICBtYXJnaW4tYm90dG9tOiAtMnB4O1xyXG4gICAgbWFyZ2luLXRvcDogLTRweDtcclxuICAgIGNvbG9yOiBsaWdodGdyZWVuO1xyXG59XHJcblxyXG4vLyB1bC5uYXZiYXItbmF2Lm1yLTMge1xyXG4vLyAgICAgbWFyZ2luLXRvcDogMTlweDtcclxuLy8gfVxyXG5cclxuLy8gfVxyXG5AbWVkaWEgKG1pbi13aWR0aDoxMjgxcHgpIHsgXHJcbnVsLm5hdmJhci1uYXYubmF2YmFyLXJpZ2h0IHtcclxuICAgIHBhZGRpbmctdG9wOiAzcHg7XHJcbn1cclxufVxyXG5AbWVkaWEgKG1pbi13aWR0aDoxMjgxcHgpIHsgXHJcbi5zaWRlYmFydG9nZ2xlYnRue1xyXG4gICAgZGlzcGxheTogbm9uZTtcclxufVxyXG59Il19 */");

/***/ }),

/***/ "9xfD":
/*!*****************************************************************!*\
  !*** ./src/app/modules/number/numberadd/numberadd.component.ts ***!
  \*****************************************************************/
/*! exports provided: NumberaddComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberaddComponent", function() { return NumberaddComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_numberadd_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./numberadd.component.html */ "hchM");
/* harmony import */ var _numberadd_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./numberadd.component.scss */ "O1x4");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);












class FSLClass {
}
let NumberaddComponent = class NumberaddComponent {
    constructor(handler, fb, moduleService, router, route, toastrService, cdRef) {
        this.fb = fb;
        this.moduleService = moduleService;
        this.router = router;
        this.route = route;
        this.toastrService = toastrService;
        this.cdRef = cdRef;
        this.submitted = false;
        this.FSLRulesSubmitted = false;
        this.FSLRulesEditSubmitted = false;
        this.daysSubmitted = false;
        this.daysEditSubmitted = false;
        this.dropdownList = [];
        this.selectedItems = [];
        // dropdownSettings: { singleSelection: boolean; text: string; selectAllText: string; unSelectAllText: string; enableSearchFilter: boolean; classes: string; };
        this.dropdownSettings = {};
        this.ivrdropdownSettings = {};
        // citystatedropdownSettings = {};
        this.citydropdownSettings = {};
        this.daytype = 0;
        this.flag = 0;
        this.ringtree = false;
        this.ringtreetext = "Simple";
        this.methodtypeval = 0;
        this.isfilter = 0;
        this.addkeyword = [];
        this.settings = {};
        this.ivrMenu = [];
        this.allcitystate = [];
        this.settingToggleTypeval = 0;
        this.settingToggleDurationvalue = 0;
        this.BuyerSubmitted = false;
        // Day0
        this.selectedPrimaryForaward_0_day0 = 0;
        this.selectedPrimaryCount_0_day0 = 0;
        this.selected_0_day_0 = 0;
        this.selectedPrimaryForaward_1_day0 = 0;
        this.selectedPrimaryCount_1_day0 = 0;
        this.selected_1_day_0 = 0;
        this.selectedPrimaryForaward_2_day0 = 0;
        this.selectedPrimaryCount_2_day0 = 0;
        this.selected_2_day_0 = 0;
        this.selectedPrimaryForaward_3_day0 = 0;
        this.selectedPrimaryCount_3_day0 = 0;
        this.selected_3_day_0 = 0;
        this.selectedPrimaryForaward_4_day0 = 0;
        this.selectedPrimaryCount_4_day0 = 0;
        this.selected_4_day_0 = 0;
        this.selectedPrimaryForaward_5_day0 = 0;
        this.selectedPrimaryCount_5_day0 = 0;
        this.selected_5_day_0 = 0;
        this.selectedPrimaryForaward_6_day0 = 0;
        this.selectedPrimaryCount_6_day0 = 0;
        this.selected_6_day_0 = 0;
        this.selectedPrimaryForaward_7_day0 = 0;
        this.selectedPrimaryCount_7_day0 = 0;
        this.selected_7_day_0 = 0;
        this.selectedPrimaryForaward_8_day0 = 0;
        this.selectedPrimaryCount_8_day0 = 0;
        this.selected_8_day_0 = 0;
        this.selectedPrimaryForaward_9_day0 = 0;
        this.selectedPrimaryCount_9_day0 = 0;
        this.selected_9_day_0 = 0;
        // Day1
        this.selectedPrimaryForaward_0_day1 = 0;
        this.selectedPrimaryCount_0_day1 = 0;
        this.selected_0_day_1 = 0;
        this.selectedPrimaryForaward_1_day1 = 0;
        this.selectedPrimaryCount_1_day1 = 0;
        this.selected_1_day_1 = 0;
        this.selectedPrimaryForaward_2_day1 = 0;
        this.selectedPrimaryCount_2_day1 = 0;
        this.selected_2_day_1 = 0;
        this.selectedPrimaryForaward_3_day1 = 0;
        this.selectedPrimaryCount_3_day1 = 0;
        this.selected_3_day_1 = 0;
        this.selectedPrimaryForaward_4_day1 = 0;
        this.selectedPrimaryCount_4_day1 = 0;
        this.selected_4_day_1 = 0;
        this.selectedPrimaryForaward_5_day1 = 0;
        this.selectedPrimaryCount_5_day1 = 0;
        this.selected_5_day_1 = 0;
        this.selectedPrimaryForaward_6_day1 = 0;
        this.selectedPrimaryCount_6_day1 = 0;
        this.selected_6_day_1 = 0;
        this.selectedPrimaryForaward_7_day1 = 0;
        this.selectedPrimaryCount_7_day1 = 0;
        this.selected_7_day_1 = 0;
        this.selectedPrimaryForaward_8_day1 = 0;
        this.selectedPrimaryCount_8_day1 = 0;
        this.selected_8_day_1 = 0;
        this.selectedPrimaryForaward_9_day1 = 0;
        this.selectedPrimaryCount_9_day1 = 0;
        this.selected_9_day_1 = 0;
        // Day2
        this.selectedPrimaryForaward_0_day2 = 0;
        this.selectedPrimaryCount_0_day2 = 0;
        this.selected_0_day_2 = 0;
        this.selectedPrimaryForaward_1_day2 = 0;
        this.selectedPrimaryCount_1_day2 = 0;
        this.selected_1_day_2 = 0;
        this.selectedPrimaryForaward_2_day2 = 0;
        this.selectedPrimaryCount_2_day2 = 0;
        this.selected_2_day_2 = 0;
        this.selectedPrimaryForaward_3_day2 = 0;
        this.selectedPrimaryCount_3_day2 = 0;
        this.selected_3_day_2 = 0;
        this.selectedPrimaryForaward_4_day2 = 0;
        this.selectedPrimaryCount_4_day2 = 0;
        this.selected_4_day_2 = 0;
        this.selectedPrimaryForaward_5_day2 = 0;
        this.selectedPrimaryCount_5_day2 = 0;
        this.selected_5_day_2 = 0;
        this.selectedPrimaryForaward_6_day2 = 0;
        this.selectedPrimaryCount_6_day2 = 0;
        this.selected_6_day_2 = 0;
        this.selectedPrimaryForaward_7_day2 = 0;
        this.selectedPrimaryCount_7_day2 = 0;
        this.selected_7_day_2 = 0;
        this.selectedPrimaryForaward_8_day2 = 0;
        this.selectedPrimaryCount_8_day2 = 0;
        this.selected_8_day_2 = 0;
        this.selectedPrimaryForaward_9_day2 = 0;
        this.selectedPrimaryCount_9_day2 = 0;
        this.selected_9_day_2 = 0;
        // Day3
        this.selectedPrimaryForaward_0_day3 = 0;
        this.selectedPrimaryCount_0_day3 = 0;
        this.selected_0_day_3 = 0;
        this.selectedPrimaryForaward_1_day3 = 0;
        this.selectedPrimaryCount_1_day3 = 0;
        this.selected_1_day_3 = 0;
        this.selectedPrimaryForaward_2_day3 = 0;
        this.selectedPrimaryCount_2_day3 = 0;
        this.selected_2_day_3 = 0;
        this.selectedPrimaryForaward_3_day3 = 0;
        this.selectedPrimaryCount_3_day3 = 0;
        this.selected_3_day_3 = 0;
        this.selectedPrimaryForaward_4_day3 = 0;
        this.selectedPrimaryCount_4_day3 = 0;
        this.selected_4_day_3 = 0;
        this.selectedPrimaryForaward_5_day3 = 0;
        this.selectedPrimaryCount_5_day3 = 0;
        this.selected_5_day_3 = 0;
        this.selectedPrimaryForaward_6_day3 = 0;
        this.selectedPrimaryCount_6_day3 = 0;
        this.selected_6_day_3 = 0;
        this.selectedPrimaryForaward_7_day3 = 0;
        this.selectedPrimaryCount_7_day3 = 0;
        this.selected_7_day_3 = 0;
        this.selectedPrimaryForaward_8_day3 = 0;
        this.selectedPrimaryCount_8_day3 = 0;
        this.selected_8_day_3 = 0;
        this.selectedPrimaryForaward_9_day3 = 0;
        this.selectedPrimaryCount_9_day3 = 0;
        this.selected_9_day_3 = 0;
        // Day4
        this.selectedPrimaryForaward_0_day4 = 0;
        this.selectedPrimaryCount_0_day4 = 0;
        this.selected_0_day_4 = 0;
        this.selectedPrimaryForaward_1_day4 = 0;
        this.selectedPrimaryCount_1_day4 = 0;
        this.selected_1_day_4 = 0;
        this.selectedPrimaryForaward_2_day4 = 0;
        this.selectedPrimaryCount_2_day4 = 0;
        this.selected_2_day_4 = 0;
        this.selectedPrimaryForaward_3_day4 = 0;
        this.selectedPrimaryCount_3_day4 = 0;
        this.selected_3_day_4 = 0;
        this.selectedPrimaryForaward_4_day4 = 0;
        this.selectedPrimaryCount_4_day4 = 0;
        this.selected_4_day_4 = 0;
        this.selectedPrimaryForaward_5_day4 = 0;
        this.selectedPrimaryCount_5_day4 = 0;
        this.selected_5_day_4 = 0;
        this.selectedPrimaryForaward_6_day4 = 0;
        this.selectedPrimaryCount_6_day4 = 0;
        this.selected_6_day_4 = 0;
        this.selectedPrimaryForaward_7_day4 = 0;
        this.selectedPrimaryCount_7_day4 = 0;
        this.selected_7_day_4 = 0;
        this.selectedPrimaryForaward_8_day4 = 0;
        this.selectedPrimaryCount_8_day4 = 0;
        this.selected_8_day_4 = 0;
        this.selectedPrimaryForaward_9_day4 = 0;
        this.selectedPrimaryCount_9_day4 = 0;
        this.selected_9_day_4 = 0;
        // Day5
        this.selectedPrimaryForaward_0_day5 = 0;
        this.selectedPrimaryCount_0_day5 = 0;
        this.selected_0_day_5 = 0;
        this.selectedPrimaryForaward_1_day5 = 0;
        this.selectedPrimaryCount_1_day5 = 0;
        this.selected_1_day_5 = 0;
        this.selectedPrimaryForaward_2_day5 = 0;
        this.selectedPrimaryCount_2_day5 = 0;
        this.selected_2_day_5 = 0;
        this.selectedPrimaryForaward_3_day5 = 0;
        this.selectedPrimaryCount_3_day5 = 0;
        this.selected_3_day_5 = 0;
        this.selectedPrimaryForaward_4_day5 = 0;
        this.selectedPrimaryCount_4_day5 = 0;
        this.selected_4_day_5 = 0;
        this.selectedPrimaryForaward_5_day5 = 0;
        this.selectedPrimaryCount_5_day5 = 0;
        this.selected_5_day_5 = 0;
        this.selectedPrimaryForaward_6_day5 = 0;
        this.selectedPrimaryCount_6_day5 = 0;
        this.selected_6_day_5 = 0;
        this.selectedPrimaryForaward_7_day5 = 0;
        this.selectedPrimaryCount_7_day5 = 0;
        this.selected_7_day_5 = 0;
        this.selectedPrimaryForaward_8_day5 = 0;
        this.selectedPrimaryCount_8_day5 = 0;
        this.selected_8_day_5 = 0;
        this.selectedPrimaryForaward_9_day5 = 0;
        this.selectedPrimaryCount_9_day5 = 0;
        this.selected_9_day_5 = 0;
        // Day6
        this.selectedPrimaryForaward_0_day6 = 0;
        this.selectedPrimaryCount_0_day6 = 0;
        this.selected_0_day_6 = 0;
        this.selectedPrimaryForaward_1_day6 = 0;
        this.selectedPrimaryCount_1_day6 = 0;
        this.selected_1_day_6 = 0;
        this.selectedPrimaryForaward_2_day6 = 0;
        this.selectedPrimaryCount_2_day6 = 0;
        this.selected_2_day_6 = 0;
        this.selectedPrimaryForaward_3_day6 = 0;
        this.selectedPrimaryCount_3_day6 = 0;
        this.selected_3_day_6 = 0;
        this.selectedPrimaryForaward_4_day6 = 0;
        this.selectedPrimaryCount_4_day6 = 0;
        this.selected_4_day_6 = 0;
        this.selectedPrimaryForaward_5_day6 = 0;
        this.selectedPrimaryCount_5_day6 = 0;
        this.selected_5_day_6 = 0;
        this.selectedPrimaryForaward_6_day6 = 0;
        this.selectedPrimaryCount_6_day6 = 0;
        this.selected_6_day_6 = 0;
        this.selectedPrimaryForaward_7_day6 = 0;
        this.selectedPrimaryCount_7_day6 = 0;
        this.selected_7_day_6 = 0;
        this.selectedPrimaryForaward_8_day6 = 0;
        this.selectedPrimaryCount_8_day6 = 0;
        this.selected_8_day_6 = 0;
        this.selectedPrimaryForaward_9_day6 = 0;
        this.selectedPrimaryCount_9_day6 = 0;
        this.selected_9_day_6 = 0;
        this.selectedLevel = 0;
        this.isadded = 0;
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    gettimezone() {
        this.moduleService.gettimezone().subscribe(res => {
            this.alltimezone = res;
            // console.log(res);          
        });
    }
    closeModal() {
        if (this.noofforwarding) {
            $("#addFSLRules").modal("hide");
            setTimeout(() => {
                this.addFSLRules.reset({
                    'name': ' ',
                    'numberoftimeframe': ' ',
                });
                this.getAllRules();
            }, 2000);
        }
    }
    ngAfterViewChecked() {
        this.cdRef.detectChanges();
    }
    editcloseModal() {
        if (this.noofforwarding) {
            $("#editFSLRules").modal("hide");
            this.FSLRulesEditSubmitted = false;
            setTimeout(() => {
                this.getAllRules();
                this.getRulesByName(this.addForm.get('fslrulesname').value);
            }, 2000);
        }
    }
    getAllRules() {
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getallbuyers(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            // this.allRulesData = res.allrules;
            this.allBuyers = res;
        }, error => this.error = error);
    }
    getAllLabels() {
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getAllLabels(this.currentCompany.uuid).subscribe(res => {
            this.dropdownList = res;
        }, error => this.error = error);
    }
    getRulesByName(name) {
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getRulesByName(name, this.currentCompany.uuid).subscribe(res => {
            this.allRulesbyname = res;
        }, error => this.error = error);
    }
    _keyPress(event) {
        const isNumericInput = (event) => {
            const key = event.keyCode;
            return ((key >= 48 && key <= 57) || // Allow number line
                (key >= 96 && key <= 105) // Allow number pad
            );
        };
        const isModifierKey = (event) => {
            const key = event.keyCode;
            return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
                (key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
                (key > 36 && key < 41) || // Allow left, up, right, down
                (
                // Allow Ctrl/Command + A,C,V,X,Z
                (event.ctrlKey === true || event.metaKey === true) &&
                    (key === 65 || key === 67 || key === 86 || key === 88 || key === 90));
        };
        const enforceFormat = (event) => {
            // Input must be of a valid number format or a modifier key, and not longer than ten digits
            if (!isNumericInput(event) && !isModifierKey(event)) {
                event.preventDefault();
            }
        };
        const formatToPhone = (event) => {
            if (isModifierKey(event)) {
                return;
            }
            const target = event.target;
            const input = event.target.value.replace(/\D/g, '').substring(0, 10); // First ten digits of input only
            const zip = input.substring(0, 3);
            const middle = input.substring(3, 6);
            const last = input.substring(6, 10);
            if (input.length > 6) {
                target.value = `(${zip}) ${middle}-${last}`;
            }
            else if (input.length > 3) {
                target.value = `(${zip}) ${middle}`;
            }
            else if (input.length > 0) {
                target.value = `(${zip}`;
            }
        };
        const inputElement = document.getElementById('number');
        const number_0_day0 = document.getElementById('number_0_day0');
        const number_1_day0 = document.getElementById('number_1_day0');
        const number_2_day0 = document.getElementById('number_2_day0');
        const number_3_day0 = document.getElementById('number_3_day0');
        const number_4_day0 = document.getElementById('number_4_day0');
        const number_5_day0 = document.getElementById('number_5_day0');
        const number_6_day0 = document.getElementById('number_6_day0');
        const number_7_day0 = document.getElementById('number_7_day0');
        const number_8_day0 = document.getElementById('number_8_day0');
        const number_9_day0 = document.getElementById('number_9_day0');
        const number_0_day1 = document.getElementById('number_0_day1');
        const number_1_day1 = document.getElementById('number_1_day1');
        const number_2_day1 = document.getElementById('number_2_day1');
        const number_3_day1 = document.getElementById('number_3_day1');
        const number_4_day1 = document.getElementById('number_4_day1');
        const number_5_day1 = document.getElementById('number_5_day1');
        const number_6_day1 = document.getElementById('number_6_day1');
        const number_7_day1 = document.getElementById('number_7_day1');
        const number_8_day1 = document.getElementById('number_8_day1');
        const number_9_day1 = document.getElementById('number_9_day1');
        const number_0_day2 = document.getElementById('number_0_day2');
        const number_1_day2 = document.getElementById('number_1_day2');
        const number_2_day2 = document.getElementById('number_2_day2');
        const number_3_day2 = document.getElementById('number_3_day2');
        const number_4_day2 = document.getElementById('number_4_day2');
        const number_5_day2 = document.getElementById('number_5_day2');
        const number_6_day2 = document.getElementById('number_6_day2');
        const number_7_day2 = document.getElementById('number_7_day2');
        const number_8_day2 = document.getElementById('number_8_day2');
        const number_9_day2 = document.getElementById('number_9_day2');
        const number_0_day3 = document.getElementById('number_0_day3');
        const number_1_day3 = document.getElementById('number_1_day3');
        const number_2_day3 = document.getElementById('number_2_day3');
        const number_3_day3 = document.getElementById('number_3_day3');
        const number_4_day3 = document.getElementById('number_4_day3');
        const number_5_day3 = document.getElementById('number_5_day3');
        const number_6_day3 = document.getElementById('number_6_day3');
        const number_7_day3 = document.getElementById('number_7_day3');
        const number_8_day3 = document.getElementById('number_8_day3');
        const number_9_day3 = document.getElementById('number_9_day3');
        const number_0_day4 = document.getElementById('number_0_day4');
        const number_1_day4 = document.getElementById('number_1_day4');
        const number_2_day4 = document.getElementById('number_2_day4');
        const number_3_day4 = document.getElementById('number_3_day4');
        const number_4_day4 = document.getElementById('number_4_day4');
        const number_5_day4 = document.getElementById('number_5_day4');
        const number_6_day4 = document.getElementById('number_6_day4');
        const number_7_day4 = document.getElementById('number_7_day4');
        const number_8_day4 = document.getElementById('number_8_day4');
        const number_9_day4 = document.getElementById('number_9_day4');
        const number_0_day5 = document.getElementById('number_0_day5');
        const number_1_day5 = document.getElementById('number_1_day5');
        const number_2_day5 = document.getElementById('number_2_day5');
        const number_3_day5 = document.getElementById('number_3_day5');
        const number_4_day5 = document.getElementById('number_4_day5');
        const number_5_day5 = document.getElementById('number_5_day5');
        const number_6_day5 = document.getElementById('number_6_day5');
        const number_7_day5 = document.getElementById('number_7_day5');
        const number_8_day5 = document.getElementById('number_8_day5');
        const number_9_day5 = document.getElementById('number_9_day5');
        const number_0_day6 = document.getElementById('number_0_day6');
        const number_1_day6 = document.getElementById('number_1_day6');
        const number_2_day6 = document.getElementById('number_2_day6');
        const number_3_day6 = document.getElementById('number_3_day6');
        const number_4_day6 = document.getElementById('number_4_day6');
        const number_5_day6 = document.getElementById('number_5_day6');
        const number_6_day6 = document.getElementById('number_6_day6');
        const number_7_day6 = document.getElementById('number_7_day6');
        const number_8_day6 = document.getElementById('number_8_day6');
        const number_9_day6 = document.getElementById('number_9_day6');
        if (inputElement) {
            inputElement.addEventListener('keydown', enforceFormat);
            inputElement.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day0) {
            number_0_day0.addEventListener('keydown', enforceFormat);
            number_0_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day0) {
            number_1_day0.addEventListener('keydown', enforceFormat);
            number_1_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day0) {
            number_2_day0.addEventListener('keydown', enforceFormat);
            number_2_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day0) {
            number_3_day0.addEventListener('keydown', enforceFormat);
            number_3_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day0) {
            number_4_day0.addEventListener('keydown', enforceFormat);
            number_4_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day0) {
            number_5_day0.addEventListener('keydown', enforceFormat);
            number_5_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day0) {
            number_6_day0.addEventListener('keydown', enforceFormat);
            number_6_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day0) {
            number_7_day0.addEventListener('keydown', enforceFormat);
            number_7_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day0) {
            number_8_day0.addEventListener('keydown', enforceFormat);
            number_8_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day0) {
            number_9_day0.addEventListener('keydown', enforceFormat);
            number_9_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day1) {
            number_0_day1.addEventListener('keydown', enforceFormat);
            number_0_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day1) {
            number_1_day1.addEventListener('keydown', enforceFormat);
            number_1_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day1) {
            number_2_day1.addEventListener('keydown', enforceFormat);
            number_2_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day1) {
            number_3_day1.addEventListener('keydown', enforceFormat);
            number_3_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day1) {
            number_4_day1.addEventListener('keydown', enforceFormat);
            number_4_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day1) {
            number_5_day1.addEventListener('keydown', enforceFormat);
            number_5_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day1) {
            number_6_day1.addEventListener('keydown', enforceFormat);
            number_6_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day1) {
            number_7_day1.addEventListener('keydown', enforceFormat);
            number_7_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day1) {
            number_8_day1.addEventListener('keydown', enforceFormat);
            number_8_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day1) {
            number_9_day1.addEventListener('keydown', enforceFormat);
            number_9_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day2) {
            number_0_day2.addEventListener('keydown', enforceFormat);
            number_0_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day2) {
            number_1_day2.addEventListener('keydown', enforceFormat);
            number_1_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day2) {
            number_2_day2.addEventListener('keydown', enforceFormat);
            number_2_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day2) {
            number_3_day2.addEventListener('keydown', enforceFormat);
            number_3_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day2) {
            number_4_day2.addEventListener('keydown', enforceFormat);
            number_4_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day2) {
            number_5_day2.addEventListener('keydown', enforceFormat);
            number_5_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day2) {
            number_6_day2.addEventListener('keydown', enforceFormat);
            number_6_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day2) {
            number_7_day2.addEventListener('keydown', enforceFormat);
            number_7_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day2) {
            number_8_day2.addEventListener('keydown', enforceFormat);
            number_8_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day2) {
            number_9_day2.addEventListener('keydown', enforceFormat);
            number_9_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day3) {
            number_0_day3.addEventListener('keydown', enforceFormat);
            number_0_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day3) {
            number_1_day3.addEventListener('keydown', enforceFormat);
            number_1_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day3) {
            number_2_day3.addEventListener('keydown', enforceFormat);
            number_2_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day3) {
            number_3_day3.addEventListener('keydown', enforceFormat);
            number_3_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day3) {
            number_4_day3.addEventListener('keydown', enforceFormat);
            number_4_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day3) {
            number_5_day3.addEventListener('keydown', enforceFormat);
            number_5_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day3) {
            number_6_day3.addEventListener('keydown', enforceFormat);
            number_6_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day3) {
            number_7_day3.addEventListener('keydown', enforceFormat);
            number_7_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day3) {
            number_8_day3.addEventListener('keydown', enforceFormat);
            number_8_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day3) {
            number_9_day3.addEventListener('keydown', enforceFormat);
            number_9_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day4) {
            number_0_day4.addEventListener('keydown', enforceFormat);
            number_0_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day4) {
            number_1_day4.addEventListener('keydown', enforceFormat);
            number_1_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day4) {
            number_2_day4.addEventListener('keydown', enforceFormat);
            number_2_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day4) {
            number_3_day4.addEventListener('keydown', enforceFormat);
            number_3_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day4) {
            number_4_day4.addEventListener('keydown', enforceFormat);
            number_4_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day4) {
            number_5_day4.addEventListener('keydown', enforceFormat);
            number_5_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day4) {
            number_6_day4.addEventListener('keydown', enforceFormat);
            number_6_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day4) {
            number_7_day4.addEventListener('keydown', enforceFormat);
            number_7_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day4) {
            number_8_day4.addEventListener('keydown', enforceFormat);
            number_8_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day4) {
            number_9_day4.addEventListener('keydown', enforceFormat);
            number_9_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day4) {
            number_0_day4.addEventListener('keydown', enforceFormat);
            number_0_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day4) {
            number_1_day4.addEventListener('keydown', enforceFormat);
            number_1_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day4) {
            number_2_day4.addEventListener('keydown', enforceFormat);
            number_2_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day4) {
            number_3_day4.addEventListener('keydown', enforceFormat);
            number_3_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day4) {
            number_4_day4.addEventListener('keydown', enforceFormat);
            number_4_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day4) {
            number_5_day4.addEventListener('keydown', enforceFormat);
            number_5_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day4) {
            number_6_day4.addEventListener('keydown', enforceFormat);
            number_6_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day4) {
            number_7_day4.addEventListener('keydown', enforceFormat);
            number_7_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day4) {
            number_8_day4.addEventListener('keydown', enforceFormat);
            number_8_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day4) {
            number_9_day4.addEventListener('keydown', enforceFormat);
            number_9_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day5) {
            number_0_day5.addEventListener('keydown', enforceFormat);
            number_0_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day5) {
            number_1_day5.addEventListener('keydown', enforceFormat);
            number_1_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day5) {
            number_2_day5.addEventListener('keydown', enforceFormat);
            number_2_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day5) {
            number_3_day5.addEventListener('keydown', enforceFormat);
            number_3_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day5) {
            number_4_day5.addEventListener('keydown', enforceFormat);
            number_4_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day5) {
            number_5_day5.addEventListener('keydown', enforceFormat);
            number_5_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day5) {
            number_6_day5.addEventListener('keydown', enforceFormat);
            number_6_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day5) {
            number_7_day5.addEventListener('keydown', enforceFormat);
            number_7_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day5) {
            number_8_day5.addEventListener('keydown', enforceFormat);
            number_8_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day5) {
            number_9_day5.addEventListener('keydown', enforceFormat);
            number_9_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day6) {
            number_0_day6.addEventListener('keydown', enforceFormat);
            number_0_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day6) {
            number_1_day6.addEventListener('keydown', enforceFormat);
            number_1_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day6) {
            number_2_day6.addEventListener('keydown', enforceFormat);
            number_2_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day6) {
            number_3_day6.addEventListener('keydown', enforceFormat);
            number_3_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day6) {
            number_4_day6.addEventListener('keydown', enforceFormat);
            number_4_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day6) {
            number_5_day6.addEventListener('keydown', enforceFormat);
            number_5_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day6) {
            number_6_day6.addEventListener('keydown', enforceFormat);
            number_6_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day6) {
            number_7_day6.addEventListener('keydown', enforceFormat);
            number_7_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day6) {
            number_8_day6.addEventListener('keydown', enforceFormat);
            number_8_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day6) {
            number_9_day6.addEventListener('keydown', enforceFormat);
            number_9_day6.addEventListener('keyup', formatToPhone);
        }
        const editnumber_0_day0 = document.getElementById('editnumber_0_day0');
        const editnumber_1_day0 = document.getElementById('editnumber_1_day0');
        const editnumber_2_day0 = document.getElementById('editnumber_2_day0');
        const editnumber_3_day0 = document.getElementById('editnumber_3_day0');
        const editnumber_4_day0 = document.getElementById('editnumber_4_day0');
        const editnumber_5_day0 = document.getElementById('editnumber_5_day0');
        const editnumber_6_day0 = document.getElementById('editnumber_6_day0');
        const editnumber_7_day0 = document.getElementById('editnumber_7_day0');
        const editnumber_8_day0 = document.getElementById('editnumber_8_day0');
        const editnumber_9_day0 = document.getElementById('editnumber_9_day0');
        const editnumber_0_day1 = document.getElementById('editnumber_0_day1');
        const editnumber_1_day1 = document.getElementById('editnumber_1_day1');
        const editnumber_2_day1 = document.getElementById('editnumber_2_day1');
        const editnumber_3_day1 = document.getElementById('editnumber_3_day1');
        const editnumber_4_day1 = document.getElementById('editnumber_4_day1');
        const editnumber_5_day1 = document.getElementById('editnumber_5_day1');
        const editnumber_6_day1 = document.getElementById('editnumber_6_day1');
        const editnumber_7_day1 = document.getElementById('editnumber_7_day1');
        const editnumber_8_day1 = document.getElementById('editnumber_8_day1');
        const editnumber_9_day1 = document.getElementById('editnumber_9_day1');
        const editnumber_0_day2 = document.getElementById('editnumber_0_day2');
        const editnumber_1_day2 = document.getElementById('editnumber_1_day2');
        const editnumber_2_day2 = document.getElementById('editnumber_2_day2');
        const editnumber_3_day2 = document.getElementById('editnumber_3_day2');
        const editnumber_4_day2 = document.getElementById('editnumber_4_day2');
        const editnumber_5_day2 = document.getElementById('editnumber_5_day2');
        const editnumber_6_day2 = document.getElementById('editnumber_6_day2');
        const editnumber_7_day2 = document.getElementById('editnumber_7_day2');
        const editnumber_8_day2 = document.getElementById('editnumber_8_day2');
        const editnumber_9_day2 = document.getElementById('editnumber_9_day2');
        const editnumber_0_day3 = document.getElementById('editnumber_0_day3');
        const editnumber_1_day3 = document.getElementById('editnumber_1_day3');
        const editnumber_2_day3 = document.getElementById('editnumber_2_day3');
        const editnumber_3_day3 = document.getElementById('editnumber_3_day3');
        const editnumber_4_day3 = document.getElementById('editnumber_4_day3');
        const editnumber_5_day3 = document.getElementById('editnumber_5_day3');
        const editnumber_6_day3 = document.getElementById('editnumber_6_day3');
        const editnumber_7_day3 = document.getElementById('editnumber_7_day3');
        const editnumber_8_day3 = document.getElementById('editnumber_8_day3');
        const editnumber_9_day3 = document.getElementById('editnumber_9_day3');
        const editnumber_0_day4 = document.getElementById('editnumber_0_day4');
        const editnumber_1_day4 = document.getElementById('editnumber_1_day4');
        const editnumber_2_day4 = document.getElementById('editnumber_2_day4');
        const editnumber_3_day4 = document.getElementById('editnumber_3_day4');
        const editnumber_4_day4 = document.getElementById('editnumber_4_day4');
        const editnumber_5_day4 = document.getElementById('editnumber_5_day4');
        const editnumber_6_day4 = document.getElementById('editnumber_6_day4');
        const editnumber_7_day4 = document.getElementById('editnumber_7_day4');
        const editnumber_8_day4 = document.getElementById('editnumber_8_day4');
        const editnumber_9_day4 = document.getElementById('editnumber_9_day4');
        const editnumber_0_day5 = document.getElementById('editnumber_0_day5');
        const editnumber_1_day5 = document.getElementById('editnumber_1_day5');
        const editnumber_2_day5 = document.getElementById('editnumber_2_day5');
        const editnumber_3_day5 = document.getElementById('editnumber_3_day5');
        const editnumber_4_day5 = document.getElementById('editnumber_4_day5');
        const editnumber_5_day5 = document.getElementById('editnumber_5_day5');
        const editnumber_6_day5 = document.getElementById('editnumber_6_day5');
        const editnumber_7_day5 = document.getElementById('editnumber_7_day5');
        const editnumber_8_day5 = document.getElementById('editnumber_8_day5');
        const editnumber_9_day5 = document.getElementById('editnumber_9_day5');
        const editnumber_0_day6 = document.getElementById('editnumber_0_day6');
        const editnumber_1_day6 = document.getElementById('editnumber_1_day6');
        const editnumber_2_day6 = document.getElementById('editnumber_2_day6');
        const editnumber_3_day6 = document.getElementById('editnumber_3_day6');
        const editnumber_4_day6 = document.getElementById('editnumber_4_day6');
        const editnumber_5_day6 = document.getElementById('editnumber_5_day6');
        const editnumber_6_day6 = document.getElementById('editnumber_6_day6');
        const editnumber_7_day6 = document.getElementById('editnumber_7_day6');
        const editnumber_8_day6 = document.getElementById('editnumber_8_day6');
        const editnumber_9_day6 = document.getElementById('editnumber_9_day6');
        if (editnumber_0_day0) {
            editnumber_0_day0.addEventListener('keydown', enforceFormat);
            editnumber_0_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day0) {
            editnumber_1_day0.addEventListener('keydown', enforceFormat);
            editnumber_1_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day0) {
            editnumber_2_day0.addEventListener('keydown', enforceFormat);
            editnumber_2_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day0) {
            editnumber_3_day0.addEventListener('keydown', enforceFormat);
            editnumber_3_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day0) {
            editnumber_4_day0.addEventListener('keydown', enforceFormat);
            editnumber_4_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day0) {
            editnumber_5_day0.addEventListener('keydown', enforceFormat);
            editnumber_5_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day0) {
            editnumber_6_day0.addEventListener('keydown', enforceFormat);
            editnumber_6_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day0) {
            editnumber_7_day0.addEventListener('keydown', enforceFormat);
            editnumber_7_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day0) {
            editnumber_8_day0.addEventListener('keydown', enforceFormat);
            editnumber_8_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day0) {
            editnumber_9_day0.addEventListener('keydown', enforceFormat);
            editnumber_9_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day1) {
            editnumber_0_day1.addEventListener('keydown', enforceFormat);
            editnumber_0_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day1) {
            editnumber_1_day1.addEventListener('keydown', enforceFormat);
            editnumber_1_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day1) {
            editnumber_2_day1.addEventListener('keydown', enforceFormat);
            editnumber_2_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day1) {
            editnumber_3_day1.addEventListener('keydown', enforceFormat);
            editnumber_3_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day1) {
            editnumber_4_day1.addEventListener('keydown', enforceFormat);
            editnumber_4_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day1) {
            editnumber_5_day1.addEventListener('keydown', enforceFormat);
            editnumber_5_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day1) {
            editnumber_6_day1.addEventListener('keydown', enforceFormat);
            editnumber_6_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day1) {
            editnumber_7_day1.addEventListener('keydown', enforceFormat);
            editnumber_7_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day1) {
            editnumber_8_day1.addEventListener('keydown', enforceFormat);
            editnumber_8_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day1) {
            editnumber_9_day1.addEventListener('keydown', enforceFormat);
            editnumber_9_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day2) {
            editnumber_0_day2.addEventListener('keydown', enforceFormat);
            editnumber_0_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day2) {
            editnumber_1_day2.addEventListener('keydown', enforceFormat);
            editnumber_1_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day2) {
            editnumber_2_day2.addEventListener('keydown', enforceFormat);
            editnumber_2_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day2) {
            editnumber_3_day2.addEventListener('keydown', enforceFormat);
            editnumber_3_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day2) {
            editnumber_4_day2.addEventListener('keydown', enforceFormat);
            editnumber_4_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day2) {
            editnumber_5_day2.addEventListener('keydown', enforceFormat);
            editnumber_5_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day2) {
            editnumber_6_day2.addEventListener('keydown', enforceFormat);
            editnumber_6_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day2) {
            editnumber_7_day2.addEventListener('keydown', enforceFormat);
            editnumber_7_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day2) {
            editnumber_8_day2.addEventListener('keydown', enforceFormat);
            editnumber_8_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day2) {
            editnumber_9_day2.addEventListener('keydown', enforceFormat);
            editnumber_9_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day3) {
            editnumber_0_day3.addEventListener('keydown', enforceFormat);
            editnumber_0_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day3) {
            editnumber_1_day3.addEventListener('keydown', enforceFormat);
            editnumber_1_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day3) {
            editnumber_2_day3.addEventListener('keydown', enforceFormat);
            editnumber_2_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day3) {
            editnumber_3_day3.addEventListener('keydown', enforceFormat);
            editnumber_3_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day3) {
            editnumber_4_day3.addEventListener('keydown', enforceFormat);
            editnumber_4_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day3) {
            editnumber_5_day3.addEventListener('keydown', enforceFormat);
            editnumber_5_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day3) {
            editnumber_6_day3.addEventListener('keydown', enforceFormat);
            editnumber_6_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day3) {
            editnumber_7_day3.addEventListener('keydown', enforceFormat);
            editnumber_7_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day3) {
            editnumber_8_day3.addEventListener('keydown', enforceFormat);
            editnumber_8_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day3) {
            editnumber_9_day3.addEventListener('keydown', enforceFormat);
            editnumber_9_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day4) {
            editnumber_0_day4.addEventListener('keydown', enforceFormat);
            editnumber_0_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day4) {
            editnumber_1_day4.addEventListener('keydown', enforceFormat);
            editnumber_1_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day4) {
            editnumber_2_day4.addEventListener('keydown', enforceFormat);
            editnumber_2_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day4) {
            editnumber_3_day4.addEventListener('keydown', enforceFormat);
            editnumber_3_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day4) {
            editnumber_4_day4.addEventListener('keydown', enforceFormat);
            editnumber_4_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day4) {
            editnumber_5_day4.addEventListener('keydown', enforceFormat);
            editnumber_5_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day4) {
            editnumber_6_day4.addEventListener('keydown', enforceFormat);
            editnumber_6_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day4) {
            editnumber_7_day4.addEventListener('keydown', enforceFormat);
            editnumber_7_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day4) {
            editnumber_8_day4.addEventListener('keydown', enforceFormat);
            editnumber_8_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day4) {
            editnumber_9_day4.addEventListener('keydown', enforceFormat);
            editnumber_9_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day5) {
            editnumber_0_day5.addEventListener('keydown', enforceFormat);
            editnumber_0_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day5) {
            editnumber_1_day5.addEventListener('keydown', enforceFormat);
            editnumber_1_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day5) {
            editnumber_2_day5.addEventListener('keydown', enforceFormat);
            editnumber_2_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day5) {
            editnumber_3_day5.addEventListener('keydown', enforceFormat);
            editnumber_3_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day5) {
            editnumber_4_day5.addEventListener('keydown', enforceFormat);
            editnumber_4_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day5) {
            editnumber_5_day5.addEventListener('keydown', enforceFormat);
            editnumber_5_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day5) {
            editnumber_6_day5.addEventListener('keydown', enforceFormat);
            editnumber_6_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day5) {
            editnumber_7_day5.addEventListener('keydown', enforceFormat);
            editnumber_7_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day5) {
            editnumber_8_day5.addEventListener('keydown', enforceFormat);
            editnumber_8_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day5) {
            editnumber_9_day5.addEventListener('keydown', enforceFormat);
            editnumber_9_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day6) {
            editnumber_0_day6.addEventListener('keydown', enforceFormat);
            editnumber_0_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day6) {
            editnumber_1_day6.addEventListener('keydown', enforceFormat);
            editnumber_1_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day6) {
            editnumber_2_day6.addEventListener('keydown', enforceFormat);
            editnumber_2_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day6) {
            editnumber_3_day6.addEventListener('keydown', enforceFormat);
            editnumber_3_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day6) {
            editnumber_4_day6.addEventListener('keydown', enforceFormat);
            editnumber_4_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day6) {
            editnumber_5_day6.addEventListener('keydown', enforceFormat);
            editnumber_5_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day6) {
            editnumber_6_day6.addEventListener('keydown', enforceFormat);
            editnumber_6_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day6) {
            editnumber_7_day6.addEventListener('keydown', enforceFormat);
            editnumber_7_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day6) {
            editnumber_8_day6.addEventListener('keydown', enforceFormat);
            editnumber_8_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day6) {
            editnumber_9_day6.addEventListener('keydown', enforceFormat);
            editnumber_9_day6.addEventListener('keyup', formatToPhone);
        }
    }
    getAllRuleset() {
        this.moduleService.getRules(this.currentCompany.uuid).subscribe(res => {
            // console.log(res);        
            this.allrules = res.rule_data;
        });
    }
    getIVRMenu() {
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getIVRMenus(this.currentCompany.uuid).subscribe(res => {
            this.ivrmenus = res;
            // console.log(this.ivrmenus);
        }, error => this.error = error);
    }
    get rules() { return this.addFSLRules.controls; }
    onFSLSubmit() {
        this.FSLRulesSubmitted = true;
        // stop here if form is invalid
        if (this.addFSLRules.invalid) {
            return;
        }
        // console.log(this.addFSLRules.get('start_time_0').value._d);
        //  return false;
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // console.log(this.addFSLRules.value); return false;     
        this.moduleService.addFSLRules(this.addFSLRules.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res);
            // return false;  
            // localStorage.setItem('FSLRulesInsertID', JSON.stringify(res.insertid));
            this.addFSL();
            if (res.status !== 'error') {
                this.toastrService.success('FSL Rules Added Successfully');
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    get editrules() { return this.editFSLRules.controls; }
    onFSLEditSubmit() {
        this.FSLRulesEditSubmitted = true;
        // stop here if form is invalid
        if (this.editFSLRules.invalid) {
            return;
        }
        this.editFSLRules.get('rulename').setValue(this.forwarding);
        // console.log(this.editFSLRules.value);
        // return false;
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // console.log(this.currentUser.uuid); return false;     
        this.moduleService.editFSLRules(this.editFSLRules.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res);
            // return false;  
            // localStorage.setItem('FSLRulesInsertID', JSON.stringify(res.insertid));
            if (res.status !== 'error') {
                this.toastrService.success('FSL Rules Updated Successfully');
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    getRules() {
        // alert('ok');
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.FSLRulesInsertID = localStorage.getItem('FSLRulesInsertID');
        // console.log(this.FSLRulesInsertID);return false;
        this.moduleService.getRecentRules(this.FSLRulesInsertID, this.currentCompany.uuid).subscribe(res => {
            // console.log(res.noofforwardinglocation);
            this.rulesData = res;
        }, error => this.error = error);
    }
    get_jklrules(event) {
        this.jklrules = event.target.checked;
    }
    global_revenue_cap(event) {
        this.global_revenuecap = event.target.checked;
    }
    global_cap(event) {
        this.globalcap = event.target.checked;
    }
    monthly_cap(event) {
        this.monthlycap = event.target.checked;
    }
    daily_cap(event) {
        this.dailycap = event.target.checked;
    }
    hourly_cap(event) {
        this.hourlycap = event.target.checked;
    }
    ringtree_toggle(event) {
        this.ringtree = event.target.checked;
        console.log(event.target.checked);
        if (event.target.checked == true) {
            this.ringtreetext = "Ring Tree";
        }
        else {
            this.ringtreetext = "Simple";
        }
    }
    methodtype(event) {
        this.methodtypeval = event.target.value;
    }
    dtmf_auto_toggle(event) {
        this.dtmf_auto = event.target.checked;
    }
    dtmf_zipcode_enable_toggle(event) {
        this.dtmf_zipcode_enable = event.target.checked;
    }
    monthly_revenue_cap(event) {
        this.monthly_revenuecap = event.target.checked;
    }
    daily_revenue_cap(event) {
        this.daily_revenuecap = event.target.checked;
    }
    hourly_revenue_cap(event) {
        this.hourly_revenuecap = event.target.checked;
    }
    get_maxcon(event) {
        this.maxconcurrency = event.target.checked;
    }
    get_disableRecordings(event) {
        this.disableRecordings = event.target.checked;
    }
    get_hourlyconcurrency(event) {
        this.hourlyconcurrency = event.target.checked;
    }
    getTimeonehrs(event) {
        this.timeonehrs = event.target.value;
        if (this.timetwohrs < this.timeonehrs) {
            this.getTimeerror();
        }
    }
    getTimeonemin(event) {
        this.timeonemin = event.target.value;
        if (this.timetwohrs == this.timeonehrs && this.timetwomin <= this.timeonemin) {
            this.getTimeerror();
        }
    }
    getTimetwohrs(event) {
        this.timetwohrs = event.target.value;
        if (this.timetwohrs < this.timeonehrs) {
            this.getTimeerror();
        }
    }
    getTimetwomin(event) {
        this.timetwomin = event.target.value;
        if (this.timetwohrs == this.timeonehrs && this.timetwomin <= this.timeonemin) {
            this.getTimeerror();
        }
    }
    getTimetwohrs1(event) {
        this.timeonehrs1 = event.target.value;
        if (this.timetwohrs1 < this.timeonehrs1) {
            this.getTimeerror();
        }
    }
    getTimetwomin1(event) {
        this.timeonemin1 = event.target.value;
        if (this.timetwohrs1 == this.timeonehrs1 && this.timetwomin <= this.timeonemin1) {
            this.getTimeerror();
        }
    }
    getTimetwohrs2(event) {
        this.timetwohrs1 = event.target.value;
        if (this.timetwohrs1 < this.timeonehrs1) {
            this.getTimeerror();
        }
    }
    getTimetwomin2(event) {
        this.timetwomin1 = event.target.value;
        if (this.timetwohrs1 == this.timeonehrs1 && this.timetwomin1 <= this.timeonemin1) {
            this.getTimeerror();
        }
    }
    getTimeerror() {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Error!', 'Closing Time must be greater than Opening Time.');
    }
    validatename() {
        this.moduleService.validatename(this.addFSLRules.get('name').value).subscribe(res => {
            // console.log(res); return false;  
            this.isName = res;
            if (this.isName.status == 'success') {
                this.isName = "success";
            }
            else {
                this.isName = "fail";
            }
            // console.log(this.isName); return false;  
        }
        // }
        );
    }
    getFSLbyuuid(uuid) {
        // alert(uuid);
        // console.log(uuid);
        this.moduleService.getFSLbyuuid(uuid).subscribe(res => {
            this.forwarding = res.forwarding[0].name;
            this.forwardingtimeframe = res.forwarding[0].nooftimeframe;
            this.noofforwarding = res.forwarding[0].nooftimeframe;
            for (let index = 0; index < res.forwarding.length; index++) {
                var start = res.forwarding[index].start_time.split(':');
                var end = res.forwarding[index].end_time.split(':');
                var starthrs = 'start_hrs_' + index;
                var startmin = 'start_min_' + index;
                var endhrs = 'end_hrs_' + index;
                var endmin = 'end_min_' + index;
                // var endkey ='end_time_'+index;
                var daykey = 'day_' + index;
                // console.log(start[0]);
                this.editFSLRules.patchValue({
                    [daykey]: res.forwarding[index].timeofday,
                    // [startkey]: new Date(new Date().setHours(start[0], start[1])),
                    [starthrs]: start[0],
                    [startmin]: start[1],
                    [endhrs]: end[0],
                    [endmin]: end[1],
                });
                for (let j = 0; j < res.forwarding[index].locations.length; j++) {
                    var inc = j + 1;
                    // var forlocationkey ='noofforwardinglocation_'+inc;
                    var PrimaryforwardType = 'PrimaryforwardType_' + j + '_day' + index;
                    var number_value = 'number_' + j + '_day' + index;
                    var ivr_value = 'ivrMenu_' + j + '_day' + index;
                    var sip_value = 'sipAdd_' + j + '_day' + index;
                    // this.flag =res.forwarding[index].locations[j].primary_forwarding_type;
                    // console.log(res.forwarding[index].locations[j].primary_forwarding_type);
                    if (res.forwarding[index].locations[j].primary_forwarding_type == 0) {
                        this.setPrimaryforward(0, j, index);
                        this.flag = 0;
                    }
                    if (res.forwarding[index].locations[j].primary_forwarding_type == 1) {
                        this.setPrimaryforward(1, j, index);
                        this.flag = 1;
                    }
                    if (res.forwarding[index].locations[j].primary_forwarding_type == 2) {
                        this.flag = 2;
                        this.setPrimaryforward(2, j, index);
                    }
                    if (res.forwarding[index].locations[j].primary_forwarding_number != '') {
                        var number = res.forwarding[index].locations[j].primary_forwarding_number;
                        var formatted = '(' + number.substr(0, 3) + ') ' + number.substr(3, 3) + '-' + number.substr(6, 4);
                    }
                    else {
                        var formatted = "";
                    }
                    if (index == 0) {
                        this.noofforwardinglocation_1 = res.forwarding[index].locations[j].noofforwardinglocation;
                        // if(this.noofforwardinglocation_1!=1)  {
                        // this.noofforwardinglocation_1++;                             
                        // }
                    }
                    //  console.log(res.forwarding[index].locations[j].noofforwardinglocation);
                    if (index == 1) {
                        this.noofforwardinglocation_2 = res.forwarding[index].locations[j].noofforwardinglocation;
                        // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                        //   this.noofforwardinglocation_2++;                             
                        //   }
                    }
                    if (index == 2) {
                        this.noofforwardinglocation_3 = res.forwarding[index].locations[j].noofforwardinglocation;
                        // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                        //   this.noofforwardinglocation_3++;                             
                        // }                              
                    }
                    if (index == 3) {
                        this.noofforwardinglocation_4 = res.forwarding[index].locations[j].noofforwardinglocation;
                        // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                        //   this.noofforwardinglocation_4++;                             
                        // }                              
                    }
                    if (index == 4) {
                        this.noofforwardinglocation_5 = res.forwarding[index].locations[j].noofforwardinglocation;
                        // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                        //   this.noofforwardinglocation_5++;                             
                        // }                                
                    }
                    if (index == 5) {
                        this.noofforwardinglocation_6 = res.forwarding[index].locations[j].noofforwardinglocation;
                    }
                    if (index == 6) {
                        this.noofforwardinglocation_7 = res.forwarding[index].locations[j].noofforwardinglocation;
                    }
                    // console.log(index);
                    this.editFSLRules.patchValue({
                        // [forlocationkey]: res.forwarding[index].locations[j].noofforwardinglocation,
                        [PrimaryforwardType]: this.flag,
                        [number_value]: formatted,
                        [ivr_value]: res.forwarding[index].locations[j].primary_forwarding_ivr,
                        [sip_value]: res.forwarding[index].locations[j].primary_forwarding_sip,
                    });
                }
            }
        }, error => this.error = error);
    }
    addFSL() {
        this.FSLRulesSubmitted = false;
        this.addFSLRules.reset();
    }
    getWeekbyuuid(uuid, start_day, end_day) {
        this.editWeekDaysForm.patchValue({
            'uuid': uuid,
            'start_day': start_day,
            'end_day': end_day,
        });
    }
    loadallweekdays() {
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.loadallweekdays(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            this.allweekdays = res.data;
        }, error => this.error = error);
    }
    isfilterselect() {
        this.isfilter = 1;
        this.addForm.get('isfilter').setValue(this.isfilter);
    }
    isfilterclear() {
        this.isfilter = 0;
        this.addForm.get('citystatetype').setValue(1);
        this.addForm.get('citystate').setValue('');
        this.addForm.get('cityval').setValue('');
    }
    ngOnInit() {
        // this.getAllLabels();
        // this.getIVRMenu();
        // this.getAllLabels();
        // this.getAllRuleset();
        this.settings = {
            enableSearchFilter: true,
            singleSelection: true, showCheckbox: false, text: "Select Buyer"
        };
        this.addkeyword = [0];
        this.getIVRMenu();
        this.getAllRules();
        this.gettimezone();
        // this.loadNumbers();
        this.loadallweekdays();
        // this.loadweekdays();
        this.dropdownSettings = {
            singleSelection: false,
            text: "Select Associated Label",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        this.addWeekDaysForm = this.fb.group({
            start_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            end_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
        this.editWeekDaysForm = this.fb.group({
            uuid: ['', ''],
            start_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            end_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
        this.addFSLRules = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            numberoftimeframe: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            noofforwardinglocation_1: ['', ''],
            noofforwardinglocation_2: ['', ''],
            noofforwardinglocation_3: ['', ''],
            noofforwardinglocation_4: ['', ''],
            noofforwardinglocation_5: ['', ''],
            noofforwardinglocation_6: ['', ''],
            noofforwardinglocation_7: ['', ''],
            // Day 1
            day_0: ['', ''],
            start_hrs_0: ['', ''],
            start_min_0: ['', ''],
            end_hrs_0: ['', ''],
            end_min_0: ['', ''],
            PrimaryforwardType_0_day0: ['', ''],
            number_0_day0: ['', ''],
            ivrMenu_0_day0: ['', ''],
            sipAdd_0_day0: ['', ''],
            PrimaryforwardType_1_day0: ['', ''],
            number_1_day0: ['', ''],
            ivrMenu_1_day0: ['', ''],
            sipAdd_1_day0: ['', ''],
            PrimaryforwardType_2_day0: ['', ''],
            number_2_day0: ['', ''],
            ivrMenu_2_day0: ['', ''],
            sipAdd_2_day0: ['', ''],
            PrimaryforwardType_3_day0: ['', ''],
            number_3_day0: ['', ''],
            ivrMenu_3_day0: ['', ''],
            sipAdd_3_day0: ['', ''],
            PrimaryforwardType_4_day0: ['', ''],
            number_4_day0: ['', ''],
            ivrMenu_4_day0: ['', ''],
            sipAdd_4_day0: ['', ''],
            PrimaryforwardType_5_day0: ['', ''],
            number_5_day0: ['', ''],
            ivrMenu_5_day0: ['', ''],
            sipAdd_5_day0: ['', ''],
            PrimaryforwardType_6_day0: ['', ''],
            number_6_day0: ['', ''],
            ivrMenu_6_day0: ['', ''],
            sipAdd_6_day0: ['', ''],
            PrimaryforwardType_7_day0: ['', ''],
            number_7_day0: ['', ''],
            ivrMenu_7_day0: ['', ''],
            sipAdd_7_day0: ['', ''],
            PrimaryforwardType_8_day0: ['', ''],
            number_8_day0: ['', ''],
            ivrMenu_8_day0: ['', ''],
            sipAdd_8_day0: ['', ''],
            PrimaryforwardType_9_day0: ['', ''],
            number_9_day0: ['', ''],
            ivrMenu_9_day0: ['', ''],
            sipAdd_9_day0: ['', ''],
            // Day2
            day_1: ['', ''],
            start_hrs_1: ['', ''],
            start_min_1: ['', ''],
            end_hrs_1: ['', ''],
            end_min_1: ['', ''],
            PrimaryforwardType_0_day1: ['', ''],
            number_0_day1: ['', ''],
            ivrMenu_0_day1: ['', ''],
            sipAdd_0_day1: ['', ''],
            PrimaryforwardType_1_day1: ['', ''],
            number_1_day1: ['', ''],
            ivrMenu_1_day1: ['', ''],
            sipAdd_1_day1: ['', ''],
            PrimaryforwardType_2_day1: ['', ''],
            number_2_day1: ['', ''],
            ivrMenu_2_day1: ['', ''],
            sipAdd_2_day1: ['', ''],
            PrimaryforwardType_3_day1: ['', ''],
            number_3_day1: ['', ''],
            ivrMenu_3_day1: ['', ''],
            sipAdd_3_day1: ['', ''],
            PrimaryforwardType_4_day1: ['', ''],
            number_4_day1: ['', ''],
            ivrMenu_4_day1: ['', ''],
            sipAdd_4_day1: ['', ''],
            PrimaryforwardType_5_day1: ['', ''],
            number_5_day1: ['', ''],
            ivrMenu_5_day1: ['', ''],
            sipAdd_5_day1: ['', ''],
            PrimaryforwardType_6_day1: ['', ''],
            number_6_day1: ['', ''],
            ivrMenu_6_day1: ['', ''],
            sipAdd_6_day1: ['', ''],
            PrimaryforwardType_7_day1: ['', ''],
            number_7_day1: ['', ''],
            ivrMenu_7_day1: ['', ''],
            sipAdd_7_day1: ['', ''],
            PrimaryforwardType_8_day1: ['', ''],
            number_8_day1: ['', ''],
            ivrMenu_8_day1: ['', ''],
            sipAdd_8_day1: ['', ''],
            PrimaryforwardType_9_day1: ['', ''],
            number_9_day1: ['', ''],
            ivrMenu_9_day1: ['', ''],
            sipAdd_9_day1: ['', ''],
            // Day3
            day_2: ['', ''],
            start_hrs_2: ['', ''],
            start_min_2: ['', ''],
            end_hrs_2: ['', ''],
            end_min_2: ['', ''],
            PrimaryforwardType_0_day2: ['', ''],
            number_0_day2: ['', ''],
            ivrMenu_0_day2: ['', ''],
            sipAdd_0_day2: ['', ''],
            PrimaryforwardType_1_day2: ['', ''],
            number_1_day2: ['', ''],
            ivrMenu_1_day2: ['', ''],
            sipAdd_1_day2: ['', ''],
            PrimaryforwardType_2_day2: ['', ''],
            number_2_day2: ['', ''],
            ivrMenu_2_day2: ['', ''],
            sipAdd_2_day2: ['', ''],
            PrimaryforwardType_3_day2: ['', ''],
            number_3_day2: ['', ''],
            ivrMenu_3_day2: ['', ''],
            sipAdd_3_day2: ['', ''],
            PrimaryforwardType_4_day2: ['', ''],
            number_4_day2: ['', ''],
            ivrMenu_4_day2: ['', ''],
            sipAdd_4_day2: ['', ''],
            PrimaryforwardType_5_day2: ['', ''],
            number_5_day2: ['', ''],
            ivrMenu_5_day2: ['', ''],
            sipAdd_5_day2: ['', ''],
            PrimaryforwardType_6_day2: ['', ''],
            number_6_day2: ['', ''],
            ivrMenu_6_day2: ['', ''],
            sipAdd_6_day2: ['', ''],
            PrimaryforwardType_7_day2: ['', ''],
            number_7_day2: ['', ''],
            ivrMenu_7_day2: ['', ''],
            sipAdd_7_day2: ['', ''],
            PrimaryforwardType_8_day2: ['', ''],
            number_8_day2: ['', ''],
            ivrMenu_8_day2: ['', ''],
            sipAdd_8_day2: ['', ''],
            PrimaryforwardType_9_day2: ['', ''],
            number_9_day2: ['', ''],
            ivrMenu_9_day2: ['', ''],
            sipAdd_9_day2: ['', ''],
            // Day4
            day_3: ['', ''],
            start_hrs_3: ['', ''],
            start_min_3: ['', ''],
            end_hrs_3: ['', ''],
            end_min_3: ['', ''],
            PrimaryforwardType_0_day3: ['', ''],
            number_0_day3: ['', ''],
            ivrMenu_0_day3: ['', ''],
            sipAdd_0_day3: ['', ''],
            PrimaryforwardType_1_day3: ['', ''],
            number_1_day3: ['', ''],
            ivrMenu_1_day3: ['', ''],
            sipAdd_1_day3: ['', ''],
            PrimaryforwardType_2_day3: ['', ''],
            number_2_day3: ['', ''],
            ivrMenu_2_day3: ['', ''],
            sipAdd_2_day3: ['', ''],
            PrimaryforwardType_3_day3: ['', ''],
            number_3_day3: ['', ''],
            ivrMenu_3_day3: ['', ''],
            sipAdd_3_day3: ['', ''],
            PrimaryforwardType_4_day3: ['', ''],
            number_4_day3: ['', ''],
            ivrMenu_4_day3: ['', ''],
            sipAdd_4_day3: ['', ''],
            PrimaryforwardType_5_day3: ['', ''],
            number_5_day3: ['', ''],
            ivrMenu_5_day3: ['', ''],
            sipAdd_5_day3: ['', ''],
            PrimaryforwardType_6_day3: ['', ''],
            number_6_day3: ['', ''],
            ivrMenu_6_day3: ['', ''],
            sipAdd_6_day3: ['', ''],
            PrimaryforwardType_7_day3: ['', ''],
            number_7_day3: ['', ''],
            ivrMenu_7_day3: ['', ''],
            sipAdd_7_day3: ['', ''],
            PrimaryforwardType_8_day3: ['', ''],
            number_8_day3: ['', ''],
            ivrMenu_8_day3: ['', ''],
            sipAdd_8_day3: ['', ''],
            PrimaryforwardType_9_day3: ['', ''],
            number_9_day3: ['', ''],
            ivrMenu_9_day3: ['', ''],
            sipAdd_9_day3: ['', ''],
            // Day5
            day_4: ['', ''],
            start_hrs_4: ['', ''],
            start_min_4: ['', ''],
            end_hrs_4: ['', ''],
            end_min_4: ['', ''],
            PrimaryforwardType_0_day4: ['', ''],
            number_0_day4: ['', ''],
            ivrMenu_0_day4: ['', ''],
            sipAdd_0_day4: ['', ''],
            PrimaryforwardType_1_day4: ['', ''],
            number_1_day4: ['', ''],
            ivrMenu_1_day4: ['', ''],
            sipAdd_1_day4: ['', ''],
            PrimaryforwardType_2_day4: ['', ''],
            number_2_day4: ['', ''],
            ivrMenu_2_day4: ['', ''],
            sipAdd_2_day4: ['', ''],
            PrimaryforwardType_3_day4: ['', ''],
            number_3_day4: ['', ''],
            ivrMenu_3_day4: ['', ''],
            sipAdd_3_day4: ['', ''],
            PrimaryforwardType_4_day4: ['', ''],
            number_4_day4: ['', ''],
            ivrMenu_4_day4: ['', ''],
            sipAdd_4_day4: ['', ''],
            PrimaryforwardType_5_day4: ['', ''],
            number_5_day4: ['', ''],
            ivrMenu_5_day4: ['', ''],
            sipAdd_5_day4: ['', ''],
            PrimaryforwardType_6_day4: ['', ''],
            number_6_day4: ['', ''],
            ivrMenu_6_day4: ['', ''],
            sipAdd_6_day4: ['', ''],
            PrimaryforwardType_7_day4: ['', ''],
            number_7_day4: ['', ''],
            ivrMenu_7_day4: ['', ''],
            sipAdd_7_day4: ['', ''],
            PrimaryforwardType_8_day4: ['', ''],
            number_8_day4: ['', ''],
            ivrMenu_8_day4: ['', ''],
            sipAdd_8_day4: ['', ''],
            PrimaryforwardType_9_day4: ['', ''],
            number_9_day4: ['', ''],
            ivrMenu_9_day4: ['', ''],
            sipAdd_9_day4: ['', ''],
            // Day6
            day_5: ['', ''],
            start_hrs_5: ['', ''],
            start_min_5: ['', ''],
            end_hrs_5: ['', ''],
            end_min_5: ['', ''],
            PrimaryforwardType_0_day5: ['', ''],
            number_0_day5: ['', ''],
            ivrMenu_0_day5: ['', ''],
            sipAdd_0_day5: ['', ''],
            PrimaryforwardType_1_day5: ['', ''],
            number_1_day5: ['', ''],
            ivrMenu_1_day5: ['', ''],
            sipAdd_1_day5: ['', ''],
            PrimaryforwardType_2_day5: ['', ''],
            number_2_day5: ['', ''],
            ivrMenu_2_day5: ['', ''],
            sipAdd_2_day5: ['', ''],
            PrimaryforwardType_3_day5: ['', ''],
            number_3_day5: ['', ''],
            ivrMenu_3_day5: ['', ''],
            sipAdd_3_day5: ['', ''],
            PrimaryforwardType_4_day5: ['', ''],
            number_4_day5: ['', ''],
            ivrMenu_4_day5: ['', ''],
            sipAdd_4_day5: ['', ''],
            PrimaryforwardType_5_day5: ['', ''],
            number_5_day5: ['', ''],
            ivrMenu_5_day5: ['', ''],
            sipAdd_5_day5: ['', ''],
            PrimaryforwardType_6_day5: ['', ''],
            number_6_day5: ['', ''],
            ivrMenu_6_day5: ['', ''],
            sipAdd_6_day5: ['', ''],
            PrimaryforwardType_7_day5: ['', ''],
            number_7_day5: ['', ''],
            ivrMenu_7_day5: ['', ''],
            sipAdd_7_day5: ['', ''],
            PrimaryforwardType_8_day5: ['', ''],
            number_8_day5: ['', ''],
            ivrMenu_8_day5: ['', ''],
            sipAdd_8_day5: ['', ''],
            PrimaryforwardType_9_day5: ['', ''],
            number_9_day5: ['', ''],
            ivrMenu_9_day5: ['', ''],
            sipAdd_9_day5: ['', ''],
            // Day7
            day_6: ['', ''],
            start_hrs_6: ['', ''],
            start_min_6: ['', ''],
            end_hrs_6: ['', ''],
            end_min_6: ['', ''],
            PrimaryforwardType_0_day6: ['', ''],
            number_0_day6: ['', ''],
            ivrMenu_0_day6: ['', ''],
            sipAdd_0_day6: ['', ''],
            PrimaryforwardType_1_day6: ['', ''],
            number_1_day6: ['', ''],
            ivrMenu_1_day6: ['', ''],
            sipAdd_1_day6: ['', ''],
            PrimaryforwardType_2_day6: ['', ''],
            number_2_day6: ['', ''],
            ivrMenu_2_day6: ['', ''],
            sipAdd_2_day6: ['', ''],
            PrimaryforwardType_3_day6: ['', ''],
            number_3_day6: ['', ''],
            ivrMenu_3_day6: ['', ''],
            sipAdd_3_day6: ['', ''],
            PrimaryforwardType_4_day6: ['', ''],
            number_4_day6: ['', ''],
            ivrMenu_4_day6: ['', ''],
            sipAdd_4_day6: ['', ''],
            PrimaryforwardType_5_day6: ['', ''],
            number_5_day6: ['', ''],
            ivrMenu_5_day6: ['', ''],
            sipAdd_5_day6: ['', ''],
            PrimaryforwardType_6_day6: ['', ''],
            number_6_day6: ['', ''],
            ivrMenu_6_day6: ['', ''],
            sipAdd_6_day6: ['', ''],
            PrimaryforwardType_7_day6: ['', ''],
            number_7_day6: ['', ''],
            ivrMenu_7_day6: ['', ''],
            sipAdd_7_day6: ['', ''],
            PrimaryforwardType_8_day6: ['', ''],
            number_8_day6: ['', ''],
            ivrMenu_8_day6: ['', ''],
            sipAdd_8_day6: ['', ''],
            PrimaryforwardType_9_day6: ['', ''],
            number_9_day6: ['', ''],
            ivrMenu_9_day6: ['', ''],
            sipAdd_9_day6: ['', ''],
        });
        this.editFSLRules = this.fb.group({
            rulename: ['', ''],
            numberoftimeframe: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            noofforwardinglocation_1: ['', ''],
            noofforwardinglocation_2: ['', ''],
            noofforwardinglocation_3: ['', ''],
            noofforwardinglocation_4: ['', ''],
            noofforwardinglocation_5: ['', ''],
            noofforwardinglocation_6: ['', ''],
            noofforwardinglocation_7: ['', ''],
            // Day 1
            day_0: ['', ''],
            start_hrs_0: ['', ''],
            start_min_0: ['', ''],
            end_hrs_0: ['', ''],
            end_min_0: ['', ''],
            PrimaryforwardType_0_day0: ['', ''],
            number_0_day0: ['', ''],
            ivrMenu_0_day0: ['', ''],
            sipAdd_0_day0: ['', ''],
            PrimaryforwardType_1_day0: ['', ''],
            number_1_day0: ['', ''],
            ivrMenu_1_day0: ['', ''],
            sipAdd_1_day0: ['', ''],
            PrimaryforwardType_2_day0: ['', ''],
            number_2_day0: ['', ''],
            ivrMenu_2_day0: ['', ''],
            sipAdd_2_day0: ['', ''],
            PrimaryforwardType_3_day0: ['', ''],
            number_3_day0: ['', ''],
            ivrMenu_3_day0: ['', ''],
            sipAdd_3_day0: ['', ''],
            PrimaryforwardType_4_day0: ['', ''],
            number_4_day0: ['', ''],
            ivrMenu_4_day0: ['', ''],
            sipAdd_4_day0: ['', ''],
            PrimaryforwardType_5_day0: ['', ''],
            number_5_day0: ['', ''],
            ivrMenu_5_day0: ['', ''],
            sipAdd_5_day0: ['', ''],
            PrimaryforwardType_6_day0: ['', ''],
            number_6_day0: ['', ''],
            ivrMenu_6_day0: ['', ''],
            sipAdd_6_day0: ['', ''],
            PrimaryforwardType_7_day0: ['', ''],
            number_7_day0: ['', ''],
            ivrMenu_7_day0: ['', ''],
            sipAdd_7_day0: ['', ''],
            PrimaryforwardType_8_day0: ['', ''],
            number_8_day0: ['', ''],
            ivrMenu_8_day0: ['', ''],
            sipAdd_8_day0: ['', ''],
            PrimaryforwardType_9_day0: ['', ''],
            number_9_day0: ['', ''],
            ivrMenu_9_day0: ['', ''],
            sipAdd_9_day0: ['', ''],
            // Day2
            day_1: ['', ''],
            start_hrs_1: ['', ''],
            start_min_1: ['', ''],
            end_hrs_1: ['', ''],
            end_min_1: ['', ''],
            PrimaryforwardType_0_day1: ['', ''],
            number_0_day1: ['', ''],
            ivrMenu_0_day1: ['', ''],
            sipAdd_0_day1: ['', ''],
            PrimaryforwardType_1_day1: ['', ''],
            number_1_day1: ['', ''],
            ivrMenu_1_day1: ['', ''],
            sipAdd_1_day1: ['', ''],
            PrimaryforwardType_2_day1: ['', ''],
            number_2_day1: ['', ''],
            ivrMenu_2_day1: ['', ''],
            sipAdd_2_day1: ['', ''],
            PrimaryforwardType_3_day1: ['', ''],
            number_3_day1: ['', ''],
            ivrMenu_3_day1: ['', ''],
            sipAdd_3_day1: ['', ''],
            PrimaryforwardType_4_day1: ['', ''],
            number_4_day1: ['', ''],
            ivrMenu_4_day1: ['', ''],
            sipAdd_4_day1: ['', ''],
            PrimaryforwardType_5_day1: ['', ''],
            number_5_day1: ['', ''],
            ivrMenu_5_day1: ['', ''],
            sipAdd_5_day1: ['', ''],
            PrimaryforwardType_6_day1: ['', ''],
            number_6_day1: ['', ''],
            ivrMenu_6_day1: ['', ''],
            sipAdd_6_day1: ['', ''],
            PrimaryforwardType_7_day1: ['', ''],
            number_7_day1: ['', ''],
            ivrMenu_7_day1: ['', ''],
            sipAdd_7_day1: ['', ''],
            PrimaryforwardType_8_day1: ['', ''],
            number_8_day1: ['', ''],
            ivrMenu_8_day1: ['', ''],
            sipAdd_8_day1: ['', ''],
            PrimaryforwardType_9_day1: ['', ''],
            number_9_day1: ['', ''],
            ivrMenu_9_day1: ['', ''],
            sipAdd_9_day1: ['', ''],
            // Day3
            day_2: ['', ''],
            start_hrs_2: ['', ''],
            start_min_2: ['', ''],
            end_hrs_2: ['', ''],
            end_min_2: ['', ''],
            PrimaryforwardType_0_day2: ['', ''],
            number_0_day2: ['', ''],
            ivrMenu_0_day2: ['', ''],
            sipAdd_0_day2: ['', ''],
            PrimaryforwardType_1_day2: ['', ''],
            number_1_day2: ['', ''],
            ivrMenu_1_day2: ['', ''],
            sipAdd_1_day2: ['', ''],
            PrimaryforwardType_2_day2: ['', ''],
            number_2_day2: ['', ''],
            ivrMenu_2_day2: ['', ''],
            sipAdd_2_day2: ['', ''],
            PrimaryforwardType_3_day2: ['', ''],
            number_3_day2: ['', ''],
            ivrMenu_3_day2: ['', ''],
            sipAdd_3_day2: ['', ''],
            PrimaryforwardType_4_day2: ['', ''],
            number_4_day2: ['', ''],
            ivrMenu_4_day2: ['', ''],
            sipAdd_4_day2: ['', ''],
            PrimaryforwardType_5_day2: ['', ''],
            number_5_day2: ['', ''],
            ivrMenu_5_day2: ['', ''],
            sipAdd_5_day2: ['', ''],
            PrimaryforwardType_6_day2: ['', ''],
            number_6_day2: ['', ''],
            ivrMenu_6_day2: ['', ''],
            sipAdd_6_day2: ['', ''],
            PrimaryforwardType_7_day2: ['', ''],
            number_7_day2: ['', ''],
            ivrMenu_7_day2: ['', ''],
            sipAdd_7_day2: ['', ''],
            PrimaryforwardType_8_day2: ['', ''],
            number_8_day2: ['', ''],
            ivrMenu_8_day2: ['', ''],
            sipAdd_8_day2: ['', ''],
            PrimaryforwardType_9_day2: ['', ''],
            number_9_day2: ['', ''],
            ivrMenu_9_day2: ['', ''],
            sipAdd_9_day2: ['', ''],
            // Day4
            day_3: ['', ''],
            start_hrs_3: ['', ''],
            start_min_3: ['', ''],
            end_hrs_3: ['', ''],
            end_min_3: ['', ''],
            PrimaryforwardType_0_day3: ['', ''],
            number_0_day3: ['', ''],
            ivrMenu_0_day3: ['', ''],
            sipAdd_0_day3: ['', ''],
            PrimaryforwardType_1_day3: ['', ''],
            number_1_day3: ['', ''],
            ivrMenu_1_day3: ['', ''],
            sipAdd_1_day3: ['', ''],
            PrimaryforwardType_2_day3: ['', ''],
            number_2_day3: ['', ''],
            ivrMenu_2_day3: ['', ''],
            sipAdd_2_day3: ['', ''],
            PrimaryforwardType_3_day3: ['', ''],
            number_3_day3: ['', ''],
            ivrMenu_3_day3: ['', ''],
            sipAdd_3_day3: ['', ''],
            PrimaryforwardType_4_day3: ['', ''],
            number_4_day3: ['', ''],
            ivrMenu_4_day3: ['', ''],
            sipAdd_4_day3: ['', ''],
            PrimaryforwardType_5_day3: ['', ''],
            number_5_day3: ['', ''],
            ivrMenu_5_day3: ['', ''],
            sipAdd_5_day3: ['', ''],
            PrimaryforwardType_6_day3: ['', ''],
            number_6_day3: ['', ''],
            ivrMenu_6_day3: ['', ''],
            sipAdd_6_day3: ['', ''],
            PrimaryforwardType_7_day3: ['', ''],
            number_7_day3: ['', ''],
            ivrMenu_7_day3: ['', ''],
            sipAdd_7_day3: ['', ''],
            PrimaryforwardType_8_day3: ['', ''],
            number_8_day3: ['', ''],
            ivrMenu_8_day3: ['', ''],
            sipAdd_8_day3: ['', ''],
            PrimaryforwardType_9_day3: ['', ''],
            number_9_day3: ['', ''],
            ivrMenu_9_day3: ['', ''],
            sipAdd_9_day3: ['', ''],
            // Day5
            day_4: ['', ''],
            start_hrs_4: ['', ''],
            start_min_4: ['', ''],
            end_hrs_4: ['', ''],
            end_min_4: ['', ''],
            PrimaryforwardType_0_day4: ['', ''],
            number_0_day4: ['', ''],
            ivrMenu_0_day4: ['', ''],
            sipAdd_0_day4: ['', ''],
            PrimaryforwardType_1_day4: ['', ''],
            number_1_day4: ['', ''],
            ivrMenu_1_day4: ['', ''],
            sipAdd_1_day4: ['', ''],
            PrimaryforwardType_2_day4: ['', ''],
            number_2_day4: ['', ''],
            ivrMenu_2_day4: ['', ''],
            sipAdd_2_day4: ['', ''],
            PrimaryforwardType_3_day4: ['', ''],
            number_3_day4: ['', ''],
            ivrMenu_3_day4: ['', ''],
            sipAdd_3_day4: ['', ''],
            PrimaryforwardType_4_day4: ['', ''],
            number_4_day4: ['', ''],
            ivrMenu_4_day4: ['', ''],
            sipAdd_4_day4: ['', ''],
            PrimaryforwardType_5_day4: ['', ''],
            number_5_day4: ['', ''],
            ivrMenu_5_day4: ['', ''],
            sipAdd_5_day4: ['', ''],
            PrimaryforwardType_6_day4: ['', ''],
            number_6_day4: ['', ''],
            ivrMenu_6_day4: ['', ''],
            sipAdd_6_day4: ['', ''],
            PrimaryforwardType_7_day4: ['', ''],
            number_7_day4: ['', ''],
            ivrMenu_7_day4: ['', ''],
            sipAdd_7_day4: ['', ''],
            PrimaryforwardType_8_day4: ['', ''],
            number_8_day4: ['', ''],
            ivrMenu_8_day4: ['', ''],
            sipAdd_8_day4: ['', ''],
            PrimaryforwardType_9_day4: ['', ''],
            number_9_day4: ['', ''],
            ivrMenu_9_day4: ['', ''],
            sipAdd_9_day4: ['', ''],
            // Day6
            day_5: ['', ''],
            start_hrs_5: ['', ''],
            start_min_5: ['', ''],
            end_hrs_5: ['', ''],
            end_min_5: ['', ''],
            PrimaryforwardType_0_day5: ['', ''],
            number_0_day5: ['', ''],
            ivrMenu_0_day5: ['', ''],
            sipAdd_0_day5: ['', ''],
            PrimaryforwardType_1_day5: ['', ''],
            number_1_day5: ['', ''],
            ivrMenu_1_day5: ['', ''],
            sipAdd_1_day5: ['', ''],
            PrimaryforwardType_2_day5: ['', ''],
            number_2_day5: ['', ''],
            ivrMenu_2_day5: ['', ''],
            sipAdd_2_day5: ['', ''],
            PrimaryforwardType_3_day5: ['', ''],
            number_3_day5: ['', ''],
            ivrMenu_3_day5: ['', ''],
            sipAdd_3_day5: ['', ''],
            PrimaryforwardType_4_day5: ['', ''],
            number_4_day5: ['', ''],
            ivrMenu_4_day5: ['', ''],
            sipAdd_4_day5: ['', ''],
            PrimaryforwardType_5_day5: ['', ''],
            number_5_day5: ['', ''],
            ivrMenu_5_day5: ['', ''],
            sipAdd_5_day5: ['', ''],
            PrimaryforwardType_6_day5: ['', ''],
            number_6_day5: ['', ''],
            ivrMenu_6_day5: ['', ''],
            sipAdd_6_day5: ['', ''],
            PrimaryforwardType_7_day5: ['', ''],
            number_7_day5: ['', ''],
            ivrMenu_7_day5: ['', ''],
            sipAdd_7_day5: ['', ''],
            PrimaryforwardType_8_day5: ['', ''],
            number_8_day5: ['', ''],
            ivrMenu_8_day5: ['', ''],
            sipAdd_8_day5: ['', ''],
            PrimaryforwardType_9_day5: ['', ''],
            number_9_day5: ['', ''],
            ivrMenu_9_day5: ['', ''],
            sipAdd_9_day5: ['', ''],
            // Day7
            day_6: ['', ''],
            start_hrs_6: ['', ''],
            start_min_6: ['', ''],
            end_hrs_6: ['', ''],
            end_min_6: ['', ''],
            PrimaryforwardType_0_day6: ['', ''],
            number_0_day6: ['', ''],
            ivrMenu_0_day6: ['', ''],
            sipAdd_0_day6: ['', ''],
            PrimaryforwardType_1_day6: ['', ''],
            number_1_day6: ['', ''],
            ivrMenu_1_day6: ['', ''],
            sipAdd_1_day6: ['', ''],
            PrimaryforwardType_2_day6: ['', ''],
            number_2_day6: ['', ''],
            ivrMenu_2_day6: ['', ''],
            sipAdd_2_day6: ['', ''],
            PrimaryforwardType_3_day6: ['', ''],
            number_3_day6: ['', ''],
            ivrMenu_3_day6: ['', ''],
            sipAdd_3_day6: ['', ''],
            PrimaryforwardType_4_day6: ['', ''],
            number_4_day6: ['', ''],
            ivrMenu_4_day6: ['', ''],
            sipAdd_4_day6: ['', ''],
            PrimaryforwardType_5_day6: ['', ''],
            number_5_day6: ['', ''],
            ivrMenu_5_day6: ['', ''],
            sipAdd_5_day6: ['', ''],
            PrimaryforwardType_6_day6: ['', ''],
            number_6_day6: ['', ''],
            ivrMenu_6_day6: ['', ''],
            sipAdd_6_day6: ['', ''],
            PrimaryforwardType_7_day6: ['', ''],
            number_7_day6: ['', ''],
            ivrMenu_7_day6: ['', ''],
            sipAdd_7_day6: ['', ''],
            PrimaryforwardType_8_day6: ['', ''],
            number_8_day6: ['', ''],
            ivrMenu_8_day6: ['', ''],
            sipAdd_8_day6: ['', ''],
            PrimaryforwardType_9_day6: ['', ''],
            number_9_day6: ['', ''],
            ivrMenu_9_day6: ['', ''],
            sipAdd_9_day6: ['', ''],
        });
        this.dropdownSettings = {
            singleSelection: false,
            text: "Select Associated Label",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        // this.citystatedropdownSettings = { 
        //     singleSelection: false, 
        //     text:"Select State",
        //     selectAllText:'Select All',
        //     unSelectAllText:'UnSelect All',
        //     enableSearchFilter: true,
        //     classes:"myclass custom-class"
        //   };   
        this.citydropdownSettings = {
            singleSelection: false,
            text: "Select City",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        this.ivrdropdownSettings = {
            singleSelection: true,
            text: "Select IVR Menu",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        // if(localStorage.getItem('FSLRulesInsertID')){
        // this.getRules();
        // }
        // this.getAllLabels();
        this.addForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            subid: [''],
            buyer: [''],
            settingToggleBlockCallsIfCapped: [''],
            settingToggleType: [''],
            number: [''],
            ivrMenu: [''],
            sip_address: [''],
            voice_mail: ['505050'],
            url: [''],
            http_method: [''],
            content_type: [''],
            body: [''],
            http_headers_name: [''],
            http_headers_value: [''],
            keyword0: [''],
            keyword1: [''],
            keyword2: [''],
            // sip_endpoint: [''], 
            // sip_username: [''], 
            // sip_password: [''], 
            // connection_timeout: [''], 
            // dialivroption: [''], 
            // timezone: ['',Validators.required], 
            hoursofoperation_start: [''],
            hoursofoperation_end: [''],
            start_hrs: [''],
            start_min: [''],
            end_hrs: [''],
            end_min: [''],
            timezone: [''],
            hoursofoperation_start_1: [''],
            hoursofoperation_end_1: [''],
            start_hrs_1: [''],
            start_min_1: [''],
            end_hrs_1: [''],
            end_min_1: [''],
            timezone1: [''],
            capon: [''],
            global_revenuecapvalue: [''],
            monthly_revenuecapvalue: [''],
            daily_revenuecapvalue: [''],
            hourly_revenuecapvalue: [''],
            global_capvalue: [''],
            monthly_capvalue: [''],
            daily_capvalue: [''],
            hourly_capvalue: [''],
            dtmf_value: [''],
            dtmf_interval: [''],
            dtmf_percent: [''],
            maxconvalue: [''],
            restrictdup: [''],
            restrictafter: [''],
            days: [''],
            settingToggleDurationval: [''],
            settingToggleDuration: [''],
            hourlyconcurrencyvalue: [''],
            isfilter: [''],
            citystate: [''],
            cityval: [''],
            citystatetype: [''],
            iscontains: [''],
        });
        this.addForm.patchValue({
            http_method: 0,
            content_type: 0,
            citystatetype: 1,
            iscontains: 0,
            citystate: "",
            restrictafter: 0,
            restrictdup: 2,
            capon: 0,
        });
        this.addBuyerForm = this.fb.group({
            company: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            sub_id: [''],
            allow_buyer_to_pause_target: [''],
            allow_buyer_to_set_target_concurrency: [''],
            allow_buyer_to_dispute_call_conversions: [''],
            limit_revenue: [''],
        });
        this.getcitystate(1, 1);
    }
    addRow(e) {
        this.addkeyword.push(e);
    }
    removeRow(e) {
        this.addkeyword.pop(e);
    }
    getdata() {
        this.moduleService.loadcity(this.addForm.get('citystate').value).subscribe(res => {
            //  console.log(res); return false;  
            this.allcity = res;
        }, error => this.error = error);
    }
    getcitystate(type, datatype) {
        this.moduleService.loadcitystate(type, datatype).subscribe(res => {
            //  console.log(res); return false;  
            this.allcitystate = res;
        }, error => this.error = error);
    }
    settingToggleType(val) {
        this.settingToggleTypeval = val;
        this.addForm.get('settingToggleType').setValue(val);
    }
    settingToggleDuration(val) {
        this.settingToggleDurationvalue = val;
        this.addForm.get('settingToggleDurationval').setValue(val);
    }
    get f() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        if (this.timetwohrs < this.timeonehrs) {
            this.getTimeerror();
            return;
        }
        if (this.timetwohrs == this.timeonehrs && this.timetwomin <= this.timeonemin) {
            this.getTimeerror();
            return;
        }
        if (this.timetwohrs1 < this.timeonehrs1) {
            this.getTimeerror();
            return;
        }
        if (this.timetwohrs1 == this.timeonehrs1 && this.timetwomin1 <= this.timeonemin1) {
            this.getTimeerror();
            return;
        }
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('user_uuid', this.currentUser.uuid);
        formData.append('name', this.addForm.get('name').value);
        formData.append('subid', this.addForm.get('subid').value);
        formData.append('buyer', JSON.stringify(this.addForm.get('buyer').value));
        // console.log(this.addForm.get('buyer').value); return
        // formData.append('settingToggleBlockCallsIfCapped', this.addForm.get('settingToggleBlockCallsIfCapped').value);
        formData.append('settingToggleType', this.addForm.get('settingToggleType').value);
        if (this.settingToggleTypeval == 0) {
            formData.append('number', this.addForm.get('number').value);
        }
        if (this.settingToggleTypeval == 1) {
            formData.append('ivrMenu', JSON.stringify(this.addForm.get('ivrMenu').value));
        }
        if (this.settingToggleTypeval == 2) {
            formData.append('sip_address', this.addForm.get('sip_address').value);
        }
        if (this.settingToggleTypeval == 3) {
            formData.append('voice_mail', this.addForm.get('voice_mail').value);
        }
        // formData.append('connection_timeout', this.addForm.get('connection_timeout').value);  
        // formData.append('disableRecordings', this.disableRecordings);  
        // formData.append('dialivroption', this.addForm.get('dialivroption').value);  
        // formData.append('timezone', this.addForm.get('timezone').value); 
        formData.append('ringtree', this.ringtree);
        if (this.ringtree == 1) {
            formData.append('url', this.addForm.get('url').value);
            formData.append('http_method', this.addForm.get('http_method').value);
            formData.append('content_type', this.addForm.get('content_type').value);
            formData.append('body', this.addForm.get('body').value);
            formData.append('http_headers_name', this.addForm.get('http_headers_name').value);
            formData.append('http_headers_value', this.addForm.get('http_headers_value').value);
            formData.append('keywordlength', this.addkeyword.length);
            formData.append('keyword0', this.addForm.get('keyword0').value);
            formData.append('keyword1', this.addForm.get('keyword1').value);
            formData.append('keyword2', this.addForm.get('keyword2').value);
        }
        formData.append('start_day', this.addForm.get('hoursofoperation_start').value);
        formData.append('end_day', this.addForm.get('hoursofoperation_end').value);
        formData.append('timezone', this.addForm.get('timezone').value);
        var starttime = this.addForm.get('start_hrs').value + ':' + this.addForm.get('start_min').value;
        var endtime = this.addForm.get('end_hrs').value + ':' + this.addForm.get('end_min').value;
        formData.append('start_time', starttime);
        formData.append('end_time', endtime);
        formData.append('isadded', this.isadded);
        if (this.isadded == 1) {
            formData.append('start_day_1', this.addForm.get('hoursofoperation_start_1').value);
            formData.append('end_day_1', this.addForm.get('hoursofoperation_end_1').value);
            var starttime_1 = this.addForm.get('start_hrs_1').value + ':' + this.addForm.get('start_min_1').value;
            var endtime_1 = this.addForm.get('end_hrs_1').value + ':' + this.addForm.get('end_min_1').value;
            formData.append('start_time_1', starttime_1);
            formData.append('end_time_1', endtime_1);
            formData.append('timezone1', this.addForm.get('timezone1').value);
        }
        formData.append('capon', this.addForm.get('capon').value);
        formData.append('is_autodtmf', this.dtmf_auto);
        formData.append('dtmf_zipcode_enable', this.dtmf_zipcode_enable);
        formData.append('dtmf_value', this.addForm.get('dtmf_value').value);
        formData.append('dtmf_interval', this.addForm.get('dtmf_interval').value);
        formData.append('dtmf_percent', this.addForm.get('dtmf_percent').value);
        formData.append('global_revenuecaptoggle', this.global_revenuecap);
        formData.append('global_revenuecapvalue', this.addForm.get('global_revenuecapvalue').value);
        formData.append('monthly_revenuecaptoggle', this.monthly_revenuecap);
        formData.append('monthly_revenuecapvalue', this.addForm.get('monthly_revenuecapvalue').value);
        formData.append('daily_revenuecaptoggle', this.daily_revenuecap);
        formData.append('daily_revenuecapvalue', this.addForm.get('daily_revenuecapvalue').value);
        formData.append('hourly_revenuecaptoggle', this.hourly_revenuecap);
        formData.append('hourly_revenuecapvalue', this.addForm.get('hourly_revenuecapvalue').value);
        formData.append('global_cap', this.globalcap);
        formData.append('monthly_cap', this.monthlycap);
        formData.append('daily_cap', this.dailycap);
        formData.append('hourly_cap', this.hourlycap);
        formData.append('global_capvalue', this.addForm.get('global_capvalue').value);
        formData.append('monthly_capvalue', this.addForm.get('monthly_capvalue').value);
        formData.append('daily_capvalue', this.addForm.get('daily_capvalue').value);
        formData.append('hourly_capvalue', this.addForm.get('hourly_capvalue').value);
        formData.append('addcontoggle', this.maxconcurrency);
        formData.append('maxconvalue', this.addForm.get('maxconvalue').value);
        formData.append('restrictdup', this.addForm.get('restrictdup').value);
        formData.append('restrictafter', this.addForm.get('restrictafter').value);
        formData.append('settingToggleDurationval', this.settingToggleDurationvalue);
        formData.append('days', this.addForm.get('days').value);
        if (this.isfilter == 1) {
            formData.append('isfilter', this.addForm.get('isfilter').value);
            formData.append('citystatetype', this.addForm.get('citystatetype').value);
            formData.append('iscontains', this.addForm.get('iscontains').value);
            formData.append('citystate', JSON.stringify(this.addForm.get('citystate').value));
            formData.append('cityval', JSON.stringify(this.addForm.get('cityval').value));
        }
        const id = this.route.snapshot.paramMap.get('id');
        this.moduleService.addTarget(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Target Added Successfully');
                this.isTargetName = false;
                // localStorage.removeItem('FSLRulesInsertID');
                this.router.navigate(['/target']);
                // this.router.navigate(['/numbers']);
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    validateTargetname() {
        if (this.addForm.get('name').value != '') {
            this.moduleService.validateTargetName(this.addForm.get('name').value).subscribe(res => {
                // console.log(res); return false;  
                this.isTargetName = res;
                if (this.isTargetName.status == 'success') {
                    this.isTargetName = "success";
                }
                else {
                    this.isTargetName = "fail";
                }
            });
        }
        else {
            this.isTargetName = "";
        }
    }
    //Add Buyer
    get buyercontrol() { return this.addBuyerForm.controls; }
    onBuyerSubmit() {
        const formData = new FormData();
        this.BuyerSubmitted = true;
        if (this.addBuyerForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('company', this.addBuyerForm.get('company').value);
        formData.append('sub_id', this.addBuyerForm.get('sub_id').value);
        formData.append('allow_buyer_to_pause_target', this.addBuyerForm.get('allow_buyer_to_pause_target').value);
        formData.append('allow_buyer_to_set_target_concurrency', this.addBuyerForm.get('allow_buyer_to_set_target_concurrency').value);
        formData.append('allow_buyer_to_dispute_call_conversions', this.addBuyerForm.get('allow_buyer_to_dispute_call_conversions').value);
        formData.append('limit_revenue', this.addBuyerForm.get('limit_revenue').value);
        // console.log(formData); return false;
        this.moduleService.addBuyer(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Buyer Added Successfully');
                this.getAllRules();
                this.BuyerSubmitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeBuyerModal() {
        if (this.addBuyerForm.get('company').value) {
            $("#addBuyer").modal("hide");
            $(".custom-switch-input").prop('checked', false);
            this.BuyerSubmitted = false;
            setTimeout(() => { this.addBuyerForm.reset(); }, 2000);
        }
    }
    setPrimaryforward(id, count, day) {
        // Day0
        if (count == 0 && day == 0) {
            this.selectedPrimaryForaward_0_day0 = id;
            this.selectedPrimaryCount_0_day0 = count;
            this.selected_0_day_0 = day;
        }
        if (count == 1 && day == 0) {
            this.selectedPrimaryForaward_1_day0 = id;
            this.selectedPrimaryCount_1_day0 = count;
            this.selected_1_day_0 = day;
        }
        if (count == 2 && day == 0) {
            this.selectedPrimaryForaward_2_day0 = id;
            this.selectedPrimaryCount_2_day0 = count;
            this.selected_2_day_0 = day;
        }
        if (count == 3 && day == 0) {
            this.selectedPrimaryForaward_3_day0 = id;
            this.selectedPrimaryCount_3_day0 = count;
            this.selected_3_day_0 = day;
        }
        if (count == 4 && day == 0) {
            this.selectedPrimaryForaward_4_day0 = id;
            this.selectedPrimaryCount_4_day0 = count;
            this.selected_4_day_0 = day;
        }
        if (count == 5 && day == 0) {
            this.selectedPrimaryForaward_5_day0 = id;
            this.selectedPrimaryCount_5_day0 = count;
            this.selected_5_day_0 = day;
        }
        if (count == 6 && day == 0) {
            this.selectedPrimaryForaward_6_day0 = id;
            this.selectedPrimaryCount_6_day0 = count;
            this.selected_6_day_0 = day;
        }
        if (count == 7 && day == 0) {
            this.selectedPrimaryForaward_7_day0 = id;
            this.selectedPrimaryCount_7_day0 = count;
            this.selected_7_day_0 = day;
        }
        if (count == 8 && day == 0) {
            this.selectedPrimaryForaward_8_day0 = id;
            this.selectedPrimaryCount_8_day0 = count;
            this.selected_8_day_0 = day;
        }
        if (count == 9 && day == 0) {
            this.selectedPrimaryForaward_9_day0 = id;
            this.selectedPrimaryCount_9_day0 = count;
            this.selected_9_day_0 = day;
        }
        // Day1
        if (count == 0 && day == 1) {
            this.selectedPrimaryForaward_0_day1 = id;
            this.selectedPrimaryCount_0_day1 = count;
            this.selected_0_day_1 = day;
        }
        if (count == 1 && day == 1) {
            this.selectedPrimaryForaward_1_day1 = id;
            this.selectedPrimaryCount_1_day1 = count;
            this.selected_1_day_1 = day;
        }
        if (count == 2 && day == 1) {
            this.selectedPrimaryForaward_2_day1 = id;
            this.selectedPrimaryCount_2_day1 = count;
            this.selected_2_day_1 = day;
        }
        if (count == 3 && day == 1) {
            this.selectedPrimaryForaward_3_day1 = id;
            this.selectedPrimaryCount_3_day1 = count;
            this.selected_3_day_1 = day;
        }
        if (count == 4 && day == 1) {
            this.selectedPrimaryForaward_4_day1 = id;
            this.selectedPrimaryCount_4_day1 = count;
            this.selected_4_day_1 = day;
        }
        if (count == 5 && day == 1) {
            this.selectedPrimaryForaward_5_day1 = id;
            this.selectedPrimaryCount_5_day1 = count;
            this.selected_5_day_1 = day;
        }
        if (count == 6 && day == 1) {
            this.selectedPrimaryForaward_6_day1 = id;
            this.selectedPrimaryCount_6_day1 = count;
            this.selected_6_day_1 = day;
        }
        if (count == 7 && day == 1) {
            this.selectedPrimaryForaward_7_day1 = id;
            this.selectedPrimaryCount_7_day1 = count;
            this.selected_7_day_1 = day;
        }
        if (count == 8 && day == 1) {
            this.selectedPrimaryForaward_8_day1 = id;
            this.selectedPrimaryCount_8_day1 = count;
            this.selected_8_day_1 = day;
        }
        if (count == 9 && day == 1) {
            this.selectedPrimaryForaward_9_day1 = id;
            this.selectedPrimaryCount_9_day1 = count;
            this.selected_9_day_1 = day;
        }
        // Day2
        if (count == 0 && day == 2) {
            this.selectedPrimaryForaward_0_day2 = id;
            this.selectedPrimaryCount_0_day2 = count;
            this.selected_0_day_2 = day;
        }
        if (count == 1 && day == 2) {
            this.selectedPrimaryForaward_1_day2 = id;
            this.selectedPrimaryCount_1_day2 = count;
            this.selected_1_day_2 = day;
        }
        if (count == 2 && day == 2) {
            this.selectedPrimaryForaward_2_day2 = id;
            this.selectedPrimaryCount_2_day2 = count;
            this.selected_2_day_2 = day;
        }
        if (count == 3 && day == 2) {
            this.selectedPrimaryForaward_3_day2 = id;
            this.selectedPrimaryCount_3_day2 = count;
            this.selected_3_day_2 = day;
        }
        if (count == 4 && day == 2) {
            this.selectedPrimaryForaward_4_day2 = id;
            this.selectedPrimaryCount_4_day2 = count;
            this.selected_4_day_2 = day;
        }
        if (count == 5 && day == 2) {
            this.selectedPrimaryForaward_5_day2 = id;
            this.selectedPrimaryCount_5_day2 = count;
            this.selected_5_day_2 = day;
        }
        if (count == 6 && day == 2) {
            this.selectedPrimaryForaward_6_day2 = id;
            this.selectedPrimaryCount_6_day2 = count;
            this.selected_6_day_2 = day;
        }
        if (count == 7 && day == 2) {
            this.selectedPrimaryForaward_7_day2 = id;
            this.selectedPrimaryCount_7_day2 = count;
            this.selected_7_day_2 = day;
        }
        if (count == 8 && day == 2) {
            this.selectedPrimaryForaward_8_day2 = id;
            this.selectedPrimaryCount_8_day2 = count;
            this.selected_8_day_2 = day;
        }
        if (count == 9 && day == 2) {
            this.selectedPrimaryForaward_9_day2 = id;
            this.selectedPrimaryCount_9_day2 = count;
            this.selected_9_day_2 = day;
        }
        // Day3
        if (count == 0 && day == 3) {
            this.selectedPrimaryForaward_0_day3 = id;
            this.selectedPrimaryCount_0_day3 = count;
            this.selected_0_day_3 = day;
        }
        if (count == 1 && day == 3) {
            this.selectedPrimaryForaward_1_day3 = id;
            this.selectedPrimaryCount_1_day3 = count;
            this.selected_1_day_3 = day;
        }
        if (count == 2 && day == 3) {
            this.selectedPrimaryForaward_2_day3 = id;
            this.selectedPrimaryCount_2_day3 = count;
            this.selected_2_day_3 = day;
        }
        if (count == 3 && day == 3) {
            this.selectedPrimaryForaward_3_day3 = id;
            this.selectedPrimaryCount_3_day3 = count;
            this.selected_3_day_3 = day;
        }
        if (count == 4 && day == 3) {
            this.selectedPrimaryForaward_4_day3 = id;
            this.selectedPrimaryCount_4_day3 = count;
            this.selected_4_day_3 = day;
        }
        if (count == 5 && day == 3) {
            this.selectedPrimaryForaward_5_day3 = id;
            this.selectedPrimaryCount_5_day3 = count;
            this.selected_5_day_3 = day;
        }
        if (count == 6 && day == 3) {
            this.selectedPrimaryForaward_6_day3 = id;
            this.selectedPrimaryCount_6_day3 = count;
            this.selected_6_day_3 = day;
        }
        if (count == 7 && day == 3) {
            this.selectedPrimaryForaward_7_day3 = id;
            this.selectedPrimaryCount_7_day3 = count;
            this.selected_7_day_3 = day;
        }
        if (count == 8 && day == 3) {
            this.selectedPrimaryForaward_8_day3 = id;
            this.selectedPrimaryCount_8_day3 = count;
            this.selected_8_day_3 = day;
        }
        if (count == 9 && day == 3) {
            this.selectedPrimaryForaward_9_day3 = id;
            this.selectedPrimaryCount_9_day3 = count;
            this.selected_9_day_3 = day;
        }
        // Day4
        if (count == 0 && day == 4) {
            this.selectedPrimaryForaward_0_day4 = id;
            this.selectedPrimaryCount_0_day4 = count;
            this.selected_0_day_4 = day;
        }
        if (count == 1 && day == 4) {
            this.selectedPrimaryForaward_1_day4 = id;
            this.selectedPrimaryCount_1_day4 = count;
            this.selected_1_day_4 = day;
        }
        if (count == 2 && day == 4) {
            this.selectedPrimaryForaward_2_day4 = id;
            this.selectedPrimaryCount_2_day4 = count;
            this.selected_2_day_4 = day;
        }
        if (count == 3 && day == 4) {
            this.selectedPrimaryForaward_3_day4 = id;
            this.selectedPrimaryCount_3_day4 = count;
            this.selected_3_day_4 = day;
        }
        if (count == 4 && day == 4) {
            this.selectedPrimaryForaward_4_day4 = id;
            this.selectedPrimaryCount_4_day4 = count;
            this.selected_4_day_4 = day;
        }
        if (count == 5 && day == 4) {
            this.selectedPrimaryForaward_5_day4 = id;
            this.selectedPrimaryCount_5_day4 = count;
            this.selected_5_day_4 = day;
        }
        if (count == 6 && day == 4) {
            this.selectedPrimaryForaward_6_day4 = id;
            this.selectedPrimaryCount_6_day4 = count;
            this.selected_6_day_4 = day;
        }
        if (count == 7 && day == 4) {
            this.selectedPrimaryForaward_7_day4 = id;
            this.selectedPrimaryCount_7_day4 = count;
            this.selected_7_day_4 = day;
        }
        if (count == 8 && day == 4) {
            this.selectedPrimaryForaward_8_day4 = id;
            this.selectedPrimaryCount_8_day4 = count;
            this.selected_8_day_4 = day;
        }
        if (count == 9 && day == 4) {
            this.selectedPrimaryForaward_9_day4 = id;
            this.selectedPrimaryCount_9_day4 = count;
            this.selected_9_day_4 = day;
        }
    }
    isPrimarySelected(id, count, day) {
        // Day0
        if (count == 0 && day == 0) {
            if (this.selectedPrimaryForaward_0_day0 == id && this.selectedPrimaryCount_0_day0 === count && this.selected_0_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 0) {
            if (this.selectedPrimaryForaward_1_day0 == id && this.selectedPrimaryCount_1_day0 === count && this.selected_1_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 0) {
            if (this.selectedPrimaryForaward_2_day0 == id && this.selectedPrimaryCount_2_day0 === count && this.selected_2_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 0) {
            if (this.selectedPrimaryForaward_3_day0 == id && this.selectedPrimaryCount_3_day0 === count && this.selected_3_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 0) {
            if (this.selectedPrimaryForaward_4_day0 == id && this.selectedPrimaryCount_4_day0 === count && this.selected_4_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 0) {
            if (this.selectedPrimaryForaward_5_day0 == id && this.selectedPrimaryCount_5_day0 === count && this.selected_5_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 0) {
            if (this.selectedPrimaryForaward_6_day0 == id && this.selectedPrimaryCount_6_day0 === count && this.selected_6_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 0) {
            if (this.selectedPrimaryForaward_7_day0 == id && this.selectedPrimaryCount_7_day0 === count && this.selected_7_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 0) {
            if (this.selectedPrimaryForaward_8_day0 == id && this.selectedPrimaryCount_8_day0 === count && this.selected_8_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 0) {
            if (this.selectedPrimaryForaward_9_day0 == id && this.selectedPrimaryCount_9_day0 === count && this.selected_9_day_0 == day)
                return true;
            else
                return false;
        }
        // Day1
        if (count == 0 && day == 1) {
            if (this.selectedPrimaryForaward_0_day1 == id && this.selectedPrimaryCount_0_day1 === count && this.selected_0_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 1) {
            if (this.selectedPrimaryForaward_1_day1 == id && this.selectedPrimaryCount_1_day1 === count && this.selected_1_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 1) {
            if (this.selectedPrimaryForaward_2_day1 == id && this.selectedPrimaryCount_2_day1 === count && this.selected_2_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 1) {
            if (this.selectedPrimaryForaward_3_day1 == id && this.selectedPrimaryCount_3_day1 === count && this.selected_3_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 1) {
            if (this.selectedPrimaryForaward_4_day1 == id && this.selectedPrimaryCount_4_day1 === count && this.selected_4_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 1) {
            if (this.selectedPrimaryForaward_5_day1 == id && this.selectedPrimaryCount_5_day1 === count && this.selected_5_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 1) {
            if (this.selectedPrimaryForaward_6_day1 == id && this.selectedPrimaryCount_6_day1 === count && this.selected_6_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 1) {
            if (this.selectedPrimaryForaward_7_day1 == id && this.selectedPrimaryCount_7_day1 === count && this.selected_7_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 1) {
            if (this.selectedPrimaryForaward_8_day1 == id && this.selectedPrimaryCount_8_day1 === count && this.selected_8_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 1) {
            if (this.selectedPrimaryForaward_9_day1 == id && this.selectedPrimaryCount_9_day1 === count && this.selected_9_day_1 == day)
                return true;
            else
                return false;
        }
        // Day2
        if (count == 0 && day == 2) {
            if (this.selectedPrimaryForaward_0_day2 == id && this.selectedPrimaryCount_0_day2 === count && this.selected_0_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 2) {
            if (this.selectedPrimaryForaward_1_day2 == id && this.selectedPrimaryCount_1_day2 === count && this.selected_1_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 2) {
            if (this.selectedPrimaryForaward_2_day2 == id && this.selectedPrimaryCount_2_day2 === count && this.selected_2_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 2) {
            if (this.selectedPrimaryForaward_3_day2 == id && this.selectedPrimaryCount_3_day2 === count && this.selected_3_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 2) {
            if (this.selectedPrimaryForaward_4_day2 == id && this.selectedPrimaryCount_4_day2 === count && this.selected_4_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 2) {
            if (this.selectedPrimaryForaward_5_day2 == id && this.selectedPrimaryCount_5_day2 === count && this.selected_5_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 2) {
            if (this.selectedPrimaryForaward_6_day2 == id && this.selectedPrimaryCount_6_day2 === count && this.selected_6_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 2) {
            if (this.selectedPrimaryForaward_7_day2 == id && this.selectedPrimaryCount_7_day2 === count && this.selected_7_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 2) {
            if (this.selectedPrimaryForaward_8_day2 == id && this.selectedPrimaryCount_8_day2 === count && this.selected_8_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 2) {
            if (this.selectedPrimaryForaward_9_day2 == id && this.selectedPrimaryCount_9_day2 === count && this.selected_9_day_2 == day)
                return true;
            else
                return false;
        }
        // Day3
        if (count == 0 && day == 3) {
            if (this.selectedPrimaryForaward_0_day3 == id && this.selectedPrimaryCount_0_day3 === count && this.selected_0_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 3) {
            if (this.selectedPrimaryForaward_1_day3 == id && this.selectedPrimaryCount_1_day3 === count && this.selected_1_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 3) {
            if (this.selectedPrimaryForaward_2_day3 == id && this.selectedPrimaryCount_2_day3 === count && this.selected_2_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 3) {
            if (this.selectedPrimaryForaward_3_day3 == id && this.selectedPrimaryCount_3_day3 === count && this.selected_3_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 3) {
            if (this.selectedPrimaryForaward_4_day3 == id && this.selectedPrimaryCount_4_day3 === count && this.selected_4_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 3) {
            if (this.selectedPrimaryForaward_5_day3 == id && this.selectedPrimaryCount_5_day3 === count && this.selected_5_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 3) {
            if (this.selectedPrimaryForaward_6_day3 == id && this.selectedPrimaryCount_6_day3 === count && this.selected_6_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 3) {
            if (this.selectedPrimaryForaward_7_day3 == id && this.selectedPrimaryCount_7_day3 === count && this.selected_7_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 3) {
            if (this.selectedPrimaryForaward_8_day3 == id && this.selectedPrimaryCount_8_day3 === count && this.selected_8_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 3) {
            if (this.selectedPrimaryForaward_9_day3 == id && this.selectedPrimaryCount_9_day3 === count && this.selected_9_day_3 == day)
                return true;
            else
                return false;
        }
        // Day4
        if (count == 0 && day == 4) {
            if (this.selectedPrimaryForaward_0_day4 == id && this.selectedPrimaryCount_0_day4 === count && this.selected_0_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 4) {
            if (this.selectedPrimaryForaward_1_day4 == id && this.selectedPrimaryCount_1_day4 === count && this.selected_1_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 4) {
            if (this.selectedPrimaryForaward_2_day4 == id && this.selectedPrimaryCount_2_day4 === count && this.selected_2_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 4) {
            if (this.selectedPrimaryForaward_3_day4 == id && this.selectedPrimaryCount_3_day4 === count && this.selected_3_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 4) {
            if (this.selectedPrimaryForaward_4_day4 == id && this.selectedPrimaryCount_4_day4 === count && this.selected_4_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 4) {
            if (this.selectedPrimaryForaward_5_day4 == id && this.selectedPrimaryCount_5_day4 === count && this.selected_5_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 4) {
            if (this.selectedPrimaryForaward_6_day4 == id && this.selectedPrimaryCount_6_day4 === count && this.selected_6_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 4) {
            if (this.selectedPrimaryForaward_7_day4 == id && this.selectedPrimaryCount_7_day4 === count && this.selected_7_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 4) {
            if (this.selectedPrimaryForaward_8_day4 == id && this.selectedPrimaryCount_8_day4 === count && this.selected_8_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 4) {
            if (this.selectedPrimaryForaward_9_day4 == id && this.selectedPrimaryCount_9_day4 === count && this.selected_9_day_4 == day)
                return true;
            else
                return false;
        }
    }
    onReset() {
        this.submitted = false;
        this.addForm.reset();
    }
    selectednoofforwardinglocation() {
        let array = [];
        if (this.noofforwardinglocation_1 >= 10) {
            this.ite = 10;
        }
        else {
            this.ite = this.noofforwardinglocation_1;
        }
        for (let i = 0; i < this.ite; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_2() {
        let array = [];
        if (this.noofforwardinglocation_2 >= 10) {
            this.ite2 = 10;
        }
        else {
            this.ite2 = this.noofforwardinglocation_2;
        }
        for (let i = 0; i < this.ite2; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_3() {
        let array = [];
        if (this.noofforwardinglocation_3 >= 10) {
            this.ite3 = 10;
        }
        else {
            this.ite3 = this.noofforwardinglocation_3;
        }
        for (let i = 0; i < this.ite3; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_4() {
        let array = [];
        if (this.noofforwardinglocation_4 >= 10) {
            this.ite4 = 10;
        }
        else {
            this.ite4 = this.noofforwardinglocation_4;
        }
        for (let i = 0; i < this.ite4; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_5() {
        let array = [];
        if (this.noofforwardinglocation_5 >= 10) {
            this.ite5 = 10;
        }
        else {
            this.ite5 = this.noofforwardinglocation_5;
        }
        for (let i = 0; i < this.ite5; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_6() {
        let array = [];
        if (this.noofforwardinglocation_6 >= 10) {
            this.ite6 = 10;
        }
        else {
            this.ite6 = this.noofforwardinglocation_6;
        }
        for (let i = 0; i < this.ite6; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_7() {
        let array = [];
        if (this.noofforwardinglocation_7 >= 10) {
            this.ite7 = 10;
        }
        else {
            this.ite7 = this.noofforwardinglocation_7;
        }
        for (let i = 0; i < this.ite7; i++) {
            array.push(i);
        }
        return array;
    }
    onFSLReset() {
        this.FSLRulesSubmitted = false;
        this.addFSLRules.reset();
    }
    selected() {
        let array = [];
        for (let i = 0; i < this.noofforwarding; i++) {
            array.push(i);
        }
        return array;
    }
    Delete(id) {
        // alert(id)
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleService.deleteFSLRulesbyname(id).subscribe(res => {
                    this.getAllRules();
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'FSL Deleted Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    addremoverow(type) {
        if (type == 0) {
            this.isadded = 1;
        }
        if (type == 1) {
            this.isadded = 0;
        }
    }
};
NumberaddComponent.ctorParameters = () => [
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["ActivatedRoute"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ChangeDetectorRef"] }
];
NumberaddComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-numberadd',
        template: _raw_loader_numberadd_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_numberadd_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], NumberaddComponent);



/***/ }),

/***/ "ALpe":
/*!**********************************************************!*\
  !*** ./src/app/modules/shortlist/shortlist.component.ts ***!
  \**********************************************************/
/*! exports provided: ShortlistComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShortlistComponent", function() { return ShortlistComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_shortlist_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./shortlist.component.html */ "kqLV");
/* harmony import */ var _shortlist_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shortlist.component.scss */ "kNPR");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! moment */ "wd/R");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! datatables.net */ "FlOX");
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(datatables_net__WEBPACK_IMPORTED_MODULE_10__);











const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let ShortlistComponent = class ShortlistComponent {
    constructor(moduleservice, handler, fb) {
        this.moduleservice = moduleservice;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_8__["GlobalVariable"].BASE_API_URL;
        this.numbers = '';
        this.ranges = {
            Today: [moment__WEBPACK_IMPORTED_MODULE_9__(), moment__WEBPACK_IMPORTED_MODULE_9__()],
            Yesterday: [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(1, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__().subtract(1, 'days')],
            'Last 7 Days': [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(6, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__()],
            'Last 30 Days': [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(29, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__()],
            'This Month': [moment__WEBPACK_IMPORTED_MODULE_9__().startOf('month'), moment__WEBPACK_IMPORTED_MODULE_9__().endOf('month')],
            'Last Month': [
                moment__WEBPACK_IMPORTED_MODULE_9__()
                    .subtract(1, 'month')
                    .startOf('month'),
                moment__WEBPACK_IMPORTED_MODULE_9__()
                    .subtract(1, 'month')
                    .endOf('month')
            ],
        };
        this.dtOptions = {};
        this.submitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        this.alwaysShowCalendars = true;
        this.keepCalendarOpeningWithRange = true;
        this.showRangeLabelOnInput = true;
        this.selected = { startDate: moment__WEBPACK_IMPORTED_MODULE_9__().startOf('day'), endDate: moment__WEBPACK_IMPORTED_MODULE_9__().endOf('day') };
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadcalls();
    }
    get f() { return this.searchcallsform.controls; }
    loadcalls() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "order": [[1, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getshortlonglistnumbers/' + this.currentCompany.uuid + '/0', { 'dataTablesParameters': dataTablesParameters, 'number': this.numbers, 'date': this.selected }, {}).subscribe(resp => {
                    // console.log(resp); return false;
                    this.alldata = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "number" }, { data: "forward_to" }, { data: "created_at" }
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
};
ShortlistComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
ShortlistComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
ShortlistComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-shortlist',
        template: _raw_loader_shortlist_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_shortlist_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], ShortlistComponent);



/***/ }),

/***/ "AytR":
/*!*****************************************!*\
  !*** ./src/environments/environment.ts ***!
  \*****************************************/
/*! exports provided: environment */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; });
/* harmony import */ var zone_js_dist_zone_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zone.js/dist/zone-error */ "+Vou");
/* harmony import */ var zone_js_dist_zone_error__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(zone_js_dist_zone_error__WEBPACK_IMPORTED_MODULE_0__);
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

const environment = {
    production: false,
    firebase: {
        apiKey: "AIzaSyAvHImEhL4UsyJs8uWYe8JnMn5m1QnHg9s",
        authDomain: "dialdigits.firebaseapp.com",
        projectId: "dialdigits",
        storageBucket: "dialdigits.appspot.com",
        messagingSenderId: "875423843515",
        appId: "1:875423843515:web:9f54d32e66ed8fde03159e",
        measurementId: "G-DB124KD6P6"
    }
};
/*
 * For easier debugging in development mode, you can import the following file
 * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
 *
 * This import should be commented out in production mode because it will have a negative impact
 * on performance if an error is thrown.
 */
// import 'zone.js/dist/zone-error';  // Included with Angular CLI.


/***/ }),

/***/ "AzsU":
/*!******************************************************!*\
  !*** ./src/app/modules/reports/reports.component.ts ***!
  \******************************************************/
/*! exports provided: ReportsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReportsComponent", function() { return ReportsComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_reports_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./reports.component.html */ "fr54");
/* harmony import */ var _reports_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reports.component.scss */ "6uQ3");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ngx-csv/ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! moment */ "wd/R");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! datatables.net */ "FlOX");
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(datatables_net__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var _swimlane_ngx_datatable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @swimlane/ngx-datatable */ "lDzL");
/* harmony import */ var angular_highcharts__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! angular-highcharts */ "a0Xn");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! highcharts/modules/exporting */ "AxlJ");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! highcharts */ "6n/F");
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(highcharts__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! moment-timezone */ "f0Wu");
/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(moment_timezone__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var ngx_ui_loader__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ngx-ui-loader */ "gren");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! rxjs */ "qCKp");
/* harmony import */ var rxjs_add_observable_interval__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! rxjs/add/observable/interval */ "TGZE");
/* harmony import */ var rxjs_add_observable_interval__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(rxjs_add_observable_interval__WEBPACK_IMPORTED_MODULE_22__);




















highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_17___default()(highcharts__WEBPACK_IMPORTED_MODULE_18__);



const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
class filterarr {
}
let ReportsComponent = class ReportsComponent {
    // subscriptions : Subscription[];
    constructor(moduleservice, toastrService, handler, fb, route, router, el, ngxLoader, cdRef) {
        // $("#datatable1").dataTable().fnDestroy();
        // this.dtOptions = {
        //   "order": [],
        //   paging:false,
        //   searching:false,
        //   info : false,
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.route = route;
        this.router = router;
        this.el = el;
        this.ngxLoader = ngxLoader;
        this.cdRef = cdRef;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.numbers = '';
        this.dtOptions = {};
        this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_21__["Subject"]();
        this.dtOptionsdetails = {};
        this.labels = 0;
        // callsdata: any = 0; 
        this.callsdata = [];
        this.submitted = false;
        this.event = "";
        this.expanded = {};
        this.rows = [];
        this.ranges = {
            Today: [moment__WEBPACK_IMPORTED_MODULE_13__["tz"](moment__WEBPACK_IMPORTED_MODULE_13__(), "America/Phoenix").format("MM/DD/YYYY 00:00"), moment__WEBPACK_IMPORTED_MODULE_13__["tz"](moment__WEBPACK_IMPORTED_MODULE_13__(), "America/Phoenix").format("MM/DD/YYYY 23:59")],
            Yesterday: [moment__WEBPACK_IMPORTED_MODULE_13__["tz"](moment__WEBPACK_IMPORTED_MODULE_13__().subtract(1, 'days'), "America/Phoenix").format("MM/DD/YYYY 00:00"), moment__WEBPACK_IMPORTED_MODULE_13__["tz"](moment__WEBPACK_IMPORTED_MODULE_13__().subtract(1, 'days'), "America/Phoenix").format("MM/DD/YYYY 23:59")],
            'This Month': [moment__WEBPACK_IMPORTED_MODULE_13__().startOf('month'), moment__WEBPACK_IMPORTED_MODULE_13__().endOf('month')],
            'Last Month': [
                moment__WEBPACK_IMPORTED_MODULE_13__()
                    .subtract(1, 'month')
                    .startOf('month'),
                moment__WEBPACK_IMPORTED_MODULE_13__()
                    .subtract(1, 'month')
                    .endOf('month')
            ],
        };
        this.ngxclass = "dark";
        this.colorcode = '#fff';
        this.calls = [];
        this.lists = [];
        this.ColumnMode = _swimlane_ngx_datatable__WEBPACK_IMPORTED_MODULE_15__["ColumnMode"];
        this.livecalls = [];
        this.headerHeight = 40;
        this.rowHeight = 40;
        this.pageLimit = 100;
        this.loadingIndicator = false;
        // get f() { return this.searchcallsform.controls; }  
        // loadcalls(filterselected:any,date:any){
        //   if ($.fn.DataTable.isDataTable(this.table.nativeElement) ) {
        //     $(this.table.nativeElement).dataTable().fnDestroy();
        //   } 
        //   this.filterselectedforexport = filterselected;
        //   this.dateforexport = date;
        //   this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        //   this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        //   var that = this;
        //   this.dtOptionsdetails = {
        //     "pagingType": 'full_numbers',
        //     "processing": true,
        //     "serverSide": true,          
        //     "lengthMenu": [[-1, 50, 100, 500, 2000], ["All", 50, 100, 500, 2000]],
        //     "pageLength": 100,
        //     "order": [[ 2, "desc" ]],
        //     "searching":false,
        //     ajax: (dataTablesParameters: any, callback) => {
        //       that.http.post<DataTablesResponse>(
        //         this.ServerUrl+'getcalls/'+this.currentCompany.uuid, {'dataTablesParameters':dataTablesParameters,'filterselected':filterselected,date:date,'timezone':this.currentUser.timezone}
        //        , {}
        //       ).subscribe(resp => {
        //                 // console.log(resp); return false;
        //                 that.labels = resp.data;   
        //                 callback({
        //                     recordsTotal: resp.recordsTotal,
        //                     recordsFiltered: resp.recordsFiltered,
        //                     data: [],
        //                 });
        //             });
        //     },
        //     columns: [
        //       // 
        //       {data:"detail"},{data:"did"},{data:"incoming_number"},{data:"publisher"},{data:"target"},{data:"campaign"},{data:"routed_to"},{data:"call_duration"},{data:"ivr_duration"},{data:"billable_duration"},{data:"date_of_call"},{data:"assosciated_labels"},{data:"hangup_by"},{data:"revenue"},{data:"duplicate"},{data:"payout"},{data:"recording"}
        //     ],
        // };
        // this.dataTable = $(this.table.nativeElement);
        // this.dataTable.dataTable(this.dtOptionsdetails);
        // }  
        // get f() { return this.searchcallsform.controls; }  
        this.totaldata = [];
        this.totalcount = [];
        this.noofrecords = 500;
        this.isclick = 1;
        this.istougle = 1;
        this.filtertype = 1;
        this.filteradvanced = 0;
        this.filtervalue = '';
        this.filterdate = '';
        this.isadded = 1;
        this.isfiltered = 0;
        this.isshowbyhrs = 1;
        this.isselectElement = 0;
        this.filterselected = [];
        this.charttype = "Calls Per Hour";
        this.daytypeval = 1;
        this.isreport = 0;
        this.islive = false;
        // }
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        this.router.routeReuseStrategy.shouldReuseRoute = () => false;
        this.alwaysShowCalendars = true;
        this.keepCalendarOpeningWithRange = true;
        this.showRangeLabelOnInput = true;
        this.subscription = rxjs__WEBPACK_IMPORTED_MODULE_21__["Observable"].interval(15000)
            .subscribe((val) => { this.loadlivecalls(); });
        // var moment = require('moment-timezone');
        // moment().tz("America/Los_Angeles").format();
        // var converted = moment.tz(moment(), 'utc').format("YYYY-MM-DD HH:mm:ss");         
        // console.log(converted);
        // var full_format = "YYYY-MM-DD HH:mm:ss";
        // var start = converted + " 00:00:00";
        // var end = converted + " 23:59:59";
        // var utc_start_time = moment(start).add(-25200 * -1, 'hours').format(full_format);
        // var utc_end_time = moment(end).add(-25200 * -1, 'hours').format(full_format); 
        // this.selected = {startDate: moment().startOf('day').format("MM/DD/YYYY"), endDate: moment().endOf('day').format("MM/DD/YYYY")};    
        this.selected = { startDate: moment__WEBPACK_IMPORTED_MODULE_13__["tz"](moment__WEBPACK_IMPORTED_MODULE_13__(), "America/Phoenix").format("MM/DD/YYYY 00:00"), endDate: moment__WEBPACK_IMPORTED_MODULE_13__["tz"](moment__WEBPACK_IMPORTED_MODULE_13__(), "America/Phoenix").format("MM/DD/YYYY 23:59") };
        // console.log(this.selected);
        // return
        // console.log(moment().startOf('day'));    `
        // console.log(moment.tz(new Date(), "PST").format("MM/DD/YYYY"));
        this.selected1 = this.selected;
        this.selected2 = this.selected;
        // console.log(this.selected);
        // for the current day
        // var start = moment.tz("GMT").startOf('day');
        // var end = moment.tz(timezone).endOf('day').utc();
        // for a specific moment (m)
        // var start = m.clone().tz(timezone).startOf('day').utc();
        // var end = m.clone().tz(timezone).endOf('day').utc();
        // // for a specific calendar date
        // var m = moment.tz(date, format, timezone);
        // var start = m.clone().startOf('day').utc();
        // var end = m.clone().endOf('day').utc();
    }
    onPage(event) {
        clearTimeout(this.timeout);
        this.timeout = setTimeout(() => {
            console.log('paged!', event);
        }, 100);
    }
    // @ViewChild('table123', {static: true}) table: any;
    // toggleExpandRow(row) {
    //   console.log('Toggled Expand Row!', row);
    //   this.table.rowDetail.toggleExpandRow(row);
    // }
    toggleExpandRow(rowIndex, row) {
        this.loadingIndicator = true;
        this.table.rowDetail.toggleExpandRow(row);
        this.details(rowIndex, row);
    }
    toggleCollaspeRow(row) {
        this.table.rowDetail.collapseAllRows();
    }
    sendMenuUpdateMessage() {
        // send message to subscribers via observable subject
        this.moduleservice.sendMenuUpdateMessage('1');
    }
    // ranges: any = {
    //   Today: [moment(), moment()],
    //   Yesterday: [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
    //   // 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
    //   // 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
    //   'This Month': [moment().startOf('month'), moment().endOf('month')],
    //   'Last Month': [
    //     moment()
    //       .subtract(1, 'month')
    //       .startOf('month'),
    //     moment()
    //       .subtract(1, 'month')
    //       .endOf('month')
    //   ],
    //   // 'Last 3 Month': [
    //   //   moment()
    //   //     .subtract(3, 'month')
    //   //     .startOf('month'),
    //   //   moment()
    //   //     .subtract(1, 'month')
    //   //     .endOf('month')
    //   // ]
    // };
    ngAfterContentChecked() {
        this.cdRef.detectChanges();
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        const uuid = this.route.snapshot.paramMap.get('id');
        // console.log(uuid);
        if (uuid != null) {
            this.getsavedreports(uuid);
        }
        else {
            this.loadcalls("", "");
            this.loadcallsdata("", "", 1);
            this.getChartNumberOfCalls(0, 0, 1);
            // this.getsavedreports();
        }
        if ($("body").hasClass("theme-white")) {
            this.ngxclass = 'material';
        }
        // const source = interval(15000);
        // this.subscription = source.subscribe(val => this.loadlivecalls());    
        // this.subscriptions.push(this.subscription);
    }
    getChartNumberOfCalls(filterselected, date, daytype) {
        this.ngxLoader.startLoader('loader-03');
        if ($("html").hasClass("theme-light")) {
            this.bgcolorcode = 'rgb(17,19,25)';
            // this.colorcode='rgb(17,19,25)';          
        }
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.chartarg = {
            filterselected: filterselected,
            date: date,
            user_uuid: this.currentUser.uuid,
            role: this.currentUser.role
        };
        this.moduleservice.getChartbyfilter(this.currentCompany.uuid, this.chartarg, daytype, this.currentUser.timezone).subscribe(res => {
            this.chart = new angular_highcharts__WEBPACK_IMPORTED_MODULE_16__["Chart"]({
                chart: {
                    // polar: true,
                    type: 'line',
                    zoomType: 'x',
                    backgroundColor: this.bgcolorcode,
                },
                exporting: {
                    enabled: true
                },
                title: {
                    text: '' + this.charttype,
                    style: {
                        color: this.colorcode
                    },
                },
                subtitle: {
                    text: document.ontouchstart === undefined ?
                        'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in',
                    style: {
                        color: this.colorcode
                    },
                },
                credits: {
                    enabled: false
                },
                tooltip: {
                    shared: true,
                },
                xAxis: {
                    minRange: 0,
                    gridLineWidth: 0,
                    title: {
                        text: '' + this.charttype,
                        style: {
                            color: this.colorcode
                        },
                    }, categories: res.cattype
                },
                yAxis: {
                    min: 0,
                    gridLineWidth: 1,
                    title: {
                        text: 'Number Of Calls',
                        style: {
                            color: this.colorcode
                        },
                    }
                },
                colors: [
                    'rgb(58,186,244)',
                ],
                plotOptions: {
                    column: {
                        colorByPoint: true
                    },
                    line: {
                        dataLabels: {
                            useHTML: true,
                            enabled: true,
                            format: '{point.percentage:.1f} %',
                            color: 'white',
                        },
                        enableMouseTracking: false,
                    }
                },
                series: [{
                        data: res.chartdata,
                        type: 'column',
                        name: "Call Count",
                        color: '#0066FF',
                    },
                    {
                        name: 'Converted',
                        color: '#F9B236',
                        type: 'spline',
                        data: res.converted,
                    }, {
                        name: 'Connected',
                        type: 'spline',
                        color: '#20bf55',
                        data: res.connected,
                    },
                    {
                        name: 'No Answer',
                        type: 'spline',
                        color: 'red',
                        data: res.noanswer,
                    }, {
                        name: 'No Connect',
                        type: 'spline',
                        color: 'red',
                        data: res.noconnect,
                    }
                ]
            });
            this.ngxLoader.stopLoader('loader-03');
        }, error => this.error = error);
    }
    loadcalls(filterselected, date) {
        this.loadingIndicator = true;
        // this.ngxLoader.start();
        this.ngxLoader.startLoader('loader-01');
        // this.ngxLoader.start();
        let currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        const formData = new FormData();
        formData.append('filterselected', JSON.stringify(filterselected));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('role', currentUser.role);
        formData.append('timezone', currentUser.timezone);
        formData.append('date', JSON.stringify(date));
        this.http.post(this.ServerUrl + 'getcallsdatanew/' + currentCompany.uuid, formData, {
            headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpHeaders"]()
            // .set('Pragma', 'no-cache') 
            // .set('Cache-Control', 'no-cache') 
        }).subscribe(resp => {
            this.calls = resp[0].Response.data;
            this.lists = resp[0].Response.data;
            this.loadingIndicator = false;
            // this.ngxLoader.stopBackground("loader-01");
            this.ngxLoader.stopLoader('loader-01');
            // console.log(this.blogPostsList);
        }, error => {
            // this.ngxLoader.stopBackground("loader-01");
            this.ngxLoader.stopLoader('loader-01');
            this.loadingIndicator = false;
        });
    }
    loadlivecalls() {
        this.loadingIndicator = true;
        this.http.post(this.ServerUrl + 'livecallReport/', {}).subscribe(resp => {
            // console.log(resp.rows);
            this.livecalls = resp.rows;
            this.loadingIndicator = false;
        }, error => {
            this.loadingIndicator = false;
        });
    }
    loaddataonscroll(limit) {
        // this.ngxLoader.start();
        this.ngxLoader.startBackground('loader-01');
        this.loadingIndicator = true;
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        const formData = new FormData();
        formData.append('filterselected', JSON.stringify(this.filterselected));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('timezone', currentUser.timezone);
        formData.append('role', currentUser.role);
        formData.append('date', JSON.stringify(this.selected1));
        let newlimit = limit;
        let currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.http.post(this.ServerUrl + 'getcallsdatanew/' + currentCompany.uuid + '/' + this.calls.length + '/' + newlimit, formData).subscribe(resp => {
            const rows = [...this.calls, ...resp[0].Response.data];
            this.calls = rows;
            this.lists = resp[0].Response.data;
            this.loadingIndicator = false;
            // this.ngxLoader.stop();
            this.ngxLoader.stopBackground('loader-01');
            // console.log(this.blogPostsList);
        }, error => {
            this.loadingIndicator = false;
            // this.ngxLoader.stop();
            this.ngxLoader.stopBackground('loader-01');
        });
    }
    onScroll(event) {
        let offsetY = event.offsetY;
        let offsetX = event.offsetX;
        // console.log(event.offsetY);return
        // if(offsetY != 125 || offsetY!=undefined){
        const viewHeight = this.el.nativeElement.getBoundingClientRect().height - this.headerHeight;
        if (offsetX == 0 && !this.loadingIndicator && offsetY + viewHeight >= this.calls.length * this.rowHeight) {
            // if (!this.loadingIndicator && offsetY + viewHeight >= this.rows.length * 100) {
            let limit = this.pageLimit;
            if (this.calls.length === 0) {
                const pageSize = Math.ceil(viewHeight / this.rowHeight);
                limit = Math.max(pageSize, this.pageLimit);
            }
            this.loaddataonscroll(limit);
        }
        // }
    }
    play(url, incomingnumber) {
        this.toastrService.show(`<audio style="width: 130px;height: 30px;" controls><source src="https://d2actkasrcrrs8.cloudfront.net/${url}" type="audio/mp3"></audio>`, 'Inbound # - ' + incomingnumber, {
            closeButton: true,
            extendedTimeOut: 0,
            timeOut: 0,
            tapToDismiss: false,
            enableHtml: true,
            positionClass: 'toast-bottom-right',
        });
    }
    // loadcallsdata(filterselected:any,date:any,groupby:any){
    //   $("#datatable1").dataTable().fnDestroy();
    //   // $("#summarytbl").dataTable().fnDestroy();
    //   this.ngxLoader.startLoader('loader-02');
    //   this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
    //   this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
    //   // this.ngxLoader.startLoader('loader-03');
    //   this.http.post<any>(
    //             this.ServerUrl+'getcallsdata/'+this.currentCompany.uuid, {'filterselected':filterselected,'date':date,'timezone':this.currentUser.timezone,'groupby':groupby}
    //           , {}
    //           ).subscribe(resp => {
    //                 //                    
    //                 this.callsdata = resp.data; 
    //                 this.totalcount = resp.totalarr; 
    //                 this.totaldata  = resp.data.length ;
    //                 this.dtTrigger.next();
    //                 this.ngxLoader.stopLoader('loader-02');
    //               },
    //               error => this.error = error
    //           );   
    // }
    // loadcallsdata(filterselected:any,date:any,groupby:any){
    //   this.ngxLoader.startLoader('loader-02');
    //   this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
    //   let currentUser = JSON.parse(localStorage.getItem('currentUser'));
    //       this.http.post<any>(
    //         this.ServerUrl+'getcallsdata/'+this.currentCompany.uuid, {'filterselected':filterselected,'date':date,'timezone':currentUser.timezone,'groupby':groupby}
    //       , {}
    //       ).subscribe(resp => {
    //           // console.log(resp);                    
    //           this.callsdata = resp.data;   
    //           this.totalcount = resp.totalarr; 
    //           this.totaldata  = resp.data.length ;
    //           this.dtTrigger.next();
    //           this.ngxLoader.stopLoader('loader-02');
    //         },
    //         error => this.error = error
    //     );    
    // }
    loadcallsdata(filterselected, date, groupby) {
        if ($.fn.DataTable.isDataTable(this.table1.nativeElement)) {
            $(this.table1.nativeElement).dataTable().fnDestroy();
        }
        // console.log(date);
        this.ngxLoader.startLoader('loader-02');
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            pagingType: 'full_numbers',
            lengthChange: false,
            paging: false,
            searching: false,
        };
        this.http.post(this.ServerUrl + 'getcallsdata/' + this.currentCompany.uuid, { 'filterselected': filterselected, 'date': date, 'role': this.currentUser.role, 'user_uuid': this.currentUser.uuid, 'timezone': this.currentUser.timezone, 'groupby': groupby }, {}).subscribe(resp => {
            this.callsdata = resp.data;
            this.totalcount = resp.totalarr;
            this.totaldata = resp.data.length;
            this.dtTrigger.next();
            this.ngxLoader.stopLoader('loader-02');
        }, error => this.error = error);
        // var that = this;
        // this.dtOptions = {
        //   "dom": '<"top">rt<"bottom"flp><"clear">',
        //   "pagingType": 'full_numbers',
        //   // "processing": true,
        //   // "serverSide": false,          
        //   // "lengthMenu": [[-1, 50, 100, 500, 2000, 5000], ["All", 50, 100, 500, 2000, 5000 ]],
        //   // "pageLength": 100,
        //   // "order": [[ 2, "asc" ]],
        //   "searching":false,
        //   ajax: (dataTablesParameters: any, callback) => {
        //   //   that.http.post<DataTablesResponse>(
        //   //     this.ServerUrl+'getcallsdata/'+this.currentCompany.uuid, {'dataTablesParameters':dataTablesParameters,'filterselected':filterselected,'date':date,'timezone':this.currentUser.timezone,'groupby':groupby}
        //   //    , {}
        //   //   ).subscribe(resp => {
        //     this.http.post<any>(
        //               this.ServerUrl+'getcallsdata/'+this.currentCompany.uuid, {'filterselected':filterselected,'date':date,'timezone':currentUser.timezone,'groupby':groupby}
        //             , {}
        //             ).subscribe(resp => {
        //               // console.log(resp); return false;
        //               this.callsdata = resp.data; 
        //               this.totalcount = resp.totalarr; 
        //               this.totaldata  = resp.data.length ;
        //               // this.totaldata  = resp.data.length ;
        //               callback({
        //                   recordsTotal: resp.recordsTotal,
        //                   recordsFiltered: resp.recordsFiltered,
        //                   data: [],
        //               });
        //           });              
        //   },
        //   columns: [
        //     {data:"filter"},{data:"incoming"},{data:"uniquecalls"},{data:"ivr_inputs"},{data:"reachedtobuyer"},{data:"connected"},{data:"qualified"},{data:"converted"},{data:"completed"},{data:"no_answer"},{data:"no_connect"},{data:"duplicate"},{data:"payout"},{data:"revenue"},{data:"profit"},{data:"cr_percent"},{data:"rpc"},{data:"acl"},{data:"tcl"},
        //   ],      
        // };
        // this.dataTable1 = $(this.table1.nativeElement);
        // this.dataTable1.dataTable(this.dtOptions);
        // this.ngxLoader.stopLoader('loader-02');
    }
    // addActive(id){
    //   alert(id);
    // }
    details(i, data) {
        // console.log(data); 
        // return
        // var tr = $('td.details-control').closest('tr').eq(i);
        // var divClass = $(".detailrow_"+i).eq(0).attr('class'); 
        // if (divClass.indexOf('shown') > -1) {
        //     $(".appendedtbl_"+i).remove();
        //       $(".detailrow_"+i).removeClass('shown');
        //   }else {
        this.ngxLoader.start();
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.moduleservice.getReportdetailsdata(data.uuid, this.currentUser.uuid).subscribe(res => {
            // console.log(res); return
            // Target
            this.ngxLoader.stop();
            var targetid;
            if (res.tagetdialed[0].targetid != null) {
                targetid = res.tagetdialed[0].targetid;
            }
            else {
                targetid = "-";
            }
            var targetname;
            if (res.tagetdialed[0].targetname != null) {
                targetname = res.tagetdialed[0].targetname;
            }
            else {
                targetname = "-";
            }
            var targetnumber;
            if (res.tagetdialed[0].targetnumber != null) {
                targetnumber = res.tagetdialed[0].targetnumber;
            }
            else {
                targetnumber = "-";
            }
            var payout;
            if (res.tagetdialed[0].payout > 0.0) {
                payout = "$" + res.tagetdialed[0].payout;
            }
            else {
                payout = "-";
            }
            var recording;
            if (res.data[0].recording != null) {
                // recording = "$"+res.tagetdialed[0].recording;
                recording = '<a taget="_blank" style="color:white" href="https://d2actkasrcrrs8.cloudfront.net/' + res.data[0].recording + '">https://d2actkasrcrrs8.cloudfront.net/' + res.data[0].recording + '</a>';
            }
            else {
                recording = "-";
            }
            var hangup_by;
            if (res.data[0].hangup_by == 'User') {
                hangup_by = "Caller";
            }
            else if (res.data[0].hangup_by == 'System') {
                hangup_by = "System";
            }
            else {
                hangup_by = "-";
            }
            var plan = '<table class="routingtbl" style="width:100%" class="table">' +
                '<tr>' +
                '<th>Eligibily</th>' +
                '<th>Priority</th>' +
                '<th>Weight</th>' +
                '<th>Name</th>' +
                '<th>Reason</th>' +
                '</tr>';
            var result = "";
            var plan1 = "";
            var result1 = "";
            for (let index = 0; index < res.routingplan.length; index++) {
                const data = res.routingplan[index];
                plan1 =
                    '<tr>' +
                        '<td>' + data.iseligible + '</td>' +
                        '<td>' + data.priority + '</td>' +
                        '<td>' + data.weight + '</td>' +
                        '<td>' + data.name + '</td>' +
                        '<td>' + data.reson + '</td>' +
                        '</tr>';
                result1 += result.concat(plan1);
            }
            // console.log(plan); return
            var finalresult = plan.concat(result1);
            finalresult += result.concat('</table>');
            var ivrnode = '';
            if (res.data[0].ivr_inputs != '' && res.data[0].ivr_inputs != null) {
                ivrnode = '<div class="activity mt-2">' +
                    '<div class="activity-icon bg-blue text-white">' +
                    '<i class="fas fa-info"></i>' +
                    '</div>' +
                    '<div class="activity-detail">' +
                    '<div class="mb-2">' +
                    '<span class="text-job text-primary">IVR Node Enter</span>' + '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Timestamp</div>' +
                    '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Node Type</div>' +
                    '<div class="col-md-3">MenuNode</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Step Name</div>' +
                    '<div class="col-md-3">Menu</div>' +
                    '</div>' +
                    '</div>' +
                    '</div>' +
                    '<div class="activity">' +
                    '<div class="activity-icon bg-blue text-white">' +
                    '<i class="fas fa-info"></i>' +
                    '</div>' +
                    '<div class="activity-detail">' +
                    '<div class="mb-2">' +
                    '<span class="text-job text-primary">User Input</span>' + '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Timestamp</div>' +
                    '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Digit</div>' +
                    '<div class="col-md-3">' + res.data[0].ivr_inputs + '</div>' +
                    '</div>' +
                    '</div>' +
                    '</div>' +
                    '<div class="activity">' +
                    '<div class="activity-icon bg-blue text-white">' +
                    '<i class="fas fa-info"></i>' +
                    '</div>' +
                    '<div class="activity-detail">' +
                    '<div class="mb-2">' +
                    '<span class="text-job text-primary">IVR Node Exit</span>' + '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Timestamp</div>' +
                    '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Node Type</div>' +
                    '<div class="col-md-3">MenuNode</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Step Name</div>' +
                    '<div class="col-md-3">Menu</div>' +
                    '</div>' +
                    '</div>' +
                    '</div>';
            }
            var routingplan = '';
            if (res.routingplan.length > 0) {
                routingplan = '<div class="mt-2 activity">' +
                    '<div class="activity-icon bg-blue text-white">' +
                    '<i class="fas fa-info"></i>' +
                    '</div>' +
                    '<div class="activity-detail">' +
                    '<div class="mb-2">' +
                    '<span class="text-job text-primary">Routing Plan</span>' + '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Timestamp</div>' +
                    '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                    '</div>' +
                    '<div class="row mt-2">' +
                    '<div class="col-md-3">' +
                    finalresult +
                    '</div>' +
                    '</div>' +
                    '</div>' +
                    '</div>';
            }
            var targetdialed = '';
            if (res.data[0].billsec > 0) {
                targetdialed = '<div class="activity">' +
                    '<div class="activity-icon bg-success text-white">' +
                    '<i class="fas fa-check"></i>' +
                    '</div>' +
                    '<div class="activity-detail">' +
                    '<div class="mb-2">' +
                    '<span class="text-job text-primary">Target Dialed</span>' + '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Timestamp</div>' +
                    '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Buyer</div>' +
                    '<div class="col-md-3">' + res.tagetdialed[0].buyer + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Buyer ID</div>' +
                    '<div class="col-md-3">' + res.tagetdialed[0].buyerid + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Target ID</div>' +
                    '<div class="col-md-3">' + targetid + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Target Name</div>' +
                    '<div class="col-md-3">' + targetname + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Target Number</div>' +
                    '<div class="col-md-3">' + targetnumber + '</div>' +
                    '</div>' +
                    '</div>' +
                    '</div>';
            }
            var converteddata = '';
            if (res.data[0].payout > 0) {
                converteddata = '<div class="activity">' +
                    '<div class="activity-icon bg-success text-white">' +
                    '<i class="fas fa-check"></i>' +
                    '</div>' +
                    '<div class="activity-detail">' +
                    '<div class="mb-2">' +
                    '<span class="text-job text-primary">Converted</span>' + '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Timestamp</div>' +
                    '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Buyer</div>' +
                    '<div class="col-md-3">' + res.tagetdialed[0].buyer + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Buyer ID</div>' +
                    '<div class="col-md-3">' + res.tagetdialed[0].buyerid + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Payout</div>' +
                    '<div class="col-md-3">' + payout + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Target ID</div>' +
                    '<div class="col-md-3">' + targetid + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Target Name</div>' +
                    '<div class="col-md-3">' + targetname + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Target Number</div>' +
                    '<div class="col-md-3">' + targetnumber + '</div>' +
                    '</div>' +
                    '</div>' +
                    '</div>';
            }
            var connecteddata = '';
            if (res.data[0].billsec > 0) {
                connecteddata = '<div class="activity">' +
                    '<div class="activity-icon bg-success text-white">' +
                    '<i class="fas fa-check"></i>' +
                    '</div>' +
                    '<div class="activity-detail">' +
                    '<div class="mb-2">' +
                    '<span class="text-job text-primary">Connected</span>' + '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Timestamp</div>' +
                    '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Buyer</div>' +
                    '<div class="col-md-3">' + res.tagetdialed[0].buyer + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Buyer ID</div>' +
                    '<div class="col-md-3">' + res.tagetdialed[0].buyerid + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Connection Time</div>' +
                    '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Target ID</div>' +
                    '<div class="col-md-3">' + targetid + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Target Name</div>' +
                    '<div class="col-md-3">' + targetname + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Target Number</div>' +
                    '<div class="col-md-3">' + targetnumber + '</div>' +
                    '</div>' +
                    '</div>' +
                    '</div>';
            }
            var enddata;
            // console.log(res.tagetdialed[0].end_target_id);
            if (res.tagetdialed[0].end_target_id != '-') {
                enddata = '<div class="row">' +
                    '<div class="col-md-1">End Target ID</div>' +
                    '<div class="col-md-3">' + res.tagetdialed[0].end_target_id + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">End Target Name</div>' +
                    '<div class="col-md-3">' + res.tagetdialed[0].endtargetname + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">End Buyer ID</div>' +
                    '<div class="col-md-3">' + res.tagetdialed[0].end_buyer_id + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">End Buyer Name</div>' +
                    '<div class="col-md-3">' + res.tagetdialed[0].end_buyername + '</div>' +
                    '</div>';
            }
            else {
                enddata = "";
            }
            var completeddata = '<div class="activity">' +
                '<div class="activity-icon bg-blue text-white">' +
                '<i class="fas fa-info"></i>' +
                '</div>' +
                '<div class="activity-detail">' +
                '<div class="mb-2">' +
                '<span class="text-job text-primary">Completed</span>' + '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Timestamp</div>' +
                '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Buyer</div>' +
                '<div class="col-md-3">' + res.tagetdialed[0].buyer + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Buyer ID</div>' +
                '<div class="col-md-3">' + res.tagetdialed[0].buyerid + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Call Length</div>' +
                '<div class="col-md-3">' + res.data[0].duration + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Completion Time</div>' +
                '<div class="col-md-3">' + res.data[0].end_stamp + '</div>' +
                '</div>' +
                enddata +
                '<div class="row">' +
                '<div class="col-md-1">Customer IP</div>' +
                '<div class="col-md-3">' + res.tagetdialed[0].customerip + '</div>' +
                '</div>' +
                '</div>' +
                '</div>';
            var payoutcall = '';
            if (res.data[0].payout > 0) {
                payoutcall = '<div class="activity">' +
                    '<div class="activity-icon bg-success text-white">' +
                    '<i class="fas fa-check"></i>' +
                    '</div>' +
                    '<div class="activity-detail">' +
                    '<div class="mb-2">' +
                    '<span class="text-job text-white">Payout Call</span>' + '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Timestamp</div>' +
                    '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-1">Payout</div>' +
                    '<div class="col-md-3">' + payout + '</div>' +
                    '</div>' +
                    '</div>' +
                    '</div>';
            }
            var ringtree = '';
            if (data.is_ringtree == 1) {
                ringtree = '<div class="activity">' +
                    '<div class="activity-icon bg-success text-white">' +
                    '<i class="fas fa-check"></i>' +
                    '</div>' +
                    '<div class="activity-detail">' +
                    '<div class="mb-2">' +
                    '<span class="text-job text-white">Ringtree</span>' + '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-2">Ringtree Forward</div>' +
                    '<div class="col-md-3">' + data.ringtree_frwd + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-2">Ringtree Payout</div>' +
                    '<div class="col-md-3">' + data.ringtree_payout + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-2">ZIP Code</div>' +
                    '<div class="col-md-3">' + data.zip_code + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-2">Ringtree Billable Duration</div>' +
                    '<div class="col-md-3">' + data.ringtree_billableDuration + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-2">Ringtree API Response</div>' +
                    '<div class="col-md-10" style="white-space: initial;">' + data.ringtree_api_response + '</div>' +
                    '</div>' +
                    '<div class="row">' +
                    '<div class="col-md-2">IP Quality Score</div>' +
                    '<div class="col-md-10" style="white-space: initial;">' + data.ipqualityscore + '</div>' +
                    '</div>' +
                    '</div>' +
                    '</div>';
            }
            // $(".appendrow").append(payoutcall);return
            // appendrow
            // console.log(payoutcall);
            // this.table.rowDetail.toggleExpandRow(payoutcall); return false
            // $(".appendrow"+i).after(
            var finalresult = '<div class="appendedtbl_' + i + '" style="width: 900%!important;padding-top: 10px;border-top: 1px solid #424a67;">' +
                '<ul class="nav nav-tabs expandtabs">' +
                '<li id="eventtgl" style="padding: 6px 6px 0px 5px;border-radius: 3px;border: 1px solid #747e9a;margin-right: 2px;    margin-bottom: 3px;" class="active"><a class="active" data-toggle="tab" href="#home_' + i + '">Event</a></li>' +
                '<li style="padding: 6px 6px 0px 5px;border-radius: 3px;border: 1px solid #747e9a;margin-right: 2px;    margin-bottom: 3px;"><a  data-toggle="tab" href="#menu_' + i + '">Record</a></li>' +
                '<li style="padding: 6px 6px 0px 5px;border-radius: 3px;border: 1px solid #747e9a;margin-right: 2px;    margin-bottom: 3px;"><a data-toggle="tab" href="#tag_' + i + '">Tag</a></li>' +
                '</ul>' +
                '<div class="tab-content" style="width: 241%">' +
                '<div id="home_' + i + '" class="tab-pane fade in active show">' +
                '<section class="section" style="width: 0px;">' +
                '<div class="section-body" style="width: 794%;">' +
                '<div class="row">' +
                '<div class="col-12">' +
                '<div class="activities">' +
                ivrnode +
                routingplan +
                targetdialed +
                converteddata +
                connecteddata +
                completeddata +
                payoutcall +
                '<div class="activity">' +
                '<div class="activity-icon bg-blue text-white">' +
                '<i class="fas fa-info"></i>' +
                '</div>' +
                '<div class="activity-detail">' +
                '<div class="mb-2">' +
                '<span class="text-job text-primary">End Call Source</span>' + '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Timestamp</div>' +
                '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Source</div>' +
                '<div class="col-md-3">' + hangup_by + '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                '<div class="activity">' +
                '<div class="activity-icon bg-blue text-white">' +
                '<i class="fas fa-info"></i>' +
                '</div>' +
                '<div class="activity-detail">' +
                '<div class="mb-2">' +
                '<span class="text-job text-primary">Recorded</span>' + '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Timestamp</div>' +
                '<div class="col-md-3">' + res.data[0].start_stamp + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Buyer</div>' +
                '<div class="col-md-3">' + res.tagetdialed[0].buyer + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Buyer ID</div>' +
                '<div class="col-md-3">' + res.tagetdialed[0].buyerid + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Recording URL</div>' +
                '<div class="col-md-5">' + recording + '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                ringtree +
                '</span>' +
                '</div>' +
                '</div>' +
                '</div>' +
                '</section> ' +
                '</div>' +
                '<div id="menu_' + i + '" class="tab-pane fade recorded">' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Name</div>' +
                '<div class="col-md-2">Values</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Campaign</div>' +
                '<div class="col-md-2">' + res.data[0].campaign + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Publisher</div>' +
                '<div class="col-md-2">' + res.data[0].publisher + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Target</div>' +
                '<div class="col-md-2">' + targetname + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Target Number</div>' +
                '<div class="col-md-2">' + targetnumber + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Buyer</div>' +
                '<div class="col-md-2">' + res.tagetdialed[0].buyer + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Campaign ID</div>' +
                '<div class="col-md-2">' + res.data[0].campaign_id + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Publisher ID</div>' +
                '<div class="col-md-2">' + res.data[0].publisher_id + '</div>' +
                '</div>' +
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Publisher Sub ID</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Target ID</div>' +
                '<div class="col-md-2">' + targetid + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Buyer ID</div>' +
                '<div class="col-md-2">' + res.tagetdialed[0].buyerid + '</div>' +
                '</div>' +
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Inbound Call ID</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Call Date</div>' +
                '<div class="col-md-2">' + res.data[0].start_stamp + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Caller ID</div>' +
                '<div class="col-md-2">' + res.data[0].uuid + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Dialed #</div>' +
                '<div class="col-md-2">' + res.data[0].did + '</div>' +
                '</div>' +
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Number ID</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Number Pool Used</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Number Pool ID</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Number Pool</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Time To Call</div>' +
                '<div class="col-md-2">' + res.data[0].duration + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Call Complete Timestamp</div>' +
                '<div class="col-md-2">' + res.data[0].end_stamp + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Call Connected Timestamp</div>' +
                '<div class="col-md-2">' + res.data[0].start_stamp + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Duration</div>' +
                '<div class="col-md-2">' + res.data[0].duration + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Connected Call Length</div>' +
                '<div class="col-md-2">' + res.data[0].billsec + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Hangup</div>' +
                '<div class="col-md-2">' + hangup_by + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Connected</div>' +
                '<div class="col-md-2">' + res.data[0].connected + '</div>' +
                '</div>' +
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Paid Out</div>' +
                '<div class="col-md-2">' + res.data[0].paidout + '</div>' +
                '</div>' +
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Previously Connected</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Has Recording</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Converted</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Is Live</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Revenue</div>' +
                '<div class="col-md-2">' + res.data[0].revenue + '</div>' +
                '</div>' +
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Profit Net Telco</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Profit</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Payout</div>' +
                '<div class="col-md-2">' + res.tagetdialed[0].payout + '</div>' +
                '</div>' +
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Total Cost</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Telco Cost</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                '<div class="row" style="border-bottom: 1px solid #424a67;">' +
                '<div class="col-md-2">Recording</div>' +
                '<div class="col-md-2">' + recording + '</div>' +
                '</div>' +
                // '<div class="row" style="border-bottom: 1px solid #424a67;">'+
                //   '<div class="col-md-2">Time To Connect</div>'+
                //   '<div class="col-md-2">'+res.tagetdialed[0].buyer+'</div>'+
                // '</div>'+
                '</div>' +
                '<div id="tag_' + i + '" class="tab-pane fade">' +
                '<section class="section" style="width: 30px;">' +
                '<div class="section-body" style="width: 794%;">' +
                '<div class="row">' +
                '<div class="col-12">' +
                '<div class="activities">' +
                '<div class="mt-2 activity">' +
                '<div class="activity-icon bg-primary text-white">' +
                '<i class="fas fa-tag"></i>' +
                '</div>' +
                '<div class="activity-detail">' +
                '<div class="mb-2">' +
                '<span class="text-job text-primary">Time</span>' + '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">UTC Hour</div>' +
                '<div class="col-md-3">' + res.tags[0].UTCHour + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">UTC Minute</div>' +
                '<div class="col-md-3">' + res.tags[0].UTCMinute + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">UTC Second</div>' +
                '<div class="col-md-3">' + res.tags[0].UTCSecond + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">UTC Offset</div>' +
                '<div class="col-md-3">' + res.tags[0].UTCOffset + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Hour</div>' +
                '<div class="col-md-3">' + res.tags[0].Hour + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Minute</div>' +
                '<div class="col-md-3">' + res.tags[0].Minute + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Second</div>' +
                '<div class="col-md-3">' + res.tags[0].Second + '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                '<div class="mt-2 activity">' +
                '<div class="activity-icon bg-primary text-white">' +
                '<i class="fas fa-tag"></i>' +
                '</div>' +
                '<div class="activity-detail">' +
                '<div class="mb-2">' +
                '<span class="text-job text-primary">Date</span>' + '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">UTC Week Day</div>' +
                '<div class="col-md-3">' + res.tags[0].UTCWeekDay + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">UTC Day</div>' +
                '<div class="col-md-3">' + res.tags[0].UTCDay + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">UTC Month</div>' +
                '<div class="col-md-3">' + res.tags[0].UTCMonth + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">UTC Year</div>' +
                '<div class="col-md-3">' + res.tags[0].UTCYear + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Week Day</div>' +
                '<div class="col-md-3">' + res.tags[0].WeekDay + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Day</div>' +
                '<div class="col-md-3">' + res.tags[0].Day + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Month</div>' +
                '<div class="col-md-3">' + res.tags[0].Month + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Year</div>' +
                '<div class="col-md-3">' + res.tags[0].Year + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Time Zone</div>' +
                '<div class="col-md-3">' + res.tags[0].TimeZone + '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                '<div class="mt-2 activity">' +
                '<div class="activity-icon bg-primary text-white">' +
                '<i class="fas fa-tag"></i>' +
                '</div>' +
                '<div class="activity-detail">' +
                '<div class="mb-2">' +
                '<span class="text-job text-primary">Campaign</span>' + '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Name</div>' +
                '<div class="col-md-3">' + res.data[0].campaign + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Id</div>' +
                '<div class="col-md-3">' + res.data[0].campaign_id + '</div>' +
                '</div>' +
                // '<div class="row">'+
                //   '<div class="col-md-1">TrackingId</div>'+
                //   '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                // '</div>'+
                '</div>' +
                '</div>' +
                '<div class="mt-2 activity">' +
                '<div class="activity-icon bg-primary text-white">' +
                '<i class="fas fa-tag"></i>' +
                '</div>' +
                '<div class="activity-detail">' +
                '<div class="mb-2">' +
                '<span class="text-job text-primary">Publisher</span>' + '</div>' +
                // '<div class="row">'+
                //   '<div class="col-md-1">Company</div>'+
                //   '<div class="col-md-3">'+res.data[0].publisher+'</div>'+
                // '</div>'+
                '<div class="row">' +
                '<div class="col-md-1">Name</div>' +
                '<div class="col-md-3">' + res.data[0].publisher + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Id</div>' +
                '<div class="col-md-3">' + res.data[0].publisher_id + '</div>' +
                '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">SubId</div>' +
                '<div class="col-md-3">' + res.data[0].publisher_subid + '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                // '<div class="mt-2 activity">'+
                //   '<div class="activity-icon bg-primary text-white">'+
                //     '<i class="fas fa-tag"></i>'+
                //   '</div>'+
                //   '<div class="activity-detail">'+
                //     '<div class="mb-2">'+
                //       '<span class="text-job text-primary">Inbound Number</span>'+'</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">Number</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">Number No Plus</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">Country Code</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">Country Digits</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">Area Code</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">Prefix</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">Suffix</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">Region</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">State</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">Is Phone Number Valid</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">Number E 164</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+
                //     '</div>'+
                // '</div>'+
                '<div class="mt-2 activity">' +
                '<div class="activity-icon bg-primary text-white">' +
                '<i class="fas fa-tag"></i>' +
                '</div>' +
                '<div class="activity-detail">' +
                '<div class="mb-2">' +
                '<span class="text-job text-primary">Dialed Number</span>' + '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Number</div>' +
                '<div class="col-md-3">' + res.data[0].did + '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                // '<div class="mt-2 activity">'+
                //   '<div class="activity-icon bg-primary text-white">'+
                //     '<i class="fas fa-tag"></i>'+
                //   '</div>'+
                //   '<div class="activity-detail">'+
                //     '<div class="mb-2">'+
                //       '<span class="text-job text-primary">Menu</span>'+'</div>'+
                //       '<div class="row">'+
                //         '<div class="col-md-1">Hotel Booking Only IVR</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+                              
                //       '<div class="row">'+
                //         '<div class="col-md-1">menuNode_d59-c968-4b48-adac-092be402e62b</div>'+
                //         '<div class="col-md-3">'+res.data[0].start_stamp+'</div>'+
                //       '</div>'+                              
                //     '</div>'+
                // '</div>'+
                '<div class="mt-2 activity">' +
                '<div class="activity-icon bg-primary text-white">' +
                '<i class="fas fa-tag"></i>' +
                '</div>' +
                '<div class="activity-detail">' +
                '<div class="mb-2">' +
                '<span class="text-job text-primary">Call Length</span>' + '</div>' +
                '<div class="row">' +
                '<div class="col-md-1">Total</div>' +
                '<div class="col-md-3">' + res.data[0].billsec + '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                '</div>' +
                '</section>' +
                '</div>' +
                '</div>';
            // );
            $('.appendData').append(finalresult);
            // tr.addClass('shown');
        }, error => this.error = error);
        // }
    }
    exportdata() {
        // console.log(this.noofrecords);return;
        // this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        // this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // var arr= [];
        // that.labels.forEach(element => {
        //   // console.log(element);
        //   arr[0] = element.incoming_number;
        // });
        // console.log(arr);
        // return;
        var that = this;
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            // showTitle: true,
            // title: 'Your title',
            useBom: true,
            // noDownload: true,
            headers: ["Number Called", "Caller ID", " Publisher", "Target", "Campaign", "Routed To", "Call Duration", "Labels", "IVR Inputs", "Date of Call", "Time of Call", "Revenue", "Payout"]
        };
        // this.ServerUrl+'getcalls/'+this.currentCompany.uuid, {'dataTablesParameters':dataTablesParameters,'filterselected':filterselected,date:date,'timezone':this.currentUser.timezone}
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        const formData = new FormData();
        formData.append('user_uuid', currentUser.uuid);
        formData.append('timezone', this.currentUser.timezone);
        formData.append('filterselected', JSON.stringify(this.filterselected));
        formData.append('date', JSON.stringify(this.selecteddate));
        formData.append('totalrecords', this.noofrecords);
        // console.log(formData);return;
        this.showLoadingIndicator = true;
        this.moduleservice.getCalldetailsForExport(this.currentCompany.uuid, formData).subscribe(res => {
            // console.log(res);return;
            new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_12__["ngxCsv"](res.data, 'All Calls', options);
            this.showLoadingIndicator = false;
        }, error => this.error = error);
    }
    exportcalldata() {
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            useBom: true,
            headers: ["UUID", "Name(Filter)", "Incoming", "Connected", "Qualified", "Converted", "Completed", "No Answer", "No Connect", "Payout", "Revenue", "Profit", "CR%", "RPC", "ACL", "TCL"]
        };
        new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_12__["ngxCsv"](this.callsdata, 'All Calls', options);
    }
    togglepanel() {
        if (this.isclick == 1) {
            this.istougle = 1;
            this.isclick = 0;
        }
        else {
            this.isclick = 1;
            this.istougle = 0;
        }
    }
    filterdata(type) {
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.filter = 0;
        this.isselectElement = 0;
        if (type == 1) {
            this.activeresultdata = [];
            this.nonactiveresultdata = [];
            this.filter = 1;
            this.filtertype = 1;
            this.filtertext = 'Select Campaign';
            this.filtervalue = "";
            this.filteradvanced = 0;
            this.moduleservice.getallcampain(this.currentCompany.uuid).subscribe(res => {
                this.activeresultdata = res.active;
                this.nonactiveresultdata = res.non_active;
            });
        }
        if (type == 2) {
            this.resultdata = [];
            this.filtertype = 2;
            this.filter = 1;
            this.filtertext = 'Select Target';
            this.filtervalue = "";
            this.filteradvanced = 0;
            this.moduleservice.getAlltarget(this.currentCompany.uuid).subscribe(res => {
                this.resultdata = res;
            });
        }
        if (type == 3) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 3;
            this.filtertext = 'Select Buyer';
            this.filtervalue = "";
            this.moduleservice.getallbuyers(this.currentCompany.uuid).subscribe(res => {
                this.resultdata = res;
            });
        }
        if (type == 4) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 4;
            this.filtertext = 'Select Publisher';
            this.filtervalue = "";
            this.moduleservice.getAllpublishers(this.currentCompany.uuid).subscribe(res => {
                this.resultdata = res;
            });
        }
        if (type == 5) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 5;
            this.filtertext = 'Enter Caller ID';
            this.filtervalue = "";
        }
        if (type == 6) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 6;
            this.filtertext = 'Enter Number Called';
            this.filtervalue = "";
        }
        if (type == 8) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 8;
            this.filtertext = 'Select IVR Inputs';
            this.filtervalue = "";
            this.resultdata = [{
                    'id': 0,
                    'text': 'No',
                    'itemName': 'No',
                }, {
                    'id': 1,
                    'text': 'Yes',
                    'itemName': 'Yes',
                }];
        }
        if (type == 9) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 9;
            this.filtertext = 'Select Ringtree';
            this.filtervalue = "";
            this.resultdata = [{
                    'id': 0,
                    'text': 'No',
                    'itemName': 'No',
                }, {
                    'id': 1,
                    'text': 'Yes',
                    'itemName': 'Yes',
                }];
        }
    }
    clearfilter(index) {
        // this.isselectElement = 0;
        this.filterselected.splice(index, 1);
        this.loadcalls(this.filterselected, this.selecteddate);
        this.loadcallsdata(this.filterselected, this.selecteddate, 1);
        this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.daytypeval);
    }
    getadvancedfilter(e, type) {
        // this.filteradvanced = e.target.value;
    }
    filterval(event, group_by) {
        // console.log(this.filtervalue[0]['itemName']); return false;
        var _a, _b;
        if (this.filtervalue != undefined && this.filtervalue != '') {
            let customObj = new filterarr();
            customObj.filteradvanced = this.filteradvanced;
            customObj.filtertype = this.filtertype;
            customObj.uuid = this.filtervalue[0]['id'];
            customObj.name = this.filtervalue[0]['itemName'];
            // customObj.name = [0]['itemName']this.selectElementText; 
            customObj.isorand = 0;
            // console.log(customObj); return
            if (this.filtervalue[0]['itemName'] != undefined && ((_a = this.filterselected) === null || _a === void 0 ? void 0 : _a.length) == 0 && !event) {
                this.filterselected.push(customObj);
            }
            if (this.filtervalue[0]['itemName'] != undefined && ((_b = this.filterselected) === null || _b === void 0 ? void 0 : _b.length) == 1 && !event) {
                this.filterselected = [];
                this.filterselected.push(customObj);
            }
        }
        // console.log(this.filterselected);
        if (event && event.startDate == null && event.endDate == null)
            return false;
        if (event) {
            var start = moment__WEBPACK_IMPORTED_MODULE_13__(event.startDate._d).format('MM/DD/YYYY HH:mm:ss');
            var end = moment__WEBPACK_IMPORTED_MODULE_13__(event.endDate._d).format('MM/DD/YYYY HH:mm:ss');
            // console.log(this.startdate);
            // console.log(this.enddate);return false;
            this.startdate = moment__WEBPACK_IMPORTED_MODULE_13__["tz"](start, 'utc').format("YYYY-MM-DD HH:mm:ss");
            this.enddate = moment__WEBPACK_IMPORTED_MODULE_13__["tz"](end, 'utc').format("YYYY-MM-DD HH:mm:ss");
            // this.diff = this.enddate.diff(this.startdate, 'days');
            // console.log(this.startdate);
            this.selected1 = {
                startDate: this.startdate,
                endDate: this.enddate,
            };
            this.selecteddate = this.selected1;
            var a = moment__WEBPACK_IMPORTED_MODULE_13__(start);
            var b = moment__WEBPACK_IMPORTED_MODULE_13__(end);
            if (b.diff(a, 'days') > 0) {
                this.daytypeval = 2;
                this.isshowbyhrs = 0;
            }
            else {
                this.daytypeval = 1;
                this.isshowbyhrs = 1;
            }
            this.isfiltered = 1;
        }
        else {
            this.isselectElement = 1;
            this.isadded = 0;
            const uuid = this.route.snapshot.paramMap.get('id');
            if (uuid != null) {
                var start = moment__WEBPACK_IMPORTED_MODULE_13__(this.selected.startDate).format('MM/DD/YYYY HH:mm:ss');
                var end = moment__WEBPACK_IMPORTED_MODULE_13__(this.selected.endDate).format('MM/DD/YYYY HH:mm:ss');
            }
            else {
                // console.log(this.selected1.startDate._d);
                if (this.selected1.startDate._d != undefined) {
                    var start = moment__WEBPACK_IMPORTED_MODULE_13__(this.selected1.startDate._d).format('MM/DD/YYYY HH:mm:ss');
                    var end = moment__WEBPACK_IMPORTED_MODULE_13__(this.selected1.endDate._d).format('MM/DD/YYYY HH:mm:ss');
                }
                else {
                    // console.log(this.selected2);
                    var start = moment__WEBPACK_IMPORTED_MODULE_13__(this.selected2.startDate).format('MM/DD/YYYY HH:mm:ss');
                    var end = moment__WEBPACK_IMPORTED_MODULE_13__(this.selected2.endDate).format('MM/DD/YYYY HH:mm:ss');
                }
            }
            // console.log(this.selected1);return
            // console.log(this.startdate);return false;
            this.startdate = moment__WEBPACK_IMPORTED_MODULE_13__["tz"](start, 'utc').format("YYYY-MM-DD HH:mm:ss");
            this.enddate = moment__WEBPACK_IMPORTED_MODULE_13__["tz"](end, 'utc').format("YYYY-MM-DD HH:mm:ss");
            if (this.isfiltered == 0) {
                this.selected1 = {
                    startDate: this.startdate,
                    endDate: this.enddate,
                };
                this.selecteddate = "";
            }
            else {
                this.selecteddate = this.selected1;
            }
            // console.log(this.selecteddate);      
            this.daytypeval = 2;
        }
        // console.log(this.selecteddate);
        // return false
        // this.diff = this.startdate.getTime() - this.enddate.getTime();
        //getTime() function used to convert a date into milliseconds. This is needed in order to perform calculations.
        //  this.days = Math.round(Math.abs(this.diff/(1000*60*60*24)))
        // console.log('ok');
        // console.log(this.filterselected);
        // console.log(this.selecteddate);
        // console.log(this.daytypeval);
        // return;
        // console.log(group_by); 
        if (group_by == undefined) {
            group_by = 1;
        }
        this.filtertype = 1;
        // $(".tabsbtn").removeClass("btn btn-primary btn-sm activetab");
        // $("#tabs1").addClass("activetab");
        this.loadcalls(this.filterselected, this.selecteddate);
        this.loadcallsdata(this.filterselected, this.selecteddate, group_by);
        this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.daytypeval);
    }
    calcelfilter() {
        this.isclick = 1;
        // this.filter = 0; 
        // this.filtertype = 0; 
        this.isselectElement = 0;
        this.filtertype = 1;
        this.filterdata(1);
        this.filtervalue = '';
        this.filteradvanced = 0;
        this.filteradvanced = 0;
        this.filterselected = [];
        this.isadded = 1;
        // this.loadcalls("","");
        // this.loadcallsdata("","",1);
        // this.getChartNumberOfCalls(0,0,1);
        this.loadcalls("", this.selecteddate);
        // this.loadcallsdata("",this.selecteddate,1);
        this.getChartNumberOfCalls("", this.selecteddate, this.daytypeval);
    }
    gettext(event, type) {
        let text;
        if (this.filtertype == 1) {
            text = this.activeresultdata.filter(x => x.id == event)[0];
        }
        else {
            text = this.resultdata.filter(x => x.id == event)[0];
        }
        if (type == 1) {
            //  this.selectElementText = event.target['options'][event.target['options'].selectedIndex].text;
            this.selectElementText = text.text;
        }
        else {
            this.selectElementText = event.target.value;
        }
        //  this.selectElementText = event.target.value
        // console.log(event);   
    }
    addorrule() {
        let customObj = new filterarr();
        customObj.filteradvanced = this.filteradvanced;
        customObj.filtertype = this.filtertype;
        // customObj.uuid = this.filtervalue; 
        // customObj.name = this.selectElementText; 
        customObj.uuid = this.filtervalue[0]['id'];
        customObj.name = this.filtervalue[0]['itemName'];
        customObj.isorand = 0;
        if (this.filtervalue[0]['itemName'] != undefined) {
            this.filterselected.push(customObj);
        }
        // console.log(this.filterselected);
    }
    addandrule() {
        let customObj = new filterarr();
        customObj.filtertype = this.filtertype;
        customObj.filteradvanced = this.filteradvanced;
        // customObj.uuid = this.filtervalue; 
        // customObj.name = this.selectElementText; 
        customObj.uuid = this.filtervalue[0]['id'];
        customObj.name = this.filtervalue[0]['itemName'];
        customObj.isorand = 1;
        // console.log(this.selectElementText);
        if (this.filtervalue[0]['itemName'] != undefined) {
            this.filterselected.push(customObj);
        }
    }
    editfilter() {
        this.isadded = 1;
        this.isselectElement = 0;
    }
    chartby(type) {
        this.filterdate = "";
        if (type == 1) {
            this.daytypeval = 1;
            this.charttype = "Calls Per Hour";
            this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.daytypeval);
        }
        if (type == 2) {
            this.daytypeval = 2;
            this.charttype = "Calls Per Day";
            this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.daytypeval);
        }
        if (type == 3) {
            this.daytypeval = 3;
            this.charttype = "Calls Per Month";
            this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.daytypeval);
        }
    }
    getsavedreports(uuid) {
        this.moduleservice.getsavedreportsbyuuid(uuid).subscribe(res => {
            this.labelval = res.reportlabelname;
            this.daytypeval = 2;
            if (res.filtertype != '') {
                this.isreport = 1;
                if (res.filtertype != 0) {
                    this.isclick = 1;
                }
                this.filter = res.filtertype;
                let startday = res.start_date;
                let endday = res.end_date;
                const d = new Date(startday);
                const d1 = new Date(endday);
                moment__WEBPACK_IMPORTED_MODULE_13__(d).format('MMMM d, YYYY');
                moment__WEBPACK_IMPORTED_MODULE_13__(d1).format('MMMM d, YYYY');
                var start = moment__WEBPACK_IMPORTED_MODULE_13__(d).format('MM/DD/YYYY HH:mm:ss');
                var end = moment__WEBPACK_IMPORTED_MODULE_13__(d1).format('MM/DD/YYYY HH:mm:ss');
                this.startdate = moment__WEBPACK_IMPORTED_MODULE_13__["tz"](start, 'utc').format("YYYY-MM-DD 00:00:00");
                this.enddate = moment__WEBPACK_IMPORTED_MODULE_13__["tz"](end, 'utc').format("YYYY-MM-DD 23:59:59");
                // console.log(this.filter);
                // console.log(this.filtervalue);
                // console.log(this.selected);
                this.selected = { startDate: d, endDate: d1 };
                this.selecteddates = { startDate: this.startdate, endDate: this.enddate };
                this.filterselected = JSON.parse(res.filterarr);
                var a = moment__WEBPACK_IMPORTED_MODULE_13__(d);
                var b = moment__WEBPACK_IMPORTED_MODULE_13__(d1);
                if (b.diff(a, 'days') > 0) {
                    this.daytypeval = 2;
                    this.charttype = "Calls Per Day";
                }
                else {
                    this.daytypeval = 1;
                    this.charttype = "Calls Per Hour";
                }
            }
            this.filterdata(this.filter);
            if (res.filtervalue != '') {
                this.isclick = 1;
                this.filtervalue = res.filtervalue;
            }
            if (res.filteradvanced != '') {
                this.isclick = 1;
                this.filteradvanced = res.filteradvanced;
            }
            this.selectednewdates = this.selecteddates;
            // localStorage.setItem('selectedDates',JSON.stringify(this.selecteddates));
            // console.log(localStorage.getItem('selectedDates'));return
            // console.log(this.selectednewdates);
            this.loadcalls(this.filterselected, this.selecteddates);
            this.loadcallsdata(this.filterselected, this.selecteddates, 1);
            this.getChartNumberOfCalls(this.filterselected, this.selecteddates, this.daytypeval);
        });
    }
    savelabel() {
        // console.log(this.labelval);
        // console.log(this.selected.startDate._d);
        // console.log(this.filtertype);
        // console.log(this.filtervalue);
        const uuid = this.route.snapshot.paramMap.get('id');
        // console.log(this.selected1);
        // return false;
        if (this.labelval == undefined) {
            this.islabelvaltext = 'yes';
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Error!', 'Please enter report name', 'error');
            return;
        }
        this.islabelvaltext = '';
        const formData = new FormData();
        if (uuid != null) {
            formData.append('uuid', uuid);
        }
        if (!this.selecteddate) {
            this.selecteddate = this.selected1;
        }
        var start = moment__WEBPACK_IMPORTED_MODULE_13__(this.selecteddate.startDate).format('MM/DD/YYYY HH:mm:ss');
        var end = moment__WEBPACK_IMPORTED_MODULE_13__(this.selecteddate.endDate).format('MM/DD/YYYY HH:mm:ss');
        this.startdate = moment__WEBPACK_IMPORTED_MODULE_13__["tz"](start, 'utc').format("YYYY-MM-DD 00:00:00");
        this.enddate = moment__WEBPACK_IMPORTED_MODULE_13__["tz"](end, 'utc').format("YYYY-MM-DD 23:59:59");
        // console.log(this.filtertype);
        // console.log(this.startdate);
        // console.log(this.enddate);
        // return false;
        if (this.filtervalue == "") {
            this.filtertype = 0;
        }
        if (this.filteradvanced == "") {
            this.filteradvanced = 0;
        }
        // console.log(this.filterselected);return false;
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('reportlabelname', this.labelval);
        formData.append('start_date', this.startdate);
        formData.append('end_date', this.enddate);
        formData.append('filtertype', this.filtertype);
        formData.append('filtervalue', this.filtervalue);
        formData.append('filteradvanced', this.filteradvanced);
        formData.append('filterarr', JSON.stringify(this.filterselected));
        this.moduleservice.savereport(formData).subscribe(res => {
            if (res.status !== 'error') {
                if (res.isavail != 1) {
                    this.labelval = "";
                }
                this.sendMenuUpdateMessage();
                this.toastrService.success('Report Saved Successfully');
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        });
    }
    deletelabel() {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Selected Report Name!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                const uuid = this.route.snapshot.paramMap.get('id');
                this.moduleservice.deleteSelectedSavedReport(uuid).subscribe(res => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                    this.sendMenuUpdateMessage();
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                        this.router.navigate(['/reports']);
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    // groupby:any=1;
    getSummary(type) {
        // console.log(type);     
        // this.filterselected=[];
        // console.log(this.selecteddate); return
        if (this.selecteddate == undefined) {
            this.selecteddate = this.selected1;
        }
        // this.selecteddate = this.selected1;
        $(".tabsbtn").removeClass("btn btn-primary btn-sm activetab");
        if (type == 1) {
            $("#tabs1").addClass("activetab");
            this.filtertype = 1;
            this.loadcallsdata(this.filterselected, this.selecteddate, 1);
        }
        if (type == 2) {
            $("#tabs2").addClass("activetab");
            this.filtertype = 4;
            this.loadcallsdata(this.filterselected, this.selecteddate, 4);
        }
        if (type == 3) {
            $("#tabs3").addClass("activetab");
            this.filtertype = 2;
            this.loadcallsdata(this.filterselected, this.selecteddate, 2);
        }
        if (type == 4) {
            $("#tabs4").addClass("activetab");
            this.filtertype = 3;
            this.loadcallsdata(this.filterselected, this.selecteddate, 3);
        }
        if (type == 5) {
            $("#tabs5").addClass("activetab");
            this.filtertype = 5;
            this.loadcallsdata(this.filterselected, this.selecteddate, 5);
        }
        if (type == 7) {
            $("#tabs7").addClass("activetab");
            this.filtertype = 7;
            this.loadcallsdata(this.filterselected, this.selecteddate, 7);
        }
        if (type == 8) {
            $("#tabs8").addClass("activetab");
            this.filtertype = 8;
            this.loadcallsdata(this.filterselected, this.selecteddate, 8);
        }
        // if(type==5){ $("#tabs5").addClass("activetab");this.filtertype=5;}
        // if(type==6){ $("#tabs6").addClass("activetab");this.filtertype=6;}
        // if(type==7){ $("#tabs7").addClass("activetab");this.filtertype=7;}
        // if(type==8){ $("#tabs8").addClass("activetab");this.filtertype=8;}
        // if(type==8){ $("#tabs8").addClass("activetab");this.filtertype=8;}
    }
    getcallDetails(type) {
        // alert(type);
        this.filterselected = [];
        $(".tabsbtn").removeClass("btn btn-primary btn-sm activetab");
        if (type == 1) {
            this.islive = false;
            $("#calltabs1").addClass("activetab");
            this.filtertype = 1;
            this.loadcalls(this.filterselected, this.selecteddate);
        }
        if (type == 2) {
            this.islive = true;
            $("#calltabs2").addClass("activetab");
            this.filtertype = 4;
            this.loadlivecalls();
        }
    }
    scrolltoy() {
        $('datatable-body').scrollLeft(1000);
        // $('datatable-body').scrollLeft += 800;
        // this.bodyComponent.updateOffsetY(50);
        // document.getElementByClass('datatable-body').scrollLeft += 800;
    }
    scrolltox() {
        $('datatable-body').scrollLeft(0);
        // document.getElementById('datatable-body.datatable-body').scrollLeft -= 800;
    }
    filterbyvalue(uuid, value, type = 0) {
        // console.log(this.filtertype);
        // console.log(value); return false;
        // this.togglepanel();
        this.istougle = 1;
        this.isclick = 1;
        // if(type == 0 || type == 1){
        this.filterdata(this.filtertype);
        let customObj = new filterarr();
        customObj.filtertype = this.filtertype;
        customObj.uuid = uuid;
        customObj.name = value;
        customObj.isorand = 1;
        customObj.isdup = type;
        // console.log(this.selectElementText);
        if (value != "") {
            this.filterselected.push(customObj);
        }
        // }
        // console.log(this.filterselected);
        this.filterval('', this.filtertype);
    }
    ngOnDestroy() {
        this.dtTrigger.unsubscribe();
        this.subscription.unsubscribe();
        console.log('Report method destroyed');
    }
    copyName(val) {
        const selBox = document.createElement('textarea');
        selBox.style.position = 'fixed';
        selBox.style.left = '0';
        selBox.style.top = '0';
        selBox.style.opacity = '0';
        selBox.value = val;
        document.body.appendChild(selBox);
        selBox.focus();
        selBox.select();
        document.execCommand('copy');
        document.body.removeChild(selBox);
    }
    filtercalldata(filtertype, uuid, no) {
        this.istougle = 1;
        this.isclick = 1;
        this.filterdata(filtertype);
        let customObj = new filterarr();
        customObj.filtertype = filtertype;
        customObj.filteradvanced = this.filteradvanced;
        customObj.uuid = uuid;
        customObj.name = no;
        customObj.isorand = 1;
        // console.log(this.selectElementText);
        if (no != "") {
            this.filterselected.push(customObj);
        }
        this.filter = 1;
        this.isselectElement = 1;
        // this.daytypeval=2;
        // console.log(this.filterselected);
        // console.log(this.selecteddate);
        this.loadcalls(this.filterselected, this.selecteddate);
        this.loadcallsdata(this.filterselected, this.selecteddate, 1);
        this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.daytypeval);
    }
};
ReportsComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["ActivatedRoute"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ElementRef"] },
    { type: ngx_ui_loader__WEBPACK_IMPORTED_MODULE_20__["NgxUiLoaderService"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectorRef"] }
];
ReportsComponent.propDecorators = {
    table1: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable1', { static: true },] }],
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['myTable',] }]
};
ReportsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-reports',
        template: _raw_loader_reports_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewEncapsulation"].None,
        styles: [_reports_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], ReportsComponent);



/***/ }),

/***/ "BrIt":
/*!**************************************************************************************!*\
  !*** ./src/app/modules/verification-management/verification-management.component.ts ***!
  \**************************************************************************************/
/*! exports provided: VerificationManagementComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VerificationManagementComponent", function() { return VerificationManagementComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_verification_management_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./verification-management.component.html */ "i61R");
/* harmony import */ var _verification_management_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./verification-management.component.scss */ "Q7a7");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../module.service */ "zTpG");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");








let VerificationManagementComponent = class VerificationManagementComponent {
    constructor(fb, toastrService, moduleService, router) {
        this.fb = fb;
        this.toastrService = toastrService;
        this.moduleService = moduleService;
        this.router = router;
        this.controlEnabled = true;
        this.show = false;
        this.data = {};
        this.thenvalue = 'FORWARD_TO';
        this.rowcount = 0;
        this.submitted = false;
        this.EmailSubmitted = false;
        this.editEmailSubmitted = false;
        // WildCard Add Model
        this.WildcardSubmitted = false;
        this.editWildcardSubmitted = false;
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        // console.log(this.initItemRow());
        this.addForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            itemRows: this.fb.array([]),
        });
        this.addEmailForm = this.fb.group({
            email: ['', [_angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required, _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].email]],
        });
        this.editEmailForm = this.fb.group({
            uuid: ['', ''],
            email: ['', [_angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required, _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].email]],
        });
        this.addWildcardForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            notes: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
        });
        this.editWildcardForm = this.fb.group({
            uuid: ['', ''],
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            notes: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
        });
        // $('#thenselect_0').hide();
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getRules(this.currentCompany.uuid).subscribe(res => {
            this.rulesdata = res.rule_data;
        }, error => this.error = error);
        this.moduleService.GetIVRnamedata(this.currentCompany.uuid).subscribe(res => {
            this.ivrnamedata = res.ivr_data;
        }, error => this.error = error);
        if (this.currentCompany.uuid) {
            this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
            this.moduleService.getverificationruledata(this.currentCompany.uuid).subscribe(res => {
                const control = this.addForm.controls['itemRows'];
                for (let index = 0; index < res.ruleset_data.length; index++) {
                    control.push(this.initItemRow());
                    control.controls[index].get('ifval').setValue(res.ruleset_data[index].rule_condition_type);
                    control.controls[index].get('isval').setValue(res.ruleset_data[index].rule_condition_is_value);
                    if (res.ruleset_data[index].then_condition_action == 'FORWARD_TO_IVR_MENU') {
                        control.controls[index].get('thenselect').setValue(res.ruleset_data[index].then_condition_value);
                        this.data[index] = 'FORWARD_TO_IVR_MENU';
                    }
                    else {
                        control.controls[index].get('thentxt').setValue(res.ruleset_data[index].then_condition_value);
                        this.data[index] = 'FORWARD_TO';
                    }
                    // control.controls[index].get('thenval').setValue(res.ruleset_data[index].then_condition_action);    
                }
                console.log(res);
                this.result = res.ruleset_data;
            });
        }
        this.getEmail();
        this.getWildcard();
    }
    editWildcard(uuid, name, notes) {
        this.editWildcardForm.patchValue({
            uuid: uuid,
            name: name,
            notes: notes,
        });
    }
    editEmail(uuid, email) {
        this.editEmailForm.patchValue({
            uuid: uuid,
            email: email,
        });
    }
    getEmail() {
        this.moduleService.GetEmails(this.currentCompany.uuid).subscribe(res => {
            this.emaildata = res.email_data;
            //  console.log(res); return false;
        }, error => this.error = error);
    }
    getWildcard() {
        this.moduleService.getWildcard(this.currentCompany.uuid).subscribe(res => {
            this.wildcarddata = res.data;
            //  console.log(res); return false;
        }, error => this.error = error);
    }
    thenval(event, count) {
        if (event.target.value == 'FORWARD_TO_IVR_MENU') {
            $('#thentxt_' + count).hide();
            $('#thenselect_' + count).show();
            this.thenvalue = event.target.value;
        }
        else {
            $('#thentxt_' + count).show();
            $('#thenselect_' + count).hide();
        }
    }
    get f() { return this.addForm.controls; }
    onSubmit() {
        this.submitted = true;
        // if (this.addForm.invalid) {
        //     return;
        // }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // console.log(this.addForm.value);return false;
        this.moduleService.addVerificationRuleSet(this.addForm.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Verification Rules Saved Successfully');
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    initItemRow() {
        return this.fb.group({
            ifval: ['NUMBER', ''],
            isval: ['', ''],
            thenval: ['FORWARD_TO', ''],
            thentxt: ['', ''],
            thenselect: ['', ''],
            andval: ['STOP', ''],
        });
    }
    addRow(length) {
        // alert(length);
        // length = length-1;
        const control = this.addForm.controls['itemRows'];
        control.push(this.initItemRow());
        this.data[length] = 'FORWARD_TO';
        // this.data[length]='FORWARD_TO'; 
        // $('#thenselect_'+length).hide();
        // alert($('#thenselect_0').val());    
    }
    deleteRow(index) {
        const control = this.addForm.controls['itemRows'];
        if (control != null) {
            this.totalrow = control.value.length;
        }
        if (this.totalrow) {
            control.removeAt(index);
        }
    }
    get Emailcontrol() { return this.addEmailForm.controls; }
    onEmailSubmit() {
        // const formData = new FormData();      
        this.EmailSubmitted = true;
        if (this.addEmailForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.addEmail(this.addEmailForm.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Email Added Successfully');
                this.getEmail();
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    get editEmailcontrol() { return this.editEmailForm.controls; }
    oneditEmailSubmit() {
        this.editEmailSubmitted = true;
        if (this.editEmailForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.editEmail(this.editEmailForm.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Email Updated Successfully');
                this.getEmail();
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (this.addWildcardForm.get('name').value && this.addWildcardForm.get('notes').value) {
            $("#addWildcard").modal("hide");
            setTimeout(() => {
                this.WildcardSubmitted = false;
                this.addWildcardForm.reset();
            }, 2000);
        }
        if (this.editWildcardForm.get('name').value && this.editWildcardForm.get('notes').value) {
            $("#editwildcard").modal("hide");
            setTimeout(() => {
                this.editWildcardSubmitted = false;
                this.editWildcardForm.reset();
            }, 1000);
        }
        if (this.addEmailForm.get('email').value) {
            $("#addLabels").modal("hide");
            setTimeout(() => {
                this.EmailSubmitted = false;
                this.addEmailForm.reset();
            }, 2000);
        }
        if (this.editEmailForm.get('email').value) {
            $("#editmail").modal("hide");
            setTimeout(() => {
                this.editEmailSubmitted = false;
                this.editEmailForm.reset();
            }, 2000);
        }
    }
    get wildcardcontrol() { return this.addWildcardForm.controls; }
    onwildcardSubmit() {
        // const formData = new FormData();      
        this.WildcardSubmitted = true;
        if (this.addWildcardForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.addWildcard(this.addWildcardForm.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('New Verification Wildcard Added Successfully');
                this.getWildcard();
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    get editwildcardcontrol() { return this.editWildcardForm.controls; }
    onupdatewildcardSubmit() {
        // const formData = new FormData();      
        this.editWildcardSubmitted = true;
        if (this.editWildcardForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.editWildcard(this.editWildcardForm.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Verification Wildcard Updated Successfully');
                this.getWildcard();
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    _keyPress(event) {
        const isNumericInput = (event) => {
            const key = event.keyCode;
            return ((key >= 48 && key <= 57) || // Allow number line
                (key >= 96 && key <= 105) // Allow number pad
            );
        };
        const isModifierKey = (event) => {
            const key = event.keyCode;
            return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
                (key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
                (key > 36 && key < 41) || // Allow left, up, right, down
                (
                // Allow Ctrl/Command + A,C,V,X,Z
                (event.ctrlKey === true || event.metaKey === true) &&
                    (key === 65 || key === 67 || key === 86 || key === 88 || key === 90));
        };
        const enforceFormat = (event) => {
            // Input must be of a valid number format or a modifier key, and not longer than ten digits
            if (!isNumericInput(event) && !isModifierKey(event)) {
                event.preventDefault();
            }
        };
        const formatToPhone = (event) => {
            if (isModifierKey(event)) {
                return;
            }
            const target = event.target;
            const input = event.target.value.replace(/\D/g, '').substring(0, 10); // First ten digits of input only
            const zip = input.substring(0, 3);
            const middle = input.substring(3, 6);
            const last = input.substring(6, 10);
            if (input.length > 6) {
                target.value = `(${zip}) ${middle} - ${last}`;
            }
            else if (input.length > 3) {
                target.value = `(${zip}) ${middle}`;
            }
            else if (input.length > 0) {
                target.value = `(${zip}`;
            }
        };
        // const inputElement = document.getElementById('number');
        const inputElement = document.getElementsByClassName('number');
        if (inputElement) {
            for (let i = 0; i < inputElement.length; i++) {
                inputElement[i].addEventListener('keydown', enforceFormat);
                inputElement[i].addEventListener('keyup', formatToPhone);
            }
        }
    }
};
VerificationManagementComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormBuilder"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_5__["ToastrService"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_6__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] }
];
VerificationManagementComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-verification-management',
        template: _raw_loader_verification_management_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_verification_management_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], VerificationManagementComponent);



/***/ }),

/***/ "DsyZ":
/*!**************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/voicemail/voicemail.component.html ***!
  \**************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n  \n  <div class=\"main-content\">  \n    <section class=\"section\">\n      <div class=\"section-body\">\n        <div class=\"row\">\n          <div class=\"col-12\">\n            <div class=\"card\">\n                <div class=\"row\" style=\"margin-top: 20px;\n                \">\n                    <div class=\"col-3\">\n                        <div class=\"card-header\">\n                        <!-- <h4>Number Data</h4></div> -->\n                        <h4>Voicemail</h4></div>\n                    </div>\n                    <div class=\"col-9 text-right mt-2\">\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\n                          <!-- <button routerLink=\"/add-target\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-plus\"></i> New Target\n                          </button> -->\n                          <!-- <button routerLink=\"/numbers/batch-edit\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-tasks\"></i> Batch Edit</button>                        \n                          <button routerLink=\"/numbers-import\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-plus\"></i> Import </button> -->\n                           <!-- <button (click)=\"exportdata()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fas fa-file-export\"></i> Export -->\n                          <!-- </button> -->\n                          <!-- <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Delete Selected\n                          </button>                          -->\n                          \n                          </div>                       \n                    </div>\n              \n                </div>            \n                \n              <div class=\"card-body\">\n                <div class=\"table-responsive\">\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\n                    <thead>\n                      <tr>\n                        <!-- <th></th> -->\n                        <!-- <th style=\"padding: 10px;width: 1px;\">\n                            <div class=\"custom-control custom-checkbox\" *ngIf=\"numbers?.length != 0\">\n                            <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\n                            <label class=\"custom-control-label\" for=\"customCheck1\"></label>\n                            </div>\n                        </th>                       -->\n                        <th>Time</th>\n                        <th>Callerid Number</th>\n                        <th>Campaign</th>\n                        <th>Recordings</th>\n                        <!-- <th>CID Number</th>\n                        <th>File Path</th>  -->\n                        <!-- <th>Created Date</th>\n                        <th>Active</th> -->\n                        <!-- <th>Action</th> -->\n                        <!-- <th>Action</th> -->\n                      </tr>\n                    </thead>\n                    <tbody *ngIf=\"numbers?.length != 0\">\n                        <tr *ngFor=\"let number of numbers;let i = index;\" class=\"detailrow_{{i}}\">\n                            <!-- <td (click)='details(i,number)' class=\"details-control\"></td> -->\n                            <!-- <td>\n                                <div class=\"custom-control custom-checkbox\">\n                                <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{number.uuid}}\"  [checked]=\"number.selected\" [value]=\"number.id\" >\n                                <label class=\"custom-control-label\" for=\"customCheck_{{number.uuid}}\"></label>\n                                </div>                                \n                            </td>                           -->\n                            <td>{{ number.created_epoch }}</td>\n                            <td>{{ number.cid_number }}</td>\n                            <td>{{ number.campaign }}</td>\n                            <td>\n                                <span>\n                                    <div *ngIf=\"number.file_path!=null\" style=\"cursor: pointer;\">\n                                      <i style=\"font-size: 21px;\" class=\"fa fa-play-circle\" (click) = \"play(number.file_path, number.cid_number)\"></i>\n                                      <!-- <i class=\"fa fa-pause\"></i> -->\n                                      <!-- <audio style=\"width: 130px;height: 30px;\" controls muted loop>\n                                        <source src=\"https://repuatationmanagement.s3.us-west-2.amazonaws.com/{{row.recording}}\" type=\"audio/mp3\">\n                                      </audio>  -->\n                                    </div>     \n                                  </span>\n                            </td>\n                            \n                            <!-- <td>\n                              <a routerLink=\"/edit-numbers/{{ number.uuid }}\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;\n                              <button (click)=\"Delete((number.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td> -->\n                        </tr>\n                    </tbody>\n                    <tbody *ngIf=\"numbers?.length == 0\">\n                      <tr>\n                        <td colspan=\"9\" class=\"no-data-available\">No data Available!</td>\n                      </tr>\n                    <tbody>\n                  </table>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n    \n  </div>");

/***/ }),

/***/ "E58W":
/*!******************************************************************!*\
  !*** ./src/app/modules/rules/rulesedit/rulesedit.component.scss ***!
  \******************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".rule-input {\n  width: 82%;\n  display: inline-block;\n}\n\n.rule-text-block {\n  width: 15%;\n  display: inline-block;\n  margin-right: 3%;\n  font-size: 12px;\n  font-weight: 500;\n}\n\n.btn-primary {\n  font-size: 12px !important;\n}\n\n.trashbtn {\n  font-size: 13px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxccnVsZXNlZGl0LmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0ksVUFBQTtFQUNBLHFCQUFBO0FBQ0o7O0FBQ0E7RUFDSSxVQUFBO0VBQ0EscUJBQUE7RUFDQSxnQkFBQTtFQUNBLGVBQUE7RUFDQSxnQkFBQTtBQUVKOztBQUFBO0VBQ0ksMEJBQUE7QUFHSjs7QUFEQTtFQUNJLGVBQUE7QUFJSiIsImZpbGUiOiJydWxlc2VkaXQuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIucnVsZS1pbnB1dCB7XHJcbiAgICB3aWR0aDogODIlO1xyXG4gICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG59XHJcbi5ydWxlLXRleHQtYmxvY2sge1xyXG4gICAgd2lkdGg6IDE1JTtcclxuICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcclxuICAgIG1hcmdpbi1yaWdodDogMyU7XHJcbiAgICBmb250LXNpemU6IDEycHg7XHJcbiAgICBmb250LXdlaWdodDogNTAwO1xyXG59XHJcbi5idG4tcHJpbWFyeSB7XHJcbiAgICBmb250LXNpemU6IDEycHghaW1wb3J0YW50O1xyXG59XHJcbi50cmFzaGJ0bntcclxuICAgIGZvbnQtc2l6ZTogMTNweDtcclxufSJdfQ== */");

/***/ }),

/***/ "Eo/H":
/*!**************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/dashboard/dashboard.component.html ***!
  \**************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n<div class=\"main-content\">\r\n    <section class=\"section\">\r\n      <div class=\"row \">\r\n        <div class=\"col-xl-3 col-lg-6\">\r\n          <div class=\"card l-bg-green-dark\">\r\n            <div class=\"card-statistic-3\">\r\n              <div class=\"card-icon card-icon-large\"><i class=\"fa fa-phone\"></i></div>\r\n              <div class=\"card-content\">\r\n                <h6 class=\"mb-0\">Today's Call</h6>\r\n                <span class=\"font-weight-bold mb-0 font-20\">{{NumberOfCalls}}</span>               \r\n              </div>\r\n            </div>\r\n          </div>\r\n          \r\n        </div>\r\n\r\n        <div class=\"col-xl-3 col-lg-6\">\r\n          <div class=\"card l-bg-orange-dark\">\r\n            <div class=\"card-statistic-3\">\r\n              <div class=\"card-icon card-icon-large\"><i class=\"fa fa-envelope\"></i></div>\r\n              <div class=\"card-content\">\r\n                <h6 class=\"mb-0\">Successful Calls</h6>\r\n                <span class=\"font-weight-bold mb-0 font-20\">{{NumberOfSMS}}</span>               \r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n\r\n        <div class=\"col-xl-3 col-lg-6\">\r\n          <div class=\"card l-bg-cyan-dark\">\r\n            <div class=\"card-statistic-3\">\r\n              <div class=\"card-icon card-icon-large\"><i class=\"fa fa-user\"></i></div>\r\n              <div class=\"card-content\">\r\n                <h6 class=\"mb-0\">Total IVR</h6>\r\n                <span class=\"font-weight-bold mb-0 font-20\">{{NumberOfIVR}}</span>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n        <div class=\"col-xl-3 col-lg-6\">\r\n          <div class=\"card l-bg-purple-dark\">\r\n            <div class=\"card-statistic-3\">\r\n              <div class=\"card-icon card-icon-large\"><i class=\"fa fa-phone\"></i></div>\r\n              <div class=\"card-content\">\r\n                <h6 class=\"mb-0\">Total Numbers</h6>\r\n                <span class=\"font-weight-bold mb-0 font-20\">{{NumberOfNumbers}}</span>              \r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n        \r\n      </div>\r\n           \r\n    </section>\r\n\r\n    <section>\r\n      <div class=\"card\">\r\n          <div class=\"row\">\r\n            <div class=\"card-header\">\r\n            <div class=\"col-md-8\">\r\n              <h6><i class=\"material-icons\">show_chart</i> Performance Summary</h6>\r\n            </div>\r\n            <!-- <div class=\"col-md-4 text-right\" style=\"display: -webkit-inline-box;left: 48px;\">\r\n              <label for=\"\">Select Date: &nbsp;&nbsp;</label>\r\n              <input style=\"width: auto;\" type=\"text\" class=\"form-control\" ngxDaterangepickerMd\r\n              [singleDatePicker]=\"true\" (change)=\"getChartNumberOfCalls($event)\"\r\n              [autoApply]=\"true\" \r\n               class=\"form-control\"\r\n              placeholder=\"Select please...\" [value]=\"currentDate | date:'MM/dd/yyyy'\" />\r\n            </div> -->\r\n          </div>\r\n          \r\n        </div>\r\n        <div class=\"card-body\">\r\n          <div [chart]=\"chart\"></div>\r\n          <hr>\r\n          <div class=\"table-responsive\">\r\n          <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n            <thead>\r\n              <tr>\r\n             \r\n                 <th>-</th>\r\n                 <th>Incoming</th>\r\n                 <th>Not Connected</th>\r\n                 <th>Completed</th>\r\n                 <th>Converted</th>\r\n                 <th>No Answer</th>\r\n                 <th>Revenue</th>\r\n                 <th>Payout</th>\r\n              </tr>\r\n            </thead>\r\n            <tbody *ngIf=\"labels?.length != 0\">\r\n                <tr *ngFor=\"let data of labels;let i=index\">\r\n                    <!-- <th>-</th> -->\r\n                    <td style=\"width:10%\">{{data.date}}<br>{{data.day}}</td>\r\n                    <!-- <th>{{labels[1].date}}<br>{{labels[1].day}}</th>\r\n                    <th>{{labels[2].date}}<br>{{labels[2].day}}</th>\r\n                    <th>{{labels[3].date}}<br>{{labels[3].day}}</th>\r\n                    <th>{{labels[4].date}}<br>{{labels[4].day}}</th>\r\n                    <th>{{labels[5].date}}<br>{{labels[5].day}}</th>\r\n                    <th>{{labels[6].date}}<br>{{labels[6].day}}</th> -->\r\n\r\n                    <td>{{ data.incoming}}</td>\r\n                    <td>{{ data.connected}}</td>\r\n                    <td>{{ data.completed}}</td>\r\n                    <td>{{ data.converted}}</td>\r\n                    <td>{{ data.noanswer}}</td>\r\n                    <td style=\"width:13%\">{{ data.revenue}}</td>\r\n                    <td style=\"width:13%\">{{ data.payout }}</td>                    \r\n                </tr>\r\n            </tbody>\r\n            <tbody *ngIf=\"labels?.length == 0\">\r\n              <tr>\r\n                <td colspan=\"15\" class=\"no-data-available\">No data Available!</td>\r\n              </tr>\r\n            <tbody>\r\n          </table>\r\n          </div>\r\n        </div>\r\n      </div>      \r\n    </section>\r\n  </div>\r\n  ");

/***/ }),

/***/ "FQwQ":
/*!*****************************************************************************************!*\
  !*** ./src/app/modules/publishers/publisher-settings/publisher-settings.component.scss ***!
  \*****************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJwdWJsaXNoZXItc2V0dGluZ3MuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "FYc2":
/*!***********************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/number/number-batchedit/number-batchedit.component.html ***!
  \***********************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n\r\n  <!-- Add Label Modal -->\r\n  <div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n  aria-hidden=\"true\">\r\n  <div class=\"modal-dialog\" role=\"document\">\r\n    <div class=\"modal-content\">\r\n      <div class=\"modal-header\">\r\n        <h5 class=\"modal-title\" id=\"formModal\">Create Label</h5>\r\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n          <span aria-hidden=\"true\">&times;</span>\r\n        </button>\r\n      </div>\r\n      <div class=\"modal-body\">\r\n        <form id=\"addLabel\" [formGroup]=\"addLabelForm\" (ngSubmit)=\"onLabelSubmit()\">\r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n             <div class=\"form-group\">\r\n              <label>Label Name</label>\r\n              <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': LabelSubmitted && labelcontrol.name.errors }\" (input)=\"validatename()\">\r\n              <div *ngIf=\"LabelSubmitted && labelcontrol.name.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"labelcontrol.name.errors.required\">Name is required</div>\r\n              </div>   \r\n              <div *ngIf=\"isName == 'success'  && isName != ''\" style=\"color:green;\">\r\n                 Name Is Available\r\n               </div> \r\n                <div *ngIf=\"isName == 'fail' && isName != ''\" style=\"color:red;\">\r\n                 Name Is Not Available\r\n               </div>           \r\n           </div>\r\n  \r\n            <div class=\"form-group\">\r\n              <label  class=\"d-block\">Notes:</label>\r\n              <textarea formControlName=\"notes\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': LabelSubmitted && labelcontrol.notes.errors }\"></textarea>                   \r\n              <div *ngIf=\"LabelSubmitted && labelcontrol.notes.errors\" class=\"invalid-feedback\">\r\n                 <div *ngIf=\"labelcontrol.notes.errors.required\">Notes is required</div>\r\n             </div>         \r\n            </div>\r\n  \r\n              </div>     \r\n      </div>  \r\n     \r\n          <div class=\"modal-footer\" style=\"padding: 0;\">\r\n             <button [disabled]=\"isName == 'fail'\" (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Label</button>\r\n             <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n            </div>\r\n        </form>\r\n      </div>\r\n    </div>\r\n  </div>\r\n  </div>      \r\n<div class=\"main-content\">\r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12 col-md-12 col-lg-12\">\r\n                <form [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n                <div class=\"card\">\r\n                  <div class=\"card-header\">\r\n                    <h4>Batch Edit</h4>\r\n                  </div>\r\n                  <div class=\"card-body\">                    \r\n                    <!-- <div class=\"form-group\">\r\n                      <label>Select CSV File</label>\r\n                      <div class=\"custom-file\">\r\n                          <input formControlName=\"number\" type=\"file\" class=\"custom-file-input\" id=\"customFile\" [ngClass]=\"{ 'is-invalid': submitted && f.number.errors }\" (change)=\"onFileChange($event)\">\r\n                          <label class=\"custom-file-label\" for=\"customFile\">Choose file</label>\r\n                          <small *ngIf=\"filename\">Selected File: {{filename}}</small><br>\r\n                          <div *ngIf=\"submitted && f.number.errors\" class=\"invalid-feedback\">\r\n                              <div *ngIf=\"f.number.errors.required\">File is required</div>\r\n                          </div> \r\n                          <small class=\"text-danger\">Note : File should be in .csv format and file have only numbers.</small><br>\r\n                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<small class=\"text-danger\">: You can upload Maximum 1000 Numbers</small>\r\n                      </div>                        \r\n                    </div> -->\r\n\r\n                    <div class=\"form-group\">\r\n                      <label>Enter Number</label>\r\n                          <textarea [ngClass]=\"{ 'is-invalid': submitted && f.number.errors }\" formControlName=\"number\" class=\"form-control\" name=\"\" id=\"\" cols=\"30\" rows=\"4\"></textarea>\r\n                          <div *ngIf=\"submitted && f.number.errors\" class=\"invalid-feedback\">\r\n                              <div *ngIf=\"f.number.errors.required\">Numbers is required</div>\r\n                          </div> \r\n                          <!-- <small class=\"text-danger\">Note : File should be in .csv format and file have only numbers.</small><br>\r\n                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<small class=\"text-danger\">: You can upload Maximum 1000 Numbers</small> -->\r\n                    </div>\r\n                    <!-- <label style=\"font-weight: 600;color: #34395e;font-size: 12px;letter-spacing: 0.5px;\">Select FSL Rules:</label> -->\r\n                    <!-- <div class=\"form-group\">\r\n                            <select formControlName=\"fslrulesname\" class=\"form-control\" (change)=\"getRulesByName($event.target.value)\" [ngClass]=\"{ 'is-invalid': submitted && f.fslrulesname.errors }\">\r\n                              <option value=\"\" selected>Select FSL Rules</option>\r\n                              <option *ngFor=\"let rules of allRulesData;\" [value]=\"rules.name\">\r\n                                  {{rules.name}}\r\n                                </option>\r\n                            </select>\r\n                            <div *ngIf=\"submitted && f.fslrulesname.errors\" class=\"invalid-feedback\">\r\n                                <div *ngIf=\"f.fslrulesname.errors.required\">FSL Rules Name is required</div>\r\n                            </div>                          \r\n                        \r\n                          <div class=\"row\" *ngIf=\"allRulesbyname?.length > 0\" >\r\n                            <div class=\"col-md-12\">\r\n                                <div class=\"card\">\r\n                                  <div class=\"card-body\">\r\n                                    <div class=\"table-responsive\">\r\n                                      <table class=\"table table-striped\">\r\n                                        <tbody><tr style=\"font-size: 13px;\">\r\n                                          <th style=\"width:15%;\">Name</th>\r\n                                          <th style=\"width:15%;\">Day</th>\r\n                                          <th style=\"width:15%;\">Start Time</th>\r\n                                          <th style=\"width:15%;\">End Time</th>\r\n                                        </tr>\r\n                                        <div style=\"display: contents!important;\" *ngFor =\"let rules of allRulesbyname;\">\r\n                                        <tr style=\"font-size: 13px;\">\r\n                                          <td>\r\n                                              {{rules.name}}\r\n                                          </td>\r\n                                          <td>\r\n                                              <div *ngIf=\"rules.timeofday == 1\">\r\n                                                  Monday to Friday\r\n                                                </div>\r\n                                                <div *ngIf=\"rules.timeofday == 2\">\r\n                                                  Monday to Saturday\r\n                                                </div>\r\n                                                <div *ngIf=\"rules.timeofday == 3\">\r\n                                                  Monday to Monday\r\n                                                </div>\r\n                                                <div *ngIf=\"rules.timeofday == 4\">\r\n                                                  Friday to Monday\r\n                                                </div>\r\n                                                <div *ngIf=\"rules.timeofday == 5\">\r\n                                                  Saturday to Monday\r\n                                                </div>\r\n                                          </td>\r\n                                          <td>\r\n                                              {{rules.start_time}}\r\n                                          </td>\r\n                                          <td>\r\n                                              {{rules.end_time}}\r\n                                             \r\n                                          </td>\r\n                                             \r\n                                        </tr>\r\n                                        <tr><br>\r\n                                          <td colspan=\"4\" style=\"display: contents;width: 168%;\">\r\n                                              <table class=\"table fortbl table-striped\">\r\n                                              <tbody>\r\n                                                <tr style=\"display: -webkit-box;\">\r\n                                                  <th>Location Index</th>\r\n                                                  <th>Primary Location Type</th>\r\n                                                  <th>Primary Location Value</th>\r\n                                                </tr>\r\n                                                <tr>\r\n                                                    <div *ngFor='let key of  [0,1,2,3,4,5,6,7,8,9,10]; let i = index'>\r\n                                                        <div *ngIf='rules.noofforwardinglocation>=key' style=\"width: 100%;display: inline-table;\">\r\n                                                          <tr style=\"font-size: 13px;width: 100%;\">\r\n                                                            <td>{{key+1}}</td>\r\n                                                            <td>\r\n                                                                <span *ngIf=\"rules[i].primary_forwarding_type == 0 || rules[i].primary_forwarding_type == null\">\r\n                                                                    Number\r\n                                                                  </span>\r\n                                                                <span *ngIf=\"rules[i].primary_forwarding_type == 1\">\r\n                                                                  IVR Menu                            </span>\r\n                                                                <span *ngIf=\"rules[i].primary_forwarding_type == 2\">\r\n                                                                  SIP (IP Address)\r\n                                                                </span>\r\n                                                            </td>\r\n                                                            <td>\r\n                                                                <p *ngIf=\"rules[i].primary_forwarding_type == 0 || rules[i].primary_forwarding_type == null\">\r\n                                                                    {{rules[i].primary_forwarding_number}}\r\n                                                                  </p>\r\n                                                                <p *ngIf=\"rules[i].primary_forwarding_type == 1\">\r\n                                                                  {{rules[i].primary_forwarding_ivr}}\r\n                                                                </p>\r\n                                                                <p *ngIf=\"rules[i].primary_forwarding_type == 2\">\r\n                                                                  {{rules[i].primary_forwarding_sip}}\r\n                                                                </p>\r\n                                                            </td>\r\n                                                          \r\n                                                      \r\n                                                        </tr>\r\n                                                        </div>\r\n                                                      </div> \r\n                                                    </tr>\r\n\r\n                                              </tbody>\r\n                                              </table>\r\n                                              <br>\r\n                                          </td>\r\n                                        </tr> \r\n                                      </div>                                       \r\n                                      </tbody></table>\r\n                                    </div>\r\n                                  </div>\r\n                                </div>\r\n                              </div>\r\n                        </div>\r\n                     \r\n                    </div> -->\r\n                  \r\n                  <!-- <div class=\"form-group\">\r\n                      <div class=\"control-label\">JKL Rules</div>\r\n                      <label class=\"custom-switch mt-2 pl-0\">\r\n                        <input type=\"checkbox\" (change)=\"get_jklrules($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                        <span class=\"custom-switch-indicator\"></span>                     \r\n                      </label>\r\n                  </div>   -->\r\n\r\n                  <div class=\"form-group\">\r\n                    <div class=\"control-label\">Update Campaign </div>\r\n                      <label class=\"custom-switch mt-2 pl-0\">\r\n                        <input type=\"checkbox\" (change)=\"get_campaign($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input labelnumber\">\r\n                        <span class=\"custom-switch-indicator\"></span>                     \r\n                      </label>\r\n                  </div>\r\n\r\n                  <div class=\"form-group\" *ngIf=\"iscampaign==true\">\r\n                    <label>Select Campaign</label>\r\n                    <!-- [ngClass]=\"{ 'is-invalid': submitted && f.campaign.errors }\" -->\r\n                    <!-- <select formControlName=\"campaign\" class=\"form-control\" [value]=\"\">\r\n                      <option value=\"\">Select Campaign</option>\r\n                      <option value=\"{{data.id}}\" *ngFor=\"let data of getallcampain\">{{data.text}}</option>\r\n                    </select> -->\r\n\r\n                    <angular2-multiselect [data]=\"getallcampain\" formControlName=\"campaign\" [settings]=\r\n                    \"{\r\n                      enableSearchFilter: true,\r\n                      showCheckbox:false,\r\n                      singleSelection: true, text:'Assign Campaign'}\">\r\n                  </angular2-multiselect> \r\n                    \r\n                    <!-- <ng-select2 formControlName=\"campaign\" [placeholder]=\"'Please select a Campaign'\"  [ngClass]=\"{ 'is-invalid': submitted && f.campaign.errors }\"  [options]=\"options\" [data]=\"getallcampain\" [width]=\"1000\">\r\n                    </ng-select2> -->\r\n                    <!-- <div *ngIf=\"submitted && f.campaign.errors\" class=\"invalid-feedback\">\r\n                      <div *ngIf=\"f.campaign.errors.required\">Campaign is required</div>\r\n                  </div>  -->\r\n                  </div>\r\n\r\n                  <div class=\"form-group\">\r\n                    <div class=\"control-label\">Update Publisher </div>\r\n                      <label class=\"custom-switch mt-2 pl-0\">\r\n                        <input type=\"checkbox\" (change)=\"get_publishter($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input labelnumber\">\r\n                        <span class=\"custom-switch-indicator\"></span>                     \r\n                      </label>\r\n                  </div>\r\n                 \r\n                  <div class=\"form-group\" *ngIf=\"ispublisher==true\">\r\n                    <label>Select Publisher</label><br>\r\n                    <!-- <select formControlName=\"publisher\" class=\"form-control\" [value]=\"\">\r\n                      <option value=\"\">Select Publisher</option>\r\n                      <option value=\"{{data.id}}\" *ngFor=\"let data of Allpublisher\">{{data.text}}</option>\r\n                    </select> -->\r\n\r\n                    <angular2-multiselect [data]=\"Allpublisher\" formControlName=\"publisher\" [settings]=\r\n                    \"{\r\n                      enableSearchFilter: true,\r\n                      showCheckbox:false,\r\n                      singleSelection: true, text:'Assign Publisher'}\">\r\n                  </angular2-multiselect>\r\n                    \r\n                    \r\n                  <div class=\"control-group mt-2\" *ngIf=\"this.addForm.get('publisher').value!=''\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Payout Type :</label>\r\n                    <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==0}\" (click)=\"payout_typevaledit(0)\"> \r\n                          <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                          None\r\n                        </label>\r\n                        <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payout_typevaledit(1)\">\r\n                          <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                          Fixed Payout\r\n                        </label>\r\n                        <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                          <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                          Revenue %\r\n                        </label>\r\n                      </div>\r\n                      <div *ngIf=\"publisherSubmitted && publisherFormcontrol.payout_typeedit.errors\" class=\"invalid-feedback\">\r\n                        <div *ngIf=\"publisherFormcontrol.payout_typeedit.errors.required\">Payout Type is required</div>\r\n                    </div>   \r\n                    </div>\r\n                    <div *ngIf=\"payout_typevalueedit != 0\">\r\n                      <div class=\"control-group mt-2\">\r\n                          <label class=\"control-label input-label\" for=\"startTime\">Payout Amount :</label>\r\n                            <div class=\"input-group\">\r\n                              <div class=\"input-group-prepend\">\r\n                                <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                              </div>\r\n                              <input type=\"text\" formControlName=\"payout_amount\" class=\"form-control\" placeholder=\"Enter Payout Amount\" aria-label=\"Enter Payout Amount\" aria-describedby=\"btnGroupAddon\">\r\n                            </div>                 \r\n                      </div>\r\n                      \r\n                    <div class=\"control-group mt-2\">\r\n                      <label class=\"control-label input-label\" for=\"startTime\">Payout Trigger :</label>\r\n                        <select class=\"form-control\" formControlName=\"payout_trigger\">\r\n                          <option value=\"0\">Inbound Call</option>\r\n                          <option value=\"1\">Call Length</option>\r\n                          <option value=\"2\">Call Successfully Connected</option>\r\n                        </select>              \r\n                    </div>\r\n                    <div class=\"control-group mt-2\" *ngIf=\"this.addForm.get('payout_trigger').value == 1\">\r\n                        <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                        <input type=\"text\"  class=\"form-control\" type=\"text\" formControlName=\"payout_seconds\" placeholder=\"Enter Seconds\" />         \r\n                    </div>\r\n                  </div>\r\n               \r\n\r\n                  </div>\r\n                  <hr>\r\n                  <div class=\"form-group\">\r\n                    <div class=\"control-label\">Add Associated Label </div>\r\n                      <label class=\"custom-switch mt-2 pl-0\">\r\n                        <input type=\"checkbox\" (change)=\"get_label($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input labelnumber\">\r\n                        <span class=\"custom-switch-indicator\"></span>                     \r\n                      </label>\r\n                  </div>\r\n\r\n                  <div class=\"form-group\" *ngIf=\"islabel==true\">\r\n                       <label>Select Label</label>\r\n                        <angular2-multiselect [data]=\"dropdownList\" formControlName=\"add_assosciated_labels\" [settings]=\"dropdownSettings\" ></angular2-multiselect>\r\n                      <small><a href=\"#\" class=\"\" data-toggle=\"modal\" data-target=\"#addLabels\">Add New Label</a></small>\r\n                  </div>\r\n                  <hr>\r\n                  <div class=\"form-group\">\r\n                    <div class=\"control-label\">Remove Associated Label </div>\r\n                      <label class=\"custom-switch mt-2 pl-0\">\r\n                        <input type=\"checkbox\" (change)=\"get_removelabel($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input labelnumber\">\r\n                        <span class=\"custom-switch-indicator\"></span>                     \r\n                      </label>\r\n                  </div>\r\n\r\n                  <div class=\"form-group\" *ngIf=\"isremovelabel==true\">\r\n                       <label>Select Label</label>\r\n                        <angular2-multiselect [data]=\"dropdownList\" formControlName=\"remove_assosciated_labels\" [settings]=\"dropdownSettings\" ></angular2-multiselect>\r\n                      <small><a href=\"#\" class=\"\" data-toggle=\"modal\" data-target=\"#addLabels\">Add New Label</a></small>\r\n                  </div>\r\n                    \r\n                 \r\n                  </div>\r\n                  <div class=\"card-footer text-right\">\r\n                        <button  class=\"btn btn-primary mr-1\" type=\"submit\">Update Numbers</button>\r\n                        <button style=\"margin-right: 4px;\" routerLink=\"/numbers\" class=\"btn btn-primary\">Back To Numbers</button>\r\n                        <!-- <button (click)=\"onReset()\" class=\"btn btn-secondary\" type=\"reset\">Reset</button> -->\r\n                  </div>\r\n                </div>\r\n              </form>\r\n\r\n    </div>\r\n");

/***/ }),

/***/ "FaIV":
/*!********************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/rules/rulesedit/rulesedit.component.html ***!
  \********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"main-content\">\r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12 col-md-12 col-lg-12\">\r\n                <form [formGroup]=\"editForm\" (ngSubmit)=\"onSubmit()\">\r\n                <div class=\"card\" >\r\n                  <div class=\"card-header\">\r\n                    <h4>Edit Rule</h4>\r\n                  </div>\r\n                  <div class=\"card-body\">                    \r\n                    <div class=\"form-group\">\r\n                      <label>Name</label>\r\n                      <input type=\"text\" formControlName=\"name\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': submitted && f.name.errors }\">\r\n                      <div *ngIf=\"submitted && f.name.errors\" class=\"invalid-feedback\">\r\n                          <div *ngIf=\"f.name.errors.required\">Name is required</div>\r\n                      </div> \r\n                    </div>\r\n \r\n                    <table class=\"table table-striped  dataTable no-footer\" *ngIf=\"editForm['controls'].itemRows!=null\" formGroupName=\"itemRows\">\r\n                         <tbody *ngFor=\"let itemrow of editForm['controls'].itemRows['controls']; let i=index\" [formGroupName]=\"i\">      \r\n                             <tr style=\"background: #fff;\">\r\n                                 <td>\r\n                                     <div class=\"rule-text-block\"><strong>If</strong></div>\r\n                                     <div class=\"rule-input\">\r\n                                         <select formControlName=\"ifval\" class=\"form-control\">        \r\n                                             <option value=\"NUMBER\">Number</option>\r\n                                             <option value=\"AREA_CODE\">Area Code</option>\r\n                                             <option value=\"WILDCARD\">Wildcard</option>\r\n                                         </select>\r\n                                     </div>\r\n                                 </td>\r\n                                 <td>\r\n                                     <div class=\"rule-text-block\"><strong>Is</strong></div> \r\n                                     <div class=\"rule-input\">\r\n                                         <input formControlName=\"isval\" type=\"text\" id=\"number\" (keypress)=_keyPress($event) type=\"text\" class=\"form-control number\" maxlength=\"14\">\r\n                                     </div>\r\n                                 </td>\r\n                                 <td>\r\n                                     <div class=\"rule-text-block\"><strong>Then</strong></div> \r\n                                     <div class=\"rule-input\">\r\n                                         <select formControlName=\"thenval\" class=\"form-control\">\r\n                                             <option value=\"FORWARD_TO\">Forward The Call To</option>\r\n                                             <option value=\"REJECT_THE_CALL\">Reject The Call</option>\r\n                                             <option value=\"PLAY_AUDIO\">Play An Audio File</option>\r\n                                             <option value=\"FORWARD_TO_SECONDARY\">Forward To Number Secondary</option>\r\n                                             <option value=\"FORWARD_TO_IVR_MENU\">Forward To IVR Menu</option>\r\n                                         </select>\r\n                                     </div>\r\n                                 </td>\r\n                                 <td>\r\n                                         <input formControlName=\"thentxt\" type=\"text\" class=\"form-control\">\r\n                                 </td>\r\n                                 <td>\r\n                                     <div class=\"rule-text-block\"><strong>And</strong></div> \r\n                                     <div class=\"rule-input\">\r\n                                         <select [attr.disabled]=\"controlEnabled\" formControlName=\"andval\" class=\"form-control ember-view\" [value]=\"'STOP'\">\r\n                                               <option value=\"STOP\">Stop Processing</option>\r\n                                                 <!-- <option value=\"TRY_NEXT_RULE\">Try Next Rule</option>\r\n                                                 <option value=\"FORWARD_TO_NUMBER_DEFAULT\">Forward To Number Default</option>\r\n                                                 <option value=\"FORWARD_TO_NUMBER_SECONDARY\">Forward To Number Secondary</option> -->\r\n                                         </select>\r\n                                     </div>\r\n                                 </td>\r\n                                 <td>\r\n                                     <button type=\"button\" (click)=\"deleteRow(i)\" class=\"btn btn-danger btn-md trashbtn\" style=\"color: #fff;\"><i class=\"fa fa-trash\"></i></button>\r\n                                 </td>\r\n                             </tr>\r\n                             <tr style=\"background: #fff;\">\r\n                                    <td colspan=\"6\" class=\"text-center\">\r\n                                            <strong>Otherwise</strong>\r\n                                    </td>\r\n                                </tr>\r\n                            </tbody>\r\n                             <tbody>\r\n                             <tr style=\"background: #fff;\">\r\n                                     <td colspan=\"4\"></td>\r\n                                     <td colspan=\"2\" class=\"text-center\" style=\"padding-left: 130px!important;\">\r\n                                         <button type=\"button\" (click)=\"addRow()\" class=\"btn btn-primary\"><i class=\"fa fa-plus\"></i> Add Row</button>\r\n                                         <!-- *ngIf=\"editForm.get('rows')\" -->\r\n                                     </td>\r\n                                     \r\n                             </tr>\r\n                             <tr style=\"background: #fff;\">\r\n                                 <td colspan=\"6\" class=\"text-center\">\r\n                                     <strong>Otherwise</strong><br>\r\n                                     <strong>Redirect Call To It's Forwarding Number</strong></td>\r\n                             </tr>\r\n                         </tbody>\r\n                     </table>\r\n \r\n                  </div>\r\n                  <div class=\"card-footer text-right\">\r\n                        <button  class=\"btn btn-primary mr-1\" type=\"submit\">Update Rule Sets</button>\r\n                        <button style=\"margin-right: 4px;\" routerLink=\"/rules\" class=\"btn btn-primary\">Back To Rule Sets</button>\r\n                        <button class=\"btn btn-secondary\" type=\"reset\">Reset</button>\r\n                      </div>\r\n                </div>\r\n              </form>\r\n \r\n    </div>\r\n ");

/***/ }),

/***/ "FnDb":
/*!*************************************************************************************!*\
  !*** ./src/app/modules/number/number-addfslrules/number-addfslrules.component.scss ***!
  \*************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJudW1iZXItYWRkZnNscnVsZXMuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "GE5R":
/*!*******************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/auth/profile/profile.component.html ***!
  \*******************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n<div class=\"main-content\">\r\n       <section class=\"section\">\r\n         <div class=\"section-body\">\r\n           <div class=\"row\">\r\n             <div class=\"col-12 col-md-12 col-lg-12\">\r\n               <form [formGroup]=\"profileForm\" (ngSubmit)=\"onSubmit()\">\r\n               <div class=\"card\">\r\n                 <div class=\"card-header\">\r\n                   <h4>Edit Profile</h4>\r\n                 </div>\r\n                 <div class=\"card-body\">                    \r\n                   <div class=\"form-group\">\r\n                     <label>Firstname</label>\r\n                     <input type=\"text\" formControlName=\"firstname\" [ngClass]=\"{ 'is-invalid': submitted && f.firstname.errors }\" class=\"form-control\">\r\n                     <div *ngIf=\"submitted && f.firstname.errors\" class=\"invalid-feedback\">\r\n                        <div *ngIf=\"f.firstname.errors.required\">Firstname is required</div>\r\n                    </div>\r\n\r\n                   </div>\r\n                   <div class=\"form-group\">\r\n                     <label>Lastname</label>\r\n                     <input type=\"text\" formControlName=\"lastname\" [ngClass]=\"{ 'is-invalid': submitted && f.lastname.errors }\" class=\"form-control\">\r\n                     <div *ngIf=\"submitted && f.lastname.errors\" class=\"invalid-feedback\">\r\n                         <div *ngIf=\"f.lastname.errors.required\">Lastname is required</div>\r\n                     </div> \r\n                   </div>\r\n                   <div class=\"form-group\">\r\n                     <label>Password</label>\r\n                     <input type=\"password\" formControlName=\"password\" class=\"form-control\">\r\n                   </div>\r\n                   <div class=\"form-group\">\r\n                     <label>Select Your Timezone</label>\r\n                      <select name=\"timezone\" formControlName=\"timezone\" id=\"\" [value]=\"''\" class=\"form-control\">\r\n                          <option value=\"\">Select Timezone</option>\r\n                          <option value=\"{{item.id}}\" *ngFor=\"let item of alltimezone\">{{item.gmtzone}}</option>\r\n                      </select>\r\n                   </div>\r\n                   <!-- <div class=\"form-group\">\r\n                    <div class=\"control-label\">Recording</div>\r\n                    <label class=\"custom-switch mt-2 pl-0\">\r\n                      <input type=\"checkbox\" [checked]=\"recordingval==1\" (change)=\"get_recordingstatus($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                      <span class=\"custom-switch-indicator\"></span>                     \r\n                    </label>\r\n                  </div> -->\r\n                 </div>\r\n                 <div class=\"card-footer text-right\">\r\n                    <button  class=\"btn btn-primary btn-sm p-2\" type=\"submit\"><i class=\"fa fa-save\"></i> Update Profile</button>\r\n                </div>\r\n               </div>\r\n             </form>\r\n\r\n   </div>\r\n\r\n");

/***/ }),

/***/ "GGN3":
/*!**************************************************************!*\
  !*** ./src/app/modules/rules/rulesadd/rulesadd.component.ts ***!
  \**************************************************************/
/*! exports provided: RulesaddComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RulesaddComponent", function() { return RulesaddComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_rulesadd_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./rulesadd.component.html */ "rkrF");
/* harmony import */ var _rulesadd_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rulesadd.component.scss */ "1F1i");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");








let RulesaddComponent = class RulesaddComponent {
    constructor(fb, toastrService, moduleService, router) {
        this.fb = fb;
        this.toastrService = toastrService;
        this.moduleService = moduleService;
        this.router = router;
        this.controlEnabled = true;
        this.submitted = false;
    }
    ngOnInit() {
        this.addForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            itemRows: this.fb.array([this.initItemRow()]),
        });
    }
    get f() { return this.addForm.controls; }
    onSubmit() {
        // const formData = new FormData();      
        this.submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // console.log(this.addForm.value);
        this.moduleService.addRuleSet(this.addForm.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Rule Set Added Successfully');
                this.router.navigate(['/rules']);
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    initItemRow() {
        return this.fb.group({
            ifval: ['NUMBER', ''],
            isval: ['', ''],
            thenval: ['FORWARD_TO', ''],
            thentxt: ['', ''],
            andval: ['STOP', ''],
        });
    }
    addRow() {
        // alert('ok');
        const control = this.addForm.controls['itemRows'];
        control.push(this.initItemRow());
    }
    deleteRow(index) {
        const control = this.addForm.controls['itemRows'];
        if (control != null) {
            this.totalrow = control.value.length;
        }
        if (this.totalrow > 1) {
            control.removeAt(index);
        }
        else {
            this.toastrService.error('One Record is Mendatory');
            // alert('One Record is Mendatory');
            return false;
        }
    }
    _keyPress(event) {
        const isNumericInput = (event) => {
            const key = event.keyCode;
            return ((key >= 48 && key <= 57) || // Allow number line
                (key >= 96 && key <= 105) // Allow number pad
            );
        };
        const isModifierKey = (event) => {
            const key = event.keyCode;
            return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
                (key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
                (key > 36 && key < 41) || // Allow left, up, right, down
                (
                // Allow Ctrl/Command + A,C,V,X,Z
                (event.ctrlKey === true || event.metaKey === true) &&
                    (key === 65 || key === 67 || key === 86 || key === 88 || key === 90));
        };
        const enforceFormat = (event) => {
            // Input must be of a valid number format or a modifier key, and not longer than ten digits
            if (!isNumericInput(event) && !isModifierKey(event)) {
                event.preventDefault();
            }
        };
        const formatToPhone = (event) => {
            if (isModifierKey(event)) {
                return;
            }
            const target = event.target;
            const input = event.target.value.replace(/\D/g, '').substring(0, 10); // First ten digits of input only
            const zip = input.substring(0, 3);
            const middle = input.substring(3, 6);
            const last = input.substring(6, 10);
            if (input.length > 6) {
                target.value = `(${zip}) ${middle}-${last}`;
            }
            else if (input.length > 3) {
                target.value = `(${zip}) ${middle}`;
            }
            else if (input.length > 0) {
                target.value = `(${zip}`;
            }
        };
        // const inputElement = document.getElementById('number');
        const inputElement = document.getElementsByClassName('number');
        if (inputElement) {
            for (let i = 0; i < inputElement.length; i++) {
                inputElement[i].addEventListener('keydown', enforceFormat);
                inputElement[i].addEventListener('keyup', formatToPhone);
            }
        }
    }
};
RulesaddComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormBuilder"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_5__["ToastrService"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_6__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] }
];
RulesaddComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-rulesadd',
        template: _raw_loader_rulesadd_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_rulesadd_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], RulesaddComponent);



/***/ }),

/***/ "GN3X":
/*!******************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/ivr-menus/ivr-routing-plans/edit-plan/edit-plan.component.html ***!
  \******************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n  <!-- Edit Routing Modal -->\r\n  <div class=\"modal fade\" id=\"editRouting\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n  aria-hidden=\"true\">\r\n  <div class=\"modal-dialog\" role=\"document\">\r\n    <div class=\"modal-content\">\r\n      <div class=\"modal-header\">\r\n        <h5 class=\"modal-title\" id=\"formModal\">Edit Routing Plan</h5>\r\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n          <span aria-hidden=\"true\">&times;</span>\r\n        </button>\r\n      </div>\r\n      <div class=\"modal-body\">\r\n        <form id=\"addLabel\" [formGroup]=\"editRoutingForm\" (ngSubmit)=\"oneditRoutingSubmit()\">\r\n            <fieldset class=\"scheduler-border\">\r\n               <legend class=\"scheduler-border\">Update Routing Plan</legend>\r\n                 <div class=\"control-group mt-2\">\r\n                   <input type=\"hidden\" name=\"\" formControlName=\"uuid\">\r\n                  <label class=\"control-label input-label\" for=\"startTime\">Pririty :</label>\r\n                  <input type=\"number\" formControlName=\"priority\" class=\"form-control\"/>    \r\n                </div>\r\n                \r\n                <div class=\"control-group mt-2\">\r\n                  <label class=\"control-label input-label\" for=\"startTime\">Weight :</label>\r\n                  <input type=\"number\" formControlName=\"weight\" class=\"form-control\"/>    \r\n                </div>\r\n              \r\n                 <div class=\"control-group mt-2\">\r\n                     <label class=\"control-label input-label\">Conversation Revenue :</label>\r\n                     <div class=\"input-group\">\r\n                      <div class=\"input-group-prepend\">\r\n                        <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                      </div>\r\n                      <input type=\"text\" formControlName=\"conversation_revenue\" class=\"form-control\" placeholder=\"Enter Conversation Revenue\" aria-label=\"Enter Conversation Revenue\" aria-describedby=\"btnGroupAddon\" [ngClass]=\"{ 'is-invalid': submitted && f.conversation_revenue.errors }\">\r\n                      <div *ngIf=\"submitted && f.conversation_revenue.errors\" class=\"invalid-feedback\">\r\n                        <div *ngIf=\"f.conversation_revenue.errors.required\">Conversation Revenue is required</div>\r\n                    </div>   \r\n                    </div>        \r\n                 </div>\r\n                \r\n                 <div class=\"control-group mt-2\">\r\n                     <label class=\"control-label input-label\" for=\"startTime\">Conversation Event :</label>\r\n                     <select formControlName=\"conversation_event\" class=\"form-control\"  [ngClass]=\"{ 'is-invalid': submitted && f.conversation_event.errors }\">\r\n                      <option value=\"0\">Call Length</option>\r\n                      <option value=\"1\">Call Successfully Connected</option>\r\n                    </select>  \r\n                     <div *ngIf=\"submitted && f.conversation_event.errors\" class=\"invalid-feedback\">\r\n                         <div *ngIf=\"f.conversation_event.errors.required\">Conversation Event is required</div>\r\n                    </div>       \r\n                 </div>\r\n  \r\n                   <div class=\"control-group mt-2\">\r\n                     <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                     <input type=\"text\" formControlName=\"conversation_seconds\" class=\"form-control\" type=\"text\" placeholder=\"Enter Seconds\" />                  \r\n                    \r\n                   </div>\r\n  \r\n  \r\n                   <div class=\"control-group mt-2\">\r\n                    <label>Restrict Duplicate</label>\r\n                    <select #restrictdup formControlName=\"restrictdup\" name=\"restrictdup\" id=\"restrictdup\" class=\"form-control\">\r\n                      <option value=\"0\">Buyer Settings (Do not Restrict)</option>\r\n                      <option value=\"1\">Do not Restrict</option>\r\n                      <option value=\"2\">By Campaign - Individual Target</option>\r\n                    </select>                              \r\n                 </div>\r\n                 <div *ngIf=\"restrictdup.value==2\">\r\n                 <div class=\"control-group mt-2\">\r\n                    <label>Restrict After</label>\r\n                    <select formControlName=\"restrictafter\" name=\"restrictafter\" id=\"restrictafter\" class=\"form-control\">\r\n                      <option value=\"0\">Converted</option>\r\n                      <option value=\"1\">Connected</option>                          \r\n                    </select>                              \r\n                 </div>\r\n                 <div class=\"control-group\">\r\n                  <label class=\"control-label input-label\" for=\"startTime\">Duration:</label>\r\n                  <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': getsettingToggleDurationval==0}\" (click)=\"settingToggleDuration(0)\"> \r\n                        <input class=\"form-check-input\" name=\"settingToggleDuration\" formControlName=\"settingToggleDuration\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                        Always\r\n                  </label>\r\n                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': getsettingToggleDurationval==1}\" (click)=\"settingToggleDuration(1)\">\r\n                    <input class=\"form-check-input\" name=\"settingToggleDuration\" formControlName=\"settingToggleDuration\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                    Time Limit\r\n                  </label>                              \r\n                    </div>                \r\n             </div>                       \r\n              <br>\r\n              <div class=\"control-group row mt-2\" *ngIf=\"this.getsettingToggleDurationval==1\">\r\n                <div class=\"col-3\"><input  formControlName=\"days\" style=\"width: 80px;\" type=\"number\"  class=\"form-control formcontrol\" name=\"\" id=\"\"></div>\r\n                <div class=\"col-2 mt-2\"><span>Days</span></div>                           \r\n              </div>\r\n              </div>\r\n                  \r\n  \r\n               </fieldset>\r\n           \r\n          <div class=\"modal-footer\" style=\"padding: 0;\">\r\n           <!-- !addLabelForm.valid || -->\r\n             <button (click)=\"closeroutingModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Edit Routing Plan</button>\r\n             <button data-dismiss=\"modal\" aria-label=\"Close\" type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Close</button>\r\n            </div>\r\n        </form>\r\n      \r\n  </div>\r\n  </div>   \r\n  </div>   \r\n  </div>   \r\n  \r\n  <div class=\"main-content\">\r\n      <section class=\"section\">\r\n        <div class=\"section-body\">\r\n          <div class=\"row\">\r\n            <div class=\"col-12 col-md-12 col-lg-12\">\r\n              <form [formGroup]=\"editForm\" (ngSubmit)=\"onSubmit()\">\r\n              <div class=\"card\" >\r\n                <div class=\"card-header\">\r\n                  <h4> Setup Your IVR Routing Plan</h4>\r\n                </div>\r\n                <div class=\"card-body\" >\r\n            \r\n            <fieldset class=\"scheduler-border\">\r\n            <legend class=\"scheduler-border\">Setup Your Routing Plan</legend>\r\n            <section>\r\n              <strong>Name your Routing Plan.</strong>\r\n              <hr>\r\n              <div class=\"form-group row\">\r\n                <div class=\"col-sm-2\"></div>  \r\n                <label class=\"col-sm-1 col-form-label\">Name</label>\r\n                <div class=\"col-sm-5\" *ngIf=\"nameadded==0\">\r\n                  <input formControlName=\"name\" type=\"text\" class=\"form-control\"  [ngClass]=\"{ 'is-invalid': Submitted && editFormcontrol.name.errors }\">\r\n                  <div *ngIf=\"Submitted && editFormcontrol.name.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"editFormcontrol.name.errors.required\">Name is required</div>\r\n                </div>                              \r\n                </div>\r\n                <div class=\"col-sm-5\" *ngIf=\"nameadded==1\">                  \r\n                  <input formControlName=\"name\" type=\"text\" class=\"form-control\"  value=\"namvalue\" readonly>             \r\n                </div>\r\n                <div class=\"col-sm-2\" *ngIf=\"nameadded==0\">\r\n                  <button class=\"btn btn-primary mr-2 btn-sm p-2\" type=\"submit\">Update</button>\r\n                </div>  \r\n              </div>\r\n            </section>\r\n            </fieldset>\r\n            \r\n          <fieldset class=\"scheduler-border\">\r\n           <legend class=\"scheduler-border\">Target</legend>    \r\n           <section>\r\n             \r\n          <div class=\"row\">\r\n            <div class=\"col-md-6\">\r\n              <strong>Forward your calls to buyers, call centers, or anywhere you'd like them to go.</strong><hr>\r\n             \r\n              <table #dataTableTarget class=\"table table-striped  dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n              <thead>\r\n                <tr>\r\n                  <th>Name</th>\r\n                  <th>Destination</th>\r\n                  <th>Add</th>                                        \r\n                </tr>\r\n              </thead>\r\n              <tbody *ngIf=\"allTargets?.length != 0\">\r\n                  <tr *ngFor=\"let data of allTargets\">\r\n                       <td>{{data.name}}</td>\r\n                       <td *ngIf=\"data.valtype =='IVR Menu'\"><a class=\"text-white\" routerLink=\"/edit-ivr/{{ data.ivrmenu_uuid }}\" >{{data.valtype}} - {{data.typeval}}</a></td>\r\n                       <td *ngIf=\"data.valtype !='IVR Menu'\">{{data.valtype}} - {{data.typeval}}</td>\r\n                       <td *ngIf=\"data.isavailinpayout==0\"><div (click)=\"setRouting(data.uuid)\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"fa fa-arrow-right\"></i></div>\r\n                      </td>\r\n                       <td *ngIf=\"data.isavailinpayout!=0\">\r\n                         <span class=\"badge badge-success\">Added</span>\r\n                      </td>\r\n                  </tr>\r\n              </tbody>\r\n              <tbody *ngIf=\"allTargets?.length == 0\">\r\n                <tr>\r\n                  <td colspan=\"5\" class=\"no-data-available\">No data Available!</td>\r\n                </tr>\r\n              <tbody>\r\n            </table>\r\n          </div>\r\n          <div class=\"col-md-6\">\r\n            <strong>Routing Plan</strong><hr>\r\n            <table #dataTableRouting class=\"table table-striped table-responsive dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n            <thead>\r\n              <tr>\r\n                <th>Priority</th>\r\n                <th>Name</th>\r\n                <th>Destination</th>\r\n                <th>Revenue</th>                                        \r\n                <th>Status</th>                                        \r\n                <th>Action</th>                                        \r\n              </tr>\r\n            </thead>\r\n            <tbody *ngIf=\"allRoutingPlan?.length != 0\">\r\n                <tr *ngFor=\"let data of allRoutingPlan;let i = index;\">\r\n                  <td>{{data.priority}}</td>\r\n                  <td *ngIf=\"data.destinationtype ==1\"><a class=\"text-white\" routerLink=\"/edit-ivr/{{ data.destinationuuid }}\" >\r\n                    {{data.name}}</a></td>\r\n                  <td *ngIf=\"data.destinationtype !=1\">{{data.name}}</td>\r\n                  \r\n                  <td *ngIf=\"data.destinationtype ==1\">IVR Menu -<a class=\"text-white\" routerLink=\"/edit-ivr/{{ data.destinationuuid }}\" >\r\n                    {{data.destination}}</a></td>\r\n                  <td *ngIf=\"data.destinationtype ==0\">Number - {{data.destination}}</td>       \r\n                  <td *ngIf=\"data.destinationtype ==2\">SIP - {{data.destination}}</td>       \r\n                           \r\n                  <td>{{data.revenue}}</td>\r\n                  <td>\r\n                    <div *ngIf=\"data.status==1\" class=\"fa fa-circle text-success\"></div>\r\n                    <div *ngIf=\"data.status==0\" class=\"fa fa-circle text-danger\"></div>\r\n                  </td>\r\n                  <td><div (click) =\"editRoutingdata(data.uuid,data.priority,data.weight,data.revenuevalue,data.type,data.seconds,data.restrictdup,data.restrictafter,data.settingToggleDurationval,data.days)\" data-toggle=\"modal\" data-target=\"#editRouting\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"fa fa-edit\"></i></div>&nbsp;<div (click)=\"DeleteRoutingPlan((data.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></div>\r\n                 </td>\r\n                </tr>\r\n            </tbody>\r\n            <tbody *ngIf=\"allRoutingPlan?.length == 0\">\r\n              <tr>\r\n                <td colspan=\"6\" class=\"no-data-available\">No data Available!</td>\r\n              </tr>\r\n            <tbody>\r\n          </table>\r\n          </div>\r\n        </div>\r\n           </section>    \r\n           </fieldset>\r\n      \r\n           <br>\r\n                <!-- <button class=\"btn btn-primary mr-2 btn-sm p-2\" type=\"submit\">Submit</button> -->\r\n                <button style=\"margin-right: 4px;\" routerLink=\"/ivr-routing-plans\" class=\"btn btn-primary  btn-sm p-2\">Back To All Plans</button>                    \r\n        \r\n                </div>              \r\n              </div>\r\n            </form>\r\n  \r\n  </div>\r\n  ");

/***/ }),

/***/ "GNLf":
/*!********************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/audible-ring/audible-ring.component.html ***!
  \********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n    \r\n    <!-- Add Label Modal -->\r\n    <div class=\"modal  fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n     aria-hidden=\"true\">\r\n     <div class=\"modal-dialog\" role=\"document\">\r\n       <div class=\"modal-content\">\r\n         <div class=\"modal-header\">\r\n           <h5 class=\"modal-title\" id=\"formModal\">Add New Exception Number</h5>\r\n           <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n             <span aria-hidden=\"true\">&times;</span>\r\n           </button>\r\n         </div>\r\n         <div class=\"modal-body\">\r\n           <form id=\"addLabel\" [formGroup]=\"addLabelForm\" (ngSubmit)=\"onLabelSubmit()\">\r\n             <div class=\"form-group\">\r\n                 <label>Number</label>\r\n                 <select formControlName=\"number\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': LabelSubmitted && labelcontrol.number.errors }\" [value]=\"''\">\r\n                   <option value=\"\">Select a Number</option>\r\n                   <option *ngFor=\"let data of allnumbers\" value=\"{{data.number}}\">{{data.number}}</option>\r\n                 </select>               \r\n                 <div *ngIf=\"LabelSubmitted && labelcontrol.number.errors\" class=\"invalid-feedback\">\r\n                     <div *ngIf=\"labelcontrol.number.errors.required\">Number is required</div>\r\n                 </div>                  \r\n              </div>\r\n    \r\n               <div class=\"form-group\">\r\n                 <label  class=\"d-block\">Notes:</label>\r\n                 <textarea formControlName=\"notes\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': LabelSubmitted && labelcontrol.notes.errors }\"></textarea>                   \r\n                 <div *ngIf=\"LabelSubmitted && labelcontrol.notes.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"labelcontrol.notes.errors.required\">Notes is required</div>\r\n                </div>         \r\n               </div>\r\n               \r\n             <div class=\"modal-footer\" style=\"padding: 0;\">\r\n                <button [disabled]=\"!addLabelForm.valid\" (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Add Exception</button>\r\n                <button  type=\"button\" data-dismiss=\"modal\" aria-label=\"Close\" class=\"btn btn-secondary m-t-15 waves-effect\">Close</button>\r\n               </div>\r\n           </form>\r\n         </div>\r\n       </div>\r\n     </div>\r\n     </div>   \r\n    \r\n      <div class=\"main-content\">\r\n      \r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                    <div class=\"card-body\">\r\n                      <h6>Audible Ring</h6>\r\n                      <label>In this section you can set an audible ring, and exclude numbers from the ring.</label>\r\n\r\n                    <div class=\"row\" style=\"margin-top: 20px;\">\r\n                          <div class=\"col-12\">\r\n                            <div class=\"form-group\">\r\n                                <label>Number</label>\r\n                                <input (change)=\"selectFile($event)\" type=\"file\" name=\"\" class=\"form-control\" id=\"\">            \r\n                             </div>                       \r\n                          </div>   \r\n                          <ul>\r\n                            <li *ngFor=\"let item of audiblering\">{{item.original_filename}}</li>\r\n                          </ul>                    \r\n                    </div>\r\n                    </div>\r\n                    <div class=\"row\" style=\"margin-top: 20px;\">\r\n                        <div class=\"col-9\">\r\n                            <div class=\"card-header\">\r\n                            <h4>Numbers to exclude</h4></div>\r\n                        </div>\r\n                        <div class=\"col-3 text-right mt-2\">\r\n                            <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                               <button data-toggle=\"modal\" data-target=\"#addLabels\" class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon p-2\"><i class=\"fa fa-plus\"></i> Exclude a Number\r\n                                </button>\r\n                              </div>                       \r\n                        </div>\r\n                  \r\n                    </div>            \r\n                    \r\n                  <div class=\"card-body\">\r\n                    <div class=\"table-responsive\">\r\n                    <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                        <thead>\r\n                          <tr>\r\n                            <th>Number</th>\r\n                            <th>Notes</th>\r\n                            <th>Created Date</th>\r\n                            <th>Action</th>\r\n                          </tr>\r\n                        </thead>\r\n                        <tbody *ngIf=\"labels?.length != 0\">\r\n                            <tr *ngFor=\"let label of labels\">\r\n                                <td>{{ label.number }}</td>\r\n                                <td>{{ label.notes }}</td>\r\n                                <td>{{ label.created_at }}</td>\r\n                                <!-- routerLink=\"/edit-label/{{ label.uuid }}\"  -->\r\n                                <td><button (click)=\"Delete((label.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                            </tr>\r\n                        </tbody>\r\n                        <tbody *ngIf=\"labels?.length == 0\">\r\n                          <tr>\r\n                            <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                          </tr>\r\n                        <tbody>\r\n                      </table>\r\n                    </div>\r\n                  </div>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </section>\r\n        \r\n      </div>  ");

/***/ }),

/***/ "Gllu":
/*!**************************************************************************!*\
  !*** ./src/app/modules/ivr-menus/add-ivrmenu/add-ivrmenu.component.scss ***!
  \**************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".form-control {\n  font-size: 12px !important;\n}\n\ntable.dataTable tbody th, table.dataTable tbody td {\n  padding: 6px 6px !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcYWRkLWl2cm1lbnUuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFHSSwwQkFBQTtBQURKOztBQU1BO0VBQ0ksMkJBQUE7QUFISiIsImZpbGUiOiJhZGQtaXZybWVudS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5mb3JtLWNvbnRyb2wge1xyXG4gICAgLy8gd2lkdGg6IGF1dG8gIWltcG9ydGFudDtcclxuICAgIC8vIGhlaWdodDogYXV0byAhaW1wb3J0YW50O1xyXG4gICAgZm9udC1zaXplOiAxMnB4ICFpbXBvcnRhbnQ7XHJcbn1cclxuLy8gLmZsZXgtZmlsbC5wbC0xLm5neC1iYXNpYy1hdWRpby1wbGF5ZXItc2xpZGVyIHtcclxuLy8gICAgIGRpc3BsYXk6IG5vbmUhaW1wb3J0YW50O1xyXG4vLyB9XHJcbnRhYmxlLmRhdGFUYWJsZSB0Ym9keSB0aCwgdGFibGUuZGF0YVRhYmxlIHRib2R5IHRkIHtcclxuICAgIHBhZGRpbmc6IDZweCA2cHghaW1wb3J0YW50O1xyXG59Il19 */");

/***/ }),

/***/ "GttJ":
/*!*****************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/settings/manage-users/manage-users.component.html ***!
  \*****************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <h4> Manage Users</h4></div>\r\n                    </div>\r\n                    <div class=\"col-9 text-right mt-2\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                          <button type=\"button\" data-toggle=\"modal\" data-target=\"#addLabels\" class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon mr-2 p-2\"><i class=\"fa fa-plus\"></i> Create User\r\n                          </button>\r\n                          </div>                       \r\n                    </div>\r\n              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                    <thead>\r\n                      <tr>\r\n                        <th>First Name</th>\r\n                        <th>Last Name</th>\r\n                        <th>Email</th>\r\n                        <th>Role</th>\r\n                        <th>Invitation</th>\r\n                        <th>Created At</th>                        \r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let number of numbers\">\r\n                            <td>{{ number.first_name }}</td>\r\n                            <td>{{ number.last_name }}</td>\r\n                            <td>{{ number.email }}</td>\r\n                            <td *ngIf=\"number.role==0\"><div class=\"badge badge-success\">Admin</div></td>\r\n                            <td *ngIf=\"number.role==1\"><div class=\"badge badge-warning\">Reporting User</div></td>\r\n                            <td *ngIf=\"number.role==2\"><div class=\"badge badge-warning\">Master Admin</div></td>\r\n                            <td *ngIf=\"number.invitation==0\"><div class=\"badge badge-danger\">Pending</div></td>\r\n                            <td *ngIf=\"number.invitation==1\"><div class=\"badge badge-success\">Accepted</div></td>\r\n                            <td>{{ number.created_at }}</td>\r\n                            <td>\r\n                                <!-- <a (click)=\"editdata()\" href=\"#\" data-toggle=\"modal\" data-target=\"#editLabels\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp; -->\r\n                                <button (click)=\"Delete((number.id))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>\r\n\r\n\r\n  <!-- Add Label Modal -->\r\n<div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog model-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Create User</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"addLabel\" [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n        <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n            <div class=\"form-group\">\r\n                <label>Firstname</label>\r\n                <input formControlName=\"first_name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && buyercontrol.first_name.errors }\">\r\n                <div *ngIf=\"Submitted && buyercontrol.first_name.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"buyercontrol.first_name.errors.required\">Firstname is required</div>\r\n                </div>              \r\n             </div>\r\n           \r\n             <div class=\"form-group\">\r\n                <label>Lastname</label>\r\n                <input formControlName=\"last_name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && buyercontrol.last_name.errors }\">\r\n                <div *ngIf=\"Submitted && buyercontrol.last_name.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"buyercontrol.last_name.errors.required\">Lastname is required</div>\r\n                </div>              \r\n             </div>\r\n           \r\n             <div class=\"form-group\">\r\n                <label>Email Id</label>\r\n                <input formControlName=\"email\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && buyercontrol.email.errors }\">\r\n                <div *ngIf=\"Submitted && buyercontrol.email.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"buyercontrol.email.errors.required\">Email Id is required</div>\r\n                </div>              \r\n             </div>\r\n           \r\n             <div class=\"form-group\">\r\n                <label>Role</label>\r\n                <select formControlName=\"role\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && buyercontrol.role.errors }\" [value]=\"''\">\r\n                    <option value=\"\">Select Role</option>\r\n                    <option value=\"0\">Admin</option>\r\n                    <option value=\"1\">Reporting User</option>\r\n                </select>\r\n                <div *ngIf=\"Submitted && buyercontrol.role.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"buyercontrol.role.errors.required\">Role is required</div>\r\n                </div>              \r\n             </div>\r\n          \r\n         </div>       \r\n     </div>\r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n         <!-- !addLabelForm.valid || -->\r\n           <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create User</button>\r\n           <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n          </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>   \r\n\r\n<!-- Edit Label Modal -->\r\n<div class=\"modal fade\" id=\"editLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog model-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Update Buyer</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"editLabel\" [formGroup]=\"editForm\" (ngSubmit)=\"onEditSubmit()\">\r\n        <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n        <div class=\"form-group\">\r\n            <label>Company</label>\r\n            <input type=\"hidden\" name=\"uuid\" formControlName=\"uuid\">\r\n            <input formControlName=\"company\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': editSubmitted && editbuyercontrol.company.errors }\">\r\n            <div *ngIf=\"editSubmitted && editbuyercontrol.company.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"editbuyercontrol.company.errors.required\">Company is required</div>\r\n            </div>              \r\n         </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Sub Id  :</label>\r\n            <input formControlName=\"sub_id\" type=\"text\" class=\"form-control\">           \r\n          </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Pause Targets :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_pause_target\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>           \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Set Target Concurrency :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_set_target_concurrency\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>            \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Dispute Call Conversions :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_dispute_call_conversions\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>          \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Limit Revenue : </label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"limit_revenue\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>         \r\n          </div>\r\n          \r\n         </div>       \r\n     </div>\r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n         <!-- !addLabelForm.valid || -->\r\n           <button (click)=\"closeEditModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Update Buyer</button>\r\n           <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n          </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>   ");

/***/ }),

/***/ "H2ej":
/*!*****************************************************************************************!*\
  !*** ./src/app/modules/settings/alert-configuration/alert-configuration.component.scss ***!
  \*****************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJhbGVydC1jb25maWd1cmF0aW9uLmNvbXBvbmVudC5zY3NzIn0= */");

/***/ }),

/***/ "HPR7":
/*!************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/campaigns/campaign-create/campaign-create.component.html ***!
  \************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"main-content\">\r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12 col-md-12 col-lg-12\">\r\n            <form [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n            <div class=\"card\" >\r\n              <div class=\"card-header\">\r\n                <h4> Setup Your Campaign</h4>\r\n              </div>\r\n              <div class=\"card-body\" >\r\n                \r\n                 <!-- <mat-horizontal-stepper>\r\n                    <mat-step *ngFor=\"let step of steps; let index = index; let last = last;\">\r\n                      <ng-template matStepLabel> <label class=\"col-sm-2 col-form-label\">{{ step.label }}</label></ng-template>\r\n                      <formly-form\r\n                        [form]=\"form.at(index)\"\r\n                        [model]=\"model\"\r\n                        [fields]=\"step.fields\"\r\n                        [options]=\"options[index]\">\r\n                      </formly-form>\r\n                \r\n                      <div>\r\n                        <button *ngIf=\"index !== 0\" matStepperPrevious class=\"btn btn-primary\" type=\"button\" (click)=\"prevStep(index)\">Back</button>\r\n                        <button *ngIf=\"!last\" matStepperNext class=\"btn btn-primary\" type=\"button\" [disabled]=\"!form.at(index).valid\" (click)=\"nextStep(index)\">Next</button>\r\n                        <button *ngIf=\"last\" class=\"btn btn-primary\" [disabled]=\"!form.valid\" type=\"submit\">Submit</button>\r\n                      </div>\r\n                    </mat-step>\r\n                  </mat-horizontal-stepper> -->\r\n                \r\n                  <mat-horizontal-stepper #stepper>\r\n                    <mat-step >\r\n                        <ng-template matStepLabel>Setup Your Campaign</ng-template>\r\n                      \r\n\r\n                        <section>\r\n                          <strong>Name your Campaign and choose your country.</strong>\r\n                          <hr>\r\n                              <div class=\"form-group row\">\r\n                                <div class=\"col-sm-2\"></div>  \r\n                                <label class=\"col-sm-2 col-form-label\">Campaign Name</label>\r\n                                <div class=\"col-sm-5\">\r\n                                  <input formControlName=\"campaignName\" type=\"text\" class=\"form-control\"  [ngClass]=\"{ 'is-invalid': Submitted && addFormcontrol.campaignName.errors }\" (input)=\"validatename()\">\r\n                                  <div *ngIf=\"Submitted && addFormcontrol.campaignName.errors\" class=\"invalid-feedback\">\r\n                                    <div *ngIf=\"addFormcontrol.campaignName.errors.required\">Campaign Name is required</div>\r\n                                </div> \r\n                                \r\n                                <div *ngIf=\"isName == 'success'  && isName != ''\" style=\"color:green;\">\r\n                                  Name Is Available\r\n                                </div> \r\n                                 <div *ngIf=\"isName == 'fail' && isName != ''\" style=\"color:red;\">\r\n                                  Name Is Not Available\r\n                                </div>   \r\n\r\n                                </div>\r\n                              </div>\r\n                            \r\n                              <div class=\"form-group row\">\r\n                                <div class=\"col-sm-2\"></div>  \r\n                                <label class=\"col-sm-2 col-form-label\">Country</label>\r\n                                <div class=\"col-sm-5\">\r\n                                  <select formControlName=\"country\" class=\"form-control\" >\r\n                                      <option value=\"\">Select Country</option>\r\n                                      <option value=\"United States\">United States</option>\r\n                                      <option value=\"United Kingdom\">United Kingdom</option>\r\n                                  </select>\r\n                                </div>\r\n                              </div>\r\n                        </section>\r\n                        <div class=\"text-right\"><br>\r\n                          <button [disabled]=\"isName == 'fail'\" class=\"btn btn-primary\" type=\"button\" matStepperNext>Next</button>\r\n                        </div>\r\n                   </mat-step>\r\n\r\n\r\n                    <mat-step>\r\n                        <ng-template matStepLabel>Get a Tracking Number</ng-template>\r\n                         <section>\r\n                    <strong>Get a unique Tracking Number where you or your partners can send calls or use for advertising.</strong><hr>\r\n                    <strong>Purchase or select an existing number to track this Campaign's calls on the Ringba platform. If you will be purchasing calls from a publisher, then assign this number to a publisher, otherwise, assign the number to yourself.</strong><hr>\r\n                    \r\n                    <div class=\"form-group row\">\r\n                      <div class=\"col-sm-2\"></div>  \r\n                      <label class=\"col-sm-2 col-form-label\"></label>\r\n                      <div class=\"col-sm-5\">\r\n                        <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                          <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberIsFor==0}\" (click)=\"numberIsForval(0)\"> \r\n                              <input class=\"form-check-input\" name=\"numberIsFor\" formControlName=\"numberIsFor\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                              Me\r\n                            </label>\r\n                            <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberIsFor==1}\" (click)=\"numberIsForval(1)\">\r\n                              <input class=\"form-check-input\" name=\"numberIsFor\" formControlName=\"numberIsFor\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                                Publisher\r\n                            </label>                 \r\n                          </div>               \r\n                      </div>\r\n                    </div>\r\n\r\n                    <div class=\"form-group row\" *ngIf=\"numberIsFor==1\">\r\n                      <div class=\"col-sm-2\"></div>  \r\n                      <label class=\"col-sm-2 col-form-label\">Publisher</label>\r\n                      <div class=\"col-sm-5\">\r\n                        <ng-select2  [data]=\"publisherdata\" formControlName=\"publisher\" [width]=\"370\">\r\n                        </ng-select2>\r\n                      </div>                      \r\n                    </div>\r\n                    \r\n                    <div class=\"form-group row\" *ngIf=\"numberIsFor==1\">\r\n                      <div class=\"col-sm-2\"></div>  \r\n                      <label class=\"col-sm-2 col-form-label\">Payout Type</label>\r\n                      <div class=\"col-sm-5\">\r\n                        <div class=\"control-group\">\r\n                          <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                          <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==0}\" (click)=\"payout_typevaledit(0)\"> \r\n                                <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                                None\r\n                              </label>\r\n                              <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payout_typevaledit(1)\">\r\n                                <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                                Fixed Payout\r\n                              </label>\r\n                              <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                                <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                                Revenue %\r\n                              </label>\r\n                            </div>\r\n                            <div *ngIf=\"Submitted && editFormcontrol.payout_typeedit.errors\" class=\"invalid-feedback\">\r\n                              <div *ngIf=\"editFormcontrol.payout_typeedit.errors.required\">Payout Type is required</div>\r\n                          </div>   \r\n                        </div>\r\n                      </div>                      \r\n                    </div>\r\n\r\n                    <div *ngIf=\"payout_typevalueedit != 0 && numberIsFor==1\">\r\n                    <div class=\"form-group row\">\r\n                      <div class=\"col-sm-2\"></div>  \r\n                      <label class=\"col-sm-2 col-form-label\">Payout Amount :</label>\r\n                      <div class=\"col-sm-5\">\r\n                          <div class=\"input-group\">\r\n                            <div class=\"input-group-prepend\">\r\n                              <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                            </div>\r\n                            <input type=\"text\" formControlName=\"payout_amount\" class=\"form-control\" placeholder=\"Enter Payout Amount\" aria-label=\"Enter Payout Amount\" aria-describedby=\"btnGroupAddon\">\r\n                          </div>           \r\n                      </div>                      \r\n                    </div>\r\n                  \r\n                    <div class=\"form-group row\" *ngIf=\"numberIsFor==1\">\r\n                      <div class=\"col-sm-2\"></div>  \r\n                      <label class=\"col-sm-2 col-form-label\">Payout Trigger :</label>\r\n                      <div class=\"col-sm-5\">\r\n                         <select class=\"form-control\" formControlName=\"payout_trigger\" [value]=\"'0'\">\r\n                          <option value=\"0\">Inbound Call</option>\r\n                          <option value=\"1\">Call Length</option>\r\n                          <option value=\"2\">Call Successfully Connected</option>\r\n                        </select>     \r\n                      </div>                      \r\n                    </div>\r\n                    \r\n                    <div class=\"form-group row\" *ngIf=\"this.addForm.get('payout_trigger').value == 1 && numberIsFor==1\">\r\n                      <div class=\"col-sm-2\"></div>  \r\n                      <label class=\"col-sm-2 col-form-label\">Enter Seconds :</label>\r\n                      <div class=\"col-sm-5\">\r\n                        <input type=\"text\"  class=\"form-control\" type=\"text\" formControlName=\"payout_seconds\" placeholder=\"Enter Seconds\" />         \r\n                      </div>                      \r\n                    </div>\r\n\r\n                  </div>\r\n                  </section>\r\n\r\n                      <div class=\"text-right\">\r\n                        <button class=\"btn btn-primary mr-2\" type=\"button\" matStepperPrevious>Back</button>\r\n                        <button class=\"btn btn-primary\" type=\"button\" matStepperNext>Next</button>\r\n                      </div>\r\n                      <!-- </form> -->\r\n                    </mat-step>\r\n\r\n\r\n                    <mat-step>\r\n                      <ng-template matStepLabel>Add a Target</ng-template>\r\n                      <section>\r\n                        <strong>Forward your calls to buyers, call centers, or anywhere you'd like them to go.</strong><hr>\r\n                        <div class=\"form-group row\">\r\n                          <div class=\"col-sm-2\"></div>  \r\n                          <label class=\"col-sm-2 col-form-label\">Select Target</label>\r\n                          <div class=\"col-sm-5\">\r\n                            <!-- <select class=\"form-control\" formControlName=\"target\">\r\n                                <option value=\"\">Select Target</option>\r\n                                <option *ngFor=\"let item of targetdata\" value=\"{{item.uuid}}\">{{item.name}}</option>\r\n                            </select> -->\r\n                            <ng-select2  [data]=\"targetdata\" formControlName=\"target\" [width]=\"370\">\r\n                            </ng-select2>\r\n                          </div>\r\n                        </div>\r\n                       \r\n                        <div class=\"form-group row\">\r\n                          <div class=\"col-sm-2\"></div>  \r\n                          <label class=\"col-sm-2 col-form-label\">Conversation Revenue</label>\r\n                          <div class=\"col-sm-5\">\r\n                            <div class=\"input-group\">\r\n                              <div class=\"input-group-prepend\">\r\n                                <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                              </div>\r\n                              <input type=\"text\" formControlName=\"conversation_revenue\" class=\"form-control\" placeholder=\"Enter Conversation Revenue\" aria-label=\"Enter Conversation Revenue\" aria-describedby=\"btnGroupAddon\" [ngClass]=\"{ 'is-invalid': submitted && f.conversation_revenue.errors }\">\r\n                              <div *ngIf=\"submitted && f.conversation_revenue.errors\" class=\"invalid-feedback\">\r\n                                <div *ngIf=\"f.conversation_revenue.errors.required\">Conversation Revenue is required</div>\r\n                            </div>   \r\n                            </div>        \r\n                          </div>\r\n                        </div>\r\n                       \r\n                        <div class=\"form-group row\">\r\n                          <div class=\"col-sm-2\"></div>  \r\n                          <label class=\"col-sm-2 col-form-label\">Conversation Event</label>\r\n                          <div class=\"col-sm-5\">\r\n                            <select formControlName=\"conversation_event\" class=\"form-control\"  [ngClass]=\"{ 'is-invalid': submitted && f.conversation_event.errors }\">\r\n                              <option value=\"0\">Call Length</option>\r\n                              <option value=\"1\">Call Successfully Connected</option>\r\n                            </select>  \r\n                            <!-- {{this.addLabelForm.get('conversation_event').value}} -->\r\n                            <div *ngIf=\"submitted && f.conversation_event.errors\" class=\"invalid-feedback\">\r\n                             <div *ngIf=\"f.conversation_event.errors.required\">Conversation Event is required</div>\r\n                           </div>       \r\n                          </div>\r\n                        </div>\r\n                        \r\n                        <div class=\"form-group row\" *ngIf=\"this.addForm.get('conversation_event').value == 0\">\r\n                          <div class=\"col-sm-2\"></div>  \r\n                          <label class=\"col-sm-2 col-form-label\">Enter Seconds</label>\r\n                          <div class=\"col-sm-5\">\r\n                            <input type=\"text\" formControlName=\"conversation_seconds\" class=\"form-control\" type=\"text\" placeholder=\"Enter Seconds\" />                  \r\n                          </div>\r\n                        </div>\r\n\r\n                          <div class=\"form-group row\">\r\n                            <div class=\"col-sm-2\"></div>  \r\n                            <div class=\"col-sm-2 control-label mt-2\">Recording</div>\r\n                            <div class=\"col-sm-5\">\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" checked (change)=\"get_recordingstatus($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                            </div>                        \r\n                          </div>                        \r\n                      </section>                     \r\n                      <div class=\"text-right\"><br>\r\n                        <button class=\"btn btn-primary mr-2\" type=\"button\" matStepperPrevious>Back</button>\r\n                        <button class=\"btn btn-primary\" type=\"button\" matStepperNext>Next</button>\r\n                      </div>\r\n                   </mat-step>\r\n                    \r\n                   <mat-step>\r\n                      <ng-template matStepLabel>Set it Live!</ng-template>\r\n                      <section>\r\n                        <strong>Test your Tracking Number to see DialDigits operate in real-time.</strong>\r\n                        <hr>\r\n                        <div class=\"form-group row\">\r\n                          <div class=\"col-sm-2\"></div>  \r\n                          <label class=\"col-sm-2 col-form-label\">Campaign Name</label>\r\n                          <div class=\"col-sm-5\">                           \r\n                            <input type=\"text\" [value]=\"this.addForm.get('campaignName').value\" class=\"form-control\" readonly>                           \r\n                          </div>\r\n                        </div>\r\n                      \r\n                        <div class=\"form-group row\">\r\n                          <div class=\"col-sm-2\"></div>  \r\n                          <label class=\"col-sm-2 col-form-label\">Country</label>\r\n                          <div class=\"col-sm-5\">\r\n                            <select class=\"form-control\" readonly [value]=\"this.addForm.get('country').value\">\r\n                                <option value=\"\">Select Country</option>\r\n                                <option value=\"United States\">United States</option>\r\n                            </select>\r\n                          </div>\r\n                        </div>\r\n    \r\n                        <!-- <div class=\"form-group row\">\r\n                          <div class=\"col-sm-2\"></div>  \r\n                          <label class=\"col-sm-2 col-form-label\">Choose Option</label>\r\n                          <div class=\"col-sm-5\">\r\n                            <div class=\"control-group\">\r\n                              <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                              <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': this.addForm.get('option').value==0}\"> \r\n                                  <input class=\"form-check-input\" readonly name=\"numberType\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                                  Select Existing \r\n                                </label>\r\n                                <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': this.addForm.get('option').value==1}\">\r\n                                  <input class=\"form-check-input\" readonly name=\"numberType\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                                    Create New\r\n                                </label>                 \r\n                              </div>                \r\n                          </div>        \r\n                          </div>\r\n                        </div> -->\r\n    \r\n                        <!-- <div class=\"form-group row\">\r\n                          <div class=\"col-sm-2\"></div>  \r\n                          <label class=\"col-sm-2 col-form-label\">Select Existing Number</label>\r\n                          <div class=\"col-sm-5\">\r\n                            <select class=\"form-control\" readonly [value]=\"this.addForm.get('number').value\">\r\n                                <option value=\"\">Select Number</option>\r\n                                <option *ngFor=\"let item of numberdata\" value=\"{{item.id}}\">{{item.text}}</option>\r\n                            </select>\r\n\r\n                             <ng-select2  [data]=\"numberdata\"\r\n                            [width]=\"370\"  [value]=\"this.addForm.get('number').value\" class=\"disabled\">\r\n                            </ng-select2>\r\n                          </div>\r\n                        </div> -->\r\n                       \r\n                        <div class=\"form-group row\">\r\n                          <div class=\"col-sm-2\"></div>  \r\n                          <label class=\"col-sm-2 col-form-label\">This number is for</label>\r\n                          <div class=\"col-sm-5\">\r\n                            <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                              <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberIsFor==0}\"> \r\n                                  <input class=\"form-check-input\" readonly name=\"numberIsFor\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                                  Me\r\n                                </label>\r\n                                <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberIsFor==1}\">\r\n                                  <input class=\"form-check-input\" readonly name=\"numberIsFor\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                                    Publisher\r\n                                </label>                 \r\n                              </div>               \r\n                          </div>\r\n                        </div>\r\n    \r\n                        <div class=\"form-group row\" *ngIf=\"numberIsFor==1\">\r\n                          <div class=\"col-sm-2\"></div>  \r\n                          <label class=\"col-sm-2 col-form-label\">Publisher</label>\r\n                          <div class=\"col-sm-5\">\r\n                            <select class=\"form-control\" readonly [value]=\"this.addForm.get('publisher').value\">\r\n                                <option value=\"\">Select Publisher</option>\r\n                                <option *ngFor=\"let item of publisherdata\" value=\"{{item.id}}\">{{item.text}}</option>\r\n                            </select>\r\n\r\n                            <!-- <ng-select2  [data]=\"publisherdata\"\r\n                            [width]=\"370\"  [value]=\"this.addForm.get('publisher').value\">\r\n                            </ng-select2> -->\r\n\r\n                          </div>\r\n                        </div>\r\n    \r\n                        <div class=\"form-group row\">\r\n                          <div class=\"col-sm-2\"></div>  \r\n                          <label class=\"col-sm-2 col-form-label\">Select Target</label>\r\n                          <div class=\"col-sm-5\">\r\n                            <select class=\"form-control\" readonly [value]=\"this.addForm.get('target').value\">\r\n                                <option value=\"\">Select Target</option>    \r\n                                <option *ngFor=\"let item of targetdata\" value=\"{{item.id}}\">{{item.text}}</option>                      \r\n                            </select>\r\n\r\n                            <!-- <ng-select2  [data]=\"targetdata\"\r\n                            [width]=\"370\"  [value]=\"this.addForm.get('target').value\">\r\n                            </ng-select2> -->\r\n\r\n                          </div>\r\n                        </div>\r\n    \r\n                      </section>            \r\n                      <div class=\"text-right\"><br>\r\n                        <button class=\"btn btn-success mr-2\" type=\"submit\">Make it Live</button>\r\n                        <button class=\"btn btn-primary mr-2\" type=\"button\" matStepperPrevious>Back</button>                        \r\n                      </div>\r\n                   </mat-step>\r\n                  </mat-horizontal-stepper>  \r\n\r\n               \r\n              </div>\r\n              <div class=\"card-footer text-right\">\r\n                    <!-- <button style=\"margin-right: 4px;\" type=\"submit\" class=\"btn btn-primary\">Submit</button> -->\r\n                    <button style=\"margin-right: 4px;\" routerLink=\"/campaigns\" class=\"btn btn-primary\">Back To All Campaigns</button>                    \r\n                  </div>\r\n            </div>\r\n          </form>\r\n\r\n</div>\r\n");

/***/ }),

/***/ "HVG7":
/*!**********************************************************************!*\
  !*** ./src/app/modules/numbers/number-pool/number-pool.component.ts ***!
  \**********************************************************************/
/*! exports provided: NumberPoolComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberPoolComponent", function() { return NumberPoolComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_number_pool_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./number-pool.component.html */ "z592");
/* harmony import */ var _number_pool_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number-pool.component.scss */ "ZrJj");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../../../global */ "XrUY");












const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let NumberPoolComponent = class NumberPoolComponent {
    constructor(moduleservice, toastrService, handler, fb, router, cdRef) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.router = router;
        this.cdRef = cdRef;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.labels = [];
        this.checkboxes = [];
        this.selectednumber = [];
        this.Submitted = false;
        this.editSubmitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    ngAfterViewChecked() {
        this.cdRef.detectChanges();
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadNumberpools();
        this.addForm = this.fb.group({
            country_id: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            closed_browser_delay: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            browser_idle_limit: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            poolsize: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            allocating: [''],
            user_uuid: [''],
        });
        this.addForm.patchValue({
            country: 'United States',
            prefix: '+1'
        });
        this.editForm = this.fb.group({
            uuid: [''],
            country_id: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            closed_browser_delay: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            browser_idle_limit: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            poolsize: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            allocating: [''],
            user_uuid: [''],
        });
    }
    loadNumberpools() {
        // console.log('ok');
        // return false;
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 5000,
            "lengthMenu": [50, 100, 500, 1000, 2000, 5000],
            "order": [[1, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                // this.http.post<DataTablesResponse>(
                //   this.ServerUrl+'getnumbersdata/'+this.currentCompany.uuid,
                //   dataTablesParameters, {}
                this.http.post(this.ServerUrl + 'getnumberpoolsdata/' + this.currentCompany.uuid, { 'dataTablesParameters': dataTablesParameters }, {}).subscribe(resp => {
                    this.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "checkall" }, { data: "name" }, { data: "country_id" }, { data: "closed_browser_delay" }, { data: "browser_idle_limit" }, { data: "poolsize" }, { data: "allocating" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    editdata(uuid, name, country_id, closed_browser_delay, browser_idle_limit, poolsize, allocating) {
        // alert(publisher);
        this.numberTypeadd = allocating;
        this.editForm.patchValue({
            uuid: uuid,
            name: name,
            country_id: country_id,
            closed_browser_delay: closed_browser_delay,
            browser_idle_limit: browser_idle_limit,
            poolsize: poolsize,
            allocating: allocating,
        });
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.selectednumber = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                    this.selectednumber.push(lbl.number);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
                this.numbers.forEach(lbl => {
                    if (event.target.value == lbl.id) {
                        this.selectednumber.push(lbl.number);
                    }
                });
                // this.selectednumber.push(event.target.value);        
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.ischecked); 
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
                this.selectednumber.splice(index, 1);
                // console.log('123='+this.selectednumber.length);
                if (this.selectednumber.length == 0) {
                    this.ischecked = '1';
                }
            }
            else {
                this.checkboxes = [];
                this.selectednumber = [];
                // console.log(this.selectednumber.length);
                if (this.selectednumber.length == 0) {
                    this.ischecked = '1';
                }
            }
        }
        // console.log(this.ischecked); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedNumbers(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                        }, 2000);
                        this.loadNumberpools();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }
            });
        }
    }
    Delete(uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteNumberpooldata(uuid, currentUser.uuid).subscribe(res => {
                    // console.log(res);return false;
                    this.loadNumberpools();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    //Add Publisher
    get addformcontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('country_id', this.addForm.get('country_id').value);
        formData.append('name', this.addForm.get('name').value);
        formData.append('closed_browser_delay', this.addForm.get('closed_browser_delay').value);
        formData.append('browser_idle_limit', this.addForm.get('browser_idle_limit').value);
        formData.append('poolsize', this.addForm.get('poolsize').value);
        formData.append('allocating', this.addForm.get('allocating').value);
        this.moduleservice.addNumberpooldata(formData).subscribe(res => {
            // console.log(res.status); return false;
            if (res.status == 'error') {
                this.toastrService.error('Failed To Add Number Pool');
            }
            else {
                this.toastrService.success('Number Pool Added Successfully');
                this.loadNumberpools();
                this.Submitted = false;
            }
        }, error => this.error = error);
    }
    numberTypeval(val) {
        this.addForm.get('allocating').setValue(val);
    }
    //Add Buyer
    get editFormcontrol() { return this.editForm.controls; }
    onEditSubmit() {
        // this.editForm.get('assosciated_labels').setValue(JSON.stringify(this.labels)); 
        // alert('ok');return false;
        const formData = new FormData();
        this.editSubmitted = true;
        if (this.editForm.invalid) {
            return;
        }
        // console.log(this.labels);return false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('uuid', this.editForm.get('uuid').value);
        formData.append('country_id', this.editForm.get('country_id').value);
        formData.append('name', this.editForm.get('name').value);
        formData.append('closed_browser_delay', this.editForm.get('closed_browser_delay').value);
        formData.append('browser_idle_limit', this.editForm.get('browser_idle_limit').value);
        formData.append('poolsize', this.editForm.get('poolsize').value);
        formData.append('allocating', this.editForm.get('allocating').value);
        this.moduleservice.editNumberpooldata(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Number Pool Updated Successfully');
                this.loadNumberpools();
                this.editSubmitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeModal() {
        // console.log(this.addForm.get('country').value);return false;
        if (!this.addForm.invalid) {
            $("#addModel").modal("hide");
            // $(".custom-switch-input").prop('checked',false);
            this.Submitted = false;
            setTimeout(() => { this.addForm.reset(); }, 2000);
        }
    }
    closeEditModal() {
        if (!this.editForm.invalid) {
            $("#editModel").modal("hide");
            this.editSubmitted = false;
            setTimeout(() => { this.editForm.reset(); }, 2000);
        }
    }
};
NumberPoolComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ChangeDetectorRef"] }
];
NumberPoolComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewChild"], args: ['dataTable', { static: true },] }]
};
NumberPoolComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-number-pool',
        template: _raw_loader_number_pool_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_number_pool_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], NumberPoolComponent);



/***/ }),

/***/ "HhuZ":
/*!************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/footer/footer.component.html ***!
  \************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<!-- <div class=\"settingSidebar\" (click)=\"show()\" [ngClass]=\"{'showSettingPanel': count==1}\">\r\n  <a href=\"javascript:void(0)\" class=\"settingPanelToggle\" [ngClass]=\"{'showSettingPanel': count==1}\"> <i class=\"fa fa-spin fa-cog\"></i>\r\n  </a>\r\n  <div class=\"settingSidebar-body ps-container ps-theme-default\">\r\n    <div class=\" fade show active\">\r\n      <div class=\"setting-panel-header\">Setting Panel\r\n      </div>\r\n      <div class=\"p-15 border-bottom\">\r\n        <h6 class=\"font-medium m-b-10\">Select Layout</h6>\r\n        <div class=\"selectgroup layout-color w-50\">\r\n          <label class=\"selectgroup-item\">\r\n            <input type=\"radio\" name=\"value\" value=\"1\" class=\"selectgroup-input select-layout\" checked>\r\n            <span class=\"selectgroup-button\">Light</span>\r\n          </label>\r\n          <label class=\"selectgroup-item\">\r\n            <input type=\"radio\" name=\"value\" value=\"2\" class=\"selectgroup-input select-layout\">\r\n            <span class=\"selectgroup-button\">Dark</span>\r\n          </label>\r\n        </div>\r\n      </div>\r\n      <div class=\"p-15 border-bottom\">\r\n        <h6 class=\"font-medium m-b-10\">Sidebar Color</h6>\r\n        <div class=\"selectgroup selectgroup-pills sidebar-color\">\r\n          <label class=\"selectgroup-item\">\r\n            <input type=\"radio\" name=\"icon-input\" value=\"1\" class=\"selectgroup-input select-sidebar\">\r\n            <span class=\"selectgroup-button selectgroup-button-icon\" data-toggle=\"tooltip\"\r\n              data-original-title=\"Light Sidebar\"><i class=\"fas fa-sun\"></i></span>\r\n          </label>\r\n          <label class=\"selectgroup-item\">\r\n            <input type=\"radio\" name=\"icon-input\" value=\"2\" class=\"selectgroup-input select-sidebar\" checked>\r\n            <span class=\"selectgroup-button selectgroup-button-icon\" data-toggle=\"tooltip\"\r\n              data-original-title=\"Dark Sidebar\"><i class=\"fas fa-moon\"></i></span>\r\n          </label>\r\n        </div>\r\n      </div>\r\n      <div class=\"p-15 border-bottom\">\r\n        <h6 class=\"font-medium m-b-10\">Color Theme</h6>\r\n        <div class=\"theme-setting-options\">\r\n          <ul class=\"choose-theme list-unstyled mb-0\">\r\n            <li title=\"white\" class=\"active\">\r\n              <div class=\"white\"></div>\r\n            </li>\r\n            <li title=\"cyan\">\r\n              <div class=\"cyan\"></div>\r\n            </li>\r\n            <li title=\"black\">\r\n              <div class=\"black\"></div>\r\n            </li>\r\n            <li title=\"purple\">\r\n              <div class=\"purple\"></div>\r\n            </li>\r\n            <li title=\"orange\">\r\n              <div class=\"orange\"></div>\r\n            </li>\r\n            <li title=\"green\">\r\n              <div class=\"green\"></div>\r\n            </li>\r\n            <li title=\"red\">\r\n              <div class=\"red\"></div>\r\n            </li>\r\n          </ul>\r\n        </div>\r\n      </div>\r\n      <div class=\"p-15 border-bottom\">\r\n        <div class=\"theme-setting-options\">\r\n          <label>\r\n            <span class=\"control-label p-r-20\">Mini Sidebar</span>\r\n            <input type=\"checkbox\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\"\r\n              id=\"mini_sidebar_setting\">\r\n            <span class=\"custom-switch-indicator\"></span>\r\n          </label>\r\n        </div>\r\n      </div>      \r\n      <div class=\"mt-4 mb-4 p-3 align-center rt-sidebar-last-ele\">\r\n        <a href=\"#\" class=\"btn btn-icon icon-left btn-primary btn-restore-theme\">\r\n          <i class=\"fas fa-undo\"></i> Restore Default\r\n        </a>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div> -->\r\n\r\n<div class=\"settingSidebar\" (click)=\"show()\" [ngClass]=\"{'showSettingPanel': count==1}\">\r\n  <a href=\"javascript:void(0)\" class=\"settingPanelToggle\" [ngClass]=\"{'showSettingPanel': count==1}\"> <i class=\"fa fa-spin fa-cog\"></i>\r\n  </a>\r\n  <div class=\"settingSidebar-body ps-container ps-theme-default\">\r\n    <div class=\" fade show active\">\r\n      <div class=\"setting-panel-header\">Setting Panel\r\n      </div>\r\n      <div class=\"p-15 border-bottom\">\r\n        <h6 class=\"font-medium m-b-10\">Select Layout</h6>\r\n        <div class=\"selectgroup layout-color w-50\">\r\n          <label class=\"selectgroup-item\">\r\n            <input type=\"radio\" name=\"value\" value=\"1\" class=\"selectgroup-input select-layout\" checked>\r\n            <span class=\"selectgroup-button\">Light</span>\r\n          </label>\r\n          <label class=\"selectgroup-item\">\r\n            <input type=\"radio\" name=\"value\" value=\"2\" class=\"selectgroup-input select-layout\">\r\n            <span class=\"selectgroup-button\">Dark</span>\r\n          </label>\r\n        </div>\r\n      </div>\r\n      <!-- <div class=\"p-15 border-bottom\">\r\n        <h6 class=\"font-medium m-b-10\">Sidebar Color</h6>\r\n        <div class=\"selectgroup selectgroup-pills sidebar-color\">\r\n          <label class=\"selectgroup-item\">\r\n            <input type=\"radio\" name=\"icon-input\" value=\"1\" class=\"selectgroup-input select-sidebar\">\r\n            <span class=\"selectgroup-button selectgroup-button-icon\" data-toggle=\"tooltip\"\r\n              data-original-title=\"Light Sidebar\"><i class=\"fas fa-sun\"></i></span>\r\n          </label>\r\n          <label class=\"selectgroup-item\">\r\n            <input type=\"radio\" name=\"icon-input\" value=\"2\" class=\"selectgroup-input select-sidebar\" checked>\r\n            <span class=\"selectgroup-button selectgroup-button-icon\" data-toggle=\"tooltip\"\r\n              data-original-title=\"Dark Sidebar\"><i class=\"fas fa-moon\"></i></span>\r\n          </label>\r\n        </div>\r\n      </div> -->\r\n      <div class=\"p-15 border-bottom\">\r\n        <h6 class=\"font-medium m-b-10\">Color Theme</h6>\r\n        <div class=\"theme-setting-options\">\r\n          <ul class=\"choose-theme list-unstyled mb-0\">\r\n            <li title=\"white\" class=\"active\">\r\n              <div class=\"white\"></div>\r\n            </li>\r\n            <li title=\"cyan\">\r\n              <div class=\"cyan\"></div>\r\n            </li>\r\n            <li title=\"black\">\r\n              <div class=\"black\"></div>\r\n            </li>\r\n            <li title=\"purple\">\r\n              <div class=\"purple\"></div>\r\n            </li>\r\n            <li title=\"orange\">\r\n              <div class=\"orange\"></div>\r\n            </li>\r\n            <li title=\"green\">\r\n              <div class=\"green\"></div>\r\n            </li>\r\n            <li title=\"red\">\r\n              <div class=\"red\"></div>\r\n            </li>\r\n          </ul>\r\n        </div>\r\n      </div>\r\n      <!-- <div class=\"p-15 border-bottom\">\r\n        <div class=\"theme-setting-options\">\r\n          <label>\r\n            <span class=\"control-label p-r-20\">Mini Sidebar</span>\r\n            <input type=\"checkbox\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\"\r\n              id=\"mini_sidebar_setting\">\r\n            <span class=\"custom-switch-indicator\"></span>\r\n          </label>\r\n        </div>\r\n      </div>       -->\r\n      <div class=\"mt-4 mb-4 p-3 align-center rt-sidebar-last-ele\">\r\n        <a href=\"#\" class=\"btn btn-icon icon-left btn-primary btn-restore-theme\">\r\n          <i class=\"fas fa-undo\"></i> Restore Default\r\n        </a>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div>\r\n<footer class=\"main-footer\">\r\n    <div class=\"footer-left\">\r\n      Copyright &copy; {{getyear}} <div class=\"bullet\"></div> Design By <a href=\"#\">Dail-Digits</a>\r\n    </div>\r\n    <div class=\"footer-right\">\r\n    </div>\r\n  </footer>");

/***/ }),

/***/ "I7EK":
/*!************************************************************!*\
  !*** ./src/app/modules/label/ngxdemo/ngxdemo.component.ts ***!
  \************************************************************/
/*! exports provided: NgxdemoComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgxdemoComponent", function() { return NgxdemoComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_ngxdemo_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./ngxdemo.component.html */ "gW+p");
/* harmony import */ var _ngxdemo_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ngxdemo.component.scss */ "QxI7");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _swimlane_ngx_datatable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @swimlane/ngx-datatable */ "lDzL");
/* harmony import */ var ngx_ui_loader__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ngx-ui-loader */ "gren");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../global */ "XrUY");








let NgxdemoComponent = class NgxdemoComponent {
    constructor(handler, el, ngxLoader) {
        this.el = el;
        this.ngxLoader = ngxLoader;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_7__["GlobalVariable"].BASE_API_URL;
        this.pageSize = 10;
        this.ColumnMode = _swimlane_ngx_datatable__WEBPACK_IMPORTED_MODULE_5__["ColumnMode"];
        this.loadingIndicator = false;
        this.lists = [];
        this.headerHeight = 50;
        this.rowHeight = 50;
        this.pageLimit = 10;
        this.temp = [];
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_4__["HttpClient"](handler);
    }
    ngOnInit() {
        this.searchBlogPosts();
    }
    searchBlogPosts() {
        this.blogPostsList = [];
        // this.loadingIndicator = true;
        this.ngxLoader.start();
        let currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.http.post(this.ServerUrl + 'getcompanydetailsbyuuid/' + currentCompany.uuid, {}).subscribe(resp => {
            this.blogPostsList = resp[0].Response.data;
            this.lists = resp[0].Response.data;
            // this.loadingIndicator = false;
            this.ngxLoader.stop();
            // console.log(this.blogPostsList);
        }, error => {
            this.loadingIndicator = false;
        });
    }
    loadPage(limit) {
        // console.log(limit);
        // set the loading flag, which serves two purposes:
        // 1) it prevents the same page from being loaded twice
        // 2) it enables display of the loading indicator
        // this.loadingIndicator = true;
        this.ngxLoader.start();
        let currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.http.post(this.ServerUrl + 'getcompanydetailsbyuuid/' + currentCompany.uuid + '/' + this.blogPostsList.length + '/' + limit, {}).subscribe(resp => {
            const rows = [...this.blogPostsList, ...resp[0].Response.data];
            this.blogPostsList = rows;
            this.lists = resp[0].Response.data;
            // this.loadingIndicator = false;
            this.ngxLoader.stop();
            // console.log(this.blogPostsList);
        }, error => {
            // this.loadingIndicator = false;
            this.ngxLoader.stop();
        });
    }
    onScroll(offsetY) {
        const viewHeight = this.el.nativeElement.getBoundingClientRect().height - this.headerHeight;
        // check if we scrolled to the end of the viewport
        // 
        if (!this.loadingIndicator && offsetY + viewHeight >= this.blogPostsList.length * this.rowHeight) {
            // total number of results to load
            let limit = this.pageLimit;
            // check if we haven't fetched any results yet
            if (this.blogPostsList.length === 0) {
                // calculate the number of rows that fit within viewport
                const pageSize = Math.ceil(viewHeight / this.rowHeight);
                // change the limit to pageSize such that we fill the first page entirely
                // (otherwise, we won't be able to scroll past it)
                limit = Math.max(pageSize, this.pageLimit);
            }
            this.loadPage(limit);
        }
    }
    updateFilter(event) {
        // console.log(event.target.value);
        const val = event.target.value.toLowerCase().trim();
        if (val) {
            // filter our data
            const temp = this.blogPostsList.filter(function (d) {
                return d.incoming_number.toLowerCase().indexOf(val) !== -1 ||
                    d.publisher.toLowerCase().indexOf(val) !== -1 ||
                    d.target.toLowerCase().indexOf(val) !== -1 ||
                    d.campaign.toLowerCase().indexOf(val) !== -1 || !val;
            });
            // console.log(val);
            this.blogPostsList = temp;
        }
        else {
            this.blogPostsList = this.lists;
        }
        this.table1.offset = 0;
    }
    getpage(event) {
        this.pageSize = event.target.value;
        // console.log(this.pageSize);
    }
};
NgxdemoComponent.ctorParameters = () => [
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_4__["HttpBackend"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ElementRef"] },
    { type: ngx_ui_loader__WEBPACK_IMPORTED_MODULE_6__["NgxUiLoaderService"] }
];
NgxdemoComponent.propDecorators = {
    table1: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewChild"], args: [_swimlane_ngx_datatable__WEBPACK_IMPORTED_MODULE_5__["DatatableComponent"],] }]
};
NgxdemoComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-ngxdemo',
        template: _raw_loader_ngxdemo_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_ngxdemo_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], NgxdemoComponent);



/***/ }),

/***/ "IUaP":
/*!***************************************************************************!*\
  !*** ./src/app/modules/settings/basic-setting/basic-setting.component.ts ***!
  \***************************************************************************/
/*! exports provided: BasicSettingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BasicSettingComponent", function() { return BasicSettingComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_basic_setting_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./basic-setting.component.html */ "nGW0");
/* harmony import */ var _basic_setting_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basic-setting.component.scss */ "SOV7");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../../../global */ "XrUY");











const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
let BasicSettingComponent = class BasicSettingComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.xyzrules = true;
        this.Submitted = false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.Companyuuid = this.currentCompany.uuid;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.getAllbasicsetting();
        this.addForm = this.fb.group({
            // , Validators.required
            googlesheetlink: [''],
            xyzrules: [''],
        });
    }
    getAllbasicsetting() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentUser'));
        this.moduleservice.getAllbasicsetting(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            if (res['xyz_rules'] == 1) {
                this.xyzrules = true;
            }
            else {
                this.xyzrules = false;
            }
            this.addForm.patchValue({
                googlesheetlink: res['google_sheet_link'],
                xyzrules: this.xyzrules,
            });
        }, error => this.error = error);
    }
    xyzrules_enable(event) {
        this.xyzrules = event.target.checked;
    }
    //Add Publisher
    get addformcontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', this.currentCompany.uuid);
        formData.append('google_sheet_link', this.addForm.get('googlesheetlink').value);
        formData.append('xyz_rules', this.xyzrules);
        // console.log(formData); return false;
        this.moduleservice.addBasicSettingdata(formData).subscribe(res => {
            // console.log(res.status); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Basic Setting Saved Successfully');
                this.getAllbasicsetting();
                this.Submitted = false;
            }
            else {
                this.toastrService.error('Failed To Save Settings');
            }
        }, error => this.error = error);
    }
};
BasicSettingComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
BasicSettingComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-basic-setting',
        template: _raw_loader_basic_setting_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_basic_setting_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], BasicSettingComponent);



/***/ }),

/***/ "IsOJ":
/*!******************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/mail-verification/mail-verification.component.html ***!
  \******************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"bg-black\">\r\n    <div class=\"container\" style=\"background: #1d2b4e;height: 750px;\">\r\n      <div class=\"row text-center\">\r\n        <div class=\"col-md-12 mt-5\">\r\n          <img alt=\"image\" width=\"250px\" src=\"assets/img/logo.png\" class=\"header-logo mb-2  mt-10 mb-10\">\r\n          <h3>Verify Your Account</h3>\r\n          <P>Welcome to Ringlab Media! <br>\r\n            you need to verify your accounts.</P><br>\r\n          <p>Please Click on below button to verify your accounts</p>\r\n          <input type=\"button\" (click)=\"onSubmit()\" value=\"Click To Verify\" class=\"btn btn-primary\" style=\"width:300px\">\r\n          <!-- <a [routerLink]=\"['/login']\" routerLinkActive=\"router-link-active\"> Click Here to Go To Login</a> -->\r\n        </div>\r\n      </div>\r\n    \r\n    </div>\r\n  </div>");

/***/ }),

/***/ "JD8s":
/*!*******************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/settings/alert-configuration/alert-configuration.component.html ***!
  \*******************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <h4>Alert Configuration</h4></div>\r\n                    </div>                   \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <form id=\"addLabel\" [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n                    <div class=\"row\">\r\n                      <div class=\"col-md-12\">\r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Name of Alert :</label>\r\n                        <input formControlName=\"nameofalert\" type=\"text\" class=\"form-control\">\r\n                    </div>   \r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Select a Label :</label>\r\n                        <angular2-multiselect *ngIf=\"isdontuselabel==false\" [data]=\"alllabels\" formControlName=\"labelname\" [settings]=\"dropdownSettings\" ></angular2-multiselect>\r\n                        <!-- <select class=\"form-control\" name=\"labelname\" formControlName=\"labelname\" id=\"\">\r\n                            <option value=\"\">Select a Label</option>\r\n                            <option value=\"{{item.id}}\" *ngFor=\"let item of alllabels\">{{item.itemName}}</option>\r\n                        </select>                                 -->\r\n                        <div class=\"form-check form-check-inline mt-3\">\r\n                            <input type=\"checkbox\" (click)=\"dontuselabel($event)\" class=\"form-check\" name=\"\" id=\"\">\r\n                            <label class=\"form-check-label\" for=\"inlineRadio1\"> Dont use a Label(recommended)</label>\r\n                          </div>\r\n                    </div>   \r\n                    \r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Call Length Threshold - Recommended value :</label>\r\n                        <input formControlName=\"calllength\" type=\"text\" class=\"form-control\">                            \r\n                    </div>   \r\n\r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">One Time Alert :</label>\r\n                          <div class=\"form-check form-check-inline\">\r\n                            <input type=\"radio\" name=\"onetimealert\" formControlName=\"onetimealert\" value=\"\" id=\"\">\r\n                            <label class=\"form-check-label\" for=\"inlineRadio1\">Yes (Alert will expire once completed)</label>\r\n                          </div>\r\n                          \r\n                          <div class=\"form-check form-check-inline\">\r\n                            <input type=\"radio\" name=\"onetimealert\"  formControlName=\"onetimealert\"  value=\"\" id=\"\">\r\n                            <label class=\"form-check-label\" for=\"inlineRadio1\">No  (Alert will be an ongoing alert)</label>\r\n                          </div>\r\n                    </div>\r\n                 \r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Who should the system alert?</label>\r\n                        <div class=\"form-check form-check-inline\">\r\n                            <input type=\"checkbox\" formControlName=\"systemalert\"  class=\"form-check\" name=\"\" id=\"\">\r\n                            <label class=\"form-check-label\" for=\"inlineRadio1\"> Check All</label>\r\n                          </div>         \r\n                    </div>   \r\n                   \r\n                    <div class=\"form-group\">\r\n                        <div class=\"form-check form-check-inline\">\r\n                            <input type=\"checkbox\" class=\"form-check\" name=\"\" id=\"\">\r\n                            <label class=\"form-check-label\" for=\"inlineRadio1\"> Brian Smith</label>\r\n                        </div>         \r\n                        <div class=\"form-check form-check-inline\">\r\n                            <input type=\"checkbox\" class=\"form-check\" name=\"\" id=\"\">\r\n                            <label class=\"form-check-label\" for=\"inlineRadio1\"> Tina Dixon</label>\r\n                        </div>         \r\n                        <div class=\"form-check form-check-inline\">\r\n                            <input type=\"checkbox\" class=\"form-check\" name=\"\" id=\"\">\r\n                            <label class=\"form-check-label\" for=\"inlineRadio1\"> Bhavik Patel</label>\r\n                        </div>         \r\n                    </div>   \r\n                    </div>       \r\n                 </div>\r\n                    <div class=\"modal-footer\" style=\"padding: 0;\">\r\n                       <button type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Save</button>                       \r\n                      </div>\r\n                  </form>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>\r\n");

/***/ }),

/***/ "K6nh":
/*!**************************************************************************************!*\
  !*** ./src/app/modules/ivr-menus/ivr-routing-plans/add-plan/add-plan.component.scss ***!
  \**************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("input#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n\n.mat-step-header {\n  background: #6777ef !important;\n  color: white !important;\n  padding: 4px !important;\n  border-radius: 5px !important;\n  margin: 7px !important;\n  height: 43px !important;\n}\n\nng-select2.ng-star-inserted {\n  pointer-events: none !important;\n  touch-action: none !important;\n  color: #e9ecef !important;\n}\n\nfieldset.scheduler-border {\n  border: 1px groove #ddd !important;\n  padding: 0 1.4em 1.4em 1.4em !important;\n  margin: 0 0 1.5em 0 !important;\n  box-shadow: 0px 0px 0px 0px #000;\n}\n\nlegend.scheduler-border {\n  font-size: 1.2em !important;\n  font-weight: bold !important;\n  text-align: left !important;\n  width: auto;\n  padding: 0 10px;\n  border-bottom: none;\n}\n\nstrong {\n  font-size: 11px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcLi5cXGFkZC1wbGFuLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0ksYUFBQTtBQUNKOztBQUNBO0VBQ0ksWUFBQTtBQUVKOztBQUNBO0VBQ0ksOEJBQUE7RUFDQSx1QkFBQTtFQUNBLHVCQUFBO0VBQ0EsNkJBQUE7RUFDQSxzQkFBQTtFQUNBLHVCQUFBO0FBRUo7O0FBQ0E7RUFDSSwrQkFBQTtFQUNBLDZCQUFBO0VBQ0EseUJBQUE7QUFFSjs7QUFBQTtFQUNJLGtDQUFBO0VBQ0EsdUNBQUE7RUFDQSw4QkFBQTtFQUVRLGdDQUFBO0FBR1o7O0FBQUE7RUFDSSwyQkFBQTtFQUNBLDRCQUFBO0VBQ0EsMkJBQUE7RUFDQSxXQUFBO0VBQ0EsZUFBQTtFQUNBLG1CQUFBO0FBR0o7O0FBUUE7RUFDSSxlQUFBO0FBTEoiLCJmaWxlIjoiYWRkLXBsYW4uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyJpbnB1dCNvcHRpb24xLCBpbnB1dCNvcHRpb24yLCBpbnB1dCNvcHRpb24ze1xyXG4gICAgZGlzcGxheTogbm9uZTtcclxufSAgICBcclxuLmJ0bi1ncm91cC5mb3JtLWNvbnRyb2wge1xyXG4gICAgaGVpZ2h0OiA2MHB4O1xyXG59XHJcblxyXG4ubWF0LXN0ZXAtaGVhZGVyIHtcclxuICAgIGJhY2tncm91bmQ6ICM2Nzc3ZWYhaW1wb3J0YW50O1xyXG4gICAgY29sb3I6IHdoaXRlIWltcG9ydGFudDtcclxuICAgIHBhZGRpbmc6IDRweCFpbXBvcnRhbnQ7XHJcbiAgICBib3JkZXItcmFkaXVzOiA1cHghaW1wb3J0YW50O1xyXG4gICAgbWFyZ2luOiA3cHghaW1wb3J0YW50O1xyXG4gICAgaGVpZ2h0OiA0M3B4IWltcG9ydGFudDtcclxufVxyXG5cclxubmctc2VsZWN0Mi5uZy1zdGFyLWluc2VydGVkIHtcclxuICAgIHBvaW50ZXItZXZlbnRzOiBub25lIWltcG9ydGFudDtcclxuICAgIHRvdWNoLWFjdGlvbjogbm9uZSFpbXBvcnRhbnQ7XHJcbiAgICBjb2xvcjogI2U5ZWNlZiFpbXBvcnRhbnQ7XHJcbn1cclxuZmllbGRzZXQuc2NoZWR1bGVyLWJvcmRlciB7XHJcbiAgICBib3JkZXI6IDFweCBncm9vdmUgI2RkZCAhaW1wb3J0YW50O1xyXG4gICAgcGFkZGluZzogMCAxLjRlbSAxLjRlbSAxLjRlbSAhaW1wb3J0YW50O1xyXG4gICAgbWFyZ2luOiAwIDAgMS41ZW0gMCAhaW1wb3J0YW50O1xyXG4gICAgLXdlYmtpdC1ib3gtc2hhZG93OiAgMHB4IDBweCAwcHggMHB4ICMwMDA7XHJcbiAgICAgICAgICAgIGJveC1zaGFkb3c6ICAwcHggMHB4IDBweCAwcHggIzAwMDtcclxufVxyXG5cclxubGVnZW5kLnNjaGVkdWxlci1ib3JkZXIge1xyXG4gICAgZm9udC1zaXplOiAxLjJlbSAhaW1wb3J0YW50O1xyXG4gICAgZm9udC13ZWlnaHQ6IGJvbGQgIWltcG9ydGFudDtcclxuICAgIHRleHQtYWxpZ246IGxlZnQgIWltcG9ydGFudDtcclxuICAgIHdpZHRoOmF1dG87XHJcbiAgICBwYWRkaW5nOjAgMTBweDtcclxuICAgIGJvcmRlci1ib3R0b206bm9uZTtcclxufVxyXG5cclxuLy8gdGgsdGR7XHJcbi8vICAgICBwYWRkaW5nOiAwcHggMTBweCAwcHggMTBweCFpbXBvcnRhbnQ7XHJcbi8vICAgICBoZWlnaHQ6IDQ2cHghaW1wb3J0YW50O1xyXG4vLyAgICAgYmFja2dyb3VuZDogIzJlYTJkNjtcclxuLy8gICAgIHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7XHJcbi8vICAgICBjb2xvcjogd2hpdGU7XHJcbi8vICAgICBib3JkZXItcmFkaXVzOiAxcHg7XHJcbi8vIH1cclxuc3Ryb25nIHtcclxuICAgIGZvbnQtc2l6ZTogMTFweDtcclxufSJdfQ== */");

/***/ }),

/***/ "KbqV":
/*!****************************************************!*\
  !*** ./src/app/modules/notes/notes.component.scss ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("textarea.form-control {\n  height: auto !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFxub3Rlcy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLHVCQUFBO0FBQ0oiLCJmaWxlIjoibm90ZXMuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyJ0ZXh0YXJlYS5mb3JtLWNvbnRyb2wge1xyXG4gICAgaGVpZ2h0OiBhdXRvIWltcG9ydGFudDtcclxufSJdfQ== */");

/***/ }),

/***/ "Kcc5":
/*!************************************************************************!*\
  !*** ./src/app/modules/ivr-menus/add-ivrmenu/add-ivrmenu.component.ts ***!
  \************************************************************************/
/*! exports provided: AddIVRMenuComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddIVRMenuComponent", function() { return AddIVRMenuComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_add_ivrmenu_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./add-ivrmenu.component.html */ "MUa/");
/* harmony import */ var _add_ivrmenu_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./add-ivrmenu.component.scss */ "Gllu");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common/http */ "tk/3");









let AddIVRMenuComponent = class AddIVRMenuComponent {
    constructor(fb, moduleService, router, route, toastrService, handler, cdRef) {
        this.fb = fb;
        this.moduleService = moduleService;
        this.router = router;
        this.route = route;
        this.toastrService = toastrService;
        this.cdRef = cdRef;
        this.msbapTitle = 'Audio Title';
        this.msbapAudioUrl = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/fsdffsdf.mp3';
        this.msbapDisplayTitle = false;
        this.msbapDisplayVolumeControls = true;
        this.allBuyers = [];
        this.settings = {};
        this.forward_0 = 'FORWARD_TO_NUMBER';
        this.forward_1 = 'FORWARD_TO_NUMBER';
        this.forward_2 = 'FORWARD_TO_NUMBER';
        this.forward_3 = 'FORWARD_TO_NUMBER';
        this.forward_4 = 'FORWARD_TO_NUMBER';
        this.forward_5 = 'FORWARD_TO_NUMBER';
        this.forward_6 = 'FORWARD_TO_NUMBER';
        this.forward_7 = 'FORWARD_TO_NUMBER';
        this.forward_8 = 'FORWARD_TO_NUMBER';
        this.forward_9 = 'FORWARD_TO_NUMBER';
        this.forward_10 = 'FORWARD_TO_NUMBER';
        this.url_0 = '';
        this.url_1 = '';
        this.url_2 = '';
        this.url_3 = '';
        this.url_4 = '';
        this.url_5 = '';
        this.url_6 = '';
        this.url_7 = '';
        this.url_8 = '';
        this.url_9 = '';
        this.url_10 = '';
        this.formdata = new FormData();
        this.submitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_8__["HttpClient"](handler);
    }
    ngAfterContentChecked() {
        this.cdRef.detectChanges();
    }
    ngOnInit() {
        // this.showLoadingIndicator= true;
        // setTimeout(()=>{this.showLoadingIndicator= false; },1000);
        this.addIVRMenuForm = this.fb.group({
            user_uuid: [''],
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            noofretries: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            timeout: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            forward_to: [''],
            // openingmenu_forward_to: [''],        
            ivr_options: [''],
            // openingmenu_forward_tonumber: [''],        
            default_response: [''],
            buyer: [''],
            // Select Audio UUID
            audio_uuid_0: [''],
            audio_uuid_1: [''],
            audio_uuid_2: [''],
            audio_uuid_3: [''],
            audio_uuid_4: [''],
            audio_uuid_5: [''],
            audio_uuid_6: [''],
            audio_uuid_7: [''],
            audio_uuid_8: [''],
            audio_uuid_9: [''],
            audio_uuid_10: [''],
            // Upload Audio File
            upload_audio_0: [''],
            upload_audio_1: [''],
            upload_audio_2: [''],
            upload_audio_3: [''],
            upload_audio_4: [''],
            upload_audio_5: [''],
            upload_audio_6: [''],
            upload_audio_7: [''],
            upload_audio_8: [''],
            upload_audio_9: [''],
            upload_audio_10: [''],
            // Forward to Number or IVR Menu
            forward_to_0: [''],
            forward_to_1: [''],
            forward_to_2: [''],
            forward_to_3: [''],
            forward_to_4: [''],
            forward_to_5: [''],
            forward_to_6: [''],
            forward_to_7: [''],
            forward_to_8: [''],
            forward_to_9: [''],
            forward_to_10: [''],
            // Forward to Number
            forwardto_phone_0: [''],
            forwardto_phone_1: [''],
            forwardto_phone_2: [''],
            forwardto_phone_3: [''],
            forwardto_phone_4: [''],
            forwardto_phone_5: [''],
            forwardto_phone_6: [''],
            forwardto_phone_7: [''],
            forwardto_phone_8: [''],
            forwardto_phone_9: [''],
            forwardto_phone_10: [''],
            // Forward to Campaign
            forwardto_campaign_0: [''],
            forwardto_campaign_1: [''],
            forwardto_campaign_2: [''],
            forwardto_campaign_3: [''],
            forwardto_campaign_4: [''],
            forwardto_campaign_5: [''],
            forwardto_campaign_6: [''],
            forwardto_campaign_7: [''],
            forwardto_campaign_8: [''],
            forwardto_campaign_9: [''],
            forwardto_campaign_10: [''],
            forwardto_ivr_0: [''],
            forwardto_ivr_1: [''],
            forwardto_ivr_2: [''],
            forwardto_ivr_3: [''],
            forwardto_ivr_4: [''],
            forwardto_ivr_5: [''],
            forwardto_ivr_6: [''],
            forwardto_ivr_7: [''],
            forwardto_ivr_8: [''],
            forwardto_ivr_9: [''],
            forwardto_ivr_10: [''],
            forwardto_routing_0: [''],
            forwardto_routing_1: [''],
            forwardto_routing_2: [''],
            forwardto_routing_3: [''],
            forwardto_routing_4: [''],
            forwardto_routing_5: [''],
            forwardto_routing_6: [''],
            forwardto_routing_7: [''],
            forwardto_routing_8: [''],
            forwardto_routing_9: [''],
            forwardto_routing_10: [''],
            forwardto_ivrrouting_0: [''],
            forwardto_ivrrouting_1: [''],
            forwardto_ivrrouting_2: [''],
            forwardto_ivrrouting_3: [''],
            forwardto_ivrrouting_4: [''],
            forwardto_ivrrouting_5: [''],
            forwardto_ivrrouting_6: [''],
            forwardto_ivrrouting_7: [''],
            forwardto_ivrrouting_8: [''],
            forwardto_ivrrouting_9: [''],
            forwardto_ivrrouting_10: [''],
        });
        this.addIVRMenuForm.patchValue({
            forward_to_0: 'FORWARD_TO_NUMBER',
            forward_to_1: 'FORWARD_TO_NUMBER',
            forward_to_2: 'FORWARD_TO_NUMBER',
            forward_to_3: 'FORWARD_TO_NUMBER',
            forward_to_4: 'FORWARD_TO_NUMBER',
            forward_to_5: 'FORWARD_TO_NUMBER',
            forward_to_6: 'FORWARD_TO_NUMBER',
            forward_to_7: 'FORWARD_TO_NUMBER',
            forward_to_8: 'FORWARD_TO_NUMBER',
            forward_to_9: 'FORWARD_TO_NUMBER',
            forward_to_10: 'FORWARD_TO_NUMBER',
        });
        this.settings = {
            enableSearchFilter: true,
            singleSelection: true, showCheckbox: false, text: "Select Buyer"
        };
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getallbuyers(this.currentCompany.uuid).subscribe(res => {
            this.allBuyers = res;
            //  console.log(this.allBuyers);
        }, error => this.error = error);
        this.moduleService.getIVRMenus(this.currentCompany.uuid).subscribe(res => {
            this.menuname = res;
        }, error => this.error = error);
        this.moduleService.getAlltarget(this.currentCompany.uuid).subscribe(res => {
            this.alltarget = res;
        }, error => this.error = error);
        this.moduleService.allivrroutingplan(this.currentCompany.uuid).subscribe(res => {
            console.log(res);
            this.allivrroutingplan = res;
        }, error => this.error = error);
        this.moduleService.getallcampaindata(this.currentCompany.uuid).subscribe(res => {
            this.campaigns = res;
        }, error => this.error = error);
        this.getaudio();
        // console.log(this.audio);
    }
    IVR_Options(event) {
        this.selectedIVR_Options = event.target.value;
    }
    forward_to(event, i) {
        if (i == 0) {
            this.forward_0 = event.target.value;
        }
        if (i == 1) {
            this.forward_1 = event.target.value;
        }
        if (i == 2) {
            this.forward_2 = event.target.value;
        }
        if (i == 3) {
            this.forward_3 = event.target.value;
        }
        if (i == 4) {
            this.forward_4 = event.target.value;
        }
        if (i == 5) {
            this.forward_5 = event.target.value;
        }
        if (i == 6) {
            this.forward_6 = event.target.value;
        }
        if (i == 7) {
            this.forward_7 = event.target.value;
        }
        if (i == 8) {
            this.forward_8 = event.target.value;
        }
        if (i == 9) {
            this.forward_9 = event.target.value;
        }
        if (i == 10) {
            this.forward_10 = event.target.value;
        }
    }
    audiochange(args, count) {
        // alert(count);
        // console.log(args);return false;
        this.audioname = args.target.options[args.target.selectedIndex].text;
        if (count == 0) {
            this.url_0 = '';
            this.url_0 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        // return false;
        if (count == 1) {
            this.url_1 = '';
            this.url_1 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 2) {
            this.url_2 = '';
            this.url_2 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 3) {
            this.url_3 = '';
            this.url_3 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 4) {
            this.url_4 = '';
            this.url_4 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 5) {
            this.url_5 = '';
            this.url_5 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 6) {
            this.url_6 = '';
            this.url_6 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 7) {
            this.url_7 = '';
            this.url_7 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 8) {
            this.url_8 = '';
            this.url_8 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 9) {
            this.url_9 = '';
            this.url_9 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 10) {
            this.url_10 = '';
            this.url_10 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        // alert(this.url);
    }
    openingmenu_forward(event) {
        this.openingmenuforward = event.target.value;
    }
    getaudio() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getIVRAudio(this.currentCompany.uuid, 0).subscribe(res => {
            this.audio = res;
            //  console.log(this.audio);
        }, error => this.error = error);
    }
    selectedIVR() {
        let array = [];
        if (!this.selectedIVR_Options) {
            this.selectedIVR_Options = 1;
        }
        for (let i = 0; i < this.selectedIVR_Options; i++) {
            array.push(i);
        }
        return array;
    }
    // selectedFile(event){
    //   alert(event);
    //   console.log(event);
    // }
    setaudioselected(uuid, count) {
        if (count == 0) {
            this.addIVRMenuForm.patchValue({
                audio_uuid_0: uuid,
            });
        }
        if (count == 1) {
            this.addIVRMenuForm.patchValue({
                audio_uuid_1: uuid,
            });
        }
        if (count == 2) {
            this.addIVRMenuForm.patchValue({
                audio_uuid_2: uuid,
            });
        }
        if (count == 3) {
            this.addIVRMenuForm.patchValue({
                audio_uuid_3: uuid,
            });
        }
        if (count == 4) {
            this.addIVRMenuForm.patchValue({
                audio_uuid_4: uuid,
            });
        }
        if (count == 5) {
            this.addIVRMenuForm.patchValue({
                audio_uuid_5: uuid,
            });
        }
        if (count == 6) {
            this.addIVRMenuForm.patchValue({
                audio_uuid_6: uuid,
            });
        }
        if (count == 7) {
            this.addIVRMenuForm.patchValue({
                audio_uuid_7: uuid,
            });
        }
        if (count == 8) {
            this.addIVRMenuForm.patchValue({
                audio_uuid_8: uuid,
            });
        }
        if (count == 9) {
            this.addIVRMenuForm.patchValue({
                audio_uuid_9: uuid,
            });
        }
        if (count == 10) {
            this.addIVRMenuForm.patchValue({
                audio_uuid_10: uuid,
            });
        }
    }
    // currentFileUpload: File;
    selectFile(event, count) {
        this.showLoadingIndicator = true;
        // alert(count);return false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // this.currentFileUpload = event.target.files.item(0);
        // console.log(this.currentFileUpload);return false;
        this.moduleService.uploadfile(event.target.files.item(0), this.currentCompany.uuid, 0).subscribe(res => {
            // console.log(JSON.parse(sessionStorage.getItem('progress')));
            // this.progress.percentage = res;
            //        console.log(res.status);
            //  return false; 
            // if (res.status != 200) {
            // alert('ok');
            // }
            if (res.status !== 'error' && event.target.files.item(0).name != '' && res.body) {
                //   console.log(res.status);
                //  return false;         
                if (res.status === 200) {
                    this.showLoadingIndicator = false;
                }
                this.toastrService.success('Audio Uploaded Succssfully');
                // return false;
                this.getaudio();
                this.setaudioselected(res.body.uuid, count);
                if (res.status == 200)
                    if (count == 0) {
                        this.url_0 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                    }
                if (count == 1) {
                    this.url_1 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 2) {
                    this.url_2 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 3) {
                    this.url_3 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 4) {
                    this.url_4 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 5) {
                    this.url_5 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 6) {
                    this.url_6 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 7) {
                    this.url_7 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 8) {
                    this.url_8 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 9) {
                    this.url_9 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 10) {
                    this.url_10 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
            }
            else {
                if (res.status === 'error') {
                    this.toastrService.error('Failed To Add');
                }
            }
        }, error => this.error = error);
    }
    get f() { return this.addIVRMenuForm.controls; }
    onSubmit() {
        // const formData = new FormData();      
        this.submitted = true;
        if (this.addIVRMenuForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.addIVRMenuForm.get("user_uuid").setValue(currentUser.uuid);
        // console.log(this.buyername); return
        // this.addIVRMenuForm.get("buyer").setValue(this.buyername);
        this.moduleService.addIVR(this.addIVRMenuForm.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('IVR Menu Added Successfully');
                this.router.navigate(['/ivr-menu']);
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    _keyPress(event) {
        const isNumericInput = (event) => {
            const key = event.keyCode;
            return ((key >= 48 && key <= 57) || // Allow number line
                (key >= 96 && key <= 105) // Allow number pad
            );
        };
        const isModifierKey = (event) => {
            const key = event.keyCode;
            return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
                (key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
                (key > 36 && key < 41) || // Allow left, up, right, down
                (
                // Allow Ctrl/Command + A,C,V,X,Z
                (event.ctrlKey === true || event.metaKey === true) &&
                    (key === 65 || key === 67 || key === 86 || key === 88 || key === 90));
        };
        const enforceFormat = (event) => {
            // Input must be of a valid number format or a modifier key, and not longer than ten digits
            if (!isNumericInput(event) && !isModifierKey(event)) {
                event.preventDefault();
            }
        };
        const formatToPhone = (event) => {
            if (isModifierKey(event)) {
                return;
            }
            const target = event.target;
            const input = event.target.value.replace(/\D/g, '').substring(0, 10); // First ten digits of input only
            const zip = input.substring(0, 3);
            const middle = input.substring(3, 6);
            const last = input.substring(6, 10);
            if (input.length > 6) {
                target.value = `(${zip}) ${middle}-${last}`;
            }
            else if (input.length > 3) {
                target.value = `(${zip}) ${middle}`;
            }
            else if (input.length > 0) {
                target.value = `(${zip}`;
            }
        };
        const forwardto_phone_0no = document.getElementById('forwardto_phone_0');
        const forwardto_phone_1no = document.getElementById('forwardto_phone_1');
        const forwardto_phone_2no = document.getElementById('forwardto_phone_2');
        const forwardto_phone_3no = document.getElementById('forwardto_phone_3');
        const forwardto_phone_4no = document.getElementById('forwardto_phone_4');
        const forwardto_phone_5no = document.getElementById('forwardto_phone_5');
        const forwardto_phone_6no = document.getElementById('forwardto_phone_6');
        const forwardto_phone_7no = document.getElementById('forwardto_phone_7');
        const forwardto_phone_8no = document.getElementById('forwardto_phone_8');
        const forwardto_phone_9no = document.getElementById('forwardto_phone_9');
        const forwardto_phone_10no = document.getElementById('forwardto_phone_10');
        if (forwardto_phone_0no) {
            forwardto_phone_0no.addEventListener('keydown', enforceFormat);
            forwardto_phone_0no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_1no) {
            forwardto_phone_1no.addEventListener('keydown', enforceFormat);
            forwardto_phone_1no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_2no) {
            forwardto_phone_2no.addEventListener('keydown', enforceFormat);
            forwardto_phone_2no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_3no) {
            forwardto_phone_3no.addEventListener('keydown', enforceFormat);
            forwardto_phone_3no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_4no) {
            forwardto_phone_4no.addEventListener('keydown', enforceFormat);
            forwardto_phone_4no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_5no) {
            forwardto_phone_5no.addEventListener('keydown', enforceFormat);
            forwardto_phone_5no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_6no) {
            forwardto_phone_6no.addEventListener('keydown', enforceFormat);
            forwardto_phone_6no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_7no) {
            forwardto_phone_7no.addEventListener('keydown', enforceFormat);
            forwardto_phone_7no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_8no) {
            forwardto_phone_8no.addEventListener('keydown', enforceFormat);
            forwardto_phone_8no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_9no) {
            forwardto_phone_9no.addEventListener('keydown', enforceFormat);
            forwardto_phone_9no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_10no) {
            forwardto_phone_10no.addEventListener('keydown', enforceFormat);
            forwardto_phone_10no.addEventListener('keyup', formatToPhone);
        }
    }
};
AddIVRMenuComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["ActivatedRoute"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_8__["HttpBackend"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ChangeDetectorRef"] }
];
AddIVRMenuComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-add-ivrmenu',
        template: _raw_loader_add_ivrmenu_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_add_ivrmenu_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], AddIVRMenuComponent);



/***/ }),

/***/ "L7QM":
/*!****************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/publishers/publishers.component.html ***!
  \****************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <h4> Manage Publishers</h4></div>\r\n                    </div>\r\n                    <div class=\"col-9 text-right mt-2\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                          <button type=\"button\" data-toggle=\"modal\" data-target=\"#addLabels\" class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon mr-2 p-2\"><i class=\"fa fa-plus\"></i> Create Publisher\r\n                          </button>\r\n                          <!-- <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Delete Selected\r\n                          </button>                          -->\r\n                          \r\n                          </div>                       \r\n                    </div>\r\n              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                    <thead>\r\n                      <tr>\r\n                        <!-- <th style=\"padding: 10px;width: 1px;\">\r\n                            <div class=\"custom-control custom-checkbox\" *ngIf=\"numbers?.length != 0\">\r\n                            <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                            <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                            </div>\r\n                        </th> -->\r\n                        <th>Name</th>\r\n                        <th>Sub ID</th>\r\n                        <th>Create Numbers</th>\r\n                        <th>Block Incoming Calls<br> After Cap Is Reached</th>                        \r\n                        <th>Access To Recordings</th>                        \r\n                        <th>Created At</th>                        \r\n                        <th>Status</th>                        \r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let number of numbers\">\r\n                              <!-- <td>\r\n                                <div class=\"custom-control custom-checkbox\">\r\n                                <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{number.uuid}}\"  [checked]=\"number.selected\" [value]=\"number.id\" >\r\n                                <label class=\"custom-control-label\" for=\"customCheck_{{number.uuid}}\"></label>\r\n                                </div>                                \r\n                            </td> -->\r\n                            <td><a (click)=\"editdata(number.uuid,number.name,number.sub_id,number.create_number,number.settingToggleBlockCallsIfCapped,number.settingToggleAccessToRecordings, number.status)\" href=\"#\" data-toggle=\"modal\" data-target=\"#editLabels\" class=\"text-white actionedit\">{{ number.name }}</a></td>\r\n                            <td>{{ number.sub_id }}</td>\r\n                            <td>\r\n                              <div *ngIf=\"number.create_number==0\" class=\"badge badge-danger\">No</div>\r\n                              <div *ngIf=\"number.create_number==1\" class=\"badge badge-success\">Yes</div>\r\n                            </td>\r\n                            <td>\r\n                              <div *ngIf=\"number.settingToggleBlockCallsIfCapped==0\" class=\"badge badge-primary\">Global</div>\r\n                              <div *ngIf=\"number.settingToggleBlockCallsIfCapped==1\" class=\"badge badge-primary\">Allow</div>\r\n                              <div *ngIf=\"number.settingToggleBlockCallsIfCapped==2\" class=\"badge badge-primary\">Block</div>\r\n                            </td>\r\n                            <td>\r\n                              <div *ngIf=\"number.settingToggleAccessToRecordings==0\" class=\"badge badge-primary\">Global</div>\r\n                              <div *ngIf=\"number.settingToggleAccessToRecordings==1\" class=\"badge badge-primary\">Enabled</div>\r\n                              <div *ngIf=\"number.settingToggleAccessToRecordings==2\" class=\"badge badge-primary\">Disabled</div>                             \r\n                            </td>\r\n                            <td>{{ number.created_at }}</td>\r\n                            <td>\r\n                              <div *ngIf=\"number.status==1\" class=\"badge badge-success\">Active</div>\r\n                              <div *ngIf=\"number.status==0\" class=\"badge badge-danger\">In-Active</div>\r\n                            </td>                            \r\n                            <td><a (click)=\"editdata(number.uuid,number.name,number.sub_id,number.create_number,number.settingToggleBlockCallsIfCapped,number.settingToggleAccessToRecordings, number.status)\" href=\"#\" data-toggle=\"modal\" data-target=\"#editLabels\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;<button (click)=\"Delete((number.id))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>\r\n\r\n\r\n  <!-- Add  Modal -->\r\n<div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog model-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Create Publisher</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"addLabel\" [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n        <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n        <div class=\"form-group\">\r\n            <label>Name</label>\r\n            <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.name.errors }\">\r\n            <div *ngIf=\"Submitted && addformcontrol.name.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"addformcontrol.name.errors.required\">Name is required</div>\r\n            </div>              \r\n         </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Sub Id  :</label>\r\n            <input formControlName=\"sub_id\" type=\"text\" class=\"form-control\">           \r\n          </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Number Creation  :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"number_creation\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>                                    \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <div class=\"control-group\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Block Incoming Calls After Cap Is Reached:</label>\r\n                <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleBlockCallsIfCappededit==0}\" (click)=\"settingToggleBlockCallsIfCappedval(0)\"> \r\n                      <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                      Global\r\n                    </label>\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleBlockCallsIfCappededit==1}\" (click)=\"settingToggleBlockCallsIfCappedval(1)\">\r\n                      <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                       Allow\r\n                    </label>\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleBlockCallsIfCappededit==2}\" (click)=\"settingToggleBlockCallsIfCappedval(2)\">\r\n                      <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                       Block\r\n                    </label>\r\n                  </div>                \r\n         </div>        \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n          <div class=\"control-group\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Access To Recordings:</label>\r\n                <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleAccessToRecordingsedit==0}\" (click)=\"settingToggleAccessToRecordingsval(0)\"> \r\n                      <input class=\"form-check-input\" name=\"settingToggleAccessToRecordings\" formControlName=\"settingToggleAccessToRecordings\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                      Global\r\n                    </label>\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleAccessToRecordingsedit==1}\" (click)=\"settingToggleAccessToRecordingsval(1)\">\r\n                      <input class=\"form-check-input\" name=\"settingToggleAccessToRecordings\" formControlName=\"settingToggleAccessToRecordings\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                       Enabled\r\n                    </label>\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleAccessToRecordingsedit==2}\" (click)=\"settingToggleAccessToRecordingsval(2)\">\r\n                      <input class=\"form-check-input\" name=\"settingToggleAccessToRecordings\" formControlName=\"settingToggleAccessToRecordings\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                       Disabled\r\n                    </label>\r\n                  </div>                  \r\n    </div>      \r\n          </div>\r\n         </div>       \r\n     </div>\r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n           <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Publisher</button>\r\n           <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n          </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>   \r\n\r\n<!-- Edit  Modal -->\r\n<div class=\"modal fade\" id=\"editLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog model-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Update Publisher</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"editLabel\" [formGroup]=\"editForm\" (ngSubmit)=\"onEditSubmit()\">\r\n        <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n            <div class=\"form-group\">\r\n                <label>Name</label>\r\n                <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && editFormcontrol.name.errors }\">\r\n                <div *ngIf=\"Submitted && editFormcontrol.name.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"editFormcontrol.name.errors.required\">Name is required</div>\r\n                </div>              \r\n             </div>\r\n    \r\n              <div class=\"form-group\">\r\n                <label  class=\"d-block\">Sub Id  :</label>\r\n                <input formControlName=\"sub_id\" type=\"text\" class=\"form-control\">           \r\n              </div>\r\n    \r\n              <div class=\"form-group\">\r\n                <label  class=\"d-block\">Number Creation  :</label>\r\n                <label class=\"custom-switch mt-2 pl-0\">\r\n                  <input type=\"checkbox\" formControlName=\"number_creation\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                  <span class=\"custom-switch-indicator\"></span>                     \r\n                </label>                                    \r\n              </div>\r\n             \r\n              <div class=\"form-group\">\r\n                <div class=\"control-group\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Block Incoming Calls After Cap Is Reached:</label>\r\n                    <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleBlockCallsIfCappeddata==0}\" (click)=\"settingToggleBlockCallsIfCappedvaledit(0)\"> \r\n                          <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                          Global\r\n                        </label>\r\n                        <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleBlockCallsIfCappeddata==1}\" (click)=\"settingToggleBlockCallsIfCappedvaledit(1)\">\r\n                          <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                           Allow\r\n                        </label>\r\n                        <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleBlockCallsIfCappeddata==2}\" (click)=\"settingToggleBlockCallsIfCappedvaledit(2)\">\r\n                          <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                           Block\r\n                        </label>\r\n                      </div>                \r\n             </div>        \r\n              </div>\r\n             \r\n              <div class=\"form-group\">\r\n              <div class=\"control-group\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Access To Recordings:</label>\r\n                    <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleAccessToRecordingsvaldata==0}\" (click)=\"settingToggleAccessToRecordingsvaledit(0)\"> \r\n                          <input class=\"form-check-input\" name=\"settingToggleAccessToRecordings\" formControlName=\"settingToggleAccessToRecordings\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                          Global\r\n                        </label>\r\n                        <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleAccessToRecordingsvaldata==1}\" (click)=\"settingToggleAccessToRecordingsvaledit(1)\">\r\n                          <input class=\"form-check-input\" name=\"settingToggleAccessToRecordings\" formControlName=\"settingToggleAccessToRecordings\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                           Enabled\r\n                        </label>\r\n                        <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleAccessToRecordingsvaldata==2}\" (click)=\"settingToggleAccessToRecordingsvaledit(2)\">\r\n                          <input class=\"form-check-input\" name=\"settingToggleAccessToRecordings\" formControlName=\"settingToggleAccessToRecordings\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                           Disabled\r\n                        </label>\r\n                      </div>                  \r\n              </div>  \r\n              \r\n              <div class=\"control-group mt-2\">\r\n                <label>Status</label>\r\n                 <select formControlName=\"status\" name=\"status\" id=\"status\" class=\"form-control\" [value]=\"''\">\r\n                   <option value=\"1\">Active</option>\r\n                   <option value=\"0\">In-Active</option>                   \r\n                 </select>                         \r\n              </div>\r\n\r\n              </div>\r\n             </div>          \r\n     </div>\r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n         <!-- !addLabelForm.valid || -->\r\n           <button (click)=\"closeEditModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Update Publisher</button>\r\n           <button data-dismiss=\"modal\" aria-label=\"Close\" class=\"btn btn-secondary m-t-15 waves-effect\">Close</button>\r\n          </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>   ");

/***/ }),

/***/ "M/dJ":
/*!************************************************************!*\
  !*** ./src/app/modules/campaigns/campaigns.component.scss ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("input#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: auto;\n  border: none;\n  padding: 0;\n}\n\n.appleinput {\n  width: 63px;\n  border: none;\n  border-bottom: 1px solid;\n  border-radius: 0;\n  background: none !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFxjYW1wYWlnbnMuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDSSxhQUFBO0FBQ0o7O0FBQ0E7RUFDSSxZQUFBO0VBQ0EsWUFBQTtFQUNBLFVBQUE7QUFFSjs7QUFDQTtFQUNJLFdBQUE7RUFDQSxZQUFBO0VBQ0Esd0JBQUE7RUFDQSxnQkFBQTtFQUNBLDJCQUFBO0FBRUoiLCJmaWxlIjoiY2FtcGFpZ25zLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiaW5wdXQjb3B0aW9uMSwgaW5wdXQjb3B0aW9uMiwgaW5wdXQjb3B0aW9uM3tcclxuICAgIGRpc3BsYXk6IG5vbmU7XHJcbn0gICAgXHJcbi5idG4tZ3JvdXAuZm9ybS1jb250cm9sIHtcclxuICAgIGhlaWdodDogYXV0bztcclxuICAgIGJvcmRlcjogbm9uZTtcclxuICAgIHBhZGRpbmc6IDA7XHJcbn1cclxuXHJcbi5hcHBsZWlucHV0e1xyXG4gICAgd2lkdGg6IDYzcHg7XHJcbiAgICBib3JkZXI6IG5vbmU7XHJcbiAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQ7XHJcbiAgICBib3JkZXItcmFkaXVzOiAwO1xyXG4gICAgYmFja2dyb3VuZDogbm9uZSFpbXBvcnRhbnQ7XHJcbn1cclxuXHJcbiJdfQ== */");

/***/ }),

/***/ "M69P":
/*!***************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/number/number-buyer/number-buyer.component.html ***!
  \***************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <h4> Manage Buyers</h4></div>\r\n                    </div>\r\n                    <div class=\"col-9 text-right mt-2\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                          <button type=\"button\" data-toggle=\"modal\" data-target=\"#addLabels\" class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon mr-2 p-2\"><i class=\"fa fa-plus\"></i> Create Buyer\r\n                          </button>\r\n                          <!-- <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Delete Selected\r\n                          </button>                          -->\r\n                          \r\n                          </div>                       \r\n                    </div>\r\n              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                    <thead>\r\n                      <tr>\r\n                        <!-- <th style=\"padding: 10px;width: 1px;\">\r\n                            <div class=\"custom-control custom-checkbox\" *ngIf=\"numbers?.length != 0\">\r\n                            <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                            <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                            </div>\r\n                        </th> -->\r\n                        <th>Company Name</th>\r\n                        <th>Sub Id</th>\r\n                        <th>Can Pause Targets</th>\r\n                        <th>Can Set Target Concurrency</th>\r\n                        <th>Can Dispute Conversions</th>\r\n                        <!-- <th>Hour</th>\r\n                        <th>Day</th>                        \r\n                        <th>Month</th>                        \r\n                        <th>Total</th>                         -->\r\n                        <!-- <th>Status</th>                         -->\r\n                        <th>Created At</th>                        \r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let number of numbers\">\r\n                              <!-- <td>\r\n                                <div class=\"custom-control custom-checkbox\">\r\n                                <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{number.uuid}}\"  [checked]=\"number.selected\" [value]=\"number.id\" >\r\n                                <label class=\"custom-control-label\" for=\"customCheck_{{number.uuid}}\"></label>\r\n                                </div>                                \r\n                            </td> -->\r\n                            <td><a (click)=\"editdata(number.uuid,number.company,number.sub_id,number.allow_buyer_to_pause_target,number.allow_buyer_to_set_target_concurrency,number.allow_buyer_to_dispute_call_conversions,number.limit_revenue)\" href=\"#\" data-toggle=\"modal\" data-target=\"#editLabels\" class=\"text-white actionedit\">{{ number.company }}</a></td>\r\n                            <td>{{ number.sub_id }}</td>\r\n                            <td>\r\n                                <div *ngIf=\"number.allow_buyer_to_pause_target==0\" class=\"badge badge-danger\">No</div>\r\n                                <div *ngIf=\"number.allow_buyer_to_pause_target==1\" class=\"badge badge-success\">Yes</div>\r\n                            </td>\r\n                            <td>\r\n                                <div *ngIf=\"number.allow_buyer_to_set_target_concurrency==0\" class=\"badge badge-danger\">No</div>\r\n                                <div *ngIf=\"number.allow_buyer_to_set_target_concurrency==1\" class=\"badge badge-success\">Yes</div>\r\n                            </td>\r\n                            <td>\r\n                                <div *ngIf=\"number.allow_buyer_to_dispute_call_conversions==0\" class=\"badge badge-danger\">No</div>\r\n                                <div *ngIf=\"number.allow_buyer_to_dispute_call_conversions==1\" class=\"badge badge-success\">Yes</div>\r\n                            </td>                           \r\n                            <!-- <td>{{ number.hour }}</td>\r\n                            <td>{{ number.day }}</td>\r\n                            <td>{{ number.month }}</td>\r\n                            <td>{{ number.total }}</td> -->\r\n                            <!-- <td>\r\n                              <div *ngIf=\"number.status==0\" class=\"badge badge-danger\">In-Active</div>\r\n                              <div *ngIf=\"number.status==1\" class=\"badge badge-success\">Active</div>\r\n                            </td> -->\r\n                            <td>{{ number.created_at }}</td>\r\n                            <td><a (click)=\"editdata(number.uuid,number.company,number.sub_id,number.allow_buyer_to_pause_target,number.allow_buyer_to_set_target_concurrency,number.allow_buyer_to_dispute_call_conversions,number.limit_revenue)\" href=\"#\" data-toggle=\"modal\" data-target=\"#editLabels\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;<button (click)=\"Delete((number.id))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>\r\n\r\n\r\n  <!-- Add Label Modal -->\r\n<div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog model-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Create Buyer</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"addLabel\" [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n        <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n        <div class=\"form-group\">\r\n            <label>Company</label>\r\n            <input formControlName=\"company\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && buyercontrol.company.errors }\">\r\n            <div *ngIf=\"Submitted && buyercontrol.company.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"buyercontrol.company.errors.required\">Company is required</div>\r\n            </div>              \r\n         </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Sub Id  :</label>\r\n            <input formControlName=\"sub_id\" type=\"text\" class=\"form-control\">           \r\n          </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Pause Targets :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_pause_target\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>           \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Set Target Concurrency :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_set_target_concurrency\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>            \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Dispute Call Conversions :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_dispute_call_conversions\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>          \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Limit Revenue : </label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"limit_revenue\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>         \r\n          </div>\r\n          \r\n         </div>       \r\n     </div>\r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n         <!-- !addLabelForm.valid || -->\r\n           <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Buyer</button>\r\n           <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n          </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>   \r\n\r\n<!-- Edit Label Modal -->\r\n<div class=\"modal fade\" id=\"editLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog model-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Update Buyer</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"editLabel\" [formGroup]=\"editForm\" (ngSubmit)=\"onEditSubmit()\">\r\n        <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n        <div class=\"form-group\">\r\n            <label>Company</label>\r\n            <input type=\"hidden\" name=\"uuid\" formControlName=\"uuid\">\r\n            <input formControlName=\"company\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': editSubmitted && editbuyercontrol.company.errors }\">\r\n            <div *ngIf=\"editSubmitted && editbuyercontrol.company.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"editbuyercontrol.company.errors.required\">Company is required</div>\r\n            </div>              \r\n         </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Sub Id  :</label>\r\n            <input formControlName=\"sub_id\" type=\"text\" class=\"form-control\">           \r\n          </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Pause Targets :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_pause_target\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>           \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Set Target Concurrency :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_set_target_concurrency\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>            \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Dispute Call Conversions :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_dispute_call_conversions\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>          \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Limit Revenue : </label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"limit_revenue\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>         \r\n          </div>\r\n          \r\n         </div>       \r\n     </div>\r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n         <!-- !addLabelForm.valid || -->\r\n           <button (click)=\"closeEditModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Update Buyer</button>\r\n           <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n          </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>   ");

/***/ }),

/***/ "M95H":
/*!**********************************************************!*\
  !*** ./src/app/modules/dashboard/dashboard.component.ts ***!
  \**********************************************************/
/*! exports provided: DashboardComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DashboardComponent", function() { return DashboardComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_dashboard_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./dashboard.component.html */ "Eo/H");
/* harmony import */ var _dashboard_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dashboard.component.scss */ "PsZA");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var angular_highcharts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! angular-highcharts */ "a0Xn");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! highcharts/modules/exporting */ "AxlJ");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! highcharts */ "6n/F");
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(highcharts__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! datatables.net */ "FlOX");
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(datatables_net__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/common/http */ "tk/3");











highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6___default()(highcharts__WEBPACK_IMPORTED_MODULE_7__);
class DataTablesResponse {
}
let DashboardComponent = class DashboardComponent {
    constructor(moduleservice, handler) {
        this.moduleservice = moduleservice;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_9__["GlobalVariable"].BASE_API_URL;
        this.NumberOfNumbers = 0;
        this.event = "";
        this.dtOptions = {};
        this.currentDate = new Date();
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_10__["HttpClient"](handler);
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        // console.log(this.currentCompany);
        this.getNumberOfCounts();
        // this.getNumberOfIVR();
        // this.getNumberOfNumbers();
        // this.getNumberOfSMS();   
        this.getChartNumberOfCalls(this.event);
        this.loadcalls();
    }
    getChartNumberOfCalls(event) {
        // console.log(event);return false;
        if (event != '') {
            this.date1 = event.endDate._d;
        }
        else {
            this.date1 = '';
        }
        let params = {
            user_uuid: this.currentUser.uuid,
            role: this.currentUser.role,
            date: this.date1,
        };
        // console.log(this.date1);
        this.moduleservice.getChartbyDate(this.currentCompany.uuid, params, this.currentUser.timezone).subscribe(res => {
            //  console.log(res); 
            if ($("html").hasClass("dark")) {
                this.bgcolorcode = 'rgb(17,19,25)';
            }
            this.chart = new angular_highcharts__WEBPACK_IMPORTED_MODULE_5__["Chart"]({
                chart: {
                    // polar: true,
                    type: 'line',
                    zoomType: 'x',
                    backgroundColor: this.bgcolorcode
                },
                exporting: {
                    enabled: true
                },
                title: {
                    text: ''
                },
                // subtitle: {
                //   text: document.ontouchstart === undefined ?
                //     'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'
                // },
                credits: {
                    enabled: false
                },
                xAxis: {
                    minRange: 0,
                    gridLineWidth: 0,
                    title: {
                        text: 'Hours'
                    }
                },
                yAxis: {
                    min: 0,
                    gridLineWidth: 1,
                    title: {
                        text: 'Number Of Calls'
                    }
                },
                legend: {
                    enabled: false
                },
                // plotOptions: {
                //   area: {
                //     fillColor: {
                //       linearGradient: {
                //         x1: 0,
                //         y1: 0,
                //         x2: 0,
                //         y2: 1
                //       },
                //       stops: [
                //         [0, '#7cb5ec'],
                //         [1, 'rgba(124,181,236,0)']
                //       ]
                //     },              
                //     marker: {
                //       radius: 2
                //     },
                //     lineWidth: 1,
                //     states: {
                //       hover: {
                //         lineWidth: 1
                //       }
                //     },
                //     threshold: null
                //   }
                // },
                plotOptions: {
                    area: {
                        fillColor: {
                            linearGradient: {
                                x1: 0,
                                y1: 0,
                                x2: 0,
                                y2: 1
                            },
                            stops: [
                                [0, '#7cb5ec'],
                                [1, 'rgba(124,181,236,0)']
                            ]
                        },
                        marker: {
                            radius: 2
                        },
                        lineWidth: 1,
                        states: {
                            hover: {
                                lineWidth: 1
                            }
                        },
                        threshold: null
                    },
                    line: {
                        dataLabels: {
                            enabled: true
                        },
                        enableMouseTracking: false
                    }
                },
                series: [{
                        data: res,
                        type: 'area',
                        name: "Call Count"
                    }]
            });
        }, error => this.error = error);
    }
    // getchart(event:any){  
    //   const date = event.startDate._d;  
    //   // console.log();
    //   this.moduleservice.getChartbyDate(this.currentUser.uuid,date).subscribe(
    //     res => {
    //       this.NumberOfCalls = res;   
    //     },
    //     error => this.error = error
    //   );  
    // }
    loadcalls() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        var that = this;
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "paging": false,
            "info": false,
            // "lengthMenu": [[-1, 50, 100, 500, 2000, 5000], ["All", 50, 100, 500, 2000, 5000 ]],
            "pageLength": 20,
            // "ordering": false,
            "searching": false,
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + 'getlastweekcalls/' + this.currentCompany.uuid + '/' + this.currentUser.timezone + '/', { 'dataTablesParameters': dataTablesParameters, 'user_uuid': this.currentUser.uuid, 'role': this.currentUser.role }, {}).subscribe(resp => {
                    // console.log(resp); return false;
                    that.labels = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "did" }, { data: "incoming_number" }, { data: "publisher" }, { data: "target" }, { data: "campaign" }, { data: "routed_to" }, { data: "routed_to" }, { data: "routed_to" },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    getNumberOfCounts() {
        // console.log(this.currentUser.timezone);
        this.moduleservice.getNumberOfCount(this.currentCompany.uuid, this.currentUser.timezone).subscribe(res => {
            this.NumberOfCalls = res.NumberOfcalls;
            this.NumberOfIVR = res.NumberOfivr;
            this.NumberOfNumbers = res.NumberOfnos;
            this.NumberOfSMS = res.NumberOfsms;
            // console.log(this.NumberOfCounts);
        }, error => this.error = error);
    }
};
DashboardComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_10__["HttpBackend"] }
];
DashboardComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewChild"], args: ['dataTable', { static: true },] }]
};
DashboardComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-dashboard',
        template: _raw_loader_dashboard_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_dashboard_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], DashboardComponent);



/***/ }),

/***/ "MUa/":
/*!****************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/ivr-menus/add-ivrmenu/add-ivrmenu.component.html ***!
  \****************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n<div class=\"main-content\">\r\n       <div class=\"section\">\r\n         <div class=\"section-body\">\r\n           <div class=\"row\">\r\n             <div class=\"col-12 col-md-12 col-lg-12\">\r\n               <form method=\"post\" [formGroup]=\"addIVRMenuForm\" (ngSubmit)=\"onSubmit()\">\r\n               <div class=\"card\">\r\n                 <div class=\"card-header\">\r\n                   <h4>Create New IVR Menu</h4>\r\n                 </div>\r\n                 <div class=\"card-body\">                    \r\n                   <div class=\"form-group\">\r\n                     <label>Name</label>\r\n                     <div class=\"input-group\">\r\n                       <input formControlName=\"name\" id=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': submitted && f.name.errors }\"> \r\n                       <div *ngIf=\"submitted && f.name.errors\" class=\"invalid-feedback\">\r\n                           <div *ngIf=\"f.name.errors.required\">Name is required</div>          \r\n                       </div>                      \r\n                       </div>  \r\n                   </div>\r\n\r\n                   <div class=\"form-group\">\r\n                      <label>Number Of Retries</label>\r\n                      <div class=\"input-group\">\r\n                        <input formControlName=\"noofretries\" id=\"noofretries\" type=\"number\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': submitted && f.noofretries.errors }\" min=\"0\"> \r\n                        <div *ngIf=\"submitted && f.noofretries.errors\" class=\"invalid-feedback\">\r\n                            <div *ngIf=\"f.noofretries.errors.required\">Number Of Retries is required</div>                            \r\n                        </div>                      \r\n                        </div>  \r\n                    </div>                    \r\n\r\n                  <div class=\"form-group\">\r\n                    <label>Timeout</label>\r\n                    <div class=\"input-group\">\r\n                      <input formControlName=\"timeout\" id=\"timeout\" type=\"number\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': submitted && f.timeout.errors }\" min=\"0\"> \r\n                      <div *ngIf=\"submitted && f.timeout.errors\" class=\"invalid-feedback\">\r\n                          <div *ngIf=\"f.timeout.errors.required\">Timeout is required</div>    \r\n                      </div>                      \r\n                      </div>  \r\n                  </div>\r\n                  \r\n                  <div class=\"form-group\">\r\n                      <label>How many options in the IVR (1-9)</label>\r\n                      <select  formControlName=\"ivr_options\" class=\"form-control\" (change)=\"IVR_Options($event)\">\r\n                        <option value=\"0\">0</option>\r\n                        <option value=\"1\">1</option>\r\n                        <option value=\"2\">2</option>\r\n                        <option value=\"3\">3</option>\r\n                        <option value=\"4\">4</option>\r\n                        <option value=\"5\">5</option>\r\n                        <option value=\"6\">6</option>\r\n                        <option value=\"7\">7</option>\r\n                        <option value=\"8\">8</option>\r\n                        <option value=\"9\">9</option>\r\n                      </select>\r\n                  </div>\r\n                 \r\n                    <div class=\"form-group\" *ngIf=\"selectedIVR_Options!=''\">\r\n                      <label>Default response if no response by caller</label>\r\n                      <select formControlName=\"default_response\" class=\"form-control\" >\r\n                        <option disabled>Select default option for no response</option>\r\n                        <option *ngFor=\"let in of selectedIVR();let i = index\" [value]=\"in+1\">\r\n                           {{in+1}}\r\n                          </option>                  \r\n                      </select>\r\n                    </div>\r\n                 \r\n                    <div class=\"form-group\">\r\n                      <label>Buyer</label>\r\n                      <!-- <select formControlName=\"buyer\" class=\"form-control\" value=\"''\">\r\n                        <option value=\"\" selected>Select Buyer</option>\r\n                        <option *ngFor=\"let buyers of allBuyers;\" [value]=\"buyers.id\">\r\n                            {{buyers.text}}\r\n                          </option> -->\r\n                      <!-- </select> -->\r\n                      <angular2-multiselect [data]=\"allBuyers\" formControlName=\"buyer\" [settings]=\"settings\"></angular2-multiselect>       \r\n                    </div>\r\n\r\n                    <table style=\"font-size: 13px;\" class=\"table table-striped dataTable no-footer\">\r\n                      <thead>\r\n                          <tr>\r\n                              <th></th>\r\n                              <th>Link to File</th>\r\n                              <th>Select Audio</th>\r\n                              <th>Upload <br>Audio File</th>\r\n                              <th>Forward to Number or IVR Menu</th>\r\n                          </tr>\r\n                      </thead>\r\n                      <tbody>\r\n                          <tr style=\"background: #fff;\">\r\n                              <td>Opening Menu Recording</td>\r\n                              <td>\r\n                                  <audio *ngIf=\"url_0!==''\" style=\"width: 147px;\" controls>\r\n                                    <source src=\"{{url_0}}\" type=\"audio/mp3\">\r\n                                  </audio> \r\n                                   <!-- {{url_0}} -->\r\n                                  <!-- <mat-basic-audio-player *ngIf=\"url_0!==''\" [audioUrl]=\"url_0\"></mat-basic-audio-player> -->\r\n                                                               \r\n                              </td>\r\n                              <td>\r\n                                  <select class=\"form-control\" name='audio_uuid_0' formControlName=\"audio_uuid_0\" (change)=\"audiochange($event,0)\">\r\n                                    <option value=\"\" selected=\"\">No audio file</option>\r\n                                    <option *ngFor=\"let aud of audio;\" [value]=\"aud.uuid\">\r\n                                        {{aud.original_filename}}\r\n                                    </option>\r\n                                  </select>\r\n                              </td>\r\n                              <td>\r\n                                <div class=\"qq-upload-button-selector btn btn-primary pull-left\" style=\"position: relative; overflow: hidden; direction: ltr;font-size: 12px;width: 39px;\">\r\n                                  <div><i class=\"fa fa-upload\"></i></div>\r\n                                  <input (change)=\"selectFile($event,0)\" formControlName=\"upload_audio_0\" title=\"file input\"  type=\"file\" style=\"position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0; height: 100%;\">\r\n                                </div><br><br>                            \r\n                              </td>\r\n                              <td>\r\n                                  <div class=\"row\">\r\n                                      <div class=\"col-md-6\">\r\n                                        <select formControlName=\"forward_to_0\" class=\"form-control\" (change)=\"forward_to($event,0)\" [value]=\"'FORWARD_TO_NUMBER'\">\r\n                                          <option value=\"CONTINUE\">Continue</option>\r\n                                            <option value=\"FORWARD_TO_NUMBER\">Forward to Phone Number</option>\r\n                                          </select>\r\n                                      </div>\r\n                                      <div class=\"col-md-6\" *ngIf=\"forward_0 == 'FORWARD_TO_NUMBER'\">\r\n                                        <input formControlName=\"forwardto_phone_0\" placeholder=\"(000) 000-000\" class=\"form-control\" id=\"forwardto_phone_0\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                      </div>\r\n                                  </div>\r\n                              </td>\r\n                              </tr>\r\n                          \r\n                              <tr style=\"background: #fff;\">\r\n                              <td>#</td>\r\n                              <td>\r\n                                  <audio *ngIf=\"url_1!==''\" style=\"width: 147px;\" controls>\r\n                                    <source src=\"{{url_1}}\" type=\"audio/mp3\">\r\n                                  </audio>                                 \r\n                              </td>\r\n                              <td>\r\n                                  <select class=\"form-control\" name='audio_uuid_1' formControlName=\"audio_uuid_1\" (change)=\"audiochange($event,1)\">\r\n                                    <option value=\"\" selected=\"\">No audio file</option>\r\n                                    <option *ngFor=\"let aud of audio;\" [value]=\"aud.uuid\">\r\n                                        {{aud.original_filename}}\r\n                                    </option>\r\n                                  </select>\r\n                              </td>\r\n                              <td>\r\n                                <div class=\"qq-upload-button-selector btn btn-primary pull-left\" style=\"position: relative; overflow: hidden; direction: ltr;font-size: 12px;width: 39px;\">\r\n                                  <div><i class=\"fa fa-upload\"></i></div>\r\n                                  <input (change)=\"selectFile($event,1)\" formControlName=\"upload_audio_1\" title=\"file input\"  type=\"file\" style=\"position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0; height: 100%;\">\r\n                                </div><br><br>                            \r\n                              </td>\r\n                              <td>\r\n                                  <div class=\"row\">\r\n                                      <div class=\"col-md-6\">\r\n                                        <select formControlName=\"forward_to_1\" class=\"form-control\" (change)=\"forward_to($event,1)\" [value]=\"'FORWARD_TO_NUMBER'\">\r\n                                          <option value=\"CONTINUE\">Continue</option>\r\n                                            <option value=\"FORWARD_TO_NUMBER\">Forward to Phone Number</option>\r\n                                          </select>\r\n                                      </div>\r\n                                      <div class=\"col-md-6\" *ngIf=\"forward_1 == 'FORWARD_TO_NUMBER'\">\r\n                                        <input formControlName=\"forwardto_phone_1\" placeholder=\"(000) 000-000\" class=\"form-control\" id=\"forwardto_phone_1\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                      </div>\r\n                                  </div>\r\n                              </td>\r\n                              </tr>\r\n\r\n                              <tr *ngFor=\"let i of selectedIVR();\" style=\"background: #fff;\">\r\n                                      <td>Press {{i+1}} Recording</td>\r\n                                      <td>\r\n                                          <!-- <div *ngIf=\"url_1!=='' && i+1==1\">\r\n                                            <audio style=\"width: 147px;\" controls>\r\n                                              <source src=\"{{url_1}}\" type=\"audio/mp3\">\r\n                                            </audio>\r\n                                          </div> -->\r\n                                          <div *ngIf=\"url_2!=='' && i+2==2\">\r\n                                              <audio style=\"width: 147px;\" controls>\r\n                                                <source src=\"{{url_2}}\" type=\"audio/mp3\">\r\n                                              </audio>\r\n                                          </div>\r\n                                          <div *ngIf=\"url_3!=='' && i+2==3\">\r\n                                              <audio style=\"width: 147px;\" controls>\r\n                                                <source src=\"{{url_3}}\" type=\"audio/mp3\">\r\n                                              </audio>\r\n                                          </div>\r\n                                          <div *ngIf=\"url_4!=='' && i+2==4\">\r\n                                              <audio style=\"width: 147px;\" controls>\r\n                                                <source src=\"{{url_4}}\" type=\"audio/mp3\">\r\n                                              </audio>\r\n                                          </div>\r\n                                          <div *ngIf=\"url_5!=='' && i+2==5\">\r\n                                              <audio style=\"width: 147px;\" controls>\r\n                                                <source src=\"{{url_5}}\" type=\"audio/mp3\">\r\n                                              </audio>\r\n                                          </div>\r\n                                          <div *ngIf=\"url_6!=='' && i+2==6\">\r\n                                              <audio style=\"width: 147px;\" controls>\r\n                                                <source src=\"{{url_6}}\" type=\"audio/mp3\">\r\n                                              </audio>\r\n                                          </div>\r\n                                          <div *ngIf=\"url_7!=='' && i+2==7\">\r\n                                              <audio style=\"width: 147px;\" controls>\r\n                                                <source src=\"{{url_7}}\" type=\"audio/mp3\">\r\n                                              </audio>\r\n                                          </div>\r\n                                          <div *ngIf=\"url_8!=='' && i+2==8\">\r\n                                              <audio style=\"width: 147px;\" controls>\r\n                                                <source src=\"{{url_8}}\" type=\"audio/mp3\">\r\n                                              </audio>\r\n                                          </div>\r\n                                          <div *ngIf=\"url_9!=='' && i+2==9\">\r\n                                              <audio style=\"width: 147px;\" controls>\r\n                                                <source src=\"{{url_9}}\" type=\"audio/mp3\">\r\n                                              </audio>\r\n                                          </div>\r\n                                          <div *ngIf=\"url_10!=='' && i+2==10\">\r\n                                              <audio style=\"width: 147px;\" controls>\r\n                                                <source src=\"{{url_10}}\" type=\"audio/mp3\">\r\n                                              </audio>\r\n                                          </div>\r\n                                      </td>\r\n                                      <td>\r\n                                      <select class=\"form-control\" formControlName=\"audio_uuid_{{i+2}}\" (change)=\"audiochange($event,i+2)\">\r\n                                        <option value=\"\" selected=\"\">No audio file</option>\r\n                                        <option *ngFor=\"let aud of audio;\" [value]=\"aud.uuid\">\r\n                                            {{aud.original_filename}}\r\n                                        </option>\r\n                                      </select>\r\n                                    </td>\r\n                                    <td>\r\n                                    <div>\r\n                                        <div class=\"btn btn-primary pull-left\" style=\"position: relative; overflow: hidden; direction: ltr;font-size: 12px;width: 39px;\">\r\n                                        <div><i class=\"fa fa-upload\"></i></div>\r\n                                        <input (change)=\"selectFile($event,i+2)\" formControlName=\"upload_audio_{{i+2}}\" title=\"file input\" type=\"file\"  style=\"position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0; height: 100%;\">\r\n                                        </div>                     \r\n                                    </div>\r\n                                    </td>\r\n                                    <td>\r\n                                        <div class=\"row\">\r\n                                            <div class=\"col-md-6\">\r\n                                                <select formControlName=\"forward_to_{{i+2}}\" class=\"form-control\" (change)=\"forward_to($event,i+2)\" [value]=\"'FORWARD_TO_NUMBER'\">\r\n                                                  <option value=\"FORWARD_TO_IVR\">Forward to IVR</option>\r\n                                                  <option value=\"FORWARD_TO_ROUTING\">Forward to Targets</option>\r\n                                                  <option value=\"FORWARD_TO_IVRROUTING\">Forward to IVR Routing</option>\r\n                                                  <option value=\"FORWARD_TO_NUMBER\">Forward to Phone Number</option>\r\n                                                  <!-- <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                      {{name.name}}\r\n                                                  </option> -->\r\n                                                </select>\r\n                                            </div>                                     \r\n\r\n                                            <div class=\"col-md-6\" >\r\n                                                <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_NUMBER'\">\r\n                                                  <input id=\"forwardto_phone_2\" formControlName=\"forwardto_phone_2\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                                </div>\r\n                                                <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_NUMBER'\">\r\n                                                    <input formControlName=\"forwardto_phone_3\" id=\"forwardto_phone_3\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                                </div>\r\n                                                <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_NUMBER'\">\r\n                                                    <input id=\"forwardto_phone_4\" formControlName=\"forwardto_phone_4\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                                </div>\r\n                                                <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_NUMBER'\">\r\n                                                    <input id=\"forwardto_phone_5\" formControlName=\"forwardto_phone_5\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                                </div>\r\n                                                <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_NUMBER'\">\r\n                                                    <input id=\"forwardto_phone_6\" formControlName=\"forwardto_phone_6\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                                </div>\r\n                                                <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_NUMBER'\">\r\n                                                    <input id=\"forwardto_phone_7\" formControlName=\"forwardto_phone_7\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                                </div>\r\n                                                <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_NUMBER'\">\r\n                                                    <input id=\"forwardto_phone_8\" formControlName=\"forwardto_phone_8\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                                </div>\r\n                                                <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_NUMBER'\">\r\n                                                    <input id=\"forwardto_phone_9\" formControlName=\"forwardto_phone_9\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                                </div>\r\n                                                <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_NUMBER'\">\r\n                                                    <input id=\"forwardto_phone_10\" formControlName=\"forwardto_phone_10\" placeholder=\"(000) 000-000\" class=\"form-control\" (keypress)=_keyPress($event) maxlength=\"14\">\r\n                                                </div>  \r\n                                                \r\n<!--                                                 \r\n                                                <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_IVR'\">\r\n                                                  <select formControlName=\"forwardto_ivr_2\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_IVR'\">\r\n                                                  <select formControlName=\"forwardto_ivr_3\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_IVR'\">\r\n                                                  <select formControlName=\"forwardto_ivr_4\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_IVR'\">\r\n                                                  <select formControlName=\"forwardto_ivr_5\" class=\"form-control\" >\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_IVR'\">\r\n                                                  <select formControlName=\"forwardto_ivr_6\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_IVR'\">\r\n                                                  <select formControlName=\"forwardto_ivr_7\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_IVR'\">\r\n                                                  <select formControlName=\"forwardto_ivr_8\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_IVR'\">\r\n                                                  <select formControlName=\"forwardto_ivr_9\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_IVR'\">\r\n                                                  <select formControlName=\"forwardto_ivr_10\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>                                                  -->\r\n\r\n\r\n                                                <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_IVR'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivr_2\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_2\" formControlName=\"forwardto_ivr_2\" [settings]=\r\n                                                  \"{\r\n                                                    enableSearchFilter: true,\r\n                                                    showCheckbox:false,\r\n                                                    singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                    <a *ngIf=\"forwardto_ivr_2\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_2[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_IVR'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivr_3\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_3\" formControlName=\"forwardto_ivr_3\" [settings]=\r\n                                                  \"{\r\n                                                    enableSearchFilter: true,\r\n                                                    showCheckbox:false,\r\n                                                    singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                    <a *ngIf=\"forwardto_ivr_3\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_3[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_IVR'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivr_4\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_4\" formControlName=\"forwardto_ivr_4\" [settings]=\r\n                                                  \"{\r\n                                                    enableSearchFilter: true,\r\n                                                    showCheckbox:false,\r\n                                                    singleSelection: true, text:'Select IVR'}\"></angular2-multiselect>\r\n                                                    <a *ngIf=\"forwardto_ivr_4\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_4[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a> \r\n                                                </div>\r\n                                                <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_IVR'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivr_5\" class=\"form-control\" >\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_5\" formControlName=\"forwardto_ivr_5\" [settings]=\r\n                                                  \"{\r\n                                                    enableSearchFilter: true,\r\n                                                    showCheckbox:false,\r\n                                                    singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                    <a *ngIf=\"forwardto_ivr_5\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_5[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_IVR'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivr_6\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_6\" formControlName=\"forwardto_ivr_6\" [settings]=\r\n                                                  \"{\r\n                                                    enableSearchFilter: true,\r\n                                                    showCheckbox:false,\r\n                                                    singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                    <a *ngIf=\"forwardto_ivr_6\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_6[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_IVR'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivr_7\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_7\" formControlName=\"forwardto_ivr_7\" [settings]=\r\n                                                  \"{\r\n                                                    enableSearchFilter: true,\r\n                                                    showCheckbox:false,\r\n                                                    singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                    <a *ngIf=\"forwardto_ivr_7\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_7[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_IVR'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivr_8\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_8\" formControlName=\"forwardto_ivr_8\" [settings]=\r\n                                                  \"{\r\n                                                    enableSearchFilter: true,\r\n                                                    showCheckbox:false,\r\n                                                    singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                    <a *ngIf=\"forwardto_ivr_8\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_8[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_IVR'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivr_9\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_9\" formControlName=\"forwardto_ivr_9\" [settings]=\r\n                                                  \"{\r\n                                                    enableSearchFilter: true,\r\n                                                    showCheckbox:false,\r\n                                                    singleSelection: true, text:'Select IVR'}\"></angular2-multiselect> \r\n                                                    <a *ngIf=\"forwardto_ivr_9\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_9[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_IVR'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivr_10\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Menu</option>\r\n                                                    <option *ngFor=\"let name of menuname;\" [value]=\"name.id\">\r\n                                                        {{name.name}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"menuname\" [(ngModel)]=\"forwardto_ivr_10\" formControlName=\"forwardto_ivr_10\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR'}\">\r\n                                                  </angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_ivr_10\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivr_10[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                                </div>   \r\n\r\n  \r\n                                                <!-- <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <select formControlName=\"forwardto_routing_2\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <select formControlName=\"forwardto_routing_3\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <select formControlName=\"forwardto_routing_4\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <select formControlName=\"forwardto_routing_5\" class=\"form-control\" >\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <select formControlName=\"forwardto_routing_6\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <select formControlName=\"forwardto_routing_7\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <select formControlName=\"forwardto_routing_8\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <select formControlName=\"forwardto_routing_9\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <select formControlName=\"forwardto_routing_10\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>    -->\r\n\r\n                                                <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_routing_2\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_2\" formControlName=\"forwardto_routing_2\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                  </angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_routing_2\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_2[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_routing_3\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_3\" formControlName=\"forwardto_routing_3\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                  </angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_routing_3\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_3[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_routing_4\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_4\" formControlName=\"forwardto_routing_4\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                  </angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_routing_4\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_4[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_routing_5\" class=\"form-control\" >\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_5\" formControlName=\"forwardto_routing_5\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                  </angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_routing_5\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_5[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_routing_6\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_6\" formControlName=\"forwardto_routing_6\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                  </angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_routing_6\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_6[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_routing_7\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_7\" formControlName=\"forwardto_routing_7\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                  </angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_routing_7\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_7[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_routing_8\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_8\" formControlName=\"forwardto_routing_8\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                  </angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_routing_8\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_8[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_routing_9\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_9\" formControlName=\"forwardto_routing_9\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                  </angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_routing_9\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_9[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_ROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_routing_10\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Targets</option>\r\n                                                    <option *ngFor=\"let name of alltarget;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"alltarget\" [(ngModel)]=\"forwardto_routing_10\" formControlName=\"forwardto_routing_10\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select Target'}\">\r\n                                                  </angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_routing_10\" target=\"_blank\" routerLink=\"/edit-numbers/{{forwardto_routing_10[0].uuid}}\" style=\"color: #3abaf4;\">Go To Target Edit</a>\r\n                                                </div>   \r\n\r\n\r\n\r\n\r\n                                                <!-- <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <select formControlName=\"forwardto_ivrrouting_2\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <select formControlName=\"forwardto_ivrrouting_3\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <select formControlName=\"forwardto_ivrrouting_4\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <select formControlName=\"forwardto_ivrrouting_5\" class=\"form-control\" >\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <select formControlName=\"forwardto_ivrrouting_6\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <select formControlName=\"forwardto_ivrrouting_7\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <select formControlName=\"forwardto_ivrrouting_8\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <select formControlName=\"forwardto_ivrrouting_9\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <select formControlName=\"forwardto_ivrrouting_10\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>    -->\r\n\r\n\r\n                                                <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivrrouting_2\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_2\" formControlName=\"forwardto_ivrrouting_2\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                  </angular2-multiselect> \r\n                                                  <a *ngIf=\"forwardto_ivrrouting_2\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_2[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivrrouting_3\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_3\"  formControlName=\"forwardto_ivrrouting_3\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                  </angular2-multiselect>\r\n                                                  <a *ngIf=\"forwardto_ivrrouting_3\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_3[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivrrouting_4\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_4\" formControlName=\"forwardto_ivrrouting_4\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                  </angular2-multiselect>\r\n                                                  <a *ngIf=\"forwardto_ivrrouting_4\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_4[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivrrouting_5\" class=\"form-control\" >\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_5\" formControlName=\"forwardto_ivrrouting_5\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                  </angular2-multiselect>\r\n                                                  <a *ngIf=\"forwardto_ivrrouting_5\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_5[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivrrouting_6\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_6\" formControlName=\"forwardto_ivrrouting_6\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                  </angular2-multiselect>\r\n                                                  <a *ngIf=\"forwardto_ivrrouting_6\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_6[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivrrouting_7\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_7\" formControlName=\"forwardto_ivrrouting_7\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                  </angular2-multiselect>\r\n                                                  <a *ngIf=\"forwardto_ivrrouting_7\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_7[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivrrouting_8\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_8\" formControlName=\"forwardto_ivrrouting_8\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                  </angular2-multiselect>\r\n                                                  <a *ngIf=\"forwardto_ivrrouting_8\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_8[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivrrouting_9\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_9\" formControlName=\"forwardto_ivrrouting_9\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                  </angular2-multiselect>\r\n                                                  <a *ngIf=\"forwardto_ivrrouting_9\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_9[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_IVRROUTING'\">\r\n                                                  <!-- <select formControlName=\"forwardto_ivrrouting_10\" class=\"form-control\">\r\n                                                    <option value=\"\">Select IVR Routing</option>\r\n                                                    <option *ngFor=\"let name of allivrroutingplan;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select> -->\r\n                                                  <angular2-multiselect [data]=\"allivrroutingplan\" [(ngModel)]=\"forwardto_ivrrouting_10\" formControlName=\"forwardto_ivrrouting_10\" [settings]=\r\n                                                  \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR Routing'}\">\r\n                                                  </angular2-multiselect>\r\n                                                  <a *ngIf=\"forwardto_ivrrouting_10\" target=\"_blank\" routerLink=\"/ivrplan-edit/{{forwardto_ivrrouting_10[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Plan Edit</a>\r\n                                                </div>   \r\n\r\n                                                \r\n                                                <!-- {{forward_2}} -->\r\n                                                <!-- <div *ngIf=\"i==0 && forward_2 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                  <select formControlName=\"forwardto_campaign_2\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Campaign</option>\r\n                                                    <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==1 && forward_3 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                  <select formControlName=\"forwardto_campaign_3\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Campaign</option>\r\n                                                    <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==2 && forward_4 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                  <select formControlName=\"forwardto_campaign_4\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Campaign</option>\r\n                                                    <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==3 && forward_5 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                  <select formControlName=\"forwardto_campaign_5\" class=\"form-control\" >\r\n                                                    <option value=\"\">Select Campaign</option>\r\n                                                    <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==4 && forward_6 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                  <select formControlName=\"forwardto_campaign_6\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Campaign</option>\r\n                                                    <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==5 && forward_7 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                  <select formControlName=\"forwardto_campaign_7\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Campaign</option>\r\n                                                    <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==6 && forward_8 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                  <select formControlName=\"forwardto_campaign_8\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Campaign</option>\r\n                                                    <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==7 && forward_9 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                  <select formControlName=\"forwardto_campaign_9\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Campaign</option>\r\n                                                    <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>\r\n                                                <div *ngIf=\"i==8 && forward_10 == 'FORWARD_TO_CAMPAIGN'\">\r\n                                                  <select formControlName=\"forwardto_campaign_10\" class=\"form-control\">\r\n                                                    <option value=\"\">Select Campaign</option>\r\n                                                    <option *ngFor=\"let name of campaigns;\" [value]=\"name.id\">\r\n                                                        {{name.text}}\r\n                                                    </option>\r\n                                                  </select>\r\n                                                </div>    -->\r\n                                            </div>\r\n                                        </div>\r\n                                      </td>\r\n                                 </tr>\r\n                          </tbody>\r\n                      </table>\r\n                \r\n                 </div>\r\n                 <div class=\"card-footer text-right\">\r\n                       <button  class=\"btn btn-primary mr-1 btn-sm  p-2\" type=\"submit\">Create IVR Menu</button>\r\n                       <button style=\"margin-right: 4px;\" routerLink=\"/ivr-menu\" class=\"btn btn-primary btn-sm  p-2\">Back To IVR Menus</button>\r\n                       <button class=\"btn btn-secondary btn-sm p-2\" type=\"reset\">Reset</button>\r\n                     </div>\r\n               </div>\r\n             </form>\r\n\r\n   </div>\r\n");

/***/ }),

/***/ "Ng4N":
/*!**************************************************************************!*\
  !*** ./src/app/modules/mail-verification/mail-verification.component.ts ***!
  \**************************************************************************/
/*! exports provided: MailVerificationComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MailVerificationComponent", function() { return MailVerificationComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_mail_verification_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./mail-verification.component.html */ "IsOJ");
/* harmony import */ var _mail_verification_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mail-verification.component.scss */ "/5BY");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");








let MailVerificationComponent = class MailVerificationComponent {
    constructor(moduleservice, toastrService, route, router) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.route = route;
        this.router = router;
        // this.http = new HttpClient(handler);
    }
    ngOnInit() {
    }
    //verify Publisher
    onSubmit() {
        const formData = new FormData();
        this.uuid = this.route.snapshot.paramMap.get('uuid');
        this.moduleservice.verifyEmail(1, this.uuid).subscribe(res => {
            // console.log(res.status); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Publisher Accounts Verified Successfully! Please Login to continue..');
                setTimeout(() => { this.router.navigate(['/login']); }, 2000);
            }
            else {
                this.toastrService.error('Failed To Verify Accounts or Already Verified..');
            }
        }, error => this.error = error);
    }
};
MailVerificationComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_3__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_6__["ToastrService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_5__["ActivatedRoute"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_5__["Router"] }
];
MailVerificationComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-mail-verification',
        template: _raw_loader_mail_verification_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_mail_verification_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], MailVerificationComponent);



/***/ }),

/***/ "No3H":
/*!****************************************************************!*\
  !*** ./src/app/modules/rules/rulesedit/rulesedit.component.ts ***!
  \****************************************************************/
/*! exports provided: RuleseditComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RuleseditComponent", function() { return RuleseditComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_rulesedit_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./rulesedit.component.html */ "FaIV");
/* harmony import */ var _rulesedit_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rulesedit.component.scss */ "E58W");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");








let RuleseditComponent = class RuleseditComponent {
    constructor(fb, toastrService, route, moduleService, router) {
        this.fb = fb;
        this.toastrService = toastrService;
        this.route = route;
        this.moduleService = moduleService;
        this.router = router;
        this.controlEnabled = true;
        this.submitted = false;
    }
    ngOnInit() {
        this.editForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            itemRows: this.fb.array([]),
        });
        const uuid = this.route.snapshot.paramMap.get('id');
        // alert(uuid);
        if (uuid) {
            this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
            this.moduleService.getruledata(uuid, this.currentCompany.uuid).subscribe(res => {
                this.editForm.patchValue({
                    name: res.ruleset_data.name,
                });
                // console.log(res);
                const control = this.editForm.controls['itemRows'];
                for (let index = 0; index < res.rule_data.length; index++) {
                    control.push(this.initItemRow());
                    control.controls[index].get('ifval').setValue(res.rule_data[index].rule_condition_type);
                    control.controls[index].get('isval').setValue(res.rule_data[index].rule_condition_is_value);
                    control.controls[index].get('thenval').setValue(res.rule_data[index].then_condition_action);
                    control.controls[index].get('thentxt').setValue(res.rule_data[index].then_condition_value);
                }
            });
        }
    }
    get f() { return this.editForm.controls; }
    onSubmit() {
        // const formData = new FormData();      
        this.submitted = true;
        if (this.editForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        const uuid = this.route.snapshot.paramMap.get('id');
        // console.log(this.editForm.value);
        this.moduleService.editRuleSet(this.editForm.value, this.currentCompany.uuid, uuid).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Rule Set Updated Successfully');
                this.router.navigate(['/rules']);
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    initItemRow() {
        return this.fb.group({
            ifval: ['NUMBER', ''],
            isval: ['', ''],
            thenval: ['FORWARD_TO', ''],
            thentxt: ['', ''],
            andval: ['STOP', ''],
        });
    }
    addRow() {
        // console.log(this.editForm.controls['itemRows']);
        const control = this.editForm.controls['itemRows'];
        control.push(this.initItemRow());
    }
    deleteRow(index) {
        const control = this.editForm.controls['itemRows'];
        if (control != null) {
            this.totalrow = control.value.length;
        }
        if (this.totalrow > 1) {
            control.removeAt(index);
        }
        else {
            this.toastrService.error('One Record is Mendatory');
            // alert('One Record is Mendatory');
            return false;
        }
    }
    _keyPress(event) {
        const isNumericInput = (event) => {
            const key = event.keyCode;
            return ((key >= 48 && key <= 57) || // Allow number line
                (key >= 96 && key <= 105) // Allow number pad
            );
        };
        const isModifierKey = (event) => {
            const key = event.keyCode;
            return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
                (key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
                (key > 36 && key < 41) || // Allow left, up, right, down
                (
                // Allow Ctrl/Command + A,C,V,X,Z
                (event.ctrlKey === true || event.metaKey === true) &&
                    (key === 65 || key === 67 || key === 86 || key === 88 || key === 90));
        };
        const enforceFormat = (event) => {
            // Input must be of a valid number format or a modifier key, and not longer than ten digits
            if (!isNumericInput(event) && !isModifierKey(event)) {
                event.preventDefault();
            }
        };
        const formatToPhone = (event) => {
            if (isModifierKey(event)) {
                return;
            }
            const target = event.target;
            const input = event.target.value.replace(/\D/g, '').substring(0, 10); // First ten digits of input only
            const zip = input.substring(0, 3);
            const middle = input.substring(3, 6);
            const last = input.substring(6, 10);
            if (input.length > 6) {
                target.value = `(${zip}) ${middle}-${last}`;
            }
            else if (input.length > 3) {
                target.value = `(${zip}) ${middle}`;
            }
            else if (input.length > 0) {
                target.value = `(${zip}`;
            }
        };
        // const inputElement = document.getElementById('number');
        const inputElement = document.getElementsByClassName('number');
        if (inputElement) {
            for (let i = 0; i < inputElement.length; i++) {
                inputElement[i].addEventListener('keydown', enforceFormat);
                inputElement[i].addEventListener('keyup', formatToPhone);
            }
        }
    }
};
RuleseditComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormBuilder"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_5__["ToastrService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["ActivatedRoute"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_6__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] }
];
RuleseditComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-rulesedit',
        template: _raw_loader_rulesedit_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_rulesedit_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], RuleseditComponent);



/***/ }),

/***/ "Nw5h":
/*!***********************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/number/numberedit/numberedit.component.html ***!
  \***********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<!-- FSL Modal -->\r\n<div class=\"modal  fade\" id=\"addFSLRules\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog modal-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Add New Target</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      \r\n      <form [formGroup]=\"addFSLRules\" (ngSubmit)=\"onFSLSubmit()\">\r\n        <div class=\"form-group\">\r\n            <label>Name</label>\r\n            <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': FSLRulesSubmitted && rules.name.errors }\" (input)=\"validatename()\">\r\n            <div *ngIf=\"FSLRulesSubmitted && rules.name.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"rules.name.errors.required\">Name is required</div>\r\n            </div>\r\n            <div *ngIf=\"isName == 'success'  && isName != ''\" style=\"color:green;\">\r\n             Name Is Available\r\n           </div> \r\n            <div *ngIf=\"isName == 'fail' && isName != ''\" style=\"color:red;\">\r\n             Name Is Not Available\r\n           </div> \r\n          </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Number of Time Frames:</label>\r\n            <input formControlName=\"numberoftimeframe\"  oninput=\"javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);\"\r\n            type = \"number\" maxlength = \"1\" [(ngModel)]=\"noofforwarding\" type=\"number\" class=\"form-control phone-number\" [ngClass]=\"{ 'is-invalid': FSLRulesSubmitted && rules.numberoftimeframe.errors }\" min=\"1\" max=\"7\">                    \r\n            <div *ngIf=\"FSLRulesSubmitted && rules.numberoftimeframe.errors\" class=\"invalid-feedback\">\r\n              <div *ngIf=\"rules.numberoftimeframe.errors.required\">Number of Time Frames is required</div>\r\n          </div>      \r\n          </div>\r\n          \r\n          <br>\r\n          <!-- Day 1 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=1\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 1</label>\r\n                  <select formControlName=\"day_0\" name=\"day-0\" id=\"day-0\" class=\"form-control\" [value]=\"0\">\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                  </select>                     \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>                        \r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_0\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>                             \r\n              </div>                   -->\r\n\r\n               \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_0\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_0\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_0\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_0\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              \r\n              <div>\r\n\r\n               <div class=\"form-group\">\r\n                   <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                   <input formControlName=\"noofforwardinglocation_1\" [(ngModel)]=\"noofforwardinglocation_1\" type=\"text\" class=\"form-control phone-number\">\r\n               </div>               \r\n                   \r\n               <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation();let i = index'>\r\n                 <div class=\"form-group\">\r\n                     <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" class=\"with-gap number\" [value]='0' (click)=\"setPrimaryforward(0,i,0)\" [checked]=\"true\">\r\n\r\n                       <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                     </div>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" (click)=\"setPrimaryforward(1,i,0)\" class=\"with-gap\" [value]=\"1\">\r\n                       <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                     </div>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,0)\" [value]=\"2\">\r\n                       <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                     </div>\r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,0) && !isPrimarySelected(2,i,0)\">\r\n                         <label  class=\"d-block\">Number:</label>\r\n                         <input type=\"text\" formControlName=\"number_{{i}}_day0\" id=\"number_{{i}}_day0\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,0)\">\r\n                         <label  class=\"d-block\">IVR Menu:</label>\r\n                           <!-- <input type=\"text\" formControlName=\"ivrMenu_{{i}}_day0\" class=\"form-control phone-number\">   -->\r\n                            \r\n                           <select formControlName=\"ivrMenu_{{i}}_day0\" class=\"form-control\" [value] = \"\">\r\n                               <option value=\"\">Select IVR Menu</option>\r\n                               <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                   {{data.name}}\r\n                                 </option>\r\n                             </select>\r\n                     </div>\r\n                     <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,0)\">\r\n                           <label  class=\"d-block\">SIP (IP Address):</label>\r\n                           <input  formControlName=\"sipAdd_{{i}}_day0\" type=\"text\" class=\"form-control phone-number\">    \r\n                     </div>\r\n               </div> \r\n               </div>\r\n   \r\n           </div>  \r\n           </div>  \r\n        </div>\r\n           </div>\r\n\r\n          <!-- Day 2 -->\r\n           <div class=\"groupborder\" *ngIf=\"noofforwarding>=2\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 2</label>\r\n                  <select formControlName=\"day_1\" class=\"form-control\" [value]=\"0\" >\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_1\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_1\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>  -->\r\n             \r\n               \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_1\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_1\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_1\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_1\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n\r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_2\" [(ngModel)]=\"noofforwardinglocation_2\" type=\"text\" class=\"form-control phone-number\" >           \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_2();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,1)\" [checked]=\"true\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" (click)=\"setPrimaryforward(1,i,1)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,1)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,1) && !isPrimarySelected(2,i,1)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day1\" id=\"number_{{i}}_day1\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,1)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                       <select formControlName=\"ivrMenu_{{i}}_day1\" class=\"form-control\" [value] = \"\">\r\n                           <option value=\"\">Select IVR Menu</option>\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,1)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day1\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n           </div>  \r\n        </div>\r\n            </div>\r\n          \r\n          <!-- Day 3 -->  \r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=3\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 3</label>\r\n                  <select formControlName=\"day_2\" class=\"form-control\" [value]=\"0\" >\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                    \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_2\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_2\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>  -->\r\n\r\n               \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_2\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_2\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_2\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_2\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n                          \r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_3\" [(ngModel)]=\"noofforwardinglocation_3\" type=\"text\" class=\"form-control phone-number\">            \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_3();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,2)\" [checked]=\"true\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\" (click)=\"setPrimaryforward(1,i,2)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,2)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,2) && !isPrimarySelected(2,i,2)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day2\" id=\"number_{{i}}_day2\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,2)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                      <select formControlName=\"ivrMenu_{{i}}_day2\" class=\"form-control\" [value] = \"\">\r\n                           <option value=\"\">Select IVR Menu</option>\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select>  \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,2)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day2\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n            </div>  \r\n        </div>\r\n          </div>\r\n\r\n          <!-- Day 4 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=4\">\r\n              <div >\r\n                <div class=\"form-group\">\r\n                    <label>Select Timeframe - 4</label>\r\n                    <select formControlName=\"day_3\" class=\"form-control\" [value]=\"0\" >\r\n                      <option value=\"0\">Select Day</option>\r\n                      <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                      </select>\r\n                      \r\n                  </div>\r\n                <div class=\"row\">  \r\n                <div class=\"col-md-12\">\r\n                <!-- <div class=\"row\">\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>Start Time</label>\r\n                          <input formControlName=\"start_time_3\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                      </div>      \r\n                  </div>\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>End Time</label>\r\n                          <input formControlName=\"end_time_3\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                      </div>\r\n                  </div>\r\n                </div>   -->\r\n\r\n                 \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_3\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_3\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_3\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_3\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n                \r\n                <div class=\"form-group\">\r\n                 <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                 <input formControlName=\"noofforwardinglocation_4\" [(ngModel)]=\"noofforwardinglocation_4\" type=\"text\" class=\"form-control phone-number\">          \r\n             </div>               \r\n                 \r\n             <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_4();let i = index'>\r\n               <div class=\"form-group\">\r\n                   <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,3)\" [checked]=\"true\">\r\n\r\n                     <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" (click)=\"setPrimaryforward(1,i,3)\" class=\"with-gap\" [value]=\"1\">\r\n                     <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,3)\" [value]=\"2\">\r\n                     <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                   </div>\r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,3) && !isPrimarySelected(2,i,3)\">\r\n                       <label  class=\"d-block\">Number:</label>\r\n                       <input type=\"text\" formControlName=\"number_{{i}}_day3\" id=\"number_{{i}}_day3\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,3)\">\r\n                       <label  class=\"d-block\">IVR Menu:</label>\r\n                        <select formControlName=\"ivrMenu_{{i}}_day3\" class=\"form-control\" [value] = \"\">\r\n                             <option value=\"\">Select IVR Menu</option>\r\n                             <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                 {{data.name}}\r\n                               </option>\r\n                           </select>\r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,3)\">\r\n                         <label  class=\"d-block\">SIP (IP Address):</label>\r\n                         <input  formControlName=\"sipAdd_{{i}}_day3\" type=\"text\" class=\"form-control phone-number\">    \r\n                   </div>\r\n             </div> \r\n              </div>  \r\n              </div>  \r\n          </div>\r\n          </div>\r\n            \r\n          <!-- Day 5 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=5\">\r\n              <div >\r\n                <div class=\"form-group\">\r\n                    <label>Select Timeframe - 5</label>\r\n                    <select formControlName=\"day_4\" class=\"form-control\" [value]=\"0\" >\r\n                      <option value=\"0\">Select Day</option>\r\n                      <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                      </select>\r\n                      \r\n                  </div>\r\n                <div class=\"row\">  \r\n                <div class=\"col-md-12\">\r\n                <!-- <div class=\"row\">\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>Start Time</label>\r\n                          <input formControlName=\"start_time_4\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                      </div>      \r\n                  </div>\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>End Time</label>\r\n                          <input formControlName=\"end_time_4\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                      </div>\r\n                  </div>\r\n                </div>                  -->\r\n\r\n                 \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_4\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_4\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_4\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_4\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n                <div class=\"form-group\">\r\n                 <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                 <input formControlName=\"noofforwardinglocation_5\" [(ngModel)]=\"noofforwardinglocation_5\" type=\"text\" class=\"form-control phone-number\">          \r\n             </div>               \r\n                 \r\n             <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_5();let i = index'>\r\n               <div class=\"form-group\">\r\n                   <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,4)\" [checked]=\"true\">\r\n\r\n                     <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" (click)=\"setPrimaryforward(1,i,4)\" class=\"with-gap\" [value]=\"1\">\r\n                     <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,4)\" [value]=\"2\">\r\n                     <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                   </div>\r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,4) && !isPrimarySelected(2,i,4)\">\r\n                       <label  class=\"d-block\">Number:</label>\r\n                       <input type=\"text\" formControlName=\"number_{{i}}_day4\" id=\"number_{{i}}_day4\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,4)\">\r\n                       <label  class=\"d-block\">IVR Menu:</label>\r\n                        <select formControlName=\"ivrMenu_{{i}}_day4\" class=\"form-control\" [value] = \"\">\r\n                             <option value=\"\">Select IVR Menu</option>\r\n                             <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                 {{data.name}}\r\n                               </option>\r\n                           </select>  \r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,4)\">\r\n                         <label  class=\"d-block\">SIP (IP Address):</label>\r\n                         <input  formControlName=\"sipAdd_{{i}}_day4\" type=\"text\" class=\"form-control phone-number\">    \r\n                   </div>\r\n             </div> \r\n              </div>  \r\n              </div>  \r\n          </div>\r\n          </div>\r\n\r\n          <!-- Day 6 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=6\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 6</label>\r\n                  <select formControlName=\"day_5\" class=\"form-control\" [value]=\"0\" >\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                    \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_5\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_5\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>  -->\r\n\r\n               \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_5\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_5\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_5\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_5\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_6\" [(ngModel)]=\"noofforwardinglocation_6\" type=\"text\" class=\"form-control phone-number\">          \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_6();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,5)\" [checked]=\"true\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" (click)=\"setPrimaryforward(1,i,5)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,5)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,5) && !isPrimarySelected(2,i,5)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day5\" id=\"number_{{i}}_day5\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,5)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                      <select formControlName=\"ivrMenu_{{i}}_day5\" class=\"form-control\" [value] = \"\">\r\n                           <option value=\"\">Select IVR Menu</option>\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select>  \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,5)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day5\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n            </div>  \r\n        </div>\r\n        </div>\r\n\r\n        <!-- Day 7 -->\r\n        <div class=\"groupborder\" *ngIf=\"noofforwarding>=7\">\r\n          <div >\r\n            <div class=\"form-group\">\r\n                <label>Select Timeframe - 7</label>\r\n                <select formControlName=\"day_6\" class=\"form-control\" [value]=\"0\" >\r\n                  <option value=\"0\">Select Day</option>\r\n                  <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                  </select>\r\n                  \r\n              </div>\r\n            <div class=\"row\">  \r\n            <div class=\"col-md-12\">\r\n            <!-- <div class=\"row\">\r\n              <div class=\"col-md-6\">\r\n                  <div class=\"form-group\">\r\n                      <label>Start Time</label>\r\n                      <input formControlName=\"start_time_6\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                      <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                  </div>      \r\n              </div>\r\n              <div class=\"col-md-6\">\r\n                  <div class=\"form-group\">\r\n                      <label>End Time</label>\r\n                      <input formControlName=\"end_time_6\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                      <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                  </div>\r\n              </div>\r\n            </div>               -->\r\n\r\n             \r\n            <div class=\"row\">\r\n              <div class=\"col-md-3\">\r\n                  <label>Start Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"start_hrs_6\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                        <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_min_6\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n              </div>\r\n\r\n              <div class=\"col-md-4\">\r\n                <label>End Time (HH:MM)</label><br>\r\n                  <div  style=\"display:-webkit-inline-box\">\r\n                  <div class=\"form-group\">\r\n                      <input style=\"width:68px\" formControlName=\"end_hrs_6\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                  </div> \r\n                  <div class=\"pt-2\">\r\n                    :\r\n                  </div>\r\n                <div class=\"text-left\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_min_6\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                    </div>      \r\n                </div>\r\n              </div>\r\n              </div>\r\n            </div> \r\n            <div class=\"form-group\">\r\n             <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n             <input formControlName=\"noofforwardinglocation_7\" [(ngModel)]=\"noofforwardinglocation_7\" type=\"text\" class=\"form-control phone-number\">          \r\n         </div>               \r\n             \r\n         <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_7();let i = index'>\r\n           <div class=\"form-group\">\r\n               <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,6)\" [checked]=\"true\">\r\n\r\n                 <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n               </div>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" (click)=\"setPrimaryforward(1,i,6)\" class=\"with-gap\" [value]=\"1\">\r\n                 <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n               </div>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,6)\" [value]=\"2\">\r\n                 <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n               </div>\r\n             </div>\r\n             <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,6) && !isPrimarySelected(2,i,6)\">\r\n                   <label  class=\"d-block\">Number:</label>\r\n                   <input type=\"text\" formControlName=\"number_{{i}}_day6\" id=\"number_{{i}}_day6\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n             </div>\r\n             <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,6)\">\r\n                   <label  class=\"d-block\">IVR Menu:</label>\r\n                    <select formControlName=\"ivrMenu_{{i}}_day6\" class=\"form-control\" [value] = \"\">\r\n                         <option value=\"\">Select IVR Menu</option>\r\n                         <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                             {{data.name}}\r\n                           </option>\r\n                       </select>  \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,6)\">\r\n                     <label  class=\"d-block\">SIP (IP Address):</label>\r\n                     <input  formControlName=\"sipAdd_{{i}}_day6\" type=\"text\" class=\"form-control phone-number\">    \r\n               </div>\r\n         </div> \r\n          </div>  \r\n          </div>  \r\n      </div>\r\n      </div>\r\n          \r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n           <button [disabled]=\"isName == 'fail'\" type=\"submit\" (click)=\"closeModal()\" class=\"btn btn-primary m-t-15 waves-effect\">Create New Target</button>\r\n           <button (click)=\"onFSLReset()\" type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n        </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>  \r\n\r\n<div class=\"modal  fade\" id=\"editFSLRules\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\" aria-hidden=\"true\" *ngIf=\"forwarding?.length != 0\">\r\n<div class=\"modal-dialog modal-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Edit Target</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form class=\"\"  [formGroup]=\"editFSLRules\" (ngSubmit)=\"onFSLEditSubmit()\">\r\n        \r\n        <div class=\"form-group\">\r\n            <label>Name</label>\r\n            <input formControlName=\"rulename\" type=\"text\" class=\"form-control\" [value] =\"forwarding\" readonly>           \r\n        </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Number of Time Frames:</label>\r\n            <input formControlName=\"numberoftimeframe\"  oninput=\"javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);\"\r\n            type = \"number\" maxlength = \"1\" [(ngModel)]=\"noofforwarding\" type=\"number\" class=\"form-control phone-number\" [ngClass]=\"{ 'is-invalid': FSLRulesEditSubmitted && editrules.numberoftimeframe.errors }\" [value] =\"forwardingtimeframe\">                   \r\n            <div *ngIf=\"FSLRulesEditSubmitted && editrules.numberoftimeframe.errors\" class=\"invalid-feedback\">\r\n              <div *ngIf=\"editrules.numberoftimeframe.errors.required\">Number of Time Frames is required</div>\r\n          </div>      \r\n          </div>\r\n          \r\n          <br>\r\n          <!-- Day 1 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=1\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 1</label>\r\n                  <select formControlName=\"day_0\" name=\"day-0\" id=\"day-0\" class=\"form-control\" >\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                  </select>                     \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n             \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_0\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_0\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_0\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_0\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              \r\n              <div>\r\n\r\n               <div class=\"form-group\">\r\n                   <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                   <input formControlName=\"noofforwardinglocation_1\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_1\">\r\n               </div>               \r\n                   \r\n               <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation();let i = index'>\r\n                 <div class=\"form-group\">\r\n                     <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,0)\">\r\n                        <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                     </div>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" (click)=\"setPrimaryforward(1,i,0)\" class=\"with-gap\" [value]=\"1\">\r\n                       <label class=\"form-check-label\" for=\"\">IVR Menu</label>\r\n                     </div>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,0)\" [value]=\"2\">\r\n                       <label class=\"form-check-label\" for=\"\">SIP (IP Address)</label>\r\n                     </div>\r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,0) && !isPrimarySelected(2,i,0)\">\r\n                         <label  class=\"d-block\">Number:</label>\r\n                         <input type=\"text\" formControlName=\"number_{{i}}_day0\" id=\"editnumber_{{i}}_day0\" class=\"form-control phone-number numbers\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,0)\">\r\n                         <label  class=\"d-block\">IVR Menu:</label>\r\n                           <select formControlName=\"ivrMenu_{{i}}_day0\" class=\"form-control\" [value] = \"\">\r\n                               <option value=\"\">Select IVR Menu</option>\r\n                               <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                   {{data.name}}\r\n                                 </option>\r\n                          </select>\r\n                     </div>\r\n                     <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,0)\">\r\n                           <label  class=\"d-block\">SIP (IP Address):</label>\r\n                           <input  formControlName=\"sipAdd_{{i}}_day0\" type=\"text\" class=\"form-control phone-number\">    \r\n                     </div>\r\n               </div> \r\n               </div>\r\n   \r\n           </div>  \r\n           </div>  \r\n        </div>\r\n           </div>\r\n\r\n          <!-- Day 2 -->\r\n           <div class=\"groupborder\" *ngIf=\"noofforwarding>=2\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 2</label>\r\n                  <select formControlName=\"day_1\" class=\"form-control\">\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_1\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_1\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>  -->\r\n\r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_1\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_1\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_1\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_1\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              \r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_2\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_2\">           \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_2();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" id=\"PrimaryforwardType_{{i}}_day1\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,1)\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" (click)=\"setPrimaryforward(1,i,1)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,1)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,1) && !isPrimarySelected(2,i,1)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day1\" id=\"editnumber_{{i}}_day1\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,1)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                       <select formControlName=\"ivrMenu_{{i}}_day1\" class=\"form-control\" [value] = \"\">\r\n                           <option value=\"\">Select IVR Menu</option>\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,1)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day1\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n           </div>  \r\n        </div>\r\n            </div>\r\n          \r\n          <!-- Day 3 -->  \r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=3\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 3</label>\r\n                  <select formControlName=\"day_2\" class=\"form-control\" >\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                    \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_2\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_2\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>   -->\r\n\r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_2\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_2\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_2\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_2\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_3\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_3\">            \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_3();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,2)\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\"  (click)=\"setPrimaryforward(1,i,2)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,2)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,2) && !isPrimarySelected(2,i,2)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day2\" id=\"editnumber_{{i}}_day2\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,2)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                       <select formControlName=\"ivrMenu_{{i}}_day2\" class=\"form-control\" [value] = \"\">\r\n                           <option\r\n                            value=\"\">Select IVR Menu</option\r\n                            >\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select>  \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,2)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day2\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n            </div>  \r\n        </div>\r\n          </div>\r\n\r\n          <!-- Day 4 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=4\">\r\n              <div >\r\n                <div class=\"form-group\">\r\n                    <label>Select Timeframe - 4</label>\r\n                    <select formControlName=\"day_3\" class=\"form-control\">\r\n                      <option value=\"0\">Select Day</option>\r\n                      <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                      </select>\r\n                      \r\n                  </div>\r\n                <div class=\"row\">  \r\n                <div class=\"col-md-12\">\r\n                <!-- <div class=\"row\">\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>Start Time</label>\r\n                          <input formControlName=\"start_time_3\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                      </div>      \r\n                  </div>\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>End Time</label>\r\n                          <input formControlName=\"end_time_3\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                      </div>\r\n                  </div>\r\n                </div>   -->\r\n                <div class=\"row\">\r\n                  <div class=\"col-md-3\">\r\n                      <label>Start Time (HH:MM)</label><br>\r\n                        <div  style=\"display:-webkit-inline-box\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_hrs_3\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                            <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                            <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                        </div> \r\n                        <div class=\"pt-2\">\r\n                          :\r\n                        </div>\r\n                      <div class=\"text-left\">\r\n                          <div class=\"form-group\">\r\n                              <input style=\"width:68px\" formControlName=\"start_min_3\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                          </div>      \r\n                      </div>\r\n                    </div>\r\n                  </div>\r\n  \r\n                  <div class=\"col-md-4\">\r\n                    <label>End Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_hrs_3\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"end_min_3\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                  </div>\r\n                </div> \r\n                <div class=\"form-group\">\r\n                 <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                 <input formControlName=\"noofforwardinglocation_4\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_4\">      \r\n             </div>               \r\n                 \r\n             <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_4();let i = index'>\r\n               <div class=\"form-group\">\r\n                   <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,3)\">\r\n\r\n                     <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" (click)=\"setPrimaryforward(1,i,3)\" class=\"with-gap\" [value]=\"1\">\r\n                     <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,3)\" [value]=\"2\">\r\n                     <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                   </div>\r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,3) && !isPrimarySelected(2,i,3)\">\r\n                       <label  class=\"d-block\">Number:</label>\r\n                       <input type=\"text\" formControlName=\"number_{{i}}_day3\" id=\"editnumber_{{i}}_day3\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,3)\">\r\n                       <label  class=\"d-block\">IVR Menu:</label>\r\n                         <select formControlName=\"ivrMenu_{{i}}_day3\" class=\"form-control\" [value] = \"\">\r\n                             <option value=\"\">Select IVR Menu</option>\r\n                             <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                 {{data.name}}\r\n                               </option>\r\n                           </select>\r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,3)\">\r\n                         <label  class=\"d-block\">SIP (IP Address):</label>\r\n                         <input  formControlName=\"sipAdd_{{i}}_day3\" type=\"text\" class=\"form-control phone-number\">    \r\n                   </div>\r\n             </div> \r\n              </div>  \r\n              </div>  \r\n          </div>\r\n          </div>\r\n            \r\n          <!-- Day 5 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=5\">\r\n              <div >\r\n                <div class=\"form-group\">\r\n                    <label>Select Timeframe - 5</label>\r\n                    <select formControlName=\"day_4\" class=\"form-control\">\r\n                      <option value=\"0\">Select Day</option>\r\n                      <option value=\"1\">Monday to Friday</option>\r\n                      <option value=\"2\">Monday to Saturday</option>\r\n                      <option value=\"3\">Monday to Monday</option>\r\n                      <option value=\"4\">Friday to Monday</option>\r\n                      <option value=\"5\">Saturday to Monday</option>\r\n                      </select>\r\n                      \r\n                  </div>\r\n                <div class=\"row\">  \r\n                <div class=\"col-md-12\">\r\n                <!-- <div class=\"row\">\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>Start Time</label>\r\n                          <input formControlName=\"start_time_4\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                      </div>      \r\n                  </div>\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>End Time</label>\r\n                          <input formControlName=\"end_time_4\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                      </div>\r\n                  </div>\r\n                </div>  -->\r\n\r\n                <div class=\"row\">\r\n                  <div class=\"col-md-3\">\r\n                      <label>Start Time (HH:MM)</label><br>\r\n                        <div  style=\"display:-webkit-inline-box\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_hrs_4\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                            <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                            <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                        </div> \r\n                        <div class=\"pt-2\">\r\n                          :\r\n                        </div>\r\n                      <div class=\"text-left\">\r\n                          <div class=\"form-group\">\r\n                              <input style=\"width:68px\" formControlName=\"start_min_4\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                          </div>      \r\n                      </div>\r\n                    </div>\r\n                  </div>\r\n  \r\n                  <div class=\"col-md-4\">\r\n                    <label>End Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_hrs_4\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"end_min_4\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                  </div>\r\n                </div> \r\n                <div class=\"form-group\">\r\n                 <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                 <input formControlName=\"noofforwardinglocation_5\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_5\">      \r\n             </div>               \r\n                 \r\n             <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_5();let i = index'>\r\n               <div class=\"form-group\">\r\n                   <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,4)\">\r\n\r\n                     <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" (click)=\"setPrimaryforward(1,i,4)\" class=\"with-gap\" [value]=\"1\">\r\n                     <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,4)\" [value]=\"2\">\r\n                     <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                   </div>\r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,4) && !isPrimarySelected(2,i,4)\">\r\n                       <label  class=\"d-block\">Number:</label>\r\n                       <input type=\"text\" formControlName=\"number_{{i}}_day4\" id=\"editnumber_{{i}}_day4\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,4)\">\r\n                       <label  class=\"d-block\">IVR Menu:</label>\r\n                         <select formControlName=\"ivrMenu_{{i}}_day4\" class=\"form-control\" [value] = \"\">\r\n                             <option value=\"\">Select IVR Menu</option>\r\n                             <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                 {{data.name}}\r\n                               </option>\r\n                           </select>  \r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,4)\">\r\n                         <label  class=\"d-block\">SIP (IP Address):</label>\r\n                         <input  formControlName=\"sipAdd_{{i}}_day4\" type=\"text\" class=\"form-control phone-number\">    \r\n                   </div>\r\n             </div> \r\n              </div>  \r\n              </div>  \r\n          </div>\r\n          </div>\r\n\r\n          <!-- Day 6 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=6\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 6</label>\r\n                  <select formControlName=\"day_5\" class=\"form-control\">\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                    \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_5\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_5\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>  -->\r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_5\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_5\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_5\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_5\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_6\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_6\">      \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_6();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,5)\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" (click)=\"setPrimaryforward(1,i,5)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,5)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,5) && !isPrimarySelected(2,i,5)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day5\" id=\"editnumber_{{i}}_day5\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,5)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                       <select formControlName=\"ivrMenu_{{i}}_day5\" class=\"form-control\" [value] = \"\">\r\n                           <option value=\"\">Select IVR Menu</option>\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select>  \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,5)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day5\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n            </div>  \r\n        </div>\r\n        </div>\r\n\r\n        <!-- Day 7 -->\r\n        <div class=\"groupborder\" *ngIf=\"noofforwarding>=7\">\r\n          <div >\r\n            <div class=\"form-group\">\r\n                <label>Select Timeframe - 7</label>\r\n                <select formControlName=\"day_6\" class=\"form-control\">\r\n                  <option value=\"0\">Select Day</option>\r\n                  <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                  </select>\r\n                  \r\n              </div>\r\n            <div class=\"row\">  \r\n            <div class=\"col-md-12\">\r\n            <!-- <div class=\"row\">\r\n              <div class=\"col-md-6\">\r\n                  <div class=\"form-group\">\r\n                      <label>Start Time</label>\r\n                      <input formControlName=\"start_time_6\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                      <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                  </div>      \r\n              </div>\r\n              <div class=\"col-md-6\">\r\n                  <div class=\"form-group\">\r\n                      <label>End Time</label>\r\n                      <input formControlName=\"end_time_6\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                      <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                  </div>\r\n              </div>\r\n            </div>  -->\r\n\r\n            <div class=\"row\">\r\n              <div class=\"col-md-3\">\r\n                  <label>Start Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"start_hrs_6\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                        <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_min_6\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n              </div>\r\n\r\n              <div class=\"col-md-4\">\r\n                <label>End Time (HH:MM)</label><br>\r\n                  <div  style=\"display:-webkit-inline-box\">\r\n                  <div class=\"form-group\">\r\n                      <input style=\"width:68px\" formControlName=\"end_hrs_6\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                  </div> \r\n                  <div class=\"pt-2\">\r\n                    :\r\n                  </div>\r\n                <div class=\"text-left\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_min_6\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                    </div>      \r\n                </div>\r\n              </div>\r\n              </div>\r\n            </div> \r\n             \r\n            <div class=\"form-group\">\r\n             <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n             <input formControlName=\"noofforwardinglocation_7\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_7\">      \r\n         </div>               \r\n             \r\n         <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_7();let i = index'>\r\n           <div class=\"form-group\">\r\n               <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,6)\">\r\n\r\n                 <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n               </div>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" (click)=\"setPrimaryforward(1,i,6)\" class=\"with-gap\" [value]=\"1\">\r\n                 <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n               </div>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,6)\" [value]=\"2\">\r\n                 <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n               </div>\r\n             </div>\r\n             <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,6) && !isPrimarySelected(2,i,6)\">\r\n                   <label  class=\"d-block\">Number:</label>\r\n                   <input type=\"text\" formControlName=\"number_{{i}}_day6\" id=\"editnumber_{{i}}_day4\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n             </div>\r\n             <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,6)\">\r\n                   <label  class=\"d-block\">IVR Menu:</label>\r\n                     <select formControlName=\"ivrMenu_{{i}}_day6\" class=\"form-control\" [value] = \"\">\r\n                         <option value=\"\">Select IVR Menu</option>\r\n                         <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                             {{data.name}}\r\n                           </option>\r\n                       </select>  \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,6)\">\r\n                     <label  class=\"d-block\">SIP (IP Address):</label>\r\n                     <input  formControlName=\"sipAdd_{{i}}_day6\" type=\"text\" class=\"form-control phone-number\">    \r\n               </div>\r\n         </div> \r\n          </div>  \r\n          </div>  \r\n      </div>\r\n      </div>\r\n          \r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n           <button [disabled]=\"isName == 'fail'\" type=\"submit\" (click)=\"editcloseModal()\" class=\"btn btn-primary m-t-15 waves-effect\">Edit Target</button>\r\n           <button data-dismiss=\"modal\" class=\"btn btn-secondary m-t-15 waves-effect\">Close</button>\r\n         </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>  \r\n\r\n<!-- Add Label Modal -->\r\n<div class=\"modal fade\" id=\"addBuyer\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog model-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Create Buyer</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"addLabel\" [formGroup]=\"addBuyerForm\" (ngSubmit)=\"onBuyerSubmit()\">\r\n        <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n        <div class=\"form-group\">\r\n            <label>Company</label>\r\n            <input formControlName=\"company\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': BuyerSubmitted && buyercontrol.company.errors }\">\r\n            <div *ngIf=\"BuyerSubmitted && buyercontrol.company.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"buyercontrol.company.errors.required\">Company is required</div>\r\n            </div>              \r\n         </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Sub Id  :</label>\r\n            <input formControlName=\"sub_id\" type=\"text\" class=\"form-control\">           \r\n          </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Pause Targets :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_pause_target\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>           \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Set Target Concurrency :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_set_target_concurrency\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>            \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Allow Buyer To Dispute Call Conversions :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"allow_buyer_to_dispute_call_conversions\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>          \r\n          </div>\r\n         \r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Limit Revenue : </label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" formControlName=\"limit_revenue\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>         \r\n          </div>\r\n          \r\n         </div>       \r\n     </div>\r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n         <!-- !addLabelForm.valid || -->\r\n           <button (click)=\"closeBuyerModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Buyer</button>\r\n           <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n          </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>   \r\n\r\n<div class=\"main-content\">\r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-md-12 col-md-12 col-md-lg-12\">\r\n                <form [formGroup]=\"editForm\" (ngSubmit)=\"onSubmit()\">\r\n                <div class=\"card\">\r\n                  <div class=\"card-header\">\r\n                    <h4>Edit Target</h4>\r\n                  </div>\r\n                  <div class=\"card-body\">       \r\n                    <fieldset class=\"scheduler-border\">\r\n                    <legend class=\"scheduler-border\">Target Settings</legend>             \r\n                    <div class=\"form-group\">\r\n                        <label>Name</label>\r\n                        <input formControlName=\"name\" id=\"name\" type=\"text\" class=\"form-control\"  [ngClass]=\"{ 'is-invalid': submitted && f.name.errors }\" placeholder=\"\" (input)=\"validateTargetname()\">   \r\n                        <div *ngIf=\"submitted && f.name.errors\" class=\"invalid-feedback\" >\r\n                            <div *ngIf=\"f.name.errors.required\">Name is required</div>                            \r\n                        \r\n                        </div>  \r\n                        <div *ngIf=\"isTargetName == 'success'  && isTargetName != ''\" style=\"color:green;\">\r\n                          Name Is Available\r\n                        </div> \r\n                         <div *ngIf=\"isTargetName == 'fail' && isTargetName != ''\" style=\"color:red;\">\r\n                          Name Is Not Available\r\n                        </div>                       \r\n                    </div>\r\n\r\n                    <div class=\"form-group\">\r\n                      <label>Sub Id</label>\r\n                      <div class=\"input-group\">\r\n                        <input formControlName=\"subid\" id=\"subid\" type=\"text\" class=\"form-control\" placeholder=\"\">                           \r\n                        </div>  \r\n                    </div>\r\n\r\n                    <div class=\"row\">\r\n                      <div class=\"col-md-6\">\r\n                        <div class=\"form-group\">\r\n                          <label>Buyer</label>\r\n                          <!-- <select formControlName=\"buyer\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': submitted && f.fslrulesname.errors }\">\r\n                            <option value=\"\">Select Buyer</option>\r\n                            <option *ngFor=\"let buyers of allBuyers;\" [value]=\"buyers.uuid\">\r\n                                {{buyers.company}}\r\n                              </option>\r\n                          </select> -->\r\n                          \r\n\r\n                          <!-- <div *ngIf=\"submitted && f.buyer.errors\" class=\"invalid-feedback\">\r\n                            <div *ngIf=\"f.buyer.errors.required\">Buyer is required</div>                            \r\n                          </div>     -->\r\n                          <angular2-multiselect [data]=\"allBuyers\" [(ngModel)]=\"selectedItemsBuyer1\" formControlName=\"buyer\" [settings]=\"settings\"></angular2-multiselect>       \r\n                        </div>\r\n                      </div>\r\n                      <div class=\"col-md-2 mt-4 pt-1\">\r\n                        <button type=\"button\" data-toggle=\"modal\" data-target=\"#addBuyer\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-plus\"></i> Add New Buyer\r\n                        </button>\r\n                      </div>\r\n                    </div>\r\n\r\n                    <div class=\"row\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-2\">\r\n                           <div class=\"control-label\">{{ringtreetext}}</div>                           \r\n                           <label class=\"custom-switch mt-2 pl-0\">\r\n                             <input type=\"checkbox\" [checked]=\"ringtree==true\" (change)=\"ringtree_toggle($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                             <span class=\"custom-switch-indicator\"></span>                     \r\n                           </label>\r\n                         </div>\r\n                      </div>                   \r\n                    </div>\r\n\r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">{{ringtreetext}}</legend>\r\n                        \r\n                       <div *ngIf=\"ringtree==false\">\r\n                       \r\n                        <div class=\"row\">\r\n                          <div class=\"col-md-5\">\r\n                            <div class=\"form-group\">\r\n                              <div class=\"control-group\">\r\n                                  <label class=\"control-label input-label\" for=\"startTime\">Type:</label>\r\n                                  <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleTypeval==0}\" (click)=\"settingToggleType(0)\"> \r\n                                        <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                                        Number\r\n                                  </label>\r\n                                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleTypeval==1}\" (click)=\"settingToggleType(1)\">\r\n                                    <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                                    IVR Menu\r\n                                  </label>    \r\n                                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleTypeval==2}\" (click)=\"settingToggleType(2)\">\r\n                                    <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option2\" [value]=\"2\">\r\n                                    SIP\r\n                                  </label> \r\n                                \r\n                                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleTypeval==3}\" (click)=\"settingToggleType(3)\">\r\n                                    <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option2\" [value]=\"3\">\r\n                                    Voicemail\r\n                                  </label> \r\n                                                          \r\n                                    </div>                \r\n                             </div>        \r\n                            </div>\r\n                          </div>\r\n                        </div>\r\n    \r\n                        <div class=\"control-group mt-2\" *ngIf=\"settingToggleTypeval==0\">\r\n                            <label class=\"control-label input-label\" for=\"startTime\">Number :</label>\r\n                            <input type=\"text\" formControlName=\"number\" class=\"form-control\" type=\"text\" placeholder=\"Enter Number\" [ngClass]=\"{ 'is-invalid': submitted && f.number.errors }\" />   \r\n                            <div *ngIf=\"submitted && f.number.errors\" class=\"invalid-feedback\">\r\n                              <div *ngIf=\"f.number.errors.required\">Number is required</div>                            \r\n                            </div>                    \r\n                        </div>\r\n                       <div *ngIf=\"settingToggleTypeval==1\">\r\n                          <div class=\"control-group mt-2\">\r\n                              <label class=\"control-label input-label\" for=\"startTime\">Select IVR Menu:</label>\r\n                              <!-- <select formControlName=\"ivrMenu1\" class=\"form-control\" >\r\n                                <option value=\"\">Select IVR Menu</option>\r\n                                <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                    {{data.name}}\r\n                                  </option>\r\n                              </select>   -->\r\n                              <angular2-multiselect [data]=\"ivrmenus\" [(ngModel)]=\"forwardto_ivrrouting_10\" formControlName=\"ivrMenu\" [settings]=\r\n                              \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR '}\"></angular2-multiselect>\r\n                              <a *ngIf=\"forwardto_ivrrouting_10\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivrrouting_10[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>    \r\n                          </div>                      \r\n                      </div>\r\n                       <div *ngIf=\"settingToggleTypeval==2\">\r\n                          <div class=\"control-group mt-2\">\r\n                              <label class=\"control-label input-label\" for=\"startTime\">SIP (IP Address):</label>\r\n                              <input type=\"text\" formControlName=\"sip_address\" class=\"form-control\" type=\"text\" [ngClass]=\"{ 'is-invalid': submitted && f.sip_address.errors }\"/>  \r\n                              <div *ngIf=\"submitted && f.sip_address.errors\" class=\"invalid-feedback\">\r\n                                <div *ngIf=\"f.sip_address.errors.required\">SIP Address is required</div>                            \r\n                              </div>                       \r\n                          </div>                      \r\n                      </div>\r\n                      <div class=\"control-group mt-2\" *ngIf=\"settingToggleTypeval==3\">\r\n                        <label class=\"control-label input-label\" for=\"startTime\">Voicemail :</label>\r\n                        <input type=\"text\" formControlName=\"voice_mail\" class=\"form-control\" type=\"text\" placeholder=\"Enter Voicemail\" [ngClass]=\"{ 'is-invalid': submitted && f.voice_mail.errors }\" />   \r\n                        <div *ngIf=\"submitted && f.voice_mail.errors\" class=\"invalid-feedback\">\r\n                          <div *ngIf=\"f.voice_mail.errors.required\">Voicemail is required</div>                            \r\n                        </div>                    \r\n                    </div>\r\n                        \r\n                      \r\n                      </div>\r\n\r\n\r\n                      <div *ngIf=\"ringtree==true\">\r\n                        \r\n                        <div class=\"row\">\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"control-group mt-2\">\r\n                               <div class=\"control-label\">URL</div>                           \r\n                             </div>\r\n                          </div>\r\n                          <div class=\"col-md-5 mt-4\">\r\n                             <div class=\"form-group\">\r\n                               <input formControlName=\"url\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                             </div>                           \r\n                          </div>\r\n                        </div>\r\n                       \r\n                        <div class=\"row\">\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"control-group mt-4\">\r\n                               <div class=\"control-label\">HTTP Method</div>                           \r\n                             </div>\r\n                          </div>\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"form-group mt-2\">\r\n                              <select formControlName=\"http_method\" name=\"http_method\" id=\"http_method\" class=\"form-control\" (change)=\"methodtype($event)\">\r\n                                <option value=\"0\">GET</option>                               \r\n                                <option value=\"1\">POST</option>                               \r\n                                <option value=\"2\">PUT</option>                               \r\n                                <option value=\"3\">PATCH</option>                               \r\n                                <option value=\"4\">DELETE</option>                               \r\n                              </select>      \r\n                             </div>                           \r\n                          </div>\r\n                        </div>\r\n                      \r\n                        <div class=\"row\" *ngIf=\"methodtypeval != 0 && methodtypeval != 4\">\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"control-group mt-4\">\r\n                               <div class=\"control-label\">Content Type</div>                           \r\n                             </div>\r\n                          </div>\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"form-group mt-2\">\r\n                              <select formControlName=\"content_type\" name=\"content_type\" id=\"content_type\" class=\"form-control\">\r\n                                <option value=\"0\">application/json</option>                               \r\n                                <option value=\"1\">application/xml</option>                               \r\n                                <option value=\"2\">application/x-www-form-urlencoded</option>                               \r\n                                <option value=\"3\">plain/text</option>                               \r\n                              </select>      \r\n                             </div>                           \r\n                          </div>\r\n                        </div>\r\n                     \r\n                        <div class=\"row\" *ngIf=\"methodtypeval != 0 && methodtypeval != 4\">\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"control-group mt-4\">\r\n                               <div class=\"control-label\">Body</div>                           \r\n                             </div>\r\n                          </div>\r\n                          <div class=\"col-md-5\">\r\n                             <div class=\"form-group mt-2\">\r\n                              <textarea formControlName=\"body\" cols=\"30\" rows=\"10\" class=\"form-control\"></textarea>\r\n                             </div>                           \r\n                          </div>\r\n                        </div>\r\n\r\n\r\n                        <div class=\"row\">\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"control-group mt-2\">\r\n                               <div class=\"control-label\">HTTP Headers</div>                           \r\n                             </div>\r\n                          </div>\r\n                          <div class=\"col-md-2 mt-4\">\r\n                             <div class=\"form-group\">\r\n                               <input formControlName=\"http_headers_name\" type=\"text\" class=\"form-control formcontrol\" placeholder=\"Header Name\" id=\"\"> \r\n                             </div>                           \r\n                          </div>\r\n                          <div class=\"mt-2\">:</div>\r\n                          <div class=\"col-md-2 mt-4 text-left\">\r\n                             <div class=\"form-group\">\r\n                               <input formControlName=\"http_headers_value\" type=\"text\" class=\"form-control formcontrol\" placeholder=\" Value\"  id=\"\">\r\n                             </div>                           \r\n                          </div>\r\n                        </div>\r\n\r\n                        <!-- <div class=\"row\">\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"control-group mt-2\">\r\n                               <div class=\"control-label\">Keyword</div>                           \r\n                             </div>\r\n                          </div>\r\n                          <div class=\"col-md-5 mt-4\">\r\n                             <div class=\"form-group\">\r\n                               <input formControlName=\"keyword\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                             </div>                           \r\n                          </div>\r\n                        </div> -->\r\n\r\n                        <div *ngFor=\"let keywords of addkeyword; let i = index;\">  \r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-2\">\r\n                              <div class=\"control-group mt-2\">\r\n                                <div class=\"control-label\">Keyword {{i+1}}</div>                           \r\n                              </div>\r\n                            </div>\r\n                            <div class=\"col-md-5 mt-4\">\r\n                              <div class=\"form-group\">\r\n                                <input formControlName=\"keyword{{i}}\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                              </div>                           \r\n                            </div>\r\n                            <div class=\"col-md-1\" *ngIf=\"i+1 == addkeyword.length && addkeyword.length!=3\">\r\n                              <input type=\"button\" value=\"+\" class=\"btn btn-info btn-sm\" (click)=\"addRow(i+1)\">\r\n                            </div>\r\n                            <div class=\"col-md-1\" *ngIf=\"i+1 == addkeyword.length && addkeyword.length>=2\">\r\n                              <input type=\"button\" value=\"-\" class=\"btn btn-danger btn-sm\" (click)=\"removeRow(i)\">\r\n                            </div>\r\n                          </div>\r\n                        </div>\r\n                       \r\n\r\n                      </div>\r\n\r\n                  </fieldset>\r\n\r\n                   \r\n\r\n                  </fieldset>\r\n                    \r\n                  <fieldset class=\"scheduler-border\">\r\n                    <legend class=\"scheduler-border\">Hours</legend>\r\n                    <div class=\"row\">\r\n                      <div class=\"col-md-6\">\r\n                       <div class=\"control-group mt-2\">\r\n                        <label>Hours of Operation   </label>\r\n                         <select formControlName=\"hoursofoperation_start\" name=\"hoursofoperation_start\" id=\"hoursofoperation_start\" class=\"form-control\" [value]=\"''\">\r\n                           <option value=\"\">Select Start Day</option>\r\n                           <option value=\"Monday\">Monday</option>\r\n                           <option value=\"Tuesday\">Tuesday</option>\r\n                           <option value=\"Wednesday\">Wednesday</option>\r\n                           <option value=\"Thursday\">Thursday</option>\r\n                           <option value=\"Friday\">Friday</option>\r\n                           <option value=\"Saturday\">Saturday</option>\r\n                           <option value=\"Sunday\">Sunday</option>\r\n                         </select>                         \r\n                      </div>\r\n                      </div>\r\n                      <div class=\"col-md-5\">\r\n                       <div class=\"control-group mt-4 pt-2\">\r\n                         <select formControlName=\"hoursofoperation_end\" name=\"hoursofoperation_end\" id=\"hoursofoperation_end\" class=\"form-control\" [value]=\"''\">\r\n                           <option value=\"\">Select End Day</option>\r\n                           <option value=\"Monday\">Monday</option>\r\n                           <option value=\"Tuesday\">Tuesday</option>\r\n                           <option value=\"Wednesday\">Wednesday</option>\r\n                           <option value=\"Thursday\">Thursday</option>\r\n                           <option value=\"Friday\">Friday</option>\r\n                           <option value=\"Saturday\">Saturday</option>\r\n                           <option value=\"Sunday\">Sunday</option>\r\n                         </select>                           \r\n                      </div>\r\n                      </div>\r\n  \r\n                    </div>\r\n  \r\n                    <div class=\"row mt-2\">\r\n                      <div class=\"col-md-3\">\r\n                          <label>Opening Time (HH:MM)</label><br>\r\n                            <div  style=\"display:-webkit-inline-box\">\r\n                            <div class=\"form-group\">\r\n                                <input style=\"width:68px\" formControlName=\"start_hrs\" (change)=\"getTimeonehrs($event)\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                            </div> \r\n                            <div class=\"pt-2\">\r\n                              :\r\n                            </div>\r\n                          <div class=\"text-left\">\r\n                              <div class=\"form-group\">\r\n                                  <input style=\"width:68px\" formControlName=\"start_min\" (change)=\"getTimeonemin($event)\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                              </div>      \r\n                          </div>\r\n                        </div> <br>\r\n                        <span style=\"color: #8080ff;\">Note: Please use 24 hours format</span>\r\n                      </div>\r\n      \r\n                      <div class=\"col-md-3\">\r\n                        <label>Closing Time (HH:MM)</label><br>\r\n                          <div  style=\"display:-webkit-inline-box\">\r\n                          <div class=\"form-group\">\r\n                              <input style=\"width:68px\" formControlName=\"end_hrs\" (change)=\"getTimetwohrs($event)\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                          </div> \r\n                          <div class=\"pt-2\">\r\n                            :\r\n                          </div>\r\n                        <div class=\"text-left\">\r\n                            <div class=\"form-group\">\r\n                                <input style=\"width:68px\" formControlName=\"end_min\" (change)=\"getTimetwomin($event)\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                            </div>      \r\n                        </div>\r\n                      </div>\r\n                      </div>\r\n  \r\n                      <div class=\"col-md-5\"><br>\r\n                        <select formControlName=\"timezone\" class=\"form-control\" [value]=\"\">\r\n                          <option value=\"\">Select Timezone</option>                            \r\n                          <option value=\"{{item.id}}\" *ngFor=\"let item of alltimezone\">{{item.gmtzone}}</option>                            \r\n                        </select>   \r\n                      </div>\r\n  \r\n                      <div class=\"col-md-1\"><br><br>\r\n                        <input type=\"button\" (click)=\"addremoverow(0)\" value=\"+\" class=\"btn btn-info btn-sm\" *ngIf=\"isadded==0\">\r\n                      </div>\r\n                    </div> \r\n  \r\n                    <div *ngIf=\"isadded==1\">\r\n                      <hr style=\"border-bottom: 1px solid #979DA6;\">\r\n                    <div class=\"row\">\r\n                      <div class=\"col-md-6\">\r\n                       <div class=\"control-group mt-2\">\r\n                        <label>Hours of Operation   </label>\r\n                         <select formControlName=\"hoursofoperation_start_1\" name=\"hoursofoperation_start_1\" id=\"hoursofoperation_start_1\" class=\"form-control\" [value]=\"''\">\r\n                           <option value=\"\">Select Start Day</option>\r\n                           <option value=\"Monday\">Monday</option>\r\n                           <option value=\"Tuesday\">Tuesday</option>\r\n                           <option value=\"Wednesday\">Wednesday</option>\r\n                           <option value=\"Thursday\">Thursday</option>\r\n                           <option value=\"Friday\">Friday</option>\r\n                           <option value=\"Saturday\">Saturday</option>\r\n                           <option value=\"Sunday\">Sunday</option>\r\n                         </select>                         \r\n                      </div>\r\n                      </div>\r\n                      <div class=\"col-md-5\">\r\n                       <div class=\"control-group mt-4 pt-2\">\r\n                         <select formControlName=\"hoursofoperation_end_1\" name=\"hoursofoperation_end_1\" id=\"hoursofoperation_end_1\" class=\"form-control\" [value]=\"''\">\r\n                           <option value=\"\">Select End Day</option>\r\n                           <option value=\"Monday\">Monday</option>\r\n                           <option value=\"Tuesday\">Tuesday</option>\r\n                           <option value=\"Wednesday\">Wednesday</option>\r\n                           <option value=\"Thursday\">Thursday</option>\r\n                           <option value=\"Friday\">Friday</option>\r\n                           <option value=\"Saturday\">Saturday</option>\r\n                           <option value=\"Sunday\">Sunday</option>\r\n                         </select>                           \r\n                      </div>\r\n                      </div>\r\n  \r\n                    </div>\r\n  \r\n                    <div class=\"row mt-2\" >\r\n                      <div class=\"col-md-3\">\r\n                          <label>Opening Time (HH:MM)</label><br>\r\n                            <div  style=\"display:-webkit-inline-box\">\r\n                            <div class=\"form-group\">\r\n                                <input style=\"width:68px\" formControlName=\"start_hrs_1\" (change)=\"getTimetwohrs1($event)\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                            </div> \r\n                            <div class=\"pt-2\">\r\n                              :\r\n                            </div>\r\n                          <div class=\"text-left\">\r\n                              <div class=\"form-group\">\r\n                                  <input style=\"width:68px\" formControlName=\"start_min_1\" (change)=\"getTimetwomin1($event)\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                              </div>      \r\n                          </div>\r\n                        </div>\r\n                      </div>\r\n      \r\n                      <div class=\"col-md-3\">\r\n                        <label>Closing Time (HH:MM)</label><br>\r\n                          <div  style=\"display:-webkit-inline-box\">\r\n                          <div class=\"form-group\">\r\n                              <input style=\"width:68px\" formControlName=\"end_hrs_1\" (change)=\"getTimetwohrs2($event)\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                          </div> \r\n                          <div class=\"pt-2\">\r\n                            :\r\n                          </div>\r\n                        <div class=\"text-left\">\r\n                            <div class=\"form-group\">\r\n                                <input style=\"width:68px\" formControlName=\"end_min_1\" (change)=\"getTimetwomin2($event)\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                            </div>      \r\n                        </div>\r\n                      </div>\r\n                      </div>\r\n  \r\n                      <div class=\"col-md-5\"><br>\r\n                        <select formControlName=\"timezone1\" class=\"form-control\" [value]=\"\">\r\n                          <option value=\"\">Select Timezone</option>                            \r\n                          <option value=\"{{item.id}}\" *ngFor=\"let item of alltimezone\">{{item.gmtzone}}</option>                            \r\n                        </select>   \r\n                      </div>\r\n  \r\n                      <div class=\"col-md-1\"><br><br>\r\n                        <input type=\"button\" (click)=\"addremoverow(1)\" value=\"-\" class=\"btn btn-danger btn-sm\">\r\n                      </div>\r\n                    </div> \r\n                    </div>\r\n  \r\n                    </fieldset>\r\n\r\n\r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">DTMF Settings</legend>\r\n                      <div class=\"row\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\">DTMF Auto</div>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2\">\r\n                        <label class=\"custom-switch mt-2 pl-0\">\r\n                          <input type=\"checkbox\" [checked]=\"dtmf_auto==true\" (change)=\"dtmf_auto_toggle($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                          <span class=\"custom-switch-indicator\"></span>                     \r\n                        </label>    \r\n                       </div>\r\n                     </div>\r\n                  \r\n                     <div class=\"row mt-2\" *ngIf=\"dtmf_auto==true\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-3\">\r\n                            <div class=\"control-label\">DTMF Value</div>                         \r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                         <div class=\"form-group\">\r\n                          <!-- <span class=\"currency currency-with-toggle ng-scope\">$</span> -->\r\n                          <input formControlName=\"dtmf_value\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                        </div>          \r\n                       </div>\r\n                     </div>\r\n                 \r\n                     <div class=\"row mt-2\" *ngIf=\"dtmf_auto==true\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-3\">\r\n                            <div class=\"control-label\">DTMF Interval (Seconds)</div>                         \r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                         <div class=\"form-group\">\r\n                          <input formControlName=\"dtmf_interval\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                        </div>          \r\n                       </div>\r\n                     </div>  \r\n                     \r\n                     <div class=\"row mt-2\" *ngIf=\"dtmf_auto==true\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-3\">\r\n                           <div class=\"control-label\">DTMF Percentage</div>                         \r\n                         </div>\r\n                      </div>\r\n                      <div class=\"col-md-2\">\r\n                        <div class=\"form-group\">\r\n                         <select formControlName=\"dtmf_percent\" class=\"form-control\">\r\n                           <!-- <option value=\"1\">10%</option>\r\n                           <option value=\"3\">25%</option>\r\n                           <option value=\"5\">50%</option>\r\n                           <option value=\"10\">100%</option> -->\r\n                          <option value=\"1\">10%</option>\r\n                          <option value=\"2\">20%</option>\r\n                          <option value=\"3\">30%</option>\r\n                          <option value=\"4\">40%</option>\r\n                          <option value=\"5\">50%</option>\r\n                          <option value=\"6\">60%</option>\r\n                          <option value=\"7\">70%</option>\r\n                          <option value=\"8\">80%</option>\r\n                          <option value=\"9\">90%</option>\r\n                          <option value=\"10\">100%</option>\r\n                         </select>\r\n                       </div>          \r\n                      </div>\r\n                    </div>     \r\n                    \r\n                    <div class=\"row mt-2\" *ngIf=\"dtmf_auto==true\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-3\">\r\n                           <div class=\"control-label\">Identify zipcode</div>                         \r\n                         </div>\r\n                      </div>\r\n                      <div class=\"col-md-2\">\r\n                        <label class=\"custom-switch mt-2 pl-0\">\r\n                          <input type=\"checkbox\" [checked]=\"dtmf_zipcode_enable==true\" (change)=\"dtmf_zipcode_enable_toggle($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                          <span class=\"custom-switch-indicator\"></span>                     \r\n                        </label>    \r\n                       </div>\r\n                    </div>\r\n\r\n                    </fieldset>\r\n                    \r\n\r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">Cap Settings</legend>\r\n                      <div class=\"control-group mt-2\">\r\n                        <label>Cap On</label>\r\n                        <select formControlName=\"capon\" name=\"capon\" id=\"capon\" class=\"form-control\">\r\n                          <option value=\"0\">Conversion</option>\r\n                          <option value=\"1\">Connection</option>\r\n                          <option value=\"2\">Revenue</option>\r\n                        </select>                              \r\n                     </div>\r\n                     <div class=\"row\" *ngIf=\"this.editForm.get('capon').value!=2\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\">Global Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" [checked]=\"globalcap==true\" (change)=\"global_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"globalcap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"global_capvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"globalcap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                   \r\n                     <div class=\"row\" *ngIf=\"this.editForm.get('capon').value==2\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\">Global Revenue Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" [checked]=\"global_revenuecap==true\" (change)=\"global_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"global_revenuecap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"global_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"global_revenuecap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                  \r\n                     <div class=\"row\" *ngIf=\"this.editForm.get('capon').value==2\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\" >Monthly Revenue Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" [checked]=\"monthly_revenuecap==true\" (change)=\"monthly_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"monthly_revenuecap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"monthly_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"monthly_revenuecap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                 \r\n                     <div class=\"row\" *ngIf=\"this.editForm.get('capon').value!=2\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\" >Monthly Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" [checked]=\"monthlycap==true\" (change)=\"monthly_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"monthlycap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"monthly_capvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"monthlycap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                     \r\n                     <div class=\"row\" *ngIf=\"this.editForm.get('capon').value==2\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\" >Daily Revenue Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" [checked]=\"daily_revenuecap==true\" (change)=\"daily_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"daily_revenuecap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"daily_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"daily_revenuecap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                   \r\n                     <div class=\"row\" *ngIf=\"this.editForm.get('capon').value!=2\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\" >Daily Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" [checked]=\"dailycap==true\" (change)=\"daily_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"dailycap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"daily_capvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"dailycap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                   \r\n                     <div class=\"row\" *ngIf=\"this.editForm.get('capon').value==2\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\">Hourly Revenue Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" [checked]=\"hourly_revenuecap==true\"  (change)=\"hourly_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"hourly_revenuecap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"hourly_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"hourly_revenuecap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                     \r\n                     <div class=\"row\" *ngIf=\"this.editForm.get('capon').value!=2\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\">Hourly Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" [checked]=\"hourlycap==true\"  (change)=\"hourly_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"hourlycap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"hourly_capvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"hourlycap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                    \r\n                    </fieldset>\r\n\r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">Concurrency Settings</legend>\r\n\r\n                      <div class=\"row\">\r\n                        <div class=\"col-md-2\">\r\n                           <div class=\"control-group mt-2\">\r\n                             <div class=\"control-label\">Max Concurrency</div>\r\n                             <label class=\"custom-switch mt-2 pl-0\">\r\n                               <input type=\"checkbox\" [checked]=\"maxconcurrency==true\" (change)=\"get_maxcon($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                               <span class=\"custom-switch-indicator\"></span>                     \r\n                             </label>\r\n                           </div>\r\n                        </div>\r\n                        <div class=\"col-md-2 mt-4\">\r\n                           <div class=\"form-group\" *ngIf=\"maxconcurrency==true\">\r\n                             <input formControlName=\"maxconvalue\" type=\"text\" class=\"form-control formcontrolwithouticon\" id=\"\">\r\n                           </div>\r\n                           <div class=\"form-group mt-2\" *ngIf=\"maxconcurrency!=true\">\r\n                             <span>None</span>\r\n                           </div>\r\n                        </div>\r\n                      </div>\r\n                    \r\n                    </fieldset>\r\n\r\n                    \r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">Restrict Duplicate Calls Settings</legend>\r\n\r\n                      <div class=\"control-group mt-2\">\r\n                        <label>Restrict Duplicate</label>\r\n                        <select #restrictdup formControlName=\"restrictdup\" name=\"restrictdup\" id=\"restrictdup\" class=\"form-control\">\r\n                          <option value=\"0\">Buyer Settings (Do not Restrict)</option>\r\n                          <option value=\"1\">Do not Restrict</option>\r\n                          <option value=\"2\">By Campaign - Individual Target</option>\r\n                        </select>                              \r\n                     </div>\r\n                     <div *ngIf=\"restrictdup.value==2\">\r\n                     <div class=\"control-group mt-2\">\r\n                        <label>Restrict After</label>\r\n                        <select formControlName=\"restrictafter\" name=\"restrictafter\" id=\"restrictafter\" class=\"form-control\">\r\n                          <option value=\"0\">Converted</option>\r\n                          <option value=\"1\">Connected</option>                          \r\n                        </select>                              \r\n                     </div>\r\n                      <div class=\"control-group\">\r\n                          <label class=\"control-label input-label\" for=\"startTime\">Duration:</label>\r\n                          <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                          <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleDurationvalue==0}\" (click)=\"settingToggleDuration(0)\"> \r\n                                <input class=\"form-check-input\" name=\"settingToggleDuration\" formControlName=\"settingToggleDuration\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                                Always\r\n                          </label>\r\n                          <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleDurationvalue==1}\" (click)=\"settingToggleDuration(1)\">\r\n                            <input class=\"form-check-input\" name=\"settingToggleDuration\" formControlName=\"settingToggleDuration\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                            Time Limit\r\n                          </label>                              \r\n                            </div>                \r\n                     </div>                       \r\n                      <br>\r\n                      <div class=\"control-group row mt-2\" *ngIf=\"this.editForm.get('settingToggleDurationval').value==1\">\r\n                        <div class=\"col-md-1 mt-2\"><input  formControlName=\"days\" style=\"width: 80px;\" type=\"number\"  class=\"form-control formcontrol\" name=\"\" id=\"\"></div>\r\n                        <div class=\"col-md-1\"><span>Days</span></div>                           \r\n                      </div>\r\n                      </div>\r\n                    </fieldset>\r\n\r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">Tag Routing Filters</legend>\r\n                      <div class=\"row\" *ngIf=\"isfilter==0\">\r\n                        <div class=\"col-md-2 mt-2\">\r\n                          <input type=\"button\" (click)=\"isfilterselect()\" value=\"+ ADD FILTER\" class=\"btn btn-primary btn-sm\">\r\n                        </div>                       \r\n                      </div>\r\n                      <div class=\"row\" *ngIf=\"isfilter==1\">\r\n                        <div class=\"col-md-2 mt-2\">\r\n                          <label for=\"\">Select City/State</label>\r\n                          <select formControlName=\"citystatetype\" (change)=\"changetype($event)\" class=\"form-control\">\r\n                            <option value=\"0\">City</option>                            \r\n                            <option value=\"1\">States</option>                            \r\n                          </select>     \r\n                        </div> \r\n                        <div class=\"col-md-2 mt-2\">\r\n                          <label for=\"\">Select Is Contains?</label>\r\n                          <select formControlName=\"iscontains\" (change)=\"changetype($event)\" class=\"form-control\">\r\n                            <option value=\"0\">Contains</option>                            \r\n                            <option value=\"1\">Not Contains</option>                            \r\n                          </select>     \r\n                        </div> \r\n                        <div class=\"col-md-2 mt-2\" >\r\n                          <label for=\"\">Select State</label>\r\n                          <div *ngIf=\"this.editForm.get('citystatetype').value==1\">\r\n                            <angular2-multiselect  [data]=\"allcitystate\" formControlName=\"citystate\" [settings]=\"citystatedropdownSettings\" ></angular2-multiselect>\r\n                          </div>\r\n                          <div *ngIf=\"this.editForm.get('citystatetype').value==0\">\r\n                            <select formControlName=\"citystate\" (change)='getdata()' class=\"form-control\">\r\n                              <option value=\"\">Select State</option>                            \r\n                              <option value=\"{{item.id}}\" *ngFor=\"let item of allcitystate\">{{item.text}}</option>                            \r\n                            </select>                         \r\n                          </div>\r\n                        </div>   \r\n                          <div class=\"col-md-6 mt-2\" *ngIf=\"this.editForm.get('citystatetype').value==0\">\r\n                          <label for=\"\">Select City</label>\r\n                          <!-- <label for=\"\" *ngIf=\"this.editForm.get('citystate').value==1\">Select State</label> -->\r\n                          <!-- <select formControlName=\"citystate\" class=\"form-control\" [value]=\"0\">\r\n                            <option value=\"0\">City</option>                            \r\n                            <option value=\"1\">States</option>                            \r\n                          </select>      -->\r\n                          <angular2-multiselect [data]=\"allcity\" formControlName=\"cityval\" [settings]=\"citydropdownSettings\" ></angular2-multiselect>\r\n                          </div>\r\n                        <div class=\"col-md-2 mt-4 pt-3\">\r\n                          <input type=\"button\" (click)=\"isfilterclear()\" value=\"Clear\" class=\"btn btn-danger\">\r\n                        </div>                    \r\n                      </div>\r\n                    </fieldset>\r\n                                  \r\n                  </div>\r\n                  <div class=\"card-footer text-right\">\r\n                        <button class=\"btn btn-primary mr-1\" type=\"submit\">Save Target</button>\r\n                        <button style=\"margin-right: 4px;\" routerLink=\"/target\" class=\"btn btn-primary\">Back To Target</button>\r\n                      </div>\r\n                </div>\r\n              </form>\r\n\r\n    </div>");

/***/ }),

/***/ "O/SN":
/*!***********************************************************************!*\
  !*** ./src/app/modules/number/number-buyer/number-buyer.component.ts ***!
  \***********************************************************************/
/*! exports provided: NumberBuyerComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberBuyerComponent", function() { return NumberBuyerComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_number_buyer_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./number-buyer.component.html */ "M69P");
/* harmony import */ var _number_buyer_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number-buyer.component.scss */ "04+N");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../global */ "XrUY");












const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let NumberBuyerComponent = class NumberBuyerComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.checkboxes = [];
        this.Submitted = false;
        this.editSubmitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadNumbers();
        this.addForm = this.fb.group({
            company: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            sub_id: [''],
            allow_buyer_to_pause_target: [''],
            allow_buyer_to_set_target_concurrency: [''],
            allow_buyer_to_dispute_call_conversions: [''],
            limit_revenue: [''],
        });
        this.editForm = this.fb.group({
            uuid: [''],
            company: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            sub_id: [''],
            allow_buyer_to_pause_target: [''],
            allow_buyer_to_set_target_concurrency: [''],
            allow_buyer_to_dispute_call_conversions: [''],
            limit_revenue: [''],
        });
    }
    loadNumbers() {
        // console.log('ok');
        // return false;
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[0, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getbuyers/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                // {data:"checkall"},
                // {data:"hour"},{data:"day"},{data:"month"},{data:"total"},
                // ,{data:"status"}
                { data: "company" }, { data: "sub_id" }, { data: "allow_buyer_to_pause_target" }, { data: "allow_buyer_to_set_target_concurrency" }, { data: "allow_buyer_to_dispute_call_conversions" }, { data: "created_at" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    editdata(uuid, company, sub_id, allow_buyer_to_pause_target, allow_buyer_to_set_target_concurrency, allow_buyer_to_dispute_call_conversions, limit_revenue) {
        this.editForm.patchValue({
            uuid: uuid,
            company: company,
            sub_id: sub_id,
            allow_buyer_to_pause_target: allow_buyer_to_pause_target,
            allow_buyer_to_set_target_concurrency: allow_buyer_to_set_target_concurrency,
            allow_buyer_to_dispute_call_conversions: allow_buyer_to_dispute_call_conversions,
            limit_revenue: limit_revenue,
        });
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedNumbers(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                        }, 2000);
                        this.loadNumbers();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }
            });
        }
    }
    Delete(id) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteBuyer(+id, currentUser.uuid).subscribe(res => {
                    this.loadNumbers();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    //Add Buyer
    get buyercontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        // console.log(this.currentUser);return;
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('user_uuid', this.currentUser.uuid);
        formData.append('company', this.addForm.get('company').value);
        formData.append('sub_id', this.addForm.get('sub_id').value);
        formData.append('allow_buyer_to_pause_target', this.addForm.get('allow_buyer_to_pause_target').value);
        formData.append('allow_buyer_to_set_target_concurrency', this.addForm.get('allow_buyer_to_set_target_concurrency').value);
        formData.append('allow_buyer_to_dispute_call_conversions', this.addForm.get('allow_buyer_to_dispute_call_conversions').value);
        formData.append('limit_revenue', this.addForm.get('limit_revenue').value);
        // console.log(formData); return false;
        this.moduleservice.addBuyer(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Buyer Added Successfully');
                this.loadNumbers();
                this.Submitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (this.addForm.get('company').value) {
            $("#addLabels").modal("hide");
            $(".custom-switch-input").prop('checked', false);
            this.Submitted = false;
            setTimeout(() => { this.addForm.reset(); }, 2000);
        }
    }
    //Add Buyer
    get editbuyercontrol() { return this.editForm.controls; }
    onEditSubmit() {
        // alert('ok');return false;
        const formData = new FormData();
        this.editSubmitted = true;
        if (this.editForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('user_uuid', this.currentUser.uuid);
        formData.append('uuid', this.editForm.get('uuid').value);
        formData.append('company', this.editForm.get('company').value);
        formData.append('sub_id', this.editForm.get('sub_id').value);
        formData.append('allow_buyer_to_pause_target', this.editForm.get('allow_buyer_to_pause_target').value);
        formData.append('allow_buyer_to_set_target_concurrency', this.editForm.get('allow_buyer_to_set_target_concurrency').value);
        formData.append('allow_buyer_to_dispute_call_conversions', this.editForm.get('allow_buyer_to_dispute_call_conversions').value);
        formData.append('limit_revenue', this.editForm.get('limit_revenue').value);
        // console.log(formData); 
        this.moduleservice.editBuyer(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Buyer Updated Successfully');
                this.loadNumbers();
                this.editSubmitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeEditModal() {
        if (this.editForm.get('company').value) {
            $("#editLabels").modal("hide");
            this.editSubmitted = false;
            setTimeout(() => { this.editForm.reset(); }, 2000);
        }
    }
};
NumberBuyerComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
NumberBuyerComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewChild"], args: ['dataTable', { static: true },] }]
};
NumberBuyerComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-number-buyer',
        template: _raw_loader_number_buyer_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_number_buyer_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], NumberBuyerComponent);



/***/ }),

/***/ "O1x4":
/*!*******************************************************************!*\
  !*** ./src/app/modules/number/numberadd/numberadd.component.scss ***!
  \*******************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("tbody tr th, td {\n  border-bottom: 1px solid #c7c7c7;\n}\n\nfieldset.scheduler-border {\n  border: 1px groove #ddd !important;\n  padding: 0 1.4em 1.4em 1.4em !important;\n  margin: 0 0 1.5em 0 !important;\n  box-shadow: 0px 0px 0px 0px #000;\n}\n\nlegend.scheduler-border {\n  font-size: 1.2em !important;\n  font-weight: bold !important;\n  text-align: left !important;\n  width: auto;\n  padding: 0 10px;\n  border-bottom: none;\n}\n\nth, td {\n  padding: 0px 10px 0px 10px !important;\n  height: 46px !important;\n  background: #2ea2d6;\n  vertical-align: middle;\n  color: white;\n  border-radius: 1px;\n  width: 310px;\n}\n\ninput#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n\n.formcontrol {\n  border: none;\n  border-bottom: 1px solid #ced4da;\n  border-radius: 0;\n  margin-top: -25px;\n}\n\n.formcontrolwithouticon {\n  border: none;\n  border-bottom: 1px solid #ced4da;\n  border-radius: 0;\n}\n\n.control-label {\n  font-size: 11px;\n}\n\ninput.form-control, select {\n  font-size: 11px !important;\n}\n\n@media (min-width: 320px) {\n  .form-check-label {\n    font-size: 11px;\n    margin-top: 7px;\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcbnVtYmVyYWRkLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNBO0VBQ0ksZ0NBQUE7QUFiSjs7QUFlQTtFQUNJLGtDQUFBO0VBQ0EsdUNBQUE7RUFDQSw4QkFBQTtFQUVBLGdDQUFBO0FBWko7O0FBZUE7RUFDSSwyQkFBQTtFQUNBLDRCQUFBO0VBQ0EsMkJBQUE7RUFDQSxXQUFBO0VBQ0EsZUFBQTtFQUNBLG1CQUFBO0FBWko7O0FBY0E7RUFDSSxxQ0FBQTtFQUNBLHVCQUFBO0VBQ0EsbUJBQUE7RUFDQSxzQkFBQTtFQUNBLFlBQUE7RUFDQSxrQkFBQTtFQUNBLFlBQUE7QUFYSjs7QUFhQTtFQUNJLGFBQUE7QUFWSjs7QUFZQTtFQUNJLFlBQUE7QUFUSjs7QUFXQTtFQUNJLFlBQUE7RUFDQSxnQ0FBQTtFQUNBLGdCQUFBO0VBQ0EsaUJBQUE7QUFSSjs7QUFVQTtFQUNJLFlBQUE7RUFDQSxnQ0FBQTtFQUNBLGdCQUFBO0FBUEo7O0FBU0E7RUFDSSxlQUFBO0FBTko7O0FBUUE7RUFDSSwwQkFBQTtBQUxKOztBQVFBO0VBQ0c7SUFDSyxlQUFBO0lBQ0EsZUFBQTtFQUxOO0FBQ0YiLCJmaWxlIjoibnVtYmVyYWRkLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gLmZvcnRibCB0ZHtcclxuLy8gICAgIHdpZHRoOiAyOCUhaW1wb3J0YW50O1xyXG4vLyAgICAgLy8gcGFkZGluZy1sZWZ0OiA4NXB4IWltcG9ydGFudDtcclxuLy8gICAgIC8vIHBhZGRpbmctcmlnaHQ6IDg1cHghaW1wb3J0YW50O1xyXG4vLyB9XHJcbi8vIC5mb3J0Ymx7XHJcbi8vIHdpZHRoOiAxMzIlIWltcG9ydGFudDtcclxuLy8gfVxyXG4vLyAuZm9ydGJsIHRoe1xyXG4vLyAgICAgd2lkdGg6IDI4JSFpbXBvcnRhbnQ7XHJcbi8vICAgICBmb250LXNpemU6IDEzcHg7XHJcbi8vICAgICAvLyBwYWRkaW5nLWxlZnQ6IDg1cHghaW1wb3J0YW50O1xyXG4vLyAgICAgLy8gcGFkZGluZy1yaWdodDogODVweCFpbXBvcnRhbnQ7XHJcbi8vIH1cclxudGJvZHkgdHIgdGgsIHRkIHtcclxuICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAjYzdjN2M3XHJcbn1cclxuZmllbGRzZXQuc2NoZWR1bGVyLWJvcmRlciB7XHJcbiAgICBib3JkZXI6IDFweCBncm9vdmUgI2RkZCAhaW1wb3J0YW50O1xyXG4gICAgcGFkZGluZzogMCAxLjRlbSAxLjRlbSAxLjRlbSAhaW1wb3J0YW50O1xyXG4gICAgbWFyZ2luOiAwIDAgMS41ZW0gMCAhaW1wb3J0YW50O1xyXG4gICAgLXdlYmtpdC1ib3gtc2hhZG93OiAgMHB4IDBweCAwcHggMHB4ICMwMDA7XHJcbiAgICBib3gtc2hhZG93OiAgMHB4IDBweCAwcHggMHB4ICMwMDA7XHJcbn1cclxuXHJcbmxlZ2VuZC5zY2hlZHVsZXItYm9yZGVyIHtcclxuICAgIGZvbnQtc2l6ZTogMS4yZW0gIWltcG9ydGFudDtcclxuICAgIGZvbnQtd2VpZ2h0OiBib2xkICFpbXBvcnRhbnQ7XHJcbiAgICB0ZXh0LWFsaWduOiBsZWZ0ICFpbXBvcnRhbnQ7XHJcbiAgICB3aWR0aDphdXRvO1xyXG4gICAgcGFkZGluZzowIDEwcHg7XHJcbiAgICBib3JkZXItYm90dG9tOm5vbmU7XHJcbn1cclxudGgsdGR7XHJcbiAgICBwYWRkaW5nOiAwcHggMTBweCAwcHggMTBweCFpbXBvcnRhbnQ7XHJcbiAgICBoZWlnaHQ6IDQ2cHghaW1wb3J0YW50O1xyXG4gICAgYmFja2dyb3VuZDogIzJlYTJkNjtcclxuICAgIHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7XHJcbiAgICBjb2xvcjogd2hpdGU7XHJcbiAgICBib3JkZXItcmFkaXVzOiAxcHg7XHJcbiAgICB3aWR0aDogMzEwcHg7XHJcbn1cclxuaW5wdXQjb3B0aW9uMSwgaW5wdXQjb3B0aW9uMiwgaW5wdXQjb3B0aW9uM3tcclxuICAgIGRpc3BsYXk6IG5vbmU7XHJcbn0gICAgXHJcbi5idG4tZ3JvdXAuZm9ybS1jb250cm9sIHtcclxuICAgIGhlaWdodDogNjBweDtcclxufVxyXG4uZm9ybWNvbnRyb2wge1xyXG4gICAgYm9yZGVyOiBub25lO1xyXG4gICAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICNjZWQ0ZGE7XHJcbiAgICBib3JkZXItcmFkaXVzOiAwO1xyXG4gICAgbWFyZ2luLXRvcDogLTI1cHg7XHJcbn1cclxuLmZvcm1jb250cm9sd2l0aG91dGljb24ge1xyXG4gICAgYm9yZGVyOiBub25lO1xyXG4gICAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICNjZWQ0ZGE7XHJcbiAgICBib3JkZXItcmFkaXVzOiAwOyAgICBcclxufVxyXG4uY29udHJvbC1sYWJlbCB7XHJcbiAgICBmb250LXNpemU6IDExcHg7XHJcbn1cclxuaW5wdXQuZm9ybS1jb250cm9sLHNlbGVjdCB7XHJcbiAgICBmb250LXNpemU6IDExcHghaW1wb3J0YW50O1xyXG59XHJcblxyXG5AbWVkaWEgKG1pbi13aWR0aDozMjBweCkgIHtcclxuICAgLmZvcm0tY2hlY2stbGFiZWwge1xyXG4gICAgICAgIGZvbnQtc2l6ZTogMTFweDtcclxuICAgICAgICBtYXJnaW4tdG9wOiA3cHg7XHJcbiAgICB9XHJcbn0iXX0= */");

/***/ }),

/***/ "OGpY":
/*!**************************************************!*\
  !*** ./src/app/modules/label/label.component.ts ***!
  \**************************************************/
/*! exports provided: LabelComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LabelComponent", function() { return LabelComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_label_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./label.component.html */ "db1Z");
/* harmony import */ var _label_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./label.component.scss */ "ryeG");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-csv/ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__);












class DataTablesResponse {
}
class Labels {
}
let LabelComponent = class LabelComponent {
    // payout_typeval:any;
    // flag: any;
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        //  rows = [
        //     { name: 'Austin', gender: 'Male', company: 'Swimlane' },
        //     { name: 'Dany', gender: 'Male', company: 'KFC' },
        //     { name: 'Molly', gender: 'Female', company: 'Burger King' }
        //   ];
        //   columns = [{ prop: 'name' }, { name: 'Gender' }, { name: 'Company' }]; 
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.LabelSubmitted = false;
        this.ischecked = '1';
        this.data = {};
        this.checkboxes = [];
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        // this.payout_typeval= 0;
        // this.flag = 0;
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadlabels();
        this.addLabelForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            notes: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            user_uuid: [''],
        });
        this.editLabelForm = this.fb.group({
            uuid: ['', ''],
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            notes: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            user_uuid: [''],
        });
    }
    // payout_typevalue:any = 0;
    // payout_typeval(val:number) {
    //   this.payout_typevalue = val;
    // }
    // payout_typevalueedit:any = 0;
    // payout_typevaledit(val:number) {
    //   this.payout_typevalueedit = val;
    //   this.editLabelForm.get('payout_typeedit').setValue(val); 
    // }
    loadlabels() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var that = this;
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 500,
            "order": [[0, "asc"]],
            "lengthMenu": [10, 25, 50, 100, 500, 1000],
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + 'getlabels/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    // console.log(resp);
                    that.labels = resp.data;
                    //   setTimeout( function () {
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                    // }, 50 );
                    var out = [];
                    // for ( var i=0, ien=resp.data.length; i<ien ; i++ ) {
                    //     out.push( [ i+'-1', i+'-2', i+'-3', i+'-4', i+'-5' ] );
                    // }
                    // for (let i = 0; i < resp.data.length; i++) {
                    //   const name = resp.data[i].name;
                    //   const notes = resp.data[i].notes;
                    //   const noofnos = resp.data[i].noofnos;
                    //   const created_at = resp.data[i].created_at;
                    //   out.push([
                    //     '',
                    //     name,
                    //     notes,
                    //     noofnos,
                    //     created_at,
                    //     ''
                    //   ]);
                    // }
                    // console.log(JSON.stringify(out)); 
                    // console.log(resp.data); return false;
                    // for ( var i=0, ien=0+resp.data.length ; i<ien ; i++ ) {
                    //     out.push([ "name",i+'-1', i+'-2', i+'-3', i+'-4', i+'-5', i+'-6' ]);
                    // }
                    // console.log(resp.data);
                    // console.log(out);
                    // setTimeout( function () {
                    //   callback( {
                    //     draw: resp.draw,
                    //     data: resp.data,
                    //     recordsTotal: resp.recordsTotal,
                    //     recordsFiltered: resp.recordsFiltered,
                    // } );
                    // callback({
                    //         recordsTotal: resp.recordsTotal,
                    //         recordsFiltered: resp.recordsFiltered,
                    //         data: out,
                    //         draw: resp.draw,
                    //     });
                    // }, 50 );
                });
            },
            // "deferRender":    true,
            "scrollY": 800,
            // "scrollCollapse": true,
            // ordering: false,
            // searching: false,
            // "scroller": {
            //     loadingIndicator: true
            // },
            columns: [
                { data: "" }, { data: "name" }, { data: "notes" }, { data: "noofnos" }, { data: "created_at" }, { data: "" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    Delete(uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteLabel(uuid, currentUser.uuid).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                    this.loadlabels();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                }, 2000);
            }
        });
    }
    // recording:string;
    // get_recordingstatus(event:any){
    //   this.recording = event.target.checked;
    // }
    //Add Labels
    get labelcontrol() { return this.addLabelForm.controls; }
    onLabelSubmit() {
        const formData = new FormData();
        this.LabelSubmitted = true;
        if (this.addLabelForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('name', this.addLabelForm.get('name').value);
        formData.append('notes', this.addLabelForm.get('notes').value);
        // formData.append('conversation_revenue', this.addLabelForm.get('conversation_revenue').value);
        // formData.append('conversation_event', this.addLabelForm.get('conversation_event').value);
        // formData.append('conversation_seconds', this.addLabelForm.get('conversation_seconds').value);
        // formData.append('payout_type', this.payout_typevalue);
        // formData.append('payout_amount', this.addLabelForm.get('payout_amount').value);
        // formData.append('payout_trigger', this.addLabelForm.get('payout_trigger').value);
        // formData.append('payout_seconds', this.addLabelForm.get('payout_seconds').value);
        // formData.append('is_recording', this.recording);
        // console.log(formData); return false;
        this.moduleservice.addLabel(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Label Added Successfully');
                this.loadlabels();
                this.LabelSubmitted = false;
                this.isName = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (this.addLabelForm.get('name').value && this.addLabelForm.get('notes').value) {
            $("#addLabels").modal("hide");
            $(".custom-switch-input").prop('checked', false);
            this.LabelSubmitted = false;
            setTimeout(() => {
                this.addLabelForm.reset();
                this.isName = "";
            }, 2000);
        }
        if (this.editLabelForm.get('name').value && this.editLabelForm.get('notes').value) {
            $("#editLabels").modal("hide");
            this.LabelSubmitted = false;
            setTimeout(() => {
                this.editLabelForm.reset();
                this.isName = "";
            }, 2000);
        }
    }
    editLabel(uuid, recording, name, notes) {
        // ,conversation_revenue:any,conversation_event:any,conversation_seconds:any,payout_type:any,payout_amount:any,payout_trigger:any,payout_seconds:any
        // alert(recording);
        // if(recording==1){
        //   this.recordingval = 1;
        // }else{
        //   this.recordingval = 0;
        // }
        // this.editpayout_typeval = payout_type;
        // this.payout_typevalueedit = payout_type;
        // console.log(this.editpayout_typeval);
        this.editLabelForm.patchValue({
            uuid: uuid,
            name: name,
            notes: notes,
        });
    }
    get labeleditcontrol() { return this.editLabelForm.controls; }
    onLabelEditSubmit() {
        const formData = new FormData();
        if (this.editLabelForm.invalid) {
            return;
        }
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('name', this.editLabelForm.get('name').value);
        formData.append('notes', this.editLabelForm.get('notes').value);
        // formData.append('conversation_revenue', this.editLabelForm.get('conversation_revenue').value);
        // formData.append('conversation_event', this.editLabelForm.get('conversation_event').value);
        // formData.append('conversation_seconds', this.editLabelForm.get('conversation_seconds').value);
        // formData.append('payout_typeedit',  this.payout_typevalueedit);
        // formData.append('payout_amount', this.editLabelForm.get('payout_amount').value);
        // formData.append('payout_trigger', this.editLabelForm.get('payout_trigger').value);
        // formData.append('payout_seconds', this.editLabelForm.get('payout_seconds').value);
        // formData.append('is_recording', this.recording);
        // console.log(this.editLabelForm.get('payout_typeedit').value); return false;
        this.moduleservice.editLabel(formData, this.editLabelForm.get('uuid').value).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.loadlabels();
                this.toastrService.success('Label Data Saved Successfully');
            }
            else {
                this.toastrService.error('Failed To Save Label Data');
            }
        }, error => this.error = error);
    }
    validatename() {
        if (this.addLabelForm.get('name').value != '') {
            this.moduleservice.validateLabelName(this.addLabelForm.get('name').value).subscribe(res => {
                // console.log(res); return false;  
                this.isName = res;
                if (this.isName.status == 'success') {
                    this.isName = "success";
                }
                else {
                    this.isName = "fail";
                }
            });
        }
        else {
            this.isName = "";
        }
    }
    exportdata() {
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            // showTitle: true,
            // title: 'Your title',
            useBom: true,
            // noDownload: true,
            headers: ["Label Name", "Notes", "Created At"]
        };
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getLabelForExport(this.currentCompany.uuid).subscribe(res => {
            console.log(res);
            new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__["ngxCsv"](res.data, 'All Labels', options);
        }, error => this.error = error);
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.labels.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.labels.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.labels.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedLabels(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                        }, 2000);
                        this.loadlabels();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                }
            });
        }
    }
};
LabelComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
LabelComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
LabelComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-label',
        template: _raw_loader_label_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_label_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], LabelComponent);



/***/ }),

/***/ "OJc4":
/*!******************************************************!*\
  !*** ./src/app/modules/number/number.component.scss ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".buttons-print {\n  margin-right: 33px !important;\n}\n\ntable td, table th {\n  font-size: 11px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFxudW1iZXIuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDSSw2QkFBQTtBQUNKOztBQUVBO0VBQ0ksZUFBQTtBQUNKIiwiZmlsZSI6Im51bWJlci5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5idXR0b25zLXByaW50e1xyXG4gICAgbWFyZ2luLXJpZ2h0OiAzM3B4IWltcG9ydGFudDtcclxufVxyXG5cclxudGFibGUgdGQsdGFibGUgdGgge1xyXG4gICAgZm9udC1zaXplOiAxMXB4O1xyXG59XHJcbiJdfQ== */");

/***/ }),

/***/ "OhBw":
/*!*******************************************************!*\
  !*** ./src/app/http-interceptors/auth-interceptor.ts ***!
  \*******************************************************/
/*! exports provided: AuthInterceptor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthInterceptor", function() { return AuthInterceptor; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _auth_auth_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../auth/auth.service */ "qXBG");



let AuthInterceptor = class AuthInterceptor {
    constructor(authService) {
        this.authService = authService;
    }
    intercept(req, next) {
        if (this.authService.isLoggedIn()) {
            const authToken = this.authService.getAuthorizationToken();
            req = req.clone({
                setHeaders: { Authorization: authToken }
            });
        }
        return next.handle(req);
    }
};
AuthInterceptor.ctorParameters = () => [
    { type: _auth_auth_service__WEBPACK_IMPORTED_MODULE_2__["AuthService"] }
];
AuthInterceptor = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])()
], AuthInterceptor);



/***/ }),

/***/ "Oj11":
/*!*******************************************************************!*\
  !*** ./src/app/modules/number/numberedit/numberedit.component.ts ***!
  \*******************************************************************/
/*! exports provided: NumbereditComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumbereditComponent", function() { return NumbereditComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_numberedit_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./numberedit.component.html */ "Nw5h");
/* harmony import */ var _numberedit_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./numberedit.component.scss */ "cnfk");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);












let NumbereditComponent = class NumbereditComponent {
    constructor(fb, moduleService, router, route, toastrService, handler, cdRef) {
        this.fb = fb;
        this.moduleService = moduleService;
        this.router = router;
        this.route = route;
        this.toastrService = toastrService;
        this.cdRef = cdRef;
        this.submitted = false;
        this.FSLRulesSubmitted = false;
        this.dropdownList = [];
        this.selectedItemsBuyer = [];
        this.FSLRulesEditSubmitted = false;
        this.daysSubmitted = false;
        this.daysEditSubmitted = false;
        this.daytype = 0;
        this.flag = 0;
        this.allcitystate = [];
        this.ivrdropdownSettings = {};
        this.addkeyword = [];
        this.settings = {};
        this.selectedItems = [];
        this.selectedItemsBuyer1 = [];
        this.isfilter = 0;
        this.BuyerSubmitted = false;
        this.settingToggleTypeval = 0;
        this.settingToggleDurationvalue = 0;
        this.ringtree = false;
        this.ringtreetext = "Simple";
        this.methodtypeval = 0;
        // Day0
        this.selectedPrimaryForaward_0_day0 = 0;
        this.selectedPrimaryCount_0_day0 = 0;
        this.selected_0_day_0 = 0;
        this.selectedPrimaryForaward_1_day0 = 0;
        this.selectedPrimaryCount_1_day0 = 0;
        this.selected_1_day_0 = 0;
        this.selectedPrimaryForaward_2_day0 = 0;
        this.selectedPrimaryCount_2_day0 = 0;
        this.selected_2_day_0 = 0;
        this.selectedPrimaryForaward_3_day0 = 0;
        this.selectedPrimaryCount_3_day0 = 0;
        this.selected_3_day_0 = 0;
        this.selectedPrimaryForaward_4_day0 = 0;
        this.selectedPrimaryCount_4_day0 = 0;
        this.selected_4_day_0 = 0;
        this.selectedPrimaryForaward_5_day0 = 0;
        this.selectedPrimaryCount_5_day0 = 0;
        this.selected_5_day_0 = 0;
        this.selectedPrimaryForaward_6_day0 = 0;
        this.selectedPrimaryCount_6_day0 = 0;
        this.selected_6_day_0 = 0;
        this.selectedPrimaryForaward_7_day0 = 0;
        this.selectedPrimaryCount_7_day0 = 0;
        this.selected_7_day_0 = 0;
        this.selectedPrimaryForaward_8_day0 = 0;
        this.selectedPrimaryCount_8_day0 = 0;
        this.selected_8_day_0 = 0;
        this.selectedPrimaryForaward_9_day0 = 0;
        this.selectedPrimaryCount_9_day0 = 0;
        this.selected_9_day_0 = 0;
        // Day1
        this.selectedPrimaryForaward_0_day1 = 0;
        this.selectedPrimaryCount_0_day1 = 0;
        this.selected_0_day_1 = 0;
        this.selectedPrimaryForaward_1_day1 = 0;
        this.selectedPrimaryCount_1_day1 = 0;
        this.selected_1_day_1 = 0;
        this.selectedPrimaryForaward_2_day1 = 0;
        this.selectedPrimaryCount_2_day1 = 0;
        this.selected_2_day_1 = 0;
        this.selectedPrimaryForaward_3_day1 = 0;
        this.selectedPrimaryCount_3_day1 = 0;
        this.selected_3_day_1 = 0;
        this.selectedPrimaryForaward_4_day1 = 0;
        this.selectedPrimaryCount_4_day1 = 0;
        this.selected_4_day_1 = 0;
        this.selectedPrimaryForaward_5_day1 = 0;
        this.selectedPrimaryCount_5_day1 = 0;
        this.selected_5_day_1 = 0;
        this.selectedPrimaryForaward_6_day1 = 0;
        this.selectedPrimaryCount_6_day1 = 0;
        this.selected_6_day_1 = 0;
        this.selectedPrimaryForaward_7_day1 = 0;
        this.selectedPrimaryCount_7_day1 = 0;
        this.selected_7_day_1 = 0;
        this.selectedPrimaryForaward_8_day1 = 0;
        this.selectedPrimaryCount_8_day1 = 0;
        this.selected_8_day_1 = 0;
        this.selectedPrimaryForaward_9_day1 = 0;
        this.selectedPrimaryCount_9_day1 = 0;
        this.selected_9_day_1 = 0;
        // Day2
        this.selectedPrimaryForaward_0_day2 = 0;
        this.selectedPrimaryCount_0_day2 = 0;
        this.selected_0_day_2 = 0;
        this.selectedPrimaryForaward_1_day2 = 0;
        this.selectedPrimaryCount_1_day2 = 0;
        this.selected_1_day_2 = 0;
        this.selectedPrimaryForaward_2_day2 = 0;
        this.selectedPrimaryCount_2_day2 = 0;
        this.selected_2_day_2 = 0;
        this.selectedPrimaryForaward_3_day2 = 0;
        this.selectedPrimaryCount_3_day2 = 0;
        this.selected_3_day_2 = 0;
        this.selectedPrimaryForaward_4_day2 = 0;
        this.selectedPrimaryCount_4_day2 = 0;
        this.selected_4_day_2 = 0;
        this.selectedPrimaryForaward_5_day2 = 0;
        this.selectedPrimaryCount_5_day2 = 0;
        this.selected_5_day_2 = 0;
        this.selectedPrimaryForaward_6_day2 = 0;
        this.selectedPrimaryCount_6_day2 = 0;
        this.selected_6_day_2 = 0;
        this.selectedPrimaryForaward_7_day2 = 0;
        this.selectedPrimaryCount_7_day2 = 0;
        this.selected_7_day_2 = 0;
        this.selectedPrimaryForaward_8_day2 = 0;
        this.selectedPrimaryCount_8_day2 = 0;
        this.selected_8_day_2 = 0;
        this.selectedPrimaryForaward_9_day2 = 0;
        this.selectedPrimaryCount_9_day2 = 0;
        this.selected_9_day_2 = 0;
        // Day3
        this.selectedPrimaryForaward_0_day3 = 0;
        this.selectedPrimaryCount_0_day3 = 0;
        this.selected_0_day_3 = 0;
        this.selectedPrimaryForaward_1_day3 = 0;
        this.selectedPrimaryCount_1_day3 = 0;
        this.selected_1_day_3 = 0;
        this.selectedPrimaryForaward_2_day3 = 0;
        this.selectedPrimaryCount_2_day3 = 0;
        this.selected_2_day_3 = 0;
        this.selectedPrimaryForaward_3_day3 = 0;
        this.selectedPrimaryCount_3_day3 = 0;
        this.selected_3_day_3 = 0;
        this.selectedPrimaryForaward_4_day3 = 0;
        this.selectedPrimaryCount_4_day3 = 0;
        this.selected_4_day_3 = 0;
        this.selectedPrimaryForaward_5_day3 = 0;
        this.selectedPrimaryCount_5_day3 = 0;
        this.selected_5_day_3 = 0;
        this.selectedPrimaryForaward_6_day3 = 0;
        this.selectedPrimaryCount_6_day3 = 0;
        this.selected_6_day_3 = 0;
        this.selectedPrimaryForaward_7_day3 = 0;
        this.selectedPrimaryCount_7_day3 = 0;
        this.selected_7_day_3 = 0;
        this.selectedPrimaryForaward_8_day3 = 0;
        this.selectedPrimaryCount_8_day3 = 0;
        this.selected_8_day_3 = 0;
        this.selectedPrimaryForaward_9_day3 = 0;
        this.selectedPrimaryCount_9_day3 = 0;
        this.selected_9_day_3 = 0;
        // Day4
        this.selectedPrimaryForaward_0_day4 = 0;
        this.selectedPrimaryCount_0_day4 = 0;
        this.selected_0_day_4 = 0;
        this.selectedPrimaryForaward_1_day4 = 0;
        this.selectedPrimaryCount_1_day4 = 0;
        this.selected_1_day_4 = 0;
        this.selectedPrimaryForaward_2_day4 = 0;
        this.selectedPrimaryCount_2_day4 = 0;
        this.selected_2_day_4 = 0;
        this.selectedPrimaryForaward_3_day4 = 0;
        this.selectedPrimaryCount_3_day4 = 0;
        this.selected_3_day_4 = 0;
        this.selectedPrimaryForaward_4_day4 = 0;
        this.selectedPrimaryCount_4_day4 = 0;
        this.selected_4_day_4 = 0;
        this.selectedPrimaryForaward_5_day4 = 0;
        this.selectedPrimaryCount_5_day4 = 0;
        this.selected_5_day_4 = 0;
        this.selectedPrimaryForaward_6_day4 = 0;
        this.selectedPrimaryCount_6_day4 = 0;
        this.selected_6_day_4 = 0;
        this.selectedPrimaryForaward_7_day4 = 0;
        this.selectedPrimaryCount_7_day4 = 0;
        this.selected_7_day_4 = 0;
        this.selectedPrimaryForaward_8_day4 = 0;
        this.selectedPrimaryCount_8_day4 = 0;
        this.selected_8_day_4 = 0;
        this.selectedPrimaryForaward_9_day4 = 0;
        this.selectedPrimaryCount_9_day4 = 0;
        this.selected_9_day_4 = 0;
        // Day5
        this.selectedPrimaryForaward_0_day5 = 0;
        this.selectedPrimaryCount_0_day5 = 0;
        this.selected_0_day_5 = 0;
        this.selectedPrimaryForaward_1_day5 = 0;
        this.selectedPrimaryCount_1_day5 = 0;
        this.selected_1_day_5 = 0;
        this.selectedPrimaryForaward_2_day5 = 0;
        this.selectedPrimaryCount_2_day5 = 0;
        this.selected_2_day_5 = 0;
        this.selectedPrimaryForaward_3_day5 = 0;
        this.selectedPrimaryCount_3_day5 = 0;
        this.selected_3_day_5 = 0;
        this.selectedPrimaryForaward_4_day5 = 0;
        this.selectedPrimaryCount_4_day5 = 0;
        this.selected_4_day_5 = 0;
        this.selectedPrimaryForaward_5_day5 = 0;
        this.selectedPrimaryCount_5_day5 = 0;
        this.selected_5_day_5 = 0;
        this.selectedPrimaryForaward_6_day5 = 0;
        this.selectedPrimaryCount_6_day5 = 0;
        this.selected_6_day_5 = 0;
        this.selectedPrimaryForaward_7_day5 = 0;
        this.selectedPrimaryCount_7_day5 = 0;
        this.selected_7_day_5 = 0;
        this.selectedPrimaryForaward_8_day5 = 0;
        this.selectedPrimaryCount_8_day5 = 0;
        this.selected_8_day_5 = 0;
        this.selectedPrimaryForaward_9_day5 = 0;
        this.selectedPrimaryCount_9_day5 = 0;
        this.selected_9_day_5 = 0;
        // Day6
        this.selectedPrimaryForaward_0_day6 = 0;
        this.selectedPrimaryCount_0_day6 = 0;
        this.selected_0_day_6 = 0;
        this.selectedPrimaryForaward_1_day6 = 0;
        this.selectedPrimaryCount_1_day6 = 0;
        this.selected_1_day_6 = 0;
        this.selectedPrimaryForaward_2_day6 = 0;
        this.selectedPrimaryCount_2_day6 = 0;
        this.selected_2_day_6 = 0;
        this.selectedPrimaryForaward_3_day6 = 0;
        this.selectedPrimaryCount_3_day6 = 0;
        this.selected_3_day_6 = 0;
        this.selectedPrimaryForaward_4_day6 = 0;
        this.selectedPrimaryCount_4_day6 = 0;
        this.selected_4_day_6 = 0;
        this.selectedPrimaryForaward_5_day6 = 0;
        this.selectedPrimaryCount_5_day6 = 0;
        this.selected_5_day_6 = 0;
        this.selectedPrimaryForaward_6_day6 = 0;
        this.selectedPrimaryCount_6_day6 = 0;
        this.selected_6_day_6 = 0;
        this.selectedPrimaryForaward_7_day6 = 0;
        this.selectedPrimaryCount_7_day6 = 0;
        this.selected_7_day_6 = 0;
        this.selectedPrimaryForaward_8_day6 = 0;
        this.selectedPrimaryCount_8_day6 = 0;
        this.selected_8_day_6 = 0;
        this.selectedPrimaryForaward_9_day6 = 0;
        this.selectedPrimaryCount_9_day6 = 0;
        this.selected_9_day_6 = 0;
        this.selectedLevel = 0;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_8__["HttpClient"](handler);
    }
    closeModal() {
        if (this.noofforwarding) {
            $("#addFSLRules").modal("hide");
            setTimeout(() => {
                this.addFSLRules.reset({
                    'name': ' ',
                    'numberoftimeframe': ' ',
                });
                this.getAllRules();
            }, 2000);
        }
    }
    editcloseModal() {
        if (this.noofforwarding) {
            $("#editFSLRules").modal("hide");
            this.FSLRulesEditSubmitted = false;
            setTimeout(() => {
                this.getAllRules();
                this.getRulesByName(this.editForm.get('fslrulesname').value);
            }, 2000);
        }
    }
    ngAfterViewChecked() {
        this.cdRef.detectChanges();
    }
    getAllRules() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getallbuyers(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            this.allBuyers = res;
        }, error => this.error = error);
    }
    getAllLabels() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getAllLabels(this.currentCompany.uuid).subscribe(res => {
            this.dropdownList = res;
        }, error => this.error = error);
    }
    getRulesByName(name) {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getRulesByName(name, this.currentCompany.uuid).subscribe(res => {
            this.allRulesbyname = res;
        }, error => this.error = error);
    }
    _keyPress(event) {
        const isNumericInput = (event) => {
            const key = event.keyCode;
            return ((key >= 48 && key <= 57) || // Allow number line
                (key >= 96 && key <= 105) // Allow number pad
            );
        };
        const isModifierKey = (event) => {
            const key = event.keyCode;
            return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
                (key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
                (key > 36 && key < 41) || // Allow left, up, right, down
                (
                // Allow Ctrl/Command + A,C,V,X,Z
                (event.ctrlKey === true || event.metaKey === true) &&
                    (key === 65 || key === 67 || key === 86 || key === 88 || key === 90));
        };
        const enforceFormat = (event) => {
            // Input must be of a valid number format or a modifier key, and not longer than ten digits
            if (!isNumericInput(event) && !isModifierKey(event)) {
                event.preventDefault();
            }
        };
        const formatToPhone = (event) => {
            if (isModifierKey(event)) {
                return;
            }
            const target = event.target;
            const input = event.target.value.replace(/\D/g, '').substring(0, 10); // First ten digits of input only
            const zip = input.substring(0, 3);
            const middle = input.substring(3, 6);
            const last = input.substring(6, 10);
            if (input.length > 6) {
                target.value = `(${zip}) ${middle}-${last}`;
            }
            else if (input.length > 3) {
                target.value = `(${zip}) ${middle}`;
            }
            else if (input.length > 0) {
                target.value = `(${zip}`;
            }
        };
        const inputElement = document.getElementById('number');
        const number_0_day0 = document.getElementById('number_0_day0');
        const number_1_day0 = document.getElementById('number_1_day0');
        const number_2_day0 = document.getElementById('number_2_day0');
        const number_3_day0 = document.getElementById('number_3_day0');
        const number_4_day0 = document.getElementById('number_4_day0');
        const number_5_day0 = document.getElementById('number_5_day0');
        const number_6_day0 = document.getElementById('number_6_day0');
        const number_7_day0 = document.getElementById('number_7_day0');
        const number_8_day0 = document.getElementById('number_8_day0');
        const number_9_day0 = document.getElementById('number_9_day0');
        const number_0_day1 = document.getElementById('number_0_day1');
        const number_1_day1 = document.getElementById('number_1_day1');
        const number_2_day1 = document.getElementById('number_2_day1');
        const number_3_day1 = document.getElementById('number_3_day1');
        const number_4_day1 = document.getElementById('number_4_day1');
        const number_5_day1 = document.getElementById('number_5_day1');
        const number_6_day1 = document.getElementById('number_6_day1');
        const number_7_day1 = document.getElementById('number_7_day1');
        const number_8_day1 = document.getElementById('number_8_day1');
        const number_9_day1 = document.getElementById('number_9_day1');
        const number_0_day2 = document.getElementById('number_0_day2');
        const number_1_day2 = document.getElementById('number_1_day2');
        const number_2_day2 = document.getElementById('number_2_day2');
        const number_3_day2 = document.getElementById('number_3_day2');
        const number_4_day2 = document.getElementById('number_4_day2');
        const number_5_day2 = document.getElementById('number_5_day2');
        const number_6_day2 = document.getElementById('number_6_day2');
        const number_7_day2 = document.getElementById('number_7_day2');
        const number_8_day2 = document.getElementById('number_8_day2');
        const number_9_day2 = document.getElementById('number_9_day2');
        const number_0_day3 = document.getElementById('number_0_day3');
        const number_1_day3 = document.getElementById('number_1_day3');
        const number_2_day3 = document.getElementById('number_2_day3');
        const number_3_day3 = document.getElementById('number_3_day3');
        const number_4_day3 = document.getElementById('number_4_day3');
        const number_5_day3 = document.getElementById('number_5_day3');
        const number_6_day3 = document.getElementById('number_6_day3');
        const number_7_day3 = document.getElementById('number_7_day3');
        const number_8_day3 = document.getElementById('number_8_day3');
        const number_9_day3 = document.getElementById('number_9_day3');
        const number_0_day4 = document.getElementById('number_0_day4');
        const number_1_day4 = document.getElementById('number_1_day4');
        const number_2_day4 = document.getElementById('number_2_day4');
        const number_3_day4 = document.getElementById('number_3_day4');
        const number_4_day4 = document.getElementById('number_4_day4');
        const number_5_day4 = document.getElementById('number_5_day4');
        const number_6_day4 = document.getElementById('number_6_day4');
        const number_7_day4 = document.getElementById('number_7_day4');
        const number_8_day4 = document.getElementById('number_8_day4');
        const number_9_day4 = document.getElementById('number_9_day4');
        const number_0_day5 = document.getElementById('number_0_day5');
        const number_1_day5 = document.getElementById('number_1_day5');
        const number_2_day5 = document.getElementById('number_2_day5');
        const number_3_day5 = document.getElementById('number_3_day5');
        const number_4_day5 = document.getElementById('number_4_day5');
        const number_5_day5 = document.getElementById('number_5_day5');
        const number_6_day5 = document.getElementById('number_6_day5');
        const number_7_day5 = document.getElementById('number_7_day5');
        const number_8_day5 = document.getElementById('number_8_day5');
        const number_9_day5 = document.getElementById('number_9_day5');
        const number_0_day6 = document.getElementById('number_0_day6');
        const number_1_day6 = document.getElementById('number_1_day6');
        const number_2_day6 = document.getElementById('number_2_day6');
        const number_3_day6 = document.getElementById('number_3_day6');
        const number_4_day6 = document.getElementById('number_4_day6');
        const number_5_day6 = document.getElementById('number_5_day6');
        const number_6_day6 = document.getElementById('number_6_day6');
        const number_7_day6 = document.getElementById('number_7_day6');
        const number_8_day6 = document.getElementById('number_8_day6');
        const number_9_day6 = document.getElementById('number_9_day6');
        if (inputElement) {
            inputElement.addEventListener('keydown', enforceFormat);
            inputElement.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day0) {
            number_0_day0.addEventListener('keydown', enforceFormat);
            number_0_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day0) {
            number_1_day0.addEventListener('keydown', enforceFormat);
            number_1_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day0) {
            number_2_day0.addEventListener('keydown', enforceFormat);
            number_2_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day0) {
            number_3_day0.addEventListener('keydown', enforceFormat);
            number_3_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day0) {
            number_4_day0.addEventListener('keydown', enforceFormat);
            number_4_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day0) {
            number_5_day0.addEventListener('keydown', enforceFormat);
            number_5_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day0) {
            number_6_day0.addEventListener('keydown', enforceFormat);
            number_6_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day0) {
            number_7_day0.addEventListener('keydown', enforceFormat);
            number_7_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day0) {
            number_8_day0.addEventListener('keydown', enforceFormat);
            number_8_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day0) {
            number_9_day0.addEventListener('keydown', enforceFormat);
            number_9_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day1) {
            number_0_day1.addEventListener('keydown', enforceFormat);
            number_0_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day1) {
            number_1_day1.addEventListener('keydown', enforceFormat);
            number_1_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day1) {
            number_2_day1.addEventListener('keydown', enforceFormat);
            number_2_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day1) {
            number_3_day1.addEventListener('keydown', enforceFormat);
            number_3_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day1) {
            number_4_day1.addEventListener('keydown', enforceFormat);
            number_4_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day1) {
            number_5_day1.addEventListener('keydown', enforceFormat);
            number_5_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day1) {
            number_6_day1.addEventListener('keydown', enforceFormat);
            number_6_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day1) {
            number_7_day1.addEventListener('keydown', enforceFormat);
            number_7_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day1) {
            number_8_day1.addEventListener('keydown', enforceFormat);
            number_8_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day1) {
            number_9_day1.addEventListener('keydown', enforceFormat);
            number_9_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day2) {
            number_0_day2.addEventListener('keydown', enforceFormat);
            number_0_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day2) {
            number_1_day2.addEventListener('keydown', enforceFormat);
            number_1_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day2) {
            number_2_day2.addEventListener('keydown', enforceFormat);
            number_2_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day2) {
            number_3_day2.addEventListener('keydown', enforceFormat);
            number_3_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day2) {
            number_4_day2.addEventListener('keydown', enforceFormat);
            number_4_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day2) {
            number_5_day2.addEventListener('keydown', enforceFormat);
            number_5_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day2) {
            number_6_day2.addEventListener('keydown', enforceFormat);
            number_6_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day2) {
            number_7_day2.addEventListener('keydown', enforceFormat);
            number_7_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day2) {
            number_8_day2.addEventListener('keydown', enforceFormat);
            number_8_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day2) {
            number_9_day2.addEventListener('keydown', enforceFormat);
            number_9_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day3) {
            number_0_day3.addEventListener('keydown', enforceFormat);
            number_0_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day3) {
            number_1_day3.addEventListener('keydown', enforceFormat);
            number_1_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day3) {
            number_2_day3.addEventListener('keydown', enforceFormat);
            number_2_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day3) {
            number_3_day3.addEventListener('keydown', enforceFormat);
            number_3_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day3) {
            number_4_day3.addEventListener('keydown', enforceFormat);
            number_4_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day3) {
            number_5_day3.addEventListener('keydown', enforceFormat);
            number_5_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day3) {
            number_6_day3.addEventListener('keydown', enforceFormat);
            number_6_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day3) {
            number_7_day3.addEventListener('keydown', enforceFormat);
            number_7_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day3) {
            number_8_day3.addEventListener('keydown', enforceFormat);
            number_8_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day3) {
            number_9_day3.addEventListener('keydown', enforceFormat);
            number_9_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day4) {
            number_0_day4.addEventListener('keydown', enforceFormat);
            number_0_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day4) {
            number_1_day4.addEventListener('keydown', enforceFormat);
            number_1_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day4) {
            number_2_day4.addEventListener('keydown', enforceFormat);
            number_2_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day4) {
            number_3_day4.addEventListener('keydown', enforceFormat);
            number_3_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day4) {
            number_4_day4.addEventListener('keydown', enforceFormat);
            number_4_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day4) {
            number_5_day4.addEventListener('keydown', enforceFormat);
            number_5_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day4) {
            number_6_day4.addEventListener('keydown', enforceFormat);
            number_6_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day4) {
            number_7_day4.addEventListener('keydown', enforceFormat);
            number_7_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day4) {
            number_8_day4.addEventListener('keydown', enforceFormat);
            number_8_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day4) {
            number_9_day4.addEventListener('keydown', enforceFormat);
            number_9_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day4) {
            number_0_day4.addEventListener('keydown', enforceFormat);
            number_0_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day4) {
            number_1_day4.addEventListener('keydown', enforceFormat);
            number_1_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day4) {
            number_2_day4.addEventListener('keydown', enforceFormat);
            number_2_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day4) {
            number_3_day4.addEventListener('keydown', enforceFormat);
            number_3_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day4) {
            number_4_day4.addEventListener('keydown', enforceFormat);
            number_4_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day4) {
            number_5_day4.addEventListener('keydown', enforceFormat);
            number_5_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day4) {
            number_6_day4.addEventListener('keydown', enforceFormat);
            number_6_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day4) {
            number_7_day4.addEventListener('keydown', enforceFormat);
            number_7_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day4) {
            number_8_day4.addEventListener('keydown', enforceFormat);
            number_8_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day4) {
            number_9_day4.addEventListener('keydown', enforceFormat);
            number_9_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day5) {
            number_0_day5.addEventListener('keydown', enforceFormat);
            number_0_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day5) {
            number_1_day5.addEventListener('keydown', enforceFormat);
            number_1_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day5) {
            number_2_day5.addEventListener('keydown', enforceFormat);
            number_2_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day5) {
            number_3_day5.addEventListener('keydown', enforceFormat);
            number_3_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day5) {
            number_4_day5.addEventListener('keydown', enforceFormat);
            number_4_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day5) {
            number_5_day5.addEventListener('keydown', enforceFormat);
            number_5_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day5) {
            number_6_day5.addEventListener('keydown', enforceFormat);
            number_6_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day5) {
            number_7_day5.addEventListener('keydown', enforceFormat);
            number_7_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day5) {
            number_8_day5.addEventListener('keydown', enforceFormat);
            number_8_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day5) {
            number_9_day5.addEventListener('keydown', enforceFormat);
            number_9_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day6) {
            number_0_day6.addEventListener('keydown', enforceFormat);
            number_0_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day6) {
            number_1_day6.addEventListener('keydown', enforceFormat);
            number_1_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day6) {
            number_2_day6.addEventListener('keydown', enforceFormat);
            number_2_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day6) {
            number_3_day6.addEventListener('keydown', enforceFormat);
            number_3_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day6) {
            number_4_day6.addEventListener('keydown', enforceFormat);
            number_4_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day6) {
            number_5_day6.addEventListener('keydown', enforceFormat);
            number_5_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day6) {
            number_6_day6.addEventListener('keydown', enforceFormat);
            number_6_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day6) {
            number_7_day6.addEventListener('keydown', enforceFormat);
            number_7_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day6) {
            number_8_day6.addEventListener('keydown', enforceFormat);
            number_8_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day6) {
            number_9_day6.addEventListener('keydown', enforceFormat);
            number_9_day6.addEventListener('keyup', formatToPhone);
        }
        const editnumber_0_day0 = document.getElementById('editnumber_0_day0');
        const editnumber_1_day0 = document.getElementById('editnumber_1_day0');
        const editnumber_2_day0 = document.getElementById('editnumber_2_day0');
        const editnumber_3_day0 = document.getElementById('editnumber_3_day0');
        const editnumber_4_day0 = document.getElementById('editnumber_4_day0');
        const editnumber_5_day0 = document.getElementById('editnumber_5_day0');
        const editnumber_6_day0 = document.getElementById('editnumber_6_day0');
        const editnumber_7_day0 = document.getElementById('editnumber_7_day0');
        const editnumber_8_day0 = document.getElementById('editnumber_8_day0');
        const editnumber_9_day0 = document.getElementById('editnumber_9_day0');
        const editnumber_0_day1 = document.getElementById('editnumber_0_day1');
        const editnumber_1_day1 = document.getElementById('editnumber_1_day1');
        const editnumber_2_day1 = document.getElementById('editnumber_2_day1');
        const editnumber_3_day1 = document.getElementById('editnumber_3_day1');
        const editnumber_4_day1 = document.getElementById('editnumber_4_day1');
        const editnumber_5_day1 = document.getElementById('editnumber_5_day1');
        const editnumber_6_day1 = document.getElementById('editnumber_6_day1');
        const editnumber_7_day1 = document.getElementById('editnumber_7_day1');
        const editnumber_8_day1 = document.getElementById('editnumber_8_day1');
        const editnumber_9_day1 = document.getElementById('editnumber_9_day1');
        const editnumber_0_day2 = document.getElementById('editnumber_0_day2');
        const editnumber_1_day2 = document.getElementById('editnumber_1_day2');
        const editnumber_2_day2 = document.getElementById('editnumber_2_day2');
        const editnumber_3_day2 = document.getElementById('editnumber_3_day2');
        const editnumber_4_day2 = document.getElementById('editnumber_4_day2');
        const editnumber_5_day2 = document.getElementById('editnumber_5_day2');
        const editnumber_6_day2 = document.getElementById('editnumber_6_day2');
        const editnumber_7_day2 = document.getElementById('editnumber_7_day2');
        const editnumber_8_day2 = document.getElementById('editnumber_8_day2');
        const editnumber_9_day2 = document.getElementById('editnumber_9_day2');
        const editnumber_0_day3 = document.getElementById('editnumber_0_day3');
        const editnumber_1_day3 = document.getElementById('editnumber_1_day3');
        const editnumber_2_day3 = document.getElementById('editnumber_2_day3');
        const editnumber_3_day3 = document.getElementById('editnumber_3_day3');
        const editnumber_4_day3 = document.getElementById('editnumber_4_day3');
        const editnumber_5_day3 = document.getElementById('editnumber_5_day3');
        const editnumber_6_day3 = document.getElementById('editnumber_6_day3');
        const editnumber_7_day3 = document.getElementById('editnumber_7_day3');
        const editnumber_8_day3 = document.getElementById('editnumber_8_day3');
        const editnumber_9_day3 = document.getElementById('editnumber_9_day3');
        const editnumber_0_day4 = document.getElementById('editnumber_0_day4');
        const editnumber_1_day4 = document.getElementById('editnumber_1_day4');
        const editnumber_2_day4 = document.getElementById('editnumber_2_day4');
        const editnumber_3_day4 = document.getElementById('editnumber_3_day4');
        const editnumber_4_day4 = document.getElementById('editnumber_4_day4');
        const editnumber_5_day4 = document.getElementById('editnumber_5_day4');
        const editnumber_6_day4 = document.getElementById('editnumber_6_day4');
        const editnumber_7_day4 = document.getElementById('editnumber_7_day4');
        const editnumber_8_day4 = document.getElementById('editnumber_8_day4');
        const editnumber_9_day4 = document.getElementById('editnumber_9_day4');
        const editnumber_0_day5 = document.getElementById('editnumber_0_day5');
        const editnumber_1_day5 = document.getElementById('editnumber_1_day5');
        const editnumber_2_day5 = document.getElementById('editnumber_2_day5');
        const editnumber_3_day5 = document.getElementById('editnumber_3_day5');
        const editnumber_4_day5 = document.getElementById('editnumber_4_day5');
        const editnumber_5_day5 = document.getElementById('editnumber_5_day5');
        const editnumber_6_day5 = document.getElementById('editnumber_6_day5');
        const editnumber_7_day5 = document.getElementById('editnumber_7_day5');
        const editnumber_8_day5 = document.getElementById('editnumber_8_day5');
        const editnumber_9_day5 = document.getElementById('editnumber_9_day5');
        const editnumber_0_day6 = document.getElementById('editnumber_0_day6');
        const editnumber_1_day6 = document.getElementById('editnumber_1_day6');
        const editnumber_2_day6 = document.getElementById('editnumber_2_day6');
        const editnumber_3_day6 = document.getElementById('editnumber_3_day6');
        const editnumber_4_day6 = document.getElementById('editnumber_4_day6');
        const editnumber_5_day6 = document.getElementById('editnumber_5_day6');
        const editnumber_6_day6 = document.getElementById('editnumber_6_day6');
        const editnumber_7_day6 = document.getElementById('editnumber_7_day6');
        const editnumber_8_day6 = document.getElementById('editnumber_8_day6');
        const editnumber_9_day6 = document.getElementById('editnumber_9_day6');
        if (editnumber_0_day0) {
            editnumber_0_day0.addEventListener('keydown', enforceFormat);
            editnumber_0_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day0) {
            editnumber_1_day0.addEventListener('keydown', enforceFormat);
            editnumber_1_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day0) {
            editnumber_2_day0.addEventListener('keydown', enforceFormat);
            editnumber_2_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day0) {
            editnumber_3_day0.addEventListener('keydown', enforceFormat);
            editnumber_3_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day0) {
            editnumber_4_day0.addEventListener('keydown', enforceFormat);
            editnumber_4_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day0) {
            editnumber_5_day0.addEventListener('keydown', enforceFormat);
            editnumber_5_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day0) {
            editnumber_6_day0.addEventListener('keydown', enforceFormat);
            editnumber_6_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day0) {
            editnumber_7_day0.addEventListener('keydown', enforceFormat);
            editnumber_7_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day0) {
            editnumber_8_day0.addEventListener('keydown', enforceFormat);
            editnumber_8_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day0) {
            editnumber_9_day0.addEventListener('keydown', enforceFormat);
            editnumber_9_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day1) {
            editnumber_0_day1.addEventListener('keydown', enforceFormat);
            editnumber_0_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day1) {
            editnumber_1_day1.addEventListener('keydown', enforceFormat);
            editnumber_1_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day1) {
            editnumber_2_day1.addEventListener('keydown', enforceFormat);
            editnumber_2_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day1) {
            editnumber_3_day1.addEventListener('keydown', enforceFormat);
            editnumber_3_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day1) {
            editnumber_4_day1.addEventListener('keydown', enforceFormat);
            editnumber_4_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day1) {
            editnumber_5_day1.addEventListener('keydown', enforceFormat);
            editnumber_5_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day1) {
            editnumber_6_day1.addEventListener('keydown', enforceFormat);
            editnumber_6_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day1) {
            editnumber_7_day1.addEventListener('keydown', enforceFormat);
            editnumber_7_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day1) {
            editnumber_8_day1.addEventListener('keydown', enforceFormat);
            editnumber_8_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day1) {
            editnumber_9_day1.addEventListener('keydown', enforceFormat);
            editnumber_9_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day2) {
            editnumber_0_day2.addEventListener('keydown', enforceFormat);
            editnumber_0_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day2) {
            editnumber_1_day2.addEventListener('keydown', enforceFormat);
            editnumber_1_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day2) {
            editnumber_2_day2.addEventListener('keydown', enforceFormat);
            editnumber_2_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day2) {
            editnumber_3_day2.addEventListener('keydown', enforceFormat);
            editnumber_3_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day2) {
            editnumber_4_day2.addEventListener('keydown', enforceFormat);
            editnumber_4_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day2) {
            editnumber_5_day2.addEventListener('keydown', enforceFormat);
            editnumber_5_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day2) {
            editnumber_6_day2.addEventListener('keydown', enforceFormat);
            editnumber_6_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day2) {
            editnumber_7_day2.addEventListener('keydown', enforceFormat);
            editnumber_7_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day2) {
            editnumber_8_day2.addEventListener('keydown', enforceFormat);
            editnumber_8_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day2) {
            editnumber_9_day2.addEventListener('keydown', enforceFormat);
            editnumber_9_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day3) {
            editnumber_0_day3.addEventListener('keydown', enforceFormat);
            editnumber_0_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day3) {
            editnumber_1_day3.addEventListener('keydown', enforceFormat);
            editnumber_1_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day3) {
            editnumber_2_day3.addEventListener('keydown', enforceFormat);
            editnumber_2_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day3) {
            editnumber_3_day3.addEventListener('keydown', enforceFormat);
            editnumber_3_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day3) {
            editnumber_4_day3.addEventListener('keydown', enforceFormat);
            editnumber_4_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day3) {
            editnumber_5_day3.addEventListener('keydown', enforceFormat);
            editnumber_5_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day3) {
            editnumber_6_day3.addEventListener('keydown', enforceFormat);
            editnumber_6_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day3) {
            editnumber_7_day3.addEventListener('keydown', enforceFormat);
            editnumber_7_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day3) {
            editnumber_8_day3.addEventListener('keydown', enforceFormat);
            editnumber_8_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day3) {
            editnumber_9_day3.addEventListener('keydown', enforceFormat);
            editnumber_9_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day4) {
            editnumber_0_day4.addEventListener('keydown', enforceFormat);
            editnumber_0_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day4) {
            editnumber_1_day4.addEventListener('keydown', enforceFormat);
            editnumber_1_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day4) {
            editnumber_2_day4.addEventListener('keydown', enforceFormat);
            editnumber_2_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day4) {
            editnumber_3_day4.addEventListener('keydown', enforceFormat);
            editnumber_3_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day4) {
            editnumber_4_day4.addEventListener('keydown', enforceFormat);
            editnumber_4_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day4) {
            editnumber_5_day4.addEventListener('keydown', enforceFormat);
            editnumber_5_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day4) {
            editnumber_6_day4.addEventListener('keydown', enforceFormat);
            editnumber_6_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day4) {
            editnumber_7_day4.addEventListener('keydown', enforceFormat);
            editnumber_7_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day4) {
            editnumber_8_day4.addEventListener('keydown', enforceFormat);
            editnumber_8_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day4) {
            editnumber_9_day4.addEventListener('keydown', enforceFormat);
            editnumber_9_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day5) {
            editnumber_0_day5.addEventListener('keydown', enforceFormat);
            editnumber_0_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day5) {
            editnumber_1_day5.addEventListener('keydown', enforceFormat);
            editnumber_1_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day5) {
            editnumber_2_day5.addEventListener('keydown', enforceFormat);
            editnumber_2_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day5) {
            editnumber_3_day5.addEventListener('keydown', enforceFormat);
            editnumber_3_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day5) {
            editnumber_4_day5.addEventListener('keydown', enforceFormat);
            editnumber_4_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day5) {
            editnumber_5_day5.addEventListener('keydown', enforceFormat);
            editnumber_5_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day5) {
            editnumber_6_day5.addEventListener('keydown', enforceFormat);
            editnumber_6_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day5) {
            editnumber_7_day5.addEventListener('keydown', enforceFormat);
            editnumber_7_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day5) {
            editnumber_8_day5.addEventListener('keydown', enforceFormat);
            editnumber_8_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day5) {
            editnumber_9_day5.addEventListener('keydown', enforceFormat);
            editnumber_9_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day6) {
            editnumber_0_day6.addEventListener('keydown', enforceFormat);
            editnumber_0_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day6) {
            editnumber_1_day6.addEventListener('keydown', enforceFormat);
            editnumber_1_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day6) {
            editnumber_2_day6.addEventListener('keydown', enforceFormat);
            editnumber_2_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day6) {
            editnumber_3_day6.addEventListener('keydown', enforceFormat);
            editnumber_3_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day6) {
            editnumber_4_day6.addEventListener('keydown', enforceFormat);
            editnumber_4_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day6) {
            editnumber_5_day6.addEventListener('keydown', enforceFormat);
            editnumber_5_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day6) {
            editnumber_6_day6.addEventListener('keydown', enforceFormat);
            editnumber_6_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day6) {
            editnumber_7_day6.addEventListener('keydown', enforceFormat);
            editnumber_7_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day6) {
            editnumber_8_day6.addEventListener('keydown', enforceFormat);
            editnumber_8_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day6) {
            editnumber_9_day6.addEventListener('keydown', enforceFormat);
            editnumber_9_day6.addEventListener('keyup', formatToPhone);
        }
    }
    validatename() {
        this.moduleService.validatename(this.addFSLRules.get('name').value).subscribe(res => {
            // console.log(res); return false;  
            this.isName = res;
            if (this.isName.status == 'success') {
                this.isName = "success";
            }
            else {
                this.isName = "fail";
            }
            // console.log(this.isName); return false;  
        }
        // }
        );
    }
    getAllRuleset() {
        this.moduleService.getRules(this.currentCompany.uuid).subscribe(res => {
            // console.log(res);        
            this.allrules = res.rule_data;
        });
    }
    gettimezone() {
        this.moduleService.gettimezone().subscribe(res => {
            this.alltimezone = res;
            // console.log(res);          
        });
    }
    getdata() {
        this.moduleService.loadcity(this.editForm.get('citystate').value).subscribe(res => {
            //  console.log(res); return false;  
            this.allcity = res;
        }, error => this.error = error);
    }
    getcitystate(type, datatype) {
        this.moduleService.loadcitystate(type, datatype).subscribe(res => {
            //  console.log(res); return false;  
            this.allcitystate = res;
        }, error => this.error = error);
    }
    addRow(e) {
        this.addkeyword.push(e);
    }
    removeRow(e) {
        this.addkeyword.pop(e);
    }
    ngOnInit() {
        this.settings = {
            enableSearchFilter: true,
            singleSelection: true, showCheckbox: false, text: "Select Buyer"
        };
        this.gettimezone();
        this.getcitystate(1, 1);
        this.getIVRMenu();
        // this.getIVRMenu();
        // this.fslrule = 1;
        this.getAllRules();
        // this.getAllLabels();
        // this.getAllRuleset();
        // this.loadallweekdays();
        this.dropdownSettings = {
            singleSelection: false,
            text: "Select Associated Label",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        this.ivrdropdownSettings = {
            singleSelection: true,
            text: "Select IVR Menu",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        const uuid = this.route.snapshot.paramMap.get('id');
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.pageTitle = 'Edit Target';
        if (uuid) {
            this.moduleService.getTargetdata(uuid, this.currentCompany.uuid).subscribe(res => {
                if (res[0].buyer_id != "" || res[0].buyer_id != undefined) {
                    let text = this.allBuyers.filter(x => x.id == res[0].buyer_id)[0];
                    this.selectedItemsBuyer1 = [{ "id": res[0].buyer_id, "itemName": text.text }];
                }
                console.log(this.selectedItemsBuyer1);
                this.selectedItems = res[0].assosciated_labels;
                if (res[0].max_concurrency == 1) {
                    this.maxconcurrency = true;
                }
                else {
                    this.maxconcurrency = false;
                }
                if (res[0].global_revenuecap == 1) {
                    this.global_revenuecap = true;
                }
                else {
                    this.global_revenuecap = false;
                }
                if (res[0].is_autodtmf == 1) {
                    this.dtmf_auto = true;
                }
                else {
                    this.dtmf_auto = false;
                }
                if (res[0].dtmf_zipcode_enable == 1) {
                    this.dtmf_zipcode_enable = true;
                }
                else {
                    this.dtmf_zipcode_enable = false;
                }
                if (res[0].monthly_revenuecap == 1) {
                    this.monthly_revenuecap = true;
                }
                else {
                    this.monthly_revenuecap = false;
                }
                if (res[0].daily_revenuecap == 1) {
                    this.daily_revenuecap = true;
                }
                else {
                    this.daily_revenuecap = false;
                }
                if (res[0].hourly_revenuecap == 1) {
                    this.hourly_revenuecap = true;
                }
                else {
                    this.hourly_revenuecap = false;
                }
                if (res[0].disableRecordings == 1) {
                    this.disableRecordings = true;
                }
                else {
                    this.disableRecordings = false;
                }
                if (res[0].is_ringtree == 1) {
                    this.ringtreetext = "Ringtree";
                    this.ringtree = true;
                    if (res[0].keywordlength == 1) {
                        this.addkeyword = [0];
                    }
                    if (res[0].keywordlength == 2) {
                        this.addkeyword = [0, 1];
                    }
                    if (res[0].keywordlength == 3) {
                        this.addkeyword = [0, 1, 2];
                    }
                }
                else {
                    this.ringtreetext = "Simple";
                    this.ringtree = false;
                }
                var days = res[0].hoursofoperationdays.split('=');
                var days_1 = res[0].hoursofoperationdays_1.split('=');
                this.settingToggleTypeval = res[0].settingToggleType;
                this.editForm.get('settingToggleType').setValue(res[0].settingToggleType);
                var starttimearray = res[0].start_time.split(':');
                var endtimearray = res[0].end_time.split(':');
                var starttimearray_1 = res[0].start_time_1.split(':');
                var endtimearray_1 = res[0].end_time_1.split(':');
                this.isadded = res[0].isadded;
                // console.log(res[0].ivrmenu_uuid);
                // console.log('ok');
                if (res[0].ivrmenu_arr != "") {
                    this.editForm.patchValue({
                        ivrMenu: JSON.parse(res[0].ivrmenu_arr),
                    });
                }
                let http_headers_name;
                let http_headers_value;
                if (res[0].http_headers) {
                    let header = JSON.parse(res[0].http_headers);
                    if (header) {
                        for (var key in header) {
                            http_headers_name = key;
                            http_headers_value = header[key];
                        }
                    }
                }
                this.methodtypeval = res[0].http_method;
                this.timeonehrs = starttimearray[0];
                this.timeonemin = starttimearray[1];
                this.timetwohrs = endtimearray[0];
                this.timetwomin = endtimearray[1];
                this.timeonehrs1 = starttimearray_1[0];
                this.timeonemin1 = starttimearray_1[1];
                this.timetwohrs1 = endtimearray_1[0];
                this.timetwomin1 = endtimearray_1[1];
                this.globalcap = res[0].global_cap;
                this.monthlycap = res[0].monthly_cap;
                this.dailycap = res[0].daily_cap;
                this.hourlycap = res[0].hourly_cap;
                this.editForm.patchValue({
                    name: res[0].name,
                    subid: res[0].subid,
                    // buyer: res[0].buyer_id,
                    number: res[0].number,
                    // ivrMenu: JSON.parse(res[0].ivrmenu_arr),         
                    sip_address: res[0].sip_address,
                    voice_mail: res[0].voice_mail,
                    hoursofoperation_start: days[0],
                    hoursofoperation_end: days[1],
                    start_hrs: starttimearray[0],
                    start_min: starttimearray[1],
                    end_hrs: endtimearray[0],
                    end_min: endtimearray[1],
                    url: res[0].url,
                    http_method: res[0].http_method,
                    content_type: res[0].content_type,
                    body: res[0].body,
                    http_headers_name: http_headers_name,
                    http_headers_value: http_headers_value,
                    keyword0: res[0].keyword1,
                    keyword1: res[0].keyword2,
                    keyword2: res[0].keyword3,
                    hoursofoperation_start_1: days_1[0],
                    hoursofoperation_end_1: days_1[1],
                    start_hrs_1: starttimearray_1[0],
                    start_min_1: starttimearray_1[1],
                    end_hrs_1: endtimearray_1[0],
                    end_min_1: endtimearray_1[1],
                    timezone: res[0].timezone,
                    timezone1: res[0].timezone1,
                    dtmf_value: res[0].dtmf_value,
                    dtmf_interval: res[0].dtmf_interval,
                    dtmf_percent: res[0].dtmf_percent,
                    capon: res[0].capon,
                    global_capvalue: res[0].global_capvalue,
                    global_revenuecapvalue: res[0].global_revenuecapvalue,
                    monthly_revenuecapvalue: res[0].monthly_revenuecapvalue,
                    monthly_capvalue: res[0].monthly_capvalue,
                    daily_revenuecap: res[0].daily_revenuecap,
                    daily_revenuecapvalue: res[0].daily_revenuecapvalue,
                    daily_capvalue: res[0].daily_capvalue,
                    hourly_revenuecapvalue: res[0].hourly_revenuecapvalue,
                    hourly_capvalue: res[0].hourly_capvalue,
                    maxconvalue: res[0].max_concurrencyval,
                    isfilter: res[0].isfilter,
                    citystatetype: res[0].citystatetype,
                    iscontains: res[0].iscontains,
                    restrictdup: res[0].restrictdup,
                    restrictafter: res[0].restrictafter,
                    days: res[0].days,
                    settingToggleDurationval: res[0].settingToggleDurationval,
                    settingToggleDuration: res[0].settingToggleDuration,
                });
                this.settingToggleDurationvalue = res[0].settingToggleDurationval;
                if (res[0].isfilter == 1) {
                    this.isfilter = 1;
                    if (res[0].citystatetype == 0) {
                        var stateval = res[0].citystate.replace(/['"]+/g, '');
                        this.editForm.patchValue({
                            citystate: stateval,
                            cityval: JSON.parse(res[0].cityval),
                        });
                        this.getdata();
                    }
                    if (res[0].citystatetype == 1) {
                        this.editForm.patchValue({
                            citystate: JSON.parse(res[0].citystate),
                        });
                        this.getdata();
                    }
                }
            });
        }
        this.addBuyerForm = this.fb.group({
            company: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            sub_id: [''],
            allow_buyer_to_pause_target: [''],
            allow_buyer_to_set_target_concurrency: [''],
            allow_buyer_to_dispute_call_conversions: [''],
            limit_revenue: [''],
        });
        this.editForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            subid: [''],
            buyer: [''],
            settingToggleBlockCallsIfCapped: [''],
            settingToggleType: [''],
            number: [''],
            ivrMenu: [''],
            sip_address: [''],
            voice_mail: [''],
            url: [''],
            http_method: [''],
            content_type: [''],
            body: [''],
            http_headers_name: [''],
            http_headers_value: [''],
            keyword0: [''],
            keyword1: [''],
            keyword2: [''],
            start_hrs: [''],
            start_min: [''],
            end_hrs: [''],
            end_min: [''],
            timezone: [''],
            hoursofoperation_start_1: [''],
            hoursofoperation_end_1: [''],
            start_hrs_1: [''],
            start_min_1: [''],
            end_hrs_1: [''],
            end_min_1: [''],
            timezone1: [''],
            // timezone: ['',Validators.required], 
            hoursofoperation_start: [''],
            hoursofoperation_end: [''],
            capon: [''],
            global_revenuecapvalue: [''],
            monthly_revenuecapvalue: [''],
            daily_revenuecapvalue: [''],
            hourly_revenuecapvalue: [''],
            global_capvalue: [''],
            monthly_capvalue: [''],
            daily_capvalue: [''],
            hourly_capvalue: [''],
            dtmf_value: [''],
            dtmf_interval: [''],
            dtmf_percent: [''],
            maxconvalue: [''],
            hourlyconcurrencyvalue: [''],
            restrictdup: [''],
            restrictafter: [''],
            days: [''],
            settingToggleDurationval: [''],
            settingToggleDuration: [''],
            isfilter: [''],
            citystate: [''],
            cityval: [''],
            citystatetype: [''],
            iscontains: [''],
        });
        // this.editForm.patchValue({
        //   citystatetype:1,
        //   citystate:""
        // });
        this.addWeekDaysForm = this.fb.group({
            start_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            end_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
        });
        this.editWeekDaysForm = this.fb.group({
            uuid: ['', ''],
            start_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            end_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
        });
        this.addFSLRules = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            numberoftimeframe: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            noofforwardinglocation_1: ['', ''],
            noofforwardinglocation_2: ['', ''],
            noofforwardinglocation_3: ['', ''],
            noofforwardinglocation_4: ['', ''],
            noofforwardinglocation_5: ['', ''],
            noofforwardinglocation_6: ['', ''],
            noofforwardinglocation_7: ['', ''],
            // Day 1
            day_0: ['', ''],
            start_hrs_0: ['', ''],
            start_min_0: ['', ''],
            end_hrs_0: ['', ''],
            end_min_0: ['', ''],
            PrimaryforwardType_0_day0: ['', ''],
            number_0_day0: ['', ''],
            ivrMenu_0_day0: ['', ''],
            sipAdd_0_day0: ['', ''],
            PrimaryforwardType_1_day0: ['', ''],
            number_1_day0: ['', ''],
            ivrMenu_1_day0: ['', ''],
            sipAdd_1_day0: ['', ''],
            PrimaryforwardType_2_day0: ['', ''],
            number_2_day0: ['', ''],
            ivrMenu_2_day0: ['', ''],
            sipAdd_2_day0: ['', ''],
            PrimaryforwardType_3_day0: ['', ''],
            number_3_day0: ['', ''],
            ivrMenu_3_day0: ['', ''],
            sipAdd_3_day0: ['', ''],
            PrimaryforwardType_4_day0: ['', ''],
            number_4_day0: ['', ''],
            ivrMenu_4_day0: ['', ''],
            sipAdd_4_day0: ['', ''],
            PrimaryforwardType_5_day0: ['', ''],
            number_5_day0: ['', ''],
            ivrMenu_5_day0: ['', ''],
            sipAdd_5_day0: ['', ''],
            PrimaryforwardType_6_day0: ['', ''],
            number_6_day0: ['', ''],
            ivrMenu_6_day0: ['', ''],
            sipAdd_6_day0: ['', ''],
            PrimaryforwardType_7_day0: ['', ''],
            number_7_day0: ['', ''],
            ivrMenu_7_day0: ['', ''],
            sipAdd_7_day0: ['', ''],
            PrimaryforwardType_8_day0: ['', ''],
            number_8_day0: ['', ''],
            ivrMenu_8_day0: ['', ''],
            sipAdd_8_day0: ['', ''],
            PrimaryforwardType_9_day0: ['', ''],
            number_9_day0: ['', ''],
            ivrMenu_9_day0: ['', ''],
            sipAdd_9_day0: ['', ''],
            // Day2
            day_1: ['', ''],
            start_hrs_1: ['', ''],
            start_min_1: ['', ''],
            end_hrs_1: ['', ''],
            end_min_1: ['', ''],
            PrimaryforwardType_0_day1: ['', ''],
            number_0_day1: ['', ''],
            ivrMenu_0_day1: ['', ''],
            sipAdd_0_day1: ['', ''],
            PrimaryforwardType_1_day1: ['', ''],
            number_1_day1: ['', ''],
            ivrMenu_1_day1: ['', ''],
            sipAdd_1_day1: ['', ''],
            PrimaryforwardType_2_day1: ['', ''],
            number_2_day1: ['', ''],
            ivrMenu_2_day1: ['', ''],
            sipAdd_2_day1: ['', ''],
            PrimaryforwardType_3_day1: ['', ''],
            number_3_day1: ['', ''],
            ivrMenu_3_day1: ['', ''],
            sipAdd_3_day1: ['', ''],
            PrimaryforwardType_4_day1: ['', ''],
            number_4_day1: ['', ''],
            ivrMenu_4_day1: ['', ''],
            sipAdd_4_day1: ['', ''],
            PrimaryforwardType_5_day1: ['', ''],
            number_5_day1: ['', ''],
            ivrMenu_5_day1: ['', ''],
            sipAdd_5_day1: ['', ''],
            PrimaryforwardType_6_day1: ['', ''],
            number_6_day1: ['', ''],
            ivrMenu_6_day1: ['', ''],
            sipAdd_6_day1: ['', ''],
            PrimaryforwardType_7_day1: ['', ''],
            number_7_day1: ['', ''],
            ivrMenu_7_day1: ['', ''],
            sipAdd_7_day1: ['', ''],
            PrimaryforwardType_8_day1: ['', ''],
            number_8_day1: ['', ''],
            ivrMenu_8_day1: ['', ''],
            sipAdd_8_day1: ['', ''],
            PrimaryforwardType_9_day1: ['', ''],
            number_9_day1: ['', ''],
            ivrMenu_9_day1: ['', ''],
            sipAdd_9_day1: ['', ''],
            // Day3
            day_2: ['', ''],
            start_hrs_2: ['', ''],
            start_min_2: ['', ''],
            end_hrs_2: ['', ''],
            end_min_2: ['', ''],
            PrimaryforwardType_0_day2: ['', ''],
            number_0_day2: ['', ''],
            ivrMenu_0_day2: ['', ''],
            sipAdd_0_day2: ['', ''],
            PrimaryforwardType_1_day2: ['', ''],
            number_1_day2: ['', ''],
            ivrMenu_1_day2: ['', ''],
            sipAdd_1_day2: ['', ''],
            PrimaryforwardType_2_day2: ['', ''],
            number_2_day2: ['', ''],
            ivrMenu_2_day2: ['', ''],
            sipAdd_2_day2: ['', ''],
            PrimaryforwardType_3_day2: ['', ''],
            number_3_day2: ['', ''],
            ivrMenu_3_day2: ['', ''],
            sipAdd_3_day2: ['', ''],
            PrimaryforwardType_4_day2: ['', ''],
            number_4_day2: ['', ''],
            ivrMenu_4_day2: ['', ''],
            sipAdd_4_day2: ['', ''],
            PrimaryforwardType_5_day2: ['', ''],
            number_5_day2: ['', ''],
            ivrMenu_5_day2: ['', ''],
            sipAdd_5_day2: ['', ''],
            PrimaryforwardType_6_day2: ['', ''],
            number_6_day2: ['', ''],
            ivrMenu_6_day2: ['', ''],
            sipAdd_6_day2: ['', ''],
            PrimaryforwardType_7_day2: ['', ''],
            number_7_day2: ['', ''],
            ivrMenu_7_day2: ['', ''],
            sipAdd_7_day2: ['', ''],
            PrimaryforwardType_8_day2: ['', ''],
            number_8_day2: ['', ''],
            ivrMenu_8_day2: ['', ''],
            sipAdd_8_day2: ['', ''],
            PrimaryforwardType_9_day2: ['', ''],
            number_9_day2: ['', ''],
            ivrMenu_9_day2: ['', ''],
            sipAdd_9_day2: ['', ''],
            // Day4
            day_3: ['', ''],
            start_hrs_3: ['', ''],
            start_min_3: ['', ''],
            end_hrs_3: ['', ''],
            end_min_3: ['', ''],
            PrimaryforwardType_0_day3: ['', ''],
            number_0_day3: ['', ''],
            ivrMenu_0_day3: ['', ''],
            sipAdd_0_day3: ['', ''],
            PrimaryforwardType_1_day3: ['', ''],
            number_1_day3: ['', ''],
            ivrMenu_1_day3: ['', ''],
            sipAdd_1_day3: ['', ''],
            PrimaryforwardType_2_day3: ['', ''],
            number_2_day3: ['', ''],
            ivrMenu_2_day3: ['', ''],
            sipAdd_2_day3: ['', ''],
            PrimaryforwardType_3_day3: ['', ''],
            number_3_day3: ['', ''],
            ivrMenu_3_day3: ['', ''],
            sipAdd_3_day3: ['', ''],
            PrimaryforwardType_4_day3: ['', ''],
            number_4_day3: ['', ''],
            ivrMenu_4_day3: ['', ''],
            sipAdd_4_day3: ['', ''],
            PrimaryforwardType_5_day3: ['', ''],
            number_5_day3: ['', ''],
            ivrMenu_5_day3: ['', ''],
            sipAdd_5_day3: ['', ''],
            PrimaryforwardType_6_day3: ['', ''],
            number_6_day3: ['', ''],
            ivrMenu_6_day3: ['', ''],
            sipAdd_6_day3: ['', ''],
            PrimaryforwardType_7_day3: ['', ''],
            number_7_day3: ['', ''],
            ivrMenu_7_day3: ['', ''],
            sipAdd_7_day3: ['', ''],
            PrimaryforwardType_8_day3: ['', ''],
            number_8_day3: ['', ''],
            ivrMenu_8_day3: ['', ''],
            sipAdd_8_day3: ['', ''],
            PrimaryforwardType_9_day3: ['', ''],
            number_9_day3: ['', ''],
            ivrMenu_9_day3: ['', ''],
            sipAdd_9_day3: ['', ''],
            // Day5
            day_4: ['', ''],
            start_hrs_4: ['', ''],
            start_min_4: ['', ''],
            end_hrs_4: ['', ''],
            end_min_4: ['', ''],
            PrimaryforwardType_0_day4: ['', ''],
            number_0_day4: ['', ''],
            ivrMenu_0_day4: ['', ''],
            sipAdd_0_day4: ['', ''],
            PrimaryforwardType_1_day4: ['', ''],
            number_1_day4: ['', ''],
            ivrMenu_1_day4: ['', ''],
            sipAdd_1_day4: ['', ''],
            PrimaryforwardType_2_day4: ['', ''],
            number_2_day4: ['', ''],
            ivrMenu_2_day4: ['', ''],
            sipAdd_2_day4: ['', ''],
            PrimaryforwardType_3_day4: ['', ''],
            number_3_day4: ['', ''],
            ivrMenu_3_day4: ['', ''],
            sipAdd_3_day4: ['', ''],
            PrimaryforwardType_4_day4: ['', ''],
            number_4_day4: ['', ''],
            ivrMenu_4_day4: ['', ''],
            sipAdd_4_day4: ['', ''],
            PrimaryforwardType_5_day4: ['', ''],
            number_5_day4: ['', ''],
            ivrMenu_5_day4: ['', ''],
            sipAdd_5_day4: ['', ''],
            PrimaryforwardType_6_day4: ['', ''],
            number_6_day4: ['', ''],
            ivrMenu_6_day4: ['', ''],
            sipAdd_6_day4: ['', ''],
            PrimaryforwardType_7_day4: ['', ''],
            number_7_day4: ['', ''],
            ivrMenu_7_day4: ['', ''],
            sipAdd_7_day4: ['', ''],
            PrimaryforwardType_8_day4: ['', ''],
            number_8_day4: ['', ''],
            ivrMenu_8_day4: ['', ''],
            sipAdd_8_day4: ['', ''],
            PrimaryforwardType_9_day4: ['', ''],
            number_9_day4: ['', ''],
            ivrMenu_9_day4: ['', ''],
            sipAdd_9_day4: ['', ''],
            // Day6
            day_5: ['', ''],
            start_hrs_5: ['', ''],
            start_min_5: ['', ''],
            end_hrs_5: ['', ''],
            end_min_5: ['', ''],
            PrimaryforwardType_0_day5: ['', ''],
            number_0_day5: ['', ''],
            ivrMenu_0_day5: ['', ''],
            sipAdd_0_day5: ['', ''],
            PrimaryforwardType_1_day5: ['', ''],
            number_1_day5: ['', ''],
            ivrMenu_1_day5: ['', ''],
            sipAdd_1_day5: ['', ''],
            PrimaryforwardType_2_day5: ['', ''],
            number_2_day5: ['', ''],
            ivrMenu_2_day5: ['', ''],
            sipAdd_2_day5: ['', ''],
            PrimaryforwardType_3_day5: ['', ''],
            number_3_day5: ['', ''],
            ivrMenu_3_day5: ['', ''],
            sipAdd_3_day5: ['', ''],
            PrimaryforwardType_4_day5: ['', ''],
            number_4_day5: ['', ''],
            ivrMenu_4_day5: ['', ''],
            sipAdd_4_day5: ['', ''],
            PrimaryforwardType_5_day5: ['', ''],
            number_5_day5: ['', ''],
            ivrMenu_5_day5: ['', ''],
            sipAdd_5_day5: ['', ''],
            PrimaryforwardType_6_day5: ['', ''],
            number_6_day5: ['', ''],
            ivrMenu_6_day5: ['', ''],
            sipAdd_6_day5: ['', ''],
            PrimaryforwardType_7_day5: ['', ''],
            number_7_day5: ['', ''],
            ivrMenu_7_day5: ['', ''],
            sipAdd_7_day5: ['', ''],
            PrimaryforwardType_8_day5: ['', ''],
            number_8_day5: ['', ''],
            ivrMenu_8_day5: ['', ''],
            sipAdd_8_day5: ['', ''],
            PrimaryforwardType_9_day5: ['', ''],
            number_9_day5: ['', ''],
            ivrMenu_9_day5: ['', ''],
            sipAdd_9_day5: ['', ''],
            // Day7
            day_6: ['', ''],
            start_hrs_6: ['', ''],
            start_min_6: ['', ''],
            end_hrs_6: ['', ''],
            end_min_6: ['', ''],
            PrimaryforwardType_0_day6: ['', ''],
            number_0_day6: ['', ''],
            ivrMenu_0_day6: ['', ''],
            sipAdd_0_day6: ['', ''],
            PrimaryforwardType_1_day6: ['', ''],
            number_1_day6: ['', ''],
            ivrMenu_1_day6: ['', ''],
            sipAdd_1_day6: ['', ''],
            PrimaryforwardType_2_day6: ['', ''],
            number_2_day6: ['', ''],
            ivrMenu_2_day6: ['', ''],
            sipAdd_2_day6: ['', ''],
            PrimaryforwardType_3_day6: ['', ''],
            number_3_day6: ['', ''],
            ivrMenu_3_day6: ['', ''],
            sipAdd_3_day6: ['', ''],
            PrimaryforwardType_4_day6: ['', ''],
            number_4_day6: ['', ''],
            ivrMenu_4_day6: ['', ''],
            sipAdd_4_day6: ['', ''],
            PrimaryforwardType_5_day6: ['', ''],
            number_5_day6: ['', ''],
            ivrMenu_5_day6: ['', ''],
            sipAdd_5_day6: ['', ''],
            PrimaryforwardType_6_day6: ['', ''],
            number_6_day6: ['', ''],
            ivrMenu_6_day6: ['', ''],
            sipAdd_6_day6: ['', ''],
            PrimaryforwardType_7_day6: ['', ''],
            number_7_day6: ['', ''],
            ivrMenu_7_day6: ['', ''],
            sipAdd_7_day6: ['', ''],
            PrimaryforwardType_8_day6: ['', ''],
            number_8_day6: ['', ''],
            ivrMenu_8_day6: ['', ''],
            sipAdd_8_day6: ['', ''],
            PrimaryforwardType_9_day6: ['', ''],
            number_9_day6: ['', ''],
            ivrMenu_9_day6: ['', ''],
            sipAdd_9_day6: ['', ''],
        });
        this.editFSLRules = this.fb.group({
            rulename: ['', ''],
            numberoftimeframe: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            noofforwardinglocation_1: ['', ''],
            noofforwardinglocation_2: ['', ''],
            noofforwardinglocation_3: ['', ''],
            noofforwardinglocation_4: ['', ''],
            noofforwardinglocation_5: ['', ''],
            noofforwardinglocation_6: ['', ''],
            noofforwardinglocation_7: ['', ''],
            // Day 1
            day_0: ['', ''],
            start_hrs_0: ['', ''],
            start_min_0: ['', ''],
            end_hrs_0: ['', ''],
            end_min_0: ['', ''],
            PrimaryforwardType_0_day0: ['', ''],
            number_0_day0: ['', ''],
            ivrMenu_0_day0: ['', ''],
            sipAdd_0_day0: ['', ''],
            PrimaryforwardType_1_day0: ['', ''],
            number_1_day0: ['', ''],
            ivrMenu_1_day0: ['', ''],
            sipAdd_1_day0: ['', ''],
            PrimaryforwardType_2_day0: ['', ''],
            number_2_day0: ['', ''],
            ivrMenu_2_day0: ['', ''],
            sipAdd_2_day0: ['', ''],
            PrimaryforwardType_3_day0: ['', ''],
            number_3_day0: ['', ''],
            ivrMenu_3_day0: ['', ''],
            sipAdd_3_day0: ['', ''],
            PrimaryforwardType_4_day0: ['', ''],
            number_4_day0: ['', ''],
            ivrMenu_4_day0: ['', ''],
            sipAdd_4_day0: ['', ''],
            PrimaryforwardType_5_day0: ['', ''],
            number_5_day0: ['', ''],
            ivrMenu_5_day0: ['', ''],
            sipAdd_5_day0: ['', ''],
            PrimaryforwardType_6_day0: ['', ''],
            number_6_day0: ['', ''],
            ivrMenu_6_day0: ['', ''],
            sipAdd_6_day0: ['', ''],
            PrimaryforwardType_7_day0: ['', ''],
            number_7_day0: ['', ''],
            ivrMenu_7_day0: ['', ''],
            sipAdd_7_day0: ['', ''],
            PrimaryforwardType_8_day0: ['', ''],
            number_8_day0: ['', ''],
            ivrMenu_8_day0: ['', ''],
            sipAdd_8_day0: ['', ''],
            PrimaryforwardType_9_day0: ['', ''],
            number_9_day0: ['', ''],
            ivrMenu_9_day0: ['', ''],
            sipAdd_9_day0: ['', ''],
            // Day2
            day_1: ['', ''],
            start_hrs_1: ['', ''],
            start_min_1: ['', ''],
            end_hrs_1: ['', ''],
            end_min_1: ['', ''],
            PrimaryforwardType_0_day1: ['', ''],
            number_0_day1: ['', ''],
            ivrMenu_0_day1: ['', ''],
            sipAdd_0_day1: ['', ''],
            PrimaryforwardType_1_day1: ['', ''],
            number_1_day1: ['', ''],
            ivrMenu_1_day1: ['', ''],
            sipAdd_1_day1: ['', ''],
            PrimaryforwardType_2_day1: ['', ''],
            number_2_day1: ['', ''],
            ivrMenu_2_day1: ['', ''],
            sipAdd_2_day1: ['', ''],
            PrimaryforwardType_3_day1: ['', ''],
            number_3_day1: ['', ''],
            ivrMenu_3_day1: ['', ''],
            sipAdd_3_day1: ['', ''],
            PrimaryforwardType_4_day1: ['', ''],
            number_4_day1: ['', ''],
            ivrMenu_4_day1: ['', ''],
            sipAdd_4_day1: ['', ''],
            PrimaryforwardType_5_day1: ['', ''],
            number_5_day1: ['', ''],
            ivrMenu_5_day1: ['', ''],
            sipAdd_5_day1: ['', ''],
            PrimaryforwardType_6_day1: ['', ''],
            number_6_day1: ['', ''],
            ivrMenu_6_day1: ['', ''],
            sipAdd_6_day1: ['', ''],
            PrimaryforwardType_7_day1: ['', ''],
            number_7_day1: ['', ''],
            ivrMenu_7_day1: ['', ''],
            sipAdd_7_day1: ['', ''],
            PrimaryforwardType_8_day1: ['', ''],
            number_8_day1: ['', ''],
            ivrMenu_8_day1: ['', ''],
            sipAdd_8_day1: ['', ''],
            PrimaryforwardType_9_day1: ['', ''],
            number_9_day1: ['', ''],
            ivrMenu_9_day1: ['', ''],
            sipAdd_9_day1: ['', ''],
            // Day3
            day_2: ['', ''],
            start_hrs_2: ['', ''],
            start_min_2: ['', ''],
            end_hrs_2: ['', ''],
            end_min_2: ['', ''],
            PrimaryforwardType_0_day2: ['', ''],
            number_0_day2: ['', ''],
            ivrMenu_0_day2: ['', ''],
            sipAdd_0_day2: ['', ''],
            PrimaryforwardType_1_day2: ['', ''],
            number_1_day2: ['', ''],
            ivrMenu_1_day2: ['', ''],
            sipAdd_1_day2: ['', ''],
            PrimaryforwardType_2_day2: ['', ''],
            number_2_day2: ['', ''],
            ivrMenu_2_day2: ['', ''],
            sipAdd_2_day2: ['', ''],
            PrimaryforwardType_3_day2: ['', ''],
            number_3_day2: ['', ''],
            ivrMenu_3_day2: ['', ''],
            sipAdd_3_day2: ['', ''],
            PrimaryforwardType_4_day2: ['', ''],
            number_4_day2: ['', ''],
            ivrMenu_4_day2: ['', ''],
            sipAdd_4_day2: ['', ''],
            PrimaryforwardType_5_day2: ['', ''],
            number_5_day2: ['', ''],
            ivrMenu_5_day2: ['', ''],
            sipAdd_5_day2: ['', ''],
            PrimaryforwardType_6_day2: ['', ''],
            number_6_day2: ['', ''],
            ivrMenu_6_day2: ['', ''],
            sipAdd_6_day2: ['', ''],
            PrimaryforwardType_7_day2: ['', ''],
            number_7_day2: ['', ''],
            ivrMenu_7_day2: ['', ''],
            sipAdd_7_day2: ['', ''],
            PrimaryforwardType_8_day2: ['', ''],
            number_8_day2: ['', ''],
            ivrMenu_8_day2: ['', ''],
            sipAdd_8_day2: ['', ''],
            PrimaryforwardType_9_day2: ['', ''],
            number_9_day2: ['', ''],
            ivrMenu_9_day2: ['', ''],
            sipAdd_9_day2: ['', ''],
            // Day4
            day_3: ['', ''],
            start_hrs_3: ['', ''],
            start_min_3: ['', ''],
            end_hrs_3: ['', ''],
            end_min_3: ['', ''],
            PrimaryforwardType_0_day3: ['', ''],
            number_0_day3: ['', ''],
            ivrMenu_0_day3: ['', ''],
            sipAdd_0_day3: ['', ''],
            PrimaryforwardType_1_day3: ['', ''],
            number_1_day3: ['', ''],
            ivrMenu_1_day3: ['', ''],
            sipAdd_1_day3: ['', ''],
            PrimaryforwardType_2_day3: ['', ''],
            number_2_day3: ['', ''],
            ivrMenu_2_day3: ['', ''],
            sipAdd_2_day3: ['', ''],
            PrimaryforwardType_3_day3: ['', ''],
            number_3_day3: ['', ''],
            ivrMenu_3_day3: ['', ''],
            sipAdd_3_day3: ['', ''],
            PrimaryforwardType_4_day3: ['', ''],
            number_4_day3: ['', ''],
            ivrMenu_4_day3: ['', ''],
            sipAdd_4_day3: ['', ''],
            PrimaryforwardType_5_day3: ['', ''],
            number_5_day3: ['', ''],
            ivrMenu_5_day3: ['', ''],
            sipAdd_5_day3: ['', ''],
            PrimaryforwardType_6_day3: ['', ''],
            number_6_day3: ['', ''],
            ivrMenu_6_day3: ['', ''],
            sipAdd_6_day3: ['', ''],
            PrimaryforwardType_7_day3: ['', ''],
            number_7_day3: ['', ''],
            ivrMenu_7_day3: ['', ''],
            sipAdd_7_day3: ['', ''],
            PrimaryforwardType_8_day3: ['', ''],
            number_8_day3: ['', ''],
            ivrMenu_8_day3: ['', ''],
            sipAdd_8_day3: ['', ''],
            PrimaryforwardType_9_day3: ['', ''],
            number_9_day3: ['', ''],
            ivrMenu_9_day3: ['', ''],
            sipAdd_9_day3: ['', ''],
            // Day5
            day_4: ['', ''],
            start_hrs_4: ['', ''],
            start_min_4: ['', ''],
            end_hrs_4: ['', ''],
            end_min_4: ['', ''],
            PrimaryforwardType_0_day4: ['', ''],
            number_0_day4: ['', ''],
            ivrMenu_0_day4: ['', ''],
            sipAdd_0_day4: ['', ''],
            PrimaryforwardType_1_day4: ['', ''],
            number_1_day4: ['', ''],
            ivrMenu_1_day4: ['', ''],
            sipAdd_1_day4: ['', ''],
            PrimaryforwardType_2_day4: ['', ''],
            number_2_day4: ['', ''],
            ivrMenu_2_day4: ['', ''],
            sipAdd_2_day4: ['', ''],
            PrimaryforwardType_3_day4: ['', ''],
            number_3_day4: ['', ''],
            ivrMenu_3_day4: ['', ''],
            sipAdd_3_day4: ['', ''],
            PrimaryforwardType_4_day4: ['', ''],
            number_4_day4: ['', ''],
            ivrMenu_4_day4: ['', ''],
            sipAdd_4_day4: ['', ''],
            PrimaryforwardType_5_day4: ['', ''],
            number_5_day4: ['', ''],
            ivrMenu_5_day4: ['', ''],
            sipAdd_5_day4: ['', ''],
            PrimaryforwardType_6_day4: ['', ''],
            number_6_day4: ['', ''],
            ivrMenu_6_day4: ['', ''],
            sipAdd_6_day4: ['', ''],
            PrimaryforwardType_7_day4: ['', ''],
            number_7_day4: ['', ''],
            ivrMenu_7_day4: ['', ''],
            sipAdd_7_day4: ['', ''],
            PrimaryforwardType_8_day4: ['', ''],
            number_8_day4: ['', ''],
            ivrMenu_8_day4: ['', ''],
            sipAdd_8_day4: ['', ''],
            PrimaryforwardType_9_day4: ['', ''],
            number_9_day4: ['', ''],
            ivrMenu_9_day4: ['', ''],
            sipAdd_9_day4: ['', ''],
            // Day6
            day_5: ['', ''],
            start_hrs_5: ['', ''],
            start_min_5: ['', ''],
            end_hrs_5: ['', ''],
            end_min_5: ['', ''],
            PrimaryforwardType_0_day5: ['', ''],
            number_0_day5: ['', ''],
            ivrMenu_0_day5: ['', ''],
            sipAdd_0_day5: ['', ''],
            PrimaryforwardType_1_day5: ['', ''],
            number_1_day5: ['', ''],
            ivrMenu_1_day5: ['', ''],
            sipAdd_1_day5: ['', ''],
            PrimaryforwardType_2_day5: ['', ''],
            number_2_day5: ['', ''],
            ivrMenu_2_day5: ['', ''],
            sipAdd_2_day5: ['', ''],
            PrimaryforwardType_3_day5: ['', ''],
            number_3_day5: ['', ''],
            ivrMenu_3_day5: ['', ''],
            sipAdd_3_day5: ['', ''],
            PrimaryforwardType_4_day5: ['', ''],
            number_4_day5: ['', ''],
            ivrMenu_4_day5: ['', ''],
            sipAdd_4_day5: ['', ''],
            PrimaryforwardType_5_day5: ['', ''],
            number_5_day5: ['', ''],
            ivrMenu_5_day5: ['', ''],
            sipAdd_5_day5: ['', ''],
            PrimaryforwardType_6_day5: ['', ''],
            number_6_day5: ['', ''],
            ivrMenu_6_day5: ['', ''],
            sipAdd_6_day5: ['', ''],
            PrimaryforwardType_7_day5: ['', ''],
            number_7_day5: ['', ''],
            ivrMenu_7_day5: ['', ''],
            sipAdd_7_day5: ['', ''],
            PrimaryforwardType_8_day5: ['', ''],
            number_8_day5: ['', ''],
            ivrMenu_8_day5: ['', ''],
            sipAdd_8_day5: ['', ''],
            PrimaryforwardType_9_day5: ['', ''],
            number_9_day5: ['', ''],
            ivrMenu_9_day5: ['', ''],
            sipAdd_9_day5: ['', ''],
            // Day7
            day_6: ['', ''],
            start_hrs_6: ['', ''],
            start_min_6: ['', ''],
            end_hrs_6: ['', ''],
            end_min_6: ['', ''],
            PrimaryforwardType_0_day6: ['', ''],
            number_0_day6: ['', ''],
            ivrMenu_0_day6: ['', ''],
            sipAdd_0_day6: ['', ''],
            PrimaryforwardType_1_day6: ['', ''],
            number_1_day6: ['', ''],
            ivrMenu_1_day6: ['', ''],
            sipAdd_1_day6: ['', ''],
            PrimaryforwardType_2_day6: ['', ''],
            number_2_day6: ['', ''],
            ivrMenu_2_day6: ['', ''],
            sipAdd_2_day6: ['', ''],
            PrimaryforwardType_3_day6: ['', ''],
            number_3_day6: ['', ''],
            ivrMenu_3_day6: ['', ''],
            sipAdd_3_day6: ['', ''],
            PrimaryforwardType_4_day6: ['', ''],
            number_4_day6: ['', ''],
            ivrMenu_4_day6: ['', ''],
            sipAdd_4_day6: ['', ''],
            PrimaryforwardType_5_day6: ['', ''],
            number_5_day6: ['', ''],
            ivrMenu_5_day6: ['', ''],
            sipAdd_5_day6: ['', ''],
            PrimaryforwardType_6_day6: ['', ''],
            number_6_day6: ['', ''],
            ivrMenu_6_day6: ['', ''],
            sipAdd_6_day6: ['', ''],
            PrimaryforwardType_7_day6: ['', ''],
            number_7_day6: ['', ''],
            ivrMenu_7_day6: ['', ''],
            sipAdd_7_day6: ['', ''],
            PrimaryforwardType_8_day6: ['', ''],
            number_8_day6: ['', ''],
            ivrMenu_8_day6: ['', ''],
            sipAdd_8_day6: ['', ''],
            PrimaryforwardType_9_day6: ['', ''],
            number_9_day6: ['', ''],
            ivrMenu_9_day6: ['', ''],
            sipAdd_9_day6: ['', ''],
        });
        // this.getAllLabels();
    }
    isfilterselect() {
        this.isfilter = 1;
        this.editForm.get('isfilter').setValue(this.isfilter);
    }
    isfilterclear() {
        this.isfilter = 0;
        this.editForm.get('citystatetype').setValue(1);
        this.editForm.get('citystate').setValue('');
        this.editForm.get('cityval').setValue('');
    }
    changetype(event) {
        // console.log(event.target.value);
        this.editForm.get('citystatetype').setValue(event.target.value);
    }
    getIVRMenu() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getIVRMenus(this.currentCompany.uuid).subscribe(res => {
            this.ivrmenus = res;
            // console.log(this.ivrmenus);
        }, error => this.error = error);
    }
    get rules() { return this.addFSLRules.controls; }
    onFSLSubmit() {
        this.FSLRulesSubmitted = true;
        // stop here if form is invalid
        if (this.addFSLRules.invalid) {
            return;
        }
        // console.log(this.addFSLRules.get('start_time_0').value._d);
        //  return false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // console.log(this.addFSLRules.value); return false;     
        this.moduleService.addFSLRules(this.addFSLRules.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res);
            // return false;  
            // localStorage.setItem('FSLRulesInsertID', JSON.stringify(res.insertid));
            this.addFSL();
            if (res.status !== 'error') {
                this.toastrService.success('FSL Rules Added Successfully');
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    //Add Buyer
    get buyercontrol() { return this.addBuyerForm.controls; }
    onBuyerSubmit() {
        const formData = new FormData();
        this.BuyerSubmitted = true;
        if (this.addBuyerForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('company', this.addBuyerForm.get('company').value);
        formData.append('sub_id', this.addBuyerForm.get('sub_id').value);
        formData.append('allow_buyer_to_pause_target', this.addBuyerForm.get('allow_buyer_to_pause_target').value);
        formData.append('allow_buyer_to_set_target_concurrency', this.addBuyerForm.get('allow_buyer_to_set_target_concurrency').value);
        formData.append('allow_buyer_to_dispute_call_conversions', this.addBuyerForm.get('allow_buyer_to_dispute_call_conversions').value);
        formData.append('limit_revenue', this.addBuyerForm.get('limit_revenue').value);
        // console.log(formData); return false;
        this.moduleService.addBuyer(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Buyer Added Successfully');
                this.getAllRules();
                this.BuyerSubmitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeBuyerModal() {
        if (this.addBuyerForm.get('company').value) {
            $("#addBuyer").modal("hide");
            $(".custom-switch-input").prop('checked', false);
            this.BuyerSubmitted = false;
            setTimeout(() => { this.addBuyerForm.reset(); }, 2000);
        }
    }
    get editrules() { return this.editFSLRules.controls; }
    onFSLEditSubmit() {
        this.FSLRulesEditSubmitted = true;
        // stop here if form is invalid
        if (this.editFSLRules.invalid) {
            return;
        }
        this.editFSLRules.get('rulename').setValue(this.forwarding);
        // console.log(this.editFSLRules.value);
        // return false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // console.log(this.currentCompany.uuid); return false;     
        this.moduleService.editFSLRules(this.editFSLRules.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res);
            // return false;  
            // localStorage.setItem('FSLRulesInsertID', JSON.stringify(res.insertid));
            if (res.status !== 'error') {
                this.toastrService.success('FSL Rules Updated Successfully');
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    settingToggleType(val) {
        this.settingToggleTypeval = val;
        this.editForm.get('settingToggleType').setValue(val);
    }
    settingToggleDuration(val) {
        this.settingToggleDurationvalue = val;
        this.editForm.get('settingToggleDurationval').setValue(val);
    }
    get f() { return this.editForm.controls; }
    onSubmit() {
        // console.log(this.ringtree); return false;
        const formData = new FormData();
        this.submitted = true;
        // stop here if form is invalid
        if (this.editForm.invalid) {
            return;
        }
        if (this.timetwohrs < this.timeonehrs) {
            this.getTimeerror();
            return;
        }
        if (this.timetwohrs == this.timeonehrs && this.timetwomin <= this.timeonemin) {
            this.getTimeerror();
            return;
        }
        if (this.timetwohrs1 < this.timeonehrs1) {
            this.getTimeerror();
            return;
        }
        if (this.timetwohrs1 == this.timeonehrs1 && this.timetwomin1 <= this.timeonemin1) {
            this.getTimeerror();
            return;
        }
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('user_uuid', this.currentUser.uuid);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('name', this.editForm.get('name').value);
        formData.append('subid', this.editForm.get('subid').value);
        formData.append('buyer', JSON.stringify(this.editForm.get('buyer').value));
        // formData.append('settingToggleBlockCallsIfCapped', this.editForm.get('settingToggleBlockCallsIfCapped').value);
        formData.append('settingToggleType', this.editForm.get('settingToggleType').value);
        if (this.settingToggleTypeval == 0) {
            formData.append('number', this.editForm.get('number').value);
        }
        if (this.settingToggleTypeval == 1) {
            formData.append('ivrMenu', JSON.stringify(this.editForm.get('ivrMenu').value));
        }
        if (this.settingToggleTypeval == 2) {
            formData.append('sip_address', this.editForm.get('sip_address').value);
        }
        if (this.settingToggleTypeval == 3) {
            formData.append('voice_mail', this.editForm.get('voice_mail').value);
        }
        formData.append('ringtree', this.ringtree);
        if (this.ringtree == 1) {
            formData.append('url', this.editForm.get('url').value);
            formData.append('http_method', this.editForm.get('http_method').value);
            formData.append('content_type', this.editForm.get('content_type').value);
            formData.append('body', this.editForm.get('body').value);
            formData.append('http_headers_name', this.editForm.get('http_headers_name').value);
            formData.append('http_headers_value', this.editForm.get('http_headers_value').value);
            // formData.append('keyword', this.editForm.get('keyword').value);  
            formData.append('keywordlength', this.addkeyword.length);
            formData.append('keyword0', this.editForm.get('keyword0').value);
            formData.append('keyword1', this.editForm.get('keyword1').value);
            formData.append('keyword2', this.editForm.get('keyword2').value);
        }
        // formData.append('connection_timeout', this.editForm.get('connection_timeout').value);  
        // formData.append('disableRecordings', this.disableRecordings);  
        // formData.append('dialivroption', this.editForm.get('dialivroption').value);  
        // formData.append('timezone', this.editForm.get('timezone').value);  
        formData.append('start_day', this.editForm.get('hoursofoperation_start').value);
        formData.append('end_day', this.editForm.get('hoursofoperation_end').value);
        formData.append('timezone', this.editForm.get('timezone').value);
        var starttime = this.editForm.get('start_hrs').value + ':' + this.editForm.get('start_min').value;
        var endtime = this.editForm.get('end_hrs').value + ':' + this.editForm.get('end_min').value;
        formData.append('isadded', this.isadded);
        if (this.isadded == 1) {
            formData.append('start_day_1', this.editForm.get('hoursofoperation_start_1').value);
            formData.append('end_day_1', this.editForm.get('hoursofoperation_end_1').value);
            var starttime_1 = this.editForm.get('start_hrs_1').value + ':' + this.editForm.get('start_min_1').value;
            var endtime_1 = this.editForm.get('end_hrs_1').value + ':' + this.editForm.get('end_min_1').value;
            formData.append('start_time_1', starttime_1);
            formData.append('end_time_1', endtime_1);
            formData.append('timezone1', this.editForm.get('timezone1').value);
        }
        formData.append('start_time', starttime);
        formData.append('end_time', endtime);
        formData.append('capon', this.editForm.get('capon').value);
        formData.append('is_autodtmf', this.dtmf_auto);
        formData.append('dtmf_zipcode_enable', this.dtmf_zipcode_enable);
        formData.append('dtmf_value', this.editForm.get('dtmf_value').value);
        formData.append('dtmf_interval', this.editForm.get('dtmf_interval').value);
        formData.append('dtmf_percent', this.editForm.get('dtmf_percent').value);
        formData.append('global_revenuecaptoggle', this.global_revenuecap);
        formData.append('global_revenuecapvalue', this.editForm.get('global_revenuecapvalue').value);
        formData.append('monthly_revenuecaptoggle', this.monthly_revenuecap);
        formData.append('monthly_revenuecapvalue', this.editForm.get('monthly_revenuecapvalue').value);
        formData.append('daily_revenuecaptoggle', this.daily_revenuecap);
        formData.append('daily_revenuecapvalue', this.editForm.get('daily_revenuecapvalue').value);
        formData.append('hourly_revenuecaptoggle', this.hourly_revenuecap);
        formData.append('hourly_revenuecapvalue', this.editForm.get('hourly_revenuecapvalue').value);
        formData.append('global_cap', this.globalcap);
        formData.append('monthly_cap', this.monthlycap);
        formData.append('daily_cap', this.dailycap);
        formData.append('hourly_cap', this.hourlycap);
        formData.append('global_capvalue', this.editForm.get('global_capvalue').value);
        formData.append('monthly_capvalue', this.editForm.get('monthly_capvalue').value);
        formData.append('daily_capvalue', this.editForm.get('daily_capvalue').value);
        formData.append('hourly_capvalue', this.editForm.get('hourly_capvalue').value);
        formData.append('addcontoggle', this.maxconcurrency);
        formData.append('maxconvalue', this.editForm.get('maxconvalue').value);
        formData.append('restrictdup', this.editForm.get('restrictdup').value);
        formData.append('restrictafter', this.editForm.get('restrictafter').value);
        formData.append('settingToggleDurationval', this.settingToggleDurationvalue);
        formData.append('days', this.editForm.get('days').value);
        if (this.isfilter == 1) {
            formData.append('isfilter', this.editForm.get('isfilter').value);
            formData.append('citystatetype', this.editForm.get('citystatetype').value);
            formData.append('iscontains', this.editForm.get('iscontains').value);
            formData.append('citystate', JSON.stringify(this.editForm.get('citystate').value));
            formData.append('cityval', JSON.stringify(this.editForm.get('cityval').value));
        }
        const uuid = this.route.snapshot.paramMap.get('id');
        // alert(uuid);return false;
        if (uuid) {
            this.moduleService.updateTarget(formData, uuid).subscribe(res => {
                // console.log(res); return false;
                if (res.status !== 'error') {
                    this.toastrService.success('Target Updated Successfully');
                    this.isTargetName = false;
                    // this.router.navigate(['/numbers']);
                    this.router.navigate(['/target']);
                }
                else {
                    this.toastrService.success('Failed To Update! Please Try Again Later..');
                }
            }, error => this.error = error);
        }
    }
    validateTargetname() {
        if (this.editForm.get('name').value != '') {
            this.moduleService.validateTargetName(this.editForm.get('name').value).subscribe(res => {
                // console.log(res); return false;  
                this.isTargetName = res;
                if (this.isTargetName.status == 'success') {
                    this.isTargetName = "success";
                }
                else {
                    this.isTargetName = "fail";
                }
            });
        }
        else {
            this.isTargetName = "";
        }
    }
    get_jklrules(event) {
        this.jklrules = event.target.checked;
    }
    ringtree_toggle(event) {
        this.ringtree = event.target.checked;
        console.log(event.target.checked);
        if (event.target.checked == true) {
            this.ringtreetext = "Ring Tree";
        }
        else {
            this.ringtreetext = "Simple";
        }
    }
    global_revenue_cap(event) {
        this.global_revenuecap = event.target.checked;
    }
    global_cap(event) {
        this.globalcap = event.target.checked;
    }
    dtmf_auto_toggle(event) {
        this.dtmf_auto = event.target.checked;
    }
    methodtype(event) {
        this.methodtypeval = event.target.value;
    }
    dtmf_zipcode_enable_toggle(event) {
        this.dtmf_zipcode_enable = event.target.checked;
    }
    monthly_revenue_cap(event) {
        this.monthly_revenuecap = event.target.checked;
    }
    monthly_cap(event) {
        this.monthlycap = event.target.checked;
    }
    daily_revenue_cap(event) {
        this.daily_revenuecap = event.target.checked;
    }
    daily_cap(event) {
        this.dailycap = event.target.checked;
    }
    hourly_revenue_cap(event) {
        this.hourly_revenuecap = event.target.checked;
    }
    hourly_cap(event) {
        this.hourlycap = event.target.checked;
    }
    get_maxcon(event) {
        this.maxconcurrency = event.target.checked;
    }
    get_disableRecordings(event) {
        this.disableRecordings = event.target.checked;
    }
    get_hourlyconcurrency(event) {
        this.hourlyconcurrency = event.target.checked;
    }
    getTimeonehrs(event) {
        this.timeonehrs = event.target.value;
        if (this.timetwohrs < this.timeonehrs) {
            this.getTimeerror();
        }
    }
    getTimeonemin(event) {
        this.timeonemin = event.target.value;
        if (this.timetwohrs == this.timeonehrs && this.timetwomin <= this.timeonemin) {
            this.getTimeerror();
        }
    }
    getTimetwohrs(event) {
        this.timetwohrs = event.target.value;
        if (this.timetwohrs < this.timeonehrs) {
            this.getTimeerror();
        }
    }
    getTimetwomin(event) {
        this.timetwomin = event.target.value;
        if (this.timetwohrs == this.timeonehrs && this.timetwomin <= this.timeonemin) {
            this.getTimeerror();
        }
    }
    getTimetwohrs1(event) {
        this.timeonehrs1 = event.target.value;
        if (this.timetwohrs1 < this.timeonehrs1) {
            this.getTimeerror();
        }
    }
    getTimetwomin1(event) {
        this.timeonemin1 = event.target.value;
        if (this.timetwohrs1 == this.timeonehrs1 && this.timetwomin1 <= this.timeonemin1) {
            this.getTimeerror();
        }
    }
    getTimetwohrs2(event) {
        this.timetwohrs1 = event.target.value;
        if (this.timetwohrs1 < this.timeonehrs1) {
            this.getTimeerror();
        }
    }
    getTimetwomin2(event) {
        this.timetwomin1 = event.target.value;
        if (this.timetwohrs1 == this.timeonehrs1 && this.timetwomin1 <= this.timeonemin1) {
            this.getTimeerror();
        }
    }
    getTimeerror() {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Error!', 'Closing Time must be greater than Opening Time.', 'error');
    }
    getFSLbyuuid(uuid) {
        // alert(uuid);
        // console.log(uuid);
        if (uuid != '') {
            this.moduleService.getFSLbyuuid(uuid).subscribe(res => {
                this.forwarding = res.forwarding[0].name;
                this.forwardingtimeframe = res.forwarding[0].nooftimeframe;
                this.noofforwarding = res.forwarding[0].nooftimeframe;
                for (let index = 0; index < res.forwarding.length; index++) {
                    var start = res.forwarding[index].start_time.split(':');
                    var end = res.forwarding[index].end_time.split(':');
                    var starthrs = 'start_hrs_' + index;
                    var startmin = 'start_min_' + index;
                    var endhrs = 'end_hrs_' + index;
                    var endmin = 'end_min_' + index;
                    // var endkey ='end_time_'+index;
                    var daykey = 'day_' + index;
                    // console.log(start[0]);
                    this.editFSLRules.patchValue({
                        [daykey]: res.forwarding[index].timeofday,
                        // [startkey]: new Date(new Date().setHours(start[0], start[1])),
                        [starthrs]: start[0],
                        [startmin]: start[1],
                        [endhrs]: end[0],
                        [endmin]: end[1],
                    });
                    for (let j = 0; j < res.forwarding[index].locations.length; j++) {
                        var inc = j + 1;
                        // var forlocationkey ='noofforwardinglocation_'+inc;
                        var PrimaryforwardType = 'PrimaryforwardType_' + j + '_day' + index;
                        var number_value = 'number_' + j + '_day' + index;
                        var ivr_value = 'ivrMenu_' + j + '_day' + index;
                        var sip_value = 'sipAdd_' + j + '_day' + index;
                        // this.flag =res.forwarding[index].locations[j].primary_forwarding_type;
                        // console.log(res.forwarding[index].locations[j].primary_forwarding_type);
                        if (res.forwarding[index].locations[j].primary_forwarding_type == 0) {
                            this.setPrimaryforward(0, j, index);
                            this.flag = 0;
                        }
                        if (res.forwarding[index].locations[j].primary_forwarding_type == 1) {
                            this.setPrimaryforward(1, j, index);
                            this.flag = 1;
                        }
                        if (res.forwarding[index].locations[j].primary_forwarding_type == 2) {
                            this.flag = 2;
                            this.setPrimaryforward(2, j, index);
                        }
                        if (res.forwarding[index].locations[j].primary_forwarding_number != '') {
                            var number = res.forwarding[index].locations[j].primary_forwarding_number;
                            var formatted = '(' + number.substr(0, 3) + ') ' + number.substr(3, 3) + '-' + number.substr(6, 4);
                        }
                        else {
                            var formatted = "";
                        }
                        if (index == 0) {
                            this.noofforwardinglocation_1 = res.forwarding[index].locations[j].noofforwardinglocation;
                            // if(this.noofforwardinglocation_1!=1)  {
                            // this.noofforwardinglocation_1++;                             
                            // }
                        }
                        //  console.log(res.forwarding[index].locations[j].noofforwardinglocation);
                        if (index == 1) {
                            this.noofforwardinglocation_2 = res.forwarding[index].locations[j].noofforwardinglocation;
                            // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                            //   this.noofforwardinglocation_2++;                             
                            //   }
                        }
                        if (index == 2) {
                            this.noofforwardinglocation_3 = res.forwarding[index].locations[j].noofforwardinglocation;
                            // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                            //   this.noofforwardinglocation_3++;                             
                            // }                              
                        }
                        if (index == 3) {
                            this.noofforwardinglocation_4 = res.forwarding[index].locations[j].noofforwardinglocation;
                            // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                            //   this.noofforwardinglocation_4++;                             
                            // }                              
                        }
                        if (index == 4) {
                            this.noofforwardinglocation_5 = res.forwarding[index].locations[j].noofforwardinglocation;
                            // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                            //   this.noofforwardinglocation_5++;                             
                            // }                                
                        }
                        if (index == 5) {
                            this.noofforwardinglocation_6 = res.forwarding[index].locations[j].noofforwardinglocation;
                        }
                        if (index == 6) {
                            this.noofforwardinglocation_7 = res.forwarding[index].locations[j].noofforwardinglocation;
                        }
                        // console.log(index);
                        this.editFSLRules.patchValue({
                            // [forlocationkey]: res.forwarding[index].locations[j].noofforwardinglocation,
                            [PrimaryforwardType]: this.flag,
                            [number_value]: formatted,
                            [ivr_value]: res.forwarding[index].locations[j].primary_forwarding_ivr,
                            [sip_value]: res.forwarding[index].locations[j].primary_forwarding_sip,
                        });
                    }
                }
            }, error => this.error = error);
        }
        else {
            this.allRulesbyname = [];
        }
    }
    addFSL() {
        this.FSLRulesSubmitted = false;
        this.addFSLRules.reset();
    }
    getWeekbyuuid(uuid, start_day, end_day) {
        this.editWeekDaysForm.patchValue({
            'uuid': uuid,
            'start_day': start_day,
            'end_day': end_day,
        });
    }
    loadallweekdays() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.loadallweekdays(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            this.allweekdays = res.data;
        }, error => this.error = error);
    }
    setPrimaryforward(id, count, day) {
        // Day0
        if (count == 0 && day == 0) {
            this.selectedPrimaryForaward_0_day0 = id;
            this.selectedPrimaryCount_0_day0 = count;
            this.selected_0_day_0 = day;
        }
        if (count == 1 && day == 0) {
            this.selectedPrimaryForaward_1_day0 = id;
            this.selectedPrimaryCount_1_day0 = count;
            this.selected_1_day_0 = day;
        }
        if (count == 2 && day == 0) {
            this.selectedPrimaryForaward_2_day0 = id;
            this.selectedPrimaryCount_2_day0 = count;
            this.selected_2_day_0 = day;
        }
        if (count == 3 && day == 0) {
            this.selectedPrimaryForaward_3_day0 = id;
            this.selectedPrimaryCount_3_day0 = count;
            this.selected_3_day_0 = day;
        }
        if (count == 4 && day == 0) {
            this.selectedPrimaryForaward_4_day0 = id;
            this.selectedPrimaryCount_4_day0 = count;
            this.selected_4_day_0 = day;
        }
        if (count == 5 && day == 0) {
            this.selectedPrimaryForaward_5_day0 = id;
            this.selectedPrimaryCount_5_day0 = count;
            this.selected_5_day_0 = day;
        }
        if (count == 6 && day == 0) {
            this.selectedPrimaryForaward_6_day0 = id;
            this.selectedPrimaryCount_6_day0 = count;
            this.selected_6_day_0 = day;
        }
        if (count == 7 && day == 0) {
            this.selectedPrimaryForaward_7_day0 = id;
            this.selectedPrimaryCount_7_day0 = count;
            this.selected_7_day_0 = day;
        }
        if (count == 8 && day == 0) {
            this.selectedPrimaryForaward_8_day0 = id;
            this.selectedPrimaryCount_8_day0 = count;
            this.selected_8_day_0 = day;
        }
        if (count == 9 && day == 0) {
            this.selectedPrimaryForaward_9_day0 = id;
            this.selectedPrimaryCount_9_day0 = count;
            this.selected_9_day_0 = day;
        }
        // Day1
        if (count == 0 && day == 1) {
            this.selectedPrimaryForaward_0_day1 = id;
            this.selectedPrimaryCount_0_day1 = count;
            this.selected_0_day_1 = day;
        }
        if (count == 1 && day == 1) {
            this.selectedPrimaryForaward_1_day1 = id;
            this.selectedPrimaryCount_1_day1 = count;
            this.selected_1_day_1 = day;
        }
        if (count == 2 && day == 1) {
            this.selectedPrimaryForaward_2_day1 = id;
            this.selectedPrimaryCount_2_day1 = count;
            this.selected_2_day_1 = day;
        }
        if (count == 3 && day == 1) {
            this.selectedPrimaryForaward_3_day1 = id;
            this.selectedPrimaryCount_3_day1 = count;
            this.selected_3_day_1 = day;
        }
        if (count == 4 && day == 1) {
            this.selectedPrimaryForaward_4_day1 = id;
            this.selectedPrimaryCount_4_day1 = count;
            this.selected_4_day_1 = day;
        }
        if (count == 5 && day == 1) {
            this.selectedPrimaryForaward_5_day1 = id;
            this.selectedPrimaryCount_5_day1 = count;
            this.selected_5_day_1 = day;
        }
        if (count == 6 && day == 1) {
            this.selectedPrimaryForaward_6_day1 = id;
            this.selectedPrimaryCount_6_day1 = count;
            this.selected_6_day_1 = day;
        }
        if (count == 7 && day == 1) {
            this.selectedPrimaryForaward_7_day1 = id;
            this.selectedPrimaryCount_7_day1 = count;
            this.selected_7_day_1 = day;
        }
        if (count == 8 && day == 1) {
            this.selectedPrimaryForaward_8_day1 = id;
            this.selectedPrimaryCount_8_day1 = count;
            this.selected_8_day_1 = day;
        }
        if (count == 9 && day == 1) {
            this.selectedPrimaryForaward_9_day1 = id;
            this.selectedPrimaryCount_9_day1 = count;
            this.selected_9_day_1 = day;
        }
        // Day2
        if (count == 0 && day == 2) {
            this.selectedPrimaryForaward_0_day2 = id;
            this.selectedPrimaryCount_0_day2 = count;
            this.selected_0_day_2 = day;
        }
        if (count == 1 && day == 2) {
            this.selectedPrimaryForaward_1_day2 = id;
            this.selectedPrimaryCount_1_day2 = count;
            this.selected_1_day_2 = day;
        }
        if (count == 2 && day == 2) {
            this.selectedPrimaryForaward_2_day2 = id;
            this.selectedPrimaryCount_2_day2 = count;
            this.selected_2_day_2 = day;
        }
        if (count == 3 && day == 2) {
            this.selectedPrimaryForaward_3_day2 = id;
            this.selectedPrimaryCount_3_day2 = count;
            this.selected_3_day_2 = day;
        }
        if (count == 4 && day == 2) {
            this.selectedPrimaryForaward_4_day2 = id;
            this.selectedPrimaryCount_4_day2 = count;
            this.selected_4_day_2 = day;
        }
        if (count == 5 && day == 2) {
            this.selectedPrimaryForaward_5_day2 = id;
            this.selectedPrimaryCount_5_day2 = count;
            this.selected_5_day_2 = day;
        }
        if (count == 6 && day == 2) {
            this.selectedPrimaryForaward_6_day2 = id;
            this.selectedPrimaryCount_6_day2 = count;
            this.selected_6_day_2 = day;
        }
        if (count == 7 && day == 2) {
            this.selectedPrimaryForaward_7_day2 = id;
            this.selectedPrimaryCount_7_day2 = count;
            this.selected_7_day_2 = day;
        }
        if (count == 8 && day == 2) {
            this.selectedPrimaryForaward_8_day2 = id;
            this.selectedPrimaryCount_8_day2 = count;
            this.selected_8_day_2 = day;
        }
        if (count == 9 && day == 2) {
            this.selectedPrimaryForaward_9_day2 = id;
            this.selectedPrimaryCount_9_day2 = count;
            this.selected_9_day_2 = day;
        }
        // Day3
        if (count == 0 && day == 3) {
            this.selectedPrimaryForaward_0_day3 = id;
            this.selectedPrimaryCount_0_day3 = count;
            this.selected_0_day_3 = day;
        }
        if (count == 1 && day == 3) {
            this.selectedPrimaryForaward_1_day3 = id;
            this.selectedPrimaryCount_1_day3 = count;
            this.selected_1_day_3 = day;
        }
        if (count == 2 && day == 3) {
            this.selectedPrimaryForaward_2_day3 = id;
            this.selectedPrimaryCount_2_day3 = count;
            this.selected_2_day_3 = day;
        }
        if (count == 3 && day == 3) {
            this.selectedPrimaryForaward_3_day3 = id;
            this.selectedPrimaryCount_3_day3 = count;
            this.selected_3_day_3 = day;
        }
        if (count == 4 && day == 3) {
            this.selectedPrimaryForaward_4_day3 = id;
            this.selectedPrimaryCount_4_day3 = count;
            this.selected_4_day_3 = day;
        }
        if (count == 5 && day == 3) {
            this.selectedPrimaryForaward_5_day3 = id;
            this.selectedPrimaryCount_5_day3 = count;
            this.selected_5_day_3 = day;
        }
        if (count == 6 && day == 3) {
            this.selectedPrimaryForaward_6_day3 = id;
            this.selectedPrimaryCount_6_day3 = count;
            this.selected_6_day_3 = day;
        }
        if (count == 7 && day == 3) {
            this.selectedPrimaryForaward_7_day3 = id;
            this.selectedPrimaryCount_7_day3 = count;
            this.selected_7_day_3 = day;
        }
        if (count == 8 && day == 3) {
            this.selectedPrimaryForaward_8_day3 = id;
            this.selectedPrimaryCount_8_day3 = count;
            this.selected_8_day_3 = day;
        }
        if (count == 9 && day == 3) {
            this.selectedPrimaryForaward_9_day3 = id;
            this.selectedPrimaryCount_9_day3 = count;
            this.selected_9_day_3 = day;
        }
        // Day4
        if (count == 0 && day == 4) {
            this.selectedPrimaryForaward_0_day4 = id;
            this.selectedPrimaryCount_0_day4 = count;
            this.selected_0_day_4 = day;
        }
        if (count == 1 && day == 4) {
            this.selectedPrimaryForaward_1_day4 = id;
            this.selectedPrimaryCount_1_day4 = count;
            this.selected_1_day_4 = day;
        }
        if (count == 2 && day == 4) {
            this.selectedPrimaryForaward_2_day4 = id;
            this.selectedPrimaryCount_2_day4 = count;
            this.selected_2_day_4 = day;
        }
        if (count == 3 && day == 4) {
            this.selectedPrimaryForaward_3_day4 = id;
            this.selectedPrimaryCount_3_day4 = count;
            this.selected_3_day_4 = day;
        }
        if (count == 4 && day == 4) {
            this.selectedPrimaryForaward_4_day4 = id;
            this.selectedPrimaryCount_4_day4 = count;
            this.selected_4_day_4 = day;
        }
        if (count == 5 && day == 4) {
            this.selectedPrimaryForaward_5_day4 = id;
            this.selectedPrimaryCount_5_day4 = count;
            this.selected_5_day_4 = day;
        }
        if (count == 6 && day == 4) {
            this.selectedPrimaryForaward_6_day4 = id;
            this.selectedPrimaryCount_6_day4 = count;
            this.selected_6_day_4 = day;
        }
        if (count == 7 && day == 4) {
            this.selectedPrimaryForaward_7_day4 = id;
            this.selectedPrimaryCount_7_day4 = count;
            this.selected_7_day_4 = day;
        }
        if (count == 8 && day == 4) {
            this.selectedPrimaryForaward_8_day4 = id;
            this.selectedPrimaryCount_8_day4 = count;
            this.selected_8_day_4 = day;
        }
        if (count == 9 && day == 4) {
            this.selectedPrimaryForaward_9_day4 = id;
            this.selectedPrimaryCount_9_day4 = count;
            this.selected_9_day_4 = day;
        }
    }
    isPrimarySelected(id, count, day) {
        // Day0
        if (count == 0 && day == 0) {
            if (this.selectedPrimaryForaward_0_day0 == id && this.selectedPrimaryCount_0_day0 === count && this.selected_0_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 0) {
            if (this.selectedPrimaryForaward_1_day0 == id && this.selectedPrimaryCount_1_day0 === count && this.selected_1_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 0) {
            if (this.selectedPrimaryForaward_2_day0 == id && this.selectedPrimaryCount_2_day0 === count && this.selected_2_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 0) {
            if (this.selectedPrimaryForaward_3_day0 == id && this.selectedPrimaryCount_3_day0 === count && this.selected_3_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 0) {
            if (this.selectedPrimaryForaward_4_day0 == id && this.selectedPrimaryCount_4_day0 === count && this.selected_4_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 0) {
            if (this.selectedPrimaryForaward_5_day0 == id && this.selectedPrimaryCount_5_day0 === count && this.selected_5_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 0) {
            if (this.selectedPrimaryForaward_6_day0 == id && this.selectedPrimaryCount_6_day0 === count && this.selected_6_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 0) {
            if (this.selectedPrimaryForaward_7_day0 == id && this.selectedPrimaryCount_7_day0 === count && this.selected_7_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 0) {
            if (this.selectedPrimaryForaward_8_day0 == id && this.selectedPrimaryCount_8_day0 === count && this.selected_8_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 0) {
            if (this.selectedPrimaryForaward_9_day0 == id && this.selectedPrimaryCount_9_day0 === count && this.selected_9_day_0 == day)
                return true;
            else
                return false;
        }
        // Day1
        if (count == 0 && day == 1) {
            if (this.selectedPrimaryForaward_0_day1 == id && this.selectedPrimaryCount_0_day1 === count && this.selected_0_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 1) {
            if (this.selectedPrimaryForaward_1_day1 == id && this.selectedPrimaryCount_1_day1 === count && this.selected_1_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 1) {
            if (this.selectedPrimaryForaward_2_day1 == id && this.selectedPrimaryCount_2_day1 === count && this.selected_2_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 1) {
            if (this.selectedPrimaryForaward_3_day1 == id && this.selectedPrimaryCount_3_day1 === count && this.selected_3_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 1) {
            if (this.selectedPrimaryForaward_4_day1 == id && this.selectedPrimaryCount_4_day1 === count && this.selected_4_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 1) {
            if (this.selectedPrimaryForaward_5_day1 == id && this.selectedPrimaryCount_5_day1 === count && this.selected_5_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 1) {
            if (this.selectedPrimaryForaward_6_day1 == id && this.selectedPrimaryCount_6_day1 === count && this.selected_6_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 1) {
            if (this.selectedPrimaryForaward_7_day1 == id && this.selectedPrimaryCount_7_day1 === count && this.selected_7_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 1) {
            if (this.selectedPrimaryForaward_8_day1 == id && this.selectedPrimaryCount_8_day1 === count && this.selected_8_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 1) {
            if (this.selectedPrimaryForaward_9_day1 == id && this.selectedPrimaryCount_9_day1 === count && this.selected_9_day_1 == day)
                return true;
            else
                return false;
        }
        // Day2
        if (count == 0 && day == 2) {
            if (this.selectedPrimaryForaward_0_day2 == id && this.selectedPrimaryCount_0_day2 === count && this.selected_0_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 2) {
            if (this.selectedPrimaryForaward_1_day2 == id && this.selectedPrimaryCount_1_day2 === count && this.selected_1_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 2) {
            if (this.selectedPrimaryForaward_2_day2 == id && this.selectedPrimaryCount_2_day2 === count && this.selected_2_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 2) {
            if (this.selectedPrimaryForaward_3_day2 == id && this.selectedPrimaryCount_3_day2 === count && this.selected_3_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 2) {
            if (this.selectedPrimaryForaward_4_day2 == id && this.selectedPrimaryCount_4_day2 === count && this.selected_4_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 2) {
            if (this.selectedPrimaryForaward_5_day2 == id && this.selectedPrimaryCount_5_day2 === count && this.selected_5_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 2) {
            if (this.selectedPrimaryForaward_6_day2 == id && this.selectedPrimaryCount_6_day2 === count && this.selected_6_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 2) {
            if (this.selectedPrimaryForaward_7_day2 == id && this.selectedPrimaryCount_7_day2 === count && this.selected_7_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 2) {
            if (this.selectedPrimaryForaward_8_day2 == id && this.selectedPrimaryCount_8_day2 === count && this.selected_8_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 2) {
            if (this.selectedPrimaryForaward_9_day2 == id && this.selectedPrimaryCount_9_day2 === count && this.selected_9_day_2 == day)
                return true;
            else
                return false;
        }
        // Day3
        if (count == 0 && day == 3) {
            if (this.selectedPrimaryForaward_0_day3 == id && this.selectedPrimaryCount_0_day3 === count && this.selected_0_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 3) {
            if (this.selectedPrimaryForaward_1_day3 == id && this.selectedPrimaryCount_1_day3 === count && this.selected_1_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 3) {
            if (this.selectedPrimaryForaward_2_day3 == id && this.selectedPrimaryCount_2_day3 === count && this.selected_2_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 3) {
            if (this.selectedPrimaryForaward_3_day3 == id && this.selectedPrimaryCount_3_day3 === count && this.selected_3_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 3) {
            if (this.selectedPrimaryForaward_4_day3 == id && this.selectedPrimaryCount_4_day3 === count && this.selected_4_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 3) {
            if (this.selectedPrimaryForaward_5_day3 == id && this.selectedPrimaryCount_5_day3 === count && this.selected_5_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 3) {
            if (this.selectedPrimaryForaward_6_day3 == id && this.selectedPrimaryCount_6_day3 === count && this.selected_6_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 3) {
            if (this.selectedPrimaryForaward_7_day3 == id && this.selectedPrimaryCount_7_day3 === count && this.selected_7_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 3) {
            if (this.selectedPrimaryForaward_8_day3 == id && this.selectedPrimaryCount_8_day3 === count && this.selected_8_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 3) {
            if (this.selectedPrimaryForaward_9_day3 == id && this.selectedPrimaryCount_9_day3 === count && this.selected_9_day_3 == day)
                return true;
            else
                return false;
        }
        // Day4
        if (count == 0 && day == 4) {
            if (this.selectedPrimaryForaward_0_day4 == id && this.selectedPrimaryCount_0_day4 === count && this.selected_0_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 4) {
            if (this.selectedPrimaryForaward_1_day4 == id && this.selectedPrimaryCount_1_day4 === count && this.selected_1_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 4) {
            if (this.selectedPrimaryForaward_2_day4 == id && this.selectedPrimaryCount_2_day4 === count && this.selected_2_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 4) {
            if (this.selectedPrimaryForaward_3_day4 == id && this.selectedPrimaryCount_3_day4 === count && this.selected_3_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 4) {
            if (this.selectedPrimaryForaward_4_day4 == id && this.selectedPrimaryCount_4_day4 === count && this.selected_4_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 4) {
            if (this.selectedPrimaryForaward_5_day4 == id && this.selectedPrimaryCount_5_day4 === count && this.selected_5_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 4) {
            if (this.selectedPrimaryForaward_6_day4 == id && this.selectedPrimaryCount_6_day4 === count && this.selected_6_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 4) {
            if (this.selectedPrimaryForaward_7_day4 == id && this.selectedPrimaryCount_7_day4 === count && this.selected_7_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 4) {
            if (this.selectedPrimaryForaward_8_day4 == id && this.selectedPrimaryCount_8_day4 === count && this.selected_8_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 4) {
            if (this.selectedPrimaryForaward_9_day4 == id && this.selectedPrimaryCount_9_day4 === count && this.selected_9_day_4 == day)
                return true;
            else
                return false;
        }
    }
    onReset() {
        this.submitted = false;
        this.editForm.reset();
    }
    selectednoofforwardinglocation() {
        let array = [];
        if (this.noofforwardinglocation_1 >= 10) {
            this.ite = 10;
        }
        else {
            this.ite = this.noofforwardinglocation_1;
        }
        for (let i = 0; i < this.ite; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_2() {
        let array = [];
        if (this.noofforwardinglocation_2 >= 10) {
            this.ite2 = 10;
        }
        else {
            this.ite2 = this.noofforwardinglocation_2;
        }
        for (let i = 0; i < this.ite2; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_3() {
        let array = [];
        if (this.noofforwardinglocation_3 >= 10) {
            this.ite3 = 10;
        }
        else {
            this.ite3 = this.noofforwardinglocation_3;
        }
        for (let i = 0; i < this.ite3; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_4() {
        let array = [];
        if (this.noofforwardinglocation_4 >= 10) {
            this.ite4 = 10;
        }
        else {
            this.ite4 = this.noofforwardinglocation_4;
        }
        for (let i = 0; i < this.ite4; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_5() {
        let array = [];
        if (this.noofforwardinglocation_5 >= 10) {
            this.ite5 = 10;
        }
        else {
            this.ite5 = this.noofforwardinglocation_5;
        }
        for (let i = 0; i < this.ite5; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_6() {
        let array = [];
        if (this.noofforwardinglocation_6 >= 10) {
            this.ite6 = 10;
        }
        else {
            this.ite6 = this.noofforwardinglocation_6;
        }
        for (let i = 0; i < this.ite6; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_7() {
        let array = [];
        if (this.noofforwardinglocation_7 >= 10) {
            this.ite7 = 10;
        }
        else {
            this.ite7 = this.noofforwardinglocation_7;
        }
        for (let i = 0; i < this.ite7; i++) {
            array.push(i);
        }
        return array;
    }
    onFSLReset() {
        this.FSLRulesSubmitted = false;
        this.addFSLRules.reset();
    }
    selected() {
        let array = [];
        for (let i = 0; i < this.noofforwarding; i++) {
            array.push(i);
        }
        return array;
    }
    Delete(id) {
        // alert(id)
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleService.deleteFSLRulesbyname(id).subscribe(res => {
                    this.getAllRules();
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'FSL Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    addremoverow(type) {
        if (type == 0) {
            this.isadded = 1;
        }
        if (type == 1) {
            this.isadded = 0;
        }
    }
};
NumbereditComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormBuilder"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_3__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_5__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_5__["ActivatedRoute"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_6__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_8__["HttpBackend"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_7__["ChangeDetectorRef"] }
];
NumbereditComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_7__["Component"])({
        selector: 'app-numberedit',
        template: _raw_loader_numberedit_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_numberedit_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], NumbereditComponent);



/***/ }),

/***/ "P+IX":
/*!************************************!*\
  !*** ./src/app/auth/auth.guard.ts ***!
  \************************************/
/*! exports provided: AuthGuard */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthGuard", function() { return AuthGuard; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _auth_auth_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../auth/auth.service */ "qXBG");




let AuthGuard = class AuthGuard {
    constructor(authService, router, route) {
        this.authService = authService;
        this.router = router;
        this.route = route;
    }
    // canActivate(
    //   route: ActivatedRouteSnapshot,
    //   state: RouterStateSnapshot): boolean {
    //   const url: string = state.url;
    //   return this.checkLogin(url);
    // }
    canActivate(route, state) {
        const url = state.url;
        this.user = JSON.parse(localStorage.getItem('currentUser'));
        this.id = this.route.snapshot.paramMap.get('id');
        this.checkLogin(url);
        // if(url != '/buyer' && url != '/profile' && url != '/add-target' && url != '/edit-numbers/' && url != '/campaign-wizard' && url != '/edit-campaign/this.id' && url != '/new-ivr-menu' && url != '/edit-ivr/'){
        // this.authService.get_permission(url,this.user.role).subscribe(
        //   res => {
        //     // console.log(res);
        //     if(res == 'no'){
        //       // if(this.user.user_type == 1){
        //         // this.router.navigate(['/']);
        //       // }         
        //     }
        //   }
        // );
        // }
        if (this.user.role == 1) {
            if (url != '/notes' && url != '/reports' && url != '/' && url != '/profile') {
                this.router.navigate(['/']);
            }
        }
        if (this.user.role == 3) {
            if (url != '/numbers' && url != '/campaigns' && url != '/reports' && url != '/profile' && url != '/404' && !url.startsWith('/view-campaign/')) {
                this.router.navigate(['/campaigns']);
            }
        }
        // if(this.user.role==3){
        //   if(url != '/campaigns' && url != '/reports' && url != '/numbers'  && url != '/profile'){
        //     this.router.navigate(['/campaigns']);
        //   }
        // }
        return this.checkLogin(url);
    }
    canActivateChild(route, state) {
        return this.canActivate(route, state);
    }
    checkLogin(url) {
        // console.log(localStorage.getItem('currentUser'));
        if (this.authService.isLoggedIn()) {
            return true;
        }
        this.authService.redirectUrl = url;
        this.router.navigate(['/login']);
    }
};
AuthGuard.ctorParameters = () => [
    { type: _auth_auth_service__WEBPACK_IMPORTED_MODULE_3__["AuthService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"] }
];
AuthGuard = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
        providedIn: 'root'
    })
], AuthGuard);



/***/ }),

/***/ "PAU+":
/*!***********************************************************************************!*\
  !*** ./src/app/modules/publishers/publisher-terms/publisher-terms.component.scss ***!
  \***********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("input.form-control {\n  border: none;\n  background: #1d2b4e;\n  border-bottom: 1px solid white;\n  border-radius: 0;\n  color: #888888;\n}\n\n.btn-primary {\n  background-color: #031131 !important;\n  border-color: transparent !important;\n  color: #fff !important;\n  box-shadow: none !important;\n}\n\n.custom-switch-indicator {\n  background: #3b74ad;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxccHVibGlzaGVyLXRlcm1zLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0ksWUFBQTtFQUNBLG1CQUFBO0VBQ0EsOEJBQUE7RUFDQSxnQkFBQTtFQUNBLGNBQUE7QUFDSjs7QUFDQTtFQUNJLG9DQUFBO0VBQ0Esb0NBQUE7RUFDQSxzQkFBQTtFQUNBLDJCQUFBO0FBRUo7O0FBQUE7RUFDSSxtQkFBQTtBQUdKIiwiZmlsZSI6InB1Ymxpc2hlci10ZXJtcy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbImlucHV0LmZvcm0tY29udHJvbCB7XHJcbiAgICBib3JkZXI6IG5vbmU7XHJcbiAgICBiYWNrZ3JvdW5kOiAjMWQyYjRlO1xyXG4gICAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHdoaXRlO1xyXG4gICAgYm9yZGVyLXJhZGl1czogMDtcclxuICAgIGNvbG9yOiAjODg4ODg4O1xyXG59XHJcbi5idG4tcHJpbWFyeSB7XHJcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjMDMxMTMxIWltcG9ydGFudDtcclxuICAgIGJvcmRlci1jb2xvcjogdHJhbnNwYXJlbnQgIWltcG9ydGFudDtcclxuICAgIGNvbG9yOiAjZmZmIWltcG9ydGFudDtcclxuICAgIGJveC1zaGFkb3c6IG5vbmUhaW1wb3J0YW50O1xyXG59XHJcbi5jdXN0b20tc3dpdGNoLWluZGljYXRvciB7XHJcbiAgICBiYWNrZ3JvdW5kOiAjM2I3NGFkO1xyXG59Il19 */");

/***/ }),

/***/ "PXvV":
/*!*********************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/settings/manage-company/manage-company.component.html ***!
  \*********************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <h4> Manage Companies</h4></div>\r\n                    </div>\r\n                    <div class=\"col-9 text-right mt-2\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                          <button type=\"button\" data-toggle=\"modal\" data-target=\"#addLabels\" class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon mr-2 p-2\"><i class=\"fa fa-plus\"></i> Create Company\r\n                          </button>\r\n                          </div>                       \r\n                    </div>\r\n              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                    <thead>\r\n                      <tr>\r\n                        <th>Name</th>\r\n                        <th>Phone</th>\r\n                        <th>City</th>\r\n                        <th>State</th>\r\n                        <th>Country</th>\r\n                        <th>Postal Code</th>                        \r\n                        <th>Created Date</th>\r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let data of numbers\">\r\n                            <td><a (click)=\"editdata(data.uuid,data.name,data.phone,data.city,data.state,data.country,data.postal_code)\" href=\"#\" data-toggle=\"modal\" data-target=\"#editLabels\" class=\"text-white actionedit\">{{ data.name }}</a></td>\r\n                            <td>{{ data.phone }}</td>\r\n                            <td>{{ data.city }}</td>\r\n                            <td>{{ data.state }}</td>                          \r\n                            <td>{{ data.country }}</td>                          \r\n                            <td>{{ data.postal_code }}</td>                          \r\n                            <td>{{ data.created_at }}</td>\r\n                            <td>\r\n                                <a (click)=\"editdata(data.uuid,data.name,data.phone,data.city,data.state,data.country,data.postal_code)\" href=\"#\" data-toggle=\"modal\" data-target=\"#editLabels\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;\r\n                                <button (click)=\"Delete((data.id))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button>\r\n                            </td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>\r\n\r\n\r\n  <!-- Add Label Modal -->\r\n<div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog model-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Create Company</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"addLabel\" [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n        <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n            <div class=\"form-group\">\r\n                <label>Company Name</label>\r\n                <input formControlName=\"company_name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addcontrol.company_name.errors }\">\r\n                <div *ngIf=\"Submitted && addcontrol.company_name.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"addcontrol.company_name.errors.required\">Company Name is required</div>\r\n                </div>              \r\n             </div>\r\n           \r\n             <div class=\"form-group\">\r\n                <label>Phone Number</label>\r\n                <input formControlName=\"phone\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addcontrol.phone.errors }\">\r\n                <div *ngIf=\"Submitted && addcontrol.phone.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"addcontrol.phone.errors.required\">Phone Number is required</div>\r\n                </div>              \r\n             </div>\r\n           \r\n             <div class=\"row\">\r\n               <div class=\"col-4\">\r\n                <div class=\"form-group\">\r\n                  <label>City</label>\r\n                  <input formControlName=\"city\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addcontrol.city.errors }\">\r\n                  <div *ngIf=\"Submitted && addcontrol.city.errors\" class=\"invalid-feedback\">\r\n                      <div *ngIf=\"addcontrol.city.errors.required\">City is required</div>\r\n                  </div>              \r\n               </div>\r\n               </div>\r\n               <div class=\"col-4\">\r\n                <div class=\"form-group\">\r\n                  <label>State</label>\r\n                  <input formControlName=\"state\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addcontrol.state.errors }\">\r\n                  <div *ngIf=\"Submitted && addcontrol.state.errors\" class=\"invalid-feedback\">\r\n                      <div *ngIf=\"addcontrol.state.errors.required\">State is required</div>\r\n                  </div>              \r\n               </div>\r\n               </div>\r\n               <div class=\"col-4\">\r\n                <div class=\"form-group\">\r\n                  <label>Country</label>\r\n                  <input formControlName=\"country\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addcontrol.country.errors }\">\r\n                  <div *ngIf=\"Submitted && addcontrol.country.errors\" class=\"invalid-feedback\">\r\n                      <div *ngIf=\"addcontrol.country.errors.required\">Country is required</div>\r\n                  </div>              \r\n               </div>\r\n               </div>\r\n             </div>      \r\n             \r\n             <div class=\"form-group\">\r\n                <label>Postal Code</label>\r\n                <input formControlName=\"postal_code\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addcontrol.postal_code.errors }\">\r\n                <div *ngIf=\"Submitted && addcontrol.postal_code.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"addcontrol.postal_code.errors.required\">Postal Code is required</div>\r\n                </div>              \r\n            </div>           \r\n         </div>       \r\n     </div>\r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n         <!-- !addLabelForm.valid || -->\r\n           <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Company</button>\r\n           <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n          </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>   \r\n\r\n<!-- Edit Label Modal -->\r\n<div class=\"modal fade\" id=\"editLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog model-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Update Company Details</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"addLabel\" [formGroup]=\"editForm\" (ngSubmit)=\"onEditSubmit()\">\r\n        <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n            <div class=\"form-group\">\r\n                <label>Company Name</label>\r\n                <input formControlName=\"company_name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && editcontrol.company_name.errors }\">\r\n                <div *ngIf=\"Submitted && editcontrol.company_name.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"editcontrol.company_name.errors.required\">Company Name is required</div>\r\n                </div>              \r\n             </div>\r\n           \r\n             <div class=\"form-group\">\r\n                <label>Phone Number</label>\r\n                <input formControlName=\"phone\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && editcontrol.phone.errors }\">\r\n                <div *ngIf=\"Submitted && editcontrol.phone.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"editcontrol.phone.errors.required\">Phone Number is required</div>\r\n                </div>              \r\n             </div>\r\n           \r\n             <div class=\"row\">\r\n               <div class=\"col-4\">\r\n                <div class=\"form-group\">\r\n                  <label>City</label>\r\n                  <input formControlName=\"city\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && editcontrol.city.errors }\">\r\n                  <div *ngIf=\"Submitted && editcontrol.city.errors\" class=\"invalid-feedback\">\r\n                      <div *ngIf=\"editcontrol.city.errors.required\">City is required</div>\r\n                  </div>              \r\n               </div>\r\n               </div>\r\n               <div class=\"col-4\">\r\n                <div class=\"form-group\">\r\n                  <label>State</label>\r\n                  <input formControlName=\"state\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && editcontrol.state.errors }\">\r\n                  <div *ngIf=\"Submitted && editcontrol.state.errors\" class=\"invalid-feedback\">\r\n                      <div *ngIf=\"editcontrol.state.errors.required\">State is required</div>\r\n                  </div>              \r\n               </div>\r\n               </div>\r\n               <div class=\"col-4\">\r\n                <div class=\"form-group\">\r\n                  <label>Country</label>\r\n                  <input formControlName=\"country\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && editcontrol.country.errors }\">\r\n                  <div *ngIf=\"Submitted && editcontrol.country.errors\" class=\"invalid-feedback\">\r\n                      <div *ngIf=\"editcontrol.country.errors.required\">Country is required</div>\r\n                  </div>              \r\n               </div>\r\n               </div>\r\n             </div>      \r\n             \r\n             <div class=\"form-group\">\r\n                <label>Postal Code</label>\r\n                <input formControlName=\"postal_code\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && editcontrol.postal_code.errors }\">\r\n                <div *ngIf=\"Submitted && editcontrol.postal_code.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"editcontrol.postal_code.errors.required\">Postal Code is required</div>\r\n                </div>              \r\n            </div>           \r\n         </div>       \r\n     </div>\r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n         <!-- !addLabelForm.valid || -->\r\n           <button (click)=\"closeEditModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Update Company</button>\r\n           <button class=\"btn btn-primary\" data-dismiss=\"modal\" aria-label=\"Close\">Close</button>\r\n          </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>   ");

/***/ }),

/***/ "PsZA":
/*!************************************************************!*\
  !*** ./src/app/modules/dashboard/dashboard.component.scss ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".card .card-statistic-3 {\n  position: relative;\n  color: #fff;\n  overflow: hidden;\n  padding-bottom: 55px !important;\n  padding-top: 15px !important;\n  border-radius: 10px !important;\n}\n\n.card {\n  border-radius: 9px;\n}\n\nh6.mb-0 {\n  font-size: 17px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFxkYXNoYm9hcmQuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDSSxrQkFBQTtFQUNBLFdBQUE7RUFDQSxnQkFBQTtFQUNBLCtCQUFBO0VBQ0EsNEJBQUE7RUFDQSw4QkFBQTtBQUNKOztBQUVBO0VBRUksa0JBQUE7QUFBSjs7QUFJQTtFQUNJLGVBQUE7QUFESiIsImZpbGUiOiJkYXNoYm9hcmQuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuY2FyZCAuY2FyZC1zdGF0aXN0aWMtMyB7XHJcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XHJcbiAgICBjb2xvcjogI2ZmZjtcclxuICAgIG92ZXJmbG93OiBoaWRkZW47XHJcbiAgICBwYWRkaW5nLWJvdHRvbTogNTVweCFpbXBvcnRhbnQ7XHJcbiAgICBwYWRkaW5nLXRvcDogMTVweCFpbXBvcnRhbnQ7XHJcbiAgICBib3JkZXItcmFkaXVzOiAxMHB4IWltcG9ydGFudDsgICAgXHJcbn1cclxuXHJcbi5jYXJkIHtcclxuICAgIC8vIHBhZGRpbmc6IDEwcHggIWltcG9ydGFudDtcclxuICAgIGJvcmRlci1yYWRpdXM6IDlweDtcclxuXHJcbn1cclxuXHJcbmg2Lm1iLTAge1xyXG4gICAgZm9udC1zaXplOiAxN3B4O1xyXG59XHJcblxyXG4iXX0= */");

/***/ }),

/***/ "Q7a7":
/*!****************************************************************************************!*\
  !*** ./src/app/modules/verification-management/verification-management.component.scss ***!
  \****************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".rule-input {\n  width: 76%;\n  display: inline-block;\n}\n\n.rule-text-block {\n  width: 15%;\n  display: inline-block;\n  margin-right: 9%;\n  font-size: 13px;\n  font-weight: 500;\n}\n\n.btn-primary {\n  font-size: 12px !important;\n}\n\n.trashbtn {\n  font-size: 13px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFx2ZXJpZmljYXRpb24tbWFuYWdlbWVudC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLFVBQUE7RUFDQSxxQkFBQTtBQUNKOztBQUNBO0VBQ0ksVUFBQTtFQUNBLHFCQUFBO0VBQ0EsZ0JBQUE7RUFDQSxlQUFBO0VBQ0EsZ0JBQUE7QUFFSjs7QUFBQTtFQUNJLDBCQUFBO0FBR0o7O0FBREE7RUFDSSxlQUFBO0FBSUoiLCJmaWxlIjoidmVyaWZpY2F0aW9uLW1hbmFnZW1lbnQuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIucnVsZS1pbnB1dCB7XHJcbiAgICB3aWR0aDogNzYlO1xyXG4gICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG59XHJcbi5ydWxlLXRleHQtYmxvY2sge1xyXG4gICAgd2lkdGg6IDE1JTtcclxuICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcclxuICAgIG1hcmdpbi1yaWdodDogOSU7XHJcbiAgICBmb250LXNpemU6IDEzcHg7XHJcbiAgICBmb250LXdlaWdodDogNTAwO1xyXG59XHJcbi5idG4tcHJpbWFyeSB7XHJcbiAgICBmb250LXNpemU6IDEycHghaW1wb3J0YW50O1xyXG59XHJcbi50cmFzaGJ0bntcclxuICAgIGZvbnQtc2l6ZTogMTNweDtcclxufSJdfQ== */");

/***/ }),

/***/ "QazC":
/*!********************************************************************!*\
  !*** ./src/app/modules/label/label-view/label-view.component.scss ***!
  \********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJsYWJlbC12aWV3LmNvbXBvbmVudC5zY3NzIn0= */");

/***/ }),

/***/ "QkTB":
/*!**************************************************************************************!*\
  !*** ./src/app/modules/ivr-menus/ivr-routing-plans/ivr-routing-plans.component.scss ***!
  \**************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJpdnItcm91dGluZy1wbGFucy5jb21wb25lbnQuc2NzcyJ9 */");

/***/ }),

/***/ "QxI7":
/*!**************************************************************!*\
  !*** ./src/app/modules/label/ngxdemo/ngxdemo.component.scss ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJuZ3hkZW1vLmNvbXBvbmVudC5zY3NzIn0= */");

/***/ }),

/***/ "R3RD":
/*!************************************************************************************!*\
  !*** ./src/app/modules/ivr-menus/ivr-routing-plans/ivr-routing-plans.component.ts ***!
  \************************************************************************************/
/*! exports provided: IVRRoutingPlansComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IVRRoutingPlansComponent", function() { return IVRRoutingPlansComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_ivr_routing_plans_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./ivr-routing-plans.component.html */ "R5XG");
/* harmony import */ var _ivr_routing_plans_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ivr-routing-plans.component.scss */ "QkTB");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../global */ "XrUY");












const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let IVRRoutingPlansComponent = class IVRRoutingPlansComponent {
    constructor(moduleservice, toastrService, handler, fb, changedetect) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.changedetect = changedetect;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.settingToggleAccessToRecordingsvaldata = 0;
        this.settingToggleBlockCallsIfCappeddata = 0;
        this.checkboxes = [];
        this.settingToggleBlockCallsIfCappededit = 0;
        this.settingToggleAccessToRecordingsedit = 0;
        this.Submitted = false;
        this.editSubmitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadivrplans();
        // this.loadNumbers();
        this.addForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            sub_id: [''],
            number_creation: [''],
            settingToggleBlockCallsIfCapped: [''],
            settingToggleAccessToRecordings: [''],
        });
        this.editForm = this.fb.group({
            uuid: [''],
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            sub_id: [''],
            number_creation: [''],
            settingToggleBlockCallsIfCapped: [''],
            settingToggleAccessToRecordings: [''],
        });
    }
    ngAfterViewInit() {
        this.changedetect.detectChanges();
    }
    loadivrplans() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[0, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getIVRPlans/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "name" }, { data: "created_at" }, { data: "action" },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    editdata(uuid, name, sub_id, create_number, settingToggleBlockCallsIfCapped, settingToggleAccessToRecordings) {
        this.settingToggleAccessToRecordingsvaldata = settingToggleAccessToRecordings;
        this.settingToggleBlockCallsIfCappeddata = settingToggleBlockCallsIfCapped;
        this.editForm.patchValue({
            uuid: uuid,
            name: name,
            sub_id: sub_id,
            number_creation: create_number,
            settingToggleBlockCallsIfCapped: settingToggleBlockCallsIfCapped,
            settingToggleAccessToRecordings: settingToggleAccessToRecordings,
        });
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    // onDeleteSubmit(){    
    //   if(this.checkboxes.length==0){
    //     this.toastrService.error('Please Select Row To Delete');
    //   }else{
    //     // console.log(this.checkboxes);  
    //     Swal.fire({
    //       title: 'Are you sure?',
    //       text: 'You want to Delete Selected Record!',
    //       type: 'warning',
    //       showCancelButton: true,
    //       confirmButtonText: 'Yes, delete it!',
    //       cancelButtonText: 'No, keep it'
    //     }).then((result) => {
    //       if (result.value) {
    //         this.moduleservice.deleteSelectedNumbers(this.checkboxes).subscribe(
    //           res => {
    //               Swal.fire(
    //                 'Deleted!',
    //                 'Records Deleted Successfully.',
    //                 'success',                
    //               )
    //               setTimeout(() => {
    //                 Swal.close()
    //               }, 2000);
    //               this.loadivrplans();
    //             },
    //             error => this.error = error
    //         );      
    //       } else if (result.dismiss === Swal.DismissReason.cancel) {
    //         Swal.fire(
    //           'Cancelled',
    //           'Your Record is safe :)',
    //           'error'
    //         )
    //         setTimeout(() => {
    //           Swal.close()
    //         }, 2000);
    //       }
    //     });
    //   }
    // }
    Delete(planuuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteIVRRoutingPlan(planuuid, currentUser.uuid).subscribe(res => {
                    // console.log(res);return false;
                    this.loadivrplans();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    settingToggleBlockCallsIfCappedval(val) {
        this.addForm.get('settingToggleBlockCallsIfCapped').setValue(val);
    }
    settingToggleAccessToRecordingsval(val) {
        this.addForm.get('settingToggleAccessToRecordings').setValue(val);
    }
    settingToggleBlockCallsIfCappedvaledit(val) {
        this.settingToggleBlockCallsIfCappededit = val;
        this.editForm.get('settingToggleBlockCallsIfCapped').setValue(val);
    }
    settingToggleAccessToRecordingsvaledit(val) {
        this.settingToggleAccessToRecordingsedit = val;
        this.editForm.get('settingToggleAccessToRecordings').setValue(val);
    }
    //Add Publisher
    get addformcontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('name', this.addForm.get('name').value);
        formData.append('sub_id', this.addForm.get('sub_id').value);
        formData.append('number_creation', this.addForm.get('number_creation').value);
        formData.append('settingToggleBlockCallsIfCapped', this.addForm.get('settingToggleBlockCallsIfCapped').value);
        formData.append('settingToggleAccessToRecordings', this.addForm.get('settingToggleAccessToRecordings').value);
        // console.log(formData); return false;
        this.moduleservice.addPublisher(formData).subscribe(res => {
            // console.log(res.status); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Publisher Added Successfully');
                this.loadivrplans();
                this.Submitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    //Add Buyer
    get editFormcontrol() { return this.editForm.controls; }
    onEditSubmit() {
        // alert('ok');return false;
        const formData = new FormData();
        this.editSubmitted = true;
        if (this.editForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('uuid', this.editForm.get('uuid').value);
        formData.append('name', this.editForm.get('name').value);
        formData.append('sub_id', this.editForm.get('sub_id').value);
        formData.append('number_creation', this.editForm.get('number_creation').value);
        formData.append('settingToggleBlockCallsIfCapped', this.editForm.get('settingToggleBlockCallsIfCapped').value);
        formData.append('settingToggleAccessToRecordings', this.editForm.get('settingToggleAccessToRecordings').value);
        // console.log(formData); 
        this.moduleservice.editPublisher(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Publisher Updated Successfully');
                this.loadivrplans();
                this.editSubmitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (this.addForm.get('name').value != '') {
            $("#addLabels").modal("hide");
            // $(".custom-switch-input").prop('checked',false);
            this.Submitted = false;
            setTimeout(() => { this.addForm.reset(); }, 2000);
        }
    }
    closeEditModal() {
        if (this.editForm.get('name').value != '') {
            $("#editLabels").modal("hide");
            this.editSubmitted = false;
            setTimeout(() => { this.editForm.reset(); }, 2000);
        }
    }
    Status(id, status) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to change Status!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, Change it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.changeCampaignstatus(id, status).subscribe(res => {
                    this.loadivrplans();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Changed!', 'Status Changes Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
};
IVRRoutingPlansComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ChangeDetectorRef"] }
];
IVRRoutingPlansComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewChild"], args: ['dataTable', { static: true },] }]
};
IVRRoutingPlansComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-ivr-routing-plans',
        template: _raw_loader_ivr_routing_plans_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_ivr_routing_plans_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], IVRRoutingPlansComponent);



/***/ }),

/***/ "R5XG":
/*!****************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/ivr-menus/ivr-routing-plans/ivr-routing-plans.component.html ***!
  \****************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <h4 class=\"text-white\"> Manage Routing Plans\r\n                        </h4></div>\r\n                    </div>\r\n                    <div class=\"col-9 text-right mt-2\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                          <a [routerLink]=\"['/ivrplan-add']\" routerLinkActive=\"router-link-active\"  class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon mr-2 p-2\"><i class=\"fa fa-plus\"></i> Create Routing Plan\r\n                          </a>\r\n                          </div>                       \r\n                    </div>\r\n              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                    <thead>\r\n                      <tr>\r\n                        <th>Name</th>\r\n                        <th>Created At</th>                        \r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let data of numbers\">\r\n                            <td><a href=\"#\" routerLink=\"/ivrplan-edit/{{data.uuid}}\" routerLinkActive=\"router-link-active\"  class=\"text-white actionedit\">{{ data.name }}</a></td>\r\n                            <td>{{ data.created_at }}</td>\r\n                            <td><a href=\"#\" routerLink=\"/ivrplan-edit/{{data.uuid}}\" routerLinkActive=\"router-link-active\"  class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;<button (click)=\"Delete((data.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button>\r\n                            </td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>\r\n");

/***/ }),

/***/ "RFB6":
/*!**********************************************************!*\
  !*** ./src/app/modules/longlist/longlist.component.scss ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJsb25nbGlzdC5jb21wb25lbnQuc2NzcyJ9 */");

/***/ }),

/***/ "RguX":
/*!******************************************************************!*\
  !*** ./src/app/modules/audible-ring/audible-ring.component.scss ***!
  \******************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("::-webkit-scrollbar {\n  width: 1px;\n}\n\n::-webkit-scrollbar-track {\n  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);\n  border-radius: 10px;\n}\n\n::-webkit-scrollbar-thumb {\n  border-radius: 10px;\n  background: rgba(192, 192, 192, 0.3);\n  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);\n}\n\n::-webkit-scrollbar-thumb:window-inactive {\n  background: rgba(255, 0, 0, 0.4);\n}\n\ninput.form-control {\n  padding: 7px 15px !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFxhdWRpYmxlLXJpbmcuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0E7RUFDSSxVQUFBO0FBQUo7O0FBSUE7RUFDSSxvREFBQTtFQUVBLG1CQUFBO0FBREo7O0FBSUE7RUFFSSxtQkFBQTtFQUNBLG9DQUFBO0VBQ0Esb0RBQUE7QUFESjs7QUFHQTtFQUNJLGdDQUFBO0FBQUo7O0FBR0E7RUFDSSw0QkFBQTtBQUFKIiwiZmlsZSI6ImF1ZGlibGUtcmluZy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIlxyXG46Oi13ZWJraXQtc2Nyb2xsYmFyIHtcclxuICAgIHdpZHRoOiAxcHg7XHJcbn1cclxuXHJcblxyXG46Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNrIHtcclxuICAgIC13ZWJraXQtYm94LXNoYWRvdzogaW5zZXQgMCAwIDZweCByZ2JhKDAsMCwwLDAuMyk7IFxyXG4gICAgLXdlYmtpdC1ib3JkZXItcmFkaXVzOiAxMHB4O1xyXG4gICAgYm9yZGVyLXJhZGl1czogMTBweDtcclxufVxyXG5cclxuOjotd2Via2l0LXNjcm9sbGJhci10aHVtYiB7XHJcbiAgICAtd2Via2l0LWJvcmRlci1yYWRpdXM6IDEwcHg7XHJcbiAgICBib3JkZXItcmFkaXVzOiAxMHB4O1xyXG4gICAgYmFja2dyb3VuZDogcmdiYSgxOTIsMTkyLDE5MiwwLjMpO1xyXG4gICAgLXdlYmtpdC1ib3gtc2hhZG93OiBpbnNldCAwIDAgNnB4IHJnYmEoMCwwLDAsMC41KTsgXHJcbn1cclxuOjotd2Via2l0LXNjcm9sbGJhci10aHVtYjp3aW5kb3ctaW5hY3RpdmUge1xyXG4gICAgYmFja2dyb3VuZDogcmdiYSgyNTUsMCwwLDAuNCk7IFxyXG59XHJcblxyXG5pbnB1dC5mb3JtLWNvbnRyb2wge1xyXG4gICAgcGFkZGluZzogN3B4IDE1cHghaW1wb3J0YW50O1xyXG59Il19 */");

/***/ }),

/***/ "RnhZ":
/*!**************************************************!*\
  !*** ./node_modules/moment/locale sync ^\.\/.*$ ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var map = {
	"./af": "K/tc",
	"./af.js": "K/tc",
	"./ar": "jnO4",
	"./ar-dz": "o1bE",
	"./ar-dz.js": "o1bE",
	"./ar-kw": "Qj4J",
	"./ar-kw.js": "Qj4J",
	"./ar-ly": "HP3h",
	"./ar-ly.js": "HP3h",
	"./ar-ma": "CoRJ",
	"./ar-ma.js": "CoRJ",
	"./ar-sa": "gjCT",
	"./ar-sa.js": "gjCT",
	"./ar-tn": "bYM6",
	"./ar-tn.js": "bYM6",
	"./ar.js": "jnO4",
	"./az": "SFxW",
	"./az.js": "SFxW",
	"./be": "H8ED",
	"./be.js": "H8ED",
	"./bg": "hKrs",
	"./bg.js": "hKrs",
	"./bm": "p/rL",
	"./bm.js": "p/rL",
	"./bn": "kEOa",
	"./bn-bd": "loYQ",
	"./bn-bd.js": "loYQ",
	"./bn.js": "kEOa",
	"./bo": "0mo+",
	"./bo.js": "0mo+",
	"./br": "aIdf",
	"./br.js": "aIdf",
	"./bs": "JVSJ",
	"./bs.js": "JVSJ",
	"./ca": "1xZ4",
	"./ca.js": "1xZ4",
	"./cs": "PA2r",
	"./cs.js": "PA2r",
	"./cv": "A+xa",
	"./cv.js": "A+xa",
	"./cy": "l5ep",
	"./cy.js": "l5ep",
	"./da": "DxQv",
	"./da.js": "DxQv",
	"./de": "tGlX",
	"./de-at": "s+uk",
	"./de-at.js": "s+uk",
	"./de-ch": "u3GI",
	"./de-ch.js": "u3GI",
	"./de.js": "tGlX",
	"./dv": "WYrj",
	"./dv.js": "WYrj",
	"./el": "jUeY",
	"./el.js": "jUeY",
	"./en-au": "Dmvi",
	"./en-au.js": "Dmvi",
	"./en-ca": "OIYi",
	"./en-ca.js": "OIYi",
	"./en-gb": "Oaa7",
	"./en-gb.js": "Oaa7",
	"./en-ie": "4dOw",
	"./en-ie.js": "4dOw",
	"./en-il": "czMo",
	"./en-il.js": "czMo",
	"./en-in": "7C5Q",
	"./en-in.js": "7C5Q",
	"./en-nz": "b1Dy",
	"./en-nz.js": "b1Dy",
	"./en-sg": "t+mt",
	"./en-sg.js": "t+mt",
	"./eo": "Zduo",
	"./eo.js": "Zduo",
	"./es": "iYuL",
	"./es-do": "CjzT",
	"./es-do.js": "CjzT",
	"./es-mx": "tbfe",
	"./es-mx.js": "tbfe",
	"./es-us": "Vclq",
	"./es-us.js": "Vclq",
	"./es.js": "iYuL",
	"./et": "7BjC",
	"./et.js": "7BjC",
	"./eu": "D/JM",
	"./eu.js": "D/JM",
	"./fa": "jfSC",
	"./fa.js": "jfSC",
	"./fi": "gekB",
	"./fi.js": "gekB",
	"./fil": "1ppg",
	"./fil.js": "1ppg",
	"./fo": "ByF4",
	"./fo.js": "ByF4",
	"./fr": "nyYc",
	"./fr-ca": "2fjn",
	"./fr-ca.js": "2fjn",
	"./fr-ch": "Dkky",
	"./fr-ch.js": "Dkky",
	"./fr.js": "nyYc",
	"./fy": "cRix",
	"./fy.js": "cRix",
	"./ga": "USCx",
	"./ga.js": "USCx",
	"./gd": "9rRi",
	"./gd.js": "9rRi",
	"./gl": "iEDd",
	"./gl.js": "iEDd",
	"./gom-deva": "qvJo",
	"./gom-deva.js": "qvJo",
	"./gom-latn": "DKr+",
	"./gom-latn.js": "DKr+",
	"./gu": "4MV3",
	"./gu.js": "4MV3",
	"./he": "x6pH",
	"./he.js": "x6pH",
	"./hi": "3E1r",
	"./hi.js": "3E1r",
	"./hr": "S6ln",
	"./hr.js": "S6ln",
	"./hu": "WxRl",
	"./hu.js": "WxRl",
	"./hy-am": "1rYy",
	"./hy-am.js": "1rYy",
	"./id": "UDhR",
	"./id.js": "UDhR",
	"./is": "BVg3",
	"./is.js": "BVg3",
	"./it": "bpih",
	"./it-ch": "bxKX",
	"./it-ch.js": "bxKX",
	"./it.js": "bpih",
	"./ja": "B55N",
	"./ja.js": "B55N",
	"./jv": "tUCv",
	"./jv.js": "tUCv",
	"./ka": "IBtZ",
	"./ka.js": "IBtZ",
	"./kk": "bXm7",
	"./kk.js": "bXm7",
	"./km": "6B0Y",
	"./km.js": "6B0Y",
	"./kn": "PpIw",
	"./kn.js": "PpIw",
	"./ko": "Ivi+",
	"./ko.js": "Ivi+",
	"./ku": "JCF/",
	"./ku.js": "JCF/",
	"./ky": "lgnt",
	"./ky.js": "lgnt",
	"./lb": "RAwQ",
	"./lb.js": "RAwQ",
	"./lo": "sp3z",
	"./lo.js": "sp3z",
	"./lt": "JvlW",
	"./lt.js": "JvlW",
	"./lv": "uXwI",
	"./lv.js": "uXwI",
	"./me": "KTz0",
	"./me.js": "KTz0",
	"./mi": "aIsn",
	"./mi.js": "aIsn",
	"./mk": "aQkU",
	"./mk.js": "aQkU",
	"./ml": "AvvY",
	"./ml.js": "AvvY",
	"./mn": "lYtQ",
	"./mn.js": "lYtQ",
	"./mr": "Ob0Z",
	"./mr.js": "Ob0Z",
	"./ms": "6+QB",
	"./ms-my": "ZAMP",
	"./ms-my.js": "ZAMP",
	"./ms.js": "6+QB",
	"./mt": "G0Uy",
	"./mt.js": "G0Uy",
	"./my": "honF",
	"./my.js": "honF",
	"./nb": "bOMt",
	"./nb.js": "bOMt",
	"./ne": "OjkT",
	"./ne.js": "OjkT",
	"./nl": "+s0g",
	"./nl-be": "2ykv",
	"./nl-be.js": "2ykv",
	"./nl.js": "+s0g",
	"./nn": "uEye",
	"./nn.js": "uEye",
	"./oc-lnc": "Fnuy",
	"./oc-lnc.js": "Fnuy",
	"./pa-in": "8/+R",
	"./pa-in.js": "8/+R",
	"./pl": "jVdC",
	"./pl.js": "jVdC",
	"./pt": "8mBD",
	"./pt-br": "0tRk",
	"./pt-br.js": "0tRk",
	"./pt.js": "8mBD",
	"./ro": "lyxo",
	"./ro.js": "lyxo",
	"./ru": "lXzo",
	"./ru.js": "lXzo",
	"./sd": "Z4QM",
	"./sd.js": "Z4QM",
	"./se": "//9w",
	"./se.js": "//9w",
	"./si": "7aV9",
	"./si.js": "7aV9",
	"./sk": "e+ae",
	"./sk.js": "e+ae",
	"./sl": "gVVK",
	"./sl.js": "gVVK",
	"./sq": "yPMs",
	"./sq.js": "yPMs",
	"./sr": "zx6S",
	"./sr-cyrl": "E+lV",
	"./sr-cyrl.js": "E+lV",
	"./sr.js": "zx6S",
	"./ss": "Ur1D",
	"./ss.js": "Ur1D",
	"./sv": "X709",
	"./sv.js": "X709",
	"./sw": "dNwA",
	"./sw.js": "dNwA",
	"./ta": "PeUW",
	"./ta.js": "PeUW",
	"./te": "XLvN",
	"./te.js": "XLvN",
	"./tet": "V2x9",
	"./tet.js": "V2x9",
	"./tg": "Oxv6",
	"./tg.js": "Oxv6",
	"./th": "EOgW",
	"./th.js": "EOgW",
	"./tk": "Wv91",
	"./tk.js": "Wv91",
	"./tl-ph": "Dzi0",
	"./tl-ph.js": "Dzi0",
	"./tlh": "z3Vd",
	"./tlh.js": "z3Vd",
	"./tr": "DoHr",
	"./tr.js": "DoHr",
	"./tzl": "z1FC",
	"./tzl.js": "z1FC",
	"./tzm": "wQk9",
	"./tzm-latn": "tT3J",
	"./tzm-latn.js": "tT3J",
	"./tzm.js": "wQk9",
	"./ug-cn": "YRex",
	"./ug-cn.js": "YRex",
	"./uk": "raLr",
	"./uk.js": "raLr",
	"./ur": "UpQW",
	"./ur.js": "UpQW",
	"./uz": "Loxo",
	"./uz-latn": "AQ68",
	"./uz-latn.js": "AQ68",
	"./uz.js": "Loxo",
	"./vi": "KSF8",
	"./vi.js": "KSF8",
	"./x-pseudo": "/X5v",
	"./x-pseudo.js": "/X5v",
	"./yo": "fzPg",
	"./yo.js": "fzPg",
	"./zh-cn": "XDpg",
	"./zh-cn.js": "XDpg",
	"./zh-hk": "SatO",
	"./zh-hk.js": "SatO",
	"./zh-mo": "OmwH",
	"./zh-mo.js": "OmwH",
	"./zh-tw": "kOpN",
	"./zh-tw.js": "kOpN"
};


function webpackContext(req) {
	var id = webpackContextResolve(req);
	return __webpack_require__(id);
}
function webpackContextResolve(req) {
	if(!__webpack_require__.o(map, req)) {
		var e = new Error("Cannot find module '" + req + "'");
		e.code = 'MODULE_NOT_FOUND';
		throw e;
	}
	return map[req];
}
webpackContext.keys = function webpackContextKeys() {
	return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "RnhZ";

/***/ }),

/***/ "SOV7":
/*!*****************************************************************************!*\
  !*** ./src/app/modules/settings/basic-setting/basic-setting.component.scss ***!
  \*****************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJiYXNpYy1zZXR0aW5nLmNvbXBvbmVudC5zY3NzIn0= */");

/***/ }),

/***/ "Sy1n":
/*!**********************************!*\
  !*** ./src/app/app.component.ts ***!
  \**********************************/
/*! exports provided: AppComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppComponent", function() { return AppComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_app_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./app.component.html */ "VzVu");
/* harmony import */ var _app_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app.component.scss */ "ynWL");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _auth_auth_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./auth/auth.service */ "qXBG");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./global */ "XrUY");
/* harmony import */ var _modules_messaging_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/messaging.service */ "ee52");
/* harmony import */ var _app_modules_module_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../app/modules/module.service */ "zTpG");









// import { SwUpdate, SwPush } from '@angular';
const MINUTES_UNITL_AUTO_LOGOUT = 60; // in mins
const CHECK_INTERVAL = 10000; // in ms
const STORE_KEY = 'lastAction';
let AppComponent = class AppComponent {
    constructor(router, activatedRoute, authService, messagingService, moduleservice) {
        this.router = router;
        this.activatedRoute = activatedRoute;
        this.authService = authService;
        this.messagingService = messagingService;
        this.moduleservice = moduleservice;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_6__["GlobalVariable"].BASE_URL;
        this.title = 'Dial-Digits';
        // console.log(this.router.url)
        this.check();
        this.initListener();
        this.initInterval();
        localStorage.setItem(STORE_KEY, Date.now().toString());
        this.activatedRoute.params.subscribe((data) => {
            this.routeurl = data.id;
        });
    }
    getLastAction() {
        return parseInt(localStorage.getItem(STORE_KEY));
    }
    setLastAction(lastAction) {
        localStorage.setItem(STORE_KEY, lastAction.toString());
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 5000);
        // console.log(this.ServerUrl);
        // console.log(window.location.href);
        this.routeurl = window.location.href.replace(this.ServerUrl + 'publisher-registration/', "");
        this.emailurl = window.location.href.replace(this.ServerUrl + 'verify-email/', "");
        // console.log(this.routeurl);
        // this.checkcompanyavail(this.routeurl);
        $('body:has(.login)').addClass('redBorder');
        this.messagingService.requestPermission();
        this.messagingService.receiveMessage();
        this.message = this.messagingService.currentMessage;
    }
    ;
    checkcompanyavail(company_uuid) {
        this.moduleservice.checkcompanyavail(company_uuid).subscribe(res => {
            console.log('gettting');
            console.log(res.isavail);
            if (res.isavail !== 1) {
                this.router.navigate(['./404']);
            }
            //  this.email = res['email'];     
        });
    }
    initListener() {
        document.body.addEventListener('click', () => this.reset());
        document.body.addEventListener('mouseover', () => this.reset());
        document.body.addEventListener('mouseout', () => this.reset());
        document.body.addEventListener('keydown', () => this.reset());
        document.body.addEventListener('keyup', () => this.reset());
        document.body.addEventListener('keypress', () => this.reset());
    }
    reset() {
        this.setLastAction(Date.now());
    }
    initInterval() {
        setInterval(() => {
            this.check();
        }, CHECK_INTERVAL);
    }
    check() {
        const now = Date.now();
        const timeleft = this.getLastAction() + MINUTES_UNITL_AUTO_LOGOUT * 60 * 1000;
        const diff = timeleft - now;
        const isTimeout = diff < 0;
        if (isTimeout) {
            this.authService.logout();
            this.router.navigate(['./login']);
        }
    }
};
AppComponent.ctorParameters = () => [
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["ActivatedRoute"] },
    { type: _auth_auth_service__WEBPACK_IMPORTED_MODULE_5__["AuthService"] },
    { type: _modules_messaging_service__WEBPACK_IMPORTED_MODULE_7__["MessagingService"] },
    { type: _app_modules_module_service__WEBPACK_IMPORTED_MODULE_8__["ModuleService"] }
];
AppComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-root',
        template: _raw_loader_app_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_app_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], AppComponent);

// setInterval(() => {
//   this.authService.logout();
// }, 1 * 60 * 1000);
// this.islogin = this.authService.isLoggedIn();
// if(this.islogin=='false'){
// console.log(this.islogin);  
// this.router.navigate(['/login']);
// }  
// @HostListener("window:onbeforeunload",["$event"])
// clearLocalStorage(event){
//     // localStorage.clear();
//     alert('kk')
//     localStorage.removeItem('currentuser');
// }
// @HostListener('window:beforeunload', [ '$event' ])
// @HostListener('click')
// onclick() {
//   alert('kk')
// }
// @HostListener('window:beforeunload', ['$event'])
//    public beforeunloadHandler($event) {
//    $event.returnValue = "Are you sure?";
//   }
// @HostListener('window:unload', [ '$event' ])
// unloadHandler(event) {
//   alert('kk')
// }


/***/ }),

/***/ "Sy3i":
/*!**************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/whitelist/whitelist.component.html ***!
  \**************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n<!-- Add Number Modal -->\r\n<div class=\"modal  fade\" id=\"addNumber\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\">\r\n   <div class=\"modal-content\">\r\n     <div class=\"modal-header\">\r\n       <h5 class=\"modal-title\" id=\"formModal\">Add Number</h5>\r\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n         <span aria-hidden=\"true\">&times;</span>\r\n       </button>\r\n     </div>\r\n     <div class=\"modal-body\">\r\n       <form id=\"addNumber\" [formGroup]=\"addNumberForm\" (ngSubmit)=\"onNumberSubmit()\">\r\n         <div class=\"form-group\">\r\n             <label>Number</label>\r\n             <input formControlName=\"number\" id=\"number\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': numberSubmitted && numbercontrol.number.errors }\" (keypress)=_keyPress($event) placeholder=\"(000) 000 - 0000\" maxlength=\"16\">\r\n             <div *ngIf=\"numberSubmitted && numbercontrol.number.errors\" class=\"invalid-feedback\">\r\n                 <div *ngIf=\"numbercontrol.number.errors.required\">Number is required</div>\r\n             </div>                           \r\n          </div>\r\n\r\n          <div class=\"modal-footer\" style=\"padding: 0;\">\r\n            <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Number</button>\r\n            <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n           </div>\r\n       </form>\r\n     </div>\r\n   </div>\r\n </div>\r\n </div>   \r\n\r\n<!-- Edit Number Modal -->\r\n<div class=\"modal  fade\" id=\"editNumber\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\">\r\n   <div class=\"modal-content\">\r\n     <div class=\"modal-header\">\r\n       <h5 class=\"modal-title\" id=\"formModal\">Save Number</h5>\r\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n         <span aria-hidden=\"true\">&times;</span>\r\n       </button>\r\n     </div>\r\n     <div class=\"modal-body\">\r\n       <form [formGroup]=\"editNumberForm\" (ngSubmit)=\"onNumberEditSubmit()\">\r\n         <div class=\"form-group\">\r\n             <label>Number</label>\r\n             <input type=\"hidden\" name=\"uuid\" formControlName=\"uuid\">\r\n             <input formControlName=\"number\" id=\"editnumber\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': numbereditSubmitted && numbereditcontrol.number.errors }\" (keypress)=_keyPress($event) placeholder=\"(000) 000 - 0000\" maxlength=\"16\">\r\n             <div *ngIf=\"numbereditSubmitted && numbereditcontrol.number.errors\" class=\"invalid-feedback\">\r\n                 <div *ngIf=\"numbereditcontrol.number.errors.required\">Number is required</div>\r\n             </div>           \r\n           </div>\r\n           \r\n         <div class=\"modal-footer\" style=\"padding: 0;\">\r\n            <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Save Number</button>\r\n            <button type=\"button\" class=\"btn btn-secondary m-t-15 waves-effect\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n              Close\r\n            </button>\r\n           </div>\r\n       </form>\r\n     </div>\r\n   </div>\r\n </div>\r\n </div>    \r\n\r\n  <div class=\"main-content\">\r\n  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-8\">\r\n                        <div class=\"card-header\">\r\n                        <h4>Whitelist Numbers</h4></div>\r\n                    </div>\r\n                    <div class=\"col-4 text-right mt-2\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                           <button data-toggle=\"modal\" data-target=\"#addNumber\" class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon p-2 mr-2\"><i class=\"fa fa-plus\"></i> Add Number\r\n                            </button>\r\n                            <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fa fa-trash\"></i> Delete Selected\r\n                            </button>\r\n                          </div>                       \r\n                    </div>\r\n              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                    <thead>\r\n                      <tr>\r\n                        <th style=\"padding: 10px;\">\r\n                          <div class=\"custom-control custom-checkbox\" *ngIf=\"numbers?.length != 0\">\r\n                          <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                          <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                          </div>\r\n                        </th>\r\n                        <th>Number</th>\r\n                        <th>Created Date</th>\r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let number of numbers;let i=index\">\r\n                            <td>\r\n                                <div class=\"custom-control custom-checkbox\">\r\n                                <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{number.uuid}}\"  [checked]=\"number.selected\" [value]=\"number.id\" >\r\n                                <label class=\"custom-control-label\" for=\"customCheck_{{number.uuid}}\"></label>\r\n                                </div>                                \r\n                            </td>\r\n                            <td>{{ number.number }}</td>\r\n                            <td>{{ number.created_at }}</td>\r\n                            <td><button (click)=\"editNumber(number.uuid,number.number)\" data-toggle=\"modal\" data-target=\"#editNumber\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></button>&nbsp;<button (click)=\"Delete((number.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>  ");

/***/ }),

/***/ "T5Kb":
/*!****************************************************************************!*\
  !*** ./src/app/modules/reports-comparison/reports-comparison.component.ts ***!
  \****************************************************************************/
/*! exports provided: ReportsComparisonComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReportsComparisonComponent", function() { return ReportsComparisonComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_reports_comparison_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./reports-comparison.component.html */ "mdDg");
/* harmony import */ var _reports_comparison_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reports-comparison.component.scss */ "hLQq");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-csv/ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! moment */ "wd/R");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! datatables.net */ "FlOX");
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(datatables_net__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var angular_highcharts__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! angular-highcharts */ "a0Xn");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! highcharts/modules/exporting */ "AxlJ");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! highcharts */ "6n/F");
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(highcharts__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! moment-timezone */ "f0Wu");
/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(moment_timezone__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var ngx_ui_loader__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ngx-ui-loader */ "gren");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! rxjs */ "qCKp");
/* harmony import */ var rxjs_add_observable_interval__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! rxjs/add/observable/interval */ "TGZE");
/* harmony import */ var rxjs_add_observable_interval__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(rxjs_add_observable_interval__WEBPACK_IMPORTED_MODULE_20__);


















highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_15___default()(highcharts__WEBPACK_IMPORTED_MODULE_16__);



const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
class filterarr {
}
let ReportsComparisonComponent = class ReportsComparisonComponent {
    // subscriptions : Subscription[];
    constructor(moduleservice, toastrService, handler, fb, route, router, el, ngxLoader, cdRef) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.route = route;
        this.router = router;
        this.el = el;
        this.ngxLoader = ngxLoader;
        this.cdRef = cdRef;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.numbers = '';
        this.dtOptions = {};
        this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_19__["Subject"]();
        this.dtOptionsdetails = {};
        this.labels = 0;
        this.callsdata = [];
        this.submitted = false;
        this.event = "";
        this.expanded = {};
        this.rows = [];
        this.ranges = {
            Today: [moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__(), "America/Phoenix").format("MM/DD/YYYY"), moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__(), "America/Phoenix").format("MM/DD/YYYY")],
            Yesterday: [moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__().subtract(1, 'days'), "America/Phoenix").format("MM/DD/YYYY"), moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__().subtract(1, 'days'), "America/Phoenix").format("MM/DD/YYYY")],
        };
        this.ngxclass = "dark";
        this.ischart = 0;
        this.colorcode = '#fff';
        this.noofrecords = 500;
        this.isclick = 0;
        this.istougle = 1;
        this.filtertype = 1;
        this.filtervalue = '';
        this.filterdate = '';
        this.isadded = 1;
        this.isfiltered = 0;
        this.isselectElement = 0;
        this.filterselected = [];
        this.charttype = "Calls Per Hour";
        this.daytypeval = 1;
        $("#summarytbl").dataTable().fnDestroy();
        this.dtOptions = {
            "order": [],
            paging: false,
            searching: false,
            info: false,
        };
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        this.router.routeReuseStrategy.shouldReuseRoute = () => false;
        this.alwaysShowCalendars = true;
        this.keepCalendarOpeningWithRange = true;
        this.showRangeLabelOnInput = true;
        this.selected = { startDate: moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__(), "America/Phoenix").format("MM/DD/YYYY"), endDate: moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__(), "America/Phoenix").format("MM/DD/YYYY") };
        this.selected_2 = { startDate: moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__(), "America/Phoenix").format("MM/DD/YYYY"), endDate: moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__(), "America/Phoenix").format("MM/DD/YYYY") };
        this.selected1 = this.selected;
        this.selected2 = this.selected;
    }
    onPage(event) {
        clearTimeout(this.timeout);
        this.timeout = setTimeout(() => {
            console.log('paged!', event);
        }, 100);
    }
    sendMenuUpdateMessage() {
        // send message to subscribers via observable subject
        this.moduleservice.sendMenuUpdateMessage('1');
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        const uuid = this.route.snapshot.paramMap.get('id');
        // console.log(uuid);
        if (uuid != null) {
            // this.getsavedreports(uuid);
        }
        else {
            // this.loadcalls("","");
            // this.loadcallsdata("","","",1);
            // this.getChartNumberOfCalls(0,0,0,2);
            // this.getsavedreports();
        }
        if ($("body").hasClass("theme-white")) {
            this.ngxclass = 'material';
        }
    }
    getChartNumberOfCalls(filterselected, date, date_2, daytype) {
        this.showLoadingIndicator = true;
        this.ngxLoader.startLoader('loader-03');
        if ($("html").hasClass("theme-light")) {
            this.bgcolorcode = 'rgb(17,19,25)';
            // this.colorcode='rgb(17,19,25)';          
        }
        this.chartarg = {
            filterselected: filterselected,
            date: date,
            date_2: date_2,
        };
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.moduleservice.getChartbyfilterforcomparison(this.currentCompany.uuid, this.chartarg, daytype, this.currentUser.timezone).subscribe(res => {
            this.showLoadingIndicator = false;
            this.ischart = 1;
            this.chart = new angular_highcharts__WEBPACK_IMPORTED_MODULE_14__["Chart"]({
                chart: {
                    polar: true,
                    type: 'line',
                    zoomType: 'x',
                    backgroundColor: this.bgcolorcode,
                },
                exporting: {
                    enabled: true
                },
                title: {
                    text: 'Comparision Report',
                    style: {
                        color: this.colorcode
                    },
                },
                subtitle: {
                    text: document.ontouchstart === undefined ?
                        'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in',
                    style: {
                        color: this.colorcode
                    },
                },
                credits: {
                    enabled: false
                },
                tooltip: {
                    shared: true,
                },
                xAxis: {
                    minRange: 0,
                    gridLineWidth: 0,
                    title: {
                        text: 'Number Of Calls',
                        style: {
                            color: this.colorcode
                        },
                    },
                    categories: res.datearr
                },
                yAxis: {
                    min: 0,
                    gridLineWidth: 1,
                    title: {
                        text: 'Number Of Calls',
                        style: {
                            color: this.colorcode
                        },
                    }
                },
                colors: ['rgb(0,198,0)', 'rgb(187,0,1)'],
                plotOptions: {
                    column: {
                        colorByPoint: true
                    },
                    line: {
                        dataLabels: {
                            useHTML: true,
                            enabled: true,
                            format: '{point.percentage:.1f} %',
                            color: 'white',
                        },
                        enableMouseTracking: false,
                    }
                },
                series: [{
                        data: res.chartdata,
                        type: 'column',
                        name: this.selecteddate.startDate.split(' ')[0] + ' | ' + this.selecteddate.endDate.split(' ')[0],
                        color: 'rgb(0,198,0)',
                    }, {
                        data: res.chartdata_2,
                        type: 'column',
                        name: this.selecteddate_2.startDate.split(' ')[0] + ' | ' + this.selecteddate_2.endDate.split(' ')[0],
                        color: 'rgb(187,0,1)',
                    }
                    // ,{
                    //   name: 'Converted',
                    //   color: '#F9B236',
                    //   type: 'spline',
                    //   data: res.converted,   
                    // },{
                    //   name: 'Connected',
                    //   type: 'spline',
                    //   color: '#20bf55',    
                    //   data: res.connected,           
                    // }
                    // ,{
                    //   name: 'No Answer',
                    //   type: 'spline',
                    //   color: 'red',    
                    //   data: res.noanswer,           
                    // },{
                    //   name: 'No Connect',
                    //   type: 'spline',
                    //   color: 'red',    
                    //   data: res.noconnect,          
                    //   }
                ]
            });
            this.ngxLoader.stopLoader('loader-03');
        }, error => this.error = error);
    }
    play(url, incomingnumber) {
        this.toastrService.show(`<audio style="width: 130px;height: 30px;" controls><source src="https://d2actkasrcrrs8.cloudfront.net/${url}" type="audio/mp3"></audio>`, 'Inbound # - ' + incomingnumber, {
            closeButton: true,
            extendedTimeOut: 0,
            timeOut: 0,
            tapToDismiss: false,
            enableHtml: true,
            positionClass: 'toast-bottom-right',
        });
    }
    loadcallsdata(filterselected, date, date_2, groupby) {
        $("#datatable1").dataTable().fnDestroy();
        // $("#summarytbl").dataTable().fnDestroy();
        this.ngxLoader.startLoader('loader-02');
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // this.ngxLoader.startLoader('loader-03');
        this.http.post(this.ServerUrl + 'getcallsdataforcomparison/' + this.currentCompany.uuid, { 'filterselected': filterselected, 'date': date, 'date_2': date_2, 'timezone': this.currentUser.timezone, 'groupby': groupby }, {}).subscribe(resp => {
            //                    
            this.callsdata = resp.data.numbers;
            // console.log(resp.data.total);
            this.totalcount = resp.data.total;
            this.totaldata = resp.data.length;
            this.dtTrigger.next();
            this.ngxLoader.stopLoader('loader-02');
        }, error => this.error = error);
    }
    exportdata() {
        var that = this;
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            // showTitle: true,
            // title: 'Your title',
            useBom: true,
            // noDownload: true,
            headers: ["Number Called", "Caller ID", " Publisher", "Target", "Campaign", "Routed To", "Call Duration", "Labels", "IVR Inputs", "Date of Call", "Time of Call", "Revenue", "Payout"]
        };
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        const formData = new FormData();
        formData.append('user_uuid', currentUser.uuid);
        formData.append('timezone', this.currentUser.timezone);
        formData.append('filterselected', JSON.stringify(this.filterselected));
        formData.append('date', JSON.stringify(this.selecteddate));
        formData.append('totalrecords', this.noofrecords);
        // console.log(formData);return;
        this.showLoadingIndicator = true;
        this.moduleservice.getCalldetailsForExport(this.currentCompany.uuid, formData).subscribe(res => {
            // console.log(res);return;
            new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__["ngxCsv"](res.data, 'All Calls', options);
            this.showLoadingIndicator = false;
        }, error => this.error = error);
    }
    exportcalldata() {
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            useBom: true,
            headers: ["UUID", "Name(Filter)", "Incoming", "Connected", "Qualified", "Converted", "Completed", "No Answer", "No Connect", "Payout", "Revenue", "Profit", "CR%", "RPC", "ACL", "TCL"]
        };
        new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__["ngxCsv"](this.callsdata, 'All Calls', options);
    }
    togglepanel() {
        if (this.isclick == 1) {
            this.istougle = 1;
            this.isclick = 0;
        }
        else {
            this.isclick = 1;
            this.istougle = 0;
        }
    }
    filterdata(type) {
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.filter = 0;
        this.isselectElement = 0;
        if (type == 1) {
            this.activeresultdata = [];
            this.nonactiveresultdata = [];
            this.filter = 1;
            this.filtertype = 1;
            this.filtertext = 'Select Campaign';
            this.filtervalue = "";
            this.moduleservice.getallcampain(this.currentCompany.uuid).subscribe(res => {
                this.activeresultdata = res.active;
                this.nonactiveresultdata = res.non_active;
            });
        }
        if (type == 2) {
            this.resultdata = [];
            this.filtertype = 2;
            this.filter = 1;
            this.filtertext = 'Select Target';
            this.filtervalue = "";
            this.moduleservice.getAlltarget(this.currentCompany.uuid).subscribe(res => {
                this.resultdata = res;
            });
        }
        if (type == 3) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 3;
            this.filtertext = 'Select Buyer';
            this.filtervalue = "";
            this.moduleservice.getallbuyers(this.currentCompany.uuid).subscribe(res => {
                this.resultdata = res;
            });
        }
        if (type == 4) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 4;
            this.filtertext = 'Select Publisher';
            this.filtervalue = "";
            this.moduleservice.getAllpublishers(this.currentCompany.uuid).subscribe(res => {
                this.resultdata = res;
            });
        }
        if (type == 5) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 5;
            this.filtertext = 'Enter Caller ID';
            this.filtervalue = "";
        }
        if (type == 6) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 6;
            this.filtertext = 'Enter Number Called';
            this.filtervalue = "";
        }
        if (type == 8) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 8;
            this.filtertext = 'Select IVR Inputs';
            this.filtervalue = "";
            this.resultdata = [{
                    'id': 0,
                    'text': 'No',
                }, {
                    'id': 1,
                    'text': 'Yes',
                }];
        }
        if (type == 9) {
            this.resultdata = [];
            this.filter = 1;
            this.filtertype = 9;
            this.filtertext = 'Select Ringtree';
            this.filtervalue = "";
            this.resultdata = [{
                    'id': 0,
                    'text': 'No',
                }, {
                    'id': 1,
                    'text': 'Yes',
                }];
        }
    }
    clearfilter(index) {
        // console.log(this.selecteddate);      
        // console.log(this.selecteddate_2);      
        this.filterselected.splice(index, 1);
        this.loadcallsdata(this.filterselected, this.selecteddate, this.selecteddate_2, 1);
        this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.selecteddate_2, this.daytypeval);
    }
    setdate(event, type) {
        if (event && event.startDate == null && event.endDate == null)
            return false;
        if (event) {
            var start = moment__WEBPACK_IMPORTED_MODULE_12__(event.startDate._d).format('MM/DD/YYYY HH:mm:ss');
            var end = moment__WEBPACK_IMPORTED_MODULE_12__(event.endDate._d).format('MM/DD/YYYY HH:mm:ss');
            this.startdate = moment__WEBPACK_IMPORTED_MODULE_12__["tz"](start, 'utc').format("YYYY-MM-DD 00:00:00");
            this.enddate = moment__WEBPACK_IMPORTED_MODULE_12__["tz"](end, 'utc').format("YYYY-MM-DD 23:59:59");
            this.selected1 = {
                startDate: this.startdate,
                endDate: this.enddate,
            };
            this.comparisondate = this.selected1;
            // var a = moment(start);
            // var b = moment(end);
            // if(b.diff(a, 'days')>0){
            this.daytypeval = 1;
            // }else{
            //   this.daytypeval = 1;      
            // }
            this.isfiltered = 1;
        }
        else {
            this.isselectElement = 1;
            this.isadded = 0;
            const uuid = this.route.snapshot.paramMap.get('id');
            if (uuid != null) {
                var start = moment__WEBPACK_IMPORTED_MODULE_12__(this.selected.startDate).format('MM/DD/YYYY HH:mm:ss');
                var end = moment__WEBPACK_IMPORTED_MODULE_12__(this.selected.endDate).format('MM/DD/YYYY HH:mm:ss');
            }
            else {
                if (this.selected1.startDate._d != undefined) {
                    var start = moment__WEBPACK_IMPORTED_MODULE_12__(this.selected1.startDate._d).format('MM/DD/YYYY HH:mm:ss');
                    var end = moment__WEBPACK_IMPORTED_MODULE_12__(this.selected1.endDate._d).format('MM/DD/YYYY HH:mm:ss');
                }
                else {
                    var start = moment__WEBPACK_IMPORTED_MODULE_12__(this.selected2.startDate).format('MM/DD/YYYY HH:mm:ss');
                    var end = moment__WEBPACK_IMPORTED_MODULE_12__(this.selected2.endDate).format('MM/DD/YYYY HH:mm:ss');
                }
            }
            this.startdate = moment__WEBPACK_IMPORTED_MODULE_12__["tz"](start, 'utc').format("YYYY-MM-DD 00:00:00");
            this.enddate = moment__WEBPACK_IMPORTED_MODULE_12__["tz"](end, 'utc').format("YYYY-MM-DD 23:59:59");
            if (this.isfiltered == 0) {
                this.selected1 = {
                    startDate: this.startdate,
                    endDate: this.enddate,
                };
                this.comparisondate = "";
            }
            else {
                this.comparisondate = this.selected1;
            }
            this.daytypeval = 1;
        }
        if (type == 1) {
            this.selecteddate = this.comparisondate;
        }
        else {
            this.selecteddate_2 = this.comparisondate;
        }
    }
    filterval(group_by) {
        var _a;
        if (this.selecteddate == undefined || this.selecteddate_2 == undefined) {
            this.selecteddate = { startDate: moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__(), "America/Phoenix").format("MM/DD/YYYY"), endDate: moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__(), "America/Phoenix").format("MM/DD/YYYY") };
            this.selecteddate_2 = { startDate: moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__(), "America/Phoenix").format("MM/DD/YYYY"), endDate: moment__WEBPACK_IMPORTED_MODULE_12__["tz"](moment__WEBPACK_IMPORTED_MODULE_12__(), "America/Phoenix").format("MM/DD/YYYY") };
        }
        // console.log(this.selecteddate);
        // console.log(this.selecteddate_2);
        //  return false;
        // this.filterselected=[];
        let customObj = new filterarr();
        customObj.filtertype = this.filtertype;
        customObj.uuid = this.filtervalue;
        customObj.name = this.selectElementText;
        customObj.isorand = 0;
        // console.log(this.selectElementText);
        if (this.selectElementText != undefined && ((_a = this.filterselected) === null || _a === void 0 ? void 0 : _a.length) == 0 && !event) {
            this.filterselected.push(customObj);
        }
        if (group_by == undefined) {
            group_by = 1;
        }
        // this.loadcalls(this.filterselected,this.selecteddate);
        // console.log(this.selecteddate);
        // console.log(this.selecteddate_2);
        this.loadcallsdata(this.filterselected, this.selecteddate, this.selecteddate_2, group_by);
        this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.selecteddate_2, 1);
    }
    calcelfilter() {
        this.isclick = 0;
        // this.filter = 0; 
        // this.filtertype = 0; 
        this.isselectElement = 0;
        this.filtertype = 1;
        this.filterdata(1);
        this.filtervalue = '';
        this.filterselected = [];
        this.isadded = 1;
        // this.loadcalls("","");
        // this.loadcallsdata("","","",1);
        // this.getChartNumberOfCalls(0,0,0,1);
        this.loadcallsdata(this.filterselected, this.selecteddate, this.selecteddate_2, 1);
        this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.selecteddate_2, this.daytypeval);
    }
    // gettext(event:any,type){
    //   if(type==1)
    //    this.selectElementText = event.target['options'][event.target['options'].selectedIndex].text;
    //    else
    //    this.selectElementText = event.target.value
    //   // console.log(event.target.value);   
    // }
    gettext(event, type) {
        let text;
        if (this.filtertype == 1) {
            text = this.activeresultdata.filter(x => x.id == event)[0];
        }
        else {
            text = this.resultdata.filter(x => x.id == event)[0];
        }
        if (type == 1) {
            //  this.selectElementText = event.target['options'][event.target['options'].selectedIndex].text;
            this.selectElementText = text.text;
        }
        else {
            this.selectElementText = event.target.value;
        }
    }
    addorrule() {
        let customObj = new filterarr();
        customObj.filtertype = this.filtertype;
        customObj.uuid = this.filtervalue;
        customObj.name = this.selectElementText;
        customObj.isorand = 0;
        // console.log(this.selectElementText);
        if (this.selectElementText != undefined) {
            this.filterselected.push(customObj);
        }
        // console.log(this.filterselected);
    }
    addandrule() {
        let customObj = new filterarr();
        customObj.filtertype = this.filtertype;
        customObj.uuid = this.filtervalue;
        customObj.name = this.selectElementText;
        customObj.isorand = 1;
        // console.log(this.selectElementText);
        if (this.selectElementText != undefined) {
            this.filterselected.push(customObj);
        }
    }
    editfilter() {
        this.isadded = 1;
        this.isselectElement = 0;
    }
    chartby(type) {
        this.filterdate = "";
        if (type == 1) {
            this.daytypeval = 1;
            this.charttype = "Calls Per Hour";
            this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.selecteddate_2, 1);
        }
        if (type == 2) {
            this.daytypeval = 2;
            this.charttype = "Calls Per Day";
            this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.selecteddate_2, 2);
        }
        if (type == 3) {
            this.daytypeval = 3;
            this.charttype = "Calls Per Month";
            this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.selecteddate_2, 3);
        }
    }
    // savedreportsettings:any;
    // selecteddates:any;
    // isreport:any = 0;
    // getsavedreports(uuid:string){
    //   this.moduleservice.getsavedreportsbyuuid(uuid).subscribe(
    //     res => {
    //       this.labelval = res.reportlabelname;
    //       this.daytypeval = 2;     
    //       if(res.filtertype!=''){
    //         this.isreport = 1;
    //         if(res.filtertype!=0){ this.isclick = 1; }
    //         this.filter = res.filtertype;
    //         let startday = res.start_date;
    //         let endday = res.end_date;
    //         const d = new Date(startday);
    //         const d1 = new Date(endday);
    //         moment(d).format('MMMM d, YYYY');
    //         moment(d1).format('MMMM d, YYYY');
    //         var start = moment(d).format('MM/DD/YYYY HH:mm:ss');
    //         var end = moment(d1).format('MM/DD/YYYY HH:mm:ss');
    //         this.startdate = moment.tz(start, 'utc').format("YYYY-MM-DD 00:00:00")
    //         this.enddate = moment.tz(end, 'utc').format("YYYY-MM-DD 23:59:59")
    //         this.selected = {startDate: d, endDate: d1};
    //         this.selecteddates = {startDate: this.startdate, endDate: this.enddate};
    //         this.filterselected = JSON.parse(res.filterarr);
    //         var a = moment(d);
    //         var b = moment(d1);
    //         if(b.diff(a, 'days')>0){
    //             this.daytypeval = 2;
    //             this.charttype = "Calls Per Day";
    //         }else{
    //             this.daytypeval = 1;
    //             this.charttype = "Calls Per Hour";
    //         }
    //       }
    //       this.filterdata(this.filter);
    //       if(res.filtervalue!=''){
    //         this.isclick = 1;
    //         this.filtervalue = res.filtervalue;          
    //       }
    //       this.selectednewdates = this.selecteddates;
    //       this.loadcallsdata(this.filterselected,this.selecteddates,1);
    //       this.getChartNumberOfCalls(this.filterselected,this.selecteddates,this.daytypeval);
    //     });
    // }
    // islabelvaltext:any;
    // savelabel(){
    //   const uuid = this.route.snapshot.paramMap.get('id');
    //   if(this.labelval==undefined){
    //     this.islabelvaltext='yes';
    //     return;
    //   }
    //   this.islabelvaltext='';
    //   const formData = new FormData();
    //   if(uuid!=null){
    //     formData.append('uuid', uuid);  
    //   }
    //   if(!this.selecteddate){
    //     this.selecteddate =this.selected1;
    //   }
    //   var start = moment(this.selecteddate.startDate).format('MM/DD/YYYY HH:mm:ss');
    //   var end = moment(this.selecteddate.endDate).format('MM/DD/YYYY HH:mm:ss');
    //   this.startdate = moment.tz(start, 'utc').format("YYYY-MM-DD 00:00:00")
    //   this.enddate = moment.tz(end, 'utc').format("YYYY-MM-DD 23:59:59")
    //   if(this.filtervalue==""){
    //     this.filtertype = 0;
    //   }    
    //   // console.log(this.filterselected);return false;
    //   formData.append('company_uuid', this.currentCompany.uuid);
    //   formData.append('reportlabelname', this.labelval);
    //   formData.append('start_date', this.startdate);
    //   formData.append('end_date', this.enddate);
    //   formData.append('filtertype', this.filtertype);
    //   formData.append('filtervalue', this.filtervalue);
    //   formData.append('filterarr', JSON.stringify(this.filterselected));
    //   this.moduleservice.savereport(formData).subscribe(
    //     res => {
    //       if (res.status !== 'error') {
    //         if(res.isavail!=1){
    //           this.labelval="";
    //         }
    //         this.sendMenuUpdateMessage();
    //         this.toastrService.success('Report Saved Successfully');         
    //       }else{
    //         this.toastrService.error('Failed To Add Label');
    //       }
    //     });
    // }
    // deletelabel(){
    //   Swal.fire({
    //     title: 'Are you sure?',
    //     text: 'You want to Delete Selected Report Name!',
    //     type: 'warning',
    //     showCancelButton: true,
    //     confirmButtonText: 'Yes, delete it!',
    //     cancelButtonText: 'No, keep it'
    //   }).then((result) => {
    //     if (result.value) {
    //       const uuid = this.route.snapshot.paramMap.get('id');
    //       this.moduleservice.deleteSelectedSavedReport(uuid).subscribe(
    //         res => {
    //             Swal.fire(
    //               'Deleted!',
    //               'Records Deleted Successfully.',
    //               'success',                
    //             )
    //             this.sendMenuUpdateMessage();
    //             setTimeout(() => {
    //               Swal.close()                
    //               this.router.navigate(['/reports']);
    //             }, 2000);
    //           },
    //           error => this.error = error
    //       );      
    //     } else if (result.dismiss === Swal.DismissReason.cancel) {
    //       Swal.fire(
    //         'Cancelled',
    //         'Your Record is safe :)',
    //         'error'
    //       )
    //       setTimeout(() => {
    //         Swal.close()
    //       }, 2000);
    //     }
    //   });
    // }
    // groupby:any=1;
    getSummary(type) {
        if (this.selecteddate == undefined) {
            this.selecteddate = this.selected1;
        }
        // this.selecteddate = this.selected1;
        $(".tabsbtn").removeClass("btn btn-primary btn-sm activetab");
        if (type == 1) {
            $("#tabs1").addClass("activetab");
            this.filtertype = 1;
            this.loadcallsdata(this.filterselected, this.selecteddate, this.selecteddate_2, 1);
        }
        if (type == 2) {
            $("#tabs2").addClass("activetab");
            this.filtertype = 4;
            this.loadcallsdata(this.filterselected, this.selecteddate, this.selecteddate_2, 4);
        }
        if (type == 3) {
            $("#tabs3").addClass("activetab");
            this.filtertype = 2;
            this.loadcallsdata(this.filterselected, this.selecteddate, this.selecteddate_2, 2);
        }
        if (type == 4) {
            $("#tabs4").addClass("activetab");
            this.filtertype = 3;
            this.loadcallsdata(this.filterselected, this.selecteddate, this.selecteddate_2, 3);
        }
        if (type == 5) {
            $("#tabs5").addClass("activetab");
            this.filtertype = 5;
            this.loadcallsdata(this.filterselected, this.selecteddate, this.selecteddate_2, 5);
        }
        if (type == 5) {
            $("#tabs5").addClass("activetab");
            this.filtertype = 5;
        }
        if (type == 6) {
            $("#tabs6").addClass("activetab");
            this.filtertype = 6;
        }
        if (type == 7) {
            $("#tabs7").addClass("activetab");
            this.filtertype = 7;
        }
        if (type == 8) {
            $("#tabs8").addClass("activetab");
            this.filtertype = 8;
        }
    }
    scrolltoy() {
        $('datatable-body').scrollLeft(1000);
    }
    scrolltox() {
        $('datatable-body').scrollLeft(0);
    }
    filterbyvalue(uuid, value, type = 0) {
        this.istougle = 1;
        this.isclick = 1;
        this.filterdata(this.filtertype);
        let customObj = new filterarr();
        customObj.filtertype = this.filtertype;
        customObj.uuid = uuid;
        customObj.name = value;
        customObj.isorand = 1;
        customObj.isdup = type;
        if (value != "") {
            this.filterselected.push(customObj);
        }
        this.filterval(this.filtertype);
    }
    ngOnDestroy() {
        this.dtTrigger.unsubscribe();
        console.log('Report method destroyed');
        if (this.subscription) {
            this.subscription.unsubscribe();
        }
    }
    copyName(val) {
        const selBox = document.createElement('textarea');
        selBox.style.position = 'fixed';
        selBox.style.left = '0';
        selBox.style.top = '0';
        selBox.style.opacity = '0';
        selBox.value = val;
        document.body.appendChild(selBox);
        selBox.focus();
        selBox.select();
        document.execCommand('copy');
        document.body.removeChild(selBox);
    }
    filtercalldata(filtertype, uuid, no) {
        this.istougle = 1;
        this.isclick = 1;
        this.filterdata(filtertype);
        let customObj = new filterarr();
        customObj.filtertype = filtertype;
        customObj.uuid = uuid;
        customObj.name = no;
        customObj.isorand = 1;
        if (no != "") {
            this.filterselected.push(customObj);
        }
        this.filter = 1;
        this.isselectElement = 1;
        this.loadcallsdata(this.filterselected, this.selecteddate, this.selecteddate_2, 1);
        this.getChartNumberOfCalls(this.filterselected, this.selecteddate, this.selecteddate_2, this.daytypeval);
    }
};
ReportsComparisonComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["ActivatedRoute"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ElementRef"] },
    { type: ngx_ui_loader__WEBPACK_IMPORTED_MODULE_18__["NgxUiLoaderService"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectorRef"] }
];
ReportsComparisonComponent.propDecorators = {
    table1: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable1', { static: true },] }],
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['myTable',] }]
};
ReportsComparisonComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-reports-comparison',
        template: _raw_loader_reports_comparison_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_reports_comparison_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], ReportsComparisonComponent);



/***/ }),

/***/ "TGGr":
/*!**********************************************************************************!*\
  !*** ./src/app/modules/campaigns/campaign-create/campaign-create.component.scss ***!
  \**********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("input#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n\n.mat-step-header {\n  background: #6777ef !important;\n  color: white !important;\n  padding: 4px !important;\n  border-radius: 5px !important;\n  margin: 7px !important;\n  height: 43px !important;\n}\n\nlabel.btn.btn-primary.form-check-label {\n  font-size: 12px;\n  margin-top: 5px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcY2FtcGFpZ24tY3JlYXRlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0ksYUFBQTtBQUNKOztBQUNBO0VBQ0ksWUFBQTtBQUVKOztBQUNBO0VBQ0ksOEJBQUE7RUFDQSx1QkFBQTtFQUNBLHVCQUFBO0VBQ0EsNkJBQUE7RUFDQSxzQkFBQTtFQUNBLHVCQUFBO0FBRUo7O0FBQ0E7RUFDSSxlQUFBO0VBQ0EsZUFBQTtBQUVKIiwiZmlsZSI6ImNhbXBhaWduLWNyZWF0ZS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbImlucHV0I29wdGlvbjEsIGlucHV0I29wdGlvbjIsIGlucHV0I29wdGlvbjN7XHJcbiAgICBkaXNwbGF5OiBub25lO1xyXG59ICAgIFxyXG4uYnRuLWdyb3VwLmZvcm0tY29udHJvbCB7XHJcbiAgICBoZWlnaHQ6IDYwcHg7XHJcbn1cclxuXHJcbi5tYXQtc3RlcC1oZWFkZXIge1xyXG4gICAgYmFja2dyb3VuZDogIzY3NzdlZiFpbXBvcnRhbnQ7XHJcbiAgICBjb2xvcjogd2hpdGUhaW1wb3J0YW50O1xyXG4gICAgcGFkZGluZzogNHB4IWltcG9ydGFudDtcclxuICAgIGJvcmRlci1yYWRpdXM6IDVweCFpbXBvcnRhbnQ7XHJcbiAgICBtYXJnaW46IDdweCFpbXBvcnRhbnQ7XHJcbiAgICBoZWlnaHQ6IDQzcHghaW1wb3J0YW50O1xyXG59XHJcblxyXG5sYWJlbC5idG4uYnRuLXByaW1hcnkuZm9ybS1jaGVjay1sYWJlbCB7XHJcbiAgICBmb250LXNpemU6IDEycHg7XHJcbiAgICBtYXJnaW4tdG9wOiA1cHg7XHJcbn1cclxuXHJcblxyXG4vLyA6Om5nLWRlZXAgLm1hdC1mb3JtLWZpZWxkIHtcclxuLy8gICAgIC5tYXQtaW5wdXQtZWxlbWVudCB7XHJcbi8vICAgICAgICAgY29sb3I6IHNsYXRlZ3JheTtcclxuLy8gICAgIH1cclxuLy8gICAgIC5tYXQtZm9ybS1maWVsZC1sYWJlbCB7XHJcbi8vICAgICAgICAgY29sb3I6IHNsYXRlZ3JheTtcclxuLy8gICAgIH1cclxuLy8gICAgIC5tYXQtZm9ybS1maWVsZC11bmRlcmxpbmUge1xyXG4vLyAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHNsYXRlZ3JheTtcclxuLy8gICAgIH1cclxuLy8gICAgIC5tYXQtZm9ybS1maWVsZC1yaXBwbGUge1xyXG4vLyAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHNsYXRlZ3JheTtcclxuLy8gICAgIH1cclxuLy8gICAgIC5tYXQtZm9ybS1maWVsZC1yZXF1aXJlZC1tYXJrZXIge1xyXG4vLyAgICAgICAgIGNvbG9yOiBzbGF0ZWdyYXk7XHJcbi8vICAgICB9XHJcbi8vIH1cclxuXHJcbi8vIDo6bmctZGVlcCAubWF0LWZvcm0tZmllbGQubWF0LWZvY3VzZWQge1xyXG4vLyAgICAgLm1hdC1mb3JtLWZpZWxkLWxhYmVsIHtcclxuLy8gICAgICAgICBjb2xvcjogI2ZmODg0ZDtcclxuLy8gICAgIH1cclxuLy8gICAgIC5tYXQtZm9ybS1maWVsZC1yaXBwbGUge1xyXG4vLyAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZjg4NGQ7XHJcbi8vICAgICB9XHJcbi8vICAgICAubWF0LWZvcm0tZmllbGQtcmVxdWlyZWQtbWFya2VyIHtcclxuLy8gICAgICAgICBjb2xvcjogI2ZmODg0ZDtcclxuLy8gICAgIH1cclxuLy8gICAgIC5tYXQtaW5wdXQtZWxlbWVudCB7XHJcbi8vICAgICAgICAgY29sb3I6ICNmZjg4NGQ7XHJcbi8vICAgICB9XHJcbi8vIH1cclxuLy8gLm1hdC1pbnB1dC13cmFwcGVyIHtcclxuLy8gICAgIGJhY2tncm91bmQ6IGdyYXk7XHJcbi8vIH1cclxuXHJcbiJdfQ== */");

/***/ }),

/***/ "Tjvc":
/*!********************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/number/number.component.html ***!
  \********************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n<div class=\"main-content\">  \r\n  <section class=\"section\">\r\n    <div class=\"section-body\">\r\n      <div class=\"row\">\r\n        <div class=\"col-12\">\r\n          <div class=\"card\">\r\n              <div class=\"row\" style=\"margin-top: 20px;\r\n              \">\r\n                  <div class=\"col-3\">\r\n                      <div class=\"card-header\">\r\n                      <!-- <h4>Number Data</h4></div> -->\r\n                      <h4>Manage Targets</h4></div>\r\n                  </div>\r\n                  <div class=\"col-9 text-right mt-2\">\r\n                      <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                        <button routerLink=\"/add-target\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-plus\"></i> New Target\r\n                        </button>\r\n                        <!-- <button routerLink=\"/numbers/batch-edit\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-tasks\"></i> Batch Edit</button>                        \r\n                        <button routerLink=\"/numbers-import\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-plus\"></i> Import </button> -->\r\n                         <!-- <button (click)=\"exportdata()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fas fa-file-export\"></i> Export -->\r\n                        <!-- </button> -->\r\n                        <!-- <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Delete Selected\r\n                        </button>                          -->\r\n                        \r\n                        </div>                       \r\n                  </div>\r\n            \r\n              </div>            \r\n              \r\n            <div class=\"card-body\">\r\n              <div class=\"table-responsive\">\r\n              <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                  <thead>\r\n                    <tr>\r\n                      <!-- <th></th> -->\r\n                      <!-- <th style=\"padding: 10px;width: 1px;\">\r\n                          <div class=\"custom-control custom-checkbox\" *ngIf=\"numbers?.length != 0\">\r\n                          <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                          <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                          </div>\r\n                      </th>                       -->\r\n                      <th>Name</th>\r\n                      <th>Buyer</th>\r\n                      <th>Type</th>\r\n                      <th>Type Value</th>\r\n                      <!-- <th>Connection Timeout</th>\r\n                      <th>Dial IVR Option</th>-->\r\n                      <th>Is Ringtree</th> \r\n                      <th>Created Date</th>\r\n                      <th>Active</th>\r\n                      <th>Action</th>\r\n                      <!-- <th>Action</th> -->\r\n                    </tr>\r\n                  </thead>\r\n                  <tbody *ngIf=\"numbers?.length != 0\">\r\n                      <tr *ngFor=\"let number of numbers;let i = index;\" class=\"detailrow_{{i}}\">\r\n                          <!-- <td (click)='details(i,number)' class=\"details-control\"></td> -->\r\n                          <!-- <td>\r\n                              <div class=\"custom-control custom-checkbox\">\r\n                              <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{number.uuid}}\"  [checked]=\"number.selected\" [value]=\"number.id\" >\r\n                              <label class=\"custom-control-label\" for=\"customCheck_{{number.uuid}}\"></label>\r\n                              </div>                                \r\n                          </td>                           -->\r\n                          <td><a routerLink=\"/edit-numbers/{{ number.uuid }}\" class=\"text-white\">{{ number.name }}</a></td>\r\n                          <td>{{ number.buyers }}</td>\r\n                          <td>{{ number.valtype }}</td>\r\n                          <td *ngIf=\"number.valtype =='IVR Menu' && number.is_ringtree!=1\"><a style=\"color: white;text-decoration: underline;\" routerLink=\"/edit-ivr/{{ number.ivrmenu_uuid }}\" >{{ number.typeval }}</a></td>\r\n                          <td *ngIf=\"number.valtype !='IVR Menu' && number.is_ringtree!=1\">{{ number.typeval }}</td>\r\n                          <td *ngIf=\"number.is_ringtree ==1\"><a target=\"_blank\" [href]=\"number.typeval\" style=\"color: white;\">URL</a> </td>\r\n                          <!-- <td>{{ number.connection_timeout }}</td>\r\n                          <td>{{ number.dialivroption }}</td>\r\n                          <td>\r\n                            <span *ngIf=\"number.disableRecordings==1\" class=\"badge badge-success\">Yes</span>\r\n                            <span *ngIf=\"number.disableRecordings==0\" class=\"badge badge-danger p-1\">No</span>\r\n                          </td> -->\r\n                          <td>\r\n                            <div style=\"font-size: 10px;\" *ngIf=\"number.is_ringtree==1\" class=\"badge badge-success\">Yes</div>\r\n                            <div style=\"font-size: 10px;\" *ngIf=\"number.is_ringtree==0\" class=\"badge badge-danger\">No</div>\r\n                          </td>\r\n                         \r\n                          <td>{{ number.created_at }}</td>\r\n                          <td>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" *ngIf=\"number.active_status==1\" checked (change)=\"change_status($event,number.uuid)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              \r\n                              <input type=\"checkbox\" *ngIf=\"number.active_status==0\" (change)=\"change_status($event,number.uuid)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </td>\r\n                          <td style=\"cursor:pointer;\">\r\n                            <i style=\"font-size: 12px;\" placement=\"bottom\" ngbTooltip=\"Duplicate Target\" (click)=\"Clone(number.uuid)\" class=\"far fa-clone\"></i>&nbsp;&nbsp;\r\n                            <a style=\"font-size: 12px;\" placement=\"bottom\" ngbTooltip=\"Edit Target\" routerLink=\"/edit-numbers/{{ number.uuid }}\" class=\"actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;&nbsp;\r\n                            <i style=\"font-size: 12px;\" placement=\"bottom\" ngbTooltip=\"Delete Target\" (click)=\"Delete((number.uuid))\" class=\"fas fa-trash\"></i>&nbsp;&nbsp;\r\n                            <i style=\"font-size: 12px;\" placement=\"bottom\" ngbTooltip=\"Show References\" (click)='details(i,number)' class=\"fas fa-anchor\"></i>\r\n                          </td>\r\n                      </tr>\r\n                  </tbody>\r\n                  <tbody *ngIf=\"numbers?.length == 0\">\r\n                    <tr>\r\n                      <td colspan=\"9\" class=\"no-data-available\">No data Available!</td>\r\n                    </tr>\r\n                  <tbody>\r\n                </table>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </section>\r\n  \r\n</div>");

/***/ }),

/***/ "U/rL":
/*!**********************************************************!*\
  !*** ./src/app/pagenotfound/pagenotfound.component.scss ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJwYWdlbm90Zm91bmQuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "UaI1":
/*!************************************************!*\
  !*** ./src/app/sidebar/sidebar.component.scss ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".main-sidebar.sidebar-style-2:hover {\n  overflow-y: scroll !important;\n}\n\n::-webkit-scrollbar {\n  width: 2px;\n  /* for vertical scrollbars */\n  height: 2px !important;\n  /* for horizontal scrollbars */\n}\n\n::-webkit-scrollbar-track {\n  background: rgba(0, 0, 0, 0.1);\n}\n\n::-webkit-scrollbar-thumb {\n  background: rgba(0, 0, 0, 0.2);\n}\n\n.main-sidebar .sidebar-menu li a span {\n  font-weight: 500;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXHNpZGViYXIuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0E7RUFDRSw2QkFBQTtBQUZGOztBQUlBO0VBRUUsVUFBQTtFQUFhLDRCQUFBO0VBQ2Isc0JBQUE7RUFBdUIsOEJBQUE7QUFBekI7O0FBR0E7RUFFRSw4QkFBQTtBQURGOztBQUlBO0VBRUUsOEJBQUE7QUFGRjs7QUFLQTtFQUNDLGdCQUFBO0FBRkQiLCJmaWxlIjoic2lkZWJhci5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIC5tYWluLXNpZGViYXIuc2lkZWJhci1zdHlsZS0ye1xyXG4vLyAgICAgb3ZlcmZsb3cteTogc2Nyb2xsIWltcG9ydGFudDtcclxuLy8gfVxyXG4ubWFpbi1zaWRlYmFyLnNpZGViYXItc3R5bGUtMjpob3ZlcntcclxuICBvdmVyZmxvdy15OiBzY3JvbGwhaW1wb3J0YW50O1xyXG59XHJcbjo6LXdlYmtpdC1zY3JvbGxiYXJcclxue1xyXG4gIHdpZHRoOiAycHg7ICAvKiBmb3IgdmVydGljYWwgc2Nyb2xsYmFycyAqL1xyXG4gIGhlaWdodDogMnB4IWltcG9ydGFudDsgLyogZm9yIGhvcml6b250YWwgc2Nyb2xsYmFycyAqL1xyXG59XHJcblxyXG46Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNrXHJcbntcclxuICBiYWNrZ3JvdW5kOiByZ2JhKDAsIDAsIDAsIDAuMSk7XHJcbn1cclxuXHJcbjo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWJcclxue1xyXG4gIGJhY2tncm91bmQ6IHJnYmEoMCwgMCwgMCwgMC4yKTtcclxufVxyXG5cclxuLm1haW4tc2lkZWJhciAuc2lkZWJhci1tZW51IGxpIGEgc3BhbiB7XHJcbiBmb250LXdlaWdodDogNTAwOyBcclxufVxyXG4iXX0= */");

/***/ }),

/***/ "V2oL":
/*!*******************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/publishers/publisher-settings/publisher-settings.component.html ***!
  \*******************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <h4>  Publisher Registration</h4></div>\r\n                    </div>                   \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <form id=\"addLabel\" [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n                    <div class=\"row\">\r\n                      <div class=\"col-md-12\">\r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Public publisher Registraton enabled :</label>\r\n                        <label class=\"custom-switch mt-2 pl-0\">\r\n                            <input type=\"checkbox\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\" (change)=\"pubreg_enable($event)\"  [checked]=\"publicregistration==true\">\r\n                            <span class=\"custom-switch-indicator\"></span>                     \r\n                        </label>      \r\n                    </div>   \r\n                    <div *ngIf=\"ispubreg==true\">\r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Introduction :</label>\r\n                        <label class=\"custom-switch mt-2 pl-0\">\r\n                            <textarea formControlName=\"intro\" name=\"\" id=\"\" cols=\"190\" rows=\"10\" class=\"form-control\"></textarea>                            \r\n                        </label>                                    \r\n                    </div>   \r\n                    \r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Contact email :</label>\r\n                        <input formControlName=\"email\" type=\"text\" class=\"form-control\">           \r\n                    </div>   \r\n\r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Terms and Conditions :</label>\r\n                        <label class=\"custom-switch mt-2 pl-0\">\r\n                            <input type=\"checkbox\" [checked]=\"terms_condstatus==true\" formControlName=\"terms_cond\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\" (change)=\"tc_enable($event)\">\r\n                            <span class=\"custom-switch-indicator\"></span>                     \r\n                        </label>                                    \r\n                    </div>\r\n                 \r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Terms and Conditions URL :</label>\r\n                        <input formControlName=\"tc_url\"  type=\"text\" class=\"form-control\">           \r\n                    </div>   \r\n                   \r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">URL :</label>\r\n                        <a href=\"{{BaseUrl}}publisher-registration/{{Companyuuid}}\" target=\"_blank\">{{BaseUrl}}publisher-registration/{{Companyuuid}}</a>                        \r\n                    </div>   \r\n                    </div>       \r\n                    </div>       \r\n                 </div>\r\n                    <div class=\"modal-footer\" style=\"padding: 0;\">\r\n                       <button  type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Save</button>                       \r\n                      </div>\r\n                  </form>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>\r\n");

/***/ }),

/***/ "VUPL":
/*!**********************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/label/label-view/label-view.component.html ***!
  \**********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <h4>Number Data</h4></div>\r\n                    </div>\r\n                    <div class=\"col-9 text-right mt-2\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                           <button (click)=\"exportdata()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fas fa-file-export\"></i> Export\r\n                          </button>\r\n                          <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"        ></i> Delete Selected\r\n                          </button>    \r\n                          </div>                       \r\n                    </div>\r\n              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                    <thead>\r\n                      <tr>\r\n                        <th style=\"padding: 10px;\">\r\n                          <div class=\"custom-control custom-checkbox\" *ngIf=\"numbers?.length != 0\">\r\n                          <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                          <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                          </div>\r\n                        </th>\r\n                        <th>Number</th>\r\n                        <th>Campaign</th>\r\n                        <th>Publisher</th>\r\n                        <th>Status</th>\r\n                        <th>Associated Label</th>\r\n                        <th>Allocated</th>\r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let number of numbers\">\r\n                            <td>\r\n                                <div class=\"custom-control custom-checkbox\">\r\n                                <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{number.uuid}}\"  [checked]=\"number.selected\" [value]=\"number.id\" >\r\n                                <label class=\"custom-control-label\" for=\"customCheck_{{number.uuid}}\"></label>\r\n                                </div>                                \r\n                            </td>\r\n                            <td>{{ number.number }}</td>\r\n                            <td><a routerLink=\"/edit-campaign/{{number.campaign_uuid}}\"  routerLinkActive=\"router-link-active\">{{ number.campaign }}</a></td>                                                    \r\n                            <td>{{ number.publisher }}</td>\r\n                            <td *ngIf=\"number.status==1\">\r\n                              <span class=\"badge badge-success\">Enabled</span>\r\n                            </td>\r\n                            <td *ngIf=\"number.status==0\">\r\n                              <span class=\"badge badge-danger p-1\">Disabled</span>\r\n                            </td> \r\n                            <td>\r\n                              <span *ngFor=\"let assosciated_label of number.assosciated_labels?.split(',')\">\r\n                                  <span class=\"badge badge-primary p-1 ml-1\">{{assosciated_label }}</span><br>\r\n                              </span>\r\n                            </td> \r\n                            \r\n                            <td>{{ number.created_at }}</td>\r\n                            <td>\r\n                              <!-- <a href=\"#\" (click)=\"editdata(number.uuid,number.prefix,number.number_type,number.number,number.country,number.publisher_uuid,number.campaign_uuid)\"  data-toggle=\"modal\" data-target=\"#editModel\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp; -->\r\n                              <button (click)=\"Delete((number.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>");

/***/ }),

/***/ "VzVu":
/*!**************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/app.component.html ***!
  \**************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-header *ngIf=\"!(router.url === '/login' || router.url === '/register'|| router.url === '/thank-you' || router.url === '/404' || router.url.startsWith('/publisher-registration/')   || router.url === '/verify-email/'+emailurl)\"></app-header>\r\n<app-sidebar *ngIf=\"!(router.url === '/login' || router.url === '/register' || router.url === '/thank-you' || router.url === '/404' || router.url.startsWith('/publisher-registration/')  || router.url === '/verify-email/'+emailurl)\"></app-sidebar>\r\n<router-outlet></router-outlet>\r\n<app-footer *ngIf=\"!(router.url === '/login' || router.url === '/register' || router.url === '/thank-you' || router.url === '/404' || router.url.startsWith('/publisher-registration/')  || router.url === '/verify-email/'+emailurl)\"></app-footer>");

/***/ }),

/***/ "WEHk":
/*!************************************************************!*\
  !*** ./src/app/modules/voicemail/voicemail.component.scss ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("#toast-container > div {\n  box-shadow: 0 4px 25px 0 rgba(0, 0, 0, 0.1) !important;\n  padding: 13px 5px 5px 0px !important;\n  opacity: 1 !important;\n  background: #ffffff !important;\n  border-radius: 8px !important;\n  width: 317px !important;\n}\n\naudio::-webkit-media-controls-play-button,\naudio::-webkit-media-controls-panel {\n  background-color: #ffffff !important;\n  color: #000 !important;\n}\n\n.toast-title {\n  font-weight: bold !important;\n  padding-left: 19px !important;\n  color: #000 !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFx2b2ljZW1haWwuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDSSxzREFBQTtFQUNBLG9DQUFBO0VBQ0EscUJBQUE7RUFDQSw4QkFBQTtFQUNBLDZCQUFBO0VBQ0EsdUJBQUE7QUFDSjs7QUFDSTs7RUFFQSxvQ0FBQTtFQUNBLHNCQUFBO0FBRUo7O0FBRUk7RUFDQSw0QkFBQTtFQUNBLDZCQUFBO0VBQ0Esc0JBQUE7QUFDSiIsImZpbGUiOiJ2b2ljZW1haWwuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIjdG9hc3QtY29udGFpbmVyPmRpdiB7XHJcbiAgICBib3gtc2hhZG93OiAwIDRweCAyNXB4IDAgcmdiKDAgMCAwIC8gMTAlKSFpbXBvcnRhbnQ7XHJcbiAgICBwYWRkaW5nOiAxM3B4IDVweCA1cHggMHB4IWltcG9ydGFudDtcclxuICAgIG9wYWNpdHk6IDEhaW1wb3J0YW50O1xyXG4gICAgYmFja2dyb3VuZDogI2ZmZmZmZiFpbXBvcnRhbnQ7XHJcbiAgICBib3JkZXItcmFkaXVzOiA4cHghaW1wb3J0YW50O1xyXG4gICAgd2lkdGg6IDMxN3B4IWltcG9ydGFudDtcclxuICAgIH1cclxuICAgIGF1ZGlvOjotd2Via2l0LW1lZGlhLWNvbnRyb2xzLXBsYXktYnV0dG9uLFxyXG4gICAgYXVkaW86Oi13ZWJraXQtbWVkaWEtY29udHJvbHMtcGFuZWwge1xyXG4gICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZmZmZiFpbXBvcnRhbnQ7XHJcbiAgICBjb2xvcjogIzAwMCFpbXBvcnRhbnQ7XHJcbiAgICBcclxuICAgIH1cclxuXHJcbiAgICAudG9hc3QtdGl0bGUge1xyXG4gICAgZm9udC13ZWlnaHQ6IGJvbGQhaW1wb3J0YW50O1xyXG4gICAgcGFkZGluZy1sZWZ0OiAxOXB4IWltcG9ydGFudDtcclxuICAgIGNvbG9yOiAjMDAwIWltcG9ydGFudDtcclxufSJdfQ== */");

/***/ }),

/***/ "XBaw":
/*!**************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/blacklist/blacklist.component.html ***!
  \**************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<!--  -->\r\n    \r\n    <!-- Add Number Modal -->\r\n    <div class=\"modal  fade\" id=\"addNumber\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n     aria-hidden=\"true\">\r\n     <div class=\"modal-dialog\" role=\"document\">\r\n       <div class=\"modal-content\">\r\n         <div class=\"modal-header\">\r\n           <h5 class=\"modal-title\" id=\"formModal\">Add Number</h5>\r\n           <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n             <span aria-hidden=\"true\">&times;</span>\r\n           </button>\r\n         </div>\r\n         <div class=\"modal-body\">\r\n           <form id=\"addNumber\" [formGroup]=\"addNumberForm\" (ngSubmit)=\"onNumberSubmit()\">\r\n             <div class=\"form-group\">\r\n                 <label>Number</label>\r\n                 <input formControlName=\"number\" id=\"number\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': numberSubmitted && numbercontrol.number.errors }\" (keypress)=_keyPress($event) placeholder=\"(000) 000 - 0000\" maxlength=\"16\">\r\n                 <div *ngIf=\"numberSubmitted && numbercontrol.number.errors\" class=\"invalid-feedback\">\r\n                     <div *ngIf=\"numbercontrol.number.errors.required\">Number is required</div>\r\n                 </div>                           \r\n              </div>\r\n    \r\n              <div class=\"modal-footer\" style=\"padding: 0;\">\r\n                <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Number</button>\r\n                <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n               </div>\r\n           </form>\r\n         </div>\r\n       </div>\r\n     </div>\r\n     </div>   \r\n    \r\n    <!-- Edit Number Modal -->\r\n    <div class=\"modal  fade\" id=\"editNumber\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n     aria-hidden=\"true\">\r\n     <div class=\"modal-dialog\" role=\"document\">\r\n       <div class=\"modal-content\">\r\n         <div class=\"modal-header\">\r\n           <h5 class=\"modal-title\" id=\"formModal\">Save Number</h5>\r\n           <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n             <span aria-hidden=\"true\">&times;</span>\r\n           </button>\r\n         </div>\r\n         <div class=\"modal-body\">\r\n           <form [formGroup]=\"editNumberForm\" (ngSubmit)=\"onNumberEditSubmit()\">\r\n             <div class=\"form-group\">\r\n                 <label>Number</label>\r\n                 <input type=\"hidden\" name=\"uuid\" formControlName=\"uuid\">\r\n                 <input formControlName=\"number\" id=\"editnumber\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': numbereditSubmitted && numbereditcontrol.number.errors }\" (keypress)=_keyPress($event) placeholder=\"(000) 000 - 0000\" maxlength=\"16\">\r\n                 <div *ngIf=\"numbereditSubmitted && numbereditcontrol.number.errors\" class=\"invalid-feedback\">\r\n                     <div *ngIf=\"numbereditcontrol.number.errors.required\">Number is required</div>\r\n                 </div>           \r\n               </div>\r\n               \r\n             <div class=\"modal-footer\" style=\"padding: 0;\">\r\n                <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Save Number</button>\r\n                <button type=\"button\" class=\"btn btn-secondary m-t-15 waves-effect\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n                  Close\r\n                </button>\r\n               </div>\r\n           </form>\r\n         </div>\r\n       </div>\r\n     </div>\r\n     </div>    \r\n    \r\n      <div class=\"main-content\">\r\n      \r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                    <div class=\"row\" style=\"margin-top: 20px;\r\n                    \">\r\n                        <div class=\"col-8\">\r\n                            <div class=\"card-header\">\r\n                            <h4>Blacklist Numbers</h4></div>\r\n                        </div>\r\n                        <div class=\"col-4 text-right mt-2\">\r\n                            <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                               <button data-toggle=\"modal\" data-target=\"#addNumber\" class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon p-2 mr-2\"><i class=\"fa fa-plus\"></i> Add Number\r\n                                </button>\r\n                                <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fa fa-trash\"></i> Delete Selected\r\n                                </button>\r\n                              </div>                       \r\n                        </div>\r\n                  \r\n                    </div>            \r\n                    \r\n                  <div class=\"card-body\">\r\n                    <div class=\"table-responsive\">\r\n                    <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                        <thead>\r\n                          <tr>\r\n                            <th style=\"padding: 10px;\">\r\n                              <div class=\"custom-control custom-checkbox\" *ngIf=\"numbers?.length != 0\">\r\n                              <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                              <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                              </div>\r\n                            </th>\r\n                            <th>Number</th>\r\n                            <th>Created Date</th>\r\n                            <th>Action</th>\r\n                          </tr>\r\n                        </thead>\r\n                        <tbody *ngIf=\"numbers?.length != 0\">\r\n                            <tr *ngFor=\"let number of numbers\">\r\n                                <td>\r\n                                  <div class=\"custom-control custom-checkbox\">\r\n                                  <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{number.uuid}}\"  [checked]=\"number.selected\" [value]=\"number.id\" >\r\n                                  <label class=\"custom-control-label\" for=\"customCheck_{{number.uuid}}\"></label>\r\n                                  </div>                                \r\n                                </td>\r\n                                <td>{{ number.number }}</td>\r\n                                <td>{{ number.created_at }}</td>\r\n                                <td><button (click)=\"editNumber(number.uuid,number.number)\" data-toggle=\"modal\" data-target=\"#editNumber\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></button>&nbsp;<button (click)=\"Delete((number.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                            </tr>\r\n                        </tbody>\r\n                        <tbody *ngIf=\"numbers?.length == 0\">\r\n                          <tr>\r\n                            <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                          </tr>\r\n                        <tbody>\r\n                      </table>\r\n                    </div>\r\n                  </div>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </section>\r\n        \r\n      </div>  ");

/***/ }),

/***/ "XiNR":
/*!**************************************************!*\
  !*** ./src/app/modules/rules/rules.component.ts ***!
  \**************************************************/
/*! exports provided: RulesComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RulesComponent", function() { return RulesComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_rules_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./rules.component.html */ "lWPo");
/* harmony import */ var _rules_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rules.component.scss */ "c65b");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/http */ "qlzE");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../global */ "XrUY");












let requestOptions = new _angular_http__WEBPACK_IMPORTED_MODULE_8__["RequestOptions"]({ headers: null, withCredentials: true });
const router = _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"];
class DataTablesResponse {
}
const ParseHeaders = {
    headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpHeaders"]({
        'Content-Type': 'application/x-www-form-urlencoded'
    })
};
let RulesComponent = class RulesComponent {
    constructor(moduleservice, toastrService, handler) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadRules();
    }
    loadRules() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var that = this;
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "order": [[2, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + 'getrules/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    that.rules = resp.data;
                    // console.log(that.numbers);
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "name" }, { data: "created_at" }, { data: "action" },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    Delete(uuid) {
        // alert(uuid);return false;
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.deleteRuleset(uuid).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    this.loadRules();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
};
RulesComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpBackend"] }
];
RulesComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewChild"], args: ['dataTable', { static: true },] }]
};
RulesComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-rules',
        template: _raw_loader_rules_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_rules_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], RulesComponent);



/***/ }),

/***/ "XrUY":
/*!***************************!*\
  !*** ./src/app/global.ts ***!
  \***************************/
/*! exports provided: GlobalVariable */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlobalVariable", function() { return GlobalVariable; });
const GlobalVariable = Object.freeze({
    BASE_API_URL: 'https://apiv2.dialdigits.com/',
    BASE_URL: 'https://app.dialdigits.com/#/',
});


/***/ }),

/***/ "YEf4":
/*!************************************************************!*\
  !*** ./src/app/modules/recordings/recordings.component.ts ***!
  \************************************************************/
/*! exports provided: RecordingsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RecordingsComponent", function() { return RecordingsComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_recordings_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./recordings.component.html */ "gXRp");
/* harmony import */ var _recordings_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./recordings.component.scss */ "tTwH");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ngx-csv/ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! moment */ "wd/R");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! datatables.net */ "FlOX");
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(datatables_net__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/router */ "tyNb");














const router = _angular_router__WEBPACK_IMPORTED_MODULE_13__["Router"];
class DataTablesResponse {
}
let RecordingsComponent = class RecordingsComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_9__["GlobalVariable"].BASE_API_URL;
        this.numbers = '';
        this.ranges = {
            Today: [moment__WEBPACK_IMPORTED_MODULE_11__(), moment__WEBPACK_IMPORTED_MODULE_11__()],
            Yesterday: [moment__WEBPACK_IMPORTED_MODULE_11__().subtract(1, 'days'), moment__WEBPACK_IMPORTED_MODULE_11__().subtract(1, 'days')],
            'Last 7 Days': [moment__WEBPACK_IMPORTED_MODULE_11__().subtract(6, 'days'), moment__WEBPACK_IMPORTED_MODULE_11__()],
            'Last 30 Days': [moment__WEBPACK_IMPORTED_MODULE_11__().subtract(29, 'days'), moment__WEBPACK_IMPORTED_MODULE_11__()],
            'This Month': [moment__WEBPACK_IMPORTED_MODULE_11__().startOf('month'), moment__WEBPACK_IMPORTED_MODULE_11__().endOf('month')],
            'Last Month': [
                moment__WEBPACK_IMPORTED_MODULE_11__()
                    .subtract(1, 'month')
                    .startOf('month'),
                moment__WEBPACK_IMPORTED_MODULE_11__()
                    .subtract(1, 'month')
                    .endOf('month')
            ],
        };
        this.dtOptions = {};
        this.submitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        this.alwaysShowCalendars = true;
        this.keepCalendarOpeningWithRange = true;
        this.showRangeLabelOnInput = true;
        this.selected = { startDate: moment__WEBPACK_IMPORTED_MODULE_11__().startOf('day'), endDate: moment__WEBPACK_IMPORTED_MODULE_11__().endOf('day') };
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadcalls();
    }
    get f() { return this.searchcallsform.controls; }
    loadcalls() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var that = this;
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[2, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + 'getrecordings/' + this.currentCompany.uuid, { 'dataTablesParameters': dataTablesParameters, 'number': this.numbers, 'date': this.selected }, {}).subscribe(resp => {
                    // console.log(resp); return false;
                    that.datas = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "uuid" }, { data: "did" }, { data: "incoming_number" }, { data: "call_duration" }, { data: "date_of_call" }, { data: "download" }
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    exportdata() {
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            useBom: true,
            headers: ["Number Called", " Caller ID", " Forwarded To", " Call Duration", "Labels", "IVR Inputs", "Date of Call", "Time of Call"]
        };
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getCallsForExport(this.currentCompany.uuid).subscribe(res => {
            new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_10__["ngxCsv"](res.data, 'My Report', options);
        }, error => this.error = error);
    }
};
RecordingsComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
RecordingsComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
RecordingsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-recordings',
        template: _raw_loader_recordings_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_recordings_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], RecordingsComponent);



/***/ }),

/***/ "YLqG":
/*!*****************************************************************************!*\
  !*** ./src/app/modules/settings/manage-company/manage-company.component.ts ***!
  \*****************************************************************************/
/*! exports provided: ManageCompanyComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ManageCompanyComponent", function() { return ManageCompanyComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_manage_company_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./manage-company.component.html */ "PXvV");
/* harmony import */ var _manage_company_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./manage-company.component.scss */ "iOw8");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../global */ "XrUY");












const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let ManageCompanyComponent = class ManageCompanyComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.checkboxes = [];
        this.Submitted = false;
        this.editSubmitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadcompanies();
        this.addForm = this.fb.group({
            company_name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            phone: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            city: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            state: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            country: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            postal_code: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
        this.editForm = this.fb.group({
            uuid: [''],
            company_name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            phone: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            city: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            state: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            country: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            postal_code: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
    }
    loadcompanies() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentUser = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "order": [[5, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getcompanies/' + this.currentUser.uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "name" }, { data: "phone" }, { data: "city" }, { data: "state" }, { data: "country" }, { data: "postal_code" }, { data: "created_at" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    editdata(uuid, name, phone, city, state, country, postal_code) {
        this.editForm.patchValue({
            uuid: uuid,
            company_name: name,
            phone: phone,
            city: city,
            state: state,
            country: country,
            postal_code: postal_code,
        });
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedNumbers(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                        }, 2000);
                        this.loadcompanies();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }
            });
        }
    }
    Delete(id) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.deleteCompany(+id).subscribe(res => {
                    // return false;
                    this.loadcompanies();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    //Add Buyer
    get addcontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        // this.currentUser = JSON.parse(localStorage.getItem('currentCompany'));
        // formData.append('company_uuid', this.currentUser.uuid);
        formData.append('company_name', this.addForm.get('company_name').value);
        formData.append('phone', this.addForm.get('phone').value);
        formData.append('city', this.addForm.get('city').value);
        formData.append('state', this.addForm.get('state').value);
        formData.append('country', this.addForm.get('country').value);
        formData.append('postal_code', this.addForm.get('postal_code').value);
        this.moduleservice.addCompany(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Comapny Added Successfully');
                this.loadcompanies();
                this.Submitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (!this.addForm.invalid) {
            $("#addLabels").modal("hide");
            this.Submitted = false;
            setTimeout(() => { this.addForm.reset(); }, 2000);
        }
    }
    //Add Buyer
    get editcontrol() { return this.editForm.controls; }
    onEditSubmit() {
        // alert('ok');return false;
        const formData = new FormData();
        this.editSubmitted = true;
        if (this.editForm.invalid) {
            return;
        }
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('company_uuid', this.currentUser.uuid);
        // formData.append('uuid', this.editForm.get('uuid').value);
        formData.append('company_name', this.editForm.get('company_name').value);
        formData.append('phone', this.editForm.get('phone').value);
        formData.append('city', this.editForm.get('city').value);
        formData.append('state', this.editForm.get('state').value);
        formData.append('country', this.editForm.get('country').value);
        formData.append('postal_code', this.editForm.get('postal_code').value);
        // console.log(formData); 
        this.moduleservice.editCompany(formData, this.editForm.get('uuid').value).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Company Details Updated Successfully');
                this.loadcompanies();
                this.editSubmitted = false;
            }
            else {
                this.toastrService.error('Failed To Updated Company Details');
            }
        }, error => this.error = error);
    }
    closeEditModal() {
        if (!this.editForm.invalid) {
            $("#editLabels").modal("hide");
            this.editSubmitted = false;
            setTimeout(() => { this.editForm.reset(); }, 2000);
        }
    }
};
ManageCompanyComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
ManageCompanyComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewChild"], args: ['dataTable', { static: true },] }]
};
ManageCompanyComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-manage-company',
        template: _raw_loader_manage_company_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_manage_company_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], ManageCompanyComponent);



/***/ }),

/***/ "YUv5":
/*!***************************************************************************!*\
  !*** ./src/app/modules/number/number-upload/number-upload.component.scss ***!
  \***************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".myclass.custom-class {\n  padding: 0px !important;\n  height: 40px !important;\n}\n\ninput#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcbnVtYmVyLXVwbG9hZC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLHVCQUFBO0VBQ0EsdUJBQUE7QUFDSjs7QUFDQTtFQUNJLGFBQUE7QUFFSjs7QUFBQTtFQUNJLFlBQUE7QUFHSiIsImZpbGUiOiJudW1iZXItdXBsb2FkLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm15Y2xhc3MuY3VzdG9tLWNsYXNze1xyXG4gICAgcGFkZGluZzogMHB4IWltcG9ydGFudDtcclxuICAgIGhlaWdodDogNDBweCAhaW1wb3J0YW50O1xyXG59XHJcbmlucHV0I29wdGlvbjEsIGlucHV0I29wdGlvbjIsIGlucHV0I29wdGlvbjN7XHJcbiAgICBkaXNwbGF5OiBub25lO1xyXG59ICAgIFxyXG4uYnRuLWdyb3VwLmZvcm0tY29udHJvbCB7XHJcbiAgICBoZWlnaHQ6IDYwcHg7XHJcbn1cclxuIl19 */");

/***/ }),

/***/ "Yj9t":
/*!*************************************!*\
  !*** ./src/app/auth/auth.module.ts ***!
  \*************************************/
/*! exports provided: AuthModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthModule", function() { return AuthModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "ofXK");
/* harmony import */ var _auth_routing_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./auth-routing.module */ "6epW");
/* harmony import */ var _login_componunt_login_componunt_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./login-componunt/login-componunt.component */ "sYaG");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/platform-browser */ "jhN1");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _profile_profile_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./profile/profile.component */ "dGq7");









let AuthModule = class AuthModule {
};
AuthModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_login_componunt_login_componunt_component__WEBPACK_IMPORTED_MODULE_4__["LoginComponuntComponent"], _profile_profile_component__WEBPACK_IMPORTED_MODULE_8__["ProfileComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            _angular_platform_browser__WEBPACK_IMPORTED_MODULE_5__["BrowserModule"],
            _angular_router__WEBPACK_IMPORTED_MODULE_6__["RouterModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_7__["FormsModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_7__["ReactiveFormsModule"],
        ],
        exports: [
            _angular_platform_browser__WEBPACK_IMPORTED_MODULE_5__["BrowserModule"],
            _login_componunt_login_componunt_component__WEBPACK_IMPORTED_MODULE_4__["LoginComponuntComponent"],
            _auth_routing_module__WEBPACK_IMPORTED_MODULE_3__["AuthRoutingModule"]
        ],
    })
], AuthModule);



/***/ }),

/***/ "YowP":
/*!**************************************************************!*\
  !*** ./src/app/modules/publishers/publishers.component.scss ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("input#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFxwdWJsaXNoZXJzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0ksYUFBQTtBQUNKOztBQUNBO0VBQ0ksWUFBQTtBQUVKIiwiZmlsZSI6InB1Ymxpc2hlcnMuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyJpbnB1dCNvcHRpb24xLCBpbnB1dCNvcHRpb24yLCBpbnB1dCNvcHRpb24ze1xyXG4gICAgZGlzcGxheTogbm9uZTtcclxufSAgICBcclxuLmJ0bi1ncm91cC5mb3JtLWNvbnRyb2wge1xyXG4gICAgaGVpZ2h0OiA2MHB4O1xyXG59Il19 */");

/***/ }),

/***/ "ZAI4":
/*!*******************************!*\
  !*** ./src/app/app.module.ts ***!
  \*******************************/
/*! exports provided: AppModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppModule", function() { return AppModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _modules_module_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/module.service */ "zTpG");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _modules_modules_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/modules.module */ "+dkL");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/platform-browser */ "jhN1");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/http */ "qlzE");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _app_routing_module__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./app-routing.module */ "vY5A");
/* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./app.component */ "Sy1n");
/* harmony import */ var _header_header_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./header/header.component */ "fECr");
/* harmony import */ var _footer_footer_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./footer/footer.component */ "fp1T");
/* harmony import */ var _sidebar_sidebar_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./sidebar/sidebar.component */ "47Jg");
/* harmony import */ var _auth_auth_module__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./auth/auth.module */ "Yj9t");
/* harmony import */ var _page_not_found_component_page_not_found_component_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./page-not-found-component/page-not-found-component.component */ "g8Eo");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _http_interceptors_index__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./http-interceptors/index */ "0bLM");
/* harmony import */ var _auth_auth_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./auth/auth.service */ "qXBG");
/* harmony import */ var _sidebar_sidebar_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./sidebar/sidebar.service */ "3FVy");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @angular/common */ "ofXK");
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @angular/platform-browser/animations */ "R1ws");
/* harmony import */ var ngx_bootstrap_dropdown__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ngx-bootstrap/dropdown */ "dZIy");
/* harmony import */ var ng_select2__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ng-select2 */ "eSIH");
/* harmony import */ var _angular_material_moment_adapter__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @angular/material-moment-adapter */ "1yaQ");
/* harmony import */ var _modules_messaging_service__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./modules/messaging.service */ "ee52");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../environments/environment */ "AytR");
/* harmony import */ var _angular_fire_messaging__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @angular/fire/messaging */ "XoYk");
/* harmony import */ var _angular_fire_database__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @angular/fire/database */ "sSZD");
/* harmony import */ var _angular_fire_auth__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @angular/fire/auth */ "UbJi");
/* harmony import */ var _angular_fire__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @angular/fire */ "spgP");
/* harmony import */ var _swimlane_ngx_datatable__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @swimlane/ngx-datatable */ "lDzL");
/* harmony import */ var _pagenotfound_pagenotfound_component__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./pagenotfound/pagenotfound.component */ "sG/L");
/* harmony import */ var _tinymce_tinymce_angular__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @tinymce/tinymce-angular */ "fB2i");



































let AppModule = class AppModule {
};
AppModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [
            _app_component__WEBPACK_IMPORTED_MODULE_9__["AppComponent"],
            _header_header_component__WEBPACK_IMPORTED_MODULE_10__["HeaderComponent"],
            _footer_footer_component__WEBPACK_IMPORTED_MODULE_11__["FooterComponent"],
            _sidebar_sidebar_component__WEBPACK_IMPORTED_MODULE_12__["SidebarComponent"],
            _page_not_found_component_page_not_found_component_component__WEBPACK_IMPORTED_MODULE_14__["PageNotFoundComponentComponent"],
            _pagenotfound_pagenotfound_component__WEBPACK_IMPORTED_MODULE_32__["PagenotfoundComponent"],
        ],
        imports: [
            _tinymce_tinymce_angular__WEBPACK_IMPORTED_MODULE_33__["EditorModule"],
            _angular_platform_browser__WEBPACK_IMPORTED_MODULE_5__["BrowserModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_3__["ReactiveFormsModule"],
            _angular_http__WEBPACK_IMPORTED_MODULE_6__["HttpModule"],
            _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HttpClientModule"],
            _app_routing_module__WEBPACK_IMPORTED_MODULE_8__["AppRoutingModule"],
            _auth_auth_module__WEBPACK_IMPORTED_MODULE_13__["AuthModule"],
            _modules_modules_module__WEBPACK_IMPORTED_MODULE_4__["ModulesModule"],
            _angular_router__WEBPACK_IMPORTED_MODULE_15__["RouterModule"],
            ng_select2__WEBPACK_IMPORTED_MODULE_23__["NgSelect2Module"],
            _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_21__["BrowserAnimationsModule"],
            _angular_fire_database__WEBPACK_IMPORTED_MODULE_28__["AngularFireDatabaseModule"],
            _angular_fire_auth__WEBPACK_IMPORTED_MODULE_29__["AngularFireAuthModule"],
            _angular_fire_messaging__WEBPACK_IMPORTED_MODULE_27__["AngularFireMessagingModule"],
            _swimlane_ngx_datatable__WEBPACK_IMPORTED_MODULE_31__["NgxDatatableModule"],
            _angular_fire__WEBPACK_IMPORTED_MODULE_30__["AngularFireModule"].initializeApp(_environments_environment__WEBPACK_IMPORTED_MODULE_26__["environment"].firebase),
            ngx_bootstrap_dropdown__WEBPACK_IMPORTED_MODULE_22__["BsDropdownModule"].forRoot(),
            ngx_toastr__WEBPACK_IMPORTED_MODULE_19__["ToastrModule"].forRoot(),
        ],
        providers: [_auth_auth_service__WEBPACK_IMPORTED_MODULE_17__["AuthService"], _sidebar_sidebar_service__WEBPACK_IMPORTED_MODULE_18__["SidebarService"], _modules_module_service__WEBPACK_IMPORTED_MODULE_2__["ModuleService"], _modules_messaging_service__WEBPACK_IMPORTED_MODULE_25__["MessagingService"], _angular_common__WEBPACK_IMPORTED_MODULE_20__["AsyncPipe"],
            _http_interceptors_index__WEBPACK_IMPORTED_MODULE_16__["httpInterceptorProviders"], { provide: _angular_common__WEBPACK_IMPORTED_MODULE_20__["LocationStrategy"], useClass: _angular_common__WEBPACK_IMPORTED_MODULE_20__["HashLocationStrategy"] },
            { provide: _angular_material_moment_adapter__WEBPACK_IMPORTED_MODULE_24__["MAT_MOMENT_DATE_ADAPTER_OPTIONS"], useValue: { useUtc: true } },
        ],
        schemas: [
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"],
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["NO_ERRORS_SCHEMA"]
        ],
        bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_9__["AppComponent"]]
    })
], AppModule);

// platformBrowserDynamic().bootstrapModule(AppModule);


/***/ }),

/***/ "ZrJj":
/*!************************************************************************!*\
  !*** ./src/app/modules/numbers/number-pool/number-pool.component.scss ***!
  \************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("input#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcbnVtYmVyLXBvb2wuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDSSxhQUFBO0FBQ0o7O0FBQ0E7RUFDSSxZQUFBO0FBRUoiLCJmaWxlIjoibnVtYmVyLXBvb2wuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyJpbnB1dCNvcHRpb24xLCBpbnB1dCNvcHRpb24yLCBpbnB1dCNvcHRpb24ze1xyXG4gICAgZGlzcGxheTogbm9uZTtcclxufSAgICBcclxuLmJ0bi1ncm91cC5mb3JtLWNvbnRyb2wge1xyXG4gICAgaGVpZ2h0OiA2MHB4O1xyXG59Il19 */");

/***/ }),

/***/ "ZxR3":
/*!*************************************************************************!*\
  !*** ./src/app/modules/settings/manage-users/manage-users.component.ts ***!
  \*************************************************************************/
/*! exports provided: ManageUsersComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ManageUsersComponent", function() { return ManageUsersComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_manage_users_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./manage-users.component.html */ "GttJ");
/* harmony import */ var _manage_users_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./manage-users.component.scss */ "2msN");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../global */ "XrUY");












const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let ManageUsersComponent = class ManageUsersComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.checkboxes = [];
        this.Submitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadusers();
        this.addForm = this.fb.group({
            first_name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            last_name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            email: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            role: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            user_uuid: [''],
        });
        this.editForm = this.fb.group({
            uuid: [''],
            company: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            sub_id: [''],
            allow_buyer_to_pause_target: [''],
            allow_buyer_to_set_target_concurrency: [''],
            allow_buyer_to_dispute_call_conversions: [''],
            limit_revenue: [''],
            user_uuid: [''],
        });
    }
    loadusers() {
        // console.log('ok');
        // return false;
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentUser = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[5, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getusers/' + this.currentUser.uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                // {data:"checkall"},
                // {data:"hour"},{data:"day"},{data:"month"},{data:"total"},
                // ,{data:"status"}
                { data: "first_name" }, { data: "last_name" }, { data: "email" }, { data: "role" }, { data: "invitation" }, { data: "created_at" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    editdata(uuid, company, sub_id, allow_buyer_to_pause_target, allow_buyer_to_set_target_concurrency, allow_buyer_to_dispute_call_conversions, limit_revenue) {
        this.editForm.patchValue({
            uuid: uuid,
            company: company,
            sub_id: sub_id,
            allow_buyer_to_pause_target: allow_buyer_to_pause_target,
            allow_buyer_to_set_target_concurrency: allow_buyer_to_set_target_concurrency,
            allow_buyer_to_dispute_call_conversions: allow_buyer_to_dispute_call_conversions,
            limit_revenue: limit_revenue,
        });
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedNumbers(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                        }, 2000);
                        this.loadusers();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }
            });
        }
    }
    Delete(id) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteUser(+id, currentUser.uuid).subscribe(res => {
                    // return false;
                    this.loadusers();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    //Add Buyer
    get buyercontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentUser = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('company_uuid', this.currentUser.uuid);
        formData.append('first_name', this.addForm.get('first_name').value);
        formData.append('last_name', this.addForm.get('last_name').value);
        formData.append('email', this.addForm.get('email').value);
        formData.append('role', this.addForm.get('role').value);
        // console.log(this.currentUser); return false;
        this.moduleservice.addUser(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('User Added Successfully');
                this.loadusers();
                this.Submitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (this.addForm.get('first_name').value && this.addForm.get('last_name').value) {
            $("#addLabels").modal("hide");
            this.Submitted = false;
            setTimeout(() => { this.addForm.reset(); }, 2000);
        }
    }
};
ManageUsersComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
ManageUsersComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewChild"], args: ['dataTable', { static: true },] }]
};
ManageUsersComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-manage-users',
        template: _raw_loader_manage_users_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_manage_users_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], ManageUsersComponent);



/***/ }),

/***/ "aDqy":
/*!**********************************************************!*\
  !*** ./src/app/modules/whitelist/whitelist.component.ts ***!
  \**********************************************************/
/*! exports provided: WhitelistComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WhitelistComponent", function() { return WhitelistComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_whitelist_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./whitelist.component.html */ "Sy3i");
/* harmony import */ var _whitelist_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./whitelist.component.scss */ "0HjI");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../global */ "XrUY");












const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let WhitelistComponent = class WhitelistComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.numberSubmitted = false;
        this.numbereditSubmitted = false;
        this.checkboxes = [];
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadnumbers();
        this.addNumberForm = this.fb.group({
            number: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
        this.editNumberForm = this.fb.group({
            uuid: ['', ''],
            number: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
    }
    loadnumbers() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var that = this;
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "order": [[0, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + 'getlistnumbers/1/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    // console.log(resp);
                    that.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "checkall" }, { data: "number" }, { data: "created_at" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0, 3],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    Delete(uuid) {
        // alert(uuid);
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.deleteListNumber(uuid, 1).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    this.loadnumbers();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    //Add Labels
    get numbercontrol() { return this.addNumberForm.controls; }
    onNumberSubmit() {
        const formData = new FormData();
        this.numberSubmitted = true;
        if (this.addNumberForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // console.log(this.currentCompany); return false;
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('number', this.addNumberForm.get('number').value);
        formData.append('type', '1');
        this.moduleservice.addNumberlist(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Number Added Successfully');
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeModal() {
        //  alert(this.addLabelForm.get('name').value);
        if (this.addNumberForm.get('number').value) {
            $("#addNumber").modal("hide");
            this.loadnumbers();
            setTimeout(() => {
                // this.addLabelForm.reset();
                this.numberSubmitted = false;
                this.addNumberForm.reset();
                // $(this).find('#addLabel').trigger('reset');
            }, 2000);
        }
        if (this.editNumberForm.get('number').value) {
            $("#editNumber").modal("hide");
            setTimeout(() => {
                this.numbereditSubmitted = false;
                this.editNumberForm.reset();
                this.loadnumbers();
            }, 2000);
        }
    }
    // Edit Label
    editNumber(uuid, number) {
        this.editNumberForm.patchValue({
            uuid: uuid,
            number: number,
        });
    }
    get numbereditcontrol() { return this.editNumberForm.controls; }
    onNumberEditSubmit() {
        const formData = new FormData();
        this.numbereditSubmitted = true;
        if (this.editNumberForm.invalid) {
            return;
        }
        formData.append('number', this.editNumberForm.get('number').value);
        formData.append('type', '1');
        this.moduleservice.editNumberList(formData, this.editNumberForm.get('uuid').value).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Black List Number Saved Successfully');
            }
            else {
                this.toastrService.error('Failed To Save Black List Number Data');
            }
        }, error => this.error = error);
    }
    _keyPress(event) {
        const isNumericInput = (event) => {
            const key = event.keyCode;
            return ((key >= 48 && key <= 57) || // Allow number line
                (key >= 96 && key <= 105) // Allow number pad
            );
        };
        const isModifierKey = (event) => {
            const key = event.keyCode;
            return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
                (key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
                (key > 36 && key < 41) || // Allow left, up, right, down
                (
                // Allow Ctrl/Command + A,C,V,X,Z
                (event.ctrlKey === true || event.metaKey === true) &&
                    (key === 65 || key === 67 || key === 86 || key === 88 || key === 90));
        };
        const enforceFormat = (event) => {
            // Input must be of a valid number format or a modifier key, and not longer than ten digits
            if (!isNumericInput(event) && !isModifierKey(event)) {
                event.preventDefault();
            }
        };
        const formatToPhone = (event) => {
            if (isModifierKey(event)) {
                return;
            }
            const target = event.target;
            const input = event.target.value.replace(/\D/g, '').substring(0, 10); // First ten digits of input only
            const zip = input.substring(0, 3);
            const middle = input.substring(3, 6);
            const last = input.substring(6, 10);
            if (input.length > 6) {
                target.value = `(${zip}) ${middle} - ${last}`;
            }
            else if (input.length > 3) {
                target.value = `(${zip}) ${middle}`;
            }
            else if (input.length > 0) {
                target.value = `(${zip}`;
            }
        };
        const number = document.getElementById('number');
        const editnumber = document.getElementById('editnumber');
        if (number) {
            number.addEventListener('keydown', enforceFormat);
            number.addEventListener('keyup', formatToPhone);
        }
        if (editnumber) {
            editnumber.addEventListener('keydown', enforceFormat);
            editnumber.addEventListener('keyup', formatToPhone);
        }
    }
    // Check Delete
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deletewbSelectedNumbers(this.checkboxes, 1).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                        }, 2000);
                        this.loadnumbers();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }
            });
        }
    }
};
WhitelistComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
WhitelistComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
WhitelistComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-whitelist',
        template: _raw_loader_whitelist_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_whitelist_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], WhitelistComponent);



/***/ }),

/***/ "aoLm":
/*!****************************************************************!*\
  !*** ./src/app/modules/audible-ring/audible-ring.component.ts ***!
  \****************************************************************/
/*! exports provided: AudibleRingComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AudibleRingComponent", function() { return AudibleRingComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_audible_ring_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./audible-ring.component.html */ "GNLf");
/* harmony import */ var _audible_ring_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./audible-ring.component.scss */ "RguX");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/http */ "qlzE");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../global */ "XrUY");













let requestOptions = new _angular_http__WEBPACK_IMPORTED_MODULE_9__["RequestOptions"]({ headers: null, withCredentials: true });
const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
const ParseHeaders = {
    headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpHeaders"]({
        'Content-Type': 'application/x-www-form-urlencoded'
    })
};
let AudibleRingComponent = class AudibleRingComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_12__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.LabelSubmitted = false;
        this.count = 0;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadaudiblerings();
        this.addLabelForm = this.fb.group({
            number: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            notes: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
        // this.addLabelForm.patchValue({
        //   number: "",
        // });
        this.getallnumbers();
        this.getaudiblering();
    }
    getaudiblering() {
        this.moduleservice.getIVRAudio(this.currentCompany.uuid, 1).subscribe(res => {
            this.audiblering = res;
        }, error => this.error = error);
    }
    getallnumbers() {
        this.moduleservice.getallnumbers(this.currentCompany.uuid).subscribe(res => {
            this.allnumbers = res;
        }, error => this.error = error);
    }
    loadaudiblerings() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        var that = this;
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[2, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + '/getaudiblerinfnumbers/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    // console.log(resp);
                    that.labels = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "name" }, { data: "notes" }, { data: "created_at" }, { data: "action" },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    Delete(uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.deleteAudibleRingNumber(uuid).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.close();
                    }, 2000);
                    this.loadaudiblerings();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.close();
                }, 2000);
            }
        });
    }
    get labelcontrol() { return this.addLabelForm.controls; }
    onLabelSubmit() {
        const formData = new FormData();
        this.LabelSubmitted = true;
        if (this.addLabelForm.invalid) {
            return;
        }
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('number', this.addLabelForm.get('number').value);
        formData.append('notes', this.addLabelForm.get('notes').value);
        this.moduleservice.addExceptionNumber(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('New Exception Number Added Successfully');
            }
            else {
                this.toastrService.error('Failed To Add New Exception Number');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (this.addLabelForm.get('number').value && this.addLabelForm.get('notes').value) {
            $("#addLabels").modal("hide");
            this.loadaudiblerings();
            setTimeout(() => {
                this.LabelSubmitted = false;
                this.addLabelForm.reset();
            }, 2000);
        }
    }
    selectFile(event) {
        this.currentFileUpload = event.target.files.item(0);
        this.ext = this.currentFileUpload.name.split('.').pop();
        // console.log(event.target.files); return false;
        if (this.ext == 'mp3' || this.ext == 'wav') {
            this.moduleservice.uploadfile(event.target.files.item(0), this.currentCompany.uuid, 1).subscribe(res => {
                // console.log(res); return false;
                if (res.body) {
                    if (res.body.status == 'success') {
                        this.toastrService.success('Audio Uploaded Succssfully');
                        this.getaudiblering();
                    }
                    else if (this.count == 0 && res.status == 'error') {
                        this.toastrService.error('Failed To Add');
                    }
                    this.count = 1;
                }
            }, error => this.error = error);
        }
        else {
            this.toastrService.error('Please Upload only .mp3 or .wav file');
        }
    }
};
AudibleRingComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
AudibleRingComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
AudibleRingComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-audible-ring',
        template: _raw_loader_audible_ring_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_audible_ring_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], AudibleRingComponent);



/***/ }),

/***/ "aopE":
/*!**************************************************!*\
  !*** ./src/app/modules/notes/notes.component.ts ***!
  \**************************************************/
/*! exports provided: NotesComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotesComponent", function() { return NotesComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_notes_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./notes.component.html */ "vinN");
/* harmony import */ var _notes_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./notes.component.scss */ "KbqV");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _modules_module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../modules/module.service */ "zTpG");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");








let NotesComponent = class NotesComponent {
    constructor(fb, moduleService, router, route, toastrService) {
        this.fb = fb;
        this.moduleService = moduleService;
        this.router = router;
        this.route = route;
        this.toastrService = toastrService;
        this.submitted = false;
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.addNotesForm = this.fb.group({
            note: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
        });
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        const company_uuid = this.currentCompany.uuid;
        // alert(company_uuid);
        if (company_uuid) {
            this.moduleService.getNotesdata(company_uuid).subscribe(res => {
                // console.log(res);
                this.addNotesForm.patchValue({
                    note: res[0]['notes'],
                });
            });
        }
    }
    get f() { return this.addNotesForm.controls; }
    onSubmit() {
        const formData = new FormData();
        if (this.addNotesForm.invalid) {
            return;
        }
        this.submitted = true;
        formData.append('note', this.addNotesForm.get('note').value);
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        const company_uuid = this.currentCompany.uuid;
        if (company_uuid) {
            this.moduleService.addNotes(formData, company_uuid).subscribe(res => {
                // console.log(res); return false;
                if (res.status !== 'error') {
                    this.toastrService.success('Notes Saved Successfully');
                }
                else {
                    this.toastrService.success('Failed To Save! Please Try Again Later..');
                }
            }, error => this.error = error);
        }
    }
};
NotesComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"] },
    { type: _modules_module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["ActivatedRoute"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] }
];
NotesComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-notes',
        template: _raw_loader_notes_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_notes_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], NotesComponent);



/***/ }),

/***/ "b9xQ":
/*!**********************************************!*\
  !*** ./src/app/modules/sms/sms.component.ts ***!
  \**********************************************/
/*! exports provided: SmsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmsComponent", function() { return SmsComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_sms_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./sms.component.html */ "6A3S");
/* harmony import */ var _sms_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sms.component.scss */ "+SKC");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-csv/ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! moment */ "wd/R");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! datatables.net */ "FlOX");
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(datatables_net__WEBPACK_IMPORTED_MODULE_13__);














const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let SmsComponent = class SmsComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.sms = '';
        this.ranges = {
            Today: [moment__WEBPACK_IMPORTED_MODULE_12__(), moment__WEBPACK_IMPORTED_MODULE_12__()],
            Yesterday: [moment__WEBPACK_IMPORTED_MODULE_12__().subtract(1, 'days'), moment__WEBPACK_IMPORTED_MODULE_12__().subtract(1, 'days')],
            'Last 7 Days': [moment__WEBPACK_IMPORTED_MODULE_12__().subtract(6, 'days'), moment__WEBPACK_IMPORTED_MODULE_12__()],
            'Last 30 Days': [moment__WEBPACK_IMPORTED_MODULE_12__().subtract(29, 'days'), moment__WEBPACK_IMPORTED_MODULE_12__()],
            'This Month': [moment__WEBPACK_IMPORTED_MODULE_12__().startOf('month'), moment__WEBPACK_IMPORTED_MODULE_12__().endOf('month')],
            'Last Month': [
                moment__WEBPACK_IMPORTED_MODULE_12__()
                    .subtract(1, 'month')
                    .startOf('month'),
                moment__WEBPACK_IMPORTED_MODULE_12__()
                    .subtract(1, 'month')
                    .endOf('month')
            ],
        };
        this.dtOptions = {};
        this.submitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        this.alwaysShowCalendars = true;
        this.keepCalendarOpeningWithRange = true;
        this.showRangeLabelOnInput = true;
        this.selected = { startDate: moment__WEBPACK_IMPORTED_MODULE_12__().startOf('day'), endDate: moment__WEBPACK_IMPORTED_MODULE_12__().endOf('day') };
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadcalls();
    }
    get f() { return this.searchcallsform.controls; }
    loadcalls() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var that = this;
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "order": [[2, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + 'getsms/' + this.currentCompany.uuid, { 'dataTablesParameters': dataTablesParameters, 'sms': this.sms, 'date': this.selected }, {}).subscribe(resp => {
                    that.smses = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "sms_from" }, { data: "sms_to" }, { data: "time" }, { data: "message" }, { data: "source_network" }, { data: "date_received" }
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    exportdata() {
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            useBom: true,
            headers: ["From", "To", "Time", "Message", "Source Network", "Date Received"]
        };
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getsmsForExport(this.currentCompany.uuid).subscribe(res => {
            new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__["ngxCsv"](res.data, 'SMS Logs', options);
        }, error => this.error = error);
    }
};
SmsComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
SmsComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
SmsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-sms',
        template: _raw_loader_sms_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_sms_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], SmsComponent);



/***/ }),

/***/ "bO9+":
/*!************************************************************!*\
  !*** ./src/app/modules/ivr-menus/ivr-menus.component.scss ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJpdnItbWVudXMuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "c65b":
/*!****************************************************!*\
  !*** ./src/app/modules/rules/rules.component.scss ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJydWxlcy5jb21wb25lbnQuc2NzcyJ9 */");

/***/ }),

/***/ "cJwa":
/*!******************************************************************************!*\
  !*** ./src/app/modules/campaigns/campaign-edit/campaign-edit.component.scss ***!
  \******************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("input#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 55px;\n}\n\n.mat-step-header {\n  background: #6777ef !important;\n  color: white !important;\n  padding: 4px !important;\n  border-radius: 5px !important;\n  margin: 7px !important;\n  height: 43px !important;\n}\n\nng-select2.ng-star-inserted {\n  pointer-events: none !important;\n  touch-action: none !important;\n  color: #e9ecef !important;\n}\n\nfieldset.scheduler-border {\n  border: 1px groove #ddd !important;\n  padding: 0 1.4em 1.4em 1.4em !important;\n  margin: 0 0 1.5em 0 !important;\n  box-shadow: 0px 0px 0px 0px #000;\n}\n\nlegend.scheduler-border {\n  font-size: 1em !important;\n  font-weight: bold !important;\n  text-align: left !important;\n  width: auto;\n  padding: 0 10px;\n  border-bottom: none;\n}\n\nlabel.btn.btn-primary.form-check-label {\n  font-size: 11px;\n}\n\nstrong {\n  font-size: 11px;\n}\n\ninput[type=number]::-webkit-inner-spin-button,\ninput[type=number]::-webkit-outer-spin-button {\n  opacity: 1 !important;\n}\n\ninput[type=number] {\n  border: none;\n  border-bottom: 1px solid;\n  border-radius: 0;\n  padding: 10px !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcY2FtcGFpZ24tZWRpdC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLGFBQUE7QUFDSjs7QUFDQTtFQUNJLFlBQUE7QUFFSjs7QUFDQTtFQUNJLDhCQUFBO0VBQ0EsdUJBQUE7RUFDQSx1QkFBQTtFQUNBLDZCQUFBO0VBQ0Esc0JBQUE7RUFDQSx1QkFBQTtBQUVKOztBQUNBO0VBQ0ksK0JBQUE7RUFDQSw2QkFBQTtFQUNBLHlCQUFBO0FBRUo7O0FBQUE7RUFDSSxrQ0FBQTtFQUNBLHVDQUFBO0VBQ0EsOEJBQUE7RUFFUSxnQ0FBQTtBQUdaOztBQUFBO0VBQ0kseUJBQUE7RUFDQSw0QkFBQTtFQUNBLDJCQUFBO0VBQ0EsV0FBQTtFQUNBLGVBQUE7RUFDQSxtQkFBQTtBQUdKOztBQUFBO0VBQ0ksZUFBQTtBQUdKOztBQVFBO0VBQ0ksZUFBQTtBQUxKOztBQVFBOztFQUVFLHFCQUFBO0FBTEY7O0FBT0E7RUFDSSxZQUFBO0VBQ0Esd0JBQUE7RUFDQSxnQkFBQTtFQUNBLHdCQUFBO0FBSkoiLCJmaWxlIjoiY2FtcGFpZ24tZWRpdC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbImlucHV0I29wdGlvbjEsIGlucHV0I29wdGlvbjIsIGlucHV0I29wdGlvbjN7XHJcbiAgICBkaXNwbGF5OiBub25lO1xyXG59ICAgIFxyXG4uYnRuLWdyb3VwLmZvcm0tY29udHJvbCB7XHJcbiAgICBoZWlnaHQ6IDU1cHg7XHJcbn1cclxuXHJcbi5tYXQtc3RlcC1oZWFkZXIge1xyXG4gICAgYmFja2dyb3VuZDogIzY3NzdlZiFpbXBvcnRhbnQ7XHJcbiAgICBjb2xvcjogd2hpdGUhaW1wb3J0YW50O1xyXG4gICAgcGFkZGluZzogNHB4IWltcG9ydGFudDtcclxuICAgIGJvcmRlci1yYWRpdXM6IDVweCFpbXBvcnRhbnQ7XHJcbiAgICBtYXJnaW46IDdweCFpbXBvcnRhbnQ7XHJcbiAgICBoZWlnaHQ6IDQzcHghaW1wb3J0YW50O1xyXG59XHJcblxyXG5uZy1zZWxlY3QyLm5nLXN0YXItaW5zZXJ0ZWQge1xyXG4gICAgcG9pbnRlci1ldmVudHM6IG5vbmUhaW1wb3J0YW50O1xyXG4gICAgdG91Y2gtYWN0aW9uOiBub25lIWltcG9ydGFudDtcclxuICAgIGNvbG9yOiAjZTllY2VmIWltcG9ydGFudDtcclxufVxyXG5maWVsZHNldC5zY2hlZHVsZXItYm9yZGVyIHtcclxuICAgIGJvcmRlcjogMXB4IGdyb292ZSAjZGRkICFpbXBvcnRhbnQ7XHJcbiAgICBwYWRkaW5nOiAwIDEuNGVtIDEuNGVtIDEuNGVtICFpbXBvcnRhbnQ7XHJcbiAgICBtYXJnaW46IDAgMCAxLjVlbSAwICFpbXBvcnRhbnQ7XHJcbiAgICAtd2Via2l0LWJveC1zaGFkb3c6ICAwcHggMHB4IDBweCAwcHggIzAwMDtcclxuICAgICAgICAgICAgYm94LXNoYWRvdzogIDBweCAwcHggMHB4IDBweCAjMDAwO1xyXG59XHJcblxyXG5sZWdlbmQuc2NoZWR1bGVyLWJvcmRlciB7XHJcbiAgICBmb250LXNpemU6IDEuMGVtICFpbXBvcnRhbnQ7XHJcbiAgICBmb250LXdlaWdodDogYm9sZCAhaW1wb3J0YW50O1xyXG4gICAgdGV4dC1hbGlnbjogbGVmdCAhaW1wb3J0YW50O1xyXG4gICAgd2lkdGg6YXV0bztcclxuICAgIHBhZGRpbmc6MCAxMHB4O1xyXG4gICAgYm9yZGVyLWJvdHRvbTpub25lO1xyXG59XHJcblxyXG5sYWJlbC5idG4uYnRuLXByaW1hcnkuZm9ybS1jaGVjay1sYWJlbCB7XHJcbiAgICBmb250LXNpemU6IDExcHg7XHJcbn1cclxuXHJcbi8vIHRoLHRke1xyXG4vLyAgICAgcGFkZGluZzogMHB4IDEwcHggMHB4IDEwcHghaW1wb3J0YW50O1xyXG4vLyAgICAgaGVpZ2h0OiA0NnB4IWltcG9ydGFudDtcclxuLy8gICAgIGJhY2tncm91bmQ6ICMyZWEyZDY7XHJcbi8vICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xyXG4vLyAgICAgY29sb3I6IHdoaXRlO1xyXG4vLyAgICAgYm9yZGVyLXJhZGl1czogMXB4O1xyXG4vLyB9XHJcbnN0cm9uZyB7XHJcbiAgICBmb250LXNpemU6IDExcHg7XHJcbn1cclxuXHJcbmlucHV0W3R5cGU9bnVtYmVyXTo6LXdlYmtpdC1pbm5lci1zcGluLWJ1dHRvbiwgXHJcbmlucHV0W3R5cGU9bnVtYmVyXTo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbiB7ICBcclxuICBvcGFjaXR5OiAxIWltcG9ydGFudDtcclxufVxyXG5pbnB1dFt0eXBlPW51bWJlcl17XHJcbiAgICBib3JkZXI6IG5vbmU7XHJcbiAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQ7XHJcbiAgICBib3JkZXItcmFkaXVzOiAwO1xyXG4gICAgcGFkZGluZzogMTBweCFpbXBvcnRhbnQ7XHJcbn1cclxuXHJcblxyXG4iXX0= */");

/***/ }),

/***/ "cnfk":
/*!*********************************************************************!*\
  !*** ./src/app/modules/number/numberedit/numberedit.component.scss ***!
  \*********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("tbody tr th, td {\n  border-bottom: 1px solid #c7c7c7;\n}\n\nfieldset.scheduler-border {\n  border: 1px groove #ddd !important;\n  padding: 0 1.4em 1.4em 1.4em !important;\n  margin: 0 0 1.5em 0 !important;\n  box-shadow: 0px 0px 0px 0px #000;\n}\n\nlegend.scheduler-border {\n  font-size: 1.2em !important;\n  font-weight: bold !important;\n  text-align: left !important;\n  width: auto;\n  padding: 0 10px;\n  border-bottom: none;\n}\n\nth, td {\n  padding: 0px 10px 0px 10px !important;\n  height: 46px !important;\n  background: #2ea2d6;\n  vertical-align: middle;\n  color: white;\n  border-radius: 1px;\n}\n\ninput#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n\n.formcontrol {\n  border: none;\n  border-bottom: 1px solid #ced4da;\n  border-radius: 0;\n  margin-top: -25px;\n}\n\n.formcontrolwithouticon {\n  border: none;\n  border-bottom: 1px solid #ced4da;\n  border-radius: 0;\n}\n\n.control-label {\n  font-size: 11px;\n}\n\ninput.form-control, select {\n  font-size: 11px !important;\n}\n\n@media (min-width: 320px) {\n  .form-check-label {\n    font-size: 11px;\n    margin-top: 7px;\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcbnVtYmVyZWRpdC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLGdDQUFBO0FBQ0o7O0FBQ0E7RUFDSSxrQ0FBQTtFQUNBLHVDQUFBO0VBQ0EsOEJBQUE7RUFFQSxnQ0FBQTtBQUVKOztBQUNBO0VBQ0ksMkJBQUE7RUFDQSw0QkFBQTtFQUNBLDJCQUFBO0VBQ0EsV0FBQTtFQUNBLGVBQUE7RUFDQSxtQkFBQTtBQUVKOztBQUFBO0VBQ0kscUNBQUE7RUFDQSx1QkFBQTtFQUNBLG1CQUFBO0VBQ0Esc0JBQUE7RUFDQSxZQUFBO0VBQ0Esa0JBQUE7QUFHSjs7QUFEQTtFQUNJLGFBQUE7QUFJSjs7QUFGQTtFQUNJLFlBQUE7QUFLSjs7QUFIQTtFQUNJLFlBQUE7RUFDQSxnQ0FBQTtFQUNBLGdCQUFBO0VBQ0EsaUJBQUE7QUFNSjs7QUFKQTtFQUNJLFlBQUE7RUFDQSxnQ0FBQTtFQUNBLGdCQUFBO0FBT0o7O0FBTEE7RUFDSSxlQUFBO0FBUUo7O0FBTkE7RUFDSSwwQkFBQTtBQVNKOztBQVBBO0VBQ0k7SUFDSyxlQUFBO0lBQ0EsZUFBQTtFQVVQO0FBQ0YiLCJmaWxlIjoibnVtYmVyZWRpdC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbInRib2R5IHRyIHRoLCB0ZCB7XHJcbiAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgI2M3YzdjN1xyXG59XHJcbmZpZWxkc2V0LnNjaGVkdWxlci1ib3JkZXIge1xyXG4gICAgYm9yZGVyOiAxcHggZ3Jvb3ZlICNkZGQgIWltcG9ydGFudDtcclxuICAgIHBhZGRpbmc6IDAgMS40ZW0gMS40ZW0gMS40ZW0gIWltcG9ydGFudDtcclxuICAgIG1hcmdpbjogMCAwIDEuNWVtIDAgIWltcG9ydGFudDtcclxuICAgIC13ZWJraXQtYm94LXNoYWRvdzogIDBweCAwcHggMHB4IDBweCAjMDAwO1xyXG4gICAgYm94LXNoYWRvdzogIDBweCAwcHggMHB4IDBweCAjMDAwO1xyXG59XHJcblxyXG5sZWdlbmQuc2NoZWR1bGVyLWJvcmRlciB7XHJcbiAgICBmb250LXNpemU6IDEuMmVtICFpbXBvcnRhbnQ7XHJcbiAgICBmb250LXdlaWdodDogYm9sZCAhaW1wb3J0YW50O1xyXG4gICAgdGV4dC1hbGlnbjogbGVmdCAhaW1wb3J0YW50O1xyXG4gICAgd2lkdGg6YXV0bztcclxuICAgIHBhZGRpbmc6MCAxMHB4O1xyXG4gICAgYm9yZGVyLWJvdHRvbTpub25lO1xyXG59XHJcbnRoLHRke1xyXG4gICAgcGFkZGluZzogMHB4IDEwcHggMHB4IDEwcHghaW1wb3J0YW50O1xyXG4gICAgaGVpZ2h0OiA0NnB4IWltcG9ydGFudDtcclxuICAgIGJhY2tncm91bmQ6ICMyZWEyZDY7XHJcbiAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xyXG4gICAgY29sb3I6IHdoaXRlO1xyXG4gICAgYm9yZGVyLXJhZGl1czogMXB4O1xyXG59XHJcbmlucHV0I29wdGlvbjEsIGlucHV0I29wdGlvbjIsIGlucHV0I29wdGlvbjN7XHJcbiAgICBkaXNwbGF5OiBub25lO1xyXG59ICAgIFxyXG4uYnRuLWdyb3VwLmZvcm0tY29udHJvbCB7XHJcbiAgICBoZWlnaHQ6IDYwcHg7XHJcbn1cclxuLmZvcm1jb250cm9sIHtcclxuICAgIGJvcmRlcjogbm9uZTtcclxuICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAjY2VkNGRhO1xyXG4gICAgYm9yZGVyLXJhZGl1czogMDtcclxuICAgIG1hcmdpbi10b3A6IC0yNXB4O1xyXG59XHJcbi5mb3JtY29udHJvbHdpdGhvdXRpY29uIHtcclxuICAgIGJvcmRlcjogbm9uZTtcclxuICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAjY2VkNGRhO1xyXG4gICAgYm9yZGVyLXJhZGl1czogMDsgICAgXHJcbn1cclxuLmNvbnRyb2wtbGFiZWwge1xyXG4gICAgZm9udC1zaXplOiAxMXB4O1xyXG59XHJcbmlucHV0LmZvcm0tY29udHJvbCxzZWxlY3Qge1xyXG4gICAgZm9udC1zaXplOiAxMXB4IWltcG9ydGFudDtcclxufVxyXG5AbWVkaWEgKG1pbi13aWR0aDozMjBweCkgIHtcclxuICAgIC5mb3JtLWNoZWNrLWxhYmVsIHtcclxuICAgICAgICAgZm9udC1zaXplOiAxMXB4O1xyXG4gICAgICAgICBtYXJnaW4tdG9wOiA3cHg7XHJcbiAgICAgfVxyXG4gfSJdfQ== */");

/***/ }),

/***/ "coDR":
/*!*************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/publishers/publisher-terms/publisher-terms.component.html ***!
  \*************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"bg-black\" *ngIf=\"isavail==1\">\r\n  <div class=\"container\" style=\"background: #1d2b4e;\">\r\n    <div class=\"row text-center\">\r\n      <div class=\"col-md-12 mt-5\">\r\n        <img alt=\"image\" width=\"250px\" src=\"assets/img/logo.png\" class=\"header-logo mb-2  mt-10 mb-10\">\r\n        <h3>PUBLISHER REGISTRATION</h3>\r\n        <P>Welcome to {{company}}! <br>\r\n          Please review and accept the Publisher Terms and Conditions below and proceed to your application.<br>\r\n          Someone from our office will contact you within 24 hours.</P><br>\r\n        <p>Please share some details about you and your business to register as a publisher</p>\r\n      </div>\r\n    </div>\r\n    <div class=\"row\">\r\n      <div class=\"col-md-2\"></div>\r\n      <div class=\"col-md-8\">\r\n        <form id=\"addLabel\" [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n              <div class=\"form-group\">\r\n                <label class=\"d-block text-white\">Business Name :</label>\r\n                <input type=\"text\" placeholder=\"My Company Name\" formControlName=\"businame\" name=\"\" id=\"\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.businame.errors }\">                \r\n                <div *ngIf=\"Submitted && addformcontrol.businame.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"addformcontrol.businame.errors.required\">Business Name is required</div>\r\n                </div>       \r\n              </div>\r\n              \r\n              <div class=\"form-group\">\r\n                <label class=\"d-block text-white\">First Name :</label>\r\n                <input type=\"text\" placeholder=\"John\" formControlName=\"first_name\" name=\"\" id=\"\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.first_name.errors }\">  \r\n                <div *ngIf=\"Submitted && addformcontrol.first_name.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"addformcontrol.first_name.errors.required\">First Name is required</div>\r\n                </div>                \r\n              </div>\r\n              \r\n              <div class=\"form-group\">\r\n                <label class=\"d-block text-white\">Last Name  :</label>\r\n                <input type=\"text\" placeholder=\"Smith\" formControlName=\"last_name\" name=\"\" id=\"\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.last_name.errors }\">  \r\n                <div *ngIf=\"Submitted && addformcontrol.last_name.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"addformcontrol.last_name.errors.required\">Last Name is required</div>\r\n                </div>                \r\n              </div>\r\n              <div class=\"form-group\">\r\n                <label class=\"d-block text-white\">Email :</label>\r\n                <input placeholder=\"alias@server.com\" formControlName=\"email\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.email.errors }\">\r\n                <div *ngIf=\"Submitted && addformcontrol.email.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"addformcontrol.email.errors.required\">Email is required</div>\r\n                </div>  \r\n              </div>\r\n\r\n              <div class=\"form-group\">\r\n                <label class=\"d-block text-white\">Phone Number :</label>\r\n                <input placeholder=\"+18081231234\" type=\"text\" formControlName=\"phone_number\" name=\"\" id=\"\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.phone_number.errors }\">       \r\n                <div *ngIf=\"Submitted && addformcontrol.phone_number.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"addformcontrol.phone_number.errors.required\">Phone Number is required</div>\r\n                </div>           \r\n              </div>\r\n\r\n              <div class=\"form-group\">\r\n                <label class=\"d-block text-white\">I agree to the  Terms and Conditions :</label>\r\n                <label class=\"custom-switch mt-2 pl-0\">\r\n                  <input type=\"checkbox\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\" (change)=\"tc_enable($event)\">\r\n                  <span class=\"custom-switch-indicator\"></span>\r\n                </label>\r\n              </div>              \r\n            </div>\r\n          </div>\r\n          <div class=\"row text-center\">\r\n            <div class=\"col-md-12\">\r\n              <button type=\"submit\" [disabled]=\"tcenable!=true\" class=\"btn btn-primary\">Register As Publisher</button>\r\n            </div>\r\n          </div>\r\n          \r\n          <br><br>\r\n          <p>Please forward any questions or concerns regarding publisher registration to {{email}}</p>\r\n          <br><br>\r\n        </form>\r\n      </div>\r\n      <div class=\"col-md-2\"></div>\r\n    </div>\r\n\r\n    <!-- <div class=\"row\">\r\n      <div class=\"col-md-12\">\r\n        <p>Copyright © 2020 Ringlab Media LLC - All Rights Reserved.</p>\r\n      </div>\r\n      <div class=\"col-md-12 text-center mb-3\">\r\n        <a [routerLink]=\"['/publisher-terms']\" routerLinkActive=\"router-link-active\">Publisher Terms</a> <span\r\n          class=\"mr-4\"></span>\r\n        <a [routerLink]=\"['/advertiser-terms']\" routerLinkActive=\"router-link-active\" href=\"\">Advertiser Terms</a>\r\n      </div>\r\n    </div> -->\r\n\r\n  </div>\r\n</div>\r\n\r\n\r\n<div class=\"mt-5\" *ngIf=\"isavail==0\">\r\n  <div class=\"container\" >\r\n    <div class=\"row text-center\">\r\n      <div class=\"col-md-12 mt-5\">\r\n        <img alt=\"image\" width=\"250px\" src=\"./assets/img/logo.png\" class=\"header-logo mb-5  mt-5 mb-0\">\r\n        <h6 class=\"text-white\">Publisher Registration is closed at the moment, please react out to the person who have provided you with the link.</h6>\r\n        <h6 class=\"text-white\">Visit dialdigit.com to learn more about Dialdigits</h6>\r\n      </div>\r\n    </div>\r\n\r\n  </div>\r\n</div>");

/***/ }),

/***/ "dGq7":
/*!***************************************************!*\
  !*** ./src/app/auth/profile/profile.component.ts ***!
  \***************************************************/
/*! exports provided: ProfileComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProfileComponent", function() { return ProfileComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_profile_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./profile.component.html */ "GE5R");
/* harmony import */ var _profile_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./profile.component.scss */ "yuf0");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _modules_module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../modules/module.service */ "zTpG");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");








let ProfileComponent = class ProfileComponent {
    constructor(fb, moduleService, router, route, toastrService) {
        this.fb = fb;
        this.moduleService = moduleService;
        this.router = router;
        this.route = route;
        this.toastrService = toastrService;
        this.submitted = false;
        this.jsonObj = {};
        this.currentCompany = JSON.parse(localStorage.getItem('currentUser'));
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.profileForm = this.fb.group({
            firstname: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            lastname: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            password: ['', ''],
            timezone: [''],
        });
        const company_uuid = this.currentCompany.uuid;
        // console.log(this.currentCompany);
        if (company_uuid) {
            this.moduleService.getProfiledata(company_uuid).subscribe(res => {
                this.recordingval = res.is_recording;
                // console.log(res);
                this.profileForm.patchValue({
                    firstname: res.first_name,
                    lastname: res.last_name,
                    timezone: res.timezone,
                });
            });
        }
        this.gettimezone();
    }
    gettimezone() {
        this.moduleService.gettimezone().subscribe(res => {
            this.alltimezone = res;
            // console.log(res);          
        });
    }
    get_recordingstatus(event) {
        this.recording = event.target.checked;
    }
    get f() { return this.profileForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.submitted = true;
        if (this.profileForm.invalid) {
            return;
        }
        formData.append('firstname', this.profileForm.get('firstname').value);
        formData.append('lastname', this.profileForm.get('lastname').value);
        formData.append('password', this.profileForm.get('password').value);
        formData.append('timezone', this.profileForm.get('timezone').value);
        formData.append('is_recording', this.recording);
        const company_uuid = this.currentCompany.uuid;
        if (company_uuid) {
            this.moduleService.editProfile(formData, company_uuid).subscribe(res => {
                // console.log(res); return false;
                if (res.status !== 'error') {
                    var userdata = JSON.parse(localStorage.getItem('currentUser'));
                    // console.log(this.profileForm.get('timezone').value);return false;
                    userdata.timezone = this.profileForm.get('timezone').value;
                    // console.log(userdata);return false;
                    localStorage.setItem('currentUser', JSON.stringify(userdata));
                    this.toastrService.success('Profile Updated Successfully');
                }
                else {
                    this.toastrService.success('Failed To Save! Please Try Again Later..');
                }
            }, error => this.error = error);
        }
    }
};
ProfileComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"] },
    { type: _modules_module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["ActivatedRoute"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] }
];
ProfileComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-profile',
        template: _raw_loader_profile_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_profile_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], ProfileComponent);



/***/ }),

/***/ "dKHL":
/*!****************************************************************************************!*\
  !*** ./src/app/modules/ivr-menus/ivr-routing-plans/edit-plan/edit-plan.component.scss ***!
  \****************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("input#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n\n.mat-step-header {\n  background: #6777ef !important;\n  color: white !important;\n  padding: 4px !important;\n  border-radius: 5px !important;\n  margin: 7px !important;\n  height: 43px !important;\n}\n\nng-select2.ng-star-inserted {\n  pointer-events: none !important;\n  touch-action: none !important;\n  color: #e9ecef !important;\n}\n\nfieldset.scheduler-border {\n  border: 1px groove #ddd !important;\n  padding: 0 1.4em 1.4em 1.4em !important;\n  margin: 0 0 1.5em 0 !important;\n  box-shadow: 0px 0px 0px 0px #000;\n}\n\nlegend.scheduler-border {\n  font-size: 1.2em !important;\n  font-weight: bold !important;\n  text-align: left !important;\n  width: auto;\n  padding: 0 10px;\n  border-bottom: none;\n}\n\nstrong {\n  font-size: 11px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcLi5cXGVkaXQtcGxhbi5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLGFBQUE7QUFDSjs7QUFDQTtFQUNJLFlBQUE7QUFFSjs7QUFDQTtFQUNJLDhCQUFBO0VBQ0EsdUJBQUE7RUFDQSx1QkFBQTtFQUNBLDZCQUFBO0VBQ0Esc0JBQUE7RUFDQSx1QkFBQTtBQUVKOztBQUNBO0VBQ0ksK0JBQUE7RUFDQSw2QkFBQTtFQUNBLHlCQUFBO0FBRUo7O0FBQUE7RUFDSSxrQ0FBQTtFQUNBLHVDQUFBO0VBQ0EsOEJBQUE7RUFFUSxnQ0FBQTtBQUdaOztBQUFBO0VBQ0ksMkJBQUE7RUFDQSw0QkFBQTtFQUNBLDJCQUFBO0VBQ0EsV0FBQTtFQUNBLGVBQUE7RUFDQSxtQkFBQTtBQUdKOztBQVFBO0VBQ0ksZUFBQTtBQUxKIiwiZmlsZSI6ImVkaXQtcGxhbi5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbImlucHV0I29wdGlvbjEsIGlucHV0I29wdGlvbjIsIGlucHV0I29wdGlvbjN7XHJcbiAgICBkaXNwbGF5OiBub25lO1xyXG59ICAgIFxyXG4uYnRuLWdyb3VwLmZvcm0tY29udHJvbCB7XHJcbiAgICBoZWlnaHQ6IDYwcHg7XHJcbn1cclxuXHJcbi5tYXQtc3RlcC1oZWFkZXIge1xyXG4gICAgYmFja2dyb3VuZDogIzY3NzdlZiFpbXBvcnRhbnQ7XHJcbiAgICBjb2xvcjogd2hpdGUhaW1wb3J0YW50O1xyXG4gICAgcGFkZGluZzogNHB4IWltcG9ydGFudDtcclxuICAgIGJvcmRlci1yYWRpdXM6IDVweCFpbXBvcnRhbnQ7XHJcbiAgICBtYXJnaW46IDdweCFpbXBvcnRhbnQ7XHJcbiAgICBoZWlnaHQ6IDQzcHghaW1wb3J0YW50O1xyXG59XHJcblxyXG5uZy1zZWxlY3QyLm5nLXN0YXItaW5zZXJ0ZWQge1xyXG4gICAgcG9pbnRlci1ldmVudHM6IG5vbmUhaW1wb3J0YW50O1xyXG4gICAgdG91Y2gtYWN0aW9uOiBub25lIWltcG9ydGFudDtcclxuICAgIGNvbG9yOiAjZTllY2VmIWltcG9ydGFudDtcclxufVxyXG5maWVsZHNldC5zY2hlZHVsZXItYm9yZGVyIHtcclxuICAgIGJvcmRlcjogMXB4IGdyb292ZSAjZGRkICFpbXBvcnRhbnQ7XHJcbiAgICBwYWRkaW5nOiAwIDEuNGVtIDEuNGVtIDEuNGVtICFpbXBvcnRhbnQ7XHJcbiAgICBtYXJnaW46IDAgMCAxLjVlbSAwICFpbXBvcnRhbnQ7XHJcbiAgICAtd2Via2l0LWJveC1zaGFkb3c6ICAwcHggMHB4IDBweCAwcHggIzAwMDtcclxuICAgICAgICAgICAgYm94LXNoYWRvdzogIDBweCAwcHggMHB4IDBweCAjMDAwO1xyXG59XHJcblxyXG5sZWdlbmQuc2NoZWR1bGVyLWJvcmRlciB7XHJcbiAgICBmb250LXNpemU6IDEuMmVtICFpbXBvcnRhbnQ7XHJcbiAgICBmb250LXdlaWdodDogYm9sZCAhaW1wb3J0YW50O1xyXG4gICAgdGV4dC1hbGlnbjogbGVmdCAhaW1wb3J0YW50O1xyXG4gICAgd2lkdGg6YXV0bztcclxuICAgIHBhZGRpbmc6MCAxMHB4O1xyXG4gICAgYm9yZGVyLWJvdHRvbTpub25lO1xyXG59XHJcblxyXG4vLyB0aCx0ZHtcclxuLy8gICAgIHBhZGRpbmc6IDBweCAxMHB4IDBweCAxMHB4IWltcG9ydGFudDtcclxuLy8gICAgIGhlaWdodDogNDZweCFpbXBvcnRhbnQ7XHJcbi8vICAgICBiYWNrZ3JvdW5kOiAjMmVhMmQ2O1xyXG4vLyAgICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTtcclxuLy8gICAgIGNvbG9yOiB3aGl0ZTtcclxuLy8gICAgIGJvcmRlci1yYWRpdXM6IDFweDtcclxuLy8gfVxyXG5zdHJvbmcge1xyXG4gICAgZm9udC1zaXplOiAxMXB4O1xyXG59Il19 */");

/***/ }),

/***/ "db1Z":
/*!******************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/label/label.component.html ***!
  \******************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n<!-- Add Label Modal -->\r\n<div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\">\r\n   <div class=\"modal-content\">\r\n     <div class=\"modal-header\">\r\n       <h5 class=\"modal-title\" id=\"formModal\">Create Label</h5>\r\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n         <span aria-hidden=\"true\">&times;</span>\r\n       </button>\r\n     </div>\r\n     <div class=\"modal-body\">\r\n       <form id=\"addLabel\" [formGroup]=\"addLabelForm\" (ngSubmit)=\"onLabelSubmit()\">\r\n         <div class=\"row\">\r\n           <div class=\"col-md-12\">\r\n            \r\n        <!-- <fieldset class=\"scheduler-border\">\r\n          <legend class=\"scheduler-border\">Label Settings</legend> -->\r\n         <div class=\"form-group\">\r\n             <label>Label Name</label>\r\n             <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': LabelSubmitted && labelcontrol.name.errors }\" (input)=\"validatename()\">\r\n             <div *ngIf=\"LabelSubmitted && labelcontrol.name.errors\" class=\"invalid-feedback\">\r\n                 <div *ngIf=\"labelcontrol.name.errors.required\">Name is required</div>\r\n             </div>   \r\n             <div *ngIf=\"isName == 'success'  && isName != ''\" style=\"color:green;\">\r\n                Name Is Available\r\n              </div> \r\n               <div *ngIf=\"isName == 'fail' && isName != ''\" style=\"color:red;\">\r\n                Name Is Not Available\r\n              </div>           \r\n          </div>\r\n\r\n           <div class=\"form-group\">\r\n             <label  class=\"d-block\">Notes:</label>\r\n             <textarea formControlName=\"notes\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': LabelSubmitted && labelcontrol.notes.errors }\"></textarea>                   \r\n             <div *ngIf=\"LabelSubmitted && labelcontrol.notes.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"labelcontrol.notes.errors.required\">Notes is required</div>\r\n            </div>         \r\n           </div>\r\n\r\n           <!-- </fieldset> -->\r\n \r\n          </div>\r\n          <!-- <div class=\"col-md-6\"> -->\r\n          <!-- <fieldset class=\"scheduler-border\">\r\n            <legend class=\"scheduler-border\">Conversation Setting</legend>\r\n            <div class=\"control-group\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Conversation Revenue :</label>\r\n                <div class=\"input-group\">\r\n                  <div class=\"input-group-prepend\">\r\n                    <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                  </div>\r\n                  <input type=\"text\" formControlName=\"conversation_revenue\" class=\"form-control\" placeholder=\"Enter Conversation Revenue\" aria-label=\"Enter Conversation Revenue\" aria-describedby=\"btnGroupAddon\">\r\n                  <div *ngIf=\"LabelSubmitted && labelcontrol.conversation_revenue.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"labelcontrol.conversation_revenue.errors.required\">Conversation Revenue is required</div>\r\n                </div>   \r\n                </div>                               \r\n            </div>\r\n            <div class=\"control-group mt-2\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Conversation Event :</label>\r\n                   <select formControlName=\"conversation_event\" [value]=\"0\" class=\"form-control\">\r\n                     <option value=\"0\">Call Length</option>\r\n                     <option value=\"1\">Call Successfully Connected</option>\r\n                   </select>  \r\n                   <div *ngIf=\"LabelSubmitted && labelcontrol.conversation_event.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"labelcontrol.conversation_event.errors.required\">Conversation Event is required</div>\r\n                  </div>               \r\n            </div>\r\n            <div class=\"control-group mt-2\" *ngIf=\"this.addLabelForm.get('conversation_event').value == 0\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                <input type=\"text\" formControlName=\"conversation_seconds\" class=\"form-control\" type=\"text\" name=\"startTime\" placeholder=\"Start Time\" />                       \r\n            </div>\r\n          </fieldset> -->\r\n        <!-- </div> -->\r\n      </div>\r\n      <div class=\"row\">\r\n        <div class=\"col-md-12\">\r\n          <!-- <fieldset class=\"scheduler-border\">\r\n            <legend class=\"scheduler-border\">Publisher Payout Conversation</legend>\r\n            <div class=\"control-group\">\r\n                      <label class=\"control-label input-label\" for=\"startTime\">Payout Type :</label>\r\n                      <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                      <label class=\"btn btn-primary form-check-label active\" (click)=\"payout_typeval(0)\"> \r\n                            <input class=\"form-check-input\" name=\"payout_type\" formControlName=\"payout_type\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                            None\r\n                          </label>\r\n                          <label class=\"btn btn-primary form-check-label\" (click)=\"payout_typeval(1)\">\r\n                            <input class=\"form-check-input\" name=\"payout_type\" formControlName=\"payout_type\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                             Fixed Payout\r\n                          </label>\r\n                          <label class=\"btn btn-primary form-check-label\" (click)=\"payout_typeval(2)\">\r\n                            <input class=\"form-check-input\" name=\"payout_type\" formControlName=\"payout_type\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                             Revenue %\r\n                          </label>\r\n                        </div>\r\n                        <div *ngIf=\"LabelSubmitted && labelcontrol.payout_type.errors\" class=\"invalid-feedback\">\r\n                          <div *ngIf=\"labelcontrol.payout_type.errors.required\">Payout Type is required</div>\r\n                      </div>   \r\n          </div>\r\n\r\n            <div *ngIf=\"payout_typevalue != 0\">\r\n            <div class=\"control-group mt-2\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Payout Amount :</label>\r\n                  <div class=\"input-group\">\r\n                    <div class=\"input-group-prepend\">\r\n                      <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                    </div>\r\n                    <input type=\"text\" formControlName=\"payout_amount\" class=\"form-control\" placeholder=\"Enter Payout Amount\" aria-label=\"Enter Payout Amount\" aria-describedby=\"btnGroupAddon\">\r\n                  </div>                 \r\n            </div>\r\n\r\n            <div class=\"control-group mt-2\">\r\n              <label class=\"control-label input-label\" for=\"startTime\">Payout Trigger :</label>\r\n                 <select class=\"form-control\" [value]=\"0\" formControlName=\"payout_trigger\">\r\n                   <option value=\"0\">Inbound Call</option>\r\n                   <option value=\"1\">Call Length</option>\r\n                   <option value=\"2\">Call Successfully Connected</option>\r\n                 </select>              \r\n            </div>\r\n            <div class=\"control-group mt-2\" *ngIf=\"this.addLabelForm.get('payout_trigger').value == 1\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                <input type=\"text\"  class=\"form-control\" type=\"text\" formControlName=\"payout_seconds\" placeholder=\"Enter Seconds\" />         \r\n            </div>\r\n          </div>\r\n          </fieldset> -->\r\n        </div>\r\n        <!-- <div class=\"col-md-4\">\r\n          <fieldset class=\"scheduler-border\">\r\n            <legend class=\"scheduler-border\">Recording Settings</legend>\r\n            <div class=\"form-group\">\r\n              <div class=\"control-label\">Recording</div>\r\n              <label class=\"custom-switch mt-2 pl-0\">\r\n                <input type=\"checkbox\" (change)=\"get_recordingstatus($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                <span class=\"custom-switch-indicator\"></span>                     \r\n              </label>\r\n            </div>\r\n          </fieldset>\r\n        </div> -->\r\n        </div>\r\n         <div class=\"modal-footer\" style=\"padding: 0;\">\r\n          <!-- !addLabelForm.valid || -->\r\n            <button [disabled]=\"isName == 'fail'\" (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Label</button>\r\n            <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n           </div>\r\n       </form>\r\n     </div>\r\n   </div>\r\n </div>\r\n </div>   \r\n\r\n<!-- Edit Label Modal -->\r\n<div class=\"modal  fade\" id=\"editLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n aria-hidden=\"true\">\r\n <div class=\"modal-dialog model-lg\" role=\"document\">\r\n   <div class=\"modal-content\">\r\n     <div class=\"modal-header\">\r\n       <h5 class=\"modal-title\" id=\"formModal\">Save Label</h5>\r\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n         <span aria-hidden=\"true\">&times;</span>\r\n       </button>\r\n     </div>\r\n     <div class=\"modal-body\">\r\n       <form [formGroup]=\"editLabelForm\" (ngSubmit)=\"onLabelEditSubmit()\">\r\n         <div class=\"row\">\r\n           <div class=\"col-md-12\">\r\n             \r\n        <!-- <fieldset class=\"scheduler-border\">\r\n          <legend class=\"scheduler-border\">Label Settings</legend> -->\r\n         <div class=\"form-group\">\r\n             <label>Label Name</label>\r\n             <input type=\"hidden\" name=\"uuid\" formControlName=\"uuid\">\r\n             <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': LabelSubmitted && labelcontrol.name.errors }\" (input)=\"validatename()\" readonly>\r\n             <div *ngIf=\"LabelSubmitted && labelcontrol.name.errors\" class=\"invalid-feedback\">\r\n                 <div *ngIf=\"labelcontrol.name.errors.required\">Name is required</div>\r\n             </div> \r\n             <div *ngIf=\"isName == 'success'  && isName != ''\" style=\"color:green;\">\r\n                Name Is Available\r\n              </div> \r\n             <div *ngIf=\"isName == 'fail' && isName != ''\" style=\"color:red;\">\r\n                Name Is Not Available\r\n              </div>                \r\n           </div>\r\n\r\n           <div class=\"form-group\">\r\n             <label  class=\"d-block\">Notes:</label>\r\n             <textarea formControlName=\"notes\" class=\"form-control\"></textarea>                   \r\n             <div *ngIf=\"LabelSubmitted && labelcontrol.notes.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"labelcontrol.notes.errors.required\">Notes is required</div>\r\n            </div>         \r\n           </div>\r\n\r\n        <!-- </fieldset> -->\r\n\r\n      </div>\r\n      <!-- <div class=\"col-md-6\">\r\n    \r\n          <fieldset class=\"scheduler-border\">\r\n            <legend class=\"scheduler-border\">Conversation Setting</legend>\r\n            <div class=\"control-group\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Conversation Revenue :</label>\r\n                <div class=\"input-group\">\r\n                  <div class=\"input-group-prepend\">\r\n                    <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                  </div>\r\n                  <input type=\"text\" formControlName=\"conversation_revenue\" class=\"form-control\" placeholder=\"Enter Conversation Revenue\" aria-label=\"Enter Conversation Revenue\" aria-describedby=\"btnGroupAddon\">\r\n                  <div *ngIf=\"LabelSubmitted && labelcontrol.conversation_revenue.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"labelcontrol.conversation_revenue.errors.required\">Conversation Revenue is required</div>\r\n                </div>   \r\n                </div>                               \r\n            </div>\r\n            <div class=\"control-group mt-2\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Conversation Event :</label>\r\n                   <select formControlName=\"conversation_event\" class=\"form-control\">\r\n                     <option value=\"0\">Call Length</option>\r\n                     <option value=\"1\">Call Successfully Connected</option>\r\n                   </select>  \r\n                   <div *ngIf=\"LabelSubmitted && labelcontrol.conversation_event.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"labelcontrol.conversation_event.errors.required\">Conversation Event is required</div>\r\n                  </div>               \r\n            </div>\r\n            <div class=\"control-group mt-2\" *ngIf=\"this.editLabelForm.get('conversation_event').value == 0\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                <input type=\"text\" formControlName=\"conversation_seconds\" class=\"form-control\" type=\"text\" placeholder=\"Start Time\" />                       \r\n            </div>\r\n          </fieldset>\r\n          \r\n      </div>       -->\r\n    </div>  \r\n    <div class=\"row\">\r\n      <div class=\"col-md-12\">\r\n          <!-- <fieldset class=\"scheduler-border\">\r\n            <legend class=\"scheduler-border\">Publisher Payout Conversation</legend>\r\n            <div class=\"control-group\">\r\n                      <label class=\"control-label input-label\" for=\"startTime\">Payout Type :</label>\r\n                      <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                      <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==0}\" (click)=\"payout_typevaledit(0)\"> \r\n                            <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                            None\r\n                          </label>\r\n                          <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payout_typevaledit(1)\">\r\n                            <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                             Fixed Payout\r\n                          </label>\r\n                          <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                            <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                             Revenue %\r\n                          </label>\r\n                        </div>\r\n                        <div *ngIf=\"LabelSubmitted && labelcontrol.payout_type.errors\" class=\"invalid-feedback\">\r\n                          <div *ngIf=\"labelcontrol.payout_type.errors.required\">Payout Type is required</div>\r\n                      </div>   \r\n          </div>\r\n            <div *ngIf=\"payout_typevalueedit != 0\">\r\n            <div class=\"control-group mt-2\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Payout Amount :</label>\r\n                  <div class=\"input-group\">\r\n                    <div class=\"input-group-prepend\">\r\n                      <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                    </div>\r\n                    <input type=\"text\" formControlName=\"payout_amount\" class=\"form-control\" placeholder=\"Enter Payout Amount\" aria-label=\"Enter Payout Amount\" aria-describedby=\"btnGroupAddon\">\r\n                  </div>                 \r\n            </div>\r\n\r\n            <div class=\"control-group mt-2\">\r\n              <label class=\"control-label input-label\" for=\"startTime\">Payout Trigger :</label>\r\n                 <select class=\"form-control\" formControlName=\"payout_trigger\">\r\n                   <option value=\"0\">Inbound Call</option>\r\n                   <option value=\"1\">Call Length</option>\r\n                   <option value=\"2\">Call Successfully Connected</option>\r\n                 </select>              \r\n            </div>\r\n            <div class=\"control-group mt-2\" *ngIf=\"this.editLabelForm.get('payout_trigger').value == 1\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                <input type=\"text\"  class=\"form-control\" type=\"text\" formControlName=\"payout_seconds\" placeholder=\"Enter Seconds\" />         \r\n            </div>\r\n          </div>\r\n          </fieldset> -->\r\n      </div>\r\n      <!-- <div class=\"col-md-4\">\r\n          <fieldset class=\"scheduler-border\">\r\n            <legend class=\"scheduler-border\">Recording Settings</legend>\r\n            <div class=\"form-group\">\r\n              <div class=\"control-label\">Recording</div>\r\n              <label class=\"custom-switch mt-2 pl-0\">\r\n                <input type=\"checkbox\" [checked]=\"recordingval==1\" (change)=\"get_recordingstatus($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                <span class=\"custom-switch-indicator\"></span>                     \r\n              </label>\r\n            </div>\r\n          </fieldset>\r\n        </div>       -->\r\n      </div>      \r\n    \r\n      <!-- <div class=\"row\">\r\n      <div class=\"col-md-6\">\r\n          <fieldset class=\"scheduler-border\">\r\n            <legend class=\"scheduler-border\">Cap Settings </legend>\r\n           \r\n            <div class=\"control-group mt-2\">\r\n              <div class=\"row\">\r\n                <div class=\"col-3 mt-2\">\r\n                  <label class=\"control-label input-label\" for=\"startTime\">Cap On :</label>\r\n                </div>\r\n                <div class=\"col-9\">\r\n                  <select class=\"form-control\" formControlName=\"payout_trigger\">\r\n                    <option value=\"0\">Conversion</option>\r\n                    <option value=\"1\">Connection</option>                   \r\n                  </select>              \r\n                </div>\r\n              </div>\r\n            </div>\r\n            \r\n            <div class=\"control-group mt-2\">\r\n              <div class=\"row\">\r\n                <div class=\"col-3 mt-2\">\r\n                  <label class=\"control-label input-label\" for=\"startTime\">Monthly Cap :</label>\r\n                </div>\r\n                <div class=\"col-9\">\r\n                  <label class=\"custom-switch mt-2 pl-0\">\r\n                    <input type=\"checkbox\" (change)=\"get_jklrules($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                    <span class=\"custom-switch-indicator\"></span>                     \r\n                  </label>    \r\n                </div>\r\n              </div>\r\n            </div>\r\n         \r\n          </fieldset>\r\n      </div>\r\n      <div class=\"col-md-4\">\r\n          <fieldset class=\"scheduler-border\">\r\n            <legend class=\"scheduler-border\">Recording Settings</legend>\r\n            <div class=\"form-group\">\r\n              <div class=\"control-label\">Recording</div>\r\n              <label class=\"custom-switch mt-2 pl-0\">\r\n                <input type=\"checkbox\" [checked]=\"recordingval==1\" (change)=\"get_recordingstatus($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                <span class=\"custom-switch-indicator\"></span>                     \r\n              </label>\r\n            </div>\r\n          </fieldset>\r\n        </div>      \r\n      </div>       -->\r\n         <div class=\"modal-footer\" style=\"padding: 0;\">\r\n            <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Save Label</button>\r\n            <button type=\"button\" class=\"btn btn-secondary m-t-15 waves-effect\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n              Close\r\n            </button>\r\n           </div>\r\n       </form>\r\n     </div>\r\n   </div>\r\n </div>\r\n </div>    \r\n\r\n  <div class=\"main-content\">\r\n  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-4\">\r\n                        <div class=\"card-header\">\r\n                        <h4>Label Data</h4></div>\r\n                    </div>\r\n                    <div class=\"col-8 text-right mt-2\">\r\n                        <div class=\"form-group\" style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                           <button type=\"button\" data-toggle=\"modal\" data-target=\"#addLabels\" class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon mr-2 p-2\"><i class=\"fa fa-plus\"></i> Create Label\r\n                            </button>\r\n                            <button type=\"button\" (click)=\"exportdata()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Export\r\n                            </button>\r\n                            <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Delete Selected\r\n                            </button>\r\n                          </div>                       \r\n                    </div>              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n\r\n                <!-- <ngx-datatable [rows]=\"rows\"\r\n                class=\"material\"\r\n                [headerHeight]=\"50\"\r\n                [footerHeight]=\"50\"\r\n                rowHeight=\"auto\"\r\n                [limit]=\"10\"                                \r\n                 [columns]=\"columns\"> </ngx-datatable> -->\r\n  \r\n\r\n\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                    <thead>\r\n                      <tr>\r\n                        <th style=\"padding: 10px;\">\r\n                            <div class=\"custom-control custom-checkbox\" *ngIf=\"labels?.length != 0\">\r\n                            <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                            <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                            </div>\r\n                        </th>\r\n                        <th>Label</th>\r\n                        <th>Notes</th>\r\n                        <th>Number Of Numbers</th>\r\n                        <th>Created Date</th>\r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"labels?.length != 0\" >\r\n                        <tr *ngFor=\"let label of labels;let i=index\">\r\n                            <td>\r\n                                <div class=\"custom-control custom-checkbox\">\r\n                                <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{label.uuid}}\"  [checked]=\"label.selected\" [value]=\"label.id\" >\r\n                                <label class=\"custom-control-label\" for=\"customCheck_{{label.uuid}}\"></label>\r\n                                </div>                                \r\n                            </td>\r\n                            <td><a class=\"text-white\" routerLink=\"/labels/view/{{ label.permalink }}\" routerLinkActive=\"router-link-active\" >{{ label.name }} </a>\r\n                            </td>\r\n                            <td data-original-title=\"999\" data-container=\"body\"\r\n                            data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"{{label.notes}}\" >\r\n                            <div *ngIf=\"label.notes.length >= 15\">\r\n                              {{ label.notes.substring(0,15) }}..\r\n                            </div>\r\n                            <div *ngIf=\"label.notes.length <= 15\">\r\n                              {{ label.notes}}\r\n                            </div>\r\n                            </td>\r\n                            <td>{{ label.noofnos }}</td>\r\n                            <td>{{ label.created_at }}</td>                            \r\n                            <td><button type=\"button\" (click)=\"editLabel(label.uuid,label.is_recording,label.name,label.notes,label.conversation_revenue,label.conversation_event,label.conversation_seconds,label.payout_type,label.payout_amount,label.payout_trigger,label.payout_seconds)\" data-toggle=\"modal\" data-target=\"#editLabels\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></button>&nbsp;<button type=\"button\" (click)=\"Delete((label.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"labels?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>  ");

/***/ }),

/***/ "djt6":
/*!*******************************************************************!*\
  !*** ./src/app/modules/publishers/thankyou/thankyou.component.ts ***!
  \*******************************************************************/
/*! exports provided: ThankyouComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThankyouComponent", function() { return ThankyouComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_thankyou_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./thankyou.component.html */ "4REg");
/* harmony import */ var _thankyou_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./thankyou.component.scss */ "xIO+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");




let ThankyouComponent = class ThankyouComponent {
    constructor() { }
    ngOnInit() {
        this.company = localStorage.getItem('company');
    }
};
ThankyouComponent.ctorParameters = () => [];
ThankyouComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-thankyou',
        template: _raw_loader_thankyou_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_thankyou_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], ThankyouComponent);



/***/ }),

/***/ "dwv9":
/*!*******************************************************************************!*\
  !*** ./src/app/modules/number/number-batchedit/number-batchedit.component.ts ***!
  \*******************************************************************************/
/*! exports provided: NumberBatcheditComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberBatcheditComponent", function() { return NumberBatcheditComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_number_batchedit_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./number-batchedit.component.html */ "FYc2");
/* harmony import */ var _number_batchedit_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number-batchedit.component.scss */ "sFoh");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");








let NumberBatcheditComponent = class NumberBatcheditComponent {
    constructor(fb, moduleService, router, route, toastrService) {
        this.fb = fb;
        this.moduleService = moduleService;
        this.router = router;
        this.route = route;
        this.toastrService = toastrService;
        this.submitted = false;
        this.dropdownList = [];
        this.selectedItems = [];
        this.dropdownSettings = {};
        this.selectednumber = [];
        this.pageTitle = "Import Numbers";
        this.payout_typevalueedit = 0;
        this.jklrules = 'false';
        this.LabelSubmitted = false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
    }
    ngOnInit() {
        this.getAllpublisher();
        this.getAllcampaign();
        this.getAllLabels();
        // console.log(this.selectednumber);
        this.dropdownSettings = {
            singleSelection: false,
            text: "Select Associated Labels",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        this.addForm = this.fb.group({
            number: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            campaign: [''],
            add_assosciated_labels: [''],
            remove_assosciated_labels: [''],
            publisher: [''],
            payout_typeedit: [''],
            payout_amount: [''],
            payout_trigger: [''],
            payout_seconds: [''],
        });
        this.addLabelForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            notes: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
        });
        // this.id = this.route.snapshot.paramMap.get('id');
        // if(this.id==1){
        this.moduleService.getnumbersInfo().subscribe(info => {
            this.getselectednumberslist = info.numberslist;
            // console.log(this.getselectednumberslist);
            var numberlist = '';
            if (this.getselectednumberslist) {
                for (let index = 0; index < this.getselectednumberslist.length; index++) {
                    numberlist += this.getselectednumberslist[index] + "\r\n";
                }
                this.addForm.patchValue({ number: numberlist.toString() });
            }
            // this.addForm.get('number').setValue("hello");
            // this.addForm.patchValue({
            //   number:this.getselectednumberslist,      
            // });
            // console.log(this.getselectednumberslist);
        });
        // }
    }
    payout_typevaledit(val) {
        this.payout_typevalueedit = val;
        this.addForm.get('payout_typeedit').setValue(val);
    }
    get_campaign(event) {
        this.iscampaign = event.target.checked;
    }
    get_publishter(event) {
        this.ispublisher = event.target.checked;
    }
    get_label(event) {
        this.islabel = event.target.checked;
    }
    get_removelabel(event) {
        this.isremovelabel = event.target.checked;
    }
    getAllRules() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getAllRules(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            this.allRulesData = res;
        }, error => this.error = error);
    }
    getRulesByName(name) {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getRulesByName(name, this.currentCompany.uuid).subscribe(res => {
            this.allRulesbyname = res;
        }, error => this.error = error);
    }
    getAllpublisher() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getAllpublishers(this.currentCompany.uuid).subscribe(res => {
            this.Allpublisher = res;
        }, error => this.error = error);
    }
    getAllcampaign() {
        this.moduleService.getallcampaindata(this.currentCompany.uuid).subscribe(res => {
            this.getallcampain = res;
            // console.log(this.getallcampain);
        });
    }
    getAllLabels() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getAllLabels(this.currentCompany.uuid).subscribe(res => {
            this.dropdownList = res;
        }, error => this.error = error);
    }
    onFileChange(event) {
        if (event.target.files.length > 0) {
            const file = event.target.files[0];
            const ext = file.name.split('.').pop();
            ;
            if (ext == 'csv') {
                this.uploadfile = file;
                this.filename = file.name;
            }
            else {
                this.addForm.reset({
                    number: ''
                });
                this.toastrService.error('Please Select only .csv file to import numbers');
            }
        }
    }
    get_jklrules(event) {
        this.jklrules = event.target.checked;
    }
    get f() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // formData.append('number', this.uploadfile);    
        formData.append('number', this.addForm.get('number').value);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('iscampaign', this.iscampaign);
        formData.append('ispublisher', this.ispublisher);
        formData.append('islabel', this.islabel);
        formData.append('isremovelabel', this.isremovelabel);
        formData.append('campaign', JSON.stringify(this.addForm.get('campaign').value));
        formData.append('publisher', JSON.stringify(this.addForm.get('publisher').value));
        formData.append('payout_typeedit', this.addForm.get('payout_typeedit').value);
        formData.append('payout_amount', this.addForm.get('payout_amount').value);
        formData.append('payout_trigger', this.addForm.get('payout_trigger').value);
        formData.append('payout_seconds', this.addForm.get('payout_seconds').value);
        // formData.append('ruleset', this.addForm.get('ruleset').value);
        formData.append('add_assosciated_labels', JSON.stringify(this.addForm.get('add_assosciated_labels').value));
        formData.append('remove_assosciated_labels', JSON.stringify(this.addForm.get('remove_assosciated_labels').value));
        // console.log(formData); return false;
        this.showLoadingIndicator = true;
        this.moduleService.batcheditnos(formData).subscribe(res => {
            this.showLoadingIndicator = false;
            // console.log(res); return false;
            if (res.status == 'success') {
                this.toastrService.success(res.noofrecords + ' Numbers Updated Successfully');
                // this.router.navigate(['/numbers']);
                this.router.navigate(['/numbers']);
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    onReset() {
        this.submitted = false;
        this.addForm.reset();
    }
    closeModal() {
        if (this.addLabelForm.get('name').value && this.addLabelForm.get('notes').value) {
            $("#addLabels").modal("hide");
            $(".custom-switch-input").prop('checked', false);
            this.LabelSubmitted = false;
            setTimeout(() => {
                this.addLabelForm.reset();
                this.isName = "";
            }, 2000);
        }
    }
    validatename() {
        if (this.addLabelForm.get('name').value != '') {
            this.moduleService.validateLabelName(this.addLabelForm.get('name').value).subscribe(res => {
                // console.log(res); return false;  
                this.isName = res;
                if (this.isName.status == 'success') {
                    this.isName = "success";
                }
                else {
                    this.isName = "fail";
                }
            });
        }
        else {
            this.isName = "";
        }
    }
    get labelcontrol() { return this.addLabelForm.controls; }
    onLabelSubmit() {
        const formData = new FormData();
        this.LabelSubmitted = true;
        if (this.addLabelForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('name', this.addLabelForm.get('name').value);
        formData.append('notes', this.addLabelForm.get('notes').value);
        this.moduleService.addLabel(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Label Added Successfully');
                this.getAllLabels();
                this.LabelSubmitted = false;
                this.isName = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
};
NumberBatcheditComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["ActivatedRoute"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] }
];
NumberBatcheditComponent.propDecorators = {
    selectednumber: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] }]
};
NumberBatcheditComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-number-batchedit',
        template: _raw_loader_number_batchedit_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ChangeDetectionStrategy"].OnPush,
        styles: [_number_batchedit_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], NumberBatcheditComponent);



/***/ }),

/***/ "ee52":
/*!**********************************************!*\
  !*** ./src/app/modules/messaging.service.ts ***!
  \**********************************************/
/*! exports provided: MessagingService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MessagingService", function() { return MessagingService; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "qCKp");
/* harmony import */ var _angular_fire_messaging__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/fire/messaging */ "XoYk");




let MessagingService = class MessagingService {
    constructor(angularFireMessaging) {
        this.angularFireMessaging = angularFireMessaging;
        this.currentMessage = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](null);
    }
    requestPermission() {
        this.angularFireMessaging.requestToken.subscribe((token) => {
            console.log('Permission granted! Save to the server!', token);
        }, (error) => {
            console.log(error);
        });
    }
    receiveMessage() {
        this.angularFireMessaging.onMessage((payload) => {
            console.log('Message received. ', payload);
            this.currentMessage.next(payload);
        });
    }
};
MessagingService.ctorParameters = () => [
    { type: _angular_fire_messaging__WEBPACK_IMPORTED_MODULE_3__["AngularFireMessaging"] }
];
MessagingService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
        providedIn: 'root'
    })
], MessagingService);



/***/ }),

/***/ "ey5a":
/*!************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pagenotfound/pagenotfound.component.html ***!
  \************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<p>pagenotfound works!</p>\n");

/***/ }),

/***/ "fECr":
/*!********************************************!*\
  !*** ./src/app/header/header.component.ts ***!
  \********************************************/
/*! exports provided: HeaderComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderComponent", function() { return HeaderComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_header_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./header.component.html */ "kjkU");
/* harmony import */ var _header_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./header.component.scss */ "8PEf");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../global */ "XrUY");
/* harmony import */ var _modules_module_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modules/module.service */ "zTpG");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs */ "qCKp");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");









let HeaderComponent = class HeaderComponent {
    constructor(moduleservice, router, toastrService) {
        this.moduleservice = moduleservice;
        this.router = router;
        this.toastrService = toastrService;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_5__["GlobalVariable"].BASE_API_URL;
        this.timeIntevalSeconds = 0;
        this.jsonObj = {};
        this.clickcount = 0;
    }
    ngOnInit() {
        var loggedinuser = JSON.parse(localStorage.getItem('currentUser'));
        if (loggedinuser) {
            this.firstName = loggedinuser.first_name;
            this.lastName = loggedinuser.last_name;
            this.role = loggedinuser.role;
            if (this.role == 2) {
                this.companies = loggedinuser.companydetails;
                // console.log(this.companies);
            }
            this.showLoadingIndicator = true;
            setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
            this.getcallvalue();
            const source = Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["interval"])(30000);
            this.subscription = source.subscribe(val => this.getcallvalue());
        }
    }
    getcallvalue() {
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getcallvalue(this.currentCompany.uuid, this.currentUser.timezone).subscribe(res => {
            // console.log(res);return false;
            this.livecall = res.livecall;
            this.completedcalls = res.completedcall;
        });
    }
    logout() {
        localStorage.clear();
        this.router.navigate(['./login']);
    }
    switchcompany(uuid) {
        this.moduleservice.getcompanydetailsbyuuid(uuid).subscribe(res => {
            var loggedinuser = JSON.parse(localStorage.getItem('currentUser'));
            // console.log(loggedinuser);return false;
            this.completedcalls = res.completedcall;
            this.jsonObj = {
                "user_id": loggedinuser.id,
                "uuid": loggedinuser.uuid,
                "company_uuid": loggedinuser.company_uuid,
                "first_name": loggedinuser.first_name,
                "last_name": loggedinuser.last_name,
                "pic": loggedinuser.pic,
                "token": loggedinuser.token,
                "role": loggedinuser.role,
                "companydetails": res.companies,
                "timezone": loggedinuser.timezone
            };
            // console.log(this.jsonObj);return false;
            this.companies = res.companies;
            localStorage.setItem('currentCompany', JSON.stringify(res.companydetails));
            localStorage.setItem('currentUser', JSON.stringify(this.jsonObj));
            // this.showLoadingIndicator= true;
            // this.router.navigate(['/'])
            setTimeout(() => {
                this.showLoadingIndicator = false;
                window.location.reload();
            }, 1000);
            // this.ngOnInit();
            if (res) {
                this.toastrService.success('Welcome To ' + res.companydetails.name);
            }
            else {
                this.toastrService.error('Failed To Switch Company');
            }
        });
    }
    getSidebar() {
        if (this.clickcount == 1) {
            // $('body').removeClass("sidebar-mini");      
            $('body').addClass("sidebar");
            this.clickcount = 0;
        }
        else {
            $('body').removeClass("sidebar");
            // $('body').addClass("sidebar-mini");    
            $('body').removeClass("sidebar-gone");
            this.clickcount = 1;
        }
    }
};
HeaderComponent.ctorParameters = () => [
    { type: _modules_module_service__WEBPACK_IMPORTED_MODULE_6__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] }
];
HeaderComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-header',
        template: _raw_loader_header_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_header_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], HeaderComponent);



/***/ }),

/***/ "fp1T":
/*!********************************************!*\
  !*** ./src/app/footer/footer.component.ts ***!
  \********************************************/
/*! exports provided: FooterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FooterComponent", function() { return FooterComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_footer_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./footer.component.html */ "HhuZ");
/* harmony import */ var _footer_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./footer.component.scss */ "pUeC");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ "ofXK");





let FooterComponent = class FooterComponent {
    constructor(renderer, elementRef, doc) {
        this.renderer = renderer;
        this.elementRef = elementRef;
        this.doc = doc;
        this.count = 0;
    }
    ngOnInit() {
        // let link1: HTMLLinkElement = this.doc.createElement('link');
        //  link1.setAttribute('rel', 'amphtml');
        //  link1.setAttribute('href', '../assets/css/app.min.css');
        //  this.doc.head.appendChild(link1);
        //  let link2: HTMLLinkElement = this.doc.createElement('link');
        //  link2.setAttribute('rel', 'amphtml');
        //  link2.setAttribute('href', '../assets/css/components.css');
        //  this.doc.head.appendChild(link2);
        // $('.settingPanelToggle').click(function(){
        //   this.count = 1;
        //   console.log(this.count);
        //   // $('.settingPanelToggle').toggleClass('showSettingPanel');
        //   // $('.settingSidebar').toggleClass('showSettingPanel');      
        // });
        // $('.settingPanelToggle').removeClass('showSettingPanel');
        // $('.settingSidebar').removeClass('showSettingPanel');
        // this.addJsToElement("../assets/js/app.min.js").onload ;
        this.addJsToElement("../assets/js/page/index.js").onload;
        this.addJsToElement("../assets/js/scripts.js").onload;
        this.addJsToElement("../assets/js/custom.js").onload;
        this.getyear = (new Date()).getFullYear();
    }
    show() {
        this.count = this.count + 1;
        if (this.count % 2 == 0) {
            this.count = 0;
        }
    }
    addJsToElement(src) {
        const script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = src;
        this.renderer.appendChild(document.body, script);
        return script;
    }
};
FooterComponent.ctorParameters = () => [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Renderer2"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ElementRef"] },
    { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["DOCUMENT"],] }] }
];
FooterComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-footer',
        template: _raw_loader_footer_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_footer_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], FooterComponent);



/***/ }),

/***/ "fr54":
/*!**********************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/reports/reports.component.html ***!
  \**********************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n<div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\">\r\n   <div class=\"modal-content\">\r\n     <div class=\"modal-header\">\r\n       <h5 class=\"modal-title\" id=\"formModal\">Export Call Details</h5>\r\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n         <span aria-hidden=\"true\">&times;</span>\r\n       </button>\r\n     </div>\r\n     <div class=\"modal-body\">\r\n         <div class=\"row\">\r\n           <div class=\"col-md-12\">\r\n          <div class=\"form-group\">\r\n             <label>Select Number of Record you want to export</label>\r\n             <select name=\"\" [(ngModel)]=\"noofrecords\" id=\"\" class=\"form-control\">\r\n               <option value=\"500\">500</option>\r\n               <option value=\"1000\" selected>1000</option>\r\n               <option value=\"5000\">5000</option>\r\n               <option value=\"10000\">10000</option>\r\n               <option value=\"30000\">30000</option>\r\n               <option value=\"50000\">50000</option>\r\n               <option value=\"100000\">100000</option>\r\n             </select>\r\n          </div>\r\n\r\n      </div>\r\n        </div>\r\n    \r\n         <div class=\"modal-footer\" style=\"padding: 0;\">\r\n          <!-- !addLabelForm.valid || -->\r\n            <button (click)=\"exportdata()\" type=\"button\" class=\"btn btn-primary m-t-15 waves-effect\">Export</button>\r\n            <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\" data-dismiss=\"modal\" aria-label=\"Close\">Close</button>\r\n           </div>\r\n     </div>\r\n   </div>\r\n </div>\r\n </div>   \r\n\r\n<div class=\"main-content pt-0\">  \r\n\r\n    <section class=\"pb-0\">\r\n          \r\n    </section>\r\n  \r\n    <section>\r\n      <div class=\"card\">\r\n        <div class=\"\">\r\n          <div style=\"background: #0f121a;\">\r\n            <div class=\"card-header pb-0 border-bottom-0\">\r\n            <!-- <div class=\"col-md-1 col-sm-1\">\r\n              <h6 (click)=\"togglepanel()\" style=\"font-size: 14px;\"><i class=\"material-icons\" >settings</i> <span>Today</span></h6>\r\n            </div> -->\r\n            <div class=\"col-md-3 pl-0\">\r\n                <!-- <label for=\"\">Select Date </label> -->\r\n                <!-- [timePicker]=\"true\" -->\r\n                <div class=\"input-group mb-2\">\r\n                  <input type=\"text\" class=\"form-control\" placeholder=\"Please enter report name\" [(ngModel)]=\"labelval\" [ngModelOptions]=\"{standalone: true}\">\r\n                  <div class=\"input-group-append\">\r\n                    <span class=\"input-group-text\" style=\"font-size: 12px;\r\n                    background: #3858E7;\r\n                    color: white;cursor: pointer;\">\r\n                      <span (click)=\"savelabel()\" class=\"\">Save</span>\r\n                       <!-- <i *ngIf=\"isreport==1\" (click)=\"deletelabel()\" class=\"fa fa-trash\"></i> -->\r\n                    </span>\r\n                  </div>\r\n                  <button *ngIf=\"isreport==1\" class=\"btn btn-danger btn-sm ml-2\" style=\"width: 30px; padding: 0;\">\r\n                    <i (click)=\"deletelabel()\" class=\"fa fa-trash\"></i>\r\n                  </button>\r\n                </div>\r\n                <!-- <span class=\"error\" *ngIf=\"islabelvaltext=='yes'\">Please Select Report Name</span>  -->\r\n                \r\n\r\n                \r\n            </div>\r\n            <div class=\"col-md-3\">\r\n\r\n              <div class=\"input-group\">\r\n                <input type=\"text\" ngxDaterangepickerMd\r\n                      [timePicker]=\"true\"\r\n                      [timePicker24Hour]=\"true\"\r\n                      (datesUpdated)=\"filterval($event)\"\r\n                      [(ngModel)]=\"selected\"\r\n                      [ngModelOptions]=\"{getterSetter: true, updateOn: 'blur',timezone: 'utc'}\"\r\n                      [showCustomRangeLabel]=\"true\"\r\n                      [alwaysShowCalendars]=\"alwaysShowCalendars\"\r\n                      [ranges]=\"ranges\"    \r\n                      [showCancel]=\"true\"\r\n                      [linkedCalendars]=\"true\"\r\n                      [locale]=\"{applyLabel: 'Apply', format: 'MM-DD-YYYY HH:mm'}\"\r\n                      [keepCalendarOpeningWithRange]=\"keepCalendarOpeningWithRange\"\r\n                      class=\"form-control\"\r\n                      placeholder=\"Select please...\"/>\r\n                      <label class=\"input-group-btn\" for=\"txtDate\" style=\"padding: 0 14px 0 14px;\">\r\n                      <span class=\"fas fa-calendar\"></span>                      \r\n                      </label>\r\n              </div>\r\n              \r\n              <!-- <div class=\"input-group\"> -->\r\n            <!-- <div class=\"row\">\r\n              <div class=\"col-md-6\"> -->\r\n                <!-- <input type=\"text\" name=\"\" [(ngModel)]=\"labelval\" [ngModelOptions]=\"{standalone: true}\" style=\"margin-top: -6px;\" class=\"form-control\" id=\"\" placeholder=\"Enter Report Name\">\r\n                <span class=\"error\" *ngIf=\"islabelvaltext=='yes'\">Please Select Report Name</span> -->\r\n              <!-- </div>\r\n              <div class=\"col-md-6\"> -->\r\n                <!-- <input type=\"button\" style=\"font-size: 15px;margin-top: -11px;\" (click)=\"savelabel()\" value=\"Save\" class=\"btn btn-primary\"> -->\r\n     \r\n\r\n                    <!-- <input *ngIf=\"isreport==1\" type=\"button\" style=\"font-size: 15px;margin-top: -11px;margin-left: 5px;\" (click)=\"deletelabel()\" value=\"Delete\" class=\"btn btn-danger\"> -->\r\n           \r\n              <!-- </div> -->\r\n              <!-- </div> -->\r\n            </div>\r\n            <!-- <div class=\"col-md-1\"></div>\r\n            <div class=\"col-md-1 text-right\">\r\n              <p (click)=\"togglepanel()\"><i  class=\"fas fa-filter\"></i> Filters</p>\r\n        \r\n            </div> -->\r\n          </div>\r\n          \r\n        </div>\r\n\r\n        <!-- <span class=\"badge badge-transparent\">Click To Apply</span> -->\r\n\r\n        <div class=\"card-body\" *ngIf=\"isclick==1\" style=\"border-top: 1px solid #2c2c2c;padding-top: 10px;padding-bottom: 10px;background: #0f121a;\">\r\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(1)\">\r\n            <i class=\"fa fa-filter\"></i> CAMPAIGN\r\n          </button>\r\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(2)\">\r\n            <i class=\"fa fa-filter\"></i> TARGET\r\n          </button>\r\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(3)\">\r\n            <i class=\"fa fa-filter\"></i> BUYER\r\n          </button>\r\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(4)\">\r\n            <i class=\"fa fa-filter\"></i> PUBLISHER\r\n          </button>\r\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(5)\">\r\n            <i class=\"fa fa-filter\"></i> CALLER ID\r\n          </button>\r\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(6)\">\r\n            <i class=\"fa fa-filter\"></i> NUMBER CALLED\r\n          </button>\r\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(8)\">\r\n            <i class=\"fa fa-filter\"></i> IVR INPUT\r\n          </button>\r\n          \r\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(9)\">\r\n            <i class=\"fa fa-filter\"></i> RINGTREE\r\n          </button>\r\n         \r\n          <!-- <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"togglepanel()\">\r\n            <i class=\"fa fa-filter\"></i> Filter\r\n          </button> -->\r\n                  \r\n         <form  (ngSubmit)=\"filterval()\">\r\n\r\n          <div class=\"mt-2\" *ngIf=\"filter==1\" style=\"display: flex;\">\r\n            <div *ngFor=\"let item of filterselected;let i=index\" style=\"padding: 4px;\">\r\n              <!-- <div *ngIf=\"item.isorand==0 && i!=0\" class=\"separator\">OR</div>\r\n              <div *ngIf=\"item.isorand==1 && i!=0\" class=\"separator\">AND</div> -->\r\n              \r\n              <button type=\"button\" *ngIf=\"item.isorand==0 && i!=0\" class=\"btn btn-primary btn-sm\" style=\"font-size: 11px; margin-right: 7px;\">OR</button>             \r\n\r\n              <button type=\"button\" *ngIf=\"item.isorand==1 && i!=0\" class=\"btn btn-primary btn-sm\" style=\"font-size: 11px;margin-right: 7px;\">AND</button>             \r\n\r\n              <button type=\"button\" (click)=\"clearfilter(i)\" class=\"btn btn-secondary btn-sm\" style=\"font-size: 11px;\">\r\n                <span *ngIf=\"item.filtertype==1\">Campaign is: </span>\r\n                <span *ngIf=\"item.filtertype==2\">Target is: </span>\r\n                <span *ngIf=\"item.filtertype==3\">Buyer is: </span>\r\n                <span *ngIf=\"item.filtertype==4\">Publisher is: </span>\r\n                \r\n                <span *ngIf=\"item.filtertype==5\">Caller ID is: </span>\r\n                <span *ngIf=\"item.filtertype==6\">Number Called is: </span>\r\n                {{item.name}} <span class=\"fa fa-times\"></span>\r\n              </button>               \r\n            </div>                                  \r\n          </div>                  \r\n\r\n          <div class=\"row mt-2\" *ngIf=\"filter==1\">\r\n            <div class=\"col-md-3\" *ngIf=\"filtertype==1 && isselectElement==0\">\r\n              <!-- <select class=\"form-control\" [(ngModel)]=\"filtervalue\" (change)=\"gettext($event,1)\" [ngModelOptions]=\"{standalone: true}\">\r\n                <option value=\"\">{{filtertext}}</option>\r\n                <optgroup label=\"Active\">\r\n                  <option *ngFor=\"let item of activeresultdata\" [value]=\"item.id\">{{item.text}}</option>\r\n                </optgroup>\r\n                <optgroup label=\"In-Active\">\r\n                  <option *ngFor=\"let item of nonactiveresultdata\" [value]=\"item.id\">{{item.text}}</option>\r\n                </optgroup>\r\n              </select>   -->\r\n\r\n              <!-- <ng-select2  [data]=\"activeresultdata\" [width]=\"330\" [placeholder]=\"filtertext\"  [(ngModel)]=\"filtervalue\" (valueChanged)=\"gettext($event,1)\" [ngModelOptions]=\"{standalone: true}\">\r\n              </ng-select2> -->\r\n              <angular2-multiselect [data]=\"activeresultdata\" [(ngModel)]=\"filtervalue\" [settings]=\r\n              \"{\r\n                enableSearchFilter: true,\r\n                showCheckbox:false,\r\n                singleSelection: true, text:filtertext}\" [ngModelOptions]=\"{standalone: true}\"></angular2-multiselect>\r\n            </div>           \r\n            <div class=\"col-md-3\" *ngIf=\"filtertype!=1 && filtertype!=5 && filtertype!=6 && isselectElement==0\">\r\n              <!-- <select class=\"form-control\" [(ngModel)]=\"filtervalue\" (change)=\"gettext($event,1)\" [ngModelOptions]=\"{standalone: true}\">\r\n                <option value=\"\">{{filtertext}}</option>\r\n                <option *ngFor=\"let item of resultdata\" [value]=\"item.id\">{{item.text}}</option>\r\n              </select>    -->\r\n              \r\n              <!-- <ng-select2  [data]=\"resultdata\" [width]=\"330\" [placeholder]=\"filtertext\" [(ngModel)]=\"filtervalue\" (valueChanged)=\"gettext($event,1)\" [ngModelOptions]=\"{standalone: true}\"> -->\r\n              <!-- </ng-select2> -->\r\n              <angular2-multiselect [data]=\"resultdata\"   [(ngModel)]=\"filtervalue\" [settings]=\r\n              \"{\r\n                enableSearchFilter: true,\r\n                showCheckbox:false,\r\n                singleSelection: true, text:filtertext}\" [ngModelOptions]=\"{standalone: true}\"></angular2-multiselect>\r\n            </div>\r\n          \r\n            <div class=\"col-md-3\" *ngIf=\"(filtertype==1 || filtertype==2) && isselectElement==0\">\r\n              <select class=\"form-control\" [(ngModel)]=\"filteradvanced\" (change)=\"getadvancedfilter($event,1)\" [ngModelOptions]=\"{standalone: true}\">\r\n                <option value=\"0\">Is Equalto</option>                \r\n                <option value=\"1\">Is Not Equalto </option>                \r\n                <option value=\"2\">Contains</option>                \r\n                <option value=\"3\">Not contains</option>                \r\n              </select>  \r\n            </div>\r\n\r\n\r\n            <div class=\"col-md-3\" *ngIf=\"(filtertype==6 || filtertype==5) && isselectElement==0\">\r\n              <input type=\"text\" name=\"filtervalue\" class=\"form-control\" id=\"\" [(ngModel)]=\"filtervalue\" (change)=\"gettext($event,2)\">\r\n            </div>\r\n\r\n            <div class=\"col-md-3\" *ngIf=\"isselectElement==0\">\r\n              <button type=\"button\" style=\"width: 83px;font-size: 8px;height: 32px;\" (click)=\"addorrule()\" class=\"btn btn-primary btn-sm\">ADD OR RULE</button>     \r\n              <button type=\"button\" style=\"margin-left:5px;width: 83px;font-size: 8px;height: 32px;\" (click)=\"addandrule()\" class=\"btn btn-primary btn-sm\">ADD AND RULE</button>     \r\n            </div>            \r\n          </div>\r\n          \r\n          <div class=\"row mt-2 border-top\" *ngIf=\"filter==1\">\r\n            <div class=\"col-md-1\" style=\"margin-top: 13px;\">\r\n              <!-- [disabled]=\"filtervalue==''\" -->\r\n              <button *ngIf=\"isadded==1\" style=\"width: 83px;\" type=\"submit\" class=\"btn btn-primary btn-sm\">Add Filter</button>\r\n              <button type=\"button\" *ngIf=\"isadded==0\" (click)=\"editfilter()\" style=\"width: 83px;\" type=\"submit\" class=\"btn btn-primary btn-sm\">Edit Filter</button>\r\n            </div>\r\n            <div class=\"col-md-2\" style=\"margin-top: 15px;\">\r\n              <button style=\"width: 82px;\" (click)=\"calcelfilter()\" class=\"btn btn-outline-danger btn-sm\">Clear Filter</button>\r\n            </div>\r\n          </div>\r\n          </form>\r\n        \r\n        </div>\r\n      </div>  \r\n         \r\n        <div class=\"card-body\" style=\"border-top: 1px solid #2f3031\">\r\n          <!-- Chart -->\r\n          <div class=\"\" style=\"position: relative\">\r\n            <ngx-ui-loader [loaderId]=\"'loader-03'\"></ngx-ui-loader>\r\n\r\n            <div class=\"row\">\r\n              <div class=\"col-md-9 col-sm-9\">\r\n                <h6>Reporting</h6>\r\n              </div>          \r\n              <div class=\"col-md-3 col-sm-3 text-right\">\r\n                  <button *ngIf=\"isshowbyhrs==1\" (click)=\"chartby(1)\" class=\"tabsbtn\" [ngClass]=\"{'activetab': daytypeval === 1}\"\r\n                  >By Hour</button>            \r\n                  <button (click)=\"chartby(2)\" class=\"tabsbtn\" [ngClass]=\"{'activetab': daytypeval === 2}\">By Day</button>            \r\n                \r\n            </div>            \r\n          </div>\r\n\r\n            <div [chart]=\"chart\"></div>\r\n          </div>\r\n          <div style=\"border-top: 1px solid #2f3031\"></div>\r\n          <h6 class=\"pt-2 pb-2\">Summary</h6>\r\n          <!-- summary -->\r\n          <div class=\"p-0 border-top-1\" style=\"position: relative\">\r\n              <ngx-ui-loader [loaderId]=\"'loader-02'\"></ngx-ui-loader>\r\n              <div class=\"row\">\r\n                <div class=\"col-md-12 col-sm-12\" style=\"display: inherit;\">\r\n                  <div class=\"input-group\">\r\n\r\n                  <input type=\"button\" value=\"Campaign\" id=\"tabs1\" (click)=\"getSummary(1)\" class=\"tabsbtn activetab\">  \r\n                  <input type=\"button\" value=\"Publisher\" id=\"tabs2\" (click)=\"getSummary(2)\" class=\"tabsbtn\">  \r\n                  <input type=\"button\" value=\"Target\" id=\"tabs3\" (click)=\"getSummary(3)\" class=\"tabsbtn\">  \r\n                  <input type=\"button\" value=\"Buyer\" id=\"tabs4\" (click)=\"getSummary(4)\" class=\"tabsbtn\">  \r\n                  <input type=\"button\" value=\"Dialed #\" id=\"tabs5\" (click)=\"getSummary(5)\" class=\"tabsbtn\">  \r\n                  <input type=\"button\" value=\"IVR Input All\" id=\"tabs7\" (click)=\"getSummary(7)\" class=\"tabsbtn\">  \r\n                  <input type=\"button\" value=\"IVR Input\" id=\"tabs8\" (click)=\"getSummary(8)\" class=\"tabsbtn\">  \r\n                 \r\n                </div>\r\n                 <div class=\"input-group float-right\" style=\"display: contents;\" >\r\n                  <button (click)=\"exportcalldata()\" class=\"tabsbtn \"><i class=\"fas fa-file-export\"></i> Export\r\n                  </button>                     \r\n                    </div>        \r\n                </div>\r\n              </div>\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-12\">\r\n                  <div class=\"card\">\r\n                    \r\n                    <div class=\"card-body\"> -->\r\n                      <div class=\"table-responsive\">\r\n                      \r\n                     \r\n                        <!-- <table  id=\"datatable1\" datatable [dtOptions]=\"dtOptions\" [dtTrigger]=\"dtTrigger\" class=\"table table-striped dataTable no-footer row-border hover\"> -->\r\n                      <!-- <table class=\"table table-striped dataTable no-footer row-border hover\" datatable [dtOptions]=\"dtOptions\" [dtTrigger]=\"dtTrigger\"> -->\r\n                     \r\n                      <!-- <table #dataTable1 id=\"datatable\" class=\"table table-striped dataTable no-footer row-border hover\"> -->\r\n                        <table #dataTable1  class=\"table table-striped dataTable no-footer row-border hover\" datatable [dtOptions]=\"dtOptions\" [dtTrigger]=\"dtTrigger\">\r\n                          <!-- <table #dataTable1 [dtOptions]=\"dtOptions\" [dtTrigger]=\"dtTrigger\" class=\"row-border hover\"> -->\r\n                            <!-- <table id='table' #dataTable1 [dtOptions]=\"dtOptions\" class=\"table table-striped table-bordered\" cellspacing=\"0\" width=\"100%\"> -->\r\n\r\n                          <thead>\r\n                            <tr>     \r\n                              <th>\r\n                                <span *ngIf='filtertype==1'>Campaign</span>\r\n                                <span *ngIf='filtertype==2'>Target</span>\r\n                                <span *ngIf='filtertype==3'>Buyer</span>\r\n                                <span *ngIf='filtertype==4'>Publisher</span>\r\n                                <span *ngIf='filtertype==5'>Dialed #</span>\r\n                                <span *ngIf='filtertype==6'>Number Pool</span>\r\n                                <span *ngIf='filtertype==7'>IVR Input</span>\r\n                                <span *ngIf='filtertype==8'>Key</span>\r\n                              </th>\r\n                              <th>Incoming</th>\r\n                              <th>Unique Calls</th>\r\n                              <th>IVR Input</th>\r\n                              \r\n                              <th>Reached to Buyer</th>\r\n                              <th>Connected</th>\r\n                              <th>Qualified</th>\r\n                              <th>Converted</th>\r\n                              <th>Completed</th>\r\n                              <th>No Answer</th>\r\n                              <th>No Connect</th>\r\n                              <th>Duplicate</th>\r\n                              <th>Payout</th>                                                                     \r\n                              <th>Revenue</th>                                                                     \r\n                              <th>Profit</th>\r\n                              <th>CR%</th>\r\n                              <th>RPC</th>\r\n                              <th>ACL</th>\r\n                              <th title=\"Average Call Length\">TCL</th>\r\n                            </tr>\r\n                          </thead>\r\n                          <tbody *ngIf=\"callsdata?.length != 0\">\r\n                            <!-- #55646b -->\r\n                            <!-- #fff -->\r\n                              <tr *ngFor=\"let data of callsdata;let i=index\" [style.background-color]=\"i == totaldata-1 ? '' : ''\" [style.color]=\"i == totaldata-1 ? '' : ''\">\r\n                                  <td><span style=\"cursor: pointer;overflow: hidden;\r\n                                    max-width: 100px;word-wrap:break-word\" (click)=\"filterbyvalue(data.uuid,data.filter)\">{{ data.filter=='n'? 'none': data.filter}}</span></td>\r\n                                  <td>{{ data.incoming}}</td>\r\n                                  <td>{{ data.uniquecalls}}</td>\r\n                                  <!-- <td>\r\n                                    <span *ngIf=\"data.ivr_inputs==0\">{{ filtertype!=8 ? data.ivr_inputs: '-' }}</span>           \r\n                                    <span  *ngIf=\"data.ivr_inputs>0\" style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,6)\">{{ filtertype!=8 ? data.ivr_inputs : '-'}}</span>\r\n                                  </td> -->\r\n\r\n                                  <td><span style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,6)\">{{ filtertype!=8 ? data.ivr_inputs : '-'}}</span></td>\r\n\r\n                                  <!-- <td>{{ filtertype!=8 ? data.ivr_inputs: '-'}}</td> -->\r\n                                  <!-- <td>{{ filtertype!=8 ? data.reachedtobuyer : '-'}}</td> -->\r\n                                  <td><span style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,7)\">{{ filtertype!=8 ? data.reachedtobuyer : '-'}}</span></td>\r\n                                  \r\n                                  <td><span style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,2)\">{{ filtertype!=8 ? data.connected : '-'}}</span></td>\r\n                                  <td>\r\n                                    <span *ngIf=\"data.qualified==0\">{{ filtertype!=8 ? data.qualified: '-' }}</span>           \r\n                                    <span  *ngIf=\"data.qualified>0\" style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,3)\">{{ filtertype!=8 ? data.qualified : '-'}}</span>\r\n                                  </td>\r\n                                  <td>\r\n                                    <span *ngIf=\"data.converted==0\">{{ filtertype!=8 ? data.converted: '-' }}</span>           \r\n                                    <span  *ngIf=\"data.converted>0\" style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,3)\">{{ filtertype!=8 ? data.converted : '-'}}</span>\r\n                                  </td>\r\n\r\n                                  <td><span style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,2)\">{{ filtertype!=8 ? data.completed : '-'}}</span></td>\r\n\r\n                                  <td>\r\n                                    <span *ngIf=\"data.no_answer==0\">{{ filtertype!=8 ? data.no_answer: '-' }}</span>           \r\n                                    <span  *ngIf=\"data.no_answer>0\" style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,4)\">{{ filtertype!=8 ? data.no_answer : '-'}}</span>\r\n                                  </td>\r\n                                  \r\n                                  <!-- <td>\r\n                                    <span *ngIf=\"data.no_connect==0\">{{ filtertype!=8 ? data.no_connect: '-' }}</span>           \r\n                                    <span  *ngIf=\"data.no_connect>0\" style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,5)\">{{ filtertype!=8 ? data.no_connect : '-'}}</span>\r\n                                  </td> -->\r\n\r\n                                  <td><span style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,5)\">{{ filtertype!=8 ? data.no_connect : '-'}}</span></td>\r\n\r\n                                  <!-- <td>{{ filtertype!=8 ? data.no_answer : '-'}}</td> -->\r\n                                  <!-- <td>{{ filtertype!=8 ? data.no_connect : '-'}}</td> -->\r\n                                  <td>\r\n                                    <span *ngIf=\"data.duplicate==0\">{{ filtertype!=8 ? data.duplicate: '-' }}</span>                              \r\n                                    <span *ngIf=\"data.duplicate>0\" style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,1)\">{{ filtertype!=8 ? data.duplicate: '-' }}</span>                              \r\n                                  </td>\r\n                                  <td>$ {{ filtertype!=8 ? data.payout: 0 }}</td>\r\n                                  <td>$ {{ filtertype!=8 ? data.revenue: 0 }}</td>\r\n                                  <td>$ {{ filtertype!=8 ? data.profit: 0 }}</td>\r\n                                  <td>{{ filtertype!=8 ? data.cr_percent: '-' }}</td>\r\n                                  <td>$ {{ filtertype!=8 ? data.rpc: 0 }}</td>\r\n                                  <td title=\"Average Call Length\">{{ filtertype!=8 ? data.acl: '-' }}</td>\r\n                                  <td>{{ filtertype!=8 ? data.tcl: '-' }}</td>                                                    \r\n                              </tr>\r\n                          </tbody>\r\n                          <tfoot *ngIf=\"totalcount?.length != 0\" style=\"background: #3858E7;color: white;\">\r\n                            <tr>\r\n                               <td style=\"width: 100px!important;\">{{totalcount.filter}}</td>\r\n                               <td>{{ totalcount.incoming}}</td>\r\n                               <td>{{ totalcount.uniquecalls}}</td>\r\n                               <td>{{ filtertype!=8 ? totalcount.ivr_inputs :'-'}}</td>\r\n                               <td>{{ filtertype!=8 ? totalcount.reachedtobuyer: '-'}}</td>\r\n                               <td>{{ filtertype!=8 ? totalcount.connected: '-'}}</td>\r\n                               <td>{{ filtertype!=8 ? totalcount.qualified: '-'}}</td>\r\n                               <td>{{ filtertype!=8 ? totalcount.converted: '-'}}</td>\r\n                               <td>{{ filtertype!=8 ? totalcount.completed: '-'}}</td>\r\n                               <td>{{ filtertype!=8 ? totalcount.no_answer: '-' }}</td>\r\n                               <td>{{ filtertype!=8 ? totalcount.no_connect : '-'}}</td>\r\n                               <td>{{ filtertype!=8 ? totalcount.duplicate: '-' }}</td>\r\n                               <td>$ {{ filtertype!=8 ? totalcount.payout: '0' }}</td>\r\n                               <td>$ {{ filtertype!=8 ? totalcount.revenue: '0' }}</td>\r\n                               <td>$ {{ filtertype!=8 ? totalcount.profit: '0' }}</td>\r\n                               <td>{{ filtertype!=8 ? totalcount.cr_percent: '-' }}</td>\r\n                               <td>$ {{ filtertype!=8 ? totalcount.rpc : '0'}}</td>\r\n                               <td title=\"Average Call Length\">{{ filtertype!=8 ? totalcount.acl: '-' }}</td>\r\n                               <td>{{ filtertype!=8 ? totalcount.tcl: '-' }}</td>                 \r\n                               \r\n                            </tr>\r\n                          </tfoot>\r\n                          \r\n                          <tbody *ngIf=\"callsdata?.length == 0\">\r\n                            <tr>\r\n                              <td >No data!</td>\r\n                        \r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>\r\n                              <td style=\"display: none\"></td>                              \r\n                            </tr>\r\n                          <tbody>\r\n                        </table>\r\n                      </div>\r\n                    <!-- </div>\r\n                  </div>\r\n                </div>\r\n              </div> -->\r\n          </div>\r\n\r\n          <!-- list -->\r\n          <!-- <div class=\"row\">\r\n            <div class=\"col-12\">\r\n              <div class=\"card\"> -->\r\n                \r\n\r\n                <!-- <div class=\"row\" style=\"margin-top: 20px;\">\r\n                  \r\n                    <div class=\"col-7\">\r\n                        <div class=\"card-header\">\r\n                        <h4>Call Details</h4></div>\r\n                    </div>\r\n                    <div class=\"col-4 text-right mt-2\">\r\n                       <div class=\"form-group\">\r\n                        <button data-toggle=\"modal\" data-target=\"#addLabels\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Export\r\n                        </button>        \r\n                         (click)=\"exportdata()\"        \r\n                          </div>                       \r\n                    </div>\r\n                </div>  -->\r\n                <div style=\"border-top: 1px solid #2f3031;margin-top: 17px;\"></div>\r\n                <h6 class=\"pb-2 pt-2\">Call Details</h6>\r\n                <div class=\"row mt-2 mb-3\">\r\n                 \r\n                  <div class=\"col-md-12 col-sm-12\" style=\"display: inherit;\">\r\n                    <div class=\"input-group\">\r\n                      <button type=\"button\" class=\"mr-2 tabsbtn1 btn-primary\" (click)=\"scrolltox()\"> << </button>\r\n                      <input type=\"button\" value=\"Call List\" id=\"calltabs1\" (click)=\"getcallDetails(1)\" class=\"tabsbtn activetab\">  \r\n                      <input type=\"button\" value=\"Live Calls\" id=\"calltabs2\" (click)=\"getcallDetails(2)\" class=\"tabsbtn\">  \r\n                   \r\n                  </div>\r\n                   <div class=\"input-group float-right\" style=\"display: contents;\" >\r\n                    <button data-toggle=\"modal\" data-target=\"#addLabels\" class=\"tabsbtn\"><i class=\"fas fa-file-export\"></i> Export\r\n                    </button>\r\n                    <button type=\"button\" class=\"ml-2 tabsbtn1 btn-primary\" (click)=\"scrolltoy()\"> >> </button>\r\n                      </div>        \r\n                  </div>\r\n                </div>\r\n\r\n                <div>\r\n                  <div *ngIf=\"!islive\" id=\"wrapper1\">\r\n                    <div id=\"content1\" style=\"position: relative\">\r\n                    <ngx-ui-loader [loaderId]=\"'loader-01'\"></ngx-ui-loader>\r\n                    <!-- ngxclass -->\r\n                    <!-- [loadingIndicator]=\"loadingIndicator\" -->\r\n                  <ngx-datatable #myTable\r\n                  [ngClass]=\"\"\r\n                  [offset]=\"1000\"\r\n                  class=\"striped expandable bordered material\"\r\n                  [rows]=\"calls\"\r\n                  [columnMode]=\"ColumnMode.force\"\r\n                  [headerHeight]=\"headerHeight\"\r\n                  [footerHeight]=\"40\"\r\n                  [scrollbarV]=\"true\"\r\n                  (scroll)=\"onScroll($event)\"\r\n                  [scrollbarH]=\"true\"\r\n                  [rowHeight]=\"rowHeight\"            \r\n                  [messages]=\"{emptyMessage: 'No Record Found'}\"                \r\n                  style=\"height: 600px;\"\r\n                  >\r\n                  <!--  -->\r\n                      <!-- Row Detail Template -->\r\n                  <ngx-datatable-row-detail  \r\n                    [rowHeight]=\"auto\" \r\n                    #myDetailRow>\r\n                    <ng-template \r\n                      let-row=\"row\" \r\n                      let-expanded=\"expanded\" \r\n                      ngx-datatable-row-detail-template>\r\n                      <!-- <div style=\"padding-left:35px;display: flex;\"> -->\r\n                      <div class=\"appendData\" style=\"height: auto;\">           \r\n                      </div>\r\n                    </ng-template>\r\n                   </ngx-datatable-row-detail>\r\n  \r\n  \r\n                    <!-- Column Templates -->\r\n                    <ngx-datatable-column\r\n                      [width]=\"50\"\r\n                      [resizeable]=\"false\"\r\n                      [sortable]=\"false\"\r\n                      [draggable]=\"false\"\r\n                      [canAutoResize]=\"false\"\r\n                      [frozenLeft]=\"true\"\r\n                      name=\">\"\r\n                    >\r\n                      <ng-template let-row=\"row\" let-expanded=\"expanded\" ngx-datatable-cell-template let-rowIndex=\"rowIndex\">\r\n                        <a\r\n                        *ngIf=\"!expanded\"\r\n                        href=\"javascript:void(0)\"\r\n                        (click)=\"toggleExpandRow(rowIndex,row)\">\r\n                         <i class=\"fa fa-angle-right\" ></i>\r\n                        </a>\r\n                        <a\r\n                          *ngIf=\"expanded\"\r\n                        href=\"javascript:void(0)\"\r\n                        (click)=\"toggleCollaspeRow(row)\">\r\n                          <i class=\"fa fa-angle-down\"> </i>\r\n                      </a>                      \r\n                      </ng-template>\r\n                    </ngx-datatable-column>\r\n  \r\n  \r\n                  <ngx-datatable-column name=\"Date Time\" [width]=\"150\" [frozenLeft]=\"true\" [sortable]=\"true\" prop=\"time_of_call\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{row.date_of_call}} {{row.time_of_call}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                     \r\n                  <!-- <ngx-datatable-column name=\"Campaign\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{row.campaign}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                      -->\r\n                  <ngx-datatable-column name=\"Campaign\" [frozenLeft]=\"true\" >\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                      <ng-template #htmlContent >\r\n                        <div  (click)=\"filtercalldata(1,row.campaign_uuid,row.campaign)\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-filter mr-2\"></i></div>\r\n                        <div (click)=\"copyName(row.campaign)\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-copy\"></i></div>\r\n                        <a class=\"text-white ml-2\" target=\"_blank\" routerLink=\"/edit-campaign/{{row.campaign_uuid}}\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-edit\"></i></a>\r\n                      </ng-template>\r\n                        <div style=\"cursor: pointer;\" triggers=\"click\" [ngbTooltip]=\"htmlContent\" [autoClose]=\"true\" placement=\"top\">{{row.campaign}}</div>                      \r\n                    </ng-template>                      \r\n                </ngx-datatable-column>  \r\n  \r\n                  <!-- <ngx-datatable-column name=\"Number Called\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{row.did}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>       \r\n                   -->\r\n                  <ngx-datatable-column name=\"Number Called\" [width]=\"130\" [sortable]=\"true\" prop=\"did\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <ng-template #htmlContent >\r\n                          <div  (click)=\"filtercalldata(6,row.uuid,row.did)\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-filter mr-2\"></i></div>\r\n                          <div (click)=\"copyName(row.did)\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-copy\"></i></div>\r\n                        </ng-template>\r\n                          <div style=\"cursor: pointer;\" triggers=\"click\" [ngbTooltip]=\"htmlContent\" [autoClose]=\"true\" placement=\"top\">\r\n                            <!-- {{row.did}} -->\r\n                            ({{row.did | slice:0:3}}) {{row.did | slice:3:6}}-{{row.did | slice:6:10}}\r\n                          </div>                      \r\n                      </ng-template>                      \r\n                  </ngx-datatable-column>  \r\n                  \r\n                  <ngx-datatable-column name=\"Caller ID\" [width]=\"100\" [sortable]=\"true\" prop=\"incoming_number\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <ng-template #htmlContent >\r\n                          <div  (click)=\"filtercalldata(5,row.uuid,row.incoming_number)\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-filter mr-2\"></i></div>\r\n                          <div (click)=\"copyName(row.incoming_number)\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-copy\"></i></div>\r\n                        </ng-template>\r\n                          <div style=\"cursor: pointer;\" triggers=\"click\" [ngbTooltip]=\"htmlContent\" [autoClose]=\"true\" placement=\"top\">{{row.incoming_number}}\r\n                          </div>                      \r\n                      </ng-template>                      \r\n                  </ngx-datatable-column>                                                                     \r\n  \r\n                  <ngx-datatable-column name=\"Duplicate\" [width]=\"80\" [sortable]=\"true\" prop=\"duplicate\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span>   <div *ngIf=\"row.duplicate==1\">Yes</div>                            \r\n                          <div *ngIf=\"row.duplicate==0\">No</div></span>\r\n                    </ng-template>                                      \r\n                </ngx-datatable-column>     \r\n  \r\n                  <!-- <ngx-datatable-column name=\"Publisher\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{row.publisher}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                      -->\r\n                <ngx-datatable-column name=\"Publisher\" [width]=\"100\" [sortable]=\"true\" prop=\"publisher\">\r\n                  <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                      <ng-template #htmlContent >\r\n                        <div  (click)=\"filtercalldata(4,row.publisher_uuid,row.publisher)\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-filter mr-2\"></i></div>\r\n                        <div (click)=\"copyName(row.publisher)\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-copy\"></i></div>                      \r\n                      </ng-template>\r\n                        <div style=\"cursor: pointer;\" triggers=\"click\" [ngbTooltip]=\"htmlContent\" [autoClose]=\"true\" placement=\"top\">{{row.publisher}}</div>                      \r\n                    </ng-template>                      \r\n                </ngx-datatable-column>  \r\n  \r\n                  <!-- <ngx-datatable-column name=\"Target\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{row.target}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                      -->\r\n                  <ngx-datatable-column name=\"Target\" [width]=\"120\" [sortable]=\"true\" prop=\"target\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <ng-template #htmlContent >\r\n                          <div  (click)=\"filtercalldata(2,row.target_uuid,row.target)\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-filter mr-2\"></i></div>\r\n                          <div (click)=\"copyName(row.target)\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-copy\"></i></div>\r\n                          <a class=\"text-white ml-2\" target=\"_blank\" routerLink=\"/edit-numbers/{{row.target_uuid}}\"><i style=\"font-size: 10px;cursor: pointer;\" class=\"fa fa-edit\"></i></a>\r\n                        </ng-template>\r\n                          <div style=\"cursor: pointer;\" triggers=\"click\" [ngbTooltip]=\"htmlContent\" [autoClose]=\"true\" placement=\"top\">{{row.target}}\r\n                            <br>\r\n                            <div >\r\n                              <span class=\"badge badge-primary\" style=\"padding: 6px 5px 2px 5px;margin-top: 2px;\" *ngIf=\"row.ivr_hack=='YES'\"> IVR HACK</span>\r\n                              <span class=\"badge badge-primary\" style=\"padding: 6px 5px 2px 5px;margin-top: 2px;\" \r\n                              *ngIf=\"row.is_ringtree==1\">\r\n                               Ringtree</span>\r\n                            </div>\r\n                          </div>                      \r\n                      </ng-template>                      \r\n                  </ngx-datatable-column>  \r\n  \r\n                  <ngx-datatable-column name=\"Routed To\" [width]=\"120\" [sortable]=\"true\" prop=\"routed_to\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{row.routed_to}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                     \r\n                  <ngx-datatable-column name=\"Labels\" [sortable]=\"true\" prop=\"assosciated_label\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span *ngFor=\"let assosciated_label of row.assosciated_labels?.split(',')\">\r\n                          <span class=\"badge badge-primary p-1 ml-1\">{{assosciated_label }}</span><br>\r\n                        </span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                     \r\n                  <ngx-datatable-column name=\"Hangup\" [width]=\"80\"  [sortable]=\"true\" prop=\"hangup_by\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span><div *ngIf=\"row.hangup_by=='System'\">\r\n                            <i title=\"System\" class=\"fa fa-server\"></i>\r\n                          </div>\r\n                          <div *ngIf=\"row.hangup_by=='User'\">\r\n                            <i title=\"Caller\" class=\"fa fa-user\"></i>\r\n                          </div>\r\n                          <div *ngIf=\"row.hangup_by==''\">-</div></span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                     \r\n                \r\n                  <ngx-datatable-column name=\"IVR Inputs\" [width]=\"80\" [sortable]=\"true\" prop=\"ivr_inputs\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{ row.ivr_inputs}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                     \r\n                \r\n                  <ngx-datatable-column name=\"ACT Duration\" [width]=\"120\" [sortable]=\"true\" prop=\"call_duration\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{ 1000 * row.call_duration | date:'H:mm:ss':'UTC'}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                     \r\n                  <ngx-datatable-column name=\"IVR Duration\" [width]=\"120\" [sortable]=\"true\" prop=\"ivr_duration\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{ 1000 * row.ivr_duration | date:'H:mm:ss':'UTC'}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                     \r\n                  <ngx-datatable-column name=\"Billable Duration\" [width]=\"120\" [sortable]=\"true\" prop=\"billable_duration\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{ 1000 * row.billable_duration | date:'H:mm:ss':'UTC'}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                     \r\n                  <ngx-datatable-column name=\"Revenue\" [width]=\"120\" [sortable]=\"true\" prop=\"revenue\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{row.revenue}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                     \r\n                  <ngx-datatable-column name=\"Payout\" [width]=\"120\" [sortable]=\"true\" prop=\"payout\">\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>{{row.payout}}</span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                     \r\n                  <ngx-datatable-column name=\"Recording\" [frozenRight]=\"true\" [width]=\"50\" >\r\n                      <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                          <span>\r\n                            <div *ngIf=\"row.recording!=null\" style=\"cursor: pointer;\">\r\n                              <i class=\"fa fa-play-circle\" (click) = \"play(row.recording, row.incoming_number)\"></i>\r\n                              <!-- <i class=\"fa fa-pause\"></i> -->\r\n                              <!-- <audio style=\"width: 130px;height: 30px;\" controls muted loop>\r\n                                <source src=\"https://repuatationmanagement.s3.us-west-2.amazonaws.com/{{row.recording}}\" type=\"audio/mp3\">\r\n                              </audio>  -->\r\n                            </div>     \r\n                          </span>\r\n                      </ng-template>                                      \r\n                  </ngx-datatable-column>                                                                     \r\n                  \r\n              </ngx-datatable>\r\n               <!-- <ngx-ui-loader></ngx-ui-loader> -->\r\n              \r\n  \r\n              </div>\r\n              </div>\r\n              <!-- {{livecalls}} -->\r\n              <!-- Display Live data -->\r\n              <div *ngIf=\"islive\">\r\n                <ngx-datatable #Table              \r\n                class=\"striped calllive\"\r\n                [rows]=\"livecalls\"\r\n                [scrollbarH]=\"true\"\r\n                [headerHeight]=\"headerHeight\"\r\n                [footerHeight]=\"50\"\r\n                [rowHeight]=\"50\"            \r\n                [messages]=\"{emptyMessage: 'No Record Found'}\"\r\n                >\r\n                \r\n                <ngx-datatable-column name=\"Created\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span>{{row.created}}</span>\r\n                    </ng-template>                                      \r\n                </ngx-datatable-column>                                                                     \r\n                <ngx-datatable-column name=\"Caller ID\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span>{{row.cid_name}}</span>\r\n                    </ng-template>                                      \r\n                </ngx-datatable-column>                                                                     \r\n                <ngx-datatable-column name=\"Called Number\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span>{{row.cid_num}}</span>\r\n                    </ng-template>                                      \r\n                </ngx-datatable-column>                                                                     \r\n                <ngx-datatable-column name=\"IP Address\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span>{{row.ip_addr}}</span>\r\n                    </ng-template>                                      \r\n                </ngx-datatable-column>                                                                     \r\n                <ngx-datatable-column name=\"Destination\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span>{{row.dest}}</span>\r\n                    </ng-template>                                      \r\n                </ngx-datatable-column>                                                                     \r\n                <ngx-datatable-column name=\"AppData\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span>{{row.application_data}}</span>\r\n                    </ng-template>                                      \r\n                </ngx-datatable-column>                                                                     \r\n                <ngx-datatable-column name=\"Read codec\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span>{{row.read_codec}}</span>\r\n                    </ng-template>                                      \r\n                </ngx-datatable-column>                                                                     \r\n                <ngx-datatable-column name=\"write codec\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span>{{row.write_codec}}</span>\r\n                    </ng-template>                                      \r\n                </ngx-datatable-column>                                                                     \r\n                <ngx-datatable-column name=\"State\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span>{{row.callstate}}</span>\r\n                    </ng-template>                                      \r\n                </ngx-datatable-column>                                                                     \r\n                <ngx-datatable-column name=\"Duration\">\r\n                    <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                        <span>{{row.created_epoch}}</span>\r\n                    </ng-template>                                      \r\n                </ngx-datatable-column>                                                                     \r\n            </ngx-datatable>\r\n  \r\n           \r\n              </div>\r\n  \r\n    \r\n                  <!-- <div class=\"table-responsive\">\r\n                  <table #dataTable id=\"example\" class=\"table table-striped dataTable no-footer row-border hover\">\r\n                      <thead>\r\n                        <tr>\r\n                          <th></th>\r\n                          <th>Date<br>Time</th>\r\n                          <th>Campaign</th>\r\n                          <th>Number<br>Called</th>\r\n                          <th>Caller<br>ID</th>\r\n                          <th>Publisher</th>\r\n                          <th>Target</th>                        \r\n                          <th>Routed<br>To</th>\r\n                          <th>Labels</th>                                                                     \r\n                          <th>Hangup</th>                                                                     \r\n                          <th>ACT<br>Duration\t</th>\r\n                          <th>IVR<br>Duration\t</th>\r\n                          <th>Billable<br>Duration\t</th>\r\n                          <th>Duplicate</th>                                                                     \r\n                          <th>Revenue</th>                                                                     \r\n                          <th>Payout</th>                                                                     \r\n                          <th>Recording</th>                                                                     \r\n                        </tr>\r\n                      </thead>\r\n                      <tbody *ngIf=\"labels?.length != 0\">\r\n                          <tr *ngFor=\"let data of labels;let i = index;\" class=\"detailrow_{{i}}\">\r\n                              <td (click)='details(i,data)' class=\"details-control\"></td>\r\n                              <td>{{ data.date_of_call }} {{ data.time_of_call }}</td>\r\n                              <td>{{ data.campaign}}</td>\r\n                              <td>{{ data.did}}</td>\r\n                              <td>{{ data.incoming_number}}</td>\r\n                              <td>{{ data.publisher}}</td>\r\n                              <td>{{ data.target}}</td>\r\n                              <td>{{ data.routed_to}}</td>\r\n                              <td><span *ngFor=\"let assosciated_label of data.assosciated_labels?.split(',')\">\r\n                                  <span class=\"badge badge-primary p-1 ml-1\">{{assosciated_label }}</span><br>\r\n                                </span>\r\n                              </td>\r\n                              <td>\r\n                                <div *ngIf=\"data.hangup_by=='System'\">\r\n                                  <i title=\"System\" class=\"fa fa-server\"></i>\r\n                                </div>\r\n                                <div *ngIf=\"data.hangup_by=='User'\">\r\n                                  <i title=\"Caller\" class=\"fa fa-user\"></i>\r\n                                </div>\r\n                                <div *ngIf=\"data.hangup_by==''\">-</div>\r\n                              </td>\r\n                              \r\n                              <td>{{ 1000 * data.call_duration | date:'H:mm:ss':'UTC'}}</td>\r\n                              <td>{{ 1000 * data.ivr_duration | date:'H:mm:ss':'UTC'}}</td>\r\n                              <td>{{ 1000 * data.billable_duration | date:'H:mm:ss':'UTC'}}</td>\r\n                              <td *ngIf=\"data.duplicate==1\">Yes</td>                            \r\n                              <td *ngIf=\"data.duplicate==0\">No</td>\r\n                              \r\n                              <td>{{ data.revenue }}</td> \r\n  \r\n                              <td>{{ data.payout }}</td>                            \r\n                              <td>\r\n                              <div *ngIf=\"data.recording==null\">\r\n                                <button class=\"badge badge-primary btn-sm\"><i class=\"fa fa-times\"></i></button>                                                        \r\n                              </div>\r\n                              <div *ngIf=\"data.recording!=null\">\r\n                                <audio style=\"width: 142px;\" controls>\r\n                                  <source src=\"https://d2actkasrcrrs8.cloudfront.net/{{data.recording}}\" type=\"audio/mp3\">\r\n                                </audio> \r\n                              </div>                            \r\n                              </td>                            \r\n                          </tr>\r\n                      </tbody>\r\n                      <tbody *ngIf=\"labels?.length == 0\">\r\n                        <tr>\r\n                          <td colspan=\"16\" class=\"no-data-available\">No data Available!</td>\r\n                        </tr>\r\n                      <tbody>\r\n                    </table>\r\n  \r\n  \r\n                    \r\n                  </div> -->\r\n                <!-- </div>\r\n              </div>\r\n            </div> -->\r\n          </div>\r\n        </div>\r\n      </div>      \r\n    </section>\r\n\r\n  \r\n  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n      \r\n      </div>\r\n    </section>  \r\n    \r\n  </div>  \r\n\r\n\r\n");

/***/ }),

/***/ "g8Eo":
/*!********************************************************************************!*\
  !*** ./src/app/page-not-found-component/page-not-found-component.component.ts ***!
  \********************************************************************************/
/*! exports provided: PageNotFoundComponentComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageNotFoundComponentComponent", function() { return PageNotFoundComponentComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_page_not_found_component_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./page-not-found-component.component.html */ "r9qH");
/* harmony import */ var _page_not_found_component_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./page-not-found-component.component.scss */ "4ZxZ");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ "tyNb");





let PageNotFoundComponentComponent = class PageNotFoundComponentComponent {
    constructor(router) {
        this.router = router;
    }
    ngOnInit() {
        this.router.navigate(['/404']);
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
    }
};
PageNotFoundComponentComponent.ctorParameters = () => [
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"] }
];
PageNotFoundComponentComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-page-not-found-component',
        template: _raw_loader_page_not_found_component_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_page_not_found_component_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], PageNotFoundComponentComponent);



/***/ }),

/***/ "gDz/":
/*!**************************************************************************!*\
  !*** ./src/app/modules/reports/report-calls/report-calls.component.scss ***!
  \**************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJyZXBvcnQtY2FsbHMuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "gP4o":
/*!**********************************************************!*\
  !*** ./src/app/modules/blacklist/blacklist.component.ts ***!
  \**********************************************************/
/*! exports provided: BlacklistComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlacklistComponent", function() { return BlacklistComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_blacklist_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./blacklist.component.html */ "XBaw");
/* harmony import */ var _blacklist_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blacklist.component.scss */ "mthO");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var _angular_http__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/http */ "qlzE");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../global */ "XrUY");













const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let requestOptions = new _angular_http__WEBPACK_IMPORTED_MODULE_9__["RequestOptions"]({ headers: null, withCredentials: true });
const ParseHeaders = {
    headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpHeaders"]({
        'Content-Type': 'application/x-www-form-urlencoded'
    })
};
let BlacklistComponent = class BlacklistComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_12__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.numberSubmitted = false;
        this.numbereditSubmitted = false;
        this.checkboxes = [];
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadnumbers();
        this.addNumberForm = this.fb.group({
            number: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
        this.editNumberForm = this.fb.group({
            uuid: ['', ''],
            number: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
    }
    loadnumbers() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var that = this;
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "order": [[0, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + '/getlistnumbers/0/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    console.log(resp);
                    that.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "checkall" }, { data: "number" }, { data: "created_at" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0, 3],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    Delete(uuid) {
        // alert(uuid);
        sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.deleteListNumber(uuid, 0).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.close();
                    }, 2000);
                    this.loadnumbers();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.close();
                }, 2000);
            }
        });
    }
    //Add Labels
    get numbercontrol() { return this.addNumberForm.controls; }
    onNumberSubmit() {
        const formData = new FormData();
        this.numberSubmitted = true;
        if (this.addNumberForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // console.log(this.currentCompany); return false;
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('number', this.addNumberForm.get('number').value);
        formData.append('type', '0');
        this.moduleservice.addNumberlist(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Number Added Successfully');
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (this.addNumberForm.get('number').value) {
            $("#addNumber").modal("hide");
            this.loadnumbers();
            setTimeout(() => {
                this.numberSubmitted = false;
                this.addNumberForm.reset();
            }, 2000);
        }
        if (this.editNumberForm.get('number').value) {
            $("#editNumber").modal("hide");
            setTimeout(() => {
                this.numbereditSubmitted = false;
                this.editNumberForm.reset();
                this.loadnumbers();
            }, 2000);
        }
    }
    // Edit Label
    editNumber(uuid, number) {
        this.editNumberForm.patchValue({
            uuid: uuid,
            number: number,
        });
    }
    get numbereditcontrol() { return this.editNumberForm.controls; }
    onNumberEditSubmit() {
        const formData = new FormData();
        this.numbereditSubmitted = true;
        if (this.editNumberForm.invalid) {
            return;
        }
        formData.append('number', this.editNumberForm.get('number').value);
        formData.append('type', '0');
        this.moduleservice.editNumberList(formData, this.editNumberForm.get('uuid').value).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Black List Number Saved Successfully');
            }
            else {
                this.toastrService.error('Failed To Save Black List Number Data');
            }
        }, error => this.error = error);
    }
    _keyPress(event) {
        const isNumericInput = (event) => {
            const key = event.keyCode;
            return ((key >= 48 && key <= 57) || // Allow number line
                (key >= 96 && key <= 105) // Allow number pad
            );
        };
        const isModifierKey = (event) => {
            const key = event.keyCode;
            return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
                (key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
                (key > 36 && key < 41) || // Allow left, up, right, down
                (
                // Allow Ctrl/Command + A,C,V,X,Z
                (event.ctrlKey === true || event.metaKey === true) &&
                    (key === 65 || key === 67 || key === 86 || key === 88 || key === 90));
        };
        const enforceFormat = (event) => {
            // Input must be of a valid number format or a modifier key, and not longer than ten digits
            if (!isNumericInput(event) && !isModifierKey(event)) {
                event.preventDefault();
            }
        };
        const formatToPhone = (event) => {
            if (isModifierKey(event)) {
                return;
            }
            const target = event.target;
            const input = event.target.value.replace(/\D/g, '').substring(0, 10); // First ten digits of input only
            const zip = input.substring(0, 3);
            const middle = input.substring(3, 6);
            const last = input.substring(6, 10);
            if (input.length > 6) {
                target.value = `(${zip}) ${middle} - ${last}`;
            }
            else if (input.length > 3) {
                target.value = `(${zip}) ${middle}`;
            }
            else if (input.length > 0) {
                target.value = `(${zip}`;
            }
        };
        const number = document.getElementById('number');
        const editnumber = document.getElementById('editnumber');
        if (number) {
            number.addEventListener('keydown', enforceFormat);
            number.addEventListener('keyup', formatToPhone);
        }
        if (editnumber) {
            editnumber.addEventListener('keydown', enforceFormat);
            editnumber.addEventListener('keyup', formatToPhone);
        }
    }
    // Check Delete
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deletewbSelectedNumbers(this.checkboxes, 0).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.close();
                        }, 2000);
                        this.loadnumbers();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_11___default.a.close();
                    }, 2000);
                }
            });
        }
    }
};
BlacklistComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
BlacklistComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
BlacklistComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-blacklist',
        template: _raw_loader_blacklist_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_blacklist_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], BlacklistComponent);



/***/ }),

/***/ "gW+p":
/*!****************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/label/ngxdemo/ngxdemo.component.html ***!
  \****************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"card\">\r\n<div class=\"row\">\r\n\r\n    <div class=\"col-1 p-3\">\r\n        <!-- <select style=\"width: 98px;\" class=\"form-control\" (change)=\"getpage($event)\">\r\n            <option value=\"10\">10</option>\r\n            <option value=\"25\">25</option>\r\n            <option value=\"50\">50</option>\r\n            <option value=\"100\">100</option>\r\n            <option value=\"500\">500</option>\r\n            <option value=\"1000\">1000</option>\r\n            <option value=\"5000\">5000</option>\r\n            <option value=\"10000\">10000</option>\r\n        </select> -->\r\n    </div>\r\n    <div class=\"col-8\"></div>\r\n    <div class=\"col-3 p-3\">\r\n        <input\r\n        type=\"text\"\r\n        placeholder=\"Type to filter the name column...\"\r\n        (keyup)=\"updateFilter($event)\"\r\n        class=\"form-control\"\r\n      />\r\n    </div>\r\n    <div class=\"col-12\">\r\n        \r\n        <ngx-datatable #table1\r\n            class=\"dark striped\"\r\n            [rows]=\"blogPostsList\"\r\n            [columnMode]=\"ColumnMode.force\"\r\n            [loadingIndicator]=\"loadingIndicator\"\r\n            [headerHeight]=\"50\"\r\n            [footerHeight]=\"50\"\r\n            [scrollbarV]=\"true\"\r\n            (scroll)=\"onScroll($event.offsetY)\"\r\n            [rowHeight]=\"50\"            \r\n            [messages]=\"{emptyMessage: 'No Record Found'}\">\r\n\r\n            <ngx-datatable-column name=\"Incoming Number\">\r\n                <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                    <span>{{row.incoming_number}}</span>\r\n                </ng-template>                                      \r\n            </ngx-datatable-column>                                                                     \r\n            <ngx-datatable-column name=\"Publisher\">\r\n                <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                    <span>{{row.publisher}}</span>\r\n                </ng-template>                                      \r\n            </ngx-datatable-column>                                                                     \r\n            <ngx-datatable-column name=\"Target\">\r\n                <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                    <span>{{row.target}}</span>\r\n                </ng-template>                                      \r\n            </ngx-datatable-column>                                                                     \r\n            <ngx-datatable-column name=\"Campaign\">\r\n                <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                    <span>{{row.campaign}}</span>\r\n                </ng-template>                                      \r\n            </ngx-datatable-column>                                                                     \r\n            <ngx-datatable-column name=\"Billable Duration\">\r\n                <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                    <span>{{row.billable_duration}}</span>\r\n                </ng-template>                                      \r\n            </ngx-datatable-column>                                                                     \r\n            <ngx-datatable-column name=\"Call Duration\">\r\n                <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                    <span>{{row.call_duration}}</span>\r\n                </ng-template>                                      \r\n            </ngx-datatable-column>                                                                     \r\n            <ngx-datatable-column name=\"IVR Duration\">\r\n                <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                    <span>{{row.ivr_duration}}</span>\r\n                </ng-template>                                      \r\n            </ngx-datatable-column>                                                                     \r\n\r\n            <!-- <ngx-datatable-column name=\"Post Image\" [sortable]=\"false\">\r\n                <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                    <img *ngIf=\"row.country\" src=\"\" style=\"width:50px\">\r\n                </ng-template>\r\n            </ngx-datatable-column> -->\r\n\r\n            <!-- <ngx-datatable-column name=\"Status\">\r\n                <ng-template ngx-datatable-cell-template let-rowIndex=\"rowIndex\" let-value=\"value\" let-row=\"row\">\r\n                    <span>{{row?.status === '1' ? 'Active' : 'In-Active'}}</span>\r\n                </ng-template>\r\n            </ngx-datatable-column> -->\r\n\r\n            <ngx-datatable-column name=\"Action\" [width]=\"100\" [resizeable]=\"false\" [sortable]=\"false\" [draggable]=\"false\"\r\n                [canAutoResize]=\"false\">\r\n                <ng-template ngx-datatable-cell-template let-value=\"value\" let-row=\"row\">\r\n                    <button type=\"button\" class=\"btn shadow-none btn-icon-sm btn-icon p-0 mr-2\" placement=\"top\" ngbTooltip=\"Edit\"\r\n                        triggers=\"hover:blur\" container=\"body\" (click)=\"openAddBlogPostPopup(row)\">\r\n                        <i class=\"fa fa-edit text-primary fa-lg\"> </i>\r\n                    </button>\r\n            \r\n                    <button type=\"button\" class=\"btn shadow-none btn-icon-xs btn-icon p-0\" placement=\"top\" ngbTooltip=\"Delete\"\r\n                        triggers=\"hover:blur\" container=\"body\" (click)=\"openDeleteBlogPopup(row)\">\r\n                        <i class=\"fa fa-trash-o text-danger fa-lg\"></i>\r\n                    </button>\r\n                </ng-template>\r\n            </ngx-datatable-column>\r\n        </ngx-datatable>\r\n    </div>\r\n</div>\r\n<ngx-ui-loader></ngx-ui-loader>\r\n<!-- <ngx-ui-loader [loaderId]=\"'loadingIndicator'\"></ngx-ui-loader> -->\r\n</div>\r\n</div>\r\n</section>\r\n</div>");

/***/ }),

/***/ "gXRp":
/*!****************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/recordings/recordings.component.html ***!
  \****************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n      <div class=\"main-content\">  \r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                  <div class=\"row\" style=\"margin-top: 20px;\r\n                  \">\r\n                      <div class=\"col-9\">\r\n                          <div class=\"card-header\">\r\n                          <h4>All Recordings</h4></div>\r\n                      </div>\r\n                      <div class=\"col-3 text-right mt-2\">\r\n                         <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                          <button (click)=\"exportdata()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Export\r\n                          </button>                     \r\n                            </div>                       \r\n                      </div>\r\n                \r\n                  </div> \r\n                  <form  (ngSubmit)=\"loadcalls()\">\r\n                  <div class=\"row\" style=\"margin-top: 10px;margin-left: 11px;\" > \r\n                  <div class=\"col-3\">\r\n                    <input type=\"text\" [(ngModel)]=\"numbers\" [ngModelOptions]=\"{standalone: true}\" class=\"form-control\" placeholder=\"Search Call Records\" >\r\n               \r\n                  </div>               \r\n                  <div class=\"col-8\">\r\n                    <input type=\"text\"\r\n                    ngxDaterangepickerMd\r\n                    [(ngModel)]=\"selected\" [ngModelOptions]=\"{standalone: true}\"\r\n                    [showCustomRangeLabel]=\"true\"\r\n                    [alwaysShowCalendars]=\"alwaysShowCalendars\"\r\n                    [ranges]=\"ranges\"                \r\n                    [showCancel]=\"true\"\r\n                    [linkedCalendars]=\"true\"\r\n                    [locale]=\"{applyLabel: 'Done'}\"                \r\n                    [keepCalendarOpeningWithRange]=\"keepCalendarOpeningWithRange\"\r\n                    [showRangeLabelOnInput]=\"showRangeLabelOnInput\"\r\n                    class=\"form-control\"\r\n                    placeholder=\"Select please...\"/>\r\n                  </div>\r\n                  \r\n                  <div class=\"col-1\" style=\"margin-left: -22px;\">\r\n                    <button type=\"submit\" class=\"btn btn-success btn-lg\"><i class=\"fas fa-search\"></i></button>\r\n                  </div>\r\n                </div>\r\n                </form>         \r\n    \r\n                  <div class=\"card-body\">\r\n                    <div class=\"table-responsive\">\r\n                    <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                        <thead>\r\n                          <tr>\r\n                            <th>ID</th>\r\n                            <th>Local Number</th>\r\n                            <th>Remote Number</th>\r\n                            <th>Duration</th>\r\n                            <th>Recording Date</th>\r\n                            <th>Download</th>                                                                                    \r\n                          </tr>\r\n                        </thead>\r\n                        <tbody *ngIf=\"datas?.length != 0\">\r\n                            <tr *ngFor=\"let data of datas\">\r\n                                <td>{{ data.uuid }}</td>\r\n                                <td>{{ data.did }}</td>\r\n                                <td>{{ data.incoming_number }}</td>\r\n                                <td>{{ data.call_duration }}</td>\r\n                                <td>{{ data.date_of_call }}</td>  \r\n                                <td>download</td>                             \r\n                            </tr>\r\n                        </tbody>\r\n                        <tbody *ngIf=\"datas?.length == 0\">\r\n                          <tr>\r\n                            <td colspan=\"6\" class=\"no-data-available\">No data Available!</td>\r\n                          </tr>\r\n                        <tbody>\r\n                      </table>\r\n                    </div>\r\n                  </div>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </section>\r\n        \r\n      </div>  ");

/***/ }),

/***/ "gYVw":
/*!****************************************************************************************!*\
  !*** ./src/app/modules/reports/report-labelsummary/report-labelsummary.component.scss ***!
  \****************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJyZXBvcnQtbGFiZWxzdW1tYXJ5LmNvbXBvbmVudC5zY3NzIn0= */");

/***/ }),

/***/ "gc2d":
/*!***********************************************************************************!*\
  !*** ./src/app/modules/publishers/advertiser-terms/advertiser-terms.component.ts ***!
  \***********************************************************************************/
/*! exports provided: AdvertiserTermsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AdvertiserTermsComponent", function() { return AdvertiserTermsComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_advertiser_terms_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./advertiser-terms.component.html */ "7kfw");
/* harmony import */ var _advertiser_terms_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./advertiser-terms.component.scss */ "5B5M");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");




let AdvertiserTermsComponent = class AdvertiserTermsComponent {
    constructor() { }
    ngOnInit() {
    }
};
AdvertiserTermsComponent.ctorParameters = () => [];
AdvertiserTermsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-advertiser-terms',
        template: _raw_loader_advertiser_terms_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_advertiser_terms_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], AdvertiserTermsComponent);



/***/ }),

/***/ "hLQq":
/*!******************************************************************************!*\
  !*** ./src/app/modules/reports-comparison/reports-comparison.component.scss ***!
  \******************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("i {\n  font-size: 14px;\n}\n\nspan.badge.badge-transparent {\n  font-size: 7px;\n  background: no-repeat;\n}\n\nbutton.btn.btn-primary.btn-icon.icon-left.mr-2 {\n  font-size: 15px;\n}\n\n/*Bhavik Patel*/\n\n.ngx-datatable .datatable-header {\n  display: block;\n  overflow: hidden;\n}\n\n.card .card-header .btn:not(.note-btn) {\n  border-radius: 4px;\n  width: 72px;\n  font-size: 10px;\n}\n\nbutton.btn.btn-primary.btn-icon.icon-left.mr-2 {\n  font-size: 12px;\n}\n\n.card .card-header .form-control {\n  width: auto !important;\n  border-radius: 0px !important;\n  height: 32px !important;\n}\n\nlabel.input-group-btn {\n  border: 1px solid #ced4da;\n  border-left: none;\n}\n\ntable td, table th {\n  font-size: 11px;\n}\n\n.error {\n  color: red;\n  font-size: 10px;\n}\n\nselect.form-control {\n  height: 38px !important;\n  font-size: 12px !important;\n  padding: 10px !important;\n}\n\nbutton.btn.btn-primary.btn-icon.icon-left.mr-2 {\n  font-size: 10px !important;\n}\n\ni.fa.fa-filter {\n  font-size: 8px;\n}\n\n.separator {\n  display: flex;\n  align-items: center;\n  text-align: center;\n}\n\n.separator::before,\n.separator::after {\n  content: \"\";\n  flex: 1;\n  border-bottom: 1px solid #000;\n}\n\n.separator:not(:empty)::before {\n  margin-right: 0.25em;\n}\n\n.separator:not(:empty)::after {\n  margin-left: 0.25em;\n}\n\nul.nav.nav-tabs li {\n  padding: 5px;\n  border: 1px solid #dee2e6;\n  border-bottom: none;\n  border-radius: 3px;\n}\n\n.tab-pane.fade.recorded.active.show {\n  font-size: 10px !important;\n}\n\n.nav-tabs {\n  border-bottom: 1px solid #3e4b75 !important;\n}\n\n.col-md-1 {\n  padding: 3px;\n  text-align: center !important;\n}\n\n.datatable-row-detail {\n  display: flex;\n}\n\nngb-tooltip-window .tooltip-inner {\n  pointer-events: auto;\n  width: 60px;\n  display: flex;\n  margin-top: 20px !important;\n}\n\n.material-icons {\n  font-size: 14px;\n}\n\n@media (max-width: 641px) {\n  .buttons_input {\n    text-align: start;\n  }\n}\n\n.buttons_input button {\n  padding: 3px !important;\n}\n\n#toast-container > div {\n  box-shadow: 0 4px 25px 0 rgba(0, 0, 0, 0.1);\n  padding: 13px 20px 10px 0px;\n  opacity: 1;\n  background: #ffffff;\n  border-radius: 8px;\n}\n\naudio::-webkit-media-controls-play-button,\naudio::-webkit-media-controls-panel {\n  background-color: #ffffff;\n  color: #000;\n}\n\n.toast-title {\n  font-weight: bold;\n  padding-left: 19px;\n  color: #000;\n}\n\nbutton.toast-close-button {\n  color: black;\n}\n\n.dark .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell {\n  background: #111319;\n  color: white;\n}\n\n.dark .ngx-datatable .datatable-footer .datatable-footer-inner {\n  color: #ffffff;\n  background: #111319;\n}\n\n.dark .ngx-datatable.material .datatable-footer .datatable-pager a {\n  color: rgba(255, 255, 255, 0.54);\n}\n\n.dark .ngx-datatable.material .datatable-body .datatable-row-detail {\n  background: #111319;\n  padding: 10px;\n  color: white;\n}\n\n.dark .ngx-datatable.material {\n  background: #111319;\n}\n\n.dark .ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell {\n  color: rgba(255, 255, 255, 0.87) !important;\n  background: #111319 !important;\n}\n/*# sourceMappingURL=data:application/json;base64,  */");

/***/ }),

/***/ "hVKj":
/*!************************************************************************************!*\
  !*** ./src/app/modules/ivr-menus/ivr-routing-plans/add-plan/add-plan.component.ts ***!
  \************************************************************************************/
/*! exports provided: AddPlanComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddPlanComponent", function() { return AddPlanComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_add_plan_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./add-plan.component.html */ "/Krq");
/* harmony import */ var _add_plan_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./add-plan.component.scss */ "K6nh");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../../../global */ "XrUY");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);











class DataTablesResponse {
}
let AddPlanComponent = class AddPlanComponent {
    constructor(renderer, moduleservice, toastrService, handler, fb, router, route, cdRef) {
        this.renderer = renderer;
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.router = router;
        this.route = route;
        this.cdRef = cdRef;
        this.locations = [];
        this.dropdownList = [];
        this.selectedItems = [];
        this.dropdownSettings = {};
        this.pubdropdownSettings = {};
        this.labeldropdownSettings = {};
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_3__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.dtOptionsTarget = {};
        this.dtOptionsRouting = {};
        this.Submitted = false;
        this.nameadded = 0;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HttpClient"](handler);
        this.uuid = this.route.snapshot.paramMap.get('id');
    }
    ngAfterViewChecked() {
        this.cdRef.detectChanges();
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.getAlltarget();
        this.loadalltarget();
        this.loadallRoutingplan(this.nam_uuid);
        this.editRoutingForm = this.fb.group({
            user_uuid: [''],
            uuid: [''],
            priority: [''],
            weight: [''],
            conversation_revenue: [''],
            conversation_event: [''],
            conversation_seconds: [''],
            restrictdup: [''],
            restrictafter: [''],
            days: [''],
            settingToggleDurationval: [''],
            settingToggleDuration: [''],
        });
        this.editForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            user_uuid: [''],
        });
    }
    loadalltarget() {
        let type = 1;
        if ($.fn.DataTable.isDataTable(this.tabletarget.nativeElement)) {
            $(this.tabletarget.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptionsTarget = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[10, 20, 50, 100, "All"], [10, 20, 50, 100, "All"]],
            "order": [[0, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'gettargets/' + this.currentCompany.uuid + '/' + this.nam_uuid + '/' + type, dataTablesParameters, {}).subscribe(resp => {
                    this.allTargets = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "name" }, { data: "typeval" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTableTarget = $(this.tabletarget.nativeElement);
        this.dataTableTarget.dataTable(this.dtOptionsTarget);
    }
    loadallRoutingplan(uuid) {
        if ($.fn.DataTable.isDataTable(this.tablerouting.nativeElement)) {
            $(this.tablerouting.nativeElement).dataTable().fnDestroy();
        }
        this.dtOptionsRouting = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[10, 20, 50, 100, "All"], [10, 20, 50, 100, "All"]],
            "order": [[0, "asc"]],
            "searching": false,
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getallIVRRoutingplan/' + uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.allRoutingPlan = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "prority" }, { data: "name" }, { data: "destination" }, { data: "revenue" }, { data: "status" }, { data: "action" }
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTableRouting = $(this.tablerouting.nativeElement);
        this.dataTableRouting.dataTable(this.dtOptionsRouting);
    }
    DeleteRoutingPlan(uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                var currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteIVRRoutingPlan(uuid, currentUser.uuid).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    this.loadallRoutingplan(this.uuid);
                    this.loadalltarget();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    setRouting(uuid) {
        if (this.editForm.get('name').value == "") {
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Error', 'Please Enter Name of Routing First :)', 'error');
            setTimeout(() => {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
            }, 2000);
            return false;
        }
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want Add Routing Plan!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, Add it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                var currentUser = JSON.parse(localStorage.getItem('currentUser'));
                var currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
                this.moduleservice.setivrRouting(uuid, this.namvalue, currentUser.uuid, currentCompany.uuid).subscribe(res => {
                    this.loadallRoutingplan(this.nam_uuid);
                    this.loadalltarget();
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Added!', 'Routing Plan Added Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Routing Plan Cancelled :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    getAlltarget() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAlltarget(this.currentCompany.uuid).subscribe(res => {
            this.targetdata = res;
        }, error => this.error = error);
    }
    get editFormcontrol() { return this.editForm.controls; }
    onSubmit() {
        this.Submitted = true;
        if (this.editForm.invalid) {
            return;
        }
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.editForm.get('user_uuid').setValue(currentUser.uuid);
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.addIVRPlan(currentUser.uuid, this.currentCompany.uuid, this.editForm.value).subscribe(res => {
            //  console.log(res); return false;
            if (res.status !== 'error') {
                this.nameadded = 1;
                this.nam_uuid = res.uuid;
                this.namvalue = this.editForm.get('name').value;
                this.toastrService.success('IVR Routing Plan Added Successfully');
                this.Submitted = false;
                //  this.router.navigate(['/campaigns']);
            }
            else {
                this.toastrService.error('Failed To Add Plan! Please try again');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (!this.payoutForm.invalid) {
            $("#addLabels").modal("hide");
        }
    }
    closeroutingModal() {
        if (!this.editRoutingForm.invalid) {
            $("#editRouting").modal("hide");
        }
    }
    editRoutingdata(uuid, priority, weight, revenue, type, seconds, restrictdup, restrictafter, settingToggleDurationval, days) {
        // console.log(uuid)
        this.editRoutingForm.patchValue({
            uuid: uuid,
            priority: priority,
            weight: weight,
            conversation_revenue: revenue,
            conversation_event: type,
            conversation_seconds: seconds,
            restrictdup: restrictdup,
            restrictafter: restrictafter,
            days: days,
            settingToggleDurationval: settingToggleDurationval,
            settingToggleDuration: settingToggleDurationval,
        });
        // this.settingToggleDurationvalue = settingToggleDurationval;
    }
    get editRoutingSubmit() { return this.editRoutingForm.controls; }
    oneditRoutingSubmit() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.editRoutingForm.get('user_uuid').setValue(currentUser.uuid);
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.editIVRRoutingSubmit(this.uuid, this.editRoutingForm.value).subscribe(res => {
            if (res.status !== 'error') {
                this.toastrService.success('Routing Plan Updated Successfully');
                this.Submitted = false;
                this.loadallRoutingplan(this.nam_uuid);
            }
            else {
                this.toastrService.error('Failed To Update Campaign');
            }
        }, error => this.error = error);
    }
};
AddPlanComponent.ctorParameters = () => [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Renderer2"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_6__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_9__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_8__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_8__["ActivatedRoute"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectorRef"] }
];
AddPlanComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }],
    tabletarget: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTableTarget', { static: true },] }],
    tablerouting: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTableRouting', { static: true },] }]
};
AddPlanComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-add-plan',
        template: _raw_loader_add_plan_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_add_plan_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], AddPlanComponent);



/***/ }),

/***/ "hVN+":
/*!********************************************************************************!*\
  !*** ./src/app/modules/campaigns/campaign-create/campaign-create.component.ts ***!
  \********************************************************************************/
/*! exports provided: CampaignCreateComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CampaignCreateComponent", function() { return CampaignCreateComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_campaign_create_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./campaign-create.component.html */ "HPR7");
/* harmony import */ var _campaign_create_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./campaign-create.component.scss */ "TGGr");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");










let CampaignCreateComponent = class CampaignCreateComponent {
    constructor(renderer, moduleservice, toastrService, handler, fb, router, changedetect) {
        this.renderer = renderer;
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.router = router;
        this.changedetect = changedetect;
        this.locations = [];
        this.dropdownList = [];
        this.selectedItems = [];
        this.dropdownSettings = {};
        this.labeldropdownSettings = {};
        this.payout_typevalueedit = 0;
        this.Submitted = false;
    }
    get_maxcon(event) {
        this.maxconcurrency = event.target.checked;
        // this.isselectlabel = false;    
        // $(".labelswitch").prop('checked',false);
    }
    get_labelisselect(event) {
        this.isselectlabel = event.target.checked;
        // this.maxconcurrency = false;    
        // $(".labelnumber").prop('checked',false);
    }
    ngOnInit() {
        this.dropdownSettings = {
            singleSelection: false,
            text: "Select Numbers",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        this.labeldropdownSettings = {
            singleSelection: false,
            text: "Select Labels",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        var parentElement = $(".asdf");
        $(".js-example-basic-single").select2({
            dropdownParent: parentElement
        });
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        // this.addJsToElement('../assets/bundles/jquery-validation/dist/jquery.validate.min.js').onload ;
        // this.addJsToElement('../assets/bundles/jquery-steps/jquery.steps.min.js').onload;
        // this.addJsToElement('../assets/js/page/form-wizard.js').onload ;    
        // this.loadNumbers();
        this.loadNumbers();
        this.getAllpublishers();
        this.getAlltarget();
        this.getAllLabels();
        this.addForm = this.fb.group({
            campaignName: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            country: [''],
            // option: [''],      
            number: [''],
            labeldata: [''],
            numberIsFor: [''],
            // numberType: [''],             
            publisher: [''],
            payout_typeedit: [''],
            payout_amount: [''],
            payout_trigger: [''],
            payout_seconds: [''],
            target: [''],
            conversation_revenue: [''],
            conversation_event: [''],
            conversation_seconds: [''],
            user_uuid: [''],
            recording: [''],
        });
        this.addForm.patchValue({
            country: 'United States'
        });
        // this.value = ['multiple2', 'multiple4'];
        this.options = {
            width: '300',
            multiple: true,
        };
    }
    ngAfterViewInit() {
        this.changedetect.detectChanges();
    }
    payout_typevaledit(val) {
        this.payout_typevalueedit = val;
        this.addForm.get('payout_typeedit').setValue(val);
    }
    ngOnDestroy() {
        const selectOptionsContainer = $('.select2-container');
        selectOptionsContainer.removeClass('span.select2-selection.select2-selection--single');
    }
    // public numberdata: any;
    // public numberdata: Array<Select2OptionData>;
    loadNumbers() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.loadNumbersfordropdown(this.currentCompany.uuid).subscribe(resp => {
            this.numberdata = resp;
        }, error => this.error = error);
    }
    getAllLabels() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAllLabels(this.currentCompany.uuid).subscribe(res => {
            this.labeldata = res;
            // console.log(res);
        }, error => this.error = error);
    }
    getAllpublishers() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAllpublishers(this.currentCompany.uuid).subscribe(res => {
            this.publisherdata = res;
            console.log(this.publisherdata);
        }, error => this.error = error);
    }
    getAlltarget() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAlltarget(this.currentCompany.uuid).subscribe(res => {
            this.targetdata = res;
        }, error => this.error = error);
    }
    numberIsForval(type) {
        this.numberIsFor = type;
        this.addForm.get('numberIsFor').setValue(type);
    }
    get_recordingstatus(event) {
        this.recording = event.target.checked;
        this.addForm.get('recording').setValue(this.recording);
    }
    //Add Publisher
    get addFormcontrol() { return this.addForm.controls; }
    onSubmit() {
        // console.log(this.addForm.value);
        // return false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.addForm.get('user_uuid').setValue(currentUser.uuid);
        this.moduleservice.addCampaign(this.currentCompany.uuid, this.addForm.value).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.isName = "fail";
                this.toastrService.success('Campaign Added Successfully');
                this.Submitted = false;
                this.router.navigate(['/campaigns']);
            }
            else {
                this.toastrService.error('Failed To Add Campaign');
            }
        }, error => this.error = error);
    }
    validatename() {
        if (this.addForm.get('campaignName').value != '') {
            this.moduleservice.validateCampaignName(this.addForm.get('campaignName').value).subscribe(res => {
                // console.log(res); return false;  
                this.isName = res;
                if (this.isName.status == 'success') {
                    this.isName = "success";
                }
                else {
                    this.isName = "fail";
                }
            });
        }
        else {
            this.isName = "";
        }
    }
};
CampaignCreateComponent.ctorParameters = () => [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Renderer2"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_5__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormBuilder"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ChangeDetectorRef"] }
];
CampaignCreateComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-campaign-create',
        template: _raw_loader_campaign_create_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ChangeDetectionStrategy"].OnPush,
        styles: [_campaign_create_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], CampaignCreateComponent);



/***/ }),

/***/ "hchM":
/*!*********************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/number/numberadd/numberadd.component.html ***!
  \*********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<!-- FSL Modal -->\r\n<div class=\"modal  fade\" id=\"addFSLRules\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog modal-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Add New Target</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      \r\n      <form [formGroup]=\"addFSLRules\" (ngSubmit)=\"onFSLSubmit()\">\r\n        <div class=\"form-group\">\r\n            <label>Name</label>\r\n            <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': FSLRulesSubmitted && rules.name.errors }\" (input)=\"validatename()\">\r\n            <div *ngIf=\"FSLRulesSubmitted && rules.name.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"rules.name.errors.required\">Name is required</div>\r\n            </div>\r\n            <div *ngIf=\"isName == 'success'  && isName != ''\" style=\"color:green;\">\r\n             Name Is Available\r\n           </div> \r\n            <div *ngIf=\"isName == 'fail' && isName != ''\" style=\"color:red;\">\r\n             Name Is Not Available\r\n           </div> \r\n          </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Number of Time Frames:</label>\r\n            <input formControlName=\"numberoftimeframe\"  oninput=\"javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);\"\r\n            type = \"number\" maxlength = \"1\" [(ngModel)]=\"noofforwarding\" type=\"number\" class=\"form-control phone-number\" [ngClass]=\"{ 'is-invalid': FSLRulesSubmitted && rules.numberoftimeframe.errors }\" min=\"1\" max=\"7\">                    \r\n            <div *ngIf=\"FSLRulesSubmitted && rules.numberoftimeframe.errors\" class=\"invalid-feedback\">\r\n              <div *ngIf=\"rules.numberoftimeframe.errors.required\">Number of Time Frames is required</div>\r\n          </div>      \r\n          </div>\r\n          \r\n          <br>\r\n          <!-- Day 1 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=1\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 1</label>\r\n                  <select formControlName=\"day_0\" name=\"day-0\" id=\"day-0\" class=\"form-control\" [value]=\"0\">\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                  </select>                     \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>                        \r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_0\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>                             \r\n              </div>                   -->\r\n\r\n               \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_0\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_0\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_0\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_0\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              \r\n              <div>\r\n\r\n               <div class=\"form-group\">\r\n                   <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                   <input formControlName=\"noofforwardinglocation_1\" [(ngModel)]=\"noofforwardinglocation_1\" type=\"text\" class=\"form-control phone-number\">\r\n               </div>               \r\n                   \r\n               <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation();let i = index'>\r\n                 <div class=\"form-group\">\r\n                     <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" class=\"with-gap number\" [value]='0' (click)=\"setPrimaryforward(0,i,0)\" [checked]=\"true\">\r\n\r\n                       <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                     </div>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" (click)=\"setPrimaryforward(1,i,0)\" class=\"with-gap\" [value]=\"1\">\r\n                       <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                     </div>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,0)\" [value]=\"2\">\r\n                       <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                     </div>\r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,0) && !isPrimarySelected(2,i,0)\">\r\n                         <label  class=\"d-block\">Number:</label>\r\n                         <input type=\"text\" formControlName=\"number_{{i}}_day0\" id=\"number_{{i}}_day0\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,0)\">\r\n                         <label  class=\"d-block\">IVR Menu:</label>\r\n                           <!-- <input type=\"text\" formControlName=\"ivrMenu_{{i}}_day0\" class=\"form-control phone-number\">   -->\r\n                            \r\n                           <select formControlName=\"ivrMenu_{{i}}_day0\" class=\"form-control\" [value] = \"\">\r\n                               <option value=\"\">Select IVR Menu</option>\r\n                               <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                   {{data.name}}\r\n                                 </option>\r\n                             </select>\r\n                     </div>\r\n                     <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,0)\">\r\n                           <label  class=\"d-block\">SIP (IP Address):</label>\r\n                           <input  formControlName=\"sipAdd_{{i}}_day0\" type=\"text\" class=\"form-control phone-number\">    \r\n                     </div>\r\n               </div> \r\n               </div>\r\n   \r\n           </div>  \r\n           </div>  \r\n        </div>\r\n           </div>\r\n\r\n          <!-- Day 2 -->\r\n           <div class=\"groupborder\" *ngIf=\"noofforwarding>=2\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 2</label>\r\n                  <select formControlName=\"day_1\" class=\"form-control\" [value]=\"0\" >\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_1\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_1\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>  -->\r\n             \r\n               \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_1\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_1\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_1\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_1\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n\r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_2\" [(ngModel)]=\"noofforwardinglocation_2\" type=\"text\" class=\"form-control phone-number\" >           \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_2();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,1)\" [checked]=\"true\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" (click)=\"setPrimaryforward(1,i,1)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,1)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,1) && !isPrimarySelected(2,i,1)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day1\" id=\"number_{{i}}_day1\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,1)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                       <select formControlName=\"ivrMenu_{{i}}_day1\" class=\"form-control\" [value] = \"\">\r\n                           <option value=\"\">Select IVR Menu</option>\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,1)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day1\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n           </div>  \r\n        </div>\r\n            </div>\r\n          \r\n          <!-- Day 3 -->  \r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=3\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 3</label>\r\n                  <select formControlName=\"day_2\" class=\"form-control\" [value]=\"0\" >\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                    \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_2\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_2\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>  -->\r\n\r\n               \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_2\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_2\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_2\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_2\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n                          \r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_3\" [(ngModel)]=\"noofforwardinglocation_3\" type=\"text\" class=\"form-control phone-number\">            \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_3();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,2)\" [checked]=\"true\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\" (click)=\"setPrimaryforward(1,i,2)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,2)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,2) && !isPrimarySelected(2,i,2)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day2\" id=\"number_{{i}}_day2\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,2)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                      <select formControlName=\"ivrMenu_{{i}}_day2\" class=\"form-control\" [value] = \"\">\r\n                           <option value=\"\">Select IVR Menu</option>\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select>  \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,2)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day2\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n            </div>  \r\n        </div>\r\n          </div>\r\n\r\n          <!-- Day 4 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=4\">\r\n              <div >\r\n                <div class=\"form-group\">\r\n                    <label>Select Timeframe - 4</label>\r\n                    <select formControlName=\"day_3\" class=\"form-control\" [value]=\"0\" >\r\n                      <option value=\"0\">Select Day</option>\r\n                      <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                      </select>\r\n                      \r\n                  </div>\r\n                <div class=\"row\">  \r\n                <div class=\"col-md-12\">\r\n                <!-- <div class=\"row\">\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>Start Time</label>\r\n                          <input formControlName=\"start_time_3\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                      </div>      \r\n                  </div>\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>End Time</label>\r\n                          <input formControlName=\"end_time_3\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                      </div>\r\n                  </div>\r\n                </div>   -->\r\n\r\n                 \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_3\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_3\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_3\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_3\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n                \r\n                <div class=\"form-group\">\r\n                 <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                 <input formControlName=\"noofforwardinglocation_4\" [(ngModel)]=\"noofforwardinglocation_4\" type=\"text\" class=\"form-control phone-number\">          \r\n             </div>               \r\n                 \r\n             <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_4();let i = index'>\r\n               <div class=\"form-group\">\r\n                   <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,3)\" [checked]=\"true\">\r\n\r\n                     <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" (click)=\"setPrimaryforward(1,i,3)\" class=\"with-gap\" [value]=\"1\">\r\n                     <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,3)\" [value]=\"2\">\r\n                     <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                   </div>\r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,3) && !isPrimarySelected(2,i,3)\">\r\n                       <label  class=\"d-block\">Number:</label>\r\n                       <input type=\"text\" formControlName=\"number_{{i}}_day3\" id=\"number_{{i}}_day3\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,3)\">\r\n                       <label  class=\"d-block\">IVR Menu:</label>\r\n                        <select formControlName=\"ivrMenu_{{i}}_day3\" class=\"form-control\" [value] = \"\">\r\n                             <option value=\"\">Select IVR Menu</option>\r\n                             <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                 {{data.name}}\r\n                               </option>\r\n                           </select>\r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,3)\">\r\n                         <label  class=\"d-block\">SIP (IP Address):</label>\r\n                         <input  formControlName=\"sipAdd_{{i}}_day3\" type=\"text\" class=\"form-control phone-number\">    \r\n                   </div>\r\n             </div> \r\n              </div>  \r\n              </div>  \r\n          </div>\r\n          </div>\r\n            \r\n          <!-- Day 5 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=5\">\r\n              <div >\r\n                <div class=\"form-group\">\r\n                    <label>Select Timeframe - 5</label>\r\n                    <select formControlName=\"day_4\" class=\"form-control\" [value]=\"0\" >\r\n                      <option value=\"0\">Select Day</option>\r\n                      <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                      </select>\r\n                      \r\n                  </div>\r\n                <div class=\"row\">  \r\n                <div class=\"col-md-12\">\r\n                <!-- <div class=\"row\">\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>Start Time</label>\r\n                          <input formControlName=\"start_time_4\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                      </div>      \r\n                  </div>\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>End Time</label>\r\n                          <input formControlName=\"end_time_4\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                      </div>\r\n                  </div>\r\n                </div>                  -->\r\n\r\n                 \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_4\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_4\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_4\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_4\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n                <div class=\"form-group\">\r\n                 <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                 <input formControlName=\"noofforwardinglocation_5\" [(ngModel)]=\"noofforwardinglocation_5\" type=\"text\" class=\"form-control phone-number\">          \r\n             </div>               \r\n                 \r\n             <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_5();let i = index'>\r\n               <div class=\"form-group\">\r\n                   <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,4)\" [checked]=\"true\">\r\n\r\n                     <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" (click)=\"setPrimaryforward(1,i,4)\" class=\"with-gap\" [value]=\"1\">\r\n                     <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,4)\" [value]=\"2\">\r\n                     <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                   </div>\r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,4) && !isPrimarySelected(2,i,4)\">\r\n                       <label  class=\"d-block\">Number:</label>\r\n                       <input type=\"text\" formControlName=\"number_{{i}}_day4\" id=\"number_{{i}}_day4\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,4)\">\r\n                       <label  class=\"d-block\">IVR Menu:</label>\r\n                        <select formControlName=\"ivrMenu_{{i}}_day4\" class=\"form-control\" [value] = \"\">\r\n                             <option value=\"\">Select IVR Menu</option>\r\n                             <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                 {{data.name}}\r\n                               </option>\r\n                           </select>  \r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,4)\">\r\n                         <label  class=\"d-block\">SIP (IP Address):</label>\r\n                         <input  formControlName=\"sipAdd_{{i}}_day4\" type=\"text\" class=\"form-control phone-number\">    \r\n                   </div>\r\n             </div> \r\n              </div>  \r\n              </div>  \r\n          </div>\r\n          </div>\r\n\r\n          <!-- Day 6 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=6\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 6</label>\r\n                  <select formControlName=\"day_5\" class=\"form-control\" [value]=\"0\" >\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                    \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_5\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_5\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>  -->\r\n\r\n               \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_5\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_5\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_5\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_5\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_6\" [(ngModel)]=\"noofforwardinglocation_6\" type=\"text\" class=\"form-control phone-number\">          \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_6();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,5)\" [checked]=\"true\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" (click)=\"setPrimaryforward(1,i,5)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,5)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,5) && !isPrimarySelected(2,i,5)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day5\" id=\"number_{{i}}_day5\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,5)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                      <select formControlName=\"ivrMenu_{{i}}_day5\" class=\"form-control\" [value] = \"\">\r\n                           <option value=\"\">Select IVR Menu</option>\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select>  \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,5)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day5\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n            </div>  \r\n        </div>\r\n        </div>\r\n\r\n        <!-- Day 7 -->\r\n        <div class=\"groupborder\" *ngIf=\"noofforwarding>=7\">\r\n          <div >\r\n            <div class=\"form-group\">\r\n                <label>Select Timeframe - 7</label>\r\n                <select formControlName=\"day_6\" class=\"form-control\" [value]=\"0\" >\r\n                  <option value=\"0\">Select Day</option>\r\n                  <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                  </select>\r\n                  \r\n              </div>\r\n            <div class=\"row\">  \r\n            <div class=\"col-md-12\">\r\n            <!-- <div class=\"row\">\r\n              <div class=\"col-md-6\">\r\n                  <div class=\"form-group\">\r\n                      <label>Start Time</label>\r\n                      <input formControlName=\"start_time_6\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                      <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                  </div>      \r\n              </div>\r\n              <div class=\"col-md-6\">\r\n                  <div class=\"form-group\">\r\n                      <label>End Time</label>\r\n                      <input formControlName=\"end_time_6\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                      <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                  </div>\r\n              </div>\r\n            </div>               -->\r\n\r\n             \r\n            <div class=\"row\">\r\n              <div class=\"col-md-3\">\r\n                  <label>Start Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"start_hrs_6\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                        <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_min_6\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n              </div>\r\n\r\n              <div class=\"col-md-4\">\r\n                <label>End Time (HH:MM)</label><br>\r\n                  <div  style=\"display:-webkit-inline-box\">\r\n                  <div class=\"form-group\">\r\n                      <input style=\"width:68px\" formControlName=\"end_hrs_6\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                  </div> \r\n                  <div class=\"pt-2\">\r\n                    :\r\n                  </div>\r\n                <div class=\"text-left\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_min_6\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                    </div>      \r\n                </div>\r\n              </div>\r\n              </div>\r\n            </div> \r\n            <div class=\"form-group\">\r\n             <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n             <input formControlName=\"noofforwardinglocation_7\" [(ngModel)]=\"noofforwardinglocation_7\" type=\"text\" class=\"form-control phone-number\">          \r\n         </div>               \r\n             \r\n         <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_7();let i = index'>\r\n           <div class=\"form-group\">\r\n               <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,6)\" [checked]=\"true\">\r\n\r\n                 <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n               </div>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" (click)=\"setPrimaryforward(1,i,6)\" class=\"with-gap\" [value]=\"1\">\r\n                 <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n               </div>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,6)\" [value]=\"2\">\r\n                 <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n               </div>\r\n             </div>\r\n             <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,6) && !isPrimarySelected(2,i,6)\">\r\n                   <label  class=\"d-block\">Number:</label>\r\n                   <input type=\"text\" formControlName=\"number_{{i}}_day6\" id=\"number_{{i}}_day6\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n             </div>\r\n             <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,6)\">\r\n                   <label  class=\"d-block\">IVR Menu:</label>\r\n                    <select formControlName=\"ivrMenu_{{i}}_day6\" class=\"form-control\" [value] = \"\">\r\n                         <option value=\"\">Select IVR Menu</option>\r\n                         <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                             {{data.name}}\r\n                           </option>\r\n                       </select>  \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,6)\">\r\n                     <label  class=\"d-block\">SIP (IP Address):</label>\r\n                     <input  formControlName=\"sipAdd_{{i}}_day6\" type=\"text\" class=\"form-control phone-number\">    \r\n               </div>\r\n         </div> \r\n          </div>  \r\n          </div>  \r\n      </div>\r\n      </div>\r\n          \r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n           <button [disabled]=\"isName == 'fail'\" type=\"submit\" (click)=\"closeModal()\" class=\"btn btn-primary m-t-15 waves-effect\">Create New Target</button>\r\n           <button (click)=\"onFSLReset()\" type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n        </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>  \r\n\r\n<div class=\"modal  fade\" id=\"editFSLRules\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\" aria-hidden=\"true\" *ngIf=\"forwarding?.length != 0\">\r\n<div class=\"modal-dialog modal-lg\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Edit Target</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form class=\"\"  [formGroup]=\"editFSLRules\" (ngSubmit)=\"onFSLEditSubmit()\">\r\n        \r\n        <div class=\"form-group\">\r\n            <label>Name</label>\r\n            <input formControlName=\"rulename\" type=\"text\" class=\"form-control\" [value] =\"forwarding\" readonly>           \r\n        </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Number of Time Frames:</label>\r\n            <input formControlName=\"numberoftimeframe\"  oninput=\"javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);\"\r\n            type = \"number\" maxlength = \"1\" [(ngModel)]=\"noofforwarding\" type=\"number\" class=\"form-control phone-number\" [ngClass]=\"{ 'is-invalid': FSLRulesEditSubmitted && editrules.numberoftimeframe.errors }\" [value] =\"forwardingtimeframe\">                   \r\n            <div *ngIf=\"FSLRulesEditSubmitted && editrules.numberoftimeframe.errors\" class=\"invalid-feedback\">\r\n              <div *ngIf=\"editrules.numberoftimeframe.errors.required\">Number of Time Frames is required</div>\r\n          </div>      \r\n          </div>\r\n          \r\n          <br>\r\n          <!-- Day 1 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=1\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 1</label>\r\n                  <select formControlName=\"day_0\" name=\"day-0\" id=\"day-0\" class=\"form-control\" >\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                  </select>                     \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n             \r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_0\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_0\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_0\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_0\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              \r\n              <div>\r\n\r\n               <div class=\"form-group\">\r\n                   <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                   <input formControlName=\"noofforwardinglocation_1\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_1\">\r\n               </div>               \r\n                   \r\n               <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation();let i = index'>\r\n                 <div class=\"form-group\">\r\n                     <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,0)\">\r\n                        <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                     </div>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" (click)=\"setPrimaryforward(1,i,0)\" class=\"with-gap\" [value]=\"1\">\r\n                       <label class=\"form-check-label\" for=\"\">IVR Menu</label>\r\n                     </div>\r\n                     <div class=\"form-check form-check-inline\">\r\n                         <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day0\" name=\"PrimaryforwardType_{{i}}_day0\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,0)\" [value]=\"2\">\r\n                       <label class=\"form-check-label\" for=\"\">SIP (IP Address)</label>\r\n                     </div>\r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,0) && !isPrimarySelected(2,i,0)\">\r\n                         <label  class=\"d-block\">Number:</label>\r\n                         <input type=\"text\" formControlName=\"number_{{i}}_day0\" id=\"editnumber_{{i}}_day0\" class=\"form-control phone-number numbers\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,0)\">\r\n                         <label  class=\"d-block\">IVR Menu:</label>\r\n                           <select formControlName=\"ivrMenu_{{i}}_day0\" class=\"form-control\" [value] = \"\">\r\n                               <option value=\"\">Select IVR Menu</option>\r\n                               <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                   {{data.name}}\r\n                                 </option>\r\n                          </select>\r\n                     </div>\r\n                     <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,0)\">\r\n                           <label  class=\"d-block\">SIP (IP Address):</label>\r\n                           <input  formControlName=\"sipAdd_{{i}}_day0\" type=\"text\" class=\"form-control phone-number\">    \r\n                     </div>\r\n               </div> \r\n               </div>\r\n   \r\n           </div>  \r\n           </div>  \r\n        </div>\r\n           </div>\r\n\r\n          <!-- Day 2 -->\r\n           <div class=\"groupborder\" *ngIf=\"noofforwarding>=2\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 2</label>\r\n                  <select formControlName=\"day_1\" class=\"form-control\">\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_1\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_1\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>  -->\r\n\r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_1\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_1\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_1\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_1\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              \r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_2\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_2\">           \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_2();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" id=\"PrimaryforwardType_{{i}}_day1\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,1)\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" (click)=\"setPrimaryforward(1,i,1)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day1\" name=\"PrimaryforwardType_{{i}}_day1\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,1)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,1) && !isPrimarySelected(2,i,1)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day1\" id=\"editnumber_{{i}}_day1\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,1)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                       <select formControlName=\"ivrMenu_{{i}}_day1\" class=\"form-control\" [value] = \"\">\r\n                           <option value=\"\">Select IVR Menu</option>\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,1)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day1\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n           </div>  \r\n        </div>\r\n            </div>\r\n          \r\n          <!-- Day 3 -->  \r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=3\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 3</label>\r\n                  <select formControlName=\"day_2\" class=\"form-control\" >\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                    \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_2\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_2\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>   -->\r\n\r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_2\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_2\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_2\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_2\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_3\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_3\">            \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_3();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,2)\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\"  (click)=\"setPrimaryforward(1,i,2)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day2\" name=\"PrimaryforwardType_{{i}}_day2\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,2)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,2) && !isPrimarySelected(2,i,2)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day2\" id=\"editnumber_{{i}}_day2\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,2)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                       <select formControlName=\"ivrMenu_{{i}}_day2\" class=\"form-control\" [value] = \"\">\r\n                           <option\r\n                            value=\"\">Select IVR Menu</option\r\n                            >\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select>  \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,2)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day2\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n            </div>  \r\n        </div>\r\n          </div>\r\n\r\n          <!-- Day 4 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=4\">\r\n              <div >\r\n                <div class=\"form-group\">\r\n                    <label>Select Timeframe - 4</label>\r\n                    <select formControlName=\"day_3\" class=\"form-control\">\r\n                      <option value=\"0\">Select Day</option>\r\n                      <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                      </select>\r\n                      \r\n                  </div>\r\n                <div class=\"row\">  \r\n                <div class=\"col-md-12\">\r\n                <!-- <div class=\"row\">\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>Start Time</label>\r\n                          <input formControlName=\"start_time_3\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                      </div>      \r\n                  </div>\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>End Time</label>\r\n                          <input formControlName=\"end_time_3\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                      </div>\r\n                  </div>\r\n                </div>   -->\r\n                <div class=\"row\">\r\n                  <div class=\"col-md-3\">\r\n                      <label>Start Time (HH:MM)</label><br>\r\n                        <div  style=\"display:-webkit-inline-box\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_hrs_3\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                            <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                            <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                        </div> \r\n                        <div class=\"pt-2\">\r\n                          :\r\n                        </div>\r\n                      <div class=\"text-left\">\r\n                          <div class=\"form-group\">\r\n                              <input style=\"width:68px\" formControlName=\"start_min_3\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                          </div>      \r\n                      </div>\r\n                    </div>\r\n                  </div>\r\n  \r\n                  <div class=\"col-md-4\">\r\n                    <label>End Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_hrs_3\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"end_min_3\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                  </div>\r\n                </div> \r\n                <div class=\"form-group\">\r\n                 <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                 <input formControlName=\"noofforwardinglocation_4\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_4\">      \r\n             </div>               \r\n                 \r\n             <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_4();let i = index'>\r\n               <div class=\"form-group\">\r\n                   <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,3)\">\r\n\r\n                     <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" (click)=\"setPrimaryforward(1,i,3)\" class=\"with-gap\" [value]=\"1\">\r\n                     <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day3\" name=\"PrimaryforwardType_{{i}}_day3\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,3)\" [value]=\"2\">\r\n                     <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                   </div>\r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,3) && !isPrimarySelected(2,i,3)\">\r\n                       <label  class=\"d-block\">Number:</label>\r\n                       <input type=\"text\" formControlName=\"number_{{i}}_day3\" id=\"editnumber_{{i}}_day3\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,3)\">\r\n                       <label  class=\"d-block\">IVR Menu:</label>\r\n                         <select formControlName=\"ivrMenu_{{i}}_day3\" class=\"form-control\" [value] = \"\">\r\n                             <option value=\"\">Select IVR Menu</option>\r\n                             <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                 {{data.name}}\r\n                               </option>\r\n                           </select>\r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,3)\">\r\n                         <label  class=\"d-block\">SIP (IP Address):</label>\r\n                         <input  formControlName=\"sipAdd_{{i}}_day3\" type=\"text\" class=\"form-control phone-number\">    \r\n                   </div>\r\n             </div> \r\n              </div>  \r\n              </div>  \r\n          </div>\r\n          </div>\r\n            \r\n          <!-- Day 5 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=5\">\r\n              <div >\r\n                <div class=\"form-group\">\r\n                    <label>Select Timeframe - 5</label>\r\n                    <select formControlName=\"day_4\" class=\"form-control\">\r\n                      <option value=\"0\">Select Day</option>\r\n                      <option value=\"1\">Monday to Friday</option>\r\n                      <option value=\"2\">Monday to Saturday</option>\r\n                      <option value=\"3\">Monday to Monday</option>\r\n                      <option value=\"4\">Friday to Monday</option>\r\n                      <option value=\"5\">Saturday to Monday</option>\r\n                      </select>\r\n                      \r\n                  </div>\r\n                <div class=\"row\">  \r\n                <div class=\"col-md-12\">\r\n                <!-- <div class=\"row\">\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>Start Time</label>\r\n                          <input formControlName=\"start_time_4\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                      </div>      \r\n                  </div>\r\n                  <div class=\"col-md-6\">\r\n                      <div class=\"form-group\">\r\n                          <label>End Time</label>\r\n                          <input formControlName=\"end_time_4\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                      </div>\r\n                  </div>\r\n                </div>  -->\r\n\r\n                <div class=\"row\">\r\n                  <div class=\"col-md-3\">\r\n                      <label>Start Time (HH:MM)</label><br>\r\n                        <div  style=\"display:-webkit-inline-box\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_hrs_4\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                            <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                            <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                        </div> \r\n                        <div class=\"pt-2\">\r\n                          :\r\n                        </div>\r\n                      <div class=\"text-left\">\r\n                          <div class=\"form-group\">\r\n                              <input style=\"width:68px\" formControlName=\"start_min_4\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                          </div>      \r\n                      </div>\r\n                    </div>\r\n                  </div>\r\n  \r\n                  <div class=\"col-md-4\">\r\n                    <label>End Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_hrs_4\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"end_min_4\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                  </div>\r\n                </div> \r\n                <div class=\"form-group\">\r\n                 <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n                 <input formControlName=\"noofforwardinglocation_5\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_5\">      \r\n             </div>               \r\n                 \r\n             <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_5();let i = index'>\r\n               <div class=\"form-group\">\r\n                   <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,4)\">\r\n\r\n                     <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" (click)=\"setPrimaryforward(1,i,4)\" class=\"with-gap\" [value]=\"1\">\r\n                     <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                   </div>\r\n                   <div class=\"form-check form-check-inline\">\r\n                       <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day4\" name=\"PrimaryforwardType_{{i}}_day4\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,4)\" [value]=\"2\">\r\n                     <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                   </div>\r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,4) && !isPrimarySelected(2,i,4)\">\r\n                       <label  class=\"d-block\">Number:</label>\r\n                       <input type=\"text\" formControlName=\"number_{{i}}_day4\" id=\"editnumber_{{i}}_day4\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,4)\">\r\n                       <label  class=\"d-block\">IVR Menu:</label>\r\n                         <select formControlName=\"ivrMenu_{{i}}_day4\" class=\"form-control\" [value] = \"\">\r\n                             <option value=\"\">Select IVR Menu</option>\r\n                             <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                 {{data.name}}\r\n                               </option>\r\n                           </select>  \r\n                   </div>\r\n                   <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,4)\">\r\n                         <label  class=\"d-block\">SIP (IP Address):</label>\r\n                         <input  formControlName=\"sipAdd_{{i}}_day4\" type=\"text\" class=\"form-control phone-number\">    \r\n                   </div>\r\n             </div> \r\n              </div>  \r\n              </div>  \r\n          </div>\r\n          </div>\r\n\r\n          <!-- Day 6 -->\r\n          <div class=\"groupborder\" *ngIf=\"noofforwarding>=6\">\r\n            <div >\r\n              <div class=\"form-group\">\r\n                  <label>Select Timeframe - 6</label>\r\n                  <select formControlName=\"day_5\" class=\"form-control\">\r\n                    <option value=\"0\">Select Day</option>\r\n                    <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                    </select>\r\n                    \r\n                </div>\r\n              <div class=\"row\">  \r\n              <div class=\"col-md-12\">\r\n              <!-- <div class=\"row\">\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>Start Time</label>\r\n                        <input formControlName=\"start_time_5\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                    </div>      \r\n                </div>\r\n                <div class=\"col-md-6\">\r\n                    <div class=\"form-group\">\r\n                        <label>End Time</label>\r\n                        <input formControlName=\"end_time_5\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                    </div>\r\n                </div>\r\n              </div>  -->\r\n              <div class=\"row\">\r\n                <div class=\"col-md-3\">\r\n                    <label>Start Time (HH:MM)</label><br>\r\n                      <div  style=\"display:-webkit-inline-box\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_hrs_5\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                          <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                          <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                      </div> \r\n                      <div class=\"pt-2\">\r\n                        :\r\n                      </div>\r\n                    <div class=\"text-left\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"start_min_5\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                        </div>      \r\n                    </div>\r\n                  </div>\r\n                </div>\r\n\r\n                <div class=\"col-md-4\">\r\n                  <label>End Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_hrs_5\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"end_min_5\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n                </div>\r\n              </div> \r\n              <div class=\"form-group\">\r\n               <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n               <input formControlName=\"noofforwardinglocation_6\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_6\">      \r\n           </div>               \r\n               \r\n           <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_6();let i = index'>\r\n             <div class=\"form-group\">\r\n                 <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,5)\">\r\n\r\n                   <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" (click)=\"setPrimaryforward(1,i,5)\" class=\"with-gap\" [value]=\"1\">\r\n                   <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n                 </div>\r\n                 <div class=\"form-check form-check-inline\">\r\n                     <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day5\" name=\"PrimaryforwardType_{{i}}_day5\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,5)\" [value]=\"2\">\r\n                   <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n                 </div>\r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,5) && !isPrimarySelected(2,i,5)\">\r\n                     <label  class=\"d-block\">Number:</label>\r\n                     <input type=\"text\" formControlName=\"number_{{i}}_day5\" id=\"editnumber_{{i}}_day5\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,5)\">\r\n                     <label  class=\"d-block\">IVR Menu:</label>\r\n                       <select formControlName=\"ivrMenu_{{i}}_day5\" class=\"form-control\" [value] = \"\">\r\n                           <option value=\"\">Select IVR Menu</option>\r\n                           <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                               {{data.name}}\r\n                             </option>\r\n                         </select>  \r\n                 </div>\r\n                 <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,5)\">\r\n                       <label  class=\"d-block\">SIP (IP Address):</label>\r\n                       <input  formControlName=\"sipAdd_{{i}}_day5\" type=\"text\" class=\"form-control phone-number\">    \r\n                 </div>\r\n           </div> \r\n            </div>  \r\n            </div>  \r\n        </div>\r\n        </div>\r\n\r\n        <!-- Day 7 -->\r\n        <div class=\"groupborder\" *ngIf=\"noofforwarding>=7\">\r\n          <div >\r\n            <div class=\"form-group\">\r\n                <label>Select Timeframe - 7</label>\r\n                <select formControlName=\"day_6\" class=\"form-control\">\r\n                  <option value=\"0\">Select Day</option>\r\n                  <option *ngFor=\"let item of allweekdays\" value=\"{{item.id}}\">{{item.start_day}} to {{item.end_day}}</option>\r\n                  </select>\r\n                  \r\n              </div>\r\n            <div class=\"row\">  \r\n            <div class=\"col-md-12\">\r\n            <!-- <div class=\"row\">\r\n              <div class=\"col-md-6\">\r\n                  <div class=\"form-group\">\r\n                      <label>Start Time</label>\r\n                      <input formControlName=\"start_time_6\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\" placeholder=\"Ex :00:00\">\r\n                      <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time>\r\n                  </div>      \r\n              </div>\r\n              <div class=\"col-md-6\">\r\n                  <div class=\"form-group\">\r\n                      <label>End Time</label>\r\n                      <input formControlName=\"end_time_6\" [owlDateTimeTrigger]=\"dt1\" class=\"form-control\" [owlDateTime]=\"dt1\" placeholder=\"Ex :00:00\">\r\n                      <owl-date-time [pickerType]=\"'timer'\" #dt1></owl-date-time>\r\n                  </div>\r\n              </div>\r\n            </div>  -->\r\n\r\n            <div class=\"row\">\r\n              <div class=\"col-md-3\">\r\n                  <label>Start Time (HH:MM)</label><br>\r\n                    <div  style=\"display:-webkit-inline-box\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"start_hrs_6\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">\r\n                        <!-- <input formControlName=\"start_time_0\" [owlDateTimeTrigger]=\"dt2\" class=\"form-control\" [owlDateTime]=\"dt2\">\r\n                        <owl-date-time [pickerType]=\"'timer'\" #dt2></owl-date-time> -->\r\n                    </div> \r\n                    <div class=\"pt-2\">\r\n                      :\r\n                    </div>\r\n                  <div class=\"text-left\">\r\n                      <div class=\"form-group\">\r\n                          <input style=\"width:68px\" formControlName=\"start_min_6\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                      </div>      \r\n                  </div>\r\n                </div>\r\n              </div>\r\n\r\n              <div class=\"col-md-4\">\r\n                <label>End Time (HH:MM)</label><br>\r\n                  <div  style=\"display:-webkit-inline-box\">\r\n                  <div class=\"form-group\">\r\n                      <input style=\"width:68px\" formControlName=\"end_hrs_6\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                  </div> \r\n                  <div class=\"pt-2\">\r\n                    :\r\n                  </div>\r\n                <div class=\"text-left\">\r\n                    <div class=\"form-group\">\r\n                        <input style=\"width:68px\" formControlName=\"end_min_6\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                    </div>      \r\n                </div>\r\n              </div>\r\n              </div>\r\n            </div> \r\n             \r\n            <div class=\"form-group\">\r\n             <label  class=\"d-block\">Enter Number Of Forwarding Location:</label>\r\n             <input formControlName=\"noofforwardinglocation_7\" type=\"text\" class=\"form-control phone-number\" [(ngModel)]=\"noofforwardinglocation_7\">      \r\n         </div>               \r\n             \r\n         <div class=\"groupborder\" *ngFor='let in of selectednoofforwardinglocation_7();let i = index'>\r\n           <div class=\"form-group\">\r\n               <label class=\"d-block\">Primary Forwarding Location - {{i+1}}</label>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" class=\"with-gap\" [value]='0' (click)=\"setPrimaryforward(0,i,6)\">\r\n\r\n                 <label class=\"form-check-label\" for=\"inlineradio1\">Number</label>\r\n               </div>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" (click)=\"setPrimaryforward(1,i,6)\" class=\"with-gap\" [value]=\"1\">\r\n                 <label class=\"form-check-label\" for=\"inlineradio2\">IVR Menu</label>\r\n               </div>\r\n               <div class=\"form-check form-check-inline\">\r\n                   <input type=\"radio\" formControlName=\"PrimaryforwardType_{{i}}_day6\" name=\"PrimaryforwardType_{{i}}_day6\" class=\"with-gap\" (click)=\"setPrimaryforward(2,i,6)\" [value]=\"2\">\r\n                 <label class=\"form-check-label\" for=\"inlineCheckbox3\">SIP (IP Address)</label>\r\n               </div>\r\n             </div>\r\n             <div class=\"form-group\" *ngIf=\"!isPrimarySelected(1,i,6) && !isPrimarySelected(2,i,6)\">\r\n                   <label  class=\"d-block\">Number:</label>\r\n                   <input type=\"text\" formControlName=\"number_{{i}}_day6\" id=\"editnumber_{{i}}_day4\" class=\"form-control phone-number\" placeholder=\"(000) 000-000\"  maxlength=\"16\" (keypress)=_keyPress($event)> \r\n             </div>\r\n             <div class=\"form-group\" *ngIf=\"isPrimarySelected(1,i,6)\">\r\n                   <label  class=\"d-block\">IVR Menu:</label>\r\n                     <select formControlName=\"ivrMenu_{{i}}_day6\" class=\"form-control\" [value] = \"\">\r\n                         <option value=\"\">Select IVR Menu</option>\r\n                         <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                             {{data.name}}\r\n                           </option>\r\n                       </select>  \r\n               </div>\r\n               <div class=\"form-group\" *ngIf=\"isPrimarySelected(2,i,6)\">\r\n                     <label  class=\"d-block\">SIP (IP Address):</label>\r\n                     <input  formControlName=\"sipAdd_{{i}}_day6\" type=\"text\" class=\"form-control phone-number\">    \r\n               </div>\r\n         </div> \r\n          </div>  \r\n          </div>  \r\n      </div>\r\n      </div>\r\n          \r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n           <button [disabled]=\"isName == 'fail'\" type=\"submit\" (click)=\"editcloseModal()\" class=\"btn btn-primary m-t-15 waves-effect\">Edit Target</button>\r\n           <button data-dismiss=\"modal\" class=\"btn btn-secondary m-t-15 waves-effect\">Close</button>\r\n         </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>  \r\n\r\n\r\n  <!-- Add Label Modal -->\r\n  <div class=\"modal fade\" id=\"addBuyer\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n  aria-hidden=\"true\">\r\n  <div class=\"modal-dialog model-lg\" role=\"document\">\r\n    <div class=\"modal-content\">\r\n      <div class=\"modal-header\">\r\n        <h5 class=\"modal-title\" id=\"formModal\">Create Buyer</h5>\r\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n          <span aria-hidden=\"true\">&times;</span>\r\n        </button>\r\n      </div>\r\n      <div class=\"modal-body\">\r\n        <form id=\"addLabel\" [formGroup]=\"addBuyerForm\" (ngSubmit)=\"onBuyerSubmit()\">\r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n          <div class=\"form-group\">\r\n              <label>Company</label>\r\n              <input formControlName=\"company\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': BuyerSubmitted && buyercontrol.company.errors }\">\r\n              <div *ngIf=\"BuyerSubmitted && buyercontrol.company.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"buyercontrol.company.errors.required\">Company is required</div>\r\n              </div>              \r\n           </div>\r\n  \r\n            <div class=\"form-group\">\r\n              <label  class=\"d-block\">Sub Id  :</label>\r\n              <input formControlName=\"sub_id\" type=\"text\" class=\"form-control\">           \r\n            </div>\r\n  \r\n            <div class=\"form-group\">\r\n              <label  class=\"d-block\">Allow Buyer To Pause Targets :</label>\r\n              <label class=\"custom-switch mt-2 pl-0\">\r\n                <input type=\"checkbox\" formControlName=\"allow_buyer_to_pause_target\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                <span class=\"custom-switch-indicator\"></span>                     \r\n              </label>           \r\n            </div>\r\n           \r\n            <div class=\"form-group\">\r\n              <label  class=\"d-block\">Allow Buyer To Set Target Concurrency :</label>\r\n              <label class=\"custom-switch mt-2 pl-0\">\r\n                <input type=\"checkbox\" formControlName=\"allow_buyer_to_set_target_concurrency\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                <span class=\"custom-switch-indicator\"></span>                     \r\n              </label>            \r\n            </div>\r\n           \r\n            <div class=\"form-group\">\r\n              <label  class=\"d-block\">Allow Buyer To Dispute Call Conversions :</label>\r\n              <label class=\"custom-switch mt-2 pl-0\">\r\n                <input type=\"checkbox\" formControlName=\"allow_buyer_to_dispute_call_conversions\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                <span class=\"custom-switch-indicator\"></span>                     \r\n              </label>          \r\n            </div>\r\n           \r\n            <div class=\"form-group\">\r\n              <label  class=\"d-block\">Limit Revenue : </label>\r\n              <label class=\"custom-switch mt-2 pl-0\">\r\n                <input type=\"checkbox\" formControlName=\"limit_revenue\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                <span class=\"custom-switch-indicator\"></span>                     \r\n              </label>         \r\n            </div>\r\n            \r\n           </div>       \r\n       </div>\r\n          <div class=\"modal-footer\" style=\"padding: 0;\">\r\n           <!-- !addLabelForm.valid || -->\r\n             <button (click)=\"closeBuyerModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Buyer</button>\r\n             <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n            </div>\r\n        </form>\r\n      </div>\r\n    </div>\r\n  </div>\r\n  </div>   \r\n  \r\n\r\n<div class=\"main-content\">\r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-md-12 col-md-12 col-md-lg-12\">\r\n                <form [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n                <div class=\"card\">\r\n                  <div class=\"card-header\">\r\n                    <h4>Add Target</h4>\r\n                  </div>\r\n                  <div class=\"card-body\">  \r\n                      \r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">Target Settings</legend>                \r\n                      <div class=\"form-group\">\r\n                        <label>Name</label>\r\n                        <div class=\"input-group\">\r\n                          <input formControlName=\"name\" id=\"name\" type=\"text\" class=\"form-control\"  [ngClass]=\"{ 'is-invalid': submitted && f.name.errors }\" placeholder=\"\" (input)=\"validateTargetname()\">   \r\n                          <div *ngIf=\"submitted && f.name.errors\" class=\"invalid-feedback\">\r\n                              <div *ngIf=\"f.name.errors.required\">Name is required</div>                            \r\n                          </div>                                 \r\n                          </div> \r\n                          <div *ngIf=\"isTargetName == 'success'  && isTargetName != ''\" style=\"color:green;\">\r\n                            Name Is Available\r\n                          </div> \r\n                           <div *ngIf=\"isTargetName == 'fail' && isTargetName != ''\" style=\"color:red;\">\r\n                            Name Is Not Available\r\n                          </div>   \r\n                      </div>\r\n                   \r\n                     <div class=\"form-group\">\r\n                        <label>Sub Id</label>\r\n                        <div class=\"input-group\">\r\n                          <input formControlName=\"subid\" id=\"subid\" type=\"text\" class=\"form-control\" placeholder=\"\">   \r\n                          <!-- <div *ngIf=\"submitted && f.subid.errors\" class=\"invalid-feedback\">\r\n                              <div *ngIf=\"f.subid.errors.required\">Sub Id is required</div>                            \r\n                          </div>                                            -->\r\n                          </div>  \r\n                      </div>\r\n\r\n                    <div class=\"row\">\r\n                      <div class=\"col-md-6\">\r\n                        <div class=\"form-group\">\r\n                          <label>Buyer</label>\r\n                          <!-- <select formControlName=\"buyer\" class=\"form-control\" value=\"''\">\r\n                            <option value=\"\" selected>Select Buyer</option>\r\n                            <option *ngFor=\"let buyers of allBuyers;\" [value]=\"buyers.uuid\">\r\n                                {{buyers.company}}\r\n                              </option>\r\n                          </select> -->\r\n                          <!-- <ng-select2 [data]=\"allBuyers\" [width]=\"200\">\r\n                          </ng-select2> -->\r\n                          <!-- <div *ngIf=\"submitted && f.buyer.errors\" class=\"invalid-feedback\">\r\n                            <div *ngIf=\"f.buyer.errors.required\">Buyer is required</div>                            \r\n                          </div>     -->\r\n                          <angular2-multiselect [data]=\"allBuyers\" [(ngModel)]=\"selectedItems\" formControlName=\"buyer\" [settings]=\"settings\"></angular2-multiselect>       \r\n                        </div>\r\n                      </div>\r\n                      <div class=\"col-md-2 mt-4 pt-1\">\r\n                        <button type=\"button\" data-toggle=\"modal\" data-target=\"#addBuyer\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-plus\"></i> Add New Buyer\r\n                        </button>\r\n                      </div>\r\n                    </div>\r\n\r\n                    <div class=\"row\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-2\">\r\n                           <div class=\"control-label\">{{ringtreetext}}</div>                           \r\n                           <label class=\"custom-switch mt-2 pl-0\">\r\n                             <input type=\"checkbox\" (change)=\"ringtree_toggle($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                             <span class=\"custom-switch-indicator\"></span>                     \r\n                           </label>\r\n                         </div>\r\n                      </div>                   \r\n                    </div>\r\n\r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">{{ringtreetext}}</legend>\r\n                        \r\n                       <div *ngIf=\"ringtree==false\">\r\n                       \r\n                        <div class=\"row\">\r\n                          <div class=\"col-md-5\">\r\n                            <div class=\"form-group\">\r\n                              <div class=\"control-group\">\r\n                                  <label class=\"control-label input-label\" for=\"startTime\">Type:</label>\r\n                                  <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleTypeval==0}\" (click)=\"settingToggleType(0)\"> \r\n                                        <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                                        Number\r\n                                  </label>\r\n                                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleTypeval==1}\" (click)=\"settingToggleType(1)\">\r\n                                    <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                                    IVR Menu\r\n                                  </label>    \r\n                                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleTypeval==2}\" (click)=\"settingToggleType(2)\">\r\n                                    <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option2\" [value]=\"2\">\r\n                                    SIP\r\n                                  </label>                            \r\n                                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleTypeval==2}\" (click)=\"settingToggleType(3)\">\r\n                                    <input class=\"form-check-input\" name=\"settingToggleBlockCallsIfCapped\" formControlName=\"settingToggleBlockCallsIfCapped\" type=\"radio\" id=\"option2\" [value]=\"3\">\r\n                                    Voicemail\r\n                                  </label>                            \r\n                                    </div>                \r\n                            </div>        \r\n                            </div>\r\n                          </div>\r\n                        </div>\r\n\r\n                        <div class=\"control-group mt-2\" *ngIf=\"settingToggleTypeval==0\">\r\n                            <label class=\"control-label input-label\" for=\"startTime\">Number :</label>\r\n                            <input type=\"text\" formControlName=\"number\" class=\"form-control\" type=\"text\" placeholder=\"Enter Number\" [ngClass]=\"{ 'is-invalid': submitted && f.number.errors }\" />   \r\n                            <div *ngIf=\"submitted && f.number.errors\" class=\"invalid-feedback\">\r\n                              <div *ngIf=\"f.number.errors.required\">Number is required</div>                            \r\n                            </div>                    \r\n                        </div>\r\n                      <div *ngIf=\"settingToggleTypeval==1\">\r\n                          <div class=\"control-group mt-2\">\r\n                              <label class=\"control-label input-label\" for=\"startTime\">Select IVR Menu:</label>\r\n                              <!-- <select formControlName=\"ivrMenu\" class=\"form-control\" [value] =\"\"> -->\r\n                                <!-- <option value=\"\">Select IVR Menu</option>\r\n                                <option *ngFor=\"let data of ivrmenus;\" [value]=\"data.uuid\">\r\n                                    {{data.name}}\r\n                                  </option> -->\r\n\r\n                                <angular2-multiselect [data]=\"ivrmenus\" [(ngModel)]=\"forwardto_ivrrouting_10\"  formControlName=\"ivrMenu\" [settings]=\r\n                                \"{enableSearchFilter: true,showCheckbox:false,singleSelection: true, text:'Select IVR '}\"></angular2-multiselect>\r\n                                <a *ngIf=\"forwardto_ivrrouting_10\" target=\"_blank\" routerLink=\"/edit-ivr/{{forwardto_ivrrouting_10[0].uuid}}\" style=\"color: #3abaf4;\">Go To IVR Edit</a>\r\n                                <!-- </select> -->\r\n                          </div>                      \r\n                      </div>\r\n                      <div *ngIf=\"settingToggleTypeval==2\">\r\n                          <div class=\"control-group mt-2\">\r\n                              <label class=\"control-label input-label\" for=\"startTime\">SIP (IP Address):</label>\r\n                              <input type=\"text\" formControlName=\"sip_address\" class=\"form-control\" type=\"text\" [ngClass]=\"{ 'is-invalid': submitted && f.sip_address.errors }\"/>  \r\n                              <div *ngIf=\"submitted && f.sip_address.errors\" class=\"invalid-feedback\">\r\n                                <div *ngIf=\"f.sip_address.errors.required\">SIP Address is required</div>                            \r\n                              </div>                       \r\n                          </div>                      \r\n                      </div>\r\n                      <div class=\"control-group mt-2\" *ngIf=\"settingToggleTypeval==3\">\r\n                          <label class=\"control-label input-label\" for=\"startTime\">Voicemail :</label>\r\n                          <input type=\"text\" formControlName=\"voice_mail\" class=\"form-control\" type=\"text\" placeholder=\"Enter Voicemail\" [ngClass]=\"{ 'is-invalid': submitted && f.voice_mail.errors }\" />   \r\n                          <div *ngIf=\"submitted && f.voice_mail.errors\" class=\"invalid-feedback\">\r\n                            <div *ngIf=\"f.voice_mail.errors.required\">Voicemail is required</div>                            \r\n                          </div>                    \r\n                      </div>\r\n                      \r\n                      </div>\r\n\r\n\r\n                      <div *ngIf=\"ringtree==true\">\r\n                        \r\n                        <div class=\"row\">\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"control-group mt-2\">\r\n                               <div class=\"control-label\">URL</div>                           \r\n                             </div>\r\n                          </div>\r\n                          <div class=\"col-md-5 mt-4\">\r\n                             <div class=\"form-group\">\r\n                               <input formControlName=\"url\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                             </div>                           \r\n                          </div>\r\n                        </div>\r\n                       \r\n                        <div class=\"row\">\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"control-group mt-4\">\r\n                               <div class=\"control-label\">HTTP Method</div>                           \r\n                             </div>\r\n                          </div>\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"form-group mt-2\">\r\n                              <select formControlName=\"http_method\" name=\"http_method\" id=\"http_method\" class=\"form-control\" (change)=\"methodtype($event)\">\r\n                                <option value=\"0\">GET</option>                               \r\n                                <option value=\"1\">POST</option>                               \r\n                                <option value=\"2\">PUT</option>                               \r\n                                <option value=\"3\">PATCH</option>                               \r\n                                <option value=\"4\">DELETE</option>                               \r\n                              </select>      \r\n                             </div>                           \r\n                          </div>\r\n                        </div>\r\n                      \r\n                        <div class=\"row\" *ngIf=\"methodtypeval != 0 && methodtypeval != 4\">\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"control-group mt-4\">\r\n                               <div class=\"control-label\">Content Type</div>                           \r\n                             </div>\r\n                          </div>\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"form-group mt-2\">\r\n                              <select formControlName=\"content_type\" name=\"content_type\" id=\"content_type\" class=\"form-control\">\r\n                                <option value=\"0\">application/json</option>                               \r\n                                <option value=\"1\">application/xml</option>                               \r\n                                <option value=\"2\">application/x-www-form-urlencoded</option>                               \r\n                                <option value=\"3\">plain/text</option>                               \r\n                              </select>      \r\n                             </div>                           \r\n                          </div>\r\n                        </div>\r\n                     \r\n                        <div class=\"row\" *ngIf=\"methodtypeval != 0 && methodtypeval != 4\">\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"control-group mt-4\">\r\n                               <div class=\"control-label\">Body</div>                           \r\n                             </div>\r\n                          </div>\r\n                          <div class=\"col-md-5\">\r\n                             <div class=\"form-group mt-2\">\r\n                              <textarea formControlName=\"body\" cols=\"30\" rows=\"10\" class=\"form-control\"></textarea>\r\n                             </div>                           \r\n                          </div>\r\n                        </div>\r\n\r\n\r\n                        <div class=\"row\">\r\n                          <div class=\"col-md-2\">\r\n                             <div class=\"control-group mt-2\">\r\n                               <div class=\"control-label\">HTTP Headers</div>                           \r\n                             </div>\r\n                          </div>\r\n                          <div class=\"col-md-2 mt-4\">\r\n                             <div class=\"form-group\">\r\n                               <input formControlName=\"http_headers_name\" type=\"text\" class=\"form-control formcontrol\" placeholder=\"Header Name\" id=\"\"> \r\n                             </div>                           \r\n                          </div>\r\n                          <div class=\"mt-2\">:</div>\r\n                          <div class=\"col-md-2 mt-4 text-left\">\r\n                             <div class=\"form-group\">\r\n                               <input formControlName=\"http_headers_value\" type=\"text\" class=\"form-control formcontrol\" placeholder=\" Value\"  id=\"\">\r\n                             </div>                           \r\n                          </div>\r\n                        </div>\r\n\r\n                        <div *ngFor=\"let keywords of addkeyword; let i = index;\">  \r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-2\">\r\n                              <div class=\"control-group mt-2\">\r\n                                <div class=\"control-label\">Keyword {{i+1}}</div>                           \r\n                              </div>\r\n                            </div>\r\n                            <div class=\"col-md-5 mt-4\">\r\n                              <div class=\"form-group\">\r\n                                <input formControlName=\"keyword{{i}}\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                              </div>                           \r\n                            </div>\r\n                            <div class=\"col-md-1\" *ngIf=\"i+1 == addkeyword.length && addkeyword.length!=3\">\r\n                              <input type=\"button\" value=\"+\" class=\"btn btn-info btn-sm\" (click)=\"addRow(i+1)\">\r\n                            </div>\r\n                            <div class=\"col-md-1\" *ngIf=\"i+1 == addkeyword.length && addkeyword.length>=2\">\r\n                              <input type=\"button\" value=\"-\" class=\"btn btn-danger btn-sm\" (click)=\"removeRow(i)\">\r\n                            </div>\r\n                          </div>\r\n                        </div>\r\n                       \r\n\r\n                      </div>\r\n\r\n                  </fieldset>\r\n                 \r\n                  </fieldset>\r\n\r\n                  <fieldset class=\"scheduler-border\">\r\n                  <legend class=\"scheduler-border\">Hours</legend>\r\n                  <div class=\"row\">\r\n                    <div class=\"col-md-6\">\r\n                     <div class=\"control-group mt-2\">\r\n                      <label>Hours of Operation   </label>\r\n                       <select formControlName=\"hoursofoperation_start\" name=\"hoursofoperation_start\" id=\"hoursofoperation_start\" class=\"form-control\" [value]=\"''\">\r\n                         <option value=\"\">Select Start Day</option>\r\n                         <option value=\"Monday\">Monday</option>\r\n                         <option value=\"Tuesday\">Tuesday</option>\r\n                         <option value=\"Wednesday\">Wednesday</option>\r\n                         <option value=\"Thursday\">Thursday</option>\r\n                         <option value=\"Friday\">Friday</option>\r\n                         <option value=\"Saturday\">Saturday</option>\r\n                         <option value=\"Sunday\">Sunday</option>\r\n                       </select>                         \r\n                    </div>\r\n                    </div>\r\n                    <div class=\"col-md-5\">\r\n                     <div class=\"control-group mt-4 pt-2\">\r\n                       <select formControlName=\"hoursofoperation_end\" name=\"hoursofoperation_end\" id=\"hoursofoperation_end\" class=\"form-control\" [value]=\"''\">\r\n                         <option value=\"\">Select End Day</option>\r\n                         <option value=\"Monday\">Monday</option>\r\n                         <option value=\"Tuesday\">Tuesday</option>\r\n                         <option value=\"Wednesday\">Wednesday</option>\r\n                         <option value=\"Thursday\">Thursday</option>\r\n                         <option value=\"Friday\">Friday</option>\r\n                         <option value=\"Saturday\">Saturday</option>\r\n                         <option value=\"Sunday\">Sunday</option>\r\n                       </select>                           \r\n                    </div>\r\n                    </div>\r\n\r\n                  </div>\r\n\r\n                  <div class=\"row mt-2\">\r\n                    <div class=\"col-md-3\">\r\n                        <label>Opening Time (HH:MM)</label><br>\r\n                          <div  style=\"display:-webkit-inline-box\">\r\n                          <div class=\"form-group\">\r\n                              <input style=\"width:68px\" formControlName=\"start_hrs\" (change)=\"getTimeonehrs($event)\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                          </div> \r\n                          <div class=\"pt-2\">\r\n                            :\r\n                          </div>\r\n                        <div class=\"text-left\">\r\n                            <div class=\"form-group\">\r\n                                <input style=\"width:68px\" formControlName=\"start_min\" (change)=\"getTimeonemin($event)\"  type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                            </div>      \r\n                        </div>\r\n                      </div> <br>\r\n                      <span style=\"color: #8080ff;\">Note: Please use 24 hours format</span>\r\n                    </div>\r\n                    \r\n    \r\n                    <div class=\"col-md-3\">\r\n                      <label>Closing Time (HH:MM)</label><br>\r\n                        <div  style=\"display:-webkit-inline-box\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"end_hrs\" (change)=\"getTimetwohrs($event)\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                        </div> \r\n                        <div class=\"pt-2\">\r\n                          :\r\n                        </div>\r\n                      <div class=\"text-left\">\r\n                          <div class=\"form-group\">\r\n                              <input style=\"width:68px\" formControlName=\"end_min\" (change)=\"getTimetwomin($event)\"  type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                          </div>      \r\n                      </div>\r\n                    </div>\r\n                    </div>\r\n\r\n                    <div class=\"col-md-5\"><br>\r\n                      <select formControlName=\"timezone\" class=\"form-control\" [value]=\"\">\r\n                        <option value=\"\">Select Timezone</option>                            \r\n                        <option value=\"{{item.id}}\" *ngFor=\"let item of alltimezone\">{{item.gmtzone}}</option>                            \r\n                      </select>   \r\n                    </div>\r\n\r\n                    <div class=\"col-md-1\"><br><br>\r\n                      <input type=\"button\" (click)=\"addremoverow(0)\" value=\"+\" class=\"btn btn-info btn-sm\" *ngIf=\"isadded==0\">\r\n                    </div>\r\n                  </div> \r\n\r\n                  <div *ngIf=\"isadded==1\">\r\n                    <hr style=\"border-bottom: 1px solid #979DA6;\">\r\n                  <div class=\"row\">\r\n                    <div class=\"col-md-6\">\r\n                     <div class=\"control-group mt-2\">\r\n                      <label>Hours of Operation   </label>\r\n                       <select formControlName=\"hoursofoperation_start_1\" name=\"hoursofoperation_start_1\" id=\"hoursofoperation_start_1\" class=\"form-control\" [value]=\"''\">\r\n                         <option value=\"\">Select Start Day</option>\r\n                         <option value=\"Monday\">Monday</option>\r\n                         <option value=\"Tuesday\">Tuesday</option>\r\n                         <option value=\"Wednesday\">Wednesday</option>\r\n                         <option value=\"Thursday\">Thursday</option>\r\n                         <option value=\"Friday\">Friday</option>\r\n                         <option value=\"Saturday\">Saturday</option>\r\n                         <option value=\"Sunday\">Sunday</option>\r\n                       </select>                         \r\n                    </div>\r\n                    </div>\r\n                    <div class=\"col-md-5\">\r\n                     <div class=\"control-group mt-4 pt-2\">\r\n                       <select formControlName=\"hoursofoperation_end_1\" name=\"hoursofoperation_end_1\" id=\"hoursofoperation_end_1\" class=\"form-control\" [value]=\"''\">\r\n                         <option value=\"\">Select End Day</option>\r\n                         <option value=\"Monday\">Monday</option>\r\n                         <option value=\"Tuesday\">Tuesday</option>\r\n                         <option value=\"Wednesday\">Wednesday</option>\r\n                         <option value=\"Thursday\">Thursday</option>\r\n                         <option value=\"Friday\">Friday</option>\r\n                         <option value=\"Saturday\">Saturday</option>\r\n                         <option value=\"Sunday\">Sunday</option>\r\n                       </select>                           \r\n                    </div>\r\n                    </div>\r\n\r\n                  </div>\r\n\r\n                  <div class=\"row mt-2\" >\r\n                    <div class=\"col-md-3\">\r\n                        <label>Opening Time (HH:MM)</label><br>\r\n                          <div  style=\"display:-webkit-inline-box\">\r\n                          <div class=\"form-group\">\r\n                              <input style=\"width:68px\" formControlName=\"start_hrs_1\" (change)=\"getTimetwohrs1($event)\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                          </div> \r\n                          <div class=\"pt-2\">\r\n                            :\r\n                          </div>\r\n                        <div class=\"text-left\">\r\n                            <div class=\"form-group\">\r\n                                <input style=\"width:68px\" formControlName=\"start_min_1\"  (change)=\"getTimetwomin1($event)\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                            </div>      \r\n                        </div>\r\n                      </div>\r\n                    </div>\r\n    \r\n                    <div class=\"col-md-3\">\r\n                      <label>Closing Time (HH:MM)</label><br>\r\n                        <div  style=\"display:-webkit-inline-box\">\r\n                        <div class=\"form-group\">\r\n                            <input style=\"width:68px\" formControlName=\"end_hrs_1\" (change)=\"getTimetwohrs2($event)\" type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                        </div> \r\n                        <div class=\"pt-2\">\r\n                          :\r\n                        </div>\r\n                      <div class=\"text-left\">\r\n                          <div class=\"form-group\">\r\n                              <input style=\"width:68px\" formControlName=\"end_min_1\"  (change)=\"getTimetwomin2($event)\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                          </div>      \r\n                      </div>\r\n                    </div>\r\n                    </div>\r\n\r\n                    <div class=\"col-md-5\"><br>\r\n                      <select formControlName=\"timezone1\" class=\"form-control\" [value]=\"\">\r\n                        <option value=\"\">Select Timezone</option>                            \r\n                        <option value=\"{{item.id}}\" *ngFor=\"let item of alltimezone\">{{item.gmtzone}}</option>                            \r\n                      </select>   \r\n                    </div>\r\n\r\n                    <div class=\"col-md-1\"><br><br>\r\n                      <input type=\"button\" (click)=\"addremoverow(1)\" value=\"-\" class=\"btn btn-danger btn-sm\">\r\n                    </div>\r\n                  </div> \r\n                  </div>\r\n                  </fieldset>\r\n\r\n                  \r\n                  <fieldset class=\"scheduler-border\">\r\n                    <legend class=\"scheduler-border\">DTMF Settings</legend>\r\n                    <div class=\"row\">\r\n                     <div class=\"col-md-2\">\r\n                        <div class=\"control-group mt-2\">\r\n                          <div class=\"control-label\">DTMF Auto</div>\r\n                        </div>\r\n                     </div>\r\n                     <div class=\"col-md-2\">\r\n                      <label class=\"custom-switch mt-2 pl-0\">\r\n                        <input type=\"checkbox\" (change)=\"dtmf_auto_toggle($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                        <span class=\"custom-switch-indicator\"></span>                     \r\n                      </label>    \r\n                     </div>\r\n                   </div>\r\n                \r\n                   <div class=\"row mt-2\" *ngIf=\"dtmf_auto==true\">\r\n                     <div class=\"col-md-2\">\r\n                        <div class=\"control-group mt-3\">\r\n                          <div class=\"control-label\">DTMF Value</div>                         \r\n                        </div>\r\n                     </div>\r\n                     <div class=\"col-md-2 mt-4\">\r\n                       <div class=\"form-group\">\r\n                        <!-- <span class=\"currency currency-with-toggle ng-scope\">$</span> -->\r\n                        <input formControlName=\"dtmf_value\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                      </div>          \r\n                     </div>\r\n                   </div>\r\n               \r\n                   <div class=\"row mt-2\" *ngIf=\"dtmf_auto==true\">\r\n                     <div class=\"col-md-2\">\r\n                        <div class=\"control-group mt-3\">\r\n                          <div class=\"control-label\">DTMF Interval (Seconds)</div>                         \r\n                        </div>\r\n                     </div>\r\n                     <div class=\"col-md-2 mt-4\">\r\n                       <div class=\"form-group\">\r\n                        <input formControlName=\"dtmf_interval\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                      </div>          \r\n                     </div>\r\n                   </div>                   \r\n                  \r\n                   <div class=\"row mt-2\" *ngIf=\"dtmf_auto==true\">\r\n                     <div class=\"col-md-2\">\r\n                        <div class=\"control-group mt-3\">\r\n                          <div class=\"control-label\">DTMF Percentage</div>                         \r\n                        </div>\r\n                     </div>\r\n                     <div class=\"col-md-2\">\r\n                       <div class=\"form-group\">\r\n                        <select formControlName=\"dtmf_percent\" class=\"form-control\">\r\n                          <!-- <option value=\"1\">10%</option>\r\n                          <option value=\"3\">25%</option>\r\n                          <option value=\"5\">50%</option>\r\n                          <option value=\"10\">100%</option> -->\r\n                          <option value=\"1\">10%</option>\r\n                          <option value=\"2\">20%</option>\r\n                          <option value=\"3\">30%</option>\r\n                          <option value=\"4\">40%</option>\r\n                          <option value=\"5\">50%</option>\r\n                          <option value=\"6\">60%</option>\r\n                          <option value=\"7\">70%</option>\r\n                          <option value=\"8\">80%</option>\r\n                          <option value=\"9\">90%</option>\r\n                          <option value=\"10\">100%</option>\r\n                        </select>\r\n                      </div>          \r\n                     </div>\r\n                   </div>       \r\n                   \r\n                   <div class=\"row mt-2\" *ngIf=\"dtmf_auto==true\">\r\n                    <div class=\"col-md-2\">\r\n                       <div class=\"control-group mt-3\">\r\n                         <div class=\"control-label\">Identify zipcode</div>                         \r\n                       </div>\r\n                    </div>\r\n                    <div class=\"col-md-2\">\r\n                      <label class=\"custom-switch mt-2 pl-0\">\r\n                        <input type=\"checkbox\" (change)=\"dtmf_zipcode_enable_toggle($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                        <span class=\"custom-switch-indicator\"></span>                     \r\n                      </label>    \r\n                     </div>\r\n                  </div>\r\n\r\n                  </fieldset>\r\n\r\n           \r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">Cap Settings</legend>\r\n                      <div class=\"control-group mt-2\">\r\n                        <label>Cap On</label>\r\n                        <select formControlName=\"capon\" name=\"capon\" id=\"capon\" class=\"form-control\" [value]=\"0\">\r\n                          <option value=\"0\">Conversion</option>\r\n                          <option value=\"1\">Connection</option>\r\n                          <option value=\"2\">Revenue</option>\r\n                        </select>                              \r\n                     </div>\r\n\r\n                     <div class=\"row\" *ngIf=\"this.addForm.get('capon').value!=2\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-2\">\r\n                           <div class=\"control-label\">Global Cap</div>\r\n                           <label class=\"custom-switch mt-2 pl-0\">\r\n                             <input type=\"checkbox\" [checked]=\"globalcap==true\" (change)=\"global_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                             <span class=\"custom-switch-indicator\"></span>                     \r\n                           </label>\r\n                         </div>\r\n                      </div>\r\n                      <div class=\"col-md-2 mt-4\">\r\n                         <div class=\"form-group\" *ngIf=\"globalcap==true\">\r\n                           <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                           <input formControlName=\"global_capvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                         </div>\r\n                         <div class=\"form-group mt-2\" *ngIf=\"globalcap!=true\">\r\n                           <span>None</span>\r\n                         </div>\r\n                      </div>\r\n                    </div>\r\n                  \r\n                    <div class=\"row\" *ngIf=\"this.addForm.get('capon').value==2\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-2\">\r\n                           <div class=\"control-label\">Global Revenue Cap</div>\r\n                           <label class=\"custom-switch mt-2 pl-0\">\r\n                             <input type=\"checkbox\" [checked]=\"global_revenuecap==true\" (change)=\"global_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                             <span class=\"custom-switch-indicator\"></span>                     \r\n                           </label>\r\n                         </div>\r\n                      </div>\r\n                      <div class=\"col-md-2 mt-4\">\r\n                         <div class=\"form-group\" *ngIf=\"global_revenuecap==true\">\r\n                           <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                           <input formControlName=\"global_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                         </div>\r\n                         <div class=\"form-group mt-2\" *ngIf=\"global_revenuecap!=true\">\r\n                           <span>None</span>\r\n                         </div>\r\n                      </div>\r\n                    </div>\r\n                 \r\n                    <div class=\"row\" *ngIf=\"this.addForm.get('capon').value==2\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-2\">\r\n                           <div class=\"control-label\" >Monthly Revenue Cap</div>\r\n                           <label class=\"custom-switch mt-2 pl-0\">\r\n                             <input type=\"checkbox\" [checked]=\"monthly_revenuecap==true\" (change)=\"monthly_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                             <span class=\"custom-switch-indicator\"></span>                     \r\n                           </label>\r\n                         </div>\r\n                      </div>\r\n                      <div class=\"col-md-2 mt-4\">\r\n                         <div class=\"form-group\" *ngIf=\"monthly_revenuecap==true\">\r\n                           <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                           <input formControlName=\"monthly_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                         </div>\r\n                         <div class=\"form-group mt-2\" *ngIf=\"monthly_revenuecap!=true\">\r\n                           <span>None</span>\r\n                         </div>\r\n                      </div>\r\n                    </div>\r\n                \r\n                    <div class=\"row\" *ngIf=\"this.addForm.get('capon').value!=2\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-2\">\r\n                           <div class=\"control-label\" >Monthly Cap</div>\r\n                           <label class=\"custom-switch mt-2 pl-0\">\r\n                             <input type=\"checkbox\" [checked]=\"monthlycap==true\" (change)=\"monthly_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                             <span class=\"custom-switch-indicator\"></span>                     \r\n                           </label>\r\n                         </div>\r\n                      </div>\r\n                      <div class=\"col-md-2 mt-4\">\r\n                         <div class=\"form-group\" *ngIf=\"monthlycap==true\">\r\n                           <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                           <input formControlName=\"monthly_capvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                         </div>\r\n                         <div class=\"form-group mt-2\" *ngIf=\"monthlycap!=true\">\r\n                           <span>None</span>\r\n                         </div>\r\n                      </div>\r\n                    </div>\r\n                    \r\n                    <div class=\"row\" *ngIf=\"this.addForm.get('capon').value==2\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-2\">\r\n                           <div class=\"control-label\" >Daily Revenue Cap</div>\r\n                           <label class=\"custom-switch mt-2 pl-0\">\r\n                             <input type=\"checkbox\" [checked]=\"daily_revenuecap==true\" (change)=\"daily_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                             <span class=\"custom-switch-indicator\"></span>                     \r\n                           </label>\r\n                         </div>\r\n                      </div>\r\n                      <div class=\"col-md-2 mt-4\">\r\n                         <div class=\"form-group\" *ngIf=\"daily_revenuecap==true\">\r\n                           <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                           <input formControlName=\"daily_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                         </div>\r\n                         <div class=\"form-group mt-2\" *ngIf=\"daily_revenuecap!=true\">\r\n                           <span>None</span>\r\n                         </div>\r\n                      </div>\r\n                    </div>\r\n                  \r\n                    <div class=\"row\" *ngIf=\"this.addForm.get('capon').value!=2\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-2\">\r\n                           <div class=\"control-label\" >Daily Cap</div>\r\n                           <label class=\"custom-switch mt-2 pl-0\">\r\n                             <input type=\"checkbox\" [checked]=\"dailycap==true\" (change)=\"daily_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                             <span class=\"custom-switch-indicator\"></span>                     \r\n                           </label>\r\n                         </div>\r\n                      </div>\r\n                      <div class=\"col-md-2 mt-4\">\r\n                         <div class=\"form-group\" *ngIf=\"dailycap==true\">\r\n                           <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                           <input formControlName=\"daily_capvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                         </div>\r\n                         <div class=\"form-group mt-2\" *ngIf=\"dailycap!=true\">\r\n                           <span>None</span>\r\n                         </div>\r\n                      </div>\r\n                    </div>\r\n                  \r\n                    <div class=\"row\" *ngIf=\"this.addForm.get('capon').value==2\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-2\">\r\n                           <div class=\"control-label\">Hourly Revenue Cap</div>\r\n                           <label class=\"custom-switch mt-2 pl-0\">\r\n                             <input type=\"checkbox\" [checked]=\"hourly_revenuecap==true\"  (change)=\"hourly_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                             <span class=\"custom-switch-indicator\"></span>                     \r\n                           </label>\r\n                         </div>\r\n                      </div>\r\n                      <div class=\"col-md-2 mt-4\">\r\n                         <div class=\"form-group\" *ngIf=\"hourly_revenuecap==true\">\r\n                           <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                           <input formControlName=\"hourly_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                         </div>\r\n                         <div class=\"form-group mt-2\" *ngIf=\"hourly_revenuecap!=true\">\r\n                           <span>None</span>\r\n                         </div>\r\n                      </div>\r\n                    </div>\r\n\r\n                    <div class=\"row\" *ngIf=\"this.addForm.get('capon').value!=2\">\r\n                      <div class=\"col-md-2\">\r\n                         <div class=\"control-group mt-2\">\r\n                           <div class=\"control-label\">Hourly Cap</div>\r\n                           <label class=\"custom-switch mt-2 pl-0\">\r\n                             <input type=\"checkbox\" [checked]=\"hourlycap==true\"  (change)=\"hourly_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                             <span class=\"custom-switch-indicator\"></span>                     \r\n                           </label>\r\n                         </div>\r\n                      </div>\r\n                      <div class=\"col-md-2 mt-4\">\r\n                         <div class=\"form-group\" *ngIf=\"hourlycap==true\">\r\n                           <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                           <input formControlName=\"hourly_capvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                         </div>\r\n                         <div class=\"form-group mt-2\" *ngIf=\"hourlycap!=true\">\r\n                           <span>None</span>\r\n                         </div>\r\n                      </div>\r\n                    </div>\r\n                   \r\n                    \r\n                     <!-- <div class=\"row\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\">Global Revenue Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" (change)=\"global_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"global_revenuecap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"global_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"global_revenuecap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                  \r\n                     <div class=\"row\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\">Monthly Revenue Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" (change)=\"monthly_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"monthly_revenuecap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"monthly_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"monthly_revenuecap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                     \r\n                     <div class=\"row\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\">Daily Revenue Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" (change)=\"daily_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"daily_revenuecap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"daily_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"daily_revenuecap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                   \r\n                     <div class=\"row\">\r\n                       <div class=\"col-md-2\">\r\n                          <div class=\"control-group mt-2\">\r\n                            <div class=\"control-label\">Hourly Revenue Cap</div>\r\n                            <label class=\"custom-switch mt-2 pl-0\">\r\n                              <input type=\"checkbox\" (change)=\"hourly_revenue_cap($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                              <span class=\"custom-switch-indicator\"></span>                     \r\n                            </label>\r\n                          </div>\r\n                       </div>\r\n                       <div class=\"col-md-2 mt-4\">\r\n                          <div class=\"form-group\" *ngIf=\"hourly_revenuecap==true\">\r\n                            <span class=\"currency currency-with-toggle ng-scope\">$</span>\r\n                            <input formControlName=\"hourly_revenuecapvalue\" type=\"text\" class=\"form-control formcontrol\" id=\"\">\r\n                          </div>\r\n                          <div class=\"form-group mt-2\" *ngIf=\"hourly_revenuecap!=true\">\r\n                            <span>None</span>\r\n                          </div>\r\n                       </div>\r\n                     </div>\r\n                     -->\r\n                    </fieldset>\r\n\r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">Concurrency Settings</legend>\r\n\r\n                      <div class=\"row\">\r\n                        <div class=\"col-md-2\">\r\n                           <div class=\"control-group mt-2\">\r\n                             <div class=\"control-label\">Max Concurrency</div>\r\n                             <label class=\"custom-switch mt-2 pl-0\">\r\n                               <input type=\"checkbox\" (change)=\"get_maxcon($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                               <span class=\"custom-switch-indicator\"></span>                     \r\n                             </label>\r\n                           </div>\r\n                        </div>\r\n                        <div class=\"col-md-2 mt-4\">\r\n                           <div class=\"form-group\" *ngIf=\"maxconcurrency==true\">\r\n                             <input formControlName=\"maxconvalue\" type=\"text\" class=\"form-control formcontrolwithouticon\" id=\"\">\r\n                           </div>\r\n                           <div class=\"form-group mt-2\" *ngIf=\"maxconcurrency!=true\">\r\n                             <span>None</span>\r\n                           </div>\r\n                        </div>\r\n                      </div>\r\n                    </fieldset>\r\n                 \r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">Restrict Duplicate Calls Settings</legend>\r\n\r\n                      <div class=\"control-group mt-2\">\r\n                        <label>Restrict Duplicate</label>\r\n                        <select #restrictdup formControlName=\"restrictdup\" name=\"restrictdup\" id=\"restrictdup\" class=\"form-control\">\r\n                          <option value=\"0\">Buyer Settings (Do not Restrict)</option>\r\n                          <option value=\"1\">Do not Restrict</option>\r\n                          <option value=\"2\">By Campaign - Individual Target</option>\r\n                        </select>                              \r\n                     </div>\r\n                     <div *ngIf=\"restrictdup.value==2\">\r\n                     <div class=\"control-group mt-2\">\r\n                        <label>Restrict After</label>\r\n                        <select formControlName=\"restrictafter\" name=\"restrictafter\" id=\"restrictafter\" class=\"form-control\">\r\n                          <option value=\"0\">Converted</option>\r\n                          <option value=\"1\">Connected</option>                          \r\n                        </select>                              \r\n                     </div>\r\n\r\n                      <div class=\"control-group\">\r\n                          <label class=\"control-label input-label\" for=\"startTime\">Duration:</label>\r\n                          <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                          <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleDurationvalue==0}\" (click)=\"settingToggleDuration(0)\"> \r\n                                <input class=\"form-check-input\" name=\"settingToggleDuration\" formControlName=\"settingToggleDuration\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                                Always\r\n                          </label>\r\n                          <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleDurationvalue==1}\" (click)=\"settingToggleDuration(1)\">\r\n                            <input class=\"form-check-input\" name=\"settingToggleDuration\" formControlName=\"settingToggleDuration\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                            Time Limit\r\n                          </label>                              \r\n                            </div>                \r\n                     </div>                       \r\n                      <br>\r\n                      <div class=\"control-group row mt-2\" *ngIf=\"this.addForm.get('settingToggleDurationval').value==1\">\r\n                        <div class=\"col-md-1 mt-2\"><input  formControlName=\"days\" style=\"width: 80px;\" type=\"number\"  class=\"form-control formcontrol\" name=\"\" id=\"\"></div>\r\n                        <div class=\"col-md-1\"><span>Days</span></div>                           \r\n                      </div>\r\n                      </div>\r\n                    </fieldset>\r\n                   \r\n                    <fieldset class=\"scheduler-border\">\r\n                      <legend class=\"scheduler-border\">Tag Routing Filters</legend>\r\n                      <div class=\"row\" *ngIf=\"isfilter==0\">\r\n                        <div class=\"col-md-2 mt-2\">\r\n                          <input type=\"button\" (click)=\"isfilterselect()\" value=\"+ ADD FILTER\" class=\"btn btn-primary btn-sm\">\r\n                        </div>                       \r\n                      </div>\r\n                      <div class=\"row\" *ngIf=\"isfilter==1\">\r\n                        <div class=\"col-md-2 mt-2\">\r\n                          <label for=\"\">Select City/State</label>\r\n                          <select formControlName=\"citystatetype\" class=\"form-control\">\r\n                            <option value=\"0\">City</option>                            \r\n                            <option value=\"1\">States</option>                            \r\n                          </select>     \r\n                        </div> \r\n                        <div class=\"col-md-2 mt-2\">\r\n                          <label for=\"\">Select Is Contains?</label>\r\n                          <select [value]=\"0\" formControlName=\"iscontains\" (change)=\"changetype($event)\" class=\"form-control\">\r\n                            <option value=\"0\">Contains</option>                            \r\n                            <option value=\"1\">Not Contains</option>                            \r\n                          </select>     \r\n                        </div> \r\n                        <div class=\"col-md-2 mt-2\" >\r\n                        <!-- <div class=\"col-md-2 mt-2\" *ngIf=\"this.addForm.get('citystatetype').value==0\"> -->\r\n                          <label for=\"\">Select State</label>\r\n                          <angular2-multiselect *ngIf=\"this.addForm.get('citystatetype').value==1\" [data]=\"allcitystate\" formControlName=\"citystate\" [settings]=\"citystatedropdownSettings\" ></angular2-multiselect>\r\n                          \r\n                          <select *ngIf=\"this.addForm.get('citystatetype').value==0\" formControlName=\"citystate\" (change)='getdata()' class=\"form-control\" [value]=\"\">\r\n                            <option value=\"\">Select State</option>                            \r\n                            <option value=\"{{item.id}}\" *ngFor=\"let item of allcitystate\">{{item.text}}</option>                            \r\n                          </select>                         \r\n                        </div>   \r\n                          <div class=\"col-md-6 mt-2\" *ngIf=\"this.addForm.get('citystatetype').value==0\">\r\n                          <label for=\"\">Select City</label>\r\n                          <!-- <label for=\"\" *ngIf=\"this.addForm.get('citystate').value==1\">Select State</label> -->\r\n                          <!-- <select formControlName=\"citystate\" class=\"form-control\" [value]=\"0\">\r\n                            <option value=\"0\">City</option>                            \r\n                            <option value=\"1\">States</option>                            \r\n                          </select>      -->\r\n                          <angular2-multiselect [data]=\"allcity\" formControlName=\"cityval\" [settings]=\"citydropdownSettings\" ></angular2-multiselect>\r\n                          </div>\r\n                        <div class=\"col-md-2 mt-4 pt-3\">\r\n                          <input type=\"button\" (click)=\"isfilterclear()\" value=\"Clear\" class=\"btn btn-danger\">\r\n                        </div>                    \r\n                      </div>\r\n                    </fieldset>\r\n               \r\n                  </div>\r\n                  <div class=\"card-footer text-right\">\r\n                        <button [disabled]=\"isTargetName == 'fail'\"  class=\"btn btn-primary mr-1\" type=\"submit\">Create Target</button>\r\n                        <button style=\"margin-right: 4px;\" routerLink=\"/target\" class=\"btn btn-primary\">Back To Targets</button>\r\n                        <button (click)=\"onReset()\" class=\"btn btn-secondary\" type=\"reset\">Reset</button>\r\n                      </div>\r\n                </div>\r\n              </form>\r\n\r\n    </div>\r\n");

/***/ }),

/***/ "i61R":
/*!******************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/verification-management/verification-management.component.html ***!
  \******************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n    \r\n    <!-- Add Mail Modal -->\r\n    <div class=\"modal  fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n     aria-hidden=\"true\">\r\n     <div class=\"modal-dialog\" role=\"document\">\r\n       <div class=\"modal-content\">\r\n         <div class=\"modal-header\">\r\n           <h5 class=\"modal-title\" id=\"formModal\">Add New Verification Notification Email            </h5>\r\n           <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n             <span aria-hidden=\"true\">&times;</span>\r\n           </button>\r\n         </div>\r\n         <div class=\"modal-body\">\r\n           <form id=\"addEmail\" [formGroup]=\"addEmailForm\" (ngSubmit)=\"onEmailSubmit();\">\r\n               <div class=\"form-group\">\r\n                 <label  class=\"d-block\">Email:</label>\r\n                 <input formControlName=\"email\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': EmailSubmitted && Emailcontrol.email.errors }\">          \r\n                 <div *ngIf=\"EmailSubmitted && Emailcontrol.email.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"Emailcontrol.email.errors.required\">Email is required</div>\r\n                    <div *ngIf=\"Emailcontrol.email.errors.email\">Email must be a valid email address</div>\r\n                </div>         \r\n               </div>\r\n               \r\n             <div class=\"modal-footer\" style=\"padding: 0;\">\r\n                <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Add Email</button>\r\n                <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n               </div>\r\n           </form>\r\n         </div>\r\n       </div>\r\n     </div>\r\n     </div>  \r\n\r\n    <!-- Edit Mail Modal -->\r\n    <div class=\"modal  fade\" id=\"editmail\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n     aria-hidden=\"true\">\r\n     <div class=\"modal-dialog\" role=\"document\">\r\n       <div class=\"modal-content\">\r\n         <div class=\"modal-header\">\r\n           <h5 class=\"modal-title\" id=\"formModal\">Update Verification Notification Email            </h5>\r\n           <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n             <span aria-hidden=\"true\">&times;</span>\r\n           </button>\r\n         </div>\r\n         <div class=\"modal-body\">\r\n           <form id=\"editEmail\" [formGroup]=\"editEmailForm\" (ngSubmit)=\"oneditEmailSubmit();\">\r\n               <div class=\"form-group\">\r\n                 <label  class=\"d-block\">Email:</label>\r\n                 <input formControlName=\"uuid\" type=\"hidden\">\r\n                 <input formControlName=\"email\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': editEmailSubmitted && editEmailcontrol.email.errors }\">          \r\n                 <div *ngIf=\"editEmailSubmitted && editEmailcontrol.email.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"editEmailcontrol.email.errors.required\">Email is required</div>\r\n                    <div *ngIf=\"editEmailcontrol.email.errors.email\">Email must be a valid email address</div>\r\n                </div>         \r\n               </div>\r\n               \r\n             <div class=\"modal-footer\" style=\"padding: 0;\">\r\n                <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Update Email</button>\r\n                <button class=\"close\" data-dismiss=\"modal\" class=\"btn btn-secondary m-t-15 waves-effect\">Close</button>\r\n               </div>\r\n           </form>\r\n         </div>\r\n       </div>\r\n     </div>\r\n     </div>   \r\n\r\n    <!-- Add Wildcard Modal -->\r\n    <div class=\"modal  fade\" id=\"addWildcard\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n    aria-hidden=\"true\">\r\n    <div class=\"modal-dialog\" role=\"document\">\r\n      <div class=\"modal-content\">\r\n        <div class=\"modal-header\">\r\n          <h5 class=\"modal-title\" id=\"formModal\">Add New Verification Wildcard</h5>\r\n          <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n            <span aria-hidden=\"true\">&times;</span>\r\n          </button>\r\n        </div>\r\n        <div class=\"modal-body\">\r\n          <form id=\"addWildcarddata\" [formGroup]=\"addWildcardForm\" (ngSubmit)=\"onwildcardSubmit()\">\r\n              <div class=\"form-group\">\r\n                    <label  class=\"d-block\">Wildcard:</label>\r\n                    <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': WildcardSubmitted && wildcardcontrol.name.errors }\">          \r\n                    <div *ngIf=\"WildcardSubmitted && wildcardcontrol.notes.errors\" class=\"invalid-feedback\">\r\n                       <div *ngIf=\"wildcardcontrol.notes.errors.required\">Wildcard is required</div>\r\n                   </div>         \r\n                </div>\r\n\r\n                <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Notes:</label>\r\n                        <textarea formControlName=\"notes\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': WildcardSubmitted && wildcardcontrol.notes.errors }\"></textarea>                   \r\n                        <div *ngIf=\"WildcardSubmitted && wildcardcontrol.notes.errors\" class=\"invalid-feedback\">\r\n                           <div *ngIf=\"wildcardcontrol.notes.errors.required\">Notes is required</div>\r\n                       </div>         \r\n                </div>\r\n              \r\n            <div class=\"modal-footer\" style=\"padding: 0;\">\r\n               <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Wildcard</button>\r\n               <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n              </div>\r\n          </form>\r\n        </div>\r\n      </div>\r\n    </div>\r\n    </div>  \r\n\r\n    <!-- Edit Wildcard -->\r\n\r\n    <div class=\"modal  fade\" id=\"editwildcard\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n    aria-hidden=\"true\">\r\n    <div class=\"modal-dialog\" role=\"document\">\r\n      <div class=\"modal-content\">\r\n        <div class=\"modal-header\">\r\n          <h5 class=\"modal-title\" id=\"formModal\">Update Verification Wildcard</h5>\r\n          <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n            <span aria-hidden=\"true\">&times;</span>\r\n          </button>\r\n        </div>\r\n        <div class=\"modal-body\">\r\n          <form id=\"editWildcarddata\" [formGroup]=\"editWildcardForm\" (ngSubmit)=\"onupdatewildcardSubmit()\">\r\n              \r\n              <div class=\"form-group\">\r\n                    <label  class=\"d-block\">Wildcard:</label>\r\n                    <input type=\"hidden\" name=\"uuid\" formControlName=\"uuid\">\r\n                    <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': editwildcardcontrol && editwildcardcontrol.name.errors }\">          \r\n                    <div *ngIf=\"editwildcardcontrol && editwildcardcontrol.notes.errors\" class=\"invalid-feedback\">\r\n                       <div *ngIf=\"editwildcardcontrol.notes.errors.required\">Wildcard is required</div>\r\n                   </div>         \r\n              </div>\r\n\r\n              <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Notes:</label>\r\n                        <textarea formControlName=\"notes\" class=\"form-control\"  [ngClass]=\"{ 'is-invalid': editwildcardcontrol && editwildcardcontrol.notes.errors }\"></textarea>                   \r\n                        <div *ngIf=\"editwildcardcontrol && editwildcardcontrol.notes.errors\" class=\"invalid-feedback\">\r\n                           <div *ngIf=\"editwildcardcontrol.notes.errors.required\">Notes is required</div>\r\n                       </div>         \r\n              </div>\r\n              \r\n            <div class=\"modal-footer\" style=\"padding: 0;\">\r\n               <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Update Wildcard</button>\r\n               <button class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\" class=\"btn btn-secondary m-t-15 waves-effect\">Close</button>\r\n              </div>\r\n          </form>\r\n        </div>\r\n      </div>\r\n    </div>\r\n    </div>  \r\n    <!-- End -->\r\n\r\n<div class=\"main-content\">\r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12 col-md-12 col-lg-12\">\r\n            <form [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n            <div class=\"card\" >\r\n              <div class=\"card-header\">\r\n                <h4>Verification Rules</h4>\r\n              </div>\r\n              <div class=\"card-body\">                    \r\n                <table class=\"table table-striped dataTable no-footer\" *ngIf=\"addForm.controls.itemRows!=null\" formGroupName=\"itemRows\">\r\n                     <tbody *ngFor=\"let itemrow of addForm.get('itemRows')?.controls; let i=index\" [formGroupName]=\"i\">      \r\n                         <tr style=\"background: #fff;\">\r\n                             <td>\r\n                                 <div class=\"rule-text-block\">If</div>\r\n                                 <div class=\"rule-input\">\r\n                                     <select formControlName=\"ifval\" class=\"form-control\" [value]=\"'RULE_SET'\">        \r\n                                      <option value=\"RULE_SET\">Rule Set</option>\r\n                                     </select>\r\n                                 </div>\r\n                             </td>\r\n                             <td>\r\n                                 <div class=\"rule-text-block\">is</div> \r\n                                 <div class=\"rule-input\">\r\n                                    <!-- value=\"{{ rulesdata[0].uuid }}\" -->\r\n                                    <select formControlName=\"isval\" class=\"form-control\" >\r\n                                      <option value=\"\">Select Rule Sets</option>\r\n                                      <option *ngFor=\"let rules of rulesdata\" value=\"{{ rules.uuid }}\">{{ rules.name }}</option>                                   \r\n                                    </select>\r\n                                 </div>\r\n                             </td>\r\n                             <td>\r\n                                 <div class=\"rule-text-block\">then</div> \r\n                                 <div class=\"rule-input\">\r\n                                    <!-- [value]=\"'FORWARD_TO'\" -->\r\n                                    <!-- (input)='data=$event.target.value' -->\r\n                                    <!-- (change)=\"thenval($event,i)\"  -->\r\n                                     <select [(ngModel)]=\"data[i]\" class=\"form-control\" formControlName=\"thenval\">\r\n                                      <option value=\"FORWARD_TO\">Forward The Call To</option>\r\n                                      <option value=\"FORWARD_TO_IVR_MENU\">Forward To IVR Menu</option>\r\n                                     </select>\r\n                                 </div>\r\n                             </td>\r\n                             <td>\r\n                                <!-- {{ data[i]}} -->\r\n                                <!-- || result[i].then_condition_action == 'FORWARD_TO' -->\r\n                                <!-- || result[i].then_condition_action == 'FORWARD_TO_IVR_MENU' -->\r\n\r\n                                     <input *ngIf=\"data[i] == 'FORWARD_TO' \" formControlName=\"thentxt\" id=\"thentxt_{{i}}\" type=\"text\" class=\"form-control\">\r\n                                     <select *ngIf=\"data[i] == 'FORWARD_TO_IVR_MENU'\" formControlName=\"thenselect\" id=\"thenselect_{{i}}\" class=\"form-control\" >\r\n                                       <option value=\"\">Select IVR</option>\r\n                                      <option *ngFor=\"let ivrname of ivrnamedata\" value=\"{{ ivrname.uuid }}\">{{ ivrname.name }}</option> \r\n                                    </select>\r\n                                    <!-- </div> -->\r\n                             </td>\r\n                             <td>\r\n                                 <div class=\"rule-text-block\">and</div> \r\n                                 <div class=\"rule-input\">\r\n                                     <select [attr.disabled]=\"controlEnabled\" formControlName=\"andval\" class=\"form-control ember-view\" [value]=\"'STOP'\">\r\n                                           <option value=\"STOP\">Stop Processing</option>\r\n                                     </select>\r\n                                 </div>\r\n                             </td>\r\n                             <td>\r\n                                 <button type=\"button\" (click)=\"deleteRow(i)\" class=\"btn btn-danger btn-md trashbtn\" style=\"color: #fff;\"><i class=\"fa fa-trash\"></i></button>\r\n                             </td>\r\n                         </tr>\r\n                         <tr style=\"background: #fff;\">\r\n                                 <td colspan=\"6\" class=\"text-center\">\r\n                                     otherwise\r\n                                 </td>\r\n                             </tr>\r\n                     </tbody>\r\n                     <tbody>\r\n                             <tr class=\"text-center\" style=\"background: #fff;\">\r\n                                     <td colspan=\"6\" class=\"text-center\">\r\n                                         <div *ngIf=\"addForm.get('itemRows')?.length==0\">\r\n                                           <small><b>No Rules Added Yet</b></small>\r\n                                         </div> \r\n                                         <button type=\"button\" (click)=\"addRow(addForm.get('itemRows')?.length)\" class=\"btn btn-primary\"><i class=\"fa fa-plus\"></i> Add a Rule</button>  \r\n                                     </td>\r\n                                     \r\n                             </tr>\r\n                             <tr style=\"background: #fff;\">   \r\n                                <td colspan=\"4\" class=\"text-left\">\r\n                                    <strong>otherwise</strong><br>\r\n                                    <strong>Redirect Call To It's Forwarding Number</strong></td>                        \r\n                                <td colspan=\"2\">\r\n                                        <div class=\"card-footer text-right\" style=\"padding: 0;\">\r\n                                            <button class=\"btn btn-primary\" type=\"submit\"><i class=\"fa fa-save\"></i> Save Rules</button>  \r\n                                        </div>\r\n                                     </td>\r\n                             </tr>\r\n                     </tbody>\r\n                 </table>\r\n\r\n              </div>\r\n             \r\n            </div>\r\n            <hr>\r\n          </form>\r\n\r\n\r\n    <!-- *ngIf=\"thenvalue == 'FORWARD_TO' && rowcount == i\"  -->\r\n                                <!-- *ngIf=\"thenvalue == 'FORWARD_TO_IVR_MENU'  && rowcount == i\" -->\r\n                                <!-- value=\"{{ ivrnamedata[0].uuid }}\" -->\r\n          <div class=\"row\">\r\n            <div class=\"col-lg-6 col-md-12 col-12 col-sm-12\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-md-7\"></div>\r\n                        <div class=\"col-md-5\">\r\n                            <button type=\"button\" data-toggle=\"modal\" data-target=\"#addLabels\" class=\"btn btn-primary\"><i class=\"fa fa-plus\"></i>  Add Notification Email</button><br><br>\r\n                        </div>\r\n                    </div>\r\n                <div class=\"card\">\r\n                    <div class=\"card-header\">\r\n                      <h4>Verification Notification Emails</h4>\r\n                     </div>\r\n                    <div class=\"card-body\">\r\n                            \r\n                      <div class=\"table-responsive\">\r\n                        <table class=\"table dataTable table-striped\">\r\n                          <tbody><tr>\r\n                            <th>Email</th>\r\n                            <th>Action</th>\r\n                          </tr>\r\n                          <tr *ngFor=\"let email of emaildata\">\r\n                            <td>{{email.email}}</td>\r\n                            <td>\r\n                              <button (click)=\"editEmail(email.uuid,email.email)\" data-toggle=\"modal\" data-target=\"#editmail\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></button>\r\n                              \r\n                            </td>\r\n                          </tr> \r\n                          <tr *ngIf=\"emaildata?.length == 0\" class=\"text-center\">\r\n                            <td colspan=\"2\">No Data Available</td>\r\n                          </tr>                         \r\n                          </tbody>\r\n                        </table>\r\n                      </div>\r\n                    </div>\r\n                  </div>\r\n            </div>\r\n            <div class=\"col-lg-6 col-md-12 col-12 col-sm-12\">\r\n                    <div class=\"row\">\r\n                            <div class=\"col-md-7\"></div>\r\n                            <div class=\"col-md-5\">\r\n                                    <button type=\"button\" data-toggle=\"modal\" data-target=\"#addWildcard\" class=\"btn btn-primary\"><i class=\"fa fa-plus\"></i>   Add Verification Wildcard</button><br><br>\r\n                            </div>\r\n                        </div>\r\n              <div class=\"card\">\r\n                <div class=\"card-header\">\r\n                  <h4>Verification Wildcards</h4>\r\n                </div>\r\n                <div class=\"card-body\">\r\n                  <div class=\"table-responsive\">\r\n                    <table class=\"table dataTable table-striped\">\r\n                      <tbody><tr>\r\n                        <th>Wildcard</th>\r\n                        <th>Notes</th>\r\n                        <th>Action</th>                       \r\n                      </tr>\r\n                      <tr *ngFor=\"let data of wildcarddata\">\r\n                        <td>{{data.number}}</td>\r\n                        <td>{{data.notes}}</td>\r\n                        <td>\r\n                          <button (click)=\"editWildcard(data.uuid,data.number,data.notes)\" data-toggle=\"modal\" data-target=\"#editwildcard\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></button>\r\n                        </td>\r\n                      </tr>  \r\n                      <tr *ngIf=\"wildcarddata?.length == 0\" class=\"text-center\">\r\n                        <td colspan=\"3\">No Data Available</td>\r\n                      </tr>  \r\n                      \r\n                    </tbody></table>\r\n                  </div>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n         \r\n\r\n</div>\r\n");

/***/ }),

/***/ "iOw8":
/*!*******************************************************************************!*\
  !*** ./src/app/modules/settings/manage-company/manage-company.component.scss ***!
  \*******************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJtYW5hZ2UtY29tcGFueS5jb21wb25lbnQuc2NzcyJ9 */");

/***/ }),

/***/ "jUJr":
/*!******************************************************!*\
  !*** ./src/app/modules/numbers/numbers.component.ts ***!
  \******************************************************/
/*! exports provided: NumbersComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumbersComponent", function() { return NumbersComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_numbers_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./numbers.component.html */ "zWEU");
/* harmony import */ var _numbers_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./numbers.component.scss */ "2QNl");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ngx-csv/ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_12__);













const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let NumbersComponent = class NumbersComponent {
    constructor(moduleservice, toastrService, handler, fb, router, cdRef) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.router = router;
        this.cdRef = cdRef;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.campaigndropdownSettings = {};
        this.dropdownList = [];
        this.selectedItems = [];
        this.dropdownSettings = {
            singleSelection: false,
            text: "Select Associated Labels",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class",
        };
        this.searchbynumbers = '';
        this.searchbycampaign = '';
        this.searchbylabels = '';
        this.role = "";
        this.useruuid = "";
        this.selectedItemspub = [];
        this.selectedItemscam = [];
        this.labels = [];
        this.checkboxes = [];
        this.selectednumber = [];
        this.payout_typevalueedit = 0;
        this.payoutedit_typevalue = 0;
        this.Submitted = false;
        this.editSubmitted = false;
        this.LabelSubmitted = false;
        this.exportNumber = {};
        this.finalexportNumber = [];
        this.url = 'https://www.wellingtonsoccer.com/lib/api/auth.cfc?returnFormat=JSON&method=Authenticate';
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    getAllLabels() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAllLabels(this.currentCompany.uuid).subscribe(res => {
            this.dropdownList = res;
            // console.log(res);
        }, error => this.error = error);
    }
    ngAfterViewChecked() {
        this.cdRef.detectChanges();
    }
    ngOnInit() {
        var loggedinuser = JSON.parse(localStorage.getItem('currentUser'));
        if (loggedinuser != null) {
            this.role = loggedinuser.role;
            this.useruuid = loggedinuser.uuid;
        }
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadNumbers();
        this.getAllpublishers();
        this.getAllLabels();
        this.getAllcampaign();
        this.campaigndropdownSettings = {
            singleSelection: true,
            text: "Select Campaign",
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        this.addForm = this.fb.group({
            country: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            numberType: [''],
            prefix: [''],
            number: [''],
            publisher: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            payout_typeedit: [''],
            payout_amount: [''],
            payout_trigger: [''],
            payout_seconds: [''],
            campain: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            assosciated_labels: [''],
            user_uuid: [''],
        });
        // let prefix="";
        // if(this.addForm.get('country').value=="United Kingdom"){
        //   prefix = "+1";
        // }
        // if(this.addForm.get('country').value=="United States"){
        //   prefix = "+44";
        // }
        this.addForm.patchValue({
            country: 'United States',
            prefix: "+1"
        });
        this.editForm = this.fb.group({
            country: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            uuid: [''],
            numberType: [''],
            prefix: [''],
            number: [''],
            publisher: [''],
            payout_uuid: [''],
            payout_typeedit: [''],
            payout_amount: [''],
            payout_trigger: [''],
            payout_seconds: [''],
            campain: [''],
            assosciated_labels: [''],
            user_uuid: [''],
        });
        this.addLabelForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            notes: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
    }
    getAllpublishers() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAllpublishers(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            this.publishers = res;
        }, error => this.error = error);
    }
    getAllcampaign() {
        this.moduleservice.getallcampaindata(this.currentCompany.uuid).subscribe(res => {
            this.getallcampain = res;
            // console.log(this.getallcampain);
        });
    }
    loadNumbers() {
        // console.log('ok');
        // return false;
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 1000,
            deferRender: true,
            scrollY: "800px",
            scrollCollapse: true,
            "lengthMenu": [50, 100, 500, 1000, 2000, 5000],
            "order": [[1, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                // this.http.post<DataTablesResponse>(
                //   this.ServerUrl+'getnumbersdata/'+this.currentCompany.uuid,
                //   dataTablesParameters, {}
                this.http.post(this.ServerUrl + 'getnumbersdata/' + this.currentCompany.uuid, { 'dataTablesParameters': dataTablesParameters, 'number': this.searchbynumbers, 'campaign': this.searchbycampaign, 'labels': this.searchbylabels, role: this.role, useruuid: this.useruuid }, {}).subscribe(resp => {
                    this.numbers = resp.data;
                    // console.log(this.numbers);
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                // ,{data:"target"}
                { data: "checkall" }, { data: "number" }, { data: "campaign" }, { data: "publisher" }, { data: "status" }, { data: "created_at" }, { data: "assosciated_label" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    editdata(uuid, prefix, numberType, number, country, publisher, campaign_uuid) {
        console.log(publisher);
        if (campaign_uuid != "" || campaign_uuid != undefined) {
            let text = this.getallcampain.filter(x => x.id == campaign_uuid)[0];
            this.selectedItemscam = [{ "id": campaign_uuid, "itemName": text.text }];
        }
        if (publisher != "" || publisher != undefined) {
            let text = this.publishers.filter(x => x.id == publisher)[0];
            this.selectedItemspub = [{ "id": publisher, "itemName": text.text }];
        }
        // console.log(this.selectedItemscam);
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getnumberAssciatedlabels(this.currentCompany.uuid, number).subscribe(res => {
            this.labels = res;
            //  console.log(this.labels);       
        }, error => this.error = error);
        this.moduleservice.getpayoutbynumberuuid(uuid).subscribe(res => {
            //  console.log(this.payoutdata);  
            if (res != '') {
                this.payoutedit_typevalue = res.payout_type;
                this.editForm.get('payout_uuid').setValue(res.uuid);
                this.editForm.patchValue({
                    payout_typeedit: res.payout_typeedit,
                    payout_amount: res.payout_amount,
                    payout_trigger: res.payout_trigger,
                    payout_seconds: res.payout_seconds
                });
            }
        }, error => this.error = error);
        let editprefix = "";
        if (country == "United Kingdom") {
            editprefix = "+44";
        }
        if (country == "United States") {
            editprefix = "+1";
        }
        this.numberTypeadd = numberType;
        this.editForm.patchValue({
            uuid: uuid,
            country: country,
            numberType: numberType,
            prefix: editprefix,
            number: number,
        });
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.selectednumber = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                    this.selectednumber.push(lbl.number);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
                this.numbers.forEach(lbl => {
                    if (event.target.value == lbl.id) {
                        this.selectednumber.push(lbl.number);
                    }
                });
                // this.selectednumber.push(event.target.value);        
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.ischecked); 
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
                this.selectednumber.splice(index, 1);
                // console.log('123='+this.selectednumber.length);
                if (this.selectednumber.length == 0) {
                    this.ischecked = '1';
                }
            }
            else {
                this.checkboxes = [];
                this.selectednumber = [];
                // console.log(this.selectednumber.length);
                if (this.selectednumber.length == 0) {
                    this.ischecked = '1';
                }
            }
        }
        // console.log(this.ischecked); 
    }
    onBatchEditSubmit() {
        // console.log(this.selectednumber); return
        this.moduleservice.setNumbersdata({
            numberslist: this.selectednumber,
        });
        this.router.navigate(['/batch-edit']);
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedNumbers(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                        }, 2000);
                        this.loadNumbers();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }
            });
        }
    }
    onStatusChangeSubmit() {
        // console.log(this.checkboxes);
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Status Change');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Change status of selected record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, Change it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.StatusChangeSelectedNumbers(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Status Changed!', 'Status Changed Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                        }, 2000);
                        this.checkboxes = [];
                        this.loadNumbers();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }
            });
        }
    }
    Delete(uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteNumberdata(uuid, currentUser.uuid).subscribe(res => {
                    // console.log(res);return false;
                    this.loadNumbers();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    numberTypeval(val) {
        this.addForm.get('numberType').setValue(val);
    }
    payout_typevaledit(val) {
        this.payout_typevalueedit = val;
        this.addForm.get('payout_typeedit').setValue(val);
    }
    payoutedit_typeval(val) {
        this.payoutedit_typevalue = val;
        this.editForm.get('payout_typeedit').setValue(val);
    }
    //Add Publisher
    get addformcontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('country', this.addForm.get('country').value);
        formData.append('numberType', this.addForm.get('numberType').value);
        formData.append('prefix', this.addForm.get('prefix').value);
        formData.append('number', this.addForm.get('number').value);
        formData.append('publisher', JSON.stringify(this.addForm.get('publisher').value));
        formData.append('payout_typeedit', this.addForm.get('payout_typeedit').value);
        formData.append('payout_amount', this.addForm.get('payout_amount').value);
        formData.append('payout_trigger', this.addForm.get('payout_trigger').value);
        formData.append('payout_seconds', this.addForm.get('payout_seconds').value);
        formData.append('campain', JSON.stringify(this.addForm.get('campain').value));
        formData.append('assosciated_labels', JSON.stringify(this.addForm.get('assosciated_labels').value));
        // console.log(formData); return false;
        this.moduleservice.addNumberdata(formData).subscribe(res => {
            // console.log(res.status); return false;
            if (res.status == 'error') {
                this.toastrService.error('Failed To Add Label');
            }
            else if (res.status == 'duplicate') {
                this.toastrService.error('The Number you Entered is Already Available');
            }
            else {
                this.toastrService.success('Number Added Successfully');
                this.loadNumbers();
                this.Submitted = false;
            }
        }, error => this.error = error);
    }
    //Add Buyer
    get editFormcontrol() { return this.editForm.controls; }
    onEditSubmit() {
        // this.editForm.get('assosciated_labels').setValue(JSON.stringify(this.labels)); 
        // alert('ok');return false;
        const formData = new FormData();
        this.editSubmitted = true;
        if (this.editForm.invalid) {
            return;
        }
        // console.log(this.labels);return false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('uuid', this.editForm.get('uuid').value);
        formData.append('country', this.editForm.get('country').value);
        formData.append('numberType', this.editForm.get('numberType').value);
        formData.append('prefix', this.editForm.get('prefix').value);
        formData.append('number', this.editForm.get('number').value);
        formData.append('payout_uuid', this.editForm.get('payout_uuid').value);
        formData.append('publisher', JSON.stringify(this.editForm.get('publisher').value));
        formData.append('payout_typeedit', this.editForm.get('payout_typeedit').value);
        formData.append('payout_amount', this.editForm.get('payout_amount').value);
        formData.append('payout_trigger', this.editForm.get('payout_trigger').value);
        formData.append('payout_seconds', this.editForm.get('payout_seconds').value);
        formData.append('campain', JSON.stringify(this.editForm.get('campain').value));
        formData.append('assosciated_labels', JSON.stringify(this.labels));
        this.moduleservice.editNumberdata(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Number Updated Successfully');
                this.loadNumbers();
                this.editSubmitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeModal() {
        // console.log(this.addForm.get('country').value);return false;
        if (!this.addForm.invalid) {
            $("#addModel").modal("hide");
            // $(".custom-switch-input").prop('checked',false);
            this.Submitted = false;
            setTimeout(() => { this.addForm.reset(); }, 2000);
        }
        if (this.addLabelForm.get('name').value && this.addLabelForm.get('notes').value) {
            $("#addLabels").modal("hide");
            $(".custom-switch-input").prop('checked', false);
            this.LabelSubmitted = false;
            setTimeout(() => {
                this.addLabelForm.reset();
                this.isName = "";
            }, 2000);
        }
    }
    closeEditModal() {
        if (this.editForm.get('country').value != '') {
            $("#editModel").modal("hide");
            this.editSubmitted = false;
            setTimeout(() => { this.editForm.reset(); }, 2000);
        }
    }
    get labelcontrol() { return this.addLabelForm.controls; }
    onLabelSubmit() {
        const formData = new FormData();
        this.LabelSubmitted = true;
        if (this.addLabelForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('name', this.addLabelForm.get('name').value);
        formData.append('notes', this.addLabelForm.get('notes').value);
        this.moduleservice.addLabel(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Label Added Successfully');
                this.getAllLabels();
                this.LabelSubmitted = false;
                this.isName = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    validatename() {
        if (this.addLabelForm.get('name').value != '') {
            this.moduleservice.validateLabelName(this.addLabelForm.get('name').value).subscribe(res => {
                // console.log(res); return false;  
                this.isName = res;
                if (this.isName.status == 'success') {
                    this.isName = "success";
                }
                else {
                    this.isName = "fail";
                }
            });
        }
        else {
            this.isName = "";
        }
    }
    exportdata() {
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            // showTitle: true,
            // title: 'Your title',
            useBom: true,
            // noDownload: true,
            headers: ["prefix", "number", "country", "campaign", "publisher", "target", "created_at"]
        };
        this.numbers.forEach((element, index) => {
            this.exportNumber.prefix = element.prefix;
            this.exportNumber.number = element.number;
            this.exportNumber.country = element.country;
            this.exportNumber.campaign = element.campaign;
            this.exportNumber.publisher = element.publisher;
            this.exportNumber.target = element.target;
            // this.exportNumber.assosciated_labels = element.assosciated_labels;
            this.exportNumber.created_at = element.created_at;
            this.finalexportNumber[index] = this.exportNumber;
        });
        //  console.log(this.numbers); 
        //  console.log(this.finalexportNumber); return;
        new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_12__["ngxCsv"](this.finalexportNumber, 'All Numbers', options);
    }
    addprefix(event) {
        // alert(event)
        if (event == "United Kingdom") {
            this.addForm.patchValue({
                prefix: "+44"
            });
        }
        if (event == "United States") {
            this.addForm.patchValue({
                prefix: "+1"
            });
        }
    }
    editprefix(event) {
        // alert(event)
        if (event == "United Kingdom") {
            this.editForm.patchValue({
                prefix: "+44"
            });
        }
        if (event == "United States") {
            this.editForm.patchValue({
                prefix: "+1"
            });
        }
    }
    purchase_number(event) {
        // alert(event);
        if (event == 1) {
            const headers = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpHeaders"]()
                .set('cache-control', 'no-cache')
                .set('content-type', 'application/json')
                .set('postman-token', 'b408a67d-5f78-54fc-2fb7-00f6e9cefbd1');
            const body = {
                email: 'myemail@xyz.com',
                user_password: 'mypasss',
                token: 'my token'
            };
            this.http.post(this.url, body, { headers: headers }).subscribe(data => {
                console.log(data);
            });
        }
    }
};
NumbersComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ChangeDetectorRef"] }
];
NumbersComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewChild"], args: ['dataTable', { static: true },] }]
};
NumbersComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-numbers',
        template: _raw_loader_numbers_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_numbers_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], NumbersComponent);



/***/ }),

/***/ "k/nl":
/*!************************************************************!*\
  !*** ./src/app/modules/publishers/publishers.component.ts ***!
  \************************************************************/
/*! exports provided: PublishersComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PublishersComponent", function() { return PublishersComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_publishers_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./publishers.component.html */ "L7QM");
/* harmony import */ var _publishers_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./publishers.component.scss */ "YowP");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../global */ "XrUY");












const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
class DataTablesResponse {
}
let PublishersComponent = class PublishersComponent {
    constructor(moduleservice, toastrService, handler, fb) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.settingToggleAccessToRecordingsvaldata = 0;
        this.settingToggleBlockCallsIfCappeddata = 0;
        this.checkboxes = [];
        this.settingToggleBlockCallsIfCappededit = 0;
        this.settingToggleAccessToRecordingsedit = 0;
        this.Submitted = false;
        this.editSubmitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadpublishers();
        // this.loadNumbers();
        this.addForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            sub_id: [''],
            number_creation: [''],
            settingToggleBlockCallsIfCapped: [''],
            settingToggleAccessToRecordings: [''],
            user_uuid: [''],
        });
        this.editForm = this.fb.group({
            uuid: [''],
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            sub_id: [''],
            number_creation: [''],
            settingToggleBlockCallsIfCapped: [''],
            settingToggleAccessToRecordings: [''],
            user_uuid: [''],
            status: [''],
        });
    }
    // numberdata:any;
    // loadNumbers(){
    //   this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
    //   this.moduleservice.loadNumbersfordropdown(this.currentCompany.uuid).subscribe(
    //     res => {
    //       this.numberdata= res
    //       },
    //       error => this.error = error
    //   );
    // }
    loadpublishers() {
        // console.log('ok');
        // return false;
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[0, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getpublisher/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "name" }, { data: "sub_id" }, { data: "create_number" }, { data: "settingToggleBlockCallsIfCapped" }, { data: "settingToggleAccessToRecordings" }, { data: "created_at" }, { data: "status" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    editdata(uuid, name, sub_id, create_number, settingToggleBlockCallsIfCapped, settingToggleAccessToRecordings, status) {
        this.settingToggleAccessToRecordingsvaldata = settingToggleAccessToRecordings;
        this.settingToggleBlockCallsIfCappeddata = settingToggleBlockCallsIfCapped;
        this.editForm.patchValue({
            uuid: uuid,
            name: name,
            sub_id: sub_id,
            number_creation: create_number,
            settingToggleBlockCallsIfCapped: settingToggleBlockCallsIfCapped,
            settingToggleAccessToRecordings: settingToggleAccessToRecordings,
            status: status,
        });
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedNumbers(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                        }, 2000);
                        this.loadpublishers();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }
            });
        }
    }
    Delete(id) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deletePublisher(+id, currentUser.uuid).subscribe(res => {
                    this.loadpublishers();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    settingToggleBlockCallsIfCappedval(val) {
        this.addForm.get('settingToggleBlockCallsIfCapped').setValue(val);
    }
    settingToggleAccessToRecordingsval(val) {
        this.addForm.get('settingToggleAccessToRecordings').setValue(val);
    }
    settingToggleBlockCallsIfCappedvaledit(val) {
        this.settingToggleBlockCallsIfCappededit = val;
        this.editForm.get('settingToggleBlockCallsIfCapped').setValue(val);
    }
    settingToggleAccessToRecordingsvaledit(val) {
        this.settingToggleAccessToRecordingsedit = val;
        this.editForm.get('settingToggleAccessToRecordings').setValue(val);
    }
    //Add Publisher
    get addformcontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('name', this.addForm.get('name').value);
        formData.append('sub_id', this.addForm.get('sub_id').value);
        formData.append('number_creation', this.addForm.get('number_creation').value);
        formData.append('settingToggleBlockCallsIfCapped', this.addForm.get('settingToggleBlockCallsIfCapped').value);
        formData.append('settingToggleAccessToRecordings', this.addForm.get('settingToggleAccessToRecordings').value);
        // console.log(formData); return false;
        this.moduleservice.addPublisher(formData).subscribe(res => {
            // console.log(res.status); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Publisher Added Successfully');
                this.loadpublishers();
                this.Submitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    //Add Buyer
    get editFormcontrol() { return this.editForm.controls; }
    onEditSubmit() {
        // alert('ok');return false;
        const formData = new FormData();
        this.editSubmitted = true;
        if (this.editForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('uuid', this.editForm.get('uuid').value);
        formData.append('name', this.editForm.get('name').value);
        formData.append('sub_id', this.editForm.get('sub_id').value);
        formData.append('number_creation', this.editForm.get('number_creation').value);
        formData.append('settingToggleBlockCallsIfCapped', this.editForm.get('settingToggleBlockCallsIfCapped').value);
        formData.append('settingToggleAccessToRecordings', this.editForm.get('settingToggleAccessToRecordings').value);
        formData.append('status', this.editForm.get('status').value);
        // console.log(formData); 
        this.moduleservice.editPublisher(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Publisher Updated Successfully');
                this.loadpublishers();
                this.editSubmitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (this.addForm.get('name').value != '') {
            $("#addLabels").modal("hide");
            // $(".custom-switch-input").prop('checked',false);
            this.Submitted = false;
            setTimeout(() => { this.addForm.reset(); }, 2000);
        }
    }
    closeEditModal() {
        if (this.editForm.get('name').value != '') {
            $("#editLabels").modal("hide");
            this.editSubmitted = false;
            setTimeout(() => { this.editForm.reset(); }, 2000);
        }
    }
};
PublishersComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] }
];
PublishersComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewChild"], args: ['dataTable', { static: true },] }]
};
PublishersComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-publishers',
        template: _raw_loader_publishers_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_publishers_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], PublishersComponent);



/***/ }),

/***/ "kDwe":
/*!***********************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/auth/login-componunt/login-componunt.component.html ***!
  \***********************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("    <div class=\"loader\" style=\"display: none;\"></div>\r\n    <!-- <div id=\"app\" style=\"width: 98%!important;\"> -->\r\n    <!-- <section class=\"section\"> -->\r\n    <div id=\"app\">\r\n      <div class=\"main-wrapper main-wrapper-1\">\r\n        <div class=\"section-login__header\">\r\n          <!-- url('assets/img/back.jpg')  -->\r\n          <div style=\"padding-top: 10px;\r\n          border-bottom: 1px solid #535660;background: #1F263D;\">\r\n            <div class=\"loginv2-container container\">\r\n              <h1 class=\"title md-title title--ringba\">\r\n                <span class=\"text-white\">Welcome to Dialdigits</span>\r\n              </h1>\r\n              <p class=\"subtitle\"><span class=\"login-welcome-sub-message\">Lets grow together</span></p>\r\n            </div>\r\n          </div>\r\n        </div>\r\n\r\n        <div class=\"row justify-content-center login p-2 m-0\" style=\"background: #1F263D;\">\r\n          <div class=\"col-12 col-sm-8 offset-sm-2 col-md-6 offset-md-3 col-lg-6 offset-lg-2 col-xl-3 p-0 offset-xl-5 m-3 \"\r\n            >\r\n            <center>\r\n              <div class=\"card card-primary\">\r\n                <div class=\"card-header\">\r\n                  <img alt=\"image\" width=\"180px\" src=\"assets/img/logo.png\" class=\"header-logo\">\r\n                </div>\r\n                <div class=\"card-body\">\r\n                  <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSubmit()\">\r\n                    <div class=\"form-group text-left\">\r\n                      <label for=\"email\">Email</label>\r\n                      <!-- <input id=\"email\" type=\"email\" class=\"form-control\" name=\"email\" tabindex=\"1\" required=\"\" autofocus=\"\"> -->\r\n                      <input type=\"email\" formControlName=\"username\" class=\"form-control\" placeholder=\"Username\"\r\n                        required>\r\n\r\n                      <div *ngIf=\"username.invalid && (username.dirty || username.touched)\" class=\"error\">\r\n                        <div *ngIf=\"username.errors\">\r\n                          Username is required.\r\n                        </div>\r\n                      </div>\r\n                    </div>\r\n                    <div class=\"form-group text-left\">\r\n                      <div class=\"d-block\">\r\n                        <label for=\"password\" class=\"control-label\">Password</label>\r\n                      </div>\r\n                      <input type=\"password\" formControlName=\"password\" class=\"form-control\" placeholder=\"Password\"\r\n                        required>\r\n\r\n                      <div *ngIf=\"password.invalid && (password.dirty || password.touched)\" class=\"error\">\r\n                        <div *ngIf=\"password.errors\">\r\n                          Password is required.\r\n                        </div>\r\n                      </div>\r\n                    </div>\r\n                    <!-- <div class=\"form-group text-left\">\r\n                      <div class=\"custom-control custom-checkbox\">\r\n                        <input type=\"checkbox\" name=\"remember\" class=\"custom-control-input\" tabindex=\"3\" id=\"remember-me\">\r\n                        <label class=\"custom-control-label\" for=\"remember-me\">Remember Me</!                       </div>\r\n                    </div> -->\r\n                    <!-- <div class=\"float-right\">\r\n                        <a routerLink=\"/forgot-password\" class=\"text-small\">\r\n                          Forgot Password?\r\n                        </a>\r\n                      </div> -->\r\n                    <div class=\"form-group text-left\">\r\n                      <button type=\"submit\" [disabled]=\"!loginForm.valid\" class=\"btn btn-primary\">Log In</button>\r\n\r\n                    </div>\r\n                  </form>\r\n                  <div class=\"alert alert-danger\" *ngIf=\"loginError\">\r\n                    {{loginError}}\r\n                  </div>\r\n                </div>\r\n              </div>\r\n            </center>\r\n\r\n            <!-- <div class=\"mt-5 text-muted text-center\">\r\n                Don't have an account?<a routerLink=\"/register\" routerLinkActive=\"active\">Create One</a>\r\n                </div> -->\r\n          </div>\r\n          <!-- </div>\r\n        </section> -->\r\n          <br>\r\n        </div>\r\n\r\n        <footer class=\"footer\">\r\n          <div class=\"container footer__container \" style=\"padding-top: 20px;\"><a href=\"/\"\r\n              class=\"logo logo--footer\"></a>\r\n            <div class=\"row\">\r\n              <div class=\"col-md-2\" style=\"margin-top: 30px;\">\r\n                <img alt=\"image\" width=\"180px\" src=\"assets/img/logo.png\" class=\"header-logo mb-2\">\r\n              </div>\r\n              <div class=\"col-md-2\">\r\n                <nav class=\"footer-menu__wrap hidden-xs hidden-sm hidden-md\">\r\n                  <ul class=\"footer-menu__list column\">\r\n                    <li class=\"footer-menu__item\"><a href=\"#\" target=\"_BLANK\"\r\n                        class=\"footer-text text-uppercase footer-menu__item__link\">Support</a></li>\r\n                    <li class=\"footer-menu__item\"><a href=\"#\" target=\"_BLANK\"\r\n                        class=\"footer-text text-uppercase footer-menu__item__link\">Glossary</a></li>\r\n                    <li class=\"footer-menu__item\"><a href=\"#\" target=\"_BLANK\"\r\n                        class=\"footer-text text-uppercase footer-menu__item__link\">Blog</a></li>\r\n                    <li class=\"footer-menu__item\"><a href=\"#\" target=\"_BLANK\"\r\n                        class=\"footer-text text-uppercase footer-menu__item__link\">Developers</a></li>\r\n\r\n                  </ul>\r\n                </nav>\r\n              </div>\r\n              <div class=\"col-md-2\">\r\n                <nav class=\"footer-menu__wrap hidden-xs hidden-sm hidden-md\">\r\n                  <ul class=\"footer-menu__list column\">\r\n                    <li class=\"footer-menu__item\"><a href=\"#\" target=\"_BLANK\"\r\n                        class=\"footer-text text-uppercase footer-menu__item__link\">System Status</a></li>\r\n                    <li class=\"footer-menu__item\"><a href=\"#\" target=\"_BLANK\"\r\n                        class=\"footer-text text-uppercase footer-menu__item__link\">Terms</a></li>\r\n                    <li class=\"footer-menu__item\"><a href=\"#\" target=\"_BLANK\"\r\n                        class=\"footer-text text-uppercase footer-menu__item__link\">Privacy</a></li>\r\n                    <li class=\"footer-menu__item\"><a href=\"#\" target=\"_BLANK\"\r\n                        class=\"footer-text text-uppercase footer-menu__item__link\">Abuse</a></li>\r\n                  </ul>\r\n                </nav>\r\n              </div>\r\n              <div class=\"col-md-3\">\r\n                <div class=\"contact__wrap\">\r\n                  <h4 class=\"footer-text text-uppercase hidden-xs \">\r\n                    Call us\r\n                  </h4> <a href=\"tel:+18445339911\" class=\"call__link\">(844) 533-9911</a>\r\n                </div>\r\n              </div>\r\n              <div class=\"col-md-3\">\r\n                <div class=\"social__wrap\">\r\n                  <h4 class=\"footer-text text-uppercase hidden-xs\">\r\n                    Follow us\r\n                  </h4>\r\n                  <div class=\"social-list\">\r\n                    <a style=\"padding: 10px;\" href=\"#\" target=\"_BLANK\" title=\"facebook\" class=\"social-item\"><i\r\n                        class=\"fab fa-facebook \"></i></a>\r\n                    <a style=\"padding: 10px;\" href=\"#\" target=\"_BLANK\" title=\"twitter\" class=\"social-item\"><i\r\n                        class=\"fab fa-twitter\"></i></a>\r\n                    <a style=\"padding: 10px;\" href=\"#\" target=\"_BLANK\" title=\"youtube\" class=\"social-item\"><i\r\n                        class=\"fab fa-youtube\"></i></a>\r\n                    <a style=\"padding: 10px;\" href=\"#\" target=\"_BLANK\" title=\"linkedin\" class=\"social-item\"><i\r\n                        class=\"fab fa-linkedin\"></i></a>\r\n                  </div>\r\n                </div>\r\n              </div>\r\n\r\n            </div>\r\n\r\n\r\n\r\n          </div>\r\n        </footer>\r\n      </div>\r\n    </div>");

/***/ }),

/***/ "kL+B":
/*!******************************************************************************!*\
  !*** ./src/app/modules/campaigns/campaign-view/campaign-view.component.scss ***!
  \******************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("input#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 55px;\n}\n\n.mat-step-header {\n  background: #6777ef !important;\n  color: white !important;\n  padding: 4px !important;\n  border-radius: 5px !important;\n  margin: 7px !important;\n  height: 43px !important;\n}\n\nng-select2.ng-star-inserted {\n  pointer-events: none !important;\n  touch-action: none !important;\n  color: #e9ecef !important;\n}\n\nfieldset.scheduler-border {\n  border: 1px groove #ddd !important;\n  padding: 0 1.4em 1.4em 1.4em !important;\n  margin: 0 0 1.5em 0 !important;\n  box-shadow: 0px 0px 0px 0px #000;\n}\n\nlegend.scheduler-border {\n  font-size: 1em !important;\n  font-weight: bold !important;\n  text-align: left !important;\n  width: auto;\n  padding: 0 10px;\n  border-bottom: none;\n}\n\nlabel.btn.btn-primary.form-check-label {\n  font-size: 11px;\n}\n\nstrong {\n  font-size: 11px;\n}\n\ninput[type=number]::-webkit-inner-spin-button,\ninput[type=number]::-webkit-outer-spin-button {\n  opacity: 1 !important;\n}\n\ninput[type=number] {\n  border: none;\n  border-bottom: 1px solid;\n  border-radius: 0;\n  padding: 10px !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcY2FtcGFpZ24tdmlldy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLGFBQUE7QUFDSjs7QUFDQTtFQUNJLFlBQUE7QUFFSjs7QUFDQTtFQUNJLDhCQUFBO0VBQ0EsdUJBQUE7RUFDQSx1QkFBQTtFQUNBLDZCQUFBO0VBQ0Esc0JBQUE7RUFDQSx1QkFBQTtBQUVKOztBQUNBO0VBQ0ksK0JBQUE7RUFDQSw2QkFBQTtFQUNBLHlCQUFBO0FBRUo7O0FBQUE7RUFDSSxrQ0FBQTtFQUNBLHVDQUFBO0VBQ0EsOEJBQUE7RUFFUSxnQ0FBQTtBQUdaOztBQUFBO0VBQ0kseUJBQUE7RUFDQSw0QkFBQTtFQUNBLDJCQUFBO0VBQ0EsV0FBQTtFQUNBLGVBQUE7RUFDQSxtQkFBQTtBQUdKOztBQUFBO0VBQ0ksZUFBQTtBQUdKOztBQVFBO0VBQ0ksZUFBQTtBQUxKOztBQVFBOztFQUVFLHFCQUFBO0FBTEY7O0FBT0E7RUFDSSxZQUFBO0VBQ0Esd0JBQUE7RUFDQSxnQkFBQTtFQUNBLHdCQUFBO0FBSkoiLCJmaWxlIjoiY2FtcGFpZ24tdmlldy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbImlucHV0I29wdGlvbjEsIGlucHV0I29wdGlvbjIsIGlucHV0I29wdGlvbjN7XHJcbiAgICBkaXNwbGF5OiBub25lO1xyXG59ICAgIFxyXG4uYnRuLWdyb3VwLmZvcm0tY29udHJvbCB7XHJcbiAgICBoZWlnaHQ6IDU1cHg7XHJcbn1cclxuXHJcbi5tYXQtc3RlcC1oZWFkZXIge1xyXG4gICAgYmFja2dyb3VuZDogIzY3NzdlZiFpbXBvcnRhbnQ7XHJcbiAgICBjb2xvcjogd2hpdGUhaW1wb3J0YW50O1xyXG4gICAgcGFkZGluZzogNHB4IWltcG9ydGFudDtcclxuICAgIGJvcmRlci1yYWRpdXM6IDVweCFpbXBvcnRhbnQ7XHJcbiAgICBtYXJnaW46IDdweCFpbXBvcnRhbnQ7XHJcbiAgICBoZWlnaHQ6IDQzcHghaW1wb3J0YW50O1xyXG59XHJcblxyXG5uZy1zZWxlY3QyLm5nLXN0YXItaW5zZXJ0ZWQge1xyXG4gICAgcG9pbnRlci1ldmVudHM6IG5vbmUhaW1wb3J0YW50O1xyXG4gICAgdG91Y2gtYWN0aW9uOiBub25lIWltcG9ydGFudDtcclxuICAgIGNvbG9yOiAjZTllY2VmIWltcG9ydGFudDtcclxufVxyXG5maWVsZHNldC5zY2hlZHVsZXItYm9yZGVyIHtcclxuICAgIGJvcmRlcjogMXB4IGdyb292ZSAjZGRkICFpbXBvcnRhbnQ7XHJcbiAgICBwYWRkaW5nOiAwIDEuNGVtIDEuNGVtIDEuNGVtICFpbXBvcnRhbnQ7XHJcbiAgICBtYXJnaW46IDAgMCAxLjVlbSAwICFpbXBvcnRhbnQ7XHJcbiAgICAtd2Via2l0LWJveC1zaGFkb3c6ICAwcHggMHB4IDBweCAwcHggIzAwMDtcclxuICAgICAgICAgICAgYm94LXNoYWRvdzogIDBweCAwcHggMHB4IDBweCAjMDAwO1xyXG59XHJcblxyXG5sZWdlbmQuc2NoZWR1bGVyLWJvcmRlciB7XHJcbiAgICBmb250LXNpemU6IDEuMGVtICFpbXBvcnRhbnQ7XHJcbiAgICBmb250LXdlaWdodDogYm9sZCAhaW1wb3J0YW50O1xyXG4gICAgdGV4dC1hbGlnbjogbGVmdCAhaW1wb3J0YW50O1xyXG4gICAgd2lkdGg6YXV0bztcclxuICAgIHBhZGRpbmc6MCAxMHB4O1xyXG4gICAgYm9yZGVyLWJvdHRvbTpub25lO1xyXG59XHJcblxyXG5sYWJlbC5idG4uYnRuLXByaW1hcnkuZm9ybS1jaGVjay1sYWJlbCB7XHJcbiAgICBmb250LXNpemU6IDExcHg7XHJcbn1cclxuXHJcbi8vIHRoLHRke1xyXG4vLyAgICAgcGFkZGluZzogMHB4IDEwcHggMHB4IDEwcHghaW1wb3J0YW50O1xyXG4vLyAgICAgaGVpZ2h0OiA0NnB4IWltcG9ydGFudDtcclxuLy8gICAgIGJhY2tncm91bmQ6ICMyZWEyZDY7XHJcbi8vICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xyXG4vLyAgICAgY29sb3I6IHdoaXRlO1xyXG4vLyAgICAgYm9yZGVyLXJhZGl1czogMXB4O1xyXG4vLyB9XHJcbnN0cm9uZyB7XHJcbiAgICBmb250LXNpemU6IDExcHg7XHJcbn1cclxuXHJcbmlucHV0W3R5cGU9bnVtYmVyXTo6LXdlYmtpdC1pbm5lci1zcGluLWJ1dHRvbiwgXHJcbmlucHV0W3R5cGU9bnVtYmVyXTo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbiB7ICBcclxuICBvcGFjaXR5OiAxIWltcG9ydGFudDtcclxufVxyXG5pbnB1dFt0eXBlPW51bWJlcl17XHJcbiAgICBib3JkZXI6IG5vbmU7XHJcbiAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQ7XHJcbiAgICBib3JkZXItcmFkaXVzOiAwO1xyXG4gICAgcGFkZGluZzogMTBweCFpbXBvcnRhbnQ7XHJcbn1cclxuXHJcblxyXG4iXX0= */");

/***/ }),

/***/ "kNPR":
/*!************************************************************!*\
  !*** ./src/app/modules/shortlist/shortlist.component.scss ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzaG9ydGxpc3QuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "kjkU":
/*!************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/header/header.component.html ***!
  \************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n<div id=\"app\">\r\n  <div class=\"main-wrapper main-wrapper-1\">\r\n    <div class=\"navbar-bg\"></div>\r\n    <nav class=\"navbar navbar-expand-lg main-navbar \">\r\n        <div class=\"form-inline mr-auto\">\r\n          <ul class=\"navbar-nav mr-3\">\r\n            <!-- data-toggle=\"sidebar\" -->\r\n            <li><a href=\"#\" class=\"nav-link nav-link-lg\r\n                  collapse-btn pull-right sidebartogglebtn\"  data-toggle=\"sidebar\"  (click)=\"getSidebar()\"> <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-align-justify\"><line x1=\"21\" y1=\"10\" x2=\"3\" y2=\"10\"></line><line x1=\"21\" y1=\"6\" x2=\"3\" y2=\"6\"></line><line x1=\"21\" y1=\"14\" x2=\"3\" y2=\"14\"></line><line x1=\"21\" y1=\"18\" x2=\"3\" y2=\"18\"></line></svg></a>\r\n            </li>\r\n            <li><a class=\"nav-link nav-link-lg fullscreen-btn\">\r\n                <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-maximize\"><path d=\"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3\"></path></svg>\r\n              </a></li>\r\n            <!-- <li><a class=\"nav-link nav-link-lg\">\r\n              <div class=\"post-footer-comment-wrapper\">\r\n                <div class=\"comment\">\r\n                     <div class=\"media\">\r\n                       <div class=\"media-left\">\r\n                         \r\n                          <img src=\"assets/img/live_call_icon.png\" width=\"40px\" alt=\"\" srcset=\"\">\r\n                       </div>\r\n                       <div class=\"media-body\">\r\n                         <h6 class=\"media-heading\">0</h6>\r\n                         <p>Live</p>\r\n                       </div>\r\n                     </div>\r\n                </div>\r\n            </div>\r\n              </a>\r\n            </li> -->\r\n            <!-- <i class=\"material-icons phone\">phone</i> -->\r\n          \r\n            <!-- <li>\r\n                <form class=\"form-inline mr-auto\">\r\n                    <div class=\"search-element\">\r\n                      <input class=\"form-control\" type=\"search\" placeholder=\"Search\" aria-label=\"Search\" data-width=\"200\" style=\"width: 200px;\">\r\n                      <button class=\"btn\" type=\"submit\">\r\n                        <i class=\"fas fa-search\"></i>\r\n                      </button>\r\n                    </div>\r\n                  </form>\r\n            </li> -->\r\n          </ul>\r\n        </div>\r\n        <ul class=\"navbar-nav navbar-right\">\r\n          \r\n\r\n          <li><a class=\"nav-link nav-link-lg\">\r\n            <div class=\"post-footer-comment-wrapper\">\r\n              <div class=\"comment\">\r\n                   <div class=\"media\">\r\n                     <div class=\"media-left\">\r\n                       \r\n                        <img src=\"assets/img/live_call_icon.png\" width=\"40px\" alt=\"\" srcset=\"\">\r\n                     </div>\r\n                     <div class=\"media-body\">\r\n                       <h6 class=\"media-heading\">{{livecall}}</h6>\r\n                       <p>Live</p>\r\n                     </div>\r\n                   </div>\r\n              </div>\r\n          </div>\r\n            </a>\r\n          </li>\r\n\r\n          <li><a class=\"nav-link nav-link-lg\">\r\n            <div class=\"post-footer-comment-wrapper\">\r\n              <div class=\"comment\">\r\n                   <div class=\"media\">\r\n                     <div class=\"media-left\">\r\n                        <!-- <i class=\"material-icons phone-completed\">phone</i> -->\r\n                        <img src=\"assets/img/completed_call.png\" width=\"40px\" alt=\"\" srcset=\"\">\r\n                     </div>\r\n                     <div class=\"media-body\">\r\n                       <h6 class=\"media-heading-completed\">{{completedcalls}}</h6>\r\n                       <p>Completed</p>\r\n                     </div>\r\n                   </div>\r\n              </div>\r\n          </div>\r\n            </a>\r\n          </li>\r\n\r\n          <li class=\"dropdown mt-2\">\r\n            <a href=\"#\" data-toggle=\"dropdown\" class=\"nav-link dropdown-toggle nav-link-lg nav-link-user\">\r\n              <img alt=\"image\" src=\"assets/img/user.png\" class=\"user-img-radious-style\">\r\n               <span class=\"d-sm-none d-lg-inline-block\"></span>\r\n            </a>\r\n          <div class=\"dropdown-menu dropdown-menu-right pullDown\">\r\n            <div *ngIf=\"role!=2\">\r\n              <div class=\"dropdown-title\" >Hello {{firstName}} {{lastName}}</div>\r\n              <a routerLink=\"/profile\" routerLinkActive=\"router-link-active\" class=\"dropdown-item has-icon\"> <i class=\"far\r\n                    fa-user\"></i> Profile\r\n              </a> \r\n            </div>\r\n            <div *ngIf=\"role==2\">\r\n              <div class=\"dropdown-title\">Switch Account</div>\r\n              <div *ngFor=\"let item of companies\">\r\n              <a href=\"#\" (click)=\"switchcompany(item.uuid)\" class=\"dropdown-item has-icon\">\r\n                <i *ngIf=\"item.active == 1\" style=\"color: #6777ef;\" class=\"fas fa-check-square\"></i>\r\n                <i *ngIf=\"item.active == 0\" class=\"fas fa-caret-right\"></i>\r\n                <div *ngIf=\"item.active == 1\" style=\"color: #6777ef;\">\r\n                {{item.name}}\r\n                </div>\r\n                <div *ngIf=\"item.active == 0\">\r\n                {{item.name}}\r\n                </div>\r\n              </a>\r\n              </div>\r\n              <div class=\"dropdown-divider\"></div>\r\n              <a routerLink=\"/profile\" routerLinkActive=\"router-link-active\" class=\"dropdown-item has-icon\"> <i class=\"far\r\n                fa-user\"></i> Profile\r\n              </a> \r\n            </div>\r\n            <div class=\"dropdown-divider\"></div>\r\n            <a routerLink=\"/logout\" routerLinkActive=\"router-link-active\"  (click)='logout()' class=\"dropdown-item has-icon text-danger\"> <i class=\"fas fa-sign-out-alt\"></i>\r\n              Logout\r\n            </a>\r\n          </div>\r\n        </li>\r\n        </ul>\r\n      </nav>\r\n    <!-- Main Content -->\r\n    \r\n  </div>\r\n</div>");

/***/ }),

/***/ "kqLV":
/*!**************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/shortlist/shortlist.component.html ***!
  \**************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n      <div class=\"main-content\">  \r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                  <div class=\"row\" style=\"margin-top: 20px;\r\n                  \">\r\n                      <div class=\"col-9\">\r\n                          <div class=\"card-header\">\r\n                          <h4>All ShortList Numbers</h4></div>\r\n                      </div>\r\n                  </div> \r\n                  <form  (ngSubmit)=\"loadcalls()\">\r\n                  <div class=\"row\" style=\"margin-top: 10px;margin-left: 11px;\" > \r\n                  <div class=\"col-3\">\r\n                    <input type=\"text\" [(ngModel)]=\"numbers\" [ngModelOptions]=\"{standalone: true}\" class=\"form-control\" placeholder=\"Search Call Records\" >\r\n                  </div>                  \r\n                  <div class=\"col-8\">\r\n                    <input type=\"text\"\r\n                    ngxDaterangepickerMd\r\n                    [(ngModel)]=\"selected\" [ngModelOptions]=\"{standalone: true}\"\r\n                    [showCustomRangeLabel]=\"true\"\r\n                    [alwaysShowCalendars]=\"alwaysShowCalendars\"\r\n                    [ranges]=\"ranges\"                \r\n                    [showCancel]=\"true\"\r\n                    [linkedCalendars]=\"true\"                    \r\n                    [locale]=\"{applyLabel: 'Done'}\"\r\n                    [keepCalendarOpeningWithRange]=\"keepCalendarOpeningWithRange\"\r\n                    [showRangeLabelOnInput]=\"showRangeLabelOnInput\"\r\n                    class=\"form-control\"\r\n                    placeholder=\"Select please...\"/>\r\n                  </div>\r\n                  \r\n                  <div class=\"col-1\" style=\"margin-left: -22px;\">\r\n                    <button type=\"submit\" class=\"btn btn-success btn-lg\"><i class=\"fas fa-search\"></i></button>\r\n                  </div>\r\n                </div>\r\n                </form>         \r\n    \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                    <thead>\r\n                      <tr>\r\n                        <th>Number</th>\r\n                        <th>Forwarded To\t</th>\r\n                        <th>Created Date</th>                                                                     \r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"alldata?.length != 0\">\r\n                        <tr *ngFor=\"let data of alldata\">\r\n                            <td>{{ data.number }}</td>\r\n                            <td>{{ data.forward_to }}</td>\r\n                            <td>{{ data.created_at }}</td>                            \r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"alldata?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n</div>  ");

/***/ }),

/***/ "lWPo":
/*!******************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/rules/rules.component.html ***!
  \******************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n      \r\n      <div class=\"main-content\">\r\n        \r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                    <div class=\"row\" style=\"margin-top: 20px;\r\n                    \">\r\n                        <div class=\"col-9\">\r\n                            <div class=\"card-header\">\r\n                            <h4>Rule Sets</h4></div>\r\n                        </div>\r\n                        <div class=\"col-3 text-right mt-2\">\r\n                           <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                               <button routerLink=\"/add-rule\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2\"><i class=\"fa fa-plus\"></i> Add Rule\r\n                                </button>\r\n                              </div>                       \r\n                        </div>\r\n                  \r\n                    </div>            \r\n                    \r\n                  <div class=\"card-body\">\r\n                    <div class=\"table-responsive\">\r\n                    <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                        <thead>\r\n                          <tr>\r\n                            <th>Name</th>\r\n                            <th>Created Date</th>\r\n                            <th>Action</th>\r\n                          </tr>\r\n                        </thead>\r\n                        <tbody *ngIf=\"rules?.length != 0\">\r\n                            <tr *ngFor=\"let rule of rules\">\r\n                                <td>{{ rule.name }}</td>\r\n                                <td>{{ rule.created_at }}</td>\r\n                                <td><a routerLink=\"/edit-rule/{{ rule.uuid }}\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;<button (click)=\"Delete((rule.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                            </tr>\r\n                        </tbody>\r\n                        <tbody *ngIf=\"rules?.length == 0\">\r\n                          <tr>\r\n                            <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                          </tr>\r\n                        <tbody>\r\n                      </table>\r\n                    </div>\r\n                  </div>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </section>\r\n        \r\n      </div>");

/***/ }),

/***/ "laJ8":
/*!********************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/campaigns/campaign-edit/campaign-edit.component.html ***!
  \********************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n\r\n<!-- Add Payout Modal -->\r\n<div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\">\r\n   <div class=\"modal-content\">\r\n     <div class=\"modal-header\">\r\n       <h5 class=\"modal-title\" id=\"formModal\">Add Publisher Payout</h5>\r\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n         <span aria-hidden=\"true\">&times;</span>\r\n       </button>\r\n     </div>\r\n     <div class=\"modal-body\">\r\n       <form id=\"addLabel\" [formGroup]=\"payoutForm\" (ngSubmit)=\"onPayoutSubmit()\">\r\n         <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n            <fieldset class=\"scheduler-border\">\r\n              <legend class=\"scheduler-border\">Publisher Payout Conversation</legend>\r\n              <div class=\"control-group\">\r\n              <label class=\"control-label input-label\" for=\"startTime\">Payout Type :</label>\r\n              <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n              <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==0}\" (click)=\"payout_typevaledit(0)\"> \r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                    None\r\n                  </label>\r\n                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payout_typevaledit(1)\">\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                    Fixed Payout\r\n                  </label>\r\n                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                    Revenue %\r\n                  </label>\r\n                </div>\r\n                <div *ngIf=\"payoutSubmitted && payoutFormcontrol.payout_typeedit.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"payoutFormcontrol.payout_typeedit.errors.required\">Payout Type is required</div>\r\n              </div>   \r\n              </div>\r\n                <div *ngIf=\"payout_typevalueedit != 0\">\r\n                <div class=\"control-group mt-2\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Payout Amount :</label>\r\n                      <div class=\"input-group\">\r\n                        <div class=\"input-group-prepend\">\r\n                          <div class=\"input-group-text font-10\" id=\"btnGroupAddon\">$</div>\r\n                        </div>\r\n                        <input type=\"text\" formControlName=\"payout_amount\" class=\"form-control\" placeholder=\"Enter Payout Amount\" aria-label=\"Enter Payout Amount\" aria-describedby=\"btnGroupAddon\">\r\n                      </div>                 \r\n                </div>\r\n\r\n                <div class=\"control-group mt-2\">\r\n                  <label class=\"control-label input-label\" for=\"startTime\">Payout Trigger :</label>\r\n                    <select class=\"form-control\" formControlName=\"payout_trigger\">\r\n                      <option value=\"0\">Inbound Call</option>\r\n                      <option value=\"1\">Call Length</option>\r\n                      <option value=\"2\">Call Successfully Connected</option>\r\n                    </select>              \r\n                </div>\r\n                <div class=\"control-group mt-2\" *ngIf=\"this.payoutForm.get('payout_trigger').value == 1\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                    <input type=\"text\"  class=\"form-control\" type=\"text\" formControlName=\"payout_seconds\" placeholder=\"Enter Seconds\" />         \r\n                </div>\r\n                \r\n              </div>\r\n              </fieldset>\r\n          </div>\r\n       \r\n      </div>\r\n     \r\n         <div class=\"modal-footer\" style=\"padding: 0;\">\r\n          <!-- !addLabelForm.valid || -->\r\n            <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Publisher Payout</button>\r\n            <button data-dismiss=\"modal\" aria-label=\"Close\" type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Close</button>\r\n           </div>\r\n       </form>\r\n     </div>\r\n   </div>\r\n </div>\r\n </div>   \r\n\r\n  <!-- Add campaignpayout Modal -->\r\n<div class=\"modal fade\" id=\"addcampaignpayout\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Default Payout Settings </h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"addLabel\" [formGroup]=\"defaultpayoutForm\" (ngSubmit)=\"ondpayoutSubmit()\">\r\n        <div class=\"row\">\r\n         <div class=\"col-md-12\">\r\n           <fieldset class=\"scheduler-border\">\r\n             <legend class=\"scheduler-border\">Payout Setting</legend>\r\n               <div class=\"control-group mt-2\">\r\n                 <label class=\"control-label input-label\" for=\"startTime\">Payout Type :</label><br>\r\n                 <div class=\"btn-group w-100\" data-toggle=\"buttons\"> \r\n                 <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': dpayout_type==0}\" (click)=\"payout_typeedit(0)\"> \r\n                       <input class=\"form-check-input\" formControlName=\"payout_type\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                       None\r\n                     </label>\r\n                     <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': dpayout_type==1}\" (click)=\"payout_typeedit(1)\">\r\n                       <input class=\"form-check-input\" formControlName=\"payout_type\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                       Fixed Payout\r\n                     </label>\r\n                     <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': dpayout_type==2}\" (click)=\"payout_typeedit(2)\">\r\n                       <input class=\"form-check-input\" formControlName=\"payout_type\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                       Revenue %\r\n                     </label>\r\n                   </div>\r\n                   <div *ngIf=\"dpSubmitted && defaultpayoutFormcontrol.payout_type.errors\" class=\"invalid-feedback\">\r\n                     <div *ngIf=\"defaultpayoutFormcontrol.payout_type.errors.required\">Payout Type is required</div>\r\n                 </div>   \r\n                 </div>\r\n                   <div *ngIf=\"dpayout_type != 0\">\r\n                   <div class=\"control-group mt-2\">\r\n                       <label class=\"control-label input-label\" for=\"startTime\">Payout Amount :</label>\r\n                         <div class=\"input-group\">\r\n                           <div class=\"input-group-prepend\">\r\n                             <div class=\"input-group-text font-10\" id=\"btnGroupAddon\">$</div>\r\n                           </div>\r\n                           <input type=\"text\" formControlName=\"payout_amount\" class=\"form-control\" placeholder=\"Enter Payout Amount\" aria-label=\"Enter Payout Amount\" aria-describedby=\"btnGroupAddon\">\r\n                         </div>                 \r\n                   </div>\r\n                   \r\n                 <div class=\"control-group mt-2\">\r\n                   <label class=\"control-label input-label\" for=\"startTime\">Payout Trigger :</label>\r\n                     <select class=\"form-control\" formControlName=\"payout_trigger\" style=\"height: 35px;padding: 7px;\">\r\n                       <option value=\"0\">Inbound Call</option>\r\n                       <option value=\"1\">Call Length</option>\r\n                       <option value=\"2\">Call Successfully Connected</option>\r\n                     </select>              \r\n                 </div>\r\n                 <div class=\"control-group mt-2\" *ngIf=\"this.defaultpayoutForm.get('payout_trigger').value == 1\">\r\n                     <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                     <input type=\"text\"  class=\"form-control\" type=\"text\" formControlName=\"payout_seconds\" placeholder=\"Enter Seconds\" />         \r\n                 </div>\r\n                 </div>    \r\n             </fieldset>\r\n         </div>\r\n      \r\n     </div>\r\n    \r\n        <div class=\"modal-footer\" style=\"padding: 0;border: none;\">\r\n           <button (click)=\"closedpayoutModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect font-10\">Submit Payout</button>\r\n           <button data-dismiss=\"modal\" aria-label=\"Close\" type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect font-10\">Close</button>\r\n          </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>  \r\n\r\n <!-- Add Publisher Modal -->\r\n<div class=\"modal fade\" id=\"addpublisher\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\">\r\n   <div class=\"modal-content\">\r\n     <div class=\"modal-header\">\r\n       <h5 class=\"modal-title\" id=\"formModal\">Add Publisher To Campaign</h5>\r\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n         <span aria-hidden=\"true\">&times;</span>\r\n       </button>\r\n     </div>\r\n     <div class=\"modal-body\">\r\n       <form id=\"addLabel\" [formGroup]=\"publishtertocampaignForm\" (ngSubmit)=\"onpublisherSubmit()\">\r\n         <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n            <fieldset class=\"scheduler-border\">\r\n              <legend class=\"scheduler-border\">Add Publisher</legend>\r\n                <div class=\"control-group mt-2\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Publisher :</label>\r\n                    <angular2-multiselect [ngModelOptions]=\"{standalone: true}\" [data]=\"publisherdata\"  [settings]=\"pubdropdownSettings\" [(ngModel)]=\"publisherselected\"></angular2-multiselect>\r\n                </div>\r\n\r\n                <div class=\"control-group mt-2\">\r\n                  <label class=\"control-label input-label\" for=\"startTime\">Payout Type :</label>\r\n                  <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==0}\" (click)=\"payout_typevaledit(0)\"> \r\n                        <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                        None\r\n                      </label>\r\n                      <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payout_typevaledit(1)\">\r\n                        <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                        Fixed Payout\r\n                      </label>\r\n                      <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                        <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                        Revenue %\r\n                      </label>\r\n                    </div>\r\n                    <div *ngIf=\"publisherSubmitted && publisherFormcontrol.payout_typeedit.errors\" class=\"invalid-feedback\">\r\n                      <div *ngIf=\"publisherFormcontrol.payout_typeedit.errors.required\">Payout Type is required</div>\r\n                  </div>   \r\n                  </div>\r\n                    <div *ngIf=\"payout_typevalueedit != 0\">\r\n                    <div class=\"control-group mt-2\">\r\n                        <label class=\"control-label input-label\" for=\"startTime\">Payout Amount :</label>\r\n                          <div class=\"input-group\">\r\n                            <div class=\"input-group-prepend\">\r\n                              <div class=\"input-group-text font-10\" id=\"btnGroupAddon\">$</div>\r\n                            </div>\r\n                            <input type=\"text\" formControlName=\"payout_amount\" class=\"form-control\" placeholder=\"Enter Payout Amount\" aria-label=\"Enter Payout Amount\" aria-describedby=\"btnGroupAddon\">\r\n                          </div>                 \r\n                    </div>\r\n                    \r\n                  <div class=\"control-group mt-2\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Payout Trigger :</label>\r\n                      <select class=\"form-control\" formControlName=\"payout_trigger\">\r\n                        <option value=\"0\">Inbound Call</option>\r\n                        <option value=\"1\">Call Length</option>\r\n                        <option value=\"2\">Call Successfully Connected</option>\r\n                      </select>              \r\n                  </div>\r\n                  <div class=\"control-group mt-2\" *ngIf=\"this.publishtertocampaignForm.get('payout_trigger').value == 1\">\r\n                      <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                      <input type=\"text\"  class=\"form-control\" type=\"text\" formControlName=\"payout_seconds\" placeholder=\"Enter Seconds\" />         \r\n                  </div>\r\n                  </div>\r\n\r\n                  <div class=\"control-group mt-2\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Select Number :</label>\r\n                    <angular2-multiselect [ngModelOptions]=\"{standalone: true}\" [data]=\"numberdata\"  [settings]=\"dropdownSettings\" [(ngModel)]=\"publisherNumber\"></angular2-multiselect>   \r\n                  </div>\r\n                \r\n              </fieldset>\r\n          </div>\r\n       \r\n      </div>\r\n     \r\n         <div class=\"modal-footer\" style=\"padding: 0;\">\r\n          <!-- !addLabelForm.valid || -->\r\n            <button (click)=\"closepubModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Add Publisher</button>\r\n            <button data-dismiss=\"modal\" aria-label=\"Close\" type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Close</button>\r\n           </div>\r\n       </form>\r\n     </div>\r\n   </div>\r\n </div>\r\n </div>   \r\n\r\n<!-- Edit Routing Modal -->\r\n<div class=\"modal fade\" id=\"editRouting\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Edit Routing Plan</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"addLabel\" [formGroup]=\"editRoutingForm\" (ngSubmit)=\"oneditRoutingSubmit()\">\r\n          <fieldset class=\"scheduler-border\">\r\n             <legend class=\"scheduler-border\">Update Routing Plan</legend>\r\n               <div class=\"control-group mt-2\">\r\n                 <input type=\"hidden\" name=\"\" formControlName=\"uuid\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Pririty :</label>\r\n                <input type=\"number\" formControlName=\"priority\" class=\"form-control\"/>    \r\n              </div>\r\n              \r\n              <div class=\"control-group mt-2\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Weight :</label>\r\n                <input type=\"number\" formControlName=\"weight\" class=\"form-control\"/>    \r\n              </div>\r\n            \r\n               <div class=\"control-group mt-2\">\r\n                   <label class=\"control-label input-label\">Conversation Revenue :</label>\r\n                   <div class=\"input-group\">\r\n                    <div class=\"input-group-prepend\">\r\n                      <div class=\"input-group-text font-10\" id=\"btnGroupAddon\">$</div>\r\n                    </div>\r\n                    <input type=\"text\" formControlName=\"conversation_revenue\" class=\"form-control\" placeholder=\"Enter Conversation Revenue\" aria-label=\"Enter Conversation Revenue\" aria-describedby=\"btnGroupAddon\" [ngClass]=\"{ 'is-invalid': submitted && f.conversation_revenue.errors }\">\r\n                    <div *ngIf=\"submitted && f.conversation_revenue.errors\" class=\"invalid-feedback\">\r\n                      <div *ngIf=\"f.conversation_revenue.errors.required\">Conversation Revenue is required</div>\r\n                  </div>   \r\n                  </div>        \r\n               </div>\r\n              \r\n               <div class=\"control-group mt-2\">\r\n                   <label class=\"control-label input-label\" for=\"startTime\">Conversation Event :</label>\r\n                   <select formControlName=\"conversation_event\" class=\"form-control\"  [ngClass]=\"{ 'is-invalid': submitted && f.conversation_event.errors }\">\r\n                    <option value=\"0\">Call Length</option>\r\n                    <option value=\"1\">Call Successfully Connected</option>\r\n                  </select>  \r\n                   <div *ngIf=\"submitted && f.conversation_event.errors\" class=\"invalid-feedback\">\r\n                       <div *ngIf=\"f.conversation_event.errors.required\">Conversation Event is required</div>\r\n                  </div>       \r\n               </div>\r\n\r\n                 <div class=\"control-group mt-2\">\r\n                   <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                   <input type=\"text\" formControlName=\"conversation_seconds\" class=\"form-control\" type=\"text\" placeholder=\"Enter Seconds\" />                  \r\n                  \r\n                 </div>\r\n\r\n\r\n                 <div class=\"control-group mt-2\">\r\n                  <label>Restrict Duplicate</label>\r\n                  <select #restrictdup formControlName=\"restrictdup\" name=\"restrictdup\" id=\"restrictdup\" class=\"form-control\">\r\n                    <option value=\"0\">Buyer Settings (Do not Restrict)</option>\r\n                    <option value=\"1\">Do not Restrict</option>\r\n                    <option value=\"2\">By Campaign - Individual Target</option>\r\n                  </select>                              \r\n               </div>\r\n               <div *ngIf=\"restrictdup.value==2\">\r\n               <div class=\"control-group mt-2\">\r\n                  <label>Restrict After</label>\r\n                  <select formControlName=\"restrictafter\" name=\"restrictafter\" id=\"restrictafter\" class=\"form-control\">\r\n                    <option value=\"0\">Converted</option>\r\n                    <option value=\"1\">Connected</option>                          \r\n                  </select>                              \r\n               </div>\r\n                <div class=\"control-group\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Duration:</label>\r\n                    <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleDurationvalue==0}\" (click)=\"settingToggleDuration(0)\"> \r\n                          <input class=\"form-check-input\" name=\"settingToggleDuration\" formControlName=\"settingToggleDuration\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                          Always\r\n                    </label>\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': settingToggleDurationvalue==1}\" (click)=\"settingToggleDuration(1)\">\r\n                      <input class=\"form-check-input\" name=\"settingToggleDuration\" formControlName=\"settingToggleDuration\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                      Time Limit\r\n                    </label>                              \r\n                      </div>                \r\n               </div>                       \r\n                <br>\r\n                <div class=\"control-group row mt-2\" *ngIf=\"this.editRoutingForm.get('settingToggleDurationval').value==1\">\r\n                  <div class=\"col-3\"><input  formControlName=\"days\" style=\"width: 80px;\" type=\"number\"  class=\"form-control formcontrol\" name=\"\" id=\"\"></div>\r\n                  <div class=\"col-2 mt-2\"><span>Days</span></div>                           \r\n                </div>\r\n                </div>\r\n\r\n             </fieldset>\r\n         \r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n         <!-- !addLabelForm.valid || -->\r\n           <button (click)=\"closeroutingModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Edit Routing Plan</button>\r\n           <button data-dismiss=\"modal\" aria-label=\"Close\" type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Close</button>\r\n          </div>\r\n      </form>\r\n    \r\n</div>\r\n</div>   \r\n</div>   \r\n</div>\r\n\r\n<!-- Approve offer details -->\r\n<div class=\"modal fade\" id=\"approveoffermodel\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <b class=\"modal-title\" id=\"formModal\">Task Details</b>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <div class=\"row\">\r\n        <div class=\"col-md-3 font-12\">Publisher Name</div>\r\n        <div class=\"col-md-9 font-12\">{{parreqdata ? parreqdata.from:null}}</div>\r\n      </div> <br>\r\n\r\n      <div class=\"row\">\r\n        <div class=\"col-md-3 font-12\">Campaign Name</div>\r\n        <div class=\"col-md-9 font-12\">{{parreqdata ? parreqdata.campaign:null}}</div>\r\n      </div><br>\r\n    \r\n      <div class=\"row\">\r\n        <div class=\"col-md-3 font-12\">Description</div>\r\n        <div class=\"col-md-9 font-12\">{{parreqdata ? parreqdata.content:null}}</div>\r\n      </div><br> <hr style=\"background: #606060;\" class=\"mt-2\">\r\n    \r\n      <div class=\"row\">\r\n        <div class=\"col-md-12 d-flex\">\r\n          <input type=\"button\" (click)=\"approverejoffer(2)\" value=\"Approve\" class=\"w-auto btn btn-primary btn-sm\" style=\"background: #3858E7;\">  \r\n          <input type=\"button\" (click)=\"approverejoffer(3)\" value=\"Reject\" class=\"ml-2 w-auto btn btn-danger btn-sm\">  \r\n          <input type=\"button\" value=\"Close\" data-dismiss=\"modal\" aria-label=\"Close\" class=\"w-auto ml-2 btn btn-primary btn-sm\">  \r\n        </div>\r\n      </div>\r\n\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>  \r\n\r\n<div class=\"main-content\">\r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12 col-md-12 col-lg-12\">\r\n            <div style=\"border-top: 1px solid #2f3031\"></div>\r\n              <div class=\"row\">\r\n                <div class=\"col-12 col-md-12 col-lg-12\">\r\n                <div class=\"input-group\" style=\"background: #111319;padding-bottom: 11px;\">\r\n                  <button id=\"tabs1\" (click)=\"getType(1,0)\" class=\"camtabsbtn camactivetab\"><i class=\"fa fa-cog m-r-5 f-s-14\"></i> Campaign Settings</button>\r\n                  <button id=\"tabs2\" (click)=\"getType(2,0)\" class=\"camtabsbtn\"><i class=\"fa fa-users m-r-5 f-s-14\"></i> Offer <i *ngIf=\"offerdetails && offerdetails.status==1\" class=\"fa fa-circle text-success\"></i></button>                  \r\n                </div>   \r\n              </div>\r\n            </div>  \r\n            <div class=\"row\" [style.display]=\"filtertype == 1?'block':'none'\">\r\n              <div class=\"col-12 col-md-12 col-lg-12\">\r\n              <form [formGroup]=\"editForm\" (ngSubmit)=\"onSubmit()\" >\r\n              <div class=\"card\" >\r\n                <div class=\"card-body\" >\r\n                  \r\n                  <fieldset class=\"scheduler-border\">\r\n                  <legend class=\"scheduler-border\">Setup Your Campaign</legend>\r\n                  <section>\r\n                    <strong>Name your Campaign and choose your country.</strong>\r\n                    <hr>\r\n                    <div class=\"form-group row\">\r\n                      <div class=\"col-sm-2\"></div>  \r\n                      <label class=\"col-sm-2 col-form-label\">Campaign Name</label>\r\n                      <div class=\"col-sm-5\">\r\n                        <input formControlName=\"campaignName\" type=\"text\" class=\"form-control\"  [ngClass]=\"{ 'is-invalid': Submitted && editFormcontrol.campaignName.errors }\" (input)=\"validatename()\">\r\n                        <div *ngIf=\"Submitted && editFormcontrol.campaignName.errors\" class=\"invalid-feedback\">\r\n                          <div *ngIf=\"editFormcontrol.campaignName.errors.required\">Campaign Name is required</div>\r\n                      </div>                              \r\n                      <div *ngIf=\"isName == 'success'  && isName != ''\" style=\"color:green;\">\r\n                        Name Is Available\r\n                      </div> \r\n                      <div *ngIf=\"isName == 'fail' && isName != ''\" style=\"color:red;\">\r\n                        Name Is Not Available\r\n                      </div>   \r\n\r\n                      </div>\r\n                    </div>\r\n                  \r\n                    <div class=\"form-group row\">\r\n                      <div class=\"col-sm-2\"></div>  \r\n                      <label class=\"col-sm-2 col-form-label\">Country</label>\r\n                      <div class=\"col-sm-5\">\r\n                        <select formControlName=\"country\" class=\"form-control\">\r\n                            <option value=\"\">Select Country</option>\r\n                            <option value=\"United States\">United States</option>\r\n                            <option value=\"United Kingdom\">United Kingdom</option>\r\n                        </select>\r\n                      </div>\r\n                    </div>\r\n                  </section>\r\n          </fieldset>\r\n\r\n          <fieldset class=\"scheduler-border\" >\r\n            <legend class=\"scheduler-border\">Default Payout Settings</legend>    \r\n            <section>\r\n             <div class=\"dps\" #targetDiv>\r\n          <input type=\"button\" *ngIf=\"defaultconf==''\" data-toggle=\"modal\" data-target=\"#addcampaignpayout\" value=\"+ ADD CAMPAIGN PAYOUT SETTINGS\" class=\"btn btn-primary btn-sm p-1 mb-3\">\r\n          <div style=\"border-left: 4px solid #3858e7 !important;left: 16px;background: #13161f;padding: 8px\" *ngIf=\"defaultconf!=''\">\r\n            <div class=\"row\" >\r\n              <div class=\"col-md-10 font-13\"><span style=\"color: gray;\">1 | </span> {{defaultconf}}</div>        \r\n              <div class=\"col-md-2 text-right pr-4 font-13\" style=\"cursor: pointer;\"><i class=\"fa fa-edit\" data-toggle=\"modal\" data-target=\"#addcampaignpayout\"></i> <i (click)=\"Deletedefaultpayout()\" class=\"ml-2 mr-2 fa fa-trash\"></i></div>        \r\n            </div>   \r\n          </div>   \r\n        </div> \r\n        </section>\r\n        </fieldset>\r\n\r\n\r\n          <fieldset class=\"scheduler-border\">\r\n              <legend class=\"scheduler-border\">Publishers</legend>    \r\n              <section>\r\n            \r\n            <input type=\"button\"  data-toggle=\"modal\" data-target=\"#addpublisher\" value=\"+ ADD PUBLISHER TO CAMPAIGN\" class=\"btn btn-primary btn-sm p-1 mb-3\">\r\n            <button (click)=\"exportdata()\" type=\"button\" class=\"btn btn-primary ml-2 waves-effect btn-sm p-1 mb-3\">Export</button>\r\n\r\n            <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n              <thead>\r\n                <tr>\r\n                  <th>Enabled</th>\r\n                  <th>Publisher</th>\r\n                  <th>Number</th>\r\n                  <th>Associated Label</th>\r\n                  <th>Configuration Overrides</th>\r\n                  <th>Status</th>\r\n                  <th>Actions</th>                                        \r\n                </tr>\r\n              </thead>\r\n              <tbody *ngIf=\"campaignpublisher?.length != 0\">\r\n                  <tr *ngFor=\"let data of campaignpublisher\">\r\n                      <td>\r\n                        <div *ngIf=\"data.enabled==1\" class=\"badge badge-success\">Yes</div>\r\n                        <div *ngIf=\"data.enabled==0\" class=\"badge badge-danger\">No</div>\r\n                      </td>\r\n                      <td>{{data.publisher}}</td>\r\n                      <td>{{data.phoneno}}</td>\r\n                      <td>\r\n                        <span *ngFor=\"let labels of data.labels?.split(',')\">\r\n                            <span class=\"badge badge-primary p-1 ml-1\">{{labels}}</span><br>\r\n                        </span>\r\n                      </td> \r\n                      <td>{{data.conf}}</td>\r\n                      <td>\r\n                        <div *ngIf=\"data.status==1\" class=\"fa fa-circle text-success\"></div>\r\n                        <div *ngIf=\"data.status==0\" class=\"fa fa-circle text-danger\"></div>                     \r\n                      </td>\r\n                      <td><div data-toggle=\"modal\" (click)=\"getpayoutdata(data.publisher_uuid,data.phoneno,data.number_uuid)\" data-target=\"#addLabels\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></div>&nbsp;\r\n                        <div (click)=\"DeletePublisherPayout((data.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></div>\r\n                      </td>\r\n                  </tr>\r\n              </tbody>\r\n              <tbody *ngIf=\"campaignpublisher?.length == 0\">\r\n                <tr>\r\n                  <td colspan=\"6\" class=\"no-data-available\">No data Available!</td>\r\n                </tr>\r\n              <tbody>\r\n            </table>\r\n          </section>\r\n          </fieldset>\r\n\r\n          <fieldset class=\"scheduler-border\">\r\n          <legend class=\"scheduler-border\">Target</legend>    \r\n          <section>\r\n            \r\n          <div class=\"row\">\r\n            <div class=\"col-md-6\">\r\n              <strong>Forward your calls to buyers, call centers, or anywhere you'd like them to go.</strong><hr>\r\n            <!-- <input type=\"button\" style=\"width: 100px;\" data-toggle=\"modal\" data-target=\"#addTarget\" value=\"+ NEW\" class=\"btn btn-primary btn-sm p-1 mb-3\"> -->\r\n            \r\n              <table #dataTableTarget class=\"table table-striped  dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n              <thead>\r\n                <tr>\r\n                  <th>Name</th>\r\n                  <th>Destination</th>\r\n                  <!-- <th>Status</th> -->\r\n                  <th>Add</th>                                        \r\n                </tr>\r\n              </thead>\r\n              <tbody *ngIf=\"allTargets?.length != 0\">\r\n                  <tr *ngFor=\"let data of allTargets\">\r\n                      <td>{{data.name}}</td>\r\n                      <!-- <td>{{data.valtype}} - {{data.typeval}}</td> -->\r\n                      <td *ngIf=\"data.valtype =='IVR Menu'\"><a style=\"color: white;text-decoration: underline;\" routerLink=\"/edit-ivr/{{ data.ivrmenu_uuid }}\" >{{data.valtype}} - {{data.typeval}}</a></td>\r\n                      <td *ngIf=\"data.valtype !='IVR Menu'\">{{data.valtype}} - {{data.typeval}}</td>\r\n                      <!-- <td>\r\n                        <div *ngIf=\"data.status==0\" class=\"fa fa-circle text-success\"></div>\r\n                        <div *ngIf=\"data.status==1\" class=\"fa fa-circle text-danger\"></div>\r\n                      </td> -->\r\n                      <td *ngIf=\"data.isavailinpayout==0\"><div (click)=\"setRouting(data.uuid)\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"fa fa-arrow-right\"></i></div>\r\n                      </td>\r\n                      <td *ngIf=\"data.isavailinpayout!=0\">\r\n                        <span class=\"badge badge-success\">Added</span>\r\n                      </td>\r\n                  </tr>\r\n              </tbody>\r\n              <tbody *ngIf=\"allTargets?.length == 0\">\r\n                <tr>\r\n                  <td colspan=\"5\" class=\"no-data-available\">No data Available!</td>\r\n                </tr>\r\n              <tbody>\r\n            </table>\r\n          </div>\r\n          <div class=\"col-md-6\">\r\n            <strong>Routing Plan</strong><hr>\r\n            <table #dataTableRouting class=\"table table-striped table-responsive dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n            <thead>\r\n              <tr>\r\n                <th>Priority</th>\r\n                <th>Weight</th>\r\n                <th>Name</th>\r\n                <th>Destination</th>\r\n                <!-- <th>Type</th>                                         -->\r\n                <th>Revenue</th>                                        \r\n                <th>Status</th>                                        \r\n                <!-- <th>Status</th>                                         -->\r\n                <th>Action</th>                                        \r\n              </tr>\r\n            </thead>\r\n            <tbody *ngIf=\"allRoutingPlan?.length != 0\">\r\n                <tr *ngFor=\"let data of allRoutingPlan;let i = index;\">\r\n                  <!-- <td *ngIf=\"data.priority==0\">{{i+1}}</td> -->\r\n                  <!-- <td *ngIf=\"data.priority!=0\">{{data.priority}}</td> -->\r\n                  <td><input type=\"number\" style=\"font-size:12px\" (change)=\"changeVal(data.uuid,$event.target.value,1)\" formControlName=\"priority\" class=\"form-control\" value=\"{{data.priority}}\" />    </td>\r\n                  <td><input type=\"number\" style=\"font-size:12px\" (change)=\"changeVal(data.uuid,$event.target.value,0)\" formControlName=\"priority\" class=\"form-control\" value=\"{{data.weight}}\" />    </td>\r\n                  <!-- <td>{{data.weight}}</td> -->\r\n                  <td *ngIf=\"data.destinationtype ==1\"><a style=\"color: white;text-decoration: underline;\" routerLink=\"/edit-ivr/{{ data.destinationuuid }}\" >\r\n                    {{data.name}}</a></td>\r\n                  <td *ngIf=\"data.destinationtype !=1\">\r\n                    <a style=\"color: white;text-decoration: underline;\" routerLink=\"/edit-numbers/{{data.target_uuid }}\" >\r\n                    {{data.name}}\r\n                    </a>\r\n                  </td>\r\n                  \r\n                  <td *ngIf=\"data.destinationtype ==1\"><a style=\"color: white;text-decoration: underline;\" routerLink=\"/edit-ivr/{{ data.destinationuuid }}\" >\r\n                    {{data.destination}}</a></td>\r\n                  <td *ngIf=\"data.destinationtype !=1\">\r\n                    <a style=\"color: white;text-decoration: underline;\" routerLink=\"/edit-numbers/{{data.target_uuid }}\" >\r\n                    {{data.destination}}\r\n                    </a>\r\n                  </td>                \r\n                  <td>{{data.revenue}}</td>\r\n                  <td>\r\n                    <div *ngIf=\"data.status==1\" class=\"fa fa-circle text-success\"></div>\r\n                    <div *ngIf=\"data.status==0\" class=\"fa fa-circle text-danger\"></div>\r\n                  </td>\r\n                  <!-- <td>\r\n                  <div *ngIf=\"data.status==0\" class=\"fa fa-circle text-success\"></div>\r\n                  <div *ngIf=\"data.status==1\" class=\"fa fa-circle text-danger\"></div>\r\n                </td> -->\r\n                  <td><div (click) =\"editRoutingdata(data.uuid,data.priority,data.weight,data.revenuevalue,data.type,data.seconds,data.restrictdup,data.restrictafter,data.settingToggleDurationval,data.days)\" data-toggle=\"modal\" data-target=\"#editRouting\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"fa fa-edit\"></i></div>&nbsp;<div (click)=\"DeleteRoutingPlan((data.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></div>\r\n                </td>\r\n                </tr>\r\n            </tbody>\r\n            <tbody *ngIf=\"allRoutingPlan?.length == 0\">\r\n              <tr>\r\n                <td colspan=\"6\" class=\"no-data-available\">No data Available!</td>\r\n              </tr>\r\n            <tbody>\r\n          </table>\r\n          </div>\r\n        </div>\r\n          </section>    \r\n          </fieldset>\r\n\r\n              <fieldset class=\"scheduler-border\">\r\n                <legend class=\"scheduler-border\">Recording Settings</legend>\r\n              <div class=\"form-group\">\r\n                <div class=\"control-label mt-2\">Recording</div>\r\n                <label class=\"custom-switch mt-2 pl-0\">\r\n                  <input type=\"checkbox\" [checked]=\"isrecording==1\" (change)=\"get_recordingstatus($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                  <span class=\"custom-switch-indicator\"></span>                     \r\n                </label>              \r\n              </div>        \r\n            </fieldset>\r\n                  <br>\r\n                  <button class=\"btn btn-primary mr-2\" type=\"submit\">Update</button>\r\n                  <button style=\"margin-right: 4px;\" routerLink=\"/campaigns\" class=\"btn btn-primary\">Back To All Campaigns</button>                    \r\n                    \r\n                </div>              \r\n              </div>\r\n              </form>\r\n              </div>\r\n            </div>  \r\n\r\n            <div class=\"row\" [style.display]=\"filtertype == 2?'block':'none'\">\r\n              <div class=\"col-12 col-md-12 col-lg-12\">\r\n                <div class=\"card\" >\r\n                  <div class=\"card-body\" >\r\n                    \r\n                    <fieldset class=\"scheduler-border\" style=\"border-left: 4px solid #3858e7 !important;\" *ngIf=\"isshowmessage\">\r\n                    <section class=\"pt-4\" >\r\n                      <h6>An Offer is a convenient way to present the campaign to your publishers. It is a public representation of the campaign that allows publishers to quickly decide whether they want to send calls to a campaign and whether their calls meet the requirements.</h6>\r\n                      <input type=\"button\" value=\"Hide\" class=\"btn btn-primary btn-sm p-1 mb-3\" (click)=\"isshowmessagetoggle()\" >\r\n                      <!-- <input type=\"button\" value=\"Don't show this again\" class=\"ml-1 btn btn-primary btn-sm p-1 mb-3\"> -->\r\n                    </section>\r\n                    </fieldset>\r\n                    <div *ngIf=\"campaignoffers?.length>0\">\r\n                        <fieldset class=\"scheduler-border\">\r\n                            <legend class=\"scheduler-border\">Your Offer is Published! Here are some next steps.</legend>    \r\n                            <section class=\"p-2\">\r\n                              <div class=\"row mt-2\">\r\n                                <div class=\"col-md-3\"> \r\n                                  <div class=\"thumbnail text-center\"> <img width=\"130\" src=\"./assets/img/call-tracking.png\"> <div class=\"caption text-center mt-2\"> <p><strong class=\"font-14\">1. Configure Payouts Settings</strong></p> <p class=\"font-12\">Payout Settings allow you to define default payout settings for all Offer Publishers.</p> </div> <br>\r\n                                  <br><input (click)=\"getType(1,1)\" type=\"button\" value=\"Configure Payouts\" class=\"btn btn-primary font-13\" style=\"background-color: #3858e7;\">\r\n                                  </div> \r\n                                </div>        \r\n                                \r\n                                <div class=\"col-md-3\"> \r\n                                  <div class=\"thumbnail text-center\"> <img width=\"130\" src=\"./assets/img/payout.png\"> <div class=\"caption text-center mt-2\"> <p><strong class=\"font-14\">2. Invite Some Publishers</strong></p> <p class=\"font-12\">Invite your Publishers to participate in your new Offer. If your offer visibility is set to \"Account\", any Publisher in this account will be able to join this Offer.</p> </div> <br>\r\n                                  <input type=\"button\" (click)=\"getType(1,2)\" value=\"Invite Publishers\" class=\"btn btn-primary font-13\" style=\"background-color: #3858e7;\">\r\n                                  </div> \r\n                                </div>        \r\n                                \r\n                                <div class=\"col-md-3\"> \r\n                                  <div class=\"thumbnail text-center\"> <img width=\"130\" src=\"./assets/img/url-tracking.png\"> <div class=\"caption text-center mt-2\"> <p><strong class=\"font-14\">3. Refine Offer Details</strong></p> <p class=\"font-12\">Communicate Offer details and restrictions in the Offer \"Description\" and \"Notes\" to ensure only the best Publishers for this Offer participate.</p> </div> <br>\r\n                                  <input type=\"button\" [scrollTo]=\"'#place1'\" [scrollDuration]=\"1000\" [scrollOffset]=\"-100\" value=\"Add Details\" class=\"btn btn-primary font-13\" style=\"background-color: #3858e7;\">\r\n                                  </div> \r\n                                </div>        \r\n                                \r\n                                <div class=\"col-md-3\"> \r\n                                  <div class=\"thumbnail text-center\"> <img width=\"130\" src=\"./assets/img/optimize.png\"> <div class=\"caption text-center mt-2\"> <p><strong class=\"font-14\">4. Configure Number Restrictions</strong></p> <p class=\"font-12\">Override Offer number restrictions to allow specific participating Publishers more flexibility for allocating numbers.</p> </div> <br>\r\n                                <br> <input type=\"button\" value=\"Override Restrictions\" class=\"btn btn-primary font-13\" style=\"background-color: #3858e7;\">\r\n                                  </div> \r\n                                </div>        \r\n\r\n                            </div> \r\n                            </section>\r\n                        </fieldset>\r\n\r\n                        <div *ngIf=\"offerdetails && offerdetails.status==1\" style=\"background: #252C44;padding: 15px;\">\r\n                          <h6>Participation Requests</h6>\r\n                          <div class=\"row\">\r\n                            <div class=\"col-12 col-md-12 col-lg-12\">\r\n                              <div class=\"input-group\" style=\"background: #111319;padding-bottom: 11px;\">\r\n                                <button id=\"tabs3\" style=\"width: 50%;height: 41px;\" (click)=\"getParticipationType(1)\" class=\"camactivetab camtabsbtn\">Pending Requests <span class=\"badge badge-danger\" *ngIf=\"pendingdata?.length>0\">{{pendingdata?.length}}</span></button>\r\n                                <button style=\"width: 50%;height: 41px;\" id=\"tabs4\" (click)=\"getParticipationType(2)\" class=\"camtabsbtn\">Request History <span class=\"badge badge-success\" *ngIf=\"completed?.length>0\">{{completed?.length}}</span></button>                                \r\n                              </div>   \r\n                            </div>\r\n                          </div>  \r\n                          \r\n                          <div class=\"row\" [style.display]=\"pfiltertype == 1?'block':'none'\">\r\n                          <div class=\"col-12 col-md-12 col-lg-12\">\r\n                          \r\n                              <div>\r\n                                <ngx-ui-loader [loaderId]=\"'loader-03'\"></ngx-ui-loader>\r\n                                <div class=\"table-responsive\">\r\n                                  <table class=\"table table-striped dataTable no-footer row-border hover\" datatable [dtOptionsPending]=\"dtOptionsPending\" [dtTrigger]=\"dtTrigger\">\r\n                \r\n                                    <thead>\r\n                                      <tr>\r\n                                        <th>Description</th>\r\n                                        <th>From</th>\r\n                                        <th>Status</th>\r\n                                        <th>Created</th>           \r\n                                      </tr>\r\n                                    </thead>\r\n                                    <tbody *ngIf=\"pendingdata?.length != 0\">\r\n                                      <tr *ngFor=\"let data of pendingdata\" style=\"cursor:pointer\">\r\n                                          <td data-toggle=\"modal\" data-target=\"#approveoffermodel\" (click)=\"reqdata(data)\">{{data.description}} <br>\r\n                                          {{data.subdescription}}\r\n                                          </td>\r\n                                          <td data-toggle=\"modal\" data-target=\"#approveoffermodel\" (click)=\"reqdata(data)\">{{data.from}}</td>\r\n                                          <td data-toggle=\"modal\" data-target=\"#approveoffermodel\" (click)=\"reqdata(data)\"><span class=\"badge badge-primary\">Open</span></td>\r\n                                          <td>{{data.created_at}}</td>\r\n                                      </tr>\r\n                                  </tbody>\r\n                                    <tbody *ngIf=\"pendingdata?.length == 0\">\r\n                                      <tr>\r\n                                        <td colspan=\"4\" class=\"no-data-available\">No data Available!</td>\r\n                                      </tr>\r\n                                    <tbody>\r\n                                  </table>\r\n                                </div>\r\n                              </div>\r\n                            \r\n                            </div>              \r\n                          </div>              \r\n                        \r\n                          <div class=\"row\" [style.display]=\"pfiltertype == 2?'block':'none'\">\r\n                          <div class=\"col-12 col-md-12 col-lg-12\">\r\n                          \r\n                              <div class=\"\">\r\n                                <ngx-ui-loader [loaderId]=\"'loader-03'\"></ngx-ui-loader>\r\n                                <div class=\"table-responsive\">\r\n                                  <table class=\"table table-striped dataTable no-footer row-border hover\" datatable [dtOptionsPending]=\"dtOptionsPending\" [dtTrigger]=\"dtTrigger\">\r\n                \r\n                                    <thead>\r\n                                      <tr>\r\n                                        <th>Description</th>\r\n                                        <th>From</th>\r\n                                        <th>Status</th>\r\n                                        <th>Completed</th>           \r\n                                      </tr>\r\n                                    </thead>\r\n                                    <tbody *ngIf=\"completed?.length != 0\">\r\n                                      <tr *ngFor=\"let data of completed\">\r\n                                          <td>{{data.description}} <br>\r\n                                          {{data.subdescription}}\r\n                                          </td>\r\n                                          <td>{{data.from}}</td>\r\n                                          <td><span class=\"badge badge-success\">Completed</span></td>\r\n                                          <td>{{data.updated_at}}</td>\r\n                                      </tr>\r\n                                  </tbody>\r\n                                    <tbody *ngIf=\"completed?.length == 0\">\r\n                                      <tr>\r\n                                        <td colspan=\"4\" class=\"no-data-available\">No data Available!</td>\r\n                                      </tr>\r\n                                    <tbody>\r\n                                  </table>\r\n                                </div>\r\n                              </div>\r\n                            \r\n                            </div>              \r\n                          </div> \r\n                          <!-- <br/>\r\n                          <div *ngIf=\"diffdays!=0\" [ngClass]=\"{'text-danger': diffdays<5, 'text-success': diffdays>5}\" class=\"text-right font-15\">{{offerdetails ? offerdetails.exp_date:null}} ({{diffdays}} Days Left)</div>\r\n                          <div *ngIf=\"diffdays==0\" [ngClass]=\"{'text-danger': diffdays<5, 'text-success': diffdays>5}\" class=\"text-right font-15\">{{offerdetails ? offerdetails.exp_date:null}} (Plan Expired)</div> -->\r\n                      </div>\r\n                        <br>\r\n                        <div *ngIf=\"(offerdetails) || (isadded)\">\r\n                        <h6>Published Offer</h6>\r\n                        <hr style=\"background: green;\" class=\"mt-1\">\r\n\r\n                        <div class=\"row\">\r\n                          <div class=\"col-md-3 font-12\">Offer Title</div>\r\n                          <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.name:null}}</div>\r\n                        </div> \r\n                        <div class=\"row mt-3\">\r\n                          <div class=\"col-md-3 font-12\">Description</div>\r\n                          <div class=\"col-md-3 font-12\">\r\n                            <div [innerHTML]=\"offerdetails ? offerdetails.description:null\"></div>                            \r\n                          </div>\r\n                        </div>\r\n                        <div class=\"row mt-3\">\r\n                          <div class=\"col-md-3 font-12\">Payout</div>\r\n                          <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.payout:null}}</div>\r\n                        </div>\r\n                        <div class=\"row mt-3\">\r\n                          <div class=\"col-md-3 font-12\">Duration</div>\r\n                          <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.duration:null}}</div>\r\n                        </div>\r\n                        <div class=\"row mt-3\">\r\n                          <div class=\"col-md-3 font-12\">Hours Of Operation</div>\r\n                          <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.hoursofoperation:null}}</div>\r\n                        </div>\r\n                        <div class=\"row mt-3\">\r\n                          <div class=\"col-md-3 font-12\">Expiry Date</div>\r\n                          <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.exp_date:null}}</div>\r\n                        </div>\r\n                        <div class=\"row mt-3\">\r\n                          <div class=\"col-md-3 font-12\">Require Approval</div>\r\n                          <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.req_approval==1\"><i class=\"fa fa-check\"></i></div>\r\n                          <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.req_approval==0\"><i class=\"fa fa-times\"></i></div>\r\n                        </div>\r\n                        <br>\r\n                        <!-- <strong class=\"font-15\">Publisher Number Limits</strong>\r\n                        <div class=\"row mt-3\">\r\n                          <div class=\"col-md-3 font-12\">Max Numbers Per Publisher</div>\r\n                          <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.max_no_per_publisher:null}}</div>\r\n                        </div>\r\n                        <div class=\"row mt-3\">\r\n                          <div class=\"col-md-3 font-12\">Allow Toll-Free Number</div>\r\n                          <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_tollfree_no==1\"><i class=\"fa fa-check\"></i></div>\r\n                          <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_tollfree_no==0\"><i class=\"fa fa-times\"></i></div>\r\n                        </div>\r\n                        <div class=\"row mt-3 mb-4\">\r\n                          <div class=\"col-md-3 font-12\">Allow DID Numbers</div>\r\n                          <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_did_no==1\"><i class=\"fa fa-check\"></i></div>\r\n                          <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_did_no==0\"><i class=\"fa fa-times\"></i></div>\r\n                        </div>    -->\r\n                        \r\n                        <button class=\"w-auto btn btn-primary btn-sm\" (click)=\"isedittoggle()\"><i class=\"fa fa-edit\"></i> Edit</button>\r\n                        \r\n                        <button *ngIf=\"(offerdetails && offerdetails.status==2)\" class=\"ml-2 w-auto btn btn-primary btn-sm\" (click)=\"changeofferstatus(1)\" style=\"background: #3858E7;\"><i class=\"fa fa-pause\"></i> Resume Offer</button>\r\n                        \r\n                        <button *ngIf=\"(offerdetails && offerdetails.status!=2)\" class=\"ml-2 w-auto btn btn-primary btn-sm\" (click)=\"changeofferstatus(2)\" style=\"background: #3858E7;\"><i class=\"fa fa-pause\"></i> Pause Offer</button>\r\n\r\n                        <button class=\"w-auto ml-2 btn btn-primary btn-sm\" (click)=\"changeofferstatus(3)\" style=\"border: 1px solid red!important\"><i class=\"fa fa-power-off\"></i> End Offer</button>\r\n\r\n                        <br>\r\n                        <br>\r\n                        \r\n                        </div>\r\n\r\n                      \r\n                    </div>  \r\n          \r\n                    <div *ngIf=\"campaignoffers?.length==0 || isedit\" id=\"editdiv\" class=\"editdiv\" #place1>\r\n                        <input *ngIf=\"!iscreateoffer && !offerdetails\" type=\"button\" (click)=\"iscreateoffertoggle()\" value=\"+ Create Offer\" class=\"btn btn-primary font-13 p-2 mb-3\" style=\"border: 1px solid green!important\">\r\n\r\n                        <div *ngIf=\"iscreateoffer\">\r\n                          \r\n                        <div class=\"row mt-2 mb-0 pb-0\">\r\n                          <div class=\"col-md-12 font-16\" *ngIf=\"!isedit\">New Offer</div>        \r\n                          <div class=\"col-md-12 font-16\" *ngIf=\"isedit\">Draft</div>        \r\n                        </div>\r\n                          <hr style=\"background: #606060;\" class=\"mt-2\">\r\n\r\n                          <form id=\"addoffer\" [formGroup]=\"addofferForm\" (ngSubmit)=\"onAddOfferSubmit(buttonType)\">\r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-3 font-13 text-right\" >Display Name  <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"The hours of operation where your publisher should be credited for calls.\"></i></div>        \r\n                            <div class=\"col-md-5 font-13\" >\r\n                                <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': addofferSubmitted && addOfferFormcontrol.name.errors }\" required>\r\n                                <div *ngIf=\"addofferSubmitted && addOfferFormcontrol.name.errors\" class=\"invalid-feedback\">\r\n                                    <div *ngIf=\"addOfferFormcontrol.name.errors.required\">Name is required</div>\r\n                                </div>   \r\n                            </div>     \r\n                            \r\n                          </div><br>\r\n                         \r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-3 font-13 text-right\">Description  <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"The hours of operation where your publisher should be credited for calls.\"></i></div>        \r\n                            <div class=\"col-md-5 font-13\" >\r\n                                  <!-- <input type=\"text\" formControlName=\"description\" class=\"form-control\">                                 -->\r\n                                  <!-- <editor [init]=\"{\r\n                                    apiKey:'qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc',\r\n                                    height: 500,\r\n                                    skin: 'borderless',\r\n                                    menubar: false,\r\n                                  }\"></editor> -->\r\n                                  <editor\r\n                                  apiKey=\"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc\"\r\n                                  class=\"mat-elevation-z1\"          \r\n                                  formControlName=\"description\"\r\n                                  [init]=\"{\r\n                                    icons: 'material',\r\n                                    skin: 'oxide-dark',\r\n                                    content_css: 'dark',                                                                        \r\n                                    min_height: 150,\r\n                                    plugins: [\r\n                                      'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',\r\n                                      'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',\r\n                                      'insertdatetime', 'media', 'table', 'help', 'wordcount'\r\n                                    ],\r\n                                    toolbar: 'undo redo | blocks | ' +\r\n                                    'bold italic backcolor | alignleft aligncenter ' +\r\n                                    'alignright alignjustify | bullist numlist outdent indent | ' +\r\n                                    'removeformat | help',\r\n                                    content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }'\r\n                                  }\"\r\n                                ></editor>\r\n\r\n                                  <!-- <tinymce [(ngModel)]=\"html\" [config]=\"config\"></tinymce> -->\r\n                            </div>        \r\n                          </div><br>\r\n\r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-3 font-13 text-right\">Hours of Operation  <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"The hours of operation where your publisher should be credited for calls.\"></i></div>        \r\n                            <div class=\"col-md-5 font-13\" >\r\n                                  <input type=\"text\" formControlName=\"hoursofoperation\" class=\"form-control\">                                \r\n                            </div>        \r\n                          </div><br>\r\n\r\n\r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-3 font-13 text-right\" >Expiration Timezone  <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"The hours of operation where your publisher should be credited for calls.\"></i></div>        \r\n                            <div class=\"col-md-5 font-13\" >\r\n                                  <select name=\"\" id=\"\" class=\"form-control\" formControlName=\"exp_timezone\">\r\n                                    <option value=\"\">Select Timezone</option>\r\n                                    <option value=\"{{item.id}}\" *ngFor=\"let item of alltimezone\">{{item.gmtzone}}</option>\r\n                                  </select>                              \r\n                            </div>        \r\n                          </div><br>\r\n                        \r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-3 font-13 text-right\" >Expiration Date <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"The hours of operation where your publisher should be credited for calls.\"></i></div>        \r\n                            <div class=\"col-md-3 font-13\" >\r\n                                  <input type=\"date\" formControlName=\"exp_date\" [(ngModel)]=\"today\" class=\"form-control\" id=\"\">          \r\n                            </div>        \r\n                            <div class=\"col-md-2 font-13\" >\r\n                                <div  style=\"display:-webkit-inline-box\">\r\n                                  <div class=\"form-group\">\r\n                                      <input style=\"width:68px\" formControlName=\"start_hrs\"  type=\"number\" min=\"0\" max=\"23\"  class=\"form-control\">                       \r\n                                  </div> \r\n                                  <div class=\"pt-2\">\r\n                                    :\r\n                                  </div>\r\n                                <div class=\"text-left\">\r\n                                    <div class=\"form-group\">\r\n                                        <input style=\"width:68px\" formControlName=\"start_min\" type=\"number\" min=\"0\" max=\"59\"  class=\"form-control\">\r\n                                    </div>      \r\n                                </div>\r\n                              </div>   \r\n                            </div>        \r\n                          </div><br>\r\n<!--                         \r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-3 font-13 text-right\" >Offer Visibility <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"The hours of operation where your publisher should be credited for calls.\"></i></div>        \r\n                            <div class=\"col-md-5 font-13\" >\r\n                                  <select name=\"\" id=\"\" class=\"form-control\" formControlName=\"offer_\">\r\n                                    <option value=\"\">Private</option>\r\n                                    <option value=\"\">Account</option>\r\n                                  </select>                              \r\n                            </div>        \r\n                          </div><br> -->\r\n                        \r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-3 font-13 text-right\" >Require Approval <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"The hours of operation where your publisher should be credited for calls.\"></i></div>        \r\n                            <div class=\"col-md-5 font-13\" >\r\n                              <div class=\"form-group\">\r\n                                <label class=\"custom-switch pl-0\">\r\n                                  <input type=\"checkbox\" [checked]=\"is_approval==1\" (change)=\"is_approvaltoggle($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                                  <span class=\"custom-switch-indicator\"></span>                     \r\n                                </label>              \r\n                              </div>  \r\n                            </div>        \r\n                          </div><br>\r\n\r\n                          <div class=\"row mt-2 mb-0 pb-0\">\r\n                            <div class=\"col-md-12 font-16\">Publisher Number Limits</div>        \r\n                          </div>\r\n                          <hr style=\"background: #606060;\" class=\"mt-2\">\r\n\r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-3 font-13 text-right\" >Max Numbers Per Publisher  <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"The hours of operation where your publisher should be credited for calls.\"></i></div>                        \r\n                            <div class=\"col-md-5 font-13 d-flex\" >\r\n                                <input type=\"number\" formControlName=\"max_no_per_publisher\" class=\"form-control appleinput\" >                                \r\n                            </div>                                    \r\n                          </div><br>\r\n\r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-3 font-13 text-right\" >Allow Toll-Free Numbers <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"The hours of operation where your publisher should be credited for calls.\"></i></div>        \r\n                            <div class=\"col-md-5 font-13\" >\r\n                              <div class=\"form-group\">\r\n                                <label class=\"custom-switch pl-0\">\r\n                                  <input type=\"checkbox\" [checked]=\"isallow_tollfree_no==1\" (change)=\"allow_tollfree_notoggle($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                                  <span class=\"custom-switch-indicator\"></span>                     \r\n                                </label>              \r\n                              </div>  \r\n                            </div>        \r\n                          </div><br>\r\n                         \r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-3 font-13 text-right\" >Allow DID Numbers <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"The hours of operation where your publisher should be credited for calls.\"></i></div>        \r\n                            <div class=\"col-md-5 font-13\" >\r\n                              <div class=\"form-group\">\r\n                                <label class=\"custom-switch pl-0\">\r\n                                  <input type=\"checkbox\" [checked]=\"allow_did_no==1\" (change)=\"is_allow_did_notoggle($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                                  <span class=\"custom-switch-indicator\"></span>                     \r\n                                </label>              \r\n                              </div>  \r\n                            </div>        \r\n                          </div><br>\r\n                          <br>\r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-3\"></div>\r\n                            <div class=\"col-md-5 d-flex\">\r\n                              <input type=\"button\" (click)=\"onAddOfferSubmit(0)\" value=\"Save As Draft\" class=\"w-auto btn btn-primary btn-sm\" style=\"background: #3858E7;\">  \r\n                              <input type=\"button\" (click)=\"onAddOfferSubmit(1)\" value=\"Save & Publish\" class=\"w-auto btn btn-primary ml-2 btn-sm\" style=\"border: 1px solid green!important\">  \r\n                              <input type=\"button\" value=\"Cancel\"  (click)=\"iscreateoffertoggle()\" style=\"border: 1px solid red!important\" class=\"w-auto ml-2 btn btn-primary btn-sm\">  \r\n                            </div>\r\n                          </div>\r\n                        </form>\r\n\r\n                    \r\n\r\n<!-- \r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-2\"></div>        \r\n                            <div class=\"col-md-3 font-13 text-right\">Payout Type <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"Payouts are a fixed price or a percentage of revenue.\"></i></div>        \r\n                            <div class=\"col-md-5 font-13\" >\r\n                              <div class=\"control-group\">\r\n                                <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                                    <label class=\"btn btn-primary form-check-label font-10\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payout_typevaledit(1)\">\r\n                                      <input class=\"form-check-input\" name=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                                      Fixed Amount\r\n                                    </label>\r\n                                    <label class=\"btn btn-primary form-check-label font-10\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                                      <input class=\"form-check-input\" name=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                                      Revshare Percentage\r\n                                    </label>\r\n                                  </div>\r\n                                  <div *ngIf=\"publisherSubmitted && publisherFormcontrol.payout_typeedit.errors\" class=\"invalid-feedback\">\r\n                                    <div *ngIf=\"publisherFormcontrol.payout_typeedit.errors.required\">Payout Type is required</div>\r\n                                  </div>   \r\n                                </div>   \r\n                            </div>        \r\n                          </div> <br>\r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-2\"></div>        \r\n                            <div class=\"col-md-3 font-13 text-right\" >Duplicate Payouts <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"When enabled the publisher will be credited on duplicate or repeat calls. Disabling this option will prevent them from being paid multiple times. Time limits allow for duplicate payouts after a specific length of time.\"></i></div>        \r\n                            <div class=\"col-md-5 font-13\" >\r\n                              <div class=\"control-group\">\r\n                                <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                                    <label class=\"btn btn-primary form-check-label font-10\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payout_typevaledit(1)\">\r\n                                      <input class=\"form-check-input\" name=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                                      Disable\r\n                                    </label>\r\n                                    <label class=\"btn btn-primary form-check-label font-10\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                                      <input class=\"form-check-input\" name=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                                      Enable\r\n                                    </label>\r\n                                    <label class=\"btn btn-primary form-check-label font-10\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                                      <input class=\"form-check-input\" name=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                                      Time Limit\r\n                                    </label>\r\n                                  </div>\r\n                                  \r\n                                </div>   \r\n                            </div>        \r\n                          </div> -->\r\n                          <!--\r\n                          <div class=\"row\">\r\n                            <div class=\"col-md-2\"></div>        \r\n                            <div class=\"col-md-3 font-13 text-right\" >Limit Payout <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"Set caps to payouts based on calls, amount, and concurrency\"></i> </div>        \r\n                            <div class=\"col-md-3 font-13\">\r\n                              <div class=\"form-group\">\r\n                                <label class=\"custom-switch pl-0\">\r\n                                  <input type=\"checkbox\" [checked]=\"isrecording==1\" (change)=\"get_recordingstatus($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                                  <span class=\"custom-switch-indicator\"></span>                     \r\n                                </label>              \r\n                              </div>  \r\n                            </div>        \r\n                          </div><br>\r\n                          <div class=\"row mt-2 mt-2 mb-0 pb-0\">\r\n                            <div class=\"col-md-12 font-13\">Tag Filters for Payout <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"Specify Tag Filters to give payout only if the call satisfies the filters.\"></i></div>        \r\n                          </div> -->\r\n\r\n                          \r\n                        </div>\r\n                    </div>\r\n\r\n\r\n\r\n                  </div>              \r\n                </div>\r\n              </div>\r\n            </div>\r\n      </div>\r\n      </div>\r\n      </div>\r\n    </section>\r\n</div>\r\n");

/***/ }),

/***/ "lby/":
/*!**************************************************************************************!*\
  !*** ./src/app/modules/reports/report-labelsummary/report-labelsummary.component.ts ***!
  \**************************************************************************************/
/*! exports provided: ReportLabelsummaryComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReportLabelsummaryComponent", function() { return ReportLabelsummaryComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_report_labelsummary_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./report-labelsummary.component.html */ "w1c0");
/* harmony import */ var _report_labelsummary_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./report-labelsummary.component.scss */ "gYVw");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var angular_highcharts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! angular-highcharts */ "a0Xn");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! highcharts/modules/exporting */ "AxlJ");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! highcharts */ "6n/F");
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(highcharts__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! moment */ "wd/R");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! datatables.net */ "FlOX");
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(datatables_net__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../global */ "XrUY");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ngx-toastr */ "5eHb");








highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6___default()(highcharts__WEBPACK_IMPORTED_MODULE_7__);






class DataTablesResponse {
}
let ReportLabelsummaryComponent = class ReportLabelsummaryComponent {
    constructor(moduleservice, fb, toastrService, handler) {
        this.moduleservice = moduleservice;
        this.fb = fb;
        this.toastrService = toastrService;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.event = "";
        this.numbers = '';
        this.dtOptions = {};
        this.submitted = false;
        this.ranges = {
            Today: [moment__WEBPACK_IMPORTED_MODULE_9__(), moment__WEBPACK_IMPORTED_MODULE_9__()],
            Yesterday: [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(1, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__().subtract(1, 'days')],
            'Last 7 Days': [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(6, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__()],
            'Last 30 Days': [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(29, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__()],
            'This Month': [moment__WEBPACK_IMPORTED_MODULE_9__().startOf('month'), moment__WEBPACK_IMPORTED_MODULE_9__().endOf('month')],
            'Last Month': [
                moment__WEBPACK_IMPORTED_MODULE_9__()
                    .subtract(1, 'month')
                    .startOf('month'),
                moment__WEBPACK_IMPORTED_MODULE_9__()
                    .subtract(1, 'month')
                    .endOf('month')
            ],
        };
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_12__["HttpClient"](handler);
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.keepCalendarOpeningWithRange = true;
        this.showRangeLabelOnInput = true;
        this.selected = { startDate: moment__WEBPACK_IMPORTED_MODULE_9__().startOf('day'), endDate: moment__WEBPACK_IMPORTED_MODULE_9__().endOf('day') };
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.CallReportForm = this.fb.group({
            date: ['', ''],
            label: ['', ''],
            duration_type: ['', ''],
            duration: ['', ''],
        });
        // this.getChartNumberOfCalls(this.event);
        this.getAllLabels(this.currentUser.uuid);
    }
    get f() { return this.searchcallsform.controls; }
    getAllLabels(company_uuid) {
        this.moduleservice.getAllLabels(this.currentUser.uuid).subscribe(res => {
            this.alllabel = res;
            console.log(res);
        }, error => this.error = error);
    }
    onCallReportSubmit() {
        // console.log(this.CallReportForm.value); return false;
        this.moduleservice.getLabelReports(this.CallReportForm.value, this.currentUser.uuid).subscribe(res => {
            // console.log(res.date); return false;
            this.chart = new angular_highcharts__WEBPACK_IMPORTED_MODULE_5__["Chart"]({
                chart: {
                    type: 'column',
                },
                colors: [
                    '#4572A7',
                    '#AA4643',
                    '#89A54E',
                    '#80699B',
                    '#3D96AE',
                    '#DB843D',
                    '#92A8CD',
                    '#A47D7C',
                    '#B5CA92'
                ],
                title: {
                    text: 'Calls By Labels'
                },
                subtitle: {
                    text: document.ontouchstart === undefined ?
                        'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'
                },
                accessibility: {
                    announceNewData: {
                        enabled: true
                    }
                },
                xAxis: {
                    title: {
                        text: 'Labels'
                    },
                    categories: res.labels
                },
                yAxis: {
                    title: {
                        text: 'Number Of Calls'
                    }
                },
                legend: {
                    enabled: false
                },
                plotOptions: {
                    series: {
                        borderWidth: 0,
                        dataLabels: {
                            enabled: true,
                            format: '{point.y} Call'
                        },
                    },
                    column: {
                        colorByPoint: true
                    }
                },
                tooltip: {
                    headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
                    pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}%</b> of total<br/>'
                },
                series: [{
                        data: res.count,
                        type: 'column',
                        name: "Call Count"
                    }],
            });
        }, error => this.error = error);
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        var that = this;
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "searching": false,
            "serverSide": true,
            "lengthMenu": [[-1, 50, 100, 500, 2000, 5000], ["All", 50, 100, 500, 2000, 5000]],
            "pageLength": 500,
            "order": [[2, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + 'getdaywiseLabelSummaryReport/' + this.currentUser.uuid, { 'dataTablesParameters': dataTablesParameters, 'formvalue': this.CallReportForm.value }, {}).subscribe(resp => {
                    // console.log(resp.data); return false;
                    that.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "created_at" }, { data: "label" }, { data: "noofcalls" }, { data: "avg" }, { data: "call_duration" }, { data: "ivr_inputs" }, { data: "revenue" },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
};
ReportLabelsummaryComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_8__["FormBuilder"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_13__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_12__["HttpBackend"] }
];
ReportLabelsummaryComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewChild"], args: ['dataTable', { static: true },] }]
};
ReportLabelsummaryComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-report-labelsummary',
        template: _raw_loader_report_labelsummary_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_report_labelsummary_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], ReportLabelsummaryComponent);



/***/ }),

/***/ "mdDg":
/*!********************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/reports-comparison/reports-comparison.component.html ***!
  \********************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n\n<div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\n aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n   <div class=\"modal-content\">\n     <div class=\"modal-header\">\n       <h5 class=\"modal-title\" id=\"formModal\">Export Call Details</h5>\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n         <span aria-hidden=\"true\">&times;</span>\n       </button>\n     </div>\n     <div class=\"modal-body\">\n         <div class=\"row\">\n           <div class=\"col-md-12\">\n          <div class=\"form-group\">\n             <label>Select Number of Record you want to export</label>\n             <select name=\"\" [(ngModel)]=\"noofrecords\" id=\"\" class=\"form-control\">\n               <option value=\"500\">500</option>\n               <option value=\"1000\" selected>1000</option>\n               <option value=\"5000\">5000</option>\n               <option value=\"10000\">10000</option>\n             </select>\n          </div>\n\n      </div>\n        </div>\n    \n         <div class=\"modal-footer\" style=\"padding: 0;\">\n            <button (click)=\"exportdata()\" type=\"button\" class=\"btn btn-primary m-t-15 waves-effect\">Export</button>\n            <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\" data-dismiss=\"modal\" aria-label=\"Close\">Close</button>\n          </div>\n     </div>\n   </div>\n </div>\n </div>   \n\n<div class=\"main-content\">  \n\n    <section class=\"pb-0\">\n          \n    </section>\n  \n    <section>\n      <div class=\"card\">\n        <div class=\"\">\n          <div class=\"row\">\n            <div class=\"card-header pb-0 border-bottom-0\">\n            <div class=\"col-md-1 col-sm-1\">\n              <h6 (click)=\"togglepanel()\" style=\"font-size: 14px;\"><i class=\"material-icons\" >settings</i> <span>Today</span></h6>\n            </div>\n            <div class=\"col-md-3 text-right\" style=\"display: -webkit-inline-box;\">\n                <div class=\"input-group\">\n                <input type=\"text\" ngxDaterangepickerMd\n                      (datesUpdated)=\"setdate($event,1)\"\n                      [(ngModel)]=\"selected\"\n                      [ngModelOptions]=\"{getterSetter: true, updateOn: 'blur',timezone: 'utc'}\"\n                      [showCustomRangeLabel]=\"true\"\n                      [alwaysShowCalendars]=\"alwaysShowCalendars\"\n                      [ranges]=\"ranges\"    \n                      [showCancel]=\"true\"\n                      [linkedCalendars]=\"true\"\n                      [locale]=\"{applyLabel: 'Done'}\"                \n                      [keepCalendarOpeningWithRange]=\"keepCalendarOpeningWithRange\"\n                      class=\"form-control\"\n                      placeholder=\"Select please...\"/>\n                      <label class=\"input-group-btn\" for=\"txtDate\" style=\"padding: 0 14px 0 14px;\">\n                      <span class=\"fas fa-calendar\"></span>                      \n                      </label>\n              </div>\n            </div>\n           \n            <div class=\"col-md-3 text-right\" style=\"display: -webkit-inline-box;\">\n                <div class=\"input-group\">\n                <input type=\"text\" ngxDaterangepickerMd\n                      (datesUpdated)=\"setdate($event,2)\"\n                      [(ngModel)]=\"selected_2\"\n                      [ngModelOptions]=\"{getterSetter: true, updateOn: 'blur',timezone: 'utc'}\"\n                      [showCustomRangeLabel]=\"true\"\n                      [alwaysShowCalendars]=\"alwaysShowCalendars\"\n                      [ranges]=\"ranges\"    \n                      [showCancel]=\"true\"\n                      [linkedCalendars]=\"true\"\n                      [locale]=\"{applyLabel: 'Done'}\"                \n                      [keepCalendarOpeningWithRange]=\"keepCalendarOpeningWithRange\"\n                      class=\"form-control\"\n                      placeholder=\"Select please...\"/>\n                      <label class=\"input-group-btn\" for=\"txtDate\" style=\"padding: 0 14px 0 14px;\">\n                      <span class=\"fas fa-calendar\"></span>                      \n                      </label>\n              </div>              \n            </div>\n\n            <div class=\"col-md-1\">\n                <input type=\"button\" (click)=\"filterval(1)\" class=\"btn btn-primary\" style=\"height: 31px;display: inline-grid;margin-bottom: 7px;\" value=\"Submit\">\n            </div>\n            <!-- <div class=\"col-md-4\">\n              <div class=\"input-group\">\n                <input type=\"text\" name=\"\" [(ngModel)]=\"labelval\" [ngModelOptions]=\"{standalone: true}\" style=\"margin-top: -6px;\" class=\"form-control\" id=\"\" placeholder=\"Enter Report Name\">\n                <span class=\"error\" *ngIf=\"islabelvaltext=='yes'\">Please Select Report Name</span>\n                <button style=\"margin-top: -7px;\n                width: 34px;\n                padding: 0;\n                height: 32px;\" (click)=\"savelabel()\" class=\"btn btn-primary\"><i class=\"fa fa-save\"></i></button>\n                <button *ngIf=\"isreport==1\" style=\"margin-top: -7px;\n                width: 34px;\n                padding: 0;\n                height: 32px;\" (click)=\"deletelabel()\" class=\"btn btn-danger\"><i class=\"fa fa-trash\"></i></button>\n              </div>\n            </div> -->\n            <!-- <div class=\"col-md-1\"></div> -->\n            <div class=\"col-md-1 text-right\">\n              <p (click)=\"togglepanel()\"><i  class=\"fas fa-filter\"></i> Filters</p>\n        \n            </div>\n          </div>\n          \n        </div>\n        <div class=\"card-body\" *ngIf=\"isclick==1\" style=\"border-top: 1px solid #f0f1f1;\">\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(1)\">\n            <i class=\"fa fa-filter\"></i> Campaign <span class=\"badge badge-transparent\">Click To Apply</span>\n          </button>\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(2)\">\n            <i class=\"fa fa-filter\"></i> Target <span class=\"badge badge-transparent\">Click To Apply</span>\n          </button>\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(3)\">\n            <i class=\"fa fa-filter\"></i> Buyer <span class=\"badge badge-transparent\">Click To Apply</span>\n          </button>\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(4)\">\n            <i class=\"fa fa-filter\"></i> Publisher <span class=\"badge badge-transparent\">Click To Apply</span>\n          </button>\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(5)\">\n            <i class=\"fa fa-filter\"></i> Caller ID <span class=\"badge badge-transparent\">Click To Apply</span>\n          </button>\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(6)\">\n            <i class=\"fa fa-filter\"></i> Number Called <span class=\"badge badge-transparent\">Click To Apply</span>\n          </button>\n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(8)\">\n            <i class=\"fa fa-filter\"></i> IVR Input <span class=\"badge badge-transparent\">Click To Apply</span>\n          </button>\n          \n          <button type=\"button\" class=\"btn btn-primary btn-icon icon-left mr-2\" (click)=\"filterdata(9)\">\n            <i class=\"fa fa-filter\"></i> Ringtree <span class=\"badge badge-transparent\">Click To Apply</span>\n          </button>\n                  \n         <form  (ngSubmit)=\"filterval()\">\n\n          <div class=\"mt-2\" *ngIf=\"filter==1\" style=\"display: flex;\">\n            <div *ngFor=\"let item of filterselected;let i=index\" style=\"padding: 4px;\">\n            \n              <button type=\"button\" *ngIf=\"item.isorand==0 && i!=0\" class=\"btn btn-primary btn-sm\" style=\"font-size: 11px; margin-right: 7px;\">OR</button>             \n\n              <button type=\"button\" *ngIf=\"item.isorand==1 && i!=0\" class=\"btn btn-primary btn-sm\" style=\"font-size: 11px;margin-right: 7px;\">AND</button>             \n\n              <button type=\"button\" (click)=\"clearfilter(i)\" class=\"btn btn-secondary btn-sm\" style=\"font-size: 11px;\">\n                <span *ngIf=\"item.filtertype==1\">Campaign is: </span>\n                <span *ngIf=\"item.filtertype==2\">Target is: </span>\n                <span *ngIf=\"item.filtertype==3\">Buyer is: </span>\n                <span *ngIf=\"item.filtertype==4\">Publisher is: </span>\n                \n                <span *ngIf=\"item.filtertype==5\">Caller ID is: </span>\n                <span *ngIf=\"item.filtertype==6\">Number Called is: </span>\n                {{item.name}} <span class=\"fa fa-times\"></span>\n              </button>               \n            </div>                                  \n          </div>                  \n\n          <div class=\"row mt-2\" *ngIf=\"filter==1\">\n            <div class=\"col-md-3\" *ngIf=\"filtertype==1 && isselectElement==0\">\n              <!-- <select class=\"form-control\" [(ngModel)]=\"filtervalue\" (change)=\"gettext($event,1)\" [ngModelOptions]=\"{standalone: true}\">\n                <option value=\"\">{{filtertext}}</option>\n                <optgroup label=\"Active\">\n                  <option *ngFor=\"let item of activeresultdata\" [value]=\"item.id\">{{item.text}}</option>\n                </optgroup>\n                <optgroup label=\"In-Active\">\n                  <option *ngFor=\"let item of nonactiveresultdata\" [value]=\"item.id\">{{item.text}}</option>\n                </optgroup>\n              </select>   -->\n              <ng-select2  [data]=\"activeresultdata\" [width]=\"330\" [placeholder]=\"filtertext\"  [(ngModel)]=\"filtervalue\" (valueChanged)=\"gettext($event,1)\" [ngModelOptions]=\"{standalone: true}\">\n              </ng-select2>\n            </div>           \n            <div class=\"col-md-3\" *ngIf=\"filtertype!=1 && filtertype!=5 && filtertype!=6 && isselectElement==0\">\n              <!-- <select class=\"form-control\" [(ngModel)]=\"filtervalue\" (change)=\"gettext($event,1)\" [ngModelOptions]=\"{standalone: true}\">\n                <option value=\"\">{{filtertext}}</option>\n                <option *ngFor=\"let item of resultdata\" [value]=\"item.id\">{{item.text}}</option>\n              </select>        -->\n              <ng-select2  [data]=\"resultdata\" [width]=\"330\" [placeholder]=\"filtertext\" [(ngModel)]=\"filtervalue\" (valueChanged)=\"gettext($event,1)\" [ngModelOptions]=\"{standalone: true}\">\n              </ng-select2>\n            </div>\n          \n            <div class=\"col-md-3\" *ngIf=\"(filtertype==6 || filtertype==5) && isselectElement==0\">\n              <input type=\"text\" name=\"filtervalue\" class=\"form-control\" id=\"\" [(ngModel)]=\"filtervalue\" (change)=\"gettext($event,2)\">\n            </div>\n\n            <div class=\"col-md-3\" *ngIf=\"isselectElement==0\">\n              <button type=\"button\" style=\"width: 83px;font-size: 8px;height: 32px;\" (click)=\"addorrule()\" class=\"btn btn-primary btn-sm\">ADD OR RULE</button>     \n              <button type=\"button\" style=\"margin-left:5px;width: 83px;font-size: 8px;height: 32px;\" (click)=\"addandrule()\" class=\"btn btn-primary btn-sm\">ADD AND RULE</button>     \n            </div>            \n          </div>\n          \n          <div class=\"row mt-2 border-top\" *ngIf=\"filter==1\">\n            <div class=\"col-md-1\" style=\"margin-top: 13px;\">\n              <button *ngIf=\"isadded==1\" style=\"width: 83px;\" type=\"submit\" class=\"btn btn-primary btn-sm\">Add Filter</button>\n              <button type=\"button\" *ngIf=\"isadded==0\" (click)=\"editfilter()\" style=\"width: 83px;\" type=\"submit\" class=\"btn btn-primary btn-sm\">Edit Filter</button>\n            </div>\n            <div class=\"col-md-2\" style=\"margin-top: 15px;\">\n              <button style=\"width: 82px;\" (click)=\"calcelfilter()\" class=\"btn btn-outline-danger btn-sm\">Clear Filter</button>\n            </div>\n          </div>\n          </form>\n        \n        </div>\n      </div>  \n         \n         <div class=\"card-body\" style=\"border-top: 1px solid #2f3031\">\n            \n          <!-- Chart -->\n          <div class=\"\" style=\"position: relative\">\n            <ngx-ui-loader [loaderId]=\"'loader-03'\"></ngx-ui-loader>\n\n            <div class=\"row\"  *ngIf=\"ischart == 1\">\n              <div class=\"col-md-9 col-sm-9\">\n                <h6>Reporting</h6>\n              </div>          \n              <div class=\"col-md-3 col-sm-3 text-right\">\n                  <button (click)=\"chartby(1)\" class=\"tabsbtn\" [ngClass]=\"{'activetab': daytypeval === 1}\"\n                  >By Hour</button>            \n                  <button (click)=\"chartby(2)\" class=\"tabsbtn\" [ngClass]=\"{'activetab': daytypeval === 2}\">By Date</button>            \n                \n            </div>            \n          </div>\n\n            <div [chart]=\"chart\"></div>\n          </div>\n\n          \n\n          <div style=\"position: relative\">\n            <ngx-ui-loader [loaderId]=\"'loader-02'\"></ngx-ui-loader>\n            <div *ngIf=\"callsdata?.length != 0\">\n          <div style=\"border-top: 1px solid #2f3031\"></div>\n          <h6 class=\"pt-2 pb-2\">Summary</h6>\n          <div class=\"p-0 border-top-1\" >\n            \n              <div class=\"row\">\n                <div class=\"col-md-12 col-sm-12\" style=\"display: inherit;\">\n                  <div class=\"input-group\">\n\n                  <input type=\"button\" value=\"Campaign\" id=\"tabs1\" (click)=\"getSummary(1)\" class=\"tabsbtn activetab\">  \n                  <input type=\"button\" value=\"Publisher\" id=\"tabs2\" (click)=\"getSummary(2)\" class=\"tabsbtn\">  \n                  <input type=\"button\" value=\"Target\" id=\"tabs3\" (click)=\"getSummary(3)\" class=\"tabsbtn\">  \n                  <input type=\"button\" value=\"Buyer\" id=\"tabs4\" (click)=\"getSummary(4)\" class=\"tabsbtn\">  \n                  <input type=\"button\" value=\"Dialed #\" id=\"tabs5\" (click)=\"getSummary(5)\" class=\"tabsbtn\">  \n                 \n                </div>\n                 <div class=\"input-group float-right\" style=\"display: contents;\" >\n                  <button (click)=\"exportcalldata()\" class=\"tabsbtn \"><i class=\"fas fa-file-export\"></i> Export\n                  </button>                     \n                    </div>        \n                </div>\n              </div>\n        \n                      <div class=\"table-responsive\">\n                      \n                     \n                        <table  id=\"datatable1\" datatable [dtOptions]=\"dtOptions\" [dtTrigger]=\"dtTrigger\" class=\"table table-striped dataTable no-footer row-border hover\">\n                     \n                          <thead>\n                            <tr>     \n                              <th>\n                                <span *ngIf='filtertype==1'>Campaign</span>\n                                <span *ngIf='filtertype==2'>Target</span>\n                                <span *ngIf='filtertype==3'>Buyer</span>\n                                <span *ngIf='filtertype==4'>Publisher</span>\n                                <span *ngIf='filtertype==5'>Dialed #</span>\n                                <span *ngIf='filtertype==6'>Number Pool</span>\n                                <span *ngIf='filtertype==7'>Date</span>\n                                <span *ngIf='filtertype==8'>Duplicate</span>\n                              </th>\n                              <th style=\"width: 6%;\">Incoming</th>\n                              <th style=\"width: 6%;\">Unique Calls</th>\n                              <th style=\"width: 6%;\">IVR Input</th>\n                              <th style=\"width: 5%;\">Connected</th>\n                              <th style=\"width: 5%;\">Qualified</th>\n                              <th style=\"width: 5%;\">Converted</th>\n                              <th style=\"width: 5%;\">Completed</th>\n                              <th style=\"width: 5%;\">No Answer</th>\n                              <th style=\"width: 5%;\">No Connect</th>\n                              <th style=\"width: 5%;\">Duplicate</th>\n                              <th>Payout</th>                                                                     \n                              <th>Revenue</th>                                                                     \n                              <th>Profit</th>\n                              <th>CR%</th>\n                              <th>RPC</th>\n                              <th>ACL</th>\n                              <th title=\"Average Call Length\">TCL</th>\n                            </tr>\n                          </thead>\n                          <tbody *ngIf=\"callsdata?.length != 0\">\n                              <tr *ngFor=\"let data of callsdata;let i=index\" [style.background-color]=\"i == totaldata-1 ? '' : ''\" [style.color]=\"i == totaldata-1 ? '' : ''\">\n                                  <td><span style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter)\">{{ data.filter}}</span></td>\n                                  <td>{{ data.incoming}}</td>\n                                  <td>{{ data.uniquecalls}}</td>\n                                  <td>{{ data.ivr_inputs}}</td>\n                                  <td>{{ data.connected}}</td>\n                                  <td>{{ data.qualified}}</td>\n                                  <td>{{ data.converted}}</td>\n                                  <td>{{ data.completed}}</td>\n                                  <td>{{ data.no_answer }}</td>\n                                  <td>{{ data.no_connect }}</td>\n                                  <td>\n                                    <span *ngIf=\"data.duplicate=='0 | 0 | 0'\">{{ data.duplicate }}</span>                              \n                                    <span *ngIf=\"data.duplicate!='0 | 0 | 0'\" style=\"cursor: pointer;\" (click)=\"filterbyvalue(data.uuid,data.filter,1)\">{{ data.duplicate }}</span>                              \n                                  </td>\n                                  <td>$ {{ data.payout }}</td>\n                                  <td>$ {{ data.revenue }}</td>\n                                  <td>$ {{ data.profit }}</td>\n                                  <td>{{ data.cr_percent }}</td>\n                                  <td>$ {{ data.rpc }}</td>\n                                  <td title=\"Average Call Length\">{{ data.acl }}</td>\n                                  <td>{{ data.tcl }}</td>                                                    \n                              </tr>\n                          </tbody>\n                          <!-- *ngIf=\"totalcount?.length != 0\" -->\n                          <tfoot  style=\"background: #3858E7;color: white;\">\n                            <tr>\n                               <td>{{totalcount.filter}}</td>\n                               <td>{{ totalcount.incoming}}</td>\n                               <td>{{ totalcount.uniquecalls}}</td>\n                               <td>{{ totalcount.ivr_inputs}}</td>\n                               <td>{{ totalcount.connected}}</td>\n                               <td>{{ totalcount.qualified}}</td>\n                               <td>{{ totalcount.converted}}</td>\n                               <td>{{ totalcount.completed}}</td>\n                               <td>{{ totalcount.no_answer }}</td>\n                               <td>{{ totalcount.no_connect }}</td>\n                               <td>{{ totalcount.duplicate }}</td>\n                               <td>$ {{ totalcount.payout }}</td>\n                               <td>$ {{ totalcount.revenue }}</td>\n                               <td>$ {{ totalcount.profit }}</td>\n                               <td>{{ totalcount.cr_percent }}</td>\n                               <td>$ {{ totalcount.rpc }}</td>\n                               <td title=\"Average Call Length\">{{ totalcount.acl }}</td>\n                               <td>{{ totalcount.tcl }}</td>                 \n                               \n                            </tr>\n                          </tfoot>\n                          \n                          <tbody *ngIf=\"callsdata?.length == 0\">\n                            <tr>\n                              <td >No data!</td>\n                        \n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>\n                              <td style=\"display: none\"></td>                              \n                            </tr>\n                          <tbody>\n                        </table>\n                      </div>\n                  \n          </div>\n\n          \n          </div>\n          <div *ngIf=\"callsdata?.length == 0\">\n            No Data\n            </div>\n        </div>\n        </div>\n\n      </div>      \n    </section>\n\n  </div>  \n\n\n");

/***/ }),

/***/ "mthO":
/*!************************************************************!*\
  !*** ./src/app/modules/blacklist/blacklist.component.scss ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJibGFja2xpc3QuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "n6rN":
/*!**********************************************************!*\
  !*** ./src/app/modules/voicemail/voicemail.component.ts ***!
  \**********************************************************/
/*! exports provided: VoicemailComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VoicemailComponent", function() { return VoicemailComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_voicemail_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./voicemail.component.html */ "DsyZ");
/* harmony import */ var _voicemail_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./voicemail.component.scss */ "WEHk");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../global */ "XrUY");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-csv/ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__);












const router = _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"];
class DataTablesResponse {
}
let VoicemailComponent = class VoicemailComponent {
    constructor(moduleservice, toastrService, router, handler) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.router = router;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.SiteUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.checkboxes = [];
        this.filter = [];
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadTargets();
    }
    loadTargets() {
        // console.log('ok');
        // return false;
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentUser'));
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 50, 100, 500, 2000, 5000], ["All", 20, 50, 100, 500, 2000, 5000]],
            "order": [[1, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getvoicemails/' + this.currentCompany.uuid + '/' + this.currentUser.timezone, dataTablesParameters, {}).subscribe(resp => {
                    this.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "created_epoch" }, { data: "cid_number" }, { data: "file_path" }, { data: "campaign" }
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedNumbers(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                        }, 2000);
                        this.loadTargets();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                }
            });
        }
    }
    Delete(id) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteNumber(id, currentUser.uuid).subscribe(res => {
                    this.loadTargets();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                }, 2000);
            }
        });
    }
    Clone(id) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to clone this target!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, clone it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.cloneNumber(id, currentUser.uuid).subscribe(res => {
                    this.filter = [res];
                    if (this.filter[0]['status'] == 'success') {
                        this.loadTargets();
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Success!', 'Target Clone Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                        }, 2000);
                        this.router.navigate(['/edit-numbers/' + this.filter[0]['uuid']]);
                    }
                    else {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Error', 'Target Clone failed.', 'error');
                    }
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', '', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                }, 2000);
            }
        });
    }
    exportdata() {
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            // showTitle: true,
            // title: 'Your title',
            useBom: true,
            // noDownload: true,
            headers: ["Number", "FSL Rule Name", "Rule Set", "Note", "Associated abel", "Created At"]
        };
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getNumberForExport(this.currentCompany.uuid, "all").subscribe(res => {
            console.log(res);
            new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__["ngxCsv"](res, 'All Targets', options);
        }, error => this.error = error);
    }
    change_status(event, tagetUuid) {
        this.status = event.target.checked;
        let activestatus, activestring;
        if (this.status == true) {
            activestatus = 1;
            activestring = "Activate";
        }
        else {
            activestatus = 0;
            activestring = "De-activate";
        }
        // alert(activestatus); return
        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to ' + activestring + ' Target!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, ' + activestring + ' it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.changeTargetStatus(activestatus, currentUser.uuid, tagetUuid).subscribe(res => {
                    this.loadTargets();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Changed!', 'Target ' + activestring + ' Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                }, 2000);
                this.loadTargets();
                return;
            }
        });
    }
    play(url, incomingnumber) {
        this.toastrService.show(`<audio style="width: 232px;height: 30px;" controls><source src="${url}" type="audio/mp3"></audio>`, 'Callerid Number # - ' + incomingnumber, {
            closeButton: true,
            extendedTimeOut: 0,
            timeOut: 0,
            tapToDismiss: false,
            enableHtml: true,
            positionClass: 'toast-bottom-right',
        });
    }
};
VoicemailComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_3__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpBackend"] }
];
VoicemailComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
VoicemailComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-voicemail',
        template: _raw_loader_voicemail_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_voicemail_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], VoicemailComponent);



/***/ }),

/***/ "n9+t":
/*!****************************************************************************!*\
  !*** ./src/app/modules/campaigns/campaign-edit/campaign-edit.component.ts ***!
  \****************************************************************************/
/*! exports provided: CampaignEditComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CampaignEditComponent", function() { return CampaignEditComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_campaign_edit_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./campaign-edit.component.html */ "laJ8");
/* harmony import */ var _campaign_edit_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./campaign-edit.component.scss */ "cJwa");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../../global */ "XrUY");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var ngx_csv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ngx_csv__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rxjs */ "qCKp");
/* harmony import */ var ngx_ui_loader__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ngx-ui-loader */ "gren");














class DataTablesResponse {
}
let CampaignEditComponent = class CampaignEditComponent {
    constructor(renderer, moduleservice, toastrService, handler, fb, router, route, cdRef, ngxLoader) {
        this.renderer = renderer;
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.router = router;
        this.route = route;
        this.cdRef = cdRef;
        this.ngxLoader = ngxLoader;
        this.locations = [];
        this.dropdownList = [];
        this.selectedItems = [];
        this.dropdownSettings = {};
        this.pubdropdownSettings = {};
        this.labeldropdownSettings = {};
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_3__["GlobalVariable"].BASE_API_URL;
        this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_12__["Subject"]();
        this.dtOptions = {};
        this.dtOptionsTarget = {};
        this.dtOptionsRouting = {};
        this.dtOptionsPending = {};
        this.campaignNumbers = [];
        this.campaignLabels = [];
        this.campaignoffers = [];
        this.pendingdata = [];
        this.completed = [];
        this.offerdetails = [];
        this.Submitted = false;
        //Add Publisher
        //  uuid = this.route.snapshot.paramMap.get('id');
        this.payout_typevalueedit = 0;
        this.payoutSubmitted = false;
        this.publisherSubmitted = false;
        // default payout
        this.dpayout_type = 0;
        this.dpSubmitted = false;
        this.recording = 2;
        this.settingToggleDurationvalue = 0;
        this.filtertype = 1;
        this.pfiltertype = 1;
        this.iscreateoffer = false;
        this.isshowmessage = true;
        // Offer Section
        this.is_approval = 1;
        this.isallow_tollfree_no = 1;
        this.allow_did_no = 1;
        this.isadded = 0;
        this.addofferSubmitted = false;
        this.isedit = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HttpClient"](handler);
        this.uuid = this.route.snapshot.paramMap.get('id');
    }
    ngAfterViewChecked() {
        this.cdRef.detectChanges();
    }
    getRulesByName(target_uuid) {
        //  console.log(name);
        if (target_uuid != '') {
            this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
            this.moduleservice.getRulesByTargetuuid(target_uuid, this.currentCompany.uuid).subscribe(res => {
                // console.log(res);
                this.allRulesbyname = res;
            }, error => this.error = error);
        }
        else {
            this.allRulesbyname = "";
        }
    }
    loadallweekdays() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.loadallweekdays(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            this.allweekdays = res.data;
        }, error => this.error = error);
    }
    getAllLabels() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAllLabels(this.currentCompany.uuid).subscribe(res => {
            this.labeldata = res;
            // console.log(res);
        }, error => this.error = error);
    }
    ngOnDestroy() {
        this.dtTrigger.unsubscribe();
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.today = new Date().toISOString().split('T')[0];
        this.dropdownSettings = {
            singleSelection: true,
            text: "Select Number",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class",
        };
        this.pubdropdownSettings = {
            singleSelection: true,
            text: "Select Publisher",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class",
        };
        this.labeldropdownSettings = {
            singleSelection: false,
            text: "Select Labels",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        this.getcampaignbyuuid();
        this.gettimezone();
        this.getAllLabels();
        this.getAllpublishers();
        this.loadallweekdays();
        this.loadNumbers();
        this.getAlltarget();
        this.loadcampaignpublishers(this.uuid);
        this.loadparticipationrequest(this.uuid);
        this.loadcampaigntarget();
        this.loadallRoutingplan(this.uuid);
        this.payoutForm = this.fb.group({
            user_uuid: [''],
            phoneno: [''],
            publisher_uuid: [''],
            payout_typeedit: [''],
            payout_amount: [''],
            payout_trigger: [''],
            payout_seconds: [''],
        });
        this.addofferForm = this.fb.group({
            name: [''],
            description: [''],
            hoursofoperation: [''],
            exp_timezone: [''],
            exp_date: [''],
            start_hrs: ['23'],
            start_min: ['59'],
            max_no_per_publisher: ['100'],
        });
        this.publishtertocampaignForm = this.fb.group({
            user_uuid: [''],
            number: [''],
            publisher_uuid: [''],
            payout_typeedit: [''],
            payout_amount: [''],
            payout_trigger: [''],
            payout_seconds: [''],
        });
        this.defaultpayoutForm = this.fb.group({
            user_uuid: [''],
            payout_type: [''],
            payout_amount: [''],
            payout_trigger: [''],
            payout_seconds: [''],
        });
        this.editRoutingForm = this.fb.group({
            user_uuid: [''],
            uuid: [''],
            priority: [''],
            weight: [''],
            conversation_revenue: [''],
            conversation_event: [''],
            conversation_seconds: [''],
            restrictdup: [''],
            restrictafter: [''],
            days: [''],
            settingToggleDurationval: [''],
            settingToggleDuration: [''],
        });
        this.editForm = this.fb.group({
            campaignName: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            user_uuid: [''],
            country: [''],
            // option: [''],      
            number: [''],
            labeldata: [''],
            numberIsFor: [''],
            // numberType: [''],             
            publisher: [''],
            target: [''],
            conversation_revenue: [''],
            conversation_event: [''],
            conversation_seconds: [''],
            //  payout_typeedit: ['',Validators.required],      
            //  payout_amount: [''],      
            //  payout_trigger: [''],      
            //  payout_seconds: [''],            
            recording: ['']
        });
        // this.options = {
        //   multiple: true,
        //   theme: 'classic',
        //   closeOnSelect: false,
        //   width: '370'
        // };
    }
    getcampaignbyuuid() {
        this.moduleservice.getcampainbyuuid(this.uuid).subscribe(res => {
            this.getdata = res.campaigns;
            this.campaignoffers = res.campaign_offer;
            this.dpayout_type = res.campaigns.payout_type;
            this.editpayout_typeval = res.campaigns.payout_type;
            this.payout_typevalueedit = res.campaigns.payout_type;
            this.isrecording = res.campaigns.is_recording;
            this.defaultconf = res.conf;
            if (res.campaigns.payout_amount != "") {
                this.defaultpayoutForm.patchValue({
                    payout_type: res.campaigns.payout_type,
                    payout_amount: res.campaigns.payout_amount,
                    payout_trigger: res.campaigns.payout_trigger,
                    payout_seconds: res.campaigns.payout_seconds,
                });
            }
            this.editForm.patchValue({
                campaignName: res.campaigns.name,
                country: res.campaigns.country,
                number: res.campaigns.number,
                publisher: res.campaigns.publisher_uuid,
            });
            this.numberIsFor = res.campaigns.numberIs_For;
            // console.log(res.campaigns.numberIs_For);
            this.editForm.get('numberIsFor').setValue(res.campaigns.numberIs_For);
        }, error => this.error = error);
    }
    getpayoutdata(uuid, phone, number_uuid) {
        this.payoutForm.get('phoneno').setValue(number_uuid);
        // this.payoutForm.get('phoneno').setValue(phone); 
        this.payoutForm.get('publisher_uuid').setValue(uuid);
        this.moduleservice.getpayoutdata(uuid, number_uuid).subscribe(resp => {
            // console.log(resp);
            if (resp != null) {
                this.editpayout_typeval = resp.payout_type;
                this.payout_typevalueedit = resp.payout_type;
                this.payoutForm.get('payout_typeedit').setValue(this.editpayout_typeval);
                this.payoutForm.patchValue({
                    payout_typeedit: resp.payout_type,
                    payout_amount: resp.payout_amount,
                    payout_trigger: resp.payout_trigger,
                    payout_seconds: resp.payout_seconds
                });
            }
            else {
                this.editpayout_typeval = 0;
                this.payout_typevalueedit = 0;
                this.payoutForm.get('payout_typeedit').setValue(0);
                this.payoutForm.patchValue({
                    payout_typeedit: 0,
                    payout_amount: "",
                    payout_trigger: 0,
                    payout_seconds: ""
                });
            }
        }, error => this.error = error);
    }
    loadcampaignpublishers(uuid) {
        // console.log('ok');
        // return false;
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[0, "asc"]],
            "searchDelay": 350,
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getCampaignPublisher/' + uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.campaignpublisher = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "enabled" }, { data: "publisher" }, { data: "phoneno" }, { data: "labels" }, { data: "conf" }, { data: "status" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    loadparticipationrequest(uuid) {
        this.ngxLoader.startLoader('loader-03');
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.http.post(this.ServerUrl + 'getParticipationRequest/' + uuid, {}).subscribe(resp => {
            // console.log(resp);                    
            this.offerdetails = resp.offerdetails;
            this.firstDate = new Date(resp.offerdetails.exp_date);
            this.secondDate = new Date();
            const ONE_DAY = 1000 * 60 * 60 * 24;
            const differenceMs = Math.abs(this.firstDate - this.secondDate);
            this.diffdays = Math.round(differenceMs / ONE_DAY);
            this.pendingdata = resp.data.pending ? resp.data.pending : [];
            this.completed = resp.data.completed ? resp.data.completed : [];
            this.dtTrigger.next();
            this.ngxLoader.stopLoader('loader-03');
        }, error => this.error = error);
    }
    loadcampaigntarget() {
        if ($.fn.DataTable.isDataTable(this.tabletarget.nativeElement)) {
            $(this.tabletarget.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptionsTarget = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[0, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'gettargets/' + this.currentCompany.uuid + '/' + this.uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.allTargets = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "name" }, { data: "typeval" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTableTarget = $(this.tabletarget.nativeElement);
        this.dataTableTarget.dataTable(this.dtOptionsTarget);
    }
    loadallRoutingplan(uuid) {
        if ($.fn.DataTable.isDataTable(this.tablerouting.nativeElement)) {
            $(this.tablerouting.nativeElement).dataTable().fnDestroy();
        }
        this.dtOptionsRouting = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            // "scrollX": true,     
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[0, "asc"]],
            "searching": false,
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getallRoutingplan/' + uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.allRoutingPlan = resp.data;
                    // console.log(this.allRoutingPlan);
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "prority" }, { data: "weight" }, { data: "name" }, { data: "destination" }, { data: "revenue" }, { data: "status" }, { data: "action" }
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTableRouting = $(this.tablerouting.nativeElement);
        this.dataTableRouting.dataTable(this.dtOptionsRouting);
    }
    DeleteRoutingPlan(uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                var currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteRoutingPlan(uuid, currentUser.uuid).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    this.loadallRoutingplan(this.uuid);
                    this.loadcampaigntarget();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    DeletePublisherPayout(uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.deletePublisherPayout(uuid).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    this.loadcampaignpublishers(this.uuid);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    Deletedefaultpayout() {
        this.defaultpayoutForm.reset();
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.defaultpayoutForm.get('user_uuid').setValue(currentUser.uuid);
        this.defaultpayoutForm.get('payout_type').setValue(0);
        this.defaultpayoutForm.get('payout_amount').setValue("");
        this.defaultpayoutForm.get('payout_trigger').setValue(0);
        this.defaultpayoutForm.get('payout_seconds').setValue("");
        // console.log(this.defaultpayoutForm.value); return
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                var currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.adddefaultpayout(this.uuid, this.defaultpayoutForm.value).subscribe(res => {
                    if (res.status !== 'error') {
                        this.toastrService.success('Campaign default payout saved successfully');
                        this.Submitted = false;
                        this.getcampaignbyuuid();
                        this.defaultpayoutForm.reset();
                    }
                    else {
                        this.toastrService.error('Failed To add campaign payout');
                    }
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    setRouting(uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want Add Routing Plan!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, Add it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                var currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.setcampaignRouting(uuid, this.uuid, currentUser.uuid).subscribe(res => {
                    var currentUser = JSON.parse(localStorage.getItem('currentUser'));
                    this.editForm.get('user_uuid').setValue(currentUser.uuid);
                    // console.log(res);return false;
                    this.loadallRoutingplan(this.uuid);
                    this.loadcampaigntarget();
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Added!', 'Routing Plan Added Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Routing Plan Cancelled :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    loadNumbers() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.loadNumbersfordropdown(this.currentCompany.uuid).subscribe(resp => {
            this.numberdata = resp;
            //  console.log(this.numberdata);
        }, error => this.error = error);
    }
    getAllpublishers() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAllpublishers(this.currentCompany.uuid).subscribe(res => {
            this.publisherdata = res;
            //  console.log(res);
        }, error => this.error = error);
    }
    getAlltarget() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAlltarget(this.currentCompany.uuid).subscribe(res => {
            this.targetdata = res;
        }, error => this.error = error);
    }
    numberIsForval(type) {
        this.numberIsFor = type;
        this.editForm.get('numberIsFor').setValue(type);
    }
    payout_typevaledit(val) {
        this.payout_typevalueedit = val;
        this.payoutForm.get('payout_typeedit').setValue(val);
        this.publishtertocampaignForm.get('payout_typeedit').setValue(val);
    }
    get editFormcontrol() { return this.editForm.controls; }
    onSubmit() {
        //  console.log(this.campaignNumbers);
        //  return false;
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.editForm.get('user_uuid').setValue(currentUser.uuid);
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // this.editForm.get('number').setValue(this.campaignNumbers)
        // this.editForm.get('labeldata').setValue(this.campaignLabels)
        if (this.recording == 2) {
            this.editForm.get('recording').setValue(2);
        }
        this.showLoadingIndicator = true;
        this.moduleservice.updateCampaign(this.uuid, this.currentCompany.uuid, this.editForm.value).subscribe(res => {
            //  console.log(res); return false;
            this.showLoadingIndicator = false;
            if (res.status !== 'error') {
                this.isName = "fail";
                this.toastrService.success('Campaign Updated Successfully');
                this.Submitted = false;
                this.router.navigate(['/campaigns']);
            }
            else {
                this.toastrService.error('Failed To Update Campaign');
            }
        }, error => this.error = error);
    }
    validatename() {
        if (this.editForm.get('campaignName').value != '') {
            this.moduleservice.validateCampaignName(this.editForm.get('campaignName').value).subscribe(res => {
                // console.log(res); return false;  
                this.isName = res;
                if (this.isName.status == 'success') {
                    this.isName = "success";
                }
                else {
                    this.isName = "fail";
                }
            });
        }
        else {
            this.isName = "";
        }
    }
    closeModal() {
        if (!this.payoutForm.invalid) {
            $("#addLabels").modal("hide");
        }
    }
    closepubModal() {
        if (!this.publishtertocampaignForm.invalid) {
            $("#addpublisher").modal("hide");
        }
    }
    closeroutingModal() {
        if (!this.editRoutingForm.invalid) {
            $("#editRouting").modal("hide");
        }
    }
    closedpayoutModal() {
        if (!this.defaultpayoutForm.invalid) {
            $("#addcampaignpayout").modal("hide");
        }
    }
    get payoutFormcontrol() { return this.payoutForm.controls; }
    onPayoutSubmit() {
        //  console.log(this.payoutForm.value);
        //  return false;
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.payoutForm.get('user_uuid').setValue(currentUser.uuid);
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.addpublisherpayout(this.uuid, this.payoutForm.value).subscribe(res => {
            if (res.status !== 'error') {
                this.toastrService.success('Publisher Payout Added Successfully');
                this.Submitted = false;
                this.loadcampaignpublishers(this.uuid);
            }
            else {
                this.toastrService.error('Failed To Update Campaign');
            }
        }, error => this.error = error);
    }
    get publisherFormcontrol() { return this.publishtertocampaignForm.controls; }
    onpublisherSubmit() {
        if (this.publisherselected) {
            this.publisherselected = this.publisherselected[0]['id'];
            this.publishtertocampaignForm.get('publisher_uuid').setValue(this.publisherselected);
        }
        if (this.publisherNumber) {
            this.publisherNumber = this.publisherNumber[0]['id'];
            this.publishtertocampaignForm.get('number').setValue(this.publisherNumber);
        }
        //  console.log(this.publisherNumber);
        //  return false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.publishtertocampaignForm.get('user_uuid').setValue(currentUser.uuid);
        this.moduleservice.addpublishertocampaign(this.uuid, this.publishtertocampaignForm.value).subscribe(res => {
            if (res.status !== 'error') {
                this.toastrService.success('Publisher to Campaign Added Successfully');
                this.Submitted = false;
                this.loadcampaignpublishers(this.uuid);
                this.publishtertocampaignForm.reset();
            }
            else {
                this.toastrService.error('Failed To Update Campaign');
            }
        }, error => this.error = error);
    }
    payout_typeedit(val) {
        this.dpayout_type = val;
        this.defaultpayoutForm.get('payout_type').setValue(val);
    }
    get defaultpayoutFormcontrol() { return this.defaultpayoutForm.controls; }
    ondpayoutSubmit() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.defaultpayoutForm.get('user_uuid').setValue(currentUser.uuid);
        // console.log(this.defaultpayoutForm.value); return
        this.moduleservice.adddefaultpayout(this.uuid, this.defaultpayoutForm.value).subscribe(res => {
            if (res.status !== 'error') {
                this.toastrService.success('Campaign default payout saved successfully');
                this.Submitted = false;
                this.getcampaignbyuuid();
                this.defaultpayoutForm.reset();
            }
            else {
                this.toastrService.error('Failed To add campaign payout');
            }
        }, error => this.error = error);
    }
    get_recordingstatus(event) {
        this.recording = event.target.checked;
        // console.log(this.recording);
        if (this.recording == true) {
            this.editForm.get('recording').setValue(1);
            this.recording = 1;
        }
        if (this.recording == false) {
            this.editForm.get('recording').setValue(0);
            this.recording = 0;
        }
    }
    get_maxcon(event) {
        this.maxconcurrency = event.target.checked;
        // this.isselectlabel = false;    
        // $(".labelswitch").prop('checked',false);
    }
    get_labelisselect(event) {
        this.isselectlabel = event.target.checked;
        // this.maxconcurrency = false;    
        // $(".labelnumber").prop('checked',false);
    }
    settingToggleDuration(val) {
        this.settingToggleDurationvalue = val;
        this.editRoutingForm.get('settingToggleDurationval').setValue(val);
    }
    editRoutingdata(uuid, priority, weight, revenue, type, seconds, restrictdup, restrictafter, settingToggleDurationval, days) {
        // console.log(uuid)
        this.editRoutingForm.patchValue({
            uuid: uuid,
            priority: priority,
            weight: weight,
            conversation_revenue: revenue,
            conversation_event: type,
            conversation_seconds: seconds,
            restrictdup: restrictdup,
            restrictafter: restrictafter,
            days: days,
            settingToggleDurationval: settingToggleDurationval,
            settingToggleDuration: settingToggleDurationval,
        });
        this.settingToggleDurationvalue = settingToggleDurationval;
    }
    changeVal(uuid, val, type) {
        this.moduleservice.change_routingplanval(uuid, val, type).subscribe(res => {
            if (res.status !== 'error') {
                // this.toastrService.success('Routing Plan Updated Successfully');  
                this.Submitted = false;
                this.loadallRoutingplan(this.uuid);
            }
            else {
                // this.toastrService.error('Failed To Update Campaign');
            }
        }, error => this.error = error);
    }
    get editRoutingSubmit() { return this.editRoutingForm.controls; }
    oneditRoutingSubmit() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.editRoutingForm.get('user_uuid').setValue(currentUser.uuid);
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.editRoutingSubmit(this.uuid, this.editRoutingForm.value).subscribe(res => {
            if (res.status !== 'error') {
                this.toastrService.success('Routing Plan Updated Successfully');
                this.Submitted = false;
                this.loadallRoutingplan(this.uuid);
            }
            else {
                this.toastrService.error('Failed To Update Campaign');
            }
        }, error => this.error = error);
    }
    gettimezone() {
        this.moduleservice.gettimezone().subscribe(res => {
            this.alltimezone = res;
            // console.log(res);          
        });
    }
    exportdata() {
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            useBom: true,
            headers: ["UUID", "Enabled", " Publisher", "Publisher UUID", "Number", "Associated Labels", "Number UUID", "Configuration Overrides", "Status"]
        };
        // console.log(this.campaignpublisher);
        new ngx_csv__WEBPACK_IMPORTED_MODULE_11__["ngxCsv"](this.campaignpublisher, 'All Campaign Publishers', options);
    }
    getType(type, val) {
        if (val == 1) {
            this.renderer.setProperty(window, 'scrollTo', {
                top: this.targetDiv.nativeElement.offsetTop,
                behavior: 'smooth'
            });
        }
        if (type == 1) {
            $("#tabs2").removeClass("btn btn-primary btn-sm camactivetab");
            $("#tabs1").addClass("camactivetab");
            this.filtertype = 1;
            //  this.loadcallsdata(this.filterselected,this.selecteddate,1);
        }
        if (type == 2) {
            $("#tabs1").removeClass("btn btn-primary btn-sm camactivetab");
            $("#tabs2").addClass("camactivetab");
            this.filtertype = 2;
            //  this.loadcallsdata(this.filterselected,this.selecteddate,4);
        }
    }
    getScroll(val) {
        try {
            const errorField = this.renderer.selectRootElement('.first-class');
            errorField.scrollIntoView();
        }
        catch (err) {
        }
    }
    getParticipationType(type) {
        if (type == 1) {
            $("#tabs4").removeClass("btn btn-primary btn-sm camactivetab");
            $("#tabs3").addClass("camactivetab");
            this.pfiltertype = 1;
            //  this.loadcallsdata(this.filterselected,this.selecteddate,1);
        }
        if (type == 2) {
            $("#tabs3").removeClass("btn btn-primary btn-sm camactivetab");
            $("#tabs4").addClass("camactivetab");
            this.pfiltertype = 2;
            //  this.loadcallsdata(this.filterselected,this.selecteddate,4);
        }
    }
    reqdata(details) {
        this.parreqdata = details;
    }
    iscreateoffertoggle() {
        this.iscreateoffer = !this.iscreateoffer;
    }
    isshowmessagetoggle() {
        this.isshowmessage = !this.isshowmessage;
    }
    is_approvaltoggle(event) {
        if (event.target.checked == true) {
            this.is_approval = 1;
        }
        else {
            this.is_approval = 0;
        }
    }
    allow_tollfree_notoggle(event) {
        if (event.target.checked == true) {
            this.isallow_tollfree_no = 1;
        }
        else {
            this.isallow_tollfree_no = 0;
        }
    }
    is_allow_did_notoggle(event) {
        if (event.target.checked == true) {
            this.allow_did_no = 1;
        }
        else {
            this.allow_did_no = 0;
        }
    }
    get addOfferFormcontrol() { return this.addofferForm.controls; }
    onAddOfferSubmit(buttonType) {
        // console.log(this.addofferForm.get('description').value); return
        this.addofferSubmitted = true;
        const formData = new FormData();
        if (this.addofferForm.invalid) {
            return;
        }
        let exp_date = this.addofferForm.get('exp_date').value;
        let hrs = this.addofferForm.get('start_hrs').value;
        let min = this.addofferForm.get('start_min').value;
        let exp_date_full = `${exp_date} ${hrs}:${min}`;
        // console.log(exp_date_full); return
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('campaign_uuid', this.uuid);
        formData.append('user_uuid', currentUser.uuid);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('submittype', buttonType);
        formData.append('name', this.addofferForm.get('name').value);
        formData.append('description', this.addofferForm.get('description').value);
        formData.append('hoursofoperation', this.addofferForm.get('hoursofoperation').value);
        formData.append('exp_timezone', this.addofferForm.get('exp_timezone').value);
        formData.append('exp_date', exp_date_full);
        formData.append('req_approval', this.is_approval);
        formData.append('max_no_per_publisher', this.addofferForm.get('max_no_per_publisher').value);
        formData.append('allow_tollfree_no', this.isallow_tollfree_no);
        formData.append('allow_did_no', this.allow_did_no);
        // console.log(formData);
        this.moduleservice.addOffer(formData).subscribe(res => {
            if (res.status !== 'error') {
                this.toastrService.success('Offer details submitted Successfully');
                this.Submitted = false;
                this.isadded = 1;
                this.isedit = false;
                this.campaignoffers = [[]];
                this.loadparticipationrequest(this.uuid);
            }
            else {
                this.toastrService.error('Failed To save offer details');
            }
        }, error => this.error = error);
    }
    isedittoggle() {
        this.iscreateoffer = true;
        this.isedit = !this.isedit;
        var now = new Date(this.offerdetails.exp_date);
        var time = now.toTimeString();
        this.addofferForm.patchValue({
            name: this.offerdetails.name,
            description: this.offerdetails.description,
            hoursofoperation: this.offerdetails.hoursofoperation,
            exp_timezone: this.offerdetails.exp_timezone,
            exp_date: this.offerdetails.exp_date,
            start_hrs: time.slice(0, 2),
            start_min: time.slice(3, 5),
            max_no_per_publisher: this.offerdetails.max_no_per_publisher,
        });
        this.today = new Date(this.offerdetails.exp_date).toISOString().split('T')[0];
        // console.log(time);
        this.is_approval = this.offerdetails.req_approval;
        this.isallow_tollfree_no = this.offerdetails.allow_tollfree_no;
        this.allow_did_no = this.offerdetails.allow_did_no;
    }
    changeofferstatus(status) {
        let msg = "Pause";
        let content = "Are you sure you want to pause the offer? Publishers won't be able to participate in the paused offer.";
        if (status == 1) {
            msg = "Resume";
            content = "Are you sure you want to resume the offer? Publishers will be able to participate in the offer.";
        }
        if (status == 3) {
            msg = "End";
            content = "Are you sure you want to end the offer and remove it from the campaign? All related phone numbers will be terminated, all participating publishers will be notified of this change.";
        }
        if (status == 2) {
            msg = "End";
        }
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Confirm ' + msg + ' Offer',
            text: content,
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: msg,
            cancelButtonText: 'Cancel'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.changeofferstatus(this.uuid, status).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Success!', 'Offer ' + msg + ' Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    this.loadparticipationrequest(this.uuid);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    approverejoffer(status) {
        // console.log(this.parreqdata); return
        let msg = "Approve";
        if (status == 3) {
            msg = "Reject";
        }
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            text: 'Confirm ' + msg + ' Offer',
            // text: content,
            // type: 'warning',
            showCancelButton: true,
            confirmButtonText: msg,
            cancelButtonText: 'Cancel'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.approverejoffer(this.parreqdata.uuid, status).subscribe(res => {
                    // console.log(res);return false;
                    $("#approveoffermodel").modal("hide");
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Success!', 'Offer ' + msg + ' Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    this.loadparticipationrequest(this.uuid);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
};
CampaignEditComponent.ctorParameters = () => [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Renderer2"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_6__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_9__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_8__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_8__["ActivatedRoute"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectorRef"] },
    { type: ngx_ui_loader__WEBPACK_IMPORTED_MODULE_13__["NgxUiLoaderService"] }
];
CampaignEditComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }],
    tabletarget: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTableTarget', { static: true },] }],
    tablependingreq: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTablePendingReq', { static: true },] }],
    tablerouting: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTableRouting', { static: true },] }],
    targetDiv: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['targetDiv',] }],
    editdiv: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['editdiv',] }]
};
CampaignEditComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-campaign-edit',
        template: _raw_loader_campaign_edit_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_campaign_edit_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], CampaignEditComponent);



/***/ }),

/***/ "nGW0":
/*!*******************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/settings/basic-setting/basic-setting.component.html ***!
  \*******************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n  \r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\">\r\n                    <div class=\"col-5\">\r\n                        <div class=\"card-header\">\r\n                        <h4>Forwarding Number Directory</h4></div>\r\n                    </div>                   \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <form id=\"addLabel\" [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n                    <div class=\"row\">\r\n                      <div class=\"col-md-12\">\r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Forwarding Directory Google Sheet Link: </label>\r\n                        <input formControlName=\"googlesheetlink\" type=\"text\" class=\"form-control\">                                 \r\n                    </div>   \r\n                    <!-- <div *ngIf=\"ispubreg==true\"> -->\r\n                    <!-- <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Introduction :</label>\r\n                        <label class=\"custom-switch mt-2 pl-0\">\r\n                            <textarea formControlName=\"intro\" name=\"\" id=\"\" cols=\"190\" rows=\"10\" class=\"form-control\"></textarea>                            \r\n                        </label>                                    \r\n                    </div>    -->\r\n                    \r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Duplicate Rule: </label>\r\n                        <label class=\"custom-switch mt-2 pl-0\">\r\n                            <input type=\"checkbox\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\" (change)=\"xyzrules_enable($event)\"  [checked]=\"xyzrules==true\">\r\n                            <span class=\"custom-switch-indicator\"></span>                     \r\n                        </label>           \r\n                    </div>   \r\n\r\n                    <!-- <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Terms and Conditions :</label>\r\n                        <label class=\"custom-switch mt-2 pl-0\">\r\n                            <input type=\"checkbox\" [checked]=\"terms_condstatus==true\" formControlName=\"terms_cond\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\" (change)=\"tc_enable($event)\">\r\n                            <span class=\"custom-switch-indicator\"></span>                     \r\n                        </label>                                    \r\n                    </div>\r\n                 \r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">Terms and Conditions URL :</label>\r\n                        <input formControlName=\"tc_url\"  type=\"text\" class=\"form-control\">           \r\n                    </div>   \r\n                   \r\n                    <div class=\"form-group\">\r\n                        <label  class=\"d-block\">URL :</label>\r\n                        <a href=\"{{BaseUrl}}publisher-registration/{{Companyuuid}}\" target=\"_blank\">{{BaseUrl}}publisher-registration/{{Companyuuid}}</a>                        \r\n                    </div>   -->  \r\n                    <!-- </div>     -->    \r\n                    </div>     \r\n                 </div>\r\n                    <div class=\"modal-footer\" style=\"padding: 0;\">\r\n                       <button  type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Save</button>                       \r\n                      </div>\r\n                  </form>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>\r\n");

/***/ }),

/***/ "nhKR":
/*!**************************************************************************!*\
  !*** ./src/app/modules/ivr-menus/edit-ivrmenu/edit-ivrmenu.component.ts ***!
  \**************************************************************************/
/*! exports provided: EditIvrmenuComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditIvrmenuComponent", function() { return EditIvrmenuComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_edit_ivrmenu_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./edit-ivrmenu.component.html */ "16os");
/* harmony import */ var _edit_ivrmenu_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit-ivrmenu.component.scss */ "v/CO");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common/http */ "tk/3");









let EditIvrmenuComponent = class EditIvrmenuComponent {
    constructor(fb, moduleService, router, route, toastrService, handler, cdRef) {
        this.fb = fb;
        this.moduleService = moduleService;
        this.router = router;
        this.route = route;
        this.toastrService = toastrService;
        this.cdRef = cdRef;
        this.url_0 = '';
        this.url_1 = '';
        this.url_2 = '';
        this.url_3 = '';
        this.url_4 = '';
        this.url_5 = '';
        this.url_6 = '';
        this.url_7 = '';
        this.url_8 = '';
        this.url_9 = '';
        this.url_10 = '';
        this.alltarget = [];
        this.allBuyers = [];
        this.allivrroutingplan = [];
        this.settings = {};
        this.selectedItems = [];
        this.forward_0 = 'FORWARD_TO_NUMBER';
        this.forward_1 = 'FORWARD_TO_NUMBER';
        this.forward_2 = 'FORWARD_TO_NUMBER';
        this.forward_3 = 'FORWARD_TO_NUMBER';
        this.forward_4 = 'FORWARD_TO_NUMBER';
        this.forward_5 = 'FORWARD_TO_NUMBER';
        this.forward_6 = 'FORWARD_TO_NUMBER';
        this.forward_7 = 'FORWARD_TO_NUMBER';
        this.forward_8 = 'FORWARD_TO_NUMBER';
        this.forward_9 = 'FORWARD_TO_NUMBER';
        this.forward_10 = 'FORWARD_TO_NUMBER';
        this.progress = { percentage: 0 };
        this.formdata = new FormData();
        this.submitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_8__["HttpClient"](handler);
    }
    ngAfterContentChecked() {
        this.cdRef.detectChanges();
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        // setTimeout(()=>{this.showLoadingIndicator= false; },1000);
        this.settings = {
            enableSearchFilter: true,
            showCheckbox: false,
            singleSelection: true, text: "Select Buyer"
        };
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.getallbuyers().then((res) => {
            this.allBuyers = res;
        });
        this.getIVRMenus().then((res) => {
            this.menuname = res;
        });
        this.gettarget().then((res) => {
            this.alltarget = res;
        });
        this.getallivrroutingplan().then((res) => {
            this.allivrroutingplan = res;
        });
        // this.moduleService.getallcampaindata(this.currentCompany.uuid).subscribe(
        //     res => {
        //     this.campaigns =res;
        //     },
        //     error => this.error = error
        // ); 
        const uuid = this.route.snapshot.paramMap.get('id');
        if (uuid) {
            this.moduleService.getivrdata(uuid).subscribe(res => {
                // console.log(res); 
                // console.log(this.allivrroutingplan);
                this.editIVRMenuForm.patchValue({
                    name: res.ivr_data.name,
                    noofretries: res.ivr_data.number_of_retries,
                    timeout: res.ivr_data.timeout,
                    forward_to: res.ivr_data.forward_to,
                    ivr_options: res.ivr_data.number_of_options,
                    default_response: res.ivr_data.default_response_value,
                });
                // console.log(res.ivr_data.buyer);
                if (res.ivr_data.buyer != "" || res.ivr_data.buyer != undefined) {
                    let text = this.allBuyers.filter(x => x.id == res.ivr_data.buyer)[0];
                    if (text != undefined) {
                        this.selectedItems = [{ "id": res.ivr_data.buyer, "itemName": text.text }];
                    }
                }
                this.selecteddefault = res.ivr_data.number_of_options;
                for (let i = 0; i <= res.ivr_data.number_of_options + 1; i++) {
                    // console.log(res.ivr_optiondata[i].forward_to_uuid);
                    if (res.ivr_optiondata[i].forward_to_uuid && res.ivr_optiondata[i].forward_to_uuid == 'CONTINUE') {
                        if (i == 0) {
                            this.getfortoval = 'CONTINUE';
                            this.forward_0 = '';
                        }
                        if (i == 1) {
                            this.getfortoval = 'CONTINUE';
                            this.forward_1 = '';
                        }
                        if (i == 2) {
                            this.getfortoval = 'CONTINUE';
                            this.forward_2 = '';
                        }
                        if (i == 3) {
                            this.getfortoval = 'CONTINUE';
                            this.forward_3 = '';
                        }
                        if (i == 4) {
                            this.getfortoval = 'CONTINUE';
                            this.forward_4 = '';
                        }
                        if (i == 5) {
                            this.getfortoval = 'CONTINUE';
                            this.forward_5 = '';
                        }
                        if (i == 6) {
                            this.getfortoval = 'CONTINUE';
                            this.forward_6 = '';
                        }
                        if (i == 7) {
                            this.getfortoval = 'CONTINUE';
                            this.forward_7 = '';
                        }
                        if (i == 8) {
                            this.getfortoval = 'CONTINUE';
                            this.forward_8 = '';
                        }
                        if (i == 9) {
                            this.getfortoval = 'CONTINUE';
                            this.forward_9 = '';
                        }
                        if (i == 10) {
                            this.getfortoval = 'CONTINUE';
                            this.forward_10 = '';
                        }
                    }
                    if (res.ivr_optiondata[i].forward_to_uuid == 'FORWARD_TO_NUMBER') {
                        this.getfortoval = 'FORWARD_TO_NUMBER';
                        this.getfortonumberval = res.ivr_optiondata[i].forward_to;
                    }
                    // if(res.ivr_optiondata[i].forward_to_uuid=='FORWARD_TO_CAMPAIGN'){
                    //     this.getfortoval = res.ivr_optiondata[i].forward_to_uuid;    
                    //     if(i == 0){
                    //     this.forward_0='FORWARD_TO_CAMPAIGN';
                    //     this.editIVRMenuForm.patchValue({
                    //       forwardto_campaign_0:res.ivr_optiondata[0].forward_to
                    //     });
                    //     }
                    //     if(i == 1){
                    //       this.forward_1='FORWARD_TO_CAMPAIGN';
                    //       this.editIVRMenuForm.patchValue({
                    //         forwardto_campaign_1:res.ivr_optiondata[1].forward_to
                    //       });
                    //     }
                    //     if(i == 2){
                    //       this.forward_2='FORWARD_TO_CAMPAIGN';
                    //       // console.log(res.ivr_optiondata[2]);
                    //       this.editIVRMenuForm.patchValue({
                    //         forwardto_campaign_2:res.ivr_optiondata[2].forward_to
                    //       });
                    //     }
                    //     if(i == 3){
                    //       this.forward_3='FORWARD_TO_CAMPAIGN';
                    //       this.editIVRMenuForm.patchValue({
                    //         forwardto_campaign_3:res.ivr_optiondata[3].forward_to
                    //       });
                    //     }
                    //     if(i == 4){
                    //       this.forward_4='FORWARD_TO_CAMPAIGN';
                    //       this.editIVRMenuForm.patchValue({
                    //         forwardto_campaign_4:res.ivr_optiondata[4].forward_to
                    //       });
                    //     }
                    //     if(i == 5){
                    //       this.forward_5='FORWARD_TO_CAMPAIGN';
                    //       this.editIVRMenuForm.patchValue({
                    //         forwardto_campaign_5:res.ivr_optiondata[5].forward_to
                    //       });
                    //     }
                    //     if(i == 6){
                    //       this.forward_6='FORWARD_TO_CAMPAIGN';
                    //       this.editIVRMenuForm.patchValue({
                    //         forwardto_campaign_6:res.ivr_optiondata[6].forward_to
                    //       });
                    //     }
                    //     if(i == 7){
                    //       this.forward_7='FORWARD_TO_CAMPAIGN';
                    //       this.editIVRMenuForm.patchValue({
                    //         forwardto_campaign_7:res.ivr_optiondata[7].forward_to
                    //       });
                    //     }
                    //     if(i == 8){
                    //       this.forward_8='FORWARD_TO_CAMPAIGN';
                    //       this.editIVRMenuForm.patchValue({
                    //         forwardto_campaign_8:res.ivr_optiondata[8].forward_to
                    //       });
                    //     }
                    //     if(i == 9){
                    //       this.forward_9='FORWARD_TO_CAMPAIGN';
                    //       this.editIVRMenuForm.patchValue({
                    //         forwardto_campaign_9:res.ivr_optiondata[9].forward_to
                    //       });
                    //     }          
                    //     if(i == 10){
                    //       this.forward_10='FORWARD_TO_CAMPAIGN';
                    //       this.editIVRMenuForm.patchValue({
                    //         forwardto_campaign_10:res.ivr_optiondata[10].forward_to
                    //       });
                    //     }          
                    // }
                    if (res.ivr_optiondata[i].forward_to_uuid == 'FORWARD_TO_IVR') {
                        this.getfortoval = res.ivr_optiondata[i].forward_to_uuid;
                        if (i == 0) {
                            this.forward_0 = 'FORWARD_TO_IVR';
                            this.editIVRMenuForm.patchValue({
                                forwardto_ivr_0: res.ivr_optiondata[0].forward_to
                            });
                        }
                        if (i == 1) {
                            this.forward_1 = 'FORWARD_TO_IVR';
                            this.editIVRMenuForm.patchValue({
                                forwardto_ivr_1: res.ivr_optiondata[1].forward_to
                            });
                        }
                        if (i == 2) {
                            this.forward_2 = 'FORWARD_TO_IVR';
                            if (res.ivr_optiondata[2].forward_to != "") {
                                let text = this.menuname.filter(x => x.id == res.ivr_optiondata[2].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivr_2 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[2].forward_to, "itemName": text.name }];
                                }
                            }
                        }
                        if (i == 3) {
                            this.forward_3 = 'FORWARD_TO_IVR';
                            if (res.ivr_optiondata[3].forward_to != "") {
                                let text = this.menuname.filter(x => x.id == res.ivr_optiondata[3].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivr_3 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[3].forward_to, "itemName": text.name }];
                                }
                            }
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivr_3:res.ivr_optiondata[3].forward_to
                            // });
                        }
                        if (i == 4) {
                            this.forward_4 = 'FORWARD_TO_IVR';
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivr_4:res.ivr_optiondata[4].forward_to
                            // });
                            if (res.ivr_optiondata[4].forward_to != "") {
                                let text = this.menuname.filter(x => x.id == res.ivr_optiondata[4].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivr_4 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[4].forward_to, "itemName": text.name }];
                                }
                            }
                        }
                        if (i == 5) {
                            this.forward_5 = 'FORWARD_TO_IVR';
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivr_5:res.ivr_optiondata[5].forward_to
                            // });
                            if (res.ivr_optiondata[5].forward_to != "") {
                                let text = this.menuname.filter(x => x.id == res.ivr_optiondata[5].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivr_5 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[5].forward_to, "itemName": text.name }];
                                }
                            }
                        }
                        if (i == 6) {
                            this.forward_6 = 'FORWARD_TO_IVR';
                            if (res.ivr_optiondata[6].forward_to != "") {
                                let text = this.menuname.filter(x => x.id == res.ivr_optiondata[6].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivr_6 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[6].forward_to, "itemName": text.name }];
                                }
                            }
                        }
                        if (i == 7) {
                            this.forward_7 = 'FORWARD_TO_IVR';
                            if (res.ivr_optiondata[7].forward_to != "") {
                                let text = this.menuname.filter(x => x.id == res.ivr_optiondata[7].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivr_7 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[7].forward_to, "itemName": text.name }];
                                }
                            }
                        }
                        if (i == 8) {
                            this.forward_8 = 'FORWARD_TO_IVR';
                            if (res.ivr_optiondata[8].forward_to != "") {
                                let text = this.menuname.filter(x => x.id == res.ivr_optiondata[8].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivr_8 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[8].forward_to, "itemName": text.name }];
                                }
                            }
                        }
                        if (i == 9) {
                            this.forward_9 = 'FORWARD_TO_IVR';
                            if (res.ivr_optiondata[9].forward_to != "") {
                                let text = this.menuname.filter(x => x.id == res.ivr_optiondata[9].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivr_9 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[9].forward_to, "itemName": text.name }];
                                }
                            }
                        }
                        if (i == 10) {
                            this.forward_10 = 'FORWARD_TO_IVR';
                            if (res.ivr_optiondata[10].forward_to != "") {
                                let text = this.menuname.filter(x => x.id == res.ivr_optiondata[10].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivr_10 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[10].forward_to, "itemName": text.name }];
                                }
                            }
                        }
                    }
                    if (res.ivr_optiondata[i].forward_to_uuid == 'FORWARD_TO_ROUTING') {
                        this.getfortoval = res.ivr_optiondata[i].forward_to_uuid;
                        if (i == 0) {
                            this.forward_0 = 'FORWARD_TO_ROUTING';
                            this.editIVRMenuForm.patchValue({
                                forwardto_routing_0: res.ivr_optiondata[0].forward_to
                            });
                        }
                        if (i == 1) {
                            this.forward_1 = 'FORWARD_TO_ROUTING';
                            this.editIVRMenuForm.patchValue({
                                forwardto_routing_1: res.ivr_optiondata[1].forward_to
                            });
                        }
                        if (i == 2) {
                            this.forward_2 = 'FORWARD_TO_ROUTING';
                            // console.log(res.ivr_optiondata[2].forward_to);return
                            if (res.ivr_optiondata[2].forward_to != "") {
                                let text = this.alltarget.filter(x => x.id == res.ivr_optiondata[2].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_routing_2 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[2].forward_to, "itemName": text.itemName }];
                                }
                            }
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_routing_2:res.ivr_optiondata[2].forward_to
                            // });
                        }
                        if (i == 3) {
                            this.forward_3 = 'FORWARD_TO_ROUTING';
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_routing_3:res.ivr_optiondata[3].forward_to
                            // });
                            if (res.ivr_optiondata[3].forward_to != "") {
                                if (this.alltarget.length > 0) {
                                    let text = this.alltarget.filter(x => x.id == res.ivr_optiondata[3].forward_to)[0];
                                    if (text != undefined) {
                                        this.forwardto_routing_3 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[3].forward_to, "itemName": text.itemName }];
                                    }
                                }
                            }
                        }
                        if (i == 4) {
                            this.forward_4 = 'FORWARD_TO_ROUTING';
                            if (res.ivr_optiondata[4].forward_to != "") {
                                let text = this.alltarget.filter(x => x.id == res.ivr_optiondata[4].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_routing_4 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[4].forward_to, "itemName": text.itemName }];
                                }
                            }
                            // console.log(this.forwardto_routing_4);return
                        }
                        if (i == 5) {
                            this.forward_5 = 'FORWARD_TO_ROUTING';
                            if (res.ivr_optiondata[5].forward_to != "") {
                                let text = this.alltarget.filter(x => x.id == res.ivr_optiondata[5].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_routing_5 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[5].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 6) {
                            this.forward_6 = 'FORWARD_TO_ROUTING';
                            if (res.ivr_optiondata[6].forward_to != "") {
                                let text = this.alltarget.filter(x => x.id == res.ivr_optiondata[6].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_routing_6 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[6].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 7) {
                            this.forward_7 = 'FORWARD_TO_ROUTING';
                            if (res.ivr_optiondata[7].forward_to != "") {
                                let text = this.alltarget.filter(x => x.id == res.ivr_optiondata[7].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_routing_7 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[7].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 8) {
                            this.forward_8 = 'FORWARD_TO_ROUTING';
                            if (res.ivr_optiondata[8].forward_to != "") {
                                let text = this.alltarget.filter(x => x.id == res.ivr_optiondata[8].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_routing_8 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[8].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 9) {
                            this.forward_9 = 'FORWARD_TO_ROUTING';
                            if (res.ivr_optiondata[9].forward_to != "") {
                                let text = this.alltarget.filter(x => x.id == res.ivr_optiondata[9].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_routing_9 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[9].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 10) {
                            this.forward_10 = 'FORWARD_TO_ROUTING';
                            if (res.ivr_optiondata[10].forward_to != "") {
                                let text = this.alltarget.filter(x => x.id == res.ivr_optiondata[10].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_routing_10 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[10].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        // console.log(this.forward_3);
                    }
                    if (res.ivr_optiondata[i].forward_to_uuid == 'FORWARD_TO_IVRROUTING') {
                        this.getfortoval = res.ivr_optiondata[i].forward_to_uuid;
                        // console.log(i);
                        if (i == 0) {
                            this.forward_0 = 'FORWARD_TO_IVRROUTING';
                            this.editIVRMenuForm.patchValue({
                                forwardto_ivrrouting_0: res.ivr_optiondata[0].forward_to
                            });
                        }
                        if (i == 1) {
                            this.forward_1 = 'FORWARD_TO_IVRROUTING';
                            this.editIVRMenuForm.patchValue({
                                forwardto_ivrrouting_1: res.ivr_optiondata[1].forward_to
                            });
                        }
                        if (i == 2) {
                            this.forward_2 = 'FORWARD_TO_IVRROUTING';
                            if (res.ivr_optiondata[2].forward_to != "") {
                                let text = this.allivrroutingplan.filter(x => x.id == res.ivr_optiondata[2].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivrrouting_2 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[2].forward_to, "itemName": text.itemName }];
                                }
                            }
                            // console.log(this.forward_2);
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivrrouting_2:res.ivr_optiondata[2].forward_to
                            // });
                        }
                        if (i == 3) {
                            this.forward_3 = 'FORWARD_TO_IVRROUTING';
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivrrouting_3:res.ivr_optiondata[3].forward_to
                            // });
                            if (res.ivr_optiondata[3].forward_to != "") {
                                let text = this.allivrroutingplan.filter(x => x.id == res.ivr_optiondata[3].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivrrouting_3 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[3].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 4) {
                            this.forward_4 = 'FORWARD_TO_IVRROUTING';
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivrrouting_4:res.ivr_optiondata[4].forward_to
                            // });
                            if (res.ivr_optiondata[4].forward_to != "") {
                                let text = this.allivrroutingplan.filter(x => x.id == res.ivr_optiondata[4].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivrrouting_4 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[4].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 5) {
                            this.forward_5 = 'FORWARD_TO_IVRROUTING';
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivrrouting_5:res.ivr_optiondata[5].forward_to
                            // });
                            if (res.ivr_optiondata[5].forward_to != "") {
                                let text = this.allivrroutingplan.filter(x => x.id == res.ivr_optiondata[5].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivrrouting_5 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[5].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 6) {
                            this.forward_6 = 'FORWARD_TO_IVRROUTING';
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivrrouting_6:res.ivr_optiondata[6].forward_to
                            // });
                            if (res.ivr_optiondata[6].forward_to != "") {
                                let text = this.allivrroutingplan.filter(x => x.id == res.ivr_optiondata[6].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivrrouting_6 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[6].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 7) {
                            this.forward_7 = 'FORWARD_TO_IVRROUTING';
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivrrouting_7:res.ivr_optiondata[7].forward_to
                            // });
                            if (res.ivr_optiondata[7].forward_to != "") {
                                let text = this.allivrroutingplan.filter(x => x.id == res.ivr_optiondata[7].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivrrouting_7 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[7].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 8) {
                            this.forward_8 = 'FORWARD_TO_IVRROUTING';
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivrrouting_8:res.ivr_optiondata[8].forward_to
                            // });
                            if (res.ivr_optiondata[8].forward_to != "") {
                                let text = this.allivrroutingplan.filter(x => x.id == res.ivr_optiondata[8].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivrrouting_8 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[8].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 9) {
                            this.forward_9 = 'FORWARD_TO_IVRROUTING';
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivrrouting_9:res.ivr_optiondata[9].forward_to
                            // });
                            if (res.ivr_optiondata[9].forward_to != "") {
                                let text = this.allivrroutingplan.filter(x => x.id == res.ivr_optiondata[9].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivrrouting_9 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[9].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        if (i == 10) {
                            this.forward_10 = 'FORWARD_TO_IVRROUTING';
                            // this.editIVRMenuForm.patchValue({
                            //   forwardto_ivrrouting_10:res.ivr_optiondata[10].forward_to
                            // });
                            if (res.ivr_optiondata[10].forward_to != "") {
                                let text = this.allivrroutingplan.filter(x => x.id == res.ivr_optiondata[10].forward_to)[0];
                                if (text != undefined) {
                                    this.forwardto_ivrrouting_10 = [{ "uuid": text.uuid, "id": res.ivr_optiondata[10].forward_to, "itemName": text.itemName }];
                                }
                            }
                        }
                        // console.log(this.forward_3);
                    }
                    if (res.ivr_optiondata[i].forward_to_uuid != 'FORWARD_TO_CAMPAIGN' && res.ivr_optiondata[i].forward_to_uuid != 'FORWARD_TO_NUMBER' && res.ivr_optiondata[i].forward_to_uuid != 'FORWARD_TO_IVR' && res.ivr_optiondata[i].forward_to_uuid != 'FORWARD_TO_ROUTING' && res.ivr_optiondata[i].forward_to_uuid != 'FORWARD_TO_IVRROUTING' && res.ivr_optiondata[i].forward_to_uuid != 'CONTINUE') {
                        this.getfortoval = res.ivr_optiondata[i].forward_to_uuid;
                        if (i == 0) {
                            this.forward_0 = '';
                        }
                        if (i == 1) {
                            this.forward_1 = '';
                        }
                        if (i == 2) {
                            this.forward_2 = '';
                        }
                        if (i == 3) {
                            this.forward_3 = '';
                        }
                        if (i == 4) {
                            this.forward_4 = '';
                        }
                        if (i == 5) {
                            this.forward_5 = '';
                        }
                        if (i == 6) {
                            this.forward_6 = '';
                        }
                        if (i == 7) {
                            this.forward_7 = '';
                        }
                        if (i == 8) {
                            this.forward_8 = '';
                        }
                        if (i == 9) {
                            this.forward_9 = '';
                        }
                        if (i == 10) {
                            this.forward_10 = '';
                        }
                    }
                    //   if(i==0){
                    //     if(res.ivr_optiondata[i].forward_to!=''){
                    //       this.getfortoval = 'CONTINUE';
                    //       this.getfortonumberval = '';
                    //     }else{
                    //       this.getfortoval = 'FORWARD_TO_NUMBER';
                    //       this.getfortonumberval = res.ivr_optiondata[i].forward_to;
                    //     }
                    // }else{
                    //   this.getfortoval = 'FORWARD_TO_NUMBER';
                    // }
                    this.audid = "audio_uuid_" + i;
                    this.getforto = "forward_to_" + i;
                    this.getfortonumber = "forwardto_phone_" + i;
                    this.audiosrc = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/';
                    if (i == 0) {
                        this.url_0 = this.audiosrc + '' + res.ivr_optiondata[i].original_filename;
                    }
                    if (i == 1) {
                        this.url_1 = this.audiosrc + '' + res.ivr_optiondata[i].original_filename;
                    }
                    if (i == 2) {
                        this.url_2 = this.audiosrc + '' + res.ivr_optiondata[i].original_filename;
                    }
                    if (i == 3) {
                        this.url_3 = this.audiosrc + '' + res.ivr_optiondata[i].original_filename;
                    }
                    if (i == 4) {
                        this.url_4 = this.audiosrc + '' + res.ivr_optiondata[i].original_filename;
                    }
                    if (i == 5) {
                        this.url_5 = this.audiosrc + '' + res.ivr_optiondata[i].original_filename;
                    }
                    if (i == 6) {
                        this.url_6 = this.audiosrc + '' + res.ivr_optiondata[i].original_filename;
                    }
                    if (i == 7) {
                        this.url_7 = this.audiosrc + '' + res.ivr_optiondata[i].original_filename;
                    }
                    if (i == 8) {
                        this.url_8 = this.audiosrc + '' + res.ivr_optiondata[i].original_filename;
                    }
                    if (i == 9) {
                        this.url_9 = this.audiosrc + '' + res.ivr_optiondata[i].original_filename;
                    }
                    if (i == 10) {
                        this.url_10 = this.audiosrc + '' + res.ivr_optiondata[i].original_filename;
                    }
                    this.editIVRMenuForm.patchValue({
                        [this.audid]: res.ivr_optiondata[i].audio_uuid,
                        [this.getforto]: this.getfortoval,
                        [this.getfortonumber]: this.getfortonumberval,
                    });
                }
            });
        }
        this.editIVRMenuForm = this.fb.group({
            user_uuid: [''],
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            noofretries: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            timeout: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            forward_to: [''],
            openingmenu_forward_to: [''],
            ivr_options: [''],
            openingmenu_forward_tonumber: [''],
            default_response: [''],
            buyer: [''],
            // Select Audio UUID
            audio_uuid_0: [''],
            audio_uuid_1: [''],
            audio_uuid_2: [''],
            audio_uuid_3: [''],
            audio_uuid_4: [''],
            audio_uuid_5: [''],
            audio_uuid_6: [''],
            audio_uuid_7: [''],
            audio_uuid_8: [''],
            audio_uuid_9: [''],
            audio_uuid_10: [''],
            // Upload Audio File
            upload_audio_0: [''],
            upload_audio_1: [''],
            upload_audio_2: [''],
            upload_audio_3: [''],
            upload_audio_4: [''],
            upload_audio_5: [''],
            upload_audio_6: [''],
            upload_audio_7: [''],
            upload_audio_8: [''],
            upload_audio_9: [''],
            upload_audio_10: [''],
            // Forward to Number or IVR Menu
            forward_to_0: [''],
            forward_to_1: [''],
            forward_to_2: [''],
            forward_to_3: [''],
            forward_to_4: [''],
            forward_to_5: [''],
            forward_to_6: [''],
            forward_to_7: [''],
            forward_to_8: [''],
            forward_to_9: [''],
            forward_to_10: [''],
            // Forward to Number
            forwardto_phone_0: [''],
            forwardto_phone_1: [''],
            forwardto_phone_2: [''],
            forwardto_phone_3: [''],
            forwardto_phone_4: [''],
            forwardto_phone_5: [''],
            forwardto_phone_6: [''],
            forwardto_phone_7: [''],
            forwardto_phone_8: [''],
            forwardto_phone_9: [''],
            forwardto_phone_10: [''],
            // Forward to Campaign
            forwardto_campaign_0: [''],
            forwardto_campaign_1: [''],
            forwardto_campaign_2: [''],
            forwardto_campaign_3: [''],
            forwardto_campaign_4: [''],
            forwardto_campaign_5: [''],
            forwardto_campaign_6: [''],
            forwardto_campaign_7: [''],
            forwardto_campaign_8: [''],
            forwardto_campaign_9: [''],
            forwardto_campaign_10: [''],
            forwardto_ivr_0: [''],
            forwardto_ivr_1: [''],
            forwardto_ivr_2: [''],
            forwardto_ivr_3: [''],
            forwardto_ivr_4: [''],
            forwardto_ivr_5: [''],
            forwardto_ivr_6: [''],
            forwardto_ivr_7: [''],
            forwardto_ivr_8: [''],
            forwardto_ivr_9: [''],
            forwardto_ivr_10: [''],
            forwardto_routing_0: [''],
            forwardto_routing_1: [''],
            forwardto_routing_2: [''],
            forwardto_routing_3: [''],
            forwardto_routing_4: [''],
            forwardto_routing_5: [''],
            forwardto_routing_6: [''],
            forwardto_routing_7: [''],
            forwardto_routing_8: [''],
            forwardto_routing_9: [''],
            forwardto_routing_10: [''],
            forwardto_ivrrouting_0: [''],
            forwardto_ivrrouting_1: [''],
            forwardto_ivrrouting_2: [''],
            forwardto_ivrrouting_3: [''],
            forwardto_ivrrouting_4: [''],
            forwardto_ivrrouting_5: [''],
            forwardto_ivrrouting_6: [''],
            forwardto_ivrrouting_7: [''],
            forwardto_ivrrouting_8: [''],
            forwardto_ivrrouting_9: [''],
            forwardto_ivrrouting_10: [''],
        });
        this.getaudio();
        this.showLoadingIndicator = false;
    }
    gettarget() {
        return new Promise((res, rej) => {
            this.moduleService.getAlltarget(this.currentCompany.uuid).subscribe(result => {
                res(result);
            }, error => this.error = error);
        });
    }
    getallbuyers() {
        return new Promise((res, rej) => {
            this.moduleService.getallbuyers(this.currentCompany.uuid).subscribe(result => {
                res(result);
            }, error => this.error = error);
        });
    }
    getIVRMenus() {
        return new Promise((res, rej) => {
            this.moduleService.getIVRMenus(this.currentCompany.uuid).subscribe(result => {
                res(result);
            }, error => this.error = error);
        });
    }
    getallivrroutingplan() {
        return new Promise((res, rej) => {
            this.moduleService.allivrroutingplan(this.currentCompany.uuid).subscribe(result => {
                res(result);
            }, error => this.error = error);
        });
    }
    getaudio() {
        this.moduleService.getIVRAudio(this.currentCompany.uuid, 0).subscribe(res => {
            // console.log(res);
            this.audio = res;
        }, error => this.error = error);
    }
    IVR_Options(event) {
        this.selecteddefault = event.target.value;
    }
    forward_to(event, i) {
        if (i == 0) {
            this.forward_0 = event.target.value;
        }
        if (i == 1) {
            this.forward_1 = event.target.value;
        }
        if (i == 2) {
            this.forward_2 = event.target.value;
        }
        if (i == 3) {
            this.forward_3 = event.target.value;
        }
        if (i == 4) {
            this.forward_4 = event.target.value;
        }
        if (i == 5) {
            this.forward_5 = event.target.value;
        }
        if (i == 6) {
            this.forward_6 = event.target.value;
        }
        if (i == 7) {
            this.forward_7 = event.target.value;
        }
        if (i == 8) {
            this.forward_8 = event.target.value;
        }
        if (i == 9) {
            this.forward_9 = event.target.value;
        }
        if (i == 10) {
            this.forward_10 = event.target.value;
        }
    }
    audiochange(args, count) {
        // alert(count);    
        this.audioname = args.target.options[args.target.selectedIndex].text;
        if (count == 0) {
            this.url_0 = '';
            this.url_0 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 1) {
            this.url_1 = '';
            this.url_1 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 2) {
            this.url_2 = '';
            this.url_2 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 3) {
            this.url_3 = '';
            this.url_3 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 4) {
            this.url_4 = '';
            this.url_4 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 5) {
            this.url_5 = '';
            this.url_5 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 6) {
            this.url_6 = '';
            this.url_6 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 7) {
            this.url_7 = '';
            this.url_7 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 8) {
            this.url_8 = '';
            this.url_8 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 9) {
            this.url_9 = '';
            this.url_9 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
        if (count == 10) {
            this.url_10 = '';
            this.url_10 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + this.audioname;
        }
    }
    openingmenu_forward(event) {
        this.openingmenuforward = event.target.value;
    }
    selectedIVR() {
        let array = [];
        // if(!this.selectedIVR_Options){
        //   this.itr = this.selectedIVR_Options;    
        // }else{
        this.itr = this.selecteddefault;
        // }  
        for (let i = 0; i < this.itr; i++) {
            array.push(i);
        }
        // console.log(array);  
        return array;
    }
    // selectedFile(event){
    //   alert(event);
    //   console.log(event);
    // }
    setaudioselected(uuid, count) {
        if (count == 0) {
            this.editIVRMenuForm.patchValue({
                audio_uuid_0: uuid,
            });
        }
        if (count == 1) {
            this.editIVRMenuForm.patchValue({
                audio_uuid_1: uuid,
            });
        }
        if (count == 2) {
            this.editIVRMenuForm.patchValue({
                audio_uuid_2: uuid,
            });
        }
        if (count == 3) {
            this.editIVRMenuForm.patchValue({
                audio_uuid_3: uuid,
            });
        }
        if (count == 4) {
            this.editIVRMenuForm.patchValue({
                audio_uuid_4: uuid,
            });
        }
        if (count == 5) {
            this.editIVRMenuForm.patchValue({
                audio_uuid_5: uuid,
            });
        }
        if (count == 6) {
            this.editIVRMenuForm.patchValue({
                audio_uuid_6: uuid,
            });
        }
        if (count == 7) {
            this.editIVRMenuForm.patchValue({
                audio_uuid_7: uuid,
            });
        }
        if (count == 8) {
            this.editIVRMenuForm.patchValue({
                audio_uuid_8: uuid,
            });
        }
        if (count == 9) {
            this.editIVRMenuForm.patchValue({
                audio_uuid_9: uuid,
            });
        }
        if (count == 10) {
            this.editIVRMenuForm.patchValue({
                audio_uuid_10: uuid,
            });
        }
    }
    selectFile(event, count) {
        // alert(count);return false;
        this.progress.percentage = 0;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.currentFileUpload = event.target.files.item(0);
        // console.log(this.currentFileUpload);return false;
        this.showLoadingIndicator = true;
        this.moduleService.uploadfile(event.target.files.item(0), this.currentCompany.uuid, 0).subscribe(res => {
            // if(res.body){
            //   console.log(res.body.uuid);
            // }
            // console.log(res);
            //  return false;
            if (res.status !== 'error' && event.target.files.item(0).name != '' && res.body) {
                // console.log(count);
                if (res.status === 'progress') {
                    this.showLoadingIndicator = true;
                }
                if (res.status == 200) {
                    this.showLoadingIndicator = false;
                }
                this.toastrService.success('Audio Uploaded Succssfully');
                if (count == 0) {
                    this.url_0 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 1) {
                    this.url_1 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 2) {
                    this.url_2 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 3) {
                    this.url_3 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 4) {
                    this.url_4 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 5) {
                    this.url_5 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 6) {
                    this.url_6 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 7) {
                    this.url_7 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 8) {
                    this.url_8 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 9) {
                    this.url_9 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                if (count == 10) {
                    this.url_10 = 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + event.target.files.item(0).name;
                }
                this.setaudioselected(res.body.uuid, count);
                this.getaudio();
            }
            else {
                if (res.status === 'error') {
                    this.toastrService.error('Failed To Add');
                }
            }
        }, error => this.error = error);
    }
    get f() { return this.editIVRMenuForm.controls; }
    onSubmit() {
        // const formData = new FormData();      
        this.submitted = true;
        if (this.editIVRMenuForm.invalid) {
            return;
        }
        // this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        const uuid = this.route.snapshot.paramMap.get('id');
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.editIVRMenuForm.get("user_uuid").setValue(currentUser.uuid);
        // this.editIVRMenuForm.get("buyer").setValue(this.buyername);
        this.moduleService.updateIVR(this.editIVRMenuForm.value, uuid).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('IVR Menu Updated Successfully');
                this.router.navigate(['/ivr-menu']);
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    _keyPress(event) {
        const isNumericInput = (event) => {
            const key = event.keyCode;
            return ((key >= 48 && key <= 57) || // Allow number line
                (key >= 96 && key <= 105) // Allow number pad
            );
        };
        const isModifierKey = (event) => {
            const key = event.keyCode;
            return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
                (key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
                (key > 36 && key < 41) || // Allow left, up, right, down
                (
                // Allow Ctrl/Command + A,C,V,X,Z
                (event.ctrlKey === true || event.metaKey === true) &&
                    (key === 65 || key === 67 || key === 86 || key === 88 || key === 90));
        };
        const enforceFormat = (event) => {
            // Input must be of a valid number format or a modifier key, and not longer than ten digits
            if (!isNumericInput(event) && !isModifierKey(event)) {
                event.preventDefault();
            }
        };
        const formatToPhone = (event) => {
            if (isModifierKey(event)) {
                return;
            }
            const target = event.target;
            const input = event.target.value.replace(/\D/g, '').substring(0, 10); // First ten digits of input only
            const zip = input.substring(0, 3);
            const middle = input.substring(3, 6);
            const last = input.substring(6, 10);
            if (input.length > 6) {
                target.value = `(${zip}) ${middle}-${last}`;
            }
            else if (input.length > 3) {
                target.value = `(${zip}) ${middle}`;
            }
            else if (input.length > 0) {
                target.value = `(${zip}`;
            }
        };
        const forwardto_phone_0no = document.getElementById('forwardto_phone_0');
        const forwardto_phone_1no = document.getElementById('forwardto_phone_1');
        const forwardto_phone_2no = document.getElementById('forwardto_phone_2');
        const forwardto_phone_3no = document.getElementById('forwardto_phone_3');
        const forwardto_phone_4no = document.getElementById('forwardto_phone_4');
        const forwardto_phone_5no = document.getElementById('forwardto_phone_5');
        const forwardto_phone_6no = document.getElementById('forwardto_phone_6');
        const forwardto_phone_7no = document.getElementById('forwardto_phone_7');
        const forwardto_phone_8no = document.getElementById('forwardto_phone_8');
        const forwardto_phone_9no = document.getElementById('forwardto_phone_9');
        const forwardto_phone_10no = document.getElementById('forwardto_phone_10');
        if (forwardto_phone_0no) {
            forwardto_phone_0no.addEventListener('keydown', enforceFormat);
            forwardto_phone_0no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_1no) {
            forwardto_phone_1no.addEventListener('keydown', enforceFormat);
            forwardto_phone_1no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_2no) {
            forwardto_phone_2no.addEventListener('keydown', enforceFormat);
            forwardto_phone_2no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_3no) {
            forwardto_phone_3no.addEventListener('keydown', enforceFormat);
            forwardto_phone_3no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_4no) {
            forwardto_phone_4no.addEventListener('keydown', enforceFormat);
            forwardto_phone_4no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_5no) {
            forwardto_phone_5no.addEventListener('keydown', enforceFormat);
            forwardto_phone_5no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_6no) {
            forwardto_phone_6no.addEventListener('keydown', enforceFormat);
            forwardto_phone_6no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_7no) {
            forwardto_phone_7no.addEventListener('keydown', enforceFormat);
            forwardto_phone_7no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_8no) {
            forwardto_phone_8no.addEventListener('keydown', enforceFormat);
            forwardto_phone_8no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_9no) {
            forwardto_phone_9no.addEventListener('keydown', enforceFormat);
            forwardto_phone_9no.addEventListener('keyup', formatToPhone);
        }
        if (forwardto_phone_10no) {
            forwardto_phone_10no.addEventListener('keydown', enforceFormat);
            forwardto_phone_10no.addEventListener('keyup', formatToPhone);
        }
    }
};
EditIvrmenuComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["ActivatedRoute"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_8__["HttpBackend"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ChangeDetectorRef"] }
];
EditIvrmenuComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-edit-ivrmenu',
        template: _raw_loader_edit_ivrmenu_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_edit_ivrmenu_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], EditIvrmenuComponent);



/***/ }),

/***/ "oNgd":
/*!********************************************************************************!*\
  !*** ./src/app/modules/numbers/blocked-numbers/blocked-numbers.component.scss ***!
  \********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("fieldset.scheduler-border {\n  border: 1px groove #ddd !important;\n  padding: 0 1.4em 1.4em 1.4em !important;\n  margin: 0 0 1.5em 0 !important;\n  box-shadow: 0px 0px 0px 0px #000;\n}\n\nlegend.scheduler-border {\n  font-size: 1.2em !important;\n  font-weight: bold !important;\n  text-align: left !important;\n  width: auto;\n  padding: 0 10px;\n  border-bottom: none;\n}\n\ninput#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n\n.modal-dialog.model-lg {\n  max-width: 783px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcYmxvY2tlZC1udW1iZXJzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0ksa0NBQUE7RUFDQSx1Q0FBQTtFQUNBLDhCQUFBO0VBRVEsZ0NBQUE7QUFDWjs7QUFFQTtFQUNJLDJCQUFBO0VBQ0EsNEJBQUE7RUFDQSwyQkFBQTtFQUNBLFdBQUE7RUFDQSxlQUFBO0VBQ0EsbUJBQUE7QUFDSjs7QUFFQTtFQUNBLGFBQUE7QUFDQTs7QUFDQTtFQUNJLFlBQUE7QUFFSjs7QUFBQTtFQUNJLGdCQUFBO0FBR0oiLCJmaWxlIjoiYmxvY2tlZC1udW1iZXJzLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiZmllbGRzZXQuc2NoZWR1bGVyLWJvcmRlciB7XHJcbiAgICBib3JkZXI6IDFweCBncm9vdmUgI2RkZCAhaW1wb3J0YW50O1xyXG4gICAgcGFkZGluZzogMCAxLjRlbSAxLjRlbSAxLjRlbSAhaW1wb3J0YW50O1xyXG4gICAgbWFyZ2luOiAwIDAgMS41ZW0gMCAhaW1wb3J0YW50O1xyXG4gICAgLXdlYmtpdC1ib3gtc2hhZG93OiAgMHB4IDBweCAwcHggMHB4ICMwMDA7XHJcbiAgICAgICAgICAgIGJveC1zaGFkb3c6ICAwcHggMHB4IDBweCAwcHggIzAwMDtcclxufVxyXG5cclxubGVnZW5kLnNjaGVkdWxlci1ib3JkZXIge1xyXG4gICAgZm9udC1zaXplOiAxLjJlbSAhaW1wb3J0YW50O1xyXG4gICAgZm9udC13ZWlnaHQ6IGJvbGQgIWltcG9ydGFudDtcclxuICAgIHRleHQtYWxpZ246IGxlZnQgIWltcG9ydGFudDtcclxuICAgIHdpZHRoOmF1dG87XHJcbiAgICBwYWRkaW5nOjAgMTBweDtcclxuICAgIGJvcmRlci1ib3R0b206bm9uZTtcclxufVxyXG5cclxuaW5wdXQjb3B0aW9uMSwgaW5wdXQjb3B0aW9uMiwgaW5wdXQjb3B0aW9uM3tcclxuZGlzcGxheTogbm9uZTtcclxufSAgICBcclxuLmJ0bi1ncm91cC5mb3JtLWNvbnRyb2wge1xyXG4gICAgaGVpZ2h0OiA2MHB4O1xyXG59XHJcbi5tb2RhbC1kaWFsb2cubW9kZWwtbGcge1xyXG4gICAgbWF4LXdpZHRoOiA3ODNweDtcclxufSJdfQ== */");

/***/ }),

/***/ "pAh+":
/*!*************************************************************************!*\
  !*** ./src/app/modules/number/number-upload/number-upload.component.ts ***!
  \*************************************************************************/
/*! exports provided: NumberUploadComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberUploadComponent", function() { return NumberUploadComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_number_upload_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./number-upload.component.html */ "/40X");
/* harmony import */ var _number_upload_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number-upload.component.scss */ "YUv5");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-csv/ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_8__);









let NumberUploadComponent = class NumberUploadComponent {
    constructor(fb, moduleService, router, route, toastrService) {
        this.fb = fb;
        this.moduleService = moduleService;
        this.router = router;
        this.route = route;
        this.toastrService = toastrService;
        this.submitted = false;
        this.dropdownList = [];
        this.selectedItems = [];
        this.dropdownSettings = {};
        this.selectednumber = [];
        this.payout_typevalueedit = 0;
        this.pageTitle = "Import Numbers";
        this.jklrules = 'false';
        this.LabelSubmitted = false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
    }
    getAllRules() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getAllRules(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            this.allRulesData = res;
        }, error => this.error = error);
    }
    getRulesByName(name) {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getRulesByName(name, this.currentCompany.uuid).subscribe(res => {
            this.allRulesbyname = res;
        }, error => this.error = error);
    }
    getAllpublisher() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getAllpublishers(this.currentCompany.uuid).subscribe(res => {
            this.Allpublisher = res;
        }, error => this.error = error);
    }
    getAllcampaign() {
        this.moduleService.getallcampaindata(this.currentCompany.uuid).subscribe(res => {
            this.getallcampain = res;
            // console.log(this.getallcampain);
        });
    }
    payout_typevaledit(val) {
        this.payout_typevalueedit = val;
        this.addForm.get('payout_typeedit').setValue(val);
    }
    getAllLabels() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getAllLabels(this.currentCompany.uuid).subscribe(res => {
            this.dropdownList = res;
        }, error => this.error = error);
    }
    ngOnInit() {
        this.getAllpublisher();
        this.getAllcampaign();
        this.getAllLabels();
        // console.log(this.selectednumber);
        this.dropdownSettings = {
            singleSelection: false,
            text: "Select Associated Labels",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        this.addForm = this.fb.group({
            number: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            campaign: [''],
            assosciated_labels: [''],
            publisher: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            payout_typeedit: [''],
            payout_amount: [''],
            payout_trigger: [''],
            payout_seconds: [''],
        });
        this.addLabelForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            notes: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
        });
        this.id = this.route.snapshot.paramMap.get('id');
        if (this.id == 1) {
            this.moduleService.getnumbersInfo().subscribe(info => {
                this.getselectednumberslist = info.numberslist;
                // console.log(this.getselectednumberslist);
                var numberlist = '';
                if (this.getselectednumberslist) {
                    for (let index = 0; index < this.getselectednumberslist.length; index++) {
                        numberlist += this.getselectednumberslist[index] + "\r\n";
                    }
                    this.pageTitle = "Batch Edit";
                    this.addForm.patchValue({ number: numberlist.toString() });
                }
                // this.addForm.get('number').setValue("hello");
                // this.addForm.patchValue({
                //   number:this.getselectednumberslist,      
                // });
                // console.log(this.getselectednumberslist);
            });
        }
    }
    onFileChange(event) {
        if (event.target.files.length > 0) {
            const file = event.target.files[0];
            const ext = file.name.split('.').pop();
            ;
            if (ext == 'csv') {
                this.uploadfile = file;
                this.filename = file.name;
            }
            else {
                this.addForm.reset({
                    number: ''
                });
                this.toastrService.error('Please Select only .csv file to import numbers');
            }
        }
    }
    get_jklrules(event) {
        this.jklrules = event.target.checked;
    }
    get f() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // formData.append('number', this.uploadfile);    
        formData.append('number', this.addForm.get('number').value);
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('campaign', JSON.stringify(this.addForm.get('campaign').value));
        formData.append('publisher', JSON.stringify(this.addForm.get('publisher').value));
        formData.append('payout_typeedit', this.addForm.get('payout_typeedit').value);
        formData.append('payout_amount', this.addForm.get('payout_amount').value);
        formData.append('payout_trigger', this.addForm.get('payout_trigger').value);
        formData.append('payout_seconds', this.addForm.get('payout_seconds').value);
        // formData.append('ruleset', this.addForm.get('ruleset').value);
        formData.append('assosciated_labels', JSON.stringify(this.addForm.get('assosciated_labels').value));
        // console.log(formData); return false;
        this.showLoadingIndicator = true;
        this.moduleService.importNumber(formData).subscribe(res => {
            this.showLoadingIndicator = false;
            // console.log(res.duplicatenumbers); return false;
            if (res.status == 'success') {
                this.toastrService.success(res.noofrecords + ' Number Imported Successfully');
                // this.router.navigate(['/numbers']);
                if (res.duplicatenumbers != '') {
                    var options = {
                        fieldSeparator: ',',
                        quoteStrings: '"',
                        decimalseparator: '.',
                        showLabels: true,
                        // showTitle: true,
                        // title: 'Your title',
                        useBom: true,
                        // noDownload: true,
                        headers: ["Duplicate Numbers"]
                    };
                    new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_8__["ngxCsv"](res.duplicatenumbers, 'All Duplicate Numbers', options);
                }
                this.router.navigate(['/numbers']);
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    onReset() {
        this.submitted = false;
        this.addForm.reset();
    }
    closeModal() {
        if (this.addLabelForm.get('name').value && this.addLabelForm.get('notes').value) {
            $("#addLabels").modal("hide");
            $(".custom-switch-input").prop('checked', false);
            this.LabelSubmitted = false;
            setTimeout(() => {
                this.addLabelForm.reset();
                this.isName = "";
            }, 2000);
        }
    }
    validatename() {
        if (this.addLabelForm.get('name').value != '') {
            this.moduleService.validateLabelName(this.addLabelForm.get('name').value).subscribe(res => {
                // console.log(res); return false;  
                this.isName = res;
                if (this.isName.status == 'success') {
                    this.isName = "success";
                }
                else {
                    this.isName = "fail";
                }
            });
        }
        else {
            this.isName = "";
        }
    }
    get labelcontrol() { return this.addLabelForm.controls; }
    onLabelSubmit() {
        const formData = new FormData();
        this.LabelSubmitted = true;
        if (this.addLabelForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.currentCompany.uuid);
        formData.append('name', this.addLabelForm.get('name').value);
        formData.append('notes', this.addLabelForm.get('notes').value);
        this.moduleService.addLabel(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Label Added Successfully');
                this.getAllLabels();
                this.LabelSubmitted = false;
                this.isName = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
};
NumberUploadComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["ActivatedRoute"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] }
];
NumberUploadComponent.propDecorators = {
    selectednumber: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] }]
};
NumberUploadComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-number-upload',
        template: _raw_loader_number_upload_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ChangeDetectionStrategy"].OnPush,
        styles: [_number_upload_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], NumberUploadComponent);



/***/ }),

/***/ "pPcP":
/*!***************************************************!*\
  !*** ./src/app/modules/modules-routing.module.ts ***!
  \***************************************************/
/*! exports provided: ModulesRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModulesRoutingModule", function() { return ModulesRoutingModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _campaigns_campaign_view_campaign_view_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./campaigns/campaign-view/campaign-view.component */ "zd4u");
/* harmony import */ var _publishers_thankyou_thankyou_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./publishers/thankyou/thankyou.component */ "djt6");
/* harmony import */ var _voicemail_voicemail_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./voicemail/voicemail.component */ "n6rN");
/* harmony import */ var _auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../auth/auth.guard */ "P+IX");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _auth_profile_profile_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../auth/profile/profile.component */ "dGq7");
/* harmony import */ var _number_number_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./number/number.component */ "1tHk");
/* harmony import */ var _number_numberadd_numberadd_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./number/numberadd/numberadd.component */ "9xfD");
/* harmony import */ var _number_numberedit_numberedit_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./number/numberedit/numberedit.component */ "Oj11");
/* harmony import */ var _number_number_upload_number_upload_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./number/number-upload/number-upload.component */ "pAh+");
/* harmony import */ var _number_number_batchedit_number_batchedit_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./number/number-batchedit/number-batchedit.component */ "dwv9");
/* harmony import */ var _number_number_addfslrules_number_addfslrules_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./number/number-addfslrules/number-addfslrules.component */ "uUag");
/* harmony import */ var _label_label_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./label/label.component */ "OGpY");
/* harmony import */ var _label_label_view_label_view_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./label/label-view/label-view.component */ "wlcQ");
/* harmony import */ var _dashboard_dashboard_component__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./dashboard/dashboard.component */ "M95H");
/* harmony import */ var _notes_notes_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./notes/notes.component */ "aopE");
/* harmony import */ var _ivr_menus_ivr_menus_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./ivr-menus/ivr-menus.component */ "uIGq");
/* harmony import */ var _ivr_menus_add_ivrmenu_add_ivrmenu_component__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ivr-menus/add-ivrmenu/add-ivrmenu.component */ "Kcc5");
/* harmony import */ var _ivr_menus_edit_ivrmenu_edit_ivrmenu_component__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ivr-menus/edit-ivrmenu/edit-ivrmenu.component */ "nhKR");
/* harmony import */ var _rules_rules_component__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./rules/rules.component */ "XiNR");
/* harmony import */ var _rules_rulesadd_rulesadd_component__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./rules/rulesadd/rulesadd.component */ "GGN3");
/* harmony import */ var _rules_rulesedit_rulesedit_component__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./rules/rulesedit/rulesedit.component */ "No3H");
/* harmony import */ var _modules_dynamic_parameter_dynamic_parameter_component__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../modules/dynamic-parameter/dynamic-parameter.component */ "1Igz");
/* harmony import */ var _blacklist_blacklist_component__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./blacklist/blacklist.component */ "gP4o");
/* harmony import */ var _whitelist_whitelist_component__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./whitelist/whitelist.component */ "aDqy");
/* harmony import */ var _reports_reports_component__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./reports/reports.component */ "AzsU");
/* harmony import */ var _reports_report_calls_report_calls_component__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./reports/report-calls/report-calls.component */ "ppwt");
/* harmony import */ var _reports_report_labelsummary_report_labelsummary_component__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./reports/report-labelsummary/report-labelsummary.component */ "lby/");
/* harmony import */ var _verification_management_verification_management_component__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./verification-management/verification-management.component */ "BrIt");
/* harmony import */ var _audible_ring_audible_ring_component__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./audible-ring/audible-ring.component */ "aoLm");
/* harmony import */ var _shortlist_shortlist_component__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./shortlist/shortlist.component */ "ALpe");
/* harmony import */ var _longlist_longlist_component__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./longlist/longlist.component */ "0NxV");
/* harmony import */ var _sms_sms_component__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./sms/sms.component */ "b9xQ");
/* harmony import */ var _recordings_recordings_component__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./recordings/recordings.component */ "YEf4");
/* harmony import */ var _number_number_buyer_number_buyer_component__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./number/number-buyer/number-buyer.component */ "O/SN");
/* harmony import */ var _publishers_publishers_component__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./publishers/publishers.component */ "k/nl");
/* harmony import */ var _campaigns_campaigns_component__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./campaigns/campaigns.component */ "27PW");
/* harmony import */ var _campaigns_campaign_create_campaign_create_component__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./campaigns/campaign-create/campaign-create.component */ "hVN+");
/* harmony import */ var _numbers_numbers_component__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./numbers/numbers.component */ "jUJr");
/* harmony import */ var _numbers_number_pool_number_pool_component__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./numbers/number-pool/number-pool.component */ "HVG7");
/* harmony import */ var _numbers_blocked_numbers_blocked_numbers_component__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./numbers/blocked-numbers/blocked-numbers.component */ "/LYL");
/* harmony import */ var _campaigns_campaign_edit_campaign_edit_component__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./campaigns/campaign-edit/campaign-edit.component */ "n9+t");
/* harmony import */ var _settings_manage_users_manage_users_component__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./settings/manage-users/manage-users.component */ "ZxR3");
/* harmony import */ var _settings_basic_setting_basic_setting_component__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./settings/basic-setting/basic-setting.component */ "IUaP");
/* harmony import */ var _publishers_publisher_settings_publisher_settings_component__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./publishers/publisher-settings/publisher-settings.component */ "1lbj");
/* harmony import */ var _publishers_publisher_terms_publisher_terms_component__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./publishers/publisher-terms/publisher-terms.component */ "trv3");
/* harmony import */ var _publishers_advertiser_terms_advertiser_terms_component__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./publishers/advertiser-terms/advertiser-terms.component */ "gc2d");
/* harmony import */ var _settings_alert_configuration_alert_configuration_component__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./settings/alert-configuration/alert-configuration.component */ "uN0H");
/* harmony import */ var _settings_manage_company_manage_company_component__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./settings/manage-company/manage-company.component */ "YLqG");
/* harmony import */ var _changelog_changelog_component__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./changelog/changelog.component */ "qT+o");
/* harmony import */ var _ivr_menus_ivr_routing_plans_ivr_routing_plans_component__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./ivr-menus/ivr-routing-plans/ivr-routing-plans.component */ "R3RD");
/* harmony import */ var _ivr_menus_ivr_routing_plans_add_plan_add_plan_component__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./ivr-menus/ivr-routing-plans/add-plan/add-plan.component */ "hVKj");
/* harmony import */ var _ivr_menus_ivr_routing_plans_edit_plan_edit_plan_component__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./ivr-menus/ivr-routing-plans/edit-plan/edit-plan.component */ "qNU9");
/* harmony import */ var _mail_verification_mail_verification_component__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./mail-verification/mail-verification.component */ "Ng4N");
/* harmony import */ var _label_ngxdemo_ngxdemo_component__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./label/ngxdemo/ngxdemo.component */ "I7EK");
/* harmony import */ var _reports_comparison_reports_comparison_component__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./reports-comparison/reports-comparison.component */ "T5Kb");



























































const routes = [
    { path: '', component: _dashboard_dashboard_component__WEBPACK_IMPORTED_MODULE_17__["DashboardComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    // Profile
    { path: 'profile', component: _auth_profile_profile_component__WEBPACK_IMPORTED_MODULE_8__["ProfileComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    // Target Module  
    { path: 'target', component: _number_number_component__WEBPACK_IMPORTED_MODULE_9__["NumberComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'numbers-import/:id', component: _number_number_upload_number_upload_component__WEBPACK_IMPORTED_MODULE_12__["NumberUploadComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'add-target', component: _number_numberadd_numberadd_component__WEBPACK_IMPORTED_MODULE_10__["NumberaddComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'edit-numbers/:id', component: _number_numberedit_numberedit_component__WEBPACK_IMPORTED_MODULE_11__["NumbereditComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'batch-edit', component: _number_number_batchedit_number_batchedit_component__WEBPACK_IMPORTED_MODULE_13__["NumberBatcheditComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'buyer', component: _number_number_buyer_number_buyer_component__WEBPACK_IMPORTED_MODULE_37__["NumberBuyerComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'add-weekdays', component: _number_number_addfslrules_number_addfslrules_component__WEBPACK_IMPORTED_MODULE_14__["NumberAddfslrulesComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'labels', component: _label_label_component__WEBPACK_IMPORTED_MODULE_15__["LabelComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'labels/view/:labelname', component: _label_label_view_label_view_component__WEBPACK_IMPORTED_MODULE_16__["LabelViewComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'notes', component: _notes_notes_component__WEBPACK_IMPORTED_MODULE_18__["NotesComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'ivr-menu', component: _ivr_menus_ivr_menus_component__WEBPACK_IMPORTED_MODULE_19__["IvrMenusComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'new-ivr-menu', component: _ivr_menus_add_ivrmenu_add_ivrmenu_component__WEBPACK_IMPORTED_MODULE_20__["AddIVRMenuComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'edit-ivr/:id', component: _ivr_menus_edit_ivrmenu_edit_ivrmenu_component__WEBPACK_IMPORTED_MODULE_21__["EditIvrmenuComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'ivr-routing-plans', component: _ivr_menus_ivr_routing_plans_ivr_routing_plans_component__WEBPACK_IMPORTED_MODULE_53__["IVRRoutingPlansComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'ivrplan-add', component: _ivr_menus_ivr_routing_plans_add_plan_add_plan_component__WEBPACK_IMPORTED_MODULE_54__["AddPlanComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'ivrplan-edit/:id', component: _ivr_menus_ivr_routing_plans_edit_plan_edit_plan_component__WEBPACK_IMPORTED_MODULE_55__["EditPlanComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'rules', component: _rules_rules_component__WEBPACK_IMPORTED_MODULE_22__["RulesComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'add-rule', component: _rules_rulesadd_rulesadd_component__WEBPACK_IMPORTED_MODULE_23__["RulesaddComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'edit-rule/:id', component: _rules_rulesedit_rulesedit_component__WEBPACK_IMPORTED_MODULE_24__["RuleseditComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'dynamic-forwarding-parameters', component: _modules_dynamic_parameter_dynamic_parameter_component__WEBPACK_IMPORTED_MODULE_25__["DynamicParameterComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'blacklist', component: _blacklist_blacklist_component__WEBPACK_IMPORTED_MODULE_26__["BlacklistComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'whitelist', component: _whitelist_whitelist_component__WEBPACK_IMPORTED_MODULE_27__["WhitelistComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'reports', component: _reports_reports_component__WEBPACK_IMPORTED_MODULE_28__["ReportsComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'reports/:id', component: _reports_reports_component__WEBPACK_IMPORTED_MODULE_28__["ReportsComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'call-reports', component: _reports_report_calls_report_calls_component__WEBPACK_IMPORTED_MODULE_29__["ReportCallsComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'call-reports-labelsummary', component: _reports_report_labelsummary_report_labelsummary_component__WEBPACK_IMPORTED_MODULE_30__["ReportLabelsummaryComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'comparison-reports', component: _reports_comparison_reports_comparison_component__WEBPACK_IMPORTED_MODULE_58__["ReportsComparisonComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'shortlist', component: _shortlist_shortlist_component__WEBPACK_IMPORTED_MODULE_33__["ShortlistComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'longlist', component: _longlist_longlist_component__WEBPACK_IMPORTED_MODULE_34__["LonglistComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'verification-management', component: _verification_management_verification_management_component__WEBPACK_IMPORTED_MODULE_31__["VerificationManagementComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'audible-ring', component: _audible_ring_audible_ring_component__WEBPACK_IMPORTED_MODULE_32__["AudibleRingComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'sms', component: _sms_sms_component__WEBPACK_IMPORTED_MODULE_35__["SmsComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'recordings', component: _recordings_recordings_component__WEBPACK_IMPORTED_MODULE_36__["RecordingsComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'publishers', component: _publishers_publishers_component__WEBPACK_IMPORTED_MODULE_38__["PublishersComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'publishers-registration-settings', component: _publishers_publisher_settings_publisher_settings_component__WEBPACK_IMPORTED_MODULE_47__["PublisherSettingsComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'publisher-registration/:id', component: _publishers_publisher_terms_publisher_terms_component__WEBPACK_IMPORTED_MODULE_48__["PublisherTermsComponent"] },
    { path: 'advertiser-terms', component: _publishers_advertiser_terms_advertiser_terms_component__WEBPACK_IMPORTED_MODULE_49__["AdvertiserTermsComponent"] },
    { path: 'thank-you', component: _publishers_thankyou_thankyou_component__WEBPACK_IMPORTED_MODULE_2__["ThankyouComponent"] },
    { path: 'campaigns', component: _campaigns_campaigns_component__WEBPACK_IMPORTED_MODULE_39__["CampaignsComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'campaign-wizard', component: _campaigns_campaign_create_campaign_create_component__WEBPACK_IMPORTED_MODULE_40__["CampaignCreateComponent"] },
    { path: 'numbers', component: _numbers_numbers_component__WEBPACK_IMPORTED_MODULE_41__["NumbersComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'number-pools', component: _numbers_number_pool_number_pool_component__WEBPACK_IMPORTED_MODULE_42__["NumberPoolComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'blocked-numbers', component: _numbers_blocked_numbers_blocked_numbers_component__WEBPACK_IMPORTED_MODULE_43__["BlockedNumbersComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    // {path:'create-number',component:NumberCreateComponent, canActivate: [AuthGuard]},  
    { path: 'edit-campaign/:id', component: _campaigns_campaign_edit_campaign_edit_component__WEBPACK_IMPORTED_MODULE_44__["CampaignEditComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'view-campaign/:id', component: _campaigns_campaign_view_campaign_view_component__WEBPACK_IMPORTED_MODULE_1__["CampaignViewComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'manage-users', component: _settings_manage_users_manage_users_component__WEBPACK_IMPORTED_MODULE_45__["ManageUsersComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'basic-setting', component: _settings_basic_setting_basic_setting_component__WEBPACK_IMPORTED_MODULE_46__["BasicSettingComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'alert-configuration', component: _settings_alert_configuration_alert_configuration_component__WEBPACK_IMPORTED_MODULE_50__["AlertConfigurationComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'manage-company', component: _settings_manage_company_manage_company_component__WEBPACK_IMPORTED_MODULE_51__["ManageCompanyComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'change-log', component: _changelog_changelog_component__WEBPACK_IMPORTED_MODULE_52__["ChangelogComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
    { path: 'verify-email/:uuid', component: _mail_verification_mail_verification_component__WEBPACK_IMPORTED_MODULE_56__["MailVerificationComponent"] },
    { path: 'NgxdemoComponent', component: _label_ngxdemo_ngxdemo_component__WEBPACK_IMPORTED_MODULE_57__["NgxdemoComponent"] },
    { path: 'voicemail', component: _voicemail_voicemail_component__WEBPACK_IMPORTED_MODULE_3__["VoicemailComponent"], canActivate: [_auth_auth_guard__WEBPACK_IMPORTED_MODULE_4__["AuthGuard"]] },
];
let ModulesRoutingModule = class ModulesRoutingModule {
};
ModulesRoutingModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["NgModule"])({
        imports: [_angular_router__WEBPACK_IMPORTED_MODULE_6__["RouterModule"].forChild(routes), _angular_forms__WEBPACK_IMPORTED_MODULE_7__["FormsModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["ReactiveFormsModule"]],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_6__["RouterModule"]]
    })
], ModulesRoutingModule);



/***/ }),

/***/ "pUeC":
/*!**********************************************!*\
  !*** ./src/app/footer/footer.component.scss ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJmb290ZXIuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "pYM1":
/*!**********************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/numbers/blocked-numbers/blocked-numbers.component.html ***!
  \**********************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n<!-- Add Label Modal -->\r\n<div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\">\r\n   <div class=\"modal-content\">\r\n     <div class=\"modal-header\">\r\n       <h5 class=\"modal-title\" id=\"formModal\">Block a Number</h5>\r\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n         <span aria-hidden=\"true\">&times;</span>\r\n       </button>\r\n     </div>\r\n     <div class=\"modal-body\">\r\n       <form id=\"addLabel\" [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">         \r\n      <div class=\"row\">\r\n        <div class=\"col-md-12\">\r\n          <fieldset class=\"scheduler-border\">\r\n            <legend class=\"scheduler-border\">Block Number</legend>\r\n            <div class=\"control-group\">\r\n                      <label class=\"control-label input-label\" for=\"startTime\">Block :</label>\r\n                      <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                          <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': block==0}\" (click)=\"block_numbertype(0)\"> \r\n                            <input class=\"form-check-input\" name=\"block_type\" formControlName=\"block_type\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                            Number\r\n                          </label>\r\n                          <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': block==1}\" (click)=\"block_numbertype(1)\">\r\n                            <input class=\"form-check-input\" name=\"block_type\" formControlName=\"block_type\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                             Anonymous\r\n                          </label>\r\n                          <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': block==2}\" (click)=\"block_numbertype(2)\">\r\n                            <input class=\"form-check-input\" name=\"block_type\" formControlName=\"block_type\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                             Prefix\r\n                          </label>\r\n                        </div>\r\n                        <div *ngIf=\"Submitted && labelcontrol.block_type.errors\" class=\"invalid-feedback\">\r\n                          <div *ngIf=\"labelcontrol.block_type.errors.required\">Block is required</div>\r\n                      </div>   \r\n          </div>\r\n       \r\n            <div *ngIf=\"block == 0\">\r\n                <div class=\"control-group mt-2\">\r\n                <label class=\"control-label input-label\">Enter Number  :</label>\r\n                <input type=\"text\" formControlName=\"blocked_number\" class=\"form-control\" placeholder=\"Enter Number\" aria-label=\"Enter Number\">   \r\n                </div>           \r\n           </div>\r\n            <div *ngIf=\"block == 2\">\r\n                <div class=\"control-group mt-2\">\r\n                <label class=\"control-label input-label numeric\">Enter Prefix  :</label>\r\n                <input type=\"text\" formControlName=\"blocked_prefix\" class=\"form-control\" placeholder=\"Enter Prefix\" aria-label=\"Enter Prefix\">   \r\n                </div>           \r\n           </div>\r\n\r\n           <div class=\"control-group mt-2\">\r\n            <label class=\"control-label input-label\" for=\"startTime\">Scope:</label>\r\n            <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': iscampaign==0}\" (click)=\"scopetype(0)\"> \r\n                  <input class=\"form-check-input\" name=\"scope\" formControlName=\"scope\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                  All Campaign\r\n                </label>\r\n                <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': iscampaign==1}\" (click)=\"scopetype(1)\">\r\n                  <input class=\"form-check-input\" name=\"scope\" formControlName=\"scope\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                   Select Campaign\r\n                </label>               \r\n              </div>\r\n              <div *ngIf=\"Submitted && labelcontrol.scope.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"labelcontrol.scope.errors.required\">Scope is required</div>\r\n              </div>   \r\n            </div>\r\n\r\n           <div class=\"control-group mt-2\" *ngIf=\"iscampaign == 1\">\r\n            <label class=\"control-label input-label\">Campaign</label>\r\n               <select class=\"form-control\" formControlName=\"campaign_uuid\" [value]=\"''\">\r\n                 <option value=\"\">Select Campaign</option>                 \r\n                 <option [value]=\"item.id\" *ngFor=\"let item of allcampaign\">{{item.text}}</option>                 \r\n               </select>              \r\n          </div>\r\n\r\n          <div class=\"form-group mt-2\">\r\n            <label  class=\"d-block\">Specify Duration :</label>\r\n            <label class=\"custom-switch mt-2 pl-0\">\r\n              <input type=\"checkbox\" (change)=\"isduration($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n              <span class=\"custom-switch-indicator\"></span>                     \r\n            </label>           \r\n          </div>\r\n\r\n          <div *ngIf=\"isspecifyduration == 1\">\r\n            <div class=\"control-group mt-2\">\r\n            <label class=\"control-label input-label\">Enter Hours To block Number  :</label>\r\n            <input type=\"text\" formControlName=\"duration\" class=\"form-control\" placeholder=\"Enter Hours To block Number\" aria-label=\"Enter Hours To block Number\">   \r\n            </div>           \r\n           </div>\r\n         \r\n          </fieldset>\r\n        </div>\r\n        </div>\r\n         <div class=\"modal-footer\" style=\"padding: 0;\">\r\n            <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Block Number</button>\r\n            <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n           </div>\r\n       </form>\r\n     </div>\r\n   </div>\r\n </div>\r\n </div>   \r\n\r\n<!-- Edit Label Modal -->\r\n<div class=\"modal  fade\" id=\"editLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\">\r\n   <div class=\"modal-content\">\r\n     <div class=\"modal-header\">\r\n       <h5 class=\"modal-title\" id=\"formModal\">Update Blocked Numbers</h5>\r\n       <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n         <span aria-hidden=\"true\">&times;</span>\r\n       </button>\r\n     </div>\r\n     <div class=\"modal-body\">\r\n       <form [formGroup]=\"editForm\" (ngSubmit)=\"onEditSubmit()\">\r\n        <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n              <fieldset class=\"scheduler-border\">\r\n                <legend class=\"scheduler-border\">Block Number</legend>\r\n                <div class=\"control-group\">\r\n                          <input type=\"hidden\" formControlName=\"uuid\">\r\n                          <label class=\"control-label input-label\" for=\"startTime\">Block:</label>\r\n                          <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                              <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editblock==0}\" (click)=\"editblock_numbertype(0)\"> \r\n                                <input class=\"form-check-input\" name=\"editblock_type\" formControlName=\"editblock_type\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                                Number\r\n                              </label>\r\n                              <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editblock==1}\" (click)=\"editblock_numbertype(1)\">\r\n                                <input class=\"form-check-input\" name=\"editblock_type\" formControlName=\"editblock_type\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                                 Anonymous\r\n                              </label>\r\n                              <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editblock==2}\" (click)=\"editblock_numbertype(2)\">\r\n                                <input class=\"form-check-input\" name=\"editblock_type\" formControlName=\"editblock_type\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                                 Prefix\r\n                              </label>\r\n                            </div>\r\n                            <div *ngIf=\"Submitted && labelcontrol.block_type.errors\" class=\"invalid-feedback\">\r\n                              <div *ngIf=\"labelcontrol.block_type.errors.required\">Block is required</div>\r\n                          </div>   \r\n              </div>\r\n                <div *ngIf=\"editblock == 0\">\r\n                    <div class=\"control-group mt-2\">\r\n                    <label class=\"control-label input-label\">Enter Number  :</label>\r\n                    <input type=\"text\" formControlName=\"blocked_number\" class=\"form-control\" placeholder=\"Enter Number\" aria-label=\"Enter Number\">   \r\n                    </div>           \r\n               </div>\r\n                <div *ngIf=\"editblock == 2\">\r\n                    <div class=\"control-group mt-2\">\r\n                    <label class=\"control-label input-label numeric\">Enter Prefix  :</label>\r\n                    <input type=\"text\" formControlName=\"blocked_prefix\" class=\"form-control\" placeholder=\"Enter Prefix\" aria-label=\"Enter Prefix\">   \r\n                    </div>           \r\n               </div>\r\n    \r\n               <div class=\"control-group mt-2\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Scope:</label>\r\n                <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editiscampaign==0}\" (click)=\"editscopetype(0)\"> \r\n                      <input class=\"form-check-input\" name=\"scope\" formControlName=\"scope\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                      All Campaign\r\n                    </label>\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editiscampaign==1}\" (click)=\"editscopetype(1)\">\r\n                      <input class=\"form-check-input\" name=\"scope\" formControlName=\"scope\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                       Select Campaign\r\n                    </label>               \r\n                  </div>\r\n                  <div *ngIf=\"Submitted && labelcontrol.scope.errors\" class=\"invalid-feedback\">\r\n                    <div *ngIf=\"labelcontrol.scope.errors.required\">Scope is required</div>\r\n                  </div>   \r\n                </div>\r\n    \r\n               <div class=\"control-group mt-2\" *ngIf=\"editiscampaign == 1\">\r\n                <label class=\"control-label input-label\">Campaign</label>\r\n                   <select class=\"form-control\" formControlName=\"campaign_uuid\" [value]=\"''\">\r\n                     <option value=\"\">Select Campaign</option>                 \r\n                     <option [value]=\"item.id\" *ngFor=\"let item of allcampaign\">{{item.text}}</option>                 \r\n                   </select>              \r\n              </div>\r\n    \r\n              <div class=\"form-group mt-2\">\r\n                <label  class=\"d-block\">Specify Duration :</label>\r\n                <label class=\"custom-switch mt-2 pl-0\">\r\n                  <input [checked]=\"editisspecifyduration==1\" type=\"checkbox\" (change)=\"isduration($event)\" name=\"custom-switch-checkbox\" class=\"custom-switch-input\">\r\n                  <span class=\"custom-switch-indicator\"></span>                     \r\n                </label>           \r\n              </div>\r\n    \r\n              <div *ngIf=\"editisspecifyduration == 1\">\r\n                <div class=\"control-group mt-2\">\r\n                <label class=\"control-label input-label\">Enter Hours To block Number  :</label>\r\n                <input type=\"text\" formControlName=\"duration\" class=\"form-control\" placeholder=\"Enter Hours To block Number\" aria-label=\"Enter Hours To block Number\">   \r\n                </div>           \r\n               </div>\r\n             \r\n              </fieldset>\r\n            </div>\r\n            </div>\r\n         <div class=\"modal-footer\" style=\"padding: 0;\">\r\n            <button (click)=\"editcloseModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Update</button>\r\n            <button type=\"button\" class=\"btn btn-secondary m-t-15 waves-effect\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n              Close\r\n            </button>\r\n           </div>\r\n       </form>\r\n     </div>\r\n   </div>\r\n </div>\r\n </div>    \r\n\r\n  <div class=\"main-content\">\r\n  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-4\">\r\n                        <div class=\"card-header\">\r\n                        <h4>Block a Number</h4></div>\r\n                    </div>\r\n                    <div class=\"col-8 text-right mt-2\">\r\n                        <div class=\"form-group\" style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                           <button type=\"button\" data-toggle=\"modal\" data-target=\"#addLabels\" class=\"btn btn-primary daterange-btn icon-left btn-sm btn-icon mr-2 p-2\"><i class=\"fa fa-plus\"></i> Block Number\r\n                            </button>\r\n                            <!-- <button type=\"button\" (click)=\"exportdata()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Export\r\n                            </button>\r\n                            <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Delete Selected\r\n                            </button> -->\r\n                          </div>                       \r\n                    </div>              \r\n                </div>            \r\n                \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                    <thead>\r\n                      <tr>\r\n                        <!-- <th style=\"padding: 10px;\">\r\n                            <div class=\"custom-control custom-checkbox\" *ngIf=\"blocknumbers?.length != 0\">\r\n                            <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                            <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                            </div>\r\n                        </th> -->\r\n                        <th>Blocked Number</th>\r\n                        <th>Campaign</th>\r\n                        <th>Blocked Until(Hrs)</th>\r\n                        <th>Created Date</th>\r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"blocknumbers?.length != 0\" >\r\n                        <tr *ngFor=\"let data of blocknumbers;let i=index\">\r\n                            <!-- <td>\r\n                                <div class=\"custom-control custom-checkbox\">\r\n                                <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{data.uuid}}\"  [checked]=\"data.selected\" [value]=\"data.id\" >\r\n                                <label class=\"custom-control-label\" for=\"customCheck_{{data.uuid}}\"></label>\r\n                                </div>                                \r\n                            </td> -->\r\n                            <td><a (click)=\"editdata(data.uuid,data.block_type,data.blocked_number,data.blocked_prefix,data.scope,data.campaign_uuid,data.is_duration,data.blocked_until)\" data-toggle=\"modal\" data-target=\"#editLabels\" class=\"text-white actionedit\">{{ data.blocked_number }}</a></td>\r\n                            <td>{{ data.campaign }}</td>\r\n                            <td>{{ data.blocked_until }}</td>\r\n                            <td>{{ data.created_at }}</td>                            \r\n                            <td><button type=\"button\" (click)=\"editdata(data.uuid,data.block_type,data.blocked_number,data.blocked_prefix,data.scope,data.campaign_uuid,data.is_duration,data.blocked_until)\" data-toggle=\"modal\" data-target=\"#editLabels\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></button>&nbsp;<button type=\"button\" (click)=\"Delete((data.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"blocknumbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>  ");

/***/ }),

/***/ "ppwt":
/*!************************************************************************!*\
  !*** ./src/app/modules/reports/report-calls/report-calls.component.ts ***!
  \************************************************************************/
/*! exports provided: ReportCallsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReportCallsComponent", function() { return ReportCallsComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_report_calls_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./report-calls.component.html */ "tmu1");
/* harmony import */ var _report_calls_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./report-calls.component.scss */ "gDz/");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var angular_highcharts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! angular-highcharts */ "a0Xn");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! highcharts/modules/exporting */ "AxlJ");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! highcharts */ "6n/F");
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(highcharts__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! moment */ "wd/R");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! datatables.net */ "FlOX");
/* harmony import */ var datatables_net__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(datatables_net__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../global */ "XrUY");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ngx-toastr */ "5eHb");








highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_6___default()(highcharts__WEBPACK_IMPORTED_MODULE_7__);






class DataTablesResponse {
}
let ReportCallsComponent = class ReportCallsComponent {
    constructor(moduleservice, fb, toastrService, handler) {
        this.moduleservice = moduleservice;
        this.fb = fb;
        this.toastrService = toastrService;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.event = "";
        this.numbers = '';
        this.dtOptions = {};
        this.submitted = false;
        this.ranges = {
            Today: [moment__WEBPACK_IMPORTED_MODULE_9__(), moment__WEBPACK_IMPORTED_MODULE_9__()],
            Yesterday: [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(1, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__().subtract(1, 'days')],
            'Last 7 Days': [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(6, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__()],
            'Last 30 Days': [moment__WEBPACK_IMPORTED_MODULE_9__().subtract(29, 'days'), moment__WEBPACK_IMPORTED_MODULE_9__()],
            'This Month': [moment__WEBPACK_IMPORTED_MODULE_9__().startOf('month'), moment__WEBPACK_IMPORTED_MODULE_9__().endOf('month')],
            'Last Month': [
                moment__WEBPACK_IMPORTED_MODULE_9__()
                    .subtract(1, 'month')
                    .startOf('month'),
                moment__WEBPACK_IMPORTED_MODULE_9__()
                    .subtract(1, 'month')
                    .endOf('month')
            ],
        };
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_12__["HttpClient"](handler);
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.keepCalendarOpeningWithRange = true;
        this.showRangeLabelOnInput = true;
        this.selected = { startDate: moment__WEBPACK_IMPORTED_MODULE_9__().startOf('day'), endDate: moment__WEBPACK_IMPORTED_MODULE_9__().endOf('day') };
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.CallReportForm = this.fb.group({
            date: ['', ''],
            label: ['', ''],
            duration_type: ['', ''],
            duration: ['', ''],
        });
        // this.getChartNumberOfCalls(this.event);
        this.getAllLabels(this.currentUser.uuid);
    }
    get f() { return this.searchcallsform.controls; }
    getAllLabels(company_uuid) {
        this.moduleservice.getAllLabels(this.currentUser.uuid).subscribe(res => {
            this.alllabel = res;
            console.log(res);
        }, error => this.error = error);
    }
    onCallReportSubmit() {
        // console.log(this.CallReportForm.value); return false;
        this.moduleservice.getCallReports(this.CallReportForm.value, this.currentUser.uuid).subscribe(res => {
            // console.log(res.date); return false;
            this.chart = new angular_highcharts__WEBPACK_IMPORTED_MODULE_5__["Chart"]({
                chart: {
                    type: 'column'
                },
                colors: [
                    '#4572A7',
                    '#AA4643',
                    '#89A54E',
                    '#80699B',
                    '#3D96AE',
                    '#DB843D',
                    '#92A8CD',
                    '#A47D7C',
                    '#B5CA92'
                ],
                title: {
                    text: 'Calls By Date'
                },
                subtitle: {
                    text: document.ontouchstart === undefined ?
                        'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'
                },
                accessibility: {
                    announceNewData: {
                        enabled: true
                    }
                },
                xAxis: {
                    title: {
                        text: 'Date'
                    },
                    categories: res.date
                },
                yAxis: {
                    title: {
                        text: 'Number Of Calls'
                    }
                },
                legend: {
                    enabled: false
                },
                plotOptions: {
                    series: {
                        borderWidth: 0,
                        dataLabels: {
                            enabled: true,
                            format: '{point.y} Call'
                        }
                    },
                    column: {
                        colorByPoint: true
                    }
                },
                tooltip: {
                    headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
                    pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}%</b> of total<br/>'
                },
                series: [{
                        data: res.count,
                        type: 'column',
                        name: "Call Count"
                    }],
            });
        }, error => this.error = error);
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
        var that = this;
        this.dtOptions = {
            "paging": false,
            "processing": true,
            "searching": false,
            "info": false,
            "serverSide": true,
            "order": [[2, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + 'getdaywiseLabelSummaryReport/' + this.currentUser.uuid, { 'dataTablesParameters': dataTablesParameters, 'formvalue': this.CallReportForm.value }, {}).subscribe(resp => {
                    // console.log(resp); return false;
                    that.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "label" }, { data: "noofcalls" }, { data: "call_duration" }, { data: "id" }, { data: "ivr_inputs" }, { data: "revenue" }, { data: "created_at" },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
};
ReportCallsComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_8__["FormBuilder"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_13__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_12__["HttpBackend"] }
];
ReportCallsComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewChild"], args: ['dataTable', { static: true },] }]
};
ReportCallsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-report-calls',
        template: _raw_loader_report_calls_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_report_calls_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], ReportCallsComponent);



/***/ }),

/***/ "qNU9":
/*!**************************************************************************************!*\
  !*** ./src/app/modules/ivr-menus/ivr-routing-plans/edit-plan/edit-plan.component.ts ***!
  \**************************************************************************************/
/*! exports provided: EditPlanComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditPlanComponent", function() { return EditPlanComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_edit_plan_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./edit-plan.component.html */ "GN3X");
/* harmony import */ var _edit_plan_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit-plan.component.scss */ "dKHL");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../../../global */ "XrUY");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);











class DataTablesResponse {
}
let EditPlanComponent = class EditPlanComponent {
    constructor(renderer, moduleservice, toastrService, handler, fb, router, route, cdRef) {
        this.renderer = renderer;
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.router = router;
        this.route = route;
        this.cdRef = cdRef;
        this.locations = [];
        this.dropdownList = [];
        this.selectedItems = [];
        this.dropdownSettings = {};
        this.pubdropdownSettings = {};
        this.labeldropdownSettings = {};
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_3__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.dtOptionsTarget = {};
        this.dtOptionsRouting = {};
        this.Submitted = false;
        this.nameadded = 0;
        this.getsettingToggleDurationval = 0;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HttpClient"](handler);
        this.uuid = this.route.snapshot.paramMap.get('id');
    }
    ngAfterViewChecked() {
        this.cdRef.detectChanges();
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.uuid = this.route.snapshot.paramMap.get('id');
        this.moduleservice.getplanbyuuid(this.uuid).subscribe(res => {
            this.editForm.patchValue({
                name: res.plan_name
            });
            this.addedname = res.plan_name;
        });
        //  this.getAlltarget();
        this.loadalltarget();
        this.loadallRoutingplan(this.uuid);
        this.editRoutingForm = this.fb.group({
            user_uuid: [''],
            uuid: [''],
            priority: [''],
            weight: [''],
            conversation_revenue: [''],
            conversation_event: [''],
            conversation_seconds: [''],
            restrictdup: [''],
            restrictafter: [''],
            days: [''],
            settingToggleDurationval: [''],
            settingToggleDuration: [''],
        });
        this.editForm = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required],
            user_uuid: [''],
        });
    }
    loadalltarget() {
        let type = 1;
        if ($.fn.DataTable.isDataTable(this.tabletarget.nativeElement)) {
            $(this.tabletarget.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptionsTarget = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[10, 20, 50, 100, "All"], [10, 20, 50, 100, "All"]],
            "order": [[0, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'gettargets/' + this.currentCompany.uuid + '/' + this.uuid + '/' + type, dataTablesParameters, {}).subscribe(resp => {
                    this.allTargets = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "name" }, { data: "typeval" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTableTarget = $(this.tabletarget.nativeElement);
        this.dataTableTarget.dataTable(this.dtOptionsTarget);
    }
    loadallRoutingplan(uuid) {
        if ($.fn.DataTable.isDataTable(this.tablerouting.nativeElement)) {
            $(this.tablerouting.nativeElement).dataTable().fnDestroy();
        }
        this.dtOptionsRouting = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[10, 20, 50, 100, "All"], [10, 20, 50, 100, "All"]],
            "order": [[0, "asc"]],
            "searching": false,
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getallIVRRoutingplan/' + uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.allRoutingPlan = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "prority" }, { data: "name" }, { data: "destination" }, { data: "revenue" }, { data: "status" }, { data: "action" }
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTableRouting = $(this.tablerouting.nativeElement);
        this.dataTableRouting.dataTable(this.dtOptionsRouting);
    }
    DeleteRoutingPlan(uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                var currentUser = JSON.parse(localStorage.getItem('currentUser'));
                // alert(uuid);return;
                this.moduleservice.deleteIVRRoutingPlan(uuid, currentUser.uuid).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    this.loadallRoutingplan(this.uuid);
                    this.loadalltarget();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    setRouting(uuid) {
        if (this.editForm.get('name').value == "") {
            sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Error', 'Please Enter Name of Routing First :)', 'error');
            setTimeout(() => {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
            }, 2000);
            return false;
        }
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want Add Routing Plan!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, Add it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                var currentUser = JSON.parse(localStorage.getItem('currentUser'));
                var currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
                if (this.namvalue == undefined) {
                    this.namvalue = this.addedname;
                }
                // console.log(this.namvalue); return;
                this.moduleservice.setivrRouting(uuid, this.namvalue, currentUser.uuid, currentCompany.uuid).subscribe(res => {
                    this.loadallRoutingplan(this.uuid);
                    this.loadalltarget();
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Added!', 'Routing Plan Added Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Routing Plan Cancelled :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    getAlltarget() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAlltarget(this.currentCompany.uuid).subscribe(res => {
            this.targetdata = res;
        }, error => this.error = error);
    }
    get editFormcontrol() { return this.editForm.controls; }
    onSubmit() {
        this.Submitted = true;
        if (this.editForm.invalid) {
            return;
        }
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.editForm.get('user_uuid').setValue(currentUser.uuid);
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.uuid = this.route.snapshot.paramMap.get('id');
        this.moduleservice.editIVRPlan(currentUser.uuid, this.uuid, this.editForm.value).subscribe(res => {
            //  console.log(res); return false;
            if (res.status !== 'error') {
                this.nameadded = 1;
                this.nam_uuid = res.uuid;
                this.namvalue = this.editForm.get('name').value;
                this.toastrService.success('IVR Routing Plan Updated Successfully');
                this.Submitted = false;
                //  this.router.navigate(['/campaigns']);
            }
            else {
                this.toastrService.error('Failed To Add Plan! Please try again');
            }
        }, error => this.error = error);
    }
    closeModal() {
        if (!this.payoutForm.invalid) {
            $("#addLabels").modal("hide");
        }
    }
    closeroutingModal() {
        if (!this.editRoutingForm.invalid) {
            $("#editRouting").modal("hide");
        }
    }
    settingToggleDuration(type) {
        this.getsettingToggleDurationval = type;
        this.editRoutingForm.get('settingToggleDuration').setValue(type);
        //  console.log(this.editRoutingForm.get('settingToggleDurationval').value);
    }
    editRoutingdata(uuid, priority, weight, revenue, type, seconds, restrictdup, restrictafter, settingToggleDurationval, days) {
        // console.log(uuid)
        this.editRoutingForm.patchValue({
            uuid: uuid,
            priority: priority,
            weight: weight,
            conversation_revenue: revenue,
            conversation_event: type,
            conversation_seconds: seconds,
            restrictdup: restrictdup,
            restrictafter: restrictafter,
            days: days,
            settingToggleDurationval: settingToggleDurationval,
            settingToggleDuration: settingToggleDurationval,
        });
        // console.log(settingToggleDurationval);
        this.getsettingToggleDurationval = settingToggleDurationval;
    }
    get editRoutingSubmit() { return this.editRoutingForm.controls; }
    oneditRoutingSubmit() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.editRoutingForm.get('user_uuid').setValue(currentUser.uuid);
        this.editRoutingForm.get('settingToggleDuration').setValue(this.getsettingToggleDurationval);
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        //  console.log(this.editRoutingForm.value); return;
        this.moduleservice.editIVRRoutingSubmit(this.uuid, this.editRoutingForm.value).subscribe(res => {
            if (res.status !== 'error') {
                this.toastrService.success('Routing Plan Updated Successfully');
                this.Submitted = false;
                this.loadallRoutingplan(this.uuid);
            }
            else {
                this.toastrService.error('Failed To Update Campaign');
            }
        }, error => this.error = error);
    }
};
EditPlanComponent.ctorParameters = () => [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Renderer2"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_6__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_9__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_8__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_8__["ActivatedRoute"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectorRef"] }
];
EditPlanComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }],
    tabletarget: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTableTarget', { static: true },] }],
    tablerouting: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTableRouting', { static: true },] }]
};
EditPlanComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-edit-plan',
        template: _raw_loader_edit_plan_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_edit_plan_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], EditPlanComponent);



/***/ }),

/***/ "qT+o":
/*!**********************************************************!*\
  !*** ./src/app/modules/changelog/changelog.component.ts ***!
  \**********************************************************/
/*! exports provided: ChangelogComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangelogComponent", function() { return ChangelogComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_changelog_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./changelog.component.html */ "2Qyi");
/* harmony import */ var _changelog_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./changelog.component.scss */ "6FZE");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../global */ "XrUY");










const router = _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"];
class DataTablesResponse {
}
let ChangelogComponent = class ChangelogComponent {
    constructor(moduleservice, toastrService, handler) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_9__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadChangeLogs();
    }
    loadChangeLogs() {
        // console.log('ok');
        // return false;
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "lengthMenu": [[-1, 50, 100, 200, 500, 1000], ["All", 50, 100, 200, 500, 1000]],
            "pageLength": 200,
            "order": [[1, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getchangelog/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "user" }, { data: "modulename" }, { data: "operation_type" }, { data: "description_string" }, { data: "created_at" }
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
};
ChangelogComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_3__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpBackend"] }
];
ChangelogComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
ChangelogComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-changelog',
        template: _raw_loader_changelog_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_changelog_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], ChangelogComponent);



/***/ }),

/***/ "qXBG":
/*!**************************************!*\
  !*** ./src/app/auth/auth.service.ts ***!
  \**************************************/
/*! exports provided: AuthService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthService", function() { return AuthService; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ "qCKp");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "kU1M");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! .././global */ "XrUY");






let AuthService = class AuthService {
    constructor(http) {
        this.http = http;
        // serverUrl = 'http://192.168.1.50/angapi/index.php/';
        // serverUrl = 'http://104.131.72.90/index.php/';
        this.serverUrl = _global__WEBPACK_IMPORTED_MODULE_5__["GlobalVariable"].BASE_API_URL;
        this.jsonObj = {};
    }
    login(username, password) {
        // console.log(password);return false;
        return this.http.post(`${this.serverUrl}login`, { username: username, password: password })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])(user => {
            // console.log(user);return
            if (user && user.token) {
                // console.log(companny); return;
                localStorage.setItem('currentUser', JSON.stringify(user));
                if (user.role == 2) {
                    var companny = user.companydetails;
                    for (let index = 0; index < companny.length; index++) {
                        const element = companny[index];
                        if (element.active == 1) {
                            this.jsonObj = {
                                "uuid": element.uuid,
                                "name": element.name,
                            };
                        }
                    }
                }
                else {
                    // console.log(user.role); return;
                    this.jsonObj = {
                        "uuid": user.company_uuid,
                        "name": user.first_name,
                    };
                }
                // console.log(this.jsonObj);return false;
                if (user.role == 3) {
                    this.redirectUrl = '/campaigns';
                }
                // console.log(this.jsonObj);return false;
                localStorage.setItem('currentCompany', JSON.stringify(this.jsonObj));
                // console.log(compaany_arr);
                // return false;
            }
        }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    get_permission(url, user_id) {
        return this.http.post(this.serverUrl + 'get_permission/' + user_id, url).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    isLoggedIn() {
        // console.log(localStorage.getItem('currentUser'));return false;
        if (localStorage.getItem('currentUser')) {
            return true;
        }
        else {
            return false;
        }
    }
    getAuthorizationToken() {
        const currentUser = JSON.parse(localStorage.getItem('currentUser'));
        // console.log(currentUser);return false;
        return currentUser.token;
    }
    logout() {
        // localStorage.removeItem('currentUser');
        localStorage.clear();
    }
    handleError(error) {
        if (error.error instanceof ErrorEvent) {
            // A client-side or network error occurred. Handle it accordingly.
            console.error('An error occurred:', error.error.message);
        }
        else {
            // The backend returned an unsuccessful response code.
            // The response body may contain clues as to what went wrong.
            console.error(`Backend returned code ${error.status}, ` + `body was: ${error.error}`);
        }
        // return an observable with a user-facing error message
        this.errorData = {
            errorTitle: 'Oops! Request for document failed',
            errorDesc: 'Something bad happened. Please try again later.'
        };
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["throwError"])(this.errorData);
    }
};
AuthService.ctorParameters = () => [
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] }
];
AuthService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
        providedIn: 'root'
    })
], AuthService);



/***/ }),

/***/ "r9qH":
/*!************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/page-not-found-component/page-not-found-component.component.html ***!
  \************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n<div class=\"\">\r\n    <section class=\"section\">\r\n         <div class=\"section-body\">\r\n           <div class=\"row\">\r\n             <div class=\"col-12 col-md-12 col-lg-12\">\r\n                <div id=\"app\">\r\n                    <section class=\"section\">\r\n                      <div class=\"container mt-5\">\r\n                        <div class=\"page-error\">\r\n                          <div class=\"page-inner\">\r\n                            <h1>404</h1>\r\n                            <div class=\"page-description\">\r\n                              The page you were looking for could not be found.\r\n                            </div>\r\n                            <!-- <div class=\"page-search\"> -->\r\n                              <!-- <form>\r\n                                <div class=\"form-group floating-addon floating-addon-not-append\"> -->\r\n                                  <!-- <div class=\"input-group\">\r\n                                    <div class=\"input-group-prepend\">\r\n                                      <div class=\"input-group-text\">\r\n                                        <i class=\"fas fa-search\"></i>\r\n                                      </div>\r\n                                    </div>\r\n                                    <input type=\"text\" class=\"form-control\" placeholder=\"Search\">\r\n                                    <div class=\"input-group-append\">\r\n                                      <button class=\"btn btn-primary btn-lg\">\r\n                                        Search\r\n                                      </button>\r\n                                    </div>\r\n                                  </div> -->\r\n                                <!-- </div>\r\n                              </form> -->\r\n                              <div class=\"mt-5\">\r\n                                <h6><a [routerLink]=\"['/']\" routerLinkActive=\"router-link-active\" >Back to Home</a></h6>\r\n                              </div>\r\n                            </div>\r\n                          <!-- </div> -->\r\n                        </div>\r\n                      </div>\r\n                    </section>\r\n                  </div>        \r\n            </div>\r\n            </div>\r\n        </div>\r\n    </section>        \r\n</div>\r\n\r\n");

/***/ }),

/***/ "rkrF":
/*!******************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/rules/rulesadd/rulesadd.component.html ***!
  \******************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"main-content\">\r\n       <section class=\"section\">\r\n         <div class=\"section-body\">\r\n           <div class=\"row\">\r\n             <div class=\"col-12 col-md-12 col-lg-12\">\r\n               <form [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n               <div class=\"card\" >\r\n                 <div class=\"card-header\">\r\n                   <h4>Add Rule</h4>\r\n                 </div>\r\n                 <div class=\"card-body\">                    \r\n                   <div class=\"form-group\">\r\n                     <label>Name</label>\r\n                     <input type=\"text\" formControlName=\"name\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': submitted && f.name.errors }\">\r\n                     <div *ngIf=\"submitted && f.name.errors\" class=\"invalid-feedback\">\r\n                         <div *ngIf=\"f.name.errors.required\">Name is required</div>\r\n                     </div> \r\n                   </div>\r\n\r\n                   <table class=\"table table-striped dataTable no-footer\" *ngIf=\"addForm['controls'].itemRows!=null\" formGroupName=\"itemRows\">\r\n                        <tbody *ngFor=\"let itemrow of addForm['controls'].itemRows['controls']; let i=index\" [formGroupName]=\"i\">      \r\n                            <tr style=\"background: #fff;\">\r\n                                <td>\r\n                                    <div class=\"rule-text-block\">If</div>\r\n                                    <div class=\"rule-input\">\r\n                                        <select formControlName=\"ifval\" class=\"form-control\" [value]=\"'NUMBER'\">        \r\n                                            <option value=\"NUMBER\">Number</option>\r\n                                            <option value=\"AREA_CODE\">Area Code</option>\r\n                                            <option value=\"WILDCARD\">Wildcard</option>\r\n                                        </select>\r\n                                    </div>\r\n                                </td>\r\n                                <td>\r\n                                    <div class=\"rule-text-block\">is</div> \r\n                                    <div class=\"rule-input\">\r\n                                        <input formControlName=\"isval\" id=\"number\" (keypress)=_keyPress($event) type=\"text\" class=\"form-control number\" maxlength=\"14\">\r\n                                    </div>\r\n                                </td>\r\n                                <td>\r\n                                    <div class=\"rule-text-block\">then</div> \r\n                                    <div class=\"rule-input\">\r\n                                        <select formControlName=\"thenval\" class=\"form-control\" [value]=\"'FORWARD_TO'\">\r\n                                            <option value=\"FORWARD_TO\">Forward The Call To</option>\r\n                                            <option value=\"REJECT_THE_CALL\">Reject The Call</option>\r\n                                            <option value=\"PLAY_AUDIO\">Play An Audio File</option>\r\n                                            <option value=\"FORWARD_TO_SECONDARY\">Forward To Number Secondary</option>\r\n                                            <option value=\"FORWARD_TO_IVR_MENU\">Forward To IVR Menu</option>\r\n                                        </select>\r\n                                    </div>\r\n                                </td>\r\n                                <td>\r\n                                        <input formControlName=\"thentxt\" type=\"text\" class=\"form-control\">\r\n                                </td>\r\n                                <td>\r\n                                    <div class=\"rule-text-block\">and</div> \r\n                                    <div class=\"rule-input\">\r\n                                        <select [attr.disabled]=\"controlEnabled\" formControlName=\"andval\" class=\"form-control ember-view\" [value]=\"'STOP'\">\r\n                                              <option value=\"STOP\">Stop Processing</option>\r\n                                                <!-- <option value=\"TRY_NEXT_RULE\">Try Next Rule</option>\r\n                                                <option value=\"FORWARD_TO_NUMBER_DEFAULT\">Forward To Number Default</option>\r\n                                                <option value=\"FORWARD_TO_NUMBER_SECONDARY\">Forward To Number Secondary</option> -->\r\n                                        </select>\r\n                                    </div>\r\n                                </td>\r\n                                <td>\r\n                                    <button type=\"button\" (click)=\"deleteRow(i)\" class=\"btn btn-danger btn-md trashbtn\" style=\"color: #fff;\"><i class=\"fa fa-trash\"></i></button>\r\n                                </td>\r\n                            </tr>\r\n                            <tr style=\"background: #fff;\">\r\n                                    <td colspan=\"6\" class=\"text-center\">\r\n                                        otherwise\r\n                                    </td>\r\n                                </tr>\r\n                        </tbody>\r\n                        <tbody>\r\n                                <tr style=\"background: #fff;\">\r\n                                        <td colspan=\"4\"></td>\r\n                                        <td colspan=\"2\" class=\"text-center\" style=\"padding-left: 130px!important;\">\r\n                                            <button type=\"button\" (click)=\"addRow()\" class=\"btn btn-primary\"><i class=\"fa fa-plus\"></i> Add Row</button>\r\n                                            <!-- *ngIf=\"addForm.get('rows')\" -->\r\n                                        </td>\r\n                                        \r\n                                </tr>\r\n                                <tr style=\"background: #fff;\">\r\n                                    <td colspan=\"6\" class=\"text-center\">\r\n                                        <strong>otherwise</strong><br>\r\n                                        <strong>Redirect Call To It's Forwarding Number</strong></td>\r\n                                </tr>\r\n                        </tbody>\r\n                    </table>\r\n\r\n                 </div>\r\n                 <div class=\"card-footer text-right\">\r\n                       <button  class=\"btn btn-primary mr-1\" type=\"submit\">Create Rule</button>\r\n                       <button style=\"margin-right: 4px;\" routerLink=\"/rules\" class=\"btn btn-primary\">Back To Rule Sets</button>\r\n                       <button class=\"btn btn-secondary\" type=\"reset\">Reset</button>\r\n                     </div>\r\n               </div>\r\n             </form>\r\n\r\n   </div>\r\n");

/***/ }),

/***/ "ryeG":
/*!****************************************************!*\
  !*** ./src/app/modules/label/label.component.scss ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("fieldset.scheduler-border {\n  border: 1px groove #ddd !important;\n  padding: 0 1.4em 1.4em 1.4em !important;\n  margin: 0 0 1.5em 0 !important;\n  box-shadow: 0px 0px 0px 0px #000;\n}\n\nlegend.scheduler-border {\n  font-size: 1.2em !important;\n  font-weight: bold !important;\n  text-align: left !important;\n  width: auto;\n  padding: 0 10px;\n  border-bottom: none;\n}\n\ninput#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n\n.modal-dialog.model-lg {\n  max-width: 783px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFxsYWJlbC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLGtDQUFBO0VBQ0EsdUNBQUE7RUFDQSw4QkFBQTtFQUVRLGdDQUFBO0FBQ1o7O0FBRUE7RUFDSSwyQkFBQTtFQUNBLDRCQUFBO0VBQ0EsMkJBQUE7RUFDQSxXQUFBO0VBQ0EsZUFBQTtFQUNBLG1CQUFBO0FBQ0o7O0FBRUE7RUFDQSxhQUFBO0FBQ0E7O0FBQ0E7RUFDSSxZQUFBO0FBRUo7O0FBQUE7RUFDSSxnQkFBQTtBQUdKIiwiZmlsZSI6ImxhYmVsLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiZmllbGRzZXQuc2NoZWR1bGVyLWJvcmRlciB7XHJcbiAgICBib3JkZXI6IDFweCBncm9vdmUgI2RkZCAhaW1wb3J0YW50O1xyXG4gICAgcGFkZGluZzogMCAxLjRlbSAxLjRlbSAxLjRlbSAhaW1wb3J0YW50O1xyXG4gICAgbWFyZ2luOiAwIDAgMS41ZW0gMCAhaW1wb3J0YW50O1xyXG4gICAgLXdlYmtpdC1ib3gtc2hhZG93OiAgMHB4IDBweCAwcHggMHB4ICMwMDA7XHJcbiAgICAgICAgICAgIGJveC1zaGFkb3c6ICAwcHggMHB4IDBweCAwcHggIzAwMDtcclxufVxyXG5cclxubGVnZW5kLnNjaGVkdWxlci1ib3JkZXIge1xyXG4gICAgZm9udC1zaXplOiAxLjJlbSAhaW1wb3J0YW50O1xyXG4gICAgZm9udC13ZWlnaHQ6IGJvbGQgIWltcG9ydGFudDtcclxuICAgIHRleHQtYWxpZ246IGxlZnQgIWltcG9ydGFudDtcclxuICAgIHdpZHRoOmF1dG87XHJcbiAgICBwYWRkaW5nOjAgMTBweDtcclxuICAgIGJvcmRlci1ib3R0b206bm9uZTtcclxufVxyXG5cclxuaW5wdXQjb3B0aW9uMSwgaW5wdXQjb3B0aW9uMiwgaW5wdXQjb3B0aW9uM3tcclxuZGlzcGxheTogbm9uZTtcclxufSAgICBcclxuLmJ0bi1ncm91cC5mb3JtLWNvbnRyb2wge1xyXG4gICAgaGVpZ2h0OiA2MHB4O1xyXG59XHJcbi5tb2RhbC1kaWFsb2cubW9kZWwtbGcge1xyXG4gICAgbWF4LXdpZHRoOiA3ODNweDtcclxufSJdfQ== */");

/***/ }),

/***/ "sFoh":
/*!*********************************************************************************!*\
  !*** ./src/app/modules/number/number-batchedit/number-batchedit.component.scss ***!
  \*********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".myclass.custom-class {\n  padding: 0px !important;\n  height: 40px !important;\n}\n\ninput#option1, input#option2, input#option3 {\n  display: none;\n}\n\n.btn-group.form-control {\n  height: 60px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uXFwuLlxcLi5cXC4uXFwuLlxcbnVtYmVyLWJhdGNoZWRpdC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLHVCQUFBO0VBQ0EsdUJBQUE7QUFDSjs7QUFDQTtFQUNJLGFBQUE7QUFFSjs7QUFBQTtFQUNJLFlBQUE7QUFHSiIsImZpbGUiOiJudW1iZXItYmF0Y2hlZGl0LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm15Y2xhc3MuY3VzdG9tLWNsYXNze1xyXG4gICAgcGFkZGluZzogMHB4IWltcG9ydGFudDtcclxuICAgIGhlaWdodDogNDBweCAhaW1wb3J0YW50O1xyXG59XHJcbmlucHV0I29wdGlvbjEsIGlucHV0I29wdGlvbjIsIGlucHV0I29wdGlvbjN7XHJcbiAgICBkaXNwbGF5OiBub25lO1xyXG59ICAgIFxyXG4uYnRuLWdyb3VwLmZvcm0tY29udHJvbCB7XHJcbiAgICBoZWlnaHQ6IDYwcHg7XHJcbn1cclxuIl19 */");

/***/ }),

/***/ "sG/L":
/*!********************************************************!*\
  !*** ./src/app/pagenotfound/pagenotfound.component.ts ***!
  \********************************************************/
/*! exports provided: PagenotfoundComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PagenotfoundComponent", function() { return PagenotfoundComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_pagenotfound_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./pagenotfound.component.html */ "ey5a");
/* harmony import */ var _pagenotfound_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pagenotfound.component.scss */ "U/rL");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");




let PagenotfoundComponent = class PagenotfoundComponent {
    constructor() { }
    ngOnInit() {
    }
};
PagenotfoundComponent.ctorParameters = () => [];
PagenotfoundComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-pagenotfound',
        template: _raw_loader_pagenotfound_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_pagenotfound_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], PagenotfoundComponent);



/***/ }),

/***/ "sYaG":
/*!*******************************************************************!*\
  !*** ./src/app/auth/login-componunt/login-componunt.component.ts ***!
  \*******************************************************************/
/*! exports provided: LoginComponuntComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoginComponuntComponent", function() { return LoginComponuntComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_login_componunt_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./login-componunt.component.html */ "kDwe");
/* harmony import */ var _login_componunt_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./login-componunt.component.scss */ "34H9");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _auth_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../auth.service */ "qXBG");







let LoginComponuntComponent = class LoginComponuntComponent {
    constructor(fb, router, authService) {
        // if (authService.isLoggedIn()) {
        //     router.navigate(['/']);
        // }
        this.fb = fb;
        this.router = router;
        this.authService = authService;
        this.submitted = false;
    }
    ngOnInit() {
        this.loginForm = this.fb.group({
            username: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required],
            password: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_4__["Validators"].required]
        });
        if (localStorage.getItem('currentUser')) {
            this.router.navigate(['/']);
            return false;
        }
        this.islogin = this.authService.isLoggedIn();
        // if(this.islogin='true'){
        //   // console.log(this.islogin);  
        //   this.router.navigate(['']);
        // }
        this.authService.logout();
    }
    get username() { return this.loginForm.get('username'); }
    get password() { return this.loginForm.get('password'); }
    onSubmit() {
        this.submitted = true;
        this.authService.login(this.username.value, this.password.value).subscribe((data) => {
            if (localStorage.getItem('currentUser')) {
                //  console.log(this.authService.isLoggedIn);return false;
                // return false;
                const redirect = this.authService.redirectUrl ? this.authService.redirectUrl : '/';
                this.router.navigate([redirect]);
            }
            else {
                this.loginError = 'Username or password is incorrect.';
            }
        }, error => this.error = error);
    }
};
LoginComponuntComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormBuilder"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_5__["Router"] },
    { type: _auth_service__WEBPACK_IMPORTED_MODULE_6__["AuthService"] }
];
LoginComponuntComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-login-componunt',
        template: _raw_loader_login_componunt_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_login_componunt_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], LoginComponuntComponent);



/***/ }),

/***/ "tTwH":
/*!**************************************************************!*\
  !*** ./src/app/modules/recordings/recordings.component.scss ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJyZWNvcmRpbmdzLmNvbXBvbmVudC5zY3NzIn0= */");

/***/ }),

/***/ "tmu1":
/*!****************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/reports/report-calls/report-calls.component.html ***!
  \****************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n      <div class=\"main-content\">  \r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                  <form [formGroup]=\"CallReportForm\" (ngSubmit)=\"onCallReportSubmit()\">\r\n                  <div class=\"row\" style=\"margin-top: 20px;\r\n                  \">\r\n                      <div class=\"col-2\">\r\n                          <div class=\"card-header\">\r\n                          <h4>Call Reports</h4></div>\r\n                      </div>\r\n                      <!-- <div class=\"col-md-2\">\r\n                        <input type=\"text\" class=\"form-control\" ngxDaterangepickerMd\r\n                        [singleDatePicker]=\"true\" formControlName=\"start_date\"\r\n                        [autoApply]=\"true\" \r\n                         class=\"form-control\"\r\n                        placeholder=\"Select Start Date...\" />\r\n                      </div>\r\n                      <div class=\"col-md-2\">\r\n                        <input type=\"text\" class=\"form-control\" ngxDaterangepickerMd\r\n                        [singleDatePicker]=\"true\" formControlName=\"end_date\"\r\n                        [autoApply]=\"true\" \r\n                         class=\"form-control\"\r\n                        placeholder=\"Select End Date...\" />\r\n                      </div> -->\r\n                     \r\n                      <div class=\"col-3\">\r\n                        <input type=\"text\"\r\n                        formControlName=\"date\"\r\n                        ngxDaterangepickerMd\r\n                        [ranges]=\"ranges\"                \r\n                        class=\"form-control\"\r\n                        placeholder=\"Select please...\"/>\r\n                      </div>\r\n\r\n                      <div class=\"col-md-2\">\r\n                        <select formControlName=\"label\" class=\"form-control\">\r\n                            <option value=\"\">Select Label</option>\r\n                            <option *ngFor=\"let data of alllabel\" value=\"{{data.itemName}}\">{{data.itemName}}</option>\r\n                        </select>\r\n                      </div>\r\n                      <div class=\"col-md-2\">\r\n                        <button class=\"btn btn-primary\" type=\"submit\">Get Chart</button>\r\n                      </div>\r\n                     \r\n                      <!-- <div class=\"col-md-2 mt-3\">\r\n                        <a class=\"pl-5\" href=\"#\" data-toggle=\"collapse\" data-target=\"#collapseExample\" aria-expanded=\"false\" aria-controls=\"collapseExample\">\r\n                           More Option\r\n                          </a>\r\n                      </div> -->\r\n                  </div>    \r\n            <div class=\"collapse\" id=\"collapseExample\">\r\n            <hr>\r\n            <div class=\"p-2\">\r\n               <div class=\"row\">\r\n                  <div class=\"col-md-2\">\r\n                    <select formControlName=\"duration_type\" class=\"form-control\">\r\n                        <option value=\"\">Select Type</option>\r\n                        <option value=\">\">Greater Than</option>\r\n                        <option value=\"<\">Less Than</option>\r\n                        <option value=\"=\">Equal To</option>                        \r\n                    </select>\r\n                  </div>\r\n                  <div class=\"col-md-2\">\r\n                    <input formControlName=\"duration\" type=\"text\" class=\"form-control\" class=\"form-control\" placeholder=\"Enter Duration...\" />\r\n                  </div>\r\n               </div>\r\n            </div>\r\n            <hr>\r\n            </div>        \r\n            </form>     \r\n              <div class=\"card-body\">\r\n                <br>\r\n                <div [chart]=\"chart\"></div>\r\n                <br>\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                  <thead>\r\n                    <tr>\r\n                      <th>Call Date</th>    \r\n                      <th>Label Name\t</th>\r\n                      <th># of Calls</th>\r\n                      <th>Total Duration</th>\r\n                      <th>Avg Duration</th>\r\n                      <th>IVR key press</th>\r\n                      <th>Revenue</th>\r\n                    </tr>\r\n                  </thead>\r\n                  <tbody *ngIf=\"numbers?.length != 0\">\r\n                      <tr *ngFor=\"let data of numbers\">\r\n                        <td>{{ data.created_at}}</td>                         \r\n                        <td>{{ data.label }}</td>\r\n                        <td>{{ data.noofcalls }}</td>\r\n                        <td>{{ data.call_duration }}</td>\r\n                        <td>{{ data.avg }}</td>\r\n                        <td>{{ data.ivr_inputs }}</td>                         \r\n                        <td>{{ data.revenue }}</td>                         \r\n                    \r\n                      </tr>\r\n                  </tbody>\r\n                  <tbody *ngIf=\"numbers?.length == 0\">\r\n                    <tr>\r\n                      <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                    </tr>\r\n                  <tbody>\r\n                </table>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n</div>  ");

/***/ }),

/***/ "tqqR":
/*!************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/longlist/longlist.component.html ***!
  \************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n      <div class=\"main-content\">  \r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                  <div class=\"row\" style=\"margin-top: 20px;\r\n                  \">\r\n                      <div class=\"col-9\">\r\n                          <div class=\"card-header\">\r\n                          <h4>All LongList Numbers</h4></div>\r\n                      </div>\r\n                  </div> \r\n                  <form  (ngSubmit)=\"loadcalls()\">\r\n                  <div class=\"row\" style=\"margin-top: 10px;margin-left: 11px;\" > \r\n                  <div class=\"col-3\">\r\n                    <input type=\"text\" [(ngModel)]=\"numbers\" [ngModelOptions]=\"{standalone: true}\" class=\"form-control\" placeholder=\"Search Call Records\" >\r\n                  </div>                  \r\n                  <div class=\"col-8\">\r\n                    <input type=\"text\"\r\n                    ngxDaterangepickerMd\r\n                    [(ngModel)]=\"selected\" [ngModelOptions]=\"{standalone: true}\"\r\n                    [showCustomRangeLabel]=\"true\"\r\n                    [alwaysShowCalendars]=\"alwaysShowCalendars\"\r\n                    [ranges]=\"ranges\"                \r\n                    [showCancel]=\"true\"                   \r\n                    [linkedCalendars]=\"true\"                    \r\n                    [locale]=\"{applyLabel: 'Done'}\"\r\n                    [keepCalendarOpeningWithRange]=\"keepCalendarOpeningWithRange\"\r\n                    [showRangeLabelOnInput]=\"showRangeLabelOnInput\"\r\n                    class=\"form-control\"\r\n                    placeholder=\"Select please...\"/>\r\n                  </div>\r\n                  \r\n                  <div class=\"col-1\" style=\"margin-left: -22px;\">\r\n                    <button type=\"submit\" class=\"btn btn-success btn-lg\"><i class=\"fas fa-search\"></i></button>\r\n                  </div>\r\n                </div>\r\n                </form>         \r\n    \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                    <thead>\r\n                      <tr>\r\n                        <th>Number</th>\r\n                        <th>Forwarded To\t</th>\r\n                        <th>Created Date</th>                                                                     \r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"alldata?.length != 0\">\r\n                        <tr *ngFor=\"let data of alldata\">\r\n                            <td>{{ data.number }}</td>\r\n                            <td>{{ data.forward_to }}</td>\r\n                            <td>{{ data.created_at }}</td>                            \r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"alldata?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n</div>  ");

/***/ }),

/***/ "trv3":
/*!*********************************************************************************!*\
  !*** ./src/app/modules/publishers/publisher-terms/publisher-terms.component.ts ***!
  \*********************************************************************************/
/*! exports provided: PublisherTermsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PublisherTermsComponent", function() { return PublisherTermsComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_publisher_terms_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./publisher-terms.component.html */ "coDR");
/* harmony import */ var _publisher_terms_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./publisher-terms.component.scss */ "PAU+");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../../../global */ "XrUY");











const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
let PublisherTermsComponent = class PublisherTermsComponent {
    constructor(moduleservice, toastrService, handler, fb, router, activatedRoute) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.router = router;
        this.activatedRoute = activatedRoute;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.BaseUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_URL;
        this.isavail = 1;
        this.company = 1;
        this.tcenable = false;
        this.Submitted = false;
        // this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // this.Companyuuid = this.currentCompany.uuid;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        this.publicregistration = true;
        this.activatedRoute.params.subscribe((data) => {
            this.checkcompanyavail(data.id);
        });
    }
    ngOnInit() {
        this.routeurl = window.location.href.replace(this.BaseUrl + 'publisher-registration/', "");
        this.checkcompanyavail(this.routeurl);
        // console.log(this.routeurl);
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        // this.getAllpublisherssetting();
        this.addForm = this.fb.group({
            // , Validators.required
            businame: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            first_name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            last_name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            email: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            phone_number: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
    }
    checkcompanyavail(company_uuid) {
        this.moduleservice.checkcompanyavail(company_uuid).subscribe(res => {
            this.isavail = res.isavail;
            this.company = res.company;
        });
    }
    getAllpublisherssetting() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAllpublisherssetting(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            this.email = res['email'];
        }, error => this.error = error);
    }
    tc_enable(event) {
        if (event.target.checked == true) {
            this.tcenable = true;
        }
        else {
            this.tcenable = false;
        }
    }
    //Add Publisher
    get addformcontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        this.Submitted = true;
        if (this.addForm.invalid) {
            return;
        }
        // this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        formData.append('company_uuid', this.routeurl);
        formData.append('businame', this.addForm.get('businame').value);
        formData.append('first_name', this.addForm.get('first_name').value);
        formData.append('last_name', this.addForm.get('last_name').value);
        formData.append('email', this.addForm.get('email').value);
        formData.append('phone_number', this.addForm.get('phone_number').value);
        // console.log(formData); return false;
        this.moduleservice.addPublisherRegistration(formData).subscribe(res => {
            // console.log(res); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Publisher Registration Successfully Done.');
                localStorage.setItem('company', this.routeurl);
                this.router.navigate(['/thank-you']);
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
};
PublisherTermsComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["ActivatedRoute"] }
];
PublisherTermsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-publisher-terms',
        template: _raw_loader_publisher_terms_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_publisher_terms_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], PublisherTermsComponent);



/***/ }),

/***/ "uIGq":
/*!**********************************************************!*\
  !*** ./src/app/modules/ivr-menus/ivr-menus.component.ts ***!
  \**********************************************************/
/*! exports provided: IvrMenusComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IvrMenusComponent", function() { return IvrMenusComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_ivr_menus_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./ivr-menus.component.html */ "+K4X");
/* harmony import */ var _ivr_menus_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ivr-menus.component.scss */ "bO9+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../global */ "XrUY");











const router = _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"];
class DataTablesResponse {
}
class IVRMenus {
}
let IvrMenusComponent = class IvrMenusComponent {
    constructor(moduleservice, toastrService, handler, router) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.router = router;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.checkboxes = [];
        this.filter = [];
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.loadIVRMenus();
    }
    loadIVRMenus() {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        var that = this;
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[1, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + 'getIVRMenus/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    that.IVRMenus = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "checkall" }, { data: "name" }, { data: "buyer" }, { data: "created_at" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0, 4],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.IVRMenus.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.IVRMenus.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.IVRMenus.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedIVR(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Records Deleted Successfully.');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                        }, 2000);
                        this.loadIVRMenus();
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                }
            });
        }
    }
    Delete(uuid) {
        // alert(uuid);return false;
        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteIVRMenu(uuid, currentUser.uuid).subscribe(res => {
                    // console.log(res);return false;
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Record Deleted Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                    this.loadIVRMenus();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                }, 2000);
            }
        });
    }
    Clone(id) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to clone this IVR Menu!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, clone it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.cloneIVR(id, currentUser.uuid).subscribe(res => {
                    this.filter = [res];
                    if (this.filter[0]['status'] == 'success') {
                        this.loadIVRMenus();
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Success!', 'IVR Menu Clone Successfully.');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                        }, 2000);
                        this.router.navigate(['/edit-ivr/' + this.filter[0]['uuid']]);
                    }
                    else {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Error', 'IVR Menu Clone failed.', 'error');
                    }
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', '', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                }, 2000);
            }
        });
    }
};
IvrMenusComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_3__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpBackend"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] }
];
IvrMenusComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
IvrMenusComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-ivr-menus',
        template: _raw_loader_ivr_menus_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_ivr_menus_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], IvrMenusComponent);



/***/ }),

/***/ "uN0H":
/*!***************************************************************************************!*\
  !*** ./src/app/modules/settings/alert-configuration/alert-configuration.component.ts ***!
  \***************************************************************************************/
/*! exports provided: AlertConfigurationComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AlertConfigurationComponent", function() { return AlertConfigurationComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_alert_configuration_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./alert-configuration.component.html */ "JD8s");
/* harmony import */ var _alert_configuration_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./alert-configuration.component.scss */ "H2ej");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../../../global */ "XrUY");











const router = _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"];
let AlertConfigurationComponent = class AlertConfigurationComponent {
    constructor(moduleservice, toastrService, handler, fb, cdRef) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.cdRef = cdRef;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.BaseUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_URL;
        this.dropdownSettings = {};
        this.isdontuselabel = false;
        this.Submitted = false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.Companyuuid = this.currentCompany.uuid;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
        this.publicregistration = true;
    }
    ngAfterViewChecked() {
        this.cdRef.detectChanges();
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.getAllLabels();
        this.addForm = this.fb.group({
            // , Validators.required
            user_uuid: [''],
            nameofalert: [''],
            labelname: [''],
            calllength: [''],
            onetimealert: [''],
            systemalert: [''],
        });
    }
    getAllLabels() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getAllLabels(this.currentCompany.uuid).subscribe(res => {
            this.dropdownSettings = {
                singleSelection: false,
                text: "Select Label Name",
                selectAllText: 'Select All',
                unSelectAllText: 'UnSelect All',
                enableSearchFilter: true,
                classes: "myclass custom-class"
            };
            this.alllabels = res;
            //  console.log(res); return false;                    
        }, error => this.error = error);
    }
    dontuselabel(event) {
        this.isdontuselabel = event.target.checked;
    }
    //Add Publisher
    get addformcontrol() { return this.addForm.controls; }
    onSubmit() {
        const formData = new FormData();
        // this.Submitted = true;
        // if (this.addForm.invalid) {
        //     return;
        // }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        formData.append('user_uuid', currentUser.uuid);
        formData.append('uuid', this.currentCompany.uuid);
        formData.append('public_registration', "");
        // formData.append('intro', this.addForm.get('intro').value);
        // formData.append('email', this.addForm.get('email').value);    
        formData.append('terms_cond', "");
        formData.append('tc_url', this.addForm.get('tc_url').value);
        // console.log(formData); return false;
        this.moduleservice.addPublisherSettingdata(formData).subscribe(res => {
            // console.log(res.status); return false;
            if (res.status !== 'error') {
                this.toastrService.success('Publisher Setting Saved Successfully');
                this.getAllLabels();
                this.Submitted = false;
            }
            else {
                this.toastrService.error('Failed To Add Label');
            }
        }, error => this.error = error);
    }
};
AlertConfigurationComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ChangeDetectorRef"] }
];
AlertConfigurationComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-alert-configuration',
        template: _raw_loader_alert_configuration_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_alert_configuration_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], AlertConfigurationComponent);



/***/ }),

/***/ "uUag":
/*!***********************************************************************************!*\
  !*** ./src/app/modules/number/number-addfslrules/number-addfslrules.component.ts ***!
  \***********************************************************************************/
/*! exports provided: NumberAddfslrulesComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberAddfslrulesComponent", function() { return NumberAddfslrulesComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_number_addfslrules_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./number-addfslrules.component.html */ "/H0Y");
/* harmony import */ var _number_addfslrules_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number-addfslrules.component.scss */ "FnDb");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../global */ "XrUY");












class DataTablesResponse {
}
class FSLClass {
}
let NumberAddfslrulesComponent = class NumberAddfslrulesComponent {
    constructor(fb, moduleService, router, route, toastrService, handler) {
        this.fb = fb;
        this.moduleService = moduleService;
        this.router = router;
        this.route = route;
        this.toastrService = toastrService;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_11__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.FSLRulesSubmitted = false;
        this.FSLRulesEditSubmitted = false;
        this.daysSubmitted = false;
        this.daysEditSubmitted = false;
        this.dropdownList = [];
        this.selectedItems = [];
        // public dateTime1: Date;
        // dropdownSettings: { singleSelection: boolean; text: string; selectAllText: string; unSelectAllText: string; enableSearchFilter: boolean; classes: string; };
        this.dropdownSettings = {};
        this.daytype = 0;
        this.flag = 0;
        // Day0
        this.selectedPrimaryForaward_0_day0 = 0;
        this.selectedPrimaryCount_0_day0 = 0;
        this.selected_0_day_0 = 0;
        this.selectedPrimaryForaward_1_day0 = 0;
        this.selectedPrimaryCount_1_day0 = 0;
        this.selected_1_day_0 = 0;
        this.selectedPrimaryForaward_2_day0 = 0;
        this.selectedPrimaryCount_2_day0 = 0;
        this.selected_2_day_0 = 0;
        this.selectedPrimaryForaward_3_day0 = 0;
        this.selectedPrimaryCount_3_day0 = 0;
        this.selected_3_day_0 = 0;
        this.selectedPrimaryForaward_4_day0 = 0;
        this.selectedPrimaryCount_4_day0 = 0;
        this.selected_4_day_0 = 0;
        this.selectedPrimaryForaward_5_day0 = 0;
        this.selectedPrimaryCount_5_day0 = 0;
        this.selected_5_day_0 = 0;
        this.selectedPrimaryForaward_6_day0 = 0;
        this.selectedPrimaryCount_6_day0 = 0;
        this.selected_6_day_0 = 0;
        this.selectedPrimaryForaward_7_day0 = 0;
        this.selectedPrimaryCount_7_day0 = 0;
        this.selected_7_day_0 = 0;
        this.selectedPrimaryForaward_8_day0 = 0;
        this.selectedPrimaryCount_8_day0 = 0;
        this.selected_8_day_0 = 0;
        this.selectedPrimaryForaward_9_day0 = 0;
        this.selectedPrimaryCount_9_day0 = 0;
        this.selected_9_day_0 = 0;
        // Day1
        this.selectedPrimaryForaward_0_day1 = 0;
        this.selectedPrimaryCount_0_day1 = 0;
        this.selected_0_day_1 = 0;
        this.selectedPrimaryForaward_1_day1 = 0;
        this.selectedPrimaryCount_1_day1 = 0;
        this.selected_1_day_1 = 0;
        this.selectedPrimaryForaward_2_day1 = 0;
        this.selectedPrimaryCount_2_day1 = 0;
        this.selected_2_day_1 = 0;
        this.selectedPrimaryForaward_3_day1 = 0;
        this.selectedPrimaryCount_3_day1 = 0;
        this.selected_3_day_1 = 0;
        this.selectedPrimaryForaward_4_day1 = 0;
        this.selectedPrimaryCount_4_day1 = 0;
        this.selected_4_day_1 = 0;
        this.selectedPrimaryForaward_5_day1 = 0;
        this.selectedPrimaryCount_5_day1 = 0;
        this.selected_5_day_1 = 0;
        this.selectedPrimaryForaward_6_day1 = 0;
        this.selectedPrimaryCount_6_day1 = 0;
        this.selected_6_day_1 = 0;
        this.selectedPrimaryForaward_7_day1 = 0;
        this.selectedPrimaryCount_7_day1 = 0;
        this.selected_7_day_1 = 0;
        this.selectedPrimaryForaward_8_day1 = 0;
        this.selectedPrimaryCount_8_day1 = 0;
        this.selected_8_day_1 = 0;
        this.selectedPrimaryForaward_9_day1 = 0;
        this.selectedPrimaryCount_9_day1 = 0;
        this.selected_9_day_1 = 0;
        // Day2
        this.selectedPrimaryForaward_0_day2 = 0;
        this.selectedPrimaryCount_0_day2 = 0;
        this.selected_0_day_2 = 0;
        this.selectedPrimaryForaward_1_day2 = 0;
        this.selectedPrimaryCount_1_day2 = 0;
        this.selected_1_day_2 = 0;
        this.selectedPrimaryForaward_2_day2 = 0;
        this.selectedPrimaryCount_2_day2 = 0;
        this.selected_2_day_2 = 0;
        this.selectedPrimaryForaward_3_day2 = 0;
        this.selectedPrimaryCount_3_day2 = 0;
        this.selected_3_day_2 = 0;
        this.selectedPrimaryForaward_4_day2 = 0;
        this.selectedPrimaryCount_4_day2 = 0;
        this.selected_4_day_2 = 0;
        this.selectedPrimaryForaward_5_day2 = 0;
        this.selectedPrimaryCount_5_day2 = 0;
        this.selected_5_day_2 = 0;
        this.selectedPrimaryForaward_6_day2 = 0;
        this.selectedPrimaryCount_6_day2 = 0;
        this.selected_6_day_2 = 0;
        this.selectedPrimaryForaward_7_day2 = 0;
        this.selectedPrimaryCount_7_day2 = 0;
        this.selected_7_day_2 = 0;
        this.selectedPrimaryForaward_8_day2 = 0;
        this.selectedPrimaryCount_8_day2 = 0;
        this.selected_8_day_2 = 0;
        this.selectedPrimaryForaward_9_day2 = 0;
        this.selectedPrimaryCount_9_day2 = 0;
        this.selected_9_day_2 = 0;
        // Day3
        this.selectedPrimaryForaward_0_day3 = 0;
        this.selectedPrimaryCount_0_day3 = 0;
        this.selected_0_day_3 = 0;
        this.selectedPrimaryForaward_1_day3 = 0;
        this.selectedPrimaryCount_1_day3 = 0;
        this.selected_1_day_3 = 0;
        this.selectedPrimaryForaward_2_day3 = 0;
        this.selectedPrimaryCount_2_day3 = 0;
        this.selected_2_day_3 = 0;
        this.selectedPrimaryForaward_3_day3 = 0;
        this.selectedPrimaryCount_3_day3 = 0;
        this.selected_3_day_3 = 0;
        this.selectedPrimaryForaward_4_day3 = 0;
        this.selectedPrimaryCount_4_day3 = 0;
        this.selected_4_day_3 = 0;
        this.selectedPrimaryForaward_5_day3 = 0;
        this.selectedPrimaryCount_5_day3 = 0;
        this.selected_5_day_3 = 0;
        this.selectedPrimaryForaward_6_day3 = 0;
        this.selectedPrimaryCount_6_day3 = 0;
        this.selected_6_day_3 = 0;
        this.selectedPrimaryForaward_7_day3 = 0;
        this.selectedPrimaryCount_7_day3 = 0;
        this.selected_7_day_3 = 0;
        this.selectedPrimaryForaward_8_day3 = 0;
        this.selectedPrimaryCount_8_day3 = 0;
        this.selected_8_day_3 = 0;
        this.selectedPrimaryForaward_9_day3 = 0;
        this.selectedPrimaryCount_9_day3 = 0;
        this.selected_9_day_3 = 0;
        // Day4
        this.selectedPrimaryForaward_0_day4 = 0;
        this.selectedPrimaryCount_0_day4 = 0;
        this.selected_0_day_4 = 0;
        this.selectedPrimaryForaward_1_day4 = 0;
        this.selectedPrimaryCount_1_day4 = 0;
        this.selected_1_day_4 = 0;
        this.selectedPrimaryForaward_2_day4 = 0;
        this.selectedPrimaryCount_2_day4 = 0;
        this.selected_2_day_4 = 0;
        this.selectedPrimaryForaward_3_day4 = 0;
        this.selectedPrimaryCount_3_day4 = 0;
        this.selected_3_day_4 = 0;
        this.selectedPrimaryForaward_4_day4 = 0;
        this.selectedPrimaryCount_4_day4 = 0;
        this.selected_4_day_4 = 0;
        this.selectedPrimaryForaward_5_day4 = 0;
        this.selectedPrimaryCount_5_day4 = 0;
        this.selected_5_day_4 = 0;
        this.selectedPrimaryForaward_6_day4 = 0;
        this.selectedPrimaryCount_6_day4 = 0;
        this.selected_6_day_4 = 0;
        this.selectedPrimaryForaward_7_day4 = 0;
        this.selectedPrimaryCount_7_day4 = 0;
        this.selected_7_day_4 = 0;
        this.selectedPrimaryForaward_8_day4 = 0;
        this.selectedPrimaryCount_8_day4 = 0;
        this.selected_8_day_4 = 0;
        this.selectedPrimaryForaward_9_day4 = 0;
        this.selectedPrimaryCount_9_day4 = 0;
        this.selected_9_day_4 = 0;
        // Day5
        this.selectedPrimaryForaward_0_day5 = 0;
        this.selectedPrimaryCount_0_day5 = 0;
        this.selected_0_day_5 = 0;
        this.selectedPrimaryForaward_1_day5 = 0;
        this.selectedPrimaryCount_1_day5 = 0;
        this.selected_1_day_5 = 0;
        this.selectedPrimaryForaward_2_day5 = 0;
        this.selectedPrimaryCount_2_day5 = 0;
        this.selected_2_day_5 = 0;
        this.selectedPrimaryForaward_3_day5 = 0;
        this.selectedPrimaryCount_3_day5 = 0;
        this.selected_3_day_5 = 0;
        this.selectedPrimaryForaward_4_day5 = 0;
        this.selectedPrimaryCount_4_day5 = 0;
        this.selected_4_day_5 = 0;
        this.selectedPrimaryForaward_5_day5 = 0;
        this.selectedPrimaryCount_5_day5 = 0;
        this.selected_5_day_5 = 0;
        this.selectedPrimaryForaward_6_day5 = 0;
        this.selectedPrimaryCount_6_day5 = 0;
        this.selected_6_day_5 = 0;
        this.selectedPrimaryForaward_7_day5 = 0;
        this.selectedPrimaryCount_7_day5 = 0;
        this.selected_7_day_5 = 0;
        this.selectedPrimaryForaward_8_day5 = 0;
        this.selectedPrimaryCount_8_day5 = 0;
        this.selected_8_day_5 = 0;
        this.selectedPrimaryForaward_9_day5 = 0;
        this.selectedPrimaryCount_9_day5 = 0;
        this.selected_9_day_5 = 0;
        // Day6
        this.selectedPrimaryForaward_0_day6 = 0;
        this.selectedPrimaryCount_0_day6 = 0;
        this.selected_0_day_6 = 0;
        this.selectedPrimaryForaward_1_day6 = 0;
        this.selectedPrimaryCount_1_day6 = 0;
        this.selected_1_day_6 = 0;
        this.selectedPrimaryForaward_2_day6 = 0;
        this.selectedPrimaryCount_2_day6 = 0;
        this.selected_2_day_6 = 0;
        this.selectedPrimaryForaward_3_day6 = 0;
        this.selectedPrimaryCount_3_day6 = 0;
        this.selected_3_day_6 = 0;
        this.selectedPrimaryForaward_4_day6 = 0;
        this.selectedPrimaryCount_4_day6 = 0;
        this.selected_4_day_6 = 0;
        this.selectedPrimaryForaward_5_day6 = 0;
        this.selectedPrimaryCount_5_day6 = 0;
        this.selected_5_day_6 = 0;
        this.selectedPrimaryForaward_6_day6 = 0;
        this.selectedPrimaryCount_6_day6 = 0;
        this.selected_6_day_6 = 0;
        this.selectedPrimaryForaward_7_day6 = 0;
        this.selectedPrimaryCount_7_day6 = 0;
        this.selected_7_day_6 = 0;
        this.selectedPrimaryForaward_8_day6 = 0;
        this.selectedPrimaryCount_8_day6 = 0;
        this.selected_8_day_6 = 0;
        this.selectedPrimaryForaward_9_day6 = 0;
        this.selectedPrimaryCount_9_day6 = 0;
        this.selected_9_day_6 = 0;
        this.selectedLevel = 0;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"](handler);
    }
    validatename(event) {
        // console.log(event.target.value); return false; 
        if (event.target.value != '') {
            this.moduleService.validatename(event.target.value).subscribe(res => {
                // console.log(res); return false;  
                this.isName = res;
                if (this.isName.status == 'success') {
                    this.isName = "success";
                }
                else {
                    this.isName = "fail";
                }
                // console.log(this.isName); return false;  
            }
            // }
            );
        }
        else {
            this.isName = "";
        }
    }
    getFSLbyuuid(uuid) {
        // alert(uuid);
        // console.log(uuid);
        this.moduleService.getFSLbyuuid(uuid).subscribe(res => {
            this.forwarding = res.forwarding[0].name;
            this.forwardingtimeframe = res.forwarding[0].nooftimeframe;
            this.noofforwarding = res.forwarding[0].nooftimeframe;
            for (let index = 0; index < res.forwarding.length; index++) {
                var start = res.forwarding[index].start_time.split(':');
                var end = res.forwarding[index].end_time.split(':');
                var startkey = 'start_time_' + index;
                var endkey = 'end_time_' + index;
                var daykey = 'day_' + index;
                // console.log(start[0]);
                this.editFSLRules.patchValue({
                    [daykey]: res.forwarding[index].timeofday,
                    [startkey]: new Date(new Date().setHours(start[0], start[1])),
                    [endkey]: new Date(new Date().setHours(end[0], end[1])),
                });
                for (let j = 0; j < res.forwarding[index].locations.length; j++) {
                    var inc = j + 1;
                    // var forlocationkey ='noofforwardinglocation_'+inc;
                    var PrimaryforwardType = 'PrimaryforwardType_' + j + '_day' + index;
                    var number_value = 'number_' + j + '_day' + index;
                    var ivr_value = 'ivrMenu_' + j + '_day' + index;
                    var sip_value = 'sipAdd_' + j + '_day' + index;
                    // this.flag =res.forwarding[index].locations[j].primary_forwarding_type;
                    // console.log(res.forwarding[index].locations[j].primary_forwarding_type);
                    if (res.forwarding[index].locations[j].primary_forwarding_type == 0) {
                        this.setPrimaryforward(0, j, index);
                        this.flag = 0;
                    }
                    if (res.forwarding[index].locations[j].primary_forwarding_type == 1) {
                        this.setPrimaryforward(1, j, index);
                        this.flag = 1;
                    }
                    if (res.forwarding[index].locations[j].primary_forwarding_type == 2) {
                        this.flag = 2;
                        this.setPrimaryforward(2, j, index);
                    }
                    if (res.forwarding[index].locations[j].primary_forwarding_number != '') {
                        var number = res.forwarding[index].locations[j].primary_forwarding_number;
                        var formatted = '(' + number.substr(0, 3) + ') ' + number.substr(3, 3) + '-' + number.substr(6, 4);
                    }
                    else {
                        var formatted = "";
                    }
                    if (index == 0) {
                        this.noofforwardinglocation_1 = res.forwarding[index].locations[j].noofforwardinglocation;
                        // if(this.noofforwardinglocation_1!=1)  {
                        // this.noofforwardinglocation_1++;                             
                        // }
                    }
                    //  console.log(res.forwarding[index].locations[j].noofforwardinglocation);
                    if (index == 1) {
                        this.noofforwardinglocation_2 = res.forwarding[index].locations[j].noofforwardinglocation;
                        // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                        //   this.noofforwardinglocation_2++;                             
                        //   }
                    }
                    if (index == 2) {
                        this.noofforwardinglocation_3 = res.forwarding[index].locations[j].noofforwardinglocation;
                        // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                        //   this.noofforwardinglocation_3++;                             
                        // }                              
                    }
                    if (index == 3) {
                        this.noofforwardinglocation_4 = res.forwarding[index].locations[j].noofforwardinglocation;
                        // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                        //   this.noofforwardinglocation_4++;                             
                        // }                              
                    }
                    if (index == 4) {
                        this.noofforwardinglocation_5 = res.forwarding[index].locations[j].noofforwardinglocation;
                        // if(res.forwarding[index].locations[j].noofforwardinglocation!=1)  {
                        //   this.noofforwardinglocation_5++;                             
                        // }                                
                    }
                    if (index == 5) {
                        this.noofforwardinglocation_6 = res.forwarding[index].locations[j].noofforwardinglocation;
                    }
                    if (index == 6) {
                        this.noofforwardinglocation_7 = res.forwarding[index].locations[j].noofforwardinglocation;
                    }
                    // console.log(index);
                    this.editFSLRules.patchValue({
                        // [forlocationkey]: res.forwarding[index].locations[j].noofforwardinglocation,
                        [PrimaryforwardType]: this.flag,
                        [number_value]: formatted,
                        [ivr_value]: res.forwarding[index].locations[j].primary_forwarding_ivr,
                        [sip_value]: res.forwarding[index].locations[j].primary_forwarding_sip,
                    });
                }
            }
        }, error => this.error = error);
    }
    addFSL() {
        this.FSLRulesSubmitted = false;
        this.addFSLRules.reset();
    }
    getWeekbyuuid(uuid, start_day, end_day) {
        this.editWeekDaysForm.patchValue({
            'uuid': uuid,
            'start_day': start_day,
            'end_day': end_day,
        });
    }
    ngOnInit() {
        // this.showLoadingIndicator= true;
        // setTimeout(()=>{this.showLoadingIndicator= false; },1000);
        // this.loadNumbers();
        this.loadallweekdays();
        this.loadweekdays();
        this.getAllLabels();
        this.getIVRMenu();
        this.getAllLabels();
        this.getAllRuleset();
        this.getAllLabels();
        this.dropdownSettings = {
            singleSelection: false,
            text: "Select Associated Label",
            selectAllText: 'Select All',
            unSelectAllText: 'UnSelect All',
            enableSearchFilter: true,
            classes: "myclass custom-class"
        };
        // if(localStorage.getItem('FSLRulesInsertID')){
        // this.getRules();
        // }
        this.addWeekDaysForm = this.fb.group({
            start_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            end_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
        this.editWeekDaysForm = this.fb.group({
            uuid: ['', ''],
            start_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            end_day: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
        });
        this.addFSLRules = this.fb.group({
            name: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            numberoftimeframe: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            noofforwardinglocation_1: ['', ''],
            noofforwardinglocation_2: ['', ''],
            noofforwardinglocation_3: ['', ''],
            noofforwardinglocation_4: ['', ''],
            noofforwardinglocation_5: ['', ''],
            noofforwardinglocation_6: ['', ''],
            noofforwardinglocation_7: ['', ''],
            // Day 1
            day_0: ['', ''],
            start_time_0: ['', ''],
            end_time_0: ['', ''],
            PrimaryforwardType_0_day0: ['', ''],
            number_0_day0: ['', ''],
            ivrMenu_0_day0: ['', ''],
            sipAdd_0_day0: ['', ''],
            PrimaryforwardType_1_day0: ['', ''],
            number_1_day0: ['', ''],
            ivrMenu_1_day0: ['', ''],
            sipAdd_1_day0: ['', ''],
            PrimaryforwardType_2_day0: ['', ''],
            number_2_day0: ['', ''],
            ivrMenu_2_day0: ['', ''],
            sipAdd_2_day0: ['', ''],
            PrimaryforwardType_3_day0: ['', ''],
            number_3_day0: ['', ''],
            ivrMenu_3_day0: ['', ''],
            sipAdd_3_day0: ['', ''],
            PrimaryforwardType_4_day0: ['', ''],
            number_4_day0: ['', ''],
            ivrMenu_4_day0: ['', ''],
            sipAdd_4_day0: ['', ''],
            PrimaryforwardType_5_day0: ['', ''],
            number_5_day0: ['', ''],
            ivrMenu_5_day0: ['', ''],
            sipAdd_5_day0: ['', ''],
            PrimaryforwardType_6_day0: ['', ''],
            number_6_day0: ['', ''],
            ivrMenu_6_day0: ['', ''],
            sipAdd_6_day0: ['', ''],
            PrimaryforwardType_7_day0: ['', ''],
            number_7_day0: ['', ''],
            ivrMenu_7_day0: ['', ''],
            sipAdd_7_day0: ['', ''],
            PrimaryforwardType_8_day0: ['', ''],
            number_8_day0: ['', ''],
            ivrMenu_8_day0: ['', ''],
            sipAdd_8_day0: ['', ''],
            PrimaryforwardType_9_day0: ['', ''],
            number_9_day0: ['', ''],
            ivrMenu_9_day0: ['', ''],
            sipAdd_9_day0: ['', ''],
            // Day2
            day_1: ['', ''],
            start_time_1: ['', ''],
            end_time_1: ['', ''],
            PrimaryforwardType_0_day1: ['', ''],
            number_0_day1: ['', ''],
            ivrMenu_0_day1: ['', ''],
            sipAdd_0_day1: ['', ''],
            PrimaryforwardType_1_day1: ['', ''],
            number_1_day1: ['', ''],
            ivrMenu_1_day1: ['', ''],
            sipAdd_1_day1: ['', ''],
            PrimaryforwardType_2_day1: ['', ''],
            number_2_day1: ['', ''],
            ivrMenu_2_day1: ['', ''],
            sipAdd_2_day1: ['', ''],
            PrimaryforwardType_3_day1: ['', ''],
            number_3_day1: ['', ''],
            ivrMenu_3_day1: ['', ''],
            sipAdd_3_day1: ['', ''],
            PrimaryforwardType_4_day1: ['', ''],
            number_4_day1: ['', ''],
            ivrMenu_4_day1: ['', ''],
            sipAdd_4_day1: ['', ''],
            PrimaryforwardType_5_day1: ['', ''],
            number_5_day1: ['', ''],
            ivrMenu_5_day1: ['', ''],
            sipAdd_5_day1: ['', ''],
            PrimaryforwardType_6_day1: ['', ''],
            number_6_day1: ['', ''],
            ivrMenu_6_day1: ['', ''],
            sipAdd_6_day1: ['', ''],
            PrimaryforwardType_7_day1: ['', ''],
            number_7_day1: ['', ''],
            ivrMenu_7_day1: ['', ''],
            sipAdd_7_day1: ['', ''],
            PrimaryforwardType_8_day1: ['', ''],
            number_8_day1: ['', ''],
            ivrMenu_8_day1: ['', ''],
            sipAdd_8_day1: ['', ''],
            PrimaryforwardType_9_day1: ['', ''],
            number_9_day1: ['', ''],
            ivrMenu_9_day1: ['', ''],
            sipAdd_9_day1: ['', ''],
            // Day3
            day_2: ['', ''],
            start_time_2: ['', ''],
            end_time_2: ['', ''],
            PrimaryforwardType_0_day2: ['', ''],
            number_0_day2: ['', ''],
            ivrMenu_0_day2: ['', ''],
            sipAdd_0_day2: ['', ''],
            PrimaryforwardType_1_day2: ['', ''],
            number_1_day2: ['', ''],
            ivrMenu_1_day2: ['', ''],
            sipAdd_1_day2: ['', ''],
            PrimaryforwardType_2_day2: ['', ''],
            number_2_day2: ['', ''],
            ivrMenu_2_day2: ['', ''],
            sipAdd_2_day2: ['', ''],
            PrimaryforwardType_3_day2: ['', ''],
            number_3_day2: ['', ''],
            ivrMenu_3_day2: ['', ''],
            sipAdd_3_day2: ['', ''],
            PrimaryforwardType_4_day2: ['', ''],
            number_4_day2: ['', ''],
            ivrMenu_4_day2: ['', ''],
            sipAdd_4_day2: ['', ''],
            PrimaryforwardType_5_day2: ['', ''],
            number_5_day2: ['', ''],
            ivrMenu_5_day2: ['', ''],
            sipAdd_5_day2: ['', ''],
            PrimaryforwardType_6_day2: ['', ''],
            number_6_day2: ['', ''],
            ivrMenu_6_day2: ['', ''],
            sipAdd_6_day2: ['', ''],
            PrimaryforwardType_7_day2: ['', ''],
            number_7_day2: ['', ''],
            ivrMenu_7_day2: ['', ''],
            sipAdd_7_day2: ['', ''],
            PrimaryforwardType_8_day2: ['', ''],
            number_8_day2: ['', ''],
            ivrMenu_8_day2: ['', ''],
            sipAdd_8_day2: ['', ''],
            PrimaryforwardType_9_day2: ['', ''],
            number_9_day2: ['', ''],
            ivrMenu_9_day2: ['', ''],
            sipAdd_9_day2: ['', ''],
            // Day4
            day_3: ['', ''],
            start_time_3: ['', ''],
            end_time_3: ['', ''],
            PrimaryforwardType_0_day3: ['', ''],
            number_0_day3: ['', ''],
            ivrMenu_0_day3: ['', ''],
            sipAdd_0_day3: ['', ''],
            PrimaryforwardType_1_day3: ['', ''],
            number_1_day3: ['', ''],
            ivrMenu_1_day3: ['', ''],
            sipAdd_1_day3: ['', ''],
            PrimaryforwardType_2_day3: ['', ''],
            number_2_day3: ['', ''],
            ivrMenu_2_day3: ['', ''],
            sipAdd_2_day3: ['', ''],
            PrimaryforwardType_3_day3: ['', ''],
            number_3_day3: ['', ''],
            ivrMenu_3_day3: ['', ''],
            sipAdd_3_day3: ['', ''],
            PrimaryforwardType_4_day3: ['', ''],
            number_4_day3: ['', ''],
            ivrMenu_4_day3: ['', ''],
            sipAdd_4_day3: ['', ''],
            PrimaryforwardType_5_day3: ['', ''],
            number_5_day3: ['', ''],
            ivrMenu_5_day3: ['', ''],
            sipAdd_5_day3: ['', ''],
            PrimaryforwardType_6_day3: ['', ''],
            number_6_day3: ['', ''],
            ivrMenu_6_day3: ['', ''],
            sipAdd_6_day3: ['', ''],
            PrimaryforwardType_7_day3: ['', ''],
            number_7_day3: ['', ''],
            ivrMenu_7_day3: ['', ''],
            sipAdd_7_day3: ['', ''],
            PrimaryforwardType_8_day3: ['', ''],
            number_8_day3: ['', ''],
            ivrMenu_8_day3: ['', ''],
            sipAdd_8_day3: ['', ''],
            PrimaryforwardType_9_day3: ['', ''],
            number_9_day3: ['', ''],
            ivrMenu_9_day3: ['', ''],
            sipAdd_9_day3: ['', ''],
            // Day5
            day_4: ['', ''],
            start_time_4: ['', ''],
            end_time_4: ['', ''],
            PrimaryforwardType_0_day4: ['', ''],
            number_0_day4: ['', ''],
            ivrMenu_0_day4: ['', ''],
            sipAdd_0_day4: ['', ''],
            PrimaryforwardType_1_day4: ['', ''],
            number_1_day4: ['', ''],
            ivrMenu_1_day4: ['', ''],
            sipAdd_1_day4: ['', ''],
            PrimaryforwardType_2_day4: ['', ''],
            number_2_day4: ['', ''],
            ivrMenu_2_day4: ['', ''],
            sipAdd_2_day4: ['', ''],
            PrimaryforwardType_3_day4: ['', ''],
            number_3_day4: ['', ''],
            ivrMenu_3_day4: ['', ''],
            sipAdd_3_day4: ['', ''],
            PrimaryforwardType_4_day4: ['', ''],
            number_4_day4: ['', ''],
            ivrMenu_4_day4: ['', ''],
            sipAdd_4_day4: ['', ''],
            PrimaryforwardType_5_day4: ['', ''],
            number_5_day4: ['', ''],
            ivrMenu_5_day4: ['', ''],
            sipAdd_5_day4: ['', ''],
            PrimaryforwardType_6_day4: ['', ''],
            number_6_day4: ['', ''],
            ivrMenu_6_day4: ['', ''],
            sipAdd_6_day4: ['', ''],
            PrimaryforwardType_7_day4: ['', ''],
            number_7_day4: ['', ''],
            ivrMenu_7_day4: ['', ''],
            sipAdd_7_day4: ['', ''],
            PrimaryforwardType_8_day4: ['', ''],
            number_8_day4: ['', ''],
            ivrMenu_8_day4: ['', ''],
            sipAdd_8_day4: ['', ''],
            PrimaryforwardType_9_day4: ['', ''],
            number_9_day4: ['', ''],
            ivrMenu_9_day4: ['', ''],
            sipAdd_9_day4: ['', ''],
            // Day6
            day_5: ['', ''],
            start_time_5: ['', ''],
            end_time_5: ['', ''],
            PrimaryforwardType_0_day5: ['', ''],
            number_0_day5: ['', ''],
            ivrMenu_0_day5: ['', ''],
            sipAdd_0_day5: ['', ''],
            PrimaryforwardType_1_day5: ['', ''],
            number_1_day5: ['', ''],
            ivrMenu_1_day5: ['', ''],
            sipAdd_1_day5: ['', ''],
            PrimaryforwardType_2_day5: ['', ''],
            number_2_day5: ['', ''],
            ivrMenu_2_day5: ['', ''],
            sipAdd_2_day5: ['', ''],
            PrimaryforwardType_3_day5: ['', ''],
            number_3_day5: ['', ''],
            ivrMenu_3_day5: ['', ''],
            sipAdd_3_day5: ['', ''],
            PrimaryforwardType_4_day5: ['', ''],
            number_4_day5: ['', ''],
            ivrMenu_4_day5: ['', ''],
            sipAdd_4_day5: ['', ''],
            PrimaryforwardType_5_day5: ['', ''],
            number_5_day5: ['', ''],
            ivrMenu_5_day5: ['', ''],
            sipAdd_5_day5: ['', ''],
            PrimaryforwardType_6_day5: ['', ''],
            number_6_day5: ['', ''],
            ivrMenu_6_day5: ['', ''],
            sipAdd_6_day5: ['', ''],
            PrimaryforwardType_7_day5: ['', ''],
            number_7_day5: ['', ''],
            ivrMenu_7_day5: ['', ''],
            sipAdd_7_day5: ['', ''],
            PrimaryforwardType_8_day5: ['', ''],
            number_8_day5: ['', ''],
            ivrMenu_8_day5: ['', ''],
            sipAdd_8_day5: ['', ''],
            PrimaryforwardType_9_day5: ['', ''],
            number_9_day5: ['', ''],
            ivrMenu_9_day5: ['', ''],
            sipAdd_9_day5: ['', ''],
            // Day7
            day_6: ['', ''],
            start_time_6: ['', ''],
            end_time_6: ['', ''],
            PrimaryforwardType_0_day6: ['', ''],
            number_0_day6: ['', ''],
            ivrMenu_0_day6: ['', ''],
            sipAdd_0_day6: ['', ''],
            PrimaryforwardType_1_day6: ['', ''],
            number_1_day6: ['', ''],
            ivrMenu_1_day6: ['', ''],
            sipAdd_1_day6: ['', ''],
            PrimaryforwardType_2_day6: ['', ''],
            number_2_day6: ['', ''],
            ivrMenu_2_day6: ['', ''],
            sipAdd_2_day6: ['', ''],
            PrimaryforwardType_3_day6: ['', ''],
            number_3_day6: ['', ''],
            ivrMenu_3_day6: ['', ''],
            sipAdd_3_day6: ['', ''],
            PrimaryforwardType_4_day6: ['', ''],
            number_4_day6: ['', ''],
            ivrMenu_4_day6: ['', ''],
            sipAdd_4_day6: ['', ''],
            PrimaryforwardType_5_day6: ['', ''],
            number_5_day6: ['', ''],
            ivrMenu_5_day6: ['', ''],
            sipAdd_5_day6: ['', ''],
            PrimaryforwardType_6_day6: ['', ''],
            number_6_day6: ['', ''],
            ivrMenu_6_day6: ['', ''],
            sipAdd_6_day6: ['', ''],
            PrimaryforwardType_7_day6: ['', ''],
            number_7_day6: ['', ''],
            ivrMenu_7_day6: ['', ''],
            sipAdd_7_day6: ['', ''],
            PrimaryforwardType_8_day6: ['', ''],
            number_8_day6: ['', ''],
            ivrMenu_8_day6: ['', ''],
            sipAdd_8_day6: ['', ''],
            PrimaryforwardType_9_day6: ['', ''],
            number_9_day6: ['', ''],
            ivrMenu_9_day6: ['', ''],
            sipAdd_9_day6: ['', ''],
        });
        this.editFSLRules = this.fb.group({
            rulename: ['', ''],
            numberoftimeframe: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__["Validators"].required],
            noofforwardinglocation_1: ['', ''],
            noofforwardinglocation_2: ['', ''],
            noofforwardinglocation_3: ['', ''],
            noofforwardinglocation_4: ['', ''],
            noofforwardinglocation_5: ['', ''],
            noofforwardinglocation_6: ['', ''],
            noofforwardinglocation_7: ['', ''],
            // Day 1
            day_0: ['', ''],
            start_time_0: ['', ''],
            end_time_0: ['', ''],
            PrimaryforwardType_0_day0: ['', ''],
            number_0_day0: ['', ''],
            ivrMenu_0_day0: ['', ''],
            sipAdd_0_day0: ['', ''],
            PrimaryforwardType_1_day0: ['', ''],
            number_1_day0: ['', ''],
            ivrMenu_1_day0: ['', ''],
            sipAdd_1_day0: ['', ''],
            PrimaryforwardType_2_day0: ['', ''],
            number_2_day0: ['', ''],
            ivrMenu_2_day0: ['', ''],
            sipAdd_2_day0: ['', ''],
            PrimaryforwardType_3_day0: ['', ''],
            number_3_day0: ['', ''],
            ivrMenu_3_day0: ['', ''],
            sipAdd_3_day0: ['', ''],
            PrimaryforwardType_4_day0: ['', ''],
            number_4_day0: ['', ''],
            ivrMenu_4_day0: ['', ''],
            sipAdd_4_day0: ['', ''],
            PrimaryforwardType_5_day0: ['', ''],
            number_5_day0: ['', ''],
            ivrMenu_5_day0: ['', ''],
            sipAdd_5_day0: ['', ''],
            PrimaryforwardType_6_day0: ['', ''],
            number_6_day0: ['', ''],
            ivrMenu_6_day0: ['', ''],
            sipAdd_6_day0: ['', ''],
            PrimaryforwardType_7_day0: ['', ''],
            number_7_day0: ['', ''],
            ivrMenu_7_day0: ['', ''],
            sipAdd_7_day0: ['', ''],
            PrimaryforwardType_8_day0: ['', ''],
            number_8_day0: ['', ''],
            ivrMenu_8_day0: ['', ''],
            sipAdd_8_day0: ['', ''],
            PrimaryforwardType_9_day0: ['', ''],
            number_9_day0: ['', ''],
            ivrMenu_9_day0: ['', ''],
            sipAdd_9_day0: ['', ''],
            // Day2
            day_1: ['', ''],
            start_time_1: ['', ''],
            end_time_1: ['', ''],
            PrimaryforwardType_0_day1: ['', ''],
            number_0_day1: ['', ''],
            ivrMenu_0_day1: ['', ''],
            sipAdd_0_day1: ['', ''],
            PrimaryforwardType_1_day1: ['', ''],
            number_1_day1: ['', ''],
            ivrMenu_1_day1: ['', ''],
            sipAdd_1_day1: ['', ''],
            PrimaryforwardType_2_day1: ['', ''],
            number_2_day1: ['', ''],
            ivrMenu_2_day1: ['', ''],
            sipAdd_2_day1: ['', ''],
            PrimaryforwardType_3_day1: ['', ''],
            number_3_day1: ['', ''],
            ivrMenu_3_day1: ['', ''],
            sipAdd_3_day1: ['', ''],
            PrimaryforwardType_4_day1: ['', ''],
            number_4_day1: ['', ''],
            ivrMenu_4_day1: ['', ''],
            sipAdd_4_day1: ['', ''],
            PrimaryforwardType_5_day1: ['', ''],
            number_5_day1: ['', ''],
            ivrMenu_5_day1: ['', ''],
            sipAdd_5_day1: ['', ''],
            PrimaryforwardType_6_day1: ['', ''],
            number_6_day1: ['', ''],
            ivrMenu_6_day1: ['', ''],
            sipAdd_6_day1: ['', ''],
            PrimaryforwardType_7_day1: ['', ''],
            number_7_day1: ['', ''],
            ivrMenu_7_day1: ['', ''],
            sipAdd_7_day1: ['', ''],
            PrimaryforwardType_8_day1: ['', ''],
            number_8_day1: ['', ''],
            ivrMenu_8_day1: ['', ''],
            sipAdd_8_day1: ['', ''],
            PrimaryforwardType_9_day1: ['', ''],
            number_9_day1: ['', ''],
            ivrMenu_9_day1: ['', ''],
            sipAdd_9_day1: ['', ''],
            // Day3
            day_2: ['', ''],
            start_time_2: ['', ''],
            end_time_2: ['', ''],
            PrimaryforwardType_0_day2: ['', ''],
            number_0_day2: ['', ''],
            ivrMenu_0_day2: ['', ''],
            sipAdd_0_day2: ['', ''],
            PrimaryforwardType_1_day2: ['', ''],
            number_1_day2: ['', ''],
            ivrMenu_1_day2: ['', ''],
            sipAdd_1_day2: ['', ''],
            PrimaryforwardType_2_day2: ['', ''],
            number_2_day2: ['', ''],
            ivrMenu_2_day2: ['', ''],
            sipAdd_2_day2: ['', ''],
            PrimaryforwardType_3_day2: ['', ''],
            number_3_day2: ['', ''],
            ivrMenu_3_day2: ['', ''],
            sipAdd_3_day2: ['', ''],
            PrimaryforwardType_4_day2: ['', ''],
            number_4_day2: ['', ''],
            ivrMenu_4_day2: ['', ''],
            sipAdd_4_day2: ['', ''],
            PrimaryforwardType_5_day2: ['', ''],
            number_5_day2: ['', ''],
            ivrMenu_5_day2: ['', ''],
            sipAdd_5_day2: ['', ''],
            PrimaryforwardType_6_day2: ['', ''],
            number_6_day2: ['', ''],
            ivrMenu_6_day2: ['', ''],
            sipAdd_6_day2: ['', ''],
            PrimaryforwardType_7_day2: ['', ''],
            number_7_day2: ['', ''],
            ivrMenu_7_day2: ['', ''],
            sipAdd_7_day2: ['', ''],
            PrimaryforwardType_8_day2: ['', ''],
            number_8_day2: ['', ''],
            ivrMenu_8_day2: ['', ''],
            sipAdd_8_day2: ['', ''],
            PrimaryforwardType_9_day2: ['', ''],
            number_9_day2: ['', ''],
            ivrMenu_9_day2: ['', ''],
            sipAdd_9_day2: ['', ''],
            // Day4
            day_3: ['', ''],
            start_time_3: ['', ''],
            end_time_3: ['', ''],
            PrimaryforwardType_0_day3: ['', ''],
            number_0_day3: ['', ''],
            ivrMenu_0_day3: ['', ''],
            sipAdd_0_day3: ['', ''],
            PrimaryforwardType_1_day3: ['', ''],
            number_1_day3: ['', ''],
            ivrMenu_1_day3: ['', ''],
            sipAdd_1_day3: ['', ''],
            PrimaryforwardType_2_day3: ['', ''],
            number_2_day3: ['', ''],
            ivrMenu_2_day3: ['', ''],
            sipAdd_2_day3: ['', ''],
            PrimaryforwardType_3_day3: ['', ''],
            number_3_day3: ['', ''],
            ivrMenu_3_day3: ['', ''],
            sipAdd_3_day3: ['', ''],
            PrimaryforwardType_4_day3: ['', ''],
            number_4_day3: ['', ''],
            ivrMenu_4_day3: ['', ''],
            sipAdd_4_day3: ['', ''],
            PrimaryforwardType_5_day3: ['', ''],
            number_5_day3: ['', ''],
            ivrMenu_5_day3: ['', ''],
            sipAdd_5_day3: ['', ''],
            PrimaryforwardType_6_day3: ['', ''],
            number_6_day3: ['', ''],
            ivrMenu_6_day3: ['', ''],
            sipAdd_6_day3: ['', ''],
            PrimaryforwardType_7_day3: ['', ''],
            number_7_day3: ['', ''],
            ivrMenu_7_day3: ['', ''],
            sipAdd_7_day3: ['', ''],
            PrimaryforwardType_8_day3: ['', ''],
            number_8_day3: ['', ''],
            ivrMenu_8_day3: ['', ''],
            sipAdd_8_day3: ['', ''],
            PrimaryforwardType_9_day3: ['', ''],
            number_9_day3: ['', ''],
            ivrMenu_9_day3: ['', ''],
            sipAdd_9_day3: ['', ''],
            // Day5
            day_4: ['', ''],
            start_time_4: ['', ''],
            end_time_4: ['', ''],
            PrimaryforwardType_0_day4: ['', ''],
            number_0_day4: ['', ''],
            ivrMenu_0_day4: ['', ''],
            sipAdd_0_day4: ['', ''],
            PrimaryforwardType_1_day4: ['', ''],
            number_1_day4: ['', ''],
            ivrMenu_1_day4: ['', ''],
            sipAdd_1_day4: ['', ''],
            PrimaryforwardType_2_day4: ['', ''],
            number_2_day4: ['', ''],
            ivrMenu_2_day4: ['', ''],
            sipAdd_2_day4: ['', ''],
            PrimaryforwardType_3_day4: ['', ''],
            number_3_day4: ['', ''],
            ivrMenu_3_day4: ['', ''],
            sipAdd_3_day4: ['', ''],
            PrimaryforwardType_4_day4: ['', ''],
            number_4_day4: ['', ''],
            ivrMenu_4_day4: ['', ''],
            sipAdd_4_day4: ['', ''],
            PrimaryforwardType_5_day4: ['', ''],
            number_5_day4: ['', ''],
            ivrMenu_5_day4: ['', ''],
            sipAdd_5_day4: ['', ''],
            PrimaryforwardType_6_day4: ['', ''],
            number_6_day4: ['', ''],
            ivrMenu_6_day4: ['', ''],
            sipAdd_6_day4: ['', ''],
            PrimaryforwardType_7_day4: ['', ''],
            number_7_day4: ['', ''],
            ivrMenu_7_day4: ['', ''],
            sipAdd_7_day4: ['', ''],
            PrimaryforwardType_8_day4: ['', ''],
            number_8_day4: ['', ''],
            ivrMenu_8_day4: ['', ''],
            sipAdd_8_day4: ['', ''],
            PrimaryforwardType_9_day4: ['', ''],
            number_9_day4: ['', ''],
            ivrMenu_9_day4: ['', ''],
            sipAdd_9_day4: ['', ''],
            // Day6
            day_5: ['', ''],
            start_time_5: ['', ''],
            end_time_5: ['', ''],
            PrimaryforwardType_0_day5: ['', ''],
            number_0_day5: ['', ''],
            ivrMenu_0_day5: ['', ''],
            sipAdd_0_day5: ['', ''],
            PrimaryforwardType_1_day5: ['', ''],
            number_1_day5: ['', ''],
            ivrMenu_1_day5: ['', ''],
            sipAdd_1_day5: ['', ''],
            PrimaryforwardType_2_day5: ['', ''],
            number_2_day5: ['', ''],
            ivrMenu_2_day5: ['', ''],
            sipAdd_2_day5: ['', ''],
            PrimaryforwardType_3_day5: ['', ''],
            number_3_day5: ['', ''],
            ivrMenu_3_day5: ['', ''],
            sipAdd_3_day5: ['', ''],
            PrimaryforwardType_4_day5: ['', ''],
            number_4_day5: ['', ''],
            ivrMenu_4_day5: ['', ''],
            sipAdd_4_day5: ['', ''],
            PrimaryforwardType_5_day5: ['', ''],
            number_5_day5: ['', ''],
            ivrMenu_5_day5: ['', ''],
            sipAdd_5_day5: ['', ''],
            PrimaryforwardType_6_day5: ['', ''],
            number_6_day5: ['', ''],
            ivrMenu_6_day5: ['', ''],
            sipAdd_6_day5: ['', ''],
            PrimaryforwardType_7_day5: ['', ''],
            number_7_day5: ['', ''],
            ivrMenu_7_day5: ['', ''],
            sipAdd_7_day5: ['', ''],
            PrimaryforwardType_8_day5: ['', ''],
            number_8_day5: ['', ''],
            ivrMenu_8_day5: ['', ''],
            sipAdd_8_day5: ['', ''],
            PrimaryforwardType_9_day5: ['', ''],
            number_9_day5: ['', ''],
            ivrMenu_9_day5: ['', ''],
            sipAdd_9_day5: ['', ''],
            // Day7
            day_6: ['', ''],
            start_time_6: ['', ''],
            end_time_6: ['', ''],
            PrimaryforwardType_0_day6: ['', ''],
            number_0_day6: ['', ''],
            ivrMenu_0_day6: ['', ''],
            sipAdd_0_day6: ['', ''],
            PrimaryforwardType_1_day6: ['', ''],
            number_1_day6: ['', ''],
            ivrMenu_1_day6: ['', ''],
            sipAdd_1_day6: ['', ''],
            PrimaryforwardType_2_day6: ['', ''],
            number_2_day6: ['', ''],
            ivrMenu_2_day6: ['', ''],
            sipAdd_2_day6: ['', ''],
            PrimaryforwardType_3_day6: ['', ''],
            number_3_day6: ['', ''],
            ivrMenu_3_day6: ['', ''],
            sipAdd_3_day6: ['', ''],
            PrimaryforwardType_4_day6: ['', ''],
            number_4_day6: ['', ''],
            ivrMenu_4_day6: ['', ''],
            sipAdd_4_day6: ['', ''],
            PrimaryforwardType_5_day6: ['', ''],
            number_5_day6: ['', ''],
            ivrMenu_5_day6: ['', ''],
            sipAdd_5_day6: ['', ''],
            PrimaryforwardType_6_day6: ['', ''],
            number_6_day6: ['', ''],
            ivrMenu_6_day6: ['', ''],
            sipAdd_6_day6: ['', ''],
            PrimaryforwardType_7_day6: ['', ''],
            number_7_day6: ['', ''],
            ivrMenu_7_day6: ['', ''],
            sipAdd_7_day6: ['', ''],
            PrimaryforwardType_8_day6: ['', ''],
            number_8_day6: ['', ''],
            ivrMenu_8_day6: ['', ''],
            sipAdd_8_day6: ['', ''],
            PrimaryforwardType_9_day6: ['', ''],
            number_9_day6: ['', ''],
            ivrMenu_9_day6: ['', ''],
            sipAdd_9_day6: ['', ''],
        });
    }
    loadweekdays() {
        if ($.fn.DataTable.isDataTable(this.daysTable.nativeElement)) {
            $(this.daysTable.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "order": [[1, "desc"]],
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getallweekdays/' + this.currentCompany.uuid, dataTablesParameters, {}).subscribe(resp => {
                    // console.log(resp);return false;
                    this.days = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "start_day" }, { data: "end_day" }, { data: "created_at" }, { data: "action" },
            ],
        };
        this.daysdataTable = $(this.daysTable.nativeElement);
        this.daysdataTable.dataTable(this.dtOptions);
    }
    closeModal() {
        if (this.noofforwarding) {
            $("#addFSLRules").modal("hide");
            setTimeout(() => {
                this.FSLRulesSubmitted = false;
                this.addFSLRules.reset();
                this.isName = "";
                this.getAllRules();
            }, 2000);
        }
    }
    addweekcloseModal() {
        if (this.addWeekDaysForm.get('start_day').value && this.addWeekDaysForm.get('end_day').value) {
            $("#addWeekDays").modal("hide");
            setTimeout(() => {
                this.daysSubmitted = false;
                this.addWeekDaysForm.reset({
                    'start_day': '',
                    'end_day': ''
                });
            }, 2000);
        }
    }
    editweekcloseModal() {
        if (this.editWeekDaysForm.get('start_day').value && this.editWeekDaysForm.get('end_day').value) {
            $("#editweekdays").modal("hide");
            setTimeout(() => {
            }, 2000);
        }
    }
    loadallweekdays() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.loadallweekdays(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            this.allweekdays = res.data;
        }, error => this.error = error);
    }
    getAllRules() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getAllRules(this.currentCompany.uuid).subscribe(res => {
            //  console.log(res); return false;  
            this.allRulesData = res;
        }, error => this.error = error);
    }
    getAllLabels() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getAllLabels(this.currentCompany.uuid).subscribe(res => {
            this.dropdownList = res;
        }, error => this.error = error);
    }
    getRulesByName(name) {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getRulesByName(name, this.currentCompany.uuid).subscribe(res => {
            this.allRulesbyname = res;
        }, error => this.error = error);
    }
    _keyPress(event) {
        const isNumericInput = (event) => {
            const key = event.keyCode;
            return ((key >= 48 && key <= 57) || // Allow number line
                (key >= 96 && key <= 105) // Allow number pad
            );
        };
        const isModifierKey = (event) => {
            const key = event.keyCode;
            return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
                (key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
                (key > 36 && key < 41) || // Allow left, up, right, down
                (
                // Allow Ctrl/Command + A,C,V,X,Z
                (event.ctrlKey === true || event.metaKey === true) &&
                    (key === 65 || key === 67 || key === 86 || key === 88 || key === 90));
        };
        const enforceFormat = (event) => {
            // Input must be of a valid number format or a modifier key, and not longer than ten digits
            if (!isNumericInput(event) && !isModifierKey(event)) {
                event.preventDefault();
            }
        };
        const formatToPhone = (event) => {
            if (isModifierKey(event)) {
                return;
            }
            const target = event.target;
            const input = event.target.value.replace(/\D/g, '').substring(0, 10); // First ten digits of input only
            const zip = input.substring(0, 3);
            const middle = input.substring(3, 6);
            const last = input.substring(6, 10);
            if (input.length > 6) {
                target.value = `(${zip}) ${middle}-${last}`;
            }
            else if (input.length > 3) {
                target.value = `(${zip}) ${middle}`;
            }
            else if (input.length > 0) {
                target.value = `(${zip}`;
            }
        };
        const inputElement = document.getElementById('number');
        const number_0_day0 = document.getElementById('number_0_day0');
        const number_1_day0 = document.getElementById('number_1_day0');
        const number_2_day0 = document.getElementById('number_2_day0');
        const number_3_day0 = document.getElementById('number_3_day0');
        const number_4_day0 = document.getElementById('number_4_day0');
        const number_5_day0 = document.getElementById('number_5_day0');
        const number_6_day0 = document.getElementById('number_6_day0');
        const number_7_day0 = document.getElementById('number_7_day0');
        const number_8_day0 = document.getElementById('number_8_day0');
        const number_9_day0 = document.getElementById('number_9_day0');
        const number_0_day1 = document.getElementById('number_0_day1');
        const number_1_day1 = document.getElementById('number_1_day1');
        const number_2_day1 = document.getElementById('number_2_day1');
        const number_3_day1 = document.getElementById('number_3_day1');
        const number_4_day1 = document.getElementById('number_4_day1');
        const number_5_day1 = document.getElementById('number_5_day1');
        const number_6_day1 = document.getElementById('number_6_day1');
        const number_7_day1 = document.getElementById('number_7_day1');
        const number_8_day1 = document.getElementById('number_8_day1');
        const number_9_day1 = document.getElementById('number_9_day1');
        const number_0_day2 = document.getElementById('number_0_day2');
        const number_1_day2 = document.getElementById('number_1_day2');
        const number_2_day2 = document.getElementById('number_2_day2');
        const number_3_day2 = document.getElementById('number_3_day2');
        const number_4_day2 = document.getElementById('number_4_day2');
        const number_5_day2 = document.getElementById('number_5_day2');
        const number_6_day2 = document.getElementById('number_6_day2');
        const number_7_day2 = document.getElementById('number_7_day2');
        const number_8_day2 = document.getElementById('number_8_day2');
        const number_9_day2 = document.getElementById('number_9_day2');
        const number_0_day3 = document.getElementById('number_0_day3');
        const number_1_day3 = document.getElementById('number_1_day3');
        const number_2_day3 = document.getElementById('number_2_day3');
        const number_3_day3 = document.getElementById('number_3_day3');
        const number_4_day3 = document.getElementById('number_4_day3');
        const number_5_day3 = document.getElementById('number_5_day3');
        const number_6_day3 = document.getElementById('number_6_day3');
        const number_7_day3 = document.getElementById('number_7_day3');
        const number_8_day3 = document.getElementById('number_8_day3');
        const number_9_day3 = document.getElementById('number_9_day3');
        const number_0_day4 = document.getElementById('number_0_day4');
        const number_1_day4 = document.getElementById('number_1_day4');
        const number_2_day4 = document.getElementById('number_2_day4');
        const number_3_day4 = document.getElementById('number_3_day4');
        const number_4_day4 = document.getElementById('number_4_day4');
        const number_5_day4 = document.getElementById('number_5_day4');
        const number_6_day4 = document.getElementById('number_6_day4');
        const number_7_day4 = document.getElementById('number_7_day4');
        const number_8_day4 = document.getElementById('number_8_day4');
        const number_9_day4 = document.getElementById('number_9_day4');
        const number_0_day5 = document.getElementById('number_0_day5');
        const number_1_day5 = document.getElementById('number_1_day5');
        const number_2_day5 = document.getElementById('number_2_day5');
        const number_3_day5 = document.getElementById('number_3_day5');
        const number_4_day5 = document.getElementById('number_4_day5');
        const number_5_day5 = document.getElementById('number_5_day5');
        const number_6_day5 = document.getElementById('number_6_day5');
        const number_7_day5 = document.getElementById('number_7_day5');
        const number_8_day5 = document.getElementById('number_8_day5');
        const number_9_day5 = document.getElementById('number_9_day5');
        const number_0_day6 = document.getElementById('number_0_day6');
        const number_1_day6 = document.getElementById('number_1_day6');
        const number_2_day6 = document.getElementById('number_2_day6');
        const number_3_day6 = document.getElementById('number_3_day6');
        const number_4_day6 = document.getElementById('number_4_day6');
        const number_5_day6 = document.getElementById('number_5_day6');
        const number_6_day6 = document.getElementById('number_6_day6');
        const number_7_day6 = document.getElementById('number_7_day6');
        const number_8_day6 = document.getElementById('number_8_day6');
        const number_9_day6 = document.getElementById('number_9_day6');
        if (inputElement) {
            inputElement.addEventListener('keydown', enforceFormat);
            inputElement.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day0) {
            number_0_day0.addEventListener('keydown', enforceFormat);
            number_0_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day0) {
            number_1_day0.addEventListener('keydown', enforceFormat);
            number_1_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day0) {
            number_2_day0.addEventListener('keydown', enforceFormat);
            number_2_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day0) {
            number_3_day0.addEventListener('keydown', enforceFormat);
            number_3_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day0) {
            number_4_day0.addEventListener('keydown', enforceFormat);
            number_4_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day0) {
            number_5_day0.addEventListener('keydown', enforceFormat);
            number_5_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day0) {
            number_6_day0.addEventListener('keydown', enforceFormat);
            number_6_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day0) {
            number_7_day0.addEventListener('keydown', enforceFormat);
            number_7_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day0) {
            number_8_day0.addEventListener('keydown', enforceFormat);
            number_8_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day0) {
            number_9_day0.addEventListener('keydown', enforceFormat);
            number_9_day0.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day1) {
            number_0_day1.addEventListener('keydown', enforceFormat);
            number_0_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day1) {
            number_1_day1.addEventListener('keydown', enforceFormat);
            number_1_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day1) {
            number_2_day1.addEventListener('keydown', enforceFormat);
            number_2_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day1) {
            number_3_day1.addEventListener('keydown', enforceFormat);
            number_3_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day1) {
            number_4_day1.addEventListener('keydown', enforceFormat);
            number_4_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day1) {
            number_5_day1.addEventListener('keydown', enforceFormat);
            number_5_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day1) {
            number_6_day1.addEventListener('keydown', enforceFormat);
            number_6_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day1) {
            number_7_day1.addEventListener('keydown', enforceFormat);
            number_7_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day1) {
            number_8_day1.addEventListener('keydown', enforceFormat);
            number_8_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day1) {
            number_9_day1.addEventListener('keydown', enforceFormat);
            number_9_day1.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day2) {
            number_0_day2.addEventListener('keydown', enforceFormat);
            number_0_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day2) {
            number_1_day2.addEventListener('keydown', enforceFormat);
            number_1_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day2) {
            number_2_day2.addEventListener('keydown', enforceFormat);
            number_2_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day2) {
            number_3_day2.addEventListener('keydown', enforceFormat);
            number_3_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day2) {
            number_4_day2.addEventListener('keydown', enforceFormat);
            number_4_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day2) {
            number_5_day2.addEventListener('keydown', enforceFormat);
            number_5_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day2) {
            number_6_day2.addEventListener('keydown', enforceFormat);
            number_6_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day2) {
            number_7_day2.addEventListener('keydown', enforceFormat);
            number_7_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day2) {
            number_8_day2.addEventListener('keydown', enforceFormat);
            number_8_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day2) {
            number_9_day2.addEventListener('keydown', enforceFormat);
            number_9_day2.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day3) {
            number_0_day3.addEventListener('keydown', enforceFormat);
            number_0_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day3) {
            number_1_day3.addEventListener('keydown', enforceFormat);
            number_1_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day3) {
            number_2_day3.addEventListener('keydown', enforceFormat);
            number_2_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day3) {
            number_3_day3.addEventListener('keydown', enforceFormat);
            number_3_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day3) {
            number_4_day3.addEventListener('keydown', enforceFormat);
            number_4_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day3) {
            number_5_day3.addEventListener('keydown', enforceFormat);
            number_5_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day3) {
            number_6_day3.addEventListener('keydown', enforceFormat);
            number_6_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day3) {
            number_7_day3.addEventListener('keydown', enforceFormat);
            number_7_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day3) {
            number_8_day3.addEventListener('keydown', enforceFormat);
            number_8_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day3) {
            number_9_day3.addEventListener('keydown', enforceFormat);
            number_9_day3.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day4) {
            number_0_day4.addEventListener('keydown', enforceFormat);
            number_0_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day4) {
            number_1_day4.addEventListener('keydown', enforceFormat);
            number_1_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day4) {
            number_2_day4.addEventListener('keydown', enforceFormat);
            number_2_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day4) {
            number_3_day4.addEventListener('keydown', enforceFormat);
            number_3_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day4) {
            number_4_day4.addEventListener('keydown', enforceFormat);
            number_4_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day4) {
            number_5_day4.addEventListener('keydown', enforceFormat);
            number_5_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day4) {
            number_6_day4.addEventListener('keydown', enforceFormat);
            number_6_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day4) {
            number_7_day4.addEventListener('keydown', enforceFormat);
            number_7_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day4) {
            number_8_day4.addEventListener('keydown', enforceFormat);
            number_8_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day4) {
            number_9_day4.addEventListener('keydown', enforceFormat);
            number_9_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day4) {
            number_0_day4.addEventListener('keydown', enforceFormat);
            number_0_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day4) {
            number_1_day4.addEventListener('keydown', enforceFormat);
            number_1_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day4) {
            number_2_day4.addEventListener('keydown', enforceFormat);
            number_2_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day4) {
            number_3_day4.addEventListener('keydown', enforceFormat);
            number_3_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day4) {
            number_4_day4.addEventListener('keydown', enforceFormat);
            number_4_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day4) {
            number_5_day4.addEventListener('keydown', enforceFormat);
            number_5_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day4) {
            number_6_day4.addEventListener('keydown', enforceFormat);
            number_6_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day4) {
            number_7_day4.addEventListener('keydown', enforceFormat);
            number_7_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day4) {
            number_8_day4.addEventListener('keydown', enforceFormat);
            number_8_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day4) {
            number_9_day4.addEventListener('keydown', enforceFormat);
            number_9_day4.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day5) {
            number_0_day5.addEventListener('keydown', enforceFormat);
            number_0_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day5) {
            number_1_day5.addEventListener('keydown', enforceFormat);
            number_1_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day5) {
            number_2_day5.addEventListener('keydown', enforceFormat);
            number_2_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day5) {
            number_3_day5.addEventListener('keydown', enforceFormat);
            number_3_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day5) {
            number_4_day5.addEventListener('keydown', enforceFormat);
            number_4_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day5) {
            number_5_day5.addEventListener('keydown', enforceFormat);
            number_5_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day5) {
            number_6_day5.addEventListener('keydown', enforceFormat);
            number_6_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day5) {
            number_7_day5.addEventListener('keydown', enforceFormat);
            number_7_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day5) {
            number_8_day5.addEventListener('keydown', enforceFormat);
            number_8_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day5) {
            number_9_day5.addEventListener('keydown', enforceFormat);
            number_9_day5.addEventListener('keyup', formatToPhone);
        }
        if (number_0_day6) {
            number_0_day6.addEventListener('keydown', enforceFormat);
            number_0_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_1_day6) {
            number_1_day6.addEventListener('keydown', enforceFormat);
            number_1_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_2_day6) {
            number_2_day6.addEventListener('keydown', enforceFormat);
            number_2_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_3_day6) {
            number_3_day6.addEventListener('keydown', enforceFormat);
            number_3_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_4_day6) {
            number_4_day6.addEventListener('keydown', enforceFormat);
            number_4_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_5_day6) {
            number_5_day6.addEventListener('keydown', enforceFormat);
            number_5_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_6_day6) {
            number_6_day6.addEventListener('keydown', enforceFormat);
            number_6_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_7_day6) {
            number_7_day6.addEventListener('keydown', enforceFormat);
            number_7_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_8_day6) {
            number_8_day6.addEventListener('keydown', enforceFormat);
            number_8_day6.addEventListener('keyup', formatToPhone);
        }
        if (number_9_day6) {
            number_9_day6.addEventListener('keydown', enforceFormat);
            number_9_day6.addEventListener('keyup', formatToPhone);
        }
        const editnumber_0_day0 = document.getElementById('editnumber_0_day0');
        const editnumber_1_day0 = document.getElementById('editnumber_1_day0');
        const editnumber_2_day0 = document.getElementById('editnumber_2_day0');
        const editnumber_3_day0 = document.getElementById('editnumber_3_day0');
        const editnumber_4_day0 = document.getElementById('editnumber_4_day0');
        const editnumber_5_day0 = document.getElementById('editnumber_5_day0');
        const editnumber_6_day0 = document.getElementById('editnumber_6_day0');
        const editnumber_7_day0 = document.getElementById('editnumber_7_day0');
        const editnumber_8_day0 = document.getElementById('editnumber_8_day0');
        const editnumber_9_day0 = document.getElementById('editnumber_9_day0');
        const editnumber_0_day1 = document.getElementById('editnumber_0_day1');
        const editnumber_1_day1 = document.getElementById('editnumber_1_day1');
        const editnumber_2_day1 = document.getElementById('editnumber_2_day1');
        const editnumber_3_day1 = document.getElementById('editnumber_3_day1');
        const editnumber_4_day1 = document.getElementById('editnumber_4_day1');
        const editnumber_5_day1 = document.getElementById('editnumber_5_day1');
        const editnumber_6_day1 = document.getElementById('editnumber_6_day1');
        const editnumber_7_day1 = document.getElementById('editnumber_7_day1');
        const editnumber_8_day1 = document.getElementById('editnumber_8_day1');
        const editnumber_9_day1 = document.getElementById('editnumber_9_day1');
        const editnumber_0_day2 = document.getElementById('editnumber_0_day2');
        const editnumber_1_day2 = document.getElementById('editnumber_1_day2');
        const editnumber_2_day2 = document.getElementById('editnumber_2_day2');
        const editnumber_3_day2 = document.getElementById('editnumber_3_day2');
        const editnumber_4_day2 = document.getElementById('editnumber_4_day2');
        const editnumber_5_day2 = document.getElementById('editnumber_5_day2');
        const editnumber_6_day2 = document.getElementById('editnumber_6_day2');
        const editnumber_7_day2 = document.getElementById('editnumber_7_day2');
        const editnumber_8_day2 = document.getElementById('editnumber_8_day2');
        const editnumber_9_day2 = document.getElementById('editnumber_9_day2');
        const editnumber_0_day3 = document.getElementById('editnumber_0_day3');
        const editnumber_1_day3 = document.getElementById('editnumber_1_day3');
        const editnumber_2_day3 = document.getElementById('editnumber_2_day3');
        const editnumber_3_day3 = document.getElementById('editnumber_3_day3');
        const editnumber_4_day3 = document.getElementById('editnumber_4_day3');
        const editnumber_5_day3 = document.getElementById('editnumber_5_day3');
        const editnumber_6_day3 = document.getElementById('editnumber_6_day3');
        const editnumber_7_day3 = document.getElementById('editnumber_7_day3');
        const editnumber_8_day3 = document.getElementById('editnumber_8_day3');
        const editnumber_9_day3 = document.getElementById('editnumber_9_day3');
        const editnumber_0_day4 = document.getElementById('editnumber_0_day4');
        const editnumber_1_day4 = document.getElementById('editnumber_1_day4');
        const editnumber_2_day4 = document.getElementById('editnumber_2_day4');
        const editnumber_3_day4 = document.getElementById('editnumber_3_day4');
        const editnumber_4_day4 = document.getElementById('editnumber_4_day4');
        const editnumber_5_day4 = document.getElementById('editnumber_5_day4');
        const editnumber_6_day4 = document.getElementById('editnumber_6_day4');
        const editnumber_7_day4 = document.getElementById('editnumber_7_day4');
        const editnumber_8_day4 = document.getElementById('editnumber_8_day4');
        const editnumber_9_day4 = document.getElementById('editnumber_9_day4');
        const editnumber_0_day5 = document.getElementById('editnumber_0_day5');
        const editnumber_1_day5 = document.getElementById('editnumber_1_day5');
        const editnumber_2_day5 = document.getElementById('editnumber_2_day5');
        const editnumber_3_day5 = document.getElementById('editnumber_3_day5');
        const editnumber_4_day5 = document.getElementById('editnumber_4_day5');
        const editnumber_5_day5 = document.getElementById('editnumber_5_day5');
        const editnumber_6_day5 = document.getElementById('editnumber_6_day5');
        const editnumber_7_day5 = document.getElementById('editnumber_7_day5');
        const editnumber_8_day5 = document.getElementById('editnumber_8_day5');
        const editnumber_9_day5 = document.getElementById('editnumber_9_day5');
        const editnumber_0_day6 = document.getElementById('editnumber_0_day6');
        const editnumber_1_day6 = document.getElementById('editnumber_1_day6');
        const editnumber_2_day6 = document.getElementById('editnumber_2_day6');
        const editnumber_3_day6 = document.getElementById('editnumber_3_day6');
        const editnumber_4_day6 = document.getElementById('editnumber_4_day6');
        const editnumber_5_day6 = document.getElementById('editnumber_5_day6');
        const editnumber_6_day6 = document.getElementById('editnumber_6_day6');
        const editnumber_7_day6 = document.getElementById('editnumber_7_day6');
        const editnumber_8_day6 = document.getElementById('editnumber_8_day6');
        const editnumber_9_day6 = document.getElementById('editnumber_9_day6');
        if (editnumber_0_day0) {
            editnumber_0_day0.addEventListener('keydown', enforceFormat);
            editnumber_0_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day0) {
            editnumber_1_day0.addEventListener('keydown', enforceFormat);
            editnumber_1_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day0) {
            editnumber_2_day0.addEventListener('keydown', enforceFormat);
            editnumber_2_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day0) {
            editnumber_3_day0.addEventListener('keydown', enforceFormat);
            editnumber_3_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day0) {
            editnumber_4_day0.addEventListener('keydown', enforceFormat);
            editnumber_4_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day0) {
            editnumber_5_day0.addEventListener('keydown', enforceFormat);
            editnumber_5_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day0) {
            editnumber_6_day0.addEventListener('keydown', enforceFormat);
            editnumber_6_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day0) {
            editnumber_7_day0.addEventListener('keydown', enforceFormat);
            editnumber_7_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day0) {
            editnumber_8_day0.addEventListener('keydown', enforceFormat);
            editnumber_8_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day0) {
            editnumber_9_day0.addEventListener('keydown', enforceFormat);
            editnumber_9_day0.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day1) {
            editnumber_0_day1.addEventListener('keydown', enforceFormat);
            editnumber_0_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day1) {
            editnumber_1_day1.addEventListener('keydown', enforceFormat);
            editnumber_1_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day1) {
            editnumber_2_day1.addEventListener('keydown', enforceFormat);
            editnumber_2_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day1) {
            editnumber_3_day1.addEventListener('keydown', enforceFormat);
            editnumber_3_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day1) {
            editnumber_4_day1.addEventListener('keydown', enforceFormat);
            editnumber_4_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day1) {
            editnumber_5_day1.addEventListener('keydown', enforceFormat);
            editnumber_5_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day1) {
            editnumber_6_day1.addEventListener('keydown', enforceFormat);
            editnumber_6_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day1) {
            editnumber_7_day1.addEventListener('keydown', enforceFormat);
            editnumber_7_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day1) {
            editnumber_8_day1.addEventListener('keydown', enforceFormat);
            editnumber_8_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day1) {
            editnumber_9_day1.addEventListener('keydown', enforceFormat);
            editnumber_9_day1.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day2) {
            editnumber_0_day2.addEventListener('keydown', enforceFormat);
            editnumber_0_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day2) {
            editnumber_1_day2.addEventListener('keydown', enforceFormat);
            editnumber_1_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day2) {
            editnumber_2_day2.addEventListener('keydown', enforceFormat);
            editnumber_2_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day2) {
            editnumber_3_day2.addEventListener('keydown', enforceFormat);
            editnumber_3_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day2) {
            editnumber_4_day2.addEventListener('keydown', enforceFormat);
            editnumber_4_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day2) {
            editnumber_5_day2.addEventListener('keydown', enforceFormat);
            editnumber_5_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day2) {
            editnumber_6_day2.addEventListener('keydown', enforceFormat);
            editnumber_6_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day2) {
            editnumber_7_day2.addEventListener('keydown', enforceFormat);
            editnumber_7_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day2) {
            editnumber_8_day2.addEventListener('keydown', enforceFormat);
            editnumber_8_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day2) {
            editnumber_9_day2.addEventListener('keydown', enforceFormat);
            editnumber_9_day2.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day3) {
            editnumber_0_day3.addEventListener('keydown', enforceFormat);
            editnumber_0_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day3) {
            editnumber_1_day3.addEventListener('keydown', enforceFormat);
            editnumber_1_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day3) {
            editnumber_2_day3.addEventListener('keydown', enforceFormat);
            editnumber_2_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day3) {
            editnumber_3_day3.addEventListener('keydown', enforceFormat);
            editnumber_3_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day3) {
            editnumber_4_day3.addEventListener('keydown', enforceFormat);
            editnumber_4_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day3) {
            editnumber_5_day3.addEventListener('keydown', enforceFormat);
            editnumber_5_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day3) {
            editnumber_6_day3.addEventListener('keydown', enforceFormat);
            editnumber_6_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day3) {
            editnumber_7_day3.addEventListener('keydown', enforceFormat);
            editnumber_7_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day3) {
            editnumber_8_day3.addEventListener('keydown', enforceFormat);
            editnumber_8_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day3) {
            editnumber_9_day3.addEventListener('keydown', enforceFormat);
            editnumber_9_day3.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day4) {
            editnumber_0_day4.addEventListener('keydown', enforceFormat);
            editnumber_0_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day4) {
            editnumber_1_day4.addEventListener('keydown', enforceFormat);
            editnumber_1_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day4) {
            editnumber_2_day4.addEventListener('keydown', enforceFormat);
            editnumber_2_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day4) {
            editnumber_3_day4.addEventListener('keydown', enforceFormat);
            editnumber_3_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day4) {
            editnumber_4_day4.addEventListener('keydown', enforceFormat);
            editnumber_4_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day4) {
            editnumber_5_day4.addEventListener('keydown', enforceFormat);
            editnumber_5_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day4) {
            editnumber_6_day4.addEventListener('keydown', enforceFormat);
            editnumber_6_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day4) {
            editnumber_7_day4.addEventListener('keydown', enforceFormat);
            editnumber_7_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day4) {
            editnumber_8_day4.addEventListener('keydown', enforceFormat);
            editnumber_8_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day4) {
            editnumber_9_day4.addEventListener('keydown', enforceFormat);
            editnumber_9_day4.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day5) {
            editnumber_0_day5.addEventListener('keydown', enforceFormat);
            editnumber_0_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day5) {
            editnumber_1_day5.addEventListener('keydown', enforceFormat);
            editnumber_1_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day5) {
            editnumber_2_day5.addEventListener('keydown', enforceFormat);
            editnumber_2_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day5) {
            editnumber_3_day5.addEventListener('keydown', enforceFormat);
            editnumber_3_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day5) {
            editnumber_4_day5.addEventListener('keydown', enforceFormat);
            editnumber_4_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day5) {
            editnumber_5_day5.addEventListener('keydown', enforceFormat);
            editnumber_5_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day5) {
            editnumber_6_day5.addEventListener('keydown', enforceFormat);
            editnumber_6_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day5) {
            editnumber_7_day5.addEventListener('keydown', enforceFormat);
            editnumber_7_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day5) {
            editnumber_8_day5.addEventListener('keydown', enforceFormat);
            editnumber_8_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day5) {
            editnumber_9_day5.addEventListener('keydown', enforceFormat);
            editnumber_9_day5.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_0_day6) {
            editnumber_0_day6.addEventListener('keydown', enforceFormat);
            editnumber_0_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_1_day6) {
            editnumber_1_day6.addEventListener('keydown', enforceFormat);
            editnumber_1_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_2_day6) {
            editnumber_2_day6.addEventListener('keydown', enforceFormat);
            editnumber_2_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_3_day6) {
            editnumber_3_day6.addEventListener('keydown', enforceFormat);
            editnumber_3_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_4_day6) {
            editnumber_4_day6.addEventListener('keydown', enforceFormat);
            editnumber_4_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_5_day6) {
            editnumber_5_day6.addEventListener('keydown', enforceFormat);
            editnumber_5_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_6_day6) {
            editnumber_6_day6.addEventListener('keydown', enforceFormat);
            editnumber_6_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_7_day6) {
            editnumber_7_day6.addEventListener('keydown', enforceFormat);
            editnumber_7_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_8_day6) {
            editnumber_8_day6.addEventListener('keydown', enforceFormat);
            editnumber_8_day6.addEventListener('keyup', formatToPhone);
        }
        if (editnumber_9_day6) {
            editnumber_9_day6.addEventListener('keydown', enforceFormat);
            editnumber_9_day6.addEventListener('keyup', formatToPhone);
        }
    }
    getAllRuleset() {
        this.moduleService.getRules(this.currentCompany.uuid).subscribe(res => {
            // console.log(res);        
            this.allrules = res.rule_data;
        });
    }
    getIVRMenu() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.getIVRMenus(this.currentCompany.uuid).subscribe(res => {
            this.ivrmenus = res;
            // console.log(this.ivrmenus);
        }, error => this.error = error);
    }
    get rules() { return this.addFSLRules.controls; }
    onFSLSubmit() {
        this.FSLRulesSubmitted = true;
        // stop here if form is invalid
        if (this.addFSLRules.invalid) {
            return;
        }
        // console.log(this.addFSLRules.get('start_time_0').value._d);
        //  return false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // console.log(this.addFSLRules.value); return false;     
        this.moduleService.addFSLRules(this.addFSLRules.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res);
            // return false;  
            // localStorage.setItem('FSLRulesInsertID', JSON.stringify(res.insertid));
            this.addFSL();
            if (res.status !== 'error') {
                this.toastrService.success('FSL Rules Added Successfully');
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    get editrules() { return this.editFSLRules.controls; }
    onFSLEditSubmit() {
        this.FSLRulesEditSubmitted = true;
        // stop here if form is invalid
        if (this.editFSLRules.invalid) {
            return;
        }
        this.editFSLRules.get('rulename').setValue(this.forwarding);
        // console.log(this.editFSLRules.value);
        // return false;
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        // console.log(this.currentCompany.uuid); return false;     
        this.moduleService.editFSLRules(this.editFSLRules.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res);
            // return false;  
            // localStorage.setItem('FSLRulesInsertID', JSON.stringify(res.insertid));
            if (res.status !== 'error') {
                this.toastrService.success('FSL Rules Updated Successfully');
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    get daycontrol() { return this.addWeekDaysForm.controls; }
    onWeekdaySubmit() {
        this.daysSubmitted = true;
        // stop here if form is invalid
        if (this.addWeekDaysForm.invalid) {
            return;
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleService.addWeekdays(this.addWeekDaysForm.value, this.currentCompany.uuid).subscribe(res => {
            // console.log(res);
            // return false;  
            this.loadweekdays();
            this.loadallweekdays();
            if (res.status !== 'error') {
                this.toastrService.success('Week Day Added Successfully');
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    get dayeditcontrol() { return this.editWeekDaysForm.controls; }
    oneditWeekdaySubmit() {
        this.daysEditSubmitted = true;
        // stop here if form is invalid
        if (this.editWeekDaysForm.invalid) {
            return;
        }
        // console.log(this.currentCompany.value);return false; 
        this.moduleService.editWeekdays(this.editWeekDaysForm.value, this.editWeekDaysForm.get('uuid').value).subscribe(res => {
            // console.log(res);
            // return false;  
            this.loadweekdays();
            this.loadallweekdays();
            if (res.status !== 'error') {
                this.toastrService.success('Week Day Updated Successfully');
            }
            else {
                this.toastrService.error('Failed To Add');
            }
        }, error => this.error = error);
    }
    selectednoofforwardinglocation() {
        let array = [];
        if (this.noofforwardinglocation_1 >= 10) {
            this.ite = 10;
        }
        else {
            this.ite = this.noofforwardinglocation_1;
        }
        for (let i = 0; i < this.ite; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_2() {
        let array = [];
        if (this.noofforwardinglocation_2 >= 10) {
            this.ite2 = 10;
        }
        else {
            this.ite2 = this.noofforwardinglocation_2;
        }
        for (let i = 0; i < this.ite2; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_3() {
        let array = [];
        if (this.noofforwardinglocation_3 >= 10) {
            this.ite3 = 10;
        }
        else {
            this.ite3 = this.noofforwardinglocation_3;
        }
        for (let i = 0; i < this.ite3; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_4() {
        let array = [];
        if (this.noofforwardinglocation_4 >= 10) {
            this.ite4 = 10;
        }
        else {
            this.ite4 = this.noofforwardinglocation_4;
        }
        for (let i = 0; i < this.ite4; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_5() {
        let array = [];
        if (this.noofforwardinglocation_5 >= 10) {
            this.ite5 = 10;
        }
        else {
            this.ite5 = this.noofforwardinglocation_5;
        }
        for (let i = 0; i < this.ite5; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_6() {
        let array = [];
        if (this.noofforwardinglocation_6 >= 10) {
            this.ite6 = 10;
        }
        else {
            this.ite6 = this.noofforwardinglocation_6;
        }
        for (let i = 0; i < this.ite6; i++) {
            array.push(i);
        }
        return array;
    }
    selectednoofforwardinglocation_7() {
        let array = [];
        if (this.noofforwardinglocation_7 >= 10) {
            this.ite7 = 10;
        }
        else {
            this.ite7 = this.noofforwardinglocation_7;
        }
        for (let i = 0; i < this.ite7; i++) {
            array.push(i);
        }
        return array;
    }
    setPrimaryforward(id, count, day) {
        // Day0
        if (count == 0 && day == 0) {
            this.selectedPrimaryForaward_0_day0 = id;
            this.selectedPrimaryCount_0_day0 = count;
            this.selected_0_day_0 = day;
        }
        if (count == 1 && day == 0) {
            this.selectedPrimaryForaward_1_day0 = id;
            this.selectedPrimaryCount_1_day0 = count;
            this.selected_1_day_0 = day;
        }
        if (count == 2 && day == 0) {
            this.selectedPrimaryForaward_2_day0 = id;
            this.selectedPrimaryCount_2_day0 = count;
            this.selected_2_day_0 = day;
        }
        if (count == 3 && day == 0) {
            this.selectedPrimaryForaward_3_day0 = id;
            this.selectedPrimaryCount_3_day0 = count;
            this.selected_3_day_0 = day;
        }
        if (count == 4 && day == 0) {
            this.selectedPrimaryForaward_4_day0 = id;
            this.selectedPrimaryCount_4_day0 = count;
            this.selected_4_day_0 = day;
        }
        if (count == 5 && day == 0) {
            this.selectedPrimaryForaward_5_day0 = id;
            this.selectedPrimaryCount_5_day0 = count;
            this.selected_5_day_0 = day;
        }
        if (count == 6 && day == 0) {
            this.selectedPrimaryForaward_6_day0 = id;
            this.selectedPrimaryCount_6_day0 = count;
            this.selected_6_day_0 = day;
        }
        if (count == 7 && day == 0) {
            this.selectedPrimaryForaward_7_day0 = id;
            this.selectedPrimaryCount_7_day0 = count;
            this.selected_7_day_0 = day;
        }
        if (count == 8 && day == 0) {
            this.selectedPrimaryForaward_8_day0 = id;
            this.selectedPrimaryCount_8_day0 = count;
            this.selected_8_day_0 = day;
        }
        if (count == 9 && day == 0) {
            this.selectedPrimaryForaward_9_day0 = id;
            this.selectedPrimaryCount_9_day0 = count;
            this.selected_9_day_0 = day;
        }
        // Day1
        if (count == 0 && day == 1) {
            this.selectedPrimaryForaward_0_day1 = id;
            this.selectedPrimaryCount_0_day1 = count;
            this.selected_0_day_1 = day;
        }
        if (count == 1 && day == 1) {
            this.selectedPrimaryForaward_1_day1 = id;
            this.selectedPrimaryCount_1_day1 = count;
            this.selected_1_day_1 = day;
        }
        if (count == 2 && day == 1) {
            this.selectedPrimaryForaward_2_day1 = id;
            this.selectedPrimaryCount_2_day1 = count;
            this.selected_2_day_1 = day;
        }
        if (count == 3 && day == 1) {
            this.selectedPrimaryForaward_3_day1 = id;
            this.selectedPrimaryCount_3_day1 = count;
            this.selected_3_day_1 = day;
        }
        if (count == 4 && day == 1) {
            this.selectedPrimaryForaward_4_day1 = id;
            this.selectedPrimaryCount_4_day1 = count;
            this.selected_4_day_1 = day;
        }
        if (count == 5 && day == 1) {
            this.selectedPrimaryForaward_5_day1 = id;
            this.selectedPrimaryCount_5_day1 = count;
            this.selected_5_day_1 = day;
        }
        if (count == 6 && day == 1) {
            this.selectedPrimaryForaward_6_day1 = id;
            this.selectedPrimaryCount_6_day1 = count;
            this.selected_6_day_1 = day;
        }
        if (count == 7 && day == 1) {
            this.selectedPrimaryForaward_7_day1 = id;
            this.selectedPrimaryCount_7_day1 = count;
            this.selected_7_day_1 = day;
        }
        if (count == 8 && day == 1) {
            this.selectedPrimaryForaward_8_day1 = id;
            this.selectedPrimaryCount_8_day1 = count;
            this.selected_8_day_1 = day;
        }
        if (count == 9 && day == 1) {
            this.selectedPrimaryForaward_9_day1 = id;
            this.selectedPrimaryCount_9_day1 = count;
            this.selected_9_day_1 = day;
        }
        // Day2
        if (count == 0 && day == 2) {
            this.selectedPrimaryForaward_0_day2 = id;
            this.selectedPrimaryCount_0_day2 = count;
            this.selected_0_day_2 = day;
        }
        if (count == 1 && day == 2) {
            this.selectedPrimaryForaward_1_day2 = id;
            this.selectedPrimaryCount_1_day2 = count;
            this.selected_1_day_2 = day;
        }
        if (count == 2 && day == 2) {
            this.selectedPrimaryForaward_2_day2 = id;
            this.selectedPrimaryCount_2_day2 = count;
            this.selected_2_day_2 = day;
        }
        if (count == 3 && day == 2) {
            this.selectedPrimaryForaward_3_day2 = id;
            this.selectedPrimaryCount_3_day2 = count;
            this.selected_3_day_2 = day;
        }
        if (count == 4 && day == 2) {
            this.selectedPrimaryForaward_4_day2 = id;
            this.selectedPrimaryCount_4_day2 = count;
            this.selected_4_day_2 = day;
        }
        if (count == 5 && day == 2) {
            this.selectedPrimaryForaward_5_day2 = id;
            this.selectedPrimaryCount_5_day2 = count;
            this.selected_5_day_2 = day;
        }
        if (count == 6 && day == 2) {
            this.selectedPrimaryForaward_6_day2 = id;
            this.selectedPrimaryCount_6_day2 = count;
            this.selected_6_day_2 = day;
        }
        if (count == 7 && day == 2) {
            this.selectedPrimaryForaward_7_day2 = id;
            this.selectedPrimaryCount_7_day2 = count;
            this.selected_7_day_2 = day;
        }
        if (count == 8 && day == 2) {
            this.selectedPrimaryForaward_8_day2 = id;
            this.selectedPrimaryCount_8_day2 = count;
            this.selected_8_day_2 = day;
        }
        if (count == 9 && day == 2) {
            this.selectedPrimaryForaward_9_day2 = id;
            this.selectedPrimaryCount_9_day2 = count;
            this.selected_9_day_2 = day;
        }
        // Day3
        if (count == 0 && day == 3) {
            this.selectedPrimaryForaward_0_day3 = id;
            this.selectedPrimaryCount_0_day3 = count;
            this.selected_0_day_3 = day;
        }
        if (count == 1 && day == 3) {
            this.selectedPrimaryForaward_1_day3 = id;
            this.selectedPrimaryCount_1_day3 = count;
            this.selected_1_day_3 = day;
        }
        if (count == 2 && day == 3) {
            this.selectedPrimaryForaward_2_day3 = id;
            this.selectedPrimaryCount_2_day3 = count;
            this.selected_2_day_3 = day;
        }
        if (count == 3 && day == 3) {
            this.selectedPrimaryForaward_3_day3 = id;
            this.selectedPrimaryCount_3_day3 = count;
            this.selected_3_day_3 = day;
        }
        if (count == 4 && day == 3) {
            this.selectedPrimaryForaward_4_day3 = id;
            this.selectedPrimaryCount_4_day3 = count;
            this.selected_4_day_3 = day;
        }
        if (count == 5 && day == 3) {
            this.selectedPrimaryForaward_5_day3 = id;
            this.selectedPrimaryCount_5_day3 = count;
            this.selected_5_day_3 = day;
        }
        if (count == 6 && day == 3) {
            this.selectedPrimaryForaward_6_day3 = id;
            this.selectedPrimaryCount_6_day3 = count;
            this.selected_6_day_3 = day;
        }
        if (count == 7 && day == 3) {
            this.selectedPrimaryForaward_7_day3 = id;
            this.selectedPrimaryCount_7_day3 = count;
            this.selected_7_day_3 = day;
        }
        if (count == 8 && day == 3) {
            this.selectedPrimaryForaward_8_day3 = id;
            this.selectedPrimaryCount_8_day3 = count;
            this.selected_8_day_3 = day;
        }
        if (count == 9 && day == 3) {
            this.selectedPrimaryForaward_9_day3 = id;
            this.selectedPrimaryCount_9_day3 = count;
            this.selected_9_day_3 = day;
        }
        // Day4
        if (count == 0 && day == 4) {
            this.selectedPrimaryForaward_0_day4 = id;
            this.selectedPrimaryCount_0_day4 = count;
            this.selected_0_day_4 = day;
        }
        if (count == 1 && day == 4) {
            this.selectedPrimaryForaward_1_day4 = id;
            this.selectedPrimaryCount_1_day4 = count;
            this.selected_1_day_4 = day;
        }
        if (count == 2 && day == 4) {
            this.selectedPrimaryForaward_2_day4 = id;
            this.selectedPrimaryCount_2_day4 = count;
            this.selected_2_day_4 = day;
        }
        if (count == 3 && day == 4) {
            this.selectedPrimaryForaward_3_day4 = id;
            this.selectedPrimaryCount_3_day4 = count;
            this.selected_3_day_4 = day;
        }
        if (count == 4 && day == 4) {
            this.selectedPrimaryForaward_4_day4 = id;
            this.selectedPrimaryCount_4_day4 = count;
            this.selected_4_day_4 = day;
        }
        if (count == 5 && day == 4) {
            this.selectedPrimaryForaward_5_day4 = id;
            this.selectedPrimaryCount_5_day4 = count;
            this.selected_5_day_4 = day;
        }
        if (count == 6 && day == 4) {
            this.selectedPrimaryForaward_6_day4 = id;
            this.selectedPrimaryCount_6_day4 = count;
            this.selected_6_day_4 = day;
        }
        if (count == 7 && day == 4) {
            this.selectedPrimaryForaward_7_day4 = id;
            this.selectedPrimaryCount_7_day4 = count;
            this.selected_7_day_4 = day;
        }
        if (count == 8 && day == 4) {
            this.selectedPrimaryForaward_8_day4 = id;
            this.selectedPrimaryCount_8_day4 = count;
            this.selected_8_day_4 = day;
        }
        if (count == 9 && day == 4) {
            this.selectedPrimaryForaward_9_day4 = id;
            this.selectedPrimaryCount_9_day4 = count;
            this.selected_9_day_4 = day;
        }
        // Day5
        if (count == 0 && day == 5) {
            this.selectedPrimaryForaward_0_day5 = id;
            this.selectedPrimaryCount_0_day5 = count;
            this.selected_0_day_5 = day;
        }
        if (count == 1 && day == 5) {
            this.selectedPrimaryForaward_1_day5 = id;
            this.selectedPrimaryCount_1_day5 = count;
            this.selected_1_day_5 = day;
        }
        if (count == 2 && day == 5) {
            this.selectedPrimaryForaward_2_day5 = id;
            this.selectedPrimaryCount_2_day5 = count;
            this.selected_2_day_5 = day;
        }
        if (count == 3 && day == 5) {
            this.selectedPrimaryForaward_3_day5 = id;
            this.selectedPrimaryCount_3_day5 = count;
            this.selected_3_day_5 = day;
        }
        if (count == 4 && day == 5) {
            this.selectedPrimaryForaward_4_day5 = id;
            this.selectedPrimaryCount_4_day5 = count;
            this.selected_4_day_5 = day;
        }
        if (count == 5 && day == 5) {
            this.selectedPrimaryForaward_5_day5 = id;
            this.selectedPrimaryCount_5_day5 = count;
            this.selected_5_day_5 = day;
        }
        if (count == 6 && day == 5) {
            this.selectedPrimaryForaward_6_day5 = id;
            this.selectedPrimaryCount_6_day5 = count;
            this.selected_6_day_5 = day;
        }
        if (count == 7 && day == 5) {
            this.selectedPrimaryForaward_7_day5 = id;
            this.selectedPrimaryCount_7_day5 = count;
            this.selected_7_day_5 = day;
        }
        if (count == 8 && day == 5) {
            this.selectedPrimaryForaward_8_day5 = id;
            this.selectedPrimaryCount_8_day5 = count;
            this.selected_8_day_5 = day;
        }
        if (count == 9 && day == 5) {
            this.selectedPrimaryForaward_9_day5 = id;
            this.selectedPrimaryCount_9_day5 = count;
            this.selected_9_day_5 = day;
        }
        // Day6
        if (count == 0 && day == 6) {
            this.selectedPrimaryForaward_0_day6 = id;
            this.selectedPrimaryCount_0_day6 = count;
            this.selected_0_day_6 = day;
        }
        if (count == 1 && day == 6) {
            this.selectedPrimaryForaward_1_day6 = id;
            this.selectedPrimaryCount_1_day6 = count;
            this.selected_1_day_6 = day;
        }
        if (count == 2 && day == 6) {
            this.selectedPrimaryForaward_2_day6 = id;
            this.selectedPrimaryCount_2_day6 = count;
            this.selected_2_day_6 = day;
        }
        if (count == 3 && day == 6) {
            this.selectedPrimaryForaward_3_day6 = id;
            this.selectedPrimaryCount_3_day6 = count;
            this.selected_3_day_6 = day;
        }
        if (count == 4 && day == 6) {
            this.selectedPrimaryForaward_4_day6 = id;
            this.selectedPrimaryCount_4_day6 = count;
            this.selected_4_day_6 = day;
        }
        if (count == 5 && day == 6) {
            this.selectedPrimaryForaward_5_day6 = id;
            this.selectedPrimaryCount_5_day6 = count;
            this.selected_5_day_6 = day;
        }
        if (count == 6 && day == 6) {
            this.selectedPrimaryForaward_6_day6 = id;
            this.selectedPrimaryCount_6_day6 = count;
            this.selected_6_day_6 = day;
        }
        if (count == 7 && day == 6) {
            this.selectedPrimaryForaward_7_day6 = id;
            this.selectedPrimaryCount_7_day6 = count;
            this.selected_7_day_6 = day;
        }
        if (count == 8 && day == 6) {
            this.selectedPrimaryForaward_8_day6 = id;
            this.selectedPrimaryCount_8_day6 = count;
            this.selected_8_day_6 = day;
        }
        if (count == 9 && day == 6) {
            this.selectedPrimaryForaward_9_day6 = id;
            this.selectedPrimaryCount_9_day6 = count;
            this.selected_9_day_6 = day;
        }
    }
    isPrimarySelected(id, count, day) {
        // Day0
        if (count == 0 && day == 0) {
            if (this.selectedPrimaryForaward_0_day0 == id && this.selectedPrimaryCount_0_day0 === count && this.selected_0_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 0) {
            if (this.selectedPrimaryForaward_1_day0 == id && this.selectedPrimaryCount_1_day0 === count && this.selected_1_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 0) {
            if (this.selectedPrimaryForaward_2_day0 == id && this.selectedPrimaryCount_2_day0 === count && this.selected_2_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 0) {
            if (this.selectedPrimaryForaward_3_day0 == id && this.selectedPrimaryCount_3_day0 === count && this.selected_3_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 0) {
            if (this.selectedPrimaryForaward_4_day0 == id && this.selectedPrimaryCount_4_day0 === count && this.selected_4_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 0) {
            if (this.selectedPrimaryForaward_5_day0 == id && this.selectedPrimaryCount_5_day0 === count && this.selected_5_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 0) {
            if (this.selectedPrimaryForaward_6_day0 == id && this.selectedPrimaryCount_6_day0 === count && this.selected_6_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 0) {
            if (this.selectedPrimaryForaward_7_day0 == id && this.selectedPrimaryCount_7_day0 === count && this.selected_7_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 0) {
            if (this.selectedPrimaryForaward_8_day0 == id && this.selectedPrimaryCount_8_day0 === count && this.selected_8_day_0 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 0) {
            if (this.selectedPrimaryForaward_9_day0 == id && this.selectedPrimaryCount_9_day0 === count && this.selected_9_day_0 == day)
                return true;
            else
                return false;
        }
        // Day1
        if (count == 0 && day == 1) {
            if (this.selectedPrimaryForaward_0_day1 == id && this.selectedPrimaryCount_0_day1 === count && this.selected_0_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 1) {
            if (this.selectedPrimaryForaward_1_day1 == id && this.selectedPrimaryCount_1_day1 === count && this.selected_1_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 1) {
            if (this.selectedPrimaryForaward_2_day1 == id && this.selectedPrimaryCount_2_day1 === count && this.selected_2_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 1) {
            if (this.selectedPrimaryForaward_3_day1 == id && this.selectedPrimaryCount_3_day1 === count && this.selected_3_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 1) {
            if (this.selectedPrimaryForaward_4_day1 == id && this.selectedPrimaryCount_4_day1 === count && this.selected_4_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 1) {
            if (this.selectedPrimaryForaward_5_day1 == id && this.selectedPrimaryCount_5_day1 === count && this.selected_5_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 1) {
            if (this.selectedPrimaryForaward_6_day1 == id && this.selectedPrimaryCount_6_day1 === count && this.selected_6_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 1) {
            if (this.selectedPrimaryForaward_7_day1 == id && this.selectedPrimaryCount_7_day1 === count && this.selected_7_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 1) {
            if (this.selectedPrimaryForaward_8_day1 == id && this.selectedPrimaryCount_8_day1 === count && this.selected_8_day_1 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 1) {
            if (this.selectedPrimaryForaward_9_day1 == id && this.selectedPrimaryCount_9_day1 === count && this.selected_9_day_1 == day)
                return true;
            else
                return false;
        }
        // Day2
        if (count == 0 && day == 2) {
            if (this.selectedPrimaryForaward_0_day2 == id && this.selectedPrimaryCount_0_day2 === count && this.selected_0_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 2) {
            if (this.selectedPrimaryForaward_1_day2 == id && this.selectedPrimaryCount_1_day2 === count && this.selected_1_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 2) {
            if (this.selectedPrimaryForaward_2_day2 == id && this.selectedPrimaryCount_2_day2 === count && this.selected_2_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 2) {
            if (this.selectedPrimaryForaward_3_day2 == id && this.selectedPrimaryCount_3_day2 === count && this.selected_3_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 2) {
            if (this.selectedPrimaryForaward_4_day2 == id && this.selectedPrimaryCount_4_day2 === count && this.selected_4_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 2) {
            if (this.selectedPrimaryForaward_5_day2 == id && this.selectedPrimaryCount_5_day2 === count && this.selected_5_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 2) {
            if (this.selectedPrimaryForaward_6_day2 == id && this.selectedPrimaryCount_6_day2 === count && this.selected_6_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 2) {
            if (this.selectedPrimaryForaward_7_day2 == id && this.selectedPrimaryCount_7_day2 === count && this.selected_7_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 2) {
            if (this.selectedPrimaryForaward_8_day2 == id && this.selectedPrimaryCount_8_day2 === count && this.selected_8_day_2 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 2) {
            if (this.selectedPrimaryForaward_9_day2 == id && this.selectedPrimaryCount_9_day2 === count && this.selected_9_day_2 == day)
                return true;
            else
                return false;
        }
        // Day3
        if (count == 0 && day == 3) {
            if (this.selectedPrimaryForaward_0_day3 == id && this.selectedPrimaryCount_0_day3 === count && this.selected_0_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 3) {
            if (this.selectedPrimaryForaward_1_day3 == id && this.selectedPrimaryCount_1_day3 === count && this.selected_1_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 3) {
            if (this.selectedPrimaryForaward_2_day3 == id && this.selectedPrimaryCount_2_day3 === count && this.selected_2_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 3) {
            if (this.selectedPrimaryForaward_3_day3 == id && this.selectedPrimaryCount_3_day3 === count && this.selected_3_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 3) {
            if (this.selectedPrimaryForaward_4_day3 == id && this.selectedPrimaryCount_4_day3 === count && this.selected_4_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 3) {
            if (this.selectedPrimaryForaward_5_day3 == id && this.selectedPrimaryCount_5_day3 === count && this.selected_5_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 3) {
            if (this.selectedPrimaryForaward_6_day3 == id && this.selectedPrimaryCount_6_day3 === count && this.selected_6_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 3) {
            if (this.selectedPrimaryForaward_7_day3 == id && this.selectedPrimaryCount_7_day3 === count && this.selected_7_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 3) {
            if (this.selectedPrimaryForaward_8_day3 == id && this.selectedPrimaryCount_8_day3 === count && this.selected_8_day_3 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 3) {
            if (this.selectedPrimaryForaward_9_day3 == id && this.selectedPrimaryCount_9_day3 === count && this.selected_9_day_3 == day)
                return true;
            else
                return false;
        }
        // Day4
        if (count == 0 && day == 4) {
            if (this.selectedPrimaryForaward_0_day4 == id && this.selectedPrimaryCount_0_day4 === count && this.selected_0_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 4) {
            if (this.selectedPrimaryForaward_1_day4 == id && this.selectedPrimaryCount_1_day4 === count && this.selected_1_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 4) {
            if (this.selectedPrimaryForaward_2_day4 == id && this.selectedPrimaryCount_2_day4 === count && this.selected_2_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 4) {
            if (this.selectedPrimaryForaward_3_day4 == id && this.selectedPrimaryCount_3_day4 === count && this.selected_3_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 4) {
            if (this.selectedPrimaryForaward_4_day4 == id && this.selectedPrimaryCount_4_day4 === count && this.selected_4_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 4) {
            if (this.selectedPrimaryForaward_5_day4 == id && this.selectedPrimaryCount_5_day4 === count && this.selected_5_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 4) {
            if (this.selectedPrimaryForaward_6_day4 == id && this.selectedPrimaryCount_6_day4 === count && this.selected_6_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 4) {
            if (this.selectedPrimaryForaward_7_day4 == id && this.selectedPrimaryCount_7_day4 === count && this.selected_7_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 4) {
            if (this.selectedPrimaryForaward_8_day4 == id && this.selectedPrimaryCount_8_day4 === count && this.selected_8_day_4 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 4) {
            if (this.selectedPrimaryForaward_9_day4 == id && this.selectedPrimaryCount_9_day4 === count && this.selected_9_day_4 == day)
                return true;
            else
                return false;
        }
        // Day5
        if (count == 0 && day == 5) {
            if (this.selectedPrimaryForaward_0_day5 == id && this.selectedPrimaryCount_0_day5 === count && this.selected_0_day_5 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 5) {
            if (this.selectedPrimaryForaward_1_day5 == id && this.selectedPrimaryCount_1_day5 === count && this.selected_1_day_5 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 5) {
            if (this.selectedPrimaryForaward_2_day5 == id && this.selectedPrimaryCount_2_day5 === count && this.selected_2_day_5 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 5) {
            if (this.selectedPrimaryForaward_3_day5 == id && this.selectedPrimaryCount_3_day5 === count && this.selected_3_day_5 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 5) {
            if (this.selectedPrimaryForaward_4_day5 == id && this.selectedPrimaryCount_4_day5 === count && this.selected_4_day_5 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 5) {
            if (this.selectedPrimaryForaward_5_day5 == id && this.selectedPrimaryCount_5_day5 === count && this.selected_5_day_5 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 5) {
            if (this.selectedPrimaryForaward_6_day5 == id && this.selectedPrimaryCount_6_day5 === count && this.selected_6_day_5 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 5) {
            if (this.selectedPrimaryForaward_7_day5 == id && this.selectedPrimaryCount_7_day5 === count && this.selected_7_day_5 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 5) {
            if (this.selectedPrimaryForaward_8_day5 == id && this.selectedPrimaryCount_8_day5 === count && this.selected_8_day_5 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 5) {
            if (this.selectedPrimaryForaward_9_day5 == id && this.selectedPrimaryCount_9_day5 === count && this.selected_9_day_5 == day)
                return true;
            else
                return false;
        }
        // Day6
        if (count == 0 && day == 6) {
            if (this.selectedPrimaryForaward_0_day6 == id && this.selectedPrimaryCount_0_day6 === count && this.selected_0_day_6 == day)
                return true;
            else
                return false;
        }
        if (count == 1 && day == 6) {
            if (this.selectedPrimaryForaward_1_day6 == id && this.selectedPrimaryCount_1_day6 === count && this.selected_1_day_6 == day)
                return true;
            else
                return false;
        }
        if (count == 2 && day == 6) {
            if (this.selectedPrimaryForaward_2_day6 == id && this.selectedPrimaryCount_2_day6 === count && this.selected_2_day_6 == day)
                return true;
            else
                return false;
        }
        if (count == 3 && day == 6) {
            if (this.selectedPrimaryForaward_3_day6 == id && this.selectedPrimaryCount_3_day6 === count && this.selected_3_day_6 == day)
                return true;
            else
                return false;
        }
        if (count == 4 && day == 6) {
            if (this.selectedPrimaryForaward_4_day6 == id && this.selectedPrimaryCount_4_day6 === count && this.selected_4_day_6 == day)
                return true;
            else
                return false;
        }
        if (count == 5 && day == 6) {
            if (this.selectedPrimaryForaward_5_day6 == id && this.selectedPrimaryCount_5_day6 === count && this.selected_5_day_6 == day)
                return true;
            else
                return false;
        }
        if (count == 6 && day == 6) {
            if (this.selectedPrimaryForaward_6_day6 == id && this.selectedPrimaryCount_6_day6 === count && this.selected_6_day_6 == day)
                return true;
            else
                return false;
        }
        if (count == 7 && day == 6) {
            if (this.selectedPrimaryForaward_7_day6 == id && this.selectedPrimaryCount_7_day6 === count && this.selected_7_day_6 == day)
                return true;
            else
                return false;
        }
        if (count == 8 && day == 6) {
            if (this.selectedPrimaryForaward_8_day6 == id && this.selectedPrimaryCount_8_day6 === count && this.selected_8_day_6 == day)
                return true;
            else
                return false;
        }
        if (count == 9 && day == 6) {
            if (this.selectedPrimaryForaward_9_day6 == id && this.selectedPrimaryCount_9_day6 === count && this.selected_9_day_6 == day)
                return true;
            else
                return false;
        }
    }
    onFSLReset() {
        this.FSLRulesSubmitted = false;
        this.addFSLRules.reset();
    }
    selected() {
        let array = [];
        for (let i = 0; i < this.noofforwarding; i++) {
            array.push(i);
        }
        return array;
    }
    Delete(uuid) {
        // alert(uuid);return false
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleService.deleteFSLRules(uuid).subscribe(res => {
                    // this.toastrService.success('Number Deleted Successfully');
                    // this.FSLRulesSubmitted = false;
                    this.addFSLRules.reset();
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    // this.loadNumbers();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    DeleteWeekDay(uuid) {
        // alert(uuid);return false
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                this.moduleService.deleteWeekday(uuid).subscribe(res => {
                    // this.toastrService.success('Number Deleted Successfully');
                    // this.FSLRulesSubmitted = false;
                    this.addFSLRules.reset();
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    this.loadweekdays();
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
};
NumberAddfslrulesComponent.ctorParameters = () => [
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormBuilder"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_4__["ModuleService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_7__["ActivatedRoute"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_8__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpBackend"] }
];
NumberAddfslrulesComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewChild"], args: ['dataTable', { static: true },] }],
    daysTable: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewChild"], args: ['daysdataTable', { static: true },] }]
};
NumberAddfslrulesComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"])({
        selector: 'app-number-addfslrules',
        template: _raw_loader_number_addfslrules_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_number_addfslrules_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], NumberAddfslrulesComponent);



/***/ }),

/***/ "v/CO":
/*!****************************************************************************!*\
  !*** ./src/app/modules/ivr-menus/edit-ivrmenu/edit-ivrmenu.component.scss ***!
  \****************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJlZGl0LWl2cm1lbnUuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "vY5A":
/*!***************************************!*\
  !*** ./src/app/app-routing.module.ts ***!
  \***************************************/
/*! exports provided: AppRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppRoutingModule", function() { return AppRoutingModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _modules_modules_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/modules.module */ "+dkL");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _page_not_found_component_page_not_found_component_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./page-not-found-component/page-not-found-component.component */ "g8Eo");
/* harmony import */ var _auth_auth_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./auth/auth.module */ "Yj9t");
/* harmony import */ var _auth_auth_routing_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./auth/auth-routing.module */ "6epW");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/platform-browser */ "jhN1");
/* harmony import */ var angular_datatables__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! angular-datatables */ "njyG");










const routes = [
    { path: '', redirectTo: '', pathMatch: 'full' },
    { path: '404', component: _page_not_found_component_page_not_found_component_component__WEBPACK_IMPORTED_MODULE_3__["PageNotFoundComponentComponent"] },
    { path: '**', component: _page_not_found_component_page_not_found_component_component__WEBPACK_IMPORTED_MODULE_3__["PageNotFoundComponentComponent"] }
];
let AppRoutingModule = class AppRoutingModule {
};
AppRoutingModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_6__["NgModule"])({
        imports: [
            _angular_router__WEBPACK_IMPORTED_MODULE_7__["RouterModule"].forRoot(routes, { onSameUrlNavigation: 'reload', useHash: true, relativeLinkResolution: 'legacy' }),
            _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_2__["ReactiveFormsModule"],
            _angular_platform_browser__WEBPACK_IMPORTED_MODULE_8__["BrowserModule"],
            _auth_auth_module__WEBPACK_IMPORTED_MODULE_4__["AuthModule"],
            _auth_auth_routing_module__WEBPACK_IMPORTED_MODULE_5__["AuthRoutingModule"],
            _modules_modules_module__WEBPACK_IMPORTED_MODULE_1__["ModulesModule"],
            angular_datatables__WEBPACK_IMPORTED_MODULE_9__["DataTablesModule"]
        ],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_7__["RouterModule"]]
    })
], AppRoutingModule);



/***/ }),

/***/ "vinN":
/*!******************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/notes/notes.component.html ***!
  \******************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n\r\n<div class=\"main-content\">\r\n       <section class=\"section\">\r\n         <div class=\"section-body\">\r\n           <div class=\"row\">\r\n             <div class=\"col-12 col-md-12 col-lg-12\">\r\n               <form [formGroup]=\"addNotesForm\" (ngSubmit)=\"onSubmit()\">\r\n               <div class=\"card\">\r\n                 <div class=\"card-header\">\r\n                   <h4>Add Notes</h4>\r\n                 </div>\r\n                 <div class=\"card-body\">                    \r\n                   <div class=\"form-group\">\r\n                     <label>Note</label>\r\n                     <textarea formControlName=\"note\" cols=\"30\" rows=\"20\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': submitted && f.note.errors }\"></textarea>\r\n                     <div *ngIf=\"submitted && f.note.errors\" class=\"invalid-feedback\">\r\n                         <div *ngIf=\"f.note.errors.required\">Note is required</div>\r\n                     </div> \r\n                   </div>\r\n                 </div>\r\n                 <div class=\"card-footer text-right\">\r\n                    <button  class=\"btn btn-primary mr-1\" type=\"submit\">Save Note</button>\r\n                </div>\r\n               </div>\r\n             </form>\r\n\r\n   </div>\r\n\r\n");

/***/ }),

/***/ "w1c0":
/*!******************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/reports/report-labelsummary/report-labelsummary.component.html ***!
  \******************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\r\n      <div class=\"main-content\">  \r\n        <section class=\"section\">\r\n          <div class=\"section-body\">\r\n            <div class=\"row\">\r\n              <div class=\"col-12\">\r\n                <div class=\"card\">\r\n                  <form [formGroup]=\"CallReportForm\" (ngSubmit)=\"onCallReportSubmit()\">\r\n                  <div class=\"row\" style=\"margin-top: 20px;\r\n                  \">\r\n                      <div class=\"col-2\">\r\n                          <div class=\"card-header\">\r\n                          <h4>Call Reports</h4></div>\r\n                      </div>\r\n                      <!-- <div class=\"col-md-2\">\r\n                        <input type=\"text\" class=\"form-control\" ngxDaterangepickerMd\r\n                        [singleDatePicker]=\"true\" formControlName=\"start_date\"\r\n                        [autoApply]=\"true\" \r\n                         class=\"form-control\"\r\n                        placeholder=\"Select Start Date...\" />\r\n                      </div>\r\n                      <div class=\"col-md-2\">\r\n                        <input type=\"text\" class=\"form-control\" ngxDaterangepickerMd\r\n                        [singleDatePicker]=\"true\" formControlName=\"end_date\"\r\n                        [autoApply]=\"true\" \r\n                         class=\"form-control\"\r\n                        placeholder=\"Select End Date...\" />\r\n                      </div> -->\r\n                      <div class=\"col-3\">\r\n                        <input type=\"text\"\r\n                        formControlName=\"date\"\r\n                        ngxDaterangepickerMd\r\n                        [ranges]=\"ranges\"                \r\n                        class=\"form-control\"\r\n                        placeholder=\"Select please...\"/>\r\n                      </div>\r\n\r\n                      <div class=\"col-md-2\">\r\n                        <select formControlName=\"label\" class=\"form-control\">\r\n                            <option value=\"\">Select Label</option>\r\n                            <option *ngFor=\"let data of alllabel\" value=\"{{data.itemName}}\">{{data.itemName}}</option>\r\n                        </select>\r\n                      </div>\r\n                      <div class=\"col-md-2\">\r\n                        <button class=\"btn btn-primary\" type=\"submit\">Get Chart</button>\r\n                      </div>\r\n                     \r\n                      <!-- <div class=\"col-md-2 mt-3\">\r\n                        <a class=\"pl-5\" href=\"#\" data-toggle=\"collapse\" data-target=\"#collapseExample\" aria-expanded=\"false\" aria-controls=\"collapseExample\">\r\n                           More Option\r\n                          </a>\r\n                      </div> -->\r\n                  </div>    \r\n            <div class=\"collapse\" id=\"collapseExample\">\r\n            <hr>\r\n            <div class=\"p-2\">\r\n               <div class=\"row\">\r\n                  <div class=\"col-md-2\">\r\n                    <select formControlName=\"duration_type\" class=\"form-control\">\r\n                        <option value=\"\">Select Type</option>\r\n                        <option value=\">\">Greater Than</option>\r\n                        <option value=\"<\">Less Than</option>\r\n                        <option value=\"=\">Equal To</option>                        \r\n                    </select>\r\n                  </div>\r\n                  <div class=\"col-md-2\">\r\n                    <input formControlName=\"duration\" type=\"text\" class=\"form-control\" class=\"form-control\" placeholder=\"Enter Duration...\" />\r\n                  </div>\r\n               </div>\r\n            </div>\r\n            <hr>\r\n            </div>        \r\n            </form>     \r\n              <div class=\"card-body\">\r\n                <br>\r\n                <div [chart]=\"chart\"></div>\r\n                <br>\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\">\r\n                  <thead>\r\n                    <tr>\r\n                      <th>Call Date</th>\r\n                      <th>Label Name\t</th>\r\n                      <th># of Calls</th>\r\n                      <th>Total Duration</th>\r\n                      <th>Avg Duration</th>\r\n                      <th>IVR key press</th> \r\n                      <th>Revenue</th>                     \r\n                    </tr>\r\n                  </thead>\r\n                  <tbody *ngIf=\"numbers?.length != 0\">\r\n                      <tr *ngFor=\"let data of numbers\">\r\n                          <td>{{ data.created_at}}</td>\r\n                          <td>{{ data.label }}</td>\r\n                          <td>{{ data.noofcalls }}</td>\r\n                          <td>{{ data.call_duration }}</td>\r\n                          <td>{{ data.avg }}</td>\r\n                          <td>{{ data.ivr_inputs }}</td>  \r\n                          <td>{{ data.revenue }}</td>                        \r\n                      </tr>\r\n                  </tbody>\r\n                  <tbody *ngIf=\"numbers?.length == 0\">\r\n                    <tr>\r\n                      <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                    </tr>\r\n                  <tbody>\r\n                </table>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n</div>  ");

/***/ }),

/***/ "wlcQ":
/*!******************************************************************!*\
  !*** ./src/app/modules/label/label-view/label-view.component.ts ***!
  \******************************************************************/
/*! exports provided: LabelViewComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LabelViewComponent", function() { return LabelViewComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_label_view_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./label-view.component.html */ "VUPL");
/* harmony import */ var _label_view_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./label-view.component.scss */ "QazC");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../module.service */ "zTpG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2_src_sweetalert2_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! sweetalert2/src/sweetalert2.scss */ "QVta");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../global */ "XrUY");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-csv/ngx-csv */ "QAmw");
/* harmony import */ var ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var ngx_ui_loader__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ngx-ui-loader */ "gren");













const router = _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"];
class DataTablesResponse {
}
let LabelViewComponent = class LabelViewComponent {
    constructor(moduleservice, toastrService, handler, route, ngxLoader) {
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.route = route;
        this.ngxLoader = ngxLoader;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_10__["GlobalVariable"].BASE_API_URL;
        this.dtOptions = {};
        this.ischecked = '1';
        this.exportNumber = {};
        this.finalexportNumber = [];
        this.countNo = 0;
        this.checkboxes = [];
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"](handler);
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        const labelname = this.route.snapshot.paramMap.get('labelname');
        this.loadNumbers(labelname);
        // console.log(labelname);
    }
    loadNumbers(labelname) {
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 50,
            "lengthMenu": [50, 100, 500, 1000, 2000, 5000],
            "order": [[1, "asc"]],
            ajax: (dataTablesParameters, callback) => {
                // this.http.post<DataTablesResponse>(
                //   this.ServerUrl+'getnumbersdata/'+this.currentCompany.uuid,
                //   dataTablesParameters, {}
                this.http.post(this.ServerUrl + 'getnumbersdata/' + this.currentCompany.uuid + '/' + labelname, { 'dataTablesParameters': dataTablesParameters, 'number': "", 'campaign': "", 'labels': "" }, {}).subscribe(resp => {
                    this.numbers = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                // ,{data:"target"}
                { data: "checkall" }, { data: "number" }, { data: "campaign" }, { data: "publisher" }, { data: "status" }, { data: "created_at" }, { data: "assosciated_label" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    Delete(uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                let currentUser = JSON.parse(localStorage.getItem('currentUser'));
                this.moduleservice.deleteNumberdata(uuid, currentUser.uuid).subscribe(res => {
                    // this.toastrService.success('Number Deleted Successfully');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Record Deleted Successfully.', 'success');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                    const labelname = this.route.snapshot.paramMap.get('labelname');
                    this.loadNumbers(labelname);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                }, 2000);
            }
        });
    }
    exportdata() {
        var options = {
            fieldSeparator: ',',
            quoteStrings: '"',
            decimalseparator: '.',
            showLabels: true,
            // showTitle: true,
            // title: 'Your title',
            useBom: true,
            // noDownload: true,
            headers: ["Number", "Country", "Campaign", "Publisher", "Status", "Allocated"]
        };
        // for (let index = 0; index < this.numbers.length; index++) {
        //   const element = this.numbers[index];
        //   // this.finalexportNumber.push({[index]:element.number});
        //   // this.finalexportNumber.push({[index]:element.country});
        //   this.exportNumber[index] = element.number;
        //   this.exportNumber[index+1] = element.country;
        //   this.exportNumber[index+2] = element.campaign;
        //   this.exportNumber[index+3] = element.publisher;
        //   this.exportNumber[index+4] = element.target;
        //   this.exportNumber[index+5] = element.created_at;
        //   // this.finalexportNumber[this.countNo] = this.exportNumber;
        //   this.finalexportNumber.push(this.exportNumber);
        //   // console.log(this.exportNumber);
        //   // this.countNo++;
        // }
        // console.log(this.finalexportNumber);
        // return
        // new   ngxCsv(this.finalexportNumber, 'Label-Numbers', options);
        //   this.numbers.forEach((element,index)=>{        
        //     this.exportNumber.number = element.number;
        //     this.exportNumber.country = element.country;
        //     this.exportNumber.campaign = element.campaign;
        //     this.exportNumber.publisher = element.publisher;
        //     this.exportNumber.target = element.target;
        //     // this.exportNumber.assosciated_labels = element.assosciated_labels;
        //     this.exportNumber.created_at = element.created_at;
        //     // console.log(index);
        //     this.finalexportNumber[index] = this.exportNumber;
        //  });
        //  console.log(this.finalexportNumber);
        //  return false; 
        // this.ngxLoader.start();
        this.showLoadingIndicator = true;
        // console.log('ok');
        // return false; 
        const labelname = this.route.snapshot.paramMap.get('labelname');
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.getNumberForExport(this.currentCompany.uuid, labelname).subscribe(res => {
            // console.log(res);return
            // this.ngxLoader.stop();
            new ngx_csv_ngx_csv__WEBPACK_IMPORTED_MODULE_11__["ngxCsv"](res, 'Label-Numbers', options);
            this.showLoadingIndicator = false;
        }, error => this.error = error);
    }
    checkalldelete(event) {
        const checked = event.target.checked;
        this.numbers.forEach(chkbox => chkbox.selected = checked);
    }
    deleteselected(event) {
        // $("#customCheck1").prop("checked", false);    
        if (event.target.checked == true) {
            if (event.target.value == 'on') {
                this.checkboxes = [];
                this.numbers.forEach(lbl => {
                    this.checkboxes.push(lbl.id);
                });
            }
            else {
                if (this.checkboxes.length + 1 == this.numbers.length) {
                    $("#customCheck1").prop("checked", true);
                }
                this.checkboxes.push(event.target.value);
            }
            this.ischecked = '0';
        }
        else {
            // console.log(this.checkboxes);      
            if (this.checkboxes.length != 0) {
                $("#customCheck1").prop("checked", false);
            }
            if (event.target.value != 'on') {
                const index = this.checkboxes.indexOf(event.target.value);
                this.checkboxes.splice(index, 1);
            }
            else {
                this.checkboxes = [];
            }
            this.ischecked = '1';
        }
        // console.log(this.checkboxes); 
    }
    onDeleteSubmit() {
        if (this.checkboxes.length == 0) {
            this.toastrService.error('Please Select Row To Delete');
        }
        else {
            // console.log(this.checkboxes);  
            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire({
                title: 'Are you sure?',
                text: 'You want to Delete Selected Record!',
                type: 'warning',
                showCancelButton: true,
                confirmButtonText: 'Yes, delete it!',
                cancelButtonText: 'No, keep it'
            }).then((result) => {
                if (result.value) {
                    this.moduleservice.deleteSelectedNumbers(this.checkboxes).subscribe(res => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Deleted!', 'Records Deleted Successfully.', 'success');
                        setTimeout(() => {
                            sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                        }, 2000);
                        const labelname = this.route.snapshot.paramMap.get('labelname');
                        this.loadNumbers(labelname);
                    }, error => this.error = error);
                }
                else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.DismissReason.cancel) {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_9___default.a.close();
                    }, 2000);
                }
            });
        }
    }
};
LabelViewComponent.ctorParameters = () => [
    { type: _module_service__WEBPACK_IMPORTED_MODULE_3__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_7__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpBackend"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["ActivatedRoute"] },
    { type: ngx_ui_loader__WEBPACK_IMPORTED_MODULE_12__["NgxUiLoaderService"] }
];
LabelViewComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }]
};
LabelViewComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-label-view',
        template: _raw_loader_label_view_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_label_view_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], LabelViewComponent);



/***/ }),

/***/ "xIO+":
/*!*********************************************************************!*\
  !*** ./src/app/modules/publishers/thankyou/thankyou.component.scss ***!
  \*********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJ0aGFua3lvdS5jb21wb25lbnQuc2NzcyJ9 */");

/***/ }),

/***/ "ynWL":
/*!************************************!*\
  !*** ./src/app/app.component.scss ***!
  \************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJhcHAuY29tcG9uZW50LnNjc3MifQ== */");

/***/ }),

/***/ "yuf0":
/*!*****************************************************!*\
  !*** ./src/app/auth/profile/profile.component.scss ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJwcm9maWxlLmNvbXBvbmVudC5zY3NzIn0= */");

/***/ }),

/***/ "z592":
/*!**************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/numbers/number-pool/number-pool.component.html ***!
  \**************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("  <!-- Add  Modal -->\r\n  <div class=\"modal fade\" id=\"addModel\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n  aria-hidden=\"true\">\r\n  <div class=\"modal-dialog model-lg\" role=\"document\">\r\n    <div class=\"modal-content\">\r\n      <div class=\"modal-header\">\r\n        <h5 class=\"modal-title\" id=\"formModal\">Create Number Pool</h5>\r\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n          <span aria-hidden=\"true\">&times;</span>\r\n        </button>\r\n      </div>\r\n      <div class=\"modal-body\">\r\n        <form id=\"addLabel\" [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n          <div class=\"form-group\">\r\n              <label>Country</label>\r\n              <select formControlName=\"country_id\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.country_id.errors }\" [value]=\"''\"> \r\n                <option value=\"\">Select Country</option>\r\n                <option value=\"United States\">United States</option>\r\n              </select>\r\n              <div *ngIf=\"Submitted && addformcontrol.country_id.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"addformcontrol.country_id.errors.required\">Country is required</div>\r\n              </div>              \r\n           </div>\r\n\r\n           <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n              <div class=\"form-group\">\r\n                <label  class=\"d-block\">Name :</label>\r\n                <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.name.errors }\">           \r\n              </div>\r\n              <div *ngIf=\"Submitted && addformcontrol.name.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"addformcontrol.name.errors.required\">Name is required</div>\r\n              </div>       \r\n            </div>          \r\n          </div>      \r\n           \r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n              <div class=\"form-group\">\r\n                <label  class=\"d-block\">Closed Browser Delay :</label>\r\n                <input formControlName=\"closed_browser_delay\" placeholder=\"30\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.closed_browser_delay.errors }\">           \r\n              </div>\r\n              <div *ngIf=\"Submitted && addformcontrol.closed_browser_delay.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"addformcontrol.closed_browser_delay.errors.required\">Closed Browser Delay is required</div>\r\n              </div>  \r\n            </div>          \r\n          </div>      \r\n         \r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n              <div class=\"form-group\">\r\n                <label  class=\"d-block\">Idle Limit :</label>\r\n                <input formControlName=\"browser_idle_limit\" placeholder=\"300\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.browser_idle_limit.errors }\">           \r\n              </div>\r\n              <div *ngIf=\"Submitted && addformcontrol.browser_idle_limit.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"addformcontrol.browser_idle_limit.errors.required\">Idle Limit is required</div>\r\n              </div>  \r\n            </div>          \r\n          </div>      \r\n         \r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n              <div class=\"form-group\">\r\n                <label  class=\"d-block\">Pool Size :</label>\r\n                <input formControlName=\"poolsize\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.poolsize.errors }\">           \r\n              </div>\r\n              <div *ngIf=\"Submitted && addformcontrol.poolsize.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"addformcontrol.poolsize.errors.required\">Pool Size is required</div>\r\n              </div>  \r\n            </div>          \r\n          </div>      \r\n\r\n           <div class=\"form-group\">\r\n            <div class=\"control-group\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Number Type:</label>\r\n                <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberTypeadd==0}\" (click)=\"numberTypeval(0)\"> \r\n                      <input class=\"form-check-input\" name=\"allocating\" formControlName=\"allocating\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                      Toll Free\r\n                    </label>\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberTypeadd==1}\" (click)=\"numberTypeval(1)\">\r\n                      <input class=\"form-check-input\" name=\"allocating\" formControlName=\"allocating\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                       Local\r\n                    </label>                 \r\n                  </div>                \r\n            </div>             \r\n          </div>\r\n           </div>       \r\n       </div>\r\n          <div class=\"modal-footer\" style=\"padding: 0;\">\r\n             <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Number Pool</button>\r\n             <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n            </div>\r\n        </form>\r\n      </div>\r\n    </div>\r\n  </div>\r\n  </div>   \r\n \r\n \r\n  <div class=\"modal fade\" id=\"editModel\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n  aria-hidden=\"true\">\r\n  <div class=\"modal-dialog model-lg\" role=\"document\">\r\n    <div class=\"modal-content\">\r\n      <div class=\"modal-header\">\r\n        <h5 class=\"modal-title\" id=\"formModal\">Update Number</h5>\r\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n          <span aria-hidden=\"true\">&times;</span>\r\n        </button>\r\n      </div>\r\n      <div class=\"modal-body\">\r\n        <form id=\"editLabel\" [formGroup]=\"editForm\" (ngSubmit)=\"onEditSubmit()\">\r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n          <div class=\"form-group\">\r\n              <label>Country</label>\r\n              <input type=\"hidden\" name=\"uuid\" formControlName=\"uuid\" >\r\n              <select formControlName=\"country_id\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': editSubmitted && editFormcontrol.country_id.errors }\" [value]=\"''\"> \r\n                <option value=\"\">Select Country</option>\r\n                <option value=\"United States\">United States</option>\r\n              </select>\r\n              <div *ngIf=\"editSubmitted && editFormcontrol.country_id.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"editFormcontrol.country_id.errors.required\">Country is required</div>\r\n              </div>              \r\n           </div>\r\n\r\n           <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n              <div class=\"form-group\">\r\n                <label  class=\"d-block\">Name :</label>\r\n                <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': editSubmitted && editFormcontrol.name.errors }\">           \r\n              </div>\r\n              <div *ngIf=\"editSubmitted && editFormcontrol.name.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"editFormcontrol.name.errors.required\">Name is required</div>\r\n              </div>       \r\n            </div>          \r\n          </div>      \r\n           \r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n              <div class=\"form-group\">\r\n                <label  class=\"d-block\">Closed Browser Delay :</label>\r\n                <input formControlName=\"closed_browser_delay\" placeholder=\"30\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': editSubmitted && editFormcontrol.closed_browser_delay.errors }\">           \r\n              </div>\r\n              <div *ngIf=\"editSubmitted && editFormcontrol.closed_browser_delay.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"editFormcontrol.closed_browser_delay.errors.required\">Closed Browser Delay is required</div>\r\n              </div>  \r\n            </div>          \r\n          </div>      \r\n         \r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n              <div class=\"form-group\">\r\n                <label  class=\"d-block\">Idle Limit :</label>\r\n                <input formControlName=\"browser_idle_limit\" placeholder=\"300\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': editSubmitted && editFormcontrol.browser_idle_limit.errors }\">           \r\n              </div>\r\n              <div *ngIf=\"editSubmitted && editFormcontrol.browser_idle_limit.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"editFormcontrol.browser_idle_limit.errors.required\">Idle Limit is required</div>\r\n              </div>  \r\n            </div>          \r\n          </div>      \r\n         \r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n              <div class=\"form-group\">\r\n                <label  class=\"d-block\">Pool Size :</label>\r\n                <input formControlName=\"poolsize\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': editSubmitted && editFormcontrol.poolsize.errors }\">           \r\n              </div>\r\n              <div *ngIf=\"editSubmitted && editFormcontrol.poolsize.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"editFormcontrol.poolsize.errors.required\">Pool Size is required</div>\r\n              </div>  \r\n            </div>          \r\n          </div>      \r\n\r\n           <div class=\"form-group\">\r\n            <div class=\"control-group\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Number Type:</label>\r\n                <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberTypeadd==0}\" (click)=\"numberTypeval(0)\"> \r\n                      <input class=\"form-check-input\" name=\"allocating\" formControlName=\"allocating\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                      Toll Free\r\n                    </label>\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberTypeadd==1}\" (click)=\"numberTypeval(1)\">\r\n                      <input class=\"form-check-input\" name=\"allocating\" formControlName=\"allocating\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                       Local\r\n                    </label>                 \r\n                  </div>                \r\n            </div>        \r\n          </div>\r\n           \r\n           </div>       \r\n       </div>\r\n          <div class=\"modal-footer\" style=\"padding: 0;\">\r\n             <button (click)=\"closeEditModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Update Number Pool</button>\r\n             <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n            </div>\r\n        </form>\r\n      </div>\r\n    </div>\r\n  </div>\r\n  </div>   \r\n\r\n\r\n  \r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <h4>Manage Pools</h4></div>\r\n                    </div>\r\n                    <div class=\"col-9 text-right mt-2\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                          <button  data-toggle=\"modal\" data-target=\"#addModel\"  class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-plus\"></i> Create Number Pool\r\n                          </button>\r\n                          <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Delete Selected\r\n                          </button>                                                   \r\n                          </div>                       \r\n                    </div>\r\n              \r\n                </div>   \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                    <thead>\r\n                      <tr>\r\n                        <th style=\"padding: 10px;width: 1px;\">\r\n                            <div class=\"custom-control custom-checkbox\" *ngIf=\"numbers?.length != 0\">\r\n                            <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                            <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                            </div>\r\n                        </th>\r\n                        <th>Name</th>\r\n                        <th>Country</th>\r\n                        <th>Closed Browser Delay</th>                        \r\n                        <th>Browser Idle Limit</th>\r\n                        <th>Pool Size</th>\r\n                        <th>Allocating</th>\r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let number of numbers\">\r\n                              <td>\r\n                                <div class=\"custom-control custom-checkbox\">\r\n                                <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{number.uuid}}\"  [checked]=\"number.selected\" [value]=\"number.id\" >\r\n                                <label class=\"custom-control-label\" for=\"customCheck_{{number.uuid}}\"></label>\r\n                                </div>                                \r\n                            </td>\r\n                            \r\n                            <td><a href=\"#\" (click)=\"editdata(number.uuid,number.name,number.country_id,number.closed_browser_delay,number.browser_idle_limit,number.poolsize,number.allocating)\"  data-toggle=\"modal\" data-target=\"#editModel\" class=\"text-white actionedit\">{{ number.name }}</a></td>\r\n                            <td>{{ number.country_id }}</td>\r\n                            <td>{{ number.closed_browser_delay }}</td>\r\n                            <td>{{ number.browser_idle_limit }}</td>\r\n                            <td>{{ number.poolsize }}</td>\r\n                            <td *ngIf=\"number.allocating==0\"><div class=\"badge badge-primary\">Toll Free</div> </td>\r\n                            <td *ngIf=\"number.allocating==1\"><div class=\"badge badge-primary\">Local</div> </td>\r\n                            <td><a href=\"#\" (click)=\"editdata(number.uuid,number.name,number.country_id,number.closed_browser_delay,number.browser_idle_limit,number.poolsize,number.allocating)\"  data-toggle=\"modal\" data-target=\"#editModel\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;<button (click)=\"Delete((number.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>");

/***/ }),

/***/ "zE7r":
/*!********************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/campaigns/campaign-view/campaign-view.component.html ***!
  \********************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("  <!-- Approve offer details -->\n  <div class=\"modal fade\" id=\"addNumber\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\n  aria-hidden=\"true\">\n  <div class=\"modal-dialog\" role=\"document\">\n    <div class=\"modal-content\">\n      <div class=\"modal-header\">\n        <b class=\"modal-title\" id=\"formModal\">Add Number</b>\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n          <span aria-hidden=\"true\">&times;</span>\n        </button>\n      </div>\n      <div class=\"modal-body\">\n        <form id=\"addLabel\" [formGroup]=\"numberForm\" (ngSubmit)=\"onAddNoSubmit()\">\n          <div class=\"row\">\n           <div class=\"col-md-12\">\n               <div class=\"control-group\">\n               <label class=\"control-label input-label\" for=\"startTime\">Number Type :</label>\n               <div class=\"btn-group form-control\" data-toggle=\"buttons\">\n               <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==0}\" (click)=\"payout_typevaledit(0)\"> \n                     <input class=\"form-check-input\" formControlName=\"notype\" type=\"radio\" id=\"option1\" [value]=\"0\">\n                     Toll Free \n                   </label>\n                   <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payout_typevaledit(1)\">\n                     <input class=\"form-check-input\" formControlName=\"notype\" type=\"radio\" id=\"option2\" [value]=\"1\">\n                     Local \n                   </label>                   \n                 </div>\n                 <div *ngIf=\"addnoSubmitted && addnoFormcontrol.notype.errors\" class=\"invalid-feedback\">\n                   <div *ngIf=\"addnoFormcontrol.notype.errors.required\">Number Type is required</div>\n               </div>   \n               </div>\n                 <div class=\"control-group mt-2\">\n                     <label class=\"control-label input-label\" for=\"startTime\">Prefix :</label>\n                     <input type=\"number\" maxlength=\"3\" \n                     oninput=\"javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);\"\n                     class=\"form-control\" formControlName=\"prefix\" placeholder=\"Optional\" />         \n                 </div>                 \n               \n           </div>\n        \n       </div>\n      \n          <div class=\"modal-footer mt-4\" style=\"padding: 0;\"> <br><br>\n             <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-sm btn-primary m-t-15 waves-effect\">Add</button>\n             <button data-dismiss=\"modal\" aria-label=\"Close\" type=\"reset\" class=\"btn btn-sm btn-secondary m-t-15 waves-effect\">Close</button>\n            </div>\n        </form>\n      </div>\n    </div>\n  </div>\n  </div>  \n  \n  <div class=\"main-content\">\n      <section class=\"section\">\n        <div class=\"section-body\">\n          <div class=\"row\">\n            <div class=\"col-12 col-md-12 col-lg-12\">\n              <div style=\"border-top: 1px solid #2f3031\"></div>\n                <div class=\"row\">\n                  <div class=\"col-12 col-md-12 col-lg-12\">\n                  <div class=\"input-group\" style=\"background: #111319;padding-bottom: 11px;\">\n                    <button id=\"tabs1\" (click)=\"getType(1,0)\" class=\"camtabsbtn camactivetab\"><i class=\"fa fa-cog m-r-5 f-s-14\"></i> Campaign Settings</button>\n                    <button id=\"tabs2\" (click)=\"getType(2,0)\" class=\"camtabsbtn\"><i class=\"fa fa-users m-r-5 f-s-14\"></i> Offer <i *ngIf=\"offerdetails && offerdetails.status==1\" class=\"fa fa-circle text-success\"></i></button>                  \n                    <button id=\"tabs3\" (click)=\"getType(3,0)\" class=\"camtabsbtn\"><i class=\"material-icons font-14\">show_chart</i> Performance Summary</button>                  \n                  </div>   \n                </div>\n              </div>  \n              \n              <div class=\"row\" [style.display]=\"filtertype == 1?'block':'none'\">\n                <div class=\"col-12 col-md-12 col-lg-12\">\n                \n                <div class=\"card\" >\n                  <div class=\"card-body\" >\n                    \n                    <fieldset class=\"scheduler-border\">\n                    <legend class=\"scheduler-border\">General Info</legend>\n                    <section>\n                      <div class=\"form-group row\">\n                        <div class=\"col-sm-2\"></div>  \n                        <label class=\"col-sm-2 col-form-label\">Campaign ID</label>\n                        <div class=\"col-sm-5\">\n                          {{getdata && getdata.uuid}}\n                        </div>\n                      </div>\n                      \n                      <div class=\"form-group row\">\n                        <div class=\"col-sm-2\"></div>  \n                        <label class=\"col-sm-2 col-form-label\">Campaign Name</label>\n                        <div class=\"col-sm-5\">\n                          {{getdata && getdata.name}}\n                        </div>\n                      </div>\n                    \n                      <div class=\"form-group row\">\n                        <div class=\"col-sm-2\"></div>  \n                        <label class=\"col-sm-2 col-form-label\">Country</label>\n                        <div class=\"col-sm-5\">\n                          {{getdata && getdata.country}}\n                        </div>\n                      </div>\n                    </section>\n            </fieldset>\n  \n            <fieldset class=\"scheduler-border\">\n              <legend class=\"scheduler-border\">Default Payout Settings</legend>    \n              <section>\n               <div class=\"dps\">\n                  <div style=\"border-left: 4px solid #3858e7 !important;left: 16px;background: #13161f;padding: 8px\" >\n                    <div class=\"row\" >\n                      <div class=\"col-md-10 font-13\" *ngIf=\"defaultconf!=''\"><span style=\"color: gray;\">1 | </span> {{defaultconf}}</div>                        \n                      <div class=\"col-md-10 font-13\" *ngIf=\"defaultconf==''\">Not Set</div>                        \n                    </div>   \n                  </div>   \n              </div> \n              </section>\n          </fieldset>\n  \n  \n            <fieldset class=\"scheduler-border\">\n              <legend class=\"scheduler-border\">Numbers</legend>    \n              <section>\n              <div class=\"mb-4\">\n                <button *ngIf=\"campaignpublisher?.length == 0\" class=\"w-auto btn btn-primary btn-sm\" data-toggle=\"modal\" data-target=\"#addNumber\" style=\"border: 1px solid green!important\"><i class=\"fa fa-plus\"></i> Add Number</button>\n                <span *ngIf=\"campaignpublisher?.length > 0\"> 1 of 1 Offer Numbers available</span>\n              </div>\n              <ngx-ui-loader [loaderId]=\"'loader-04'\"></ngx-ui-loader>\n              <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\n                <thead>\n                  <tr>\n                    <th>Number</th>\n                    <th>Actions</th>                                        \n                  </tr>\n                </thead>\n                <tbody *ngIf=\"campaignpublisher?.length != 0\">\n                    <tr *ngFor=\"let data of campaignpublisher\">\n                        <td>{{data.phoneno}}</td>\n                        <td>\n                          <!-- <div data-toggle=\"modal\" (click)=\"getpayoutdata(data.publisher_uuid,data.phoneno,data.number_uuid)\" data-target=\"#addLabels\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></div>&nbsp; -->\n                          <div (click)=\"DeleteNumber(data.phoneno, data.number_uuid)\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></div>\n                        </td>\n                        <!-- <td>-</td> -->\n                    </tr>\n                </tbody>\n                <tbody *ngIf=\"campaignpublisher?.length == 0\">\n                  <tr>\n                    <td colspan=\"2\" class=\"no-data-available\">No data Available!</td>\n                  </tr>\n                <tbody>\n              </table>\n            </section>\n            </fieldset>\n  \n                  </div>              \n                </div>\n                </div>\n              </div>  \n  \n              <div class=\"row\" [style.display]=\"filtertype == 2?'block':'none'\">\n                <div class=\"col-12 col-md-12 col-lg-12\">\n                  <div class=\"card\" >\n                    <div class=\"card-body\" >\n                      <div>\n                          <fieldset class=\"scheduler-border\">\n                              <legend class=\"scheduler-border\">You are participating in this Offer!</legend>    \n                              <section class=\"p-2\">\n                                <div class=\"row mt-2\">\n                                  <div class=\"col-md-4\"> \n                                    <div class=\"thumbnail text-center\"> <img width=\"130\" src=\"./assets/img/call-tracking.png\"> <div class=\"caption text-center mt-2\"> <p><strong class=\"font-14\">1. Add Offer Numbers</strong></p> <p class=\"font-12\">Add numbers to start sending calls to this Offer. You can add numbers up to the limit specified in the Offer number restrictions.</p> </div> \n                                    <br><input (click)=\"getType(1,1)\" type=\"button\" value=\"Add Numbers\" class=\"btn btn-primary font-13\" style=\"background-color: #3858e7;\">\n                                    </div> \n                                  </div>        \n                                  \n                                  <div class=\"col-md-4\"> \n                                    <div class=\"thumbnail text-center\"> <img width=\"130\" src=\"./assets/img/payout.png\"> <div class=\"caption text-center mt-2\"> <p><strong class=\"font-14\">2. Review Offer Payout Details</strong></p> <p class=\"font-12\">Offer payout rules can be complex, review the payout details to ensure that you are maximizing your earnings!</p> </div> <br>\n                                    <input type=\"button\" (click)=\"getType(1,2)\" value=\"Review Payout Details\" class=\"btn btn-primary font-13\" style=\"background-color: #3858e7;\">\n                                    </div> \n                                  </div>        \n                                  \n                                  <div class=\"col-md-4\"> \n                                    <div class=\"thumbnail text-center\"> <img width=\"130\" src=\"./assets/img/url-tracking.png\"> <div class=\"caption text-center mt-2\"> <p><strong class=\"font-14\">3. Review Offer Restrictions</strong></p> <p class=\"font-12\">Familiarize yourself with the rules and restrictions outlined in the Offer description and notes.</p> </div> <br>\n                                    <input type=\"button\" [scrollTo]=\"'#place1'\" [scrollDuration]=\"1000\" [scrollOffset]=\"-100\" value=\"Review Offer\" class=\"btn btn-primary font-13\" style=\"background-color: #3858e7;\">\n                                    </div> \n                                  </div>        \n                              </div> \n                              </section>\n                          </fieldset>\n  \n                       \n                          <div *ngIf=\"(offerdetails) || (isadded)\">\n                          <h6>Offer Details</h6>\n                          <hr style=\"background: green;\" class=\"mt-1\">\n  \n                          <div class=\"row\">\n                            <div class=\"col-md-3 font-12\">Offer Title</div>\n                            <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.name:null}}</div>\n                          </div> \n                          <div class=\"row mt-3\">\n                            <div class=\"col-md-3 font-12\">Description</div>\n                            <div class=\"col-md-3 font-12\">\n                              <div [innerHTML]=\"offerdetails ? offerdetails.description:null\"></div>                            \n                            </div>\n                            \n                          </div>\n                          <div class=\"row mt-3\">\n                            <div class=\"col-md-3 font-12\">Payout</div>\n                            <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.payout:null}}</div>\n                          </div>\n                          <div class=\"row mt-3\">\n                            <div class=\"col-md-3 font-12\">Duration</div>\n                            <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.duration:null}}</div>\n                          </div>\n                          <div class=\"row mt-3\">\n                            <div class=\"col-md-3 font-12\">Hours Of Operation</div>\n                            <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.hoursofoperation:null}}</div>\n                          </div>\n                          <div class=\"row mt-3\">\n                            <div class=\"col-md-3 font-12\">Expiry Date</div>\n                            <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.exp_date:null}}</div>\n                          </div>\n                          <div class=\"row mt-3\">\n                            <div class=\"col-md-3 font-12\">Require Approval</div>\n                            <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.req_approval==1\"><i class=\"fa fa-check\"></i></div>\n                            <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.req_approval==0\"><i class=\"fa fa-times\"></i></div>\n                          </div>\n                          <br>\n                          <strong class=\"font-15\">Publisher Number Limits</strong>\n                          <div class=\"row mt-3\">\n                            <div class=\"col-md-3 font-12\">Max Numbers Per Publisher</div>\n                            <div class=\"col-md-3 font-12\">{{offerdetails ? offerdetails.max_no_per_publisher:null}}</div>\n                          </div>\n                          <div class=\"row mt-3\">\n                            <div class=\"col-md-3 font-12\">Allow Toll-Free Number</div>\n                            <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_tollfree_no==1\"><i class=\"fa fa-check\"></i></div>\n                            <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_tollfree_no==0\"><i class=\"fa fa-times\"></i></div>\n                          </div>\n                          <div class=\"row mt-3 mb-4\">\n                            <div class=\"col-md-3 font-12\">Allow DID Numbers</div>\n                            <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_did_no==1\"><i class=\"fa fa-check\"></i></div>\n                            <div class=\"col-md-3 font-12\" *ngIf=\"offerdetails && offerdetails.allow_did_no==0\"><i class=\"fa fa-times\"></i></div>\n                          </div>   \n                          \n                      \n  \n                          <button class=\"w-auto ml-2 btn btn-primary btn-sm\" (click)=\"offer_hide(2)\" style=\"border: 1px solid red!important\"><i class=\"fa fa-power-off\"></i> Leave Offer</button>\n  \n                          <br>\n                          <br>\n                          \n                          </div>\n  \n                        \n                      </div>  \n            \n                     \n  \n  \n                    </div>              \n                  </div>\n                </div>\n              </div>\n\n              <div class=\"row\" [style.display]=\"filtertype == 3?'block':'none'\">\n                <div class=\"col-12 col-md-12 col-lg-12\">\n                <section>\n                  <div class=\"card\">\n                        <div class=\"card-header\">\n                          <h6><i class=\"material-icons\">show_chart</i> Performance Summary</h6>                        \n                      </div>                     \n                    \n                    <div class=\"card-body\">\n                      <div [chart]=\"chart\"></div>\n                      <hr>\n                      <div class=\"table-responsive\">\n                      <table #PerdataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\n                        <thead>\n                          <tr>\n                         \n                             <th>-</th>\n                             <th>Incoming</th>\n                             <th>Not Connected</th>\n                             <th>Completed</th>\n                             <th>Converted</th>\n                             <th>No Answer</th>\n                             <th>Revenue</th>\n                             <th>Payout</th>\n                          </tr>\n                        </thead>\n                        <tbody *ngIf=\"labels?.length != 0\">\n                            <tr *ngFor=\"let data of labels;let i=index\">\n                                <!-- <th>-</th> -->\n                                <td style=\"width:10%\">{{data.date}}<br>{{data.day}}</td>\n                                <!-- <th>{{labels[1].date}}<br>{{labels[1].day}}</th>\n                                <th>{{labels[2].date}}<br>{{labels[2].day}}</th>\n                                <th>{{labels[3].date}}<br>{{labels[3].day}}</th>\n                                <th>{{labels[4].date}}<br>{{labels[4].day}}</th>\n                                <th>{{labels[5].date}}<br>{{labels[5].day}}</th>\n                                <th>{{labels[6].date}}<br>{{labels[6].day}}</th> -->\n            \n                                <td>{{ data.incoming}}</td>\n                                <td>{{ data.connected}}</td>\n                                <td>{{ data.completed}}</td>\n                                <td>{{ data.converted}}</td>\n                                <td>{{ data.noanswer}}</td>\n                                <td style=\"width:13%\">{{ data.revenue}}</td>\n                                <td style=\"width:13%\">{{ data.payout }}</td>                    \n                            </tr>\n                        </tbody>\n                        <tbody *ngIf=\"labels?.length == 0\">\n                          <tr>\n                            <td colspan=\"15\" class=\"no-data-available\">No data Available!</td>\n                          </tr>\n                        <tbody>\n                      </table>\n                      </div>\n                    </div>\n                  </div>      \n                </section>\n              </div>\n              </div>\n        </div>\n        </div>\n        </div>\n      </section>\n  </div>\n  ");

/***/ }),

/***/ "zTpG":
/*!*******************************************!*\
  !*** ./src/app/modules/module.service.ts ***!
  \*******************************************/
/*! exports provided: ModuleService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleService", function() { return ModuleService; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "qCKp");
/* harmony import */ var rxjs_BehaviorSubject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/BehaviorSubject */ "nDsj");
/* harmony import */ var rxjs_BehaviorSubject__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(rxjs_BehaviorSubject__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "kU1M");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! .././global */ "XrUY");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! aws-sdk/clients/s3 */ "tegk");
/* harmony import */ var aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7__);








let ModuleService = class ModuleService {
    constructor(handler, httpClient) {
        this.httpClient = httpClient;
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_6__["GlobalVariable"].BASE_API_URL;
        this.subjectName = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"](); //need to create a subject
        this.httpOptions = {
            headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpHeaders"]({ 'Content-Type': 'application/json' })
        };
        // pass data
        this.numbersdata = new rxjs_BehaviorSubject__WEBPACK_IMPORTED_MODULE_3__["BehaviorSubject"]({
        // numberslist:this.numbers
        });
        this.FOLDER = 'ivr-audio/';
        this.Obj = this;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"](handler);
    }
    // Menu Update Subject
    sendMenuUpdateMessage(message) {
        this.subjectName.next({ text: message }); //next() will feed the value in Subject
    }
    getUpdate() {
        return this.subjectName.asObservable(); //it returns as an observable to which the receiver funtion will subscribe
    }
    setNumbersdata(numbers) {
        this.numbersdata.next(numbers);
    }
    getnumbersInfo() {
        return this.numbersdata.asObservable();
    }
    // private menudata = new BehaviorSubject<any>({
    //   // numberslist:this.numbers
    // });
    // setMenudata(numbers: any) {
    //   this.menudata.next(numbers);
    // }
    // getMenuInfo() {
    //   return this.menudata.asObservable();
    // }
    // Header
    getcallvalue(company_uuid, timezone) {
        return this.http.post(this.ServerUrl + 'getcallvalue/' + company_uuid, timezone).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getcompanydetailsbyuuid(uuid) {
        return this.http.get(this.ServerUrl + 'getcompanydetailsbyuuid/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getcompanydetailsbyuuid1(length, limit) {
        return this.http.get(this.ServerUrl + 'getcompanydetailsbyuuid1/' + length + '/' + limit).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Profile
    getProfiledata(company_uuid) {
        return this.http.get(this.ServerUrl + 'getProfiledata/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editProfile(formData, company_uuid) {
        return this.http.post(this.ServerUrl + 'editProfile/' + company_uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Dashboard Module
    getNumberOfCount(company_uuid, timezone) {
        return this.http.post(this.ServerUrl + 'getNumberOfCount/' + company_uuid + '/', timezone).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getChartbyDate(company_uuid, params, timezone) {
        return this.http.post(this.ServerUrl + 'getChartNumberOfCalls/' + company_uuid + '/' + timezone + '/', params).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getChartbyfilter(company_uuid, chartarg, daytype, timezone) {
        // if(val==''){
        //   val = 0;
        // }
        return this.http.post(this.ServerUrl + 'getChartbyfilter/' + company_uuid + '/' + daytype + '/' + timezone + '/', chartarg).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getChartbyfilterforcomparison(company_uuid, chartarg, daytype, timezone) {
        // if(val==''){
        //   val = 0;
        // }
        return this.http.post(this.ServerUrl + 'getChartbyfilterforcomparison/' + company_uuid + '/' + daytype + '/' + timezone + '/', chartarg).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // getChartNumberOfCalls(company_uuid: string,date:any) {
    //   return this.http.get<any>(this.ServerUrl + 'getChartNumberOfCalls/'+company_uuid).pipe(
    //     catchError(this.handleError)
    //   );
    // } 
    // Buyer
    deleteBuyer(id, user_uuid) {
        return this.http.get(this.ServerUrl + 'deleteBuyer/' + id + '/' + user_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addBuyer(formData) {
        return this.http.post(this.ServerUrl + 'addBuyer/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editBuyer(formData) {
        return this.http.post(this.ServerUrl + 'editBuyer/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Publishers
    addPublisher(formData) {
        return this.http.post(this.ServerUrl + 'addPublisher/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editPublisher(formData) {
        return this.http.post(this.ServerUrl + 'editPublisher/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editNumberdata(formData) {
        return this.http.post(this.ServerUrl + 'editNumberdata/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deletePublisher(id, user_uuid) {
        return this.http.get(this.ServerUrl + 'deletePublisher/' + id + '/' + user_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    loadNumbersfordropdown(company_uuid) {
        return this.http.get(this.ServerUrl + 'loadNumbersfordropdown/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Campaign
    addCampaign(company_uuid, formData) {
        return this.http.post(this.ServerUrl + 'addCampaign/' + company_uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteCampaign(id) {
        return this.http.get(this.ServerUrl + 'deleteCampaign/' + id).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    changeCampaignstatus(id, status) {
        return this.http.get(this.ServerUrl + 'changeCampaignstatus/' + id + '/' + status).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getcampainbyuuid(uuid) {
        return this.http.get(this.ServerUrl + 'getcampainbyuuid/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getallcampain(uuid) {
        return this.http.get(this.ServerUrl + 'getallcampain/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getallcampaindata(uuid) {
        return this.http.get(this.ServerUrl + 'getallcampaindata/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getallbuyers(uuid) {
        return this.http.get(this.ServerUrl + 'getallbuyers/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    updateCampaign(uuid, company_uuid, formData) {
        return this.http.post(this.ServerUrl + 'updateCampaign/' + uuid + '/' + company_uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addpublisherpayout(uuid, formData) {
        return this.http.post(this.ServerUrl + 'addpublisherpayout/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addpublishertocampaign(uuid, formData) {
        return this.http.post(this.ServerUrl + 'addpublishertocampaign/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    adddefaultpayout(uuid, formData) {
        return this.http.post(this.ServerUrl + 'adddefaultpayout/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editRoutingSubmit(uuid, formData) {
        return this.http.post(this.ServerUrl + 'editRoutingSubmit/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    change_routingplanval(uuid, val, type) {
        return this.http.post(this.ServerUrl + 'change_routingplanval/' + uuid + '/' + type, val)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editIVRRoutingSubmit(uuid, formData) {
        return this.http.post(this.ServerUrl + 'editIVRRoutingSubmit/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    setcampaignRouting(uuid, campaign_uuid, user_uuid) {
        return this.http.post(this.ServerUrl + 'setcampaignRouting/' + campaign_uuid + '/' + user_uuid, uuid)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    setivrRouting(uuid, name, user_uuid, company_uuid) {
        return this.http.post(this.ServerUrl + 'setivrRouting/' + user_uuid + '/' + uuid + '/' + company_uuid, name)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getplanbyuuid(uuid) {
        return this.http.get(this.ServerUrl + 'getplanbyuuid/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addIVRPlan(user_uuid, company_uuid, formdata) {
        return this.http.post(this.ServerUrl + 'addIVRPlan/' + company_uuid + '/' + user_uuid, formdata)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editIVRPlan(user_uuid, uuid, formdata) {
        return this.http.post(this.ServerUrl + 'editIVRPlan/' + uuid + '/' + user_uuid, formdata)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getpayoutdata(uuid, phone) {
        return this.http.post(this.ServerUrl + 'getpayoutdata/' + uuid, phone).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getpayoutbynumberuuid(uuid) {
        return this.http.get(this.ServerUrl + 'getpayoutbynumberuuid/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteRoutingPlan(uuid, user_uuid) {
        return this.http.get(this.ServerUrl + 'deleteRoutingPlan/' + uuid + '/' + user_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteIVRRoutingPlan(uuid, user_uuid) {
        return this.http.get(this.ServerUrl + 'deleteIVRRoutingPlan/' + uuid + '/' + user_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deletePublisherPayout(uuid) {
        return this.http.get(this.ServerUrl + 'deletePublisherPayout/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Report
    savereport(formData) {
        return this.http.post(this.ServerUrl + 'savereport/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getAllsavedreport(company_uuid) {
        return this.http.post(this.ServerUrl + 'getAllsavedreport/', company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getReportdetailsdata(row_uuid, company_uuid) {
        return this.http.post(this.ServerUrl + 'getReportdetailsdata/' + row_uuid, company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getsavedreportsbyuuid(uuid) {
        return this.http.post(this.ServerUrl + 'getsavedreportsbyuuid/', uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteSelectedSavedReport(uuid) {
        return this.http.post(this.ServerUrl + 'deleteSelectedSavedReport/', uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Number Module Start
    getnumberAssciatedlabels(company_uuid, number) {
        return this.http.post(this.ServerUrl + 'getnumberAssciatedlabels/' + company_uuid, number).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getTargetdata(uuid, company_uuid) {
        return this.http.get(this.ServerUrl + 'getTargetbyid/' + uuid + '/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getNumberForExport(company_uuid, labelname) {
        return this.http.post(this.ServerUrl + 'getNumberForExport/' + company_uuid, labelname).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    changeTargetStatus(activestatus, currentUseruuid, targetuuid) {
        return this.http.post(this.ServerUrl + 'changeTargetStatus/' + activestatus + '/' + targetuuid, currentUseruuid)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    updateTarget(formData, uuid) {
        return this.http.post(this.ServerUrl + 'updateTarget/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addTarget(formData) {
        return this.http.post(this.ServerUrl + 'addTarget/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteSelectedNumbers(lblarr) {
        return this.http.post(this.ServerUrl + 'deleteSelectedNumbers/', lblarr).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    StatusChangeSelectedNumbers(lblarr) {
        return this.http.post(this.ServerUrl + 'StatusChangeSelectedNumbers/', lblarr).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    importNumber(formData) {
        return this.http.post(this.ServerUrl + 'importNumber/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    batcheditnos(formData) {
        return this.http.post(this.ServerUrl + 'batcheditnos/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addFSLRules(formData, uid) {
        return this.http.post(this.ServerUrl + 'addFSLRules/' + uid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addWeekdays(formData, uid) {
        return this.http.post(this.ServerUrl + 'addWeekdays/' + uid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteWeekday(uuid) {
        return this.http.get(this.ServerUrl + 'deleteWeekday/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editWeekdays(formData, uuid) {
        return this.http.post(this.ServerUrl + 'editWeekdays/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    loadallweekdays(company_uuid) {
        return this.http.get(this.ServerUrl + 'loadallweekdays/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // 
    getRecentRules(FSLRulesInsertID, company_uuid) {
        return this.http.post(this.ServerUrl + 'getRecentRules/' + company_uuid, FSLRulesInsertID).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getRulesByName(name, company_uuid) {
        return this.http.post(this.ServerUrl + 'getRecentRules/' + company_uuid, { name: name }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getRulesByTargetuuid(target_uuid, company_uuid) {
        return this.http.post(this.ServerUrl + 'getRulesByTargetuuid/' + company_uuid, { target_uuid: target_uuid }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getAllRules(company_uuid) {
        return this.http.get(this.ServerUrl + 'getAllRules/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteNumber(id, user_uuid) {
        return this.http.get(this.ServerUrl + 'deleteNumber/' + id + '/' + user_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    cloneNumber(id, user_uuid) {
        return this.http.get(this.ServerUrl + 'cloneNumber/' + id + '/' + user_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    cloneIVR(id, user_uuid) {
        return this.http.get(this.ServerUrl + 'cloneIVR/' + id + '/' + user_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteFSLRules(uuid) {
        return this.http.get(this.ServerUrl + 'deleteFSLRules/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteFSLRulesbyname(name) {
        return this.http.get(this.ServerUrl + 'deleteFSLRulesbyname/' + name).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getFSLbyuuid(uuid) {
        return this.http.post(this.ServerUrl + 'getFSLbyuuid/', uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getselectednumbers(formData) {
        // console.log(uploadfile);return false;
        return this.http.post(this.ServerUrl + 'getselectednumbers/', formData).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    numberbatchedit(formData) {
        // console.log(uploadfile);return false;
        return this.http.post(this.ServerUrl + 'numberbatchedit/', formData).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editFSLRules(formData, uid) {
        return this.http.post(this.ServerUrl + 'editFSLRules/' + uid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // FSL Rule Name Validation
    validatename(name) {
        // alert(name);
        return this.http.post(this.ServerUrl + 'validatename/', { name: name })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Label Module Start
    addLabel(formData) {
        return this.http.post(this.ServerUrl + 'addLabel/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteLabel(uuid, usert_uuid) {
        // alert(uuid);
        return this.http.get(this.ServerUrl + 'deleteLabel/' + uuid + '/' + usert_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteSelectedLabels(lblarr) {
        return this.http.post(this.ServerUrl + 'deleteSelectedLabels/', lblarr).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editLabel(formData, uuid) {
        return this.http.post(this.ServerUrl + 'editLabel/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getAllLabels(company_uuid) {
        return this.http.get(this.ServerUrl + 'getAllLabels/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getLabelForExport(company_uuid) {
        return this.http.get(this.ServerUrl + 'getLabelForExport/' + company_uuid)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    validateLabelName(name) {
        // alert(name);
        return this.http.post(this.ServerUrl + 'validateLabelName/', { name: name })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    validateTargetName(name) {
        // alert(name);
        return this.http.post(this.ServerUrl + 'validateTargetName/', { name: name })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    validateCampaignName(name) {
        // alert(name);
        return this.http.post(this.ServerUrl + 'validateCampaignName/', { name: name })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Notes Module Start
    addNotes(formData, company_uuid) {
        return this.http.post(this.ServerUrl + 'addNotes/' + company_uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getNotesdata(company_uuid) {
        return this.http.get(this.ServerUrl + 'getNotesdata/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // IVR Menu
    deleteIVRMenu(uuid, user_uuid) {
        return this.http.get(this.ServerUrl + 'deleteIVRMenu/' + uuid + '/' + user_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteSelectedIVR(arr) {
        return this.http.post(this.ServerUrl + 'deleteSelectedIVR/', arr).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getIVRMenus(company_uuid) {
        return this.http.get(this.ServerUrl + 'getIVRMenuname/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getIVRAudio(company_uuid, type) {
        return this.http.get(this.ServerUrl + 'getIVRAudio/' + company_uuid + '/' + type).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addIVR(formData, uuid) {
        return this.http.post(this.ServerUrl + 'addIVR/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getivrdata(uuid) {
        return this.http.get(this.ServerUrl + 'getivrbyuuid/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Rule Set
    addRuleSet(formData, uuid) {
        return this.http.post(this.ServerUrl + 'addRuleSet/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getruledata(uuid, company_uuid) {
        return this.http.get(this.ServerUrl + 'getruledata/' + uuid + '/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editRuleSet(formData, company_uuid, uuid) {
        return this.http.post(this.ServerUrl + 'editRuleSet/' + company_uuid + '/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteRuleset(uuid) {
        return this.http.get(this.ServerUrl + 'deleteRuleset/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Dynamic Parameter
    addDyPara(formData, uuid) {
        return this.http.post(this.ServerUrl + 'addDyPara/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getDynParadata(uuid) {
        return this.http.get(this.ServerUrl + 'getDynParadata/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Verification Management
    getRules(company_uuid) {
        return this.http.get(this.ServerUrl + 'getRulesName/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    GetIVRnamedata(company_uuid) {
        return this.http.get(this.ServerUrl + 'GetIVRnamedata/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    GetEmails(company_uuid) {
        return this.http.get(this.ServerUrl + 'GetEmails/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addEmail(formData, uuid) {
        return this.http.post(this.ServerUrl + 'addEmail/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addWildcard(formData, uuid) {
        return this.http.post(this.ServerUrl + 'addWildcard/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getWildcard(company_uuid) {
        return this.http.get(this.ServerUrl + 'getWildcard/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addVerificationRuleSet(formData, uuid) {
        return this.http.post(this.ServerUrl + 'addVerificationRuleSet/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getverificationruledata(company_uuid) {
        return this.http.get(this.ServerUrl + 'getverificationruledata/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editWildcard(formData, company_uuid) {
        return this.http.post(this.ServerUrl + 'editWildcard/' + company_uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editEmail(formData, company_uuid) {
        return this.http.post(this.ServerUrl + 'editEmail/' + company_uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    uploadfile(file, uuid, type) {
        const bucket = new aws_sdk_clients_s3__WEBPACK_IMPORTED_MODULE_7__({
            accessKeyId: 'AKIA6GBFL5HD7P5AGJMK',
            secretAccessKey: '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',
            region: 'us-west-1'
        });
        const params = {
            Bucket: 'dialdigit2',
            Key: this.FOLDER + file.name,
            Body: file,
            ACL: '',
        };
        // console.log(bucket);return
        // bucket.upload(params, function (err, data) {
        //     if (err) {
        //         console.log('There was an error uploading your file: ', err);
        //         return false;
        //     }
        //     // console.log('Successfully uploaded file.', data);
        //     return true;
        // });
        //for upload progress   
        // bucket.upload(params).on('httpUploadProgress', function (evt) {
        //           console.log(evt.loaded + ' of ' + evt.total + ' Bytes');
        //       }).send(function (err, data) {
        //           if (err) {
        //               console.log('There was an error uploading your file: ', err);
        //               return false;
        //           }
        //           console.log('Successfully uploaded file.', data);
        //           return data;
        //     });
        const formData = new FormData();
        formData.append('fileKey', file.name);
        formData.append('Bucket', 'dialdigit2');
        formData.append('ETag', '0c481e87f2774b1bd41a0a70d9b70d11');
        formData.append('Key', 'ivr-audio/' + file.name);
        formData.append('type', file.type);
        formData.append('Folder', 'ivr-audio/');
        formData.append('Location', 'https://d2actkasrcrrs8.cloudfront.net/ivr-audio/' + file.name);
        return this.http.post(this.ServerUrl + 'add_audio/' + uuid + '/' + type, formData, {
            reportProgress: true,
            observe: 'events'
        }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])((event) => {
            // console.log(event); return false;
            bucket.upload(params, function (err, data) {
                if (err) {
                    // console.log('There was an error uploading your file: ', err);
                    return false;
                }
                // console.log('Successfully uploaded file.', data);
                return true;
            });
            switch (event.type) {
                case _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpEventType"].UploadProgress:
                    const progress = Math.round(100 * event.loaded / event.total);
                    // console.log(progress);
                    this.resp = { status: 'progress', message: progress };
                    break;
                case _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpEventType"].Response:
                    this.resp = event;
                    break;
                default:
                    this.resp = `Unhandled event: ${event.type}`;
                    break;
            }
            return this.resp;
        }));
    }
    // add_audio(file){
    //   // console.log(file);return false;
    //     return this.http.post<any>(this.ServerUrl + 'add_audio/', file)
    //     .pipe(
    //       catchError(this.handleError)
    //     );
    // }
    add_audio(fileToUpload) {
        const formData = new FormData();
        formData.append('fileKey', fileToUpload, fileToUpload.name);
        return this.http.post(this.ServerUrl + 'add_audio/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    updateIVR(formData, uuid) {
        return this.http.post(this.ServerUrl + 'updateIVR/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // White and Black List Numbers
    deleteListNumber(uuid, type) {
        return this.http.get(this.ServerUrl + 'deleteListNumber/' + uuid + '/' + type).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deletewbSelectedNumbers(lblarr, type) {
        return this.http.post(this.ServerUrl + 'deletewbSelectedNumbers/' + type, lblarr).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addNumberlist(formData) {
        return this.http.post(this.ServerUrl + 'addNumberlist/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editNumberList(formData, uuid) {
        return this.http.post(this.ServerUrl + 'editNumberList/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Audible Ring
    deleteAudibleRingNumber(uuid) {
        return this.http.get(this.ServerUrl + 'deleteAudibleRingNumber/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getallnumbers(company_uuid) {
        return this.http.get(this.ServerUrl + 'getallnumbers/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addExceptionNumber(formData) {
        return this.http.post(this.ServerUrl + 'addExceptionNumber/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Reports
    getCallsForExport(company_uuid) {
        return this.http.get(this.ServerUrl + 'getCallsForExport/' + company_uuid)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getCalldetailsForExport(company_uuid, formData) {
        return this.http.post(this.ServerUrl + 'getCalldetailsForExport/' + company_uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getCallReports(formdata, company_uuid) {
        return this.http.post(this.ServerUrl + 'getCallReports/' + company_uuid, formdata)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getLabelReports(formdata, company_uuid) {
        return this.http.post(this.ServerUrl + 'getLabelReports/' + company_uuid, formdata)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // SMS
    getsmsForExport(company_uuid) {
        return this.http.get(this.ServerUrl + 'getsmsForExport/' + company_uuid)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // NumberModule
    getAllpublishers(company_uuid) {
        return this.http.get(this.ServerUrl + 'getAllpublishers/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getAllpublisherssetting(company_uuid) {
        return this.http.get(this.ServerUrl + 'getAllpublisherssetting/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addPublisherSettingdata(formData) {
        return this.http.post(this.ServerUrl + 'addPublisherSettingdata/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    purchase_number(uuid, formData) {
        return this.http.post(this.ServerUrl + 'purchase_number/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Number pool
    addNumberpooldata(formData) {
        return this.http.post(this.ServerUrl + 'addNumberpooldata/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteNumberpooldata(uuid, user_uuid) {
        return this.http.get(this.ServerUrl + 'deleteNumberpooldata/' + uuid + '/' + user_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editNumberpooldata(formData) {
        return this.http.post(this.ServerUrl + 'editNumberpooldata/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Basic Settings
    getAllbasicsetting(company_uuid) {
        return this.http.get(this.ServerUrl + 'getAllbasicsetting/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addBasicSettingdata(formData) {
        return this.http.post(this.ServerUrl + 'addBasicSettingdata/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addPublisherRegistration(formData) {
        return this.http.post(this.ServerUrl + 'addPublisherRegistration/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    verifyEmail(type, uuid) {
        return this.http.post(this.ServerUrl + 'verifyEmail/' + type, uuid)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addNumberdata(formData) {
        return this.http.post(this.ServerUrl + 'addNumberdata/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteNumberdata(id, user_uuid) {
        // alert(id);
        return this.http.get(this.ServerUrl + 'deleteNumberdata/' + id + '/' + user_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    DeletePurNumber(no) {
        // alert(id);
        return this.http.post(this.ServerUrl + 'DeletePurNumber/', no).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getAlltarget(company_uuid) {
        return this.http.get(this.ServerUrl + 'getAlltarget/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    allivrroutingplan(company_uuid) {
        return this.http.get(this.ServerUrl + 'allivrroutingplan/' + company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getcitystatevalue(uuid, citystatetypeval) {
        return this.http.post(this.ServerUrl + 'getcitystatevalue/' + uuid, citystatetypeval).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    loadcitystate(type, datatype) {
        return this.http.post(this.ServerUrl + 'loadcitystate/' + datatype, type).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    loadcity(type) {
        return this.http.post(this.ServerUrl + 'loadcity/', type).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Blocked Numbers
    deleteblckedno(uuid) {
        // alert(uuid);
        return this.http.get(this.ServerUrl + 'deleteblckedno/' + uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    addblockedcalls(formData, company_uuid) {
        return this.http.post(this.ServerUrl + 'addblockedcalls/' + company_uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editblockednumbers(formData, uuid) {
        return this.http.post(this.ServerUrl + 'editblockednumbers/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Add User
    addUser(formData) {
        return this.http.post(this.ServerUrl + 'addUser/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteUser(id, user_uuid) {
        return this.http.get(this.ServerUrl + 'deleteUser/' + id + '/' + user_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Company Management
    addCompany(formData) {
        return this.http.post(this.ServerUrl + 'addCompany/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    editCompany(formData, uuid) {
        return this.http.post(this.ServerUrl + 'updateCompany/' + uuid, formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    deleteCompany(id) {
        return this.http.get(this.ServerUrl + 'deleteCompany/' + id).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    getTagetdetailsdata(row_uuid, company_uuid) {
        return this.http.post(this.ServerUrl + 'getTagetdetailsdata/' + row_uuid, company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    checkcompanyavail(company_uuid) {
        return this.http.post(this.ServerUrl + 'checkcompanyavail/', company_uuid).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // offersection
    addOffer(formData) {
        return this.http.post(this.ServerUrl + 'addOffer/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    apply_offer(formData) {
        return this.http.post(this.ServerUrl + 'apply_offer/', formData)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    changeofferstatus(uuid, status) {
        return this.http.get(this.ServerUrl + 'changeofferstatus/' + uuid + '/' + status).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    approverejoffer(uuid, status) {
        return this.http.get(this.ServerUrl + 'approverejoffer/' + uuid + '/' + status).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    hideoffer(uuid, user_uuid, status) {
        return this.http.get(this.ServerUrl + 'hideoffer/' + uuid + '/' + user_uuid + '/' + status).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Get Timezone
    gettimezone() {
        return this.http.get(this.ServerUrl + 'gettimezone/').pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError));
    }
    // Error Handler Start  
    handleError(error) {
        if (error.error instanceof ErrorEvent) {
            console.error('An error occurred:', error.error.message);
        }
        else {
            console.error(`Backend returned code ${error.status}, ` + `body was: ${error.error}`);
        }
        this.errorData = {
            errorTitle: 'Oops! Request for document failed',
            errorDesc: 'Something bad happened. Please try again later.'
        };
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.errorData);
    }
};
ModuleService.ctorParameters = () => [
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpBackend"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"] }
];
ModuleService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
        providedIn: 'root'
    })
], ModuleService);



/***/ }),

/***/ "zUnb":
/*!*********************!*\
  !*** ./src/main.ts ***!
  \*********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser-dynamic */ "a3Wg");
/* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app/app.module */ "ZAI4");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./environments/environment */ "AytR");




if (_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].production) {
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["enableProdMode"])();
}
Object(_angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__["platformBrowserDynamic"])().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_2__["AppModule"])
    .catch(err => console.error(err));


/***/ }),

/***/ "zWEU":
/*!**********************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/numbers/numbers.component.html ***!
  \**********************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("  <!-- Add  Modal -->\r\n  <div class=\"modal fade\" id=\"addModel\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n  aria-hidden=\"true\">\r\n  <div class=\"modal-dialog model-lg\" role=\"document\">\r\n    <div class=\"modal-content\">\r\n      <div class=\"modal-header\">\r\n        <h5 class=\"modal-title\" id=\"formModal\">Create Number</h5>\r\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n          <span aria-hidden=\"true\">&times;</span>\r\n        </button>\r\n      </div>\r\n      <div class=\"modal-body\">\r\n        <form id=\"addLabel\" [formGroup]=\"addForm\" (ngSubmit)=\"onSubmit()\">\r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n          <div class=\"form-group\">\r\n              <label>Country</label>\r\n              <select formControlName=\"country\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.country.errors }\" [value]=\"''\" (change)=\"addprefix($event.target.value)\"> \r\n                <option value=\"\">Select Country</option>\r\n                <option value=\"United States\">United States</option>\r\n                <option value=\"United Kingdom\">United Kingdom</option>\r\n              </select>\r\n              <div *ngIf=\"Submitted && addformcontrol.country.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"addformcontrol.country.errors.required\">Country is required</div>\r\n              </div>              \r\n           </div>\r\n\r\n           <div class=\"form-group\">\r\n            <div class=\"control-group\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Number Type:</label>\r\n                <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberTypeadd==0}\" (click)=\"numberTypeval(0)\"> \r\n                      <input class=\"form-check-input\" name=\"numberType\" formControlName=\"numberType\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                      Toll Free\r\n                    </label>\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberTypeadd==1}\" (click)=\"numberTypeval(1)\">\r\n                      <input class=\"form-check-input\" name=\"numberType\" formControlName=\"numberType\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                       Local\r\n                    </label>                 \r\n                  </div>                \r\n            </div>        \r\n          </div>\r\n          \r\n            <!-- <div class=\"row\">\r\n              <div class=\"col-md-12\">\r\n                <div class=\"form-group\">\r\n                  <label  class=\"d-block\">Select Number/Purchase Number :</label>\r\n                  <select #numbertype class=\"form-control\" formControlName=\"select_numbertype\" [value]=\"0\" (change)=\"purchase_number($event.target.value)\">\r\n                    <option value=\"0\">Enter Number</option>\r\n                    <option value=\"1\">Purchase Number</option>                    \r\n                  </select>          \r\n                </div>\r\n              </div>              \r\n            </div>            -->\r\n            <!-- {{numbertype.value}} -->\r\n            <div class=\"row\">\r\n              <div class=\"col-md-6\">\r\n                <div class=\"form-group\">\r\n                  <label  class=\"d-block\">Prefix :</label>\r\n                  <input formControlName=\"prefix\" type=\"text\" class=\"form-control\">           \r\n                </div>\r\n              </div>\r\n              <!-- *ngIf=\"numbertype.value==0\" -->\r\n              <div class=\"col-md-6\"  >\r\n                <div class=\"form-group\">\r\n                  <label  class=\"d-block\">Number :</label>\r\n                  <input formControlName=\"number\" type=\"text\" class=\"form-control\">           \r\n                </div>\r\n              </div>\r\n            </div>           \r\n  \r\n            <div class=\"form-group\">\r\n              <label  class=\"d-block\">Assign Publisher :</label>\r\n              <!-- <select formControlName=\"publisher\" class=\"form-control\" [value]=\"''\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.publisher.errors }\">\r\n                <option value=\"\">Select Publisher</option>\r\n                <option *ngFor=\"let publisher of publishers;\" [value]=\"publisher.id\">{{publisher.text}}</option>\r\n              </select>  -->\r\n              <angular2-multiselect [data]=\"publishers\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.publisher.errors }\" formControlName=\"publisher\" [settings]=\r\n                \"{\r\n                  enableSearchFilter: true,\r\n                  showCheckbox:false,\r\n                  singleSelection: true, text:'Assign Publisher'}\">\r\n              </angular2-multiselect> \r\n              <div *ngIf=\"Submitted && addformcontrol.publisher.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"addformcontrol.publisher.errors.required\">Publisher is required</div>\r\n            </div>                                               \r\n            </div>\r\n\r\n            <div class=\"control-group mt-2\" *ngIf=\"this.addForm.get('publisher').value!=''\">\r\n              <label class=\"control-label input-label\" for=\"startTime\">Payout Type :</label>\r\n              <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n              <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==0}\" (click)=\"payout_typevaledit(0)\"> \r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                    None\r\n                  </label>\r\n                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payout_typevaledit(1)\">\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                    Fixed Payout\r\n                  </label>\r\n                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payout_typevaledit(2)\">\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                    Revenue %\r\n                  </label>\r\n                </div>\r\n                <div *ngIf=\"publisherSubmitted && publisherFormcontrol.payout_typeedit.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"publisherFormcontrol.payout_typeedit.errors.required\">Payout Type is required</div>\r\n              </div>   \r\n              </div>\r\n              <div *ngIf=\"payout_typevalueedit != 0\">\r\n                <div class=\"control-group mt-2\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Payout Amount :</label>\r\n                      <div class=\"input-group\">\r\n                        <div class=\"input-group-prepend\">\r\n                          <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                        </div>\r\n                        <input type=\"text\" formControlName=\"payout_amount\" class=\"form-control\" placeholder=\"Enter Payout Amount\" aria-label=\"Enter Payout Amount\" aria-describedby=\"btnGroupAddon\">\r\n                      </div>                 \r\n                </div>\r\n                \r\n              <div class=\"control-group mt-2\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Payout Trigger :</label>\r\n                  <select class=\"form-control\" formControlName=\"payout_trigger\">\r\n                    <option value=\"0\">Inbound Call</option>\r\n                    <option value=\"1\">Call Length</option>\r\n                    <option value=\"2\">Call Successfully Connected</option>\r\n                  </select>              \r\n              </div>\r\n              <div class=\"control-group mt-2\" *ngIf=\"this.addForm.get('payout_trigger').value == 1\">\r\n                  <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                  <input type=\"text\"  class=\"form-control\" type=\"text\" formControlName=\"payout_seconds\" placeholder=\"Enter Seconds\" />         \r\n              </div>\r\n            </div>\r\n         \r\n            <div class=\"form-group\">\r\n              <label  class=\"d-block\">Select Campaign :</label>\r\n              <!-- <select formControlName=\"campain\" class=\"form-control\" [value]=\"''\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.campain.errors }\">\r\n                <option value=\"\">Select Campaign</option>\r\n                <option *ngFor=\"let campain of getallcampain;\" [value]=\"campain.id\">{{campain.text}}</option>\r\n              </select>    -->\r\n              <angular2-multiselect [data]=\"getallcampain\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.campain.errors }\" formControlName=\"campain\" [settings]=\r\n                \"{\r\n                  enableSearchFilter: true,\r\n                  showCheckbox:false,\r\n                  singleSelection: true, text:'Assign Campaign'}\">\r\n              </angular2-multiselect> \r\n              <div *ngIf=\"Submitted && addformcontrol.campain.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"addformcontrol.campain.errors.required\">Campaign is required</div>\r\n            </div>                                             \r\n            </div>\r\n\r\n            <div class=\"form-group\">\r\n              <label>Associated Label</label>\r\n               <angular2-multiselect [data]=\"dropdownList\" formControlName=\"assosciated_labels\" [settings]=\"dropdownSettings\" [ngClass]=\"{ 'is-invalid': submitted && f.assosciated_labels.errors }\" ></angular2-multiselect>\r\n               <div *ngIf=\"submitted && f.assosciated_labels.errors\" class=\"invalid-feedback\">\r\n                 <div *ngIf=\"f.assosciated_labels.errors.required\">Assosciated Labels is required</div>\r\n             </div> \r\n            </div>\r\n           \r\n           </div>       \r\n       </div>\r\n          <div class=\"modal-footer\" style=\"padding: 0;\">\r\n             <button (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Number</button>\r\n             <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n            </div>\r\n        </form>\r\n      </div>\r\n    </div>\r\n  </div>\r\n  </div>   \r\n \r\n \r\n  <div class=\"modal fade\" id=\"editModel\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\n  aria-hidden=\"true\">\r\n  <div class=\"modal-dialog model-lg\" role=\"document\">\r\n    <div class=\"modal-content\">\r\n      <div class=\"modal-header\">\r\n        <h5 class=\"modal-title\" id=\"formModal\">Update Number</h5>\r\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n          <span aria-hidden=\"true\">&times;</span>\r\n        </button>\r\n      </div>\r\n      <div class=\"modal-body\">\r\n        <form id=\"editLabel\" [formGroup]=\"editForm\" (ngSubmit)=\"onEditSubmit()\">\r\n          <div class=\"row\">\r\n            <div class=\"col-md-12\">\r\n          <div class=\"form-group\">\r\n              <label>Country</label>\r\n              <input type=\"hidden\" name=\"uuid\" formControlName=\"uuid\" >\r\n              <select formControlName=\"country\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.country.errors }\" [value]=\"''\" (change)=\"editprefix($event.target.value)\"> \r\n                <option value=\"\">Select Country</option>\r\n                <option value=\"United States\">United States</option>\r\n                <option value=\"United Kingdom\">United Kingdom</option>\r\n              </select>\r\n              <div *ngIf=\"Submitted && addformcontrol.country.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"addformcontrol.country.errors.required\">Country is required</div>\r\n              </div>              \r\n           </div>\r\n\r\n           <div class=\"form-group\">\r\n            <div class=\"control-group\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Number Type:</label>\r\n                <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n                <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberTypeadd==0}\" (click)=\"numberTypeval(0)\"> \r\n                      <input class=\"form-check-input\" name=\"numberType\" formControlName=\"numberType\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                      Toll Free\r\n                    </label>\r\n                    <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': numberTypeadd==1}\" (click)=\"numberTypeval(1)\">\r\n                      <input class=\"form-check-input\" name=\"numberType\" formControlName=\"numberType\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                       Local\r\n                    </label>                 \r\n                  </div>                \r\n            </div>        \r\n          </div>\r\n          \r\n            <div class=\"row\">\r\n              <div class=\"col-md-6\">\r\n                <div class=\"form-group\">\r\n                  <label  class=\"d-block\">Prefix :</label>\r\n                  <input formControlName=\"prefix\" type=\"text\" class=\"form-control\">           \r\n                </div>\r\n              </div>\r\n              <div class=\"col-md-6\">\r\n                <div class=\"form-group\">\r\n                  <label  class=\"d-block\">Number :</label>\r\n                  <input formControlName=\"number\" type=\"text\" class=\"form-control\">           \r\n                </div>\r\n              </div>\r\n            </div>           \r\n  \r\n            <div class=\"form-group\">\r\n              <label  class=\"d-block\">Assign Publisher :</label>\r\n              <!-- <select formControlName=\"publisher\" class=\"form-control\" [value]=\"''\">\r\n                <option value=\"\">Select Publisher</option>\r\n                <option *ngFor=\"let publisher of publishers;\" [value]=\"publisher.id\">{{publisher.text}}</option>\r\n              </select>                                  -->\r\n              <angular2-multiselect [data]=\"publishers\" [(ngModel)]=\"selectedItemspub\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.publisher.errors }\" formControlName=\"publisher\" [settings]=\r\n              \"{\r\n                enableSearchFilter: true,\r\n                showCheckbox:false,\r\n                singleSelection: true, text:'Assign Publisher'}\">\r\n            </angular2-multiselect>\r\n            </div>\r\n\r\n            \r\n            <div class=\"control-group mt-2\" *ngIf=\"this.editForm.get('publisher').value!=''\">\r\n              <label class=\"control-label input-label\" for=\"startTime\">Payout Type :</label>\r\n              <div class=\"btn-group form-control\" data-toggle=\"buttons\">\r\n              <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==0}\" (click)=\"payoutedit_typeval(0)\"> \r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option1\" [value]=\"0\">\r\n                    None\r\n                  </label>\r\n                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==1}\" (click)=\"payoutedit_typeval(1)\">\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option2\" [value]=\"1\">\r\n                    Fixed Payout\r\n                  </label>\r\n                  <label class=\"btn btn-primary form-check-label\" [ngClass]=\"{'active': editpayout_typeval==2}\" (click)=\"payoutedit_typeval(2)\">\r\n                    <input class=\"form-check-input\" name=\"payout_typeedit\" formControlName=\"payout_typeedit\" type=\"radio\" id=\"option3\" [value]=\"2\">\r\n                    Revenue %\r\n                  </label>\r\n                </div>\r\n                <!-- <div *ngIf=\"publisherSubmitted && publisherFormcontrol.payout_typeedit.errors\" class=\"invalid-feedback\">\r\n                  <div *ngIf=\"publisherFormcontrol.payout_typeedit.errors.required\">Payout Type is required</div>\r\n              </div>    -->\r\n              </div>\r\n\r\n              <div *ngIf=\"payoutedit_typevalue != 0\">\r\n                <div class=\"control-group mt-2\">\r\n                    <label class=\"control-label input-label\" for=\"startTime\">Payout Amount :</label>\r\n                      <div class=\"input-group\">\r\n                        <div class=\"input-group-prepend\">\r\n                          <div class=\"input-group-text\" id=\"btnGroupAddon\">$</div>\r\n                        </div>\r\n                        <input type=\"text\" formControlName=\"payout_amount\" class=\"form-control\" placeholder=\"Enter Payout Amount\" aria-label=\"Enter Payout Amount\" aria-describedby=\"btnGroupAddon\">\r\n                      </div>                 \r\n                </div>\r\n                \r\n              <div class=\"control-group mt-2\">\r\n                <label class=\"control-label input-label\" for=\"startTime\">Payout Trigger :</label>\r\n                  <select class=\"form-control\" formControlName=\"payout_trigger\">\r\n                    <option value=\"0\">Inbound Call</option>\r\n                    <option value=\"1\">Call Length</option>\r\n                    <option value=\"2\">Call Successfully Connected</option>\r\n                  </select>              \r\n              </div>\r\n              <div class=\"control-group mt-2\" *ngIf=\"this.editForm.get('payout_trigger').value == 1\">\r\n                  <label class=\"control-label input-label\" for=\"startTime\">Enter Seconds :</label>\r\n                  <input type=\"text\"  class=\"form-control\" type=\"text\" formControlName=\"payout_seconds\" placeholder=\"Enter Seconds\" />         \r\n              </div>\r\n            </div>\r\n\r\n\r\n            <div class=\"form-group mt-2\">\r\n              <label  class=\"d-block\">Select Campaign :</label>\r\n              <!-- <select formControlName=\"campain\" class=\"form-control\">\r\n                <option value=\"\">Select Campaign</option>\r\n                <option *ngFor=\"let campain of getallcampain;\" [value]=\"campain.id\">{{campain.text}}</option>\r\n              </select>                                             -->\r\n              <angular2-multiselect [data]=\"getallcampain\" [(ngModel)]=\"selectedItemscam\" [ngClass]=\"{ 'is-invalid': Submitted && addformcontrol.campain.errors }\" formControlName=\"campain\" [settings]=\r\n                \"{\r\n                  enableSearchFilter: true,\r\n                  showCheckbox:false,\r\n                  singleSelection: true, text:'Assign Campaign'}\">\r\n              </angular2-multiselect> \r\n            </div>\r\n\r\n            <div class=\"form-group\">\r\n              <label>Associated Label</label>\r\n               <angular2-multiselect [ngModelOptions]=\"{standalone: true}\" [(ngModel)]=\"labels\" [data]=\"dropdownList\"  [settings]=\"dropdownSettings\"></angular2-multiselect>\r\n               <!-- <div *ngIf=\"submitted && f.assosciated_labels.errors\" class=\"invalid-feedback\">\r\n                 <div *ngIf=\"f.assosciated_labels.errors.required\">Assosciated Labels is required</div>\r\n             </div>  -->\r\n              <small><a href=\"#\" class=\"\" data-toggle=\"modal\" data-target=\"#addLabels\">Add New Label</a></small>\r\n           </div>\r\n           \r\n           </div>       \r\n       </div>\r\n          <div class=\"modal-footer\" style=\"padding: 0;\">\r\n             <button (click)=\"closeEditModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Update Number</button>\r\n             <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n            </div>\r\n        </form>\r\n      </div>\r\n    </div>\r\n  </div>\r\n  </div>   \r\n\r\n\r\n  <!-- Add Label Modal -->\r\n<div class=\"modal fade\" id=\"addLabels\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"formModal\"\r\naria-hidden=\"true\">\r\n<div class=\"modal-dialog\" role=\"document\">\r\n  <div class=\"modal-content\">\r\n    <div class=\"modal-header\">\r\n      <h5 class=\"modal-title\" id=\"formModal\">Create Label</h5>\r\n      <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\r\n        <span aria-hidden=\"true\">&times;</span>\r\n      </button>\r\n    </div>\r\n    <div class=\"modal-body\">\r\n      <form id=\"addLabel\" [formGroup]=\"addLabelForm\" (ngSubmit)=\"onLabelSubmit()\">\r\n        <div class=\"row\">\r\n          <div class=\"col-md-12\">\r\n           <div class=\"form-group\">\r\n            <label>Label Name</label>\r\n            <input formControlName=\"name\" type=\"text\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': LabelSubmitted && labelcontrol.name.errors }\" (input)=\"validatename()\">\r\n            <div *ngIf=\"LabelSubmitted && labelcontrol.name.errors\" class=\"invalid-feedback\">\r\n                <div *ngIf=\"labelcontrol.name.errors.required\">Name is required</div>\r\n            </div>   \r\n            <div *ngIf=\"isName == 'success'  && isName != ''\" style=\"color:green;\">\r\n               Name Is Available\r\n             </div> \r\n              <div *ngIf=\"isName == 'fail' && isName != ''\" style=\"color:red;\">\r\n               Name Is Not Available\r\n             </div>           \r\n         </div>\r\n\r\n          <div class=\"form-group\">\r\n            <label  class=\"d-block\">Notes:</label>\r\n            <textarea formControlName=\"notes\" class=\"form-control\" [ngClass]=\"{ 'is-invalid': LabelSubmitted && labelcontrol.notes.errors }\"></textarea>                   \r\n            <div *ngIf=\"LabelSubmitted && labelcontrol.notes.errors\" class=\"invalid-feedback\">\r\n               <div *ngIf=\"labelcontrol.notes.errors.required\">Notes is required</div>\r\n           </div>         \r\n          </div>\r\n\r\n            </div>     \r\n    </div>  \r\n   \r\n        <div class=\"modal-footer\" style=\"padding: 0;\">\r\n           <button [disabled]=\"isName == 'fail'\" (click)=\"closeModal()\" type=\"submit\" class=\"btn btn-primary m-t-15 waves-effect\">Create Label</button>\r\n           <button  type=\"reset\" class=\"btn btn-secondary m-t-15 waves-effect\">Reset</button>\r\n          </div>\r\n      </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n</div>   \r\n\r\n\r\n  <div class=\"main-content\">  \r\n    <section class=\"section\">\r\n      <div class=\"section-body\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12\">\r\n            <div class=\"card\">\r\n                <div class=\"row\" style=\"margin-top: 20px;\r\n                \">\r\n                    <div class=\"col-3\">\r\n                        <div class=\"card-header\">\r\n                        <!-- <h4>Number Data</h4></div> -->\r\n                        <h4>Manage Numbers</h4></div>\r\n                    </div>\r\n                    <div class=\"col-9 text-right mt-2\" *ngIf=\"role!=3\">\r\n                        <div class=\"form-group\"  style=\"margin-right: 28px;padding: 3px;font-size: 14px;\">\r\n                          <button  data-toggle=\"modal\" data-target=\"#addModel\"  class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-plus\"></i> Create Number\r\n                          </button>\r\n                          <!-- [disabled]=\"ischecked === '1'\" -->\r\n                          <button (click)=\"onBatchEditSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-tasks\"></i> Batch Edit</button>                        \r\n                          <button routerLink=\"/numbers-import/2\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fa fa-plus\"></i> Import </button>\r\n                           <button (click)=\"exportdata()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-1\"><i class=\"fas fa-file-export\"></i> Export\r\n                          </button> \r\n                          <button [disabled]=\"ischecked === '1'\" (click)=\"onDeleteSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Delete Selected\r\n                          </button>     \r\n                          \r\n                          <button [disabled]=\"ischecked === '1'\" (click)=\"onStatusChangeSubmit()\" class=\"btn btn-primary daterange-btn icon-left btn-icon btn-sm p-2 mr-2\"><i class=\"fas fa-file-export\"></i> Selected Status Change\r\n                          </button>   \r\n                          \r\n                          </div>                       \r\n                    </div>\r\n              \r\n                </div>   \r\n                \r\n            <div class=\"row\">\r\n              <div class=\"col-md-12\">\r\n                <form  (ngSubmit)=\"loadNumbers()\">\r\n                  <div class=\"row\" style=\"margin-top: 10px;margin-left: 11px;\" > \r\n                  \r\n                  <div class=\"col-3\">\r\n                    <div class=\"form-group\">\r\n                      <label  class=\"d-block\">Search By Number :</label>\r\n                      <input type=\"text\" [(ngModel)]=\"searchbynumbers\" [ngModelOptions]=\"{standalone: true}\" class=\"form-control\" placeholder=\"Search Number\" >                                       \r\n                    </div>\r\n                  </div>\r\n                  \r\n                  <div class=\"col-3\" *ngIf=\"role!=3\">\r\n                    <div class=\"form-group\">\r\n                      <label  class=\"d-block\">Search By Campaign :</label>\r\n                      <!-- <select class=\"form-control\" [value]=\"''\" [(ngModel)]=\"searchbycampaign\" [ngModelOptions]=\"{standalone: true}\" >\r\n                        <option value=\"\">Select Campaign</option>\r\n                        <option *ngFor=\"let campain of getallcampain;\" [value]=\"campain.id\">{{campain.text}}</option>\r\n                      </select>    -->\r\n                      <angular2-multiselect [ngModelOptions]=\"{standalone: true}\" [(ngModel)]=\"searchbycampaign\" [data]=\"getallcampain\"  [settings]=\"campaigndropdownSettings\"></angular2-multiselect>                                         \r\n                    </div>\r\n                  </div>\r\n                 \r\n                  <div class=\"col-3\" *ngIf=\"role!=3\">\r\n                    <div class=\"form-group\">\r\n                      <label class=\"d-block\">Search By Label :</label>\r\n                      <!-- <select class=\"form-control\" [value]=\"''\"  [(ngModel)]=\"searchbylabels\" [ngModelOptions]=\"{standalone: true}\" >\r\n                        <option value=\"\">Select Label</option>\r\n                        <option *ngFor=\"let label of dropdownList;\" [value]=\"label.id\">{{label.itemName}}</option>\r\n                      </select>                                             -->\r\n\r\n                      <angular2-multiselect [ngModelOptions]=\"{standalone: true}\" [(ngModel)]=\"searchbylabels\" [data]=\"dropdownList\"  [settings]=\"dropdownSettings\"></angular2-multiselect>\r\n\r\n                    </div>\r\n                  </div>\r\n                  <!-- <div class=\"col-1\"></div> -->\r\n                  <div class=\"col-1 mt-4\" style=\"margin-top: 5px;\">\r\n                    <button type=\"submit\" class=\"btn btn-success btn-lg\"><i class=\"fas fa-search\"></i></button>\r\n                  </div>\r\n                </div>\r\n                </form> \r\n\r\n              </div>\r\n            </div>\r\n                \r\n              <div class=\"card-body\">\r\n                <div class=\"table-responsive\">\r\n                <table #dataTable class=\"table table-striped dataTable no-footer row-border hover\" style=\"width: 100%;\">\r\n                    <thead>\r\n                      <tr>\r\n                        <th style=\"padding: 10px;width: 1px;\" >\r\n                            <div class=\"custom-control custom-checkbox\" *ngIf=\"numbers?.length != 0\">\r\n                            <div *ngIf=\"role!=3\">\r\n                              <input type=\"checkbox\" class=\"custom-control-input\" id=\"customCheck1\" (change)=\"checkalldelete($event)\" (click)=\"deleteselected($event)\">\r\n                              <label class=\"custom-control-label\" for=\"customCheck1\"></label>\r\n                            </div>\r\n                            <div *ngIf=\"role==3\">\r\n                              \r\n                            </div>\r\n                            </div>\r\n                        </th>\r\n                        <th>Number</th>\r\n                        <th>Campaign</th>\r\n                        <!-- <th>Target</th>                         -->\r\n                        <th>Publisher</th>\r\n                        <th>Status</th>\r\n                        <th>Associated Label</th>\r\n                        <th>Allocated</th>\r\n                        <th>Action</th>\r\n                      </tr>\r\n                    </thead>\r\n                    <tbody *ngIf=\"numbers?.length != 0\">\r\n                        <tr *ngFor=\"let number of numbers\">\r\n                            <td *ngIf=\"role!=3\">\r\n                                <div class=\"custom-control custom-checkbox\">\r\n                                <input type=\"checkbox\" (click)=\"deleteselected($event)\" class=\"custom-control-input\" id=\"customCheck_{{number.uuid}}\"  [checked]=\"number.selected\" [value]=\"number.id\" >\r\n                                <label class=\"custom-control-label\" for=\"customCheck_{{number.uuid}}\"></label>\r\n                                </div>                                \r\n                            </td>\r\n                            <td *ngIf=\"role==3\">-</td>\r\n                            <td *ngIf=\"role!=3\"><a href=\"#\" (click)=\"editdata(number.uuid,number.prefix,number.number_type,number.number,number.country,number.publisher_uuid,number.campaign_uuid)\"  data-toggle=\"modal\" data-target=\"#editModel\" class=\"text-white actionedit\">\r\n                              \r\n                              <img *ngIf=\"number.country=='United States'\" src=\"../../../assets/img/us.png\" width=\"20px\" alt=\"\" srcset=\"\">\r\n                              <img *ngIf=\"number.country=='United Kingdom'\" src=\"../../../assets/img/uk.png\" width=\"20px\" alt=\"\" srcset=\"\">\r\n                              \r\n                              {{ number.number }}</a></td>\r\n                            \r\n                            <td *ngIf=\"role==3\">\r\n                              <img *ngIf=\"number.country=='United States'\" src=\"../../../assets/img/us.png\" width=\"20px\" alt=\"\" srcset=\"\">\r\n                              <img *ngIf=\"number.country=='United Kingdom'\" src=\"../../../assets/img/uk.png\" width=\"20px\" alt=\"\" srcset=\"\">\r\n                              \r\n                              {{ number.number }}</td>\r\n                            \r\n                            <td *ngIf=\"role!=3\"><a routerLink=\"/edit-campaign/{{number.campaign_uuid}}\"  routerLinkActive=\"router-link-active\">{{ number.campaign }}</a></td>                            \r\n                            <td *ngIf=\"role==3\">{{ number.campaign }}</td>                            \r\n                            <td>{{ number.publisher }}</td>\r\n                            <td *ngIf=\"number.status==1\">\r\n                              <span class=\"badge badge-success\">Enabled</span>\r\n                            </td>\r\n                            <td *ngIf=\"number.status==0\">\r\n                              <span class=\"badge badge-danger p-1\">Disabled</span>\r\n                            </td> \r\n\r\n                            <td>\r\n                              <span *ngFor=\"let assosciated_label of number.assosciated_labels?.split(',')\">\r\n                                  <span class=\"badge badge-primary p-1 ml-1\">{{assosciated_label }}</span><br>\r\n                              </span>\r\n                            </td> \r\n                            \r\n                            <td>{{ number.created_at }}</td>\r\n                            <td *ngIf=\"role!=3\"><a href=\"#\" (click)=\"editdata(number.uuid,number.prefix,number.number_type,number.number,number.country,number.publisher_uuid,number.campaign_uuid)\"  data-toggle=\"modal\" data-target=\"#editModel\" class=\"btn btn-primary btn-sm actionedit\"><i class=\"far fa-edit\"></i></a>&nbsp;<button (click)=\"Delete((number.uuid))\" class=\"btn btn-danger btn-sm actiondelete\"><i class=\"fas fa-times\"></i></button></td>\r\n                            <td *ngIf=\"role==3\">-</td>\r\n                        </tr>\r\n                    </tbody>\r\n                    <tbody *ngIf=\"numbers?.length == 0\">\r\n                      <tr>\r\n                        <td colspan=\"8\" class=\"no-data-available\">No data Available!</td>\r\n                      </tr>\r\n                    <tbody>\r\n                  </table>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </section>\r\n    \r\n  </div>");

/***/ }),

/***/ "zd4u":
/*!****************************************************************************!*\
  !*** ./src/app/modules/campaigns/campaign-view/campaign-view.component.ts ***!
  \****************************************************************************/
/*! exports provided: CampaignViewComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CampaignViewComponent", function() { return CampaignViewComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_campaign_view_component_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./campaign-view.component.html */ "zE7r");
/* harmony import */ var _campaign_view_component_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./campaign-view.component.scss */ "kL+B");
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../../global */ "XrUY");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _module_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../module.service */ "zTpG");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common/http */ "tk/3");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ngx-toastr */ "5eHb");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! sweetalert2 */ "PSD3");
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs */ "qCKp");
/* harmony import */ var ngx_ui_loader__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ngx-ui-loader */ "gren");
/* harmony import */ var angular_highcharts__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! angular-highcharts */ "a0Xn");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! highcharts/modules/exporting */ "AxlJ");
/* harmony import */ var highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! highcharts */ "6n/F");
/* harmony import */ var highcharts__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(highcharts__WEBPACK_IMPORTED_MODULE_15__);
















highcharts_modules_exporting__WEBPACK_IMPORTED_MODULE_14___default()(highcharts__WEBPACK_IMPORTED_MODULE_15__);
class DataTablesResponse {
}
let CampaignViewComponent = class CampaignViewComponent {
    constructor(renderer, moduleservice, toastrService, handler, fb, router, route, cdRef, ngxLoader) {
        this.renderer = renderer;
        this.moduleservice = moduleservice;
        this.toastrService = toastrService;
        this.fb = fb;
        this.router = router;
        this.route = route;
        this.cdRef = cdRef;
        this.ngxLoader = ngxLoader;
        this.locations = [];
        this.dropdownList = [];
        this.selectedItems = [];
        this.ServerUrl = _global__WEBPACK_IMPORTED_MODULE_3__["GlobalVariable"].BASE_API_URL;
        this.dtTrigger = new rxjs__WEBPACK_IMPORTED_MODULE_11__["Subject"]();
        this.dtOptions = {};
        this.editpayout_typeval = 0;
        this.campaignNumbers = [];
        this.campaignLabels = [];
        this.event = "";
        this.pendingdata = [];
        this.completed = [];
        this.offerdetails = [];
        this.Submitted = false;
        this.filtertype = 1;
        this.payout_typevalueedit = 0;
        this.addnoSubmitted = false;
        this.http = new _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HttpClient"](handler);
        this.uuid = this.route.snapshot.paramMap.get('id');
    }
    ngAfterViewChecked() {
        this.cdRef.detectChanges();
    }
    ngOnDestroy() {
        this.dtTrigger.unsubscribe();
    }
    ngOnInit() {
        this.showLoadingIndicator = true;
        setTimeout(() => { this.showLoadingIndicator = false; }, 1000);
        this.today = new Date().toISOString().split('T')[0];
        this.numberForm = this.fb.group({
            company_uuid: [''],
            user_uuid: [''],
            campaign_uuid: [''],
            notype: [0],
            prefix: [''],
        });
        this.getcampaignbyuuid();
        this.loadNumbers();
        this.loadcalls();
        this.getChartNumberOfCalls(this.event);
        this.loadcampaignpublishers(this.uuid);
        this.loadparticipationrequest(this.uuid);
    }
    getcampaignbyuuid() {
        this.moduleservice.getcampainbyuuid(this.uuid).subscribe(res => {
            this.getdata = res.campaigns;
            this.defaultconf = res.conf;
        }, error => this.error = error);
    }
    loadcampaignpublishers(uuid) {
        // console.log('ok');
        // return false;
        if ($.fn.DataTable.isDataTable(this.table.nativeElement)) {
            $(this.table.nativeElement).dataTable().fnDestroy();
        }
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "pageLength": 20,
            "lengthMenu": [[-1, 20, 100, 500, 2000], ["All", 20, 100, 500, 2000]],
            "order": [[0, "asc"]],
            "searchDelay": 350,
            ajax: (dataTablesParameters, callback) => {
                this.http.post(this.ServerUrl + 'getCampaignPublisher/' + uuid, dataTablesParameters, {}).subscribe(resp => {
                    this.campaignpublisher = resp.data;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "phoneno" }, { data: "action" },
            ],
            columnDefs: [
                {
                    "targets": [0],
                    "orderable": false,
                },
            ],
        };
        this.dataTable = $(this.table.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    loadparticipationrequest(uuid) {
        this.ngxLoader.startLoader('loader-03');
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.http.post(this.ServerUrl + 'getParticipationRequest/' + uuid, {}).subscribe(resp => {
            // console.log(resp);                    
            this.offerdetails = resp.offerdetails;
            this.firstDate = new Date(resp.offerdetails.exp_date);
            this.secondDate = new Date();
            const ONE_DAY = 1000 * 60 * 60 * 24;
            const differenceMs = Math.abs(this.firstDate - this.secondDate);
            this.diffdays = Math.round(differenceMs / ONE_DAY);
            this.pendingdata = resp.data.pending ? resp.data.pending : [];
            this.completed = resp.data.completed ? resp.data.completed : [];
            this.dtTrigger.next();
            this.ngxLoader.stopLoader('loader-03');
        }, error => this.error = error);
    }
    loadNumbers() {
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.moduleservice.loadNumbersfordropdown(this.currentCompany.uuid).subscribe(resp => {
            this.numberdata = resp;
            //  console.log(this.numberdata);
        }, error => this.error = error);
    }
    getType(type, val) {
        if (type == 1) {
            $("#tabs3").removeClass("btn btn-primary btn-sm camactivetab");
            $("#tabs2").removeClass("btn btn-primary btn-sm camactivetab");
            $("#tabs1").addClass("camactivetab");
            this.filtertype = 1;
            //  this.loadcallsdata(this.filterselected,this.selecteddate,1);
        }
        if (type == 2) {
            $("#tabs1").removeClass("btn btn-primary btn-sm camactivetab");
            $("#tabs3").removeClass("btn btn-primary btn-sm camactivetab");
            $("#tabs2").addClass("camactivetab");
            this.filtertype = 2;
            //  this.loadcallsdata(this.filterselected,this.selecteddate,4);
        }
        if (type == 3) {
            $("#tabs1").removeClass("btn btn-primary btn-sm camactivetab");
            $("#tabs2").removeClass("btn btn-primary btn-sm camactivetab");
            $("#tabs3").addClass("camactivetab");
            this.filtertype = 3;
            //  this.loadcallsdata(this.filterselected,this.selecteddate,4);
        }
    }
    reqdata(details) {
        this.parreqdata = details;
    }
    // iscreateoffer:Boolean=false;
    // iscreateoffertoggle() {    
    //   this.iscreateoffer = !this.iscreateoffer;    
    // }
    // isshowmessage:Boolean=true;
    // isshowmessagetoggle() {    
    //   this.isshowmessage = !this.isshowmessage;    
    // }
    offer_hide(status) {
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        $("#addpublisher").modal("hide");
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            text: 'Are you sure you want to Leave offer?',
            showCancelButton: true,
            confirmButtonText: "Apply",
            cancelButtonText: 'Cancel'
        }).then((result) => {
            if (result.value) {
                this.moduleservice.hideoffer(this.uuid, currentUser.uuid, status).subscribe(res => {
                    // console.log(res);return false;              
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Success!', 'Offer Leave Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    this.router.navigate(['/campaigns']);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
    loadcalls() {
        if ($.fn.DataTable.isDataTable(this.Pertable.nativeElement)) {
            $(this.Pertable.nativeElement).dataTable().fnDestroy();
        }
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        var that = this;
        this.dtOptions = {
            "pagingType": 'full_numbers',
            "processing": true,
            "serverSide": true,
            "paging": false,
            "info": false,
            // "lengthMenu": [[-1, 50, 100, 500, 2000, 5000], ["All", 50, 100, 500, 2000, 5000 ]],
            "pageLength": 20,
            // "ordering": false,
            "searching": false,
            ajax: (dataTablesParameters, callback) => {
                that.http.post(this.ServerUrl + 'getlastweekcalls/' + this.currentCompany.uuid + '/' + currentUser.timezone + '/', { 'dataTablesParameters': dataTablesParameters, 'user_uuid': currentUser.uuid, 'role': currentUser.role, 'campaign_uuid': this.uuid }, {}).subscribe(resp => {
                    // console.log(resp); return false;
                    that.labels = resp.campaign_no;
                    callback({
                        recordsTotal: resp.recordsTotal,
                        recordsFiltered: resp.recordsFiltered,
                        data: [],
                    });
                });
            },
            columns: [
                { data: "did" }, { data: "incoming_number" }, { data: "publisher" }, { data: "target" }, { data: "campaign" }, { data: "routed_to" }, { data: "routed_to" }, { data: "routed_to" },
            ],
        };
        this.dataTable = $(this.Pertable.nativeElement);
        this.dataTable.dataTable(this.dtOptions);
    }
    getChartNumberOfCalls(event) {
        // console.log(event);return false;
        if (event != '') {
            this.date1 = event.endDate._d;
        }
        else {
            this.date1 = '';
        }
        // console.log(this.date1);
        let currentUser = JSON.parse(localStorage.getItem('currentUser'));
        let params = {
            user_uuid: currentUser.uuid,
            role: currentUser.role,
            date: this.date1,
            campaign_uuid: this.uuid
        };
        this.moduleservice.getChartbyDate(this.currentCompany.uuid, params, currentUser.timezone).subscribe(res => {
            //  console.log(res); 
            if ($("html").hasClass("dark")) {
                this.bgcolorcode = 'rgb(17,19,25)';
            }
            this.chart = new angular_highcharts__WEBPACK_IMPORTED_MODULE_13__["Chart"]({
                chart: {
                    // polar: true,
                    type: 'line',
                    zoomType: 'x',
                    backgroundColor: this.bgcolorcode
                },
                exporting: {
                    enabled: true
                },
                title: {
                    text: ''
                },
                credits: {
                    enabled: false
                },
                xAxis: {
                    minRange: 0,
                    gridLineWidth: 0,
                    title: {
                        text: 'Hours'
                    }
                },
                yAxis: {
                    min: 0,
                    gridLineWidth: 1,
                    title: {
                        text: 'Number Of Calls'
                    }
                },
                legend: {
                    enabled: false
                },
                plotOptions: {
                    area: {
                        fillColor: {
                            linearGradient: {
                                x1: 0,
                                y1: 0,
                                x2: 0,
                                y2: 1
                            },
                            stops: [
                                [0, '#7cb5ec'],
                                [1, 'rgba(124,181,236,0)']
                            ]
                        },
                        marker: {
                            radius: 2
                        },
                        lineWidth: 1,
                        states: {
                            hover: {
                                lineWidth: 1
                            }
                        },
                        threshold: null
                    },
                    line: {
                        dataLabels: {
                            enabled: true
                        },
                        enableMouseTracking: false
                    }
                },
                series: [{
                        data: res,
                        type: 'area',
                        name: "Call Count"
                    }]
            });
        }, error => this.error = error);
    }
    closeModal() {
        if (!this.numberForm.invalid) {
            $("#addNumber").modal("hide");
        }
    }
    payout_typevaledit(val) {
        this.payout_typevalueedit = val;
        this.numberForm.get('notype').setValue(val);
    }
    get addnoFormcontrol() { return this.numberForm.controls; }
    onAddNoSubmit() {
        //  console.log(this.payoutForm.value);
        //  return false;
        this.addnoSubmitted = true;
        if (this.numberForm.invalid) {
            return;
        }
        var currentUser = JSON.parse(localStorage.getItem('currentUser'));
        this.currentCompany = JSON.parse(localStorage.getItem('currentCompany'));
        this.numberForm.get('company_uuid').setValue(this.currentCompany.uuid);
        this.numberForm.get('user_uuid').setValue(currentUser.uuid);
        this.numberForm.get('campaign_uuid').setValue(this.uuid);
        this.ngxLoader.startLoader('loader-04');
        this.moduleservice.purchase_number(this.uuid, this.numberForm.value).subscribe(res => {
            if (res.status !== 'error') {
                this.toastrService.success(res.message);
                this.Submitted = false;
                this.loadcampaignpublishers(this.uuid);
            }
            else {
                this.toastrService.error(res.message);
            }
            this.ngxLoader.stopLoader('loader-04');
        }, error => this.error = error);
    }
    DeleteNumber(no, uuid) {
        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire({
            title: 'Are you sure?',
            text: 'You want to Delete Record!',
            type: 'warning',
            showCancelButton: true,
            confirmButtonText: 'Yes, delete it!',
            cancelButtonText: 'No, keep it'
        }).then((result) => {
            if (result.value) {
                var currentUser = JSON.parse(localStorage.getItem('currentUser'));
                let formData = new FormData();
                formData.append('number', no);
                formData.append('number_uuid', uuid);
                this.ngxLoader.startLoader('loader-04');
                this.moduleservice.DeletePurNumber(formData).subscribe(res => {
                    // console.log(res);return false;
                    this.ngxLoader.stopLoader('loader-04');
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Deleted!', 'Record Deleted Successfully.');
                    setTimeout(() => {
                        sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                    }, 2000);
                    this.loadcampaignpublishers(this.uuid);
                }, error => this.error = error);
            }
            else if (result.dismiss === sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.DismissReason.cancel) {
                sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.fire('Cancelled', 'Your Record is safe :)', 'error');
                setTimeout(() => {
                    sweetalert2__WEBPACK_IMPORTED_MODULE_10___default.a.close();
                }, 2000);
            }
        });
    }
};
CampaignViewComponent.ctorParameters = () => [
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Renderer2"] },
    { type: _module_service__WEBPACK_IMPORTED_MODULE_6__["ModuleService"] },
    { type: ngx_toastr__WEBPACK_IMPORTED_MODULE_9__["ToastrService"] },
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HttpBackend"] },
    { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_8__["Router"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_8__["ActivatedRoute"] },
    { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectorRef"] },
    { type: ngx_ui_loader__WEBPACK_IMPORTED_MODULE_12__["NgxUiLoaderService"] }
];
CampaignViewComponent.propDecorators = {
    table: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['dataTable', { static: true },] }],
    Pertable: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['PerdataTable', { static: true },] }]
};
CampaignViewComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"])({
        selector: 'app-campaign-view',
        template: _raw_loader_campaign_view_component_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_campaign_view_component_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    })
], CampaignViewComponent);



/***/ }),

/***/ "zn8P":
/*!******************************************************!*\
  !*** ./$$_lazy_route_resource lazy namespace object ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

function webpackEmptyAsyncContext(req) {
	// Here Promise.resolve().then() is used instead of new Promise() to prevent
	// uncaught exception popping up in devtools
	return Promise.resolve().then(function() {
		var e = new Error("Cannot find module '" + req + "'");
		e.code = 'MODULE_NOT_FOUND';
		throw e;
	});
}
webpackEmptyAsyncContext.keys = function() { return []; };
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
module.exports = webpackEmptyAsyncContext;
webpackEmptyAsyncContext.id = "zn8P";

/***/ }),

/***/ "zvoc":
/*!**************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/sidebar/sidebar.component.html ***!
  \**************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"main-sidebar sidebar-style-2\" tabindex=\"1\" style=\"overflow: hidden; outline: none;\">\r\n    <aside id=\"sidebar-wrapper\">\r\n      <div class=\"sidebar-brand\">\r\n        <a> <img alt=\"image\" src=\"assets/img/logo.png\" class=\"header-logo\">\r\n        </a>\r\n      </div>\r\n      <div class=\"sidebar-user\">\r\n        <div class=\"sidebar-user-picture\">\r\n          <img alt=\"image\" src=\"assets/img/userbig.png\">\r\n        </div>\r\n        <div class=\"sidebar-user-details\">\r\n          <div class=\"user-name\">{{firstName}} {{lastName}}</div>\r\n          <div class=\"user-name\">{{companyName}}</div>\r\n          <!-- <div class=\"user-role\">Administrator</div> -->\r\n        </div>\r\n      </div>\r\n      <ul class=\"sidebar-menu\">\r\n        <li class=\"menu-header\">Menu\r\n        </li>\r\n\r\n        <div class=\"menu\" *ngFor=\"let menus of menu\">\r\n          <div *ngIf=\"(menus.url != 'target') && (menus.url != 'blocklist') && (menus.url != 'numbers') && (menus.url != 'settings') && (menus.url != 'reports')  && (menus.url != 'ivr-menu')\" >\r\n            <li class=\"dropdown active\" *ngIf=\"'/'+menus.url == this.router.url;\">\r\n              <a routerLink=\"/{{menus.url}}\" class=\"nav-link \"><i class=\"material-icons\">{{menus.icon}}</i> <span>{{menus.title}}</span></a>\r\n            </li>\r\n            \r\n            <li class=\"dropdown\" *ngIf=\"'/'+menus.url != this.router.url;\">\r\n            <a routerLink=\"/{{menus.url}}\" class=\"nav-link\"><i class=\"material-icons\">{{menus.icon}}</i> <span>{{menus.title}}</span></a>            \r\n\r\n            </li>\r\n            </div>\r\n  \r\n            <li class=\"dropdown\" dropdown *ngIf=\"menus.url == 'target'\" (click)=\"showSubmenu(0)\">\r\n              <a dropdownToggle class=\"nav-link has-dropdown\"><i class=\"material-icons\">{{menus.icon}}</i><span> {{menus.title}}</span></a>\r\n             <ul class=\"dropdown-menu target-item\" [ngClass]=\"{'show': this.router.url=='/target' || this.router.url=='/buyer'}\">\r\n                <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/target'}\"\r\n                  routerLink=\"/{{menus.url}}\">Manage Target</a></li>\r\n              \r\n                <li *ngIf=\"google_sheet_link\"><a target=\"_blank\" class=\"dropdown-item\" \r\n                  href=\"{{google_sheet_link}}\">Forwarding Number Directory</a></li>\r\n               \r\n                  <!-- <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/add-weekdays'}\"\r\n                  routerLink=\"/add-weekdays\">Add Week Days</a></li> -->\r\n                <li><a class=\"dropdown-item\" routerLink=\"/buyer\" [ngClass]=\"{'active': this.router.url=='/buyer'}\">Buyers </a></li>                                      \r\n              </ul>\r\n            </li>\r\n            <!-- {{this.router.url}} -->\r\n            <!-- {{routerurl}} -->\r\n           <li class=\"dropdown\" dropdown *ngIf=\"menus.url == 'reports'\" (click)=\"showSubmenu(1)\">\r\n              <a dropdownToggle class=\"nav-link has-dropdown\"><i class=\"material-icons\">{{menus.icon}}</i><span>  {{menus.title}}</span></a>\r\n              <ul class=\"dropdown-menu report-item\" [ngClass]=\"{'show': this.router.url=='/reports' || this.router.url=='/{{routerurl}}'}\">\r\n                <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/reports'}\"\r\n                  routerLink=\"/{{menus.url}}\">Reports</a></li>\r\n                <li *ngIf=\"role!=3\"><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/voicemail'}\"\r\n                  routerLink=\"/voicemail\">Voicemail</a></li>\r\n                <li *ngIf=\"role!=3\"><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/comparison-reports'}\"\r\n                  routerLink=\"/comparison-reports\">Comparison Reports</a></li>\r\n                 <li *ngIf=\"role!=3\">\r\n                  <div  *ngFor=\"let item1 of allsavedreports\">\r\n                    <a class=\"dropdown-item \" routerLink=\"/reports/{{item1.uuid}}/\" [ngClass]=\"{'active': this.router.url=='/routerurl'}\">{{item1.reportlabelname}}</a>\r\n                  </div>\r\n                </li>                        \r\n                </ul>\r\n            </li>\r\n\r\n            <li class=\"dropdown\" dropdown *ngIf=\"menus.url == 'blocklist'\" (click)=\"showSubmenu(2)\">\r\n              <a dropdownToggle class=\"nav-link has-dropdown\"><i class=\"material-icons\">{{menus.icon}}</i><span> {{menus.title}}</span></a>\r\n             <ul class=\"dropdown-menu blocklist-item\" [ngClass]=\"{'show': this.router.url=='/whitelist' || this.router.url=='/blacklist' || this.router.url=='/shortlist' || this.router.url=='/longlist'}\">\r\n                <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/whitelist'}\"\r\n                  routerLink=\"/whitelist\">Whitelist</a></li>\r\n                <li><a class=\"dropdown-item\" routerLink=\"/blacklist\" [ngClass]=\"{'active': this.router.url=='/blacklist'}\">Blacklist </a></li>                                      \r\n                <li><a class=\"dropdown-item\" routerLink=\"/shortlist\" [ngClass]=\"{'active': this.router.url=='/shortlist'}\">Shortlist </a></li>                                      \r\n                <li><a class=\"dropdown-item\" routerLink=\"/longlist\" [ngClass]=\"{'active': this.router.url=='/longlist'}\">Longlist </a></li>                                      \r\n              </ul>\r\n            </li>\r\n\r\n            <li class=\"dropdown\" dropdown *ngIf=\"menus.url == 'numbers'\" (click)=\"showSubmenu(3)\">\r\n              <a dropdownToggle class=\"nav-link has-dropdown\"><i class=\"material-icons\">{{menus.icon}}</i><span> {{menus.title}}</span></a>\r\n             <ul class=\"dropdown-menu numbers-item\" [ngClass]=\"{'show': this.router.url=='/numbers' || this.router.url=='/blocked-numbers' || this.router.url=='/number-pools'}\">\r\n                <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/numbers'}\"\r\n                  routerLink=\"/numbers\">Numbers</a></li>                                                \r\n                <li *ngIf=\"role!=3\"><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/blocked-numbers'}\"\r\n                  routerLink=\"/blocked-numbers\">Manage Blocked Numbers</a></li>                                                \r\n                <li *ngIf=\"role!=3\"><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/number-pools'}\"\r\n                  routerLink=\"/number-pools\">Manage Pools</a></li>                                                \r\n              </ul>\r\n            </li>\r\n           \r\n            <li class=\"dropdown\" dropdown *ngIf=\"menus.url == 'settings'\" (click)=\"showSubmenu(4)\">\r\n              <a dropdownToggle class=\"nav-link has-dropdown\"><i class=\"material-icons\">{{menus.icon}}</i><span> {{menus.title}}</span></a>\r\n             <ul class=\"dropdown-menu settings-item\" [ngClass]=\"{'show': this.router.url=='/manage-users' || this.router.url=='/publishers-registration-settings' || this.router.url=='/basic-setting' || this.router.url=='/alert-configuration' || this.router.url=='/change-log'}\">\r\n                <li *ngIf=\"role==2\"><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/manage-company'}\"\r\n                  routerLink=\"/manage-company\">Manage Company</a></li>                                                \r\n                <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/manage-users'}\"\r\n                  routerLink=\"/manage-users\">Manage Users</a></li>                                                \r\n                <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/publishers-registration-settings'}\"\r\n                  routerLink=\"/publishers-registration-settings\">Publisher Registration</a></li>                                                \r\n                <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/basic-setting'}\"\r\n                  routerLink=\"/basic-setting\">Basic Setting</a></li>                                                \r\n                <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/alert-configuration'}\"\r\n                  routerLink=\"/alert-configuration\">Alert Configuration</a></li>                                                \r\n                <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/change-log'}\"\r\n                  routerLink=\"/change-log\">Change Log</a></li>                                                \r\n              </ul>\r\n            </li>\r\n\r\n            <li class=\"dropdown\" dropdown *ngIf=\"menus.url == 'ivr-menu'\" (click)=\"showSubmenu(5)\">\r\n              <a dropdownToggle class=\"nav-link has-dropdown\"><i class=\"material-icons\">{{menus.icon}}</i><span> {{menus.title}}</span></a>\r\n             <ul class=\"dropdown-menu ivr-item\" [ngClass]=\"{'show': this.router.url=='/ivr-menu' || this.router.url=='/blocked-numbers' || this.router.url=='/number-pools'}\">\r\n                <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/ivr-menu'}\"\r\n                  routerLink=\"/ivr-menu\">IVR Options</a></li>              \r\n                <li><a class=\"dropdown-item\" [ngClass]=\"{'active': this.router.url=='/ivr-routing-plans'}\"\r\n                  routerLink=\"/ivr-routing-plans\">Routing Plans</a></li>              \r\n              </ul>\r\n            </li>\r\n        \r\n      </div>\r\n\r\n    \r\n       \r\n      </ul>\r\n    </aside>\r\n  </div>");

/***/ })

},[[0,"runtime","vendor"]]]);
//# sourceMappingURL=main-es2015.js.map