1"use strict";(self.webpackChunkDashboardAngular=self.webpackChunkDashboardAngular||[]).push([[741,889],{83741:(U,O,a)=>{a.d(O,{v:()=>Me});var l=a(10467),e=a(54438),y=a(65814),S=a(45383),I=a(5779),A=a(21413),b=a(18359),D=a(84572),C=a(23294),L=a(70152),c=a(48337),n=a(31253),d=a(2309),P=a(70226),G=a(64313),N=a(83013),V=a(93569),j=a(10764),x=a(97301),H=a(48300),R=a(18789),k=a(60177),F=a(89417),K=a(81141),$=a(22242),Y=a(85030),X=a(56296),z=a(29170),Q=a(91208),J=a(20060),Z=a(93348),q=a(86476),ee=a(98889);const te=["advancedFilters"],h=(i,u)=>({"p-button-outlined":i,"p-button-primary":u}),re=i=>["/","workspace",i,"assets","favorite","list"],E=i=>({teamGuids:i}),se=i=>["/","workspace",i,"assets","archive","list"],ie=i=>["/","workspace",i,"assets","shared","list"],ae=i=>["/","workspace",i,"assets","favorite","grid"],oe=i=>["/","workspace",i,"assets","archive","grid"],ne=i=>["/","workspace",i,"assets","shared","grid"],ce=(i,u)=>["/workspace",i,"assets",u,"list"],le=(i,u)=>["/team-workspace",i,"assets",u,"list"],pe=(i,u)=>["/workspace",i,"assets",u,"grid"],de=(i,u)=>["/team-workspace",i,"assets",u,"grid"];function ue(i,u){if(1&i&&(e.j41(0,"div",22)(1,"h2",23),e.EFF(2),e.k0s(),e.nrm(3,"app-advanced-filters",null,2),e.k0s()),2&i){const s=e.XpG();e.R7$(2),e.JRh(s.title)}}function _e(i,u){if(1&i){const s=e.RV6();e.j41(0,"div",24)(1,"p-multiSelect",25),e.mxI("ngModelChange",function(r){e.eBV(s);const o=e.XpG();return e.DH7(o.selectedNodes,r)||(o.selectedNodes=r),e.Njj(r)}),e.bIt("onChange",function(){e.eBV(s);const r=e.XpG();return e.Njj(r.onTreeSelectClosed())}),e.k0s()()}if(2&i){const s=e.XpG();e.R7$(),e.R50("ngModel",s.selectedNodes),e.Y8G("options",s.accountWithOrganizationAndTeamNames)("metaKeySelection",!1)("key",s.key)}}function he(i,u){if(1&i){const s=e.RV6();e.j41(0,"fa-icon",26),e.bIt("click",function(){e.eBV(s);const r=e.XpG();return e.Njj(r.clearSearch())}),e.k0s()}if(2&i){const s=e.XpG();e.Y8G("icon",s.faXmark)}}function me(i,u){if(1&i&&(e.j41(0,"a",29,5),e.EFF(2," Shared with me "),e.k0s()),2&i){const s=e.sdS(1),t=e.XpG(3);e.Y8G("routerLink",e.eq3(3,ie,t.workspaceId))("queryParams",e.eq3(5,E,t.teamGuid))("ngClass",e.l_i(7,h,!s.isActive,s.isActive))}}function ge(i,u){if(1&i&&(e.j41(0,"div")(1,"a",29,3),e.EFF(3," My Favorites "),e.k0s(),e.DNE(4,me,3,10,"a",30),e.j41(5,"a",29,4),e.EFF(7," My Archives "),e.k0s()()),2&i){const s=e.sdS(2),t=e.sdS(6),r=e.XpG(2);e.R7$(),e.Y8G("routerLink",e.eq3(7,re,r.workspaceId))("queryParams",e.eq3(9,E,r.teamGuid))("ngClass",e.l_i(11,h,!s.isActive,s.isActive)),e.R7$(3),e.Y8G("ngIf","team-workspace"!==r.parentWorkspaceRoute),e.R7$(),e.Y8G("routerLink",e.eq3(14,se,r.workspaceId))("queryParams",e.eq3(16,E,r.teamGuid))("ngClass",e.l_i(18,h,!t.isActive,t.isActive))}}function fe(i,u){if(1&i&&(e.j41(0,"a",29,5),e.EFF(2," Shared with me "),e.k0s()),2&i){const s=e.sdS(1),t=e.XpG(3);e.Y8G("routerLink",e.eq3(3,ne,t.workspaceId))("queryParams",e.eq3(5,E,t.teamGuid))("ngClass",e.l_i(7,h,!s.isActive,s.isActive))}}function ve(i,u){if(1&i&&(e.j41(0,"div")(1,"a",29,3),e.EFF(3," My Favorites "),e.k0s(),e.DNE(4,fe,3,10,"a",30),e.j41(5,"a",29,4),e.EFF(7," My Archives "),e.k0s()()),2&i){const s=e.sdS(2),t=e.sdS(6),r=e.XpG(2);e.R7$(),e.Y8G("routerLink",e.eq3(7,ae,r.workspaceId))("queryParams",e.eq3(9,E,r.teamGuid))("ngClass",e.l_i(11,h,!s.isActive,s.isActive)),e.R7$(3),e.Y8G("ngIf","team-workspace"!==r.parentWorkspaceRoute),e.R7$(),e.Y8G("routerLink",e.eq3(14,oe,r.workspaceId))("queryParams",e.eq3(16,E,r.teamGuid))("ngClass",e.l_i(18,h,!t.isActive,t.isActive))}}function ye(i,u){if(1&i&&(e.j41(0,"div",27),e.DNE(1,ge,8,21,"div",28)(2,ve,8,21,"div",28),e.k0s()),2&i){const s=e.XpG();e.Y8G("ngSwitch",s.isListRoute),e.R7$(),e.Y8G("ngSwitchCase",!0),e.R7$(),e.Y8G("ngSwitchCase",!1)}}function Ce(i,u){if(1&i&&(e.j41(0,"div")(1,"a",32,5),e.EFF(3," My Space "),e.k0s(),e.j41(4,"a",32,3),e.EFF(6," Team Space "),e.k0s()()),2&i){const s=e.XpG(2);e.R7$(),e.Y8G("routerLink",e.l_i(4,ce,s.workspaceId,s.parentRoute))("ngClass",e.l_i(7,h,s.isTeamSpace,!s.isAllRoute)),e.R7$(3),e.Y8G("routerLink",e.l_i(10,le,s.teamWorkspaceId,s.parentRoute))("ngClass",e.l_i(13,h,!s.isTeamSpace,s.isAllRoute))}}function Pe(i,u){if(1&i&&(e.j41(0,"div")(1,"a",32,5),e.EFF(3," My Space "),e.k0s(),e.j41(4,"a",32,3),e.EFF(6," Team Space "),e.k0s()()),2&i){const s=e.XpG(2);e.R7$(),e.Y8G("routerLink",e.l_i(4,pe,s.workspaceId,s.parentRoute))("ngClass",e.l_i(7,h,s.isTeamSpace,!s.isAllRoute)),e.R7$(3),e.Y8G("routerLink",e.l_i(10,de,s.teamWorkspaceId,s.parentRoute))("ngClass",e.l_i(13,h,!s.isTeamSpace,s.isAllRoute))}}function Ee(i,u){if(1&i&&(e.j41(0,"div",31),e.DNE(1,Ce,7,16,"div",28)(2,Pe,7,16,"div",28),e.k0s()),2&i){const s=e.XpG();e.Y8G("ngSwitch",s.isListRoute),e.R7$(),e.Y8G("ngSwitchCase",!0),e.R7$(),e.Y8G("ngSwitchCase",!1)}}let Me=(()=>{class i extends c.${constructor(s){super(),this.router=s,this.assetService=(0,e.WQX)(d.I),this.messageService=(0,e.WQX)(I.bg),this.route=(0,e.WQX)(y.nX),this.routeDataHelperService=(0,e.WQX)(G.n),this.loadingService=(0,e.WQX)(P.U),this.userAccountService=(0,e.WQX)(N.w),this.tableSortSynchronizer=(0,e.WQX)(j.q),this.assetSortMapper=(0,e.WQX)(x.l),this.filterState=(0,e.WQX)(H.r),this.title="Assets",this.faSearch=S.MjD,this.faXmark=S.Jyw,this.FilterTypeEnum=n.i$,this.selectedMediaTypeFilter=n.If.None,this.selectedAssets=this.assetService.selectedAssets,this.searchSubject=ne
1w A.B,this.subscription=new b.yU,this.sortDefinitions=[],this.activeSorts=[],(0,e.QZP)(()=>{const t=this.assetService.activeOrderByProperties();this.activeSorts=t&&t.length>0?this.assetSortMapper.orderByPropertiesToColumnSortFormat(t):[]})}get viewToggleQueryParamsHandling(){return this.filterState.isTransientScope(this.workspaceId,this.filterTypeEnum)?"preserve":null}ngOnInit(){var s=()=>super.ngOnInit,t=this;return(0,l.A)(function*(){s().call(t);const r=t.route.paramMap,o=t.route.queryParamMap;t.selectedUserAccount=t.activeUserService.getCurrentUserAccount(),r.subscribe(p=>{t.workspaceId=t.workspaceIdFromUrl=parseInt(p.get("workspaceId"));let g=t.activeUserService.getWebshotCurrentUserAccount();t.isPersonalAccount=g?.accountType==V.B.Personal||1==t.selectedUserAccount?.userOrganization?.personal,t.workspaceId=1==t.isPersonalAccount?g?.userWorkspaceId??t.workspaceId:t.workspaceId,t.teamWorkspaceId=g?.teamWorkspaceId??t.assetService.getWorkspaceId(p);let T=1==t.selectedUserAccount?.userOrganization?.personal?t.workspaceId:t.teamWorkspaceId;t.parentWorkspaceRoute=t.routeDataHelperService.getClosestParentData(t.route,"parentWorkspaceRoute"),t.isTeamSpace=t.parentWorkspaceRoute.includes("team-workspace"),t.filterTypeEnum=t.routeDataHelperService.getClosestParentData(t.route,"filterTypeEnum"),t.parentRoute=t.routeDataHelperService.getClosestParentData(t.route,"parentRoute"),t.isListRoute=t.routeDataHelperService.getClosestParentData(t.route,"isListRoute")??!1,t.routeDataHelperService.getClosestParentData(t.route,"isHomePage")&&"team-workspace"==t.parentWorkspaceRoute&&(t.filterTypeEnum=n.i$.AssetHomeFilterFormValues);const f=t.filterTypeEnum==n.i$.SharedFilterFormValues?T:t.isTeamSpace?t.teamWorkspaceId:t.workspaceId,v=t.routeDataHelperService.getClosestParentData(t.route,"viewRoutesBase"),m=v?.length>0?["/",t.parentWorkspaceRoute,f,...v]:["/",t.parentWorkspaceRoute,f,"assets",t.parentRoute];!0===t.isAllRoute?(t.gridRoute=[...m,"all","grid"],t.listRoute=[...m,"all","list"]):(t.gridRoute=[...m,"grid"],t.listRoute=[...m,"list"]),(null==t.sortDefinitions||0==t.sortDefinitions.length)&&t.initializeSortDefinitions(),t.restoreSortState(),t.restoreSearchValue()});const _=(0,D.z)([r,o]).subscribe(function(){var p=(0,l.A)(function*([g,T]){t.routeDataHelperService.getClosestParentData(t.route,"useWorkspaceIds"),t.getTypeEnum=t.routeDataHelperService.getClosestParentData(t.route,"getTypeEnum"),t.setTeamGuidByWorkspaceId()});return function(g){return p.apply(this,arguments)}}());t.activeUserService.getUserAccountsWithTeamAndOrganizationNames().then(p=>{t.currentUserAccounts=p;let g=[];for(const M of t.currentUserAccounts.filter(f=>1!=f.userOrganization.personal)){let{id:f,name:v,teamId:m,teamName:W}=M.userOrganization;const w=g.find(B=>B.key===f);if(m)if(w)w.children=[...w.children,t.createTreeNode(m,W,[t.createTreeNode(m+"_p","Personal"),t.createTreeNode(m+"_t","Team")])];else{const B=t.createTreeNode(f+"_o",v,[t.createTreeNode(m,W,[t.createTreeNode(m+"_p","Personal"),t.createTreeNode(m+"_t","Team")])]);g=[...g,B]}}t.accountWithOrganizationAndTeamNames=g;const T=t.route.snapshot.queryParamMap;if(T.has("teamGuids")){const M=T.get("teamGuids"),f=M?M.split(",").map(v=>v.trim()).filter(v=>v):[];f.length>0&&(t.selectedNodes=[],t.selectedNodes=t.findNodesByKeys(t.accountWithOrganizationAndTeamNames,f))}}),t.subscription.add(_),t.setTeamGuidByWorkspaceId(),t.handleSearch()})()}setTeamGuidByWorkspaceId(){return this.userAccountService.getTeamIdsByWorkspaceIdsAsync([this.workspaceId]).pipe((0,C.F)(),(0,L.B)(300)).subscribe(s=>{s&&s.length>=0&&(this.teamGuid=this.isTeamSpace?s[0]+"_t":s[0]+"_p")})}onTreeSelectClosed(){var s=this;return(0,l.A)(function*(){const r=s.getMatchingKeys(s.selectedNodes).join(",");s.router.navigate([],{queryParams:{teamGuids:r},queryParamsHandling:"merge"})})()}getMatchingKeys(s){const t=[],r=o=>{o.key&&(o.key.endsWith("_p")||o.key.endsWith("_t"))&&t.push(o.key),o.children&&o.children.length&&o.children.forEach(_=>r(_))};return s?.forEach(o=>r(o)),t}createTreeNode(s,t,r){return{key:s,label:t,children:r||[]}}findNodesByKeys(s,t){const r=[],o=_=>{for(let p of _)t.includes(p.key)&&r.push(p),p.children&&o(p.children)};return o(s),r}onSearchInput(s){const t=s?.trim()||"";(t||""===s)&&(this.searchSubject.next(t),this.advancedFilters?.setName(t))}onMediaTypeFilterChanged(s){this.selectedMediaTypeFilter=s}clearSearch(){this.searchValue="",this.onSearchInput("")}handleSearch(){const s=this.searchSubject.pipe((0,L.B)(1e3),(0,C.F)()).subscribe(t=>{const r=t.trim();this.filterState.getSettings(this.workspaceId,this.filterTypeEnum).subscribe({next:o=>{o.formValues||(o.formValues={}),o.formValues.name=r,(0,R.kx)(o.formValues),this.filterState.saveSettings(this.workspaceId,this.filterTypeEnum,o.formValues,1==this.isListRoute?"list":"grid",void 0,!0).subscribe({next:()=>{const _=this.filterState.getSearchModel(this.workspaceId,this.filterTypeEnum);_.name=r,_.mediaTypeFilter=this.selectedMediaTypeFilter===n.If.None?null:this.selectedMediaTypeFilter,this.filterState.setFilterModel(_)}})}})});this.subscription.add(s)}ngOnDestroy(){this.subscription.unsubscribe()}initializeSortDefinitions(){this.sortDefinitions=1!=this.isPersonalAccount?[{key:"fileTicketNumber",label:"Id",sortable:!0,group:1,widthClass:"w-4"},{key:"name",label:"Name",sortable:!0,group:1,widthClass:"w-4"},{key:"openTaskCount",label:"Open Tasks",sortable:!0,group:1,widthClass:"w-4"},{key:"appEnvironmentName",label:"App Environment",sortable:!0,group:2,widthClass:"w-4"},{key:"projectName",label:"Project",sortable:!0,group:2,widthClass:"w-4"},{key:"creationDateTime",label:"Created on",sortable:!0,group:3,widthClass:"w-4"},{key:"createdBy",label:"Created by",sortable:!0,group:3,widthClass:"w-4"}]:[{key:"fileTicketNumber",label:"Id",sortable:!0,group:1,widthClass:"w-4"},{key:"name",label:"Name",sortable:!0,group:1,widthClass:"w-4"},{key:"appEnvironmentName",label:"App Environment",sortable:!0,group:2,widthClass:"w-4"},{key:"projectName",label:"Project",sortable:!0,group:2,widthClass:"w-4"},{key:"creationDateTime",label:"Created on",sortable:!0,group:3,widthClass:"w-4"}],this.activeSorts=[]}onSortChange(s){this.activeSorts=s;const t=this.tableSortSynchronizer.handleColumnSortChange(s,this.assetSortMapper);!t||!t.shouldFetchData||(this.assetService.setActiveOrderByProperties(t.backendSorts),this.workspaceIdFromUrl&&this.assetService.updateAssetS
1ortOrder(this.workspaceIdFromUrl,this.filterTypeEnum,t.backendSorts))}restoreSearchValue(){if(!this.workspaceId||!this.filterTypeEnum)return;const t=this.filterState.read(`${this.workspaceId}-${n.i$[this.filterTypeEnum]}`,!1);if(t)try{const r=JSON.parse(t);!this.filterState.isTransientScope(this.workspaceId,this.filterTypeEnum)&&(0,R.zd)(r?.formValues)&&(this.filterState.storeSettingsLocally(this.workspaceId,this.filterTypeEnum,r),this.filterState.saveSettings(this.workspaceId,this.filterTypeEnum,r.formValues,1==this.isListRoute?"list":"grid").subscribe()),this.searchValue=(r?.formValues?.name??"")||"",setTimeout(()=>{this.advancedFilters?.setName(this.searchValue)})}catch(r){console.error("[AssetHeadBar] Error parsing localStorage for search:",r)}}restoreSortState(){if(!this.workspaceIdFromUrl||!this.filterTypeEnum)return;const t=this.filterState.read(`${this.workspaceIdFromUrl}-${n.i$[this.filterTypeEnum]}`,!1);if(t)try{const r=JSON.parse(t);r?.formValues?.orderByProperties&&Array.isArray(r.formValues.orderByProperties)?this.assetService.setActiveOrderByProperties(r.formValues.orderByProperties):this.assetService.setActiveOrderByProperties([])}catch(r){console.error("[AssetHeadBar] Error parsing localStorage:",r),this.assetService.setActiveOrderByProperties([])}else this.assetService.setActiveOrderByProperties([]);this.filterState.getSettings(this.workspaceIdFromUrl,this.filterTypeEnum).subscribe({next:r=>{r?(r?.formValues?.orderByProperties&&Array.isArray(r.formValues.orderByProperties)?this.assetService.setActiveOrderByProperties(r.formValues.orderByProperties):this.assetService.setActiveOrderByProperties([]),!this.filterState.isTransientScope(this.workspaceIdFromUrl,this.filterTypeEnum)&&(0,R.zd)(r?.formValues)&&(this.filterState.storeSettingsLocally(this.workspaceIdFromUrl,this.filterTypeEnum,r),this.filterState.saveSettings(this.workspaceIdFromUrl,this.filterTypeEnum,r.formValues,1==this.isListRoute?"list":"grid").subscribe()),this.searchValue=(r?.formValues?.name??"")||"",this.advancedFilters?.setName(this.searchValue)):this.assetService.setActiveOrderByProperties([])},error:r=>{console.error("[AssetHeadBar] Error restoring sort state from DB:",r)}})}static#e=this.\u0275fac=function(t){return new(t||i)(e.rXU(y.Ix))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["app-asset-head-bar"]],viewQuery:function(t,r){if(1&t&&e.GBs(te,5),2&t){let o;e.mGM(o=e.lsd())&&(r.advancedFilters=o.first)}},inputs:{title:"title"},features:[e.Vt3],decls:21,vars:24,consts:[["rlaGrid","routerLinkActive"],["rlaList","routerLinkActive"],["advancedFilters",""],["favorites","routerLinkActive"],["archives","routerLinkActive"],["assets","routerLinkActive"],["class","flex align-items-center gap-3 mb-3 justify-content-between",4,"ngIf"],[1,"flex","align-items-center","gap-2","mb-4","flex-wrap"],[1,"flex","align-items-center","gap-3","flex-grow-1","flex-wrap"],["inner-search-filter","","class","sorting text-left field mb-0","style","border-bottom: none;",4,"ngIf"],[1,"search-container"],["iconPosition","left"],["styleClass","pi pi-search"],["type","text","pInputText","","placeholder","Search Assets...",1,"search-input-field",3,"ngModelChange","input","ngModel"],["class","cursor-pointer close-icon","title","Clear search",3,"icon","click",4,"ngIf"],[3,"filterChange","selectedFilter","workspaceId","filterTypeEnum","isListRoute"],["pButton","","routerLinkActive","active","title","Grid View",1,"p-button",3,"routerLink","queryParamsHandling","ngClass"],["pButton","","routerLinkActive","active","title","List View",1,"p-button",3,"routerLink","queryParamsHandling","ngClass"],[1,"ml-auto"],["placeholder","Sort",3,"ngModelChange","sortChange","columns","ngModel"],["class","mb-4",3,"ngSwitch",4,"ngIf"],["class","mb-2",3,"ngSwitch",4,"ngIf"],[1,"flex","align-items-center","gap-3","mb-3","justify-content-between"],[1,"mb-0"],["inner-search-filter","",1,"sorting","text-left","field","mb-0",2,"border-bottom","none"],["display","comma","selectionMode","checkbox","placeholder","Select Organizations",3,"ngModelChange","onChange","ngModel","options","metaKeySelection","key"],["title","Clear search",1,"curs
1or-pointer","close-icon",3,"click","icon"],[1,"mb-4",3,"ngSwitch"],[4,"ngSwitchCase"],["routerLinkActive","active",1,"mr-3","underline-offset-4",3,"routerLink","queryParams","ngClass"],["class","mr-3 underline-offset-4","routerLinkActive","active",3,"routerLink","queryParams","ngClass",4,"ngIf"],[1,"mb-2",3,"ngSwitch"],["pButton","","routerLinkActive","active",1,"p-button","mr-3",3,"routerLink","ngClass"]],template:function(t,r){if(1&t){const o=e.RV6();e.DNE(0,ue,5,1,"div",6),e.j41(1,"div",7)(2,"div",8),e.DNE(3,_e,2,4,"div",9),e.j41(4,"div",10)(5,"p-iconField",11),e.nrm(6,"p-inputIcon",12),e.j41(7,"input",13),e.mxI("ngModelChange",function(p){return e.eBV(o),e.DH7(r.searchValue,p)||(r.searchValue=p),e.Njj(p)}),e.bIt("input",function(p){return e.eBV(o),e.Njj(r.onSearchInput(p.target.value))}),e.k0s()(),e.DNE(8,he,1,1,"fa-icon",14),e.k0s(),e.j41(9,"app-asset-media-type-filter",15),e.bIt("filterChange",function(p){return e.eBV(o),e.Njj(r.onMediaTypeFilterChanged(p))}),e.k0s(),e.j41(10,"p-buttonGroup")(11,"a",16,0),e.EFF(13," Grid "),e.k0s(),e.j41(14,"a",17,1),e.EFF(16," List "),e.k0s()()(),e.j41(17,"div",18)(18,"app-column-sort",19),e.mxI("ngModelChange",function(p){return e.eBV(o),e.DH7(r.activeSorts,p)||(r.activeSorts=p),e.Njj(p)}),e.bIt("sortChange",function(p){return e.eBV(o),e.Njj(r.onSortChange(p))}),e.k0s()()(),e.DNE(19,ye,3,3,"div",20)(20,Ee,3,3,"div",21)}if(2&t){const o=e.sdS(12),_=e.sdS(15);e.Y8G("ngIf",null!=r.currentWebshotUserAccount),e.R7$(3),e.Y8G("ngIf",(null==r.accountWithOrganizationAndTeamNames?null:r.accountWithOrganizationAndTeamNames.length)>0&&1==r.isPersonalAccount&&("favorite"==r.parentRoute||"shared"==r.parentRoute||"archive"==r.parentRoute)),e.R7$(4),e.R50("ngModel",r.searchValue),e.R7$(),e.Y8G("ngIf",r.searchValue&&r.searchValue.trim()),e.R7$(),e.Y8G("selectedFilter",r.selectedMediaTypeFilter)("workspaceId",r.workspaceId)("filterTypeEnum",r.filterTypeEnum)("isListRoute",r.isListRoute),e.R7$(2),e.Y8G("routerLink",r.gridRoute)("queryParamsHandling",r.viewToggleQueryParamsHandling)("ngClass",e.l_i(18,h,!o.isActive,o.isActive)),e.R7$(3),e.Y8G("routerLink",r.listRoute)("queryParamsHandling",r.viewToggleQueryParamsHandling)("ngClass",e.l_i(21,h,!_.isActive,_.isActive)),e.R7$(4),e.Y8G("columns",r.sortDefinitions),e.R50("ngModel",r.activeSorts),e.R7$(),e.Y8G("ngIf","team-workspace"==r.parentWorkspaceRoute||r.filterTypeEnum==r.FilterTypeEnum.AssetHomeFilterFormValues),e.R7$(),e.Y8G("ngIf","trash"==r.parentRoute&&1!=r.isPersonalAccount)}},dependencies:[k.YU,k.bT,k.ux,k.e1,F.me,F.BC,F.vS,K._f,$.S,Y.e,y.Wk,y.wQ,X.KF,z.C,Q.m,J.aY,Z.d,q.w,ee.C],styles:["[_nghost-%COMP%] .search-container, [_nghost-%COMP%] .task-search-container{position:relative;min-width:300px}[_nghost-%COMP%] .search-container .close-icon, [_nghost-%COMP%] .task-search-container .close-icon{position:absolute;top:50%;right:.5rem;transform:translateY(-50%)}[_nghost-%COMP%] .search-container .search-input-field, [_nghost-%COMP%] .search-container .search-dropdown, [_nghost-%COMP%] .task-search-container .search-input-field, [_nghost-%COMP%] .task-search-container .search-dropdown{width:100%;padding:6px 2rem 6px 36px;color:var(--site-black);border:1px solid var(--support-color-4);border-radius:.25rem}[_nghost-%COMP%] .search-container .search-input-field:focus, [_nghost-%COMP%] .search-container .search-input-field.p-inputwrapper-focus, [_nghost-%COMP%] .search-container .search-dropdown:focus, [_nghost-%COMP%] .search-container .search-dropdown.p-inputwrapper-focus, [_nghost-%COMP%] .task-search-container .search-input-field:focus, [_nghost-%COMP%] .task-search-container .search-input-field.p-inputwrapper-focus, [_nghost-%COMP%] .task-search-container .search-dropdown:focus, [_nghost-%COMP%] .task-search-container .search-dropdown.p-inputwrapper-focus{border-color:var(--hyperlink-color)}[_nghost-%COMP%] .search-container .search-dropdown, [_nghost-%COMP%] .task-search-container .search-dropdown{padding:5px 0}[_nghost-%COMP%] .search-container .p-icon-field-left .p-input-icon:first-of-type, [_nghost-%COMP%] .task-search-container .p-icon-field-left .p-input-icon:first-of-type{left
1:12px}[_nghost-%COMP%] .search-container .p-input-icon, [_nghost-%COMP%] .task-search-container .p-input-icon{color:var(--support-color-5)}[_nghost-%COMP%] .task-search-container{max-width:700px}[_nghost-%COMP%] .grid-list-buttons{flex-grow:1;flex-shrink:0}@media (max-width: 767px){[_nghost-%COMP%] .search-container, [_nghost-%COMP%] .task-search-container{width:100%}[_nghost-%COMP%] .grid-list-buttons{display:flex}[_nghost-%COMP%] .grid-list-buttons .p-button-group{display:inline-flex}}.custom-confirm-message[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:1rem}.custom-confirm-icon[_ngcontent-%COMP%]{font-size:1.5rem;margin-top:.7rem}.media-type-filter-group[_ngcontent-%COMP%] .p-button[_ngcontent-%COMP%]{min-width:84px}[_nghost-%COMP%] p-multiselect{min-width:205px}[_nghost-%COMP%] .teams-tree-select{display:inline-block;min-width:205px}[_nghost-%COMP%] .teams-tree-select .p-treeselect{width:100%;border:0;border-bottom:1px solid var(--primary-color)}[_nghost-%COMP%] .teams-tree-select .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding:0;border:0;background:#fff;box-shadow:0 0 10px #00000040;border-radius:0 0 0 5px}[_nghost-%COMP%] .teams-tree-select .p-tree .p-tree-container .p-treenode{padding:0}[_nghost-%COMP%] .teams-tree-select .p-tree .p-tree-container .p-treenode .p-treenode-content{padding:0}[_nghost-%COMP%] .teams-tree-select .p-tree .p-tree-container .p-treenode .p-treenode-content.p-highlight{background:#fff;color:var(--site-black)}[_nghost-%COMP%] .teams-tree-select .p-tree .p-tree-container .p-treenode:focus>.p-treenode-content{box-shadow:inset 0 0 0 .1rem #76c3bc}[_nghost-%COMP%] .teams-tree-select .p-tree .p-tree-container .p-treenode .p-treenode-content.p-treenode-selectable:not(.p-highlight):hover{background:#f5f5f5;color:#4e4e4e}[_nghost-%COMP%] .teams-tree-select .p-tree .p-tree-container .p-treenode .p-treenode-content.p-highlight .p-tree-toggler, [_nghost-%COMP%] .teams-tree-select .p-tree .p-tree-container .p-treenode .p-treenode-content.p-highlight .p-treenode-icon{color:var(--site-black)}[_nghost-%COMP%] .p-treenode-label{padding-right:.6rem}"]})}return i})()},98889:(U,O,a)=>{a.d(O,{C:()=>D});var l=a(54438),e=a(31253),y=a(4431),S=a(48300),I=a(81141),A=a(85030),b=a(74655);let D=(()=>{class C{constructor(){this.filterState=(0,l.WQX)(S.r),this.selectedFilter=e.If.None,this.isListRoute=!1,this.filterChange=new l.bkB,this.MediaTypeFilterEnum=e.If,this.iconImageFilter=y.rI,this.iconVideoFilter=y.V8,this.hasRestoredFilter=!1}ngOnInit(){this.restoreSavedFilter()}ngOnChanges(c){(c.workspaceId||c.filterTypeEnum)&&(this.hasRestoredFilter=!1,this.restoreSavedFilter())}isFilterActive(c){return this.selectedFilter===c}onFilterToggle(c){const n=this.selectedFilter===c?e.If.None:c;this.filterChange.emit(n),this.persistSelectedFilter(n)}restoreSavedFilter(){if(this.hasRestoredFilter||!this.workspaceId||null==this.filterTypeEnum)return;this.hasRestoredFilter=!0;const n=this.filterState.read(`${this.workspaceId}-${e.i$[this.filterTypeEnum]}`,!1);if(n)try{const d=JSON.parse(n);this.selectedFilter=this.parseMediaTypeFilter(d?.formValues?.mediaTypeFilter),this.filterChange.emit(this.selectedFilter),this.applyFilterToSharedSearchModel(this.selectedFilter)}catch(d){console.error("[AssetMediaTypeFilter] Error parsing localStorage for media filter:",d)}this.filterState.getSettings(this.workspaceId,this.filterTypeEnum).subscribe({next:d=>{const P=this.parseMediaTypeFilter(d?.formValues?.mediaTypeFilter);this.selectedFilter=P,this.filterChange.emit(P),this.applyFilterToSharedSearchModel(P)},error:d=>{console.error("[AssetMediaTypeFilter] Error restoring media filter from DB:",d)}})}persistSelectedFilter(c){!this.workspaceId||null==this.filterTypeEnum||this.filterState.getSettings(this.workspaceId,this.filterTypeEnum).subscribe({next:n=>{n||(n={formValues:{}}),n.formValues||(n.formValues={}),n.formValues.mediaTypeFilter=c===e.If.None?null:c,this.filterState.saveSettings(this.workspaceId,this.filterTypeEnum,n.formValues,!0===this.isListRoute?"list":"grid",void 0,!0).subscribe({next:()=>{this.applyFilterToSharedSearchModel(c)}})}})}applyFilterToSharedSearchModel(c){if(!this.workspaceId||null==this.filterTypeEnum)return;const n=this.filterState.getSearchModel(this.workspaceId,this.filterTypeEnum);n.mediaTypeFilter=c===e.If.None?null:c,this.filterState.setFilterModel(n)}parseMediaTypeFilter(c){if(null==c||""===c)return e.If.None;const n="string"==typeof c?Number(c):c;return n===e.If.Image||n===e.If.Video?n:e.If.None}static#e=this.\u0275fac=function(n){return new(n||C)};static#t=this.\u0275cmp=l.VBU({type:C,selectors:[["app-asset-media-type-filter"]],inputs:{selectedFilter:"selectedFilter",workspaceId:"workspaceId",filterTypeEnum:"filterTypeEnum",isListRoute:"isListRoute"},outputs:{filterChange:"filterChange"},features:[l.OA$],decls:5,vars:10,consts:[[1,"media-type-filter-group"],["pButton","","type","button",1,"p-button","p-button-rounded","p-button-text","media-type-icon-btn",3,"click"],["className","media-type-icon-svg",3,"icon"]],template:function(n,d){1&n&&(l.j41(0,"p-buttonGroup",0)(1,"button",1),l.bIt("click",function(){return d.onFilterToggle(d.MediaTypeFilterEnum.Image)}),l.nrm(2,"app-svg-icon",2),l.k0s(),l.j41(3,"button",1),l.bIt("click",function(){return d.onFilterToggle(d.MediaTypeFilterEnum.Video)}),l.nrm(4,"app-svg-icon",2),l.k0s()()),2&n&&(l.R7$(),l.AVh("is-active",d.isFilterActive(d.MediaTypeFilterEnum.Image)),l.BMQ("aria-label","Filter images")("title","Images"),l.R7$(),l.Y8G("icon",d.iconImageFilter),l.R7$(),l.AVh("is-active",d.isFilterActive(d.MediaTypeFilterEnum.Video)),l.BMQ("aria-label","Filter videos")("title","Videos"),l.R7$(),l.Y8G("icon",d.iconVideoFilter))},dependencies:[I._f,A.e,b.D],styles:[".media-type-filter-group[_ngcontent-%COMP%]{display:inline-flex;gap:.25rem}.media-type-filter-group[_ngcontent-%COMP%] .media-type-icon-btn[_ngcontent-%COMP%]{width:2.25rem;height:2.25rem;border-radius:5px;border:none!important;color:var(--text-color-secondary);background:var(--surface-card);box-shadow:none!important;outline:none!important;display:inline-flex;align-items:center;justify-content:center;font-size:1.25rem}.media-type-filter-group[_ngcontent-%COMP%] .media-type-icon-btn.is-active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--primary-color) 14%,transparent);color:var(--primary-color)}[_nghost-%COMP%] .media-type-filter-group .media-type-icon-btn, [_nghost-%COMP%] .media-type-filter-group .media-type-icon-btn.p-button, [_nghost-%COMP%] .media-type-filter-group .media-type-icon-btn.p-button:enabled:hover, [_nghost-%COMP%] .media-type-filter-group .media-type-icon-btn.p-button:enabled:focus, [_nghost-%COMP%] .media-type-filter-group .media-type-icon-btn.p-button:enabled:active{border:none!important;box-shadow:none!important;outline:none!important}"]})}return C})()}}]);
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.