PageSourceSearch

https://www.aat.org.uk/csr/chunk-ZYFISYTS.js

js aat.org.uk collected 2026-10-03 21:39:13 UTC 12,520 bytes, 2 lines download raw bytes

1import{a as u}from"./chunk-JEL6HJ7P.js";import{Ba as ye,Da as be,Ea as Se,Mb as Ae,Nb as Ne,U as _e,Xa as xe,Ya as we,bb as Ee,cb as ke,mb as Te,nb as Pe,q as ge,r as fe,va as Ce,xa as ve,xb as Fe,yb as Re}from"./chunk-YQOD7X2Z.js";import"./chunk-563YFTIG.js";import"./chunk-36JN3LZY.js";import"./chunk-WPHW6CRH.js";import{L as ue,h as le,i as ce,j as pe,m as me,t as he,w as de}from"./chunk-76O7YCWW.js";import{c as ae,e as A,k as se}from"./chunk-YYIIKC2W.js";import"./chunk-3WYGUSDH.js";import{a as re,c as oe}from"./chunk-LU7SZU5X.js";import{A as ne,q as ie}from"./chunk-PO2RDVKE.js";import{Ab as W,Ac as X,Bc as Y,Ca as j,Cc as Z,E as F,Fa as V,Pb as _,Qc as ee,R as H,Rb as C,Tb as S,Tc as T,Ub as x,Uc as L,Vb as w,Vc as U,Wb as m,Xb as a,Yb as s,Z as O,Za as B,Zb as h,bc as K,ca as G,cc as q,db as c,ec as E,ga as M,id as te,jc as k,lb as D,lc as d,o as $,oa as y,pa as b,pb as p,rb as z,s as P,ub as v,uc as R,wb as Q,wc as J,zc as l}from"./chunk-3URBZWPM.js";import"./chunk-ODN5LVDJ.js";function Oe(i,t){if(i&1){let o=E();a(0,"ul")(1,"li")(2,"a",4),k("click",function(){let n=y(o).$implicit,r=d(2);return b(r.performPopularSearch(["/search",n.searchQuery]))}),l(3),s()()()}if(i&2){let o=t.$implicit;c(3),X(o.label)}}function Ge(i,t){if(i&1&&(a(0,"div")(1,"div",0),l(2),s(),a(3,"strong"),l(4,"Try finding it another way:"),s(),a(5,"ul",1)(6,"li")(7,"span"),l(8,"checking your spelling"),s()(),a(9,"li")(10,"span"),l(11,"some different search terms"),s()(),a(12,"li")(13,"span"),l(14,"using more general or fewer search terms: flexible study rather than flexible study options"),s()(),a(15,"li")(16,"span"),l(17,'removing any symbols for filtering your search, like + - and ", which will limit your results'),s()()(),h(18,"br"),a(19,"strong"),l(20,"Categories"),s(),h(21,"fab-on-page-nav",2)(22,"br"),a(23,"strong"),l(24,"Popular searches"),s(),h(25,"br"),x(26,Oe,4,1,"ul",null,S),h(28,"br"),a(29,"strong"),l(30,"Need help?"),s(),a(31,"p"),l(32,"If you're unable to find what you're looking for, don't hesitate to reach out to us."),s(),a(33,"ul")(34,"li"),l(35,"Call us at "),a(36,"strong"),l(37,"+44 (0)20 3735 2434"),s(),l(38,": open Monday to Friday, 09:00 to 17:00 UK time"),s(),a(39,"li"),l(40,"Email: "),a(41,"a",3),l(42,"[email protected]"),s()()()()),i&2){let o=d();c(2),Y("Sorry, we couldn't find any results for '",o.searchTerm,"'"),c(19),m("content",o.categories),c(5),w(o.popularSearches)}}var Me=(()=>{let t=class t{constructor(e,n){this.router=e,this.gtm=n,this.results=[],this.searchTerm="",this.alternativeSuggestions=[],this.categories=[{label:"Qualifications and courses",link:`${u.BASE_URL}/qualifications-and-courses`},{label:"Membership & professional development",link:`${u.BASE_URL}/membership`},{label:"Apprenticeships",link:`${u.BASE_URL}/apprenticeships`},{label:"Careers and employability",link:`${u.BASE_URL}/career-in-finance`},{label:"Training providers",link:`${u.BASE_URL}/deliver`},{label:"Employers",link:`${u.BASE_URL}/businesses-employers`}],this.popularSearches=[{label:"Level 4",searchQuery:"level 4"},{label:"Level 3",searchQuery:"level 3"},{label:"Results",searchQuery:"results"},{label:"Membership",searchQuery:"membership"},{label:"Green light",searchQuery:"green light"}]}performPopularSearch(e){this.gtm.trigger("site_search_popular_link",{url:e}),this.router.navigate(e)}};t.\u0275fac=function(n){return new(n||t)(p(A),p(_e))},t.\u0275cmp=v({type:t,selectors:[["aat-site-search-no-results"]],inputs:{results:"results",searchTerm:"searchTerm",alternativeSuggestions:"alternativeSuggestions"},decls:1,vars:1,consts:[[1,"search-page__message"],[1,"search-page__suggestion"],[3,"content"],["href","mailto:[email protected]"],[3,"click"]],template:function(n,r){n&1&&_(0,Ge,43,2,"div"),n&2&&C(!r.results||(r.results==null?null:r.results.length)===0?0:-1)},dependencies:[Re,Fe,se],styles:["li[_ngcontent-%COMP%]{list-style:outside}"]});let i=t;return i})();var Le=(()=>{let t=class t{constructor(e){this.host=e}ngOnInit(){let e=this.host.nativeElement;this.className&&e.classList.add(this.className),e.style.setProperty("--skeleton-rect-width",this.width??"100%"),e.style.setProperty("--skeleton-rect-height",this.height??"20px")}};t.\u0275fac=function(n){return new(n||t)(p(V))},t.\u0275cmp=v({type:t,selectors:[["skeleton-rect"]],hostAttrs:[1,"pulse"],standalone:!1,decls:0,vars:0,template:function(n,r){},styles:["@keyframes _ngcontent-%COMP%_pulse-animation{50%{opacity:.25}}[_nghost-%COMP%]{animation:_ngcontent-%COMP%_pulse-animation 2s cubic-bezier(.4,0,.6,1) infinite;display:block;width:var(--skeleton-rect-width);height:var(--skeleton-rect-height);background:#eff1f6 no-repeat}"]});let i=t;return i})();function je(i,t){return Math.floor(Math.random()*(t-i+1))+i}var Ue=(()=>{let t=class t{constructor(e,n){this.tpl=e,this.vcr=n,this.isLoading=!1,this.size=1}ngOnChanges(e){e.isLoading&&(this.vcr.clear(),e.isLoading.currentValue?Array.from({length:this.size}
1).forEach(()=>{let n=this.vcr.createComponent(Le);Object.assign(n.instance,{width:this.width==="rand"?`${je(30,90)}%`:this.width,height:this.height,className:this.className})}):this.vcr.createEmbeddedView(this.tpl))}};t.\u0275fac=function(n){return new(n||t)(p(D),p(z))},t.\u0275dir=Q({type:t,selectors:[["","skeleton",""]],inputs:{isLoading:[0,"skeleton","isLoading"],size:[0,"skeletonRepeat","size"],width:[0,"skeletonWidth","width"],height:[0,"skeletonHeight","height"],className:[0,"skeletonClassName","className"]},features:[j]});let i=t;return i})();var $e=(()=>{let t=class t{constructor(e,n){this.http=e,this.router=n,this.baseUrl="/content/global-search?keyword=",this.perPage=20}search(e){return this.http.get(u.API_URL+this.baseUrl+e+"&size=5&from=0&loadRef=0",this.createHeaders()).pipe(P(n=>n.results.map(r=>({label:r.title,id:r.link,data:r}))),F(this.handleError))}onSubmit(e){let g=`${this.router.url.split("/")[1]}/${e.term}`,f=encodeURI(g).replace(/[()]/g,I=>"%"+I.charCodeAt(0).toString(16));window.location.href=f}onSubmitKeyWordSearch(e,n,r){this.perPage=e;let g=0;g=(n-1)*this.perPage,r&&(this.termSearched=r);let f=encodeURI(u.API_URL+this.baseUrl+this.termSearched+"&size="+this.perPage+"&from="+g+"&loadRef=0");return this.http.get(f,this.createHeaders())}createHeaders(){return{headers:new re({"Content-Type":"application/json"})}}handleError(e){let n=e.message?e.message:e.toString();return $(n)}};t.\u0275fac=function(n){return new(n||t)(M(oe),M(A))},t.\u0275prov=G({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var Be=(i,t,o)=>({id:"server",itemsPerPage:i,currentPage:t,totalItems:o});function De(i,t){if(i&1){let o=E();a(0,"li",14),k("mousedown",function(){let n=y(o).$index;d();let r=R(4);return b(r.selectSuggestion(n))}),h(1,"span",15),T(2,"textHighlight"),s()}if(i&2){let o=t.$implicit,e=t.$index;d();let n=R(4);c(),J("selected",n.currentIndex==e),m("innerHTML",U(2,3,o.label,n.search.term),B)}}function ze(i,t){if(i&1&&(a(0,"div",16),l(1),s()),i&2){let o=d(2);c(),Z(" ",o.total," results found for '",o.searchForm.get("autoCompleteControl").value,"' ")}}function Qe(i,t){if(i&1&&(h(0,"aat-site-search-no-results",17),T(1,"async")),i&2){let o=d(2);m("searchTerm",o.searchForm.get("autoCompleteControl").value)("results",L(1,2,o.searchResults))}}function We(i,t){if(i&1&&(K(0),_(1,ze,2,2,"div",16),_(2,Qe,2,4,"aat-site-search-no-results",17),q()),i&2){let o=d();c(),C(o.total>0?1:-1),c(),C(o.total===0?2:-1)}}function Ke(i,t){if(i&1&&(a(0,"div")(1,"div",18),h(2,"fab-standard-card",19),s()()),i&2){let o=t.$implicit;c(2),m("content",o)}}function qe(i,t){if(i&1&&(x(0,Ke,3,1,"div",null,S),T(2,"paginate")),i&2){let o=d();w(U(2,0,t,ee(3,Be,o.perPage,o.page,o.total)))}}function Je(i,t){if(i&1){let o=E();a(0,"div",13)(1,"fab-pagination-controls",20),k("pageChange",function(n){y(o);let r=d();return b(r.pageChanged(n))}),s()()}}var Ct=(()=>{let t=class t{constructor(e,n,r,g){this.authService=e,this.cdRef=n,this.searchService=r,this.activatedRoute=g,this.isUserAuth=!1,this.perPage=20,this.page=1,this.defaultPage=1,this.total=0,this.results=[],this.subscriptions=[],this.searchForm=new pe({autoCompleteControl:new me("")}),this.autoCompleteContent={placeHolder:"Find qualifications, news, study materials...",termLength:3},this.hero={title:"Search",expanded:!1},this.ghostNotification={type:"ghost",message:'Do you have a MyAAT account? If so, <a href="/myaat/login">Log in</a> to see more search results.',fullWidth:!0},this.statusNotification={type:"status",message:'Looking for study support resources, like Green Light tests and practice assessments? <a href="/learning-portal">Search in the AAT Lifelong Learning Portal</a>.',fullWidth:!0,closeNotification:!0},this.loading=!0;let f=this.authService.authenticationChanged$.subscribe(I=>{this.isUserAuth=I});this.subscriptions.push(f)}ngOnInit(){let e="/myaat/login?destination=/search";this.searchForm.controls.autoCompleteControl.value&&(e+=`/${this.searchForm.controls.autoCompleteControl.value}`),this.ghostNotification.message=`Do you have a MyAAT account? If so, <a href="${e}">Log in</a> to see more search results.`,this.initFormAndParamListeners()}pageChanged(e){this.page=typeof e=="number"?e:e.pageNumber,this.loading=!0,this.searchService.onSubmitKeyWordSearch(this.perPage,this.page,""),window.scrollTo({top:64,behavior:"smooth"})}initFormAndParamListeners(){this.loading=!0;let e=this.activatedRoute.params.subscribe(n=>{n.searchTerm&&(this.searchForm.get("autoCompleteControl").patchValue(decodeURI(n.searchTerm.trim())),this.searchResults=this.searchService.onSubmitKeyWordSearch(this.perPage,this.page?this.page:this.defaultPage,n.searchTerm).pipe(H(),O(r=>{this.total=r.totalResults}),F(r=>{throw this.loading=!1,this.total=0,r}),P(r=>(this.loading=!1,r.results))))});this.subscriptions.push(e)}
1ngOnDestroy(){this.subscriptions.forEach(e=>{e.unsubscribe()})}ngAfterViewChecked(){this.cdRef.detectChanges()}};t.\u0275fac=function(n){return new(n||t)(p(ge),p(te),p($e),p(ae))},t.\u0275cmp=v({type:t,selectors:[["app-search-page"]],decls:21,vars:15,consts:[["FabAC",""],[1,"search-page"],[3,"isNotificationOpen","notification"],[3,"formGroup","content"],["formControlName","autoCompleteControl",1,"autocomplete",3,"service","searchFromUrl","placeHolderText"],[1,"suggestion__header"],[1,"suggestion__option"],[1,"search-page__wrapper"],[1,"search-page__content"],[1,"row"],[1,"col-xs-12"],[1,"pulse",3,"isNotificationOpen","notification"],[4,"skeleton","skeletonClassName"],[1,"search-page__pagination"],[1,"suggestion__option",3,"mousedown"],[3,"innerHTML"],[1,"col-xs-12","search-page__message"],[3,"searchTerm","results"],[1,"search-page__item"],[3,"content"],["id","server",3,"pageChange"]],template:function(n,r){if(n&1&&(a(0,"div",1),h(1,"fab-notification",2),a(2,"fab-standard-hero",3)(3,"fab-autocomplete",4,0)(5,"header",5),l(6,"Suggestions"),s(),a(7,"ul"),x(8,De,3,6,"li",6,S),s()()(),a(10,"section",7)(11,"div",8)(12,"div",9)(13,"div",10),h(14,"fab-notification",11),s()(),a(15,"div",9),W(16,We,3,2,"ng-container",12),s(),_(17,qe,3,7),T(18,"async"),a(19,"div",9),_(20,Je,2,0,"div",13),s()()()()),n&2){let g,f=R(4);c(),m("isNotificationOpen",!0)("notification",r.statusNotification),c(),m("formGroup",r.searchForm)("content",r.hero),c(),m("service",r.searchService)("searchFromUrl",r.searchForm.get("autoCompleteControl").value)("placeHolderText",r.autoCompleteContent.placeHolder),c(5),w(f.results),c(6),m("isNotificationOpen",!r.isUserAuth)("notification",r.ghostNotification),c(2),m("skeleton",r.loading&&!!r.searchForm.get("autoCompleteControl").value)("skeletonClassName","search-page__message"),c(),C((g=L(18,13,r.searchResults))?17:-1,g),c(3),C(r.total>r.perPage?20:-1)}},dependencies:[ne,Ne,Ae,Pe,Te,ue,le,ce,he,de,we,xe,Ee,ye,ke,Ce,fe,Se,Me,Ue,ie,ve,be],styles:[`:root{--aat-ui-grey-25: #bfbfbf;--aat-ui-grey-55: #737373;--aat-slate: #3a5066;--aat-ui-grey-05: #f2f2f2}.search-page__content{padding:0 15px}@media (min-width: 1200px){.search-page__content{width:960px;margin:0 auto;padding:0}}.search-page__message{padding:44px 0}@media (min-width: 1200px){.search-page__message{text-align:center}}.search-page__suggestion{list-style-position:outside;padding-left:1.8em;margin-bottom:2%}.search-page__suggestion li{list-style-type:disc;margin:1% 0;line-height:1.35rem;font-weight:400}.search-page__item{border-bottom:1px solid rgb(229.5,229.5,229.5);margin-bottom:23px;padding-bottom:11px}.search-page__pagination{width:100%;text-align:center;padding:53px 0 23px}
2`],encapsulation:2});let i=t;return i})();export{Ct as GlobalSearchComponent};

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.