1import{a as oe}from"./chunk-LVTB6RQD.js";import"./chunk-JEL6HJ7P.js";import{Ea as Q,Mb as re,Nb as ne,bb as X,cb as Z,mb as ee,nb as te,ta as Y,tb as ie,ua as q,va as G,vb as ae,xa as J}from"./chunk-YQOD7X2Z.js";import"./chunk-563YFTIG.js";import"./chunk-36JN3LZY.js";import"./chunk-WPHW6CRH.js";import"./chunk-76O7YCWW.js";import{c as N,e as U}from"./chunk-YYIIKC2W.js";import"./chunk-3WYGUSDH.js";import"./chunk-LU7SZU5X.js";import{A as K,j as W,q as z}from"./chunk-PO2RDVKE.js";import{Cc as D,Ec as B,Fc as j,Gc as $,Oc as P,Pb as w,Qc as L,Rb as C,Tb as v,Tc as x,Ub as y,Uc as F,Vb as S,Vc as A,Wb as p,Xb as d,Yb as c,Za as E,Zb as u,_a as I,db as l,ec as T,jc as f,lc as _,n as H,oa as h,pa as m,pb as R,ub as M,uc as k,wc as O,zc as b}from"./chunk-3URBZWPM.js";import"./chunk-ODN5LVDJ.js";var se=t=>({"icon-active":t}),le=(t,s,r)=>({id:"server",itemsPerPage:t,currentPage:s,totalItems:r}),de=t=>({centered:t});function pe(t,s){if(t&1){let r=T();d(0,"li",24),f("mousedown",function(){let a=h(r).$index;_();let n=k(3);return m(n.selectSuggestion(a))}),u(1,"span",25),c()}if(t&2){let r=s.$implicit,i=s.$index,a=_(),n=k(3);l(),O("selected",n.currentIndex==i),p("innerHTML",a.setSuggestion(r),E)}}function ue(t,s){if(t&1&&(d(0,"div",27),u(1,"a",28),c()),t&2){let r=s.$implicit;l(),p("href",r.url,I)("innerHTML",r.title,E)}}function ge(t,s){if(t&1&&(d(0,"div",18)(1,"div",26)(2,"div",27),b(3,"SELECTED FILTERS :"),c(),y(4,ue,2,2,"div",27,v),c()()),t&2){let r=_();l(4),S(r.linkList)}}function he(t,s){if(t&1&&(d(0,"div",20),b(1),c()),t&2){let r=_();l(),D(" ",r.total,' resources found for "',r.searchTerm,'" ')}}function me(t,s){if(t&1&&(d(0,"div",29)(1,"div",30),u(2,"fab-results-card",2),c()()),t&2){let r=s.$implicit;l(2),p("content",r)}}function _e(t,s){if(t&1&&(d(0,"div",21)(1,"div",18),y(2,me,3,1,"div",29,v),x(4,"async"),x(5,"paginate"),c()()),t&2){let r=_();l(2),S(A(5,2,F(4,0,r.searchResults),L(5,le,r.perPage,r.page,r.total)))}}function fe(t,s){if(t&1&&(d(0,"div",32),u(1,"fab-secondary-card",2),c()),t&2){let r=s.$implicit;l(),p("content",r)}}function we(t,s){if(t&1&&(d(0,"div",22)(1,"div",31),y(2,fe,2,1,"div",32,v),x(4,"async"),x(5,"paginate"),c()()),t&2){let r=_();l(),p("ngClass",P(6,de,3>r.total)),l(),S(A(5,3,F(4,1,r.searchResults),L(8,le,r.perPage,r.page,r.total)))}}function Ce(t,s){if(t&1){let r=T();d(0,"div",23)(1,"fab-pagination-controls",33),f("pageChange",function(a){h(r);let n=_();return m(n.pageChanged(a,null))}),c()()}}var Pe=(()=>{let s=class s{constructor(i,a,n){this.route=i,this.searchService=a,this.router=n,this.perPage=12,this.page=1,this.total=0,this.grid_view=1,this.linkList=[],this.standardHeroData={title:"Search Results",topline:"Knowledge Hub",toplineLink:"knowledge-hub",expanded:!1,useRouterLink:!0},this.dropdownSortData={placeholder:"Refine your search...",allSelected:"All",options:[{label:"Latest",value:"dateNewest"},{label:"Relevance",value:"relevance"},{label:"Oldest First",value:"dateOldest"},{label:"Price Low to High",value:"priceLow"},{label:"Price High to Low",value:"priceHigh"},{label:"Popularity",value:"popularity"}]},a.newSearchConfirmed$.subscribe(o=>{if(this.page=1,o){this.searchTerm=a.taxonomyTerm,this.total=o.totalHits;let g=a.resourceTypes;o.hits.forEach(e=>{if(e.pathAlias.indexOf("knowledge-hub/")!==-1)e.link=e.pathAlias.toLowerCase();else{let V=g.hits.filter(ce=>e.technicalResourceType?ce.id===e.technicalResourceType[0].id:!1);V&&V[0]&&(e.link="knowledge-hub/content/"+e.technicalResourceType[0].name.toLowerCase()+"/"+e.pathAlias)}e.mainImage||(e.mainImage={url:"/assets/images/knowledge-hub/aat-news-general.png"}),e.author&&e.author[0].image&&e.author[0].image.length>1&&(e.author[0].image=e.author[0].image[e.author[0].image.length-1]),e.author&&e.author[0].uuid?e.authorLink=this.buildLinkToAuthor(e.author[0].uuid):e.authorLink=e.link,e.useRouterLink=!0}),this.searchResults=H(o.hits),this.linkList=[],this.searchService.appliedResourceTypeFilters.forEach(e=>{this.linkList.push({title:e.label,url:"knowledge-hub/resources/"+e.label.replace(/\s+/g,"-").toLowerCase()})}
1),this.searchService.appliedCategoryFilters.forEach(e=>{this.linkList.push({title:e.label,url:"knowledge-hub/categories/"+e.label.replace(/\s+/g,"-").toLowerCase()})})}this.loading=!1}),a.newSingleSelectionConfirmed$.subscribe(o=>{o&&o.hits&&o.totalHits>0})}ngOnInit(){this.loading=!0,this.pageChanged(1,!0),this.route.data.subscribe(i=>{let a=[];i.categories.hits.forEach((o,g)=>{let e={label:o.name,value:o.vid,id:o.id};a.push(e)});let n={placeholder:"Refine your search...",allSelected:"All",options:a};this.dropdownCategoriesContent=n}),this.route.data.subscribe(i=>{let a=[];i.resourceTypes.hits.forEach((o,g)=>{let e={label:o.name,value:o.vid,id:o.id};a.push(e)});let n={placeholder:"Refine your search...",allSelected:"All",options:a};this.dropdownResourceTypesContent=n})}pageChanged(i,a){this.page=typeof i=="number"?i:i.pageNumber,a?window.scrollTo(0,0):window.scrollTo({top:340,behavior:"smooth"}),this.loading||this.searchService.onSubmitKeyWordSearch(this.perPage,this.page,"")}getSelectedResourceTypeFilters(i){this.page=1,this.searchService.appliedResourceTypeFilters=i.filter(a=>a.selected===!0),this.loading||this.searchService.onSubmitKeyWordSearch(this.perPage,this.page,"")}getSelectedCategoryFilters(i){this.page=1,this.searchService.appliedCategoryFilters=i.filter(a=>a.selected===!0),this.loading||this.searchService.onSubmitKeyWordSearch(this.perPage,this.page,"")}changeArticlesView(i){this.grid_view=i}buildLinkToResource(i){let a;return i.pathAlias.indexOf("knowledge-hub/")!==-1?a=i.pathAlias:a="knowledge-hub/content/"+i.technicalResourceType[0].name.toLowerCase()+"/"+i.pathAlias,a}buildLinkToAuthor(i){return"/knowledge-hub/author/"+i.toLowerCase()}setSuggestion(i){return i.data.highlight.title?i.data.highlight.title[0]:i.data.highlight.summary?i.data.highlight.summary[0]:""}};s.\u0275fac=function(a){return new(a||s)(R(N),R(oe),R(U))},s.\u0275cmp=M({type:s,selectors:[["search-results-page"]],decls:36,vars:15,consts:[["FabAC",""],[1,"search-results-page"],[3,"content"],[1,"autocomplete",2,"z-index","9999",3,"service"],[1,"suggestion__header"],[1,"suggestion__option"],[1,"search-results-page__container"],[1,"row","space-between"],[1,"search-results-page--filter"],[1,"search-results-page--filter__dropdown"],[1,"search-results-page--heading"],[3,"outputReturnSelectedOptions","contentChange","content"],[1,"search-results-page-container--filter__dropdown"],[3,"outputReturnSelectedOptions","content"],[1,"search-results-page--format"],[1,"search-results-page--format__buttom",3,"click"],[1,"icon","icon-tile",3,"ngClass"],[1,"icon","icon-list",3,"ngClass"],[1,"row"],[1,"row","search-results-page__main-content"],[1,"search-results-page--gentle-message"],[1,"search-results-page--articles-list"],[1,"search-results-page__articles-grid"],[1,"search-results-page--pagination"],[1,"suggestion__option",3,"mousedown"],[3,"innerHTML"],[1,"search-results-page--selected-filters"],[1,"search-results-page--selected-filters__tag"],[3,"href","innerHTML"],[1,"col-xs-12"],[1,"search-results-page--articles-list__element"],[1,"row",3,"ngClass"],[1,"col-sm-4","col-xs-12","search-results-page__articles-grid--margins"],["id","server",3,"pageChange"]],template:function(a,n){if(a&1){let o=T();d(0,"section",1)(1,"fab-standard-hero",2)(2,"fab-autocomplete",3,0)(4,"header",4),b(5,"YOUR RESULTS"),c(),d(6,"ul"),y(7,pe,2,3,"li",5,v),c()()(),d(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10),b(14,"Resource Types"),c(),d(15,"fab-dropdown",11),f("outputReturnSelectedOptions",function(e){return h(o),m(n.getSelectedResourceTypeFilters(e))}),$("contentChange",function(e){return h(o),j(n.dropdownResourceTypesContent,e)||(n.dropdownResourceTypesContent=e),m(e)}),c()(),d(16,"div",12)(17,"div",10),b(18,"Categories"),c(),d(19,"fab-dropdown",13),f("outputReturnSelectedOptions",function(e){return h(o),m(n.getSelectedCategoryFilters(e))}),c()()(),d(20,"div",14)(21,"div",15),f("click",function(){return h(o),m(n.changeArticlesView(1))}),u(22,"i",16),c(),d(23,"div",15),f("click",function(){return h(o),m(n.changeArticlesView(0))}),u(24,"i",17),c()()(),w(25,ge,6,0,"div",18),d(26,"div",19)(27,"div",18),w(28,he,2,2,"div",20),c(),u(29,"br"),w(30,_e,6,9,"div",21),w(31,we,6,12,"div",22),d(32,"div",18),w(33,Ce,2,0,"div",23),c()(),u(34,"br")(35,"br"),c()()}if(a&2){let o=k(3);l(),p("content",n.standardHeroData),l(),p("service",n.searchService),l(5),S(o.results),l(8),B("content",n.dropdownResourceTypesContent),l(4),p("content",n.dropdownCategoriesContent),l(3),p("ngClass",P(11,se,n.grid_view)),l(2),p("ngClass",P(13,se,!n.grid_view)),l(),C(n.linkList.length>0?25:-1),l(3),C(n.searchResults?28:-1),l(2),C(n.grid_view===0?30:-1),l(),C(n.grid_view===1?31:-1),l(2),C(n.total>n.perPage?33:-1)}},dependencies:[K,W,te,ee,ae,ie,Z,G,X,Y,q,ne,re,Q,z,J],styles:[`:root{--aat-ui-grey-25: #bfbfbf;--aat-ui-grey-55: #737373;--aat-slate: #3a5066;--aat-ui-grey-05: #f2f2f2}.search-results-page__container{width:100%;max-width:1050px;margin:0 auto 30px;
1display:flex;flex-direction:column}.search-results-page__main-content{display:flex;display:-webkit-box;flex-direction:column;width:100%;margin:0 auto 3em;justify-content:center;align-items:center}.search-results-page--heading{margin-bottom:1em}.search-results-page--filter{display:flex;display:-webkit-box;flex-direction:column;width:100%;padding-left:10px}.search-results-page--filter div{margin-bottom:1em;margin-right:5px}.search-results-page--format{margin:0 auto 1em;display:flex;flex-direction:row}.search-results-page--format__buttom{font-size:20px;padding:0 1em}.search-results-page--format__buttom .icon{cursor:pointer;opacity:.3}.search-results-page--format__buttom .icon-active{opacity:1}.search-results-page--format__buttom:first-child{padding-right:0}.search-results-page--selected-filters{display:flex;flex-flow:wrap;margin:15px 0 1em -10px;border-bottom-style:solid;border-bottom-color:#e6e5e5;border-bottom-width:1px;padding-left:10px}.search-results-page--selected-filters__tag{padding-bottom:20px;padding-left:10px}.search-results-page--selected-filters__tag a{display:block;background:#f9f9f9;padding:3px 10px;color:#000;text-decoration:none}.search-results-page--articles-list{padding:0 2%;width:97%}.search-results-page--articles-list__element{border-bottom-style:solid;border-bottom-color:#e6e5e5;border-bottom-width:1px;width:100%;padding-top:5px;padding-bottom:5px}.search-results-page__articles-grid{width:100%}.search-results-page__articles-grid--margins{margin-bottom:20px}.search-results-page--gentle-message{display:block;color:#999;margin:0 auto;align-self:center}.search-results-page--pagination{display:block;margin:1em auto 0;align-self:center}@media (min-width: 992px){.search-results-page--filter{display:flex;flex-direction:row;width:auto;margin-right:20%}.search-results-page--format{margin-top:30px}.search-results-page--articles-list{padding:0}.search-results-page--articles-list__element{width:85%;margin:0 auto}}@media (min-width: 1200px){.search-results-page__main-content{min-width:720px}.search-results-page--filter{margin-right:25%}.search-results-page--format{margin:45px 0 0}}.centered{justify-content:center}.space-between{justify-content:space-between}.dropdown__input{width:200px} 2`],encapsulation:2});let t=s;return t})();export{Pe as SearchResultsPageComponent};
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.