1"use strict";(self.webpackChunkcode_project_angular4_portal=self.webpackChunkcode_project_angular4_portal||[]).push([["default-ClientApp_app_modules_shared_ff-new-search_ff-new-search_component_ts"],{28026:(Te,I,l)=>{l.d(I,{A:()=>fe});var S=l(10467),e=l(17705),g=l(89417),f=l(67376),P=l(70152),O=l(23294),x=l(24988),b=l(88942),T=l(79988),v=l(63763),M=l(20400),k=l(51188),F=l(345),N=l(79313),j=l(20437),w=l(1896),u=l(60177),R=l(44613),G=l(224),V=l(88588),E=l(83269),B=l(85956),D=l(66737);let A=(()=>{class n{transform(t,o){const a=o.find(s=>s.Key==t)?.Value;return a?.length>25?a:null}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275pipe=e.EJ8({name:"dropdownTooltip",type:n,pure:!0})}}return n})();const $=["SearchInputElement"],H=["assetSearchBtn"];function Y(n,c){1&n&&(e.qex(0),e.nrm(1,"i",11),e.bVm())}function L(n,c){1&n&&e.nrm(0,"i",12)}const X=function(){return{right:"45px"}};function Q(n,c){if(1&n){const t=e.RV6();e.j41(0,"a",14),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.clearSearch())}),e.k0s()}2&n&&e.Y8G("ngStyle",e.lJ4(1,X))}function U(n,c){if(1&n&&(e.qex(0),e.DNE(1,Q,1,2,"a",13),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.isFilterRequired&&t.SearchControl&&(null==t.SearchControl||null==t.SearchControl.value?null:t.SearchControl.value.length)>0)}}const q=function(n){return{right:n}};function z(n,c){if(1&n){const t=e.RV6();e.j41(0,"a",14),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.clearSearch())}),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("ngStyle",e.eq3(1,q,t.isFromWorkOrder?"-239px":""))}}function W(n,c){if(1&n){const t=e.RV6();e.j41(0,"a",16),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.clearSearch())}),e.k0s()}}function K(n,c){if(1&n&&(e.DNE(0,z,1,3,"a",13),e.DNE(1,W,1,0,"a",15)),2&n){const t=e.XpG(2);e.Y8G("ngIf",t.isFilterRequired&&t.SearchControl&&(null==t.SearchControl||null==t.SearchControl.value?null:t.SearchControl.value.length)>0),e.R7$(1),e.Y8G("ngIf",!t.isFilterRequired&&t.SearchControl&&(null==t.SearchControl||null==t.SearchControl.value?null:t.SearchControl.value.length)>0)}}function J(n,c){1&n&&e.nrm(0,"span")}const Z=function(n){return{assetSearchSuggestionList:n}};function ee(n,c){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"ul",18)(2,"li",19),e.bIt("click",function(){const s=e.eBV(t).$implicit,m=e.XpG(5);return e.Njj(m.FetchSearchedResults(s))}),e.nrm(3,"i",20)(4,"a",21),e.k0s()(),e.DNE(5,J,1,0,"span",0),e.bVm()}if(2&n){const t=c.$implicit,o=c.last,a=e.XpG(2).last;e.R7$(1),e.Y8G("ngClass",e.eq3(3,Z,o&&a)),e.R7$(3),e.Y8G("innerHtml",t.ValueName,e.npT),e.R7$(1),e.Y8G("ngIf",o&&a)}}function te(n,c){if(1&n&&(e.qex(0),e.DNE(1,ee,6,5,"ng-container",17),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngForOf",t.value)}}function re(n,c){if(1&n&&(e.qex(0),e.j41(1,"h6"),e.EFF(2),e.k0s(),e.DNE(3,te,2,1,"ng-container",0),e.bVm()),2&n){const t=c.$implicit;e.R7$(2),e.SpI(" ",t.key," "),e.R7$(1),e.Y8G("ngIf",null==t?null:t.value)}}function ae(n,c){if(1&n&&(e.qex(0),e.DNE(1,re,4,2,"ng-container",17),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.allAssetSearchSuggestion)}}function ne(n,c){1&n&&(e.qex(0),e.j41(1,"p",22),e.EFF(2,"Please type atleast 2 characters to search."),e.k0s(),e.bVm())}function oe(n,c){1&n&&(e.qex(0),e.j41(1,"p",22),e.EFF(2,"No Result Found"),e.k0s(),e.bVm())}function ie(n,c){if(1&n&&(e.qex(0),e.EFF(1),e.bVm()),2&n){const t=e.XpG(2).$implicit;e.R7$(1),e.SpI(" - ",t.Type," ")}}function ce(n,c){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"ul")(2,"li")(3,"a",23),e.bIt("click",function(){e.eBV(t);const a=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.triggerFetchSearchResult(a))}),e.EFF(4),e.DNE(5,ie,2,1,"ng-container",0),e.k0s(),e.j41(6,"a",24),e.bIt("click",function(){e.eBV(t);const a=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.triggerDeleteSearch(a.SearchQuery,a.SearchCategoryId,!0,a.SearchId))}),e.nrm(7,"i",25),e.k0s()()(),e.bVm()}if(2&n){const t=e.XpG().$implicit;e.R7$(4),e.SpI(" ",t.SearchQuery," "),e.R7$(1),e.Y8G("ngIf",(null==t||null==t.Type?null:t.Type.length)>0)}}function se(n,c){if(1&n&&(e.qex(0),e.DNE(1,ce,8,2,"ng-container",0),e.bVm()),2&n){const t=c.$implicit;e.R7$(1),e.Y8G("ngIf",t)}}function le(n,c){if(1&n&&(e.qex(0),e.DNE(1,se,2,1,"ng-container",17),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.searchHistory)}}function he(n,c){if(1&n){const t=e.RV6();e.j41(0,"input",32),e.bIt("keyup",function(a){e.eBV(t);const s=e.XpG(3);
1return e.Njj(s.onFilterOutCategory(a))})("keydown",function(a){return a.stopPropagation()})("ngModelChange",function(a){e.eBV(t);const s=e.XpG(3);return e.Njj(s.searchCategoryText=a)}),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("placeholder",t.categoryPlacementName)("ngModel",t.searchCategoryText)}}function ge(n,c){if(1&n&&(e.qex(0),e.j41(1,"mat-option",33),e.EFF(2),e.k0s(),e.bVm()),2&n){const t=c.$implicit;e.R7$(1),e.FS9("value",+t.Key),e.Y8G("matTooltip",t.Value.length>25?t.Value:null),e.R7$(1),e.SpI(" ",t.Value," ")}}function pe(n,c){if(1&n&&(e.qex(0),e.DNE(1,ge,3,3,"ng-container",17),e.bVm()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.filterCategoryOption)}}function ue(n,c){1&n&&(e.j41(0,"mat-option",34),e.EFF(1," No result found "),e.k0s()),2&n&&e.Y8G("disabled",!0)}function me(n,c){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",26)(2,"div",27)(3,"mat-form-field",28)(4,"mat-select",29),e.bIt("selectionChange",function(a){e.eBV(t);const s=e.XpG(2);return e.Njj(s.CategorySelectionChange(a,s.CategorySelectionControl))})("closed",function(a){e.eBV(t);const s=e.XpG(2);return e.Njj(s.triggerResetEvent(a))}),e.nI1(5,"dropdownTooltip"),e.DNE(6,he,1,2,"input",30),e.DNE(7,pe,2,1,"ng-container",4),e.DNE(8,ue,2,1,"ng-template",null,31,e.C5r),e.k0s()()()(),e.bVm()}if(2&n){const t=e.sdS(9),o=e.XpG(2);e.R7$(4),e.FS9("panelClass",o.categoryPanelClass),e.Y8G("formControl",o.CategorySelectionControl)("matTooltip",e.i5U(5,6,o.CategorySelectionControl.value,o.filterCategoryOption)),e.R7$(2),e.Y8G("ngIf",o.isCategoryViewSearchRequired),e.R7$(1),e.Y8G("ngIf",o.filterCategoryOption.length>0)("ngIfElse",t)}}function _e(n,c){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",35)(2,"a",36,37),e.bIt("click",function(a){e.eBV(t);const s=e.XpG(2);return e.Njj(s.triggerSearchBtn(a))}),e.EFF(4,"GO"),e.k0s()(),e.bVm()}}function de(n,c){if(1&n){const t=e.RV6();e.j41(0,"div")(1,"a",38),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.onApprovalsButtonClick())}),e.EFF(2," Approvals "),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("href",t.approvalsButtonUrl,e.B4B)}}const C=function(n){return{active:n}};function Se(n,c){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",1)(2,"div",2)(3,"div",3),e.DNE(4,Y,2,0,"ng-container",4),e.DNE(5,L,1,0,"ng-template",null,5,e.C5r),e.DNE(7,U,2,1,"ng-container",4),e.DNE(8,K,2,2,"ng-template",null,6,e.C5r),e.j41(10,"input",7,8),e.bIt("keydown.enter",function(a){e.eBV(t);const s=e.sdS(11);return e.XpG().GetAssetListKeyboardPress(a),e.Njj(s.blur())})("focus",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.OnSearchFocus())})("blur",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.OnSearchBlur())}),e.k0s(),e.j41(12,"div",9),e.DNE(13,ae,2,1,"ng-container",0),e.DNE(14,ne,3,0,"ng-container",0),e.DNE(15,oe,3,0,"ng-container",0),e.k0s(),e.j41(16,"div",10),e.DNE(17,le,2,1,"ng-container",0),e.k0s()(),e.DNE(18,me,10,9,"ng-container",0),e.DNE(19,_e,5,0,"ng-container",0),e.k0s(),e.DNE(20,de,3,1,"div",0),e.k0s(),e.bVm()}if(2&n){const t=e.sdS(6),o=e.sdS(9),a=e.XpG();e.R7$(2),e.AVh("no-action-style",1==a.makeSearchDisabled)("no-go-button",!a.isGoButtonView),e.R7$(1),e.AVh("width-100",a.isSearchFullWidth),e.R7$(1),e.Y8G("ngIf",0==a.IsInSearchMode)("ngIfElse",t),e.R7$(3),e.Y8G("ngIf",a.isCrossIconWithActionButton)("ngIfElse",o),e.R7$(3),e.FS9("placeholder",a.placeholderText),e.Y8G("formControl",a.SearchControl),e.R7$(2),e.Y8G("ngClass",e.eq3(21,C,a._isFocused&&a.SearchControl&&(null==a.SearchControl||null==a.SearchControl.value?null:a.SearchControl.value.length)>0)),e.R7$(1),e.Y8G("ngIf",a.allAssetSearchSuggestion&&a.allAssetSearchSuggestion.length>0),e.R7$(1),e.Y8G("ngIf",(null==a.SearchControl?null:a.SearchControl.value)&&1==(null==a.SearchControl||null==a.SearchControl.value?null:a.SearchControl.value.length)&&a.isShowSearchSuggestion),e.R7$(1),e.Y8G("ngIf",a.allAssetSearchSuggestion&&a.allAssetSearchSuggestion.length<=0&&(null==a.SearchControl?null:a.SearchControl.value)&&(null==a.SearchControl||null==a.SearchControl.value?null:a.SearchControl.value.length)>1),e.R7$(1),e.Y8G("ngClass",e.eq3(23,C,a._isFocused&&(!a.SearchControl||(null==a.SearchControl||null==a.SearchControl.value?null:a.SearchControl.value.length)<1)&&a.searchHistory&&a.searchHistory.length>0)),e.R7$(1),e.Y8G("ngIf",a.searchHistory&&a.searchHistory.length>0),e.R7$(1),e.Y8G("ngIf",a.isCategoryView),e.R7$(1),e.Y8G("ngIf",a.isGoButtonView),e.R7$(1),e.Y8G("ngIf",a.showApprovalsButton)}}let fe=(()=>{class n{constructor(t,o,a,s,m,Ce,ye,Ie,Pe){var r=this;this.dialog=t,this._sharedService=o,this._sharedNetworkService=a,this.router=s,this.sanitizer=m,this._searchService=Ce,this.changeDetectorRef=ye,this._heapAnalytics=Ie,this.mixpanelTracking=Pe,this.searchMethod="",this.searchController="",this.nomenclatureHeap="",this.isFromWorkOrder=!1,this.searchHistoryController="",this.searchHistoryMethod="",this.isCategoryView=!1,this.isCategoryViewSearchRequired=!0,this.isGoButtonView=!1,this.groupByInput="groupHeader",this.filterOptions=[],this.CategoryOption=[],this.searchUrl="",this.filterCategoryTrigger=new e.bkB,this.searchSuggestionSelection=new e.bkB,this.categorySelection=new e.bkB,this.categoryPlacementName="All Categories",this.debounceTimeValue=500,this.placeholderText="Search",this.categoryPanelClass="categoryPanel",this.makeSearchDisabled=!1,this.showSearchHistory=!0,this.taskTypeId=0,this.moduleId=0,this.isSearchFullWidth=!1,this.canUpdateListOnClearSearch=!0,this.shouldEnterSearchPersist=!0,this.isSearchOnEnterRequired=!0,this.isFilterRequired=!0,this.isShowSearchSuggestion=!0,this.isCrossIconWithActionButton=!1,this.showApprovalsButton=!1,this.approvalsButtonUrl="",this.approvalsButtonClick=new e.bkB,this.searchCategoryText="",this.IsInSearchMode=!1,this.filterCategoryOption=[],this.tempSearchParameterObject=ne
1w x.qV,this.BASE_URL=b.E.BASE_URL,this.GetAssetListSuggestions=(0,S.A)(function*(){if(!r.searchController||!r.searchMethod)return;r.IsInSearchMode=!0;let i=Object.assign({},r.tempSearchParameterObject);if(i.TaskTypeId=r.taskTypeId,r._sharedService.isNullOrEmpty(r.tempSearchParameterObject.SearchQuery)||(i.SearchQuery=btoa(unescape(encodeURIComponent(r.tempSearchParameterObject.SearchQuery)))),r.searchParameterInput?.Filters&&(i.Filters=r.searchParameterInput.Filters),r.searchParameterInput.TaskId&&(i.TaskId=r.searchParameterInput.TaskId),r.searchParameterInput.HierarchyGroupId&&(i.HierarchyGroupId=r.searchParameterInput.HierarchyGroupId),r.searchParameterInput.FormTypeId&&(i.FormTypeId=r.searchParameterInput.FormTypeId),r.searchParameterInput.TaskTypeId&&(i.TaskTypeId=r.searchParameterInput.TaskTypeId),r.searchParameterInput.Status&&(i.Status=r.searchParameterInput.Status),r.searchParameterInput.WorkflowId&&(i.WorkflowId=r.searchParameterInput.WorkflowId),r.searchParameterInput.MonthYear&&(i.MonthYear=r.searchParameterInput.MonthYear),r.searchParameterInput.TaskIds&&(i.TaskIds=r.searchParameterInput.TaskIds),r.searchParameterInput.SiteId&&(i.SiteId=r.searchParameterInput.SiteId),r.searchParameterInput.EventId&&(i.EventId=r.searchParameterInput.EventId),r.searchParameterInput.AssetId&&(i.AssetId=r.searchParameterInput.AssetId),r.searchParameterInput.ModuleId&&(i.ModuleId=r.searchParameterInput.ModuleId),r.searchParameterInput.ProjectId&&(i.ProjectId=r.searchParameterInput.ProjectId),r.searchParameterInput.VehicleId&&(i.VehicleId=r.searchParameterInput.VehicleId),r.searchParameterInput.ReportTypeId&&(i.ReportTypeId=r.searchParameterInput.ReportTypeId),i.FinancialReconId=r.searchParameterInput.FinancialReconId?r.searchParameterInput.FinancialReconId:0,i.BatchId=r.searchParameterInput.BatchId?r.searchParameterInput.BatchId:0,i.OperationId=r.searchParameterInput.OperationId?r.searchParameterInput.OperationId:0,i.GetLinkedAssets=!!r.searchParameterInput.GetLinkedAssets&&r.searchParameterInput.GetLinkedAssets,i.RequestId=r.searchParameterInput.RequestId?r.searchParameterInput.RequestId:0,i.ExtensionId=r.searchParameterInput.ExtensionId?r.searchParameterInput.ExtensionId:0,i.IsAdvanceSearch=r.shortedSearchDesign,i.IsLinked=r.searchParameterInput.IsLinked,i.ListingTypeId=r.searchParameterInput.ListingTypeId,i.FolderId=r.searchParameterInput.FolderId,i.FiltersQuery=r.searchParameterInput?.FiltersQuery,i.AreAllDocumentsRequired=!!r.searchParameterInput?.AreAllDocumentsRequired&&r.searchParameterInput?.AreAllDocumentsRequired,i.PriorityId=r.searchParameterInput.Pri
1orityId?r.searchParameterInput.PriorityId:0,i.TicketTypeFilter=r.searchParameterInput.TicketTypeFilter?r.searchParameterInput.TicketTypeFilter:"",i.TimeRangeFilter=r.searchParameterInput.TimeRangeFilter?r.searchParameterInput.TimeRangeFilter:"",i.StatusName=r.searchParameterInput.StatusName?r.searchParameterInput.StatusName:"",i.TypeName=r.searchParameterInput.TypeName?r.searchParameterInput.TypeName:"",i.TicketTypeId=r.searchParameterInput.TicketTypeId?r.searchParameterInput.TicketTypeId:0,i.PriorityName=r.searchParameterInput.PriorityName?r.searchParameterInput.PriorityName:"",i.TaskTypeName=r.searchParameterInput.TaskTypeName?r.searchParameterInput.TaskTypeName:"",r.searchParameterInput?.ManufacturerName&&(i.ManufacturerName=r.searchParameterInput.ManufacturerName),r.searchParameterInput?.TimeRangeFilter&&(i.TimeRangeFilter=r.searchParameterInput.TimeRangeFilter),r.searchParameterInput?.TicketTypeFilter&&(i.TicketTypeFilter=r.searchParameterInput.TicketTypeFilter),r.searchParameterInput?.TypeName&&(i.TypeName=r.searchParameterInput.TypeName),r.searchParameterInput?.StatusName&&(i.StatusName=r.searchParameterInput.StatusName),r.searchParameterInput?.TaskTypeName&&(i.TaskTypeName=r.searchParameterInput.TaskTypeName),r.allAssetSearchSuggestion=[],r.triggerHtmlChangeDetection(),!r._sharedService.isNullOrEmpty(r.tempSearchParameterObject.SearchQuery)){let p=yield r._searchService.GetListSuggestions(i,r.searchController,r.searchMethod);p.map(h=>{h.ValueName=h.HighlightedValue?r.sanitizer.bypassSecurityTrustHtml(h.HighlightedValue):h.value}),r.allAssetSearchSuggestion=r._sharedService.groupByDataFunction(p,r.groupByInput),r.allAssetSearchSuggestion.sort((h,_)=>"Section Name"===h.key?-1:"Section Name"===_.key?1:0),r.triggerHtmlChangeDetection()}r.IsInSearchMode=!1}),this.SearchKeySuggestion=i=>{this.tempSearchParameterObject.SearchQuery=this.SearchControl.value},this.resetSearchParameters=()=>{this.tempSearchParameterObject.Filters=[],this.tempSearchParameterObject.SearchQuery="",this.tempSearchParameterObject.SearchResultId=0,this.tempSearchParameterObject.PageNumber=0,this.tempSearchParameterObject.PageSize=0,this.tempSearchParameterObject.ModuleId=0,this.tempSearchParameterObject.SortIndex=1,this.tempSearchParameterObject.SortOrder="desc",this.tempSearchParameterObject.CallingSource=0,this.tempSearchParameterObject.CategoryId=0,this.tempSearchParameterObject.SurveyId=0,this.tempSearchParameterObject.DateRangeFilterId=0,this.searchCategoryText="",this.searchParameterInput&&(this.tempSearchParameterObject=Object.assign({},this.searchParameterInput))},this.updateRecentSearchList=(0,S.A)(function*(i="",y=0,p=!1,h=0,_=0,Oe="",xe){let d={SearchQuery:i,SearchCategoryId:y,IsDelete:p,SearchId:h,TaskTypeId:r.taskTypeId,SearchResultId:_,FormTypeId:r.taskTypeId,SearchResultText:Oe,ModuleId:r.moduleId,QuestionId:xe??null};if(r.searchParameterInput.ListingTypeId&&r.searchParameterInput.FolderId&&(d.ListingTypeId=r.searchParameterInput.ListingTypeId,d.FolderId=r.searchParameterInput.FolderId),(!r._sharedService.isNullOrEmpty(i)||p)&&r.showSearchHistory){let be=yield r._searchService.UpdateRecentSearchList(d,r.searchHistoryController,r.searchHistoryMethod);r.searchHistory=be.RecentSearchList}}),this.CategorySelectionControl=new g.MJ("0"),this.SearchControl=new g.MJ(""),this.getSessionDetail=localStorage.getItem("userDataset")?JSON.parse(localStorage.getItem("userDataset")):{}}ngOnInit(){this.router?.firstChild?.snapshot?.paramMap?.get("surveyId")&&(this.defaultCategorySelection=parseInt(atob(this.router?.firstChild?.snapshot?.paramMap?.get("surveyId")))),this.defaultCategorySelection&&this.CategorySelectionControl.patchValue(this.defaultCategorySelection.toString()),this.tempSearchParameterObject.Email=this.getSessionDetail.Email,this.tempSearchParameterObject.EmployeeId=this.getSessionDetail.EmpId,this.tempSearchParameterObject.
1LanguageId=this.getSessionDetail.activeLang,this.resetSearchParameters(),this.initiateSearch()}onFilterOutCategory(t){if(t&&t?.target&&t?.target?.value){const o=t?.target?.value?.toLowerCase();this.filterCategoryOption=this.CategoryOption.filter(a=>a?.Value?.toLowerCase().includes(o))}}triggerResetEvent(t,o=!1,a=0){o&&this.CategorySelectionControl?.patchValue(a.toString()),this.searchCategoryText="",this.filterCategoryOption=[...this.CategoryOption],this.triggerHtmlChangeDetection()}CategorySelectionChange(t,o){this.tempSearchParameterObject.SurveyId=parseInt(t?.value),this.tempSearchParameterObject.SearchCategoryId=0,this.tempSearchParameterObject.SearchQuery="",this.tempSearchParameterObject.SearchResultId=0,this.tempSearchParameterObject.CategoryId=0,this.SearchControl.reset(),this.categorySelection.emit(this.tempSearchParameterObject)}triggerSearchBtn(t){this.mixpanelTracking.trackEvent("Search Button Clicked",{searchQuery:this.tempSearchParameterObject.SearchQuery,categoryId:this.tempSearchParameterObject.CategoryId,surveyId:this.tempSearchParameterObject.SurveyId}),this.updateRecentSearchList(this.tempSearchParameterObject.SearchQuery,0,!1,0).then(),this.searchSuggestionSelection.emit(this.tempSearchParameterObject)}initiateSearch(){this.searchInstantiated||(this.searchInstantiated=!0,this.SearchControl.reset(),this.formCtrlSub=this.SearchControl.valueChanges.pipe((0,P.B)(this.debounceTimeValue),(0,O.F)()).subscribe(t=>{this.SearchKeySuggestion(),this.isShowSearchSuggestion&&this.GetAssetListSuggestions().then()}),this.filterCategoryOption=(0,f.cloneDeep)(this.CategoryOption))}GetAssetListKeyboardPress(t){if(this.isSearchOnEnterRequired){if(this.tempSearchParameterObject.SearchQuery=this.SearchControl.value,this.tempSearchParameterObject.SearchResultId=0,this.tempSearchParameterObject.CategoryId=0,this.updateRecentSearchList(this.tempSearchParameterObject.SearchQuery,0,!1,0),this.searchSuggestionSelection.emit(this.tempSearchParameterObject),this.shouldEnterSearchPersist)return void(this._isFocused=!1);this.SearchControl.reset()}}ngOnDestroy(){this.SearchControl?.reset(),this.CategorySelectionControl?.reset(),this.formCtrlSub?.unsubscribe()}FetchSearchedResults(t){this.tempSearchParameterObject.SearchQuery=t.Name?t.Name:t.value,this.tempSearchParameterObject.SearchResultId=this.isNumber(t.key)?parseInt(t.key):0,this.tempSearchParameterObject.SearchParam=t.searchParam?t.searchParam:"",this.tempSearchParameterObject.CategoryId=t.CategoryId,this.tempSearchParameterObject.QuestionId=t.QuestionId,this.updateRecentSearchList(this.tempSearchParameterObject.SearchQuery,this.tempSearchParameterObject.CategoryId,!1,0,this.tempSearchParameterObject.SearchResultId,this.tempSearchParameterObject.SearchParam,this.tempSearchParameterObject.QuestionId).then(),this.searchSuggestionSelection.emit(this.tempSearchParameterObject),this.nomenclatureHeap&&this.nomenclatureHeap.length>0&&this.mixpanelTracking.trackEvent(this.nomenclatureHeap)}isNumber(t){return t&&null!=t&&""!==t&&!isNaN(Number(t.toString()))}OnSearchFocus(){this._isFocused=!0}OnSearchBlur(){setTimeout(()=>{this._isFocused=!1},100)}resetEverything(t,o=!1){this.resetSearchParameters(),this.SearchControl.reset(),o&&(this.tempSearchParameterObject.SurveyId=parseInt(this.CategorySelectionControl.value)),t&&this.CategorySelectionControl.reset()}triggerDeleteSearch(t,o,a,s){this.mixpanelTracking.trackEvent("Search History Deleted",{query:t,categoryId:o,searchId:s}),this.searchInputElementRef.nativeElement.focus(),this.updateRecentSearchList(t,o,a,s).then()}triggerFetchSearchResult(t){this.mixpanelTracking.trackEvent("Search History Item Clicked",{searchQuery:this.tempSearchParameterObject.SearchQuery,categoryId:this.tempSearchParameterObject.CategoryId,surveyId:this.tempSearchParameterObject.SurveyId}),this.tempSearchParameterObject.SearchQuery=t.SearchQuery,this.tempSearchParameterObject.CategoryId=t.SearchCategoryId?t.SearchCategoryId:0,this.tempSearchParameterObject.SearchResultId=t.SearchResultId?t.SearchResultId:0,this.tempSearchParameterObject.SearchParam=t.SearchResultText?t.SearchResultText:"",this.SearchControl.setValue(t.SearchQuery),this.updateRecentSearchList(t.SearchQuery,t.SearchCategoryId,!1,0,this.tempSearchParameterObject.SearchResultId,this.tempSearchParameterObject.SearchParam).then(),this.searchSuggestionSelection.emit(this.tempSearchParameterObject)}clearSearch(){this.mixpanelTracking.trackEvent("Search Cleared",{previousQuery:this.tempSearchParameterObject.SearchQuery,categoryId:this.tempSearchParameterObject.CategoryId}),this.SearchControl.reset(),this.canUpdateListOnClearSearch&&(this.tempSearchParameterObject.SearchQuery="",this.tempSearchParameterObject.SearchResultId=0,this.searchSuggestionSelection.emit(this.tempSearchParameterObject))}resetSearchControl(){this.SearchControl.reset()}triggerHtmlChangeDetection(){this.changeDetectorRef.markForCheck(),this.changeDetectorRef.detectChanges()}triggerSetSearch(){this.SearchControl.setValue(this.tempSearchParameterObject.SearchQuery)}triggerRefreshSetting(t=0,o,a="Search"){this.SearchControl.setValue(""),this.searchHistory=o,this.taskTypeId=t,this.placeholderText=a}triggerSearchHistoryRefresh(t,o="Search"){this.SearchControl.setValue(""),this.searchHistory=t,this.placeholderText=o}triggerPredefinedCategorySelection(t){this.CategorySelectionControl.setValue(t)}triggerRefreshSettingWithCategory(t=[],o="0"){this.CategorySelectionControl.reset(),this.filterCategoryOption=(0,f.cloneDeep)(t),this.tempSearchParameterObject.SurveyId=parseInt(o),this.CategoryOption=[...t],this.CategorySelectionControl.setValue(o),this.triggerHtmlChangeDetection()}triggerUpdateEditionalParameter(t){this.searchParameterInput=t,this.SearchControl.reset(),this.resetSearchParameters()}triggerRefreshSearchWithoutCallBack(){this.SearchControl.reset()}onApprovalsButtonClick(){this.approvalsButtonClick.emit()}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(T.ef),e.rXU(v.d),e.rXU(M.N),e.rXU(k.nX),e.rXU(F.up),e.rXU(N.L),e.rXU(e.gRc),e.rXU(j.G),e.rXU(w.h))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-ff-new-search"]],viewQuery:function(o,a){if(1&o&&(e.GBs($,5),e.GBs(H,5)),2&o){let s;e.mGM(s=e.lsd())&&(a.searchInputElementRef=s.first),e.mGM(s=e.lsd())&&(a.AssetSearchBtnReference=s.first)}},hostAttrs:[1,"bigger-search-bar"],inputs:{searchMethod:"searchMethod",searchController:"searchController",nomenclatureHeap:"nomenclatureHeap",isFromWorkOrder:"isFromWorkOrder",searchHistoryController:"searchHistoryController",searchHistoryMethod:"searchHistoryMethod",isCategoryView:"isCategoryView",isCategoryViewSearchRequired:"isCategoryViewSearchRequired",isGoButtonView:"isGoButtonView",groupByInput:"groupByInput",filterOptions:"filterOptions",CategoryOption:"CategoryOption",searchUrl:"searchUrl",searchParameterInput:"searchParameterInput",categoryPlacementName:"categoryPlacementName",debounceTimeValue:"debounceTimeValue",placeholderText:"placeholderText",categoryPanelClass:"categoryPanelClass",defaultCategorySelection:"defaultCategorySelection",shortedSearchDesign:"shortedSearchDesign",makeSearchDisabled:"makeSearchDisabled",searchHistory:"searchHistory",showSearchHistory:"showSearchHistory",taskTypeId:"taskTypeId",taskTypeIdString:"taskTypeIdString",moduleId:"moduleId",isSearchFullWidth:"isSearchFullWidth",canUpdateListOnClearSearch:"canUpdateListOnClearSearch",shouldEnterSearchPersist:"shouldEnterSearchPersist",isSearchOnEnterRequired:"isSearchOnEnterRequired",isFilterRequired:"isFilterRequired",isShowSearchSuggestion:"isShowSearchSuggestion",isCrossIconWithActionButton:"isCrossIconWithActionButton",showApprovalsButton:"showApprovalsButton",approvalsButtonUrl:"approvalsButtonUrl"},outputs:{filterCategoryTrigger:"filterCategoryTrigger",searchSuggestionSelection:"searchSuggestionSelection",categorySelection:"categorySelection",approvalsButtonClick:"approvalsButtonClick"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"search-bar-container"],[1,"bigger-search-bar-secondary","inner-container-flex"],[1,"search-bar","search-bar-width"],[4,"ngIf","ngIfElse"],["SearchMode",""],["oldCrossIcons",""],["type","text",1,"input-bar",3,"formControl","placeholder","keydown.enter","focus","blur"],["SearchInputElement",""],[1,"asset-search-suggestions","text-left","scrollY","lighter",3,"ngClass"],[1,"asset-search-suggestions-history","text-left","scrollY","lighter",3,"ngClass"],[1,"far","fa-search","search-icon"],[1,"far","fa-spinner","fa-pulse","search-icon"],["href","javascript:void(0);","class","fal fa-times cross-icon-color clear-search",3,"ngStyle","click",4,"ngIf"],["href","javascript:void(0);",1,"fal","fa-times","cross-icon-color","clear-search",3,"ngStyle","click"],["href","javascript:void(0);","style","right: 5px !important","class","fal fa-times cross-icon-color clear-search",3,"click",4,"ngIf"],["href","javascript:void(0);",1,"fal","fa-times","cross-icon-color","clear-search",2,"right","5px !important",3,"click"],[4,"ngFor","ngForOf"],[3,"ngClass"],[3,"click"],[1,"far","fa-search","search-result-icon"],["href","javascript:void(0);",1,"link",3,"innerHtml"],[1,"search-for","ml-4"],["href","javascript:void(0);",1,"link",3,"click"],["href","javascript:void(0);",1,"remove",3,"click"],[1,"fal","fa-times"],[1,"search-category","new-search-category"],[1,"field-group"],["appearance","outline"],[3,"formControl","panelClass","matTooltip","selectionChange","closed"],["type","text","matInput","","class","categorySearchText",3,"placeholder","ngModel","keyup","keydown","ngModelChange",4,"ngIf"],["noResult",""],["type","text","matInput","",1,"categorySearchText",3,"placeholder","ngModel","keyup","keydown","ngModelChange"],[3,"value","matTooltip"],[3,"disabled"],[1,"go-button"],["
1id","asset-search-btn","href","javascript:void(0)","mat-flat-button","","color","blue",1,"small-width",3,"click"],["assetSearchBtn",""],["mat-stroked-button","","color","blue",1,"approvals-button-styles",3,"href","click"]],template:function(o,a){1&o&&e.DNE(0,Se,21,25,"ng-container",0),2&o&&e.Y8G("ngIf",a.filterOptions)},dependencies:[g.me,g.BC,g.vS,g.l_,u.YU,u.Sq,u.bT,u.B3,R.Ky,G.aL,V.cu,E.d1,B.hn,D.PD,A],styles:["[_nghost-%COMP%]{display:block}.search-suggestion[_ngcontent-%COMP%]{box-shadow:0 3px 12px #0003;max-height:0;background-color:#fff;border-radius:4px;position:absolute;z-index:2;text-align:left;width:100%;overflow:hidden;transition:all .3s ease-in-out}.search-suggestion[_ngcontent-%COMP%] .suggestion-container[_ngcontent-%COMP%] .search-results-list[_ngcontent-%COMP%]{list-style:none outside none;padding:0;margin:0}.search-suggestion[_ngcontent-%COMP%] .suggestion-container[_ngcontent-%COMP%] .search-results-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:4px 0}.search-suggestion.active[_ng
1content-%COMP%]{max-height:250px;text-align:left;padding:10px 15px}.mat-form-field-wrapper[_ngcontent-%COMP%]{padding-bottom:0}.mat-form-field-appearance-outline[_ngcontent-%COMP%] .mat-form-field-wrapper[_ngcontent-%COMP%]{padding-bottom:0;margin:0!important}.mat-form-field-appearance-outline[_ngcontent-%COMP%] .mat-form-field-subscript-wrapper{margin-top:0}.asset-search-suggestions-history[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .asset-search-suggestions-history[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .asset-search-suggestions-history[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus{text-decoration:none}.asset-search-suggestions-history[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .remove[_ngcontent-%COMP%]{color:#999da5;font-size:16px;font-size:1.14285714rem;display:inline-block;vertical-align:middle;position:absolute;right:6px;top:50%;transform:translateY(-50%)}.asset-search-suggestions-history[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{color:#1a2235;display:inline-block;vertical-align:middle;width:calc(100% - 50px);margin-left:20px}.asset-search-suggestions-history[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .history-search-icon[_ngcontent-%COMP%]{position:absolute;left:6px;top:50%;transform:translateY(-50%);color:#999da5;font-size:16px;font-size:1.14285714rem}.asset-search-suggestions-history[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:relative;padding:6px 12px 6px 30px;line-height:1}.asset-search-suggestions-history[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background-color:#0077c01a}.asset-search-suggestions-history[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none outside none;padding:0;margin:0}.asset-search-suggestions-history[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{color:#999da5;font-size:12px;font-size:.85714286rem;margin-bottom:0;margin-top:12px;padding-left:30px}.asset-search-suggestions-history.active[_ngcontent-%COMP%]{max-height:277px;visibility:visible!important;overflow:auto}.asset-search-suggestions-history[_ngcontent-%COMP%]{position:absolute;box-shadow:0 3px 3px;border-radius:3px;background-color:#fff;box-shadow:0 3px 3px #4e7d961a;width:calc(100% + 10px);left:-10px;top:55px;visibility:hidden;z-index:3;max-height:0;overflow:hidden;transition:all .3s ease-in-out}.asset-search-suggestions[_ngcontent-%COMP%]{position:absolute;box-shadow:0 3px 3px #4e7d961a;border-radius:3px;background-color:#fff;width:calc(100% + 10px);left:-10px;top:55px;visibility:hidden;max-height:0;z-index:3;overflow:hidden;transition:all .3s ease-in-out}.asset-search-suggestions[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{color:#999da5;font-size:12px;font-size:.85714286rem;margin-bottom:0;margin-top:12px;padding-left:30px;font-weight:bolder}.asset-search-suggestions[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:relative;padding:6px 12px 6px 30px;line-height:1}.asset-search-suggestions[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none outside none;padding:0;margin:0}.asset-search-suggestions[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .search-result-icon[_ngcontent-%COMP%]{position:absolute;left:6px;top:5px;color:#999da5;font-size:16px;font-size:1.14285714rem}.asset-search-suggestions.active[_ngcontent-%COMP%]{max-height:277px;visibility:visible!important;overflow:auto}.asset-search-suggestions[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .asset-search-suggestions[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .asset-search-suggestions[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus{text-decoration:none}.asset-search-suggestions[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background-color:#0077c01a}.asset-search-suggestions[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{color:#1
1a2235;display:inline-block;vertical-align:middle;width:calc(100% - 20px)}.assetSearchSuggestionList[_ngcontent-%COMP%]{margin-bottom:2px!important}.cross-icon-color[_ngcontent-%COMP%]{color:gray!important}.new-search-category[_ngcontent-%COMP%] .field-group[_ngcontent-%COMP%] .mat-form-field-appearance-outline .mat-form-field-outline{color:transparent!important}.new-search-category[_ngcontent-%COMP%] .field-group[_ngcontent-%COMP%]{padding-bottom:0!important}.new-search-category[_ngcontent-%COMP%] .field-group[_ngcontent-%COMP%] .mat-form-field .mat-form-field-infix{padding-right:30px!important}.new-search-category[_ngcontent-%COMP%] .field-group[_ngcontent-%COMP%] .mat-form-field .mat-select-trigger .mat-select-arrow-wrapper{position:absolute;right:-117px;top:50%;transform:translateY(-50%)}.categorySearchText[_ngcontent-%COMP%]{font-size:inherit;line-height:3em;height:3em;padding:0 16px;width:85%}.width-100[_ngcontent-%COMP%]{width:100%!important}.r-5[_ngcontent-%COMP%]{right:5px!important}.filter-margin[_ngcontent-%COMP%]{width:calc(100% - 254px)!important}.search-bar-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:12px}.search-bar-container[_ngcontent-%COMP%] .inner-container-flex[_ngcontent-%COMP%]{display:flex;flex:1;gap:0}.search-bar-container[_ngcontent-%COMP%] .inner-container-flex.no-go-button[_ngcontent-%COMP%] .search-category[_ngcontent-%COMP%]{margin-right:0!important;padding-right:0!important;border-right:none!important}.search-bar-container[_ngcontent-%COMP%] .approvals-button-styles[_ngcontent-%COMP%]{background-color:#fff;height:46px;line-height:48px;padding:0 20px;border:1px solid #0072c6;margin-right:0;white-space:nowrap}"]})}}return n})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.