dash-button-web 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dash-button.cjs.entry.js +31 -5
- package/dist/cjs/dash-button.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-compnont.cjs.js +1 -1
- package/dist/collection/components/my-component/dash-button.css +127 -0
- package/dist/collection/components/my-component/dash-button.js +84 -4
- package/dist/collection/components/my-component/dash-button.js.map +1 -1
- package/dist/components/dash-button.js +35 -5
- package/dist/components/dash-button.js.map +1 -1
- package/dist/esm/dash-button.entry.js +31 -5
- package/dist/esm/dash-button.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-compnont.js +1 -1
- package/dist/types/components/my-component/dash-button.d.ts +5 -0
- package/dist/types/components.d.ts +6 -0
- package/dist/web-compnont/p-f072a157.entry.js +10 -0
- package/dist/web-compnont/p-f072a157.entry.js.map +1 -0
- package/dist/web-compnont/web-compnont.esm.js +1 -1
- package/dist/web-compnont/web-compnont.esm.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +8 -5
- package/dist/web-compnont/p-0816eafe.entry.js +0 -10
- package/dist/web-compnont/p-0816eafe.entry.js.map +0 -1
package/dist/esm/loader.js
CHANGED
|
@@ -3,7 +3,7 @@ export { s as setNonce } from './index-46149754.js';
|
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
|
-
return bootstrapLazy([["dash-button",[[1,"dash-button",{"showPostLoginText":[4,"show-post-login-text"],"silentCheckSso":[4,"silent-check-sso"],"redirectUri":[1,"redirect-uri"],"authMethod":[1,"auth-method"],"keycloakUri":[1,"keycloak-uri"],"realm":[1],"clientId":[1,"client-id"],"appId":[1,"app-id"],"portalUrl":[1,"portal-url"],"marketplaceUrl":[1,"marketplace-url"],"plmUrl":[1,"plm-url"],"usageTrackingUrl":[1,"usage-tracking-url"],"showUnauthorizedModal":[4,"show-unauthorized-modal"],"postTextDelayDuration":[2,"post-text-delay-duration"],"primaryColor":[1,"primary-color"],"accentColor":[1,"accent-color"],"keycloak":[32],"isAuth":[32],"givenUserName":[32],"silentCheckSsoRedirectUri":[32],"appList":[32],"showPostLoginLoadingSpinner":[32],"avatarSvg":[32]}]]]], options);
|
|
6
|
+
return bootstrapLazy([["dash-button",[[1,"dash-button",{"showPostLoginText":[4,"show-post-login-text"],"silentCheckSso":[4,"silent-check-sso"],"redirectUri":[1,"redirect-uri"],"authMethod":[1,"auth-method"],"keycloakUri":[1,"keycloak-uri"],"realm":[1],"clientId":[1,"client-id"],"appId":[1,"app-id"],"portalUrl":[1,"portal-url"],"marketplaceUrl":[1,"marketplace-url"],"plmUrl":[1,"plm-url"],"usageTrackingUrl":[1,"usage-tracking-url"],"showUnauthorizedModal":[4,"show-unauthorized-modal"],"postTextDelayDuration":[2,"post-text-delay-duration"],"primaryColor":[1,"primary-color"],"accentColor":[1,"accent-color"],"otherLinkType":[1,"other-link-type"],"applicationDisplayName":[1,"application-display-name"],"disableApplicationTab":[4,"disable-application-tab"],"keycloak":[32],"isAuth":[32],"givenUserName":[32],"silentCheckSsoRedirectUri":[32],"appList":[32],"menuLinkList":[32],"showPostLoginLoadingSpinner":[32],"avatarSvg":[32]}]]]], options);
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { defineCustomElements };
|
package/dist/esm/web-compnont.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["dash-button",[[1,"dash-button",{"showPostLoginText":[4,"show-post-login-text"],"silentCheckSso":[4,"silent-check-sso"],"redirectUri":[1,"redirect-uri"],"authMethod":[1,"auth-method"],"keycloakUri":[1,"keycloak-uri"],"realm":[1],"clientId":[1,"client-id"],"appId":[1,"app-id"],"portalUrl":[1,"portal-url"],"marketplaceUrl":[1,"marketplace-url"],"plmUrl":[1,"plm-url"],"usageTrackingUrl":[1,"usage-tracking-url"],"showUnauthorizedModal":[4,"show-unauthorized-modal"],"postTextDelayDuration":[2,"post-text-delay-duration"],"primaryColor":[1,"primary-color"],"accentColor":[1,"accent-color"],"keycloak":[32],"isAuth":[32],"givenUserName":[32],"silentCheckSsoRedirectUri":[32],"appList":[32],"showPostLoginLoadingSpinner":[32],"avatarSvg":[32]}]]]], options);
|
|
17
|
+
return bootstrapLazy([["dash-button",[[1,"dash-button",{"showPostLoginText":[4,"show-post-login-text"],"silentCheckSso":[4,"silent-check-sso"],"redirectUri":[1,"redirect-uri"],"authMethod":[1,"auth-method"],"keycloakUri":[1,"keycloak-uri"],"realm":[1],"clientId":[1,"client-id"],"appId":[1,"app-id"],"portalUrl":[1,"portal-url"],"marketplaceUrl":[1,"marketplace-url"],"plmUrl":[1,"plm-url"],"usageTrackingUrl":[1,"usage-tracking-url"],"showUnauthorizedModal":[4,"show-unauthorized-modal"],"postTextDelayDuration":[2,"post-text-delay-duration"],"primaryColor":[1,"primary-color"],"accentColor":[1,"accent-color"],"otherLinkType":[1,"other-link-type"],"applicationDisplayName":[1,"application-display-name"],"disableApplicationTab":[4,"disable-application-tab"],"keycloak":[32],"isAuth":[32],"givenUserName":[32],"silentCheckSsoRedirectUri":[32],"appList":[32],"menuLinkList":[32],"showPostLoginLoadingSpinner":[32],"avatarSvg":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
//# sourceMappingURL=web-compnont.js.map
|
|
@@ -16,16 +16,21 @@ export declare class DashButtonComponent {
|
|
|
16
16
|
postTextDelayDuration: number;
|
|
17
17
|
primaryColor: string;
|
|
18
18
|
accentColor: string;
|
|
19
|
+
otherLinkType: string;
|
|
20
|
+
applicationDisplayName: string;
|
|
21
|
+
disableApplicationTab: boolean;
|
|
19
22
|
keycloak: any;
|
|
20
23
|
isAuth: boolean;
|
|
21
24
|
givenUserName: string;
|
|
22
25
|
silentCheckSsoRedirectUri: string;
|
|
23
26
|
appList: any[];
|
|
27
|
+
menuLinkList: any[];
|
|
24
28
|
showPostLoginLoadingSpinner: boolean;
|
|
25
29
|
avatarSvg: string;
|
|
26
30
|
componentWillLoad(): void;
|
|
27
31
|
initKeycloak(): Promise<void>;
|
|
28
32
|
getAppList(token: any): Promise<any>;
|
|
33
|
+
getOtherMenuLinks(token: any): Promise<any>;
|
|
29
34
|
login(): void;
|
|
30
35
|
logout(): void;
|
|
31
36
|
showModal(): void;
|
|
@@ -9,10 +9,13 @@ export namespace Components {
|
|
|
9
9
|
interface DashButton {
|
|
10
10
|
"accentColor": string;
|
|
11
11
|
"appId": string;
|
|
12
|
+
"applicationDisplayName": string;
|
|
12
13
|
"authMethod": string;
|
|
13
14
|
"clientId": string;
|
|
15
|
+
"disableApplicationTab": boolean;
|
|
14
16
|
"keycloakUri": string;
|
|
15
17
|
"marketplaceUrl": string;
|
|
18
|
+
"otherLinkType": string;
|
|
16
19
|
"plmUrl": string;
|
|
17
20
|
"portalUrl": string;
|
|
18
21
|
"postTextDelayDuration": number;
|
|
@@ -40,10 +43,13 @@ declare namespace LocalJSX {
|
|
|
40
43
|
interface DashButton {
|
|
41
44
|
"accentColor"?: string;
|
|
42
45
|
"appId"?: string;
|
|
46
|
+
"applicationDisplayName"?: string;
|
|
43
47
|
"authMethod"?: string;
|
|
44
48
|
"clientId"?: string;
|
|
49
|
+
"disableApplicationTab"?: boolean;
|
|
45
50
|
"keycloakUri"?: string;
|
|
46
51
|
"marketplaceUrl"?: string;
|
|
52
|
+
"otherLinkType"?: string;
|
|
47
53
|
"plmUrl"?: string;
|
|
48
54
|
"portalUrl"?: string;
|
|
49
55
|
"postTextDelayDuration"?: number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{r as t,h as e,g as i}from"./p-db53c3e9.js";var n=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function r(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:true});Object.keys(t).forEach((function(i){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:true,get:function(){return t[i]}})}));return e}var o={};o.byteLength=h;o.toByteArray=v;o.fromByteArray=w;var a=[];var s=[];var c=typeof Uint8Array!=="undefined"?Uint8Array:Array;var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var l=0,u=f.length;l<u;++l){a[l]=f[l];s[f.charCodeAt(l)]=l}s["-".charCodeAt(0)]=62;s["_".charCodeAt(0)]=63;function d(t){var e=t.length;if(e%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}var i=t.indexOf("=");if(i===-1)i=e;var n=i===e?0:4-i%4;return[i,n]}function h(t){var e=d(t);var i=e[0];var n=e[1];return(i+n)*3/4-n}function p(t,e,i){return(e+i)*3/4-i}function v(t){var e;var i=d(t);var n=i[0];var r=i[1];var o=new c(p(t,n,r));var a=0;var f=r>0?n-4:n;var l;for(l=0;l<f;l+=4){e=s[t.charCodeAt(l)]<<18|s[t.charCodeAt(l+1)]<<12|s[t.charCodeAt(l+2)]<<6|s[t.charCodeAt(l+3)];o[a++]=e>>16&255;o[a++]=e>>8&255;o[a++]=e&255}if(r===2){e=s[t.charCodeAt(l)]<<2|s[t.charCodeAt(l+1)]>>4;o[a++]=e&255}if(r===1){e=s[t.charCodeAt(l)]<<10|s[t.charCodeAt(l+1)]<<4|s[t.charCodeAt(l+2)]>>2;o[a++]=e>>8&255;o[a++]=e&255}return o}function g(t){return a[t>>18&63]+a[t>>12&63]+a[t>>6&63]+a[t&63]}function b(t,e,i){var n;var r=[];for(var o=e;o<i;o+=3){n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255);r.push(g(n))}return r.join("")}function w(t){var e;var i=t.length;var n=i%3;var r=[];var o=16383;for(var s=0,c=i-n;s<c;s+=o){r.push(b(t,s,s+o>c?c:s+o))}if(n===1){e=t[i-1];r.push(a[e>>2]+a[e<<4&63]+"==")}else if(n===2){e=(t[i-2]<<8)+t[i-1];r.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"=")}return r.join("")}var m={exports:{}};const x={};const k=Object.freeze({__proto__:null,default:x});const y=r(k);
|
|
2
|
+
/**
|
|
3
|
+
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
|
4
|
+
*
|
|
5
|
+
* @version 0.10.1
|
|
6
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
7
|
+
* @copyright Chen, Yi-Cyuan 2014-2023
|
|
8
|
+
* @license MIT
|
|
9
|
+
*/(function(t){(function(){var e="input is invalid type";var i=typeof window==="object";var r=i?window:{};if(r.JS_SHA256_NO_WINDOW){i=false}var o=!i&&typeof self==="object";var a=!r.JS_SHA256_NO_NODE_JS&&typeof process==="object"&&process.versions&&process.versions.node;if(a){r=n}else if(o){r=self}var s=!r.JS_SHA256_NO_COMMON_JS&&"object"==="object"&&t.exports;var c=!r.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer!=="undefined";var f="0123456789abcdef".split("");var l=[-2147483648,8388608,32768,128];var u=[24,16,8,0];var d=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];var h=["hex","array","digest","arrayBuffer"];var p=[];if(r.JS_SHA256_NO_NODE_JS||!Array.isArray){Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"}}if(c&&(r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)){ArrayBuffer.isView=function(t){return typeof t==="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer}}var v=function(t,e){return function(i){return new x(e,true).update(i)[t]()}};var g=function(t){var e=v("hex",t);if(a){e=b(e,t)}e.create=function(){return new x(t)};e.update=function(t){return e.create().update(t)};for(var i=0;i<h.length;++i){var n=h[i];e[n]=v(n,t)}return e};var b=function(t,i){var n=y;var o=y.Buffer;var a=i?"sha224":"sha256";var s;if(o.from&&!r.JS_SHA256_NO_BUFFER_FROM){s=o.from}else{s=function(t){return new o(t)}}var c=function(i){if(typeof i==="string"){return n.createHash(a).update(i,"utf8").digest("hex")}else{if(i===null||i===undefined){throw new Error(e)}else if(i.constructor===ArrayBuffer){i=new Uint8Array(i)}}if(Array.isArray(i)||ArrayBuffer.isView(i)||i.constructor===o){return n.createHash(a).update(s(i)).digest("hex")}else{return t(i)}};return c};var w=function(t,e){return function(i,n){return new k(i,e,true).update(n)[t]()}};var m=function(t){var e=w("hex",t);e.create=function(e){return new k(e,t)};e.update=function(t,i){return e.create(t).update(i)};for(var i=0;i<h.length;++i){var n=h[i];e[n]=w(n,t)}return e};function x(t,e){if(e){p[0]=p[16]=p[1]=p[2]=p[3]=p[4]=p[5]=p[6]=p[7]=p[8]=p[9]=p[10]=p[11]=p[12]=p[13]=p[14]=p[15]=0;this.blocks=p}else{this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}if(t){this.h0=3238371032;this.h1=914150663;this.h2=812702999;this.h3=4144912697;this.h4=4290775857;this.h5=1750603025;this.h6=1694076839;this.h7=3204075428}else{this.h0=1779033703;this.h1=3144134277;this.h2=1013904242;this.h3=2773480762;this.h4=1359893119;this.h5=2600822924;this.h6=528734635;this.h7=1541459225}this.block=this.start=this.bytes=this.hBytes=0;this.finalized=this.hashed=false;this.first=true;this.is224=t}x.prototype.update=function(t){if(this.finalized){return}var i,n=typeof t;if(n!=="string"){if(n==="object"){if(t===null){throw new Error(e)}else if(c&&t.constructor===ArrayBuffer){t=new Uint8Array(t)}else if(!Array.isArray(t)){if(!c||!ArrayBuffer.isView(t)){throw new Error(e)}}}else{throw new Error(e)}i=true}var r,o=0,a,s=t.length,f=this.blocks;while(o<s){if(this.hashed){this.hashed=false;f[0]=this.block;f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0}if(i){for(a=this.start;o<s&&a<64;++o){f[a>>2]|=t[o]<<u[a++&3]}}else{for(a=this.start;o<s&&a<64;++o){r=t.charCodeAt(o);if(r<128){f[a>>2]|=r<<u[a++&3]}else if(r<2048){f[a>>2]|=(192|r>>6)<<u[a++&3];f[a>>2]|=(128|r&63)<<u[a++&3]}else if(r<55296||r>=57344){f[a>>2]|=(224|r>>12)<<u[a++&3];f[a>>2]|=(128|r>>6&63)<<u[a++&3];f[a>>2]|=(128|r&63)<<u[a++&3]}else{r=65536+((r&1023)<<10|t.charCodeAt(++o)&1023);f[a>>2]|=(240|r>>18)<<u[a++&3];f[a>>2]|=(128|r>>12&63)<<u[a++&3];f[a>>2]|=(128|r>>6&63)<<u[a++&3];f[a>>2]|=(128|r&63)<<u[a++&3]}}}this.lastByteIndex=a;this.bytes+=a-this.start;if(a>=64){this.block=f[16];this.start=a-64;this.hash();this.hashed=true}else{this.start=a}}if(this.bytes>4294967295){this.hBytes+=this.bytes/4294967296<<0;this.bytes=this.bytes%4294967296}return this};x.prototype.finalize=function(){if(this.finalized){return}this.finalized=true;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block;t[e>>2]|=l[e&3];this.block=t[16];if(e>=56){if(!this.hashed){this.hash()}t[0]=this.block;t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0}t[14]=this.hBytes<<3|this.bytes>>>29;t[15]=this.bytes<<3;this.hash()};x.prototype.hash=function(){var t=this.h0,e=this.h1,i=this.h2,n=this.h3,r=this.h4,o=this.h5,a=this.h6,s=this.h7,c=this.blocks,f,l,u,h,p,v,g,b,w,m,x;for(f=16;f<64;++f){p=c[f-15];l=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;p=c[f-2];u=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;c[f]=c[f-16]+l+c[f-7]+u<<0}x=e&i;for(f=0;f<64;f+=4){if(this.first){if(this.is224){b=300032;p=c[0]-1413257819;s=p-150054599<<0;n=p+24177077<<0}else{b=704751109;p=c[0]-210244248;s=p-1521486534<<0;n=p+143694565<<0}this.first=false}else{l=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10);u=(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7);b=t&e;h=b^t&i^x;g=r&o^~r&a;p=s+u+g+d[f]+c[f];v=l+h;s=n+p<<0;n=p+v<<0}l=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10);u=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7);w=n&t;h=w^n&e^b;g=s&r^~s&o;p=a+u+g+d[f+1]+c[f+1];v=l+h;a=i+p<<0;i=p+v<<0;l=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10);u=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7);m=i&n;h=m^i&t^w;g=a&s^~a&r;p=o+u+g+d[f+2]+c[f+2];v=l+h;o=e+p<<0;e=p+v<<0;l=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10);u=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7);x=e&i;h=x^e&n^m;g=o&a^~o&s;p=r+u+g+d[f+3]+c[f+3];v=l+h;r=t+p<<0;t=p+v<<0;this.chromeBugWorkAround=true}this.h0=this.h0+t<<0;this.h1=this.h1+e<<0;this.h2=this.h2+i<<0;this.h3=this.h3+n<<0;this.h4=this.h4+r<<0;this.h5=this.h5+o<<0;this.h6=this.h6+a<<0;this.h7=this.h7+s<<0};x.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,i=this.h2,n=this.h3,r=this.h4,o=this.h5,a=this.h6,s=this.h7;var c=f[t>>28&15]+f[t>>24&15]+f[t>>20&15]+f[t>>16&15]+f[t>>12&15]+f[t>>8&15]+f[t>>4&15]+f[t&15]+f[e>>28&15]+f[e>>24&15]+f[e>>20&15]+f[e>>16&15]+f[e>>12&15]+f[e>>8&15]+f[e>>4&15]+f[e&15]+f[i>>28&15]+f[i>>24&15]+f[i>>20&15]+f[i>>16&15]+f[i>>12&15]+f[i>>8&15]+f[i>>4&15]+f[i&15]+f[n>>28&15]+f[n>>24&15]+f[n>>20&15]+f[n>>16&15]+f[n>>12&15]+f[n>>8&15]+f[n>>4&15]+f[n&15]+f[r>>28&15]+f[r>>24&15]+f[r>>20&15]+f[r>>16&15]+f[r>>12&15]+f[r>>8&15]+f[r>>4&15]+f[r&15]+f[o>>28&15]+f[o>>24&15]+f[o>>20&15]+f[o>>16&15]+f[o>>12&15]+f[o>>8&15]+f[o>>4&15]+f[o&15]+f[a>>28&15]+f[a>>24&15]+f[a>>20&15]+f[a>>16&15]+f[a>>12&15]+f[a>>8&15]+f[a>>4&15]+f[a&15];if(!this.is224){c+=f[s>>28&15]+f[s>>24&15]+f[s>>20&15]+f[s>>16&15]+f[s>>12&15]+f[s>>8&15]+f[s>>4&15]+f[s&15]}return c};x.prototype.toString=x.prototype.hex;x.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,i=this.h2,n=this.h3,r=this.h4,o=this.h5,a=this.h6,s=this.h7;var c=[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,i>>24&255,i>>16&255,i>>8&255,i&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,o>>24&255,o>>16&255,o>>8&255,o&255,a>>24&255,a>>16&255,a>>8&255,a&255];if(!this.is224){c.push(s>>24&255,s>>16&255,s>>8&255,s&255)}return c};x.prototype.array=x.prototype.digest;x.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32);var e=new DataView(t);e.setUint32(0,this.h0);e.setUint32(4,this.h1);e.setUint32(8,this.h2);e.setUint32(12,this.h3);e.setUint32(16,this.h4);e.setUint32(20,this.h5);e.setUint32(24,this.h6);if(!this.is224){e.setUint32(28,this.h7)}return t};function k(t,i,n){var r,o=typeof t;if(o==="string"){var a=[],s=t.length,f=0,l;for(r=0;r<s;++r){l=t.charCodeAt(r);if(l<128){a[f++]=l}else if(l<2048){a[f++]=192|l>>6;a[f++]=128|l&63}else if(l<55296||l>=57344){a[f++]=224|l>>12;a[f++]=128|l>>6&63;a[f++]=128|l&63}else{l=65536+((l&1023)<<10|t.charCodeAt(++r)&1023);a[f++]=240|l>>18;a[f++]=128|l>>12&63;a[f++]=128|l>>6&63;a[f++]=128|l&63}}t=a}else{if(o==="object"){if(t===null){throw new Error(e)}else if(c&&t.constructor===ArrayBuffer){t=new Uint8Array(t)}else if(!Array.isArray(t)){if(!c||!ArrayBuffer.isView(t)){throw new Error(e)}}}else{throw new Error(e)}}if(t.length>64){t=new x(i,true).update(t).array()}var u=[],d=[];for(r=0;r<64;++r){var h=t[r]||0;u[r]=92^h;d[r]=54^h}x.call(this,i,n);this.update(d);this.oKeyPad=u;this.inner=true;this.sharedMemory=n}k.prototype=new x;k.prototype.finalize=function(){x.prototype.finalize.call(this);if(this.inner){this.inner=false;var t=this.array();x.call(this,this.is224,this.sharedMemory);this.update(this.oKeyPad);this.update(t);x.prototype.finalize.call(this)}};var A=g();A.sha256=A;A.sha224=g(true);A.sha256.hmac=m();A.sha224.hmac=m(true);if(s){t.exports=A}else{r.sha256=A.sha256;r.sha224=A.sha224}})()})(m);const A=m.exports;class C extends Error{}C.prototype.name="InvalidTokenError";function O(t){return decodeURIComponent(atob(t).replace(/(.)/g,((t,e)=>{let i=e.charCodeAt(0).toString(16).toUpperCase();if(i.length<2){i="0"+i}return"%"+i})))}function I(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return O(e)}catch(t){return atob(e)}}function S(t,e){if(typeof t!=="string"){throw new C("Invalid token specified: must be a string")}e||(e={});const i=e.header===true?0:1;const n=t.split(".")[i];if(typeof n!=="string"){throw new C(`Invalid token specified: missing part #${i+1}`)}let r;try{r=I(n)}catch(t){throw new C(`Invalid token specified: invalid base64 for part #${i+1} (${t.message})`)}try{return JSON.parse(r)}catch(t){throw new C(`Invalid token specified: invalid json for part #${i+1} (${t.message})`)}}if(typeof Promise==="undefined"){throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.")}function j(t){if(!(this instanceof j)){throw new Error("The 'Keycloak' constructor must be invoked with 'new'.")}var e=this;var i;var n=[];var r;var a={enable:true,callbackList:[],interval:5};var s=document.getElementsByTagName("script");for(var c=0;c<s.length;c++){if((s[c].src.indexOf("keycloak.js")!==-1||s[c].src.indexOf("keycloak.min.js")!==-1)&&s[c].src.indexOf("version=")!==-1){e.iframeVersion=s[c].src.substring(s[c].src.indexOf("version=")+8).split("&")[0]}}var f=true;var l=J(console.info);var u=J(console.warn);e.init=function(t){if(e.didInitialize){throw new Error("A 'Keycloak' instance can only be initialized once.")}e.didInitialize=true;e.authenticated=false;r=Y();var n=["default","cordova","cordova-native"];if(t&&n.indexOf(t.adapter)>-1){i=E(t.adapter)}else if(t&&typeof t.adapter==="object"){i=t.adapter}else{if(window.Cordova||window.cordova){i=E("cordova")}else{i=E()}}if(t){if(typeof t.useNonce!=="undefined"){f=t.useNonce}if(typeof t.checkLoginIframe!=="undefined"){a.enable=t.checkLoginIframe}if(t.checkLoginIframeInterval){a.interval=t.checkLoginIframeInterval}if(t.onLoad==="login-required"){e.loginRequired=true}if(t.responseMode){if(t.responseMode==="query"||t.responseMode==="fragment"){e.responseMode=t.responseMode}else{throw"Invalid value for responseMode"}}if(t.flow){switch(t.flow){case"standard":e.responseType="code";break;case"implicit":e.responseType="id_token token";break;case"hybrid":e.responseType="code id_token token";break;default:throw"Invalid value for flow"}e.flow=t.flow}if(t.timeSkew!=null){e.timeSkew=t.timeSkew}if(t.redirectUri){e.redirectUri=t.redirectUri}if(t.silentCheckSsoRedirectUri){e.silentCheckSsoRedirectUri=t.silentCheckSsoRedirectUri}if(typeof t.silentCheckSsoFallback==="boolean"){e.silentCheckSsoFallback=t.silentCheckSsoFallback}else{e.silentCheckSsoFallback=true}if(t.pkceMethod){if(t.pkceMethod!=="S256"){throw"Invalid value for pkceMethod"}e.pkceMethod=t.pkceMethod}if(typeof t.enableLogging==="boolean"){e.enableLogging=t.enableLogging}else{e.enableLogging=false}if(typeof t.scope==="string"){e.scope=t.scope}if(typeof t.acrValues==="string"){e.acrValues=t.acrValues}if(typeof t.messageReceiveTimeout==="number"&&t.messageReceiveTimeout>0){e.messageReceiveTimeout=t.messageReceiveTimeout}else{e.messageReceiveTimeout=1e4}}if(!e.responseMode){e.responseMode="fragment"}if(!e.responseType){e.responseType="code";e.flow="standard"}var o=_();var s=_();s.promise.then((function(){e.onReady&&e.onReady(e.authenticated);o.setSuccess(e.authenticated)})).catch((function(t){o.setError(t)}));var c=x();function l(){var i=function(i){if(!i){r.prompt="none"}if(t&&t.locale){r.locale=t.locale}e.login(r).then((function(){s.setSuccess()})).catch((function(t){s.setError(t)}))};var n=function(){var t=document.createElement("iframe");var i=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});t.setAttribute("src",i);t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin");t.setAttribute("title","keycloak-silent-check-sso");t.style.display="none";document.body.appendChild(t);var n=function(e){if(e.origin!==window.location.origin||t.contentWindow!==e.source){return}var i=O(e.data);m(i,s);document.body.removeChild(t);window.removeEventListener("message",n)};window.addEventListener("message",n)};var r={};switch(t.onLoad){case"check-sso":if(a.enable){N().then((function(){M().then((function(t){if(!t){e.silentCheckSsoRedirectUri?n():i(false)}else{s.setSuccess()}})).catch((function(t){s.setError(t)}))}))}else{e.silentCheckSsoRedirectUri?n():i(false)}break;case"login-required":i(true);break;default:throw"Invalid value for onLoad"}}function u(){var i=O(window.location.href);if(i){window.history.replaceState(window.history.state,null,i.newUrl)}if(i&&i.valid){return N().then((function(){m(i,s)})).catch((function(t){s.setError(t)}))}else if(t){if(t.token&&t.refreshToken){y(t.token,t.refreshToken,t.idToken);if(a.enable){N().then((function(){M().then((function(t){if(t){e.onAuthSuccess&&e.onAuthSuccess();s.setSuccess();L()}else{s.setSuccess()}})).catch((function(t){s.setError(t)}))}))}else{e.updateToken(-1).then((function(){e.onAuthSuccess&&e.onAuthSuccess();s.setSuccess()})).catch((function(i){e.onAuthError&&e.onAuthError();if(t.onLoad){l()}else{s.setError(i)}}))}}else if(t.onLoad){l()}else{s.setSuccess()}}else{s.setSuccess()}}function d(){var t=_();var e=function(){if(document.readyState==="interactive"||document.readyState==="complete"){document.removeEventListener("readystatechange",e);t.setSuccess()}};document.addEventListener("readystatechange",e);e();return t.promise}c.then((function(){d().then(U).then(u).catch((function(t){o.setError(t)}))}));c.catch((function(t){o.setError(t)}));return o.promise};e.login=function(t){return i.login(t)};function d(t){var e=null;var i=window.crypto||window.msCrypto;if(i&&i.getRandomValues&&window.Uint8Array){e=new Uint8Array(t);i.getRandomValues(e);return e}e=new Array(t);for(var n=0;n<e.length;n++){e[n]=Math.floor(256*Math.random())}return e}function h(t){return p(t,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function p(t,e){var i=d(t);var n=new Array(t);for(var r=0;r<t;r++){n[r]=e.charCodeAt(i[r]%e.length)}return String.fromCharCode.apply(null,n)}function v(t,e){switch(t){case"S256":var i=new Uint8Array(A.arrayBuffer(e));var n=o.fromByteArray(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return n;default:throw"Invalid value for pkceMethod"}}function g(t){var e={id_token:{acr:t}};return JSON.stringify(e)}e.createLoginUrl=function(t){var n=C();var o=C();var a=i.redirectUri(t);var s={state:n,nonce:o,redirectUri:encodeURIComponent(a)};if(t&&t.prompt){s.prompt=t.prompt}var c;if(t&&t.action=="register"){c=e.endpoints.register()}else{c=e.endpoints.authorize()}var l=t&&t.scope||e.scope;if(!l){l="openid"}else if(l.indexOf("openid")===-1){l="openid "+l}var u=c+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(a)+"&state="+encodeURIComponent(n)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(l);if(f){u=u+"&nonce="+encodeURIComponent(o)}if(t&&t.prompt){u+="&prompt="+encodeURIComponent(t.prompt)}if(t&&t.maxAge){u+="&max_age="+encodeURIComponent(t.maxAge)}if(t&&t.loginHint){u+="&login_hint="+encodeURIComponent(t.loginHint)}if(t&&t.idpHint){u+="&kc_idp_hint="+encodeURIComponent(t.idpHint)}if(t&&t.action&&t.action!="register"){u+="&kc_action="+encodeURIComponent(t.action)}if(t&&t.locale){u+="&ui_locales="+encodeURIComponent(t.locale)}if(t&&t.acr){var d=g(t.acr);u+="&claims="+encodeURIComponent(d)}if(t&&t.acrValues||e.acrValues){u+="&acr_values="+encodeURIComponent(t.acrValues||e.acrValues)}if(e.pkceMethod){var p=h(96);s.pkceCodeVerifier=p;var b=v(e.pkceMethod,p);u+="&code_challenge="+b;u+="&code_challenge_method="+e.pkceMethod}r.add(s);return u};e.logout=function(t){return i.logout(t)};e.createLogoutUrl=function(t){var n=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(i.redirectUri(t,false));if(e.idToken){n+="&id_token_hint="+encodeURIComponent(e.idToken)}return n};e.register=function(t){return i.register(t)};e.createRegisterUrl=function(t){if(!t){t={}}t.action="register";return e.createLoginUrl(t)};e.createAccountUrl=function(t){var n=b();var r=undefined;if(typeof n!=="undefined"){r=n+"/account"+"?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(i.redirectUri(t))}return r};e.accountManagement=function(){return i.accountManagement()};e.hasRealmRole=function(t){var i=e.realmAccess;return!!i&&i.roles.indexOf(t)>=0};e.hasResourceRole=function(t,i){if(!e.resourceAccess){return false}var n=e.resourceAccess[i||e.clientId];return!!n&&n.roles.indexOf(t)>=0};e.loadUserProfile=function(){var t=b()+"/account";var i=new XMLHttpRequest;i.open("GET",t,true);i.setRequestHeader("Accept","application/json");i.setRequestHeader("Authorization","bearer "+e.token);var n=_();i.onreadystatechange=function(){if(i.readyState==4){if(i.status==200){e.profile=JSON.parse(i.responseText);n.setSuccess(e.profile)}else{n.setError()}}};i.send();return n.promise};e.loadUserInfo=function(){var t=e.endpoints.userinfo();var i=new XMLHttpRequest;i.open("GET",t,true);i.setRequestHeader("Accept","application/json");i.setRequestHeader("Authorization","bearer "+e.token);var n=_();i.onreadystatechange=function(){if(i.readyState==4){if(i.status==200){e.userInfo=JSON.parse(i.responseText);n.setSuccess(e.userInfo)}else{n.setError()}}};i.send();return n.promise};e.isTokenExpired=function(t){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit"){throw"Not authenticated"}if(e.timeSkew==null){l("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set");return true}var i=e.tokenParsed["exp"]-Math.ceil((new Date).getTime()/1e3)+e.timeSkew;if(t){if(isNaN(t)){throw"Invalid minValidity"}i-=t}return i<0};e.updateToken=function(t){var i=_();if(!e.refreshToken){i.setError();return i.promise}t=t||5;var r=function(){var r=false;if(t==-1){r=true;l("[KEYCLOAK] Refreshing token: forced refresh")}else if(!e.tokenParsed||e.isTokenExpired(t)){r=true;l("[KEYCLOAK] Refreshing token: token expired")}if(!r){i.setSuccess(false)}else{var o="grant_type=refresh_token&"+"refresh_token="+e.refreshToken;var a=e.endpoints.token();n.push(i);if(n.length==1){var s=new XMLHttpRequest;s.open("POST",a,true);s.setRequestHeader("Content-type","application/x-www-form-urlencoded");s.withCredentials=true;o+="&client_id="+encodeURIComponent(e.clientId);var c=(new Date).getTime();s.onreadystatechange=function(){if(s.readyState==4){if(s.status==200){l("[KEYCLOAK] Token refreshed");c=(c+(new Date).getTime())/2;var t=JSON.parse(s.responseText);y(t["access_token"],t["refresh_token"],t["id_token"],c);e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var i=n.pop();i!=null;i=n.pop()){i.setSuccess(true)}}else{u("[KEYCLOAK] Failed to refresh token");if(s.status==400){e.clearToken()}e.onAuthRefreshError&&e.onAuthRefreshError();for(var i=n.pop();i!=null;i=n.pop()){i.setError(true)}}}};s.send(o)}}};if(a.enable){var o=M();o.then((function(){r()})).catch((function(t){i.setError(t)}))}else{r()}return i.promise};e.clearToken=function(){if(e.token){y(null,null,null);e.onAuthLogout&&e.onAuthLogout();if(e.loginRequired){e.login()}}};function b(){if(typeof e.authServerUrl!=="undefined"){if(e.authServerUrl.charAt(e.authServerUrl.length-1)=="/"){return e.authServerUrl+"realms/"+encodeURIComponent(e.realm)}else{return e.authServerUrl+"/realms/"+encodeURIComponent(e.realm)}}else{return undefined}}function w(){if(!window.location.origin){return window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}else{return window.location.origin}}function m(t,i){var n=t.code;var r=t.error;var o=t.prompt;var a=(new Date).getTime();if(t["kc_action_status"]){e.onActionUpdate&&e.onActionUpdate(t["kc_action_status"])}if(r){if(o!="none"){var s={error:r,error_description:t.error_description};e.onAuthError&&e.onAuthError(s);i&&i.setError(s)}else{i&&i.setSuccess()}return}else if(e.flow!="standard"&&(t.access_token||t.id_token)){h(t.access_token,null,t.id_token,true)}if(e.flow!="implicit"&&n){var c="code="+n+"&grant_type=authorization_code";var u=e.endpoints.token();var d=new XMLHttpRequest;d.open("POST",u,true);d.setRequestHeader("Content-type","application/x-www-form-urlencoded");c+="&client_id="+encodeURIComponent(e.clientId);c+="&redirect_uri="+t.redirectUri;if(t.pkceCodeVerifier){c+="&code_verifier="+t.pkceCodeVerifier}d.withCredentials=true;d.onreadystatechange=function(){if(d.readyState==4){if(d.status==200){var t=JSON.parse(d.responseText);h(t["access_token"],t["refresh_token"],t["id_token"],e.flow==="standard");L()}else{e.onAuthError&&e.onAuthError();i&&i.setError()}}};d.send(c)}function h(n,r,o,s){a=(a+(new Date).getTime())/2;y(n,r,o,a);if(f&&(e.tokenParsed&&e.tokenParsed.nonce!=t.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=t.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=t.storedNonce)){l("[KEYCLOAK] Invalid nonce, clearing token");e.clearToken();i&&i.setError()}else{if(s){e.onAuthSuccess&&e.onAuthSuccess();i&&i.setSuccess()}}}}function x(i){var n=_();var r;if(!t){r="keycloak.json"}else if(typeof t==="string"){r=t}function o(t){if(!t){e.endpoints={authorize:function(){return b()+"/protocol/openid-connect/auth"},token:function(){return b()+"/protocol/openid-connect/token"},logout:function(){return b()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var t=b()+"/protocol/openid-connect/login-status-iframe.html";if(e.iframeVersion){t=t+"?version="+e.iframeVersion}return t},thirdPartyCookiesIframe:function(){var t=b()+"/protocol/openid-connect/3p-cookies/step1.html";if(e.iframeVersion){t=t+"?version="+e.iframeVersion}return t},register:function(){return b()+"/protocol/openid-connect/registrations"},userinfo:function(){return b()+"/protocol/openid-connect/userinfo"}}}else{e.endpoints={authorize:function(){return t.authorization_endpoint},token:function(){return t.token_endpoint},logout:function(){if(!t.end_session_endpoint){throw"Not supported by the OIDC server"}return t.end_session_endpoint},checkSessionIframe:function(){if(!t.check_session_iframe){throw"Not supported by the OIDC server"}return t.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!t.userinfo_endpoint){throw"Not supported by the OIDC server"}return t.userinfo_endpoint}}}}if(r){var a=new XMLHttpRequest;a.open("GET",r,true);a.setRequestHeader("Accept","application/json");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200||k(a)){var t=JSON.parse(a.responseText);e.authServerUrl=t["auth-server-url"];e.realm=t["realm"];e.clientId=t["resource"];o(null);n.setSuccess()}else{n.setError()}}};a.send()}else{if(!t.clientId){throw"clientId missing"}e.clientId=t.clientId;var s=t["oidcProvider"];if(!s){if(!t["url"]){var c=document.getElementsByTagName("script");for(var f=0;f<c.length;f++){if(c[f].src.match(/.*keycloak\.js/)){t.url=c[f].src.substr(0,c[f].src.indexOf("/js/keycloak.js"));break}}}if(!t.realm){throw"realm missing"}e.authServerUrl=t.url;e.realm=t.realm;o(null);n.setSuccess()}else{if(typeof s==="string"){var l;if(s.charAt(s.length-1)=="/"){l=s+".well-known/openid-configuration"}else{l=s+"/.well-known/openid-configuration"}var a=new XMLHttpRequest;a.open("GET",l,true);a.setRequestHeader("Accept","application/json");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200||k(a)){var t=JSON.parse(a.responseText);o(t);n.setSuccess()}else{n.setError()}}};a.send()}else{o(s);n.setSuccess()}}}return n.promise}function k(t){return t.status==0&&t.responseText&&t.responseURL.startsWith("file:")}function y(t,i,n,r){if(e.tokenTimeoutHandle){clearTimeout(e.tokenTimeoutHandle);e.tokenTimeoutHandle=null}if(i){e.refreshToken=i;e.refreshTokenParsed=S(i)}else{delete e.refreshToken;delete e.refreshTokenParsed}if(n){e.idToken=n;e.idTokenParsed=S(n)}else{delete e.idToken;delete e.idTokenParsed}if(t){e.token=t;e.tokenParsed=S(t);e.sessionId=e.tokenParsed.session_state;e.authenticated=true;e.subject=e.tokenParsed.sub;e.realmAccess=e.tokenParsed.realm_access;e.resourceAccess=e.tokenParsed.resource_access;if(r){e.timeSkew=Math.floor(r/1e3)-e.tokenParsed.iat}if(e.timeSkew!=null){l("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds");if(e.onTokenExpired){var o=(e.tokenParsed["exp"]-(new Date).getTime()/1e3+e.timeSkew)*1e3;l("[KEYCLOAK] Token expires in "+Math.round(o/1e3)+" s");if(o<=0){e.onTokenExpired()}else{e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,o)}}}}else{delete e.token;delete e.tokenParsed;delete e.subject;delete e.realmAccess;delete e.resourceAccess;e.authenticated=false}}function C(){var t="0123456789abcdef";var e=p(36,t).split("");e[14]="4";e[19]=t.substr(e[19]&3|8,1);e[8]=e[13]=e[18]=e[23]="-";var i=e.join("");return i}function O(t){var e=I(t);if(!e){return}var i=r.get(e.state);if(i){e.valid=true;e.redirectUri=i.redirectUri;e.storedNonce=i.nonce;e.prompt=i.prompt;e.pkceCodeVerifier=i.pkceCodeVerifier}return e}function I(t){var i;switch(e.flow){case"standard":i=["code","state","session_state","kc_action_status","iss"];break;case"implicit":i=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":i=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"];break}i.push("error");i.push("error_description");i.push("error_uri");var n=t.indexOf("?");var r=t.indexOf("#");var o;var a;if(e.responseMode==="query"&&n!==-1){o=t.substring(0,n);a=z(t.substring(n+1,r!==-1?r:t.length),i);if(a.paramsString!==""){o+="?"+a.paramsString}if(r!==-1){o+=t.substring(r)}}else if(e.responseMode==="fragment"&&r!==-1){o=t.substring(0,r);a=z(t.substring(r+1),i);if(a.paramsString!==""){o+="#"+a.paramsString}}if(a&&a.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((a.oauthParams.code||a.oauthParams.error)&&a.oauthParams.state){a.oauthParams.newUrl=o;return a.oauthParams}}else if(e.flow==="implicit"){if((a.oauthParams.access_token||a.oauthParams.error)&&a.oauthParams.state){a.oauthParams.newUrl=o;return a.oauthParams}}}}function z(t,e){var i=t.split("&");var n={paramsString:"",oauthParams:{}};for(var r=0;r<i.length;r++){var o=i[r].indexOf("=");var a=i[r].slice(0,o);if(e.indexOf(a)!==-1){n.oauthParams[a]=i[r].slice(o+1)}else{if(n.paramsString!==""){n.paramsString+="&"}n.paramsString+=i[r]}}return n}function _(){var t={setSuccess:function(e){t.resolve(e)},setError:function(e){t.reject(e)}};t.promise=new Promise((function(e,i){t.resolve=e;t.reject=i}));return t}function R(t,e,i){var n=null;var r=new Promise((function(t,r){n=setTimeout((function(){r({error:i||"Promise is not settled within timeout of "+e+"ms"})}),e)}));return Promise.race([t,r]).finally((function(){clearTimeout(n)}))}function N(){var t=_();if(!a.enable){t.setSuccess();return t.promise}if(a.iframe){t.setSuccess();return t.promise}var i=document.createElement("iframe");a.iframe=i;i.onload=function(){var i=e.endpoints.authorize();if(i.charAt(0)==="/"){a.iframeOrigin=w()}else{a.iframeOrigin=i.substring(0,i.indexOf("/",8))}t.setSuccess()};var n=e.endpoints.checkSessionIframe();i.setAttribute("src",n);i.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin");i.setAttribute("title","keycloak-session-iframe");i.style.display="none";document.body.appendChild(i);var r=function(t){if(t.origin!==a.iframeOrigin||a.iframe.contentWindow!==t.source){return}if(!(t.data=="unchanged"||t.data=="changed"||t.data=="error")){return}if(t.data!="unchanged"){e.clearToken()}var i=a.callbackList.splice(0,a.callbackList.length);for(var n=i.length-1;n>=0;--n){var r=i[n];if(t.data=="error"){r.setError()}else{r.setSuccess(t.data=="unchanged")}}};window.addEventListener("message",r,false);return t.promise}function L(){if(a.enable){if(e.token){setTimeout((function(){M().then((function(t){if(t){L()}}))}),a.interval*1e3)}}}function M(){var t=_();if(a.iframe&&a.iframeOrigin){var i=e.clientId+" "+(e.sessionId?e.sessionId:"");a.callbackList.push(t);var n=a.iframeOrigin;if(a.callbackList.length==1){a.iframe.contentWindow.postMessage(i,n)}}else{t.setSuccess()}return t.promise}function U(){var t=_();if(a.enable||e.silentCheckSsoRedirectUri){var i=document.createElement("iframe");i.setAttribute("src",e.endpoints.thirdPartyCookiesIframe());i.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin");i.setAttribute("title","keycloak-3p-check-iframe");i.style.display="none";document.body.appendChild(i);var n=function(r){if(i.contentWindow!==r.source){return}if(r.data!=="supported"&&r.data!=="unsupported"){return}else if(r.data==="unsupported"){u("[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n"+" - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n"+" - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\n"+"For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers");a.enable=false;if(e.silentCheckSsoFallback){e.silentCheckSsoRedirectUri=false}}document.body.removeChild(i);window.removeEventListener("message",n);t.setSuccess()};window.addEventListener("message",n,false)}else{t.setSuccess()}return R(t.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function E(t){if(!t||t=="default"){return{login:function(t){window.location.assign(e.createLoginUrl(t));return _().promise},logout:function(t){window.location.replace(e.createLogoutUrl(t));return _().promise},register:function(t){window.location.assign(e.createRegisterUrl(t));return _().promise},accountManagement:function(){var t=e.createAccountUrl();if(typeof t!=="undefined"){window.location.href=t}else{throw"Not supported by the OIDC server"}return _().promise},redirectUri:function(t,i){if(t&&t.redirectUri){return t.redirectUri}else if(e.redirectUri){return e.redirectUri}else{return location.href}}}}if(t=="cordova"){a.enable=false;var i=function(t,e,i){if(window.cordova&&window.cordova.InAppBrowser){return window.cordova.InAppBrowser.open(t,e,i)}else{return window.open(t,e,i)}};var n=function(t){if(t&&t.cordovaOptions){return Object.keys(t.cordovaOptions).reduce((function(e,i){e[i]=t.cordovaOptions[i];return e}),{})}else{return{}}};var r=function(t){return Object.keys(t).reduce((function(e,i){e.push(i+"="+t[i]);return e}),[]).join(",")};var o=function(t){var e=n(t);e.location="no";if(t&&t.prompt=="none"){e.hidden="yes"}return r(e)};var s=function(){return e.redirectUri||"http://localhost"};return{login:function(t){var n=_();var r=o(t);var a=e.createLoginUrl(t);var c=i(a,"_blank",r);var f=false;var l=false;var u=function(){l=true;c.close()};c.addEventListener("loadstart",(function(t){if(t.url.indexOf(s())==0){var e=O(t.url);m(e,n);u();f=true}}));c.addEventListener("loaderror",(function(t){if(!f){if(t.url.indexOf(s())==0){var e=O(t.url);m(e,n);u();f=true}else{n.setError();u()}}}));c.addEventListener("exit",(function(t){if(!l){n.setError({reason:"closed_by_user"})}}));return n.promise},logout:function(t){var n=_();var r=e.createLogoutUrl(t);var o=i(r,"_blank","location=no,hidden=yes,clearcache=yes");var a;o.addEventListener("loadstart",(function(t){if(t.url.indexOf(s())==0){o.close()}}));o.addEventListener("loaderror",(function(t){if(t.url.indexOf(s())==0){o.close()}else{a=true;o.close()}}));o.addEventListener("exit",(function(t){if(a){n.setError()}else{e.clearToken();n.setSuccess()}}));return n.promise},register:function(t){var n=_();var r=e.createRegisterUrl();var a=o(t);var c=i(r,"_blank",a);c.addEventListener("loadstart",(function(t){if(t.url.indexOf(s())==0){c.close();var e=O(t.url);m(e,n)}}));return n.promise},accountManagement:function(){var t=e.createAccountUrl();if(typeof t!=="undefined"){var n=i(t,"_blank","location=no");n.addEventListener("loadstart",(function(t){if(t.url.indexOf(s())==0){n.close()}}))}else{throw"Not supported by the OIDC server"}},redirectUri:function(t){return s()}}}if(t=="cordova-native"){a.enable=false;return{login:function(t){var i=_();var n=e.createLoginUrl(t);universalLinks.subscribe("keycloak",(function(t){universalLinks.unsubscribe("keycloak");window.cordova.plugins.browsertab.close();var e=O(t.url);m(e,i)}));window.cordova.plugins.browsertab.openUrl(n);return i.promise},logout:function(t){var i=_();var n=e.createLogoutUrl(t);universalLinks.subscribe("keycloak",(function(t){universalLinks.unsubscribe("keycloak");window.cordova.plugins.browsertab.close();e.clearToken();i.setSuccess()}));window.cordova.plugins.browsertab.openUrl(n);return i.promise},register:function(t){var i=_();var n=e.createRegisterUrl(t);universalLinks.subscribe("keycloak",(function(t){universalLinks.unsubscribe("keycloak");window.cordova.plugins.browsertab.close();var e=O(t.url);m(e,i)}));window.cordova.plugins.browsertab.openUrl(n);return i.promise},accountManagement:function(){var t=e.createAccountUrl();if(typeof t!=="undefined"){window.cordova.plugins.browsertab.openUrl(t)}else{throw"Not supported by the OIDC server"}},redirectUri:function(t){if(t&&t.redirectUri){return t.redirectUri}else if(e.redirectUri){return e.redirectUri}else{return"http://localhost"}}}}throw"invalid adapter type: "+t}var T=function(){if(!(this instanceof T)){return new T}localStorage.setItem("kc-test","test");localStorage.removeItem("kc-test");var t=this;function e(){var t=(new Date).getTime();for(var e=0;e<localStorage.length;e++){var i=localStorage.key(e);if(i&&i.indexOf("kc-callback-")==0){var n=localStorage.getItem(i);if(n){try{var r=JSON.parse(n).expires;if(!r||r<t){localStorage.removeItem(i)}}catch(t){localStorage.removeItem(i)}}}}}t.get=function(t){if(!t){return}var i="kc-callback-"+t;var n=localStorage.getItem(i);if(n){localStorage.removeItem(i);n=JSON.parse(n)}e();return n};t.add=function(t){e();var i="kc-callback-"+t.state;t.expires=(new Date).getTime()+60*60*1e3;localStorage.setItem(i,JSON.stringify(t))}};var K=function(){if(!(this instanceof K)){return new K}var t=this;t.get=function(t){if(!t){return}var r=i("kc-callback-"+t);n("kc-callback-"+t,"",e(-100));if(r){return JSON.parse(r)}};t.add=function(t){n("kc-callback-"+t.state,JSON.stringify(t),e(60))};t.removeItem=function(t){n(t,"",e(-100))};var e=function(t){var e=new Date;e.setTime(e.getTime()+t*60*1e3);return e};var i=function(t){var e=t+"=";var i=document.cookie.split(";");for(var n=0;n<i.length;n++){var r=i[n];while(r.charAt(0)==" "){r=r.substring(1)}if(r.indexOf(e)==0){return r.substring(e.length,r.length)}}return""};var n=function(t,e,i){var n=t+"="+e+"; "+"expires="+i.toUTCString()+"; ";document.cookie=n}};function Y(){try{return new T}catch(t){}return new K}function J(t){return function(){if(e.enableLogging){t.apply(console,Array.prototype.slice.call(arguments))}}}}function z(t,e,i){return parseInt(t.substr(e,i),16)}function _(t){t|=0;return t<0?"00":t<16?"0"+t.toString(16):t<256?t.toString(16):"ff"}function R(t,e,i){i=i<0?i+6:i>6?i-6:i;return _(255*(i<1?t+(e-t)*i:i<3?e:i<4?t+(e-t)*(4-i):t))}function N(t){if(/^#[0-9a-f]{3,8}$/i.test(t)){var e;var i=t.length;if(i<6){var n=t[1],r=t[2],o=t[3],a=t[4]||"";e="#"+n+n+r+r+o+o+a+a}if(i==7||i>8){e=t}return e}}function L(t){var e=z(t,7,2);var i;if(isNaN(e)){i=t}else{var n=z(t,1,2),r=z(t,3,2),o=z(t,5,2);i="rgba("+n+","+r+","+o+","+(e/255).toFixed(2)+")"}return i}function M(t,e,i){var n;if(e==0){var r=_(i*255);n=r+r+r}else{var o=i<=.5?i*(e+1):i+e-i*e,a=i*2-o;n=R(a,o,t*6+2)+R(a,o,t*6)+R(a,o,t*6-2)}return"#"+n}function U(t,e,i){var n=[.55,.5,.5,.46,.6,.55,.55],r=n[t*6+.5|0];i=i<.5?i*r*2:r+(i-.5)*(1-r)*2;return M(t,e,i)}var E=typeof window!=="undefined"?window:typeof self!=="undefined"?self:typeof n!=="undefined"?n:{};var T={W:"jdenticon_config",n:"config"};var K={};function Y(t){K=t}function J(t){if(arguments.length){K[T.n]=t}return K[T.n]}function W(t,e){var i=typeof t=="object"&&t||K[T.n]||E[T.W]||{},n=i["lightness"]||{},r=i["saturation"]||{},o="color"in r?r["color"]:r,a=r["grayscale"],s=i["backColor"],c=i["padding"];function f(t,e){var i=n[t];if(!(i&&i.length>1)){i=e}return function(t){t=i[0]+t*(i[1]-i[0]);return t<0?0:t>1?1:t}}function l(t){var e=i["hues"];var n;if(e&&e.length>0){n=e[0|.999*t*e.length]}return typeof n=="number"?(n/360%1+1)%1:t}return{X:l,o:typeof o=="number"?o:.5,F:typeof a=="number"?a:0,p:f("color",[.4,.8]),G:f("grayscale",[.3,.9]),H:N(s),Y:typeof t=="number"?t:typeof c=="number"?c:e}}function P(t,e){this.x=t;this.y=e}function B(t,e,i,n){this.q=t;this.t=e;this.I=i;this.Z=n}B.prototype.J=function t(e,i,n,r){var o=this.q+this.I,a=this.t+this.I,s=this.Z;return s===1?new P(o-i-(r||0),this.t+e):s===2?new P(o-e-(n||0),a-i-(r||0)):s===3?new P(this.q+i,a-e-(n||0)):new P(this.q+e,this.t+i)};var D=new B(0,0,0,0);function H(t){this.K=t;this.u=D}var F=H.prototype;F.g=function t(e,i){var n=this;var r=i?-2:2,o=[];for(var a=i?e.length-2:0;a<e.length&&a>=0;a+=r){o.push(n.u.J(e[a],e[a+1]))}this.K.g(o)};F.h=function t(e,i,n,r){var o=this.u.J(e,i,n,n);this.K.h(o,n,r)};F.i=function t(e,i,n,r,o){this.g([e,i,e+n,i,e+n,i+r,e,i+r],o)};F.j=function t(e,i,n,r,o,a){var s=[e+n,i,e+n,i+r,e,i+r,e,i];s.splice((o||0)%4*2,2);this.g(s,a)};F.L=function t(e,i,n,r,o){this.g([e+n/2,i,e+n,i+r/2,e+n/2,i+r,e,i+r/2],o)};function G(t,e,i,n){t=t%14;var r,o,a,s,c,f;!t?(r=i*.42,e.g([0,0,i,0,i,i-r*2,i-r,i,0,i])):t==1?(a=0|i*.5,s=0|i*.8,e.j(i-a,0,a,s,2)):t==2?(a=0|i/3,e.i(a,a,i-a,i-a)):t==3?(c=i*.1,f=i<6?1:i<8?2:0|i*.25,c=c>1?0|c:c>.5?1:c,e.i(f,f,i-c-f,i-c-f)):t==4?(o=0|i*.15,a=0|i*.5,e.h(i-a-o,i-a-o,a)):t==5?(c=i*.1,f=c*4,f>3&&(f=0|f),e.i(0,0,i,i),e.g([f,f,i-c,f,f+(i-f-c)/2,i-c],true)):t==6?e.g([0,0,i,0,i,i*.7,i*.4,i*.4,i*.7,i,0,i]):t==7?e.j(i/2,i/2,i/2,i/2,3):t==8?(e.i(0,0,i,i/2),e.i(0,i/2,i/2,i/2),e.j(i/2,i/2,i/2,i/2,1)):t==9?(c=i*.14,f=i<4?1:i<6?2:0|i*.35,c=i<8?c:0|c,e.i(0,0,i,i),e.i(f,f,i-f-c,i-f-c,true)):t==10?(c=i*.12,f=c*3,e.i(0,0,i,i),e.h(f,f,i-c-f,true)):t==11?e.j(i/2,i/2,i/2,i/2,3):t==12?(o=i*.25,e.i(0,0,i,i),e.L(o,o,i-o,i-o,true)):!n&&(o=i*.4,a=i*1.2,e.h(o,o,a))}function q(t,e,i){t=t%4;var n;!t?e.j(0,0,i,i,0):t==1?e.j(0,i/2,i,i/2,0):t==2?e.L(0,0,i,i):(n=i/6,e.h(n,n,i-2*n))}function X(t,e){t=e.X(t);return[U(t,e.F,e.G(0)),U(t,e.o,e.p(.5)),U(t,e.F,e.G(1)),U(t,e.o,e.p(1)),U(t,e.o,e.p(0))]}function Z(t,e,i){var n=W(i,.08);if(n.H){t.m(n.H)}var r=t.k;var o=.5+r*n.Y|0;r-=o*2;var a=new H(t);var s=0|r/4;var c=0|o+r/2-s*2;var f=0|o+r/2-s*2;function l(i,n,r,o,l){var u=z(e,r,1);var p=o?z(e,o,1):0;t.M(d[h[i]]);for(var v=0;v<l.length;v++){a.u=new B(c+l[v][0]*s,f+l[v][1]*s,s,p++%4);n(u,a,s,v)}t.N()}var u=z(e,-7)/268435455,d=X(u,n),h=[];var p;function v(t){if(t.indexOf(p)>=0){for(var e=0;e<t.length;e++){if(h.indexOf(t[e])>=0){return true}}}}for(var g=0;g<3;g++){p=z(e,8+g,1)%d.length;if(v([0,4])||v([2,3])){p=1}h.push(p)}l(0,q,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]);l(1,q,4,5,[[0,0],[3,0],[3,3],[0,3]]);l(2,G,1,null,[[1,1],[2,1],[2,2],[1,2]]);t.finish()}function Q(t){var e=40;var i=16;var n=0,r=0,o=encodeURI(t)+"%80",a=[],s,c=[],f=1732584193,l=4023233417,u=~f,d=~l,h=3285377520,p=[f,l,u,d,h],v=0,g="";function b(t,e){return t<<e|t>>>32-e}for(;n<o.length;r++){a[r>>2]=a[r>>2]|(o[n]=="%"?parseInt(o.substring(n+1,n+=3),16):o.charCodeAt(n++))<<(3-(r&3))*8}s=((r+7>>6)+1)*i;a[s-1]=r*8-8;for(;v<s;v+=i){for(n=0;n<80;n++){r=b(f,5)+h+(n<20?(l&u^~l&d)+1518500249:n<40?(l^u^d)+1859775393:n<60?(l&u^l&d^u&d)+2400959708:(l^u^d)+3395469782)+(c[n]=n<i?a[v+n]|0:b(c[n-3]^c[n-8]^c[n-14]^c[n-16],1));h=d;d=u;u=b(l,30);l=f;f=r}p[0]=f=p[0]+f|0;p[1]=l=p[1]+l|0;p[2]=u=p[2]+u|0;p[3]=d=p[3]+d|0;p[4]=h=p[4]+h|0}for(n=0;n<e;n++){g+=(p[n>>3]>>>(7-(n&7))*4&15).toString(16)}return g}function V(t){return/^[0-9a-f]{11,}$/i.test(t)&&t}function $(t){return Q(t==null?"":""+t)}function tt(t,e){var i=t.canvas;var n=i.width;var r=i.height;t.save();if(!e){e=Math.min(n,r);t.translate((n-e)/2|0,(r-e)/2|0)}this.l=t;this.k=e;t.clearRect(0,0,e,e)}var et=tt.prototype;et.m=function t(e){var i=this.l;var n=this.k;i.fillStyle=L(e);i.fillRect(0,0,n,n)};et.M=function t(e){var i=this.l;i.fillStyle=L(e);i.beginPath()};et.N=function t(){this.l.fill()};et.g=function t(e){var i=this.l;i.moveTo(e[0].x,e[0].y);for(var n=1;n<e.length;n++){i.lineTo(e[n].x,e[n].y)}i.closePath()};et.h=function t(e,i,n){var r=this.l,o=i/2;r.moveTo(e.x+o,e.y+o);r.arc(e.x+o,e.y+o,o,0,Math.PI*2,n);r.closePath()};et.finish=function t(){this.l.restore()};var it=1;var nt=2;var rt={O:"data-jdenticon-hash",v:"data-jdenticon-value"};var ot="jdenticonRendered";var at="["+rt.O+"],["+rt.v+"]";var st=typeof document!=="undefined"&&document.querySelectorAll.bind(document);function ct(t){if(t){var e=t["tagName"];if(/^svg$/i.test(e)){return it}if(/^canvas$/i.test(e)&&"getContext"in t){return nt}}}function ft(t,e,i,n){if(!t){throw new Error("No canvas specified.")}Z(new tt(t,i),V(e)||$(e),n);var r=t.canvas;if(r){r[ot]=true}}function lt(t){return(t*10+.5|0)/10}function ut(){this.A=""}var dt=ut.prototype;dt.g=function t(e){var i="";for(var n=0;n<e.length;n++){i+=(n?"L":"M")+lt(e[n].x)+" "+lt(e[n].y)}this.A+=i+"Z"};dt.h=function t(e,i,n){var r=n?0:1,o=lt(i/2),a=lt(i),s="a"+o+","+o+" 0 1,"+r+" ";this.A+="M"+lt(e.x)+" "+lt(e.y+i/2)+s+a+",0"+s+-a+",0"};function ht(t){this.C={};this.P=t;this.k=t.k}var pt=ht.prototype;pt.m=function t(e){var i=/^(#......)(..)?/.exec(e),n=i[2]?z(i[2],0)/255:1;this.P.m(i[1],n)};pt.M=function t(e){this.B=this.C[e]||(this.C[e]=new ut)};pt.N=function t(){};pt.g=function t(e){this.B.g(e)};pt.h=function t(e,i,n){this.B.h(e,i,n)};pt.finish=function t(){var e=this;var i=this.C;for(var n in i){if(i.hasOwnProperty(n)){e.P.R(n,i[n].A)}}};var vt={S:"http://www.w3.org/2000/svg",T:"width",U:"height"};function gt(t){this.k=t;this.D='<svg xmlns="'+vt.S+'" width="'+t+'" height="'+t+'" viewBox="0 0 '+t+" "+t+'">'}var bt=gt.prototype;bt.m=function t(e,i){if(i){this.D+='<rect width="100%" height="100%" fill="'+e+'" opacity="'+i.toFixed(2)+'"/>'}};bt.R=function t(e,i){this.D+='<path fill="'+e+'" d="'+i+'"/>'};bt.toString=function t(){return this.D+"</svg>"};function wt(t,e,i){var n=new gt(e);Z(new ht(n),V(t)||$(t),i);return n.toString()}function mt(t,e){var i=[],n=arguments.length-2;while(n-- >0)i[n]=arguments[n+2];var r=document.createElementNS(vt.S,e);for(var o=0;o+1<i.length;o+=2){r.setAttribute(i[o],i[o+1])}t.appendChild(r)}function xt(t){var e=this.k=Math.min(Number(t.getAttribute(vt.T))||100,Number(t.getAttribute(vt.U))||100);this.V=t;while(t.firstChild){t.removeChild(t.firstChild)}t.setAttribute("viewBox","0 0 "+e+" "+e);t.setAttribute("preserveAspectRatio","xMidYMid meet")}var kt=xt.prototype;kt.m=function t(e,i){if(i){mt(this.V,"rect",vt.T,"100%",vt.U,"100%","fill",e,"opacity",i)}};kt.R=function t(e,i){mt(this.V,"path","fill",e,"d",i)};function yt(){if(st){At(at)}}function At(t,e,i){It(t,e,i,(function(t,e){if(e){return e==it?new ht(new xt(t)):new tt(t.getContext("2d"))}}))}function Ct(t,e,i){It(t,e,i,(function(t,e){if(e==nt){return new tt(t.getContext("2d"))}}))}function Ot(t,e,i){It(t,e,i,(function(t,e){if(e==it){return new ht(new xt(t))}}))}function It(t,e,i,n){if(typeof t==="string"){if(st){var r=st(t);for(var o=0;o<r.length;o++){It(r[o],e,i,n)}}return}var a=V(e)||e!=null&&$(e)||V(t.getAttribute(rt.O))||t.hasAttribute(rt.v)&&$(t.getAttribute(rt.v));if(!a){return}var s=n(t,ct(t));if(s){Z(s,a,i);t[ot]=true}}var St=yt;Y(St);St["configure"]=J;St["drawIcon"]=ft;St["toSvg"]=wt;St["update"]=At;St["updateCanvas"]=Ct;St["updateSvg"]=Ot;St["version"]="3.3.0";St["bundle"]="browser-cjs";var jt=St;const zt='.button{display:flex;height:50px;padding:0;background:#3e7671;border:none;outline:none;border-radius:5px;overflow:hidden;font-size:16px;font-weight:500;cursor:pointer;min-width:220px;max-width:220px}.button:hover{background:#008168}.button:active{background:#3e7671}.button-text{display:block;margin:auto;padding:0 10px;color:#fff;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:50%;text-transform:capitalize}.button-icon{margin:auto;padding:10px}.button-profile{margin:auto}.button-profile svg{display:flex;margin-left:4px;background-color:#fff;border-radius:4px}.profile-image{display:flex;margin-left:4px;width:40px;height:40px;border-radius:4px;background-color:#fff}.button-text-full-width{width:auto!important}.button-link{text-decoration:none!important}.gg-menu-grid-r{color:#fff;box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs,1));width:16px;height:16px}.gg-menu-grid-r::before{content:"";display:block;box-sizing:border-box;position:absolute;width:4px;height:4px;background:currentColor;box-shadow:0 6px 0,\n 6px 6px 0,\n 12px 6px 0,\n 6px 12px 0,\n 12px 12px 0,\n 6px 0 0,\n 12px 0 0,\n 0 12px 0}.dropdown{position:relative;display:inline-block}.dropdown-content{display:none;position:absolute;right:0;background-color:#f9f9f9;min-width:180px;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);z-index:1;border-radius:5px;text-align:left!important}.dropdown-content a{color:#71797E;padding:16px 20px;text-decoration:none;display:block;cursor:pointer;font-size:1rem!important}.dropdown-content a:hover{background-color:#f1f1f1;color:#000;opacity:0.7}.dropdown:hover .dropdown-content{display:block}.modal{display:none;position:fixed;z-index:1;padding-top:100px;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.4);text-align:center}.modal-content{background-color:#fefefe;margin:auto;padding:20px;border:1px solid #888;width:40%}.modal-body{max-height:50vh;overflow-y:auto}.close{color:#aaaaaa;float:right;font-size:28px;font-weight:bold}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer}.modal-app{background-color:#c3e9bc;padding:15px;margin:10px;border-radius:5px}.external-app-link{text-decoration:none;color:#000}.gray-text{color:#606060}.green-text{color:#3e7671}#countdown{position:relative;margin:auto;margin-top:30px;height:40px;width:40px;text-align:center}#countdown-number{color:#2e2e2e;display:inline-block;line-height:40px}#countdown svg{position:absolute;top:0;right:0;width:40px;height:40px;transform:rotateY(-180deg) rotateZ(-90deg)}#countdown svg circle{stroke-dasharray:113px;stroke-dashoffset:0px;stroke-linecap:round;stroke-width:4px;stroke:#008168;fill:none;animation:countdown 6s linear infinite forwards}@keyframes countdown{from{stroke-dashoffset:0px}to{stroke-dashoffset:113px}}.lds-ring{color:#fff}.lds-ring{display:flex;justify-content:center;align-items:center;margin:auto;position:relative}.lds-ring div{box-sizing:border-box;display:block;position:absolute;width:30px;height:30px;margin:3px;border:3px solid currentColor;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;border-color:currentColor transparent transparent transparent}.lds-ring div:nth-child(1){animation-delay:-0.45s}.lds-ring div:nth-child(2){animation-delay:-0.3s}.lds-ring div:nth-child(3){animation-delay:-0.15s}@keyframes lds-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.dropdown-content .dropdown-user-profile{padding:12px 10px 8px 18px;border-bottom:1px solid #aaaaaa}.dropdown-content .dropdown-user-profile .username{font-size:16px;color:#2e2e2e;text-transform:capitalize}.dropdown-content .dropdown-user-profile .first-last-name{font-size:13px;color:#606060}.menu-bar-icons{color:#008168;display:inline-block;margin-bottom:-3px}.gg-microsoft{transform:scale(var(--ggs,1));margin-right:12px}.gg-microsoft,.gg-microsoft::after,.gg-microsoft::before{box-sizing:border-box;position:relative;width:18px;height:18px}.gg-microsoft::after,.gg-microsoft::before{content:"";position:absolute;width:8px;border-top:8px solid;border-bottom:8px solid}.gg-microsoft::after{right:0}.gg-ereader{box-sizing:border-box;position:relative;transform:scale(var(--ggs,1));width:20px;height:18px;border:2px solid;border-radius:3px;margin-right:9px}.gg-ereader::after,.gg-ereader::before{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:2px;height:18px;right:9px;top:-2px;background:currentColor}.gg-ereader::after{width:5px;height:2px;box-shadow:0 4px 0,0 8px 0;top:2px;right:2px}.gg-display-flex{box-sizing:border-box;position:relative;transform:scale(var(--ggs,1));height:14px;width:16px;border:2px solid transparent;margin-right:11px;margin-left:2px;margin-bottom:0px!important;box-shadow:0 0 0 2px,\n inset -2px 0 0 0,\n inset 2px 0 0 0}.gg-align-bottom{box-sizing:border-box;position:relative;height:12px;width:12px;border-bottom:2px solid;transform:scale(var(--ggs,1));margin-bottom:-1px;margin-right:12px;margin-left:4px}.gg-align-bottom::after,.gg-align-bottom::before{content:"";display:block;box-sizing:border-box;position:absolute;width:4px;background:currentColor;bottom:2px}.gg-align-bottom::before{left:1px;height:12px}.gg-align-bottom::after{height:6px;right:1px;opacity:.5}.gg-log-out{box-sizing:border-box;position:relative;width:6px;height:16px;border:2px solid;transform:scale(var(--ggs,1));border-right:0;border-top-left-radius:2px;border-bottom-left-radius:2px;margin-right:21px;margin-left:2px;margin-bottom:-2px}.gg-log-out::after,.gg-log-out::before{content:"";display:block;box-sizing:border-box;position:absolute}.gg-log-out::after{border-top:2px solid;border-left:2px solid;transform:rotate(-45deg);width:8px;height:8px;left:4px;bottom:2px}.gg-log-out::before{border-radius:3px;width:10px;height:2px;background:currentColor;left:5px;bottom:5px}.gg-link{box-sizing:border-box;position:relative;transform:rotate(-45deg) scale(var(--ggs, 1));width:8px;height:2px;border-bottom:2px solid;margin-bottom:5px;margin-right:14px;margin-left:6px}.gg-link::after,.gg-link::before{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:8px;height:10px;border:2px solid;top:-4px}.gg-link::before{border-right:0;border-top-left-radius:40px;border-bottom-left-radius:40px;left:-6px}.gg-link::after{border-left:0;border-top-right-radius:40px;border-bottom-right-radius:40px;right:-6px}.other-links-list{padding:14px;background-color:#f1f1f1;margin-bottom:8px;text-align:start;border-radius:5px}.tab-list{margin:0px 40px;padding:0;list-style:none;display:flex;position:relative;width:85%;border-bottom:1px solid #aaa}.tab-item{flex:1;text-align:center;transition:.3s;opacity:0.5}.tab-toggle{display:none}.tab-content{display:none}.tab-toggle:nth-child(1):checked~.tab-list .tab-item:nth-child(1),.tab-toggle:nth-child(2):checked~.tab-list .tab-item:nth-child(2){opacity:1;color:#008168;border-bottom:2px solid #008168}.tab-toggle:nth-child(2):checked~.tab-list::before{transform:translateX(100%)}.tab-toggle:nth-child(3):checked~.tab-list::before{transform:translateX(200%)}.tab-toggle:nth-child(1):checked~.tab-container .tab-content:nth-child(1),.tab-toggle:nth-child(2):checked~.tab-container .tab-content:nth-child(2){display:block}.tab-trigger{display:block;padding:10px 0}.tab-container{padding:15px 30px}';const _t=zt;const Rt=class{constructor(e){t(this,e);this.showPostLoginText=false;this.silentCheckSso=false;this.redirectUri=undefined;this.authMethod="check-sso";this.keycloakUri="http://localhost:8080";this.realm="";this.clientId="";this.appId="";this.portalUrl="";this.marketplaceUrl="https://marketplace-zdzw.cloud.zdzw-project.com";this.plmUrl="https://productlicensemanager-zdzw.cloud.zdzw-project.com";this.usageTrackingUrl="https://usage-tracking-ui-zdzw.cloud.zdzw-project.com";this.showUnauthorizedModal=false;this.postTextDelayDuration=undefined;this.primaryColor="";this.accentColor="";this.otherLinkType=undefined;this.applicationDisplayName="Applications";this.disableApplicationTab=false;this.keycloak=new j({url:this.keycloakUri,realm:this.realm,clientId:this.clientId});this.isAuth=false;this.givenUserName="";this.silentCheckSsoRedirectUri=window.location.origin+"/assets/verificar-sso.html";this.appList=[];this.menuLinkList=[];this.showPostLoginLoadingSpinner=false;this.avatarSvg=jt.toSvg("init-avatar",40)}componentWillLoad(){if(this.postTextDelayDuration>0){this.showPostLoginLoadingSpinner=true;setTimeout((()=>{this.showPostLoginLoadingSpinner=false}),this.postTextDelayDuration)}this.initKeycloak().then((()=>{if(this.isAuth){const t=JSON.parse(localStorage.getItem("keycloak")).token;this.getAppList(t).then((t=>{this.appList=t;if(this.appId){const t=this.appId.replace(/'/g,"").split(",");const n=this.appList.map((t=>t["shortname"]));if(t.filter((t=>n.includes(t))).length==0){localStorage.setItem("ZDZW_app_permission",JSON.stringify(false));const t=this.el.shadowRoot.querySelector("#appPermissionErrorModal");t.style.display="block";if(this.portalUrl&&this.showUnauthorizedModal){var e=this.el.shadowRoot.getElementById("countdown-number");var i=6;e.textContent=i.toString();setInterval((()=>{i=--i<=0?6:i;e.textContent=i.toString();if(i==1){window.location.replace(this.portalUrl.toString())}}),1e3)}}else{localStorage.setItem("ZDZW_app_permission",JSON.stringify(true))}}}));this.getOtherMenuLinks(t).then((t=>{if(t.links){this.menuLinkList=t.links}}))}}))}async initKeycloak(){localStorage.removeItem("ZDZW_app_permission");await this.keycloak.init({onLoad:this.authMethod,checkLoginIframe:false,silentCheckSsoRedirectUri:this.silentCheckSso?this.silentCheckSsoRedirectUri:""}).then((t=>{if(t){this.isAuth=true;localStorage.setItem("keycloak",JSON.stringify(this.keycloak));document.cookie="ZDZW_cookie="+JSON.parse(localStorage.getItem("keycloak")).token;this.givenUserName=JSON.parse(localStorage.getItem("keycloak")).idTokenParsed.preferred_username;this.avatarSvg=jt.toSvg(JSON.parse(localStorage.getItem("keycloak")).idTokenParsed.sub,40)}}))}async getAppList(t){const e=await fetch(this.plmUrl+"/api/v1/product/nameAndShortNameOrg",{headers:new Headers({Authorization:"Bearer "+t})});const i=await e.json();return i}async getOtherMenuLinks(t){const e=await fetch(this.portalUrl+"/developer/dashbutton-link/"+this.otherLinkType,{headers:new Headers({Authorization:"Bearer "+t})});const i=await e.json();return i}login(){this.keycloak.login()}logout(){localStorage.removeItem("keycloak");document.cookie="ZDZW_cookie=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";this.keycloak.logout()}showModal(){const t=this.el.shadowRoot.querySelector("#appListModal");t.style.display="block"}closeModal(){const t=this.el.shadowRoot.querySelector("#appListModal");t.style.display="none"}render(){return e("div",{key:"645060a56354d6be3af1573e6bae0620176e4ea5"},e("div",{key:"4809ca705f0b27e9c6b28523719d66e436c5e614"},(()=>{if(this.isAuth&&this.showPostLoginText){if(this.showPostLoginLoadingSpinner){return e("a",{id:"login-btn",class:"button button-link"},e("div",{class:"lds-ring"},e("div",null),e("div",null),e("div",null),e("div",null)))}else{return e("a",{style:{background:this.primaryColor!=undefined?this.primaryColor:""},href:this.redirectUri,id:"login-btn",class:"button button-link"},e("span",{style:{color:this.accentColor!=undefined?this.accentColor:""},class:"button-text button-text-full-width"},"Go to Dashboard"))}}else if(this.isAuth){return e("div",{id:"profile-btn",class:"dropdown"},e("button",{style:{background:this.primaryColor!=undefined?this.primaryColor:""},type:"button",class:"button"},e("span",{class:"button-profile"},JSON.parse(localStorage.getItem("keycloak")).idTokenParsed.imageUrl?e("img",{class:"profile-image",src:"https://s-damith.github.io/test-avatar/images/e24da9c5-0b1f-46fa-82cd-7c711c77b5c7.png"}):e("div",{innerHTML:this.avatarSvg})),e("span",{style:{color:this.accentColor!=undefined?this.accentColor:""},id:"given-name",class:"button-text"},this.givenUserName),e("div",{class:"button-icon"},e("span",{class:"gg-menu-grid-r"}))),e("div",{class:"dropdown-content"},e("div",{class:"dropdown-user-profile"},e("div",{class:"username"},"@",this.givenUserName),e("div",{class:"first-last-name"},JSON.parse(localStorage.getItem("keycloak")).idTokenParsed.name)),e("a",{onClick:this.showModal.bind(this),id:"applications-btn"},e("i",{style:{color:this.primaryColor!=undefined?this.primaryColor:""},class:"menu-bar-icons gg-microsoft"}),this.applicationDisplayName),e("a",{href:this.portalUrl,target:"_blank",id:"applications-btn"},e("i",{style:{color:this.primaryColor!=undefined?this.primaryColor:""},class:"menu-bar-icons gg-ereader"}),"Portal"),e("a",{href:this.marketplaceUrl,target:"_blank",id:"applications-btn"},e("i",{style:{color:this.primaryColor!=undefined?this.primaryColor:""},class:"menu-bar-icons gg-display-flex"}),"Marketplace"),e("a",{onClick:this.logout.bind(this),id:"logout-btn"},e("i",{style:{color:this.primaryColor!=undefined?this.primaryColor:""},class:"menu-bar-icons gg-log-out"}),"Logout")))}else{return e("button",{style:{background:this.primaryColor!=undefined?this.primaryColor:""},onClick:this.login.bind(this),id:"login-btn",type:"button",class:"button"},e("span",{style:{color:this.accentColor!=undefined?this.accentColor:""},class:"button-text"},"Login"))}})()),e("div",{key:"8e9383c347949feb8ee6e74bd2bc8fe2a6695861",id:"appListModal",class:"modal"},e("div",{key:"823a614f1910f9ecd4f99e5517302e06c11fe12f",class:"modal-content"},e("span",{key:"84ae8783a22d649631b6e0da9becc087ed0824dd",onClick:this.closeModal.bind(this),class:"close"},"×"),e("div",{key:"bbe7b4cc099600759736a99047560b52faf3c7fa",class:"box"},!this.disableApplicationTab&&e("input",{type:"radio",class:"tab-toggle",name:"tab-toggle",id:"tab1",checked:true}),this.menuLinkList.length!=0&&e("input",{type:"radio",class:"tab-toggle",name:"tab-toggle",id:"tab2",checked:this.disableApplicationTab}),e("ul",{key:"7aca201ec0c436e8902215ebe9405189a4c9f21a",class:"tab-list"},!this.disableApplicationTab&&e("li",{class:"tab-item"},e("label",{class:"tab-trigger",htmlFor:"tab1"},e("i",{style:{color:this.primaryColor!=undefined?this.primaryColor:""},class:"menu-bar-icons gg-ereader"})," ",this.applicationDisplayName)),this.menuLinkList.length!=0&&e("li",{class:"tab-item"},e("label",{class:"tab-trigger",htmlFor:"tab2"},e("i",{style:{color:this.primaryColor!=undefined?this.primaryColor:""},class:"menu-bar-icons gg-link"})," More links"))),e("div",{key:"d79fd171d56b9da0cee3b664f472bc0884a9c110",class:"tab-container"},e("div",{key:"9e55949eef5865acc805b3264a25af18d7d35f5c",class:"tab-content"},e("div",{key:"a0e957f721c39173a4bb21ce06a2c5a57f1ad546",class:"modal-body"},this.appList.length>0?this.appList.map((t=>e("a",{class:"external-app-link",target:"_blank",href:"https://"+t.shortname+"-zdzw"+this.portalUrl.replace(/(^\w+:|^)\/\//,"").replace("portal-frontend-zdzw","")},e("div",{class:"modal-app"},e("div",null,t.name))))):e("div",null,e("h3",{class:"gray-text"},"Not installed ",this.applicationDisplayName," found.")," ",e("p",{class:"gray-text"},"Please contact administration.")))),e("div",{key:"ebffa0a5fe4ba4409ce365634e2c420d9ac75558",class:"tab-content"},e("div",{key:"43048ac28c32d4395c8aa11ce624689fe494fdfd",class:"modal-body"},this.menuLinkList.map((t=>e("a",{class:"external-app-link",target:"_blank",href:t.url},e("div",{class:"modal-app"},e("div",null,t.name))))))))))),e("div",{key:"1b72a38ac2f73fb79063f0697624495ef15e31ee",id:"appPermissionErrorModal",class:"modal"},e("div",{key:"bc361ed356640750a94d1959278a63b48b73c7a7",class:"modal-content"},e("img",{key:"bd1c05b0cfe517146904956f8579b9ab2725082e",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGD0lEQVR4nO2cbU8TWRTH/W5WEAmF4nNiieFFoeBjYhQUWzUWYkpbDfGFCR9CoolvQF9aWgG3kMCG8LACC1ikuCuUh7bH/M/MmW131S2ZqTDjPcmkdub2tvPj3HP/55yJR44oU6ZMmTJlyg7YOsL9pI7+shkogGFzDqMAhhVAOsiQozwwrACS8sCwfXd+tYTDCiApDwwf/FJUSzisAJKjNhFlPzYF0KQpgCZNATRpCqBJUwBNmgJo0hRAk6YAmjQF0KkAs4uLtPz8OU2HQpRqaaFkQwPFq6v5SHo8fA7XVgYGKLu0dGC/81ABLORylB4cpInLl+nt0aP7OiauXKH00BAV8vlfE2AmkaCxpiYDSKK6mqaammjx+nX6FAzS348e0VYkwgf+jXO4Nun18lj53PuLF2kjmfx1AOa3t2mmt9cAkDxxghauXaPN3l7KxmJlHRgLmKNutzHPTCTCczsa4G4mQ6nWVr7h4WPHaL6trQTc+r17NOf30/iZMzTmdtNwVRWPA2Scm/H56FMgQNlolMfDO/9ob+cxmDPl99PuxoYzAe5mMrzcxOvWAALgolFauXmTxurry45/gPvnjRsG+LW7d3lOWdKVhHggAPPb24bnvW9ooL96evjGP4dC9NvJkwaY0fPnaa6vjzLJJG19+ED5bJY/u5NOUyYep/lnz2jk3Ll/4p/Hw/B4ru5unls8Mb+z4xyAM3rMg5cIvHRXFyVqavg8oKy+elXWjooxqy9f0luXy5gTm4xAFE+cjcWcATCTSGgxr6rKWLaAF9fj1u+BAOW2tsqeL7+7S5OdnRq8mhpaf/CA5xSI8EiJiRsjI/YGWMjlDKmCDUOWrXje3NOnRIWCaXh45biqL+f59nYjHlqtE38qwPTgoLHMeLeNRo2YB8+zEp7ExK1olI+Rujo+t/b6tX0BTugZBnQebha7rcQ8K5Ytw9O9WWKi7M7QiZKx2BJgdnHRyDDE+0SqYMOwEt7k7dvaxqJLHHwXvpMzFpeLtpeX7QdwZWCAbwjpmYhkkSrlxqVy4WEc4q1IHBbbsRhNXrjA71devLAfwOlQiH88lhJuBhkGbxx9fZbDE4NO5LTO5+OxCB14P93dbT+AKZ9P84ZgkG8GqRjeQ9ZUAh4MYhvXxs+e5fHwRBbWra32A5j0ePjHf9H1mST+2YWFisCDba+u8vV3tbWGNuT3jY32AxjXS06QFLgZKUH9aPct7O3RVFfXf+BlHj6kZG2tBq+j47tpGs5LoYKrNpGI9v74cfsDHNazg+/dvFl4sNzmprHz2x5g8l9LWMTuzsePli7bYkMBgqVMfb39l3CqpeXbm0g8XhF439xEgkGjOmN7GTOjA4XU2Be8zs6y4MFmnzzRpJLfXypjenrsK6Qnvd4SSQGxCyFtNbxiIb1+/74mpL1e+wrp7NISp1ElqZwuZZB2WQkPZqRyevz7Eg5zCc22qVxxMUGWMRL94sTfKnjYfd+dPq15261bpcWEq1fJvuWsoSEt/3W7tRZlNMolJylxWQEPJTGRP6lTpwz5YpSz3ryxcUE1nzcaSeieFTeArIKH3Fq8GSX9koJqc7O9C6owNL0lO5CKsZTfzS7bqTt3+LPxornxKu2Cz6Oj5IymUkTLCOB54iWAKOIaMRE7JXbS/zOMwYYhMQ9/gOLOnPxBZh8/dlhb06+Vs9B6FIi4cYmJInGgEyGIkbHgc8idkWHgHHRecVsTMU/mwuuY3tYcv3TJWW1NGJrdJY113WtkdxaJU84BqSK7rRFXdc/Dd+w5rbFeDHG8rc2IiQj2UmwQsY1iKFIxlKSg46AjARfnkGGISOZHO6JRnkNiHjzPsY92iGFZoultLNu6OtZs+3m4CCIZnxGpIjGvUsv2UAEUQ9NblrSUoNDDQP4KT+TH2/QWJT/eFgjwNaRnnGHI4x3NzRXZbQ89QBg0GsQ2Wo+SnZR1uFycYbBI3kdv2XEAiw35KqQMGkDoYaCeaDzi29jIuziuYYyVua1jANrFFECTpgCaNAXQpCmAJk0BNGkKoElTACsNUB39ZTFQAMMW/78xypQpU6ZMmbIjP9e+AkAlsBlIjsPOAAAAAElFTkSuQmCC"}),e("h2",{key:"6baced0f593f104cd8de647d6f2fd29d30e5e21a",class:"green-text margin-b"},"You don't have permission to access this application."),e("h3",{key:"97274ef241e9f7bc05384f87ff5ba822791886ee",class:"green-text"},"Please contact the administration."),this.portalUrl&&this.showUnauthorizedModal?e("div",null,e("h4",{class:"gray-text"},"You will be automatically redirected to the portal."),e("div",{id:"countdown"},e("div",{id:"countdown-number"}),e("svg",null,e("circle",{r:"18",cx:"20",cy:"20"})))):e("div",null))))}get el(){return i(this)}};Rt.style=_t;export{Rt as dash_button};
|
|
10
|
+
//# sourceMappingURL=p-f072a157.entry.js.map
|