1import{a as se}from"./chunk-NQIOSMVP.js";import{a as ne}from"./chunk-RNO4H4UW.js";import{c as T}from"./chunk-4YVC6SUS.js";import"./chunk-L2TL2KBU.js";import{a as ae}from"./chunk-IQ2D365R.js";import{a as te}from"./chunk-7NZ2HCGU.js";import{a as ie}from"./chunk-N5DXNK5L.js";import"./chunk-3UUUX2LI.js";import{b as ee}from"./chunk-57GZQ65L.js";import{a as Z}from"./chunk-GOTBM3K6.js";import{c as K,d as X}from"./chunk-PNXLJYWF.js";import{a as J}from"./chunk-XYH6JRU6.js";import{a as W,e as $}from"./chunk-S4T3P5AE.js";import{H as Y,J as G}from"./chunk-MTJSZ6IN.js";import{v as Q,y as q}from"./chunk-C2X6DUH2.js";import{$a as h,$b as P,Ba as x,Bc as O,Cc as j,Fa as N,Jb as o,Kb as f,Lb as v,Mb as D,Qb as M,Rb as F,Tb as C,Vb as _,Xb as l,Za as I,_a as V,ac as B,bc as R,dd as U,lb as c,ld as H,ma as u,na as g,nd as z,qb as k,ra as w,rd as L,vb as m}from"./chunk-P67MUED3.js";import{a as A}from"./chunk-AQHZ5JOB.js";var E=class{constructor(d,e,t){this.bannerImage=d,this.breadCrumb=e,this.filterValues=t}},S=class{constructor(d,e,t,i,n,s,p,r,y,b){this.title=d,this.address=e,this.startDate=t,this.endDate=i,this.cost=n,this.ctaLabel=s,this.ctaTarget=p,this.ctaUrl=r,this.onlineEvent=y,this.timeZone=b}};function oe(a,d){if(a&1&&D(0,"app-breadcrumb",11),a&2){let e=l(2);o("breadcrumb",e.pageDetails==null||e.pageDetails.pageData==null?null:e.pageDetails.pageData.breadCrumb)}}function le(a,d){if(a&1&&D(0,"app-article-banner",12),a&2){let e=l(2);o("otherDetails",e.otherDetails)("bannerDetails",e.pageDetails==null||e.pageDetails.pageData==null?null:e.pageDetails.pageData.bannerImage)}}function pe(a,d){if(a&1){let e=C();f(0,"app-filter",13),_("selectedFilters",function(i){u(e);let n=l(2);return g(n.applyFilter(i))})("selectedSortBy",function(i){u(e);let n=l(2);return g(n.getSortBy(i))}),v()}if(a&2){let e=l(2);o("filterData",e.pageDetails==null||e.pageDetails.pageData==null?null:e.pageDetails.pageData.filterValues)("otherDetails",e.otherDetails)("sortBy",(e.filterApplied==null?null:e.filterApplied.sortBy)==="fields.startDate"?"Latest":"Oldest")}}function ce(a,d){if(a&1){let e=C();f(0,"app-not-found",14),_("clearFilter",function(){u(e);let i=l(2);return g(i.refineYourSearch())}),v()}if(a&2){let e=l(2);o("recordNotFound",e.eventDatanotfound)("otherDetails",e.otherDetails)}}function de(a,d){if(a&1){let e=C();f(0,"app-listing-pod",15),_("valueChange",function(i){u(e);let n=l(2);return g(n.countandOrderchange(i))}),v()}if(a&2){let e=l(2);o("ListData",e.pageDetails==null?null:e.pageDetails.eventData)("pagenation",e.pagenation)("filterApplied",e.filterApplied)("otherDetails",e.otherDetails)}}function he(a,d){if(a&1){let e=C();f(0,"div",2),_("click",function(){u(e);let i=l();return g(i.outSideClick())}),m(1,oe,1,1,"app-breadcrumb",3)(2,le,1,2,"app-article-banner",4),D(3,"span",5),m(4,pe,1,3,"app-filter",6),M(5),f(6,"div",7),D(7,"app-loader",8),m(8,ce,1,2,"app-not-found",9)(9,de,1,4,"app-listing-pod",10),v(),F(),v()}if(a&2){let e=l();h(),o("ngIf",(e.pageDetails==null||e.pageDetails.pageData==null?null:e.pageDetails.pageData.breadCrumb)&&e.otherDetails.countryName!="india"),h(),o("ngIf",e.pageDetails==null||e.pageDetails.pageData==null?null:e.pageDetails.pageData.bannerImage),h(2),o("ngIf",e.pageDetails==null||e.pageDetails.pageData==null||e.pageDetails.pageData.filterValues==null?null:e.pageDetails.pageData.filterValues.length),h(3),o("isContentLoading",e.isContentLoading),h(),o("ngIf",!(!(e.pageDetails==null||e.pageDetails.eventData==null)&&e.pageDetails.eventData.length)&&e.eventDatanotfound),h(),o("ngIf",e.pageDetails==null||e.pageDetails.eventData==null?null:e.pageDetails.eventData.length)}}function ue(a,d){if(a&1&&D(0,"app-not-found",16),a&2){let e=l();o("pageNotFound",e.pageNotFound)("otherDetails",e.otherDetails)}}var je=(()=>{class a{constructor(e,t,i,n,s,p,r,y,b,re){this.http=e,this.activatedRoute=t,this.contentfulservice=i,this.seoService=n,this.platformId=s,this.router=p,this.el=r,this.loaderService=y,this.document=b,this.clickStream=re,this.isContentLoading=!1,this.eventDatanotfound=!1,this.otherDetails={},this.pageDetails={pageData:{},eventData:{}},this.pagenation={currentPage:1,scrSze:10,pageSize:10,totalRecords:0,pagenationSeo:!0},this.filterApplied={sortBy:"fields.startDate",filterCount:0,eventLimit:10,selectedMonth:"",selectedLocation:"",selectedType:"",skipValue:0,isSort:"false"},this.preview="",L(this.platformId)&&this.onResize()}onResize(){L(this.platformId)&&(this.pagenation.scrSze=window.innerWidth<500?5:window.innerWidth<900?6:10)}onDocumentClick(e){this.el.nativeElement.contains(e.target)||this.outSideClick()}ngOnInit(){let e,t="";this.activatedRoute.url.subscribe(()=>{e=this.activatedRoute.snapshot.paramMap.get("country_name")!=null?this.activatedRoute.snapshot.paramMap.get("country_name"):"global",this.otherDetails.countryUrl=this.activatedRoute.snapshot.paramMap.get("country_name")!=null?this.activatedRoute.snapshot.paramMap.get("country_name")+"/":"",t=this.activatedRoute.snapshot.paramMap.get("event_param")!==null?this.activatedRoute.snapshot.paramMap.get("event_param"):""}),this.activatedRoute.queryParamMap.subscribe(n=>{this.preview=Object.keys(n.params).length>0&&n.params?.preview?"&preview=true":""}),this.activatedRoute.queryParams.subscribe(n=>{n.page!==void 0?(this.pagenation.currentPage=n.page,this.filterApplied.skipValue=n.page-1):this.pagenation.currentPage=1}),this.loaderService.show(),this.contentfulservice.checkIndiawebsite()&&(e="india"),this.otherDetails.countryName=e,this.otherDetails.pageName="Events listing page",this.eventListTrack("NA","NA","NA","Latest");let i=`?urlSlug=/${t}&contentType=dynamicPage&dynamicPageType=eventListing&locale=${this.contentfulservice.siteLanguage}&website=${e}${this.preview}`;this.getEventpageData(i,e,t),this.getEventlist()}getEventpageData(e,t,i){this.http.get("DYNAMIC_PAGE_URL",e).subscribe({next:n=>{this.customSchemaVal=n?.customSchemaMarkup,this.contentfulservice.getCustomSchema(this.customSchemaVal),this.loaderService.hide();let s={ogTitle:"Check Out Latest Events, Webinars & Seminars | IDP IELTS",ogDescription:"Explore the latest events, webinars, and seminars with our IELTS preparation resources. Stay updated and enhance your skills. Discover now!"};this.contentfulservice.customDimensionData(t,"Events listing page","");let p=n?.curatedFilterComponent;p.length&&p.forEach(r=>{r.displayValues=[],r.selectedValues=[],r.toggled=!1,r?.filterComponent?.forEach(y=>{y.selected=!1})}
1),this.seodetails(n,this.preview!==""),this.pageDetails.pageData=new E(this.contentfulservice.bannerDetails(n.bannerImage||[],n.shortDescription||"",n.pageTitle||"",{countryName:this.otherDetails.countryName,ogDetails:s}),n?.breadcrumbs?.length?n?.breadcrumbs?.map(r=>new te(r.title==="Home"?this.contentfulservice.translatedData.commonList.home[this.otherDetails.countryName.charAt(0).toUpperCase()+this.otherDetails.countryName.slice(1)]:r.title,r?.link,r?.template)):[],p)},error:()=>{this.loaderService.hide(),this.pageRedirection(t,i)}})}seodetails(e,t){let i="seoFields"in e?e.seoFields:{};i[0].robots=e?.robots?.robots||"",i.length>0&&(this.seoService.setSeoTitle(i[0]),this.seoService.addSeoTags(i[0],t),"canonical"in i[0]&&i[0].canonical!=null?this.seoService.setSeoCanonical(i[0],t,this.contentfulservice.domainName):this.seoService.setSeoUrl(this.router.url.split("?")[0],t,this.contentfulservice.domainName,this.contentfulservice.getLanguageUrlCode(this.contentfulservice.siteLanguage,this.otherDetails.countryName.charAt(0)?.toUpperCase()+this.otherDetails.countryName.slice(1)))),i[0].robots&&!i[0].robots?.includes("noindex")&&this.contentfulservice.getHreflangDetails(e?.hrefData||[],e?.urlSlug||"",e?.hrefLang.tags||"")}applyFilter(e){this.pagenation.currentPage=1,this.filterApplied.skipValue=0,e.map(t=>{t?.filterType==="Month"?(this.filterApplied.selectedMonth=t?.selectedValues?.join(),this.selectedMonth=this.filterApplied.selectedMonth?this.filterApplied.selectedMonth.split(" "):""):t?.filterType==="Location"?(this.filterApplied.selectedLocation=t?.selectedValues?.join(),this.selectedLocation=this.filterApplied.selectedLocation?this.filterApplied.selectedLocation:"NA"):t?.filterType==="Event type"&&(this.filterApplied.selectedType=t?.selectedValues?.join(),this.selectedEventType=this.filterApplied.selectedLocation?this.filterApplied.selectedLocation:"NA")}),this.eventListTrack(this.selectedMonth?this.selectedMonth[0]:"NA",this.selectedLocation,this.selectedEventType,"Latest"),this.getEventlist()}eventListTrack(e,t,i,n){let s={};s.eventTime=ne(new Date,"dd-MM-yyyy HH:mm:ss.SS"),s.eventMode=i||" NA",s.month=e||"NA",s.idpEventCountry=this.otherDetails.countryName,s.idpEventStartDate="NA",s.idpEventEndDate="NA",s.idpEventCity=t||"NA",s.sortOption=n||"Latest";let p=this.contentfulservice.prevPageName?this.contentfulservice.prevPageName:this.otherDetails.pageName,r=new W(this.otherDetails?.pageName,this.contentfulservice.domainName+this.router.url,"PageViewed","Interaction","Events list","IELTS Events","NA",p);this.clickStream.clickstreamLogging(A(A({},r),s))}outSideClick(){this.contentfulservice.selectToogle&&this.contentfulservice.selectTooglefu()}getEventlist(){this.pageDetails.eventData=[],this.eventDatanotfound=!1,this.isContentLoading=!0;let e=this.formatCurrentDate(),t={};t=this.createEventQuery(e),this.preview!==""&&(t.preview=!0),this.http.post("LISTING_DATA",t).subscribe({next:i=>{i?.status?.code===200&&(this.isContentLoading=!1,this.pagenation.totalRecords=i?.totalEvents,this.schemaDetails(i?.events),this.pageDetails.eventData=i?.events.map(n=>this.mapEventToListingpod(n)))},error:()=>{this.isContentLoading=!1,this.eventDatanotfound=!0,this.pageDetails.eventData=[]}})}formatCurrentDate(){let e=new Date;return e.getFullYear()+"-"+String(e.getMonth()+1).padStart(2,"0")+"-"+String(e.getDate()).padStart(2,"0")}createEventQuery(e){return{website:this.otherDetails?.countryName,locale:this.contentfulservice.siteLanguage,pageType:"Event listing page",order:this.filterApplied.sortBy,startDate:e,eventMonth:this.filterApplied.selectedMonth,eventLocation:this.filterApplied.selectedLocation,eventType:this.filterApplied.selectedType,skip:this.filterApplied.skipValue*this.filterApplied.eventLimit,limit:this.filterApplied.eventLimit}}mapEventToListingpod(e){let t=e?.eventCost||{},i="price"in t,n="";i&&(n=this.getEventPrice(t));let s=e?.ctaTarget==="Open in new tab"?"_blank":"_self";return new S(e?.eventTitle||"",e?.address||"",e?.startDate||"",e?.endDate||"",n,e?.ctaLabel?.featureTitle||"",s,e?.ctaUrl||"",e?.onlineEvent||"",e?.timeZone)}
1schemaDetails(e){if(!L(this.platformId)){let t=e.map(n=>{let s=n.ctaUrl!==""?n.ctaUrl:"url not available",p=n?.eventCost||{};return n?.onlineEvent?{"@context":"https://schema.org","@type":"Event",name:n.eventTitle,description:this.pageDetails?.pageData?.bannerImage?.shortDescription,startDate:n.startDate,endDate:n.endDate,eventAttendanceMode:"https://schema.org/OnlineEventAttendanceMode",eventStatus:"https://schema.org/EventScheduled",image:this.pageDetails?.pageData?.bannerImage?.image?.imageUrl,location:{"@type":"Place",name:"Online Event"},organizer:{"@type":"Organization",name:"IELTS",url:this.contentfulservice.domainName},offers:{"@type":"Offer",url:s,price:p?.price}}:{"@context":"https://schema.org","@type":"Event",name:n.eventTitle,startDate:n.startDate,endDate:n.endDate,eventAttendanceMode:"https://schema.org/OfflineEventAttendanceMode",eventStatus:"https://schema.org/EventScheduled",location:{"@type":"Place",name:n.eventTitle,address:{"@type":"PostalAddress",streetAddress:n.address}},offers:{"@type":"Offer",url:s,price:p?.price}}}),i=this.document.createElement("script");i.type="application/ld+json",i.innerHTML=JSON.stringify(t),this.document.head.appendChild(i)}}getSortBy(e){e?.sortBy=="Latest"?this.filterApplied.sortBy="fields.startDate":this.filterApplied.sortBy="-fields.startDate",this.scrollToView()}scrollToView(){this.contentfulservice.scrolltoElement("eventList")}countandOrderchange(e){this.filterApplied.eventLimit=e?.eventLimit,this.filterApplied.sortBy=e?.sortBy,this.pagenation.currentPage=e?.currentPage,this.filterApplied.skipValue=e?.skipValue,this.getEventlist(),this.scrollToView()}refineYourSearch(){this.filterComp?.clearAllfilters()}getEventPrice(e){return e.price<=0?"Free":e.price+" "+e.currency}pageRedirection(e,t){this.contentfulservice?.pageRedirection(e,t,this.contentfulservice.siteLanguage,this.preview,this.router.url),this.contentfulservice?.pageNotFound?.subscribe(i=>{this.pageNotFound=i})}ngOnDestroy(){this.contentfulservice.prevPageName="Events listing page"}static{this.\u0275fac=function(t){return new(t||a)(c(G),c(Q),c(Y),c(K),c(N),c(q),c(x),c(J),c(w),c($))}}static{this.\u0275cmp=k({type:a,selectors:[["app-event-landing"]],viewQuery:function(t,i){if(t&1&&P(T,5),t&2){let n;B(n=R())&&(i.filterComp=n.first)}},hostBindings:function(t,i){t&1&&_("resize",function(s){return i.onResize(s)},I)("click",function(s){return i.onDocumentClick(s)},V)},decls:3,vars:4,consts:[[3,"click",4,"ngIf"],[3,"pageNotFound","otherDetails",4,"ngIf"],[3,"click"],[3,"breadcrumb",4,"ngIf"],["id","artBanner","articleType","Article",3,"otherDetails","bannerDetails",4,"ngIf"],["id","eventList"],[3,"filterData","otherDetails","sortBy","selectedFilters","selectedSortBy",4,"ngIf"],[1,"event-listing-wrapper","w-100","position-relative"],[3,"isContentLoading"],[3,"recordNotFound","otherDetails","clearFilter",4,"ngIf"],[3,"ListData","pagenation","filterApplied","otherDetails","valueChange",4,"ngIf"],[3,"breadcrumb"],["id","artBanner","articleType","Article",3,"otherDetails","bannerDetails"],[3,"selectedFilters","selectedSortBy","filterData","otherDetails","sortBy"],[3,"clearFilter","recordNotFound","otherDetails"],[3,"valueChange","ListData","pagenation","filterApplied","otherDetails"],[3,"pageNotFound","otherDetails"]],template:function(t,i){t&1&&(m(0,he,10,6,"div",0),O(1,"json"),m(2,ue,1,2,"app-not-found",1)),t&2&&(o("ngIf",j(1,2,i.pageDetails==null?null:i.pageDetails.pageData)!="{}"),h(2),o("ngIf",i.pageNotFound))},dependencies:[z,U,ae,ie,T,X,ee,se,Z,H],styles:[".event-listing-wrapper[_ngcontent-%COMP%]{background:var(--whitesmoke);min-height:450px}"]})}}return a})();export{je as EventLandingComponent};
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.