forked from inrupt/oidc-client-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
oidc-client.rsa256.slim.min.js
3 lines (3 loc) · 181 KB
/
oidc-client.rsa256.slim.min.js
1
2
3
var Oidc=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=121)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var o={debug:function e(){},info:function e(){},warn:function e(){},error:function e(){}},i=void 0,s=void 0;(t.Log=function(){function e(){!function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.reset=function e(){s=3,i=o},e.debug=function e(){if(s>=4){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];i.debug.apply(i,Array.from(r))}},e.info=function e(){if(s>=3){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];i.info.apply(i,Array.from(r))}},e.warn=function e(){if(s>=2){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];i.warn.apply(i,Array.from(r))}},e.error=function e(){if(s>=1){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];i.error.apply(i,Array.from(r))}},n(e,null,[{key:"NONE",get:function e(){return 0}},{key:"ERROR",get:function e(){return 1}},{key:"WARN",get:function e(){return 2}},{key:"INFO",get:function e(){return 3}},{key:"DEBUG",get:function e(){return 4}},{key:"level",get:function e(){return s},set:function e(t){if(!(0<=t&&t<=4))throw new Error("Invalid log level");s=t}},{key:"logger",get:function e(){return i},set:function e(t){if(!t.debug&&t.info&&(t.debug=t.info),!(t.debug&&t.info&&t.warn&&t.error))throw new Error("Invalid logger");i=t}}]),e}()).reset()},function(e,t,r){var n=r(74),o=n.all;e.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===o}:function(e){return"function"==typeof e}},function(e,t,r){var n=r(24),o=Function.prototype,i=o.call,s=n&&o.bind.bind(i,i);e.exports=n?s:function(e){return function(){return i.apply(e,arguments)}}},function(e,t,r){var n=r(4),o=r(47).f,i=r(18),s=r(19),a=r(54),u=r(84),c=r(88);e.exports=function(e,t){var r,f,p,l,d,h=e.target,g=e.global,v=e.stat;if(r=g?n:v?n[h]||a(h,{}):(n[h]||{}).prototype)for(f in t){if(l=t[f],p=e.dontCallGetSet?(d=o(r,f))&&d.value:r[f],!c(g?f:h+(v?".":"#")+f,e.forced)&&void 0!==p){if(typeof l==typeof p)continue;u(l,p)}(e.sham||p&&p.sham)&&i(l,"sham",!0),s(r,f,l,e)}}},function(e,t,r){(function(t){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,r(72))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){var n=r(4),o=r(78),i=r(11),s=r(79),a=r(77),u=r(76),c=n.Symbol,f=o("wks"),p=u?c.for||c:c&&c.withoutSetter||s;e.exports=function(e){return i(f,e)||(f[e]=a&&i(c,e)?c[e]:p("Symbol."+e)),f[e]}},function(e,t,r){var n=r(24),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},function(e,t,r){var n=r(5);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,r){var n=r(1),o=r(74),i=o.all;e.exports=o.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===i}:function(e){return"object"==typeof e?null!==e:n(e)}},function(e,t,r){var n=r(1),o=r(27),i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not a function")}},function(e,t,r){var n=r(2),o=r(28),i=n({}.hasOwnProperty);e.exports=Object.hasOwn||function e(t,r){return i(o(t),r)}},function(e,t,r){var n=r(9),o=String,i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not an object")}},function(e,t,r){var n=r(4),o=r(1),i=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e]):n[e]&&n[e][t]}},function(e,t){e.exports=!1},function(e,t,r){var n=r(8),o=r(80),i=r(81),s=r(12),a=r(50),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p="enumerable",l="configurable",d="writable";t.f=n?i?function e(t,r,n){if(s(t),r=a(r),s(n),"function"==typeof t&&"prototype"===r&&"value"in n&&d in n&&!n.writable){var o=f(t,r);o&&o.writable&&(t[r]=n.value,n={configurable:l in n?n.configurable:o.configurable,enumerable:p in n?n.enumerable:o.enumerable,writable:!1})}return c(t,r,n)}:c:function e(t,r,n){if(s(t),r=a(r),s(n),o)try{return c(t,r,n)}catch(e){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[r]=n.value),t}},function(e,t,r){"use strict";var n=r(10),o=TypeError,i=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw o("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new i(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var o={setInterval:function(e){function t(t,r){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){return setInterval(e,t)})),clearInterval:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return clearInterval(e)}))},i=!1;t.Global=function(){function e(){!function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}return e._testing=function e(){i=!0},e.setXMLHttpRequest=function e(t){t},n(e,null,[{key:"location",get:function e(){if(!i)return location}},{key:"localStorage",get:function e(){if(!i&&"undefined"!=typeof window)return localStorage}},{key:"sessionStorage",get:function e(){if(!i&&"undefined"!=typeof window)return sessionStorage}},{key:"XMLHttpRequest",get:function e(){return null}},{key:"timer",get:function e(){if(!i)return o}}]),e}()},function(e,t,r){var n=r(8),o=r(15),i=r(20);e.exports=n?function(e,t,r){return o.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(1),o=r(15),i=r(82),s=r(54);e.exports=function(e,t,r,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:t;if(n(r)&&i(r,c,a),a.global)u?e[t]=r:s(t,r);else{try{a.unsafe?e[t]&&(u=!0):delete e[t]}catch(e){}u?e[t]=r:o.f(e,t,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,r){var n=r(4);e.exports=n.Promise},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataService=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),i=r(68);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=".well-known/openid-configuration";t.MetadataService=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.JsonService;if(s(this,e),!t)throw o.Log.error("MetadataService: No settings passed to MetadataService"),new Error("settings");this._settings=t,this._jsonService=new r(["application/jwk-set+json"])}return e.prototype.resetSigningKeys=function e(){this._settings=this._settings||{},this._settings.signingKeys=void 0},e.prototype.getMetadata=function e(){var t=this;return this._settings.metadata?(o.Log.debug("MetadataService.getMetadata: Returning metadata from settings"),Promise.resolve(this._settings.metadata)):this.metadataUrl?(o.Log.debug("MetadataService.getMetadata: getting metadata from",this.metadataUrl),this._jsonService.getJson(this.metadataUrl).then((function(e){o.Log.debug("MetadataService.getMetadata: json received");var r=t._settings.metadataSeed||{};return t._settings.metadata=Object.assign({},r,e),t._settings.metadata}))):(o.Log.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"),Promise.reject(new Error("No authority or metadataUrl configured on settings")))},e.prototype.getIssuer=function e(){return this._getMetadataProperty("issuer")},e.prototype.getAuthorizationEndpoint=function e(){return this._getMetadataProperty("authorization_endpoint")},e.prototype.getUserInfoEndpoint=function e(){return this._getMetadataProperty("userinfo_endpoint")},e.prototype.getTokenEndpoint=function e(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._getMetadataProperty("token_endpoint",t)},e.prototype.getCheckSessionIframe=function e(){return this._getMetadataProperty("check_session_iframe",!0)},e.prototype.getEndSessionEndpoint=function e(){return this._getMetadataProperty("end_session_endpoint",!0)},e.prototype.getRevocationEndpoint=function e(){return this._getMetadataProperty("revocation_endpoint",!0)},e.prototype.getKeysEndpoint=function e(){return this._getMetadataProperty("jwks_uri",!0)},e.prototype._getMetadataProperty=function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return o.Log.debug("MetadataService.getMetadataProperty for: "+t),this.getMetadata().then((function(e){if(o.Log.debug("MetadataService.getMetadataProperty: metadata recieved"),void 0===e[t]){if(!0===r)return void o.Log.warn("MetadataService.getMetadataProperty: Metadata does not contain optional property "+t);throw o.Log.error("MetadataService.getMetadataProperty: Metadata does not contain property "+t),new Error("Metadata does not contain property "+t)}return e[t]}))},e.prototype.getSigningKeys=function e(){var t=this;return this._settings.signingKeys?(o.Log.debug("MetadataService.getSigningKeys: Returning signingKeys from settings"),Promise.resolve(this._settings.signingKeys)):this._getMetadataProperty("jwks_uri").then((function(e){return o.Log.debug("MetadataService.getSigningKeys: jwks_uri received",e),t._jsonService.getJson(e).then((function(e){if(o.Log.debug("MetadataService.getSigningKeys: key set received",e),!e.keys)throw o.Log.error("MetadataService.getSigningKeys: Missing keys on keyset"),new Error("Missing keys on keyset");return t._settings.signingKeys=e.keys,t._settings.signingKeys}))}))},n(e,[{key:"metadataUrl",get:function e(){return this._metadataUrl||(this._settings.metadataUrl?this._metadataUrl=this._settings.metadataUrl:(this._metadataUrl=this._settings.authority,this._metadataUrl&&this._metadataUrl.indexOf(a)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=a))),this._metadataUrl}}]),e}()},function(e,t,r){var n=r(5);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},function(e,t,r){var n=r(48),o=r(49);e.exports=function(e){return n(o(e))}},function(e,t,r){var n=r(2),o=n({}.toString),i=n("".slice);e.exports=function(e){return i(o(e),8,-1)}},function(e,t){var r=String;e.exports=function(e){try{return r(e)}catch(e){return"Object"}}},function(e,t,r){var n=r(49),o=Object;e.exports=function(e){return o(n(e))}},function(e,t,r){var n=r(41),o=r(7),i=r(12),s=r(27),a=r(146),u=r(39),c=r(34),f=r(147),p=r(91),l=r(148),d=TypeError,h=function(e,t){this.stopped=e,this.result=t},g=h.prototype;e.exports=function(e,t,r){var v,_,y,m,b,w,S,k=r&&r.that,T=!(!r||!r.AS_ENTRIES),x=!(!r||!r.IS_RECORD),E=!(!r||!r.IS_ITERATOR),P=!(!r||!r.INTERRUPTED),L=n(t,k),R=function(e){return v&&l(v,"normal",e),new h(!0,e)},C=function(e){return T?(i(e),P?L(e[0],e[1],R):L(e[0],e[1])):P?L(e,R):L(e)};if(x)v=e.iterator;else if(E)v=e;else{if(!(_=p(e)))throw d(s(e)+" is not iterable");if(a(_)){for(y=0,m=u(e);m>y;y++)if((b=C(e[y]))&&c(g,b))return b;return new h(!1)}v=f(e,_)}for(w=x?e.next:v.next;!(S=o(w,v)).done;){try{b=C(S.value)}catch(e){l(v,"throw",e)}if("object"==typeof b&&b&&c(g,b))return b}return new h(!1)}},function(e,t){e.exports={}},function(e,t,r){var n=r(4),o=r(22),i=r(1),s=r(88),a=r(55),u=r(6),c=r(166),f=r(103),p=r(14),l=r(51),d=o&&o.prototype,h=u("species"),g=!1,v=i(n.PromiseRejectionEvent),_=s("Promise",(function(){var e=a(o),t=e!==String(o);if(!t&&66===l)return!0;if(p&&(!d.catch||!d.finally))return!0;if(!l||l<51||!/native code/.test(e)){var r=new o((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[h]=n,!(g=r.then((function(){}))instanceof n))return!0}return!t&&(c||f)&&!v}));e.exports={CONSTRUCTOR:_,REJECTION_EVENT:v,SUBCLASSING:g}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtility=void 0;var n=r(0),o=r(17);t.UrlUtility=function(){function e(){!function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.addQueryParam=function e(t,r,n){return t.indexOf("?")<0&&(t+="?"),"?"!==t[t.length-1]&&(t+="&"),t+=encodeURIComponent(r),t+="=",t+=encodeURIComponent(n)},e.parseUrlFragment=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.Global;"string"!=typeof t&&(t=i.location.href);var s=t.lastIndexOf(r);s>=0&&(t=t.substr(s+1)),"?"===r&&(s=t.indexOf("#"))>=0&&(t=t.substr(0,s));for(var a,u={},c=/([^&=]+)=([^&]*)/g,f=0;a=c.exec(t);)if(u[decodeURIComponent(a[1])]=decodeURIComponent(a[2].replace(/\+/g," ")),f++>50)return n.Log.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters",t),{error:"Response exceeded expected number of parameters"};for(var p in u)return u;return{}},e}()},function(e,t){e.exports=function(e){return null==e}},function(e,t,r){var n=r(2);e.exports=n({}.isPrototypeOf)},function(e,t){e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(e,t,r){var n=r(4),o=r(9),i=n.document,s=o(i)&&o(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},function(e,t,r){var n,o,i,s=r(131),a=r(4),u=r(9),c=r(18),f=r(11),p=r(53),l=r(56),d=r(57),h="Object already initialized",g=a.TypeError,v=a.WeakMap;if(s||p.state){var _=p.state||(p.state=new v);_.get=_.get,_.has=_.has,_.set=_.set,n=function(e,t){if(_.has(e))throw g(h);return t.facade=e,_.set(e,t),t},o=function(e){return _.get(e)||{}},i=function(e){return _.has(e)}}else{var y=l("state");d[y]=!0,n=function(e,t){if(f(e,y))throw g(h);return t.facade=e,c(e,y,t),t},o=function(e){return f(e,y)?e[y]:{}},i=function(e){return f(e,y)}}e.exports={set:n,get:o,has:i,enforce:function(e){return i(e)?o(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=o(t)).type!==e)throw g("Incompatible receiver, "+e+" required");return r}}}},function(e,t,r){var n=r(135);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},function(e,t,r){var n=r(136);e.exports=function(e){return n(e.length)}},function(e,t,r){var n,o=r(12),i=r(140),s=r(58),a=r(57),u=r(90),c=r(36),f=r(56),p=f("IE_PROTO"),l=function(){},d=function(e){return"<script>"+e+"</"+"script>"},h=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t;g="undefined"!=typeof document?document.domain&&n?h(n):((t=c("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):h(n);for(var r=s.length;r--;)delete g.prototype[s[r]];return g()};a[p]=!0,e.exports=Object.create||function e(t,r){var n;return null!==t?(l.prototype=o(t),n=new l,l.prototype=null,n[p]=t):n=g(),void 0===r?n:i.f(n,r)}},function(e,t,r){var n=r(145),o=r(10),i=r(24),s=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?s(e,t):function(){return e.apply(t,arguments)}}},function(e,t,r){var n=r(61),o=r(1),i=r(26),s=r(6)("toStringTag"),a=Object,u="Arguments"==i(function(){return arguments}());e.exports=n?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=a(e),s))?r:u?i(t):"Object"==(n=i(t))&&o(t.callee)?"Arguments":n}},function(e,t,r){(function(t){var n=r(26);e.exports=void 0!==t&&"process"==n(t)}).call(this,r(155))},function(e,t,r){var n=r(22),o=r(168),i=r(31).CONSTRUCTOR;e.exports=i||!o((function(e){n.all(e).then(void 0,(function(){}))}))},function(e,t,r){var n=r(4),o=r(2);e.exports=function(e,t){return o(n[e].prototype[t])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoseUtil=void 0;var n=r(232),o=function i(e){return e&&e.__esModule?e:{default:e}}(r(238));t.JoseUtil=(0,o.default)({jws:n.jws,KeyUtil:n.KeyUtil,X509:n.X509,crypto:n.crypto,hextob64u:n.hextob64u,b64tohex:n.b64tohex,AllowedSigningAlgs:n.AllowedSigningAlgs})},function(e,t,r){var n=r(8),o=r(7),i=r(73),s=r(20),a=r(25),u=r(50),c=r(11),f=r(80),p=Object.getOwnPropertyDescriptor;t.f=n?p:function e(t,r){if(t=a(t),r=u(r),f)try{return p(t,r)}catch(e){}if(c(t,r))return s(!o(i.f,t,r),t[r])}},function(e,t,r){var n=r(2),o=r(5),i=r(26),s=Object,a=n("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?a(e,""):s(e)}:s},function(e,t,r){var n=r(33),o=TypeError;e.exports=function(e){if(n(e))throw o("Can't call method on "+e);return e}},function(e,t,r){var n=r(129),o=r(75);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},function(e,t,r){var n,o,i=r(4),s=r(35),a=i.process,u=i.Deno,c=a&&a.versions||u&&u.version,f=c&&c.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(o=+n[1]),e.exports=o},function(e,t,r){var n=r(10),o=r(33);e.exports=function(e,t){var r=e[t];return o(r)?void 0:n(r)}},function(e,t,r){var n=r(4),o=r(54),i="__core-js_shared__",s=n[i]||o(i,{});e.exports=s},function(e,t,r){var n=r(4),o=Object.defineProperty;e.exports=function(e,t){try{o(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},function(e,t,r){var n=r(2),o=r(1),i=r(53),s=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},function(e,t,r){var n=r(78),o=r(79),i=n("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){e.exports={}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,r){var n=r(11),o=r(1),i=r(28),s=r(56),a=r(137),u=s("IE_PROTO"),c=Object,f=c.prototype;e.exports=a?c.getPrototypeOf:function(e){var t=i(e);if(n(t,u))return t[u];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof c?f:null}},function(e,t,r){var n=r(138),o=r(12),i=r(139);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function r(n,s){return o(n),i(s),t?e(n,s):n.__proto__=s,n}}():void 0)},function(e,t,r){var n={};n[r(6)("toStringTag")]="z",e.exports="[object z]"===String(n)},function(e,t,r){var n=r(42),o=String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},function(e,t,r){var n=r(15).f,o=r(11),i=r(6)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!o(e,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t,r){var n=r(4);e.exports=n},function(e,t,r){var n=r(26);e.exports=Array.isArray||function e(t){return"Array"==n(t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OidcClientSettings=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),s=r(229),a=r(67),u=r(230),c=r(23);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=".well-known/openid-configuration",l="id_token",d="openid",h="client_secret_post";t.OidcClientSettings=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.authority,o=t.metadataUrl,i=t.metadata,p=t.signingKeys,g=t.metadataSeed,v=t.client_id,_=t.client_secret,y=t.response_type,m=void 0===y?l:y,b=t.scope,w=void 0===b?d:b,S=t.redirect_uri,k=t.post_logout_redirect_uri,T=t.client_authentication,x=void 0===T?h:T,E=t.prompt,P=t.display,L=t.max_age,R=t.ui_locales,C=t.acr_values,O=t.resource,j=t.response_mode,U=t.filterProtocolClaims,M=void 0===U||U,I=t.loadUserInfo,A=void 0===I||I,N=t.staleStateAge,F=void 0===N?900:N,q=t.clockSkew,B=void 0===q?300:q,D=t.clockService,J=void 0===D?new s.ClockService:D,V=t.userInfoJwtIssuer,W=void 0===V?"OP":V,H=t.mergeClaims,z=void 0!==H&&H,K=t.stateStore,Q=void 0===K?new a.WebStorageStateStore:K,G=t.ResponseValidatorCtor,X=void 0===G?u.ResponseValidator:G,Z=t.MetadataServiceCtor,Y=void 0===Z?c.MetadataService:Z,$=t.extraQueryParams,ee=void 0===$?{}:$,te=t.extraTokenParams,re=void 0===te?{}:te;f(this,e),this._authority=r,this._metadataUrl=o,this._metadata=i,this._metadataSeed=g,this._signingKeys=p,this._client_id=v,this._client_secret=_,this._response_type=m,this._scope=w,this._redirect_uri=S,this._post_logout_redirect_uri=k,this._client_authentication=x,this._prompt=E,this._display=P,this._max_age=L,this._ui_locales=R,this._acr_values=C,this._resource=O,this._response_mode=j,this._filterProtocolClaims=!!M,this._loadUserInfo=!!A,this._staleStateAge=F,this._clockSkew=B,this._clockService=J,this._userInfoJwtIssuer=W,this._mergeClaims=!!z,this._stateStore=Q,this._validator=new X(this),this._metadataService=new Y(this),this._extraQueryParams="object"===(void 0===ee?"undefined":n(ee))?ee:{},this._extraTokenParams="object"===(void 0===re?"undefined":n(re))?re:{}}return e.prototype.getEpochTime=function e(){return this._clockService.getEpochTime()},o(e,[{key:"client_id",get:function e(){return this._client_id},set:function e(t){if(this._client_id)throw i.Log.error("OidcClientSettings.set_client_id: client_id has already been assigned."),new Error("client_id has already been assigned.");this._client_id=t}},{key:"client_secret",get:function e(){return this._client_secret}},{key:"response_type",get:function e(){return this._response_type}},{key:"scope",get:function e(){return this._scope}},{key:"redirect_uri",get:function e(){return this._redirect_uri}},{key:"post_logout_redirect_uri",get:function e(){return this._post_logout_redirect_uri}},{key:"client_authentication",get:function e(){return this._client_authentication}},{key:"prompt",get:function e(){return this._prompt}},{key:"display",get:function e(){return this._display}},{key:"max_age",get:function e(){return this._max_age}},{key:"ui_locales",get:function e(){return this._ui_locales}},{key:"acr_values",get:function e(){return this._acr_values}},{key:"resource",get:function e(){return this._resource}},{key:"response_mode",get:function e(){return this._response_mode}},{key:"authority",get:function e(){return this._authority},set:function e(t){if(this._authority)throw i.Log.error("OidcClientSettings.set_authority: authority has already been assigned."),new Error("authority has already been assigned.");this._authority=t}},{key:"metadataUrl",get:function e(){return this._metadataUrl||(this._metadataUrl=this.authority,this._metadataUrl&&this._metadataUrl.indexOf(p)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=p)),this._metadataUrl}},{key:"metadata",get:function e(){return this._metadata},set:function e(t){this._metadata=t}},{key:"metadataSeed",get:function e(){return this._metadataSeed},set:function e(t){this._metadataSeed=t}},{key:"signingKeys",get:function e(){return this._signingKeys},set:function e(t){this._signingKeys=t}},{key:"filterProtocolClaims",get:function e(){return this._filterProtocolClaims}},{key:"loadUserInfo",get:function e(){return this._loadUserInfo}},{key:"staleStateAge",get:function e(){return this._staleStateAge}},{key:"clockSkew",get:function e(){return this._clockSkew}},{key:"userInfoJwtIssuer",get:function e(){return this._userInfoJwtIssuer}},{key:"mergeClaims",get:function e(){return this._mergeClaims}},{key:"stateStore",get:function e(){return this._stateStore}},{key:"validator",get:function e(){return this._validator}},{key:"metadataService",get:function e(){return this._metadataService}},{key:"extraQueryParams",get:function e(){return this._extraQueryParams},set:function e(t){"object"===(void 0===t?"undefined":n(t))?this._extraQueryParams=t:this._extraQueryParams={}}},{key:"extraTokenParams",get:function e(){return this._extraTokenParams},set:function e(t){"object"===(void 0===t?"undefined":n(t))?this._extraTokenParams=t:this._extraTokenParams={}}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebStorageStateStore=void 0;var n=r(0),o=r(17);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.WebStorageStateStore=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.prefix,n=void 0===r?"oidc.":r,s=t.store,a=void 0===s?o.Global.localStorage:s;i(this,e),this._store=a,this._prefix=n}return e.prototype.set=function e(t,r){return n.Log.debug("WebStorageStateStore.set",t),t=this._prefix+t,this._store.setItem(t,r),Promise.resolve()},e.prototype.get=function e(t){n.Log.debug("WebStorageStateStore.get",t),t=this._prefix+t;var r=this._store.getItem(t);return Promise.resolve(r)},e.prototype.remove=function e(t){n.Log.debug("WebStorageStateStore.remove",t),t=this._prefix+t;var r=this._store.getItem(t);return this._store.removeItem(t),Promise.resolve(r)},e.prototype.getAllKeys=function e(){n.Log.debug("WebStorageStateStore.getAllKeys");for(var t=[],r=0;r<this._store.length;r++){var o=this._store.key(r);0===o.indexOf(this._prefix)&&t.push(o.substr(this._prefix.length))}return Promise.resolve(t)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonService=void 0;var n=r(0);r(17);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.JsonService=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;o(this,e),t&&Array.isArray(t)?this._contentTypes=t.slice():this._contentTypes=[],this._contentTypes.push("application/json"),r&&this._contentTypes.push("application/jwt"),this._jwtHandler=r}return e.prototype.getJson=async function e(t,r){if(!t)throw n.Log.error("JsonService.getJson: No url passed"),new Error("url");n.Log.debug("JsonService.getJson, url: ",t);var o=this._contentTypes,i=this._jwtHandler,s={method:"GET",headers:{}};r&&(s.headers.Authorization="Bearer "+r,n.Log.debug("JsonService.getJson: token passed, setting Authorization header"));var a=await fetch(t,s);if(a.ok&&200==a.status){var u=a.headers.get("Content-Type");if(u){var c=null,f=!0,p=!1,l=void 0;try{for(var d,h=o[Symbol.iterator]();!(f=(d=h.next()).done);f=!0){var g=d.value;if(u.startsWith(g)){c=g;break}}}catch(e){p=!0,l=e}finally{try{!f&&h.return&&h.return()}finally{if(p)throw l}}if("application/jwt"===c){var v={responseText:await a.text()};return await i(v)}if(c)try{return await a.json()}catch(e){throw n.Log.error("JsonService.getJson: Error parsing JSON response ",e.message),e}throw new Error("Invalid response Content-Type: "+u+", from URL: "+t)}}throw new Error(a.statusText+" ("+a.status+")")},e.prototype.postForm=async function e(t,r,o){if(!t)throw n.Log.error("JsonService.postForm: No url passed"),new Error("url");n.Log.debug("JsonService.postForm, url: ",t);var i=this._contentTypes,s={method:"POST",headers:{},body:""};s.headers["Content-Type"]="application/x-www-form-urlencoded",void 0!==o&&(s.headers.Authorization="Basic "+btoa(o));var a=new URLSearchParams;for(var u in r)a.append(u,r[u]);s.body=a.toString();var c=await fetch(t,s);if(c.ok&&200==c.status){var f=c.headers.get("Content-Type");if(f){var p=null,l=!0,d=!1,h=void 0;try{for(var g,v=i[Symbol.iterator]();!(l=(g=v.next()).done);l=!0){var _=g.value;if(f.startsWith(_)){p=_;break}}}catch(e){d=!0,h=e}finally{try{!l&&v.return&&v.return()}finally{if(d)throw h}}if(p)try{return await c.json()}catch(e){throw new Error("JsonService.postForm: Error parsing JSON response "+e.message)}throw new Error("Invalid response Content-Type: "+f+", from URL: "+t)}}if(400===c.status){var y=c.headers.get("Content-Type");if(y){var m=null,b=!0,w=!1,S=void 0;try{for(var k,T=i[Symbol.iterator]();!(b=(k=T.next()).done);b=!0){var x=k.value;if(y.startsWith(x)){m=x;break}}}catch(e){w=!0,S=e}finally{try{!b&&T.return&&T.return()}finally{if(w)throw S}}if(m)try{if((r=await c.json())&&r.error)throw n.Log.error("JsonService.postForm: Error from server: ",r.error),new Error(r.error)}catch(e){throw n.Log.error("JsonService.postForm: Error parsing JSON response: ",e.message),e}}}throw new Error(c.statusText+" ("+c.status+")")},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigninRequest=void 0;var n=r(0),o=r(32),i=r(112);t.SigninRequest=function(){function e(t){var r=t.url,s=t.client_id,a=t.redirect_uri,u=t.response_type,c=t.scope,f=t.authority,p=t.data,l=t.prompt,d=t.display,h=t.max_age,g=t.ui_locales,v=t.id_token_hint,_=t.login_hint,y=t.acr_values,m=t.resource,b=t.response_mode,w=t.request,S=t.request_uri,k=t.extraQueryParams,T=t.request_type,x=t.client_secret,E=t.extraTokenParams,P=t.skipUserInfo;if(function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw n.Log.error("SigninRequest.ctor: No url passed"),new Error("url");if(!s)throw n.Log.error("SigninRequest.ctor: No client_id passed"),new Error("client_id");if(!a)throw n.Log.error("SigninRequest.ctor: No redirect_uri passed"),new Error("redirect_uri");if(!u)throw n.Log.error("SigninRequest.ctor: No response_type passed"),new Error("response_type");if(!c)throw n.Log.error("SigninRequest.ctor: No scope passed"),new Error("scope");if(!f)throw n.Log.error("SigninRequest.ctor: No authority passed"),new Error("authority");var R=e.isOidc(u),C=e.isCode(u);b||(b=e.isCode(u)?"query":null),this.state=new i.SigninState({nonce:R,data:p,client_id:s,authority:f,redirect_uri:a,code_verifier:C,request_type:T,response_mode:b,client_secret:x,scope:c,extraTokenParams:E,skipUserInfo:P}),r=o.UrlUtility.addQueryParam(r,"client_id",s),r=o.UrlUtility.addQueryParam(r,"redirect_uri",a),r=o.UrlUtility.addQueryParam(r,"response_type",u),r=o.UrlUtility.addQueryParam(r,"scope",c),r=o.UrlUtility.addQueryParam(r,"state",this.state.id),R&&(r=o.UrlUtility.addQueryParam(r,"nonce",this.state.nonce)),C&&(r=o.UrlUtility.addQueryParam(r,"code_challenge",this.state.code_challenge),r=o.UrlUtility.addQueryParam(r,"code_challenge_method","S256"));var O={prompt:l,display:d,max_age:h,ui_locales:g,id_token_hint:v,login_hint:_,acr_values:y,resource:m,request:w,request_uri:S,response_mode:b};for(var j in O)O[j]&&(r=o.UrlUtility.addQueryParam(r,j,O[j]));for(var U in k)r=o.UrlUtility.addQueryParam(r,U,k[U]);this.url=r}return e.isOidc=function e(t){return!!t.split(/\s+/g).filter((function(e){return"id_token"===e}))[0]},e.isOAuth=function e(t){return!!t.split(/\s+/g).filter((function(e){return"token"===e}))[0]},e.isCode=function e(t){return!!t.split(/\s+/g).filter((function(e){return"code"===e}))[0]},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.State=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),i=function s(e){return e&&e.__esModule?e:{default:e}}(r(113));function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.State=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.id,n=t.data,o=t.created,s=t.request_type;a(this,e),this._id=r||(0,i.default)(),this._data=n,this._created="number"==typeof o&&o>0?o:parseInt(Date.now()/1e3),this._request_type=s}return e.prototype.toStorageString=function e(){return o.Log.debug("State.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type})},e.fromStorageString=function t(r){return o.Log.debug("State.fromStorageString"),new e(JSON.parse(r))},e.clearStaleState=function t(r,n){var i=Date.now()/1e3-n;return r.getAllKeys().then((function(t){o.Log.debug("State.clearStaleState: got keys",t);for(var n=[],s=function s(a){var c=t[a];u=r.get(c).then((function(t){var n=!1;if(t)try{var s=e.fromStorageString(t);o.Log.debug("State.clearStaleState: got item from key: ",c,s.created),s.created<=i&&(n=!0)}catch(e){o.Log.error("State.clearStaleState: Error parsing state for key",c,e.message),n=!0}else o.Log.debug("State.clearStaleState: no item in storage for key: ",c),n=!0;if(n)return o.Log.debug("State.clearStaleState: removed item for key: ",c),r.remove(c)})),n.push(u)},a=0;a<t.length;a++){var u;s(a)}return o.Log.debug("State.clearStaleState: waiting on promise count:",n.length),Promise.all(n)}))},n(e,[{key:"id",get:function e(){return this._id}},{key:"data",get:function e(){return this._data}},{key:"created",get:function e(){return this._created}},{key:"request_type",get:function e(){return this._request_type}}]),e}()},function(e,t,r){r(128)},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);t.f=i?function e(t){var r=o(this,t);return!!r&&r.enumerable}:n},function(e,t){var r="object"==typeof document&&document.all,n=void 0===r&&void 0!==r;e.exports={all:r,IS_HTMLDDA:n}},function(e,t,r){var n=r(13),o=r(1),i=r(34),s=r(76),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&i(t.prototype,a(e))}},function(e,t,r){var n=r(77);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,r){var n=r(51),o=r(5);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(e,t,r){var n=r(14),o=r(53);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.29.0",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"})},function(e,t,r){var n=r(2),o=0,i=Math.random(),s=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++o+i,36)}},function(e,t,r){var n=r(8),o=r(5),i=r(36);e.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(8),o=r(5);e.exports=n&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(e,t,r){var n=r(2),o=r(5),i=r(1),s=r(11),a=r(8),u=r(83).CONFIGURABLE,c=r(55),f=r(37),p=f.enforce,l=f.get,d=String,h=Object.defineProperty,g=n("".slice),v=n("".replace),_=n([].join),y=a&&!o((function(){return 8!==h((function(){}),"length",{value:8}).length})),m=String(String).split("String"),b=e.exports=function(e,t,r){"Symbol("===g(d(t),0,7)&&(t="["+v(d(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!s(e,"name")||u&&e.name!==t)&&(a?h(e,"name",{value:t,configurable:!0}):e.name=t),y&&r&&s(r,"arity")&&e.length!==r.arity&&h(e,"length",{value:r.arity});try{r&&s(r,"constructor")&&r.constructor?a&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=p(e);return s(n,"source")||(n.source=_(m,"string"==typeof t?t:"")),e};Function.prototype.toString=b((function e(){return i(this)&&l(this).source||c(this)}),"toString")},function(e,t,r){var n=r(8),o=r(11),i=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=o(i,"name"),u=a&&"something"===function e(){}.name,c=a&&(!n||n&&s(i,"name").configurable);e.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},function(e,t,r){var n=r(11),o=r(132),i=r(47),s=r(15);e.exports=function(e,t,r){for(var a=o(t),u=s.f,c=i.f,f=0;f<a.length;f++){var p=a[f];n(e,p)||r&&n(r,p)||u(e,p,c(t,p))}}},function(e,t,r){var n=r(2),o=r(11),i=r(25),s=r(134).indexOf,a=r(57),u=n([].push);e.exports=function(e,t){var r,n=i(e),c=0,f=[];for(r in n)!o(a,r)&&o(n,r)&&u(f,r);for(;t.length>c;)o(n,r=t[c++])&&(~s(f,r)||u(f,r));return f}},function(e,t,r){var n=r(38),o=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?o(r+t,0):i(r,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(5),o=r(1),i=/#|\.prototype\./,s=function(e,t){var r=u[a(e)];return r==f||r!=c&&(o(t)?n(t):!!t)},a=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",f=s.POLYFILL="P";e.exports=s},function(e,t,r){var n=r(85),o=r(58);e.exports=Object.keys||function e(t){return n(t,o)}},function(e,t,r){var n=r(13);e.exports=n("document","documentElement")},function(e,t,r){var n=r(42),o=r(52),i=r(33),s=r(30),a=r(6)("iterator");e.exports=function(e){if(!i(e))return o(e,a)||o(e,"@@iterator")||s[n(e)]}},function(e,t,r){"use strict";var n=r(25),o=r(93),i=r(30),s=r(37),a=r(15).f,u=r(94),c=r(96),f=r(14),p=r(8),l="Array Iterator",d=s.set,h=s.getterFor(l);e.exports=u(Array,"Array",(function(e,t){d(this,{type:l,target:n(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,c(void 0,!0)):c("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values");var g=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!f&&p&&"values"!==g.name)try{a(g,"name",{value:"values"})}catch(e){}},function(e,t,r){var n=r(6),o=r(40),i=r(15).f,s=n("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,{configurable:!0,value:o(null)}),e.exports=function(e){a[s][e]=!0}},function(e,t,r){"use strict";var n=r(3),o=r(7),i=r(14),s=r(83),a=r(1),u=r(150),c=r(59),f=r(60),p=r(63),l=r(18),d=r(19),h=r(6),g=r(30),v=r(95),_=s.PROPER,y=s.CONFIGURABLE,m=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,w=h("iterator"),S="keys",k="values",T="entries",x=function(){return this};e.exports=function(e,t,r,s,h,v,E){u(r,t,s);var P,L,R,C=function(e){if(e===h&&I)return I;if(!b&&e in U)return U[e];switch(e){case S:return function t(){return new r(this,e)};case k:return function t(){return new r(this,e)};case T:return function t(){return new r(this,e)}}return function(){return new r(this)}},O=t+" Iterator",j=!1,U=e.prototype,M=U[w]||U["@@iterator"]||h&&U[h],I=!b&&M||C(h),A="Array"==t&&U.entries||M;if(A&&(P=c(A.call(new e)))!==Object.prototype&&P.next&&(i||c(P)===m||(f?f(P,m):a(P[w])||d(P,w,x)),p(P,O,!0,!0),i&&(g[O]=x)),_&&h==k&&M&&M.name!==k&&(!i&&y?l(U,"name",k):(j=!0,I=function e(){return o(M,this)})),h)if(L={values:C(k),keys:v?I:C(S),entries:C(T)},E)for(R in L)(b||j||!(R in U))&&d(U,R,L[R]);else n({target:t,proto:!0,forced:b||j},L);return i&&!E||U[w]===I||d(U,w,I,{name:h}),g[t]=I,L}},function(e,t,r){"use strict";var n,o,i,s=r(5),a=r(1),u=r(9),c=r(40),f=r(59),p=r(19),l=r(6),d=r(14),h=l("iterator"),g=!1;[].keys&&("next"in(i=[].keys())?(o=f(f(i)))!==Object.prototype&&(n=o):g=!0),!u(n)||s((function(){var e={};return n[h].call(e)!==e}))?n={}:d&&(n=c(n)),a(n[h])||p(n,h,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},function(e,t){e.exports=function(e,t){return{value:e,done:t}}},function(e,t,r){var n=r(12),o=r(159),i=r(33),s=r(6)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||i(r=n(a)[s])?t:o(r)}},function(e,t,r){var n=r(2),o=r(5),i=r(1),s=r(42),a=r(13),u=r(55),c=function(){},f=[],p=a("Reflect","construct"),l=/^\s*(?:class|function)\b/,d=n(l.exec),h=!l.exec(c),g=function e(t){if(!i(t))return!1;try{return p(c,f,t),!0}catch(e){return!1}},v=function e(t){if(!i(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!d(l,u(t))}catch(e){return!0}};v.sham=!0,e.exports=!p||o((function(){var e;return g(g.call)||!g(Object)||!g((function(){e=!0}))||e}))?v:g},function(e,t,r){var n,o,i,s,a=r(4),u=r(160),c=r(41),f=r(1),p=r(11),l=r(5),d=r(90),h=r(100),g=r(36),v=r(161),_=r(101),y=r(43),m=a.setImmediate,b=a.clearImmediate,w=a.process,S=a.Dispatch,k=a.Function,T=a.MessageChannel,x=a.String,E=0,P={},L="onreadystatechange";l((function(){n=a.location}));var R=function(e){if(p(P,e)){var t=P[e];delete P[e],t()}},C=function(e){return function(){R(e)}},O=function(e){R(e.data)},j=function(e){a.postMessage(x(e),n.protocol+"//"+n.host)};m&&b||(m=function e(t){v(arguments.length,1);var r=f(t)?t:k(t),n=h(arguments,1);return P[++E]=function(){u(r,void 0,n)},o(E),E},b=function e(t){delete P[t]},y?o=function(e){w.nextTick(C(e))}:S&&S.now?o=function(e){S.now(C(e))}:T&&!_?(s=(i=new T).port2,i.port1.onmessage=O,o=c(s.postMessage,s)):a.addEventListener&&f(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!l(j)?(o=j,a.addEventListener("message",O,!1)):o=L in g("script")?function(e){d.appendChild(g("script")).onreadystatechange=function(){d.removeChild(this),R(e)}}:function(e){setTimeout(C(e),0)}),e.exports={set:m,clear:b}},function(e,t,r){var n=r(2);e.exports=n([].slice)},function(e,t,r){var n=r(35);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},function(e,t){var r=function(){this.head=null,this.tail=null};r.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=r},function(e,t){e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},function(e,t,r){var n=r(12),o=r(9),i=r(16);e.exports=function(e,t){if(n(e),o(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},function(e,t,r){"use strict";var n=r(3),o=r(7),i=r(10),s=r(16),a=r(21),u=r(29);n({target:"Promise",stat:!0,forced:r(44)},{allSettled:function e(t){var r=this,n=s.f(r),c=n.resolve,f=n.reject,p=a((function(){var e=i(r.resolve),n=[],s=0,a=1;u(t,(function(t){var i=s++,u=!1;a++,o(e,r,t).then((function(e){u||(u=!0,n[i]={status:"fulfilled",value:e},--a||c(n))}),(function(e){u||(u=!0,n[i]={status:"rejected",reason:e},--a||c(n))}))})),--a||c(n)}));return p.error&&f(p.value),n.promise}})},function(e,t,r){"use strict";var n=r(3),o=r(7),i=r(10),s=r(13),a=r(16),u=r(21),c=r(29),f=r(44),p="No one promise resolved";n({target:"Promise",stat:!0,forced:f},{any:function e(t){var r=this,n=s("AggregateError"),f=a.f(r),l=f.resolve,d=f.reject,h=u((function(){var e=i(r.resolve),s=[],a=0,u=1,f=!1;c(t,(function(t){var i=a++,c=!1;u++,o(e,r,t).then((function(e){c||f||(f=!0,l(e))}),(function(e){c||f||(c=!0,s[i]=e,--u||d(new n(s,p)))}))})),--u||d(new n(s,p))}));return h.error&&d(h.value),f.promise}})},function(e,t,r){var n=r(41),o=r(2),i=r(48),s=r(28),a=r(39),u=r(108),c=o([].push),f=function(e){var t=1==e,r=2==e,o=3==e,f=4==e,p=6==e,l=7==e,d=5==e||p;return function(h,g,v,_){for(var y,m,b=s(h),w=i(b),S=n(g,v),k=a(w),T=0,x=_||u,E=t?x(h,k):r||l?x(h,0):void 0;k>T;T++)if((d||T in w)&&(m=S(y=w[T],T,b),e))if(t)E[T]=m;else if(m)switch(e){case 3:return!0;case 5:return y;case 6:return T;case 2:c(E,y)}else switch(e){case 4:return!1;case 7:c(E,y)}return p?-1:o||f?f:E}};e.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},function(e,t,r){var n=r(203);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OidcClient=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),i=r(66),s=r(111),a=r(69),u=r(239),c=r(240),f=r(241),p=r(112),l=r(70);function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.OidcClient=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d(this,e),t instanceof i.OidcClientSettings?this._settings=t:this._settings=new i.OidcClientSettings(t)}return e.prototype.createSigninRequest=function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.response_type,i=r.scope,s=r.redirect_uri,u=r.data,c=r.state,f=r.prompt,p=r.display,l=r.max_age,d=r.ui_locales,h=r.id_token_hint,g=r.login_hint,v=r.acr_values,_=r.resource,y=r.request,m=r.request_uri,b=r.response_mode,w=r.extraQueryParams,S=r.extraTokenParams,k=r.request_type,T=r.skipUserInfo,x=arguments[1];o.Log.debug("OidcClient.createSigninRequest");var E=this._settings.client_id;n=n||this._settings.response_type,i=i||this._settings.scope,s=s||this._settings.redirect_uri,f=f||this._settings.prompt,p=p||this._settings.display,l=l||this._settings.max_age,d=d||this._settings.ui_locales,v=v||this._settings.acr_values,_=_||this._settings.resource,b=b||this._settings.response_mode,w=w||this._settings.extraQueryParams,S=S||this._settings.extraTokenParams;var P=this._settings.authority;return a.SigninRequest.isCode(n)&&"code"!==n?Promise.reject(new Error("OpenID Connect hybrid flow is not supported")):this._metadataService.getAuthorizationEndpoint().then((function(e){o.Log.debug("OidcClient.createSigninRequest: Received authorization endpoint",e);var r=new a.SigninRequest({url:e,client_id:E,redirect_uri:s,response_type:n,scope:i,data:u||c,authority:P,prompt:f,display:p,max_age:l,ui_locales:d,id_token_hint:h,login_hint:g,acr_values:v,resource:_,request:y,request_uri:m,extraQueryParams:w,extraTokenParams:S,request_type:k,response_mode:b,client_secret:t._settings.client_secret,skipUserInfo:T}),L=r.state;return(x=x||t._stateStore).set(L.id,L.toStorageString()).then((function(){return r}))}))},e.prototype.readSigninResponseState=function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];o.Log.debug("OidcClient.readSigninResponseState");var i="query"===this._settings.response_mode||!this._settings.response_mode&&a.SigninRequest.isCode(this._settings.response_type),s=i?"?":"#",c=new u.SigninResponse(t,s);if(!c.state)return o.Log.error("OidcClient.readSigninResponseState: No state in response"),Promise.reject(new Error("No state in response"));r=r||this._stateStore;var f=n?r.remove.bind(r):r.get.bind(r);return f(c.state).then((function(e){if(!e)throw o.Log.error("OidcClient.readSigninResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:p.SigninState.fromStorageString(e),response:c}}))},e.prototype.processSigninResponse=function e(t,r){var n=this;return o.Log.debug("OidcClient.processSigninResponse"),this.readSigninResponseState(t,r,!0).then((function(e){var t=e.state,r=e.response;return o.Log.debug("OidcClient.processSigninResponse: Received state from storage; validating response"),n._validator.validateSigninResponse(t,r)}))},e.prototype.createSignoutRequest=function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.id_token_hint,i=r.data,s=r.state,a=r.post_logout_redirect_uri,u=r.extraQueryParams,f=r.request_type,p=arguments[1];return o.Log.debug("OidcClient.createSignoutRequest"),a=a||this._settings.post_logout_redirect_uri,u=u||this._settings.extraQueryParams,this._metadataService.getEndSessionEndpoint().then((function(e){if(!e)throw o.Log.error("OidcClient.createSignoutRequest: No end session endpoint url returned"),new Error("no end session endpoint");o.Log.debug("OidcClient.createSignoutRequest: Received end session endpoint",e);var r=new c.SignoutRequest({url:e,id_token_hint:n,post_logout_redirect_uri:a,data:i||s,extraQueryParams:u,request_type:f}),l=r.state;return l&&(o.Log.debug("OidcClient.createSignoutRequest: Signout request has state to persist"),(p=p||t._stateStore).set(l.id,l.toStorageString())),r}))},e.prototype.readSignoutResponseState=function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];o.Log.debug("OidcClient.readSignoutResponseState");var i=new f.SignoutResponse(t);if(!i.state)return o.Log.debug("OidcClient.readSignoutResponseState: No state in response"),i.error?(o.Log.warn("OidcClient.readSignoutResponseState: Response was error: ",i.error),Promise.reject(new s.ErrorResponse(i))):Promise.resolve({state:void 0,response:i});var a=i.state;r=r||this._stateStore;var u=n?r.remove.bind(r):r.get.bind(r);return u(a).then((function(e){if(!e)throw o.Log.error("OidcClient.readSignoutResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:l.State.fromStorageString(e),response:i}}))},e.prototype.processSignoutResponse=function e(t,r){var n=this;return o.Log.debug("OidcClient.processSignoutResponse"),this.readSignoutResponseState(t,r,!0).then((function(e){var t=e.state,r=e.response;return t?(o.Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"),n._validator.validateSignoutResponse(t,r)):(o.Log.debug("OidcClient.processSignoutResponse: No state from storage; skipping validating response"),r)}))},e.prototype.clearStaleState=function e(t){return o.Log.debug("OidcClient.clearStaleState"),t=t||this._stateStore,l.State.clearStaleState(t,this.settings.staleStateAge)},n(e,[{key:"_stateStore",get:function e(){return this.settings.stateStore}},{key:"_validator",get:function e(){return this.settings.validator}},{key:"_metadataService",get:function e(){return this.settings.metadataService}},{key:"settings",get:function e(){return this._settings}},{key:"metadataService",get:function e(){return this._metadataService}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenClient=void 0;var n=r(68),o=r(23),i=r(0);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.TokenClient=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.JsonService,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.MetadataService;if(s(this,e),!t)throw i.Log.error("TokenClient.ctor: No settings passed"),new Error("settings");this._settings=t,this._jsonService=new r,this._metadataService=new a(this._settings)}return e.prototype.exchangeCode=function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(r=Object.assign({},r)).grant_type=r.grant_type||"authorization_code",r.client_id=r.client_id||this._settings.client_id,r.client_secret=r.client_secret||this._settings.client_secret,r.redirect_uri=r.redirect_uri||this._settings.redirect_uri;var n=void 0,o=r._client_authentication||this._settings._client_authentication;return delete r._client_authentication,r.code?r.redirect_uri?r.code_verifier?r.client_id?r.client_secret||"client_secret_basic"!=o?("client_secret_basic"==o&&(n=r.client_id+":"+r.client_secret,delete r.client_id,delete r.client_secret),this._metadataService.getTokenEndpoint(!1).then((function(e){return i.Log.debug("TokenClient.exchangeCode: Received token endpoint"),t._jsonService.postForm(e,r,n).then((function(e){return i.Log.debug("TokenClient.exchangeCode: response received"),e}))}))):(i.Log.error("TokenClient.exchangeCode: No client_secret passed"),Promise.reject(new Error("A client_secret is required"))):(i.Log.error("TokenClient.exchangeCode: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(i.Log.error("TokenClient.exchangeCode: No code_verifier passed"),Promise.reject(new Error("A code_verifier is required"))):(i.Log.error("TokenClient.exchangeCode: No redirect_uri passed"),Promise.reject(new Error("A redirect_uri is required"))):(i.Log.error("TokenClient.exchangeCode: No code passed"),Promise.reject(new Error("A code is required")))},e.prototype.exchangeRefreshToken=function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(r=Object.assign({},r)).grant_type=r.grant_type||"refresh_token",r.client_id=r.client_id||this._settings.client_id,r.client_secret=r.client_secret||this._settings.client_secret;var n=void 0,o=r._client_authentication||this._settings._client_authentication;return delete r._client_authentication,r.refresh_token?r.client_id?("client_secret_basic"==o&&(n=r.client_id+":"+r.client_secret,delete r.client_id,delete r.client_secret),this._metadataService.getTokenEndpoint(!1).then((function(e){return i.Log.debug("TokenClient.exchangeRefreshToken: Received token endpoint"),t._jsonService.postForm(e,r,n).then((function(e){return i.Log.debug("TokenClient.exchangeRefreshToken: response received"),e}))}))):(i.Log.error("TokenClient.exchangeRefreshToken: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(i.Log.error("TokenClient.exchangeRefreshToken: No refresh_token passed"),Promise.reject(new Error("A refresh_token is required")))},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorResponse=void 0;var n=r(0);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}t.ErrorResponse=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=r.error,a=r.error_description,u=r.error_uri,c=r.state,f=r.session_state;if(o(this,t),!s)throw n.Log.error("No error passed to ErrorResponse"),new Error("error");var p=i(this,e.call(this,a||s));return p.name="ErrorResponse",p.error=s,p.error_description=a,p.error_uri=u,p.state=c,p.session_state=f,p}return function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(Error)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigninState=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),i=r(70),s=r(46),a=function u(e){return e&&e.__esModule?e:{default:e}}(r(113));function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}t.SigninState=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.nonce,o=r.authority,i=r.client_id,u=r.redirect_uri,p=r.code_verifier,l=r.response_mode,d=r.client_secret,h=r.scope,g=r.extraTokenParams,v=r.skipUserInfo;c(this,t);var _=f(this,e.call(this,arguments[0]));if(!0===n?_._nonce=(0,a.default)():n&&(_._nonce=n),!0===p?_._code_verifier=(0,a.default)()+(0,a.default)()+(0,a.default)():p&&(_._code_verifier=p),_.code_verifier){var y=s.JoseUtil.hashString(_.code_verifier,"SHA256");_._code_challenge=s.JoseUtil.hexToBase64Url(y)}return _._redirect_uri=u,_._authority=o,_._client_id=i,_._response_mode=l,_._client_secret=d,_._scope=h,_._extraTokenParams=g,_._skipUserInfo=v,_}return function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.toStorageString=function e(){return o.Log.debug("SigninState.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,nonce:this.nonce,code_verifier:this.code_verifier,redirect_uri:this.redirect_uri,authority:this.authority,client_id:this.client_id,response_mode:this.response_mode,client_secret:this.client_secret,scope:this.scope,extraTokenParams:this.extraTokenParams,skipUserInfo:this.skipUserInfo})},t.fromStorageString=function e(r){return o.Log.debug("SigninState.fromStorageString"),new t(JSON.parse(r))},n(t,[{key:"nonce",get:function e(){return this._nonce}},{key:"authority",get:function e(){return this._authority}},{key:"client_id",get:function e(){return this._client_id}},{key:"redirect_uri",get:function e(){return this._redirect_uri}},{key:"code_verifier",get:function e(){return this._code_verifier}},{key:"code_challenge",get:function e(){return this._code_challenge}},{key:"response_mode",get:function e(){return this._response_mode}},{key:"client_secret",get:function e(){return this._client_secret}},{key:"scope",get:function e(){return this._scope}},{key:"extraTokenParams",get:function e(){return this._extraTokenParams}},{key:"skipUserInfo",get:function e(){return this._skipUserInfo}}]),t}(i.State)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function n(){return("undefined"!=o&&null!==o&&void 0!==o.getRandomValues?i:s)().replace(/-/g,"")};var o="undefined"!=typeof window?window.crypto||window.msCrypto:null;function i(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^o.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)}))}function s(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^16*Math.random()>>e/4).toString(16)}))}e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.User=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0);t.User=function(){function e(t){var r=t.id_token,n=t.session_state,o=t.access_token,i=t.refresh_token,s=t.token_type,a=t.scope,u=t.profile,c=t.expires_at,f=t.state;!function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id_token=r,this.session_state=n,this.access_token=o,this.refresh_token=i,this.token_type=s,this.scope=a,this.profile=u,this.expires_at=c,this.state=f}return e.prototype.toStorageString=function e(){return o.Log.debug("User.toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})},e.fromStorageString=function t(r){return o.Log.debug("User.fromStorageString"),new e(JSON.parse(r))},n(e,[{key:"expires_in",get:function e(){if(this.expires_at){var t=parseInt(Date.now()/1e3);return this.expires_at-t}},set:function e(t){var r=parseInt(t);if("number"==typeof r&&r>0){var n=parseInt(Date.now()/1e3);this.expires_at=n+r}}},{key:"expired",get:function e(){var t=this.expires_in;if(void 0!==t)return t<=0}},{key:"scopes",get:function e(){return(this.scope||"").split(" ")}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessTokenEvents=void 0;var n=r(0),o=r(251);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.AccessTokenEvents=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.accessTokenExpiringNotificationTime,n=void 0===r?60:r,s=t.accessTokenExpiringTimer,a=void 0===s?new o.Timer("Access token expiring"):s,u=t.accessTokenExpiredTimer,c=void 0===u?new o.Timer("Access token expired"):u;i(this,e),this._accessTokenExpiringNotificationTime=n,this._accessTokenExpiring=a,this._accessTokenExpired=c}return e.prototype.load=function e(t){if(t.access_token&&void 0!==t.expires_in){var r=t.expires_in;if(n.Log.debug("AccessTokenEvents.load: access token present, remaining duration:",r),r>0){var o=r-this._accessTokenExpiringNotificationTime;o<=0&&(o=1),n.Log.debug("AccessTokenEvents.load: registering expiring timer in:",o),this._accessTokenExpiring.init(o)}else n.Log.debug("AccessTokenEvents.load: canceling existing expiring timer becase we're past expiration."),this._accessTokenExpiring.cancel();var i=r+1;n.Log.debug("AccessTokenEvents.load: registering expired timer in:",i),this._accessTokenExpired.init(i)}else this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},e.prototype.unload=function e(){n.Log.debug("AccessTokenEvents.unload: canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},e.prototype.addAccessTokenExpiring=function e(t){this._accessTokenExpiring.addHandler(t)},e.prototype.removeAccessTokenExpiring=function e(t){this._accessTokenExpiring.removeHandler(t)},e.prototype.addAccessTokenExpired=function e(t){this._accessTokenExpired.addHandler(t)},e.prototype.removeAccessTokenExpired=function e(t){this._accessTokenExpired.removeHandler(t)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;var n=r(0);t.Event=function(){function e(t){!function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=t,this._callbacks=[]}return e.prototype.addHandler=function e(t){this._callbacks.push(t)},e.prototype.removeHandler=function e(t){var r=this._callbacks.findIndex((function(e){return e===t}));r>=0&&this._callbacks.splice(r,1)},e.prototype.raise=function e(){n.Log.debug("Event: Raising event: "+this._name);for(var t=0;t<this._callbacks.length;t++){var r;(r=this._callbacks)[t].apply(r,arguments)}},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionMonitor=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),i=r(118),s=r(17);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.SessionMonitor=function(){function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.CheckSessionIFrame,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.Global.timer;if(a(this,e),!t)throw o.Log.error("SessionMonitor.ctor: No user manager passed to SessionMonitor"),new Error("userManager");this._userManager=t,this._CheckSessionIFrameCtor=n,this._timer=u,this._userManager.events.addUserLoaded(this._start.bind(this)),this._userManager.events.addUserUnloaded(this._stop.bind(this)),Promise.resolve(this._userManager.getUser().then((function(e){e?r._start(e):r._settings.monitorAnonymousSession&&r._userManager.querySessionStatus().then((function(e){var t={session_state:e.session_state};e.sub&&e.sid&&(t.profile={sub:e.sub,sid:e.sid}),r._start(t)})).catch((function(e){o.Log.error("SessionMonitor ctor: error from querySessionStatus:",e.message)}))})).catch((function(e){o.Log.error("SessionMonitor ctor: error from getUser:",e.message)})))}return e.prototype._start=function e(t){var r=this,n=t.session_state;n&&(t.profile?(this._sub=t.profile.sub,this._sid=t.profile.sid,o.Log.debug("SessionMonitor._start: session_state:",n,", sub:",this._sub)):(this._sub=void 0,this._sid=void 0,o.Log.debug("SessionMonitor._start: session_state:",n,", anonymous user")),this._checkSessionIFrame?this._checkSessionIFrame.start(n):this._metadataService.getCheckSessionIframe().then((function(e){if(e){o.Log.debug("SessionMonitor._start: Initializing check session iframe");var t=r._client_id,i=r._checkSessionInterval,s=r._stopCheckSessionOnError;r._checkSessionIFrame=new r._CheckSessionIFrameCtor(r._callback.bind(r),t,e,i,s),r._checkSessionIFrame.load().then((function(){r._checkSessionIFrame.start(n)}))}else o.Log.warn("SessionMonitor._start: No check session iframe found in the metadata")})).catch((function(e){o.Log.error("SessionMonitor._start: Error from getCheckSessionIframe:",e.message)})))},e.prototype._stop=function e(){var t=this;if(this._sub=void 0,this._sid=void 0,this._checkSessionIFrame&&(o.Log.debug("SessionMonitor._stop"),this._checkSessionIFrame.stop()),this._settings.monitorAnonymousSession)var r=this._timer.setInterval((function(){t._timer.clearInterval(r),t._userManager.querySessionStatus().then((function(e){var r={session_state:e.session_state};e.sub&&e.sid&&(r.profile={sub:e.sub,sid:e.sid}),t._start(r)})).catch((function(e){o.Log.error("SessionMonitor: error from querySessionStatus:",e.message)}))}),1e3)},e.prototype._callback=function e(){var t=this;this._userManager.querySessionStatus().then((function(e){var r=!0;e?e.sub===t._sub?(r=!1,t._checkSessionIFrame.start(e.session_state),e.sid===t._sid?o.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, restarting check session iframe; session_state:",e.session_state):(o.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, session state has changed, restarting check session iframe; session_state:",e.session_state),t._userManager.events._raiseUserSessionChanged())):o.Log.debug("SessionMonitor._callback: Different subject signed into OP:",e.sub):o.Log.debug("SessionMonitor._callback: Subject no longer signed into OP"),r&&(t._sub?(o.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed out event"),t._userManager.events._raiseUserSignedOut()):(o.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed in event"),t._userManager.events._raiseUserSignedIn()))})).catch((function(e){t._sub&&(o.Log.debug("SessionMonitor._callback: Error calling queryCurrentSigninSession; raising signed out event",e.message),t._userManager.events._raiseUserSignedOut())}))},n(e,[{key:"_settings",get:function e(){return this._userManager.settings}},{key:"_metadataService",get:function e(){return this._userManager.metadataService}},{key:"_client_id",get:function e(){return this._settings.client_id}},{key:"_checkSessionInterval",get:function e(){return this._settings.checkSessionInterval}},{key:"_stopCheckSessionOnError",get:function e(){return this._settings.stopCheckSessionOnError}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckSessionIFrame=void 0;var n=r(0);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.CheckSessionIFrame=function(){function e(t,r,n,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];o(this,e),this._callback=t,this._client_id=r,this._url=n,this._interval=i||2e3,this._stopOnError=s;var a=n.indexOf("/",n.indexOf("//")+2);this._frame_origin=n.substr(0,a),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.width=0,this._frame.height=0,this._frame.src=n}return e.prototype.load=function e(){var t=this;return new Promise((function(e){t._frame.onload=function(){e()},window.document.body.appendChild(t._frame),t._boundMessageEvent=t._message.bind(t),window.addEventListener("message",t._boundMessageEvent,!1)}))},e.prototype._message=function e(t){t.origin===this._frame_origin&&t.source===this._frame.contentWindow&&("error"===t.data?(n.Log.error("CheckSessionIFrame: error message from check session op iframe"),this._stopOnError&&this.stop()):"changed"===t.data?(n.Log.debug("CheckSessionIFrame: changed message from check session op iframe"),this.stop(),this._callback()):n.Log.debug("CheckSessionIFrame: "+t.data+" message from check session op iframe"))},e.prototype.start=function e(t){var r=this;if(this._session_state!==t){n.Log.debug("CheckSessionIFrame.start"),this.stop(),this._session_state=t;var o=function e(){r._frame.contentWindow.postMessage(r._client_id+" "+r._session_state,r._frame_origin)};o(),this._timer=window.setInterval(o,this._interval)}},e.prototype.stop=function e(){this._session_state=null,this._timer&&(n.Log.debug("CheckSessionIFrame.stop"),window.clearInterval(this._timer),this._timer=null)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenRevocationClient=void 0;var n=r(0),o=r(23);r(17);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s="access_token",a="refresh_token";t.TokenRevocationClient=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.MetadataService;if(i(this,e),!t)throw n.Log.error("TokenRevocationClient.ctor: No settings provided"),new Error("No settings provided.");this._settings=t,this._metadataService=new r(this._settings)}return e.prototype.revoke=function e(t,r){var o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"access_token";if(!t)throw n.Log.error("TokenRevocationClient.revoke: No token provided"),new Error("No token provided.");if(i!==s&&i!=a)throw n.Log.error("TokenRevocationClient.revoke: Invalid token type"),new Error("Invalid token type.");return this._metadataService.getRevocationEndpoint().then((function(e){if(e){n.Log.debug("TokenRevocationClient.revoke: Revoking "+i);var s=o._settings.client_id,a=o._settings.client_secret;return o._revoke(e,s,a,t,i)}if(r)throw n.Log.error("TokenRevocationClient.revoke: Revocation not supported"),new Error("Revocation not supported")}))},e.prototype._revoke=async function e(t,r,o,i,s){var a={method:"POST",headers:{},body:""};a.headers["Content-Type"]="application/x-www-form-urlencoded";var u=new URLSearchParams;u.append("client_id",r),o&&u.append("client_secret",o),u.append("token_type_hint",s),u.append("token",i),a.body=u.toString();try{var c=await fetch(t,a);if(n.Log.debug("TokenRevocationClient.revoke: HTTP response received, status",c.status),c.ok&&200==c.status)return;throw new Error(c.statusText+" ("+c.status+")")}catch(e){throw new Error("TokenRevocationClient.revoke: Network Error.",e.message)}},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaPopupWindow=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0);t.CordovaPopupWindow=function(){function e(t){var r=this;!function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._promise=new Promise((function(e,t){r._resolve=e,r._reject=t})),this.features=t.popupWindowFeatures||"location=no,toolbar=no,zoom=no",this.target=t.popupWindowTarget||"_blank",this.redirect_uri=t.startUrl,o.Log.debug("CordovaPopupWindow.ctor: redirect_uri: "+this.redirect_uri)}return e.prototype._isInAppBrowserInstalled=function e(t){return["cordova-plugin-inappbrowser","cordova-plugin-inappbrowser.inappbrowser","org.apache.cordova.inappbrowser"].some((function(e){return t.hasOwnProperty(e)}))},e.prototype.navigate=function e(t){if(t&&t.url){if(!window.cordova)return this._error("cordova is undefined");var r=window.cordova.require("cordova/plugin_list").metadata;if(!1===this._isInAppBrowserInstalled(r))return this._error("InAppBrowser plugin not found");this._popup=cordova.InAppBrowser.open(t.url,this.target,this.features),this._popup?(o.Log.debug("CordovaPopupWindow.navigate: popup successfully created"),this._exitCallbackEvent=this._exitCallback.bind(this),this._loadStartCallbackEvent=this._loadStartCallback.bind(this),this._popup.addEventListener("exit",this._exitCallbackEvent,!1),this._popup.addEventListener("loadstart",this._loadStartCallbackEvent,!1)):this._error("Error opening popup window")}else this._error("No url provided");return this.promise},e.prototype._loadStartCallback=function e(t){0===t.url.indexOf(this.redirect_uri)&&this._success({url:t.url})},e.prototype._exitCallback=function e(t){this._error(t)},e.prototype._success=function e(t){this._cleanup(),o.Log.debug("CordovaPopupWindow: Successful response from cordova popup window"),this._resolve(t)},e.prototype._error=function e(t){this._cleanup(),o.Log.error(t),this._reject(new Error(t))},e.prototype.close=function e(){this._cleanup()},e.prototype._cleanup=function e(){this._popup&&(o.Log.debug("CordovaPopupWindow: cleaning up popup"),this._popup.removeEventListener("exit",this._exitCallbackEvent,!1),this._popup.removeEventListener("loadstart",this._loadStartCallbackEvent,!1),this._popup.close()),this._popup=null},n(e,[{key:"promise",get:function e(){return this._promise}}]),e}()},function(e,t,r){r(122),e.exports=r(228)},function(e,t,r){"use strict";r(123),r(183),r(190),r(197),r(204),r(211),r(217)},function(e,t,r){e.exports=r(124)},function(e,t,r){var n=r(125);r(179),r(180),r(181),r(182),e.exports=n},function(e,t,r){var n=r(126);e.exports=n},function(e,t,r){var n=r(127);r(176),e.exports=n},function(e,t,r){r(71),r(92),r(151),r(153),r(105),r(106),r(173),r(174);var n=r(64);e.exports=n.Promise},function(e,t,r){"use strict";var n=r(3),o=r(34),i=r(59),s=r(60),a=r(84),u=r(40),c=r(18),f=r(20),p=r(141),l=r(142),d=r(29),h=r(149),g=r(6)("toStringTag"),v=Error,_=[].push,y=function e(t,r){var n,a=o(m,this);s?n=s(v(),a?i(this):m):(n=a?this:u(m),c(n,g,"Error")),void 0!==r&&c(n,"message",h(r)),l(n,y,n.stack,1),arguments.length>2&&p(n,arguments[2]);var f=[];return d(t,_,{that:f}),c(n,"errors",f),n};s?s(y,v):a(y,v,{name:!0});var m=y.prototype=u(v.prototype,{constructor:f(1,y),message:f(1,""),name:f(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:y})},function(e,t,r){var n=r(7),o=r(9),i=r(75),s=r(52),a=r(130),u=r(6),c=TypeError,f=u("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,u=s(e,f);if(u){if(void 0===t&&(t="default"),r=n(u,e,t),!o(r)||i(r))return r;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},function(e,t,r){var n=r(7),o=r(1),i=r(9),s=TypeError;e.exports=function(e,t){var r,a;if("string"===t&&o(r=e.toString)&&!i(a=n(r,e)))return a;if(o(r=e.valueOf)&&!i(a=n(r,e)))return a;if("string"!==t&&o(r=e.toString)&&!i(a=n(r,e)))return a;throw s("Can't convert object to primitive value")}},function(e,t,r){var n=r(4),o=r(1),i=n.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},function(e,t,r){var n=r(13),o=r(2),i=r(133),s=r(87),a=r(12),u=o([].concat);e.exports=n("Reflect","ownKeys")||function e(t){var r=i.f(a(t)),n=s.f;return n?u(r,n(t)):r}},function(e,t,r){var n=r(85),o=r(58).concat("length","prototype");t.f=Object.getOwnPropertyNames||function e(t){return n(t,o)}},function(e,t,r){var n=r(25),o=r(86),i=r(39),s=function(e){return function(t,r,s){var a,u=n(t),c=i(u),f=o(s,c);if(e&&r!=r){for(;c>f;)if((a=u[f++])!=a)return!0}else for(;c>f;f++)if((e||f in u)&&u[f]===r)return e||f||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=Math.trunc||function e(t){var o=+t;return(o>0?n:r)(o)}},function(e,t,r){var n=r(38),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t,r){var n=r(5);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,r){var n=r(2),o=r(10);e.exports=function(e,t,r){try{return n(o(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},function(e,t,r){var n=r(1),o=String,i=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},function(e,t,r){var n=r(8),o=r(81),i=r(15),s=r(12),a=r(25),u=r(89);t.f=n&&!o?Object.defineProperties:function e(t,r){s(t);for(var n,o=a(r),c=u(r),f=c.length,p=0;f>p;)i.f(t,n=c[p++],o[n]);return t}},function(e,t,r){var n=r(9),o=r(18);e.exports=function(e,t){n(t)&&"cause"in t&&o(e,"cause",t.cause)}},function(e,t,r){var n=r(18),o=r(143),i=r(144),s=Error.captureStackTrace;e.exports=function(e,t,r,a){i&&(s?s(e,t):n(e,"stack",o(r,a)))}},function(e,t,r){var n=r(2),o=Error,i=n("".replace),s=String(o("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,u=a.test(s);e.exports=function(e,t){if(u&&"string"==typeof e&&!o.prepareStackTrace)for(;t--;)e=i(e,a,"");return e}},function(e,t,r){var n=r(5),o=r(20);e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)}))},function(e,t,r){var n=r(26),o=r(2);e.exports=function(e){if("Function"===n(e))return o(e)}},function(e,t,r){var n=r(6),o=r(30),i=n("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[i]===e)}},function(e,t,r){var n=r(7),o=r(10),i=r(12),s=r(27),a=r(91),u=TypeError;e.exports=function(e,t){var r=arguments.length<2?a(e):t;if(o(r))return i(n(r,e));throw u(s(e)+" is not iterable")}},function(e,t,r){var n=r(7),o=r(12),i=r(52);e.exports=function(e,t,r){var s,a;o(e);try{if(!(s=i(e,"return"))){if("throw"===t)throw r;return r}s=n(s,e)}catch(e){a=!0,s=e}if("throw"===t)throw r;if(a)throw s;return o(s),r}},function(e,t,r){var n=r(62);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},function(e,t,r){"use strict";var n=r(95).IteratorPrototype,o=r(40),i=r(20),s=r(63),a=r(30),u=function(){return this};e.exports=function(e,t,r,c){var f=t+" Iterator";return e.prototype=o(n,{next:i(+!c,r)}),s(e,f,!1,!0),a[f]=u,e}},function(e,t,r){var n=r(61),o=r(19),i=r(152);n||o(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,r){"use strict";var n=r(61),o=r(42);e.exports=n?{}.toString:function e(){return"[object "+o(this)+"]"}},function(e,t,r){r(154),r(167),r(169),r(170),r(171),r(172)},function(e,t,r){"use strict";var n,o,i,s=r(3),a=r(14),u=r(43),c=r(4),f=r(7),p=r(19),l=r(60),d=r(63),h=r(156),g=r(10),v=r(1),_=r(9),y=r(158),m=r(97),b=r(99).set,w=r(162),S=r(165),k=r(21),T=r(102),x=r(37),E=r(22),P=r(31),L=r(16),R="Promise",C=P.CONSTRUCTOR,O=P.REJECTION_EVENT,j=P.SUBCLASSING,U=x.getterFor(R),M=x.set,I=E&&E.prototype,A=E,N=I,F=c.TypeError,q=c.document,B=c.process,D=L.f,J=D,V=!!(q&&q.createEvent&&c.dispatchEvent),W="unhandledrejection",H=function(e){var t;return!(!_(e)||!v(t=e.then))&&t},z=function(e,t){var r,n,o,i=t.value,s=1==t.state,a=s?e.ok:e.fail,u=e.resolve,c=e.reject,p=e.domain;try{a?(s||(2===t.rejection&&Z(t),t.rejection=1),!0===a?r=i:(p&&p.enter(),r=a(i),p&&(p.exit(),o=!0)),r===e.promise?c(F("Promise-chain cycle")):(n=H(r))?f(n,r,u,c):u(r)):c(i)}catch(e){p&&!o&&p.exit(),c(e)}},K=function(e,t){e.notified||(e.notified=!0,w((function(){for(var r,n=e.reactions;r=n.get();)z(r,e);e.notified=!1,t&&!e.rejection&&G(e)})))},Q=function(e,t,r){var n,o;V?((n=q.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!O&&(o=c["on"+e])?o(n):e===W&&S("Unhandled promise rejection",r)},G=function(e){f(b,c,(function(){var t,r=e.facade,n=e.value;if(X(e)&&(t=k((function(){u?B.emit("unhandledRejection",n,r):Q(W,r,n)})),e.rejection=u||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},Z=function(e){f(b,c,(function(){var t=e.facade;u?B.emit("rejectionHandled",t):Q("rejectionhandled",t,e.value)}))},Y=function(e,t,r){return function(n){e(t,n,r)}},$=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,K(e,!0))},ee=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw F("Promise can't be resolved itself");var n=H(t);n?w((function(){var r={done:!1};try{f(n,t,Y(ee,r,e),Y($,r,e))}catch(t){$(r,t,e)}})):(e.value=t,e.state=1,K(e,!1))}catch(t){$({done:!1},t,e)}}};if(C&&(N=(A=function e(t){y(this,N),g(t),f(n,this);var r=U(this);try{t(Y(ee,r),Y($,r))}catch(e){$(r,e)}}).prototype,(n=function e(t){M(this,{type:R,done:!1,notified:!1,parent:!1,reactions:new T,rejection:!1,state:0,value:void 0})}).prototype=p(N,"then",(function e(t,r){var n=U(this),o=D(m(this,A));return n.parent=!0,o.ok=!v(t)||t,o.fail=v(r)&&r,o.domain=u?B.domain:void 0,0==n.state?n.reactions.add(o):w((function(){z(o,n)})),o.promise})),o=function(){var e=new n,t=U(e);this.promise=e,this.resolve=Y(ee,t),this.reject=Y($,t)},L.f=D=function(e){return e===A||undefined===e?new o(e):J(e)},!a&&v(E)&&I!==Object.prototype)){i=I.then,j||p(I,"then",(function e(t,r){var n=this;return new A((function(e,t){f(i,n,e,t)})).then(t,r)}),{unsafe:!0});try{delete I.constructor}catch(e){}l&&l(I,N)}s({global:!0,constructor:!0,wrap:!0,forced:C},{Promise:A}),d(A,R,!1,!0),h(R)},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var u,c=[],f=!1,p=-1;function l(){f&&u&&(f=!1,u.length?c=u.concat(c):p=-1,c.length&&d())}function d(){if(!f){var e=a(l);f=!0;for(var t=c.length;t;){for(u=c,c=[];++p<t;)u&&u[p].run();p=-1,t=c.length}u=null,f=!1,function r(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||f||a(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){"use strict";var n=r(13),o=r(157),i=r(6),s=r(8),a=i("species");e.exports=function(e){var t=n(e);s&&t&&!t[a]&&o(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,r){var n=r(82),o=r(15);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),o.f(e,t,r)}},function(e,t,r){var n=r(34),o=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw o("Incorrect invocation")}},function(e,t,r){var n=r(98),o=r(27),i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not a constructor")}},function(e,t,r){var n=r(24),o=Function.prototype,i=o.apply,s=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(i):function(){return s.apply(i,arguments)})},function(e,t){var r=TypeError;e.exports=function(e,t){if(e<t)throw r("Not enough arguments");return e}},function(e,t,r){var n,o,i,s,a,u=r(4),c=r(41),f=r(47).f,p=r(99).set,l=r(102),d=r(101),h=r(163),g=r(164),v=r(43),_=u.MutationObserver||u.WebKitMutationObserver,y=u.document,m=u.process,b=u.Promise,w=f(u,"queueMicrotask"),S=w&&w.value;if(!S){var k=new l,T=function(){var e,t;for(v&&(e=m.domain)&&e.exit();t=k.get();)try{t()}catch(e){throw k.head&&n(),e}e&&e.enter()};d||v||g||!_||!y?!h&&b&&b.resolve?((s=b.resolve(void 0)).constructor=b,a=c(s.then,s),n=function(){a(T)}):v?n=function(){m.nextTick(T)}:(p=c(p,u),n=function(){p(T)}):(o=!0,i=y.createTextNode(""),new _(T).observe(i,{characterData:!0}),n=function(){i.data=o=!o}),S=function(e){k.head||n(),k.add(e)}}e.exports=S},function(e,t,r){var n=r(35);e.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},function(e,t,r){var n=r(35);e.exports=/web0s(?!.*chrome)/i.test(n)},function(e,t){e.exports=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}},function(e,t,r){var n=r(103),o=r(43);e.exports=!n&&!o&&"object"==typeof window&&"object"==typeof document},function(e,t,r){"use strict";var n=r(3),o=r(7),i=r(10),s=r(16),a=r(21),u=r(29);n({target:"Promise",stat:!0,forced:r(44)},{all:function e(t){var r=this,n=s.f(r),c=n.resolve,f=n.reject,p=a((function(){var e=i(r.resolve),n=[],s=0,a=1;u(t,(function(t){var i=s++,u=!1;a++,o(e,r,t).then((function(e){u||(u=!0,n[i]=e,--a||c(n))}),f)})),--a||c(n)}));return p.error&&f(p.value),n.promise}})},function(e,t,r){var n=r(6)("iterator"),o=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){o=!0}};s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},function(e,t,r){"use strict";var n=r(3),o=r(14),i=r(31).CONSTRUCTOR,s=r(22),a=r(13),u=r(1),c=r(19),f=s&&s.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!o&&u(s)){var p=a("Promise").prototype.catch;f.catch!==p&&c(f,"catch",p,{unsafe:!0})}},function(e,t,r){"use strict";var n=r(3),o=r(7),i=r(10),s=r(16),a=r(21),u=r(29);n({target:"Promise",stat:!0,forced:r(44)},{race:function e(t){var r=this,n=s.f(r),c=n.reject,f=a((function(){var e=i(r.resolve);u(t,(function(t){o(e,r,t).then(n.resolve,c)}))}));return f.error&&c(f.value),n.promise}})},function(e,t,r){"use strict";var n=r(3),o=r(7),i=r(16);n({target:"Promise",stat:!0,forced:r(31).CONSTRUCTOR},{reject:function e(t){var r=i.f(this);return o(r.reject,void 0,t),r.promise}})},function(e,t,r){"use strict";var n=r(3),o=r(13),i=r(14),s=r(22),a=r(31).CONSTRUCTOR,u=r(104),c=o("Promise"),f=i&&!a;n({target:"Promise",stat:!0,forced:i||a},{resolve:function e(t){return u(f&&this===c?s:this,t)}})},function(e,t,r){"use strict";var n=r(3),o=r(14),i=r(22),s=r(5),a=r(13),u=r(1),c=r(97),f=r(104),p=r(19),l=i&&i.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!i&&s((function(){l.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=c(this,a("Promise")),r=u(e);return this.then(r?function(r){return f(t,e()).then((function(){return r}))}:e,r?function(r){return f(t,e()).then((function(){throw r}))}:e)}}),!o&&u(i)){var d=a("Promise").prototype.finally;l.finally!==d&&p(l,"finally",d,{unsafe:!0})}},function(e,t,r){"use strict";var n=r(175).charAt,o=r(62),i=r(37),s=r(94),a=r(96),u="String Iterator",c=i.set,f=i.getterFor(u);s(String,"String",(function(e){c(this,{type:u,string:o(e),index:0})}),(function e(){var t,r=f(this),o=r.string,i=r.index;return i>=o.length?a(void 0,!0):(t=n(o,i),r.index+=t.length,a(t,!1))}))},function(e,t,r){var n=r(2),o=r(38),i=r(62),s=r(49),a=n("".charAt),u=n("".charCodeAt),c=n("".slice),f=function(e){return function(t,r){var n,f,p=i(s(t)),l=o(r),d=p.length;return l<0||l>=d?e?"":void 0:(n=u(p,l))<55296||n>56319||l+1===d||(f=u(p,l+1))<56320||f>57343?e?a(p,l):n:e?c(p,l,l+2):f-56320+(n-55296<<10)+65536}};e.exports={codeAt:f(!1),charAt:f(!0)}},function(e,t,r){var n=r(4),o=r(177),i=r(178),s=r(92),a=r(18),u=r(6),c=u("iterator"),f=u("toStringTag"),p=s.values,l=function(e,t){if(e){if(e[c]!==p)try{a(e,c,p)}catch(t){e[c]=p}if(e[f]||a(e,f,t),o[t])for(var r in s)if(e[r]!==s[r])try{a(e,r,s[r])}catch(t){e[r]=s[r]}}};for(var d in o)l(n[d]&&n[d].prototype,d);l(i,"DOMTokenList")},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,r){var n=r(36)("span").classList,o=n&&n.constructor&&n.constructor.prototype;e.exports=o===Object.prototype?void 0:o},function(e,t,r){r(71)},function(e,t,r){r(105)},function(e,t,r){"use strict";var n=r(3),o=r(16),i=r(21);n({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=o.f(this),r=i(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}})},function(e,t,r){r(106)},function(e,t,r){e.exports=r(184)},function(e,t,r){var n=r(185);e.exports=n},function(e,t,r){var n=r(186);e.exports=n},function(e,t,r){var n=r(187);e.exports=n},function(e,t,r){r(188);var n=r(45);e.exports=n("Function","bind")},function(e,t,r){var n=r(3),o=r(189);n({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},function(e,t,r){"use strict";var n=r(2),o=r(10),i=r(9),s=r(11),a=r(100),u=r(24),c=Function,f=n([].concat),p=n([].join),l={},d=function(e,t,r){if(!s(l,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";l[t]=c("C,a","return new C("+p(n,",")+")")}return l[t](e,r)};e.exports=u?c.bind:function e(t){var r=o(this),n=r.prototype,s=a(arguments,1),u=function e(){var n=f(s,a(arguments));return this instanceof u?d(r,n.length,n):r.apply(t,n)};return i(n)&&(u.prototype=n),u}},function(e,t,r){e.exports=r(191)},function(e,t,r){var n=r(192);e.exports=n},function(e,t,r){var n=r(193);e.exports=n},function(e,t,r){var n=r(194);e.exports=n},function(e,t,r){r(195);var n=r(64);e.exports=n.Object.assign},function(e,t,r){var n=r(3),o=r(196);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},function(e,t,r){"use strict";var n=r(8),o=r(2),i=r(7),s=r(5),a=r(89),u=r(87),c=r(73),f=r(28),p=r(48),l=Object.assign,d=Object.defineProperty,h=o([].concat);e.exports=!l||s((function(){if(n&&1!==l({b:1},l(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach((function(e){t[e]=e})),7!=l({},e)[r]||a(l({},t)).join("")!=o}))?function e(t,r){for(var o=f(t),s=arguments.length,l=1,d=u.f,g=c.f;s>l;)for(var v,_=p(arguments[l++]),y=d?h(a(_),d(_)):a(_),m=y.length,b=0;m>b;)v=y[b++],n&&!i(g,_,v)||(o[v]=_[v]);return o}:l},function(e,t,r){e.exports=r(198)},function(e,t,r){var n=r(199);e.exports=n},function(e,t,r){var n=r(200);e.exports=n},function(e,t,r){var n=r(201);e.exports=n},function(e,t,r){r(202);var n=r(45);e.exports=n("Array","find")},function(e,t,r){"use strict";var n=r(3),o=r(107).find,i=r(93),s="find",a=!0;s in[]&&Array(1).find((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{find:function e(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(s)},function(e,t,r){var n=r(65),o=r(98),i=r(9),s=r(6)("species"),a=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(o(t)&&(t===a||n(t.prototype))||i(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?a:t}},function(e,t,r){e.exports=r(205)},function(e,t,r){var n=r(206);e.exports=n},function(e,t,r){var n=r(207);e.exports=n},function(e,t,r){var n=r(208);e.exports=n},function(e,t,r){r(209);var n=r(45);e.exports=n("Array","some")},function(e,t,r){"use strict";var n=r(3),o=r(107).some;n({target:"Array",proto:!0,forced:!r(210)("some")},{some:function e(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){"use strict";var n=r(5);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},function(e,t,r){e.exports=r(212)},function(e,t,r){var n=r(213);e.exports=n},function(e,t,r){var n=r(214);e.exports=n},function(e,t,r){var n=r(215);e.exports=n},function(e,t,r){r(216);var n=r(64);e.exports=n.Array.isArray},function(e,t,r){r(3)({target:"Array",stat:!0},{isArray:r(65)})},function(e,t,r){e.exports=r(218)},function(e,t,r){var n=r(219);e.exports=n},function(e,t,r){var n=r(220);e.exports=n},function(e,t,r){var n=r(221);e.exports=n},function(e,t,r){r(222);var n=r(45);e.exports=n("Array","splice")},function(e,t,r){"use strict";var n=r(3),o=r(28),i=r(86),s=r(38),a=r(39),u=r(223),c=r(224),f=r(108),p=r(225),l=r(226),d=r(227)("splice"),h=Math.max,g=Math.min;n({target:"Array",proto:!0,forced:!d},{splice:function e(t,r){var n,d,v,_,y,m,b=o(this),w=a(b),S=i(t,w),k=arguments.length;for(0===k?n=d=0:1===k?(n=0,d=w-S):(n=k-2,d=g(h(s(r),0),w-S)),c(w+n-d),v=f(b,d),_=0;_<d;_++)(y=S+_)in b&&p(v,_,b[y]);if(v.length=d,n<d){for(_=S;_<w-d;_++)m=_+n,(y=_+d)in b?b[m]=b[y]:l(b,m);for(_=w;_>w-d+n;_--)l(b,_-1)}else if(n>d)for(_=w-d;_>S;_--)m=_+n-1,(y=_+d-1)in b?b[m]=b[y]:l(b,m);for(_=0;_<n;_++)b[_+S]=arguments[_+2];return u(b,w-d+n),v}})},function(e,t,r){"use strict";var n=r(8),o=r(65),i=TypeError,s=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(o(e)&&!s(e,"length").writable)throw i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},function(e,t){var r=TypeError;e.exports=function(e){if(e>9007199254740991)throw r("Maximum allowed index exceeded");return e}},function(e,t,r){"use strict";var n=r(50),o=r(15),i=r(20);e.exports=function(e,t,r){var s=n(t);s in e?o.f(e,s,i(0,r)):e[s]=r}},function(e,t,r){"use strict";var n=r(27),o=TypeError;e.exports=function(e,t){if(!delete e[t])throw o("Cannot delete property "+n(t)+" of "+n(e))}},function(e,t,r){var n=r(5),o=r(6),i=r(51),s=o("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(109),i=r(66),s=r(67),a=r(242),u=r(243),c=r(115),f=r(23),p=r(253),l=r(254),d=r(118),h=r(119),g=r(117),v=r(17),_=r(114),y=r(255);t.default={Version:y.Version,Log:n.Log,OidcClient:o.OidcClient,OidcClientSettings:i.OidcClientSettings,WebStorageStateStore:s.WebStorageStateStore,InMemoryWebStorage:a.InMemoryWebStorage,UserManager:u.UserManager,AccessTokenEvents:c.AccessTokenEvents,MetadataService:f.MetadataService,CordovaPopupNavigator:p.CordovaPopupNavigator,CordovaIFrameNavigator:l.CordovaIFrameNavigator,CheckSessionIFrame:d.CheckSessionIFrame,TokenRevocationClient:h.TokenRevocationClient,SessionMonitor:g.SessionMonitor,Global:v.Global,User:_.User},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ClockService=function(){function e(){!function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.getEpochTime=function e(){return Promise.resolve(Date.now()/1e3|0)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseValidator=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=r(0),i=r(23),s=r(231),a=r(110),u=r(111),c=r(46);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=["nonce","at_hash","iat","nbf","exp","aud","iss","c_hash"];t.ResponseValidator=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.MetadataService,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.UserInfoService,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c.JoseUtil,p=arguments.length>4&&void 0!==arguments[4]?arguments[4]:a.TokenClient;if(f(this,e),!t)throw o.Log.error("ResponseValidator.ctor: No settings passed to ResponseValidator"),new Error("settings");this._settings=t,this._metadataService=new r(this._settings),this._userInfoService=new n(this._settings),this._joseUtil=u,this._tokenClient=new p(this._settings)}return e.prototype.validateSigninResponse=function e(t,r){var n=this;return o.Log.debug("ResponseValidator.validateSigninResponse"),this._processSigninParams(t,r).then((function(e){return o.Log.debug("ResponseValidator.validateSigninResponse: state processed"),n._validateTokens(t,e).then((function(e){return o.Log.debug("ResponseValidator.validateSigninResponse: tokens validated"),n._processClaims(t,e).then((function(e){return o.Log.debug("ResponseValidator.validateSigninResponse: claims processed"),e}))}))}))},e.prototype.validateSignoutResponse=function e(t,r){return t.id!==r.state?(o.Log.error("ResponseValidator.validateSignoutResponse: State does not match"),Promise.reject(new Error("State does not match"))):(o.Log.debug("ResponseValidator.validateSignoutResponse: state validated"),r.state=t.data,r.error?(o.Log.warn("ResponseValidator.validateSignoutResponse: Response was error",r.error),Promise.reject(new u.ErrorResponse(r))):Promise.resolve(r))},e.prototype._processSigninParams=function e(t,r){if(t.id!==r.state)return o.Log.error("ResponseValidator._processSigninParams: State does not match"),Promise.reject(new Error("State does not match"));if(!t.client_id)return o.Log.error("ResponseValidator._processSigninParams: No client_id on state"),Promise.reject(new Error("No client_id on state"));if(!t.authority)return o.Log.error("ResponseValidator._processSigninParams: No authority on state"),Promise.reject(new Error("No authority on state"));if(this._settings.authority){if(this._settings.authority&&this._settings.authority!==t.authority)return o.Log.error("ResponseValidator._processSigninParams: authority mismatch on settings vs. signin state"),Promise.reject(new Error("authority mismatch on settings vs. signin state"))}else this._settings.authority=t.authority;if(this._settings.client_id){if(this._settings.client_id&&this._settings.client_id!==t.client_id)return o.Log.error("ResponseValidator._processSigninParams: client_id mismatch on settings vs. signin state"),Promise.reject(new Error("client_id mismatch on settings vs. signin state"))}else this._settings.client_id=t.client_id;return o.Log.debug("ResponseValidator._processSigninParams: state validated"),r.state=t.data,r.error?(o.Log.warn("ResponseValidator._processSigninParams: Response was error",r.error),Promise.reject(new u.ErrorResponse(r))):t.nonce&&!r.id_token?(o.Log.error("ResponseValidator._processSigninParams: Expecting id_token in response"),Promise.reject(new Error("No id_token in response"))):!t.nonce&&r.id_token?(o.Log.error("ResponseValidator._processSigninParams: Not expecting id_token in response"),Promise.reject(new Error("Unexpected id_token in response"))):t.code_verifier&&!r.code?(o.Log.error("ResponseValidator._processSigninParams: Expecting code in response"),Promise.reject(new Error("No code in response"))):!t.code_verifier&&r.code?(o.Log.error("ResponseValidator._processSigninParams: Not expecting code in response"),Promise.reject(new Error("Unexpected code in response"))):(r.scope||(r.scope=t.scope),Promise.resolve(r))},e.prototype._processClaims=function e(t,r){var n=this;if(r.isOpenIdConnect){if(o.Log.debug("ResponseValidator._processClaims: response is OIDC, processing claims"),r.profile=this._filterProtocolClaims(r.profile),!0!==t.skipUserInfo&&this._settings.loadUserInfo&&r.access_token)return o.Log.debug("ResponseValidator._processClaims: loading user info"),this._userInfoService.getClaims(r.access_token).then((function(e){return o.Log.debug("ResponseValidator._processClaims: user info claims received from user info endpoint"),e.sub!==r.profile.sub?(o.Log.error("ResponseValidator._processClaims: sub from user info endpoint does not match sub in id_token"),Promise.reject(new Error("sub from user info endpoint does not match sub in id_token"))):(r.profile=n._mergeClaims(r.profile,e),o.Log.debug("ResponseValidator._processClaims: user info claims received, updated profile:",r.profile),r)}));o.Log.debug("ResponseValidator._processClaims: not loading user info")}else o.Log.debug("ResponseValidator._processClaims: response is not OIDC, not processing claims");return Promise.resolve(r)},e.prototype._mergeClaims=function e(t,r){var o=Object.assign({},t);for(var i in r){var s=r[i];Array.isArray(s)||(s=[s]);for(var a=0;a<s.length;a++){var u=s[a];o[i]?Array.isArray(o[i])?o[i].indexOf(u)<0&&o[i].push(u):o[i]!==u&&("object"===(void 0===u?"undefined":n(u))&&this._settings.mergeClaims?o[i]=this._mergeClaims(o[i],u):o[i]=[o[i],u]):o[i]=u}}return o},e.prototype._filterProtocolClaims=function e(t){o.Log.debug("ResponseValidator._filterProtocolClaims, incoming claims:",t);var r=Object.assign({},t);return this._settings._filterProtocolClaims?(p.forEach((function(e){delete r[e]})),o.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims filtered",r)):o.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims not filtered"),r},e.prototype._validateTokens=function e(t,r){return r.code?(o.Log.debug("ResponseValidator._validateTokens: Validating code"),this._processCode(t,r)):r.id_token?r.access_token?(o.Log.debug("ResponseValidator._validateTokens: Validating id_token and access_token"),this._validateIdTokenAndAccessToken(t,r)):(o.Log.debug("ResponseValidator._validateTokens: Validating id_token"),this._validateIdToken(t,r)):(o.Log.debug("ResponseValidator._validateTokens: No code to process or id_token to validate"),Promise.resolve(r))},e.prototype._processCode=function e(t,r){var i=this,s={client_id:t.client_id,client_secret:t.client_secret,code:r.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier};return t.extraTokenParams&&"object"===n(t.extraTokenParams)&&Object.assign(s,t.extraTokenParams),this._tokenClient.exchangeCode(s).then((function(e){for(var n in e)r[n]=e[n];return r.id_token?(o.Log.debug("ResponseValidator._processCode: token response successful, processing id_token"),i._validateIdTokenAttributes(t,r)):(o.Log.debug("ResponseValidator._processCode: token response successful, returning response"),r)}))},e.prototype._validateIdTokenAttributes=function e(t,r){var n=this;return this._metadataService.getIssuer().then((function(e){var i=t.client_id,s=n._settings.clockSkew;return o.Log.debug("ResponseValidator._validateIdTokenAttributes: Validaing JWT attributes; using clock skew (in seconds) of: ",s),n._settings.getEpochTime().then((function(a){return n._joseUtil.validateJwtAttributes(r.id_token,e,i,s,a).then((function(e){return t.nonce&&t.nonce!==e.nonce?(o.Log.error("ResponseValidator._validateIdTokenAttributes: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):e.sub?(r.profile=e,r):(o.Log.error("ResponseValidator._validateIdTokenAttributes: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))}))}))}))},e.prototype._validateIdTokenAndAccessToken=function e(t,r){var n=this;return this._validateIdToken(t,r).then((function(e){return n._validateAccessToken(e)}))},e.prototype._getSigningKeyForJwt=function e(t){var r=this;return this._metadataService.getSigningKeys().then((function(e){var n=t.header.kid;if(!e)return o.Log.error("ResponseValidator._validateIdToken: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));o.Log.debug("ResponseValidator._validateIdToken: Received signing keys");var i=void 0;if(n)i=e.filter((function(e){return e.kid===n}))[0];else{if((e=r._filterByAlg(e,t.header.alg)).length>1)return o.Log.error("ResponseValidator._validateIdToken: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));i=e[0]}return Promise.resolve(i)}))},e.prototype._getSigningKeyForJwtWithSingleRetry=function e(t){var r=this;return this._getSigningKeyForJwt(t).then((function(e){return e?Promise.resolve(e):(r._metadataService.resetSigningKeys(),r._getSigningKeyForJwt(t))}))},e.prototype._validateIdToken=function e(t,r){var n=this;if(!t.nonce)return o.Log.error("ResponseValidator._validateIdToken: No nonce on state"),Promise.reject(new Error("No nonce on state"));var i=this._joseUtil.parseJwt(r.id_token);return i&&i.header&&i.payload?t.nonce!==i.payload.nonce?(o.Log.error("ResponseValidator._validateIdToken: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):this._metadataService.getIssuer().then((function(e){return o.Log.debug("ResponseValidator._validateIdToken: Received issuer"),n._getSigningKeyForJwtWithSingleRetry(i).then((function(s){if(!s)return o.Log.error("ResponseValidator._validateIdToken: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var a=t.client_id,u=n._settings.clockSkew;return o.Log.debug("ResponseValidator._validateIdToken: Validaing JWT; using clock skew (in seconds) of: ",u),n._joseUtil.validateJwt(r.id_token,s,e,a,u).then((function(){return o.Log.debug("ResponseValidator._validateIdToken: JWT validation successful"),i.payload.sub?(r.profile=i.payload,r):(o.Log.error("ResponseValidator._validateIdToken: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))}))}))})):(o.Log.error("ResponseValidator._validateIdToken: Failed to parse id_token",i),Promise.reject(new Error("Failed to parse id_token")))},e.prototype._filterByAlg=function e(t,r){var n=null;if(r.startsWith("RS"))n="RSA";else if(r.startsWith("PS"))n="PS";else{if(!r.startsWith("ES"))return o.Log.debug("ResponseValidator._filterByAlg: alg not supported: ",r),[];n="EC"}return o.Log.debug("ResponseValidator._filterByAlg: Looking for keys that match kty: ",n),t=t.filter((function(e){return e.kty===n})),o.Log.debug("ResponseValidator._filterByAlg: Number of keys that match kty: ",n,t.length),t},e.prototype._validateAccessToken=function e(t){if(!t.profile)return o.Log.error("ResponseValidator._validateAccessToken: No profile loaded from id_token"),Promise.reject(new Error("No profile loaded from id_token"));if(!t.profile.at_hash)return o.Log.error("ResponseValidator._validateAccessToken: No at_hash in id_token"),Promise.reject(new Error("No at_hash in id_token"));if(!t.id_token)return o.Log.error("ResponseValidator._validateAccessToken: No id_token"),Promise.reject(new Error("No id_token"));var r=this._joseUtil.parseJwt(t.id_token);if(!r||!r.header)return o.Log.error("ResponseValidator._validateAccessToken: Failed to parse id_token",r),Promise.reject(new Error("Failed to parse id_token"));var n=r.header.alg;if(!n||5!==n.length)return o.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",n),Promise.reject(new Error("Unsupported alg: "+n));var i=n.substr(2,3);if(!i)return o.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",n,i),Promise.reject(new Error("Unsupported alg: "+n));if(256!==(i=parseInt(i))&&384!==i&&512!==i)return o.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",n,i),Promise.reject(new Error("Unsupported alg: "+n));var s="sha"+i,a=this._joseUtil.hashString(t.access_token,s);if(!a)return o.Log.error("ResponseValidator._validateAccessToken: access_token hash failed:",s),Promise.reject(new Error("Failed to validate at_hash"));var u=a.substr(0,a.length/2),c=this._joseUtil.hexToBase64Url(u);return c!==t.profile.at_hash?(o.Log.error("ResponseValidator._validateAccessToken: Failed to validate at_hash",c,t.profile.at_hash),Promise.reject(new Error("Failed to validate at_hash"))):(o.Log.debug("ResponseValidator._validateAccessToken: success"),Promise.resolve(t))},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserInfoService=void 0;var n=r(68),o=r(23),i=r(0),s=r(46);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.UserInfoService=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.JsonService,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.MetadataService,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:s.JoseUtil;if(a(this,e),!t)throw i.Log.error("UserInfoService.ctor: No settings passed"),new Error("settings");this._settings=t,this._jsonService=new r(void 0,void 0,this._getClaimsFromJwt.bind(this)),this._metadataService=new u(this._settings),this._joseUtil=c}return e.prototype.getClaims=function e(t){var r=this;return t?this._metadataService.getUserInfoEndpoint().then((function(e){return i.Log.debug("UserInfoService.getClaims: received userinfo url",e),r._jsonService.getJson(e,t).then((function(e){return i.Log.debug("UserInfoService.getClaims: claims received",e),e}))})):(i.Log.error("UserInfoService.getClaims: No token passed"),Promise.reject(new Error("A token is required")))},e.prototype._getClaimsFromJwt=function e(t){var r=this;try{var n=this._joseUtil.parseJwt(t.responseText);if(!n||!n.header||!n.payload)return i.Log.error("UserInfoService._getClaimsFromJwt: Failed to parse JWT",n),Promise.reject(new Error("Failed to parse id_token"));var o=n.header.kid,s=void 0;switch(this._settings.userInfoJwtIssuer){case"OP":s=this._metadataService.getIssuer();break;case"ANY":s=Promise.resolve(n.payload.iss);break;default:s=Promise.resolve(this._settings.userInfoJwtIssuer)}return s.then((function(e){return i.Log.debug("UserInfoService._getClaimsFromJwt: Received issuer:"+e),r._metadataService.getSigningKeys().then((function(s){if(!s)return i.Log.error("UserInfoService._getClaimsFromJwt: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));i.Log.debug("UserInfoService._getClaimsFromJwt: Received signing keys");var a=void 0;if(o)a=s.filter((function(e){return e.kid===o}))[0];else{if((s=r._filterByAlg(s,n.header.alg)).length>1)return i.Log.error("UserInfoService._getClaimsFromJwt: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));a=s[0]}if(!a)return i.Log.error("UserInfoService._getClaimsFromJwt: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var u=r._settings.client_id,c=r._settings.clockSkew;return i.Log.debug("UserInfoService._getClaimsFromJwt: Validaing JWT; using clock skew (in seconds) of: ",c),r._joseUtil.validateJwt(t.responseText,a,e,u,c,void 0,!0).then((function(){return i.Log.debug("UserInfoService._getClaimsFromJwt: JWT validation successful"),n.payload}))}))}))}catch(e){return i.Log.error("UserInfoService._getClaimsFromJwt: Error parsing JWT response",e.message),void reject(e)}},e.prototype._filterByAlg=function e(t,r){var n=null;if(r.startsWith("RS"))n="RSA";else if(r.startsWith("PS"))n="PS";else{if(!r.startsWith("ES"))return i.Log.debug("UserInfoService._filterByAlg: alg not supported: ",r),[];n="EC"}return i.Log.debug("UserInfoService._filterByAlg: Looking for keys that match kty: ",n),t=t.filter((function(e){return e.kty===n})),i.Log.debug("UserInfoService._filterByAlg: Number of keys that match kty: ",n,t.length),t},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AllowedSigningAlgs=t.b64tohex=t.hextob64u=t.crypto=t.X509=t.KeyUtil=t.jws=void 0;var n=s(r(233)),o=s(r(234)),i=s(r(237));function s(e){return e&&e.__esModule?e:{default:e}}var a=n.default.BigInteger,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c={b64tohex:function e(t){var r,n,o="",i=0;for(r=0;r<t.length&&"="!==t.charAt(r);++r){var s=u.indexOf(t.charAt(r));s<0||(0===i?(o+=String.fromCharCode(s>>2),n=3&s,i=1):1===i?(o+=String.fromCharCode(n<<2|s>>4),n=15&s,i=2):2===i?(o+=String.fromCharCode(n),o+=String.fromCharCode(s>>2),n=3&s,i=3):(o+=String.fromCharCode(n<<2|s>>4),o+=String.fromCharCode(15&s),i=0))}return 1===i&&(o+=String.fromCharCode(n<<2)),o},hexToBase64:function e(t){var r,n,o="";for(r=0;r+3<=t.length;r+=3)n=parseInt(t.substring(r,r+3),16),o+=u.charAt(n>>6)+u.charAt(63&n);for(r+1===t.length?(n=parseInt(t.substring(r,r+1),16),o+=u.charAt(n<<2)):r+2===t.length&&(n=parseInt(t.substring(r,r+2),16),o+=u.charAt(n>>2)+u.charAt((3&n)<<4)),"=";(3&o.length)>0;)o+="=";return o},padding:function e(t){var r=t.length%4;return 0===r?t:t+new Array(1+(4-r)).join("=")},byteArrayToHex:function e(t){for(var r="",n=0;n<t.length;n++){var o=t[n].toString(16);r+=2===o.length?o:"0"+o}return r},decodeToHEX:function e(t){return c.byteArrayToHex(i.default.toByteArray(c.padding(t)))},base64ToBase64Url:function e(t){return t=(t=(t=t.replace(/=/g,"")).replace(/\+/g,"-")).replace(/\//g,"_")},urlDecode:function e(t){return t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g," "),atob(t)}},f={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},p={sha256:o.default,SHA256:o.default};
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/function l(e,t){if(this.n=null,this.e=0,!(null!=e&&null!=t&&e.length>0&&t.length>0))throw new Error("Invalid key data");this.n=new a(e,16),this.e=parseInt(t,16)}l.prototype.verify=function(e,t){t=(t=c.decodeToHEX(t)).replace(/[^0-9a-f]|[\s\n]]/gi,"");var r=new a(t,16);if(r.bitLength()>this.n.bitLength())throw new Error("Signature does not match with the key modulus.");var n=function o(e){for(var t in f){var r=f[t],n=r.length;if(e.substring(0,n)===r)return{alg:t,hash:e.substring(n)}}return[]}(r.modPowInt(this.e,this.n).toString(16).replace(/^1f+00/,""));if(0===n.length)return!1;if(!p.hasOwnProperty(n.alg))throw new Error("Hashing algorithm is not supported.");var i=p[n.alg](e).toString();return n.hash===i};var d=["RS256"],h={JWS:{parse:function e(t){var r,n,o=t.split(".");if(3===o.length){try{r=JSON.parse(c.urlDecode(o[0])),n=JSON.parse(c.urlDecode(o[1]))}catch(e){return new Error("Token header or payload is not valid JSON")}return{headerObj:r,payloadObj:n}}},verify:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];n.forEach((function(e){if(-1===d.indexOf(e))throw new Error("Invalid signing algorithm: "+e)}));var e=new l(r.n,r.e),o=t.split("."),i=[o[0],o[1]].join(".");return e.verify(i,o[2])}}},g={getKey:function e(t){return"RSA"===t.kty?{e:c.decodeToHEX(t.e),n:c.decodeToHEX(t.n)}:null}},v={getPublicKeyFromCertPEM:function e(){throw new Error("Not implemented. Use the full oidc-client library if you need support for X509.")}},_={Util:{hashString:function e(t,r){return(0,p[r])(t).toString()}}};var y=c.b64tohex;t.jws=h,t.KeyUtil=g,t.X509=v,t.crypto=_,t.hextob64u=function m(e){return e.length%2==1&&(e="0"+e),c.base64ToBase64Url(c.hexToBase64(e))},t.b64tohex=y,t.AllowedSigningAlgs=d},function(e,t,r){(function(){var t;function r(e,t,r){null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function n(){return new r(null)}var o="undefined"!=typeof navigator;o&&"Microsoft Internet Explorer"==navigator.appName?(r.prototype.am=function i(e,t,r,n,o,s){for(var a=32767&t,u=t>>15;--s>=0;){var c=32767&this[e],f=this[e++]>>15,p=u*c+f*a;o=((c=a*c+((32767&p)<<15)+r[n]+(1073741823&o))>>>30)+(p>>>15)+u*f+(o>>>30),r[n++]=1073741823&c}return o},t=30):o&&"Netscape"!=navigator.appName?(r.prototype.am=function s(e,t,r,n,o,i){for(;--i>=0;){var s=t*this[e++]+r[n]+o;o=Math.floor(s/67108864),r[n++]=67108863&s}return o},t=26):(r.prototype.am=function a(e,t,r,n,o,i){for(var s=16383&t,a=t>>14;--i>=0;){var u=16383&this[e],c=this[e++]>>14,f=a*u+c*s;o=((u=s*u+((16383&f)<<14)+r[n]+o)>>28)+(f>>14)+a*c,r[n++]=268435455&u}return o},t=28),r.prototype.DB=t,r.prototype.DM=(1<<t)-1,r.prototype.DV=1<<t;r.prototype.FV=Math.pow(2,52),r.prototype.F1=52-t,r.prototype.F2=2*t-52;var u,c,f=new Array;for(u="0".charCodeAt(0),c=0;c<=9;++c)f[u++]=c;for(u="a".charCodeAt(0),c=10;c<36;++c)f[u++]=c;for(u="A".charCodeAt(0),c=10;c<36;++c)f[u++]=c;function p(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function l(e,t){var r=f[e.charCodeAt(t)];return null==r?-1:r}function d(e){var t=n();return t.fromInt(e),t}function h(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function g(e){this.m=e}function v(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function _(e,t){return e&t}function y(e,t){return e|t}function m(e,t){return e^t}function b(e,t){return e&~t}function w(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function S(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function k(){}function T(e){return e}function x(e){this.r2=n(),this.q3=n(),r.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}g.prototype.convert=function E(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},g.prototype.revert=function P(e){return e},g.prototype.reduce=function L(e){e.divRemTo(this.m,null,e)},g.prototype.mulTo=function R(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function C(e,t){e.squareTo(t),this.reduce(t)},v.prototype.convert=function O(e){var t=n();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(r.ZERO)>0&&this.m.subTo(t,t),t},v.prototype.revert=function j(e){var t=n();return e.copyTo(t),this.reduce(t),t},v.prototype.reduce=function U(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},v.prototype.mulTo=function M(e,t,r){e.multiplyTo(t,r),this.reduce(r)},v.prototype.sqrTo=function I(e,t){e.squareTo(t),this.reduce(t)},r.prototype.copyTo=function A(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},r.prototype.fromInt=function N(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},r.prototype.fromString=function F(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var o=e.length,i=!1,s=0;--o>=0;){var a=8==n?255&e[o]:l(e,o);a<0?"-"==e.charAt(o)&&(i=!0):(i=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=n)>=this.DB&&(s-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),i&&r.ZERO.subTo(this,this)},r.prototype.clamp=function q(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},r.prototype.dlShiftTo=function B(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},r.prototype.drShiftTo=function D(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},r.prototype.lShiftTo=function J(e,t){var r,n=e%this.DB,o=this.DB-n,i=(1<<o)-1,s=Math.floor(e/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t[r+s+1]=this[r]>>o|a,a=(this[r]&i)<<n;for(r=s-1;r>=0;--r)t[r]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},r.prototype.rShiftTo=function V(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,o=this.DB-n,i=(1<<n)-1;t[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)t[s-r-1]|=(this[s]&i)<<o,t[s-r]=this[s]>>n;n>0&&(t[this.t-r-1]|=(this.s&i)<<o),t.t=this.t-r,t.clamp()}},r.prototype.subTo=function W(e,t){for(var r=0,n=0,o=Math.min(e.t,this.t);r<o;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},r.prototype.multiplyTo=function H(e,t){var n=this.abs(),o=e.abs(),i=n.t;for(t.t=i+o.t;--i>=0;)t[i]=0;for(i=0;i<o.t;++i)t[i+n.t]=n.am(0,o[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&r.ZERO.subTo(t,t)},r.prototype.squareTo=function z(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},r.prototype.divRemTo=function K(e,t,o){var i=e.abs();if(!(i.t<=0)){var s=this.abs();if(s.t<i.t)return null!=t&&t.fromInt(0),void(null!=o&&this.copyTo(o));null==o&&(o=n());var a=n(),u=this.s,c=e.s,f=this.DB-h(i[i.t-1]);f>0?(i.lShiftTo(f,a),s.lShiftTo(f,o)):(i.copyTo(a),s.copyTo(o));var p=a.t,l=a[p-1];if(0!=l){var d=l*(1<<this.F1)+(p>1?a[p-2]>>this.F2:0),g=this.FV/d,v=(1<<this.F1)/d,_=1<<this.F2,y=o.t,m=y-p,b=null==t?n():t;for(a.dlShiftTo(m,b),o.compareTo(b)>=0&&(o[o.t++]=1,o.subTo(b,o)),r.ONE.dlShiftTo(p,b),b.subTo(a,a);a.t<p;)a[a.t++]=0;for(;--m>=0;){var w=o[--y]==l?this.DM:Math.floor(o[y]*g+(o[y-1]+_)*v);if((o[y]+=a.am(0,w,o,m,0,p))<w)for(a.dlShiftTo(m,b),o.subTo(b,o);o[y]<--w;)o.subTo(b,o)}null!=t&&(o.drShiftTo(p,t),u!=c&&r.ZERO.subTo(t,t)),o.t=p,o.clamp(),f>0&&o.rShiftTo(f,o),u<0&&r.ZERO.subTo(o,o)}}},r.prototype.invDigit=function Q(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},r.prototype.isEven=function G(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function X(e,t){if(e>4294967295||e<1)return r.ONE;var o=n(),i=n(),s=t.convert(this),a=h(e)-1;for(s.copyTo(o);--a>=0;)if(t.sqrTo(o,i),(e&1<<a)>0)t.mulTo(i,s,o);else{var u=o;o=i,i=u}return t.revert(o)},r.prototype.toString=function Z(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,o=!1,i="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(r=this[s]>>a)>0&&(o=!0,i=p(r));s>=0;)a<t?(r=(this[s]&(1<<a)-1)<<t-a,r|=this[--s]>>(a+=this.DB-t)):(r=this[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(o=!0),o&&(i+=p(r));return o?i:"0"},r.prototype.negate=function Y(){var e=n();return r.ZERO.subTo(this,e),e},r.prototype.abs=function $(){return this.s<0?this.negate():this},r.prototype.compareTo=function ee(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},r.prototype.bitLength=function te(){return this.t<=0?0:this.DB*(this.t-1)+h(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function re(e){var t=n();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(r.ZERO)>0&&e.subTo(t,t),t},r.prototype.modPowInt=function ne(e,t){var r;return r=e<256||t.isEven()?new g(t):new v(t),this.exp(e,r)},r.ZERO=d(0),r.ONE=d(1),k.prototype.convert=T,k.prototype.revert=T,k.prototype.mulTo=function oe(e,t,r){e.multiplyTo(t,r)},k.prototype.sqrTo=function ie(e,t){e.squareTo(t)},x.prototype.convert=function se(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=n();return e.copyTo(t),this.reduce(t),t},x.prototype.revert=function ae(e){return e},x.prototype.reduce=function ue(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},x.prototype.mulTo=function ce(e,t,r){e.multiplyTo(t,r),this.reduce(r)},x.prototype.sqrTo=function fe(e,t){e.squareTo(t),this.reduce(t)};var pe,le,de,he=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ge=(1<<26)/he[he.length-1];function ve(){!function e(t){le[de++]^=255&t,le[de++]^=t>>8&255,le[de++]^=t>>16&255,le[de++]^=t>>24&255,de>=mt&&(de-=mt)}((new Date).getTime())}if(r.prototype.chunkSize=function _e(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},r.prototype.toRadix=function ye(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),o=d(r),i=n(),s=n(),a="";for(this.divRemTo(o,i,s);i.signum()>0;)a=(r+s.intValue()).toString(e).substr(1)+a,i.divRemTo(o,i,s);return s.intValue().toString(e)+a},r.prototype.fromRadix=function me(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),o=Math.pow(t,n),i=!1,s=0,a=0,u=0;u<e.length;++u){var c=l(e,u);c<0?"-"==e.charAt(u)&&0==this.signum()&&(i=!0):(a=t*a+c,++s>=n&&(this.dMultiply(o),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),i&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function be(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(r.ONE.shiftLeft(e-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(r.ONE.shiftLeft(e-1),this);else{var o=new Array,i=7&e;o.length=1+(e>>3),t.nextBytes(o),i>0?o[0]&=(1<<i)-1:o[0]=0,this.fromString(o,256)}},r.prototype.bitwiseTo=function we(e,t,r){var n,o,i=Math.min(e.t,this.t);for(n=0;n<i;++n)r[n]=t(this[n],e[n]);if(e.t<this.t){for(o=e.s&this.DM,n=i;n<this.t;++n)r[n]=t(this[n],o);r.t=this.t}else{for(o=this.s&this.DM,n=i;n<e.t;++n)r[n]=t(o,e[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},r.prototype.changeBit=function Se(e,t){var n=r.ONE.shiftLeft(e);return this.bitwiseTo(n,t,n),n},r.prototype.addTo=function ke(e,t){for(var r=0,n=0,o=Math.min(e.t,this.t);r<o;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},r.prototype.dMultiply=function Te(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function xe(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},r.prototype.multiplyLowerTo=function Ee(e,t,r){var n,o=Math.min(this.t+e.t,t);for(r.s=0,r.t=o;o>0;)r[--o]=0;for(n=r.t-this.t;o<n;++o)r[o+this.t]=this.am(0,e[o],r,o,0,this.t);for(n=Math.min(e.t,t);o<n;++o)this.am(0,e[o],r,o,0,t-o);r.clamp()},r.prototype.multiplyUpperTo=function Pe(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r[this.t+n-t]=this.am(t-n,e[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},r.prototype.modInt=function Le(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},r.prototype.millerRabin=function Re(e){var t=this.subtract(r.ONE),o=t.getLowestSetBit();if(o<=0)return!1;var i=t.shiftRight(o);(e=e+1>>1)>he.length&&(e=he.length);for(var s=n(),a=0;a<e;++a){s.fromInt(he[Math.floor(Math.random()*he.length)]);var u=s.modPow(i,this);if(0!=u.compareTo(r.ONE)&&0!=u.compareTo(t)){for(var c=1;c++<o&&0!=u.compareTo(t);)if(0==(u=u.modPowInt(2,this)).compareTo(r.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0},r.prototype.clone=function Ce(){var e=n();return this.copyTo(e),e},r.prototype.intValue=function Oe(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},r.prototype.byteValue=function je(){return 0==this.t?this.s:this[0]<<24>>24},r.prototype.shortValue=function Ue(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function Me(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function Ie(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,o=0;if(e-- >0)for(n<this.DB&&(r=this[e]>>n)!=(this.s&this.DM)>>n&&(t[o++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this[e]&(1<<n)-1)<<8-n,r|=this[--e]>>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==o&&(128&this.s)!=(128&r)&&++o,(o>0||r!=this.s)&&(t[o++]=r);return t},r.prototype.equals=function Ae(e){return 0==this.compareTo(e)},r.prototype.min=function Ne(e){return this.compareTo(e)<0?this:e},r.prototype.max=function Fe(e){return this.compareTo(e)>0?this:e},r.prototype.and=function qe(e){var t=n();return this.bitwiseTo(e,_,t),t},r.prototype.or=function Be(e){var t=n();return this.bitwiseTo(e,y,t),t},r.prototype.xor=function De(e){var t=n();return this.bitwiseTo(e,m,t),t},r.prototype.andNot=function Je(e){var t=n();return this.bitwiseTo(e,b,t),t},r.prototype.not=function Ve(){for(var e=n(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},r.prototype.shiftLeft=function We(e){var t=n();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},r.prototype.shiftRight=function He(e){var t=n();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},r.prototype.getLowestSetBit=function ze(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+w(this[e]);return this.s<0?this.t*this.DB:-1},r.prototype.bitCount=function Ke(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=S(this[r]^t);return e},r.prototype.testBit=function Qe(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},r.prototype.setBit=function Ge(e){return this.changeBit(e,y)},r.prototype.clearBit=function Xe(e){return this.changeBit(e,b)},r.prototype.flipBit=function Ze(e){return this.changeBit(e,m)},r.prototype.add=function Ye(e){var t=n();return this.addTo(e,t),t},r.prototype.subtract=function $e(e){var t=n();return this.subTo(e,t),t},r.prototype.multiply=function et(e){var t=n();return this.multiplyTo(e,t),t},r.prototype.divide=function tt(e){var t=n();return this.divRemTo(e,t,null),t},r.prototype.remainder=function rt(e){var t=n();return this.divRemTo(e,null,t),t},r.prototype.divideAndRemainder=function nt(e){var t=n(),r=n();return this.divRemTo(e,t,r),new Array(t,r)},r.prototype.modPow=function ot(e,t){var r,o,i=e.bitLength(),s=d(1);if(i<=0)return s;r=i<18?1:i<48?3:i<144?4:i<768?5:6,o=i<8?new g(t):t.isEven()?new x(t):new v(t);var a=new Array,u=3,c=r-1,f=(1<<r)-1;if(a[1]=o.convert(this),r>1){var p=n();for(o.sqrTo(a[1],p);u<=f;)a[u]=n(),o.mulTo(p,a[u-2],a[u]),u+=2}var l,_,y=e.t-1,m=!0,b=n();for(i=h(e[y])-1;y>=0;){for(i>=c?l=e[y]>>i-c&f:(l=(e[y]&(1<<i+1)-1)<<c-i,y>0&&(l|=e[y-1]>>this.DB+i-c)),u=r;0==(1&l);)l>>=1,--u;if((i-=u)<0&&(i+=this.DB,--y),m)a[l].copyTo(s),m=!1;else{for(;u>1;)o.sqrTo(s,b),o.sqrTo(b,s),u-=2;u>0?o.sqrTo(s,b):(_=s,s=b,b=_),o.mulTo(b,a[l],s)}for(;y>=0&&0==(e[y]&1<<i);)o.sqrTo(s,b),_=s,s=b,b=_,--i<0&&(i=this.DB-1,--y)}return o.revert(s)},r.prototype.modInverse=function it(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return r.ZERO;for(var n=e.clone(),o=this.clone(),i=d(1),s=d(0),a=d(0),u=d(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),t?(i.isEven()&&s.isEven()||(i.addTo(this,i),s.subTo(e,s)),i.rShiftTo(1,i)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;o.isEven();)o.rShiftTo(1,o),t?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(e,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);n.compareTo(o)>=0?(n.subTo(o,n),t&&i.subTo(a,i),s.subTo(u,s)):(o.subTo(n,o),t&&a.subTo(i,a),u.subTo(s,u))}return 0!=o.compareTo(r.ONE)?r.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},r.prototype.pow=function st(e){return this.exp(e,new k)},r.prototype.gcd=function at(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var o=t.getLowestSetBit(),i=r.getLowestSetBit();if(i<0)return t;for(o<i&&(i=o),i>0&&(t.rShiftTo(i,t),r.rShiftTo(i,r));t.signum()>0;)(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return i>0&&r.lShiftTo(i,r),r},r.prototype.isProbablePrime=function ut(e){var t,r=this.abs();if(1==r.t&&r[0]<=he[he.length-1]){for(t=0;t<he.length;++t)if(r[0]==he[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<he.length;){for(var n=he[t],o=t+1;o<he.length&&n<ge;)n*=he[o++];for(n=r.modInt(n);t<o;)if(n%he[t++]==0)return!1}return r.millerRabin(e)},r.prototype.square=function ct(){var e=n();return this.squareTo(e),e},r.prototype.Barrett=x,null==le){var ft;if(le=new Array,de=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var pt=new Uint8Array(32);for(window.crypto.getRandomValues(pt),ft=0;ft<32;++ft)le[de++]=pt[ft]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var lt=window.crypto.random(32);for(ft=0;ft<lt.length;++ft)le[de++]=255<.charCodeAt(ft)}for(;de<mt;)ft=Math.floor(65536*Math.random()),le[de++]=ft>>>8,le[de++]=255&ft;de=0,ve()}function dt(){if(null==pe){for(ve(),(pe=function e(){return new gt}()).init(le),de=0;de<le.length;++de)le[de]=0;de=0}return pe.next()}function ht(){}function gt(){this.i=0,this.j=0,this.S=new Array}ht.prototype.nextBytes=function vt(e){var t;for(t=0;t<e.length;++t)e[t]=dt()},gt.prototype.init=function _t(e){var t,r,n;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+e[t%e.length]&255,n=this.S[t],this.S[t]=this.S[r],this.S[r]=n;this.i=0,this.j=0},gt.prototype.next=function yt(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var mt=256;e.exports={default:r,BigInteger:r,SecureRandom:ht}}).call(this)},function(e,t,r){var n;e.exports=(n=r(235),function(e){var t=n,r=t.lib,o=r.WordArray,i=r.Hasher,s=t.algo,a=[],u=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,o=0;o<64;)t(n)&&(o<8&&(a[o]=r(e.pow(n,.5))),u[o]=r(e.pow(n,1/3)),o++),n++}();var c=[],f=s.SHA256=i.extend({_doReset:function(){this._hash=new o.init(a.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],o=r[1],i=r[2],s=r[3],a=r[4],f=r[5],p=r[6],l=r[7],d=0;d<64;d++){if(d<16)c[d]=0|e[t+d];else{var h=c[d-15],g=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,v=c[d-2],_=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[d]=g+c[d-7]+_+c[d-16]}var y=n&o^n&i^o&i,m=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=l+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&f^~a&p)+u[d]+c[d];l=p,p=f,f=a,a=s+b|0,s=i,i=o,o=n,n=b+(m+y)|0}r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+i|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+f|0,r[6]=r[6]+p|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;return r[o>>>5]|=128<<24-o%32,r[14+(o+64>>>9<<4)]=e.floor(n/4294967296),r[15+(o+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(f),t.HmacSHA256=i._createHmacHelper(f)}(Math),n.SHA256)},function(e,t,r){(function(t){var n;e.exports=(n=n||function(e,n){var o;if("undefined"!=typeof window&&window.crypto&&(o=window.crypto),"undefined"!=typeof self&&self.crypto&&(o=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(o=globalThis.crypto),!o&&"undefined"!=typeof window&&window.msCrypto&&(o=window.msCrypto),!o&&void 0!==t&&t.crypto&&(o=t.crypto),!o)try{o=r(236)}catch(e){}var i=function(){if(o){if("function"==typeof o.getRandomValues)try{return o.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof o.randomBytes)try{return o.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),a={},u=a.lib={},c=u.Base={extend:function(e){var t=s(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},f=u.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=n?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var s=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=s<<24-(n+i)%4*8}else for(var a=0;a<o;a+=4)t[n+a>>>2]=r[a>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(i());return new f.init(t,e)}}),p=a.enc={},l=p.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new f.init(r,t/2)}},d=p.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new f.init(r,t)}},h=p.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},g=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,o=n.words,i=n.sigBytes,s=this.blockSize,a=i/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,c=e.min(4*u,i);if(u){for(var p=0;p<u;p+=s)this._doProcessBlock(o,p);r=o.splice(0,u),n.sigBytes-=c}return new f.init(r,c)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),v=(u.Hasher=g.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new v.HMAC.init(e,r).finalize(t)}}}),a.algo={});return a}(Math),n)}).call(this,r(72))},function(e,t){},function(e,t,r){"use strict";t.byteLength=function n(e){var t=l(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function o(e){var t,r,n=l(e),o=n[0],i=n[1],s=new u(function c(e,t,r){return 3*(t+r)/4-r}(0,o,i)),f=0,p=i>0?o-4:o;for(r=0;r<p;r+=4)t=a[e.charCodeAt(r)]<<18|a[e.charCodeAt(r+1)]<<12|a[e.charCodeAt(r+2)]<<6|a[e.charCodeAt(r+3)],s[f++]=t>>16&255,s[f++]=t>>8&255,s[f++]=255&t;2===i&&(t=a[e.charCodeAt(r)]<<2|a[e.charCodeAt(r+1)]>>4,s[f++]=255&t);1===i&&(t=a[e.charCodeAt(r)]<<10|a[e.charCodeAt(r+1)]<<4|a[e.charCodeAt(r+2)]>>2,s[f++]=t>>8&255,s[f++]=255&t);return s},t.fromByteArray=function i(e){for(var t,r=e.length,n=r%3,o=[],i=16383,a=0,u=r-n;a<u;a+=i)o.push(d(e,a,a+i>u?u:a+i));1===n?(t=e[r-1],o.push(s[t>>2]+s[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],o.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"="));return o.join("")};for(var s=[],a=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,p=c.length;f<p;++f)s[f]=c[f],a[c.charCodeAt(f)]=f;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function d(e,t,r){for(var n,o,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(s[(o=n)>>18&63]+s[o>>12&63]+s[o>>6&63]+s[63&o]);return i.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function n(e){var t=e.jws,r=e.KeyUtil,n=e.X509,i=e.crypto,s=e.hextob64u,a=e.b64tohex,u=e.AllowedSigningAlgs;return function(){function e(){!function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.parseJwt=function e(r){o.Log.debug("JoseUtil.parseJwt");try{var n=t.JWS.parse(r);return{header:n.headerObj,payload:n.payloadObj}}catch(e){o.Log.error(e)}},e.validateJwt=function t(i,s,u,c,f,p,l){o.Log.debug("JoseUtil.validateJwt");try{if("RSA"===s.kty)if(s.e&&s.n)s=r.getKey(s);else{if(!s.x5c||!s.x5c.length)return o.Log.error("JoseUtil.validateJwt: RSA key missing key material",s),Promise.reject(new Error("RSA key missing key material"));var d=a(s.x5c[0]);s=n.getPublicKeyFromCertHex(d)}else{if("EC"!==s.kty)return o.Log.error("JoseUtil.validateJwt: Unsupported key type",s&&s.kty),Promise.reject(new Error(s.kty));if(!(s.crv&&s.x&&s.y))return o.Log.error("JoseUtil.validateJwt: EC key missing key material",s),Promise.reject(new Error("EC key missing key material"));s=r.getKey(s)}return e._validateJwt(i,s,u,c,f,p,l)}catch(e){return o.Log.error(e&&e.message||e),Promise.reject("JWT validation failed")}},e.validateJwtAttributes=function t(r,n,i,s,a,u){s||(s=0),a||(a=parseInt(Date.now()/1e3));var c=e.parseJwt(r).payload;if(!c.iss)return o.Log.error("JoseUtil._validateJwt: issuer was not provided"),Promise.reject(new Error("issuer was not provided"));if(c.iss!==n)return o.Log.error("JoseUtil._validateJwt: Invalid issuer in token",c.iss),Promise.reject(new Error("Invalid issuer in token: "+c.iss));if(!c.aud)return o.Log.error("JoseUtil._validateJwt: aud was not provided"),Promise.reject(new Error("aud was not provided"));if(!(c.aud===i||Array.isArray(c.aud)&&c.aud.indexOf(i)>=0))return o.Log.error("JoseUtil._validateJwt: Invalid audience in token",c.aud),Promise.reject(new Error("Invalid audience in token: "+c.aud));if(c.azp&&c.azp!==i)return o.Log.error("JoseUtil._validateJwt: Invalid azp in token",c.azp),Promise.reject(new Error("Invalid azp in token: "+c.azp));if(!u){var f=a+s,p=a-s;if(!c.iat)return o.Log.error("JoseUtil._validateJwt: iat was not provided"),Promise.reject(new Error("iat was not provided"));if(f<c.iat)return o.Log.error("JoseUtil._validateJwt: iat is in the future",c.iat),Promise.reject(new Error("iat is in the future: "+c.iat));if(c.nbf&&f<c.nbf)return o.Log.error("JoseUtil._validateJwt: nbf is in the future",c.nbf),Promise.reject(new Error("nbf is in the future: "+c.nbf));if(!c.exp)return o.Log.error("JoseUtil._validateJwt: exp was not provided"),Promise.reject(new Error("exp was not provided"));if(c.exp<p)return o.Log.error("JoseUtil._validateJwt: exp is in the past",c.exp),Promise.reject(new Error("exp is in the past:"+c.exp))}return Promise.resolve(c)},e._validateJwt=function r(n,i,s,a,c,f,p){return e.validateJwtAttributes(n,s,a,c,f,p).then((function(e){try{return t.JWS.verify(n,i,u)?e:(o.Log.error("JoseUtil._validateJwt: signature validation failed"),Promise.reject(new Error("signature validation failed")))}catch(e){return o.Log.error(e&&e.message||e),Promise.reject(new Error("signature validation failed"))}}))},e.hashString=function e(t,r){try{return i.Util.hashString(t,r)}catch(e){o.Log.error(e)}},e.hexToBase64Url=function e(t){try{return s(t)}catch(e){o.Log.error(e)}},e}()};var o=r(0);e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigninResponse=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(32);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.SigninResponse=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#";i(this,e);var n=o.UrlUtility.parseUrlFragment(t,r);this.error=n.error,this.error_description=n.error_description,this.error_uri=n.error_uri,this.code=n.code,this.state=n.state,this.id_token=n.id_token,this.session_state=n.session_state,this.access_token=n.access_token,this.token_type=n.token_type,this.scope=n.scope,this.profile=void 0,this.expires_in=n.expires_in}return n(e,[{key:"expires_in",get:function e(){if(this.expires_at){var t=parseInt(Date.now()/1e3);return this.expires_at-t}},set:function e(t){var r=parseInt(t);if("number"==typeof r&&r>0){var n=parseInt(Date.now()/1e3);this.expires_at=n+r}}},{key:"expired",get:function e(){var t=this.expires_in;if(void 0!==t)return t<=0}},{key:"scopes",get:function e(){return(this.scope||"").split(" ")}},{key:"isOpenIdConnect",get:function e(){return this.scopes.indexOf("openid")>=0||!!this.id_token}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutRequest=void 0;var n=r(0),o=r(32),i=r(70);t.SignoutRequest=function e(t){var r=t.url,s=t.id_token_hint,a=t.post_logout_redirect_uri,u=t.data,c=t.extraQueryParams,f=t.request_type;if(function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw n.Log.error("SignoutRequest.ctor: No url passed"),new Error("url");for(var l in s&&(r=o.UrlUtility.addQueryParam(r,"id_token_hint",s)),a&&(r=o.UrlUtility.addQueryParam(r,"post_logout_redirect_uri",a),u&&(this.state=new i.State({data:u,request_type:f}),r=o.UrlUtility.addQueryParam(r,"state",this.state.id))),c)r=o.UrlUtility.addQueryParam(r,l,c[l]);this.url=r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutResponse=void 0;var n=r(32);t.SignoutResponse=function e(t){!function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var o=n.UrlUtility.parseUrlFragment(t,"?");this.error=o.error,this.error_description=o.error_description,this.error_uri=o.error_uri,this.state=o.state}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryWebStorage=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0);t.InMemoryWebStorage=function(){function e(){!function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e),this._data={}}return e.prototype.getItem=function e(t){return o.Log.debug("InMemoryWebStorage.getItem",t),this._data[t]},e.prototype.setItem=function e(t,r){o.Log.debug("InMemoryWebStorage.setItem",t),this._data[t]=r},e.prototype.removeItem=function e(t){o.Log.debug("InMemoryWebStorage.removeItem",t),delete this._data[t]},e.prototype.key=function e(t){return Object.getOwnPropertyNames(this._data)[t]},n(e,[{key:"length",get:function e(){return Object.getOwnPropertyNames(this._data).length}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserManager=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),i=r(109),s=r(244),a=r(114),u=r(250),c=r(252),f=r(117),p=r(69),l=r(119),d=r(110),h=r(46);function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}t.UserManager=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.SilentRenewService,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.SessionMonitor,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.TokenRevocationClient,p=arguments.length>4&&void 0!==arguments[4]?arguments[4]:d.TokenClient,_=arguments.length>5&&void 0!==arguments[5]?arguments[5]:h.JoseUtil;g(this,t),r instanceof s.UserManagerSettings||(r=new s.UserManagerSettings(r));var y=v(this,e.call(this,r));return y._events=new u.UserManagerEvents(r),y._silentRenewService=new n(y),y.settings.automaticSilentRenew&&(o.Log.debug("UserManager.ctor: automaticSilentRenew is configured, setting up silent renew"),y.startSilentRenew()),y.settings.monitorSession&&(o.Log.debug("UserManager.ctor: monitorSession is configured, setting up session monitor"),y._sessionMonitor=new i(y)),y._tokenRevocationClient=new a(y._settings),y._tokenClient=new p(y._settings),y._joseUtil=_,y}return function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getUser=function e(){var t=this;return this._loadUser().then((function(e){return e?(o.Log.info("UserManager.getUser: user loaded"),t._events.load(e,!1),e):(o.Log.info("UserManager.getUser: user not found in storage"),null)}))},t.prototype.removeUser=function e(){var t=this;return this.storeUser(null).then((function(){o.Log.info("UserManager.removeUser: user removed from storage"),t._events.unload()}))},t.prototype.signinRedirect=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="si:r";var r={useReplaceToNavigate:t.useReplaceToNavigate};return this._signinStart(t,this._redirectNavigator,r).then((function(){o.Log.info("UserManager.signinRedirect: successful")}))},t.prototype.signinRedirectCallback=function e(t){return this._signinEnd(t||this._redirectNavigator.url).then((function(e){return e.profile&&e.profile.sub?o.Log.info("UserManager.signinRedirectCallback: successful, signed in sub: ",e.profile.sub):o.Log.info("UserManager.signinRedirectCallback: no sub"),e}))},t.prototype.signinPopup=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="si:p";var r=t.redirect_uri||this.settings.popup_redirect_uri||this.settings.redirect_uri;return r?(t.redirect_uri=r,t.display="popup",this._signin(t,this._popupNavigator,{startUrl:r,popupWindowFeatures:t.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:t.popupWindowTarget||this.settings.popupWindowTarget}).then((function(e){return e&&(e.profile&&e.profile.sub?o.Log.info("UserManager.signinPopup: signinPopup successful, signed in sub: ",e.profile.sub):o.Log.info("UserManager.signinPopup: no sub")),e}))):(o.Log.error("UserManager.signinPopup: No popup_redirect_uri or redirect_uri configured"),Promise.reject(new Error("No popup_redirect_uri or redirect_uri configured")))},t.prototype.signinPopupCallback=function e(t){return this._signinCallback(t,this._popupNavigator).then((function(e){return e&&(e.profile&&e.profile.sub?o.Log.info("UserManager.signinPopupCallback: successful, signed in sub: ",e.profile.sub):o.Log.info("UserManager.signinPopupCallback: no sub")),e})).catch((function(e){o.Log.error(e.message)}))},t.prototype.signinSilent=function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r=Object.assign({},r),this._loadUser().then((function(e){return e&&e.refresh_token?(r.refresh_token=e.refresh_token,t._useRefreshToken(r)):(r.request_type="si:s",r.id_token_hint=r.id_token_hint||t.settings.includeIdTokenInSilentRenew&&e&&e.id_token,e&&t._settings.validateSubOnSilentRenew&&(o.Log.debug("UserManager.signinSilent, subject prior to silent renew: ",e.profile.sub),r.current_sub=e.profile.sub),t._signinSilentIframe(r))}))},t.prototype._useRefreshToken=function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._tokenClient.exchangeRefreshToken(r).then((function(e){return e?e.access_token?t._loadUser().then((function(r){if(r){var n=Promise.resolve();return e.id_token&&(n=t._validateIdTokenFromTokenRefreshToken(r.profile,e.id_token)),n.then((function(){return o.Log.debug("UserManager._useRefreshToken: refresh token response success"),r.id_token=e.id_token||r.id_token,r.access_token=e.access_token,r.refresh_token=e.refresh_token||r.refresh_token,r.expires_in=e.expires_in,t.storeUser(r).then((function(){return t._events.load(r),r}))}))}return null})):(o.Log.error("UserManager._useRefreshToken: No access token returned from token endpoint"),Promise.reject("No access token returned from token endpoint")):(o.Log.error("UserManager._useRefreshToken: No response returned from token endpoint"),Promise.reject("No response returned from token endpoint"))}))},t.prototype._validateIdTokenFromTokenRefreshToken=function e(t,r){var n=this;return this._metadataService.getIssuer().then((function(e){return n.settings.getEpochTime().then((function(i){return n._joseUtil.validateJwtAttributes(r,e,n._settings.client_id,n._settings.clockSkew,i).then((function(e){return e?e.sub!==t.sub?(o.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: sub in id_token does not match current sub"),Promise.reject(new Error("sub in id_token does not match current sub"))):e.auth_time&&e.auth_time!==t.auth_time?(o.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: auth_time in id_token does not match original auth_time"),Promise.reject(new Error("auth_time in id_token does not match original auth_time"))):e.azp&&e.azp!==t.azp?(o.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp in id_token does not match original azp"),Promise.reject(new Error("azp in id_token does not match original azp"))):!e.azp&&t.azp?(o.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp not in id_token, but present in original id_token"),Promise.reject(new Error("azp not in id_token, but present in original id_token"))):void 0:(o.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: Failed to validate id_token"),Promise.reject(new Error("Failed to validate id_token")))}))}))}))},t.prototype._signinSilentIframe=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return r?(t.redirect_uri=r,t.prompt=t.prompt||"none",this._signin(t,this._iframeNavigator,{startUrl:r,silentRequestTimeout:t.silentRequestTimeout||this.settings.silentRequestTimeout}).then((function(e){return e&&(e.profile&&e.profile.sub?o.Log.info("UserManager.signinSilent: successful, signed in sub: ",e.profile.sub):o.Log.info("UserManager.signinSilent: no sub")),e}))):(o.Log.error("UserManager.signinSilent: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype.signinSilentCallback=function e(t){return this._signinCallback(t,this._iframeNavigator).then((function(e){return e&&(e.profile&&e.profile.sub?o.Log.info("UserManager.signinSilentCallback: successful, signed in sub: ",e.profile.sub):o.Log.info("UserManager.signinSilentCallback: no sub")),e}))},t.prototype.signinCallback=function e(t){var r=this;return this.readSigninResponseState(t).then((function(e){var n=e.state;e.response;return"si:r"===n.request_type?r.signinRedirectCallback(t):"si:p"===n.request_type?r.signinPopupCallback(t):"si:s"===n.request_type?r.signinSilentCallback(t):Promise.reject(new Error("invalid response_type in state"))}))},t.prototype.signoutCallback=function e(t,r){var n=this;return this.readSignoutResponseState(t).then((function(e){var o=e.state,i=e.response;return o?"so:r"===o.request_type?n.signoutRedirectCallback(t):"so:p"===o.request_type?n.signoutPopupCallback(t,r):Promise.reject(new Error("invalid response_type in state")):i}))},t.prototype.querySessionStatus=function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(r=Object.assign({},r)).request_type="si:s";var n=r.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return n?(r.redirect_uri=n,r.prompt="none",r.response_type=r.response_type||this.settings.query_status_response_type,r.scope=r.scope||"openid",r.skipUserInfo=!0,this._signinStart(r,this._iframeNavigator,{startUrl:n,silentRequestTimeout:r.silentRequestTimeout||this.settings.silentRequestTimeout}).then((function(e){return t.processSigninResponse(e.url).then((function(e){if(o.Log.debug("UserManager.querySessionStatus: got signin response"),e.session_state&&e.profile.sub)return o.Log.info("UserManager.querySessionStatus: querySessionStatus success for sub: ",e.profile.sub),{session_state:e.session_state,sub:e.profile.sub,sid:e.profile.sid};o.Log.info("querySessionStatus successful, user not authenticated")})).catch((function(e){if(e.session_state&&t.settings.monitorAnonymousSession&&("login_required"==e.message||"consent_required"==e.message||"interaction_required"==e.message||"account_selection_required"==e.message))return o.Log.info("UserManager.querySessionStatus: querySessionStatus success for anonymous user"),{session_state:e.session_state};throw e}))}))):(o.Log.error("UserManager.querySessionStatus: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype._signin=function e(t,r){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signinStart(t,r,o).then((function(e){return n._signinEnd(e.url,t)}))},t.prototype._signinStart=function e(t,r){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.prepare(i).then((function(e){return o.Log.debug("UserManager._signinStart: got navigator window handle"),n.createSigninRequest(t).then((function(t){return o.Log.debug("UserManager._signinStart: got signin request"),i.url=t.url,i.id=t.state.id,e.navigate(i)})).catch((function(t){throw e.close&&(o.Log.debug("UserManager._signinStart: Error after preparing navigator, closing navigator window"),e.close()),t}))}))},t.prototype._signinEnd=function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.processSigninResponse(t).then((function(e){o.Log.debug("UserManager._signinEnd: got signin response");var t=new a.User(e);if(n.current_sub){if(n.current_sub!==t.profile.sub)return o.Log.debug("UserManager._signinEnd: current user does not match user returned from signin. sub from signin: ",t.profile.sub),Promise.reject(new Error("login_required"));o.Log.debug("UserManager._signinEnd: current user matches user returned from signin")}return r.storeUser(t).then((function(){return o.Log.debug("UserManager._signinEnd: user stored"),r._events.load(t),t}))}))},t.prototype._signinCallback=function e(t,r){o.Log.debug("UserManager._signinCallback");var n="query"===this._settings.response_mode||!this._settings.response_mode&&p.SigninRequest.isCode(this._settings.response_type)?"?":"#";return r.callback(t,void 0,n)},t.prototype.signoutRedirect=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="so:r";var r=t.post_logout_redirect_uri||this.settings.post_logout_redirect_uri;r&&(t.post_logout_redirect_uri=r);var n={useReplaceToNavigate:t.useReplaceToNavigate};return this._signoutStart(t,this._redirectNavigator,n).then((function(){o.Log.info("UserManager.signoutRedirect: successful")}))},t.prototype.signoutRedirectCallback=function e(t){return this._signoutEnd(t||this._redirectNavigator.url).then((function(e){return o.Log.info("UserManager.signoutRedirectCallback: successful"),e}))},t.prototype.signoutPopup=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="so:p";var r=t.post_logout_redirect_uri||this.settings.popup_post_logout_redirect_uri||this.settings.post_logout_redirect_uri;return t.post_logout_redirect_uri=r,t.display="popup",t.post_logout_redirect_uri&&(t.state=t.state||{}),this._signout(t,this._popupNavigator,{startUrl:r,popupWindowFeatures:t.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:t.popupWindowTarget||this.settings.popupWindowTarget}).then((function(){o.Log.info("UserManager.signoutPopup: successful")}))},t.prototype.signoutPopupCallback=function e(t,r){void 0===r&&"boolean"==typeof t&&(r=t,t=null);return this._popupNavigator.callback(t,r,"?").then((function(){o.Log.info("UserManager.signoutPopupCallback: successful")}))},t.prototype._signout=function e(t,r){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signoutStart(t,r,o).then((function(e){return n._signoutEnd(e.url)}))},t.prototype._signoutStart=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this,n=arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.prepare(i).then((function(e){return o.Log.debug("UserManager._signoutStart: got navigator window handle"),r._loadUser().then((function(n){return o.Log.debug("UserManager._signoutStart: loaded current user from storage"),(r._settings.revokeAccessTokenOnSignout?r._revokeInternal(n):Promise.resolve()).then((function(){var s=t.id_token_hint||n&&n.id_token;return s&&(o.Log.debug("UserManager._signoutStart: Setting id_token into signout request"),t.id_token_hint=s),r.removeUser().then((function(){return o.Log.debug("UserManager._signoutStart: user removed, creating signout request"),r.createSignoutRequest(t).then((function(t){return o.Log.debug("UserManager._signoutStart: got signout request"),i.url=t.url,t.state&&(i.id=t.state.id),e.navigate(i)}))}))}))})).catch((function(t){throw e.close&&(o.Log.debug("UserManager._signoutStart: Error after preparing navigator, closing navigator window"),e.close()),t}))}))},t.prototype._signoutEnd=function e(t){return this.processSignoutResponse(t).then((function(e){return o.Log.debug("UserManager._signoutEnd: got signout response"),e}))},t.prototype.revokeAccessToken=function e(){var t=this;return this._loadUser().then((function(e){return t._revokeInternal(e,!0).then((function(r){if(r)return o.Log.debug("UserManager.revokeAccessToken: removing token properties from user and re-storing"),e.access_token=null,e.refresh_token=null,e.expires_at=null,e.token_type=null,t.storeUser(e).then((function(){o.Log.debug("UserManager.revokeAccessToken: user stored"),t._events.load(e)}))}))})).then((function(){o.Log.info("UserManager.revokeAccessToken: access token revoked successfully")}))},t.prototype._revokeInternal=function e(t,r){var n=this;if(t){var i=t.access_token,s=t.refresh_token;return this._revokeAccessTokenInternal(i,r).then((function(e){return n._revokeRefreshTokenInternal(s,r).then((function(t){return e||t||o.Log.debug("UserManager.revokeAccessToken: no need to revoke due to no token(s), or JWT format"),e||t}))}))}return Promise.resolve(!1)},t.prototype._revokeAccessTokenInternal=function e(t,r){return!t||t.indexOf(".")>=0?Promise.resolve(!1):this._tokenRevocationClient.revoke(t,r).then((function(){return!0}))},t.prototype._revokeRefreshTokenInternal=function e(t,r){return t?this._tokenRevocationClient.revoke(t,r,"refresh_token").then((function(){return!0})):Promise.resolve(!1)},t.prototype.startSilentRenew=function e(){this._silentRenewService.start()},t.prototype.stopSilentRenew=function e(){this._silentRenewService.stop()},t.prototype._loadUser=function e(){return this._userStore.get(this._userStoreKey).then((function(e){return e?(o.Log.debug("UserManager._loadUser: user storageString loaded"),a.User.fromStorageString(e)):(o.Log.debug("UserManager._loadUser: no user storageString"),null)}))},t.prototype.storeUser=function e(t){if(t){o.Log.debug("UserManager.storeUser: storing user");var r=t.toStorageString();return this._userStore.set(this._userStoreKey,r)}return o.Log.debug("storeUser.storeUser: removing user"),this._userStore.remove(this._userStoreKey)},n(t,[{key:"_redirectNavigator",get:function e(){return this.settings.redirectNavigator}},{key:"_popupNavigator",get:function e(){return this.settings.popupNavigator}},{key:"_iframeNavigator",get:function e(){return this.settings.iframeNavigator}},{key:"_userStore",get:function e(){return this.settings.userStore}},{key:"events",get:function e(){return this._events}},{key:"_userStoreKey",get:function e(){return"user:"+this.settings.authority+":"+this.settings.client_id}}]),t}(i.OidcClient)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserManagerSettings=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=(r(0),r(66)),i=r(245),s=r(246),a=r(248),u=r(67),c=r(17),f=r(69);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}t.UserManagerSettings=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.popup_redirect_uri,o=r.popup_post_logout_redirect_uri,d=r.popupWindowFeatures,h=r.popupWindowTarget,g=r.silent_redirect_uri,v=r.silentRequestTimeout,_=r.automaticSilentRenew,y=void 0!==_&&_,m=r.validateSubOnSilentRenew,b=void 0!==m&&m,w=r.includeIdTokenInSilentRenew,S=void 0===w||w,k=r.monitorSession,T=void 0===k||k,x=r.monitorAnonymousSession,E=void 0!==x&&x,P=r.checkSessionInterval,L=void 0===P?2e3:P,R=r.stopCheckSessionOnError,C=void 0===R||R,O=r.query_status_response_type,j=r.revokeAccessTokenOnSignout,U=void 0!==j&&j,M=r.accessTokenExpiringNotificationTime,I=void 0===M?60:M,A=r.redirectNavigator,N=void 0===A?new i.RedirectNavigator:A,F=r.popupNavigator,q=void 0===F?new s.PopupNavigator:F,B=r.iframeNavigator,D=void 0===B?new a.IFrameNavigator:B,J=r.userStore,V=void 0===J?new u.WebStorageStateStore({store:c.Global.sessionStorage}):J;p(this,t);var W=l(this,e.call(this,arguments[0]));return W._popup_redirect_uri=n,W._popup_post_logout_redirect_uri=o,W._popupWindowFeatures=d,W._popupWindowTarget=h,W._silent_redirect_uri=g,W._silentRequestTimeout=v,W._automaticSilentRenew=y,W._validateSubOnSilentRenew=b,W._includeIdTokenInSilentRenew=S,W._accessTokenExpiringNotificationTime=I,W._monitorSession=T,W._monitorAnonymousSession=E,W._checkSessionInterval=L,W._stopCheckSessionOnError=C,O?W._query_status_response_type=O:arguments[0]&&arguments[0].response_type?W._query_status_response_type=f.SigninRequest.isOidc(arguments[0].response_type)?"id_token":"code":W._query_status_response_type="id_token",W._revokeAccessTokenOnSignout=U,W._redirectNavigator=N,W._popupNavigator=q,W._iframeNavigator=D,W._userStore=V,W}return function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"popup_redirect_uri",get:function e(){return this._popup_redirect_uri}},{key:"popup_post_logout_redirect_uri",get:function e(){return this._popup_post_logout_redirect_uri}},{key:"popupWindowFeatures",get:function e(){return this._popupWindowFeatures}},{key:"popupWindowTarget",get:function e(){return this._popupWindowTarget}},{key:"silent_redirect_uri",get:function e(){return this._silent_redirect_uri}},{key:"silentRequestTimeout",get:function e(){return this._silentRequestTimeout}},{key:"automaticSilentRenew",get:function e(){return this._automaticSilentRenew}},{key:"validateSubOnSilentRenew",get:function e(){return this._validateSubOnSilentRenew}},{key:"includeIdTokenInSilentRenew",get:function e(){return this._includeIdTokenInSilentRenew}},{key:"accessTokenExpiringNotificationTime",get:function e(){return this._accessTokenExpiringNotificationTime}},{key:"monitorSession",get:function e(){return this._monitorSession}},{key:"monitorAnonymousSession",get:function e(){return this._monitorAnonymousSession}},{key:"checkSessionInterval",get:function e(){return this._checkSessionInterval}},{key:"stopCheckSessionOnError",get:function e(){return this._stopCheckSessionOnError}},{key:"query_status_response_type",get:function e(){return this._query_status_response_type}},{key:"revokeAccessTokenOnSignout",get:function e(){return this._revokeAccessTokenOnSignout}},{key:"redirectNavigator",get:function e(){return this._redirectNavigator}},{key:"popupNavigator",get:function e(){return this._popupNavigator}},{key:"iframeNavigator",get:function e(){return this._iframeNavigator}},{key:"userStore",get:function e(){return this._userStore}}]),t}(o.OidcClientSettings)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectNavigator=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0);t.RedirectNavigator=function(){function e(){!function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function e(){return Promise.resolve(this)},e.prototype.navigate=function e(t){return t&&t.url?(t.useReplaceToNavigate?window.location.replace(t.url):window.location=t.url,Promise.resolve()):(o.Log.error("RedirectNavigator.navigate: No url provided"),Promise.reject(new Error("No url provided")))},n(e,[{key:"url",get:function e(){return window.location.href}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopupNavigator=void 0;var n=r(0),o=r(247);t.PopupNavigator=function(){function e(){!function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function e(t){var r=new o.PopupWindow(t);return Promise.resolve(r)},e.prototype.callback=function e(t,r,i){n.Log.debug("PopupNavigator.callback");try{return o.PopupWindow.notifyOpener(t,r,i),Promise.resolve()}catch(e){return Promise.reject(e)}},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopupWindow=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),i=r(32);t.PopupWindow=function(){function e(t){var r=this;!function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._promise=new Promise((function(e,t){r._resolve=e,r._reject=t}));var i=t.popupWindowTarget||"_blank",s=t.popupWindowFeatures||"location=no,toolbar=no,width=500,height=500,left=100,top=100;";this._popup=window.open("",i,s),this._popup&&(o.Log.debug("PopupWindow.ctor: popup successfully created"),this._checkForPopupClosedTimer=window.setInterval(this._checkForPopupClosed.bind(this),500))}return e.prototype.navigate=function e(t){return this._popup?t&&t.url?(o.Log.debug("PopupWindow.navigate: Setting URL in popup"),this._id=t.id,this._id&&(window["popupCallback_"+t.id]=this._callback.bind(this)),this._popup.focus(),this._popup.window.location=t.url):(this._error("PopupWindow.navigate: no url provided"),this._error("No url provided")):this._error("PopupWindow.navigate: Error opening popup window"),this.promise},e.prototype._success=function e(t){o.Log.debug("PopupWindow.callback: Successful response from popup window"),this._cleanup(),this._resolve(t)},e.prototype._error=function e(t){o.Log.error("PopupWindow.error: ",t),this._cleanup(),this._reject(new Error(t))},e.prototype.close=function e(){this._cleanup(!1)},e.prototype._cleanup=function e(t){o.Log.debug("PopupWindow.cleanup"),window.clearInterval(this._checkForPopupClosedTimer),this._checkForPopupClosedTimer=null,delete window["popupCallback_"+this._id],this._popup&&!t&&this._popup.close(),this._popup=null},e.prototype._checkForPopupClosed=function e(){this._popup&&!this._popup.closed||this._error("Popup window closed")},e.prototype._callback=function e(t,r){this._cleanup(r),t?(o.Log.debug("PopupWindow.callback success"),this._success({url:t})):(o.Log.debug("PopupWindow.callback: Invalid response from popup"),this._error("Invalid response from popup"))},e.notifyOpener=function e(t,r,n){if(window.opener){if(t=t||window.location.href){var s=i.UrlUtility.parseUrlFragment(t,n);if(s.state){var a="popupCallback_"+s.state,u=window.opener[a];u?(o.Log.debug("PopupWindow.notifyOpener: passing url message to opener"),u(t,r)):o.Log.warn("PopupWindow.notifyOpener: no matching callback found on opener")}else o.Log.warn("PopupWindow.notifyOpener: no state found in response url")}}else o.Log.warn("PopupWindow.notifyOpener: no window.opener. Can't complete notification.")},n(e,[{key:"promise",get:function e(){return this._promise}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameNavigator=void 0;var n=r(0),o=r(249);t.IFrameNavigator=function(){function e(){!function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function e(t){var r=new o.IFrameWindow(t);return Promise.resolve(r)},e.prototype.callback=function e(t){n.Log.debug("IFrameNavigator.callback");try{return o.IFrameWindow.notifyParent(t),Promise.resolve()}catch(e){return Promise.reject(e)}},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameWindow=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0);t.IFrameWindow=function(){function e(t){var r=this;!function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._promise=new Promise((function(e,t){r._resolve=e,r._reject=t})),this._boundMessageEvent=this._message.bind(this),window.addEventListener("message",this._boundMessageEvent,!1),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.width=0,this._frame.height=0,window.document.body.appendChild(this._frame)}return e.prototype.navigate=function e(t){if(t&&t.url){var r=t.silentRequestTimeout||1e4;o.Log.debug("IFrameWindow.navigate: Using timeout of:",r),this._timer=window.setTimeout(this._timeout.bind(this),r),this._frame.src=t.url}else this._error("No url provided");return this.promise},e.prototype._success=function e(t){this._cleanup(),o.Log.debug("IFrameWindow: Successful response from frame window"),this._resolve(t)},e.prototype._error=function e(t){this._cleanup(),o.Log.error(t),this._reject(new Error(t))},e.prototype.close=function e(){this._cleanup()},e.prototype._cleanup=function e(){this._frame&&(o.Log.debug("IFrameWindow: cleanup"),window.removeEventListener("message",this._boundMessageEvent,!1),window.clearTimeout(this._timer),window.document.body.removeChild(this._frame),this._timer=null,this._frame=null,this._boundMessageEvent=null)},e.prototype._timeout=function e(){o.Log.debug("IFrameWindow.timeout"),this._error("Frame window timed out")},e.prototype._message=function e(t){if(o.Log.debug("IFrameWindow.message"),this._timer&&t.origin===this._origin&&t.source===this._frame.contentWindow&&"string"==typeof t.data&&(t.data.startsWith("http://")||t.data.startsWith("https://"))){var r=t.data;r?this._success({url:r}):this._error("Invalid response from frame")}},e.notifyParent=function e(t){o.Log.debug("IFrameWindow.notifyParent"),(t=t||window.location.href)&&(o.Log.debug("IFrameWindow.notifyParent: posting url message to parent"),window.parent.postMessage(t,location.protocol+"//"+location.host))},n(e,[{key:"promise",get:function e(){return this._promise}},{key:"_origin",get:function e(){return location.protocol+"//"+location.host}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserManagerEvents=void 0;var n=r(0),o=r(115),i=r(116);t.UserManagerEvents=function(e){function t(r){!function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r));return o._userLoaded=new i.Event("User loaded"),o._userUnloaded=new i.Event("User unloaded"),o._silentRenewError=new i.Event("Silent renew error"),o._userSignedIn=new i.Event("User signed in"),o._userSignedOut=new i.Event("User signed out"),o._userSessionChanged=new i.Event("User session changed"),o}return function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.load=function t(r){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n.Log.debug("UserManagerEvents.load"),e.prototype.load.call(this,r),o&&this._userLoaded.raise(r)},t.prototype.unload=function t(){n.Log.debug("UserManagerEvents.unload"),e.prototype.unload.call(this),this._userUnloaded.raise()},t.prototype.addUserLoaded=function e(t){this._userLoaded.addHandler(t)},t.prototype.removeUserLoaded=function e(t){this._userLoaded.removeHandler(t)},t.prototype.addUserUnloaded=function e(t){this._userUnloaded.addHandler(t)},t.prototype.removeUserUnloaded=function e(t){this._userUnloaded.removeHandler(t)},t.prototype.addSilentRenewError=function e(t){this._silentRenewError.addHandler(t)},t.prototype.removeSilentRenewError=function e(t){this._silentRenewError.removeHandler(t)},t.prototype._raiseSilentRenewError=function e(t){n.Log.debug("UserManagerEvents._raiseSilentRenewError",t.message),this._silentRenewError.raise(t)},t.prototype.addUserSignedIn=function e(t){this._userSignedIn.addHandler(t)},t.prototype.removeUserSignedIn=function e(t){this._userSignedIn.removeHandler(t)},t.prototype._raiseUserSignedIn=function e(){n.Log.debug("UserManagerEvents._raiseUserSignedIn"),this._userSignedIn.raise()},t.prototype.addUserSignedOut=function e(t){this._userSignedOut.addHandler(t)},t.prototype.removeUserSignedOut=function e(t){this._userSignedOut.removeHandler(t)},t.prototype._raiseUserSignedOut=function e(){n.Log.debug("UserManagerEvents._raiseUserSignedOut"),this._userSignedOut.raise()},t.prototype.addUserSessionChanged=function e(t){this._userSessionChanged.addHandler(t)},t.prototype.removeUserSessionChanged=function e(t){this._userSessionChanged.removeHandler(t)},t.prototype._raiseUserSessionChanged=function e(){n.Log.debug("UserManagerEvents._raiseUserSessionChanged"),this._userSessionChanged.raise()},t}(o.AccessTokenEvents)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),i=r(17),s=r(116);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}t.Timer=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Global.timer,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;a(this,t);var s=u(this,e.call(this,r));return s._timer=n,s._nowFunc=o||function(){return Date.now()/1e3},s}return function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.init=function e(t){t<=0&&(t=1),t=parseInt(t);var r=this.now+t;if(this.expiration===r&&this._timerHandle)o.Log.debug("Timer.init timer "+this._name+" skipping initialization since already initialized for expiration:",this.expiration);else{this.cancel(),o.Log.debug("Timer.init timer "+this._name+" for duration:",t),this._expiration=r;var n=5;t<n&&(n=t),this._timerHandle=this._timer.setInterval(this._callback.bind(this),1e3*n)}},t.prototype.cancel=function e(){this._timerHandle&&(o.Log.debug("Timer.cancel: ",this._name),this._timer.clearInterval(this._timerHandle),this._timerHandle=null)},t.prototype._callback=function t(){var r=this._expiration-this.now;o.Log.debug("Timer.callback; "+this._name+" timer expires in:",r),this._expiration<=this.now&&(this.cancel(),e.prototype.raise.call(this))},n(t,[{key:"now",get:function e(){return parseInt(this._nowFunc())}},{key:"expiration",get:function e(){return this._expiration}}]),t}(s.Event)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SilentRenewService=void 0;var n=r(0);t.SilentRenewService=function(){function e(t){!function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._userManager=t}return e.prototype.start=function e(){this._callback||(this._callback=this._tokenExpiring.bind(this),this._userManager.events.addAccessTokenExpiring(this._callback),this._userManager.getUser().then((function(e){})).catch((function(e){n.Log.error("SilentRenewService.start: Error from getUser:",e.message)})))},e.prototype.stop=function e(){this._callback&&(this._userManager.events.removeAccessTokenExpiring(this._callback),delete this._callback)},e.prototype._tokenExpiring=function e(){var t=this;this._userManager.signinSilent().then((function(e){n.Log.debug("SilentRenewService._tokenExpiring: Silent token renewal successful")}),(function(e){n.Log.error("SilentRenewService._tokenExpiring: Error from signinSilent:",e.message),t._userManager.events._raiseSilentRenewError(e)}))},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaPopupNavigator=void 0;var n=r(120);t.CordovaPopupNavigator=function(){function e(){!function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function e(t){var r=new n.CordovaPopupWindow(t);return Promise.resolve(r)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaIFrameNavigator=void 0;var n=r(120);t.CordovaIFrameNavigator=function(){function e(){!function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function e(t){t.popupWindowFeatures="hidden=yes";var r=new n.CordovaPopupWindow(t);return Promise.resolve(r)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Version="1.11.6"}]);