var $localize=Object.assign(void 0===$localize?{}:$localize,{locale:"en"}); "use strict";(function(global){global.ng=global.ng||{};global.ng.common=global.ng.common||{};global.ng.common.locales=global.ng.common.locales||{};var u=undefined;function plural(n){var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;if(i===1&&v===0)return 1;return 5}global.ng.common.locales["en"]=["en",[["a","p"],["AM","PM"],u],[["AM","PM"],u,u],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],u,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],u,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",u,"{1} 'at' {0}",u],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",plural,[[["mi","n","in the morning","in the afternoon","in the evening","at night"],["midnight","noon","in the morning","in the afternoon","in the evening","at night"],u],[["midnight","noon","morning","afternoon","evening","night"],u,u],["00:00","12:00",["06:00","12:00"],["12:00","18:00"],["18:00","21:00"],["21:00","06:00"]]]]})(typeof globalThis!=="undefined"&&globalThis||typeof global!=="undefined"&&global||typeof window!=="undefined"&&window);; (self.webpackChunktnc_frontend=self.webpackChunktnc_frontend||[]).push([[179],{98255:function(x){function I(S){return Promise.resolve().then(function(){var T=new Error("Cannot find module '"+S+"'");throw T.code="MODULE_NOT_FOUND",T})}I.keys=function(){return[]},I.resolve=I,I.id=98255,x.exports=I},25435:function(x,I,S){"use strict";var T=S(99624),e=S(5034),s=S(50722),f=S(42693),p=S(61116),$=S(34602),Ye=S(76013),Y=S(64667),A=S(35437),E=S(89266),Q="https://sso.dev.redhat.com",k=function(){var t=window.location.hostname,o=Q;return t.includes("dev.redhat.com")||t.includes("tnc-frontend-dev")||t.includes("tnc-frontend-review")?o=Q:t.includes("stage.redhat.com")||t.includes("preprod")||t.includes("stage.foo.redhat.com")?o="https://sso.stage.redhat.com":t.includes(".redhat.com")&&(o="https://sso.redhat.com"),o},C=function(){var t=new URL(k()+"/auth/realms/redhat-external/logout");window.location.assign(t.toString())},J=new Ye.N0,H="customer-portal",j="authorization_code",O=function(){function t(){}return t.getToken=function(){return console.log("KeycloakService.getToken "+t.token),t.token},t.setToken=function(o){localStorage.setItem("token",o),t.token=o},t.isTokenExpired=function(){var o=J.isTokenExpired(t.getToken());return console.log("KeycloakService.isTokenExpired "+o),o},t.getAuthRedirect=function(o){console.log("current url: "+o);var i=k()+"/auth/realms/redhat-external/protocol/openid-connect/auth?client_id=customer-portal&response_type=code&scope=openid&redirect_uri="+encodeURIComponent(o);return console.log(i),i},t.getTokenFromAuthCode=function(o,n,i){var r=k(),c={client_id:H,grant_type:j,code:o,redirect_uri:n};c.client_id=H,c.grant_type=j,c.code=o,c.redirect_uri=n;var d=(new f.LE).set("client_id",c.client_id).set("grant_type",c.grant_type).set("code",c.code).set("redirect_uri",c.redirect_uri);return i.post(r+"/auth/realms/redhat-external/protocol/openid-connect/token",d.toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.handleError=function(o){return o.error instanceof ErrorEvent?console.error("An error occurred:",o.error.message):console.error("Backend returned code "+o.status+", body was: "+o.error),(0,Y._)(function(){return new Error("An error occurred; please contact customer service if the error recurs")})},t.redirectError=function(o){C()},t.decodeToken=function(){var o=t.getToken();if(o)return J.decodeToken(o)},t.\u0275prov=e.Yz7({token:t,factory:t.\u0275fac=function(n){return new(n||t)},providedIn:"root"}),t}(),v=S(62934),q=function(){function t(o,n){this.http=o,this.router=n}return t.prototype.canActivate=function(o,n){var i=this,r=window.location.protocol+"//"+window.location.hostname;window.location.port&&(r=r+":"+window.location.port);var c,a=n.url;if(o.queryParams.code)c=o.queryParams.code;else if(a.indexOf("#")>0){var d;if(a.indexOf("code=")>0){var _=a.substring(a.indexOf("code=")+5,a.length);d=_.indexOf("&")>0?_.substring(0,_.indexOf("&")):_}c=d}return a.indexOf("#")>0?a=a.substring(0,a.indexOf("#")):a.indexOf("&session_state")>0?a=a.substring(0,a.indexOf("&session_state")):a.indexOf("?session_state")>0&&(a=a.substring(0,a.indexOf("?session_state"))),r+=a,!(!O.getToken()||O.isTokenExpired())||(c?void O.getTokenFromAuthCode(c,r,this.http).subscribe({next:function(l){return O.setToken(l.access_token),i.router.navigateByUrl(a),!0},error:function(l){return console.log(l),C(),!1}}):(console.log("Get auth redirect for the current url: "+r),window.location.href=O.getAuthRedirect(r),!1))},t.\u0275fac=function(n){return new(n||t)(e.LFG(f.eN),e.LFG(v.F0))},t.\u0275prov=e.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}(),X=function(){function t(){this.title="app"}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-root"]],decls:2,vars:0,consts:[[1,"container"]],template:function(n,i){1&n&&(e.TgZ(0,"div",0),e._UZ(1,"router-outlet"),e.qZA())},directives:[v.lC],styles:[""]}),t}(),ze=S(76306),N=(S(40612),function(){function t(o){this.http=o,this.requiredTermsPath="/requiredTerms/v1",this.optionalAndRequiredTermsPath="/availableTerms/v1",this.standaloneTermsPath="/standalone/v1",this.downloadTermsPath="/viewterms/v1",this.acknowledgeTermsPath="/acknowledge/v4",this.validateRedirectPath="/validate/v1",this.healthStatusPath="/actuator/health",this.ssoOptionalAndRequiredTermsPath="/sso/availableTerms/v1",this.ssoAcknowledgeTermsPath="/sso/acknowledge/v1",this.ssoAcknowledgeTermsPathV2="/sso/acknowledge/v2",this.ssoAcknowledgeTermsPathV3="/sso/acknowledge/v3",this.setApiUrl()}return t.prototype.handleError=function(o){return o.error instanceof ErrorEvent?console.error("An error occurred:",o.error.message):console.error("Backend returned code "+o.status+", body was: "+o.error),(0,Y._)(function(){return new Error("An error occured; please contact customer service if the error recurs")})},t.prototype.setApiUrl=function(){this.apiUrl=window.location.protocol+"//"+window.location.hostname,window.location.port&&(this.apiUrl=this.apiUrl+":"+window.location.port),this.apiUrl=this.apiUrl+"/wapps/tnc/backend",this.apiUrl.indexOf("stage.foo.redhat.com")>0&&(this.apiUrl="https://www.stage.redhat.com/wapps/tnc/backend")},t.prototype.getRequiredTerms=function(o,n,i){var r=new f.WM({"Content-Type":"application/json",Authorization:"Bearer "+O.getToken()});return this.http.get(this.apiUrl+this.requiredTermsPath,{headers:r,params:{site:o,event:n,account:i}}).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.prototype.getOptionalAndRequiredTerms=function(o,n,i){var r=new f.WM({"Content-Type":"application/json",Authorization:"Bearer "+O.getToken()});return this.http.get(this.apiUrl+this.optionalAndRequiredTermsPath,{headers:r,params:{site:o,event:n,account:i}}).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.prototype.getOptionalAndRequiredTermsForSSO=function(o,n,i,r){var a=new f.WM({"Content-Type":"application/json"});return this.http.get(this.apiUrl+this.ssoOptionalAndRequiredTermsPath,{headers:a,params:{site:o,event:n,account:i,code:r}}).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.prototype.getStandaloneTermsByDisplayHandle=function(o){var n=new f.WM({"Content-Type":"application/json",Authorization:"Bearer "+O.getToken()});return this.http.get(""+this.apiUrl+this.standaloneTermsPath+"/"+o,{headers:n}).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.prototype.downloadPdf=function(o){var n=new f.WM({Authorization:"Bearer "+O.getToken()});return this.http.get(""+this.apiUrl+this.downloadTermsPath+"/"+o,{headers:n,responseType:"arraybuffer",params:{pdfId:o}}).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.prototype.acknowledgeTerms=function(o,n,i,r,a){var d={headers:new f.WM({"Content-Type":"application/json",Authorization:"Bearer "+O.getToken()}),params:{site:o,events:i,account:n}},_=a.map(function(l){var u,g,M;return{id:l.id,translatedTermsName:null===(u=null==l?void 0:l.selectedTranslation)||void 0===u?void 0:u.translatedTermsName,termsPdfId:null===(g=null==l?void 0:l.selectedTranslation)||void 0===g?void 0:g.termsPdfId,pdfDownloadUrl:null===(M=null==l?void 0:l.selectedTranslation)||void 0===M?void 0:M.pdfDownloadUrl}});return this.http.put(this.apiUrl+this.acknowledgeTermsPath,{decisions:r,termsSelected:_},d).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.prototype.acknowledgeTermsForSSO=function(o,n,i,r,a){var c=new f.WM({"Content-Type":"application/json"});return this.http.put(this.apiUrl+this.ssoAcknowledgeTermsPath,i,{headers:c,params:{site:o,account:n,code:a}}).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.prototype.acknowledgeTermsForSSOV3=function(o,n,i,r,a){var _={headers:new f.WM({"Content-Type":"application/json"}),params:new f.LE({fromObject:{site:o,account:n,code:a}})},l=(0,ze.cv)(JSON.stringify({decisions:i,terms:r}));return this.http.put(this.apiUrl+this.ssoAcknowledgeTermsPathV3,l,_).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.prototype.acknowledgeTermsForSSOV2=function(o,n,i,r,a){var c=new f.WM({"Content-Type":"application/json"}),d=new f.LE({fromObject:{site:o,account:n,code:a}});return this.http.put(this.apiUrl+this.ssoAcknowledgeTermsPathV2,{terms:r,decisions:i},{headers:c,params:d}).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.prototype.validateRedirect=function(o){var n=new f.WM({"Content-Type":"application/json",Authorization:"Bearer "+O.getToken()});return this.http.get(this.apiUrl+this.validateRedirectPath,{headers:n,params:{redirect:o}}).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.prototype.getBackendStatus=function(){return this.http.get(this.apiUrl+this.healthStatusPath).pipe((0,A.X)(1),(0,E.K)(this.handleError))},t.\u0275fac=function(n){return new(n||t)(e.LFG(f.eN))},t.\u0275prov=e.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()),b=function(t,o){return Object.defineProperty?Object.defineProperty(t,"raw",{value:o}):t.raw=o,t};function Be(t,o){1&t&&(e.TgZ(0,"div",9),e.TgZ(1,"span",10),e._uU(2,"Loading\u2026"),e.qZA(),e.qZA())}function Ve(t,o){if(1&t&&(e.TgZ(0,"option",39),e._uU(1),e.qZA()),2&t){var n=o.$implicit;e.Q6J("ngValue",n),e.xp6(1),e.hij(" ",n.localeCode," ")}}function We(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"select",37),e.NdJ("ngModelChange",function(a){return e.CHM(n),e.oxw(2).$implicit.selectedTranslation=a}),e.YNc(1,Ve,2,2,"option",38),e.qZA()}if(2&t){var i=e.oxw(2).$implicit;e.Q6J("ngModel",i.selectedTranslation),e.xp6(1),e.Q6J("ngForOf",i.translations)}}function Ke(t,o){if(1&t&&(e.TgZ(0,"div",35),e.YNc(1,We,2,2,"select",36),e.qZA()),2&t){var n=e.oxw().$implicit;e.MGl("id","language-selection-",n.id,""),e.xp6(1),e.Q6J("ngIf",n.translations)}}function et(t,o){if(1&t&&(e.TgZ(0,"h5",45),e._uU(1," You must agree to the terms before you can proceed. "),e.qZA()),2&t){var n=e.oxw(2).$implicit;e.MGl("id","errors-checkbox-",n.id,"")}}var z=function(t){return{"alert alert-danger":t}};function tt(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",40),e.YNc(1,et,2,1,"h5",41),e.TgZ(2,"input",42),e.NdJ("ngModelChange",function(c){return e.CHM(n),e.oxw().$implicit.accepted=c}),e.qZA(),e.TgZ(3,"label",43),e.SDv(4,44),e.qZA(),e.qZA()}if(2&t){var i=e.oxw().$implicit,r=e.oxw(2);e.MGl("id","agreementBox-",i.id,""),e.Q6J("ngClass",e.VKq(7,z,!i.accepted&&r.submitAttempted)),e.xp6(1),e.Q6J("ngIf",!i.accepted&&r.submitAttempted),e.xp6(1),e.MGl("id","checkbox-term-",i.id,""),e.MGl("name","checkbox-term-",i.id,""),e.Q6J("ngModel",i.accepted),e.xp6(1),e.MGl("for","checkbox-term-",i.id,"")}}function nt(t,o){if(1&t&&(e.TgZ(0,"h5",45),e._uU(1," You must make a decision on these terms before you can proceed. "),e.qZA()),2&t){var n=e.oxw(2).$implicit;e.MGl("id","errors-radio-",n.id,"")}}function ot(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",46),e.YNc(1,nt,2,1,"h5",41),e.TgZ(2,"div",47),e.TgZ(3,"input",48),e.NdJ("ngModelChange",function(c){return e.CHM(n),e.oxw().$implicit.decision=c}),e.qZA(),e.TgZ(4,"label",49),e.SDv(5,50),e.qZA(),e.qZA(),e.TgZ(6,"div",47),e.TgZ(7,"input",51),e.NdJ("ngModelChange",function(c){return e.CHM(n),e.oxw().$implicit.decision=c}),e.qZA(),e.TgZ(8,"label",49),e.SDv(9,52),e.qZA(),e.qZA(),e.TgZ(10,"div",47),e.TgZ(11,"input",53),e.NdJ("ngModelChange",function(c){return e.CHM(n),e.oxw().$implicit.decision=c}),e.qZA(),e.TgZ(12,"label",49),e.SDv(13,54),e.qZA(),e.qZA(),e.qZA()}if(2&t){var i=e.oxw().$implicit,r=e.oxw(2);e.MGl("id","terms-decisions-",i.id,""),e.Q6J("ngClass",e.VKq(15,z,!i.decision&&r.submitAttempted)),e.xp6(1),e.Q6J("ngIf",!i.decision&&r.submitAttempted),e.xp6(2),e.MGl("id","radio-accept-",i.id,""),e.MGl("name","radio-accept-",i.id,""),e.Q6J("ngModel",i.decision),e.xp6(1),e.MGl("for","radio-accept-",i.id,""),e.xp6(3),e.MGl("id","radio-decline-",i.id,""),e.MGl("name","radio-decline-",i.id,""),e.Q6J("ngModel",i.decision),e.xp6(1),e.MGl("for","radio-decline-",i.id,""),e.xp6(3),e.MGl("id","radio-defer-",i.id,""),e.MGl("name","radio-defer-",i.id,""),e.Q6J("ngModel",i.decision),e.xp6(1),e.MGl("for","radio-defer-",i.id,"")}}function it(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",19),e.TgZ(1,"div",20),e.TgZ(2,"label",21),e._uU(3),e.qZA(),e.TgZ(4,"label",22),e._uU(5),e.qZA(),e._uU(6,"\xa0 "),e.TgZ(7,"a",23),e.SDv(8,24),e.qZA(),e.TgZ(9,"span",25),e._uU(10," or "),e.qZA(),e.TgZ(11,"a",26),e.SDv(12,27),e.qZA(),e.qZA(),e.TgZ(13,"div",28),e.TgZ(14,"span",29),e.NdJ("click",function(){var c=e.CHM(n).$implicit;return e.oxw(2).toggleLanguageSelection(c)}),e.TgZ(15,"span",30),e.SDv(16,31),e.qZA(),e.qZA(),e.qZA(),e.YNc(17,Ke,2,2,"div",32),e.YNc(18,tt,5,9,"div",33),e.YNc(19,ot,14,17,"div",34),e.qZA()}if(2&t){var i=o.$implicit;e.MGl("id","term-block-",i.id,""),e.xp6(3),e.Oqu(i.selectedTranslation.translatedTermsName+" - "),e.xp6(1),e.MGl("id","pdf-locale-",i.id,""),e.xp6(1),e.Oqu(i.selectedTranslation.localeCode),e.xp6(2),e.MGl("id","pdf-view-",i.selectedTranslation.termsPdfId,""),e.MGl("href","/wapps/tnc/backend/viewterms/v1/",i.selectedTranslation.termsPdfId,".pdf",e.LSH),e.xp6(4),e.MGl("id","pdf-view-",i.selectedTranslation.termsPdfId,"-direct"),e.MGl("href","/wapps/tnc/backend/viewterms/v1/",i.selectedTranslation.termsPdfId,".pdf",e.LSH),e.MGl("download","",i.selectedTranslation.translatedTermsName,".pdf"),e.xp6(2),e.MGl("id","caret-",i.id,""),e.xp6(4),e.Q6J("ngIf",i.displayLanguageSelection),e.xp6(1),e.Q6J("ngIf",!i.isOptional),e.xp6(1),e.Q6J("ngIf",i.isOptional)}}function at(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",11),e.TgZ(1,"form",12),e.NdJ("ngSubmit",function(){return e.CHM(n),e.oxw().onSubmit()}),e.YNc(2,it,20,13,"div",13),e.TgZ(3,"div",14),e.TgZ(4,"p"),e.TgZ(5,"span",15),e.NdJ("click",function(){return e.CHM(n),e.oxw().attemptedSubmit()}),e._UZ(6,"input",16),e.qZA(),e.TgZ(7,"button",17),e.NdJ("click",function(){return e.CHM(n),e.oxw().cancelAndRedirect()}),e.SDv(8,18),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&t){var i=e.oxw();e.xp6(2),e.Q6J("ngForOf",i.terms),e.xp6(4),e.Q6J("disabled",!i.terms[0].accepted&&!i.terms[0].decision)}}var B,V,W,K,ee,te,ne,oe,ie,ae,re,D=function(t,o){return Object.defineProperty?Object.defineProperty(t,"raw",{value:o}):t.raw=o,t};function ct(t,o){1&t&&(e.TgZ(0,"div",9),e.TgZ(1,"span",10),e._uU(2,"Loading\u2026"),e.qZA(),e.qZA())}function dt(t,o){if(1&t&&(e.TgZ(0,"option",38),e._uU(1),e.qZA()),2&t){var n=o.$implicit;e.Q6J("ngValue",n),e.xp6(1),e.hij(" ",n.localeCode," ")}}function st(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"select",36),e.NdJ("ngModelChange",function(a){return e.CHM(n),e.oxw(2).$implicit.selectedTranslation=a}),e.YNc(1,dt,2,2,"option",37),e.qZA()}if(2&t){var i=e.oxw(2).$implicit;e.Q6J("ngModel",i.selectedTranslation),e.xp6(1),e.Q6J("ngForOf",i.translations)}}function lt(t,o){if(1&t&&(e.TgZ(0,"div",34),e.YNc(1,st,2,2,"select",35),e.qZA()),2&t){var n=e.oxw().$implicit;e.MGl("id","language-selection-",n.id,""),e.xp6(1),e.Q6J("ngIf",n.translations)}}function _t(t,o){if(1&t&&(e.TgZ(0,"h5",45),e._uU(1," You must agree to the terms before you can proceed. "),e.qZA()),2&t){var n=e.oxw(2).$implicit;e.MGl("id","errors-checkbox-",n.id,"")}}var pt=function(t){return{"alert alert-danger":t}};function ut(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",39),e.YNc(1,_t,2,1,"h5",40),e.TgZ(2,"div",41),e.TgZ(3,"input",42),e.NdJ("ngModelChange",function(c){return e.CHM(n),e.oxw().$implicit.accepted=c}),e.qZA(),e.TgZ(4,"label",43),e.SDv(5,44),e.qZA(),e.qZA(),e.qZA()}if(2&t){var i=e.oxw().$implicit,r=e.oxw(2);e.MGl("id","agreementBox-",i.id,""),e.Q6J("ngClass",e.VKq(7,pt,!i.accepted&&r.submitAttempted)),e.xp6(1),e.Q6J("ngIf",!i.accepted&&r.submitAttempted),e.xp6(2),e.MGl("id","checkbox-term-",i.id,""),e.MGl("name","checkbox-term-",i.id,""),e.Q6J("ngModel",i.accepted),e.xp6(1),e.MGl("for","checkbox-term-",i.id,"")}}function ft(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",19),e.TgZ(1,"div",20),e.TgZ(2,"label",21),e._uU(3),e.qZA(),e.TgZ(4,"label",22),e._uU(5),e.qZA(),e._uU(6,"\xa0 "),e.TgZ(7,"a",23),e.SDv(8,24),e.qZA(),e.TgZ(9,"span",25),e._uU(10," or "),e.qZA(),e.TgZ(11,"a",26),e.SDv(12,27),e.qZA(),e.qZA(),e.TgZ(13,"div",28),e.TgZ(14,"span",29),e.NdJ("click",function(){var c=e.CHM(n).$implicit;return e.oxw(2).toggleLanguageSelection(c)}),e.TgZ(15,"span",30),e.SDv(16,31),e.qZA(),e.qZA(),e.qZA(),e.YNc(17,lt,2,2,"div",32),e.YNc(18,ut,6,9,"div",33),e.qZA()}if(2&t){var i=o.$implicit;e.MGl("id","term-block-",i.id,""),e.xp6(3),e.Oqu(i.selectedTranslation.translatedTermsName+" - "),e.xp6(1),e.MGl("id","pdf-locale-",i.id,""),e.xp6(1),e.Oqu(i.selectedTranslation.localeCode),e.xp6(2),e.MGl("id","pdf-view-",i.selectedTranslation.termsPdfId,""),e.MGl("href","/wapps/tnc/backend/viewterms/v1/",i.selectedTranslation.termsPdfId,".pdf",e.LSH),e.xp6(4),e.MGl("id","pdf-view-",i.selectedTranslation.termsPdfId,"-direct"),e.MGl("href","/wapps/tnc/backend/viewterms/v1/",i.selectedTranslation.termsPdfId,".pdf",e.LSH),e.MGl("download","",i.selectedTranslation.translatedTermsName,".pdf"),e.xp6(2),e.MGl("id","caret-",i.id,""),e.xp6(4),e.Q6J("ngIf",i.displayLanguageSelection),e.xp6(1),e.Q6J("ngIf",!i.isOptional)}}function gt(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",11),e.TgZ(1,"form",12),e.NdJ("ngSubmit",function(){return e.CHM(n),e.oxw().onSubmit()}),e.YNc(2,ft,19,12,"div",13),e.TgZ(3,"div",14),e.TgZ(4,"p"),e.TgZ(5,"span",15),e.NdJ("click",function(){return e.CHM(n),e.oxw().attemptedSubmit()}),e._UZ(6,"input",16),e.qZA(),e.TgZ(7,"a",17),e.NdJ("click",function(){return e.CHM(n),e.oxw().cancelAndRedirect()}),e.SDv(8,18),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&t){var i=e.oxw();e.xp6(2),e.Q6J("ngForOf",i.terms),e.xp6(4),e.Q6J("disabled",!i.terms[0].accepted)}}var ce,de,se,le,_e,pe,ue,fe,ge,me,w=function(t,o){return Object.defineProperty?Object.defineProperty(t,"raw",{value:o}):t.raw=o,t};function At(t,o){1&t&&(e.TgZ(0,"div",3),e.TgZ(1,"span",4),e._uU(2,"Loading\u2026"),e.qZA(),e.qZA())}function Et(t,o){if(1&t&&(e.TgZ(0,"option",40),e._uU(1),e.qZA()),2&t){var n=o.$implicit;e.Q6J("ngValue",n),e.xp6(1),e.hij(" ",n.localeCode," ")}}function Ot(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"select",38),e.NdJ("ngModelChange",function(a){return e.CHM(n),e.oxw(3).term.selectedTranslation=a}),e.YNc(1,Et,2,2,"option",39),e.qZA()}if(2&t){var i=e.oxw(3);e.Q6J("ngModel",i.term.selectedTranslation),e.xp6(1),e.Q6J("ngForOf",i.term.translations)}}function Nt(t,o){if(1&t&&(e.TgZ(0,"div",36),e.YNc(1,Ot,2,2,"select",37),e.qZA()),2&t){var n=e.oxw(2);e.MGl("id","language-selection-",n.term.id,""),e.xp6(1),e.Q6J("ngIf",n.term.translations)}}function Ct(t,o){if(1&t&&(e.TgZ(0,"h5",41),e._uU(1," You must agree to the terms before you can proceed. "),e.qZA()),2&t){var n=e.oxw(2);e.MGl("id","errors-checkbox-",n.term.id,"")}}var Te=function(t){return{"alert alert-danger":t}};function bt(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",42),e.TgZ(1,"input",43),e.NdJ("change",function(a){return e.CHM(n),e.oxw(2).setTermSelected(a)}),e.qZA(),e.TgZ(2,"label",44),e.SDv(3,45),e.qZA(),e.qZA()}if(2&t){var i=e.oxw(2);e.MGl("id","agreementBox-",i.term.id,""),e.Q6J("ngClass",e.VKq(5,Te,!i.term.accepted&&i.submitAttempted)),e.xp6(1),e.MGl("id","checkbox-term-",i.term.id,""),e.MGl("name","checkbox-term-",i.term.id,""),e.xp6(1),e.MGl("for","checkbox-term-",i.term.id,"")}}function Rt(t,o){if(1&t&&(e.TgZ(0,"h5",41),e._uU(1," You must make a decision on these terms before you can proceed. "),e.qZA()),2&t){var n=e.oxw(2);e.MGl("id","errors-radio-",n.term.id,"")}}function Pt(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",46),e.TgZ(1,"div",47),e.TgZ(2,"input",48),e.NdJ("ngModelChange",function(a){return e.CHM(n),e.oxw(2).term.decision=a}),e.qZA(),e.TgZ(3,"label",49),e.SDv(4,50),e.qZA(),e.qZA(),e.TgZ(5,"div",47),e.TgZ(6,"input",51),e.NdJ("ngModelChange",function(a){return e.CHM(n),e.oxw(2).term.decision=a}),e.qZA(),e.TgZ(7,"label",49),e.SDv(8,52),e.qZA(),e.qZA(),e.TgZ(9,"div",47),e.TgZ(10,"input",53),e.NdJ("ngModelChange",function(a){return e.CHM(n),e.oxw(2).term.decision=a}),e.qZA(),e.TgZ(11,"label",49),e.SDv(12,54),e.qZA(),e.qZA(),e.qZA()}if(2&t){var i=e.oxw(2);e.MGl("id","terms-decisions-",i.term.id,""),e.Q6J("ngClass",e.VKq(14,Te,!i.term.decision&&i.submitAttempted)),e.xp6(2),e.MGl("id","radio-accept-",i.term.id,""),e.MGl("name","radio-accept-",i.term.id,""),e.Q6J("ngModel",i.term.decision),e.xp6(1),e.MGl("for","radio-accept-",i.term.id,""),e.xp6(3),e.MGl("id","radio-decline-",i.term.id,""),e.MGl("name","radio-decline-",i.term.id,""),e.Q6J("ngModel",i.term.decision),e.xp6(1),e.MGl("for","radio-decline-",i.term.id,""),e.xp6(3),e.MGl("id","radio-defer-",i.term.id,""),e.MGl("name","radio-defer-",i.term.id,""),e.Q6J("ngModel",i.term.decision),e.xp6(1),e.MGl("for","radio-defer-",i.term.id,"")}}function yt(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",5),e.TgZ(1,"div",6),e.TgZ(2,"div",7),e.TgZ(3,"h1",8),e._uU(4),e.qZA(),e.qZA(),e.TgZ(5,"div",9),e._uU(6),e.qZA(),e.TgZ(7,"div",10),e.TgZ(8,"h4",11),e.SDv(9,12),e.qZA(),e.TgZ(10,"span"),e._uU(11),e.qZA(),e.qZA(),e.TgZ(12,"form",13),e.NdJ("ngSubmit",function(){return e.CHM(n),e.oxw().onSubmit()}),e.TgZ(13,"div",14),e.TgZ(14,"div",15),e.TgZ(15,"label",16),e._uU(16),e.qZA(),e.TgZ(17,"label",17),e._uU(18),e.qZA(),e._uU(19,"\xa0 "),e.TgZ(20,"a",18),e.SDv(21,19),e.qZA(),e.TgZ(22,"span",20),e._uU(23," or "),e.qZA(),e.TgZ(24,"a",21),e.SDv(25,22),e.qZA(),e.qZA(),e.TgZ(26,"div",23),e.TgZ(27,"span",24),e.NdJ("click",function(){e.CHM(n);var a=e.oxw();return a.toggleLanguageSelection(a.term)}),e.TgZ(28,"span",25),e.SDv(29,26),e.qZA(),e.qZA(),e.qZA(),e.YNc(30,Nt,2,2,"div",27),e.YNc(31,Ct,2,1,"h5",28),e.YNc(32,bt,4,7,"div",29),e.YNc(33,Rt,2,1,"h5",28),e.YNc(34,Pt,13,16,"div",30),e.qZA(),e.TgZ(35,"div",31),e.TgZ(36,"p"),e.TgZ(37,"span",32),e.NdJ("click",function(){return e.CHM(n),e.oxw().attemptedSubmit()}),e._UZ(38,"input",33),e.qZA(),e.TgZ(39,"a",34),e.NdJ("click",function(){return e.CHM(n),e.oxw().cancelAndRedirect()}),e.SDv(40,35),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&t){var i=e.oxw();e.xp6(4),e.hij(" ",i.term.selectedTranslation.translatedTermsName," "),e.xp6(2),e.hij(" ",i.term.selectedTranslation.translatedDescription," "),e.xp6(5),e.Oqu(i.term.selectedTranslation.translatedInstructions),e.xp6(5),e.Oqu(i.term.selectedTranslation.translatedTermsName+" - "),e.xp6(1),e.MGl("id","pdf-locale-",i.term.id,""),e.xp6(1),e.Oqu(i.term.selectedTranslation.localeCode),e.xp6(2),e.MGl("id","pdf-view-",i.term.selectedTranslation.termsPdfId,""),e.MGl("href","/wapps/tnc/backend/viewterms/v1/",i.term.selectedTranslation.termsPdfId,".pdf",e.LSH),e.xp6(4),e.MGl("id","pdf-view-",i.term.selectedTranslation.termsPdfId,"-direct"),e.MGl("href","/wapps/tnc/backend/viewterms/v1/",i.term.selectedTranslation.termsPdfId,".pdf",e.LSH),e.MGl("download","",i.term.selectedTranslation.translatedTermsName,".pdf"),e.xp6(2),e.MGl("id","caret-",i.term.id,""),e.xp6(4),e.Q6J("ngIf",i.term.displayLanguageSelection),e.xp6(1),e.Q6J("ngIf",!i.term.accepted&&i.submitAttempted),e.xp6(1),e.Q6J("ngIf",!i.term.isOptional),e.xp6(1),e.Q6J("ngIf",!i.term.decision&&i.submitAttempted),e.xp6(1),e.Q6J("ngIf",i.term.isOptional),e.xp6(4),e.Q6J("disabled",!i.term.accepted||!i.term.decision||i.isSubmitting)}}var ve,Se,he,Me,Ae,Ee,Oe,Ne,Ce,be,Re,R=function(t,o){return Object.defineProperty?Object.defineProperty(t,"raw",{value:o}):t.raw=o,t};function Lt(t,o){1&t&&(e.TgZ(0,"div",6),e.TgZ(1,"span",7),e._uU(2,"Loading\u2026"),e.qZA(),e.qZA())}function xt(t,o){if(1&t&&(e.TgZ(0,"option",40),e._uU(1),e.qZA()),2&t){var n=o.$implicit;e.Q6J("ngValue",n),e.xp6(1),e.hij(" ",n.localeCode," ")}}function Ft(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"select",38),e.NdJ("ngModelChange",function(a){return e.CHM(n),e.oxw(2).$implicit.selectedTranslation=a}),e.YNc(1,xt,2,2,"option",39),e.qZA()}if(2&t){var i=e.oxw(2).$implicit;e.Q6J("ngModel",i.selectedTranslation),e.xp6(1),e.Q6J("ngForOf",i.translations)}}function qt(t,o){if(1&t&&(e.TgZ(0,"div",36),e.YNc(1,Ft,2,2,"select",37),e.qZA()),2&t){var n=e.oxw().$implicit;e.MGl("id","language-selection-",n.id,""),e.xp6(1),e.Q6J("ngIf",n.translations)}}function $t(t,o){if(1&t&&(e.TgZ(0,"h5",45),e._uU(1," You must agree to the terms before you can proceed. "),e.qZA()),2&t){var n=e.oxw(2).$implicit;e.MGl("id","errors-checkbox-",n.id,"")}}var ye,we,Ie,De,Ze,Le,xe,Fe,qe,$e,ke,Pe=function(t){return{"alert alert-danger":t}};function kt(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",41),e.YNc(1,$t,2,1,"h5",34),e.TgZ(2,"input",42),e.NdJ("ngModelChange",function(c){return e.CHM(n),e.oxw().$implicit.accepted=c}),e.qZA(),e.TgZ(3,"label",43),e.SDv(4,44),e.qZA(),e.qZA()}if(2&t){var i=e.oxw().$implicit,r=e.oxw(2);e.MGl("id","agreementBox-",i.id,""),e.Q6J("ngClass",e.VKq(7,Pe,!i.accepted&&r.submitAttempted)),e.xp6(1),e.Q6J("ngIf",!i.accepted&&r.submitAttempted),e.xp6(1),e.MGl("id","checkbox-term-",i.id,""),e.MGl("name","checkbox-term-",i.id,""),e.Q6J("ngModel",i.accepted),e.xp6(1),e.MGl("for","checkbox-term-",i.id,"")}}function Gt(t,o){if(1&t&&(e.TgZ(0,"h5",45),e._uU(1," You must make a decision on these terms before you can proceed. "),e.qZA()),2&t){var n=e.oxw().$implicit;e.MGl("id","errors-radio-",n.id,"")}}function Ut(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",46),e.TgZ(1,"div",47),e.TgZ(2,"input",48),e.NdJ("ngModelChange",function(c){return e.CHM(n),e.oxw().$implicit.decision=c}),e.qZA(),e.TgZ(3,"label",49),e.SDv(4,50),e.qZA(),e.qZA(),e.TgZ(5,"div",47),e.TgZ(6,"input",51),e.NdJ("ngModelChange",function(c){return e.CHM(n),e.oxw().$implicit.decision=c}),e.qZA(),e.TgZ(7,"label",49),e.SDv(8,52),e.qZA(),e.qZA(),e.TgZ(9,"div",47),e.TgZ(10,"input",53),e.NdJ("ngModelChange",function(c){return e.CHM(n),e.oxw().$implicit.decision=c}),e.qZA(),e.TgZ(11,"label",49),e.SDv(12,54),e.qZA(),e.qZA(),e.qZA()}if(2&t){var i=e.oxw().$implicit,r=e.oxw(2);e.MGl("id","terms-decisions-",i.id,""),e.Q6J("ngClass",e.VKq(14,Pe,!i.decision&&r.submitAttempted)),e.xp6(2),e.MGl("id","radio-accept-",i.id,""),e.MGl("name","radio-accept-",i.id,""),e.Q6J("ngModel",i.decision),e.xp6(1),e.MGl("for","radio-accept-",i.id,""),e.xp6(3),e.MGl("id","radio-decline-",i.id,""),e.MGl("name","radio-decline-",i.id,""),e.Q6J("ngModel",i.decision),e.xp6(1),e.MGl("for","radio-decline-",i.id,""),e.xp6(3),e.MGl("id","radio-defer-",i.id,""),e.MGl("name","radio-defer-",i.id,""),e.Q6J("ngModel",i.decision),e.xp6(1),e.MGl("for","radio-defer-",i.id,"")}}function Yt(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",19),e.TgZ(1,"div",20),e.TgZ(2,"label",21),e._uU(3),e.qZA(),e.TgZ(4,"label",22),e._uU(5),e.qZA(),e._uU(6,"\xa0 "),e.TgZ(7,"a",23),e.SDv(8,24),e.qZA(),e.TgZ(9,"span",25),e._uU(10," or "),e.qZA(),e.TgZ(11,"a",26),e.SDv(12,27),e.qZA(),e.qZA(),e.TgZ(13,"div",28),e.TgZ(14,"span",29),e.NdJ("click",function(){var d=e.CHM(n).$implicit;return e.oxw(2).toggleLanguageSelection(d)}),e.TgZ(15,"span",30),e.SDv(16,31),e.qZA(),e.qZA(),e.qZA(),e.YNc(17,qt,2,2,"div",32),e.YNc(18,kt,5,9,"div",33),e.YNc(19,Gt,2,1,"h5",34),e.YNc(20,Ut,13,16,"div",35),e.qZA()}if(2&t){var i=o.$implicit,r=e.oxw(2);e.MGl("id","term-block-",i.id,""),e.xp6(3),e.Oqu(i.selectedTranslation.translatedTermsName+" - "),e.xp6(1),e.MGl("id","pdf-locale-",i.id,""),e.xp6(1),e.Oqu(i.selectedTranslation.localeCode+" "),e.xp6(2),e.MGl("id","pdf-view-",i.selectedTranslation.termsPdfId,""),e.MGl("href","/wapps/tnc/backend/viewterms/v1/",i.selectedTranslation.termsPdfId,".pdf",e.LSH),e.xp6(4),e.MGl("id","pdf-view-",i.selectedTranslation.termsPdfId,"-direct"),e.MGl("href","/wapps/tnc/backend/viewterms/v1/",i.selectedTranslation.termsPdfId,".pdf",e.LSH),e.MGl("download","",i.selectedTranslation.translatedTermsName,".pdf"),e.xp6(2),e.MGl("id","caret-",i.id,""),e.xp6(4),e.Q6J("ngIf",i.displayLanguageSelection),e.xp6(1),e.Q6J("ngIf",!i.isOptional),e.xp6(1),e.Q6J("ngIf",!i.decision&&r.submitAttempted),e.xp6(1),e.Q6J("ngIf",i.isOptional)}}function Qt(t,o){if(1&t){var n=e.EpF();e.TgZ(0,"div",8),e.TgZ(1,"div",9),e.TgZ(2,"p",10),e.SDv(3,11),e.qZA(),e.qZA(),e.TgZ(4,"form",12),e.NdJ("ngSubmit",function(){return e.CHM(n),e.oxw().onSubmit()}),e.YNc(5,Yt,21,14,"div",13),e.TgZ(6,"div",14),e.TgZ(7,"p"),e.TgZ(8,"span",15),e.NdJ("click",function(){return e.CHM(n),e.oxw().attemptedSubmit()}),e._UZ(9,"input",16),e.qZA(),e.TgZ(10,"a",17),e.NdJ("click",function(){return e.CHM(n),e.oxw().cancelAndRedirect()}),e.SDv(11,18),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&t){var i=e.oxw();e.xp6(5),e.Q6J("ngForOf",i.terms),e.xp6(4),e.Q6J("disabled",!i.terms[0].accepted&&!i.terms[0].decision)}}function jt(t,o){1&t&&(e.TgZ(0,"div",2),e.TgZ(1,"div",3),e._UZ(2,"i",4),e.qZA(),e.TgZ(3,"h1",5),e._uU(4,"Tnc backend services are healthy!"),e.qZA(),e.qZA())}function Xt(t,o){1&t&&(e.TgZ(0,"div",6),e.TgZ(1,"div",3),e._UZ(2,"i",7),e.qZA(),e.TgZ(3,"h1",5),e._uU(4,"Tnc backend services are down at the moment."),e.qZA(),e.qZA())}var h={DisplayOptionalAndRequiredTermsComponent:function(){function t(o,n,i){var r=this;this.route=o,this.termsService=n,this.router=i,this.route.queryParams.subscribe(function(a){r.site=a.site,r.events=a.event,r.accountId=a.account,r.redirect=a.redirect,r.cancelRedirect=a.cancelRedirect,r.redirect&&(r.redirect=r.enrichUrl(r.redirect)),r.cancelRedirect&&(r.cancelRedirect=r.enrichUrl(r.cancelRedirect)),console.log("cancelRedirect: "+r.cancelRedirect)}),this.loading=!0}return t.prototype.ngOnInit=function(){var o=this;this.termsService.getOptionalAndRequiredTerms(this.site,this.events,this.accountId).subscribe({next:function(n){if(o.loading=!1,n.length>0){for(var i=new Array,r=0,a=n;r0?i+="&":i+="?";for(var r=0,a=this.terms;r0){for(var r=new Array,a=0,c=n;a0?i+="&":i+="?";for(var r=0,a=this.terms;r0){for(var i=new Array,r=0,a=n;r