Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/connected-applications/main.js

"use strict";(self.webpackChunkconnected_applications=self.webpackChunkconnected_applications||[]).push([[179],{5811:(x,U,a)=>{var k=a(1481),t=a(6738),f=a(1210),d=a(269),p=(()=>{return(n=p||(p={}))[n.request=0]="request",n[n.accept=1]="accept",n[n.deny=2]="deny",n[n.cancel=3]="cancel",n[n.error=4]="error",n[n.timeout=5]="timeout",n[n.precondition=6]="precondition",p;var n})();new t.OlP("RealCPCloud");const w=new t.OlP("InPopup"),Z=new t.OlP("ServerError"),b=new t.OlP("AclCheck"),q=new t.OlP("JWT");let V=(()=>{class n{isHttps(){const e=window.location.protocol;return/^https:/.test(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),y=(()=>{class n{constructor(e,i,o){this._jwt=e,this._preconditions=i,this._check=o}get jwt(){return this._jwt}get encodedJwt(){return this._jwt.encodedJwt}get name(){return this._jwt.issDesc}get url(){return this.sameProtocol(this._jwt.iss.split(/[/]/).slice(0,3).join("/"))}get signer(){return this.sameProtocol(this._jwt.iss)}get ips(){return this._jwt.ips}get permissions(){return this._jwt.scope}get pseudoPermissions(){return this._preconditions.pseudoPermissions}get username(){return this._preconditions.username}get hasMinimumPermissions(){return this._preconditions.hasMinimumPermissions}get missingRequiredPermissions(){return this._preconditions.missingRequiredPermissions}get missingOptionalPermissions(){return this._preconditions.missingOptionalPermissions}get redirectUrl(){return`${this.sameProtocol(this._jwt.redirectUrl)}?state=${this._jwt.state}`}get callbackUrl(){return`${this.sameProtocol(this._jwt.callbackUrl)}?code=${this._jwt.challenge}`}get expiration(){return new Date(this._jwt.exp)}sameProtocol(e){return this._check.isHttps()?/^http:[/][/]/.test(e)?e.replace("http://","https://"):e:/^https:[/][/]/.test(e)?e.replace("https://","http://"):e}}return n.\u0275fac=function(e){return new(e||n)(t.LFG(q),t.LFG(b),t.LFG(V))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),O=(()=>{class n{constructor(e){this.locale=e}ngOnInit(){}getTitle(){switch(this.state){case p.request:return this.locale.maketext("\u201c[_1]\u201d Is Requesting Access ([output,url,_2,link,target,_blank])",this.name,this.url);case p.accept:return this.locale.maketext("\u201c[_1]\u201d Is Being Authorized ([output,url,_2,link,target,_blank])",this.name,this.url);case p.deny:return this.locale.maketext("\u201c[_1]\u201d Was Denied Access ([output,url,_2,link,target,_blank])",this.name,this.url);case p.cancel:return this.locale.maketext("Cancelling Request to Link \u201c[_1]\u201d ([output,url,_2,link,target,_blank])",this.name,this.url);case p.error:return this.locale.maketext("\u201c[_1]\u201d Registration Failed ([output,url,_2,link,target,_blank])",this.name,this.url);case p.timeout:return this.locale.maketext("\u201c[_1]\u201d Registration Timed Out ([output,url,_2,link,target,_blank])",this.name,this.url)}}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(d.g))},n.\u0275cmp=t.Xpm({type:n,selectors:[["whm-conn-apps-title"]],inputs:{name:"name",url:"url",state:"state"},decls:1,vars:1,consts:[[3,"innerHtml"]],template:function(e,i){1&e&&t._UZ(0,"h1",0),2&e&&t.Q6J("innerHtml",i.getTitle(),t.oJD)},styles:[""]}),n})();var l=a(3063),h=a(6895);function L(n,s){if(1&n&&(t.TgZ(0,"span",5),t._UZ(1,"cp-alert",6),t.qZA()),2&n){const e=t.oxw(2).$implicit,i=t.oxw();t.xp6(1),t.Q6J("alert",i.getMissingPermission(e))}}function z(n,s){if(1&n&&(t.TgZ(0,"span",7),t._UZ(1,"cp-alert",6),t.qZA()),2&n){const e=t.oxw(2).$implicit,i=t.oxw();t.xp6(1),t.Q6J("alert",i.getMissingOptionalPermission(e))}}function G(n,s){if(1&n&&(t.TgZ(0,"li")(1,"div",2),t._uU(2),t.qZA(),t.TgZ(3,"div"),t.YNc(4,L,2,1,"span",3),t.YNc(5,z,2,1,"span",4),t.qZA()()),2&n){const e=t.oxw().$implicit,i=t.oxw();t.xp6(2),t.Oqu(i.getPermissionText(e)),t.xp6(2),t.Q6J("ngIf",i.missingRequiredPermissions[e]),t.xp6(1),t.Q6J("ngIf",i.missingOptionalPermissions[e])}}function H(n,s){if(1&n&&(t.ynx(0),t.YNc(1,G,6,3,"li",1),t.BQk()),2&n){const e=s.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngIf",i.getPermissionText(e))}}let J=(()=>{class n{constructor(e){this.locale=e,this.missingRequiredPermissions={},this.missingOptionalPermissions={}}ngOnInit(){}getMissingPermission(e){return new l.bZ(this.locale.maketext("Missing \u201c[_1]\u201d permission!",e),l.NK.error,{isCloseable:!1})}getMissingOptionalPermission(e){return new l.bZ(this.locale.maketext("Missing \u201c[_1]\u201d optional permission!",e),l.NK.warning,{isCloseable:!1})}getPermissionText(e){switch(e){case"list-accts":return this.locale.maketext("Retrieve lists of [asis,cPanel] users on the server.");case"list-resellers":return this.locale.maketext("Retrieve lists of resellers on the server.");case"acct-summary":return this.locale.maketext("Retrieve lists of domains and websites hosted on the server.");case"create-user-session":return this.locale.maketext("Log in to [asis,cPanel] as the current account.");case"connected-applications":return this.locale.maketext("Manage connected applications on the server.");default:return e}}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(d.g))},n.\u0275cmp=t.Xpm({type:n,selectors:[["whm-conn-apps-permission-list"]],inputs:{permissions:"permissions",missingRequiredPermissions:"missingRequiredPermissions",missingOptionalPermissions:"missingOptionalPermissions"},decls:2,vars:1,consts:[[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text"],["class","error",4,"ngIf"],["class","warning",4,"ngIf"],[1,"error"],[3,"alert"],[1,"warning"]],template:function(e,i){1&e&&(t.TgZ(0,"ul"),t.YNc(1,H,2,1,"ng-container",0),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngForOf",i.permissions))},directives:[h.sg,h.O5,l.wx],styles:["#permissions-list[_ngcontent-%COMP%]{font-size:15px}.error[_ngcontent-%COMP%], .warning[_ngcontent-%COMP%]{margin-top:5px;display:inline-block;max-width:350px}[_nghost-%COMP%]     .alert{margin-bottom:5px}"]}),n})(),E=(()=>{class n{constructor(e,i,o,u){this.locale=e,this.state=p.request,this.inPopup=i,this.application=o,this.router=u}ngOnInit(){}onGrant(){return this.router.navigateByUrl("/grant"+(this.inPopup?"?in_popup=1":"")),!1}onDeny(){return this.router.navigateByUrl("/deny"+(this.inPopup?"?in_popup=1":"")),!1}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(d.g),t.Y36(w),t.Y36(y),t.Y36(f.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["whm-conn-apps-authorization-view"]],decls:21,vars:9,consts:[[1,"center"],[1,"row","bottom-hr"],[1,"col-xs-12","col-sm-8","col-md-6","col-lg-4"],[1,"text-center",3,"name","url","state"],[1,"row"],[1,"description","text-center"],[3,"permissions","missingRequiredPermissions","missingOptionalPermissions"],[1,"form-group","button-bar"],[1,"text-center"],["id","btn-grant",1,"btn","btn-primary",3,"click"],["id","btn-deny",1,"btn","btn-default",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"form")(2,"div",1)(3,"div",2),t._UZ(4,"whm-conn-apps-title",3),t.qZA()(),t.TgZ(5,"div",4)(6,"div",2)(7,"div",5),t._uU(8),t.qZA()()(),t.TgZ(9,"div",4)(10,"div",2)(11,"div"),t._UZ(12,"whm-conn-apps-permission-list",6),t.qZA()()(),t.TgZ(13,"div",4)(14,"div",2)(15,"div",7)(16,"div",8)(17,"button",9),t.NdJ("click",function(){return i.onGrant()}),t._uU(18),t.qZA(),t.TgZ(19,"button",10),t.NdJ("click",function(){return i.onDeny()}),t._uU(20),t.qZA()()()()()()()),2&e&&(t.xp6(4),t.Q6J("name",i.application.name)("url",i.application.url)("state",i.state),t.xp6(4),t.hij(" ",i.locale.maketext("This application requires the following access:")," "),t.xp6(4),t.Q6J("permissions",i.application.permissions)("missingRequiredPermissions",i.application.missingRequiredPermissions)("missingOptionalPermissions",i.application.missingOptionalPermissions),t.xp6(6),t.hij(" ",i.locale.maketext("Grant Access")," "),t.xp6(2),t.hij(" ",i.locale.maketext("Deny Access")," "))},directives:[O,J],styles:[".btn[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}.row[_ngcontent-%COMP%]{margin:0}.bottom-hr[_ngcontent-%COMP%]{border-bottom:1px solid #ccc;margin-bottom:20px}.button-bar[_ngcontent-%COMP%]{padding-top:20px}.center[_ngcontent-%COMP%]{max-width:500px;margin:0 auto;word-wrap:break-word}.center[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{width:100%}"]}),n})();var W=a(6678),F=a.n(W),A=a(4850),C=a(4642),v=a(7709);class K{constructor(s,e){this.name=s,this.token=e}}var Y=a(5419);let B=(()=>{class n{constructor(e,i){this.apiClient=e,this._preconditions=i}createApiToken(e,i,o){if(""===e)throw new Error("Name parameter must not be empty");const u=new C.r(C.N.JsonApi,{method:"api_token_create",arguments:[new v.h("token_name",e),...i.map((m,r)=>new v.h("acl-"+r,m)),...o?o.map((m,r)=>new v.h("whitelist_ip-"+r,m)):[]]});return this.apiClient.post(u).pipe((0,A.U)(m=>{if(!m.success)throw m.errors;return new K(m.data.name,this._preconditions.username+":"+m.data.token)}))}removeApiToken(e){if(""===e)throw new Error("Name parameter must not be empty");const i=new C.r(C.N.JsonApi,{method:"api_token_revoke",arguments:[new v.h("token_name",e)]});return this.apiClient.post(i).pipe((0,A.U)(o=>o.success))}updateApplication(e){if(""===e.name)throw new Error("The name property of the application must not be empty");const i=new C.r(C.N.JsonApi,{method:"save_connected_application",config:{json:!0},arguments:[new v.h("name",e.name),new v.h("data",e.data)]});return this.apiClient.post(i).pipe((0,A.U)(o=>{if(!o.success)throw o.errors;return!0}))}}return n.\u0275fac=function(e){return new(e||n)(t.LFG(Y.A4),t.LFG(b))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var X=a(1168);class ${constructor(s,e,i){if(this.apiKey=s,this.apiKeyId=e,this.scope=i,""===this.apiKey)throw new Error("The apiKey parameter must not be an empty string");if(""===this.apiKeyId)throw new Error("The apiKeyId parameter must not be an empty string");if(0===i.length)throw new Error("The scope parameter must not be an empty array");i.forEach((o,u)=>{if(""===o)throw new Error(`scope[${u}] must not be an empty string`)})}toObject(){return{api_key:this.apiKey,api_key_id:this.apiKeyId,scope:this.scope}}}class N{constructor(s){if(this.reason=s,""===this.reason)throw new Error("The reason parameter must not be an empty string")}toObject(){return{reason:this.reason}}}var tt=a(529);let I=(()=>{class n{constructor(e,i,o){this.http=e,this.application=i,this.locale=o}register(e){const i=new $(e.token,e.name,this.application.jwt.scope);return this._post(i)}reportFailure(e){const i=new N(e);return this._post(i)}reportDenyAccess(){const e=new N(this.locale.maketext("The user declined the request."));return this._post(e)}_post(e){return this.http.post(this.application.callbackUrl,e.toObject()).pipe((0,X.V)(1e3),(0,A.U)(i=>!0))}}return n.\u0275fac=function(e){return new(e||n)(t.LFG(tt.eN),t.LFG(y),t.LFG(d.g))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var P=a(9860),c=(()=>{return(n=c||(c={})).hidden="hidden",n.visible="visible",n.running="running",n.skipped="skipped",n.success="success",n.error="error",n.warning="warning",c;var n})();const R=n=>{if(n){if(n instanceof Error)return n.message;if(Array.isArray(n)&&n.length)return n[0].message;if(n.message)return n.message;if("string"==typeof n)return n}return""};class j{constructor(s={}){this.states={},Object.keys(s).map((e,i)=>{this.states[e]={status:s[e]}})}state(s){return this.states[s]}run(s){this.states[s].status=c.running,delete this.states[s].message}show(s){s.forEach(e=>{this.states[e].status=c.visible,delete this.states[e].message})}hide(s){s.forEach(e=>{this.states[e].status=c.hidden,delete this.states[e].message})}done(s){this.states[s].status=c.success}failed(s,e){this.states[s].status=c.error,this.states[s].message=R(e)}failedWithWarning(s,e){this.states[s].status=c.warning,this.states[s].message=R(e)}skip(s){s.forEach(e=>{this.states[e].status=c.skipped})}}class nt extends j{constructor(){super({generateToken:c.visible,removeToken:c.hidden,registerWithApp:c.visible,reportFailureToApp:c.hidden,saveApp:c.visible})}}var it=a(854);class st{constructor(s,e,i,o){this.name=s,this.data={},e&&(this.data.token_name=e.name),i&&(this.data.jwt=i),o&&(this.data.privileges_granted=o)}}var S=a(7489);function ot(n,s){1&n&&t._UZ(0,"i",7)}function rt(n,s){1&n&&t._UZ(0,"i",8)}function at(n,s){1&n&&t._UZ(0,"i",9)}function ct(n,s){1&n&&t._UZ(0,"i",10)}function pt(n,s){1&n&&t._UZ(0,"i",11)}function lt(n,s){1&n&&(t.TgZ(0,"span"),t._uU(1,"\xa0"),t.qZA())}let ut=(()=>{class n{constructor(e){this.locale=e,this.actionItemState=c}ngOnInit(){}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(d.g))},n.\u0275cmp=t.Xpm({type:n,selectors:[["whm-conn-apps-action-item-icon"]],inputs:{state:"state"},decls:7,vars:7,consts:[[1,"action-icon",3,"ngSwitch"],["class","fas fa-spinner fa-spin","aria-hidden","true","aria-label","locale.maketext('Running')",4,"ngSwitchCase"],["class","fas fa-check","aria-hidden","true","aria-label","locale.maketext('Successful')",4,"ngSwitchCase"],["class","fas fa-times","aria-hidden","true","aria-label","locale.maketext('Failed')",4,"ngSwitchCase"],["class","fas fa-exclamation-triangle","aria-hidden","true","aria-label","locale.maketext('Warning')",4,"ngSwitchCase"],["class","fas fa-minus","aria-hidden","true","aria-label","locale.maketext('Skipped')",4,"ngSwitchCase"],[4,"ngSwitchCase"],["aria-hidden","true","aria-label","locale.maketext('Running')",1,"fas","fa-spinner","fa-spin"],["aria-hidden","true","aria-label","locale.maketext('Successful')",1,"fas","fa-check"],["aria-hidden","true","aria-label","locale.maketext('Failed')",1,"fas","fa-times"],["aria-hidden","true","aria-label","locale.maketext('Warning')",1,"fas","fa-exclamation-triangle"],["aria-hidden","true","aria-label","locale.maketext('Skipped')",1,"fas","fa-minus"]],template:function(e,i){1&e&&(t.TgZ(0,"span",0),t.YNc(1,ot,1,0,"i",1),t.YNc(2,rt,1,0,"i",2),t.YNc(3,at,1,0,"i",3),t.YNc(4,ct,1,0,"i",4),t.YNc(5,pt,1,0,"i",5),t.YNc(6,lt,2,0,"span",6),t.qZA()),2&e&&(t.Q6J("ngSwitch",i.state),t.xp6(1),t.Q6J("ngSwitchCase",i.actionItemState.running),t.xp6(1),t.Q6J("ngSwitchCase",i.actionItemState.success),t.xp6(1),t.Q6J("ngSwitchCase",i.actionItemState.error),t.xp6(1),t.Q6J("ngSwitchCase",i.actionItemState.warning),t.xp6(1),t.Q6J("ngSwitchCase",i.actionItemState.skipped),t.xp6(1),t.Q6J("ngSwitchCase",i.actionItemState.visible))},directives:[h.RF,h.n9],styles:[".fa-check[_ngcontent-%COMP%]{color:green}.fa-times[_ngcontent-%COMP%]{color:red}.fa-exclamation-triangle[_ngcontent-%COMP%]{color:#f6c342}.fa-minus[_ngcontent-%COMP%]{color:gray}.action-icon[_ngcontent-%COMP%]{display:inline-block;width:30px;padding:5px 10px}"]}),n})();function mt(n,s){if(1&n&&(t.TgZ(0,"div",2)(1,"div",6),t._UZ(2,"cp-alert",7),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("alert",e.getAlert())}}function ht(n,s){if(1&n&&(t.TgZ(0,"div",1)(1,"div",2),t._UZ(2,"whm-conn-apps-action-item-icon",3),t.TgZ(3,"span",4),t.Hsn(4),t.qZA()(),t.YNc(5,mt,3,1,"div",5),t.qZA()),2&n){const e=t.oxw();t.uIk("aria-busy",e.state.status!==e.actionItemState.running),t.xp6(2),t.Q6J("state",e.state.status),t.xp6(3),t.Q6J("ngIf",e.state.message)}}const dt=["*"];let D=(()=>{class n{constructor(e){this.locale=e,this.actionItemState=c}ngOnInit(){}getAlert(){return new l.bZ(this.state.message,this.state.status===c.error?l.NK.error:l.NK.warning,{isCloseable:!1})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(d.g))},n.\u0275cmp=t.Xpm({type:n,selectors:[["whm-conn-apps-action-item"]],inputs:{state:"state"},ngContentSelectors:dt,decls:1,vars:1,consts:[["aria-live","polite","class","row ai-container",4,"ngIf"],["aria-live","polite",1,"row","ai-container"],[1,"col-xs-12","col-sm-12","col-md-12","col-lg-12"],[3,"state"],[1,"ai-content"],["class","col-xs-12 col-sm-12 col-md-12 col-lg-12",4,"ngIf"],[1,"ai-alert-wrapper"],[3,"alert"]],template:function(e,i){1&e&&(t.F$t(),t.YNc(0,ht,6,3,"div",0)),2&e&&t.Q6J("ngIf",i.state.status!==i.actionItemState.hidden)},directives:[h.O5,ut,l.wx],styles:[".row[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{vertical-align:middle}.ai-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{white-space:nowrap}.ai-content[_ngcontent-%COMP%]{display:inline-block;white-space:normal}html[dir=ltr][_ngcontent-%COMP%]   .ai-content[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .ai-content[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .ai-content[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .ai-content[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .ai-content[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .ai-content[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .ai-content[_ngcontent-%COMP%]{padding-left:5px}html[dir=rtl][_ngcontent-%COMP%]   .ai-content[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .ai-content[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .ai-content[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .ai-content[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .ai-content[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .ai-content[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .ai-content[_ngcontent-%COMP%]{padding-right:5px}.ai-alert-wrapper[_ngcontent-%COMP%]{white-space:normal}html[dir=ltr][_ngcontent-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], [dir=ltr]   [_nghost-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%]{padding-left:36px}html[dir=rtl][_ngcontent-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .ai-alert-wrapper[_ngcontent-%COMP%]{padding-right:36px}"]}),n})();function gt(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onRetry()}),t._uU(1),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",e.locale.maketext("Retry")," ")}}function _t(n,s){if(1&n&&(t.TgZ(0,"div",4)(1,"div",2)(2,"div",12)(3,"div",13),t.YNc(4,gt,2,1,"button",14),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(4),t.Q6J("ngIf",e.showRetry)}}function ft(n,s){if(1&n&&(t.TgZ(0,"div",16)(1,"p",17),t._uU(2),t.qZA(),t._UZ(3,"p",18),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.hij(" ",e.locale.maketext("You will be redirected back to \u201c[_1]\u201d.",e.application.name)," "),t.xp6(1),t.Q6J("innerHTML",e.locale.maketext("If you are not redirected automatically, [output,url,_1,click here].",e.escapeUri(e.application.redirectUrl)),t.oJD)}}function wt(n,s){if(1&n&&(t.TgZ(0,"div",16),t._UZ(1,"p",19),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("innerHTML",e.locale.maketext("Since an error occurred, we cannot register this server with \u201c[output,strong,_2]\u201d. [output,url,_1,Click here] to return to \u201c[output,strong,_2]\u201d.",e.escapeUri(e.application.redirectUrl),e.escapeHtml(e.application.name)),t.oJD)}}const T=1e3;let Pt=(()=>{class n{constructor(e,i,o,u,m){this.locale=i,this.autoStart=!0,this.state=p.accept,this.escapeHtml=S.escape,this.escapeUri=encodeURI,this.steps=new nt,this.showClose=!1,this.showRetry=!1,this.redirected=!1,this.redirectManually=!1,this.errors=[],this.tokenName="",this.fsmConfig={transitions:[{name:"start",from:"none",to:"Initial"},{name:"createToken",from:"Initial",to:"HasToken"},{name:"createTokenFailed",from:"Initial",to:"NoToken"},{name:"reportFailure",from:"NoToken",to:"ReportedError"},{name:"register",from:"HasToken",to:"Registered"},{name:"timeout",from:"HasToken",to:"Timedout"},{name:"retry",from:"Timedout",to:"HasToken"},{name:"save",from:"Registered",to:"Saved"},{name:"reportSaveFailure",from:"Registered",to:"SaveFailed"},{name:"cleanupToken",from:"HasToken",to:"CleaningToken"},{name:"cleanupToken",from:"Timedout",to:"CleaningToken"},{name:"reportFailure",from:"CleaningToken",to:"NoToken"}],methods:{onEnterInitial:()=>(this.steps.run("generateToken"),this.api.createApiToken(this.tokenName,this.application.permissions.filter(r=>!this.application.pseudoPermissions.has(r)),this.application.ips).pipe((0,P.g)(T)).subscribe(r=>(this.token=r,this.steps.done("generateToken"),setTimeout(()=>this.fsm.createToken(),0),!0),r=>(this.errors.push(r),this.steps.failed("generateToken",r),this.steps.show(["reportFailureToApp"]),this.steps.hide(["registerWithApp","saveApp"]),setTimeout(()=>this.fsm.createTokenFailed(),0),!0))),onEnterHastoken:()=>(this.steps.run("registerWithApp"),this.externalApp.register(this.token).pipe((0,P.g)(T)).subscribe(r=>(this.steps.done("registerWithApp"),setTimeout(()=>this.fsm.register(),0),!0),r=>r instanceof it.W?(this.steps.failed("registerWithApp",this.locale.maketext("The request has timed out.")),setTimeout(()=>this.fsm.timeout(),0),!0):(this.steps.failed("registerWithApp",r),this.steps.show(["removeToken","reportFailureToApp"]),setTimeout(()=>this.fsm.cleanupToken(),0),!0))),onEnterRegistered:()=>{this.steps.show(["saveApp"]),this.steps.run("saveApp");const r=this.application.permissions.filter(M=>!0!==this.application.missingOptionalPermissions[M]),_=new st(this.application.name,this.token,this.application.jwt.payload,r);return this.api.updateApplication(_).pipe((0,P.g)(T)).subscribe(M=>(this.steps.done("saveApp"),setTimeout(()=>this.fsm.save(),0),!0),M=>(this.steps.failedWithWarning("saveApp",this.locale.maketext("The application registration succeeded, but the configuration could not be saved due to: [_1]. The connected application will function as expected, but you will not be able to use the connected application management tools to update or remove this application.",R(M))),setTimeout(()=>this.fsm.reportSaveFailure(),0),!0))},onEnterCleaningtoken:r=>(this.steps.run("removeToken"),this.api.removeApiToken(this.tokenName).pipe((0,P.g)(T)).subscribe(_=>(this.steps.done("removeToken"),setTimeout(()=>this.fsm.reportFailure(),0),!0),_=>(this.steps.failed("removeToken",_),this.errors.push(_),setTimeout(()=>this.fsm.reportFailure(),0),!0))),onEnterNotoken:r=>(this.steps.run("reportFailureToApp"),this.externalApp.reportFailure(this.errors[0]).pipe((0,P.g)(T)).subscribe(_=>(this.steps.done("reportFailureToApp"),setTimeout(()=>this.fsm.reportFailure(),0),!0),_=>(this.steps.failed("reportFailureToApp",_),this.steps.failed("saveApp"),setTimeout(()=>this.fsm.reportFailure(),0),!0))),onEnterReportederror:()=>(this.redirectManually=!0,!0),onEnterSaved:()=>(this.redirect(1e4),!0),onEnterSavefailed:()=>(this.redirect(3e4),!0),onEnterTimedout:()=>(this.showRetry=!0,!0),onLeaveTimedout:()=>(this.showRetry=!1,!0)}},this.inPopup=e,this.api=o,this.externalApp=u,this.application=m,this.fsm=new(F())(this.fsmConfig),this.tokenName=(0,S.snakeCase)(this.application.name)}get stateMachine(){return this.fsm}ngOnInit(){this.autoStart&&this.start()}start(){this.fsm.start()}onRetry(){this.fsm.retry()}redirect(e){const i=this.application.redirectUrl;this.redirected=!0,window.setTimeout(()=>location.href=i,e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(w),t.Y36(d.g),t.Y36(B),t.Y36(I),t.Y36(y))},n.\u0275cmp=t.Xpm({type:n,selectors:[["whm-conn-apps-process-authorize-view"]],inputs:{autoStart:"autoStart"},decls:21,vars:16,consts:[[1,"center"],[1,"row","bottom-hr"],[1,"col-xs-12","col-sm-8","col-md-6","col-lg-4"],[1,"text-center",3,"name","url","state"],[1,"row"],["id","generate-token",3,"state"],["id","register-with-app",3,"state"],["id","remove-token",3,"state"],["id","register-failure-to-app",3,"state"],["id","save-app",3,"state"],["class","row",4,"ngIf"],["class","text-center redirect",4,"ngIf"],[1,"form-group","button-bar"],[1,"text-center"],["class","btn btn-primary btn-retry",3,"click",4,"ngIf"],[1,"btn","btn-primary","btn-retry",3,"click"],[1,"text-center","redirect"],[1,"redirect-text"],[1,"force-redirect",3,"innerHTML"],[1,"redirect-text",3,"innerHTML"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"whm-conn-apps-title",3),t.qZA()(),t.TgZ(4,"div",4)(5,"div",2)(6,"whm-conn-apps-action-item",5),t._uU(7),t.qZA(),t.TgZ(8,"whm-conn-apps-action-item",6),t._uU(9),t.qZA(),t.TgZ(10,"whm-conn-apps-action-item",7),t._uU(11),t.qZA(),t.TgZ(12,"whm-conn-apps-action-item",8),t._uU(13),t.qZA(),t.TgZ(14,"whm-conn-apps-action-item",9),t._uU(15),t.qZA()()(),t.YNc(16,_t,5,1,"div",10),t.TgZ(17,"div",4)(18,"div",2),t.YNc(19,ft,4,2,"div",11),t.YNc(20,wt,2,1,"div",11),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("name",i.application.name)("url",i.application.url)("state",i.state),t.xp6(3),t.Q6J("state",i.steps.state("generateToken")),t.xp6(1),t.hij(" ",i.locale.maketext("Generating API token.")," "),t.xp6(1),t.Q6J("state",i.steps.state("registerWithApp")),t.xp6(1),t.hij(" ",i.locale.maketext("Registering the server with \u201c[_1]\u201d.",i.application.name)," "),t.xp6(1),t.Q6J("state",i.steps.state("removeToken")),t.xp6(1),t.hij(" ",i.locale.maketext("Removing API token since registration failed.")," "),t.xp6(1),t.Q6J("state",i.steps.state("reportFailureToApp")),t.xp6(1),t.hij(" ",i.locale.maketext("Notifying cpCloud the request failed.")," "),t.xp6(1),t.Q6J("state",i.steps.state("saveApp")),t.xp6(1),t.hij(" ",i.locale.maketext("Saving \u201c[_1]\u201d application registration information.",i.application.name)," "),t.xp6(1),t.Q6J("ngIf",!i.redirected&&!i.redirectManually),t.xp6(3),t.Q6J("ngIf",i.redirected),t.xp6(1),t.Q6J("ngIf",i.redirectManually))},directives:[O,D,h.O5],styles:[".btn[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}.row[_ngcontent-%COMP%]{margin:0}.bottom-hr[_ngcontent-%COMP%]{border-bottom:1px solid #ccc;margin-bottom:20px}.button-bar[_ngcontent-%COMP%]{padding-top:20px}.redirect-text[_ngcontent-%COMP%]{padding-top:20px;padding-bottom:10px}.force-redirect[_ngcontent-%COMP%]{padding-top:10px;font-size:10px}.center[_ngcontent-%COMP%]{max-width:500px;margin:0 auto;word-wrap:break-word}.center[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{width:100%}"]}),n})();class xt extends j{constructor(){super({registerDenyWithApp:c.visible})}}var g=(()=>{return(n=g||(g={})).deny="deny",n.cancel="cancel",g;var n})(),yt=a(3894);function Tt(n,s){if(1&n&&(t.TgZ(0,"span",9),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij(" ",e.locale.maketext("Notifying \u201c[_1]\u201d the request was denied.",e.application.name)," ")}}function kt(n,s){if(1&n&&(t.TgZ(0,"span",9),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij(" ",e.locale.maketext("Notifying \u201c[_1]\u201d the request was canceled.",e.application.name)," ")}}function bt(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onRetry()}),t._uU(1),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",e.locale.maketext("Retry")," ")}}function Ot(n,s){if(1&n&&(t.TgZ(0,"div",4)(1,"div",2)(2,"div",10)(3,"div",11),t.YNc(4,bt,2,1,"button",12),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(4),t.Q6J("ngIf",e.showRetry)}}function At(n,s){if(1&n&&(t.TgZ(0,"div",14)(1,"p",15),t._uU(2),t.qZA(),t._UZ(3,"p",16),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.hij(" ",e.locale.maketext("You will be redirected back to \u201c[_1]\u201d.",e.application.name)," "),t.xp6(1),t.Q6J("innerHTML",e.locale.maketext("If you are not redirected automatically, [output,url,_1,click here].",e.escapeUri(e.application.redirectUrl)),t.oJD)}}let It=(()=>{class n{constructor(e,i,o,u,m){this.locale=i,this.autoStart=!0,this.state=p.deny,this.why=g.deny,this.denyType=g,this.escapeUri=encodeURI,this.steps=new xt,this.showClose=!1,this.showRetry=!1,this.errors=[],this.redirected=!1,this.fsmConfig={transitions:[{name:"start",from:"none",to:"Initial"},{name:"deny",from:"Initial",to:"Reported"},{name:"denyFailure",from:"Initial",to:"ReportFailed"},{name:"retry",from:"ReportFailed",to:"Initial"}],methods:{onEnterInitial:()=>(this.steps.run("registerDenyWithApp"),this.externalApp.reportDenyAccess().pipe((0,P.g)(1e3)).subscribe(r=>(this.steps.done("registerDenyWithApp"),setTimeout(()=>this.fsm.deny(),0),!0),r=>(this.steps.failed("registerDenyWithApp",r instanceof yt.W?this.locale.maketext("The request has timed out."):r),setTimeout(()=>this.fsm.denyFailure(),0),!0))),onEnterReported:()=>(this.redirect(),!0),onEnterReportfailed:()=>(this.showRetry=!0,!0),onLeaveReportfailed:()=>(this.showRetry=!1,!0)}},this.route=u,this.inPopup=e,this.externalApp=o,this.application=m,this.fsm=new(F())(this.fsmConfig)}get stateMachine(){return this.fsm}ngOnInit(){this.route.queryParamMap.subscribe(e=>{let i=g.deny;e.get("why")&&(i=e.get("why")),this.why=g[i],this.state="cancel"===i?p.cancel:p.deny}),this.autoStart&&this.start()}start(){this.fsm.start()}onRetry(){this.fsm.retry()}redirect(){const e=this.application.redirectUrl;this.redirected=!0,window.setTimeout(()=>location.href=e,1e4)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(w),t.Y36(d.g),t.Y36(I),t.Y36(f.gz),t.Y36(y))},n.\u0275cmp=t.Xpm({type:n,selectors:[["whm-conn-apps-process-deny-view"]],inputs:{autoStart:"autoStart"},decls:13,vars:8,consts:[[1,"center"],[1,"row","bottom-hr"],[1,"col-xs-12","col-sm-8","col-md-6","col-lg-4"],[1,"text-center",3,"name","url","state"],[1,"row"],["id","register-deny-with-app",3,"state"],["class","step1",4,"ngIf"],["class","row",4,"ngIf"],["class","text-center redirect",4,"ngIf"],[1,"step1"],[1,"form-group","button-bar"],[1,"text-center"],["class","btn btn-primary btn-retry",3,"click",4,"ngIf"],[1,"btn","btn-primary","btn-retry",3,"click"],[1,"text-center","redirect"],[1,"redirect-text"],[1,"force-redirect",3,"innerHTML"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"whm-conn-apps-title",3),t.qZA()(),t.TgZ(4,"div",4)(5,"div",2)(6,"whm-conn-apps-action-item",5),t.YNc(7,Tt,2,1,"span",6),t.YNc(8,kt,2,1,"span",6),t.qZA()()(),t.YNc(9,Ot,5,1,"div",7),t.TgZ(10,"div",4)(11,"div",2),t.YNc(12,At,4,2,"div",8),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("name",i.application.name)("url",i.application.url)("state",i.state),t.xp6(3),t.Q6J("state",i.steps.state("registerDenyWithApp")),t.xp6(1),t.Q6J("ngIf",i.why===i.denyType.deny),t.xp6(1),t.Q6J("ngIf",i.why===i.denyType.cancel),t.xp6(1),t.Q6J("ngIf",!i.redirected),t.xp6(3),t.Q6J("ngIf",i.redirected))},directives:[O,D,h.O5],styles:[".btn[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}.row[_ngcontent-%COMP%]{margin:0}.bottom-hr[_ngcontent-%COMP%]{border-bottom:1px solid #ccc;margin-bottom:20px}.button-bar[_ngcontent-%COMP%]{padding-top:20px}.redirect-text[_ngcontent-%COMP%]{padding-top:20px;padding-bottom:10px}.force-redirect[_ngcontent-%COMP%]{padding-top:10px;font-size:10px}.center[_ngcontent-%COMP%]{max-width:500px;margin:0 auto;word-wrap:break-word}.center[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{width:100%}"]}),n})(),Rt=(()=>{class n{constructor(e,i,o,u){this.locale=e,this.state=p.precondition,this.showClose=!1,this.inPopup&&(this.showClose=!0),this.router=i,this.inPopup=u,this.application=o}ngOnInit(){this.application.hasMinimumPermissions&&this.router.navigateByUrl("authorize"+(this.inPopup?"?in_popup=1":""))}onLoginAgain(){return!0}onCancel(){return this.router.navigate(["/deny"],{queryParams:{why:g.cancel,in_popup:this.inPopup?1:0}}),!0}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(d.g),t.Y36(f.F0),t.Y36(y),t.Y36(w))},n.\u0275cmp=t.Xpm({type:n,selectors:[["whm-conn-apps-precondition-view"]],decls:28,vars:12,consts:[[1,"center"],["action","/cpsess0/scripts7/connected-applications","method","POST"],[1,"row","bottom-hr"],[1,"col-xs-12","col-sm-8","col-md-6","col-lg-4"],[1,"text-center",3,"name","url","state"],[1,"row"],[1,"description","text-center"],[3,"permissions","missingRequiredPermissions","missingOptionalPermissions"],[1,"form-group","button-bar"],[1,"text-center"],["id","btn-logout","type","submit",1,"btn","btn-primary",3,"click"],["id","btn-cancel","type","button",1,"btn","btn-default",3,"click"],["type","hidden","name","jwt",3,"value"],["type","hidden","name","in_popup",3,"value"],["type","hidden","value","api_key","name","response_type"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3),t._UZ(4,"whm-conn-apps-title",4),t.qZA()(),t.TgZ(5,"div",5)(6,"div",3)(7,"div",6),t._uU(8),t.qZA()()(),t.TgZ(9,"div",5)(10,"div",3)(11,"div"),t._UZ(12,"whm-conn-apps-permission-list",7),t.qZA()()(),t.TgZ(13,"div",5)(14,"div",3)(15,"div"),t._uU(16),t.qZA()()(),t.TgZ(17,"div",5)(18,"div",3)(19,"div",8)(20,"div",9)(21,"button",10),t.NdJ("click",function(){return i.onLoginAgain()}),t._uU(22),t.qZA(),t.TgZ(23,"button",11),t.NdJ("click",function(){return i.onCancel()}),t._uU(24),t.qZA()()()()(),t._UZ(25,"input",12)(26,"input",13)(27,"input",14),t.qZA()()),2&e&&(t.xp6(4),t.Q6J("name",i.application.name)("url",i.application.url)("state",i.state),t.xp6(4),t.hij(" ",i.locale.maketext("The current account, [_1], does not have the permissions needed by \u201c[_2]\u201d.",i.application.username,i.application.name)," "),t.xp6(4),t.Q6J("permissions",i.application.permissions)("missingRequiredPermissions",i.application.missingRequiredPermissions)("missingOptionalPermissions",i.application.missingOptionalPermissions),t.xp6(4),t.hij(" ",i.locale.maketext("You may log in with a different user or cancel the request.")," "),t.xp6(6),t.hij(" ",i.locale.maketext("Try a different user")," "),t.xp6(2),t.hij(" ",i.locale.maketext("Cancel request")," "),t.xp6(1),t.s9C("value",i.application.encodedJwt),t.xp6(1),t.s9C("value",i.inPopup?1:0))},directives:[O,J],styles:[".btn[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}.row[_ngcontent-%COMP%]{margin:0}.bottom-hr[_ngcontent-%COMP%]{border-bottom:1px solid #ccc;margin-bottom:20px}.button-bar[_ngcontent-%COMP%]{padding-top:20px;white-space:nowrap}.center[_ngcontent-%COMP%]{max-width:500px;margin:0 auto;word-wrap:break-word}.center[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{width:100%}"]}),n})(),Ut=(()=>{class n{constructor(e,i){this.locale=e,this.error=i}ngOnInit(){}getAlert(){let e="";switch(this.error){case"jwt:missing_secret":e=this.locale.maketext("The token secret could not be located.");break;case"jwt:invalid_segment_count":case"jwt:invalid_segment_encoding":e=this.locale.maketext("The token is invalid.");break;case"jwt:unacceptable_algorithm":case"jwt:unwanted_signature":case"jwt:not_supported_signing_algorithm":e=this.locale.maketext("The token cannot be verified.");break;case"jwt:invalid_signature":e=this.locale.maketext("The token has an invalid signature.");break;case"missing_jwt":e=this.locale.maketext("The \u201c[_1]\u201d parameter is required","jwt");break;case"unrecognized_request_type":e=this.locale.maketext("The \u201c[_1]\u201d parameter must be one of: [list_or,_2]","response_type",["api_key"]);break;case"cannot_decode_jwt":e=this.locale.maketext("The \u201c[_1]\u201d parameter cannot be decoded.","jwt");break;case"invalid_domain":e=this.locale.maketext("The external application you are trying to connect is not supported.");break;default:e=this.error}return new l.bZ(e,l.NK.error,{isCloseable:!1})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(d.g),t.Y36(Z))},n.\u0275cmp=t.Xpm({type:n,selectors:[["whm-conn-apps-error-view"]],decls:3,vars:1,consts:[[1,"center"],[1,"col-xs-12","col-sm-12","col-md-12","col-lg-12"],[3,"alert"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"cp-alert",2),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("alert",i.getAlert()))},directives:[l.wx],styles:[".center[_ngcontent-%COMP%]{max-width:500px;margin:0 auto;word-wrap:break-word}.center[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{width:100%}"]}),n})(),Q=(()=>{class n{constructor(e,i,o){this.error=e,this.preconditions=i,this.router=o}canActivate(e,i){return this.error?(this.router.navigateByUrl("error"),!1):!!this.preconditions.hasMinimumPermissions||(this.router.navigateByUrl("not-authorized"),!1)}}return n.\u0275fac=function(e){return new(e||n)(t.LFG(Z),t.LFG(b),t.LFG(f.F0))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const qt=[{path:"authorize",component:E,canActivate:[Q]},{path:"grant",component:Pt,canActivate:[Q]},{path:"deny",component:It},{path:"not-authorized",component:Rt},{path:"error",component:Ut},{path:"**",redirectTo:"authorize"}];let Jt=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[[f.Bz.forRoot(qt)],f.Bz]}),n})();var Et=a(348);function Ft(n,s){if(1&n&&(t.TgZ(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5),t._UZ(4,"img",6),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(4),t.s9C("src",e.headerIcon,t.LSH)}}const Yt=function(n){return{popup:n}};let Nt=(()=>{class n{constructor(e){this.title="connected-applications",this.headerIcon="assets/whm-logo_white.svg",this.inPopup=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(w))},n.\u0275cmp=t.Xpm({type:n,selectors:[["whm-conn-apps-root"]],features:[t._Bn([E])],decls:3,vars:4,consts:[["id","content",3,"ngClass"],["class","header-section",4,"ngIf"],[1,"header-section"],[1,"row"],[1,"col-xs-12","col-sm-8","col-md-6","col-lg-4"],[1,"text-center"],["id","header-icon",3,"src"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Ft,5,1,"div",1),t._UZ(2,"router-outlet"),t.qZA()),2&e&&(t.Q6J("ngClass",t.VKq(2,Yt,i.inPopup)),t.xp6(1),t.Q6J("ngIf",i.inPopup))},directives:[h.mk,h.O5,f.lC],styles:[".popup[_ngcontent-%COMP%]{background-color:#293a4a;color:#fff;padding:50px 20px;height:100%}.popup[_ngcontent-%COMP%]   .header-section[_ngcontent-%COMP%]{margin-bottom:20px}.popup[_ngcontent-%COMP%]   .header-section[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{width:100%}.popup[_ngcontent-%COMP%]   #header-icon[_ngcontent-%COMP%]{max-height:50px}"]}),n})();class jt{constructor(s,e,i=[],o=[],u=[]){if(this._missingRequiredPermissions=i,this._missingOptionalPermissions=o,this._pseudoPermissions=u,""===s)throw new Error("The username parameter must not be an empty string.");if(""===s.trim())throw new Error("The username parameter must not be a string with containing only whitespace.");this.username=s,this.hasMinimumPermissions=e}get missingRequiredPermissions(){return this._missingRequiredPermissions.reduce((s,e)=>(s[e]=!0,s),{})}get missingOptionalPermissions(){return this._missingOptionalPermissions.reduce((s,e)=>(s[e]=!0,s),{})}get pseudoPermissions(){return new Set(this._pseudoPermissions)}}class St{constructor(s,e){this.payload=s,this.encodedJwt=e}get iss(){return this.payload.iss}get issDesc(){return this.payload.iss_desc}get sub(){return this.payload.sub}get name(){return this.payload.name}get email(){return this.payload.email}get scope(){return this.payload.scope}get ips(){return this.payload.ips}get callbackUrl(){return this.payload.callback_url}get challenge(){return this.payload.challenge}get exp(){return this.payload.exp}get redirectUrl(){return this.payload.redirect_url}get state(){return this.payload.state}toJson(){return JSON.stringify(this.payload)}}let Dt=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n,bootstrap:[Nt]}),n.\u0275inj=t.cJS({providers:[{provide:h.mr,useValue:window.PAGE.base},{provide:w,useValue:window.PAGE.inPopup},{provide:Z,useValue:window.PAGE.error},{provide:b,useValue:new jt(window.PAGE.username,window.PAGE.hasAccess,window.PAGE.missingRequiredAcls,window.PAGE.missingOptionalAcls,window.PAGE.pseudoAcls)},{provide:q,useValue:new St(window.PAGE.jwt,window.PAGE.encodedJwt)},I],imports:[[k.b2,h.ez,Jt,Et.m,Y.au,l.Sw]]}),n})();(0,t.G48)(),k.q6().bootstrapModule(Dt).catch(n=>console.error(n))}},x=>{x.O(0,[736],()=>x(x.s=5811)),x.O()}]);
Back to Directory File Manager