PageSourceSearch

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

js aat.org.uk collected 2026-10-03 21:39:52 UTC 36,065 bytes, 3 lines download raw bytes

1import{a as Pe}from"./chunk-RHWRZINR.js";import{a as Ie}from"./chunk-I2XU3YER.js";import{i as we}from"./chunk-V5ROTH2O.js";import"./chunk-OZC5JFZK.js";import{a as O}from"./chunk-JEL6HJ7P.js";import{L as X,T as Ce,U as q,X as be,Xa as ke,Y as G,Ya as Te,aa as ve,ea as ye,ha as Se,q as ge,sa as H,t as xe}from"./chunk-YQOD7X2Z.js";import"./chunk-563YFTIG.js";import"./chunk-36JN3LZY.js";import"./chunk-WPHW6CRH.js";import"./chunk-76O7YCWW.js";import{a as _e,e as he}from"./chunk-YYIIKC2W.js";import{d as me,e as fe}from"./chunk-3WYGUSDH.js";import"./chunk-LU7SZU5X.js";import{A as R,j as pe,w as ue}from"./chunk-PO2RDVKE.js";import{Ac as F,Bc as I,E as oe,Ic as z,Lc as de,Oc as le,Pb as m,Rb as f,Sb as U,Tb as D,Tc as Y,Ub as k,Uc as K,Vb as T,Wb as b,Xb as s,Yb as c,Za as N,Zb as h,_a as W,ca as re,da as ae,db as a,ec as M,jc as P,lc as p,n as ie,oa as L,pa as B,pb as v,ub as j,vb as ce,y as ne,yc as se,zc as u}from"./chunk-3URBZWPM.js";import{a as ee,b as te}from"./chunk-ODN5LVDJ.js";var V=(()=>{let o=class o{constructor(){this.regForm=""}getConfig(i){let r=[];if(Array.isArray(i.productSelectorStrand))for(let x of i.productSelectorStrand)this.regForm="https://aat.jotform.com/231433561840047",r.push(x.tid);let t=O.PRODUCT_SELECTOR_STRAND_IDS,d={intro:"",targetUrl:i.productSelectTargetUrl,title:typeof i.name>"u"?"Not found":i.name,benefits:null,strand:r.map(x=>x.toString()),basketText:"",tid:i.tid,linkToDetails:null,programmeComponentId:i.programmeComponentId?i.programmeComponentId.toLowerCase():"",topLevelComponentId:i.topLevelComponentId?i.topLevelComponentId.toLowerCase():"",membershipType:i.prodselectorMembertype},l="",C="",g={memberFeeUk:"",memberAdmissionFee:"",aatFeesUk:"",total:""},_={},w="Course",E=[10994,11022,11020,11021],A=[11024,10995];if([11172,11173].filter(x=>r.includes(x)).length>0?w="Qualification":E.filter(x=>r.includes(x)).length>0?w="Membership":A.filter(x=>r.includes(x)).length>0&&(w="Guest"),typeof i.fullProduct<"u"&&Array.isArray(i.fullProduct)&&i.fullProduct.length>0){let x=i.fullProduct[0];g=this.feesFinder(x),x.productSelectorDetails&&(_=x.productSelectorDetails?.[0]??{},d.benefits=_.keyBenefits??"",d.intro=_.productCardBody??"",d.linkToDetails=_.viewDetailsLink??"",d.basketText=_.basketText??""),l=x?.productDetails?.[0]?.level,C=x?.durationFePlainText??""}let S=null;switch(w){case"Qualification":d.elements=[],d.price=g.aatFeesUk??"0",d.durationCopy=typeof _.productPageAccess<"u"?_.productPageAccess:"",d.elementsFooter=typeof _.productCardBodyCont<"u"?_.productCardBodyCont:null,d.fees=typeof g.memberAdmissionFee<"u"?g.memberAdmissionFee:"0",d.membership=typeof g.memberFeeUk<"u"?g.memberFeeUk:"0",d.type="accounting";break;case"Membership":d.target=i.productSelectTargetUrl,d.durationCopy=typeof _.productPageAccess<"u"?_.productPageAccess:"",d.type="membership",S={text:"Find out more and apply",aria:"Find out more and apply",type:"primary",action:{link:i.productSelectTargetUrl,openInNewTab:!0,type:"link"},glyph:null};break;case"Course":d.price=typeof g.aatFeesUk<"u"?g.aatFeesUk:"0",d.durationCopy=typeof _.productPageAccess<"u"?_.productPageAccess:"",d.level=l,d.duration=C,d.type="qualification";break;case"Guest":d.target=i.productSelectTargetUrl,d.intro="A guest MyAAT account allows you to book your place at AAT events, and provides access for training provider staff and AAT accredited employers.",d.type="membership",S={text:"Create account",aria:"Create account",type:"primary",action:{link:i.productSelectTargetUrl,openInNewTab:!0,type:"link"}};break}return S&&(d.button=S),d}feesFinder(i){let r={memberFeeUk:"",memberAdmissionFee:"",aatFeesUk:"",total:""};if(typeof i.productDetails<"u"){let t=i.productDetails[0];if(r.memberFeeUk=t.memberFeeUk,r.memberAdmissionFee=t.previouslyRegisteredOnly==="yes"?t.memberReinstateFee:t.memberAdmissionFee,r.aatFeesUk=t.aatFeesUk,r.memberFeeUk&&r.memberFeeUk.length>0&&r.memberAdmissionFee&&r.memberAdmissionFee.length>0){let d=parseInt(r.memberAdmissionFee,10),l=parseInt(r.memberFeeUk,10);r.total=(d+l).toString()}}return r}};o.\u0275fac=function(r){return new(r||o)},o.\u0275prov=re({token:o,factory:o.\u0275fac,providedIn:"root"});let e=o;return e})();var De=e=>({course__added:e});function Me(e,o){if(e&1&&(s(0,"strong"),u(1),c()),e&2){let n=p();a(),I("(",n.content.qualificationStandardName,")")}}function Ne(e,o){if(e&1&&h(0,"p",4),e&2){let n=p();b("innerHTML",z(n.content.durationCopy),N)}}function Ue(e,o){if(e&1&&h(0,"div",5),e&2){let n=p();b("innerHTML",z(n.content.intro),N)}}function ze(e,o){if(e&1&&(s(0,"li",17)(1,"a",18),u(2),c()()),e&2){let n=o.$implicit;a(),b("href",z(n.target),W),a(),F(n.name)}}function Oe(e,o){if(e&1&&(s(0,"ul"),k(1,ze,3,3,"li",17,D),c()),e&2){let n=p();a(),T(n.content.elements)}}function $e(e,o){if(e&1&&h(0,"p",6),e&2){let n=p();b("innerHTML",n.content.elementsFooter,N)}}function je(e,o){if(e&1&&(s(0,"div",7)(1,"span",19),u(2),c(),h(3,"img",20),u(4,"\xA0"),s(5,"span",21),u(6),c()()),e&2){let n=p();a(2),F(n.content.level),a(4),F(n.content.duration)}}function Re(e,o){if(e&1){let n=M();s(0,"div",8)(1,"a",22),P("click",function(){L(n);let r=p();return B(r.pushProductToGTM())}),u(2),c()()}if(e&2){let n=p();a(),b("href",z(n.content.linkToDetails.url),W),a(),F(n.content.linkToDetails.text)}}function qe(e,o){if(e&1){let n=M();s(0,"div",23)(1,"a",26),P("click",function(){L(n);let r=p(2);return B(r.showMore())}),s(2,"span"),u(3,"Show key benefits"),c(),h(4,"i",27),c()()}}function Ge(e,o){if(e&1){let n=M();s(0,"div",24)(1,"a",26),P("click",function(){L(n);let r=p(2);return B(r.showLess())}),s(2,"span"),u(3,"Hide key benefits"),c(),h(4,"i",28),c()()}}function He(e,o){if(e&1&&(s(0,"li"),h(1,"img",29)(2,"span",6),c()),e&2){let n=o.$implicit;a(2),b("innerHTML",n,N)}}function Ve(e,o){if(e&1&&(s(0,"div",25)(1,"ul"),k(2,He,3,1,"li",null,D),c()()),e&2){let n=p(2);a(2),T(n.content.benefits)}}function Qe(e,o){if(e&1&&(s(0,"div",9),m(1,qe,5,0,"div",23),m(2,Ge,5,0,"div",24),m(3,Ve,4,0,"div",25),c()),e&2){let n=p();a(),f(n.more?-1:1),a(),f(n.more?2:-1),a(),f(n.more?3:-1)}}function Je(e,o){if(e&1&&(u(0),h(1,"br")),e&2){let n=o.$implicit;I(" ",n)}}function We(e,o){if(e&1&&(s(0,"span",30)(1,"b"),u(2,"Price includes"),c(),h(3,"br"),k(4,Je,2,1,null,null,D),c()),e&2){let n=p(2);a(4),T(n.content.pricePart)}}function Ye(e,o){if(e&1&&(s(0,"div")(1,"h4")(2,"strong"),u(3),c()(),m(4,We,6,0,"span",30),c()),e&2){let n=p();a(3),I("\xA3",n.content.price),a(),f(n.content.pricePart?4:-1)}}function Ke(e,o){if(e&1&&h(0,"fab-button",13),e&2){let n=p();b("button",n.button)}}function Xe(e,o){if(e&1&&(h(0,"i"),u(1," \xA0 ")),e&2){let n=p(2);se(n.content.failedCheck==null||n.content.failedCheck.productCardConfiguration==null?null:n.content.failedCheck.productCardConfiguration.messageLeadingIcon)}}function Ze(e,o){if(e&1&&(s(0,"div",14),m(1,Xe,2,2),s(2,"p"),h(3,"strong",6),c()()),e&2){let n=p();a(),f(!(n.content.failedCheck==null||n.content.failedCheck.productCardConfiguration==null)&&n.content.failedCheck.productCardConfiguration.messageLeadingIcon?1:-1),a(2),b("innerHTML",n.content.failedCheck==null||n.content.failedCheck.productCardConfiguration==null?null:n.content.failedCheck.productCardConfiguration.message,N)}}function et(e,o){e&1&&(s(0,"span"),u(1,"Speak to one of our advisors on "),s(2,"a",31),u(3,"+44 (0)20 3735 2468"),c(),u(4," if you need more information. Lines are open Monday to Frid
1ay 09.00-17.00 (UK time) or "),s(5,"a",32),u(6,"[email protected]"),c()())}function tt(e,o){e&1&&u(0," This is your one-off registration fee, which is part of the standard qualification fee. You'll pay for your assessments separately: open the product page link and see the Fees section. ")}function it(e,o){e&1&&(s(0,"div",16),h(1,"i",17),s(2,"span"),u(3,"Added "),h(4,"br"),s(5,"a",33),u(6,"View your basket"),c()()())}var Fe=(()=>{let o=class o{constructor(i,r){this.basketService=i,this.gtmService=r,this.more=!1,this.valid=!0,this.button={action:{callback:()=>{this.addToBasket()},type:"callback"},disabled:!1,text:"Add to basket",glyph:{icon:X.CART},aria:"Add to basket",type:"primary"},this.itemAdded=!1,this.addedToBasket=!1,this.basketCount=0,this.colours=xe}ngOnInit(){this.button.text=this.content.button?.text??"Add to basket",this.content.inBasket?(this.button.disabled=!0,this.button.text="Added to basket"):this.content.failedCheck?(this.button.disabled=this.content.failedCheck.productCardConfiguration?.buttonEnabled===!1,this.button.text=this.content.failedCheck.productCardConfiguration?.buttonText??"Add to basket",this.button.glyph={icon:this.content.failedCheck?.productCardConfiguration?.buttonGlyph??X.CART},this.content.failedCheck.productCardConfiguration?.buttonAction==="link"&&(this.button.action.callback=()=>{window.open(this.content.failedCheck?.productCardConfiguration?.buttonLink||"#","_blank")}),this.button.gtmData=this.addToCartGTMData()):this.content.button&&(this.content.button.action.type==="link"&&(this.button.action={type:"link",link:this.content.button.action.link,openInNewTab:this.content.button.action.openInNewTab??!1}),this.button.glyph=this.content.button.glyph)}showMore(){this.more=!0,this.gtmService.push({event:"productDetail",ecommerce:{currencyCode:"GBP",detail:{products:[{name:this.content.title,id:this.content.programmeComponentId?this.content.programmeComponentId:"",price:parseInt(this.content.membership?this.content.membership:this.content.price,10)}]}}})}showLess(){this.more=!1}pushProductToGTM(){this.gtmService.push({event:"productClick",ecommerce:{currencyCode:"GBP",click:{products:[{name:this.content.title,id:this.content.programmeComponentId?this.content.programmeComponentId:"",price:parseInt(this.content.membership?this.content.membership:this.content.price,10)}]}}})}addToBasket(){let i=this.content.basketText.replace(/(<p[^>]+?>|<p>|<\/p>)/gim,""),r={name:this.content.title,targetUrl:this.content.targetUrl,price:parseInt(this.content.membership?this.content.membership:this.content.price,10),basketText:i,durationCopy:this.content.durationCopy,points:typeof this.content.elements<"u"&&Array.isArray(this.content.elements)?this.content.elements:[],productId:"",programmeComponentId:this.content.programmeComponentId||"",topLevelComponentId:this.content.topLevelComponentId||"",qualificationGroupName:this.content.qualificationGroupName||"",qualificationStandardName:this.content.qualificationStandardName||"",scottishQualificationLevel:this.content.scottishQualificationLevel||""};this.content.basketText&&(r.basketText=this.content.basketText),this.button.text="Added",this.basketService.addToBasket(r)}addToCartGTMData(){return{event:"addToCart",ecommerce:{currencyCode:"GBP",add:{products:[{name:this.content.title,id:this.content.programmeComponentId?this.content.programmeComponentId:"",price:parseInt(this.content.membership?this.content.membership:this.content.price,10)}]}}}}};o.\u0275fac=function(r){return new(r||o)(v(G),v(q))},o.\u0275cmp=j({type:o,selectors:[["fab-product-card"]],inputs:{content:"content"},standalone:!1,decls:27,vars:19,consts:[[1,"courses__accounting",3,"ngClass"],[1,"row","courses-card"],[1,"col-md-8","col-xs-12","courses__detail"],[1,"courses__scottish_level"],[1,"small",3,"innerHTML"],[1,"courses__intro",3,"innerHTML"],[3,"innerHTML"],[1,"courses__misc"],[1,"small"],[1,"courses__benefits-container"],[1,"col-md-4","col-xs-12","courses__add"],[1,"courses__price-container"],[1,"courses__button-container"],[3,"button"],[1,"small","failed-message"],[1,"courses__text-container","courses__text-container-fees"],[1,"courses__text-container"],[1,"icon-success"],[3,"href"],[1,"card__tag"],["src","/assets/icons/aat-icons/clock.svg",1,"courses__icon"],[1,"duration"],["target","_blank",3,"click","href"],[1,"course__more","course__more--closed"],[1,"course__more","course__more--open"],[1,"courses__benefits-container-benefits"],[3,"click"],[1,"icon","icon-arrow-down"],[1,"icon","icon-arrow-up"],["src","/assets/images/registration/green-tick.svg"],[1,"small-text"],["href","tel:+4402037352468"],["href","mailto:[email protected]"],["href","/registration/basket"]],template:function(r,t){r&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"h4")(4,"strong"),u(5),c(),m(6,Me,2,1,"strong"),s(7,"div",3),u(8),c()(),m(9,Ne,1,2,"p",4),m(10,Ue,1,2,"div",5),m(11,Oe,3,0,"ul"),m(12,$e,1,1,"p",6),m(13,je,7,2,"div",7),m(14,Re,3,3,"div",8),m(15,Qe,4,3,"div",9),c(),s(16,"div",10)(17,"div")(18,"div",11),m(19,Ye,5,2,"div"),c()(),s(20,"div",12),m(21,Ke,1,1,"fab-button",13),m(22,Ze,4,2,"div",14),m(23,et,7,0,"span"),c(),s(24,"div",15),m(25,tt,1,0),c(),m(26,it,7,0,"div",16),c()()()),r&2&&(b("ngClass",le(17,De,t.content.inBasket)),a(5),I(" ",t.content.title," "),a(),f(t.content.qualificationStandardName?6:-1),a(2),I(" ",t.content.scottishQualificationLevel," "),a(),f(t.content.durationCopy?9:-1),a(),f(t.content.intro?10:-1),a(),f(t.content.elements?11:-1),a(),f(t.content.elementsFooter?12:-1),a(),f(t.content.level&&t.content.duration?13:-1),a(),f(t.content.linkToDetails&&t.content.eligible!=="isAlreadySubscribed"?14:-1),a(),f(t.content.benefits&&t.content.eligible!=="isAlreadySubscribed"?15:-1),a(4),f(t.content.price&&(t.content.failedCheck==null||t.content.failedCheck.errorConfig==null||t.content.failedCheck.errorConfig.global==null?null:t.content.failedCheck.errorConfig.global.hidePrices)!==!0?19
1:-1),a(2),f(!(t.content.failedCheck==null||t.content.failedCheck.productCardConfiguration==null)&&t.content.failedCheck.productCardConfiguration.buttonHidden?-1:21),a(),f(!(t.content.failedCheck==null||t.content.failedCheck.productCardConfiguration==null)&&t.content.failedCheck.productCardConfiguration.message?22:-1),a(),f(!(t.content==null||t.content.failedCheck==null||t.content.failedCheck.productCardConfiguration==null)&&t.content.failedCheck.productCardConfiguration.showContactUsInformation?23:-1),a(2),f(!(t.content==null||t.content.failedCheck==null||t.content.failedCheck.productCardConfiguration==null)&&t.content.failedCheck.productCardConfiguration.hideRegFeesExplanation?-1:25),a(),f(t.content.inBasket?26:-1))},dependencies:[pe,H],styles:[`:root{--aat-ui-grey-25: #bfbfbf;--aat-ui-grey-55: #737373;--aat-slate: #3a5066;--aat-ui-grey-05: #f2f2f2}.courses-card{justify-content:center}@media (min-width: 1200px){.courses-card{justify-content:space-between;align-items:flex-start}}.courses-card ul,.courses-card ol{padding-left:20px}.courses-card ul li,.courses-card ol li{list-style-type:disc;list-style-position:outside}.failed-message{display:flex;align-items:center;justify-content:center}.icon-success{color:#00ab4e;font-size:14px}.course__more a{font-size:12px;vertical-align:top;display:inline-flex;align-items:center;min-width:155px;justify-content:space-between}.course__more a span{color:#00ab4e}.course__more a i{font-size:20px}.course__more a:hover{text-decoration:none}.course__more a:hover span{text-decoration:underline}.courses__container{padding-bottom:30px;padding-top:30px;margin-left:auto;margin-right:auto;width:calc(100% - 20px);text-align:left}.courses__container--last{padding-top:8px}@media (min-width: 1200px){.courses__container{max-width:960px}}.courses__container span.category-title{text-transform:uppercase;text-align:center;padding:15px 0 0;display:block}.courses__container .course__added{border:2px solid #00ab4e}.courses__accounting{border:1px solid #dce6f0;background:#fff;padding:15px 15px 30px;margin:15px 0 30px}.courses__accounting.course__added{border:2px solid #00ab4e}.courses__scottish_level{font-size:.8em}.courses__add{border:0;box-sizing:content-box;margin-bottom:15px;padding-top:15px}@media (min-width: 992px){.courses__add{border:1px solid #dce6f0;max-width:240px}}.courses__add .registered img{margin-right:7px}.courses__add .registered strong{font-weight:600}.courses__add .sanctioned i{font-size:14px;margin-right:5px}.courses__add .sanctioned span{display:block}.courses__button-container{text-align:center;padding:10px}.courses__button-container--membership,.courses__button-container--isMember,.courses__button-container--under16{padding-top:20px}.courses__button-container--membership .button-primary i,.courses__button-container--isMember .button-primary i,.courses__button-container--under16 .button-primary i{display:none}.courses__button-container--membership a>span,.courses__button-container--isMember a>span,.courses__button-container--under16 a>span{padding:12px 24px}.courses__button-container fab-button{display:block;margin-bottom:20px}.courses__button-container fab-button a:focus{text-decoration:none}.courses__price-container{text-align:center;padding-bottom:1em}.courses__price-container h4{padding-bottom:8px}.courses__price-container span{padding:0}.courses__benefits-container{border-top:1px solid #dce6f0;color:#00ab4e;padding-top:1em;margin-top:1em}@media (min-width: 992px){.courses__benefits-container{width:95%}}.courses__benefits-container-benefits{margin-top:.8em}.courses__benefits-container-benefits ul li{display:flex;align-items:center;min-height:20px}.courses__benefits-container-benefits ul li span{padding-left:10px}.courses__text-container{text-align:center;font-size:11px}.courses__text-container .icon-success{padding-right:5px}.courses__text-container-fees{padding:0 10px}.courses__icon{vertical-align:middle;height:25px;width:25px}.product-hr{margin-right:25px;border-color:1px solid #4a4a4a}.fa-list-check-circled:before{box-sizing:border-box;content:"\\e805";float:left;font-size:1em!important;padding-top:2px!important;height:20px!important;width:20px!important;margin-top:2px;color:#fff;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;background-color:#00ab4e}@media (min-width: 992px){.fa-list-check-circled:before{padding-top:5px;font-size:1.2em;height:30px;width:30px}}
2`],encapsulation:2});let e=o;return e})();var Ee=(()=>{let o=class o{};o.\u0275fac=function(r){return new(r||o)}
2,o.\u0275mod=ce({type:o}),o.\u0275inj=ae({imports:[R,Te,Ce,H]});let e=o;return e})();function ot(e,o){e&1&&(s(0,"p"),u(1," Already have a MyAAT account? "),s(2,"a",13),u(3,"Log in"),c(),u(4," to see all the products you're eligible for. "),c())}function rt(e,o){if(e&1){let n=M();s(0,"label",5),u(1),s(2,"input",15),P("click",function(){L(n);let r=p(2),t=r.$implicit,d=r.$index,l=p();return B(l.showHideChildren(d,t.value.tid,t.value.name,!!(!(t==null||t.value==null)&&t.value.children)))}),c(),h(3,"span",7),c()}if(e&2){let n=p(2),i=n.$implicit,r=n.$index;a(),I("",i.value.name," "),a(),b("value",r)}}function at(e,o){if(e&1){let n=M();s(0,"div")(1,"label",5),u(2),s(3,"input",16),P("click",function(){L(n);let r=p().$implicit,t=p(4);return B(t.showHideChildren(null,r.tid,r.name))}),c(),h(4,"span",7),c()()}if(e&2){let n=p().$implicit,i=p(4);a(2),I("",n.name," "),a(),b("value",1)("checked",i.subType===1)}}function ct(e,o){if(e&1&&(s(0,"div"),m(1,at,5,3,"div"),c()),e&2){let n=o.$implicit,i=p(4);a(),f(i.getType(n)==="object"&&i.hideStrands(n.tid)?1:-1)}}function st(e,o){if(e&1&&(s(0,"div",14),k(1,ct,2,1,"div",null,U),c()),e&2){let n=p(2).$implicit;a(),T(n.value.children)}}function dt(e,o){if(e&1&&(s(0,"div"),m(1,rt,4,2,"label",5),m(2,st,3,0,"div",14),c()),e&2){let n=p(),i=n.$implicit,r=n.$index,t=p();a(),f(i.value?1:-1),a(),f(i.value.children&&t.showSelectorChildren===r?2:-1)}}function lt(e,o){if(e&1&&(s(0,"div"),m(1,dt,3,2,"div"),c()),e&2){let n=o.$implicit,i=p();a(),f(i.hideStrands(n.value.tid)?1:-1)}}function pt(e,o){if(e&1&&(s(0,"div",10),h(1,"fab-notification",17),c()),e&2){let n=p();a(),b("isNotificationOpen",!0)("notification",n.ghostNotification)}}function ut(e,o){if(e&1&&h(0,"fab-product-card",19),e&2){let n=p().$implicit,i=p(3);b("content",i.getEligibilityForProduct(n))}}function mt(e,o){if(e&1&&(s(0,"div"),m(1,ut,1,1,"fab-product-card",19),c()),e&2){let n=o.$implicit,i=p(3);a(),f(i.getEligibilityForProduct(n)?1:-1)}}function ft(e,o){if(e&1&&(s(0,"div")(1,"span",18),u(2),c(),k(3,mt,2,1,"div",null,U),c()),e&2){let n=p().$implicit,i=p();a(2),F(i.flatStrands[n.value.tid].name),a(),T(i.flatStrands[n.value.tid].products)}}function _t(e,o){if(e&1&&h(0,"fab-product-card",19),e&2){let n=p().$implicit,i=p(5);b("content",i.getEligibilityForProduct(n))}}function ht(e,o){if(e&1&&(s(0,"div"),m(1,_t,1,1,"fab-product-card",19),c()),e&2){let n=o.$implicit,i=p(5);a(),f(i.getEligibilityForProduct(n)?1:-1)}}function gt(e,o){if(e&1&&(s(0,"div")(1,"span",18),u(2),c(),k(3,ht,2,1,"div",null,U),c()),e&2){let n=p().$implicit,i=p(3);a(2),F(i.flatStrands[n.tid].name),a(),T(i.flatStrands[n.tid].products)}}function xt(e,o){if(e&1&&(s(0,"div"),m(1,gt,5,1,"div"),c()),e&2){let n=o.$implicit,i=p(3);a(),f(n&&n.tid&&i.flatStrands[n.tid]&&i.flatStrands[n.tid].products&&i.flatStrands[n.tid].products.length&&i.getShow(n.tid)?1:-1)}}function Ct(e,o){if(e&1&&(s(0,"div"),k(1,xt,2,1,"div",null,U),c()),e&2){let n=p().$implicit;a(),T(n.value.children)}}function bt(e,o){if(e&1&&(s(0,"div"),m(1,ft,5,1,"div"),m(2,Ct,3,0,"div"),c()),e&2){let n=o.$implicit,i=p();a(),f(n.value&&i.flatStrands[n.value.tid]&&i.flatStrands[n.value.tid].products&&i.flatStrands[n.value.tid].products.length&&i.getShow(n.value.tid)?1:-1),a(),f(n.value.children?2:-1)}}var Ot=(()=>{let o=class o{constructor(i,r,t,d,l,C,g,_,w,E,A,y,S){this.contentService=i,this.productCardConfigService=r,this.eligibilityService=t,this.basketService=d,this.router=l,this.authService=C,this.title=g,this.meta=_,this.layoutSetupService=w,this.productListService=E,this.registrationService=A,this.gtmService=y,this.contactService=S,this.excludeRoutes=["category","resourse"],this.menuIsActive=!1,this.isRouterLink=!1,this.basketCount=0,this.configuration={selectAllTid:10996},this.productUuids=[],this.qualificationElements={},this.products={},this.productCards={},this.cardOptions=[],this.showSelectorChildren=-1,this.childStrands=[],this.pStrands={},this.flatStrands={},this.strand=[],this.currentSelection=this.configuration.selectAllTid,this.pageTitle="Register with AAT | AAT",this.ghostNotification={type:"ghost",message:'Not sure which qualification is right for you? <a href="/qualifications-and-courses">See all our qualifications and courses.</a>',fullWidth:!0},this.layoutSetupService.setLayoutConfig({showLeftNav:!1,headerLinks:[]}),this.title.setTitle(this.pageTitle),this.meta.addTag({name:"description",content:"Register with AAT to study accounting, bookkeeping and business skills qualifications and courses, sit assessments or apply for professional membership."})}ngOnInit(){let i=this.contactService.contactId()??null,r=null;try{r=JSON.parse(sessionStorage.getItem("basket")||"null")}catch{r=null}!r&&i?this.registrationService.getRegIdFromContact(i).subscribe(t=>{let d=t.registrationId;sessionStorage.setItem("registrationId",d),this.restoreBasketFromApi(t.basket)},t=>{this.init()}):this.init()}init(){this.authService.authenticationChanged$.subscribe(t=>{this.loggedIn=t}),this.router.events.subscribe(t=>{t instanceof _e}),this.basketService.basketCountChanged$.subscribe(t=>{t?this.basketCount=t:this.basketCount=this.basketService.getBasketCount()});let i=this.contentService.get("strand"),r=this.contentService.get("product_selector");ne(i,r).subscribe(t=>{this.constructSelector(t[0].hits);for(let d of t[1].hits)typeof d.topLevelComponentId<"u"&&d.topLevelComponentId!==null&&this.productUuids.push(d.topLevelComponentId);this.constructProducts(t[1])})}restoreBasketFromApi(i){this.productListService.get().subscribe(r=>{let t=this.productListService.getProducts(r),d=i;d&&d.forEach(l=>{let C=null,g=Object.keys(t);if(g){for(let _=0;_<g.length;
2_++)if(t[g[_]].topLevelComponentId===l){C=t[g[_]],this.basketService.addToBasket(C);break}}}),this.init()},r=>{this.init()})}constructSelector(i){for(let t of i){t.tid!=="10996"&&(this.flatStrands[t.tid]={name:t.name,products:[]});let d=t.weight;if(typeof t.fullParent<"u"&&Array.isArray(t.fullParent)){let l=t.fullParent[0].tid;typeof this.childStrands[l]>"u"&&(this.childStrands[l]=[]),this.childStrands[l][d]=t}else this.strand[d]=t}let r={};for(let t of this.strand)typeof t<"u"&&(typeof this.childStrands[t.tid]<"u"&&(t.children=this.childStrands[t.tid]),r[t.tid]=t);this.pStrands=r}constructProducts(i){this.qualificationElements={};let r=this.basketService.getBasket(),t=[];for(let l of r)t.push(l.topLevelComponentId);let d;this.loggedIn?this.eligibilityService.getEligibility(this.contactService.contactId(),this.productUuids,!0).pipe(oe(l=>(this.cardBuilder(i,t),ie(null)))).subscribe(l=>{d=this.eligibilityService.getGlobalEligibility(l),d&&(this.notification={type:"warning",message:d.errorConfig?.global?.message??"Unknown reason - please contact support.",glyph:"warning",fullWidth:!0,isOpened:d.errorConfig?.global!==void 0}),this.cardBuilder(i,t)}):this.cardBuilder(i,t)}cardBuilder(i,r){let t={};for(let l of i.hits){let C=!1,g,_,w,E,A,y=l.fullProduct&&l.fullProduct.length?JSON.parse(JSON.stringify(l.fullProduct)):null;if(y&&(C=!!y[0].productDetails.find(x=>x.previouslyRegisteredOnly==="yes"),_=y[0].productDetails[0].qualStandardName,g=y[0].productDetails[0].qualGroupName,w=y[0].productDetails[0].scottishQualLevel,E=y[0].productSelectorDetails[0]&&y[0].productSelectorDetails[0].basketText,A=y[0].productSelectorDetails[0]&&y[0].productSelectorDetails[0].pricePart&&[].concat(y[0].productSelectorDetails[0].pricePart)),typeof l.fullParent!==void 0&&Array.isArray(l.fullParent)&&l.fullParent&&l.fullParent.length>0){typeof t[l.fullParent[0].tid]>"u"&&(t[l.fullParent[0].tid]=[]);let S=this.eligibilityService.getItemEligibility({name:l.name,target:l.productSelectTargetUrl,strand:l.fullParent[0].productSelectorStrand,isPreviouslyRegisteredOnly:C,qualificationGroupName:g,qualificationStandardName:_,scottishQualificationLevel:w,basketText:E,pricePart:A,topLevelComponentId:l.fullParent[0].programmeComponentId});S&&(S.failedCheck?.hideProductCard||(t[l.fullParent[0].tid][l.weight]=S))}else if(typeof l.productSelectorStrand<"u"&&Array.isArray(l.productSelectorStrand)){let S=this.productCardConfigService.getConfig(l),x=te(ee({},S),{qualificationGroupName:g,qualificationStandardName:_,scottishQualificationLevel:w,isPreviouslyRegisteredOnly:C,basketText:E,pricePart:A});typeof l.topLevelComponentId=="string"&&(r.includes(l.topLevelComponentId)?x.inBasket=!0:x.inBasket=!1);for(let $ of l.productSelectorStrand){let Q=$.tid;Array.isArray($.strand)&&$.strand.length&&(Q=$.strand[0]);let J=this.eligibilityService.getItemEligibility(x);J.failedCheck?.hideProductCard||typeof this.flatStrands[Q]<"u"&&J&&(this.flatStrands[Q].products[l.weight]=J)}}}let d=Object.keys(this.flatStrands);for(let l of d)for(let C of this.flatStrands[l].products)typeof C<"u"&&typeof C.tid<"u"&&typeof t[C.tid]<"u"&&(C.elements=t[C.tid])}showHideChildren(i,r,t,d){if(i!==null&&(this.showSelectorChildren=i),!d){let C=document.getElementById("main-product-info").getBoundingClientRect().top+window.pageYOffset;window.scrollTo({top:C-100,behavior:"smooth"})}r?this.currentSelection=r:this.currentSelection=this.configuration.selectAllTid,this.gtmService.push({event:"registrationFilter",registrationOption:t})}getShow(i){i=parseInt(i,10);let r=this.contactService.contactId()??void 0;if(i===O.PRODUCT_SELECTOR_STRAND_IDS.GuestAccount&&typeof r<"u")return!1;if(this.pStrands[this.currentSelection]&&this.pStrands[this.currentSelection].children){for(let t of this.pStrands[this.currentSelection].children)if(i===t.tid)return!0}return this.currentSelection===this.configuration.selectAllTid?!0:i===this.currentSelection}hideStrands(i){let r=this.contactService.contactId()??void 0,t=O.PRODUCT_SELECTOR_STRAND_IDS.GuestAccount,d=this.flatStrands[i]?this.flatStrands[i].products.filter(_=>_):[],l=this.strand.find(_=>
2_&&_.tid===i),g=(l?l.children||[]:[]).filter(_=>!!this.flatStrands[_.tid]);return!(!d.length&&!g.length&&i!==t||i===t&&typeof r<"u")}getType(i){return typeof i}getEligibilityForProduct(i){return this.eligibilityService.getItemEligibility(i)}};o.\u0275fac=function(r){return new(r||o)(v(Pe),v(V),v(Ie),v(G),v(he),v(ge),v(fe),v(me),v(ye),v(be),v(Se),v(q),v(ve))},o.\u0275cmp=j({type:o,selectors:[["app-product-selector"]],features:[de([V])],decls:32,vars:9,consts:[[1,"product-selector"],[1,"courses__container"],[1,"courses__header-title"],[1,"courses__hr"],[1,"choose-type"],[1,"choose-type__container"],["type","radio","name","type","checked","true",1,"choose-type__radio",3,"click","value"],[1,"choose-type__selected"],[1,"courses__wrapper"],[1,"courses__container","courses__container--last"],[1,"courses__detail--notification"],["id","main-product-info",1,"courses__detail"],[3,"notification","isNotificationOpen"],["href","/myaat/login?destination=/registration/register-with-aat"],[1,"choose-type__confirm"],["type","radio","name","type",1,"choose-type__radio",3,"click","value"],["type","radio","name","subType",1,"choose-type__radio",3,"click","value","checked"],[3,"isNotificationOpen","notification"],[1,"category-title"],[3,"content"]],template:function(r,t){r&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1")(4,"strong"),u(5,"Register with us"),c()(),s(6,"p"),u(7,"To study qualifications and courses, sit assessments, apply for membership or create a guest account"),c(),m(8,ot,5,0,"p"),c(),h(9,"hr",3),s(10,"div",4)(11,"h4")(12,"strong"),u(13,"What would you like to register for?"),c()(),k(14,lt,2,1,"div",null,D),Y(16,"keyvalue"),s(17,"div")(18,"div")(19,"div")(20,"label",5),u(21,"Show me everything "),s(22,"input",6),P("click",function(){return t.showHideChildren(-1,null,"Show me everything")}),c(),h(23,"span",7),c()()()()()(),s(24,"div",8)(25,"div",9),m(26,pt,2,2,"div",10),s(27,"div",11),h(28,"fab-notification",12),k(29,bt,3,2,"div",null,D),Y(31,"keyvalue"),c()()()()),r&2&&(a(8),f(t.loggedIn?-1:8),a(6),T(K(16,5,t.strand)),a(8),b("value",0),a(4),f(t.showSelectorChildren<=0||t.showSelectorChildren===3?26:-1),a(2),b("notification",t.notification)("isNotificationOpen",(t.notification==null?null:t.notification.isOpened)??!1),a(),T(K(31,7,t.strand)))},dependencies:[R,we,ke,Ee,Fe,ue],styles:[`:root{--aat-ui-grey-25: #bfbfbf;--aat-ui-grey-55: #737373;--aat-slate: #3a5066;--aat-ui-grey-05: #f2f2f2}.product-selector .courses__wrapper{background:#f9f9f9;margin-bottom:-30px}.product-selector .courses__wrapper--white{background:#fff}.product-selector .choose-type{width:90%;margin:0 auto;font-size:14px}@media (min-width: 992px){.product-selector .choose-type{width:50%}}.product-selector .choose-type h4{margin-bottom:10px}.product-selector .choose-type .filter-title{font-size:14px}@media (min-width: 992px){.product-selector .choose-type .filter-title{font-size:18px}}.product-selector .choose-type label{font-weight:400;margin-bottom:20px}@media (min-width: 992px){.product-selector .choose-type label{margin-bottom:13px}}.product-selector .choose-type__container{display:block;position:relative;padding-left:35px;margin-bottom:13px;cursor:pointer;font-size:1rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}@media (min-width: 992px){.product-selector .choose-type__container{white-space:initial}}.product-selector .choose-type__radio{position:absolute;opacity:0;cursor:pointer}.product-selector .choose-type__radio:focus+.choose-type__selected:before{-webkit-box-shadow:0 0 0 4px #ffd432;-moz-box-shadow:0 0 0 4px #ffd432;box-shadow:0 0 0 4px #ffd432}.product-selector .choose-type__radio:checked~.choose-type__selected{background-color:#00ab4e;border:2px solid #00ab4e}.product-selector .choose-type__radio:checked~.choose-type__selected:after,.product-selector .choose-type__radio:checked~.choose-type__selected:before{display:block}.product-selector .choose-type__selected{box-sizing:content-box;position:absolute;top:0;left:0;height:20px;width:20px;border:solid #000000 2px;background-color:#fff;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%}@media (min-width: 1200px){.product-selector .choose-type__selected{top:4px}}.product-selector .choose-type__selected:after{content:"";position:absolute;display:none;left:2px;top:2px;width:12px;height:12px;border:solid white 2px;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;box-sizing:unset}.product-selector .choose-type__selected:before{content:"";position:absolute;display:none;top:0;left:0;width:20px;height:20px;border-radius:50%;background:transparent;outline:3px solid transparent;outline-offset:3px;box-sizing:unset}.product-selector .choose-type__confirm{border-left:4px solid #00ab4e;margin:-8px 0 10px 8px;padding:20px 10px 0 35px}@media (min-width: 1200px){.product-selector .choose-type__confirm{font-size:14px}}.product-selector .hero-simple{max-height:200px;padding:80px 15px 30px;text-align:center}@media (min-width: 992px){.product-selector .hero-simple{max-height:280px;padding:100px 15px 30px}}.product-selector .courses__header-title{text-align:center;padding-bottom:30px}.product-selector .courses__hr{width:90%;border:0;background:#dce6f0;height:1px;margin:0 auto 34px}@media (min-width: 992px){.product-selector .courses__hr{width:80%}}.product-selector .courses__container{padding-bottom:10px;padding-top:70px;margin-left:auto;margin-right:auto}.product-selector .courses__container h1{margin-bottom:10px}.product-selector .courses__container span.category-title{text-transform:uppercase;text-align:center;padding:15px 0 0;display:block}.product-selector .courses__container--last{padding-top:8px}.product-selector .courses__intro{padding-right:20px}.product-selector .courses__box{border:1px solid #dce6f0}.product-selector .courses__add{text-align:center;padding:15px 0 0}@media (min-width: 992px){.product-selector .courses__add{border-top:1px solid #dce6f0}}.product-selector .courses__add .small-text{display:block;font-size:11px}.product-selector .courses__detail{border-bottom:1px solid #dce6f0;padding-bottom:10px}@media (min-width: 992px){.product-selector .courses__detail{border-bottom:0;padding-bottom:0}}.product-selector .courses__detail--notification .notification--full-width .notification__content{max-width:620px!important}.product-selector .courses__detail p.small{margin-bottom:11px}.product-selector .courses__detail ul{margin-bottom:20px}.product-selector .courses__detail ul li{margin:0 0 1em}.product-selector .courses__detail ul li.icon-success{margin:0 0 20px;display:inline-flex}@media (min-width: 992px){.product-selector .courses__detail ul li.icon-success{display:block}}.product-selector .courses__detail ul li.icon-success a{padding-left:12px}.product-selector .courses__detail .card__tag{font-size:11px;background-color:#0a5c50;color:#fff;margin-right:20px}.product-selector .courses__detail span{font-size:14px}.product-selector .courses__detail span.duration{font-size:11px;font-weight:600;padding:0}.product-selector .courses__misc{padding-bottom:20px}@media (min-width: 992px){.product-selector .courses__accounting .product-hr{max-width:90%}.product-selector .courses__add{border-radius:3px;min-height:120px;padding:30px 0 15px}}@media (min-width: 992px) and (min-width: 992px){.product-selector .courses__add{border:solid 1px #dce6f0}}@media (min-width: 992px){.product-selector .courses__detail{padding:15px 0 0}.product-selector .courses__detail ul{margin-bottom:20px}.product-selector .courses__detail ul li{margin:0 0 5px}.product-selector .courses__detail ul li.icon-success{margin:0 0 20px;font-size:16px}.product-selector .courses__detail ul li.icon-success a{padding-left:12px}.product-selector .courses__header{text-align:center;padding-top:40px;margin-top:40px}}.product-selector .ghost-notification{border:1px #dce6f0 solid;border-radius:3px;text-align:center;padding:15px 0}.product-selector .hidden{display:none}.product-selector .logged-in-nav a{width:auto}.product-selector .notification .notification__message span,.product-selector .notification .notification__message a{color:inherit}.product-selector .notification .notification__message a:hover,.product-selector .notification .notification__message a:focus{color:inherit}.product-selector .notification.notification--ghost .notification__message a{color:#00ab4e}
3`],encapsulation:2});let e=o;return e})();export{Ot as ProductSelectorComponent};

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.