@auth0/auth0-spa-js
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -0,1 +1,20 @@ | ||
## [v1.2.1](https://github.com/auth0/auth0-spa-js/tree/v1.2.1) (2019-08-27) | ||
**Fixed** | ||
Replace promise polyfill for a pure one. This fixes using this library with zone.js. https://github.com/auth0/auth0-spa-js/pull/180 | ||
## [v1.2.0](https://github.com/auth0/auth0-spa-js/tree/v1.2.0) (2019-08-26) | ||
**Fixed** | ||
- Expose raw id_token in the getIdTokenClaims method https://github.com/auth0/auth0-spa-js/pull/175 | ||
- Fix bug where oauth/token call ignores `options.audience` https://github.com/auth0/auth0-spa-js/pull/134 | ||
**Added** | ||
- Add IE11 polyfills https://github.com/auth0/auth0-spa-js/pull/154 | ||
- Add popup timeout config https://github.com/auth0/auth0-spa-js/pull/133 | ||
- Add ?federated logout param https://github.com/auth0/auth0-spa-js/pull/129 | ||
## [v1.1.1](https://github.com/auth0/auth0-spa-js/tree/v1.1.1) (2019-07-22) | ||
@@ -2,0 +21,0 @@ |
@@ -1,2 +0,2 @@ | ||
var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};var e=function(){return(e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function n(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function r(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,c)}u((r=r.apply(t,e||[])).next())})}function o(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t,e){return t(e={exports:{}},e.exports),e.exports}var c,u,s,f="object",l=function(t){return t&&t.Math==Math&&t},p=l(typeof globalThis==f&&globalThis)||l(typeof window==f&&window)||l(typeof self==f&&self)||l(typeof i==f&&i)||Function("return this")(),d=function(t){try{return!!t()}catch(t){return!0}},h=!d(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),v={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,g={f:y&&!v.call({1:2},1)?function(t){var e=y(this,t);return!!e&&e.enumerable}:v},m=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},w={}.toString,b=function(t){return w.call(t).slice(8,-1)},_="".split,S=d(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==b(t)?_.call(t,""):Object(t)}:Object,O=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},T=function(t){return S(O(t))},E=function(t){return"object"==typeof t?null!==t:"function"==typeof t},j=function(t,e){if(!E(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!E(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!E(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!E(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},A={}.hasOwnProperty,P=function(t,e){return A.call(t,e)},x=p.document,C=E(x)&&E(x.createElement),k=function(t){return C?x.createElement(t):{}},U=!h&&!d(function(){return 7!=Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a}),I=Object.getOwnPropertyDescriptor,L={f:h?I:function(t,e){if(t=T(t),e=j(e,!0),U)try{return I(t,e)}catch(t){}if(P(t,e))return m(!g.f.call(t,e),t[e])}},R=function(t){if(!E(t))throw TypeError(String(t)+" is not an object");return t},M=Object.defineProperty,D={f:h?M:function(t,e,n){if(R(t),e=j(e,!0),R(n),U)try{return M(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},F=h?function(t,e,n){return D.f(t,e,m(1,n))}:function(t,e,n){return t[e]=n,t},N=function(t,e){try{F(p,t,e)}catch(n){p[t]=e}return e},z=a(function(t){var e=p["__core-js_shared__"]||N("__core-js_shared__",{});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),G=z("native-function-to-string",Function.toString),B=p.WeakMap,W="function"==typeof B&&/native code/.test(G.call(B)),q=0,H=Math.random(),V=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++q+H).toString(36)},J=z("keys"),Y=function(t){return J[t]||(J[t]=V(t))},K={},Q=p.WeakMap;if(W){var X=new Q,Z=X.get,$=X.has,tt=X.set;c=function(t,e){return tt.call(X,t,e),e},u=function(t){return Z.call(X,t)||{}},s=function(t){return $.call(X,t)}}else{var et=Y("state");K[et]=!0,c=function(t,e){return F(t,et,e),e},u=function(t){return P(t,et)?t[et]:{}},s=function(t){return P(t,et)}}var nt={set:c,get:u,has:s,enforce:function(t){return s(t)?u(t):c(t,{})},getterFor:function(t){return function(e){var n;if(!E(e)||(n=u(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},rt=a(function(t){var e=nt.get,n=nt.enforce,r=String(G).split("toString");z("inspectSource",function(t){return G.call(t)}),(t.exports=function(t,e,o,i){var a=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof e||P(o,"name")||F(o,"name",e),n(o).source=r.join("string"==typeof e?e:"")),t!==p?(a?!u&&t[e]&&(c=!0):delete t[e],c?t[e]=o:F(t,e,o)):c?t[e]=o:N(e,o)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||G.call(this)})}),ot=p,it=function(t){return"function"==typeof t?t:void 0},at=function(t,e){return arguments.length<2?it(ot[t])||it(p[t]):ot[t]&&ot[t][e]||p[t]&&p[t][e]},ct=Math.ceil,ut=Math.floor,st=function(t){return isNaN(t=+t)?0:(t>0?ut:ct)(t)},ft=Math.min,lt=function(t){return t>0?ft(st(t),9007199254740991):0},pt=Math.max,dt=Math.min,ht=function(t){return function(e,n,r){var o,i=T(e),a=lt(i.length),c=function(t,e){var n=st(t);return n<0?pt(n+e,0):dt(n,e)}(r,a);if(t&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},vt={includes:ht(!0),indexOf:ht(!1)},yt=vt.indexOf,gt=function(t,e){var n,r=T(t),o=0,i=[];for(n in r)!P(K,n)&&P(r,n)&&i.push(n);for(;e.length>o;)P(r,n=e[o++])&&(~yt(i,n)||i.push(n));return i},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wt=mt.concat("length","prototype"),bt={f:Object.getOwnPropertyNames||function(t){return gt(t,wt)}},_t={f:Object.getOwnPropertySymbols},St=at("Reflect","ownKeys")||function(t){var e=bt.f(R(t)),n=_t.f;return n?e.concat(n(t)):e},Ot=function(t,e){for(var n=St(e),r=D.f,o=L.f,i=0;i<n.length;i++){var a=n[i];P(t,a)||r(t,a,o(e,a))}},Tt=/#|\.prototype\./,Et=function(t,e){var n=At[jt(t)];return n==xt||n!=Pt&&("function"==typeof e?d(e):!!e)},jt=Et.normalize=function(t){return String(t).replace(Tt,".").toLowerCase()},At=Et.data={},Pt=Et.NATIVE="N",xt=Et.POLYFILL="P",Ct=Et,kt=L.f,Ut=function(t,e){var n,r,o,i,a,c=t.target,u=t.global,s=t.stat;if(n=u?p:s?p[c]||N(c,{}):(p[c]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(a=kt(n,r))&&a.value:n[r],!Ct(u?r:c+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ot(i,o)}(t.sham||o&&o.sham)&&F(i,"sham",!0),rt(n,r,i,t)}},It=!!Object.getOwnPropertySymbols&&!d(function(){return!String(Symbol())}),Lt=p.Symbol,Rt=z("wks"),Mt=function(t){return Rt[t]||(Rt[t]=It&&Lt[t]||(It?Lt:V)("Symbol."+t))},Dt=Mt("match"),Ft=function(t){if(function(t){var e;return E(t)&&(void 0!==(e=t[Dt])?!!e:"RegExp"==b(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},Nt=Mt("match"),zt="".startsWith,Gt=Math.min;Ut({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Nt]=!1,"/./"[t](e)}catch(t){}}return!1}("startsWith")},{startsWith:function(t){var e=String(O(this));Ft(t);var n=lt(Gt(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return zt?zt.call(e,r,n):e.slice(n,n+r.length)===r}});var Bt,Wt,qt,Ht=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Vt=function(t,e,n){if(Ht(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},Jt=Function.call,Yt=function(t,e,n){return Vt(Jt,p[t].prototype[e],n)},Kt=(Yt("String","startsWith"),function(t){return function(e,n){var r,o,i=String(O(e)),a=st(n),c=i.length;return a<0||a>=c?t?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):r:t?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}}),Qt={codeAt:Kt(!1),charAt:Kt(!0)},Xt=function(t){return Object(O(t))},Zt=!d(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),$t=Y("IE_PROTO"),te=Object.prototype,ee=Zt?Object.getPrototypeOf:function(t){return t=Xt(t),P(t,$t)?t[$t]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?te:null},ne=Mt("iterator"),re=!1;[].keys&&("next"in(qt=[].keys())?(Wt=ee(ee(qt)))!==Object.prototype&&(Bt=Wt):re=!0),null==Bt&&(Bt={}),P(Bt,ne)||F(Bt,ne,function(){return this});var oe={IteratorPrototype:Bt,BUGGY_SAFARI_ITERATORS:re},ie=Object.keys||function(t){return gt(t,mt)},ae=h?Object.defineProperties:function(t,e){R(t);for(var n,r=ie(e),o=r.length,i=0;o>i;)D.f(t,n=r[i++],e[n]);return t},ce=at("document","documentElement"),ue=Y("IE_PROTO"),se=function(){},fe=function(){var t,e=k("iframe"),n=mt.length;for(e.style.display="none",ce.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),fe=t.F;n--;)delete fe.prototype[mt[n]];return fe()},le=Object.create||function(t,e){var n;return null!==t?(se.prototype=R(t),n=new se,se.prototype=null,n[ue]=t):n=fe(),void 0===e?n:ae(n,e)};K[ue]=!0;var pe=D.f,de=Mt("toStringTag"),he=function(t,e,n){t&&!P(t=n?t:t.prototype,de)&&pe(t,de,{configurable:!0,value:e})},ve={},ye=oe.IteratorPrototype,ge=function(){return this},me=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return R(n),function(t){if(!E(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),we=oe.IteratorPrototype,be=oe.BUGGY_SAFARI_ITERATORS,_e=Mt("iterator"),Se=function(){return this},Oe=function(t,e,n,r,o,i,a){!function(t,e,n){var r=e+" Iterator";t.prototype=le(ye,{next:m(1,n)}),he(t,r,!1),ve[r]=ge}(n,e,r);var c,u,s,f=function(t){if(t===o&&v)return v;if(!be&&t in d)return d[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",p=!1,d=t.prototype,h=d[_e]||d["@@iterator"]||o&&d[o],v=!be&&h||f(o),y="Array"==e&&d.entries||h;if(y&&(c=ee(y.call(new t)),we!==Object.prototype&&c.next&&(ee(c)!==we&&(me?me(c,we):"function"!=typeof c[_e]&&F(c,_e,Se)),he(c,l,!0))),"values"==o&&h&&"values"!==h.name&&(p=!0,v=function(){return h.call(this)}),d[_e]!==v&&F(d,_e,v),ve[e]=v,o)if(u={values:f("values"),keys:i?v:f("keys"),entries:f("entries")},a)for(s in u)!be&&!p&&s in d||rt(d,s,u[s]);else Ut({target:e,proto:!0,forced:be||p},u);return u},Te=Qt.charAt,Ee=nt.set,je=nt.getterFor("String Iterator");Oe(String,"String",function(t){Ee(this,{type:"String Iterator",string:String(t),index:0})},function(){var t,e=je(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=Te(n,r),e.index+=t.length,{value:t,done:!1})});var Ae=function(t,e,n,r){try{return r?e(R(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&R(o.call(t)),e}},Pe=Mt("iterator"),xe=Array.prototype,Ce=function(t){return void 0!==t&&(ve.Array===t||xe[Pe]===t)},ke=function(t,e,n){var r=j(e);r in t?D.f(t,r,m(0,n)):t[r]=n},Ue=Mt("toStringTag"),Ie="Arguments"==b(function(){return arguments}()),Le=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ue))?n:Ie?b(e):"Object"==(r=b(e))&&"function"==typeof e.callee?"Arguments":r},Re=Mt("iterator"),Me=function(t){if(null!=t)return t[Re]||t["@@iterator"]||ve[Le(t)]},De=Mt("iterator"),Fe=!1;try{var Ne=0,ze={next:function(){return{done:!!Ne++}},return:function(){Fe=!0}};ze[De]=function(){return this},Array.from(ze,function(){throw 2})}catch(t){}var Ge=function(t,e){if(!e&&!Fe)return!1;var n=!1;try{var r={};r[De]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Be=!Ge(function(t){Array.from(t)});Ut({target:"Array",stat:!0,forced:Be},{from:function(t){var e,n,r,o,i=Xt(t),a="function"==typeof this?this:Array,c=arguments.length,u=c>1?arguments[1]:void 0,s=void 0!==u,f=0,l=Me(i);if(s&&(u=Vt(u,c>2?arguments[2]:void 0,2)),null==l||a==Array&&Ce(l))for(n=new a(e=lt(i.length));e>f;f++)ke(n,f,s?u(i[f],f):i[f]);else for(o=l.call(i),n=new a;!(r=o.next()).done;f++)ke(n,f,s?Ae(o,u,[r.value,f],!0):r.value);return n.length=f,n}});ot.Array.from;var We,qe=D.f,He=p.DataView,Ve=He&&He.prototype,Je=p.Int8Array,Ye=Je&&Je.prototype,Ke=p.Uint8ClampedArray,Qe=Ke&&Ke.prototype,Xe=Je&&ee(Je),Ze=Ye&&ee(Ye),$e=Object.prototype,tn=$e.isPrototypeOf,en=Mt("toStringTag"),nn=V("TYPED_ARRAY_TAG"),rn=!(!p.ArrayBuffer||!He),on=rn&&!!me&&"Opera"!==Le(p.opera),an={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},cn=function(t){return E(t)&&P(an,Le(t))};for(We in an)p[We]||(on=!1);if((!on||"function"!=typeof Xe||Xe===Function.prototype)&&(Xe=function(){throw TypeError("Incorrect invocation")},on))for(We in an)p[We]&&me(p[We],Xe);if((!on||!Ze||Ze===$e)&&(Ze=Xe.prototype,on))for(We in an)p[We]&&me(p[We].prototype,Ze);if(on&&ee(Qe)!==Ze&&me(Qe,Ze),h&&!P(Ze,en))for(We in!0,qe(Ze,en,{get:function(){return E(this)?this[nn]:void 0}}),an)p[We]&&F(p[We],nn,We);rn&&me&&ee(Ve)!==$e&&me(Ve,$e);var un=function(t){if(cn(t))return t;throw TypeError("Target is not a typed array")},sn=function(t){if(me){if(tn.call(Xe,t))return t}else for(var e in an)if(P(an,We)){var n=p[e];if(n&&(t===n||tn.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},fn=function(t,e,n){if(h){if(n)for(var r in an){var o=p[r];o&&P(o.prototype,t)&&delete o.prototype[t]}Ze[t]&&!n||rt(Ze,t,n?e:on&&Ye[t]||e)}},ln=Mt("species"),pn=function(t,e){var n,r=R(t).constructor;return void 0===r||null==(n=R(r)[ln])?e:Ht(n)},dn=un,hn=sn,vn=[].slice;fn("slice",function(t,e){for(var n=vn.call(dn(this),t,e),r=pn(this,this.constructor),o=0,i=n.length,a=new(hn(r))(i);i>o;)a[o]=n[o++];return a},d(function(){new Int8Array(1).slice()}));var yn=Mt("unscopables"),gn=Array.prototype;null==gn[yn]&&F(gn,yn,le(null));var mn=function(t){gn[yn][t]=!0},wn=vt.includes;Ut({target:"Array",proto:!0},{includes:function(t){return wn(this,t,arguments.length>1?arguments[1]:void 0)}}),mn("includes");Yt("Array","includes");var bn={};bn[Mt("toStringTag")]="z";var _n="[object z]"!==String(bn)?function(){return"[object "+Le(this)+"]"}:bn.toString,Sn=Object.prototype;_n!==Sn.toString&&rt(Sn,"toString",_n,{unsafe:!0});var On={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},Tn=nt.set,En=nt.getterFor("Array Iterator"),jn=Oe(Array,"Array",function(t,e){Tn(this,{type:"Array Iterator",target:T(t),index:0,kind:e})},function(){var t=En(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values");ve.Arguments=ve.Array,mn("keys"),mn("values"),mn("entries");var An=Mt("iterator"),Pn=Mt("toStringTag"),xn=jn.values;for(var Cn in On){var kn=p[Cn],Un=kn&&kn.prototype;if(Un){if(Un[An]!==xn)try{F(Un,An,xn)}catch(t){Un[An]=xn}if(Un[Pn]||F(Un,Pn,Cn),On[Cn])for(var In in jn)if(Un[In]!==jn[In])try{F(Un,In,jn[In])}catch(t){Un[In]=jn[In]}}}var Ln,Rn,Mn,Dn=p.Promise,Fn=Mt("species"),Nn=a(function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,n,r,o,i){var a,c,u,s,f,l,p=Vt(n,r,o?2:1);if(i)a=t;else{if("function"!=typeof(c=Me(t)))throw TypeError("Target is not iterable");if(Ce(c)){for(u=0,s=lt(t.length);s>u;u++)if((f=o?p(R(l=t[u])[0],l[1]):p(t[u]))&&f instanceof e)return f;return new e(!1)}a=c.call(t)}for(;!(l=a.next()).done;)if((f=Ae(a,p,l.value,o))&&f instanceof e)return f;return new e(!1)}).stop=function(t){return new e(!0,t)}}),zn=p.location,Gn=p.setImmediate,Bn=p.clearImmediate,Wn=p.process,qn=p.MessageChannel,Hn=p.Dispatch,Vn=0,Jn={},Yn=function(t){if(Jn.hasOwnProperty(t)){var e=Jn[t];delete Jn[t],e()}},Kn=function(t){return function(){Yn(t)}},Qn=function(t){Yn(t.data)},Xn=function(t){p.postMessage(t+"",zn.protocol+"//"+zn.host)};Gn&&Bn||(Gn=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Jn[++Vn]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Ln(Vn),Vn},Bn=function(t){delete Jn[t]},"process"==b(Wn)?Ln=function(t){Wn.nextTick(Kn(t))}:Hn&&Hn.now?Ln=function(t){Hn.now(Kn(t))}:qn?(Mn=(Rn=new qn).port2,Rn.port1.onmessage=Qn,Ln=Vt(Mn.postMessage,Mn,1)):!p.addEventListener||"function"!=typeof postMessage||p.importScripts||d(Xn)?Ln="onreadystatechange"in k("script")?function(t){ce.appendChild(k("script")).onreadystatechange=function(){ce.removeChild(this),Yn(t)}}:function(t){setTimeout(Kn(t),0)}:(Ln=Xn,p.addEventListener("message",Qn,!1)));var Zn,$n,tr,er,nr,rr,or,ir,ar={set:Gn,clear:Bn},cr=at("navigator","userAgent")||"",ur=L.f,sr=ar.set,fr=p.MutationObserver||p.WebKitMutationObserver,lr=p.process,pr=p.Promise,dr="process"==b(lr),hr=ur(p,"queueMicrotask"),vr=hr&&hr.value;vr||(Zn=function(){var t,e;for(dr&&(t=lr.domain)&&t.exit();$n;){e=$n.fn,$n=$n.next;try{e()}catch(t){throw $n?er():tr=void 0,t}}tr=void 0,t&&t.enter()},dr?er=function(){lr.nextTick(Zn)}:fr&&!/(iphone|ipod|ipad).*applewebkit/i.test(cr)?(nr=!0,rr=document.createTextNode(""),new fr(Zn).observe(rr,{characterData:!0}),er=function(){rr.data=nr=!nr}):pr&&pr.resolve?(or=pr.resolve(void 0),ir=or.then,er=function(){ir.call(or,Zn)}):er=function(){sr.call(p,Zn)});var yr,gr,mr,wr,br=vr||function(t){var e={fn:t,next:void 0};tr&&(tr.next=e),$n||($n=e,er()),tr=e},_r=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=Ht(e),this.reject=Ht(n)},Sr={f:function(t){return new _r(t)}},Or=function(t,e){if(R(t),E(e)&&e.constructor===t)return e;var n=Sr.f(t);return(0,n.resolve)(e),n.promise},Tr=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Er=ar.set,jr=Mt("species"),Ar="Promise",Pr=nt.get,xr=nt.set,Cr=nt.getterFor(Ar),kr=Dn,Ur=p.TypeError,Ir=p.document,Lr=p.process,Rr=p.fetch,Mr=Lr&&Lr.versions,Dr=Mr&&Mr.v8||"",Fr=Sr.f,Nr=Fr,zr="process"==b(Lr),Gr=!!(Ir&&Ir.createEvent&&p.dispatchEvent),Br=Ct(Ar,function(){var t=kr.resolve(1),e=function(){},n=(t.constructor={})[jr]=function(t){t(e,e)};return!((zr||"function"==typeof PromiseRejectionEvent)&&t.then(e)instanceof n&&0!==Dr.indexOf("6.6")&&-1===cr.indexOf("Chrome/66"))}),Wr=Br||!Ge(function(t){kr.all(t).catch(function(){})}),qr=function(t){var e;return!(!E(t)||"function"!=typeof(e=t.then))&&e},Hr=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;br(function(){for(var o=e.value,i=1==e.state,a=0;r.length>a;){var c,u,s,f=r[a++],l=i?f.ok:f.fail,p=f.resolve,d=f.reject,h=f.domain;try{l?(i||(2===e.rejection&&Kr(t,e),e.rejection=1),!0===l?c=o:(h&&h.enter(),c=l(o),h&&(h.exit(),s=!0)),c===f.promise?d(Ur("Promise-chain cycle")):(u=qr(c))?u.call(c,p,d):p(c)):d(o)}catch(t){h&&!s&&h.exit(),d(t)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&Jr(t,e)})}},Vr=function(t,e,n){var r,o;Gr?((r=Ir.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),p.dispatchEvent(r)):r={promise:e,reason:n},(o=p["on"+t])?o(r):"unhandledrejection"===t&&function(t,e){var n=p.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},Jr=function(t,e){Er.call(p,function(){var n,r=e.value;if(Yr(e)&&(n=Tr(function(){zr?Lr.emit("unhandledRejection",r,t):Vr("unhandledrejection",t,r)}),e.rejection=zr||Yr(e)?2:1,n.error))throw n.value})},Yr=function(t){return 1!==t.rejection&&!t.parent},Kr=function(t,e){Er.call(p,function(){zr?Lr.emit("rejectionHandled",t):Vr("rejectionhandled",t,e.value)})},Qr=function(t,e,n,r){return function(o){t(e,n,o,r)}},Xr=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,Hr(t,e,!0))},Zr=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw Ur("Promise can't be resolved itself");var o=qr(n);o?br(function(){var r={done:!1};try{o.call(n,Qr(Zr,t,r,e),Qr(Xr,t,r,e))}catch(n){Xr(t,r,n,e)}}):(e.value=n,e.state=1,Hr(t,e,!1))}catch(n){Xr(t,{done:!1},n,e)}}};Br&&(kr=function(t){!function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,kr,Ar),Ht(t),yr.call(this);var e=Pr(this);try{t(Qr(Zr,this,e),Qr(Xr,this,e))}catch(t){Xr(this,e,t)}},(yr=function(t){xr(this,{type:Ar,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,n){for(var r in e)rt(t,r,e[r],n);return t}(kr.prototype,{then:function(t,e){var n=Cr(this),r=Fr(pn(this,kr));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=zr?Lr.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Hr(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),gr=function(){var t=new yr,e=Pr(t);this.promise=t,this.resolve=Qr(Zr,t,e),this.reject=Qr(Xr,t,e)},Sr.f=Fr=function(t){return t===kr||t===mr?new gr(t):Nr(t)},"function"==typeof Dn&&(wr=Dn.prototype.then,rt(Dn.prototype,"then",function(t,e){var n=this;return new kr(function(t,e){wr.call(n,t,e)}).then(t,e)}),"function"==typeof Rr&&Ut({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Or(kr,Rr.apply(p,arguments))}}))),Ut({global:!0,wrap:!0,forced:Br},{Promise:kr}),he(kr,Ar,!1),function(t){var e=at(t),n=D.f;h&&e&&!e[Fn]&&n(e,Fn,{configurable:!0,get:function(){return this}})}(Ar),mr=ot.Promise,Ut({target:Ar,stat:!0,forced:Br},{reject:function(t){var e=Fr(this);return e.reject.call(void 0,t),e.promise}}),Ut({target:Ar,stat:!0,forced:Br},{resolve:function(t){return Or(this,t)}}),Ut({target:Ar,stat:!0,forced:Wr},{all:function(t){var e=this,n=Fr(e),r=n.resolve,o=n.reject,i=Tr(function(){var n=Ht(e.resolve),i=[],a=0,c=1;Nn(t,function(t){var u=a++,s=!1;i.push(void 0),c++,n.call(e,t).then(function(t){s||(s=!0,i[u]=t,--c||r(i))},o)}),--c||r(i)});return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=Fr(e),r=n.reject,o=Tr(function(){var o=Ht(e.resolve);Nn(t,function(t){o.call(e,t).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}}),Ut({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=Sr.f(e),r=n.resolve,o=n.reject,i=Tr(function(){var n=Ht(e.resolve),o=[],i=0,a=1;Nn(t,function(t){var c=i++,u=!1;o.push(void 0),a++,n.call(e,t).then(function(t){u||(u=!0,o[c]={status:"fulfilled",value:t},--a||r(o))},function(t){u||(u=!0,o[c]={status:"rejected",reason:t},--a||r(o))})}),--a||r(o)});return i.error&&o(i.value),n.promise}}),Ut({target:"Promise",proto:!0,real:!0},{finally:function(t){var e=pn(this,at("Promise")),n="function"==typeof t;return this.then(n?function(n){return Or(e,t()).then(function(){return n})}:t,n?function(n){return Or(e,t()).then(function(){throw n})}:t)}}),"function"!=typeof Dn||Dn.prototype.finally||rt(Dn.prototype,"finally",at("Promise").prototype.finally);ot.Promise;function $r(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0?+e:e))}!function(t){function e(t){if("utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+t+"') is invalid.")}function n(t,e){if(e=void 0===e?{fatal:!1}:e,"utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+t+"') is invalid.");if(e.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(t.TextEncoder&&t.TextDecoder)return!1;Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");e=0;for(var n=t.length,r=0,o=Math.max(32,n+(n>>1)+7),i=new Uint8Array(o>>3<<3);e<n;){var a=t.charCodeAt(e++);if(55296<=a&&56319>=a){if(e<n){var c=t.charCodeAt(e);56320==(64512&c)&&(++e,a=((1023&a)<<10)+(1023&c)+65536)}if(55296<=a&&56319>=a)continue}if(r+4>i.length&&(o+=8,o=(o*=1+e/t.length*2)>>3<<3,(c=new Uint8Array(o)).set(i),i=c),0==(4294967168&a))i[r++]=a;else{if(0==(4294965248&a))i[r++]=a>>6&31|192;else if(0==(4294901760&a))i[r++]=a>>12&15|224,i[r++]=a>>6&63|128;else{if(0!=(4292870144&a))continue;i[r++]=a>>18&7|240,i[r++]=a>>12&63|128,i[r++]=a>>6&63|128}i[r++]=63&a|128}}return i.slice(0,r)},Object.defineProperty(n.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(n.prototype,"fatal",{value:!1}),Object.defineProperty(n.prototype,"ignoreBOM",{value:!1}),n.prototype.decode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");e=0;for(var n=(t=new Uint8Array(t)).length,r=[];e<n;){var o=t[e++];if(0===o)break;if(0==(128&o))r.push(o);else if(192==(224&o)){var i=63&t[e++];r.push((31&o)<<6|i)}else if(224==(240&o)){i=63&t[e++];var a=63&t[e++];r.push((31&o)<<12|i<<6|a)}else if(240==(248&o)){65535<(o=(7&o)<<18|(i=63&t[e++])<<12|(a=63&t[e++])<<6|63&t[e++])&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o)}}return String.fromCharCode.apply(null,r)},t.TextEncoder=e,t.TextDecoder=n}("undefined"!=typeof window?window:i),self.fetch||(self.fetch=function(t,e){return e=e||{},new Promise(function(n,r){var o=new XMLHttpRequest,i=[],a=[],c={},u=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(JSON.parse(o.responseText))},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:u,headers:{keys:function(){return i},entries:function(){return a},get:function(t){return c[t.toLowerCase()]},has:function(t){return t.toLowerCase()in c}}}};for(var s in o.open(e.method||"get",t,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(t,e,n){i.push(e=e.toLowerCase()),a.push([e,n]),c[e]=c[e]?c[e]+","+n:n}),n(u())},o.onerror=r,o.withCredentials="include"==e.credentials,e.headers)o.setRequestHeader(s,e.headers[s]);o.send(e.body||null)})});var to,eo={timeoutInSeconds:60},no=function(t){return t.filter(function(e,n){return t.indexOf(e)===n})},ro={error:"timeout",error_description:"Timeout"},oo=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.filter(Boolean).join();return no(n.replace(/\s/g,",").split(",")).join(" ").trim()},io=function(t){var n=function(t){for(var e,n,r={},o=t.split("&");e=o.shift();)void 0!==r[n=(e=e.split("=")).shift()]?r[n]=[].concat(r[n],$r(e.shift())):r[n]=$r(e.shift());return r}(t);return e({},n,{expires_in:parseInt(n.expires_in)})},ao=function(){var t=window.open("","auth0:authorize:popup","left=100,top=100,width=400,height=600,resizable,scrollbars=yes,status=1");if(!t)throw new Error("Could not open popup");return t},co=function(t,n,r){return t.location.href=n,new Promise(function(n,o){var i=setTimeout(function(){o(e({},ro,{popup:t}))},1e3*(r.timeoutInSeconds||60));window.addEventListener("message",function(e){if(e.data&&"authorization_response"===e.data.type){if(clearTimeout(i),t.close(),e.data.response.error)return o(e.data.response);n(e.data.response)}})})},uo=function(){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-_~.",e="";return Array.from(crypto.getRandomValues(new Uint8Array(43))).forEach(function(n){return e+=t[n%t.length]}),e},so=function(t){return btoa(t)},fo=function(t){return function(t,e){var n,r,o,i="";for(n in t)if(void 0!==(o=t[n]))if(Array.isArray(o))for(r=0;r<o.length;r++)i&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(o[r]);else i&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(o);return(e||"")+i}(t)},lo=function(t){return window.crypto.subtle.digest({name:"SHA-256"},(new TextEncoder).encode(t))},po=function(t){return function(t){return decodeURIComponent(atob(t).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(t.replace(/_/g,"/").replace(/-/g,"+"))},ho=function(t){var e=new Uint8Array(Array.from(t));return function(t){var e={"+":"-","/":"_","=":""};return t.replace(/[\+\/=]/g,function(t){return e[t]})}(window.btoa(String.fromCharCode.apply(String,Array.from(e))))},vo=function(t,e){return r(void 0,void 0,void 0,function(){var r,i,a,c,u,s,f;return o(this,function(o){switch(o.label){case 0:return[4,fetch(t,e)];case 1:return[4,(r=o.sent()).json()];case 2:if(i=o.sent(),a=i.error,c=i.error_description,u=n(i,["error","error_description"]),!r.ok)throw s=c||"HTTP error. Unable to fetch "+t,(f=new Error(s)).error=a||"request_error",f.error_description=s,f;return[2,u]}})})},yo=function(t){return r(void 0,void 0,void 0,function(){var r=t.baseUrl,i=n(t,["baseUrl"]);return o(this,function(t){switch(t.label){case 0:return[4,vo(r+"/oauth/token",{method:"POST",body:JSON.stringify(e({grant_type:"authorization_code",redirect_uri:window.location.origin},i)),headers:{"Content-type":"application/json"}})];case 1:return[2,t.sent()]}})})},go=function(t){return t.audience+"::"+t.scope},mo=function(){function t(){this.cache={}}return t.prototype.save=function(t){var e=this,n=go(t);this.cache[n]=t;var r,o,i,a=(r=t.expires_in,o=t.decodedToken.claims.exp,i=(new Date(1e3*o).getTime()-(new Date).getTime())/1e3,1e3*Math.min(r,i));setTimeout(function(){delete e.cache[n]},a)},t.prototype.get=function(t){return this.cache[go(t)]},t}(),wo=a(function(t,e){var n=i&&i.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t};function r(t,e){if(!e)return"";var n="; "+t;return!0===e?n:n+"="+e}function o(t,e,n){return encodeURIComponent(t).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(e).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(t){if("number"==typeof t.expires){var e=new Date;e.setMilliseconds(e.getMilliseconds()+864e5*t.expires),t.expires=e}return r("Expires",t.expires?t.expires.toUTCString():"")+r("Domain",t.domain)+r("Path",t.path)+r("Secure",t.secure)+r("SameSite",t.sameSite)}(n)}function a(t){for(var e={},n=t?t.split("; "):[],r=/(%[0-9A-Z]{2})+/g,o=0;o<n.length;o++){var i=n[o].split("="),a=i.slice(1).join("=");'"'===a.charAt(0)&&(a=a.slice(1,-1));try{e[i[0].replace(r,decodeURIComponent)]=a.replace(r,decodeURIComponent)}catch(t){}}return e}function c(){return a(document.cookie)}function u(t,e,r){document.cookie=o(t,e,n({path:"/"},r))}e.__esModule=!0,e.encode=o,e.parse=a,e.getAll=c,e.get=function(t){return c()[t]},e.set=u,e.remove=function(t,e){u(t,"",n({},e,{expires:-1}))}});(to=wo)&&to.__esModule&&Object.prototype.hasOwnProperty.call(to,"default")&&to.default;wo.encode,wo.parse;var bo=wo.getAll,_o=wo.get,So=wo.set,Oo=wo.remove,To=function(){return Object.keys(bo()||{})},Eo=function(t){var e=_o(t);if(void 0!==e)return JSON.parse(e)},jo=function(t,e,n){So(t,JSON.stringify(e),{expires:n.daysUntilExpire})},Ao=function(t){Oo(t)},Po="a0.spajs.txs.",xo=function(t){return""+Po+t},Co=function(){function t(){var t=this;this.transactions={},To().filter(function(t){return t.startsWith(Po)}).forEach(function(e){var n=e.replace(Po,"");t.transactions[n]=Eo(e)})}return t.prototype.create=function(t,e){this.transactions[t]=e,jo(xo(t),e,{daysUntilExpire:1})},t.prototype.get=function(t){return this.transactions[t]},t.prototype.remove=function(t){delete this.transactions[t],Ao(xo(t))},t}(),ko=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],Uo=function(t){var e,n,r,o,i,a,c,u,s=(e=t.id_token,n=e.split("."),r=n[0],o=n[1],i=n[2],a=JSON.parse(po(o)),c={__raw:e},u={},Object.keys(a).forEach(function(t){c[t]=a[t],ko.includes(t)||(u[t]=a[t])}),{encoded:{header:r,payload:o,signature:i},header:JSON.parse(po(r)),claims:c,user:u});if(s.claims.iss!==t.iss)throw new Error("Invalid issuer");if(s.claims.aud!==t.aud)throw new Error("Invalid audience");if("RS256"!==s.header.alg)throw new Error("Invalid algorithm");if(s.claims.nonce!==t.nonce)throw new Error("Invalid nonce");var f=new Date,l=new Date(0),p=new Date(0),d=new Date(0),h=t.leeway||60;if(l.setUTCSeconds(s.claims.exp+h),p.setUTCSeconds(s.claims.iat-h),d.setUTCSeconds(s.claims.nbf-h),f>l)throw new Error("id_token expired");if(f<p)throw new Error("id_token was issued in the future (invalid iat)");if(void 0!==s.claims.nbf&&f<d)throw new Error("token is not yet valid (invalid notBefore)");return s},Io=function(e){function n(t,r,o){var i=e.call(this,r)||this;return i.error=t,i.error_description=r,i.state=o,Object.setPrototypeOf(i,n.prototype),i}return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,e),n}(Error),Lo=function(){function t(t){this.options=t,this.DEFAULT_SCOPE="openid profile email",this.cache=new mo,this.transactionManager=new Co,this.domainUrl="https://"+this.options.domain}return t.prototype._url=function(t){var e=encodeURIComponent(btoa(JSON.stringify({name:"auth0-spa-js",version:"1.2.0"})));return""+this.domainUrl+t+"&auth0Client="+e},t.prototype._getParams=function(t,r,o,i,a){var c=this.options,u=(c.domain,n(c,["domain"]));return e({},u,t,{scope:oo(this.DEFAULT_SCOPE,this.options.scope,t.scope),response_type:"code",response_mode:"query",state:r,nonce:o,redirect_uri:a||this.options.redirect_uri,code_challenge:i,code_challenge_method:"S256"})},t.prototype._authorizeUrl=function(t){return this._url("/authorize?"+fo(t))},t.prototype._verifyIdToken=function(t,e){return Uo({iss:this.domainUrl+"/",aud:this.options.client_id,id_token:t,nonce:e,leeway:this.options.leeway})},t.prototype.loginWithPopup=function(t,i){return void 0===t&&(t={}),void 0===i&&(i=eo),r(this,void 0,void 0,function(){var r,a,c,u,s,f,l,p,d,h,v,y,g;return o(this,function(o){switch(o.label){case 0:return[4,ao()];case 1:return r=o.sent(),a=n(t,[]),c=so(uo()),u=uo(),s=uo(),[4,lo(s)];case 2:return f=o.sent(),l=ho(f),p=this._getParams(a,c,u,l,this.options.redirect_uri||window.location.origin),d=this._authorizeUrl(e({},p,{response_mode:"web_message"})),[4,co(r,d,i)];case 3:if(h=o.sent(),c!==h.state)throw new Error("Invalid state");return[4,yo({baseUrl:this.domainUrl,audience:t.audience||this.options.audience,client_id:this.options.client_id,code_verifier:s,code:h.code})];case 4:return v=o.sent(),y=this._verifyIdToken(v.id_token,u),g=e({},v,{decodedToken:y,scope:p.scope,audience:p.audience||"default"}),this.cache.save(g),jo("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2]}})})},t.prototype.getUser=function(t){return void 0===t&&(t={audience:this.options.audience||"default",scope:this.options.scope||this.DEFAULT_SCOPE}),r(this,void 0,void 0,function(){var e;return o(this,function(n){return t.scope=oo(this.DEFAULT_SCOPE,t.scope),[2,(e=this.cache.get(t))&&e.decodedToken.user]})})},t.prototype.getIdTokenClaims=function(t){return void 0===t&&(t={audience:this.options.audience||"default",scope:this.options.scope||this.DEFAULT_SCOPE}),r(this,void 0,void 0,function(){var e;return o(this,function(n){return t.scope=oo(this.DEFAULT_SCOPE,t.scope),[2,(e=this.cache.get(t))&&e.decodedToken.claims]})})},t.prototype.loginWithRedirect=function(t){return void 0===t&&(t={}),r(this,void 0,void 0,function(){var e,r,i,a,c,u,s,f,l,p;return o(this,function(o){switch(o.label){case 0:return e=t.redirect_uri,r=t.appState,i=n(t,["redirect_uri","appState"]),a=so(uo()),c=uo(),u=uo(),[4,lo(u)];case 1:return s=o.sent(),f=ho(s),l=this._getParams(i,a,c,f,e),p=this._authorizeUrl(l),this.transactionManager.create(a,{nonce:c,code_verifier:u,appState:r,scope:l.scope,audience:l.audience||"default"}),window.location.assign(p),[2]}})})},t.prototype.handleRedirectCallback=function(){return r(this,void 0,void 0,function(){var t,n,r,i,a,c,u,s,f;return o(this,function(o){switch(o.label){case 0:if(!window.location.search)throw new Error("There are no query params available at `window.location.search`.");if(t=io(window.location.search.substr(1)),n=t.state,r=t.code,i=t.error,a=t.error_description,i)throw new Io(i,a,n);if(!(c=this.transactionManager.get(n)))throw new Error("Invalid state");return this.transactionManager.remove(n),[4,yo({baseUrl:this.domainUrl,audience:this.options.audience,client_id:this.options.client_id,code_verifier:c.code_verifier,code:r})];case 1:return u=o.sent(),s=this._verifyIdToken(u.id_token,c.nonce),f=e({},u,{decodedToken:s,audience:c.audience,scope:c.scope}),this.cache.save(f),jo("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2,{appState:c.appState}]}})})},t.prototype.getTokenSilently=function(t){return void 0===t&&(t={audience:this.options.audience,scope:this.options.scope||this.DEFAULT_SCOPE,ignoreCache:!1}),r(this,void 0,void 0,function(){var n,r,i,a,c,u,s,f,l,p,d,h,v;return o(this,function(o){switch(o.label){case 0:return t.scope=oo(this.DEFAULT_SCOPE,t.scope),!t.ignoreCache&&(n=this.cache.get({scope:t.scope,audience:t.audience||"default"}))?[2,n.access_token]:(r=so(uo()),i=uo(),a=uo(),[4,lo(a)]);case 1:return c=o.sent(),u=ho(c),s={audience:t.audience,scope:t.scope},f=this._getParams(s,r,i,u,this.options.redirect_uri||window.location.origin),l=this._authorizeUrl(e({},f,{prompt:"none",response_mode:"web_message"})),[4,(y=l,g=this.domainUrl,new Promise(function(t,e){var n=window.document.createElement("iframe");n.setAttribute("width","0"),n.setAttribute("height","0"),n.style.display="none";var r=setTimeout(function(){e(ro),window.document.body.removeChild(n)},6e4),o=function(i){i.origin==g&&i.data&&"authorization_response"===i.data.type&&(i.source.close(),i.data.response.error?e(i.data.response):t(i.data.response),clearTimeout(r),window.removeEventListener("message",o,!1),window.document.body.removeChild(n))};window.addEventListener("message",o,!1),window.document.body.appendChild(n),n.setAttribute("src",y)}))];case 2:if(p=o.sent(),r!==p.state)throw new Error("Invalid state");return[4,yo({baseUrl:this.domainUrl,audience:t.audience||this.options.audience,client_id:this.options.client_id,code_verifier:a,code:p.code})];case 3:return d=o.sent(),h=this._verifyIdToken(d.id_token,i),v=e({},d,{decodedToken:h,scope:f.scope,audience:f.audience||"default"}),this.cache.save(v),jo("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2,d.access_token]}var y,g})})},t.prototype.getTokenWithPopup=function(t,e){return void 0===t&&(t={audience:this.options.audience,scope:this.options.scope||this.DEFAULT_SCOPE}),void 0===e&&(e=eo),r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return t.scope=oo(this.DEFAULT_SCOPE,this.options.scope,t.scope),[4,this.loginWithPopup(t,e)];case 1:return n.sent(),[2,this.cache.get({scope:t.scope,audience:t.audience||"default"}).access_token]}})})},t.prototype.isAuthenticated=function(){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.getUser()];case 1:return[2,!!t.sent()]}})})},t.prototype.logout=function(t){void 0===t&&(t={}),null!==t.client_id?t.client_id=t.client_id||this.options.client_id:delete t.client_id,Ao("auth0.is.authenticated");var e=t.federated,r=n(t,["federated"]),o=e?"&federated":"",i=this._url("/v2/logout?"+fo(r));window.location.assign(""+i+o)},t}();export default function(t){return r(this,void 0,void 0,function(){var e;return o(this,function(n){switch(n.label){case 0:if(!window.crypto&&window.msCrypto&&(window.crypto=window.msCrypto),!window.crypto)throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===window.crypto.subtle)throw new Error("\n auth0-spa-js must run on a secure origin.\n See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-error-invalid-state-in-firefox-when-refreshing-the-page-immediately-after-a-login \n for more information.\n ");if(e=new Lo(t),!Eo("auth0.is.authenticated"))return[2,e];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.getTokenSilently({audience:t.audience,scope:t.scope,ignoreCache:!0})];case 2:case 3:return n.sent(),[3,4];case 4:return[2,e]}})})} | ||
var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};var e=function(){return(e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function n(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function r(t,e,n,r){return new(n||(n=Promise))(function(o,i){function c(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(c,a)}u((r=r.apply(t,e||[])).next())})}function o(t,e){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=e.call(t,c)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var a,u,s,f="object",l=function(t){return t&&t.Math==Math&&t},p=l(typeof globalThis==f&&globalThis)||l(typeof window==f&&window)||l(typeof self==f&&self)||l(typeof i==f&&i)||Function("return this")(),d=function(t){try{return!!t()}catch(t){return!0}},h=!d(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),y={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,w={f:v&&!y.call({1:2},1)?function(t){var e=v(this,t);return!!e&&e.enumerable}:y},g=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},m={}.toString,_=function(t){return m.call(t).slice(8,-1)},b="".split,O=d(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==_(t)?b.call(t,""):Object(t)}:Object,E=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},T=function(t){return O(E(t))},S=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=function(t,e){if(!S(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!S(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!S(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!S(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},j={}.hasOwnProperty,P=function(t,e){return j.call(t,e)},U=p.document,x=S(U)&&S(U.createElement),C=function(t){return x?U.createElement(t):{}},I=!h&&!d(function(){return 7!=Object.defineProperty(C("div"),"a",{get:function(){return 7}}).a}),k=Object.getOwnPropertyDescriptor,F={f:h?k:function(t,e){if(t=T(t),e=A(e,!0),I)try{return k(t,e)}catch(t){}if(P(t,e))return g(!w.f.call(t,e),t[e])}},R=function(t){if(!S(t))throw TypeError(String(t)+" is not an object");return t},D=Object.defineProperty,L={f:h?D:function(t,e,n){if(R(t),e=A(e,!0),R(n),I)try{return D(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},M=h?function(t,e,n){return L.f(t,e,g(1,n))}:function(t,e,n){return t[e]=n,t},z=function(t,e){try{M(p,t,e)}catch(n){p[t]=e}return e},N=c(function(t){var e=p["__core-js_shared__"]||z("__core-js_shared__",{});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),B=N("native-function-to-string",Function.toString),W=p.WeakMap,q="function"==typeof W&&/native code/.test(B.call(W)),G=0,J=Math.random(),H=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++G+J).toString(36)},Y=N("keys"),V=function(t){return Y[t]||(Y[t]=H(t))},K={},Q=p.WeakMap;if(q){var X=new Q,Z=X.get,$=X.has,tt=X.set;a=function(t,e){return tt.call(X,t,e),e},u=function(t){return Z.call(X,t)||{}},s=function(t){return $.call(X,t)}}else{var et=V("state");K[et]=!0,a=function(t,e){return M(t,et,e),e},u=function(t){return P(t,et)?t[et]:{}},s=function(t){return P(t,et)}}var nt={set:a,get:u,has:s,enforce:function(t){return s(t)?u(t):a(t,{})},getterFor:function(t){return function(e){var n;if(!S(e)||(n=u(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},rt=c(function(t){var e=nt.get,n=nt.enforce,r=String(B).split("toString");N("inspectSource",function(t){return B.call(t)}),(t.exports=function(t,e,o,i){var c=!!i&&!!i.unsafe,a=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof e||P(o,"name")||M(o,"name",e),n(o).source=r.join("string"==typeof e?e:"")),t!==p?(c?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=o:M(t,e,o)):a?t[e]=o:z(e,o)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||B.call(this)})}),ot=p,it=function(t){return"function"==typeof t?t:void 0},ct=function(t,e){return arguments.length<2?it(ot[t])||it(p[t]):ot[t]&&ot[t][e]||p[t]&&p[t][e]},at=Math.ceil,ut=Math.floor,st=function(t){return isNaN(t=+t)?0:(t>0?ut:at)(t)},ft=Math.min,lt=function(t){return t>0?ft(st(t),9007199254740991):0},pt=Math.max,dt=Math.min,ht=function(t){return function(e,n,r){var o,i=T(e),c=lt(i.length),a=function(t,e){var n=st(t);return n<0?pt(n+e,0):dt(n,e)}(r,c);if(t&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},yt={includes:ht(!0),indexOf:ht(!1)},vt=yt.indexOf,wt=function(t,e){var n,r=T(t),o=0,i=[];for(n in r)!P(K,n)&&P(r,n)&&i.push(n);for(;e.length>o;)P(r,n=e[o++])&&(~vt(i,n)||i.push(n));return i},gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=gt.concat("length","prototype"),_t={f:Object.getOwnPropertyNames||function(t){return wt(t,mt)}},bt={f:Object.getOwnPropertySymbols},Ot=ct("Reflect","ownKeys")||function(t){var e=_t.f(R(t)),n=bt.f;return n?e.concat(n(t)):e},Et=function(t,e){for(var n=Ot(e),r=L.f,o=F.f,i=0;i<n.length;i++){var c=n[i];P(t,c)||r(t,c,o(e,c))}},Tt=/#|\.prototype\./,St=function(t,e){var n=jt[At(t)];return n==Ut||n!=Pt&&("function"==typeof e?d(e):!!e)},At=St.normalize=function(t){return String(t).replace(Tt,".").toLowerCase()},jt=St.data={},Pt=St.NATIVE="N",Ut=St.POLYFILL="P",xt=St,Ct=F.f,It=function(t,e){var n,r,o,i,c,a=t.target,u=t.global,s=t.stat;if(n=u?p:s?p[a]||z(a,{}):(p[a]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(c=Ct(n,r))&&c.value:n[r],!xt(u?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Et(i,o)}(t.sham||o&&o.sham)&&M(i,"sham",!0),rt(n,r,i,t)}},kt=!!Object.getOwnPropertySymbols&&!d(function(){return!String(Symbol())}),Ft=p.Symbol,Rt=N("wks"),Dt=function(t){return Rt[t]||(Rt[t]=kt&&Ft[t]||(kt?Ft:H)("Symbol."+t))},Lt=Dt("match"),Mt=function(t){if(function(t){var e;return S(t)&&(void 0!==(e=t[Lt])?!!e:"RegExp"==_(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},zt=Dt("match"),Nt="".startsWith,Bt=Math.min;It({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[zt]=!1,"/./"[t](e)}catch(t){}}return!1}("startsWith")},{startsWith:function(t){var e=String(E(this));Mt(t);var n=lt(Bt(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return Nt?Nt.call(e,r,n):e.slice(n,n+r.length)===r}});var Wt,qt,Gt,Jt=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Ht=function(t,e,n){if(Jt(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},Yt=Function.call,Vt=function(t,e,n){return Ht(Yt,p[t].prototype[e],n)},Kt=(Vt("String","startsWith"),function(t){return function(e,n){var r,o,i=String(E(e)),c=st(n),a=i.length;return c<0||c>=a?t?"":void 0:(r=i.charCodeAt(c))<55296||r>56319||c+1===a||(o=i.charCodeAt(c+1))<56320||o>57343?t?i.charAt(c):r:t?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}}),Qt={codeAt:Kt(!1),charAt:Kt(!0)},Xt=function(t){return Object(E(t))},Zt=!d(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),$t=V("IE_PROTO"),te=Object.prototype,ee=Zt?Object.getPrototypeOf:function(t){return t=Xt(t),P(t,$t)?t[$t]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?te:null},ne=Dt("iterator"),re=!1;[].keys&&("next"in(Gt=[].keys())?(qt=ee(ee(Gt)))!==Object.prototype&&(Wt=qt):re=!0),null==Wt&&(Wt={}),P(Wt,ne)||M(Wt,ne,function(){return this});var oe={IteratorPrototype:Wt,BUGGY_SAFARI_ITERATORS:re},ie=Object.keys||function(t){return wt(t,gt)},ce=h?Object.defineProperties:function(t,e){R(t);for(var n,r=ie(e),o=r.length,i=0;o>i;)L.f(t,n=r[i++],e[n]);return t},ae=ct("document","documentElement"),ue=V("IE_PROTO"),se=function(){},fe=function(){var t,e=C("iframe"),n=gt.length;for(e.style.display="none",ae.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),fe=t.F;n--;)delete fe.prototype[gt[n]];return fe()},le=Object.create||function(t,e){var n;return null!==t?(se.prototype=R(t),n=new se,se.prototype=null,n[ue]=t):n=fe(),void 0===e?n:ce(n,e)};K[ue]=!0;var pe=L.f,de=Dt("toStringTag"),he=function(t,e,n){t&&!P(t=n?t:t.prototype,de)&&pe(t,de,{configurable:!0,value:e})},ye={},ve=oe.IteratorPrototype,we=function(){return this},ge=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return R(n),function(t){if(!S(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),me=oe.IteratorPrototype,_e=oe.BUGGY_SAFARI_ITERATORS,be=Dt("iterator"),Oe=function(){return this},Ee=Qt.charAt,Te=nt.set,Se=nt.getterFor("String Iterator");!function(t,e,n,r,o,i,c){!function(t,e,n){var r=e+" Iterator";t.prototype=le(ve,{next:g(1,n)}),he(t,r,!1),ye[r]=we}(n,e,r);var a,u,s,f=function(t){if(t===o&&y)return y;if(!_e&&t in d)return d[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",p=!1,d=t.prototype,h=d[be]||d["@@iterator"]||o&&d[o],y=!_e&&h||f(o),v="Array"==e&&d.entries||h;if(v&&(a=ee(v.call(new t)),me!==Object.prototype&&a.next&&(ee(a)!==me&&(ge?ge(a,me):"function"!=typeof a[be]&&M(a,be,Oe)),he(a,l,!0))),"values"==o&&h&&"values"!==h.name&&(p=!0,y=function(){return h.call(this)}),d[be]!==y&&M(d,be,y),ye[e]=y,o)if(u={values:f("values"),keys:i?y:f("keys"),entries:f("entries")},c)for(s in u)!_e&&!p&&s in d||rt(d,s,u[s]);else It({target:e,proto:!0,forced:_e||p},u)}(String,"String",function(t){Te(this,{type:"String Iterator",string:String(t),index:0})},function(){var t,e=Se(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=Ee(n,r),e.index+=t.length,{value:t,done:!1})});var Ae=function(t,e,n,r){try{return r?e(R(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&R(o.call(t)),e}},je=Dt("iterator"),Pe=Array.prototype,Ue=function(t){return void 0!==t&&(ye.Array===t||Pe[je]===t)},xe=function(t,e,n){var r=A(e);r in t?L.f(t,r,g(0,n)):t[r]=n},Ce=Dt("toStringTag"),Ie="Arguments"==_(function(){return arguments}()),ke=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ce))?n:Ie?_(e):"Object"==(r=_(e))&&"function"==typeof e.callee?"Arguments":r},Fe=Dt("iterator"),Re=function(t){if(null!=t)return t[Fe]||t["@@iterator"]||ye[ke(t)]},De=Dt("iterator"),Le=!1;try{var Me=0,ze={next:function(){return{done:!!Me++}},return:function(){Le=!0}};ze[De]=function(){return this},Array.from(ze,function(){throw 2})}catch(t){}var Ne=!function(t,e){if(!e&&!Le)return!1;var n=!1;try{var r={};r[De]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}(function(t){Array.from(t)});It({target:"Array",stat:!0,forced:Ne},{from:function(t){var e,n,r,o,i=Xt(t),c="function"==typeof this?this:Array,a=arguments.length,u=a>1?arguments[1]:void 0,s=void 0!==u,f=0,l=Re(i);if(s&&(u=Ht(u,a>2?arguments[2]:void 0,2)),null==l||c==Array&&Ue(l))for(n=new c(e=lt(i.length));e>f;f++)xe(n,f,s?u(i[f],f):i[f]);else for(o=l.call(i),n=new c;!(r=o.next()).done;f++)xe(n,f,s?Ae(o,u,[r.value,f],!0):r.value);return n.length=f,n}});ot.Array.from;var Be,We=L.f,qe=p.DataView,Ge=qe&&qe.prototype,Je=p.Int8Array,He=Je&&Je.prototype,Ye=p.Uint8ClampedArray,Ve=Ye&&Ye.prototype,Ke=Je&&ee(Je),Qe=He&&ee(He),Xe=Object.prototype,Ze=Xe.isPrototypeOf,$e=Dt("toStringTag"),tn=H("TYPED_ARRAY_TAG"),en=!(!p.ArrayBuffer||!qe),nn=en&&!!ge&&"Opera"!==ke(p.opera),rn={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},on=function(t){return S(t)&&P(rn,ke(t))};for(Be in rn)p[Be]||(nn=!1);if((!nn||"function"!=typeof Ke||Ke===Function.prototype)&&(Ke=function(){throw TypeError("Incorrect invocation")},nn))for(Be in rn)p[Be]&&ge(p[Be],Ke);if((!nn||!Qe||Qe===Xe)&&(Qe=Ke.prototype,nn))for(Be in rn)p[Be]&&ge(p[Be].prototype,Qe);if(nn&&ee(Ve)!==Qe&&ge(Ve,Qe),h&&!P(Qe,$e))for(Be in!0,We(Qe,$e,{get:function(){return S(this)?this[tn]:void 0}}),rn)p[Be]&&M(p[Be],tn,Be);en&&ge&&ee(Ge)!==Xe&&ge(Ge,Xe);var cn=function(t){if(on(t))return t;throw TypeError("Target is not a typed array")},an=function(t){if(ge){if(Ze.call(Ke,t))return t}else for(var e in rn)if(P(rn,Be)){var n=p[e];if(n&&(t===n||Ze.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},un=function(t,e,n){if(h){if(n)for(var r in rn){var o=p[r];o&&P(o.prototype,t)&&delete o.prototype[t]}Qe[t]&&!n||rt(Qe,t,n?e:nn&&He[t]||e)}},sn=Dt("species"),fn=cn,ln=an,pn=[].slice;un("slice",function(t,e){for(var n=pn.call(fn(this),t,e),r=function(t,e){var n,r=R(t).constructor;return void 0===r||null==(n=R(r)[sn])?e:Jt(n)}(this,this.constructor),o=0,i=n.length,c=new(ln(r))(i);i>o;)c[o]=n[o++];return c},d(function(){new Int8Array(1).slice()}));var dn=Dt("unscopables"),hn=Array.prototype;null==hn[dn]&&M(hn,dn,le(null));var yn,vn=yt.includes;It({target:"Array",proto:!0},{includes:function(t){return vn(this,t,arguments.length>1?arguments[1]:void 0)}}),yn="includes",hn[dn][yn]=!0;Vt("Array","includes");function wn(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})}var gn=setTimeout;function mn(t){return Boolean(t&&void 0!==t.length)}function _n(){}function bn(t){if(!(this instanceof bn))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],jn(t,this)}function On(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,bn._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void Tn(e.promise,t)}En(e.promise,r)}else(1===t._state?En:Tn)(e.promise,t._value)})):t._deferreds.push(e)}function En(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof bn)return t._state=3,t._value=e,void Sn(t);if("function"==typeof n)return void jn((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,Sn(t)}catch(e){Tn(t,e)}var r,o}function Tn(t,e){t._state=2,t._value=e,Sn(t)}function Sn(t){2===t._state&&0===t._deferreds.length&&bn._immediateFn(function(){t._handled||bn._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)On(t,t._deferreds[e]);t._deferreds=null}function An(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function jn(t,e){var n=!1;try{t(function(t){n||(n=!0,En(e,t))},function(t){n||(n=!0,Tn(e,t))})}catch(t){if(n)return;n=!0,Tn(e,t)}}bn.prototype.catch=function(t){return this.then(null,t)},bn.prototype.then=function(t,e){var n=new this.constructor(_n);return On(this,new An(t,e,n)),n},bn.prototype.finally=wn,bn.all=function(t){return new bn(function(e,n){if(!mn(t))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;function i(t,c){try{if(c&&("object"==typeof c||"function"==typeof c)){var a=c.then;if("function"==typeof a)return void a.call(c,function(e){i(t,e)},n)}r[t]=c,0==--o&&e(r)}catch(t){n(t)}}for(var c=0;c<r.length;c++)i(c,r[c])})},bn.resolve=function(t){return t&&"object"==typeof t&&t.constructor===bn?t:new bn(function(e){e(t)})},bn.reject=function(t){return new bn(function(e,n){n(t)})},bn.race=function(t){return new bn(function(e,n){if(!mn(t))return n(new TypeError("Promise.race accepts an array"));for(var r=0,o=t.length;r<o;r++)bn.resolve(t[r]).then(e,n)})},bn._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){gn(t,0)},bn._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var Pn=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();function Un(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0?+e:e))}"Promise"in Pn?Pn.Promise.prototype.finally||(Pn.Promise.prototype.finally=wn):Pn.Promise=bn,function(t){function e(t){if("utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+t+"') is invalid.")}function n(t,e){if(e=void 0===e?{fatal:!1}:e,"utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+t+"') is invalid.");if(e.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(t.TextEncoder&&t.TextDecoder)return!1;Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");e=0;for(var n=t.length,r=0,o=Math.max(32,n+(n>>1)+7),i=new Uint8Array(o>>3<<3);e<n;){var c=t.charCodeAt(e++);if(55296<=c&&56319>=c){if(e<n){var a=t.charCodeAt(e);56320==(64512&a)&&(++e,c=((1023&c)<<10)+(1023&a)+65536)}if(55296<=c&&56319>=c)continue}if(r+4>i.length&&(o+=8,o=(o*=1+e/t.length*2)>>3<<3,(a=new Uint8Array(o)).set(i),i=a),0==(4294967168&c))i[r++]=c;else{if(0==(4294965248&c))i[r++]=c>>6&31|192;else if(0==(4294901760&c))i[r++]=c>>12&15|224,i[r++]=c>>6&63|128;else{if(0!=(4292870144&c))continue;i[r++]=c>>18&7|240,i[r++]=c>>12&63|128,i[r++]=c>>6&63|128}i[r++]=63&c|128}}return i.slice(0,r)},Object.defineProperty(n.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(n.prototype,"fatal",{value:!1}),Object.defineProperty(n.prototype,"ignoreBOM",{value:!1}),n.prototype.decode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");e=0;for(var n=(t=new Uint8Array(t)).length,r=[];e<n;){var o=t[e++];if(0===o)break;if(0==(128&o))r.push(o);else if(192==(224&o)){var i=63&t[e++];r.push((31&o)<<6|i)}else if(224==(240&o)){i=63&t[e++];var c=63&t[e++];r.push((31&o)<<12|i<<6|c)}else if(240==(248&o)){65535<(o=(7&o)<<18|(i=63&t[e++])<<12|(c=63&t[e++])<<6|63&t[e++])&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o)}}return String.fromCharCode.apply(null,r)},t.TextEncoder=e,t.TextDecoder=n}("undefined"!=typeof window?window:i),self.fetch||(self.fetch=function(t,e){return e=e||{},new Promise(function(n,r){var o=new XMLHttpRequest,i=[],c=[],a={},u=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(JSON.parse(o.responseText))},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:u,headers:{keys:function(){return i},entries:function(){return c},get:function(t){return a[t.toLowerCase()]},has:function(t){return t.toLowerCase()in a}}}};for(var s in o.open(e.method||"get",t,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(t,e,n){i.push(e=e.toLowerCase()),c.push([e,n]),a[e]=a[e]?a[e]+","+n:n}),n(u())},o.onerror=r,o.withCredentials="include"==e.credentials,e.headers)o.setRequestHeader(s,e.headers[s]);o.send(e.body||null)})});var xn,Cn={timeoutInSeconds:60},In=function(t){return t.filter(function(e,n){return t.indexOf(e)===n})},kn={error:"timeout",error_description:"Timeout"},Fn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.filter(Boolean).join();return In(n.replace(/\s/g,",").split(",")).join(" ").trim()},Rn=function(t){var n=function(t){for(var e,n,r={},o=t.split("&");e=o.shift();)void 0!==r[n=(e=e.split("=")).shift()]?r[n]=[].concat(r[n],Un(e.shift())):r[n]=Un(e.shift());return r}(t);return e({},n,{expires_in:parseInt(n.expires_in)})},Dn=function(){var t=window.open("","auth0:authorize:popup","left=100,top=100,width=400,height=600,resizable,scrollbars=yes,status=1");if(!t)throw new Error("Could not open popup");return t},Ln=function(t,n,r){return t.location.href=n,new Promise(function(n,o){var i=setTimeout(function(){o(e({},kn,{popup:t}))},1e3*(r.timeoutInSeconds||60));window.addEventListener("message",function(e){if(e.data&&"authorization_response"===e.data.type){if(clearTimeout(i),t.close(),e.data.response.error)return o(e.data.response);n(e.data.response)}})})},Mn=function(){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-_~.",e="";return Array.from(crypto.getRandomValues(new Uint8Array(43))).forEach(function(n){return e+=t[n%t.length]}),e},zn=function(t){return btoa(t)},Nn=function(t){return function(t,e){var n,r,o,i="";for(n in t)if(void 0!==(o=t[n]))if(Array.isArray(o))for(r=0;r<o.length;r++)i&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(o[r]);else i&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(o);return(e||"")+i}(t)},Bn=function(t){return window.crypto.subtle.digest({name:"SHA-256"},(new TextEncoder).encode(t))},Wn=function(t){return function(t){return decodeURIComponent(atob(t).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(t.replace(/_/g,"/").replace(/-/g,"+"))},qn=function(t){var e=new Uint8Array(Array.from(t));return function(t){var e={"+":"-","/":"_","=":""};return t.replace(/[\+\/=]/g,function(t){return e[t]})}(window.btoa(String.fromCharCode.apply(String,Array.from(e))))},Gn=function(t,e){return r(void 0,void 0,void 0,function(){var r,i,c,a,u,s,f;return o(this,function(o){switch(o.label){case 0:return[4,fetch(t,e)];case 1:return[4,(r=o.sent()).json()];case 2:if(i=o.sent(),c=i.error,a=i.error_description,u=n(i,["error","error_description"]),!r.ok)throw s=a||"HTTP error. Unable to fetch "+t,(f=new Error(s)).error=c||"request_error",f.error_description=s,f;return[2,u]}})})},Jn=function(t){return r(void 0,void 0,void 0,function(){var r=t.baseUrl,i=n(t,["baseUrl"]);return o(this,function(t){switch(t.label){case 0:return[4,Gn(r+"/oauth/token",{method:"POST",body:JSON.stringify(e({grant_type:"authorization_code",redirect_uri:window.location.origin},i)),headers:{"Content-type":"application/json"}})];case 1:return[2,t.sent()]}})})},Hn=function(t){return t.audience+"::"+t.scope},Yn=function(){function t(){this.cache={}}return t.prototype.save=function(t){var e=this,n=Hn(t);this.cache[n]=t;var r,o,i,c=(r=t.expires_in,o=t.decodedToken.claims.exp,i=(new Date(1e3*o).getTime()-(new Date).getTime())/1e3,1e3*Math.min(r,i));setTimeout(function(){delete e.cache[n]},c)},t.prototype.get=function(t){return this.cache[Hn(t)]},t}(),Vn=c(function(t,e){var n=i&&i.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t};function r(t,e){if(!e)return"";var n="; "+t;return!0===e?n:n+"="+e}function o(t,e,n){return encodeURIComponent(t).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(e).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(t){if("number"==typeof t.expires){var e=new Date;e.setMilliseconds(e.getMilliseconds()+864e5*t.expires),t.expires=e}return r("Expires",t.expires?t.expires.toUTCString():"")+r("Domain",t.domain)+r("Path",t.path)+r("Secure",t.secure)+r("SameSite",t.sameSite)}(n)}function c(t){for(var e={},n=t?t.split("; "):[],r=/(%[0-9A-Z]{2})+/g,o=0;o<n.length;o++){var i=n[o].split("="),c=i.slice(1).join("=");'"'===c.charAt(0)&&(c=c.slice(1,-1));try{e[i[0].replace(r,decodeURIComponent)]=c.replace(r,decodeURIComponent)}catch(t){}}return e}function a(){return c(document.cookie)}function u(t,e,r){document.cookie=o(t,e,n({path:"/"},r))}e.__esModule=!0,e.encode=o,e.parse=c,e.getAll=a,e.get=function(t){return a()[t]},e.set=u,e.remove=function(t,e){u(t,"",n({},e,{expires:-1}))}});(xn=Vn)&&xn.__esModule&&Object.prototype.hasOwnProperty.call(xn,"default")&&xn.default;Vn.encode,Vn.parse;var Kn=Vn.getAll,Qn=Vn.get,Xn=Vn.set,Zn=Vn.remove,$n=function(){return Object.keys(Kn()||{})},tr=function(t){var e=Qn(t);if(void 0!==e)return JSON.parse(e)},er=function(t,e,n){Xn(t,JSON.stringify(e),{expires:n.daysUntilExpire})},nr=function(t){Zn(t)},rr="a0.spajs.txs.",or=function(t){return""+rr+t},ir=function(){function t(){var t=this;this.transactions={},$n().filter(function(t){return t.startsWith(rr)}).forEach(function(e){var n=e.replace(rr,"");t.transactions[n]=tr(e)})}return t.prototype.create=function(t,e){this.transactions[t]=e,er(or(t),e,{daysUntilExpire:1})},t.prototype.get=function(t){return this.transactions[t]},t.prototype.remove=function(t){delete this.transactions[t],nr(or(t))},t}(),cr=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],ar=function(t){var e,n,r,o,i,c,a,u,s=(e=t.id_token,n=e.split("."),r=n[0],o=n[1],i=n[2],c=JSON.parse(Wn(o)),a={__raw:e},u={},Object.keys(c).forEach(function(t){a[t]=c[t],cr.includes(t)||(u[t]=c[t])}),{encoded:{header:r,payload:o,signature:i},header:JSON.parse(Wn(r)),claims:a,user:u});if(s.claims.iss!==t.iss)throw new Error("Invalid issuer");if(s.claims.aud!==t.aud)throw new Error("Invalid audience");if("RS256"!==s.header.alg)throw new Error("Invalid algorithm");if(s.claims.nonce!==t.nonce)throw new Error("Invalid nonce");var f=new Date,l=new Date(0),p=new Date(0),d=new Date(0),h=t.leeway||60;if(l.setUTCSeconds(s.claims.exp+h),p.setUTCSeconds(s.claims.iat-h),d.setUTCSeconds(s.claims.nbf-h),f>l)throw new Error("id_token expired");if(f<p)throw new Error("id_token was issued in the future (invalid iat)");if(void 0!==s.claims.nbf&&f<d)throw new Error("token is not yet valid (invalid notBefore)");return s},ur=function(e){function n(t,r,o){var i=e.call(this,r)||this;return i.error=t,i.error_description=r,i.state=o,Object.setPrototypeOf(i,n.prototype),i}return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,e),n}(Error),sr=function(){function t(t){this.options=t,this.DEFAULT_SCOPE="openid profile email",this.cache=new Yn,this.transactionManager=new ir,this.domainUrl="https://"+this.options.domain}return t.prototype._url=function(t){var e=encodeURIComponent(btoa(JSON.stringify({name:"auth0-spa-js",version:"1.2.1"})));return""+this.domainUrl+t+"&auth0Client="+e},t.prototype._getParams=function(t,r,o,i,c){var a=this.options,u=(a.domain,n(a,["domain"]));return e({},u,t,{scope:Fn(this.DEFAULT_SCOPE,this.options.scope,t.scope),response_type:"code",response_mode:"query",state:r,nonce:o,redirect_uri:c||this.options.redirect_uri,code_challenge:i,code_challenge_method:"S256"})},t.prototype._authorizeUrl=function(t){return this._url("/authorize?"+Nn(t))},t.prototype._verifyIdToken=function(t,e){return ar({iss:this.domainUrl+"/",aud:this.options.client_id,id_token:t,nonce:e,leeway:this.options.leeway})},t.prototype.loginWithPopup=function(t,i){return void 0===t&&(t={}),void 0===i&&(i=Cn),r(this,void 0,void 0,function(){var r,c,a,u,s,f,l,p,d,h,y,v,w;return o(this,function(o){switch(o.label){case 0:return[4,Dn()];case 1:return r=o.sent(),c=n(t,[]),a=zn(Mn()),u=Mn(),s=Mn(),[4,Bn(s)];case 2:return f=o.sent(),l=qn(f),p=this._getParams(c,a,u,l,this.options.redirect_uri||window.location.origin),d=this._authorizeUrl(e({},p,{response_mode:"web_message"})),[4,Ln(r,d,i)];case 3:if(h=o.sent(),a!==h.state)throw new Error("Invalid state");return[4,Jn({baseUrl:this.domainUrl,audience:t.audience||this.options.audience,client_id:this.options.client_id,code_verifier:s,code:h.code})];case 4:return y=o.sent(),v=this._verifyIdToken(y.id_token,u),w=e({},y,{decodedToken:v,scope:p.scope,audience:p.audience||"default"}),this.cache.save(w),er("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2]}})})},t.prototype.getUser=function(t){return void 0===t&&(t={audience:this.options.audience||"default",scope:this.options.scope||this.DEFAULT_SCOPE}),r(this,void 0,void 0,function(){var e;return o(this,function(n){return t.scope=Fn(this.DEFAULT_SCOPE,t.scope),[2,(e=this.cache.get(t))&&e.decodedToken.user]})})},t.prototype.getIdTokenClaims=function(t){return void 0===t&&(t={audience:this.options.audience||"default",scope:this.options.scope||this.DEFAULT_SCOPE}),r(this,void 0,void 0,function(){var e;return o(this,function(n){return t.scope=Fn(this.DEFAULT_SCOPE,t.scope),[2,(e=this.cache.get(t))&&e.decodedToken.claims]})})},t.prototype.loginWithRedirect=function(t){return void 0===t&&(t={}),r(this,void 0,void 0,function(){var e,r,i,c,a,u,s,f,l,p;return o(this,function(o){switch(o.label){case 0:return e=t.redirect_uri,r=t.appState,i=n(t,["redirect_uri","appState"]),c=zn(Mn()),a=Mn(),u=Mn(),[4,Bn(u)];case 1:return s=o.sent(),f=qn(s),l=this._getParams(i,c,a,f,e),p=this._authorizeUrl(l),this.transactionManager.create(c,{nonce:a,code_verifier:u,appState:r,scope:l.scope,audience:l.audience||"default"}),window.location.assign(p),[2]}})})},t.prototype.handleRedirectCallback=function(){return r(this,void 0,void 0,function(){var t,n,r,i,c,a,u,s,f;return o(this,function(o){switch(o.label){case 0:if(!window.location.search)throw new Error("There are no query params available at `window.location.search`.");if(t=Rn(window.location.search.substr(1)),n=t.state,r=t.code,i=t.error,c=t.error_description,i)throw new ur(i,c,n);if(!(a=this.transactionManager.get(n)))throw new Error("Invalid state");return this.transactionManager.remove(n),[4,Jn({baseUrl:this.domainUrl,audience:this.options.audience,client_id:this.options.client_id,code_verifier:a.code_verifier,code:r})];case 1:return u=o.sent(),s=this._verifyIdToken(u.id_token,a.nonce),f=e({},u,{decodedToken:s,audience:a.audience,scope:a.scope}),this.cache.save(f),er("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2,{appState:a.appState}]}})})},t.prototype.getTokenSilently=function(t){return void 0===t&&(t={audience:this.options.audience,scope:this.options.scope||this.DEFAULT_SCOPE,ignoreCache:!1}),r(this,void 0,void 0,function(){var n,r,i,c,a,u,s,f,l,p,d,h,y;return o(this,function(o){switch(o.label){case 0:return t.scope=Fn(this.DEFAULT_SCOPE,t.scope),!t.ignoreCache&&(n=this.cache.get({scope:t.scope,audience:t.audience||"default"}))?[2,n.access_token]:(r=zn(Mn()),i=Mn(),c=Mn(),[4,Bn(c)]);case 1:return a=o.sent(),u=qn(a),s={audience:t.audience,scope:t.scope},f=this._getParams(s,r,i,u,this.options.redirect_uri||window.location.origin),l=this._authorizeUrl(e({},f,{prompt:"none",response_mode:"web_message"})),[4,(v=l,w=this.domainUrl,new Promise(function(t,e){var n=window.document.createElement("iframe");n.setAttribute("width","0"),n.setAttribute("height","0"),n.style.display="none";var r=setTimeout(function(){e(kn),window.document.body.removeChild(n)},6e4),o=function(i){i.origin==w&&i.data&&"authorization_response"===i.data.type&&(i.source.close(),i.data.response.error?e(i.data.response):t(i.data.response),clearTimeout(r),window.removeEventListener("message",o,!1),window.document.body.removeChild(n))};window.addEventListener("message",o,!1),window.document.body.appendChild(n),n.setAttribute("src",v)}))];case 2:if(p=o.sent(),r!==p.state)throw new Error("Invalid state");return[4,Jn({baseUrl:this.domainUrl,audience:t.audience||this.options.audience,client_id:this.options.client_id,code_verifier:c,code:p.code})];case 3:return d=o.sent(),h=this._verifyIdToken(d.id_token,i),y=e({},d,{decodedToken:h,scope:f.scope,audience:f.audience||"default"}),this.cache.save(y),er("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2,d.access_token]}var v,w})})},t.prototype.getTokenWithPopup=function(t,e){return void 0===t&&(t={audience:this.options.audience,scope:this.options.scope||this.DEFAULT_SCOPE}),void 0===e&&(e=Cn),r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return t.scope=Fn(this.DEFAULT_SCOPE,this.options.scope,t.scope),[4,this.loginWithPopup(t,e)];case 1:return n.sent(),[2,this.cache.get({scope:t.scope,audience:t.audience||"default"}).access_token]}})})},t.prototype.isAuthenticated=function(){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.getUser()];case 1:return[2,!!t.sent()]}})})},t.prototype.logout=function(t){void 0===t&&(t={}),null!==t.client_id?t.client_id=t.client_id||this.options.client_id:delete t.client_id,nr("auth0.is.authenticated");var e=t.federated,r=n(t,["federated"]),o=e?"&federated":"",i=this._url("/v2/logout?"+Nn(r));window.location.assign(""+i+o)},t}();export default function(t){return r(this,void 0,void 0,function(){var e;return o(this,function(n){switch(n.label){case 0:if(!window.crypto&&window.msCrypto&&(window.crypto=window.msCrypto),!window.crypto)throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===window.crypto.subtle)throw new Error("\n auth0-spa-js must run on a secure origin.\n See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-error-invalid-state-in-firefox-when-refreshing-the-page-immediately-after-a-login \n for more information.\n ");if(e=new sr(t),!tr("auth0.is.authenticated"))return[2,e];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.getTokenSilently({audience:t.audience,scope:t.scope,ignoreCache:!0})];case 2:case 3:return n.sent(),[3,4];case 4:return[2,e]}})})} | ||
//# sourceMappingURL=auth0-spa-js.production.esm.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).createAuth0Client=e()}(this,function(){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};var e=function(){return(e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function n(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function r(t,e,n,r){return new(n||(n=Promise))(function(o,i){function c(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(c,a)}u((r=r.apply(t,e||[])).next())})}function o(t,e){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=e.call(t,c)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var a,u,s,f="object",l=function(t){return t&&t.Math==Math&&t},p=l(typeof globalThis==f&&globalThis)||l(typeof window==f&&window)||l(typeof self==f&&self)||l(typeof i==f&&i)||Function("return this")(),d=function(t){try{return!!t()}catch(t){return!0}},h=!d(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),v={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,g={f:y&&!v.call({1:2},1)?function(t){var e=y(this,t);return!!e&&e.enumerable}:v},m=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},w={}.toString,b=function(t){return w.call(t).slice(8,-1)},_="".split,S=d(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==b(t)?_.call(t,""):Object(t)}:Object,O=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},T=function(t){return S(O(t))},E=function(t){return"object"==typeof t?null!==t:"function"==typeof t},j=function(t,e){if(!E(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!E(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!E(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!E(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},A={}.hasOwnProperty,P=function(t,e){return A.call(t,e)},x=p.document,C=E(x)&&E(x.createElement),k=function(t){return C?x.createElement(t):{}},U=!h&&!d(function(){return 7!=Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a}),I=Object.getOwnPropertyDescriptor,L={f:h?I:function(t,e){if(t=T(t),e=j(e,!0),U)try{return I(t,e)}catch(t){}if(P(t,e))return m(!g.f.call(t,e),t[e])}},R=function(t){if(!E(t))throw TypeError(String(t)+" is not an object");return t},M=Object.defineProperty,D={f:h?M:function(t,e,n){if(R(t),e=j(e,!0),R(n),U)try{return M(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},F=h?function(t,e,n){return D.f(t,e,m(1,n))}:function(t,e,n){return t[e]=n,t},N=function(t,e){try{F(p,t,e)}catch(n){p[t]=e}return e},z=c(function(t){var e=p["__core-js_shared__"]||N("__core-js_shared__",{});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),G=z("native-function-to-string",Function.toString),B=p.WeakMap,W="function"==typeof B&&/native code/.test(G.call(B)),q=0,H=Math.random(),V=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++q+H).toString(36)},J=z("keys"),Y=function(t){return J[t]||(J[t]=V(t))},K={},Q=p.WeakMap;if(W){var X=new Q,Z=X.get,$=X.has,tt=X.set;a=function(t,e){return tt.call(X,t,e),e},u=function(t){return Z.call(X,t)||{}},s=function(t){return $.call(X,t)}}else{var et=Y("state");K[et]=!0,a=function(t,e){return F(t,et,e),e},u=function(t){return P(t,et)?t[et]:{}},s=function(t){return P(t,et)}}var nt={set:a,get:u,has:s,enforce:function(t){return s(t)?u(t):a(t,{})},getterFor:function(t){return function(e){var n;if(!E(e)||(n=u(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},rt=c(function(t){var e=nt.get,n=nt.enforce,r=String(G).split("toString");z("inspectSource",function(t){return G.call(t)}),(t.exports=function(t,e,o,i){var c=!!i&&!!i.unsafe,a=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof e||P(o,"name")||F(o,"name",e),n(o).source=r.join("string"==typeof e?e:"")),t!==p?(c?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=o:F(t,e,o)):a?t[e]=o:N(e,o)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||G.call(this)})}),ot=p,it=function(t){return"function"==typeof t?t:void 0},ct=function(t,e){return arguments.length<2?it(ot[t])||it(p[t]):ot[t]&&ot[t][e]||p[t]&&p[t][e]},at=Math.ceil,ut=Math.floor,st=function(t){return isNaN(t=+t)?0:(t>0?ut:at)(t)},ft=Math.min,lt=function(t){return t>0?ft(st(t),9007199254740991):0},pt=Math.max,dt=Math.min,ht=function(t){return function(e,n,r){var o,i=T(e),c=lt(i.length),a=function(t,e){var n=st(t);return n<0?pt(n+e,0):dt(n,e)}(r,c);if(t&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},vt={includes:ht(!0),indexOf:ht(!1)},yt=vt.indexOf,gt=function(t,e){var n,r=T(t),o=0,i=[];for(n in r)!P(K,n)&&P(r,n)&&i.push(n);for(;e.length>o;)P(r,n=e[o++])&&(~yt(i,n)||i.push(n));return i},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wt=mt.concat("length","prototype"),bt={f:Object.getOwnPropertyNames||function(t){return gt(t,wt)}},_t={f:Object.getOwnPropertySymbols},St=ct("Reflect","ownKeys")||function(t){var e=bt.f(R(t)),n=_t.f;return n?e.concat(n(t)):e},Ot=function(t,e){for(var n=St(e),r=D.f,o=L.f,i=0;i<n.length;i++){var c=n[i];P(t,c)||r(t,c,o(e,c))}},Tt=/#|\.prototype\./,Et=function(t,e){var n=At[jt(t)];return n==xt||n!=Pt&&("function"==typeof e?d(e):!!e)},jt=Et.normalize=function(t){return String(t).replace(Tt,".").toLowerCase()},At=Et.data={},Pt=Et.NATIVE="N",xt=Et.POLYFILL="P",Ct=Et,kt=L.f,Ut=function(t,e){var n,r,o,i,c,a=t.target,u=t.global,s=t.stat;if(n=u?p:s?p[a]||N(a,{}):(p[a]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(c=kt(n,r))&&c.value:n[r],!Ct(u?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ot(i,o)}(t.sham||o&&o.sham)&&F(i,"sham",!0),rt(n,r,i,t)}},It=!!Object.getOwnPropertySymbols&&!d(function(){return!String(Symbol())}),Lt=p.Symbol,Rt=z("wks"),Mt=function(t){return Rt[t]||(Rt[t]=It&&Lt[t]||(It?Lt:V)("Symbol."+t))},Dt=Mt("match"),Ft=function(t){if(function(t){var e;return E(t)&&(void 0!==(e=t[Dt])?!!e:"RegExp"==b(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},Nt=Mt("match"),zt="".startsWith,Gt=Math.min;Ut({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Nt]=!1,"/./"[t](e)}catch(t){}}return!1}("startsWith")},{startsWith:function(t){var e=String(O(this));Ft(t);var n=lt(Gt(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return zt?zt.call(e,r,n):e.slice(n,n+r.length)===r}});var Bt,Wt,qt,Ht=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Vt=function(t,e,n){if(Ht(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},Jt=Function.call,Yt=function(t,e,n){return Vt(Jt,p[t].prototype[e],n)},Kt=(Yt("String","startsWith"),function(t){return function(e,n){var r,o,i=String(O(e)),c=st(n),a=i.length;return c<0||c>=a?t?"":void 0:(r=i.charCodeAt(c))<55296||r>56319||c+1===a||(o=i.charCodeAt(c+1))<56320||o>57343?t?i.charAt(c):r:t?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}}),Qt={codeAt:Kt(!1),charAt:Kt(!0)},Xt=function(t){return Object(O(t))},Zt=!d(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),$t=Y("IE_PROTO"),te=Object.prototype,ee=Zt?Object.getPrototypeOf:function(t){return t=Xt(t),P(t,$t)?t[$t]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?te:null},ne=Mt("iterator"),re=!1;[].keys&&("next"in(qt=[].keys())?(Wt=ee(ee(qt)))!==Object.prototype&&(Bt=Wt):re=!0),null==Bt&&(Bt={}),P(Bt,ne)||F(Bt,ne,function(){return this});var oe={IteratorPrototype:Bt,BUGGY_SAFARI_ITERATORS:re},ie=Object.keys||function(t){return gt(t,mt)},ce=h?Object.defineProperties:function(t,e){R(t);for(var n,r=ie(e),o=r.length,i=0;o>i;)D.f(t,n=r[i++],e[n]);return t},ae=ct("document","documentElement"),ue=Y("IE_PROTO"),se=function(){},fe=function(){var t,e=k("iframe"),n=mt.length;for(e.style.display="none",ae.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),fe=t.F;n--;)delete fe.prototype[mt[n]];return fe()},le=Object.create||function(t,e){var n;return null!==t?(se.prototype=R(t),n=new se,se.prototype=null,n[ue]=t):n=fe(),void 0===e?n:ce(n,e)};K[ue]=!0;var pe=D.f,de=Mt("toStringTag"),he=function(t,e,n){t&&!P(t=n?t:t.prototype,de)&&pe(t,de,{configurable:!0,value:e})},ve={},ye=oe.IteratorPrototype,ge=function(){return this},me=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return R(n),function(t){if(!E(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),we=oe.IteratorPrototype,be=oe.BUGGY_SAFARI_ITERATORS,_e=Mt("iterator"),Se=function(){return this},Oe=function(t,e,n,r,o,i,c){!function(t,e,n){var r=e+" Iterator";t.prototype=le(ye,{next:m(1,n)}),he(t,r,!1),ve[r]=ge}(n,e,r);var a,u,s,f=function(t){if(t===o&&v)return v;if(!be&&t in d)return d[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",p=!1,d=t.prototype,h=d[_e]||d["@@iterator"]||o&&d[o],v=!be&&h||f(o),y="Array"==e&&d.entries||h;if(y&&(a=ee(y.call(new t)),we!==Object.prototype&&a.next&&(ee(a)!==we&&(me?me(a,we):"function"!=typeof a[_e]&&F(a,_e,Se)),he(a,l,!0))),"values"==o&&h&&"values"!==h.name&&(p=!0,v=function(){return h.call(this)}),d[_e]!==v&&F(d,_e,v),ve[e]=v,o)if(u={values:f("values"),keys:i?v:f("keys"),entries:f("entries")},c)for(s in u)!be&&!p&&s in d||rt(d,s,u[s]);else Ut({target:e,proto:!0,forced:be||p},u);return u},Te=Qt.charAt,Ee=nt.set,je=nt.getterFor("String Iterator");Oe(String,"String",function(t){Ee(this,{type:"String Iterator",string:String(t),index:0})},function(){var t,e=je(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=Te(n,r),e.index+=t.length,{value:t,done:!1})});var Ae=function(t,e,n,r){try{return r?e(R(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&R(o.call(t)),e}},Pe=Mt("iterator"),xe=Array.prototype,Ce=function(t){return void 0!==t&&(ve.Array===t||xe[Pe]===t)},ke=function(t,e,n){var r=j(e);r in t?D.f(t,r,m(0,n)):t[r]=n},Ue=Mt("toStringTag"),Ie="Arguments"==b(function(){return arguments}()),Le=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ue))?n:Ie?b(e):"Object"==(r=b(e))&&"function"==typeof e.callee?"Arguments":r},Re=Mt("iterator"),Me=function(t){if(null!=t)return t[Re]||t["@@iterator"]||ve[Le(t)]},De=Mt("iterator"),Fe=!1;try{var Ne=0,ze={next:function(){return{done:!!Ne++}},return:function(){Fe=!0}};ze[De]=function(){return this},Array.from(ze,function(){throw 2})}catch(t){}var Ge=function(t,e){if(!e&&!Fe)return!1;var n=!1;try{var r={};r[De]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Be=!Ge(function(t){Array.from(t)});Ut({target:"Array",stat:!0,forced:Be},{from:function(t){var e,n,r,o,i=Xt(t),c="function"==typeof this?this:Array,a=arguments.length,u=a>1?arguments[1]:void 0,s=void 0!==u,f=0,l=Me(i);if(s&&(u=Vt(u,a>2?arguments[2]:void 0,2)),null==l||c==Array&&Ce(l))for(n=new c(e=lt(i.length));e>f;f++)ke(n,f,s?u(i[f],f):i[f]);else for(o=l.call(i),n=new c;!(r=o.next()).done;f++)ke(n,f,s?Ae(o,u,[r.value,f],!0):r.value);return n.length=f,n}});ot.Array.from;var We,qe=D.f,He=p.DataView,Ve=He&&He.prototype,Je=p.Int8Array,Ye=Je&&Je.prototype,Ke=p.Uint8ClampedArray,Qe=Ke&&Ke.prototype,Xe=Je&&ee(Je),Ze=Ye&&ee(Ye),$e=Object.prototype,tn=$e.isPrototypeOf,en=Mt("toStringTag"),nn=V("TYPED_ARRAY_TAG"),rn=!(!p.ArrayBuffer||!He),on=rn&&!!me&&"Opera"!==Le(p.opera),cn={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},an=function(t){return E(t)&&P(cn,Le(t))};for(We in cn)p[We]||(on=!1);if((!on||"function"!=typeof Xe||Xe===Function.prototype)&&(Xe=function(){throw TypeError("Incorrect invocation")},on))for(We in cn)p[We]&&me(p[We],Xe);if((!on||!Ze||Ze===$e)&&(Ze=Xe.prototype,on))for(We in cn)p[We]&&me(p[We].prototype,Ze);if(on&&ee(Qe)!==Ze&&me(Qe,Ze),h&&!P(Ze,en))for(We in!0,qe(Ze,en,{get:function(){return E(this)?this[nn]:void 0}}),cn)p[We]&&F(p[We],nn,We);rn&&me&&ee(Ve)!==$e&&me(Ve,$e);var un=function(t){if(an(t))return t;throw TypeError("Target is not a typed array")},sn=function(t){if(me){if(tn.call(Xe,t))return t}else for(var e in cn)if(P(cn,We)){var n=p[e];if(n&&(t===n||tn.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},fn=function(t,e,n){if(h){if(n)for(var r in cn){var o=p[r];o&&P(o.prototype,t)&&delete o.prototype[t]}Ze[t]&&!n||rt(Ze,t,n?e:on&&Ye[t]||e)}},ln=Mt("species"),pn=function(t,e){var n,r=R(t).constructor;return void 0===r||null==(n=R(r)[ln])?e:Ht(n)},dn=un,hn=sn,vn=[].slice;fn("slice",function(t,e){for(var n=vn.call(dn(this),t,e),r=pn(this,this.constructor),o=0,i=n.length,c=new(hn(r))(i);i>o;)c[o]=n[o++];return c},d(function(){new Int8Array(1).slice()}));var yn=Mt("unscopables"),gn=Array.prototype;null==gn[yn]&&F(gn,yn,le(null));var mn=function(t){gn[yn][t]=!0},wn=vt.includes;Ut({target:"Array",proto:!0},{includes:function(t){return wn(this,t,arguments.length>1?arguments[1]:void 0)}}),mn("includes");Yt("Array","includes");var bn={};bn[Mt("toStringTag")]="z";var _n="[object z]"!==String(bn)?function(){return"[object "+Le(this)+"]"}:bn.toString,Sn=Object.prototype;_n!==Sn.toString&&rt(Sn,"toString",_n,{unsafe:!0});var On={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},Tn=nt.set,En=nt.getterFor("Array Iterator"),jn=Oe(Array,"Array",function(t,e){Tn(this,{type:"Array Iterator",target:T(t),index:0,kind:e})},function(){var t=En(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values");ve.Arguments=ve.Array,mn("keys"),mn("values"),mn("entries");var An=Mt("iterator"),Pn=Mt("toStringTag"),xn=jn.values;for(var Cn in On){var kn=p[Cn],Un=kn&&kn.prototype;if(Un){if(Un[An]!==xn)try{F(Un,An,xn)}catch(t){Un[An]=xn}if(Un[Pn]||F(Un,Pn,Cn),On[Cn])for(var In in jn)if(Un[In]!==jn[In])try{F(Un,In,jn[In])}catch(t){Un[In]=jn[In]}}}var Ln,Rn,Mn,Dn=p.Promise,Fn=Mt("species"),Nn=c(function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,n,r,o,i){var c,a,u,s,f,l,p=Vt(n,r,o?2:1);if(i)c=t;else{if("function"!=typeof(a=Me(t)))throw TypeError("Target is not iterable");if(Ce(a)){for(u=0,s=lt(t.length);s>u;u++)if((f=o?p(R(l=t[u])[0],l[1]):p(t[u]))&&f instanceof e)return f;return new e(!1)}c=a.call(t)}for(;!(l=c.next()).done;)if((f=Ae(c,p,l.value,o))&&f instanceof e)return f;return new e(!1)}).stop=function(t){return new e(!0,t)}}),zn=p.location,Gn=p.setImmediate,Bn=p.clearImmediate,Wn=p.process,qn=p.MessageChannel,Hn=p.Dispatch,Vn=0,Jn={},Yn=function(t){if(Jn.hasOwnProperty(t)){var e=Jn[t];delete Jn[t],e()}},Kn=function(t){return function(){Yn(t)}},Qn=function(t){Yn(t.data)},Xn=function(t){p.postMessage(t+"",zn.protocol+"//"+zn.host)};Gn&&Bn||(Gn=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Jn[++Vn]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Ln(Vn),Vn},Bn=function(t){delete Jn[t]},"process"==b(Wn)?Ln=function(t){Wn.nextTick(Kn(t))}:Hn&&Hn.now?Ln=function(t){Hn.now(Kn(t))}:qn?(Mn=(Rn=new qn).port2,Rn.port1.onmessage=Qn,Ln=Vt(Mn.postMessage,Mn,1)):!p.addEventListener||"function"!=typeof postMessage||p.importScripts||d(Xn)?Ln="onreadystatechange"in k("script")?function(t){ae.appendChild(k("script")).onreadystatechange=function(){ae.removeChild(this),Yn(t)}}:function(t){setTimeout(Kn(t),0)}:(Ln=Xn,p.addEventListener("message",Qn,!1)));var Zn,$n,tr,er,nr,rr,or,ir,cr={set:Gn,clear:Bn},ar=ct("navigator","userAgent")||"",ur=L.f,sr=cr.set,fr=p.MutationObserver||p.WebKitMutationObserver,lr=p.process,pr=p.Promise,dr="process"==b(lr),hr=ur(p,"queueMicrotask"),vr=hr&&hr.value;vr||(Zn=function(){var t,e;for(dr&&(t=lr.domain)&&t.exit();$n;){e=$n.fn,$n=$n.next;try{e()}catch(t){throw $n?er():tr=void 0,t}}tr=void 0,t&&t.enter()},dr?er=function(){lr.nextTick(Zn)}:fr&&!/(iphone|ipod|ipad).*applewebkit/i.test(ar)?(nr=!0,rr=document.createTextNode(""),new fr(Zn).observe(rr,{characterData:!0}),er=function(){rr.data=nr=!nr}):pr&&pr.resolve?(or=pr.resolve(void 0),ir=or.then,er=function(){ir.call(or,Zn)}):er=function(){sr.call(p,Zn)});var yr,gr,mr,wr,br=vr||function(t){var e={fn:t,next:void 0};tr&&(tr.next=e),$n||($n=e,er()),tr=e},_r=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=Ht(e),this.reject=Ht(n)},Sr={f:function(t){return new _r(t)}},Or=function(t,e){if(R(t),E(e)&&e.constructor===t)return e;var n=Sr.f(t);return(0,n.resolve)(e),n.promise},Tr=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Er=cr.set,jr=Mt("species"),Ar="Promise",Pr=nt.get,xr=nt.set,Cr=nt.getterFor(Ar),kr=Dn,Ur=p.TypeError,Ir=p.document,Lr=p.process,Rr=p.fetch,Mr=Lr&&Lr.versions,Dr=Mr&&Mr.v8||"",Fr=Sr.f,Nr=Fr,zr="process"==b(Lr),Gr=!!(Ir&&Ir.createEvent&&p.dispatchEvent),Br=Ct(Ar,function(){var t=kr.resolve(1),e=function(){},n=(t.constructor={})[jr]=function(t){t(e,e)};return!((zr||"function"==typeof PromiseRejectionEvent)&&t.then(e)instanceof n&&0!==Dr.indexOf("6.6")&&-1===ar.indexOf("Chrome/66"))}),Wr=Br||!Ge(function(t){kr.all(t).catch(function(){})}),qr=function(t){var e;return!(!E(t)||"function"!=typeof(e=t.then))&&e},Hr=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;br(function(){for(var o=e.value,i=1==e.state,c=0;r.length>c;){var a,u,s,f=r[c++],l=i?f.ok:f.fail,p=f.resolve,d=f.reject,h=f.domain;try{l?(i||(2===e.rejection&&Kr(t,e),e.rejection=1),!0===l?a=o:(h&&h.enter(),a=l(o),h&&(h.exit(),s=!0)),a===f.promise?d(Ur("Promise-chain cycle")):(u=qr(a))?u.call(a,p,d):p(a)):d(o)}catch(t){h&&!s&&h.exit(),d(t)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&Jr(t,e)})}},Vr=function(t,e,n){var r,o;Gr?((r=Ir.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),p.dispatchEvent(r)):r={promise:e,reason:n},(o=p["on"+t])?o(r):"unhandledrejection"===t&&function(t,e){var n=p.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},Jr=function(t,e){Er.call(p,function(){var n,r=e.value;if(Yr(e)&&(n=Tr(function(){zr?Lr.emit("unhandledRejection",r,t):Vr("unhandledrejection",t,r)}),e.rejection=zr||Yr(e)?2:1,n.error))throw n.value})},Yr=function(t){return 1!==t.rejection&&!t.parent},Kr=function(t,e){Er.call(p,function(){zr?Lr.emit("rejectionHandled",t):Vr("rejectionhandled",t,e.value)})},Qr=function(t,e,n,r){return function(o){t(e,n,o,r)}},Xr=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,Hr(t,e,!0))},Zr=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw Ur("Promise can't be resolved itself");var o=qr(n);o?br(function(){var r={done:!1};try{o.call(n,Qr(Zr,t,r,e),Qr(Xr,t,r,e))}catch(n){Xr(t,r,n,e)}}):(e.value=n,e.state=1,Hr(t,e,!1))}catch(n){Xr(t,{done:!1},n,e)}}};Br&&(kr=function(t){!function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,kr,Ar),Ht(t),yr.call(this);var e=Pr(this);try{t(Qr(Zr,this,e),Qr(Xr,this,e))}catch(t){Xr(this,e,t)}},(yr=function(t){xr(this,{type:Ar,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,n){for(var r in e)rt(t,r,e[r],n);return t}(kr.prototype,{then:function(t,e){var n=Cr(this),r=Fr(pn(this,kr));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=zr?Lr.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Hr(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),gr=function(){var t=new yr,e=Pr(t);this.promise=t,this.resolve=Qr(Zr,t,e),this.reject=Qr(Xr,t,e)},Sr.f=Fr=function(t){return t===kr||t===mr?new gr(t):Nr(t)},"function"==typeof Dn&&(wr=Dn.prototype.then,rt(Dn.prototype,"then",function(t,e){var n=this;return new kr(function(t,e){wr.call(n,t,e)}).then(t,e)}),"function"==typeof Rr&&Ut({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Or(kr,Rr.apply(p,arguments))}}))),Ut({global:!0,wrap:!0,forced:Br},{Promise:kr}),he(kr,Ar,!1),function(t){var e=ct(t),n=D.f;h&&e&&!e[Fn]&&n(e,Fn,{configurable:!0,get:function(){return this}})}(Ar),mr=ot.Promise,Ut({target:Ar,stat:!0,forced:Br},{reject:function(t){var e=Fr(this);return e.reject.call(void 0,t),e.promise}}),Ut({target:Ar,stat:!0,forced:Br},{resolve:function(t){return Or(this,t)}}),Ut({target:Ar,stat:!0,forced:Wr},{all:function(t){var e=this,n=Fr(e),r=n.resolve,o=n.reject,i=Tr(function(){var n=Ht(e.resolve),i=[],c=0,a=1;Nn(t,function(t){var u=c++,s=!1;i.push(void 0),a++,n.call(e,t).then(function(t){s||(s=!0,i[u]=t,--a||r(i))},o)}),--a||r(i)});return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=Fr(e),r=n.reject,o=Tr(function(){var o=Ht(e.resolve);Nn(t,function(t){o.call(e,t).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}}),Ut({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=Sr.f(e),r=n.resolve,o=n.reject,i=Tr(function(){var n=Ht(e.resolve),o=[],i=0,c=1;Nn(t,function(t){var a=i++,u=!1;o.push(void 0),c++,n.call(e,t).then(function(t){u||(u=!0,o[a]={status:"fulfilled",value:t},--c||r(o))},function(t){u||(u=!0,o[a]={status:"rejected",reason:t},--c||r(o))})}),--c||r(o)});return i.error&&o(i.value),n.promise}}),Ut({target:"Promise",proto:!0,real:!0},{finally:function(t){var e=pn(this,ct("Promise")),n="function"==typeof t;return this.then(n?function(n){return Or(e,t()).then(function(){return n})}:t,n?function(n){return Or(e,t()).then(function(){throw n})}:t)}}),"function"!=typeof Dn||Dn.prototype.finally||rt(Dn.prototype,"finally",ct("Promise").prototype.finally);ot.Promise;function $r(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0?+e:e))}!function(t){function e(t){if("utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+t+"') is invalid.")}function n(t,e){if(e=void 0===e?{fatal:!1}:e,"utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+t+"') is invalid.");if(e.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(t.TextEncoder&&t.TextDecoder)return!1;Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");e=0;for(var n=t.length,r=0,o=Math.max(32,n+(n>>1)+7),i=new Uint8Array(o>>3<<3);e<n;){var c=t.charCodeAt(e++);if(55296<=c&&56319>=c){if(e<n){var a=t.charCodeAt(e);56320==(64512&a)&&(++e,c=((1023&c)<<10)+(1023&a)+65536)}if(55296<=c&&56319>=c)continue}if(r+4>i.length&&(o+=8,o=(o*=1+e/t.length*2)>>3<<3,(a=new Uint8Array(o)).set(i),i=a),0==(4294967168&c))i[r++]=c;else{if(0==(4294965248&c))i[r++]=c>>6&31|192;else if(0==(4294901760&c))i[r++]=c>>12&15|224,i[r++]=c>>6&63|128;else{if(0!=(4292870144&c))continue;i[r++]=c>>18&7|240,i[r++]=c>>12&63|128,i[r++]=c>>6&63|128}i[r++]=63&c|128}}return i.slice(0,r)},Object.defineProperty(n.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(n.prototype,"fatal",{value:!1}),Object.defineProperty(n.prototype,"ignoreBOM",{value:!1}),n.prototype.decode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");e=0;for(var n=(t=new Uint8Array(t)).length,r=[];e<n;){var o=t[e++];if(0===o)break;if(0==(128&o))r.push(o);else if(192==(224&o)){var i=63&t[e++];r.push((31&o)<<6|i)}else if(224==(240&o)){i=63&t[e++];var c=63&t[e++];r.push((31&o)<<12|i<<6|c)}else if(240==(248&o)){65535<(o=(7&o)<<18|(i=63&t[e++])<<12|(c=63&t[e++])<<6|63&t[e++])&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o)}}return String.fromCharCode.apply(null,r)},t.TextEncoder=e,t.TextDecoder=n}("undefined"!=typeof window?window:i),self.fetch||(self.fetch=function(t,e){return e=e||{},new Promise(function(n,r){var o=new XMLHttpRequest,i=[],c=[],a={},u=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(JSON.parse(o.responseText))},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:u,headers:{keys:function(){return i},entries:function(){return c},get:function(t){return a[t.toLowerCase()]},has:function(t){return t.toLowerCase()in a}}}};for(var s in o.open(e.method||"get",t,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(t,e,n){i.push(e=e.toLowerCase()),c.push([e,n]),a[e]=a[e]?a[e]+","+n:n}),n(u())},o.onerror=r,o.withCredentials="include"==e.credentials,e.headers)o.setRequestHeader(s,e.headers[s]);o.send(e.body||null)})});var to,eo={timeoutInSeconds:60},no=function(t){return t.filter(function(e,n){return t.indexOf(e)===n})},ro={error:"timeout",error_description:"Timeout"},oo=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.filter(Boolean).join();return no(n.replace(/\s/g,",").split(",")).join(" ").trim()},io=function(t){var n=function(t){for(var e,n,r={},o=t.split("&");e=o.shift();)void 0!==r[n=(e=e.split("=")).shift()]?r[n]=[].concat(r[n],$r(e.shift())):r[n]=$r(e.shift());return r}(t);return e({},n,{expires_in:parseInt(n.expires_in)})},co=function(){var t=window.open("","auth0:authorize:popup","left=100,top=100,width=400,height=600,resizable,scrollbars=yes,status=1");if(!t)throw new Error("Could not open popup");return t},ao=function(t,n,r){return t.location.href=n,new Promise(function(n,o){var i=setTimeout(function(){o(e({},ro,{popup:t}))},1e3*(r.timeoutInSeconds||60));window.addEventListener("message",function(e){if(e.data&&"authorization_response"===e.data.type){if(clearTimeout(i),t.close(),e.data.response.error)return o(e.data.response);n(e.data.response)}})})},uo=function(){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-_~.",e="";return Array.from(crypto.getRandomValues(new Uint8Array(43))).forEach(function(n){return e+=t[n%t.length]}),e},so=function(t){return btoa(t)},fo=function(t){return function(t,e){var n,r,o,i="";for(n in t)if(void 0!==(o=t[n]))if(Array.isArray(o))for(r=0;r<o.length;r++)i&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(o[r]);else i&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(o);return(e||"")+i}(t)},lo=function(t){return window.crypto.subtle.digest({name:"SHA-256"},(new TextEncoder).encode(t))},po=function(t){return function(t){return decodeURIComponent(atob(t).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(t.replace(/_/g,"/").replace(/-/g,"+"))},ho=function(t){var e=new Uint8Array(Array.from(t));return function(t){var e={"+":"-","/":"_","=":""};return t.replace(/[\+\/=]/g,function(t){return e[t]})}(window.btoa(String.fromCharCode.apply(String,Array.from(e))))},vo=function(t,e){return r(void 0,void 0,void 0,function(){var r,i,c,a,u,s,f;return o(this,function(o){switch(o.label){case 0:return[4,fetch(t,e)];case 1:return[4,(r=o.sent()).json()];case 2:if(i=o.sent(),c=i.error,a=i.error_description,u=n(i,["error","error_description"]),!r.ok)throw s=a||"HTTP error. Unable to fetch "+t,(f=new Error(s)).error=c||"request_error",f.error_description=s,f;return[2,u]}})})},yo=function(t){return r(void 0,void 0,void 0,function(){var r=t.baseUrl,i=n(t,["baseUrl"]);return o(this,function(t){switch(t.label){case 0:return[4,vo(r+"/oauth/token",{method:"POST",body:JSON.stringify(e({grant_type:"authorization_code",redirect_uri:window.location.origin},i)),headers:{"Content-type":"application/json"}})];case 1:return[2,t.sent()]}})})},go=function(t){return t.audience+"::"+t.scope},mo=function(){function t(){this.cache={}}return t.prototype.save=function(t){var e=this,n=go(t);this.cache[n]=t;var r,o,i,c=(r=t.expires_in,o=t.decodedToken.claims.exp,i=(new Date(1e3*o).getTime()-(new Date).getTime())/1e3,1e3*Math.min(r,i));setTimeout(function(){delete e.cache[n]},c)},t.prototype.get=function(t){return this.cache[go(t)]},t}(),wo=c(function(t,e){var n=i&&i.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t};function r(t,e){if(!e)return"";var n="; "+t;return!0===e?n:n+"="+e}function o(t,e,n){return encodeURIComponent(t).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(e).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(t){if("number"==typeof t.expires){var e=new Date;e.setMilliseconds(e.getMilliseconds()+864e5*t.expires),t.expires=e}return r("Expires",t.expires?t.expires.toUTCString():"")+r("Domain",t.domain)+r("Path",t.path)+r("Secure",t.secure)+r("SameSite",t.sameSite)}(n)}function c(t){for(var e={},n=t?t.split("; "):[],r=/(%[0-9A-Z]{2})+/g,o=0;o<n.length;o++){var i=n[o].split("="),c=i.slice(1).join("=");'"'===c.charAt(0)&&(c=c.slice(1,-1));try{e[i[0].replace(r,decodeURIComponent)]=c.replace(r,decodeURIComponent)}catch(t){}}return e}function a(){return c(document.cookie)}function u(t,e,r){document.cookie=o(t,e,n({path:"/"},r))}e.__esModule=!0,e.encode=o,e.parse=c,e.getAll=a,e.get=function(t){return a()[t]},e.set=u,e.remove=function(t,e){u(t,"",n({},e,{expires:-1}))}});(to=wo)&&to.__esModule&&Object.prototype.hasOwnProperty.call(to,"default")&&to.default;wo.encode,wo.parse;var bo=wo.getAll,_o=wo.get,So=wo.set,Oo=wo.remove,To=function(){return Object.keys(bo()||{})},Eo=function(t){var e=_o(t);if(void 0!==e)return JSON.parse(e)},jo=function(t,e,n){So(t,JSON.stringify(e),{expires:n.daysUntilExpire})},Ao=function(t){Oo(t)},Po="a0.spajs.txs.",xo=function(t){return""+Po+t},Co=function(){function t(){var t=this;this.transactions={},To().filter(function(t){return t.startsWith(Po)}).forEach(function(e){var n=e.replace(Po,"");t.transactions[n]=Eo(e)})}return t.prototype.create=function(t,e){this.transactions[t]=e,jo(xo(t),e,{daysUntilExpire:1})},t.prototype.get=function(t){return this.transactions[t]},t.prototype.remove=function(t){delete this.transactions[t],Ao(xo(t))},t}(),ko=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],Uo=function(t){var e,n,r,o,i,c,a,u,s=(e=t.id_token,n=e.split("."),r=n[0],o=n[1],i=n[2],c=JSON.parse(po(o)),a={__raw:e},u={},Object.keys(c).forEach(function(t){a[t]=c[t],ko.includes(t)||(u[t]=c[t])}),{encoded:{header:r,payload:o,signature:i},header:JSON.parse(po(r)),claims:a,user:u});if(s.claims.iss!==t.iss)throw new Error("Invalid issuer");if(s.claims.aud!==t.aud)throw new Error("Invalid audience");if("RS256"!==s.header.alg)throw new Error("Invalid algorithm");if(s.claims.nonce!==t.nonce)throw new Error("Invalid nonce");var f=new Date,l=new Date(0),p=new Date(0),d=new Date(0),h=t.leeway||60;if(l.setUTCSeconds(s.claims.exp+h),p.setUTCSeconds(s.claims.iat-h),d.setUTCSeconds(s.claims.nbf-h),f>l)throw new Error("id_token expired");if(f<p)throw new Error("id_token was issued in the future (invalid iat)");if(void 0!==s.claims.nbf&&f<d)throw new Error("token is not yet valid (invalid notBefore)");return s},Io=function(e){function n(t,r,o){var i=e.call(this,r)||this;return i.error=t,i.error_description=r,i.state=o,Object.setPrototypeOf(i,n.prototype),i}return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,e),n}(Error),Lo=function(){function t(t){this.options=t,this.DEFAULT_SCOPE="openid profile email",this.cache=new mo,this.transactionManager=new Co,this.domainUrl="https://"+this.options.domain}return t.prototype._url=function(t){var e=encodeURIComponent(btoa(JSON.stringify({name:"auth0-spa-js",version:"1.2.0"})));return""+this.domainUrl+t+"&auth0Client="+e},t.prototype._getParams=function(t,r,o,i,c){var a=this.options,u=(a.domain,n(a,["domain"]));return e({},u,t,{scope:oo(this.DEFAULT_SCOPE,this.options.scope,t.scope),response_type:"code",response_mode:"query",state:r,nonce:o,redirect_uri:c||this.options.redirect_uri,code_challenge:i,code_challenge_method:"S256"})},t.prototype._authorizeUrl=function(t){return this._url("/authorize?"+fo(t))},t.prototype._verifyIdToken=function(t,e){return Uo({iss:this.domainUrl+"/",aud:this.options.client_id,id_token:t,nonce:e,leeway:this.options.leeway})},t.prototype.loginWithPopup=function(t,i){return void 0===t&&(t={}),void 0===i&&(i=eo),r(this,void 0,void 0,function(){var r,c,a,u,s,f,l,p,d,h,v,y,g;return o(this,function(o){switch(o.label){case 0:return[4,co()];case 1:return r=o.sent(),c=n(t,[]),a=so(uo()),u=uo(),s=uo(),[4,lo(s)];case 2:return f=o.sent(),l=ho(f),p=this._getParams(c,a,u,l,this.options.redirect_uri||window.location.origin),d=this._authorizeUrl(e({},p,{response_mode:"web_message"})),[4,ao(r,d,i)];case 3:if(h=o.sent(),a!==h.state)throw new Error("Invalid state");return[4,yo({baseUrl:this.domainUrl,audience:t.audience||this.options.audience,client_id:this.options.client_id,code_verifier:s,code:h.code})];case 4:return v=o.sent(),y=this._verifyIdToken(v.id_token,u),g=e({},v,{decodedToken:y,scope:p.scope,audience:p.audience||"default"}),this.cache.save(g),jo("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2]}})})},t.prototype.getUser=function(t){return void 0===t&&(t={audience:this.options.audience||"default",scope:this.options.scope||this.DEFAULT_SCOPE}),r(this,void 0,void 0,function(){var e;return o(this,function(n){return t.scope=oo(this.DEFAULT_SCOPE,t.scope),[2,(e=this.cache.get(t))&&e.decodedToken.user]})})},t.prototype.getIdTokenClaims=function(t){return void 0===t&&(t={audience:this.options.audience||"default",scope:this.options.scope||this.DEFAULT_SCOPE}),r(this,void 0,void 0,function(){var e;return o(this,function(n){return t.scope=oo(this.DEFAULT_SCOPE,t.scope),[2,(e=this.cache.get(t))&&e.decodedToken.claims]})})},t.prototype.loginWithRedirect=function(t){return void 0===t&&(t={}),r(this,void 0,void 0,function(){var e,r,i,c,a,u,s,f,l,p;return o(this,function(o){switch(o.label){case 0:return e=t.redirect_uri,r=t.appState,i=n(t,["redirect_uri","appState"]),c=so(uo()),a=uo(),u=uo(),[4,lo(u)];case 1:return s=o.sent(),f=ho(s),l=this._getParams(i,c,a,f,e),p=this._authorizeUrl(l),this.transactionManager.create(c,{nonce:a,code_verifier:u,appState:r,scope:l.scope,audience:l.audience||"default"}),window.location.assign(p),[2]}})})},t.prototype.handleRedirectCallback=function(){return r(this,void 0,void 0,function(){var t,n,r,i,c,a,u,s,f;return o(this,function(o){switch(o.label){case 0:if(!window.location.search)throw new Error("There are no query params available at `window.location.search`.");if(t=io(window.location.search.substr(1)),n=t.state,r=t.code,i=t.error,c=t.error_description,i)throw new Io(i,c,n);if(!(a=this.transactionManager.get(n)))throw new Error("Invalid state");return this.transactionManager.remove(n),[4,yo({baseUrl:this.domainUrl,audience:this.options.audience,client_id:this.options.client_id,code_verifier:a.code_verifier,code:r})];case 1:return u=o.sent(),s=this._verifyIdToken(u.id_token,a.nonce),f=e({},u,{decodedToken:s,audience:a.audience,scope:a.scope}),this.cache.save(f),jo("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2,{appState:a.appState}]}})})},t.prototype.getTokenSilently=function(t){return void 0===t&&(t={audience:this.options.audience,scope:this.options.scope||this.DEFAULT_SCOPE,ignoreCache:!1}),r(this,void 0,void 0,function(){var n,r,i,c,a,u,s,f,l,p,d,h,v;return o(this,function(o){switch(o.label){case 0:return t.scope=oo(this.DEFAULT_SCOPE,t.scope),!t.ignoreCache&&(n=this.cache.get({scope:t.scope,audience:t.audience||"default"}))?[2,n.access_token]:(r=so(uo()),i=uo(),c=uo(),[4,lo(c)]);case 1:return a=o.sent(),u=ho(a),s={audience:t.audience,scope:t.scope},f=this._getParams(s,r,i,u,this.options.redirect_uri||window.location.origin),l=this._authorizeUrl(e({},f,{prompt:"none",response_mode:"web_message"})),[4,(y=l,g=this.domainUrl,new Promise(function(t,e){var n=window.document.createElement("iframe");n.setAttribute("width","0"),n.setAttribute("height","0"),n.style.display="none";var r=setTimeout(function(){e(ro),window.document.body.removeChild(n)},6e4),o=function(i){i.origin==g&&i.data&&"authorization_response"===i.data.type&&(i.source.close(),i.data.response.error?e(i.data.response):t(i.data.response),clearTimeout(r),window.removeEventListener("message",o,!1),window.document.body.removeChild(n))};window.addEventListener("message",o,!1),window.document.body.appendChild(n),n.setAttribute("src",y)}))];case 2:if(p=o.sent(),r!==p.state)throw new Error("Invalid state");return[4,yo({baseUrl:this.domainUrl,audience:t.audience||this.options.audience,client_id:this.options.client_id,code_verifier:c,code:p.code})];case 3:return d=o.sent(),h=this._verifyIdToken(d.id_token,i),v=e({},d,{decodedToken:h,scope:f.scope,audience:f.audience||"default"}),this.cache.save(v),jo("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2,d.access_token]}var y,g})})},t.prototype.getTokenWithPopup=function(t,e){return void 0===t&&(t={audience:this.options.audience,scope:this.options.scope||this.DEFAULT_SCOPE}),void 0===e&&(e=eo),r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return t.scope=oo(this.DEFAULT_SCOPE,this.options.scope,t.scope),[4,this.loginWithPopup(t,e)];case 1:return n.sent(),[2,this.cache.get({scope:t.scope,audience:t.audience||"default"}).access_token]}})})},t.prototype.isAuthenticated=function(){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.getUser()];case 1:return[2,!!t.sent()]}})})},t.prototype.logout=function(t){void 0===t&&(t={}),null!==t.client_id?t.client_id=t.client_id||this.options.client_id:delete t.client_id,Ao("auth0.is.authenticated");var e=t.federated,r=n(t,["federated"]),o=e?"&federated":"",i=this._url("/v2/logout?"+fo(r));window.location.assign(""+i+o)},t}();return function(t){return r(this,void 0,void 0,function(){var e;return o(this,function(n){switch(n.label){case 0:if(!window.crypto&&window.msCrypto&&(window.crypto=window.msCrypto),!window.crypto)throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===window.crypto.subtle)throw new Error("\n auth0-spa-js must run on a secure origin.\n See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-error-invalid-state-in-firefox-when-refreshing-the-page-immediately-after-a-login \n for more information.\n ");if(e=new Lo(t),!Eo("auth0.is.authenticated"))return[2,e];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.getTokenSilently({audience:t.audience,scope:t.scope,ignoreCache:!0})];case 2:case 3:return n.sent(),[3,4];case 4:return[2,e]}})})}}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).createAuth0Client=e()}(this,function(){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};var e=function(){return(e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function n(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function r(t,e,n,r){return new(n||(n=Promise))(function(o,i){function c(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(c,a)}u((r=r.apply(t,e||[])).next())})}function o(t,e){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=e.call(t,c)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var a,u,s,f="object",l=function(t){return t&&t.Math==Math&&t},p=l(typeof globalThis==f&&globalThis)||l(typeof window==f&&window)||l(typeof self==f&&self)||l(typeof i==f&&i)||Function("return this")(),d=function(t){try{return!!t()}catch(t){return!0}},h=!d(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),y={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,w={f:v&&!y.call({1:2},1)?function(t){var e=v(this,t);return!!e&&e.enumerable}:y},g=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},m={}.toString,_=function(t){return m.call(t).slice(8,-1)},b="".split,O=d(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==_(t)?b.call(t,""):Object(t)}:Object,E=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},T=function(t){return O(E(t))},S=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=function(t,e){if(!S(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!S(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!S(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!S(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},j={}.hasOwnProperty,P=function(t,e){return j.call(t,e)},x=p.document,U=S(x)&&S(x.createElement),C=function(t){return U?x.createElement(t):{}},I=!h&&!d(function(){return 7!=Object.defineProperty(C("div"),"a",{get:function(){return 7}}).a}),k=Object.getOwnPropertyDescriptor,F={f:h?k:function(t,e){if(t=T(t),e=A(e,!0),I)try{return k(t,e)}catch(t){}if(P(t,e))return g(!w.f.call(t,e),t[e])}},R=function(t){if(!S(t))throw TypeError(String(t)+" is not an object");return t},D=Object.defineProperty,L={f:h?D:function(t,e,n){if(R(t),e=A(e,!0),R(n),I)try{return D(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},M=h?function(t,e,n){return L.f(t,e,g(1,n))}:function(t,e,n){return t[e]=n,t},z=function(t,e){try{M(p,t,e)}catch(n){p[t]=e}return e},N=c(function(t){var e=p["__core-js_shared__"]||z("__core-js_shared__",{});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),B=N("native-function-to-string",Function.toString),W=p.WeakMap,q="function"==typeof W&&/native code/.test(B.call(W)),G=0,J=Math.random(),H=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++G+J).toString(36)},Y=N("keys"),V=function(t){return Y[t]||(Y[t]=H(t))},K={},Q=p.WeakMap;if(q){var X=new Q,Z=X.get,$=X.has,tt=X.set;a=function(t,e){return tt.call(X,t,e),e},u=function(t){return Z.call(X,t)||{}},s=function(t){return $.call(X,t)}}else{var et=V("state");K[et]=!0,a=function(t,e){return M(t,et,e),e},u=function(t){return P(t,et)?t[et]:{}},s=function(t){return P(t,et)}}var nt={set:a,get:u,has:s,enforce:function(t){return s(t)?u(t):a(t,{})},getterFor:function(t){return function(e){var n;if(!S(e)||(n=u(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},rt=c(function(t){var e=nt.get,n=nt.enforce,r=String(B).split("toString");N("inspectSource",function(t){return B.call(t)}),(t.exports=function(t,e,o,i){var c=!!i&&!!i.unsafe,a=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof e||P(o,"name")||M(o,"name",e),n(o).source=r.join("string"==typeof e?e:"")),t!==p?(c?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=o:M(t,e,o)):a?t[e]=o:z(e,o)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||B.call(this)})}),ot=p,it=function(t){return"function"==typeof t?t:void 0},ct=function(t,e){return arguments.length<2?it(ot[t])||it(p[t]):ot[t]&&ot[t][e]||p[t]&&p[t][e]},at=Math.ceil,ut=Math.floor,st=function(t){return isNaN(t=+t)?0:(t>0?ut:at)(t)},ft=Math.min,lt=function(t){return t>0?ft(st(t),9007199254740991):0},pt=Math.max,dt=Math.min,ht=function(t){return function(e,n,r){var o,i=T(e),c=lt(i.length),a=function(t,e){var n=st(t);return n<0?pt(n+e,0):dt(n,e)}(r,c);if(t&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},yt={includes:ht(!0),indexOf:ht(!1)},vt=yt.indexOf,wt=function(t,e){var n,r=T(t),o=0,i=[];for(n in r)!P(K,n)&&P(r,n)&&i.push(n);for(;e.length>o;)P(r,n=e[o++])&&(~vt(i,n)||i.push(n));return i},gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=gt.concat("length","prototype"),_t={f:Object.getOwnPropertyNames||function(t){return wt(t,mt)}},bt={f:Object.getOwnPropertySymbols},Ot=ct("Reflect","ownKeys")||function(t){var e=_t.f(R(t)),n=bt.f;return n?e.concat(n(t)):e},Et=function(t,e){for(var n=Ot(e),r=L.f,o=F.f,i=0;i<n.length;i++){var c=n[i];P(t,c)||r(t,c,o(e,c))}},Tt=/#|\.prototype\./,St=function(t,e){var n=jt[At(t)];return n==xt||n!=Pt&&("function"==typeof e?d(e):!!e)},At=St.normalize=function(t){return String(t).replace(Tt,".").toLowerCase()},jt=St.data={},Pt=St.NATIVE="N",xt=St.POLYFILL="P",Ut=St,Ct=F.f,It=function(t,e){var n,r,o,i,c,a=t.target,u=t.global,s=t.stat;if(n=u?p:s?p[a]||z(a,{}):(p[a]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(c=Ct(n,r))&&c.value:n[r],!Ut(u?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Et(i,o)}(t.sham||o&&o.sham)&&M(i,"sham",!0),rt(n,r,i,t)}},kt=!!Object.getOwnPropertySymbols&&!d(function(){return!String(Symbol())}),Ft=p.Symbol,Rt=N("wks"),Dt=function(t){return Rt[t]||(Rt[t]=kt&&Ft[t]||(kt?Ft:H)("Symbol."+t))},Lt=Dt("match"),Mt=function(t){if(function(t){var e;return S(t)&&(void 0!==(e=t[Lt])?!!e:"RegExp"==_(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},zt=Dt("match"),Nt="".startsWith,Bt=Math.min;It({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[zt]=!1,"/./"[t](e)}catch(t){}}return!1}("startsWith")},{startsWith:function(t){var e=String(E(this));Mt(t);var n=lt(Bt(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return Nt?Nt.call(e,r,n):e.slice(n,n+r.length)===r}});var Wt,qt,Gt,Jt=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Ht=function(t,e,n){if(Jt(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},Yt=Function.call,Vt=function(t,e,n){return Ht(Yt,p[t].prototype[e],n)},Kt=(Vt("String","startsWith"),function(t){return function(e,n){var r,o,i=String(E(e)),c=st(n),a=i.length;return c<0||c>=a?t?"":void 0:(r=i.charCodeAt(c))<55296||r>56319||c+1===a||(o=i.charCodeAt(c+1))<56320||o>57343?t?i.charAt(c):r:t?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}}),Qt={codeAt:Kt(!1),charAt:Kt(!0)},Xt=function(t){return Object(E(t))},Zt=!d(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),$t=V("IE_PROTO"),te=Object.prototype,ee=Zt?Object.getPrototypeOf:function(t){return t=Xt(t),P(t,$t)?t[$t]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?te:null},ne=Dt("iterator"),re=!1;[].keys&&("next"in(Gt=[].keys())?(qt=ee(ee(Gt)))!==Object.prototype&&(Wt=qt):re=!0),null==Wt&&(Wt={}),P(Wt,ne)||M(Wt,ne,function(){return this});var oe={IteratorPrototype:Wt,BUGGY_SAFARI_ITERATORS:re},ie=Object.keys||function(t){return wt(t,gt)},ce=h?Object.defineProperties:function(t,e){R(t);for(var n,r=ie(e),o=r.length,i=0;o>i;)L.f(t,n=r[i++],e[n]);return t},ae=ct("document","documentElement"),ue=V("IE_PROTO"),se=function(){},fe=function(){var t,e=C("iframe"),n=gt.length;for(e.style.display="none",ae.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),fe=t.F;n--;)delete fe.prototype[gt[n]];return fe()},le=Object.create||function(t,e){var n;return null!==t?(se.prototype=R(t),n=new se,se.prototype=null,n[ue]=t):n=fe(),void 0===e?n:ce(n,e)};K[ue]=!0;var pe=L.f,de=Dt("toStringTag"),he=function(t,e,n){t&&!P(t=n?t:t.prototype,de)&&pe(t,de,{configurable:!0,value:e})},ye={},ve=oe.IteratorPrototype,we=function(){return this},ge=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return R(n),function(t){if(!S(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),me=oe.IteratorPrototype,_e=oe.BUGGY_SAFARI_ITERATORS,be=Dt("iterator"),Oe=function(){return this},Ee=Qt.charAt,Te=nt.set,Se=nt.getterFor("String Iterator");!function(t,e,n,r,o,i,c){!function(t,e,n){var r=e+" Iterator";t.prototype=le(ve,{next:g(1,n)}),he(t,r,!1),ye[r]=we}(n,e,r);var a,u,s,f=function(t){if(t===o&&y)return y;if(!_e&&t in d)return d[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",p=!1,d=t.prototype,h=d[be]||d["@@iterator"]||o&&d[o],y=!_e&&h||f(o),v="Array"==e&&d.entries||h;if(v&&(a=ee(v.call(new t)),me!==Object.prototype&&a.next&&(ee(a)!==me&&(ge?ge(a,me):"function"!=typeof a[be]&&M(a,be,Oe)),he(a,l,!0))),"values"==o&&h&&"values"!==h.name&&(p=!0,y=function(){return h.call(this)}),d[be]!==y&&M(d,be,y),ye[e]=y,o)if(u={values:f("values"),keys:i?y:f("keys"),entries:f("entries")},c)for(s in u)!_e&&!p&&s in d||rt(d,s,u[s]);else It({target:e,proto:!0,forced:_e||p},u)}(String,"String",function(t){Te(this,{type:"String Iterator",string:String(t),index:0})},function(){var t,e=Se(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=Ee(n,r),e.index+=t.length,{value:t,done:!1})});var Ae=function(t,e,n,r){try{return r?e(R(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&R(o.call(t)),e}},je=Dt("iterator"),Pe=Array.prototype,xe=function(t){return void 0!==t&&(ye.Array===t||Pe[je]===t)},Ue=function(t,e,n){var r=A(e);r in t?L.f(t,r,g(0,n)):t[r]=n},Ce=Dt("toStringTag"),Ie="Arguments"==_(function(){return arguments}()),ke=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ce))?n:Ie?_(e):"Object"==(r=_(e))&&"function"==typeof e.callee?"Arguments":r},Fe=Dt("iterator"),Re=function(t){if(null!=t)return t[Fe]||t["@@iterator"]||ye[ke(t)]},De=Dt("iterator"),Le=!1;try{var Me=0,ze={next:function(){return{done:!!Me++}},return:function(){Le=!0}};ze[De]=function(){return this},Array.from(ze,function(){throw 2})}catch(t){}var Ne=!function(t,e){if(!e&&!Le)return!1;var n=!1;try{var r={};r[De]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}(function(t){Array.from(t)});It({target:"Array",stat:!0,forced:Ne},{from:function(t){var e,n,r,o,i=Xt(t),c="function"==typeof this?this:Array,a=arguments.length,u=a>1?arguments[1]:void 0,s=void 0!==u,f=0,l=Re(i);if(s&&(u=Ht(u,a>2?arguments[2]:void 0,2)),null==l||c==Array&&xe(l))for(n=new c(e=lt(i.length));e>f;f++)Ue(n,f,s?u(i[f],f):i[f]);else for(o=l.call(i),n=new c;!(r=o.next()).done;f++)Ue(n,f,s?Ae(o,u,[r.value,f],!0):r.value);return n.length=f,n}});ot.Array.from;var Be,We=L.f,qe=p.DataView,Ge=qe&&qe.prototype,Je=p.Int8Array,He=Je&&Je.prototype,Ye=p.Uint8ClampedArray,Ve=Ye&&Ye.prototype,Ke=Je&&ee(Je),Qe=He&&ee(He),Xe=Object.prototype,Ze=Xe.isPrototypeOf,$e=Dt("toStringTag"),tn=H("TYPED_ARRAY_TAG"),en=!(!p.ArrayBuffer||!qe),nn=en&&!!ge&&"Opera"!==ke(p.opera),rn={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},on=function(t){return S(t)&&P(rn,ke(t))};for(Be in rn)p[Be]||(nn=!1);if((!nn||"function"!=typeof Ke||Ke===Function.prototype)&&(Ke=function(){throw TypeError("Incorrect invocation")},nn))for(Be in rn)p[Be]&&ge(p[Be],Ke);if((!nn||!Qe||Qe===Xe)&&(Qe=Ke.prototype,nn))for(Be in rn)p[Be]&&ge(p[Be].prototype,Qe);if(nn&&ee(Ve)!==Qe&&ge(Ve,Qe),h&&!P(Qe,$e))for(Be in!0,We(Qe,$e,{get:function(){return S(this)?this[tn]:void 0}}),rn)p[Be]&&M(p[Be],tn,Be);en&&ge&&ee(Ge)!==Xe&&ge(Ge,Xe);var cn=function(t){if(on(t))return t;throw TypeError("Target is not a typed array")},an=function(t){if(ge){if(Ze.call(Ke,t))return t}else for(var e in rn)if(P(rn,Be)){var n=p[e];if(n&&(t===n||Ze.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},un=function(t,e,n){if(h){if(n)for(var r in rn){var o=p[r];o&&P(o.prototype,t)&&delete o.prototype[t]}Qe[t]&&!n||rt(Qe,t,n?e:nn&&He[t]||e)}},sn=Dt("species"),fn=cn,ln=an,pn=[].slice;un("slice",function(t,e){for(var n=pn.call(fn(this),t,e),r=function(t,e){var n,r=R(t).constructor;return void 0===r||null==(n=R(r)[sn])?e:Jt(n)}(this,this.constructor),o=0,i=n.length,c=new(ln(r))(i);i>o;)c[o]=n[o++];return c},d(function(){new Int8Array(1).slice()}));var dn=Dt("unscopables"),hn=Array.prototype;null==hn[dn]&&M(hn,dn,le(null));var yn,vn=yt.includes;It({target:"Array",proto:!0},{includes:function(t){return vn(this,t,arguments.length>1?arguments[1]:void 0)}}),yn="includes",hn[dn][yn]=!0;Vt("Array","includes");function wn(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})}var gn=setTimeout;function mn(t){return Boolean(t&&void 0!==t.length)}function _n(){}function bn(t){if(!(this instanceof bn))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],jn(t,this)}function On(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,bn._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void Tn(e.promise,t)}En(e.promise,r)}else(1===t._state?En:Tn)(e.promise,t._value)})):t._deferreds.push(e)}function En(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof bn)return t._state=3,t._value=e,void Sn(t);if("function"==typeof n)return void jn((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,Sn(t)}catch(e){Tn(t,e)}var r,o}function Tn(t,e){t._state=2,t._value=e,Sn(t)}function Sn(t){2===t._state&&0===t._deferreds.length&&bn._immediateFn(function(){t._handled||bn._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)On(t,t._deferreds[e]);t._deferreds=null}function An(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function jn(t,e){var n=!1;try{t(function(t){n||(n=!0,En(e,t))},function(t){n||(n=!0,Tn(e,t))})}catch(t){if(n)return;n=!0,Tn(e,t)}}bn.prototype.catch=function(t){return this.then(null,t)},bn.prototype.then=function(t,e){var n=new this.constructor(_n);return On(this,new An(t,e,n)),n},bn.prototype.finally=wn,bn.all=function(t){return new bn(function(e,n){if(!mn(t))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;function i(t,c){try{if(c&&("object"==typeof c||"function"==typeof c)){var a=c.then;if("function"==typeof a)return void a.call(c,function(e){i(t,e)},n)}r[t]=c,0==--o&&e(r)}catch(t){n(t)}}for(var c=0;c<r.length;c++)i(c,r[c])})},bn.resolve=function(t){return t&&"object"==typeof t&&t.constructor===bn?t:new bn(function(e){e(t)})},bn.reject=function(t){return new bn(function(e,n){n(t)})},bn.race=function(t){return new bn(function(e,n){if(!mn(t))return n(new TypeError("Promise.race accepts an array"));for(var r=0,o=t.length;r<o;r++)bn.resolve(t[r]).then(e,n)})},bn._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){gn(t,0)},bn._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var Pn=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();function xn(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0?+e:e))}"Promise"in Pn?Pn.Promise.prototype.finally||(Pn.Promise.prototype.finally=wn):Pn.Promise=bn,function(t){function e(t){if("utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+t+"') is invalid.")}function n(t,e){if(e=void 0===e?{fatal:!1}:e,"utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+t+"') is invalid.");if(e.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(t.TextEncoder&&t.TextDecoder)return!1;Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");e=0;for(var n=t.length,r=0,o=Math.max(32,n+(n>>1)+7),i=new Uint8Array(o>>3<<3);e<n;){var c=t.charCodeAt(e++);if(55296<=c&&56319>=c){if(e<n){var a=t.charCodeAt(e);56320==(64512&a)&&(++e,c=((1023&c)<<10)+(1023&a)+65536)}if(55296<=c&&56319>=c)continue}if(r+4>i.length&&(o+=8,o=(o*=1+e/t.length*2)>>3<<3,(a=new Uint8Array(o)).set(i),i=a),0==(4294967168&c))i[r++]=c;else{if(0==(4294965248&c))i[r++]=c>>6&31|192;else if(0==(4294901760&c))i[r++]=c>>12&15|224,i[r++]=c>>6&63|128;else{if(0!=(4292870144&c))continue;i[r++]=c>>18&7|240,i[r++]=c>>12&63|128,i[r++]=c>>6&63|128}i[r++]=63&c|128}}return i.slice(0,r)},Object.defineProperty(n.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(n.prototype,"fatal",{value:!1}),Object.defineProperty(n.prototype,"ignoreBOM",{value:!1}),n.prototype.decode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");e=0;for(var n=(t=new Uint8Array(t)).length,r=[];e<n;){var o=t[e++];if(0===o)break;if(0==(128&o))r.push(o);else if(192==(224&o)){var i=63&t[e++];r.push((31&o)<<6|i)}else if(224==(240&o)){i=63&t[e++];var c=63&t[e++];r.push((31&o)<<12|i<<6|c)}else if(240==(248&o)){65535<(o=(7&o)<<18|(i=63&t[e++])<<12|(c=63&t[e++])<<6|63&t[e++])&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o)}}return String.fromCharCode.apply(null,r)},t.TextEncoder=e,t.TextDecoder=n}("undefined"!=typeof window?window:i),self.fetch||(self.fetch=function(t,e){return e=e||{},new Promise(function(n,r){var o=new XMLHttpRequest,i=[],c=[],a={},u=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(JSON.parse(o.responseText))},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:u,headers:{keys:function(){return i},entries:function(){return c},get:function(t){return a[t.toLowerCase()]},has:function(t){return t.toLowerCase()in a}}}};for(var s in o.open(e.method||"get",t,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(t,e,n){i.push(e=e.toLowerCase()),c.push([e,n]),a[e]=a[e]?a[e]+","+n:n}),n(u())},o.onerror=r,o.withCredentials="include"==e.credentials,e.headers)o.setRequestHeader(s,e.headers[s]);o.send(e.body||null)})});var Un,Cn={timeoutInSeconds:60},In=function(t){return t.filter(function(e,n){return t.indexOf(e)===n})},kn={error:"timeout",error_description:"Timeout"},Fn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.filter(Boolean).join();return In(n.replace(/\s/g,",").split(",")).join(" ").trim()},Rn=function(t){var n=function(t){for(var e,n,r={},o=t.split("&");e=o.shift();)void 0!==r[n=(e=e.split("=")).shift()]?r[n]=[].concat(r[n],xn(e.shift())):r[n]=xn(e.shift());return r}(t);return e({},n,{expires_in:parseInt(n.expires_in)})},Dn=function(){var t=window.open("","auth0:authorize:popup","left=100,top=100,width=400,height=600,resizable,scrollbars=yes,status=1");if(!t)throw new Error("Could not open popup");return t},Ln=function(t,n,r){return t.location.href=n,new Promise(function(n,o){var i=setTimeout(function(){o(e({},kn,{popup:t}))},1e3*(r.timeoutInSeconds||60));window.addEventListener("message",function(e){if(e.data&&"authorization_response"===e.data.type){if(clearTimeout(i),t.close(),e.data.response.error)return o(e.data.response);n(e.data.response)}})})},Mn=function(){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-_~.",e="";return Array.from(crypto.getRandomValues(new Uint8Array(43))).forEach(function(n){return e+=t[n%t.length]}),e},zn=function(t){return btoa(t)},Nn=function(t){return function(t,e){var n,r,o,i="";for(n in t)if(void 0!==(o=t[n]))if(Array.isArray(o))for(r=0;r<o.length;r++)i&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(o[r]);else i&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(o);return(e||"")+i}(t)},Bn=function(t){return window.crypto.subtle.digest({name:"SHA-256"},(new TextEncoder).encode(t))},Wn=function(t){return function(t){return decodeURIComponent(atob(t).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(t.replace(/_/g,"/").replace(/-/g,"+"))},qn=function(t){var e=new Uint8Array(Array.from(t));return function(t){var e={"+":"-","/":"_","=":""};return t.replace(/[\+\/=]/g,function(t){return e[t]})}(window.btoa(String.fromCharCode.apply(String,Array.from(e))))},Gn=function(t,e){return r(void 0,void 0,void 0,function(){var r,i,c,a,u,s,f;return o(this,function(o){switch(o.label){case 0:return[4,fetch(t,e)];case 1:return[4,(r=o.sent()).json()];case 2:if(i=o.sent(),c=i.error,a=i.error_description,u=n(i,["error","error_description"]),!r.ok)throw s=a||"HTTP error. Unable to fetch "+t,(f=new Error(s)).error=c||"request_error",f.error_description=s,f;return[2,u]}})})},Jn=function(t){return r(void 0,void 0,void 0,function(){var r=t.baseUrl,i=n(t,["baseUrl"]);return o(this,function(t){switch(t.label){case 0:return[4,Gn(r+"/oauth/token",{method:"POST",body:JSON.stringify(e({grant_type:"authorization_code",redirect_uri:window.location.origin},i)),headers:{"Content-type":"application/json"}})];case 1:return[2,t.sent()]}})})},Hn=function(t){return t.audience+"::"+t.scope},Yn=function(){function t(){this.cache={}}return t.prototype.save=function(t){var e=this,n=Hn(t);this.cache[n]=t;var r,o,i,c=(r=t.expires_in,o=t.decodedToken.claims.exp,i=(new Date(1e3*o).getTime()-(new Date).getTime())/1e3,1e3*Math.min(r,i));setTimeout(function(){delete e.cache[n]},c)},t.prototype.get=function(t){return this.cache[Hn(t)]},t}(),Vn=c(function(t,e){var n=i&&i.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t};function r(t,e){if(!e)return"";var n="; "+t;return!0===e?n:n+"="+e}function o(t,e,n){return encodeURIComponent(t).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(e).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(t){if("number"==typeof t.expires){var e=new Date;e.setMilliseconds(e.getMilliseconds()+864e5*t.expires),t.expires=e}return r("Expires",t.expires?t.expires.toUTCString():"")+r("Domain",t.domain)+r("Path",t.path)+r("Secure",t.secure)+r("SameSite",t.sameSite)}(n)}function c(t){for(var e={},n=t?t.split("; "):[],r=/(%[0-9A-Z]{2})+/g,o=0;o<n.length;o++){var i=n[o].split("="),c=i.slice(1).join("=");'"'===c.charAt(0)&&(c=c.slice(1,-1));try{e[i[0].replace(r,decodeURIComponent)]=c.replace(r,decodeURIComponent)}catch(t){}}return e}function a(){return c(document.cookie)}function u(t,e,r){document.cookie=o(t,e,n({path:"/"},r))}e.__esModule=!0,e.encode=o,e.parse=c,e.getAll=a,e.get=function(t){return a()[t]},e.set=u,e.remove=function(t,e){u(t,"",n({},e,{expires:-1}))}});(Un=Vn)&&Un.__esModule&&Object.prototype.hasOwnProperty.call(Un,"default")&&Un.default;Vn.encode,Vn.parse;var Kn=Vn.getAll,Qn=Vn.get,Xn=Vn.set,Zn=Vn.remove,$n=function(){return Object.keys(Kn()||{})},tr=function(t){var e=Qn(t);if(void 0!==e)return JSON.parse(e)},er=function(t,e,n){Xn(t,JSON.stringify(e),{expires:n.daysUntilExpire})},nr=function(t){Zn(t)},rr="a0.spajs.txs.",or=function(t){return""+rr+t},ir=function(){function t(){var t=this;this.transactions={},$n().filter(function(t){return t.startsWith(rr)}).forEach(function(e){var n=e.replace(rr,"");t.transactions[n]=tr(e)})}return t.prototype.create=function(t,e){this.transactions[t]=e,er(or(t),e,{daysUntilExpire:1})},t.prototype.get=function(t){return this.transactions[t]},t.prototype.remove=function(t){delete this.transactions[t],nr(or(t))},t}(),cr=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],ar=function(t){var e,n,r,o,i,c,a,u,s=(e=t.id_token,n=e.split("."),r=n[0],o=n[1],i=n[2],c=JSON.parse(Wn(o)),a={__raw:e},u={},Object.keys(c).forEach(function(t){a[t]=c[t],cr.includes(t)||(u[t]=c[t])}),{encoded:{header:r,payload:o,signature:i},header:JSON.parse(Wn(r)),claims:a,user:u});if(s.claims.iss!==t.iss)throw new Error("Invalid issuer");if(s.claims.aud!==t.aud)throw new Error("Invalid audience");if("RS256"!==s.header.alg)throw new Error("Invalid algorithm");if(s.claims.nonce!==t.nonce)throw new Error("Invalid nonce");var f=new Date,l=new Date(0),p=new Date(0),d=new Date(0),h=t.leeway||60;if(l.setUTCSeconds(s.claims.exp+h),p.setUTCSeconds(s.claims.iat-h),d.setUTCSeconds(s.claims.nbf-h),f>l)throw new Error("id_token expired");if(f<p)throw new Error("id_token was issued in the future (invalid iat)");if(void 0!==s.claims.nbf&&f<d)throw new Error("token is not yet valid (invalid notBefore)");return s},ur=function(e){function n(t,r,o){var i=e.call(this,r)||this;return i.error=t,i.error_description=r,i.state=o,Object.setPrototypeOf(i,n.prototype),i}return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,e),n}(Error),sr=function(){function t(t){this.options=t,this.DEFAULT_SCOPE="openid profile email",this.cache=new Yn,this.transactionManager=new ir,this.domainUrl="https://"+this.options.domain}return t.prototype._url=function(t){var e=encodeURIComponent(btoa(JSON.stringify({name:"auth0-spa-js",version:"1.2.1"})));return""+this.domainUrl+t+"&auth0Client="+e},t.prototype._getParams=function(t,r,o,i,c){var a=this.options,u=(a.domain,n(a,["domain"]));return e({},u,t,{scope:Fn(this.DEFAULT_SCOPE,this.options.scope,t.scope),response_type:"code",response_mode:"query",state:r,nonce:o,redirect_uri:c||this.options.redirect_uri,code_challenge:i,code_challenge_method:"S256"})},t.prototype._authorizeUrl=function(t){return this._url("/authorize?"+Nn(t))},t.prototype._verifyIdToken=function(t,e){return ar({iss:this.domainUrl+"/",aud:this.options.client_id,id_token:t,nonce:e,leeway:this.options.leeway})},t.prototype.loginWithPopup=function(t,i){return void 0===t&&(t={}),void 0===i&&(i=Cn),r(this,void 0,void 0,function(){var r,c,a,u,s,f,l,p,d,h,y,v,w;return o(this,function(o){switch(o.label){case 0:return[4,Dn()];case 1:return r=o.sent(),c=n(t,[]),a=zn(Mn()),u=Mn(),s=Mn(),[4,Bn(s)];case 2:return f=o.sent(),l=qn(f),p=this._getParams(c,a,u,l,this.options.redirect_uri||window.location.origin),d=this._authorizeUrl(e({},p,{response_mode:"web_message"})),[4,Ln(r,d,i)];case 3:if(h=o.sent(),a!==h.state)throw new Error("Invalid state");return[4,Jn({baseUrl:this.domainUrl,audience:t.audience||this.options.audience,client_id:this.options.client_id,code_verifier:s,code:h.code})];case 4:return y=o.sent(),v=this._verifyIdToken(y.id_token,u),w=e({},y,{decodedToken:v,scope:p.scope,audience:p.audience||"default"}),this.cache.save(w),er("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2]}})})},t.prototype.getUser=function(t){return void 0===t&&(t={audience:this.options.audience||"default",scope:this.options.scope||this.DEFAULT_SCOPE}),r(this,void 0,void 0,function(){var e;return o(this,function(n){return t.scope=Fn(this.DEFAULT_SCOPE,t.scope),[2,(e=this.cache.get(t))&&e.decodedToken.user]})})},t.prototype.getIdTokenClaims=function(t){return void 0===t&&(t={audience:this.options.audience||"default",scope:this.options.scope||this.DEFAULT_SCOPE}),r(this,void 0,void 0,function(){var e;return o(this,function(n){return t.scope=Fn(this.DEFAULT_SCOPE,t.scope),[2,(e=this.cache.get(t))&&e.decodedToken.claims]})})},t.prototype.loginWithRedirect=function(t){return void 0===t&&(t={}),r(this,void 0,void 0,function(){var e,r,i,c,a,u,s,f,l,p;return o(this,function(o){switch(o.label){case 0:return e=t.redirect_uri,r=t.appState,i=n(t,["redirect_uri","appState"]),c=zn(Mn()),a=Mn(),u=Mn(),[4,Bn(u)];case 1:return s=o.sent(),f=qn(s),l=this._getParams(i,c,a,f,e),p=this._authorizeUrl(l),this.transactionManager.create(c,{nonce:a,code_verifier:u,appState:r,scope:l.scope,audience:l.audience||"default"}),window.location.assign(p),[2]}})})},t.prototype.handleRedirectCallback=function(){return r(this,void 0,void 0,function(){var t,n,r,i,c,a,u,s,f;return o(this,function(o){switch(o.label){case 0:if(!window.location.search)throw new Error("There are no query params available at `window.location.search`.");if(t=Rn(window.location.search.substr(1)),n=t.state,r=t.code,i=t.error,c=t.error_description,i)throw new ur(i,c,n);if(!(a=this.transactionManager.get(n)))throw new Error("Invalid state");return this.transactionManager.remove(n),[4,Jn({baseUrl:this.domainUrl,audience:this.options.audience,client_id:this.options.client_id,code_verifier:a.code_verifier,code:r})];case 1:return u=o.sent(),s=this._verifyIdToken(u.id_token,a.nonce),f=e({},u,{decodedToken:s,audience:a.audience,scope:a.scope}),this.cache.save(f),er("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2,{appState:a.appState}]}})})},t.prototype.getTokenSilently=function(t){return void 0===t&&(t={audience:this.options.audience,scope:this.options.scope||this.DEFAULT_SCOPE,ignoreCache:!1}),r(this,void 0,void 0,function(){var n,r,i,c,a,u,s,f,l,p,d,h,y;return o(this,function(o){switch(o.label){case 0:return t.scope=Fn(this.DEFAULT_SCOPE,t.scope),!t.ignoreCache&&(n=this.cache.get({scope:t.scope,audience:t.audience||"default"}))?[2,n.access_token]:(r=zn(Mn()),i=Mn(),c=Mn(),[4,Bn(c)]);case 1:return a=o.sent(),u=qn(a),s={audience:t.audience,scope:t.scope},f=this._getParams(s,r,i,u,this.options.redirect_uri||window.location.origin),l=this._authorizeUrl(e({},f,{prompt:"none",response_mode:"web_message"})),[4,(v=l,w=this.domainUrl,new Promise(function(t,e){var n=window.document.createElement("iframe");n.setAttribute("width","0"),n.setAttribute("height","0"),n.style.display="none";var r=setTimeout(function(){e(kn),window.document.body.removeChild(n)},6e4),o=function(i){i.origin==w&&i.data&&"authorization_response"===i.data.type&&(i.source.close(),i.data.response.error?e(i.data.response):t(i.data.response),clearTimeout(r),window.removeEventListener("message",o,!1),window.document.body.removeChild(n))};window.addEventListener("message",o,!1),window.document.body.appendChild(n),n.setAttribute("src",v)}))];case 2:if(p=o.sent(),r!==p.state)throw new Error("Invalid state");return[4,Jn({baseUrl:this.domainUrl,audience:t.audience||this.options.audience,client_id:this.options.client_id,code_verifier:c,code:p.code})];case 3:return d=o.sent(),h=this._verifyIdToken(d.id_token,i),y=e({},d,{decodedToken:h,scope:f.scope,audience:f.audience||"default"}),this.cache.save(y),er("auth0.is.authenticated",!0,{daysUntilExpire:1}),[2,d.access_token]}var v,w})})},t.prototype.getTokenWithPopup=function(t,e){return void 0===t&&(t={audience:this.options.audience,scope:this.options.scope||this.DEFAULT_SCOPE}),void 0===e&&(e=Cn),r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return t.scope=Fn(this.DEFAULT_SCOPE,this.options.scope,t.scope),[4,this.loginWithPopup(t,e)];case 1:return n.sent(),[2,this.cache.get({scope:t.scope,audience:t.audience||"default"}).access_token]}})})},t.prototype.isAuthenticated=function(){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.getUser()];case 1:return[2,!!t.sent()]}})})},t.prototype.logout=function(t){void 0===t&&(t={}),null!==t.client_id?t.client_id=t.client_id||this.options.client_id:delete t.client_id,nr("auth0.is.authenticated");var e=t.federated,r=n(t,["federated"]),o=e?"&federated":"",i=this._url("/v2/logout?"+Nn(r));window.location.assign(""+i+o)},t}();return function(t){return r(this,void 0,void 0,function(){var e;return o(this,function(n){switch(n.label){case 0:if(!window.crypto&&window.msCrypto&&(window.crypto=window.msCrypto),!window.crypto)throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===window.crypto.subtle)throw new Error("\n auth0-spa-js must run on a secure origin.\n See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-error-invalid-state-in-firefox-when-refreshing-the-page-immediately-after-a-login \n for more information.\n ");if(e=new sr(t),!tr("auth0.is.authenticated"))return[2,e];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.getTokenSilently({audience:t.audience,scope:t.scope,ignoreCache:!0})];case 2:case 3:return n.sent(),[3,4];case 4:return[2,e]}})})}}); | ||
//# sourceMappingURL=auth0-spa-js.production.js.map |
@@ -5,3 +5,3 @@ import 'core-js/es/string/starts-with'; | ||
import 'core-js/es/array/includes'; | ||
import 'core-js/es/promise'; | ||
import 'promise-polyfill/src/polyfill'; | ||
import 'fast-text-encoding'; | ||
@@ -8,0 +8,0 @@ import 'unfetch/polyfill/index'; |
@@ -1,2 +0,2 @@ | ||
declare const _default: "1.2.0"; | ||
declare const _default: "1.2.1"; | ||
export default _default; |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"main": "dist/lib/auth0-spa-js.cjs.js", | ||
@@ -76,2 +76,3 @@ "types": "dist/typings/index.d.ts", | ||
"fast-text-encoding": "^1.0.0", | ||
"promise-polyfill": "^8.1.3", | ||
"qss": "^2.0.3", | ||
@@ -78,0 +79,0 @@ "unfetch": "^4.1.0" |
@@ -5,3 +5,3 @@ import 'core-js/es/string/starts-with'; | ||
import 'core-js/es/array/includes'; | ||
import 'core-js/es/promise'; | ||
import 'promise-polyfill/src/polyfill'; | ||
import 'fast-text-encoding'; | ||
@@ -8,0 +8,0 @@ import 'unfetch/polyfill/index'; |
@@ -1,1 +0,1 @@ | ||
export default '1.2.0'; | ||
export default '1.2.1'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
5
1000467
6
6254
+ Addedpromise-polyfill@^8.1.3
+ Addedpromise-polyfill@8.3.0(transitive)