@tapni/auth 1.0.71 → 1.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +8 -8
- package/dist/{Apps-sXUoXUKA.js → Apps-Cz5rdOWu.js} +1 -1
- package/dist/{CustomApp-CEhqf3l-.js → CustomApp-C2_MFR0o.js} +1 -1
- package/dist/{QR-CBgahgDr.js → QR-BnhhTtpP.js} +1 -1
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +7 -7
- package/dist/{install-Dh-6YUtB.js → install-Ct-hQgCR.js} +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/views/Welcome.vue +11 -9
package/dist/TapniAuth.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(a,en){typeof exports=="object"&&typeof module<"u"?module.exports=en(require("vue"),require("vue-router"),require("await-to-js"),require("@capacitor/core"),require("jwt-decode"),require("js-sha256"),require("axios"),require("@capacitor/browser"),require("qr-code-styling"),require("@braintree/sanitize-url"),require("vuex"),require("@capacitor/device")):typeof define=="function"&&define.amd?define(["vue","vue-router","await-to-js","@capacitor/core","jwt-decode","js-sha256","axios","@capacitor/browser","qr-code-styling","@braintree/sanitize-url","vuex","@capacitor/device"],en):(a=typeof globalThis<"u"?globalThis:a||self,a.TapniAuth=en(a.Vue,a.vueRouter,a.to,a.core,a.jwtDecode,a.jsSha256,a.axios,a.browser$1,a.QRCodeStyling,a.sanitizeUrl,a.vuex,a.device))})(this,function(a,en,fe,tt,or,rr,mo,Vn,ir,pi,ar,fo){"use strict";function hi(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var sr={exports:{}},Te=sr.exports={},Ct,Et;function go(){throw new Error("setTimeout has not been defined")}function _o(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ct=setTimeout:Ct=go}catch{Ct=go}try{typeof clearTimeout=="function"?Et=clearTimeout:Et=_o}catch{Et=_o}})();function cr(n){if(Ct===setTimeout)return setTimeout(n,0);if((Ct===go||!Ct)&&setTimeout)return Ct=setTimeout,setTimeout(n,0);try{return Ct(n,0)}catch{try{return Ct.call(null,n,0)}catch{return Ct.call(this,n,0)}}}function mi(n){if(Et===clearTimeout)return clearTimeout(n);if((Et===_o||!Et)&&clearTimeout)return Et=clearTimeout,clearTimeout(n);try{return Et(n)}catch{try{return Et.call(null,n)}catch{return Et.call(this,n)}}}var Ut=[],mn=!1,tn,Hn=-1;function fi(){!mn||!tn||(mn=!1,tn.length?Ut=tn.concat(Ut):Hn=-1,Ut.length&&lr())}function lr(){if(!mn){var n=cr(fi);mn=!0;for(var e=Ut.length;e;){for(tn=Ut,Ut=[];++Hn<e;)tn&&tn[Hn].run();Hn=-1,e=Ut.length}tn=null,mn=!1,mi(n)}}Te.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];Ut.push(new dr(n,e)),Ut.length===1&&!mn&&cr(lr)};function dr(n,e){this.fun=n,this.array=e}dr.prototype.run=function(){this.fun.apply(null,this.array)},Te.title="browser",Te.browser=!0,Te.env={},Te.argv=[],Te.version="",Te.versions={};function Dt(){}Te.on=Dt,Te.addListener=Dt,Te.once=Dt,Te.off=Dt,Te.removeListener=Dt,Te.removeAllListeners=Dt,Te.emit=Dt,Te.prependListener=Dt,Te.prependOnceListener=Dt,Te.listeners=function(n){return[]},Te.binding=function(n){throw new Error("process.binding is not supported")},Te.cwd=function(){return"/"},Te.chdir=function(n){throw new Error("process.chdir is not supported")},Te.umask=function(){return 0};var gi=sr.exports;const _i=hi(gi);var
|
|
1
|
+
(function(a,en){typeof exports=="object"&&typeof module<"u"?module.exports=en(require("vue"),require("vue-router"),require("await-to-js"),require("@capacitor/core"),require("jwt-decode"),require("js-sha256"),require("axios"),require("@capacitor/browser"),require("qr-code-styling"),require("@braintree/sanitize-url"),require("vuex"),require("@capacitor/device")):typeof define=="function"&&define.amd?define(["vue","vue-router","await-to-js","@capacitor/core","jwt-decode","js-sha256","axios","@capacitor/browser","qr-code-styling","@braintree/sanitize-url","vuex","@capacitor/device"],en):(a=typeof globalThis<"u"?globalThis:a||self,a.TapniAuth=en(a.Vue,a.vueRouter,a.to,a.core,a.jwtDecode,a.jsSha256,a.axios,a.browser$1,a.QRCodeStyling,a.sanitizeUrl,a.vuex,a.device))})(this,function(a,en,fe,tt,or,rr,mo,Vn,ir,pi,ar,fo){"use strict";function hi(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var sr={exports:{}},Te=sr.exports={},Ct,Et;function go(){throw new Error("setTimeout has not been defined")}function _o(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ct=setTimeout:Ct=go}catch{Ct=go}try{typeof clearTimeout=="function"?Et=clearTimeout:Et=_o}catch{Et=_o}})();function cr(n){if(Ct===setTimeout)return setTimeout(n,0);if((Ct===go||!Ct)&&setTimeout)return Ct=setTimeout,setTimeout(n,0);try{return Ct(n,0)}catch{try{return Ct.call(null,n,0)}catch{return Ct.call(this,n,0)}}}function mi(n){if(Et===clearTimeout)return clearTimeout(n);if((Et===_o||!Et)&&clearTimeout)return Et=clearTimeout,clearTimeout(n);try{return Et(n)}catch{try{return Et.call(null,n)}catch{return Et.call(this,n)}}}var Ut=[],mn=!1,tn,Hn=-1;function fi(){!mn||!tn||(mn=!1,tn.length?Ut=tn.concat(Ut):Hn=-1,Ut.length&&lr())}function lr(){if(!mn){var n=cr(fi);mn=!0;for(var e=Ut.length;e;){for(tn=Ut,Ut=[];++Hn<e;)tn&&tn[Hn].run();Hn=-1,e=Ut.length}tn=null,mn=!1,mi(n)}}Te.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];Ut.push(new dr(n,e)),Ut.length===1&&!mn&&cr(lr)};function dr(n,e){this.fun=n,this.array=e}dr.prototype.run=function(){this.fun.apply(null,this.array)},Te.title="browser",Te.browser=!0,Te.env={},Te.argv=[],Te.version="",Te.versions={};function Dt(){}Te.on=Dt,Te.addListener=Dt,Te.once=Dt,Te.off=Dt,Te.removeListener=Dt,Te.removeAllListeners=Dt,Te.emit=Dt,Te.prependListener=Dt,Te.prependOnceListener=Dt,Te.listeners=function(n){return[]},Te.binding=function(n){throw new Error("process.binding is not supported")},Te.cwd=function(){return"/"},Te.chdir=function(n){throw new Error("process.chdir is not supported")},Te.umask=function(){return 0};var gi=sr.exports;const _i=hi(gi);var yo={},Kn={};Kn.byteLength=bi,Kn.toByteArray=ki,Kn.fromByteArray=Ti;for(var Tt=[],dt=[],yi=typeof Uint8Array<"u"?Uint8Array:Array,vo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fn=0,vi=vo.length;fn<vi;++fn)Tt[fn]=vo[fn],dt[vo.charCodeAt(fn)]=fn;dt[45]=62,dt[95]=63;function ur(n){var e=n.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=n.indexOf("=");t===-1&&(t=e);var o=t===e?0:4-t%4;return[t,o]}function bi(n){var e=ur(n),t=e[0],o=e[1];return(t+o)*3/4-o}function wi(n,e,t){return(e+t)*3/4-t}function ki(n){var e,t=ur(n),o=t[0],r=t[1],i=new yi(wi(n,o,r)),s=0,c=r>0?o-4:o,l;for(l=0;l<c;l+=4)e=dt[n.charCodeAt(l)]<<18|dt[n.charCodeAt(l+1)]<<12|dt[n.charCodeAt(l+2)]<<6|dt[n.charCodeAt(l+3)],i[s++]=e>>16&255,i[s++]=e>>8&255,i[s++]=e&255;return r===2&&(e=dt[n.charCodeAt(l)]<<2|dt[n.charCodeAt(l+1)]>>4,i[s++]=e&255),r===1&&(e=dt[n.charCodeAt(l)]<<10|dt[n.charCodeAt(l+1)]<<4|dt[n.charCodeAt(l+2)]>>2,i[s++]=e>>8&255,i[s++]=e&255),i}function Ci(n){return Tt[n>>18&63]+Tt[n>>12&63]+Tt[n>>6&63]+Tt[n&63]}function Ei(n,e,t){for(var o,r=[],i=e;i<t;i+=3)o=(n[i]<<16&16711680)+(n[i+1]<<8&65280)+(n[i+2]&255),r.push(Ci(o));return r.join("")}function Ti(n){for(var e,t=n.length,o=t%3,r=[],i=16383,s=0,c=t-o;s<c;s+=i)r.push(Ei(n,s,s+i>c?c:s+i));return o===1?(e=n[t-1],r.push(Tt[e>>2]+Tt[e<<4&63]+"==")):o===2&&(e=(n[t-2]<<8)+n[t-1],r.push(Tt[e>>10]+Tt[e>>4&63]+Tt[e<<2&63]+"=")),r.join("")}var bo={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */bo.read=function(n,e,t,o,r){var i,s,c=r*8-o-1,l=(1<<c)-1,h=l>>1,u=-7,g=t?r-1:0,f=t?-1:1,w=n[e+g];for(g+=f,i=w&(1<<-u)-1,w>>=-u,u+=c;u>0;i=i*256+n[e+g],g+=f,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=o;u>0;s=s*256+n[e+g],g+=f,u-=8);if(i===0)i=1-h;else{if(i===l)return s?NaN:(w?-1:1)*(1/0);s=s+Math.pow(2,o),i=i-h}return(w?-1:1)*s*Math.pow(2,i-o)},bo.write=function(n,e,t,o,r,i){var s,c,l,h=i*8-r-1,u=(1<<h)-1,g=u>>1,f=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=o?0:i-1,C=o?1:-1,P=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+g>=1?e+=f/l:e+=f*Math.pow(2,1-g),e*l>=2&&(s++,l/=2),s+g>=u?(c=0,s=u):s+g>=1?(c=(e*l-1)*Math.pow(2,r),s=s+g):(c=e*Math.pow(2,g-1)*Math.pow(2,r),s=0));r>=8;n[t+w]=c&255,w+=C,c/=256,r-=8);for(s=s<<r|c,h+=r;h>0;n[t+w]=s&255,w+=C,s/=256,h-=8);n[t+w-C]|=P*128};/*!
|
|
2
2
|
* The buffer module from node.js, for the browser.
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
5
|
* @license MIT
|
|
6
|
-
*/(function(n){const e=Kn,t=bo,o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=u,n.SlowBuffer=V,n.INSPECT_MAX_BYTES=50;const r=2147483647;n.kMaxLength=r;const{Uint8Array:i,ArrayBuffer:s,SharedArrayBuffer:c}=globalThis;u.TYPED_ARRAY_SUPPORT=l(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const m=new i(1),d={foo:function(){return 42}};return Object.setPrototypeOf(d,i.prototype),Object.setPrototypeOf(m,d),m.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function h(m){if(m>r)throw new RangeError('The value "'+m+'" is invalid for option "size"');const d=new i(m);return Object.setPrototypeOf(d,u.prototype),d}function u(m,d,p){if(typeof m=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(m)}return g(m,d,p)}u.poolSize=8192;function g(m,d,p){if(typeof m=="string")return P(m,d);if(s.isView(m))return j(m);if(m==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof m);if(Oe(m,s)||m&&Oe(m.buffer,s)||typeof c<"u"&&(Oe(m,c)||m&&Oe(m.buffer,c)))return N(m,d,p);if(typeof m=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const _=m.valueOf&&m.valueOf();if(_!=null&&_!==m)return u.from(_,d,p);const k=T(m);if(k)return k;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof m[Symbol.toPrimitive]=="function")return u.from(m[Symbol.toPrimitive]("string"),d,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof m)}u.from=function(m,d,p){return g(m,d,p)},Object.setPrototypeOf(u.prototype,i.prototype),Object.setPrototypeOf(u,i);function f(m){if(typeof m!="number")throw new TypeError('"size" argument must be of type number');if(m<0)throw new RangeError('The value "'+m+'" is invalid for option "size"')}function w(m,d,p){return f(m),m<=0?h(m):d!==void 0?typeof p=="string"?h(m).fill(d,p):h(m).fill(d):h(m)}u.alloc=function(m,d,p){return w(m,d,p)};function C(m){return f(m),h(m<0?0:B(m)|0)}u.allocUnsafe=function(m){return C(m)},u.allocUnsafeSlow=function(m){return C(m)};function P(m,d){if((typeof d!="string"||d==="")&&(d="utf8"),!u.isEncoding(d))throw new TypeError("Unknown encoding: "+d);const p=G(m,d)|0;let _=h(p);const k=_.write(m,d);return k!==p&&(_=_.slice(0,k)),_}function M(m){const d=m.length<0?0:B(m.length)|0,p=h(d);for(let _=0;_<d;_+=1)p[_]=m[_]&255;return p}function j(m){if(Oe(m,i)){const d=new i(m);return N(d.buffer,d.byteOffset,d.byteLength)}return M(m)}function N(m,d,p){if(d<0||m.byteLength<d)throw new RangeError('"offset" is outside of buffer bounds');if(m.byteLength<d+(p||0))throw new RangeError('"length" is outside of buffer bounds');let _;return d===void 0&&p===void 0?_=new i(m):p===void 0?_=new i(m,d):_=new i(m,d,p),Object.setPrototypeOf(_,u.prototype),_}function T(m){if(u.isBuffer(m)){const d=B(m.length)|0,p=h(d);return p.length===0||m.copy(p,0,0,d),p}if(m.length!==void 0)return typeof m.length!="number"||lt(m.length)?h(0):M(m);if(m.type==="Buffer"&&Array.isArray(m.data))return M(m.data)}function B(m){if(m>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return m|0}function V(m){return+m!=m&&(m=0),u.alloc(+m)}u.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==u.prototype},u.compare=function(d,p){if(Oe(d,i)&&(d=u.from(d,d.offset,d.byteLength)),Oe(p,i)&&(p=u.from(p,p.offset,p.byteLength)),!u.isBuffer(d)||!u.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===p)return 0;let _=d.length,k=p.length;for(let S=0,L=Math.min(_,k);S<L;++S)if(d[S]!==p[S]){_=d[S],k=p[S];break}return _<k?-1:k<_?1:0},u.isEncoding=function(d){switch(String(d).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(d,p){if(!Array.isArray(d))throw new TypeError('"list" argument must be an Array of Buffers');if(d.length===0)return u.alloc(0);let _;if(p===void 0)for(p=0,_=0;_<d.length;++_)p+=d[_].length;const k=u.allocUnsafe(p);let S=0;for(_=0;_<d.length;++_){let L=d[_];if(Oe(L,i))S+L.length>k.length?(u.isBuffer(L)||(L=u.from(L)),L.copy(k,S)):i.prototype.set.call(k,L,S);else if(u.isBuffer(L))L.copy(k,S);else throw new TypeError('"list" argument must be an Array of Buffers');S+=L.length}return k};function G(m,d){if(u.isBuffer(m))return m.length;if(s.isView(m)||Oe(m,s))return m.byteLength;if(typeof m!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof m);const p=m.length,_=arguments.length>2&&arguments[2]===!0;if(!_&&p===0)return 0;let k=!1;for(;;)switch(d){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return ht(m).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return je(m).length;default:if(k)return _?-1:ht(m).length;d=(""+d).toLowerCase(),k=!0}}u.byteLength=G;function J(m,d,p){let _=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,d>>>=0,p<=d))return"";for(m||(m="utf8");;)switch(m){case"hex":return Xt(this,d,p);case"utf8":case"utf-8":return Pt(this,d,p);case"ascii":return Jt(this,d,p);case"latin1":case"binary":return un(this,d,p);case"base64":return yt(this,d,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sn(this,d,p);default:if(_)throw new TypeError("Unknown encoding: "+m);m=(m+"").toLowerCase(),_=!0}}u.prototype._isBuffer=!0;function I(m,d,p){const _=m[d];m[d]=m[p],m[p]=_}u.prototype.swap16=function(){const d=this.length;if(d%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let p=0;p<d;p+=2)I(this,p,p+1);return this},u.prototype.swap32=function(){const d=this.length;if(d%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let p=0;p<d;p+=4)I(this,p,p+3),I(this,p+1,p+2);return this},u.prototype.swap64=function(){const d=this.length;if(d%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let p=0;p<d;p+=8)I(this,p,p+7),I(this,p+1,p+6),I(this,p+2,p+5),I(this,p+3,p+4);return this},u.prototype.toString=function(){const d=this.length;return d===0?"":arguments.length===0?Pt(this,0,d):J.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(d){if(!u.isBuffer(d))throw new TypeError("Argument must be a Buffer");return this===d?!0:u.compare(this,d)===0},u.prototype.inspect=function(){let d="";const p=n.INSPECT_MAX_BYTES;return d=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(d+=" ... "),"<Buffer "+d+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(d,p,_,k,S){if(Oe(d,i)&&(d=u.from(d,d.offset,d.byteLength)),!u.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(p===void 0&&(p=0),_===void 0&&(_=d?d.length:0),k===void 0&&(k=0),S===void 0&&(S=this.length),p<0||_>d.length||k<0||S>this.length)throw new RangeError("out of range index");if(k>=S&&p>=_)return 0;if(k>=S)return-1;if(p>=_)return 1;if(p>>>=0,_>>>=0,k>>>=0,S>>>=0,this===d)return 0;let L=S-k,se=_-p;const ye=Math.min(L,se),_e=this.slice(k,S),be=d.slice(p,_);for(let me=0;me<ye;++me)if(_e[me]!==be[me]){L=_e[me],se=be[me];break}return L<se?-1:se<L?1:0};function W(m,d,p,_,k){if(m.length===0)return-1;if(typeof p=="string"?(_=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,lt(p)&&(p=k?0:m.length-1),p<0&&(p=m.length+p),p>=m.length){if(k)return-1;p=m.length-1}else if(p<0)if(k)p=0;else return-1;if(typeof d=="string"&&(d=u.from(d,_)),u.isBuffer(d))return d.length===0?-1:ie(m,d,p,_,k);if(typeof d=="number")return d=d&255,typeof i.prototype.indexOf=="function"?k?i.prototype.indexOf.call(m,d,p):i.prototype.lastIndexOf.call(m,d,p):ie(m,[d],p,_,k);throw new TypeError("val must be string, number or Buffer")}function ie(m,d,p,_,k){let S=1,L=m.length,se=d.length;if(_!==void 0&&(_=String(_).toLowerCase(),_==="ucs2"||_==="ucs-2"||_==="utf16le"||_==="utf-16le")){if(m.length<2||d.length<2)return-1;S=2,L/=2,se/=2,p/=2}function ye(be,me){return S===1?be[me]:be.readUInt16BE(me*S)}let _e;if(k){let be=-1;for(_e=p;_e<L;_e++)if(ye(m,_e)===ye(d,be===-1?0:_e-be)){if(be===-1&&(be=_e),_e-be+1===se)return be*S}else be!==-1&&(_e-=_e-be),be=-1}else for(p+se>L&&(p=L-se),_e=p;_e>=0;_e--){let be=!0;for(let me=0;me<se;me++)if(ye(m,_e+me)!==ye(d,me)){be=!1;break}if(be)return _e}return-1}u.prototype.includes=function(d,p,_){return this.indexOf(d,p,_)!==-1},u.prototype.indexOf=function(d,p,_){return W(this,d,p,_,!0)},u.prototype.lastIndexOf=function(d,p,_){return W(this,d,p,_,!1)};function ee(m,d,p,_){p=Number(p)||0;const k=m.length-p;_?(_=Number(_),_>k&&(_=k)):_=k;const S=d.length;_>S/2&&(_=S/2);let L;for(L=0;L<_;++L){const se=parseInt(d.substr(L*2,2),16);if(lt(se))return L;m[p+L]=se}return L}function ve(m,d,p,_){return mt(ht(d,m.length-p),m,p,_)}function Re(m,d,p,_){return mt(pn(d),m,p,_)}function le(m,d,p,_){return mt(je(d),m,p,_)}function Me(m,d,p,_){return mt(wt(d,m.length-p),m,p,_)}u.prototype.write=function(d,p,_,k){if(p===void 0)k="utf8",_=this.length,p=0;else if(_===void 0&&typeof p=="string")k=p,_=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(_)?(_=_>>>0,k===void 0&&(k="utf8")):(k=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const S=this.length-p;if((_===void 0||_>S)&&(_=S),d.length>0&&(_<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");k||(k="utf8");let L=!1;for(;;)switch(k){case"hex":return ee(this,d,p,_);case"utf8":case"utf-8":return ve(this,d,p,_);case"ascii":case"latin1":case"binary":return Re(this,d,p,_);case"base64":return le(this,d,p,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Me(this,d,p,_);default:if(L)throw new TypeError("Unknown encoding: "+k);k=(""+k).toLowerCase(),L=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function yt(m,d,p){return d===0&&p===m.length?e.fromByteArray(m):e.fromByteArray(m.slice(d,p))}function Pt(m,d,p){p=Math.min(m.length,p);const _=[];let k=d;for(;k<p;){const S=m[k];let L=null,se=S>239?4:S>223?3:S>191?2:1;if(k+se<=p){let ye,_e,be,me;switch(se){case 1:S<128&&(L=S);break;case 2:ye=m[k+1],(ye&192)===128&&(me=(S&31)<<6|ye&63,me>127&&(L=me));break;case 3:ye=m[k+1],_e=m[k+2],(ye&192)===128&&(_e&192)===128&&(me=(S&15)<<12|(ye&63)<<6|_e&63,me>2047&&(me<55296||me>57343)&&(L=me));break;case 4:ye=m[k+1],_e=m[k+2],be=m[k+3],(ye&192)===128&&(_e&192)===128&&(be&192)===128&&(me=(S&15)<<18|(ye&63)<<12|(_e&63)<<6|be&63,me>65535&&me<1114112&&(L=me))}}L===null?(L=65533,se=1):L>65535&&(L-=65536,_.push(L>>>10&1023|55296),L=56320|L&1023),_.push(L),k+=se}return dn(_)}const at=4096;function dn(m){const d=m.length;if(d<=at)return String.fromCharCode.apply(String,m);let p="",_=0;for(;_<d;)p+=String.fromCharCode.apply(String,m.slice(_,_+=at));return p}function Jt(m,d,p){let _="";p=Math.min(m.length,p);for(let k=d;k<p;++k)_+=String.fromCharCode(m[k]&127);return _}function un(m,d,p){let _="";p=Math.min(m.length,p);for(let k=d;k<p;++k)_+=String.fromCharCode(m[k]);return _}function Xt(m,d,p){const _=m.length;(!d||d<0)&&(d=0),(!p||p<0||p>_)&&(p=_);let k="";for(let S=d;S<p;++S)k+=hn[m[S]];return k}function Sn(m,d,p){const _=m.slice(d,p);let k="";for(let S=0;S<_.length-1;S+=2)k+=String.fromCharCode(_[S]+_[S+1]*256);return k}u.prototype.slice=function(d,p){const _=this.length;d=~~d,p=p===void 0?_:~~p,d<0?(d+=_,d<0&&(d=0)):d>_&&(d=_),p<0?(p+=_,p<0&&(p=0)):p>_&&(p=_),p<d&&(p=d);const k=this.subarray(d,p);return Object.setPrototypeOf(k,u.prototype),k};function Ce(m,d,p){if(m%1!==0||m<0)throw new RangeError("offset is not uint");if(m+d>p)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(d,p,_){d=d>>>0,p=p>>>0,_||Ce(d,p,this.length);let k=this[d],S=1,L=0;for(;++L<p&&(S*=256);)k+=this[d+L]*S;return k},u.prototype.readUintBE=u.prototype.readUIntBE=function(d,p,_){d=d>>>0,p=p>>>0,_||Ce(d,p,this.length);let k=this[d+--p],S=1;for(;p>0&&(S*=256);)k+=this[d+--p]*S;return k},u.prototype.readUint8=u.prototype.readUInt8=function(d,p){return d=d>>>0,p||Ce(d,1,this.length),this[d]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(d,p){return d=d>>>0,p||Ce(d,2,this.length),this[d]|this[d+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(d,p){return d=d>>>0,p||Ce(d,2,this.length),this[d]<<8|this[d+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+this[d+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},u.prototype.readBigUInt64LE=qe(function(d){d=d>>>0,Ie(d,"offset");const p=this[d],_=this[d+7];(p===void 0||_===void 0)&&ct(d,this.length-8);const k=p+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24,S=this[++d]+this[++d]*2**8+this[++d]*2**16+_*2**24;return BigInt(k)+(BigInt(S)<<BigInt(32))}),u.prototype.readBigUInt64BE=qe(function(d){d=d>>>0,Ie(d,"offset");const p=this[d],_=this[d+7];(p===void 0||_===void 0)&&ct(d,this.length-8);const k=p*2**24+this[++d]*2**16+this[++d]*2**8+this[++d],S=this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+_;return(BigInt(k)<<BigInt(32))+BigInt(S)}),u.prototype.readIntLE=function(d,p,_){d=d>>>0,p=p>>>0,_||Ce(d,p,this.length);let k=this[d],S=1,L=0;for(;++L<p&&(S*=256);)k+=this[d+L]*S;return S*=128,k>=S&&(k-=Math.pow(2,8*p)),k},u.prototype.readIntBE=function(d,p,_){d=d>>>0,p=p>>>0,_||Ce(d,p,this.length);let k=p,S=1,L=this[d+--k];for(;k>0&&(S*=256);)L+=this[d+--k]*S;return S*=128,L>=S&&(L-=Math.pow(2,8*p)),L},u.prototype.readInt8=function(d,p){return d=d>>>0,p||Ce(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},u.prototype.readInt16LE=function(d,p){d=d>>>0,p||Ce(d,2,this.length);const _=this[d]|this[d+1]<<8;return _&32768?_|4294901760:_},u.prototype.readInt16BE=function(d,p){d=d>>>0,p||Ce(d,2,this.length);const _=this[d+1]|this[d]<<8;return _&32768?_|4294901760:_},u.prototype.readInt32LE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},u.prototype.readInt32BE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},u.prototype.readBigInt64LE=qe(function(d){d=d>>>0,Ie(d,"offset");const p=this[d],_=this[d+7];(p===void 0||_===void 0)&&ct(d,this.length-8);const k=this[d+4]+this[d+5]*2**8+this[d+6]*2**16+(_<<24);return(BigInt(k)<<BigInt(32))+BigInt(p+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24)}),u.prototype.readBigInt64BE=qe(function(d){d=d>>>0,Ie(d,"offset");const p=this[d],_=this[d+7];(p===void 0||_===void 0)&&ct(d,this.length-8);const k=(p<<24)+this[++d]*2**16+this[++d]*2**8+this[++d];return(BigInt(k)<<BigInt(32))+BigInt(this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+_)}),u.prototype.readFloatLE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),t.read(this,d,!0,23,4)},u.prototype.readFloatBE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),t.read(this,d,!1,23,4)},u.prototype.readDoubleLE=function(d,p){return d=d>>>0,p||Ce(d,8,this.length),t.read(this,d,!0,52,8)},u.prototype.readDoubleBE=function(d,p){return d=d>>>0,p||Ce(d,8,this.length),t.read(this,d,!1,52,8)};function Se(m,d,p,_,k,S){if(!u.isBuffer(m))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>k||d<S)throw new RangeError('"value" argument is out of bounds');if(p+_>m.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(d,p,_,k){if(d=+d,p=p>>>0,_=_>>>0,!k){const se=Math.pow(2,8*_)-1;Se(this,d,p,_,se,0)}let S=1,L=0;for(this[p]=d&255;++L<_&&(S*=256);)this[p+L]=d/S&255;return p+_},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(d,p,_,k){if(d=+d,p=p>>>0,_=_>>>0,!k){const se=Math.pow(2,8*_)-1;Se(this,d,p,_,se,0)}let S=_-1,L=1;for(this[p+S]=d&255;--S>=0&&(L*=256);)this[p+S]=d/L&255;return p+_},u.prototype.writeUint8=u.prototype.writeUInt8=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,1,255,0),this[p]=d&255,p+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,2,65535,0),this[p]=d&255,this[p+1]=d>>>8,p+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,2,65535,0),this[p]=d>>>8,this[p+1]=d&255,p+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,4,4294967295,0),this[p+3]=d>>>24,this[p+2]=d>>>16,this[p+1]=d>>>8,this[p]=d&255,p+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,4,4294967295,0),this[p]=d>>>24,this[p+1]=d>>>16,this[p+2]=d>>>8,this[p+3]=d&255,p+4};function Kt(m,d,p,_,k){Ge(d,_,k,m,p,7);let S=Number(d&BigInt(4294967295));m[p++]=S,S=S>>8,m[p++]=S,S=S>>8,m[p++]=S,S=S>>8,m[p++]=S;let L=Number(d>>BigInt(32)&BigInt(4294967295));return m[p++]=L,L=L>>8,m[p++]=L,L=L>>8,m[p++]=L,L=L>>8,m[p++]=L,p}function De(m,d,p,_,k){Ge(d,_,k,m,p,7);let S=Number(d&BigInt(4294967295));m[p+7]=S,S=S>>8,m[p+6]=S,S=S>>8,m[p+5]=S,S=S>>8,m[p+4]=S;let L=Number(d>>BigInt(32)&BigInt(4294967295));return m[p+3]=L,L=L>>8,m[p+2]=L,L=L>>8,m[p+1]=L,L=L>>8,m[p]=L,p+8}u.prototype.writeBigUInt64LE=qe(function(d,p=0){return Kt(this,d,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=qe(function(d,p=0){return De(this,d,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(d,p,_,k){if(d=+d,p=p>>>0,!k){const ye=Math.pow(2,8*_-1);Se(this,d,p,_,ye-1,-ye)}let S=0,L=1,se=0;for(this[p]=d&255;++S<_&&(L*=256);)d<0&&se===0&&this[p+S-1]!==0&&(se=1),this[p+S]=(d/L>>0)-se&255;return p+_},u.prototype.writeIntBE=function(d,p,_,k){if(d=+d,p=p>>>0,!k){const ye=Math.pow(2,8*_-1);Se(this,d,p,_,ye-1,-ye)}let S=_-1,L=1,se=0;for(this[p+S]=d&255;--S>=0&&(L*=256);)d<0&&se===0&&this[p+S+1]!==0&&(se=1),this[p+S]=(d/L>>0)-se&255;return p+_},u.prototype.writeInt8=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,1,127,-128),d<0&&(d=255+d+1),this[p]=d&255,p+1},u.prototype.writeInt16LE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,2,32767,-32768),this[p]=d&255,this[p+1]=d>>>8,p+2},u.prototype.writeInt16BE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,2,32767,-32768),this[p]=d>>>8,this[p+1]=d&255,p+2},u.prototype.writeInt32LE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,4,2147483647,-2147483648),this[p]=d&255,this[p+1]=d>>>8,this[p+2]=d>>>16,this[p+3]=d>>>24,p+4},u.prototype.writeInt32BE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[p]=d>>>24,this[p+1]=d>>>16,this[p+2]=d>>>8,this[p+3]=d&255,p+4},u.prototype.writeBigInt64LE=qe(function(d,p=0){return Kt(this,d,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=qe(function(d,p=0){return De(this,d,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Le(m,d,p,_,k,S){if(p+_>m.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function Mt(m,d,p,_,k){return d=+d,p=p>>>0,k||Le(m,d,p,4),t.write(m,d,p,_,23,4),p+4}u.prototype.writeFloatLE=function(d,p,_){return Mt(this,d,p,!0,_)},u.prototype.writeFloatBE=function(d,p,_){return Mt(this,d,p,!1,_)};function bt(m,d,p,_,k){return d=+d,p=p>>>0,k||Le(m,d,p,8),t.write(m,d,p,_,52,8),p+8}u.prototype.writeDoubleLE=function(d,p,_){return bt(this,d,p,!0,_)},u.prototype.writeDoubleBE=function(d,p,_){return bt(this,d,p,!1,_)},u.prototype.copy=function(d,p,_,k){if(!u.isBuffer(d))throw new TypeError("argument should be a Buffer");if(_||(_=0),!k&&k!==0&&(k=this.length),p>=d.length&&(p=d.length),p||(p=0),k>0&&k<_&&(k=_),k===_||d.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("sourceEnd out of bounds");k>this.length&&(k=this.length),d.length-p<k-_&&(k=d.length-p+_);const S=k-_;return this===d&&typeof i.prototype.copyWithin=="function"?this.copyWithin(p,_,k):i.prototype.set.call(d,this.subarray(_,k),p),S},u.prototype.fill=function(d,p,_,k){if(typeof d=="string"){if(typeof p=="string"?(k=p,p=0,_=this.length):typeof _=="string"&&(k=_,_=this.length),k!==void 0&&typeof k!="string")throw new TypeError("encoding must be a string");if(typeof k=="string"&&!u.isEncoding(k))throw new TypeError("Unknown encoding: "+k);if(d.length===1){const L=d.charCodeAt(0);(k==="utf8"&&L<128||k==="latin1")&&(d=L)}}else typeof d=="number"?d=d&255:typeof d=="boolean"&&(d=Number(d));if(p<0||this.length<p||this.length<_)throw new RangeError("Out of range index");if(_<=p)return this;p=p>>>0,_=_===void 0?this.length:_>>>0,d||(d=0);let S;if(typeof d=="number")for(S=p;S<_;++S)this[S]=d;else{const L=u.isBuffer(d)?d:u.from(d,k),se=L.length;if(se===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(S=0;S<_-p;++S)this[S+p]=L[S%se]}return this};const Qe={};function st(m,d,p){Qe[m]=class extends p{constructor(){super(),Object.defineProperty(this,"message",{value:d.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${m}]`,this.stack,delete this.name}get code(){return m}set code(k){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:k,writable:!0})}toString(){return`${this.name} [${m}]: ${this.message}`}}}st("ERR_BUFFER_OUT_OF_BOUNDS",function(m){return m?`${m} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),st("ERR_INVALID_ARG_TYPE",function(m,d){return`The "${m}" argument must be of type number. Received type ${typeof d}`},TypeError),st("ERR_OUT_OF_RANGE",function(m,d,p){let _=`The value of "${m}" is out of range.`,k=p;return Number.isInteger(p)&&Math.abs(p)>2**32?k=Gt(String(p)):typeof p=="bigint"&&(k=String(p),(p>BigInt(2)**BigInt(32)||p<-(BigInt(2)**BigInt(32)))&&(k=Gt(k)),k+="n"),_+=` It must be ${d}. Received ${k}`,_},RangeError);function Gt(m){let d="",p=m.length;const _=m[0]==="-"?1:0;for(;p>=_+4;p-=3)d=`_${m.slice(p-3,p)}${d}`;return`${m.slice(0,p)}${d}`}function Lt(m,d,p){Ie(d,"offset"),(m[d]===void 0||m[d+p]===void 0)&&ct(d,m.length-(p+1))}function Ge(m,d,p,_,k,S){if(m>p||m<d){const L=typeof d=="bigint"?"n":"";let se;throw d===0||d===BigInt(0)?se=`>= 0${L} and < 2${L} ** ${(S+1)*8}${L}`:se=`>= -(2${L} ** ${(S+1)*8-1}${L}) and < 2 ** ${(S+1)*8-1}${L}`,new Qe.ERR_OUT_OF_RANGE("value",se,m)}Lt(_,k,S)}function Ie(m,d){if(typeof m!="number")throw new Qe.ERR_INVALID_ARG_TYPE(d,"number",m)}function ct(m,d,p){throw Math.floor(m)!==m?(Ie(m,p),new Qe.ERR_OUT_OF_RANGE("offset","an integer",m)):d<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${d}`,m)}const Ot=/[^+/0-9A-Za-z-_]/g;function zt(m){if(m=m.split("=")[0],m=m.trim().replace(Ot,""),m.length<2)return"";for(;m.length%4!==0;)m=m+"=";return m}function ht(m,d){d=d||1/0;let p;const _=m.length;let k=null;const S=[];for(let L=0;L<_;++L){if(p=m.charCodeAt(L),p>55295&&p<57344){if(!k){if(p>56319){(d-=3)>-1&&S.push(239,191,189);continue}else if(L+1===_){(d-=3)>-1&&S.push(239,191,189);continue}k=p;continue}if(p<56320){(d-=3)>-1&&S.push(239,191,189),k=p;continue}p=(k-55296<<10|p-56320)+65536}else k&&(d-=3)>-1&&S.push(239,191,189);if(k=null,p<128){if((d-=1)<0)break;S.push(p)}else if(p<2048){if((d-=2)<0)break;S.push(p>>6|192,p&63|128)}else if(p<65536){if((d-=3)<0)break;S.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((d-=4)<0)break;S.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return S}function pn(m){const d=[];for(let p=0;p<m.length;++p)d.push(m.charCodeAt(p)&255);return d}function wt(m,d){let p,_,k;const S=[];for(let L=0;L<m.length&&!((d-=2)<0);++L)p=m.charCodeAt(L),_=p>>8,k=p%256,S.push(k),S.push(_);return S}function je(m){return e.toByteArray(zt(m))}function mt(m,d,p,_){let k;for(k=0;k<_&&!(k+p>=d.length||k>=m.length);++k)d[k+p]=m[k];return k}function Oe(m,d){return m instanceof d||m!=null&&m.constructor!=null&&m.constructor.name!=null&&m.constructor.name===d.name}function lt(m){return m!==m}const hn=function(){const m="0123456789abcdef",d=new Array(256);for(let p=0;p<16;++p){const _=p*16;for(let k=0;k<16;++k)d[_+k]=m[p]+m[k]}return d}();function qe(m){return typeof BigInt>"u"?xt:m}function xt(){throw new Error("BigInt not supported")}})(vo);const nn=vo.Buffer,Si=vo.Buffer,Gn=a.reactive(new Map),X={$on(n,e){let t=Gn.get(n);t||(t=new Set,Gn.set(n,t)),t.add(e)},$emit(n,...e){const t=Gn.get(n);if(t)for(const o of t)o(...e)},$off(n,e){const t=Gn.get(n);t&&t.delete(e)}};a.readonly(X);const Ii={computed:{home(){return this.$storex&&this.$storex.token&&this.$storex.username?"/"+this.$storex.username:"/welcome"},isAndroid(){return/Android/i.test(navigator.userAgent)||tt.Capacitor.getPlatform()==="android"},isiOS(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document||tt.Capacitor.getPlatform()==="ios"},isNative(){return tt.Capacitor.isNativePlatform()}},methods:{getIcon(n){return this.isNative?`/icons/${n}`:"https://cdn.tapni.co/icons/"+n},errorHandler(n){return n&&n.response&&n.response.data&&n.response.data.error&&((n.response.data.error==="ACCESS_DENIED"||n.response.data.error==="TOKEN_EXPIRED")&&this.logout(),!n.response.data.error.includes("Network Error")&&!n.response.data.error.includes("Cannot read properties")&&this.errorSnack(n.response.data.error)),n},errorSnack(n){let e=document.getElementById("snackbar"),t=document.getElementById("errorMessage"),o=document.getElementById("errorSnack");t.innerHTML=n,e.classList.add("show-snack"),o.classList.add("active-snack"),setTimeout(function(){o.classList.remove("active-snack"),e.classList.remove("show-snack")},3e3)},successSnack(n){let e=document.getElementById("snackbar"),t=document.getElementById("successMessage"),o=document.getElementById("successSnack");t.innerHTML=n,e.classList.add("show-snack"),o.classList.add("active-snack"),setTimeout(function(){o.classList.remove("active-snack"),e.classList.remove("show-snack")},3e3)},closeSnacks(){document.getElementById("snackbar").classList.remove("show-snack"),document.getElementById("successSnack").classList.remove("active-snack"),document.getElementById("errorSnack").classList.remove("active-snack")},tapsEmoji(n){return n<10?"":n<=50?"🔥":n<=100?"💥":n<=300?"💎":n>300?"🚀":""},isEmpty(n){if(!n)return!0;for(let e in n)if(n.hasOwnProperty(e))return!1;return JSON.stringify(n)===JSON.stringify({})},copy(n=""){const e=document.createElement("textarea");e.value=n,e.setAttribute("readonly",""),e.style.position="absolute",e.style.left="-9999px",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),this.successSnack(this.ssoLang[this.appLanguage].copied)},async getCaptchaToken(n){try{return await window.grecaptcha.execute("6LenkC0mAAAAADWBxPOhpmwXCwzCJd7cilNgtOLk",{action:n})}catch(e){return console.error("grecaptcha_error",e),null}}}},{mapState:Ai,mapActions:Ri,mapGetters:Ni}=ar.createNamespacedHelpers("auth"),We={mixins:[Ii],props:{isModal:{type:Boolean,required:!1,default:!1}},computed:{...Ai(["$storex","refreshing","loggedInUserId","account","device","loggedInAccounts","ssoLang","display","redirect_uri","response_type","state","allowedOriginsAuth"]),...Ni(["accessToken","refreshTokens","isLoggedIn","renderView","appLanguage"])},methods:{...Ri(["setLoggedInAccounts","setLoggedInUserId","setRefreshToken","unsetRefreshToken","setToken","setView","setStorage","setStorageItem","updateLang","login","register","verify","reset","exchangeAuthCode","changePassword","newPassword","deleteAccount","registerDevice","addFcmToken","acceptCompanyInvitation","logout","getCompanyBySSOEmail","getLoggedInAccounts","loginUsingQR","getAccountSettings","setRedirectUri","setDisplay","setState","setRealm","setResponseType","switchAccount","loginSetup","loginSuccess","refreshTokenAction"])},watch:{"$route.query":{handler:function(){this.$route.query.redirect_uri&&this.setRedirectUri(this.$route.query.redirect_uri),this.$route.query.display&&this.setDisplay(this.$route.query.display),this.$route.query.state&&this.setState(this.$route.query.state),this.$route.query.response_type&&this.setResponseType(this.$route.query.response_type),this.$route.query.realm&&this.setRealm(this.$route.query.realm)},deep:!0}}},nt=(n,e)=>{const t=n.__vccOpts||n;for(const[o,r]of e)t[o]=r;return t},Pi={name:"AuthWelcome",mixins:[We],data(){return{loading:!0}},computed:{isTapstackOrigin(){if(typeof window>"u")return!1;try{const n=new URL(window.location.origin).hostname;return/(^|\.)tapstack\.com$/i.test(n)}catch{return!1}},videoSource(){return this.isTapstackOrigin?"https://cdn.tapni.co/images/tapstack-video.mp4":"https://cdn.tapni.co/images/tapni-card-tap-video-white.mp4"},welcomeTitle(){return this.isTapstackOrigin?"Welcome":this.ssoLang[this.appLanguage].welcome},welcomeSubtitle(){return this.isTapstackOrigin?"The modern stack for interactive docs and tools":this.ssoLang[this.appLanguage].welcome_p1}},async mounted(){let n=document.getElementById("tapniVideo");n.addEventListener("canplay",function(){if(document.body.contains(n))try{n.play()}catch(e){console.error("Play was interrupted:",e)}}),setTimeout(()=>{this.$storex&&this.$storex.token?this.$router.push(this.home):X.$emit("ssoEvent",{name:"setLoading",data:!1})},500)},methods:{}},Mi={class:"page-login content-boxed content-boxed-padding center-text",style:{"margin-top":"-1px",overflow:"hidden",border:"solid 0px #ffffff"}},Li=["autoplay"],Oi=["src"],zi={class:"bold full-top no-bottom center-text text-[24px]"},xi={class:"full-bottom half-top center-text color-black font-16"},Bi={class:"page-login-links center-text"},Ui={key:3,style:{display:"flex","flex-direction":"row","justify-content":"space-around",width:"90%",margin:"0 auto","margin-top":"40px"}};function Di(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Mi,[a.createElementVNode("video",{id:"tapniVideo",muted:"",loop:"",playsinline:"",width:"350",style:{margin:"0 auto","max-width":"100%","margin-top":"63px",overflow:"hidden"},autoplay:n.isNative},[a.createElementVNode("source",{src:i.videoSource,type:"video/mp4"},null,8,Oi)],8,Li),a.createElementVNode("h1",zi,a.toDisplayString(i.welcomeTitle),1),a.createElementVNode("p",xi,a.toDisplayString(i.welcomeSubtitle),1),a.createCommentVNode("",!0),a.createCommentVNode("",!0),a.createVNode(s,{to:"register",exact:"",class:"button-center button button-90 google-button bg-tapni-grey pointer"},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[this.appLanguage].create_account),1)]),_:1}),a.createElementVNode("div",Bi,[a.createVNode(s,{to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].already_registered)+"? ",1),a.createElementVNode("b",null,a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[1]||(e[1]=a.createElementVNode("div",{class:"clear"},null,-1))]),a.createCommentVNode("",!0),this.isNative?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",Ui,e[2]||(e[2]=[a.createStaticVNode('<a href="https://play.google.com/store/apps/details?id=co.tapni.app" target="_blank" data-v-465df13a><img src="https://cdn.tapni.co/images/playstore.png" class="app-store-icon pointer" style="width:55px;" data-v-465df13a></a><a href="https://apps.apple.com/ag/app/tapni/id1552930233" target="_blank" data-v-465df13a><img src="https://cdn.tapni.co/images/appstore.png" class="app-store-icon pointer" style="width:55px;" data-v-465df13a></a><a href="https://appgallery.huawei.com/#/app/C103931997" target="_blank" data-v-465df13a><img src="https://cdn.tapni.co/images/appgallery.png" class="app-store-icon pointer" style="width:55px;" data-v-465df13a></a>',3)])))])}const wo=nt(Pi,[["render",Di],["__scopeId","data-v-465df13a"]]),ji=Object.freeze(Object.defineProperty({__proto__:null,default:wo},Symbol.toStringTag,{value:"Module"})),In={getMe(){return ce().get("/users/me")},getByUsername(n){let e=document.referrer||"",t=n.utmParams||{};return n.dontTap&&(t.dontTap=!0),ce().get(`/users/${n.username}`,{params:t,headers:{"X-Referer":e}})},getByNumber(n){let e=document.referrer||"",t=n.utmParams||{};return n.dontTap&&(t.dontTap=!0),ce().get(`/users/tag/${n.serial}`,{params:t,headers:{"X-Referer":e}})},save(n){return ce().put("/users",n)},newPassword(n){return ce().put("/users/new-password",n)},connect(n){return ce().post("/users/connect",n)},eventLog(n){return ce().post("/users/log",n)},deleteAccount(n){return ce().post("/users/profile/delete",n)},registerDevice(n){return ce().post("/users/device/register",n)},addFcmToken(n){return ce().post("/users/device/fcm",n)},loginUsingQR(n){return ce().post("/users/qr/login",n)},updateAccount(n){return ce().put("/accounts/me",n)}},pr={registerDevice(n){return ce().post("/devices/add",n)},addFcmToken(n){return ce().post("/devices/fcm/add",n)}},ko={getBySSOEmail(n){return ce().get(`/company/sso/${n}`)},acceptCompanyInvitation(n){return ce().get(`/users/invitation?ic=${n}`)},qrCodePooling(n){return ce().post("/company/login/qr",n)}},hr={state:{english:"English",spanish:"Spanish",german:"German",korean:"Korean",italian:"Italian",french:"French",serbian:"Serbian",turkish:"Turkish",chinese:"Chinese",japanese:"Japanese",portuguese:"Portuguese",app_language:"Language",profile_preview:"Profile preview",edit_profile:"Edit profile",login:"Login",referral_reach:"Provide us with more information about you and your reach.",referral_apply_placeholder:"How do you plan to promote Tapni?",referral_apply_note:`Add as many links as possible in your account, <br>
|
|
6
|
+
*/(function(n){const e=Kn,t=bo,o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=u,n.SlowBuffer=V,n.INSPECT_MAX_BYTES=50;const r=2147483647;n.kMaxLength=r;const{Uint8Array:i,ArrayBuffer:s,SharedArrayBuffer:c}=globalThis;u.TYPED_ARRAY_SUPPORT=l(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const m=new i(1),d={foo:function(){return 42}};return Object.setPrototypeOf(d,i.prototype),Object.setPrototypeOf(m,d),m.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function h(m){if(m>r)throw new RangeError('The value "'+m+'" is invalid for option "size"');const d=new i(m);return Object.setPrototypeOf(d,u.prototype),d}function u(m,d,p){if(typeof m=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(m)}return g(m,d,p)}u.poolSize=8192;function g(m,d,p){if(typeof m=="string")return P(m,d);if(s.isView(m))return j(m);if(m==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof m);if(Oe(m,s)||m&&Oe(m.buffer,s)||typeof c<"u"&&(Oe(m,c)||m&&Oe(m.buffer,c)))return N(m,d,p);if(typeof m=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const _=m.valueOf&&m.valueOf();if(_!=null&&_!==m)return u.from(_,d,p);const k=T(m);if(k)return k;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof m[Symbol.toPrimitive]=="function")return u.from(m[Symbol.toPrimitive]("string"),d,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof m)}u.from=function(m,d,p){return g(m,d,p)},Object.setPrototypeOf(u.prototype,i.prototype),Object.setPrototypeOf(u,i);function f(m){if(typeof m!="number")throw new TypeError('"size" argument must be of type number');if(m<0)throw new RangeError('The value "'+m+'" is invalid for option "size"')}function w(m,d,p){return f(m),m<=0?h(m):d!==void 0?typeof p=="string"?h(m).fill(d,p):h(m).fill(d):h(m)}u.alloc=function(m,d,p){return w(m,d,p)};function C(m){return f(m),h(m<0?0:B(m)|0)}u.allocUnsafe=function(m){return C(m)},u.allocUnsafeSlow=function(m){return C(m)};function P(m,d){if((typeof d!="string"||d==="")&&(d="utf8"),!u.isEncoding(d))throw new TypeError("Unknown encoding: "+d);const p=G(m,d)|0;let _=h(p);const k=_.write(m,d);return k!==p&&(_=_.slice(0,k)),_}function M(m){const d=m.length<0?0:B(m.length)|0,p=h(d);for(let _=0;_<d;_+=1)p[_]=m[_]&255;return p}function j(m){if(Oe(m,i)){const d=new i(m);return N(d.buffer,d.byteOffset,d.byteLength)}return M(m)}function N(m,d,p){if(d<0||m.byteLength<d)throw new RangeError('"offset" is outside of buffer bounds');if(m.byteLength<d+(p||0))throw new RangeError('"length" is outside of buffer bounds');let _;return d===void 0&&p===void 0?_=new i(m):p===void 0?_=new i(m,d):_=new i(m,d,p),Object.setPrototypeOf(_,u.prototype),_}function T(m){if(u.isBuffer(m)){const d=B(m.length)|0,p=h(d);return p.length===0||m.copy(p,0,0,d),p}if(m.length!==void 0)return typeof m.length!="number"||lt(m.length)?h(0):M(m);if(m.type==="Buffer"&&Array.isArray(m.data))return M(m.data)}function B(m){if(m>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return m|0}function V(m){return+m!=m&&(m=0),u.alloc(+m)}u.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==u.prototype},u.compare=function(d,p){if(Oe(d,i)&&(d=u.from(d,d.offset,d.byteLength)),Oe(p,i)&&(p=u.from(p,p.offset,p.byteLength)),!u.isBuffer(d)||!u.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===p)return 0;let _=d.length,k=p.length;for(let S=0,L=Math.min(_,k);S<L;++S)if(d[S]!==p[S]){_=d[S],k=p[S];break}return _<k?-1:k<_?1:0},u.isEncoding=function(d){switch(String(d).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(d,p){if(!Array.isArray(d))throw new TypeError('"list" argument must be an Array of Buffers');if(d.length===0)return u.alloc(0);let _;if(p===void 0)for(p=0,_=0;_<d.length;++_)p+=d[_].length;const k=u.allocUnsafe(p);let S=0;for(_=0;_<d.length;++_){let L=d[_];if(Oe(L,i))S+L.length>k.length?(u.isBuffer(L)||(L=u.from(L)),L.copy(k,S)):i.prototype.set.call(k,L,S);else if(u.isBuffer(L))L.copy(k,S);else throw new TypeError('"list" argument must be an Array of Buffers');S+=L.length}return k};function G(m,d){if(u.isBuffer(m))return m.length;if(s.isView(m)||Oe(m,s))return m.byteLength;if(typeof m!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof m);const p=m.length,_=arguments.length>2&&arguments[2]===!0;if(!_&&p===0)return 0;let k=!1;for(;;)switch(d){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return ht(m).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return je(m).length;default:if(k)return _?-1:ht(m).length;d=(""+d).toLowerCase(),k=!0}}u.byteLength=G;function J(m,d,p){let _=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,d>>>=0,p<=d))return"";for(m||(m="utf8");;)switch(m){case"hex":return Xt(this,d,p);case"utf8":case"utf-8":return Pt(this,d,p);case"ascii":return Jt(this,d,p);case"latin1":case"binary":return un(this,d,p);case"base64":return vt(this,d,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sn(this,d,p);default:if(_)throw new TypeError("Unknown encoding: "+m);m=(m+"").toLowerCase(),_=!0}}u.prototype._isBuffer=!0;function I(m,d,p){const _=m[d];m[d]=m[p],m[p]=_}u.prototype.swap16=function(){const d=this.length;if(d%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let p=0;p<d;p+=2)I(this,p,p+1);return this},u.prototype.swap32=function(){const d=this.length;if(d%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let p=0;p<d;p+=4)I(this,p,p+3),I(this,p+1,p+2);return this},u.prototype.swap64=function(){const d=this.length;if(d%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let p=0;p<d;p+=8)I(this,p,p+7),I(this,p+1,p+6),I(this,p+2,p+5),I(this,p+3,p+4);return this},u.prototype.toString=function(){const d=this.length;return d===0?"":arguments.length===0?Pt(this,0,d):J.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(d){if(!u.isBuffer(d))throw new TypeError("Argument must be a Buffer");return this===d?!0:u.compare(this,d)===0},u.prototype.inspect=function(){let d="";const p=n.INSPECT_MAX_BYTES;return d=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(d+=" ... "),"<Buffer "+d+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(d,p,_,k,S){if(Oe(d,i)&&(d=u.from(d,d.offset,d.byteLength)),!u.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(p===void 0&&(p=0),_===void 0&&(_=d?d.length:0),k===void 0&&(k=0),S===void 0&&(S=this.length),p<0||_>d.length||k<0||S>this.length)throw new RangeError("out of range index");if(k>=S&&p>=_)return 0;if(k>=S)return-1;if(p>=_)return 1;if(p>>>=0,_>>>=0,k>>>=0,S>>>=0,this===d)return 0;let L=S-k,se=_-p;const ve=Math.min(L,se),_e=this.slice(k,S),be=d.slice(p,_);for(let me=0;me<ve;++me)if(_e[me]!==be[me]){L=_e[me],se=be[me];break}return L<se?-1:se<L?1:0};function W(m,d,p,_,k){if(m.length===0)return-1;if(typeof p=="string"?(_=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,lt(p)&&(p=k?0:m.length-1),p<0&&(p=m.length+p),p>=m.length){if(k)return-1;p=m.length-1}else if(p<0)if(k)p=0;else return-1;if(typeof d=="string"&&(d=u.from(d,_)),u.isBuffer(d))return d.length===0?-1:ie(m,d,p,_,k);if(typeof d=="number")return d=d&255,typeof i.prototype.indexOf=="function"?k?i.prototype.indexOf.call(m,d,p):i.prototype.lastIndexOf.call(m,d,p):ie(m,[d],p,_,k);throw new TypeError("val must be string, number or Buffer")}function ie(m,d,p,_,k){let S=1,L=m.length,se=d.length;if(_!==void 0&&(_=String(_).toLowerCase(),_==="ucs2"||_==="ucs-2"||_==="utf16le"||_==="utf-16le")){if(m.length<2||d.length<2)return-1;S=2,L/=2,se/=2,p/=2}function ve(be,me){return S===1?be[me]:be.readUInt16BE(me*S)}let _e;if(k){let be=-1;for(_e=p;_e<L;_e++)if(ve(m,_e)===ve(d,be===-1?0:_e-be)){if(be===-1&&(be=_e),_e-be+1===se)return be*S}else be!==-1&&(_e-=_e-be),be=-1}else for(p+se>L&&(p=L-se),_e=p;_e>=0;_e--){let be=!0;for(let me=0;me<se;me++)if(ve(m,_e+me)!==ve(d,me)){be=!1;break}if(be)return _e}return-1}u.prototype.includes=function(d,p,_){return this.indexOf(d,p,_)!==-1},u.prototype.indexOf=function(d,p,_){return W(this,d,p,_,!0)},u.prototype.lastIndexOf=function(d,p,_){return W(this,d,p,_,!1)};function ee(m,d,p,_){p=Number(p)||0;const k=m.length-p;_?(_=Number(_),_>k&&(_=k)):_=k;const S=d.length;_>S/2&&(_=S/2);let L;for(L=0;L<_;++L){const se=parseInt(d.substr(L*2,2),16);if(lt(se))return L;m[p+L]=se}return L}function ye(m,d,p,_){return mt(ht(d,m.length-p),m,p,_)}function Re(m,d,p,_){return mt(pn(d),m,p,_)}function le(m,d,p,_){return mt(je(d),m,p,_)}function Me(m,d,p,_){return mt(wt(d,m.length-p),m,p,_)}u.prototype.write=function(d,p,_,k){if(p===void 0)k="utf8",_=this.length,p=0;else if(_===void 0&&typeof p=="string")k=p,_=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(_)?(_=_>>>0,k===void 0&&(k="utf8")):(k=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const S=this.length-p;if((_===void 0||_>S)&&(_=S),d.length>0&&(_<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");k||(k="utf8");let L=!1;for(;;)switch(k){case"hex":return ee(this,d,p,_);case"utf8":case"utf-8":return ye(this,d,p,_);case"ascii":case"latin1":case"binary":return Re(this,d,p,_);case"base64":return le(this,d,p,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Me(this,d,p,_);default:if(L)throw new TypeError("Unknown encoding: "+k);k=(""+k).toLowerCase(),L=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function vt(m,d,p){return d===0&&p===m.length?e.fromByteArray(m):e.fromByteArray(m.slice(d,p))}function Pt(m,d,p){p=Math.min(m.length,p);const _=[];let k=d;for(;k<p;){const S=m[k];let L=null,se=S>239?4:S>223?3:S>191?2:1;if(k+se<=p){let ve,_e,be,me;switch(se){case 1:S<128&&(L=S);break;case 2:ve=m[k+1],(ve&192)===128&&(me=(S&31)<<6|ve&63,me>127&&(L=me));break;case 3:ve=m[k+1],_e=m[k+2],(ve&192)===128&&(_e&192)===128&&(me=(S&15)<<12|(ve&63)<<6|_e&63,me>2047&&(me<55296||me>57343)&&(L=me));break;case 4:ve=m[k+1],_e=m[k+2],be=m[k+3],(ve&192)===128&&(_e&192)===128&&(be&192)===128&&(me=(S&15)<<18|(ve&63)<<12|(_e&63)<<6|be&63,me>65535&&me<1114112&&(L=me))}}L===null?(L=65533,se=1):L>65535&&(L-=65536,_.push(L>>>10&1023|55296),L=56320|L&1023),_.push(L),k+=se}return dn(_)}const at=4096;function dn(m){const d=m.length;if(d<=at)return String.fromCharCode.apply(String,m);let p="",_=0;for(;_<d;)p+=String.fromCharCode.apply(String,m.slice(_,_+=at));return p}function Jt(m,d,p){let _="";p=Math.min(m.length,p);for(let k=d;k<p;++k)_+=String.fromCharCode(m[k]&127);return _}function un(m,d,p){let _="";p=Math.min(m.length,p);for(let k=d;k<p;++k)_+=String.fromCharCode(m[k]);return _}function Xt(m,d,p){const _=m.length;(!d||d<0)&&(d=0),(!p||p<0||p>_)&&(p=_);let k="";for(let S=d;S<p;++S)k+=hn[m[S]];return k}function Sn(m,d,p){const _=m.slice(d,p);let k="";for(let S=0;S<_.length-1;S+=2)k+=String.fromCharCode(_[S]+_[S+1]*256);return k}u.prototype.slice=function(d,p){const _=this.length;d=~~d,p=p===void 0?_:~~p,d<0?(d+=_,d<0&&(d=0)):d>_&&(d=_),p<0?(p+=_,p<0&&(p=0)):p>_&&(p=_),p<d&&(p=d);const k=this.subarray(d,p);return Object.setPrototypeOf(k,u.prototype),k};function Ce(m,d,p){if(m%1!==0||m<0)throw new RangeError("offset is not uint");if(m+d>p)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(d,p,_){d=d>>>0,p=p>>>0,_||Ce(d,p,this.length);let k=this[d],S=1,L=0;for(;++L<p&&(S*=256);)k+=this[d+L]*S;return k},u.prototype.readUintBE=u.prototype.readUIntBE=function(d,p,_){d=d>>>0,p=p>>>0,_||Ce(d,p,this.length);let k=this[d+--p],S=1;for(;p>0&&(S*=256);)k+=this[d+--p]*S;return k},u.prototype.readUint8=u.prototype.readUInt8=function(d,p){return d=d>>>0,p||Ce(d,1,this.length),this[d]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(d,p){return d=d>>>0,p||Ce(d,2,this.length),this[d]|this[d+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(d,p){return d=d>>>0,p||Ce(d,2,this.length),this[d]<<8|this[d+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+this[d+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},u.prototype.readBigUInt64LE=qe(function(d){d=d>>>0,Ie(d,"offset");const p=this[d],_=this[d+7];(p===void 0||_===void 0)&&ct(d,this.length-8);const k=p+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24,S=this[++d]+this[++d]*2**8+this[++d]*2**16+_*2**24;return BigInt(k)+(BigInt(S)<<BigInt(32))}),u.prototype.readBigUInt64BE=qe(function(d){d=d>>>0,Ie(d,"offset");const p=this[d],_=this[d+7];(p===void 0||_===void 0)&&ct(d,this.length-8);const k=p*2**24+this[++d]*2**16+this[++d]*2**8+this[++d],S=this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+_;return(BigInt(k)<<BigInt(32))+BigInt(S)}),u.prototype.readIntLE=function(d,p,_){d=d>>>0,p=p>>>0,_||Ce(d,p,this.length);let k=this[d],S=1,L=0;for(;++L<p&&(S*=256);)k+=this[d+L]*S;return S*=128,k>=S&&(k-=Math.pow(2,8*p)),k},u.prototype.readIntBE=function(d,p,_){d=d>>>0,p=p>>>0,_||Ce(d,p,this.length);let k=p,S=1,L=this[d+--k];for(;k>0&&(S*=256);)L+=this[d+--k]*S;return S*=128,L>=S&&(L-=Math.pow(2,8*p)),L},u.prototype.readInt8=function(d,p){return d=d>>>0,p||Ce(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},u.prototype.readInt16LE=function(d,p){d=d>>>0,p||Ce(d,2,this.length);const _=this[d]|this[d+1]<<8;return _&32768?_|4294901760:_},u.prototype.readInt16BE=function(d,p){d=d>>>0,p||Ce(d,2,this.length);const _=this[d+1]|this[d]<<8;return _&32768?_|4294901760:_},u.prototype.readInt32LE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},u.prototype.readInt32BE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},u.prototype.readBigInt64LE=qe(function(d){d=d>>>0,Ie(d,"offset");const p=this[d],_=this[d+7];(p===void 0||_===void 0)&&ct(d,this.length-8);const k=this[d+4]+this[d+5]*2**8+this[d+6]*2**16+(_<<24);return(BigInt(k)<<BigInt(32))+BigInt(p+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24)}),u.prototype.readBigInt64BE=qe(function(d){d=d>>>0,Ie(d,"offset");const p=this[d],_=this[d+7];(p===void 0||_===void 0)&&ct(d,this.length-8);const k=(p<<24)+this[++d]*2**16+this[++d]*2**8+this[++d];return(BigInt(k)<<BigInt(32))+BigInt(this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+_)}),u.prototype.readFloatLE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),t.read(this,d,!0,23,4)},u.prototype.readFloatBE=function(d,p){return d=d>>>0,p||Ce(d,4,this.length),t.read(this,d,!1,23,4)},u.prototype.readDoubleLE=function(d,p){return d=d>>>0,p||Ce(d,8,this.length),t.read(this,d,!0,52,8)},u.prototype.readDoubleBE=function(d,p){return d=d>>>0,p||Ce(d,8,this.length),t.read(this,d,!1,52,8)};function Se(m,d,p,_,k,S){if(!u.isBuffer(m))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>k||d<S)throw new RangeError('"value" argument is out of bounds');if(p+_>m.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(d,p,_,k){if(d=+d,p=p>>>0,_=_>>>0,!k){const se=Math.pow(2,8*_)-1;Se(this,d,p,_,se,0)}let S=1,L=0;for(this[p]=d&255;++L<_&&(S*=256);)this[p+L]=d/S&255;return p+_},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(d,p,_,k){if(d=+d,p=p>>>0,_=_>>>0,!k){const se=Math.pow(2,8*_)-1;Se(this,d,p,_,se,0)}let S=_-1,L=1;for(this[p+S]=d&255;--S>=0&&(L*=256);)this[p+S]=d/L&255;return p+_},u.prototype.writeUint8=u.prototype.writeUInt8=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,1,255,0),this[p]=d&255,p+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,2,65535,0),this[p]=d&255,this[p+1]=d>>>8,p+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,2,65535,0),this[p]=d>>>8,this[p+1]=d&255,p+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,4,4294967295,0),this[p+3]=d>>>24,this[p+2]=d>>>16,this[p+1]=d>>>8,this[p]=d&255,p+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,4,4294967295,0),this[p]=d>>>24,this[p+1]=d>>>16,this[p+2]=d>>>8,this[p+3]=d&255,p+4};function Kt(m,d,p,_,k){Ge(d,_,k,m,p,7);let S=Number(d&BigInt(4294967295));m[p++]=S,S=S>>8,m[p++]=S,S=S>>8,m[p++]=S,S=S>>8,m[p++]=S;let L=Number(d>>BigInt(32)&BigInt(4294967295));return m[p++]=L,L=L>>8,m[p++]=L,L=L>>8,m[p++]=L,L=L>>8,m[p++]=L,p}function De(m,d,p,_,k){Ge(d,_,k,m,p,7);let S=Number(d&BigInt(4294967295));m[p+7]=S,S=S>>8,m[p+6]=S,S=S>>8,m[p+5]=S,S=S>>8,m[p+4]=S;let L=Number(d>>BigInt(32)&BigInt(4294967295));return m[p+3]=L,L=L>>8,m[p+2]=L,L=L>>8,m[p+1]=L,L=L>>8,m[p]=L,p+8}u.prototype.writeBigUInt64LE=qe(function(d,p=0){return Kt(this,d,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=qe(function(d,p=0){return De(this,d,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(d,p,_,k){if(d=+d,p=p>>>0,!k){const ve=Math.pow(2,8*_-1);Se(this,d,p,_,ve-1,-ve)}let S=0,L=1,se=0;for(this[p]=d&255;++S<_&&(L*=256);)d<0&&se===0&&this[p+S-1]!==0&&(se=1),this[p+S]=(d/L>>0)-se&255;return p+_},u.prototype.writeIntBE=function(d,p,_,k){if(d=+d,p=p>>>0,!k){const ve=Math.pow(2,8*_-1);Se(this,d,p,_,ve-1,-ve)}let S=_-1,L=1,se=0;for(this[p+S]=d&255;--S>=0&&(L*=256);)d<0&&se===0&&this[p+S+1]!==0&&(se=1),this[p+S]=(d/L>>0)-se&255;return p+_},u.prototype.writeInt8=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,1,127,-128),d<0&&(d=255+d+1),this[p]=d&255,p+1},u.prototype.writeInt16LE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,2,32767,-32768),this[p]=d&255,this[p+1]=d>>>8,p+2},u.prototype.writeInt16BE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,2,32767,-32768),this[p]=d>>>8,this[p+1]=d&255,p+2},u.prototype.writeInt32LE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,4,2147483647,-2147483648),this[p]=d&255,this[p+1]=d>>>8,this[p+2]=d>>>16,this[p+3]=d>>>24,p+4},u.prototype.writeInt32BE=function(d,p,_){return d=+d,p=p>>>0,_||Se(this,d,p,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[p]=d>>>24,this[p+1]=d>>>16,this[p+2]=d>>>8,this[p+3]=d&255,p+4},u.prototype.writeBigInt64LE=qe(function(d,p=0){return Kt(this,d,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=qe(function(d,p=0){return De(this,d,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Le(m,d,p,_,k,S){if(p+_>m.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function Mt(m,d,p,_,k){return d=+d,p=p>>>0,k||Le(m,d,p,4),t.write(m,d,p,_,23,4),p+4}u.prototype.writeFloatLE=function(d,p,_){return Mt(this,d,p,!0,_)},u.prototype.writeFloatBE=function(d,p,_){return Mt(this,d,p,!1,_)};function bt(m,d,p,_,k){return d=+d,p=p>>>0,k||Le(m,d,p,8),t.write(m,d,p,_,52,8),p+8}u.prototype.writeDoubleLE=function(d,p,_){return bt(this,d,p,!0,_)},u.prototype.writeDoubleBE=function(d,p,_){return bt(this,d,p,!1,_)},u.prototype.copy=function(d,p,_,k){if(!u.isBuffer(d))throw new TypeError("argument should be a Buffer");if(_||(_=0),!k&&k!==0&&(k=this.length),p>=d.length&&(p=d.length),p||(p=0),k>0&&k<_&&(k=_),k===_||d.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("sourceEnd out of bounds");k>this.length&&(k=this.length),d.length-p<k-_&&(k=d.length-p+_);const S=k-_;return this===d&&typeof i.prototype.copyWithin=="function"?this.copyWithin(p,_,k):i.prototype.set.call(d,this.subarray(_,k),p),S},u.prototype.fill=function(d,p,_,k){if(typeof d=="string"){if(typeof p=="string"?(k=p,p=0,_=this.length):typeof _=="string"&&(k=_,_=this.length),k!==void 0&&typeof k!="string")throw new TypeError("encoding must be a string");if(typeof k=="string"&&!u.isEncoding(k))throw new TypeError("Unknown encoding: "+k);if(d.length===1){const L=d.charCodeAt(0);(k==="utf8"&&L<128||k==="latin1")&&(d=L)}}else typeof d=="number"?d=d&255:typeof d=="boolean"&&(d=Number(d));if(p<0||this.length<p||this.length<_)throw new RangeError("Out of range index");if(_<=p)return this;p=p>>>0,_=_===void 0?this.length:_>>>0,d||(d=0);let S;if(typeof d=="number")for(S=p;S<_;++S)this[S]=d;else{const L=u.isBuffer(d)?d:u.from(d,k),se=L.length;if(se===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(S=0;S<_-p;++S)this[S+p]=L[S%se]}return this};const Qe={};function st(m,d,p){Qe[m]=class extends p{constructor(){super(),Object.defineProperty(this,"message",{value:d.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${m}]`,this.stack,delete this.name}get code(){return m}set code(k){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:k,writable:!0})}toString(){return`${this.name} [${m}]: ${this.message}`}}}st("ERR_BUFFER_OUT_OF_BOUNDS",function(m){return m?`${m} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),st("ERR_INVALID_ARG_TYPE",function(m,d){return`The "${m}" argument must be of type number. Received type ${typeof d}`},TypeError),st("ERR_OUT_OF_RANGE",function(m,d,p){let _=`The value of "${m}" is out of range.`,k=p;return Number.isInteger(p)&&Math.abs(p)>2**32?k=Gt(String(p)):typeof p=="bigint"&&(k=String(p),(p>BigInt(2)**BigInt(32)||p<-(BigInt(2)**BigInt(32)))&&(k=Gt(k)),k+="n"),_+=` It must be ${d}. Received ${k}`,_},RangeError);function Gt(m){let d="",p=m.length;const _=m[0]==="-"?1:0;for(;p>=_+4;p-=3)d=`_${m.slice(p-3,p)}${d}`;return`${m.slice(0,p)}${d}`}function Lt(m,d,p){Ie(d,"offset"),(m[d]===void 0||m[d+p]===void 0)&&ct(d,m.length-(p+1))}function Ge(m,d,p,_,k,S){if(m>p||m<d){const L=typeof d=="bigint"?"n":"";let se;throw d===0||d===BigInt(0)?se=`>= 0${L} and < 2${L} ** ${(S+1)*8}${L}`:se=`>= -(2${L} ** ${(S+1)*8-1}${L}) and < 2 ** ${(S+1)*8-1}${L}`,new Qe.ERR_OUT_OF_RANGE("value",se,m)}Lt(_,k,S)}function Ie(m,d){if(typeof m!="number")throw new Qe.ERR_INVALID_ARG_TYPE(d,"number",m)}function ct(m,d,p){throw Math.floor(m)!==m?(Ie(m,p),new Qe.ERR_OUT_OF_RANGE("offset","an integer",m)):d<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${d}`,m)}const Ot=/[^+/0-9A-Za-z-_]/g;function zt(m){if(m=m.split("=")[0],m=m.trim().replace(Ot,""),m.length<2)return"";for(;m.length%4!==0;)m=m+"=";return m}function ht(m,d){d=d||1/0;let p;const _=m.length;let k=null;const S=[];for(let L=0;L<_;++L){if(p=m.charCodeAt(L),p>55295&&p<57344){if(!k){if(p>56319){(d-=3)>-1&&S.push(239,191,189);continue}else if(L+1===_){(d-=3)>-1&&S.push(239,191,189);continue}k=p;continue}if(p<56320){(d-=3)>-1&&S.push(239,191,189),k=p;continue}p=(k-55296<<10|p-56320)+65536}else k&&(d-=3)>-1&&S.push(239,191,189);if(k=null,p<128){if((d-=1)<0)break;S.push(p)}else if(p<2048){if((d-=2)<0)break;S.push(p>>6|192,p&63|128)}else if(p<65536){if((d-=3)<0)break;S.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((d-=4)<0)break;S.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return S}function pn(m){const d=[];for(let p=0;p<m.length;++p)d.push(m.charCodeAt(p)&255);return d}function wt(m,d){let p,_,k;const S=[];for(let L=0;L<m.length&&!((d-=2)<0);++L)p=m.charCodeAt(L),_=p>>8,k=p%256,S.push(k),S.push(_);return S}function je(m){return e.toByteArray(zt(m))}function mt(m,d,p,_){let k;for(k=0;k<_&&!(k+p>=d.length||k>=m.length);++k)d[k+p]=m[k];return k}function Oe(m,d){return m instanceof d||m!=null&&m.constructor!=null&&m.constructor.name!=null&&m.constructor.name===d.name}function lt(m){return m!==m}const hn=function(){const m="0123456789abcdef",d=new Array(256);for(let p=0;p<16;++p){const _=p*16;for(let k=0;k<16;++k)d[_+k]=m[p]+m[k]}return d}();function qe(m){return typeof BigInt>"u"?xt:m}function xt(){throw new Error("BigInt not supported")}})(yo);const nn=yo.Buffer,Si=yo.Buffer,Gn=a.reactive(new Map),X={$on(n,e){let t=Gn.get(n);t||(t=new Set,Gn.set(n,t)),t.add(e)},$emit(n,...e){const t=Gn.get(n);if(t)for(const o of t)o(...e)},$off(n,e){const t=Gn.get(n);t&&t.delete(e)}};a.readonly(X);const Ii={computed:{home(){return this.$storex&&this.$storex.token&&this.$storex.username?"/"+this.$storex.username:"/welcome"},isAndroid(){return/Android/i.test(navigator.userAgent)||tt.Capacitor.getPlatform()==="android"},isiOS(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document||tt.Capacitor.getPlatform()==="ios"},isNative(){return tt.Capacitor.isNativePlatform()}},methods:{getIcon(n){return this.isNative?`/icons/${n}`:"https://cdn.tapni.co/icons/"+n},errorHandler(n){return n&&n.response&&n.response.data&&n.response.data.error&&((n.response.data.error==="ACCESS_DENIED"||n.response.data.error==="TOKEN_EXPIRED")&&this.logout(),!n.response.data.error.includes("Network Error")&&!n.response.data.error.includes("Cannot read properties")&&this.errorSnack(n.response.data.error)),n},errorSnack(n){let e=document.getElementById("snackbar"),t=document.getElementById("errorMessage"),o=document.getElementById("errorSnack");t.innerHTML=n,e.classList.add("show-snack"),o.classList.add("active-snack"),setTimeout(function(){o.classList.remove("active-snack"),e.classList.remove("show-snack")},3e3)},successSnack(n){let e=document.getElementById("snackbar"),t=document.getElementById("successMessage"),o=document.getElementById("successSnack");t.innerHTML=n,e.classList.add("show-snack"),o.classList.add("active-snack"),setTimeout(function(){o.classList.remove("active-snack"),e.classList.remove("show-snack")},3e3)},closeSnacks(){document.getElementById("snackbar").classList.remove("show-snack"),document.getElementById("successSnack").classList.remove("active-snack"),document.getElementById("errorSnack").classList.remove("active-snack")},tapsEmoji(n){return n<10?"":n<=50?"🔥":n<=100?"💥":n<=300?"💎":n>300?"🚀":""},isEmpty(n){if(!n)return!0;for(let e in n)if(n.hasOwnProperty(e))return!1;return JSON.stringify(n)===JSON.stringify({})},copy(n=""){const e=document.createElement("textarea");e.value=n,e.setAttribute("readonly",""),e.style.position="absolute",e.style.left="-9999px",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),this.successSnack(this.ssoLang[this.appLanguage].copied)},async getCaptchaToken(n){try{return await window.grecaptcha.execute("6LenkC0mAAAAADWBxPOhpmwXCwzCJd7cilNgtOLk",{action:n})}catch(e){return console.error("grecaptcha_error",e),null}}}},{mapState:Ai,mapActions:Ri,mapGetters:Ni}=ar.createNamespacedHelpers("auth"),We={mixins:[Ii],props:{isModal:{type:Boolean,required:!1,default:!1}},computed:{...Ai(["$storex","refreshing","loggedInUserId","account","device","loggedInAccounts","ssoLang","display","redirect_uri","response_type","state","allowedOriginsAuth"]),...Ni(["accessToken","refreshTokens","isLoggedIn","renderView","appLanguage"])},methods:{...Ri(["setLoggedInAccounts","setLoggedInUserId","setRefreshToken","unsetRefreshToken","setToken","setView","setStorage","setStorageItem","updateLang","login","register","verify","reset","exchangeAuthCode","changePassword","newPassword","deleteAccount","registerDevice","addFcmToken","acceptCompanyInvitation","logout","getCompanyBySSOEmail","getLoggedInAccounts","loginUsingQR","getAccountSettings","setRedirectUri","setDisplay","setState","setRealm","setResponseType","switchAccount","loginSetup","loginSuccess","refreshTokenAction"])},watch:{"$route.query":{handler:function(){this.$route.query.redirect_uri&&this.setRedirectUri(this.$route.query.redirect_uri),this.$route.query.display&&this.setDisplay(this.$route.query.display),this.$route.query.state&&this.setState(this.$route.query.state),this.$route.query.response_type&&this.setResponseType(this.$route.query.response_type),this.$route.query.realm&&this.setRealm(this.$route.query.realm)},deep:!0}}},nt=(n,e)=>{const t=n.__vccOpts||n;for(const[o,r]of e)t[o]=r;return t},Pi={name:"AuthWelcome",mixins:[We],data(){return{loading:!0}},computed:{isTapstackOrigin(){if(typeof window>"u")return!1;try{const n=new URL(window.location.origin).hostname;return/(^|\.)tapstack\.com$/i.test(n)}catch{return!1}},videoSource(){return this.isTapstackOrigin?"https://cdn.tapni.co/images/tapstack-video.mp4":"https://cdn.tapni.co/images/tapni-card-tap-video-white.mp4"},welcomeTitle(){return this.isTapstackOrigin?"Welcome":this.ssoLang[this.appLanguage].welcome},welcomeSubtitle(){return this.isTapstackOrigin?"The modern stack for interactive docs and tools":this.ssoLang[this.appLanguage].welcome_p1}},async mounted(){let n=document.getElementById("tapniVideo");n&&document.body&&n.addEventListener("canplay",function(){if(document.body&&n&&document.body.contains(n))try{n.play()}catch(e){console.error("Play was interrupted:",e)}}),setTimeout(()=>{this.$storex&&this.$storex.token?this.$router.push(this.home):X.$emit("ssoEvent",{name:"setLoading",data:!1})},500)},methods:{}},Mi={class:"page-login content-boxed content-boxed-padding center-text",style:{"margin-top":"-1px",overflow:"hidden",border:"solid 0px #ffffff"}},Li=["autoplay"],Oi=["src"],zi={class:"bold full-top no-bottom center-text text-[24px]"},xi={class:"full-bottom half-top center-text color-black font-16"},Bi={class:"page-login-links center-text"},Ui={key:3,style:{display:"flex","flex-direction":"row","justify-content":"space-around",width:"90%",margin:"0 auto","margin-top":"40px"}};function Di(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Mi,[a.createElementVNode("video",{id:"tapniVideo",muted:"",loop:"",playsinline:"",width:"350",style:{margin:"0 auto","max-width":"100%","margin-top":"63px",overflow:"hidden"},autoplay:n.isNative},[a.createElementVNode("source",{src:i.videoSource,type:"video/mp4"},null,8,Oi)],8,Li),a.createElementVNode("h1",zi,a.toDisplayString(i.welcomeTitle),1),a.createElementVNode("p",xi,a.toDisplayString(i.welcomeSubtitle),1),a.createCommentVNode("",!0),a.createCommentVNode("",!0),a.createVNode(s,{to:"register",exact:"",class:"button-center button button-90 google-button bg-tapni-grey pointer"},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[this.appLanguage].create_account),1)]),_:1}),a.createElementVNode("div",Bi,[a.createVNode(s,{to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].already_registered)+"? ",1),a.createElementVNode("b",null,a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[1]||(e[1]=a.createElementVNode("div",{class:"clear"},null,-1))]),a.createCommentVNode("",!0),this.isNative?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",Ui,e[2]||(e[2]=[a.createStaticVNode('<a href="https://play.google.com/store/apps/details?id=co.tapni.app" target="_blank" data-v-4abaaa1d><img src="https://cdn.tapni.co/images/playstore.png" class="app-store-icon pointer" style="width:55px;" data-v-4abaaa1d></a><a href="https://apps.apple.com/ag/app/tapni/id1552930233" target="_blank" data-v-4abaaa1d><img src="https://cdn.tapni.co/images/appstore.png" class="app-store-icon pointer" style="width:55px;" data-v-4abaaa1d></a><a href="https://appgallery.huawei.com/#/app/C103931997" target="_blank" data-v-4abaaa1d><img src="https://cdn.tapni.co/images/appgallery.png" class="app-store-icon pointer" style="width:55px;" data-v-4abaaa1d></a>',3)])))])}const wo=nt(Pi,[["render",Di],["__scopeId","data-v-4abaaa1d"]]),ji=Object.freeze(Object.defineProperty({__proto__:null,default:wo},Symbol.toStringTag,{value:"Module"})),In={getMe(){return ce().get("/users/me")},getByUsername(n){let e=document.referrer||"",t=n.utmParams||{};return n.dontTap&&(t.dontTap=!0),ce().get(`/users/${n.username}`,{params:t,headers:{"X-Referer":e}})},getByNumber(n){let e=document.referrer||"",t=n.utmParams||{};return n.dontTap&&(t.dontTap=!0),ce().get(`/users/tag/${n.serial}`,{params:t,headers:{"X-Referer":e}})},save(n){return ce().put("/users",n)},newPassword(n){return ce().put("/users/new-password",n)},connect(n){return ce().post("/users/connect",n)},eventLog(n){return ce().post("/users/log",n)},deleteAccount(n){return ce().post("/users/profile/delete",n)},registerDevice(n){return ce().post("/users/device/register",n)},addFcmToken(n){return ce().post("/users/device/fcm",n)},loginUsingQR(n){return ce().post("/users/qr/login",n)},updateAccount(n){return ce().put("/accounts/me",n)}},pr={registerDevice(n){return ce().post("/devices/add",n)},addFcmToken(n){return ce().post("/devices/fcm/add",n)}},ko={getBySSOEmail(n){return ce().get(`/company/sso/${n}`)},acceptCompanyInvitation(n){return ce().get(`/users/invitation?ic=${n}`)},qrCodePooling(n){return ce().post("/company/login/qr",n)}},hr={state:{english:"English",spanish:"Spanish",german:"German",korean:"Korean",italian:"Italian",french:"French",serbian:"Serbian",turkish:"Turkish",chinese:"Chinese",japanese:"Japanese",portuguese:"Portuguese",app_language:"Language",profile_preview:"Profile preview",edit_profile:"Edit profile",login:"Login",referral_reach:"Provide us with more information about you and your reach.",referral_apply_placeholder:"How do you plan to promote Tapni?",referral_apply_note:`Add as many links as possible in your account, <br>
|
|
7
7
|
so that we can know who you are.
|
|
8
8
|
<br><br>Be exclusive.
|
|
9
9
|
<br>Not everyone gets accepted.😉`,referral_apply_now:"Apply now",referral_apply_thanks:"Thanks for applying. We will review your application soon!",connect:"Connect",with:"with",exchange_contact:"Exchange Contact",add_details:"Add more",show_details:"Show more",download_contact:"Download Contact",stay_in_touch:"Stay in touch with",no_thanks:"No Thanks",connect_join:"Join Tapni",connect_with:"Exchange contact with",connect_required_fields:"One of the two contact fields must be provided",name:"Name",first_name:"First name",last_name:"Last name",email:"Email",phone:"Phone number",phone_p:"Phone",company:"Company",address:"Address",website:"Website",open:"Open",delete:"Delete",confirm:"Confirm",cancel:"Cancel",save:"Save",code:"Code",note:"Note",note_p:"Add a note",contact_card_icon:"Set text under the contact card icon",contact_card_name:"Enter first and lastname",contact_card_name_p:"Contact card name",contact_card_email:"Enter personal email address",contact_card_email_p:"Contact card email",contact_card_phone:"Enter personal phone number",contact_card_phone_p:"Contact card phone",contact_card_website:"Enter personal website",contact_card_website_p:"Contact card website",contact_card_company_name:"Enter company name",contact_card_company_name_p:"Contact card company name",contact_card_job_title:"Job title",contact_card_job_title_p:"Enter job title",contact_card_company_website:"Company website",contact_card_company_website_p:"Enter company website",contact_card_bio:"Enter bio for the contact card",contact_card_bio_p:"Enter bio for the contact card",contact_card_home_address:"Enter home address",contact_card_home_address_p:"Contact card home address",contact_card_work_address:"Enter work address",contact_card_work_address_p:"Contact card work address",contact_card_social:"Choose social media links to your Tapni profile <br>in order to add them in the contact card",contact_card_social_p:"Choose social media links for the contact card",link_text_p:"Link Text",link_icon:"Set text under the link icon",direct_pick:"Pick a direct link",direct_p:"When you tap someone's phone, <br> this link will be opened instead of your full profile.",password_change:"Change password",password_repeat:"Repeat password",password_reset_t:"Password reset",password_current:"Enter your current password",password_current_p:"Current Password",password_new:"Enter your new password",password_new_p:"New Password",password_new_repeat:"Enter your new password again",password_new_repeat_p:"Enter your new password again",password_update:"Password update",password_reset:`If you can't remember your current password,<br>
|
|
@@ -67,12 +67,12 @@ Il n'y a aucun lien dans votre profil.`,add_link:"Ajoutez un lien",direct_link_p
|
|
|
67
67
|
o se hai domande,<br>
|
|
68
68
|
scrivici su`,referral_p5:"Inizia a guadagnare ora!",referral_p66:"Condividi il tuo link di affiliazione e guadagna!",referral_p6:`Se sei un blogger, un influencer o un appassionato di social media, sei perfetto per il nostro programma Ambasciatore Tapni
|
|
69
69
|
Promuovi il nostro Brand e guadagna una commissione del 20% sugli acquisti effettuati con il tuo codice sconto o link di riferimento.`,referral_p7:`Dopo la registrazione al programma Tapni Ambassador, riceverai un link di riferimento personale e un codice sconto.
|
|
70
|
-
Condividili sul tuo sito Web e sui social media e guadagna mentre noi offriamo un'esperienza di connessione eccezionale.`,referral_p8:"Nota di pagamenti",referral_p9:"Paypal (Worldwide) e trasferimenti bancari (EU) <br> l'importo minimo di pagamento è di 25€.",referral_p10:"Richiedi pagamento",referral_p11:"Pagamento richiesto",your_connections:"Le tue connessioni",connections_p1:"Mettiti in contatto con le persone che hai incontrato",connections_p2:"<br><br>Nessuna connessione finora. <br> Facciamo i tap!💥",connections_p3:"Nessuna connessione trovata",connection_success:"Inviata con successo una richiesta di connessione.",exchange_success:"Scambio di contatti riuscito.",create_free_account:"Crea un account Tapni gratuito e tieni aggiornati i tuoi contatti!",connection_edit:"Modifica connessione",connection_edit_success:"Connessione aggiornata con successo",connection_delete_success:"Connessione eliminata con successo",search:"Cerca",devices_p1:"Elenco dei dispositivi compatibili",devices_p2:"Tapni utilizza una tecnologia compatibile con la maggior parte dei nuovi dispositivi iPhone e Android",devices_p3:"Alcuni telefoni Android potrebbero avere il NFC disattivato. Se il tuo Tapni non funziona su un dispositivo Android, cerca NFC nelle impostazioni e assicurati che sia acceso.",devices_p4:"con iOS 14, il widget NFC si trova nel centro di controllo",download_p1:"Scarica Tapni App",download_p2:"Disponibile per dispositivi Apple e Android",user_not_found:"Utente non trovato",user_not_found_p:"Non siamo riusciti a trovare l'utente nel nostro database🤷",taps:"I Tap",private_profile:"Profilo privato",private_profile_p:"è un profilo privato. <br> Il profilo è visibile solo utilizzando i tag Tapni",profile_bio_p:"Scrivi qualcosa su di te o sul tuo marchio",add_to_contacts:"Aggiungi ai contatti",drag_and_drop_links:"Trascina e rilascia i link nell'ordine desiderato",no_links:"Non ci sono link nel tuo profilo.",add_link:"Aggiungi un link",direct_link_p1:"I visitatori verranno automaticamente reindirizzati a:",profile_not_active:"Il tuo profilo non è attivo al momento <br> e solo tu puoi vederlo una volta effettuato il login.",profile_not_public:"Il tuo profilo al momento non è pubblico <br> e solo chi ti un tap, può vederlo.",activate_profile_now:"Attiva ora il tuo profilo",publish_profile_now:"Rendi pubblico il tuo profilo ora",link_add_p1:"Scegli un tipo di link",link_add_not_found:"Nessun link trovato 🤷",link_add_not_found_p2:"Se abbiamo dimenticato la tua social piattaforma preferita, inviaci un'e-mail (<b>support@tapni.com</b>) o inviaci un messaggio DM sui social media (<b>@tapni</b>)",link_add_not_found_p3:"Faremo del nostro meglio per supportare tutte le piattaforme 😉",featured:"In primo piano",social_media:"I Social media",contact:"Contatto",finance:"La Finanza",portfolio:"Il portfolio",music:"Musica",business:"Business",fun:"Divertimento",ecommerce:"E-commerce",more:"mostra di più",email_username:"Email/Nome utente",username:"Username",password:"Password",sign_in:"Registrazione",sign_in_with:"Registrati con",sign_in_with_new:"Accedi con un nuovo account",sign_up_with:"Iscriviti con",select_sign_method:"Seleziona un metodo di accesso",verify_account:"Verifica Account",terms_by_signing_in:"Effettuando l'accesso, accetti il nostro",terms_by_registering:"Registrandoti accetti il nostro",terms_by_submitting:"Inviando questo modulo, accettate i nostri Termini di servizio.",terms_of_service:"Termini di servizio",and:"e",refresh:"Ricaricare",privacy_policy:"Politica sulla riservatezza",create_account:"Crea un profilo",reset_password:"Resetta la password",reset_password_p1:"Se non sei riuscito a reimpostare la password,<br> non esitare a contattarci all'indirizzo",reset_password_p2:"Se non sei riuscito a resettare la password,<br> non esitare a contattarci all'indirizzo",create_new_account:"Crea un nuovo account",maintenance_p1:"Torniamo presto",maintenance_p2:"Nel frattempo esplora le collezioni Tapni",maintenance_p3:"Tapni è inattivo per una manutenzione programmata. <br> e dovrebbe tornare online tra pochi minuti.",offline_p1:"Nessuna connessione internet",offline_p2:"Controlla la tua connessione, quindi aggiorna la pagina",offline_p3_1:"Mentre si è offline,",offline_p3_2:"è possibile condividere la scheda di contatto utilizzando questo codice QR",products_p1:"Stupisci tutti quelli che incontri 😎 <br> Ottieni il tuo ora 👇",cards:"Biglietti da visita",stickers:"Adesivi",keychains:"Portachiavi",explore_collection:"Esplora collezione",register:"Registrati",register_success:"Hai quasi finito. Per favore, conferma la tua email.",register_success_modal:"Accesso riuscito con un altro account.",check_your_inbox:"Controlla il tuo DM",tapni_tags:"I Tapni tag",tapni_tags_p1:"Configura i tag collegati al tuo profilo",tapni_tags_p2:"Non ci sono tag collegati al tuo profilo. <br> Collegane uno ora!",verify_account_p1:"Se non hai ricevuto un codice, controlla la tua cartella spam di <br> o contattaci all'indirizzo",verify_account_success:"Account verificato con successo. Si prega di cambiare password ora.",verify_account_success2:"Account verificato con successo. Ora sei tutto pronto!",welcome:"Benvenuto",welcome_p1:"al futuro dei biglietti da visita",how_it_works:"Come funziona",already_registered:"Già registrato",error:"Errore",success:"Successo",copied:"Copiato negli appunti",connect_validate:"Deve essere fornito uno dei due campi di contatto",connect_validate_name:"Per favore inserisci il tuo nome",connect_validate_email:"Inserire un'e-mail valida",link_validate:"Dati di collegamento non validi.",link_text_contact_card:"Scheda di contatto",link_text_custom_link:"Link personalizzato",link_text_menu:"Menù",link_text_phone:"Telefono",save_to_apple_wallet:"Aggiungi a Apple Wallet",save_to_google_wallet:"Aggiungi a Google Wallet",card:"Carta",sticker:"Adesivo",keychain:"Portachiavi",band:"Banda",case:"Caso",standee:"Standee",decoded:"Decoded",wristbanditz:"Wristbanditz",update_p1:"Rilevata versione app obsoleta",update_p2:"Aggiorna",update_p3:"Aggiorna l'app alla versione più recente",company_domain:"Il dominio della tua azienda",search_company_domain:"Cerca il dominio della tua azienda",enter_company_email:"Inserisci l'indirizzo e-mail aziendale",company_not_found:"Azienda non trovata",ik_company_domain:"Conosco il dominio dell'azienda",idk_company_domain:"Non conosco il dominio dell'azienda",continue:"Continua",forbidden_rule:"Questa opzione è disabilitata, contatta l'amministratore della tua azienda.",companyName:"Nome della società",createMarkerPlaceholder:"Creare o selezionare un marcatore",clickToCreateMarker:"Fare clic qui per creare il marcatore",pleaseInviteUser:"Invitate l'utente a iscriversi a Tapni per avere i dati sincronizzati con voi.",connectionSynchronized:"I dati di connessione vengono sincronizzati automaticamente.",viewProfile:"Visualizza il profilo",createConnectionHeader:"Aggiungi nuova connessione",createConnectionButton:"Aggiungi",createConnectionSuccess:"La connessione è stata creata.",allow_company_management:"Consentire la gestione dell'azienda",company_join_request:"chiede di gestire il suo profilo e di associarlo al suo account Enterprise.",account_ownership_transfer:"Se accettate la richiesta, la proprietà del vostro account sarà trasferita all'azienda. L'azienda potrà modificare il vostro profilo, modificare e aggiungere link, vedere le vostre connessioni, modificare la vostra password, cancellare il vostro account e altro ancora. Prima di accettare la richiesta, verificare con l'azienda.",request_expired:"La richiesta è scaduta, chiedete alla vostra azienda di inviare una nuova richiesta.",request_expiration_desc:"Per maggiore sicurezza, la richiesta funzionerà solo per 14 giorni dall'invio.",invitation_link_not_valid:"Il link di invito non è valido!",invitation_link_not_valid2:"Fare nuovamente clic sul pulsante dell'e-mail di invito o copiare il link dell'invito.",accept_request:"Accettare la richiesta",close:"Chiudere",request_accepted:"La richiesta è stata accettata con successo",companyEmail:"Email aziendale",companyPhone:"Telefono dell'azienda",addBusinessInformations:"Aggiungi informazioni sulle attività commerciali",resetFilter:"Reset",selectMarkers:"Selezionare i marcatori",filterConnectionsHeader:"Connessioni del filtro",selectConnectionType:"Selezionare il tipo di connessione",all:"Tutti",direct:"Diretto",form:"Forma",manually:"Manualmente",scan:"Scansione",sortOptions:"Opzioni di ordinamento",date:"Data di creazione",fullName:"Nome completo",descending:"In discesa",ascending:"Ascendente",selectDateRange:"Selezionare l'intervallo di date",follow_up_reminder:"Promemoria di follow-up",now:"Ora",one_hour:"1 Ora",one_day:"1 Gioro",three_days:"3 Giorni",one_week:"1 Settimana",two_weeks:"2 Settimane",one_month:"1 Mese",custom:"Scegliere l'ora",set_reminder:"Imposta promemoria",select_date_time:"Selezionare data e ora",enter_reminder_text:"Inserire il testo del promemoria",reminder_created:"Promemoria creato con successo",connectionNameLabel:"Inserire il nome della connessione",connectionEmailLabel:"Inserire l'indirizzo e-mail privato",privatePhoneLabel:"Inserire il numero di telefono privato",companyNameLabel:"Inserire il nome della società",businessEmail:"Indirizzo e-mail aziendale",businessEmailLabel:"Inserire l'indirizzo e-mail aziendale",businessPhone:"Numero di telefono aziendale",businessPhoneLabel:"Inserire il numero di telefono dell'azienda",noteLabel:"Inserire la nota",markersLabel:"Aggiungere i marcatori di connessione",showScan:"Mostra scansione",hideScan:"Nascondi scansione",create_connection:"Aggiungi connessioni",create_manually:"Aggiungi manualmente",create_using_scanner:"Aggiungi utilizzando lo scanner per schede",companyTitle:"Titolo dell'azienda",companyTitleLabel:"Inserire il titolo dell'azienda",allConnectionsLabel:"Tutti i tipi di connessione",directConnectionsLabel:"Connessione diretta in-app con gli utenti Tapni",formConnectionsLabel:"Connessioni compilate sul modulo di connessione",manualConnectionsLabel:"Connessioni create manualmente",scanConnectionsLabel:"Lo scanner per schede ha creato connessioni",analyticsHeader:"Analisi",analyticsProfileViews:"Visualizzazioni del profilo",analyticsLinkClicks:"Link cliccati",analyticsClickTroughRatio:"Rapporto click-trough",analyticsTotalConnections:"Connessioni totali",analyticsTopLinks:"I link più popolari",analyticsProfileVisits:"Visite al profilo",analyticsLinkVisits:"Visite di collegamento",analyticsNewConnections:"Nuove connessioni",analyticsTopCountries:"Paesi Top",analyticsTopReferers:"I migliori referenti",please_wait:"Attendere prego...",click_here:"clicca qui",if_redirect_not_directly:"Se il reindirizzamento non avviene automaticamente",you_will_be_redirected:"Sarai reindirizzato all'applicazione Tapni.",use_tapni_on_the_web:"Usa Tapni sul Web",login_by_scanning_qr_code:"Accedi scansionando il QR Code",open_tapni_app_on_your_phone:"1. Apri l'App Tapni sul tuo telefono",go_to_settings_link_a_device:"2. Vai su Impostazioni > Collega un dispositivo",point_your_phone_at_this_qr_code:"3. Punta il tuo telefono su questo QR Code",choose_other_login_methods:"Scegli altri metodi di accesso",no_sso_logins:"La tua azienda non utilizza l'accesso SSO, contatta il tuo amministratore",mfa:"Autenticazione Multi-Fattore",otp_title:"Inserisci il codice MFA per continuare",otp_code:"Codice MFA",otp_subtitle:"Inserisci il codice dall’app di autenticazione",otp_p1:"Se hai problemi con MFA, <br> contattaci a",change_language:"Cambia lingua",welcome_account:"Benvenuto nel Centro Account",security:"Sicurezza",security_p:"Gestisci opzioni di autenticazione & stato account",general:"Generale",general_p:"Gestisci dati personali & altre preferenze",billing:"Fatturazione",billing_p:"Gestisci abbonamenti & profili di pagamento",apps:"App",apps_p:"Visualizza le tue app attive & scopri altro",apps_my:"Le mie App",mfa_auth:"Autenticazione a 2 Fattori",mfa_auth_enabled:"Il tuo account è protetto da MFA.",mfa_auth_p:"Proteggi l’account da accessi non autorizzati attivando MFA",mfa_auth_qr:"Scansiona il QR o inserisci la chiave segreta nell’app di autenticazione.",change_password:"Cambia Password",active_account:"Account attivo",active_account_p:"Se disattivato, l’account resta inattivo finché non lo riattivi.",delete_account:"Elimina Account",delete_account_p:"Elimina Account",permanent_delete:"Eliminazione definitiva",permanent_delete_p:"Se elimini l’account, tutti i dati saranno persi. Azione irreversibile. In dubbio, disattivalo temporaneamente.",personal_details:"Dettagli Personali",app_language_p:"Traduci l’app nella tua lingua preferita",app_region:"Regione",app_region_p:"Seleziona la tua regione per fatturazione e supporto personalizzati"}},vr={state:{english:"Engleski",spanish:"Španski",german:"Nemački",korean:"Korejski",italian:"Italijanski",french:"Francuski",serbian:"Srpski",turkish:"Turski",chinese:"Kineski",japanese:"Japanski",portuguese:"Portugalski",app_language:"Jezik",profile_preview:"Pogledaj profil",edit_profile:"Uredi profil",login:"Prijavi se",referral_reach:"Napiši nam nešto više o sebi",referral_apply_placeholder:"Na koji način planiraš da promovišeš Tapni?",referral_apply_note:`Dodaj što više linkova na svom profilu, <br> tako da možemo bolje da te upoznamo.
|
|
70
|
+
Condividili sul tuo sito Web e sui social media e guadagna mentre noi offriamo un'esperienza di connessione eccezionale.`,referral_p8:"Nota di pagamenti",referral_p9:"Paypal (Worldwide) e trasferimenti bancari (EU) <br> l'importo minimo di pagamento è di 25€.",referral_p10:"Richiedi pagamento",referral_p11:"Pagamento richiesto",your_connections:"Le tue connessioni",connections_p1:"Mettiti in contatto con le persone che hai incontrato",connections_p2:"<br><br>Nessuna connessione finora. <br> Facciamo i tap!💥",connections_p3:"Nessuna connessione trovata",connection_success:"Inviata con successo una richiesta di connessione.",exchange_success:"Scambio di contatti riuscito.",create_free_account:"Crea un account Tapni gratuito e tieni aggiornati i tuoi contatti!",connection_edit:"Modifica connessione",connection_edit_success:"Connessione aggiornata con successo",connection_delete_success:"Connessione eliminata con successo",search:"Cerca",devices_p1:"Elenco dei dispositivi compatibili",devices_p2:"Tapni utilizza una tecnologia compatibile con la maggior parte dei nuovi dispositivi iPhone e Android",devices_p3:"Alcuni telefoni Android potrebbero avere il NFC disattivato. Se il tuo Tapni non funziona su un dispositivo Android, cerca NFC nelle impostazioni e assicurati che sia acceso.",devices_p4:"con iOS 14, il widget NFC si trova nel centro di controllo",download_p1:"Scarica Tapni App",download_p2:"Disponibile per dispositivi Apple e Android",user_not_found:"Utente non trovato",user_not_found_p:"Non siamo riusciti a trovare l'utente nel nostro database🤷",taps:"I Tap",private_profile:"Profilo privato",private_profile_p:"è un profilo privato. <br> Il profilo è visibile solo utilizzando i tag Tapni",profile_bio_p:"Scrivi qualcosa su di te o sul tuo marchio",add_to_contacts:"Aggiungi ai contatti",drag_and_drop_links:"Trascina e rilascia i link nell'ordine desiderato",no_links:"Non ci sono link nel tuo profilo.",add_link:"Aggiungi un link",direct_link_p1:"I visitatori verranno automaticamente reindirizzati a:",profile_not_active:"Il tuo profilo non è attivo al momento <br> e solo tu puoi vederlo una volta effettuato il login.",profile_not_public:"Il tuo profilo al momento non è pubblico <br> e solo chi ti un tap, può vederlo.",activate_profile_now:"Attiva ora il tuo profilo",publish_profile_now:"Rendi pubblico il tuo profilo ora",link_add_p1:"Scegli un tipo di link",link_add_not_found:"Nessun link trovato 🤷",link_add_not_found_p2:"Se abbiamo dimenticato la tua social piattaforma preferita, inviaci un'e-mail (<b>support@tapni.com</b>) o inviaci un messaggio DM sui social media (<b>@tapni</b>)",link_add_not_found_p3:"Faremo del nostro meglio per supportare tutte le piattaforme 😉",featured:"In primo piano",social_media:"I Social media",contact:"Contatto",finance:"La Finanza",portfolio:"Il portfolio",music:"Musica",business:"Business",fun:"Divertimento",ecommerce:"E-commerce",more:"mostra di più",email_username:"Email/Nome utente",username:"Username",password:"Password",sign_in:"Registrazione",sign_in_with:"Registrati con",sign_in_with_new:"Accedi con un nuovo account",sign_up_with:"Iscriviti con",select_sign_method:"Seleziona un metodo di accesso",verify_account:"Verifica Account",terms_by_signing_in:"Effettuando l'accesso, accetti il nostro",terms_by_registering:"Registrandoti accetti il nostro",terms_by_submitting:"Inviando questo modulo, accettate i nostri Termini di servizio.",terms_of_service:"Termini di servizio",and:"e",refresh:"Ricaricare",privacy_policy:"Politica sulla riservatezza",create_account:"Crea un profilo",reset_password:"Resetta la password",reset_password_p1:"Se non sei riuscito a reimpostare la password,<br> non esitare a contattarci all'indirizzo",reset_password_p2:"Se non sei riuscito a resettare la password,<br> non esitare a contattarci all'indirizzo",create_new_account:"Crea un nuovo account",maintenance_p1:"Torniamo presto",maintenance_p2:"Nel frattempo esplora le collezioni Tapni",maintenance_p3:"Tapni è inattivo per una manutenzione programmata. <br> e dovrebbe tornare online tra pochi minuti.",offline_p1:"Nessuna connessione internet",offline_p2:"Controlla la tua connessione, quindi aggiorna la pagina",offline_p3_1:"Mentre si è offline,",offline_p3_2:"è possibile condividere la scheda di contatto utilizzando questo codice QR",products_p1:"Stupisci tutti quelli che incontri 😎 <br> Ottieni il tuo ora 👇",cards:"Biglietti da visita",stickers:"Adesivi",keychains:"Portachiavi",explore_collection:"Esplora collezione",register:"Registrati",register_success:"Hai quasi finito. Per favore, conferma la tua email.",register_success_modal:"Accesso riuscito con un altro account.",check_your_inbox:"Controlla il tuo DM",tapni_tags:"I Tapni tag",tapni_tags_p1:"Configura i tag collegati al tuo profilo",tapni_tags_p2:"Non ci sono tag collegati al tuo profilo. <br> Collegane uno ora!",verify_account_p1:"Se non hai ricevuto un codice, controlla la tua cartella spam di <br> o contattaci all'indirizzo",verify_account_success:"Account verificato con successo. Si prega di cambiare password ora.",verify_account_success2:"Account verificato con successo. Ora sei tutto pronto!",welcome:"Benvenuto",welcome_p1:"al futuro dei biglietti da visita",how_it_works:"Come funziona",already_registered:"Già registrato",error:"Errore",success:"Successo",copied:"Copiato negli appunti",connect_validate:"Deve essere fornito uno dei due campi di contatto",connect_validate_name:"Per favore inserisci il tuo nome",connect_validate_email:"Inserire un'e-mail valida",link_validate:"Dati di collegamento non validi.",link_text_contact_card:"Scheda di contatto",link_text_custom_link:"Link personalizzato",link_text_menu:"Menù",link_text_phone:"Telefono",save_to_apple_wallet:"Aggiungi a Apple Wallet",save_to_google_wallet:"Aggiungi a Google Wallet",card:"Carta",sticker:"Adesivo",keychain:"Portachiavi",band:"Banda",case:"Caso",standee:"Standee",decoded:"Decoded",wristbanditz:"Wristbanditz",update_p1:"Rilevata versione app obsoleta",update_p2:"Aggiorna",update_p3:"Aggiorna l'app alla versione più recente",company_domain:"Il dominio della tua azienda",search_company_domain:"Cerca il dominio della tua azienda",enter_company_email:"Inserisci l'indirizzo e-mail aziendale",company_not_found:"Azienda non trovata",ik_company_domain:"Conosco il dominio dell'azienda",idk_company_domain:"Non conosco il dominio dell'azienda",continue:"Continua",forbidden_rule:"Questa opzione è disabilitata, contatta l'amministratore della tua azienda.",companyName:"Nome della società",createMarkerPlaceholder:"Creare o selezionare un marcatore",clickToCreateMarker:"Fare clic qui per creare il marcatore",pleaseInviteUser:"Invitate l'utente a iscriversi a Tapni per avere i dati sincronizzati con voi.",connectionSynchronized:"I dati di connessione vengono sincronizzati automaticamente.",viewProfile:"Visualizza il profilo",createConnectionHeader:"Aggiungi nuova connessione",createConnectionButton:"Aggiungi",createConnectionSuccess:"La connessione è stata creata.",allow_company_management:"Consentire la gestione dell'azienda",company_join_request:"chiede di gestire il suo profilo e di associarlo al suo account Enterprise.",account_ownership_transfer:"Se accettate la richiesta, la proprietà del vostro account sarà trasferita all'azienda. L'azienda potrà modificare il vostro profilo, modificare e aggiungere link, vedere le vostre connessioni, modificare la vostra password, cancellare il vostro account e altro ancora. Prima di accettare la richiesta, verificare con l'azienda.",request_expired:"La richiesta è scaduta, chiedete alla vostra azienda di inviare una nuova richiesta.",request_expiration_desc:"Per maggiore sicurezza, la richiesta funzionerà solo per 14 giorni dall'invio.",invitation_link_not_valid:"Il link di invito non è valido!",invitation_link_not_valid2:"Fare nuovamente clic sul pulsante dell'e-mail di invito o copiare il link dell'invito.",accept_request:"Accettare la richiesta",close:"Chiudere",request_accepted:"La richiesta è stata accettata con successo",companyEmail:"Email aziendale",companyPhone:"Telefono dell'azienda",addBusinessInformations:"Aggiungi informazioni sulle attività commerciali",resetFilter:"Reset",selectMarkers:"Selezionare i marcatori",filterConnectionsHeader:"Connessioni del filtro",selectConnectionType:"Selezionare il tipo di connessione",all:"Tutti",direct:"Diretto",form:"Forma",manually:"Manualmente",scan:"Scansione",sortOptions:"Opzioni di ordinamento",date:"Data di creazione",fullName:"Nome completo",descending:"In discesa",ascending:"Ascendente",selectDateRange:"Selezionare l'intervallo di date",follow_up_reminder:"Promemoria di follow-up",now:"Ora",one_hour:"1 Ora",one_day:"1 Gioro",three_days:"3 Giorni",one_week:"1 Settimana",two_weeks:"2 Settimane",one_month:"1 Mese",custom:"Scegliere l'ora",set_reminder:"Imposta promemoria",select_date_time:"Selezionare data e ora",enter_reminder_text:"Inserire il testo del promemoria",reminder_created:"Promemoria creato con successo",connectionNameLabel:"Inserire il nome della connessione",connectionEmailLabel:"Inserire l'indirizzo e-mail privato",privatePhoneLabel:"Inserire il numero di telefono privato",companyNameLabel:"Inserire il nome della società",businessEmail:"Indirizzo e-mail aziendale",businessEmailLabel:"Inserire l'indirizzo e-mail aziendale",businessPhone:"Numero di telefono aziendale",businessPhoneLabel:"Inserire il numero di telefono dell'azienda",noteLabel:"Inserire la nota",markersLabel:"Aggiungere i marcatori di connessione",showScan:"Mostra scansione",hideScan:"Nascondi scansione",create_connection:"Aggiungi connessioni",create_manually:"Aggiungi manualmente",create_using_scanner:"Aggiungi utilizzando lo scanner per schede",companyTitle:"Titolo dell'azienda",companyTitleLabel:"Inserire il titolo dell'azienda",allConnectionsLabel:"Tutti i tipi di connessione",directConnectionsLabel:"Connessione diretta in-app con gli utenti Tapni",formConnectionsLabel:"Connessioni compilate sul modulo di connessione",manualConnectionsLabel:"Connessioni create manualmente",scanConnectionsLabel:"Lo scanner per schede ha creato connessioni",analyticsHeader:"Analisi",analyticsProfileViews:"Visualizzazioni del profilo",analyticsLinkClicks:"Link cliccati",analyticsClickTroughRatio:"Rapporto click-trough",analyticsTotalConnections:"Connessioni totali",analyticsTopLinks:"I link più popolari",analyticsProfileVisits:"Visite al profilo",analyticsLinkVisits:"Visite di collegamento",analyticsNewConnections:"Nuove connessioni",analyticsTopCountries:"Paesi Top",analyticsTopReferers:"I migliori referenti",please_wait:"Attendere prego...",click_here:"clicca qui",if_redirect_not_directly:"Se il reindirizzamento non avviene automaticamente",you_will_be_redirected:"Sarai reindirizzato all'applicazione Tapni.",use_tapni_on_the_web:"Usa Tapni sul Web",login_by_scanning_qr_code:"Accedi scansionando il QR Code",open_tapni_app_on_your_phone:"1. Apri l'App Tapni sul tuo telefono",go_to_settings_link_a_device:"2. Vai su Impostazioni > Collega un dispositivo",point_your_phone_at_this_qr_code:"3. Punta il tuo telefono su questo QR Code",choose_other_login_methods:"Scegli altri metodi di accesso",no_sso_logins:"La tua azienda non utilizza l'accesso SSO, contatta il tuo amministratore",mfa:"Autenticazione Multi-Fattore",otp_title:"Inserisci il codice MFA per continuare",otp_code:"Codice MFA",otp_subtitle:"Inserisci il codice dall’app di autenticazione",otp_p1:"Se hai problemi con MFA, <br> contattaci a",change_language:"Cambia lingua",welcome_account:"Benvenuto nel Centro Account",security:"Sicurezza",security_p:"Gestisci opzioni di autenticazione & stato account",general:"Generale",general_p:"Gestisci dati personali & altre preferenze",billing:"Fatturazione",billing_p:"Gestisci abbonamenti & profili di pagamento",apps:"App",apps_p:"Visualizza le tue app attive & scopri altro",apps_my:"Le mie App",mfa_auth:"Autenticazione a 2 Fattori",mfa_auth_enabled:"Il tuo account è protetto da MFA.",mfa_auth_p:"Proteggi l’account da accessi non autorizzati attivando MFA",mfa_auth_qr:"Scansiona il QR o inserisci la chiave segreta nell’app di autenticazione.",change_password:"Cambia Password",active_account:"Account attivo",active_account_p:"Se disattivato, l’account resta inattivo finché non lo riattivi.",delete_account:"Elimina Account",delete_account_p:"Elimina Account",permanent_delete:"Eliminazione definitiva",permanent_delete_p:"Se elimini l’account, tutti i dati saranno persi. Azione irreversibile. In dubbio, disattivalo temporaneamente.",personal_details:"Dettagli Personali",app_language_p:"Traduci l’app nella tua lingua preferita",app_region:"Regione",app_region_p:"Seleziona la tua regione per fatturazione e supporto personalizzati"}},yr={state:{english:"Engleski",spanish:"Španski",german:"Nemački",korean:"Korejski",italian:"Italijanski",french:"Francuski",serbian:"Srpski",turkish:"Turski",chinese:"Kineski",japanese:"Japanski",portuguese:"Portugalski",app_language:"Jezik",profile_preview:"Pogledaj profil",edit_profile:"Uredi profil",login:"Prijavi se",referral_reach:"Napiši nam nešto više o sebi",referral_apply_placeholder:"Na koji način planiraš da promovišeš Tapni?",referral_apply_note:`Dodaj što više linkova na svom profilu, <br> tako da možemo bolje da te upoznamo.
|
|
71
71
|
<br><br>Budi ekskluzivan.
|
|
72
72
|
<br>Ne prihvataju se svi.😉`,referral_apply_now:"Prijavi se odmah",referral_apply_thanks:"Hvala na prijavljivanju. Uskoro ćemo pregledati tvoju prijavu!",connect:"Poveži se",with:"sa",exchange_contact:"Razmeni kontakt",add_details:"Dodaj još",show_details:"Prikaži više",download_contact:"Preuzmi kontakt",stay_in_touch:"Ostanite u kontaktu sa",no_thanks:"Ne, hvala",connect_join:"Pridruži se",connect_with:"Poveži se sa",connect_required_fields:"Potrebno je popuniti jedno od dva polja",name:"Ime",first_name:"Ime",last_name:"Prezime",email:"Email adresa",phone:"Broj telefona",phone_p:"Telefon",company:"Kompanija",address:"Adresa",website:"Website",open:"Otvori",delete:"Izbriši",confirm:"Potvrdi",cancel:"Otkaži",save:"Sačuvaj",code:"Kod",note:"Beleška",note_p:"Dodaj belešku",contact_card_icon:"Podesi tekst ispod ikone za kontakt karticu",contact_card_name:"Unesite ime i prezime",contact_card_name_p:"Ime kontakt kartice",contact_card_email:"Unesite privatnu email adresu",contact_card_email_p:"Email adresa kontakt kartice",contact_card_phone:"Unesite privatni broj telefona",contact_card_phone_p:"Telefon kontakt kartice",contact_card_website:"Unesite privatnu internet stranicu",contact_card_website_p:"Internet stranica kontakt kartice",contact_card_company_name:"Unesite ime kompanije",contact_card_company_name_p:"Ime kompanije",contact_card_job_title:"Pozicija",contact_card_job_title_p:"Unesite naziv pozicije",contact_card_company_website:"Website kompanije",contact_card_company_website_p:"Unesite website kompanije",contact_card_bio:"Unesite opis kontakt kartice",contact_card_bio_p:"Opis kontakt kartice",contact_card_home_address:"Unesite adresu kontakt kartice",contact_card_home_address_p:"Adresa kontakt kartice",contact_card_work_address:"Unesite poslovnu adresu",contact_card_work_address_p:"Poslovna adresa",contact_card_social:"Unesi linkove društvenih mreža na svoj Tapni profil <br>kako bi ih dodao/la u kontakt karticu",contact_card_social_p:"Unesite linkove društvenih mreža u kontakt karticu",link_text_p:"Tekst Linka",link_icon:"Podesite tekst ispod ikonice za link",direct_pick:"Izaberite direktan link",direct_p:"Kada dodirnete nečiji telefon, <br> otvoriće se ovaj link umesto Vašeg profila.",password_change:"Promeni lozinku",password_repeat:"Ponovo unesi lozinku",password_reset_t:"Resetovanje lozinke",password_current:"Unesi svoju trenutnu lozinku",password_current_p:"Trenutna lozinka",password_new:"Unesi svoju novu lozinku",password_new_p:"Nova lozinka",password_new_repeat:"Unesi svoju novu lozinku ponovo",password_new_repeat_p:"Ponovo unesi svoju novu lozinku",password_update:"Ažuriranje lozinke",password_reset:"Ako ne možete da se setite svoje lozinke,<br> resetujte je ",delete_account_permanently:"Da li ste sigurni da želite da trajno obrišete Vaš Tapni nalog?",by_clicking_here:"klikom ovde",password_8_chars:"Lozinka mora imati najmanje 8 karaktera",password_least_one_lowercase:"Lozinka mora sadržati najmanje jedno malo slovo",password_least_one_uppercase:"Lozinka mora sadržati najmanje jedno veliko slovo",password_least_one_number:"Lozinka mora sadržati najmanje jedan broj",password_not_match:"Lozinke se ne podudaraju",password_change_success:"Uspešno promenjena lozinka",or:"ili",profile:"Profil",account_settings:"Podešavanje naloga",profile_public:"Javni profil",profile_public_p:"Tvoj profil je javno dostupan preko linka:",profile_active:"Aktivni profil",profile_active_p:"Ukoliko deaktiviraš svoj profil, niko neće imati pristup njemu i svi povezani linkovi neće više raditi",profile_change_password:"Promeni lozinku",profile_change_username:"Promeni korisničko ime",profile_change_language:"Promeni jezik",profile_delete_account:"Obriši nalog",profile_confirm_delete_account:"Obriši nalog",profile_cancel_delete_account:"Odustani",profile_delete_account_success:"Nalog je uspešno obrisan",profile_remove_p:"Ako želiš da ukloniš svoj nalog,<br> piši nam na:",profile_contact_support:"Ukoliko imaš problema sa podešavanjima<br> piši nam na: ",profile_email_subject:"Tapni App Podrška",profile_remove_subject:"Zahtev za uklanjanje naloga",profile_update_success:"Profil je uspešno ažuriran",profile_complete:"Popuni svoj profil",completed:"Dovršeno",uncompleted:"Nedovršeno",contact_us:"Kontaktiraj nas",contact_us_verify:"kako biste verifikovali Vašu email adresu.",verify_email:"Verifikuj email adresu",verify_email_subject:"Verifikacija Email adrese",verify_email_inbox:"Proveri svoj inbox za:",add_first_link:"Dodaj svoj prvi link",add_first_link_p:"Tapni ovde kako bi dodao/la svoje društvene mreže <br> ili kontakt informacije na svoj Tapni profil.",add_picture:"Dodaj svoju sliku profila",add_picture_p:"Tapni ovde kako bi dodao svoju sliku profila",add_tag:"Aktiviraj svoj Tapni",add_tag_p:"Tapni ovde kako bi aktivirao svoju Tapni NFC oznaku",completing_profile:"Imaš problema prilikom popunjavanja svog profila?<br> Slobodno nam piši na:",completing_profile_subject:"Popuni profil",share_profile:"Podeli profil",share_profile_p:"Ostali mogu da skeniraju ovaj QR kod <br> kako bi videli tvoj profil",share_profile_change_username:"Ukoliko želiš da izmeniš svoj link, <br> <u>klikni ovde</u> za promenu korisničkog imena.",share_profile_qr:"Podeli profil",share_contactcard_qr:"Kontakt kartica",scan_qr_code:"Skeniraj QR kod",enter_activation_code:"Unesite aktivacioni kod",activate_tag:"Aktiviraj tag",order_tapni:"Ukoliko još uvek nisi naručio/la Tapni proizvod,<br> možeš izabrati svoj ovde ",activation_success:"Tag je uspesno povezan. <br> Sad je sve spremno!🥳",activation_success_message:"Tag je uspesno povezan. Sad je sve spremno!🥳",activation_error:"Ovaj tag nije važeći. <br> Pokušaj ponovo.",activation_error_message:"Ovo nije važeći tag. <br> Pokušaj ponovo.",activation_progress:"Registracija u procesu...",activation_invalid_code:"Aktivacioni kod nije važeći.",activation_qr_failed:"Skeniranje QR koda nije uspelo.",activation_qr_area:"Postaviti QR kod unutar oblasti za skeniranje",activation_code:"Aktivacioni kod",invalid_code:"Nevažeći kod",total_taps:"Ukupan broj deljenja",active:"Aktivan",tag_active_p:"Ako je deaktiviran, Vaš profil neće biti otvoren <br> kada tapnete nečiji telefon.",tag_delete_confirm:"Sačuvajte aktivacioni kod pre nego što prekinete vezu sa tagom,<br> inače se ne može ponovo aktivirati",upload_profile_picture:"Dodaj sliku profila",upload_cover_picture:"Dodaj sliku pozadine",upload_link_picture:"Dodaj sliku linka",select_from_device:"Izaberi sa uređaja",select_from_mobile:"Izaberite sliku sa svog mobilnog uređaja",select_from_computer:"ili je prevucite i pustite ukoliko koristite računar",crop:"Iseci",crop_upload:"Iseci i dodaj",crop_image:"Isecite sliku",drag_and_drop:"Prevuci i pusti datoteke ovde",upload_success:"Datoteke uspešno otpremljene",browser_not_supported:"Tvoj pretraživač ne podržava",change_username:"Promeni korisničko ime",change_username_success:"Uspešno promenjeno korisničko ime",update_username:"Ažuriraj korisničko ime",new_username:"Unesi svoje novo korisničko ime",username_check:"Molimo Vas da navedete odgovarajuće korisničko ime",username_is_free:"Korisničko ime je dostupno",anonymous:"Anonimno",connected:"Povezano",exchanged:"Razmenjeno",accept:"Prihvati",view:"Pogledaj",join:"Pridruži se",add_account:"Dodaj nalog",complete_profile:"Dovršite profil",my_profile:"Moj profil",my_qr:"Moj QR kod",my_connections:"Moja povezivanja",contacts:"Kontakti",my_tags:"Moji tagovi",buy_tapni:"Kupi Tapni",referral_program:"Ambasador program",device_compatibility:"Kompatibilnost uređaja",help:"Pomoć",settings:"Podešavanja",logout:"Odjavi se",version:"Verzija",configure:"Konfiguriši",unexpected_err:"Došlo je do neočekivane greške, kontaktirajte nas na support@tapni.com",success_login:"Uspešno ste prijavljeni sa drugim nalogom.",password_reset_success:"Kod za resetovanje lozinke je poslat na vašu email adresu.",password_reseted_success:"Uspešno promenjena lozinka. Možete se prijaviti sada.",success_remove_link:"Link je uspešno uklonjen",success_remove_picture:"Slika je uspešno uklonjena",profile_active_message:"Tvoj profil je sada aktivan",profile_inactive_message:"Tvoj profil je sada onemogućen",profile_public_message:"Tvoj profil je sada javan",profile_private_message:"Tvoj profil je sada privatan",redirect_enabled:"Link za automatsko preusmeravanje je omogućen",redirect_disabled:"Link za automatsko preusmeravanje je onemogućen",tag_active:"Tag je sada aktivan. Preostaje samo da tapneš!",tag_inactive:"Tag je sada onemogućen. Tvoj posetioci će biti preusmereni na tapni.co",tag_removed:"Tag je uklonjen. Pišite nam na support@tapni.com",connection_accepted:"Zahtev za povezivanje je prihvaćen",connection_added:"Nova konekcija uspešno dodata",connection_exist:"Konekcija već postoji",not_found:"Nije pronađen",not_found_p:"Izgleda da ste se izgubili",go_back:"Vratite se nazad",referral_p1:"Zaradite 20% provizije<br> na prodaju ostvarenu preko affiliate marketinga. 💰",referral_p2:"Dajte drugima 20% popusta<br> pomoću Vašeg promo koda🎁",referral_p3:"To je vin-vin situacija 🤝",referral_p4:"Ako želite da promenite svoje preporuke,<br> ili ako imate pitanja,<br> pišite nam na",referral_p5:"Počnite da zarađujete sada!",referral_p66:"Podelite svoj personalni affiliate link za prodaju i zaradite!",referral_p6:`Ako ste bloger, influencer ili entuzijasta društvenih medija, savršeno se uklapate za naš program ambasadora.
|
|
73
73
|
Promovišite naš brend i zaradite 20% provizije na kupovine obavljene sa vašim kodom ili ličnim linkom za prodaju Tapni proizvoda.`,referral_p7:`Nakon registracije za program Tapni Ambasador, dobićete svoj link za prodaju, preporuke i kod za popust.
|
|
74
74
|
Podelite ga na svojoj veb stranici i društvenim medijima i zaradite dok mi pružamo odlično iskustvo povezivanja.`,referral_p8:"Napomena o isplati",referral_p9:"Paypal (širom sveta) i bankovni transferi (EU) <br> Minimalni iznos isplate je 25€.",referral_p10:"Zahtevaj isplatu",referral_p11:"Isplata zahtevana",your_connections:"Tvoja povezivanja",connections_p1:"Stupite u kontakt sa ljudima koje ste upoznali",connections_p2:"<br><br>Bez konekcija za sada <br> Započni deljenje!💥",connections_p3:"Nije pronađena nijedna konekcija",connection_success:"Uspešno je poslat zahtev za povezivanje",exchange_success:"Uspešno razmenjeni kontakti.",create_free_account:"Napravite besplatan Tapni nalog i održavajte svoje kontakte ažurnim!",connection_edit:"Izmeni konekciju",connection_edit_success:"Uspešno izmenjena konekcija",connection_delete_success:"Uspešno obrisana konekcija",search:"Pretraga",devices_p1:"Lista kompatibilnih uređaja",devices_p2:"Tapni koristi tehnologiju koja je kompatibilna sa većinom novijih iPhone i Android uređaja.",devices_p3:"Neki Android telefoni možda imaju isključen NFC. Ako vaš Tapni ne radi na Android uređaju, potražite NFC u podešavanjima i proverite da li je uključen.",devices_p4:"sa iOS 14 NFC vidžet se nalazi u kontrolnom centru",download_p1:"Preuzmi Tapni aplikaciju",download_p2:"Dostupno za Apple i Android uređaje",user_not_found:`Korisnik nije pronađen
|
|
75
|
-
`,user_not_found_p:"Nismo mogli da pronađemo korisnika u našoj bazi podataka🤷",taps:"deljenja",private_profile:"Privatan profil",private_profile_p:"je privatan profil. <br> Profil je vidljiv samo pomoću Tapni tagova",profile_bio_p:"Napišite nešto o sebi ili vašem brendu",add_to_contacts:"Dodaj u kontakte",drag_and_drop_links:"Prevucite i nalepite linkove po željenom redosledu",no_links:"Nema linkova na vašem profilu.",add_link:"Dodaj link",direct_link_p1:"Posetioci će automatski biti preusmereni na:",profile_not_active:"Vaš profil trenutno nije aktivan <br> i samo ga Vi možete videti kada ste prijavljeni.",profile_not_public:"Vaš profil trenutno nije javan <br> i mogu ga videti samo oni koji prislone uređaj uz Vaš Tapni.",activate_profile_now:"Aktivirajte svoj profil sada",publish_profile_now:"Učinite svoj profil sada javnim",link_add_p1:"Izaberite tip linka",link_add_not_found:"Nisu pronađeni linkovi 🤷",link_add_not_found_p2:"Ako smo propustili vašu omiljenu platformu, javite nam se i pošaljite nam email (<b>support@tapni.com</b>) ili nam pošaljite DM na društvenim mrežama (<b>@tapni</b>)",link_add_not_found_p3:"Daćemo sve od sebe da podržimo sve platforme 😉",featured:"Istaknuto",social_media:"Društvene mreže",contact:"Kontakt",finance:"Finansije",portfolio:"Portfolio",music:"Muzika",business:"Biznis",fun:"Zabava",ecommerce:"Ecommerce",more:"Još",email_username:"Email / Korisničko ime",username:"Korisničko ime",password:"Lozinka",sign_in:"Prijavi se",sign_in_with:"Prijavi se preko:",sign_in_with_new:"Prijavite se sa novim nalogom",sign_up_with:"Registruj se preko:",select_sign_method:"Izaberite metod prijave",verify_account:"Verifikuj nalog",terms_by_signing_in:"Prijavljivanjem prihvatate naše",terms_by_registering:"Registracijom prihvatate naše",terms_by_submitting:"Podnošenjem ovog obrasca slažete se sa našim uslovima koriscenja",terms_of_service:"Uslovima korišćenja",and:"i",refresh:"Osveži",privacy_policy:"Pravilima o privatnosti",create_account:"Kreiraj nalog",reset_password:"Resetuj šifru",reset_password_p1:"Ako niste uspeli da resetujete lozinku,<br> slobodno nas kontaktirajte na",reset_password_p2:"Ako niste uspeli da resetujete lozinku,<br> slobodno nas kontaktirajte na",create_new_account:"Napravite novi nalog",maintenance_p1:"Vraćamo se uskoro",maintenance_p2:"u međuvremenu pregledajte Tapni proizvode",maintenance_p3:"Tapni ne radi zbog planiranog održavanja <br> i očekuje se da će ponovo biti na mreži za nekoliko minuta.",offline_p1:"Nema internet veze",offline_p2:"Proverite svoju internet konekciju, a zatim osvežite stranicu",offline_p3_1:"Dok ste van mreže,",offline_p3_2:"možete deliti svoju kontakt karticu pomoću ovog QR koda",products_p1:"Impresionirajte sve koje sretnete 😎 <br> Nabavite svoj sada 👇",cards:"Kartice",stickers:"Stikeri",keychains:"Privesci za ključeve",explore_collection:"Istražite kolekciju",register:"Registruj se",register_success:"Skoro smo gotovi. Molimo Vas da potvrdite email.",register_success_modal:"Uspešno ste prijavljeni sa drugim nalogom.",check_your_inbox:"Proverite svoj inbox",tapni_tags:"Tapni tags",tapni_tags_p1:"Konfigurišite tagove povezane sa Vašim profilom",tapni_tags_p2:"Nema tagova povezanih sa vašim profilom. <br> Povežite se sada!",verify_account_p1:"Ako niste primili kod, proverite svoj <br> spam folder ili nas kontaktirajte na",verify_account_success:"Nalog je uspešno verifikovan. Molimo vas da promenite svoju lozinku.",verify_account_success2:"Nalog je uspešno verifikovan. Sve je spremno! 🥳",welcome:"Dobrodošli",welcome_p1:"u budućnost vizitkarti",how_it_works:"Kako funkcioniše?",already_registered:"Već registrovano",error:"Greška",success:"Uspešno",copied:"Kopirano u međuspremniku",connect_validate:"Potrebno je popuniti jedno od dva kontakt polja",connect_validate_name:"Molimo Vas da unesete svoje ime",connect_validate_email:"Molimo Vas, unesite validnu e-mail adresu",link_validate:"Nevažeći podaci link",link_text_contact_card:"Kontakt kartica",link_text_custom_link:"Custom link",link_text_menu:"Meni",link_text_phone:"Telefon",save_to_apple_wallet:"Dodaj u Apple Wallet",save_to_google_wallet:"Dodaj u Google Wallet",card:"Kartica",sticker:"Stiker",keychain:"Privezak",band:"Narukvica",case:"Maska",standee:"Stend",decoded:"Decoded",wristbanditz:"Wristbanditz",update_p1:"Otkrivena je zastarela verzija aplikacije",update_p2:"Ažuriraj",update_p3:"Ažuriraj aplikaciju na najnoviju verziju",company_domain:"Domain tvoje kompanije",search_company_domain:"Pretražite domain vaše kompanije",enter_company_email:"Unesite poslovnu e-mail adresu",company_not_found:"Kompanija nije pronađena",ik_company_domain:"Znam domain kompanije",idk_company_domain:"Ne znam domain kompanije",continue:"Nastavi",forbidden_rule:"Ova opcija je onemogućena, obratite se administratoru kompanije.",companyName:"Ime Kompanije",createMarkerPlaceholder:"Kreirajte ili izaberite marker",clickToCreateMarker:"Kliknite ovde da biste kreirali marker",pleaseInviteUser:"Molimo pozovite korisnika da se pridruzi Tapniju da bi imali sinhronizovane podatke.",connectionSynchronized:"Podaci o vezi se automatski sinhronizuju.",viewProfile:"Pogledaj Profil",createConnectionHeader:"Dodaj novu konekciju",createConnectionButton:"Dodaj",createConnectionSuccess:"Konekcija je dodata.",allow_company_management:"Dozvolite kompanijsko upravljanje",company_join_request:"zahteva da upravlja Vašim profilom i da ga poveže sa svojim Enterprise nalogom.",account_ownership_transfer:"Ukoliko prihvatite zahtev, vlasništvo nad Vašim nalogom biće preneto na kompanijU. Kompanija će moći da menja Vaš profil, izmeni, doda i vidi veze, izmeni Vašu lozinku, izbriše vaš nalog i još mnogo toga. Obavezno proverite sa Vašom kompanijom pre nego što prihvatite zahtev.",request_expired:"Zahtev je istekao, zatražite od kompanije da pošalje novi zahtev.",request_expiration_desc:"Radi dodatne sigurnosti, zahtev biće validan samo 14 dana nakon što je poslat.",invitation_link_not_valid:"Link za poziv nije validan!",invitation_link_not_valid2:"Ponovo kliknite na dugme u e-mailu sa pozivnicom ili kopirajte link.",accept_request:"Prihvati zahtev",close:"Zatvori",request_accepted:"Zahtev je uspešno prihvaćen",companyEmail:"Poslovna email adresa",companyPhone:"Poslovni broj telefona",addBusinessInformations:"Dodajte poslovne informacije",resetFilter:"Resetuj",selectMarkers:"Izaberi marker",filterConnectionsHeader:"Filtriraj Konekcije",selectConnectionType:"Izaberi tip konekcije",all:"Sve",direct:"Direktne",form:"Forme",manually:"Manuelne",scan:"Skeniranja",sortOptions:"Opcije Sortiranja",date:"Datum Kreiranja",fullName:"Ime i Prezime",descending:"Silazno",ascending:"Uzlazno",selectDateRange:"Izaberi opseg datuma",follow_up_reminder:"Follow-up podsetnik",now:"Sad",one_hour:"1 Sat",one_day:"1 Dan",three_days:"3 Dana",one_week:"1 Nedelja",two_weeks:"2 Nedelje",one_month:"1 Mesec",custom:"Izaberite vreme",set_reminder:"Podesi podsetnik",select_date_time:"Izaberite datum i vreme",enter_reminder_text:"Unesite tekst podsetnika",reminder_created:"Podsetnik je uspešno kreiran",connectionNameLabel:"Unesite ime konekcije",connectionEmailLabel:"Unesite privatnu email adresu",privatePhoneLabel:"Unesi privatni broj telefona",companyNameLabel:"Unesi ime kompanije",businessEmail:"Poslovna email adresa",businessEmailLabel:"Unesite poslovnu email adresu",businessPhone:"Poslovni broj telefona",businessPhoneLabel:"Unesite poslovni broj telefona",noteLabel:"Dodajte belešku",markersLabel:"Dodajte markere konekcije",showScan:"Prikazi sliku",hideScan:"Sakrij sliku",create_connection:"Dodaj konekcije",create_manually:"Dodaj ručno",create_using_scanner:"Dodajte pomoću skenera kartica",companyTitle:"Titula",companyTitleLabel:"Dodajte tituli",allConnectionsLabel:"Sve konekcije",directConnectionsLabel:"Direktne konekcije sa korisnicima Tapni aplikacije",formConnectionsLabel:"Konekcije ostvarne putem forme za povezivanje",manualConnectionsLabel:"Manualno dodate konekcije",scanConnectionsLabel:"Konekcije kreirane skenerom za kartice",analyticsHeader:"Analitika",analyticsProfileViews:"Broj Pregleda profila",analyticsLinkClicks:"Broj Klikova na Link",analyticsClickTroughRatio:"Stopa učestalosti klika",analyticsTotalConnections:"Ukupno Konekcija",analyticsTopLinks:"Najpopularniji Linkovi",analyticsProfileVisits:"Broj Poseta Profila",analyticsLinkVisits:"Broj Posecenih Linkova",analyticsNewConnections:"Nove Konekcije",analyticsTopCountries:"Top Zemlje",analyticsTopReferers:"Top Referali",please_wait:"Molimo sačekajte...",click_here:"kliknite ovde",if_redirect_not_directly:"Ako preusmeravanje nije izvršeno automatski",you_will_be_redirected:"Bićete preusmereni na Tapni aplikaciju.",use_tapni_on_the_web:"Koristite Tapni na webu",login_by_scanning_qr_code:"Prijavite se skeniranjem QR koda",open_tapni_app_on_your_phone:"1. Otvorite Tapni aplikaciju na telefonu",go_to_settings_link_a_device:"2. Idite na podešavanja > Poveži uređaj",point_your_phone_at_this_qr_code:"3. Usmerite telefon na ovaj QR kod",choose_other_login_methods:"Izaberite druge metode prijavljivanja",no_sso_logins:"Vaša kompanija ne koristi SSO prijavu, kontaktirajte svog administratora",mfa:"Višefaktorska autentikacija",otp_title:"Unesite MFA kod za nastavak",otp_code:"MFA kod",otp_subtitle:"Unesite kod iz aplikacije za autentikaciju",otp_p1:"Ako imate problem sa MFA, <br> kontaktirajte nas na",change_language:"Promeni jezik",welcome_account:"Dobrodošli u Centar naloga",security:"Bezbednost",security_p:"Upravljajte opcijama autentikacije & statusom naloga",general:"Opšte",general_p:"Upravljajte ličnim podacima & drugim preferencama",billing:"Fakturisanje",billing_p:"Upravljajte pretplatama & načinima plaćanja",apps:"Aplikacije",apps_p:"Pregled aktivnih aplikacija i još opcija",apps_my:"Moje aplikacije",mfa_auth:"Dvofaktorska autentikacija",mfa_auth_enabled:"Vaš nalog je zaštićen MFA-om.",mfa_auth_p:"Zaštitite nalog od neovlašćenog pristupa uključivanjem MFA",mfa_auth_qr:"Skenirajte QR kod ili unesite tajni ključ u aplikaciju za autentikaciju.",change_password:"Promeni lozinku",active_account:"Aktivan nalog",active_account_p:"Ako je isključeno, nalog je privremeno deaktiviran dok ga ne uključite.",delete_account:"Obriši nalog",delete_account_p:"Obriši nalog",permanent_delete:"Trajno brisanje",permanent_delete_p:"Brisanjem naloga svi podaci se trajno gube. Ova akcija je neopoziva. Ako niste sigurni, privremeno deaktivirajte nalog.",personal_details:"Lični detalji",app_language_p:"Prevedite aplikaciju na željeni jezik",app_region:"Region",app_region_p:"Izaberite region radi prilagođenog plaćanja i podrške"}},yr={state:{english:"İngilizce",spanish:"İspanyolca",german:"Alman",korean:"Korece",italian:"İtalyanca",french:"Fransızca",serbian:"Sırpça",turkish:"Çince",chinese:"Kineski",japanese:"Japonca",portuguese:"Portekizce",app_language:"Dil seçin",profile_preview:"Profil Önizlemesi",edit_profile:"Profili Düzenle",login:"Giriş yap",referral_reach:"Bize kendiniz ve erişiminiz hakkında daha fazla bilgi verin.",referral_apply_placeholder:"Tapni'yi nasıl tanıtmayı planlıyorsunuz?",referral_apply_note:`Hesabınıza mümkün olduğunca çok bağlantı ekleyin, <br>
|
|
75
|
+
`,user_not_found_p:"Nismo mogli da pronađemo korisnika u našoj bazi podataka🤷",taps:"deljenja",private_profile:"Privatan profil",private_profile_p:"je privatan profil. <br> Profil je vidljiv samo pomoću Tapni tagova",profile_bio_p:"Napišite nešto o sebi ili vašem brendu",add_to_contacts:"Dodaj u kontakte",drag_and_drop_links:"Prevucite i nalepite linkove po željenom redosledu",no_links:"Nema linkova na vašem profilu.",add_link:"Dodaj link",direct_link_p1:"Posetioci će automatski biti preusmereni na:",profile_not_active:"Vaš profil trenutno nije aktivan <br> i samo ga Vi možete videti kada ste prijavljeni.",profile_not_public:"Vaš profil trenutno nije javan <br> i mogu ga videti samo oni koji prislone uređaj uz Vaš Tapni.",activate_profile_now:"Aktivirajte svoj profil sada",publish_profile_now:"Učinite svoj profil sada javnim",link_add_p1:"Izaberite tip linka",link_add_not_found:"Nisu pronađeni linkovi 🤷",link_add_not_found_p2:"Ako smo propustili vašu omiljenu platformu, javite nam se i pošaljite nam email (<b>support@tapni.com</b>) ili nam pošaljite DM na društvenim mrežama (<b>@tapni</b>)",link_add_not_found_p3:"Daćemo sve od sebe da podržimo sve platforme 😉",featured:"Istaknuto",social_media:"Društvene mreže",contact:"Kontakt",finance:"Finansije",portfolio:"Portfolio",music:"Muzika",business:"Biznis",fun:"Zabava",ecommerce:"Ecommerce",more:"Još",email_username:"Email / Korisničko ime",username:"Korisničko ime",password:"Lozinka",sign_in:"Prijavi se",sign_in_with:"Prijavi se preko:",sign_in_with_new:"Prijavite se sa novim nalogom",sign_up_with:"Registruj se preko:",select_sign_method:"Izaberite metod prijave",verify_account:"Verifikuj nalog",terms_by_signing_in:"Prijavljivanjem prihvatate naše",terms_by_registering:"Registracijom prihvatate naše",terms_by_submitting:"Podnošenjem ovog obrasca slažete se sa našim uslovima koriscenja",terms_of_service:"Uslovima korišćenja",and:"i",refresh:"Osveži",privacy_policy:"Pravilima o privatnosti",create_account:"Kreiraj nalog",reset_password:"Resetuj šifru",reset_password_p1:"Ako niste uspeli da resetujete lozinku,<br> slobodno nas kontaktirajte na",reset_password_p2:"Ako niste uspeli da resetujete lozinku,<br> slobodno nas kontaktirajte na",create_new_account:"Napravite novi nalog",maintenance_p1:"Vraćamo se uskoro",maintenance_p2:"u međuvremenu pregledajte Tapni proizvode",maintenance_p3:"Tapni ne radi zbog planiranog održavanja <br> i očekuje se da će ponovo biti na mreži za nekoliko minuta.",offline_p1:"Nema internet veze",offline_p2:"Proverite svoju internet konekciju, a zatim osvežite stranicu",offline_p3_1:"Dok ste van mreže,",offline_p3_2:"možete deliti svoju kontakt karticu pomoću ovog QR koda",products_p1:"Impresionirajte sve koje sretnete 😎 <br> Nabavite svoj sada 👇",cards:"Kartice",stickers:"Stikeri",keychains:"Privesci za ključeve",explore_collection:"Istražite kolekciju",register:"Registruj se",register_success:"Skoro smo gotovi. Molimo Vas da potvrdite email.",register_success_modal:"Uspešno ste prijavljeni sa drugim nalogom.",check_your_inbox:"Proverite svoj inbox",tapni_tags:"Tapni tags",tapni_tags_p1:"Konfigurišite tagove povezane sa Vašim profilom",tapni_tags_p2:"Nema tagova povezanih sa vašim profilom. <br> Povežite se sada!",verify_account_p1:"Ako niste primili kod, proverite svoj <br> spam folder ili nas kontaktirajte na",verify_account_success:"Nalog je uspešno verifikovan. Molimo vas da promenite svoju lozinku.",verify_account_success2:"Nalog je uspešno verifikovan. Sve je spremno! 🥳",welcome:"Dobrodošli",welcome_p1:"u budućnost vizitkarti",how_it_works:"Kako funkcioniše?",already_registered:"Već registrovano",error:"Greška",success:"Uspešno",copied:"Kopirano u međuspremniku",connect_validate:"Potrebno je popuniti jedno od dva kontakt polja",connect_validate_name:"Molimo Vas da unesete svoje ime",connect_validate_email:"Molimo Vas, unesite validnu e-mail adresu",link_validate:"Nevažeći podaci link",link_text_contact_card:"Kontakt kartica",link_text_custom_link:"Custom link",link_text_menu:"Meni",link_text_phone:"Telefon",save_to_apple_wallet:"Dodaj u Apple Wallet",save_to_google_wallet:"Dodaj u Google Wallet",card:"Kartica",sticker:"Stiker",keychain:"Privezak",band:"Narukvica",case:"Maska",standee:"Stend",decoded:"Decoded",wristbanditz:"Wristbanditz",update_p1:"Otkrivena je zastarela verzija aplikacije",update_p2:"Ažuriraj",update_p3:"Ažuriraj aplikaciju na najnoviju verziju",company_domain:"Domain tvoje kompanije",search_company_domain:"Pretražite domain vaše kompanije",enter_company_email:"Unesite poslovnu e-mail adresu",company_not_found:"Kompanija nije pronađena",ik_company_domain:"Znam domain kompanije",idk_company_domain:"Ne znam domain kompanije",continue:"Nastavi",forbidden_rule:"Ova opcija je onemogućena, obratite se administratoru kompanije.",companyName:"Ime Kompanije",createMarkerPlaceholder:"Kreirajte ili izaberite marker",clickToCreateMarker:"Kliknite ovde da biste kreirali marker",pleaseInviteUser:"Molimo pozovite korisnika da se pridruzi Tapniju da bi imali sinhronizovane podatke.",connectionSynchronized:"Podaci o vezi se automatski sinhronizuju.",viewProfile:"Pogledaj Profil",createConnectionHeader:"Dodaj novu konekciju",createConnectionButton:"Dodaj",createConnectionSuccess:"Konekcija je dodata.",allow_company_management:"Dozvolite kompanijsko upravljanje",company_join_request:"zahteva da upravlja Vašim profilom i da ga poveže sa svojim Enterprise nalogom.",account_ownership_transfer:"Ukoliko prihvatite zahtev, vlasništvo nad Vašim nalogom biće preneto na kompanijU. Kompanija će moći da menja Vaš profil, izmeni, doda i vidi veze, izmeni Vašu lozinku, izbriše vaš nalog i još mnogo toga. Obavezno proverite sa Vašom kompanijom pre nego što prihvatite zahtev.",request_expired:"Zahtev je istekao, zatražite od kompanije da pošalje novi zahtev.",request_expiration_desc:"Radi dodatne sigurnosti, zahtev biće validan samo 14 dana nakon što je poslat.",invitation_link_not_valid:"Link za poziv nije validan!",invitation_link_not_valid2:"Ponovo kliknite na dugme u e-mailu sa pozivnicom ili kopirajte link.",accept_request:"Prihvati zahtev",close:"Zatvori",request_accepted:"Zahtev je uspešno prihvaćen",companyEmail:"Poslovna email adresa",companyPhone:"Poslovni broj telefona",addBusinessInformations:"Dodajte poslovne informacije",resetFilter:"Resetuj",selectMarkers:"Izaberi marker",filterConnectionsHeader:"Filtriraj Konekcije",selectConnectionType:"Izaberi tip konekcije",all:"Sve",direct:"Direktne",form:"Forme",manually:"Manuelne",scan:"Skeniranja",sortOptions:"Opcije Sortiranja",date:"Datum Kreiranja",fullName:"Ime i Prezime",descending:"Silazno",ascending:"Uzlazno",selectDateRange:"Izaberi opseg datuma",follow_up_reminder:"Follow-up podsetnik",now:"Sad",one_hour:"1 Sat",one_day:"1 Dan",three_days:"3 Dana",one_week:"1 Nedelja",two_weeks:"2 Nedelje",one_month:"1 Mesec",custom:"Izaberite vreme",set_reminder:"Podesi podsetnik",select_date_time:"Izaberite datum i vreme",enter_reminder_text:"Unesite tekst podsetnika",reminder_created:"Podsetnik je uspešno kreiran",connectionNameLabel:"Unesite ime konekcije",connectionEmailLabel:"Unesite privatnu email adresu",privatePhoneLabel:"Unesi privatni broj telefona",companyNameLabel:"Unesi ime kompanije",businessEmail:"Poslovna email adresa",businessEmailLabel:"Unesite poslovnu email adresu",businessPhone:"Poslovni broj telefona",businessPhoneLabel:"Unesite poslovni broj telefona",noteLabel:"Dodajte belešku",markersLabel:"Dodajte markere konekcije",showScan:"Prikazi sliku",hideScan:"Sakrij sliku",create_connection:"Dodaj konekcije",create_manually:"Dodaj ručno",create_using_scanner:"Dodajte pomoću skenera kartica",companyTitle:"Titula",companyTitleLabel:"Dodajte tituli",allConnectionsLabel:"Sve konekcije",directConnectionsLabel:"Direktne konekcije sa korisnicima Tapni aplikacije",formConnectionsLabel:"Konekcije ostvarne putem forme za povezivanje",manualConnectionsLabel:"Manualno dodate konekcije",scanConnectionsLabel:"Konekcije kreirane skenerom za kartice",analyticsHeader:"Analitika",analyticsProfileViews:"Broj Pregleda profila",analyticsLinkClicks:"Broj Klikova na Link",analyticsClickTroughRatio:"Stopa učestalosti klika",analyticsTotalConnections:"Ukupno Konekcija",analyticsTopLinks:"Najpopularniji Linkovi",analyticsProfileVisits:"Broj Poseta Profila",analyticsLinkVisits:"Broj Posecenih Linkova",analyticsNewConnections:"Nove Konekcije",analyticsTopCountries:"Top Zemlje",analyticsTopReferers:"Top Referali",please_wait:"Molimo sačekajte...",click_here:"kliknite ovde",if_redirect_not_directly:"Ako preusmeravanje nije izvršeno automatski",you_will_be_redirected:"Bićete preusmereni na Tapni aplikaciju.",use_tapni_on_the_web:"Koristite Tapni na webu",login_by_scanning_qr_code:"Prijavite se skeniranjem QR koda",open_tapni_app_on_your_phone:"1. Otvorite Tapni aplikaciju na telefonu",go_to_settings_link_a_device:"2. Idite na podešavanja > Poveži uređaj",point_your_phone_at_this_qr_code:"3. Usmerite telefon na ovaj QR kod",choose_other_login_methods:"Izaberite druge metode prijavljivanja",no_sso_logins:"Vaša kompanija ne koristi SSO prijavu, kontaktirajte svog administratora",mfa:"Višefaktorska autentikacija",otp_title:"Unesite MFA kod za nastavak",otp_code:"MFA kod",otp_subtitle:"Unesite kod iz aplikacije za autentikaciju",otp_p1:"Ako imate problem sa MFA, <br> kontaktirajte nas na",change_language:"Promeni jezik",welcome_account:"Dobrodošli u Centar naloga",security:"Bezbednost",security_p:"Upravljajte opcijama autentikacije & statusom naloga",general:"Opšte",general_p:"Upravljajte ličnim podacima & drugim preferencama",billing:"Fakturisanje",billing_p:"Upravljajte pretplatama & načinima plaćanja",apps:"Aplikacije",apps_p:"Pregled aktivnih aplikacija i još opcija",apps_my:"Moje aplikacije",mfa_auth:"Dvofaktorska autentikacija",mfa_auth_enabled:"Vaš nalog je zaštićen MFA-om.",mfa_auth_p:"Zaštitite nalog od neovlašćenog pristupa uključivanjem MFA",mfa_auth_qr:"Skenirajte QR kod ili unesite tajni ključ u aplikaciju za autentikaciju.",change_password:"Promeni lozinku",active_account:"Aktivan nalog",active_account_p:"Ako je isključeno, nalog je privremeno deaktiviran dok ga ne uključite.",delete_account:"Obriši nalog",delete_account_p:"Obriši nalog",permanent_delete:"Trajno brisanje",permanent_delete_p:"Brisanjem naloga svi podaci se trajno gube. Ova akcija je neopoziva. Ako niste sigurni, privremeno deaktivirajte nalog.",personal_details:"Lični detalji",app_language_p:"Prevedite aplikaciju na željeni jezik",app_region:"Region",app_region_p:"Izaberite region radi prilagođenog plaćanja i podrške"}},vr={state:{english:"İngilizce",spanish:"İspanyolca",german:"Alman",korean:"Korece",italian:"İtalyanca",french:"Fransızca",serbian:"Sırpça",turkish:"Çince",chinese:"Kineski",japanese:"Japonca",portuguese:"Portekizce",app_language:"Dil seçin",profile_preview:"Profil Önizlemesi",edit_profile:"Profili Düzenle",login:"Giriş yap",referral_reach:"Bize kendiniz ve erişiminiz hakkında daha fazla bilgi verin.",referral_apply_placeholder:"Tapni'yi nasıl tanıtmayı planlıyorsunuz?",referral_apply_note:`Hesabınıza mümkün olduğunca çok bağlantı ekleyin, <br>
|
|
76
76
|
böylece kim olduğunuzu öğrenebiliriz. <br><br>Özel ol.
|
|
77
77
|
<br>Herkes kabul edilmez.😉`,referral_apply_now:"Şimdi başvur",referral_apply_thanks:"Başvurduğunuz için teşekkürler. Başvurunuzu yakında gözden geçireceğiz!",connect:"Bağlan",with:"ile",exchange_contact:"Değişim İletişim",add_details:"Daha fazlasını ekle",show_details:"Daha fazlasını göster",download_contact:"İletişim Kartını İndir",stay_in_touch:"İle iletişim kurun",no_thanks:"Hayır, teşekkürler",connect_join:"Tapni'ye katıl",connect_with:"ile bağlanın",connect_required_fields:"İki iletişim alanından biri sağlanmalıdır",name:"İsim",first_name:"İlk isim",last_name:"Soyadı",email:"E posta",phone:"Telefon numarası",phone_p:"Telefon",company:"Şirket",address:"Adres",website:"Web sitesi",open:"Aç",delete:"sil",confirm:"Onayla",cancel:"Iptal",save:"Kaydet",code:"Kod",note:"Not",note_p:"Bir not ekleyin",contact_card_icon:"Kişi kartı simgesinin altındaki metni ayarlayın",contact_card_name:"Kişi kartı için isim girin",contact_card_name_p:"Kişi kartı adı",contact_card_email:"Kişi kartı için e-posta girin",contact_card_email_p:"Kişi kartı e-postası",contact_card_phone:"Kişi kartı için telefonu girin",contact_card_phone_p:"Kişi kartı telefonu",contact_card_website:"Kişi kartı için web sitesini girin",contact_card_website_p:"Kişi kartı web sitesi",contact_card_company_name:"Kişi kartı için şirket adını girin",contact_card_company_name_p:"İletişim kartı şirket adı",contact_card_job_title:"İş unvanı",contact_card_job_title_p:"İş unvanını girin",contact_card_company_website:"Şirket web sitesi",contact_card_company_website_p:"Şirket web sitesini girin",contact_card_bio:"Kişi kartı için biyografiyi girin",contact_card_bio_p:"Kişi kartı için biyografiyi girin",contact_card_home_address:"Kişi kartı için ev adresini girin",contact_card_home_address_p:"Kişi kartı ev adresi",contact_card_work_address:"Kişi kartı için iş adresini girin",contact_card_work_address_p:"Kişi kartı iş adresi",contact_card_social:`Kişi kartına eklemek için <br> Tapni profilinize sosyal medya bağlantılarını girin
|
|
78
78
|
`,contact_card_social_p:"Kişi kartı için sosyal medya bağlantılarını girin",link_text_p:"Bağlantı metni",link_icon:"Bağlantı simgesinin altındaki metni ayarla",direct_pick:"Doğrudan bir bağlantı seçin",direct_p:`Birinin telefonuna dokunduğunuzda, <br> profiliniz yerine bu bağlantı açılacaktır.
|
|
@@ -130,7 +130,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
130
130
|
ou se tiver alguma dúvida,<br>
|
|
131
131
|
escreva para nós em`,referral_p5:"Comece a ganhar dinheiro agora!",referral_p66:"Compartilhe seu link de indicação e ganhe dinheiro!",referral_p6:`Se você é blogueiro, influenciador ou entusiasta de mídia social, você se encaixa perfeitamente em nosso Programa de Indicação.
|
|
132
132
|
Promova nossa marca e ganhe 20% de comissão nas compras feitas com seu código de desconto ou link de indicação.`,referral_p7:`Após se registrar no Programa de Indicação da Tapni, você receberá um link e um código de desconto pessoais.
|
|
133
|
-
Compartilhe-os no seu site e nas redes sociais, e ganhe dinheiro enquanto oferecemos uma ótima experiência de conexão.`,referral_p8:"Nota de pagamento",referral_p9:"Paypal (Mundo todo) e Transferências bancárias (UE) <br> Valor mínimo para pagamento é 25€.",referral_p10:"Solicitar pagamento",referral_p11:"Pagamento solicitado",your_connections:"Suas conexões",connections_p1:"Entre em contato com as pessoas que você conheceu",connections_p2:"<br><br>Nenhuma conexão até agora. <br> Vamos começar💥",connections_p3:"Nenhuma conexão encontrada.",connection_success:"Solicitação de conexão enviada com sucesso",exchange_success:"Contato trocado com sucesso.",create_free_account:"Crie uma conta gratuita Tapni e mantenha seus contatos atualizados!",connection_edit:"Gerenciar conexão",connection_edit_success:"Conexão atualizada com sucesso",connection_delete_success:"Conexão excluída com sucesso",search:"Buscar",devices_p1:"Lista de compatibilidade de dispositivos",devices_p2:"A Tapni usa tecnologia compatível com a maioria dos iPhones e Androids recentes.",devices_p3:"Alguns Androids podem ter o NFC desligado. Se sua Tapni não funcionar em um Android, procure NFC nas configurações e certifique-se de que está ligado.",devices_p4:"com widget NFC do iOS 14 no centro de controle",download_p1:"Baixe o App Tapni",download_p2:"Disponível para dispositivos Apple e Android",user_not_found:"Usuário não encontrado",user_not_found_p:"Não conseguimos encontrar o usuário em nosso banco de dados🤷",taps:"toques",private_profile:"Perfil privado",private_profile_p:"é um perfil privado. <br> O perfil é visível usando apenas tags Tapni ",profile_bio_p:"Escreva algo sobre você ou sua marca",add_to_contacts:"Adicionar aos contatos",drag_and_drop_links:"Arraste e solte os links na ordem desejada",no_links:"Não há links em seu perfil.",add_link:"Adicionar link",direct_link_p1:"Os visitantes serão redirecionados automaticamente para:",profile_not_active:"Seu perfil atualmente não está ativo <br> e apenas você pode vê-lo quando estiver logado.",profile_not_public:"Seu perfil atualmente não é público <br> e apenas quem te tocar pode vê-lo.",activate_profile_now:"Ative seu perfil agora",publish_profile_now:"Torne seu perfil público agora",link_add_p1:"Escolha um tipo de link",link_add_not_found:"Nenhum link encontrado 🤷",link_add_not_found_p2:"Se sentimos falta da sua plataforma favorita, envie-nos um email (<b>support@tapni.com</b>) ou mensagem nas redes sociais (<b>@tapni</b>)",link_add_not_found_p3:"Faremos o possível para suportar todas as plataformas 😉",featured:"Destaques",social_media:"Redes sociais",contact:"Contato",finance:"Finanças",portfolio:"Portfólio",music:"Música",business:"Negócios",fun:"Diversão",ecommerce:"Ecommerce",more:"Mais",email_username:"Email / Usuário",username:"Nome de usuário",password:"Senha",sign_in:"Entrar",sign_in_with:"Entrar com",sign_in_with_new:"Entrar com nova conta",sign_up_with:"Registrar com",select_sign_method:"Selecione um método de login",verify_account:"Verificar conta",terms_by_signing_in:"Ao entrar, você concorda com nossos",terms_by_registering:"Ao se registrar, você concorda com nossos",terms_by_submitting:"Ao enviar este formulário, você concorda com nossos Termos de Serviço",terms_of_service:"Termos de Serviço",and:"e",refresh:"Atualizar",privacy_policy:"Política de Privacidade",create_account:"Criar conta",reset_password:"Redefinir senha",reset_password_p1:"Se você não conseguiu redefinir sua senha,<br> entre em contato conosco em ",reset_password_p2:"Se você não conseguiu redefinir sua senha,<br> entre em contato conosco em",create_new_account:"Criar nova conta",maintenance_p1:"Voltaremos em breve",maintenance_p2:"Explore as coleções Tapni enquanto isso",maintenance_p3:"A Tapni está em manutenção programada <br> e deve voltar em alguns minutos.",offline_p1:"Sem conexão com a Internet",offline_p2:"Verifique sua conexão e atualize a página",offline_p3_1:"Enquanto estiver offline,",offline_p3_2:"você pode compartilhar sua carta de contato usando este QR code",products_p1:"Impressione todos que você conhece 😎 <br> Garanta já o seu 👇",cards:"Cartões",stickers:"Adesivos",keychains:"Chaveiros",explore_collection:"Explorar coleção",register:"Registrar",register_success:"Você está quase lá. Confirme seu email.",register_success_modal:"Conectado com outra conta com sucesso.",check_your_inbox:"Verifique sua caixa de entrada",tapni_tags:"Tags Tapni",tapni_tags_p1:"Configure tags conectadas ao seu perfil",tapni_tags_p2:"Não há tags conectadas ao seu perfil. <br> Conecte uma agora!",verify_account_p1:"Se você não recebeu um código, verifique sua <br> pasta de spam ou entre em contato conosco em",verify_account_success:"Conta verificada com sucesso. Por favor, altere sua senha agora.",verify_account_success2:"Conta verificada com sucesso. Tudo pronto!🥳",welcome:"Bem-vindo",welcome_p1:"ao futuro dos cartões de visita",how_it_works:"Como funciona",already_registered:"Já registrado",error:"Erro",success:"Sucesso",copied:"Copiado para a área de transferência",connect_validate:"Um dos dois campos de contato deve ser fornecido",connect_validate_name:"Por favor, insira seu nome",connect_validate_email:"Por favor, insira um email válido",link_validate:"Dados do link inválidos.",link_text_contact_card:"Carta de contato",link_text_custom_link:"Link personalizado",link_text_menu:"Menu",link_text_phone:"Telefone",save_to_apple_wallet:"Adicionar ao Apple Wallet",save_to_google_wallet:"Adicionar ao Google Wallet",card:"Cartão",sticker:"Adesivo",keychain:"Chaveiro",band:"Pulseira",case:"Capa",standee:"Totem",decoded:"Decodificado",wristbanditz:"Wristbanditz",update_p1:"Versão desatualizada do app detectada",update_p2:"Atualizar",update_p3:"Atualize o app para a versão mais recente",company_domain:"Domínio da sua empresa",search_company_domain:"Pesquisar domínio da empresa",enter_company_email:"Inserir email corporativo",company_not_found:"Empresa não encontrada",ik_company_domain:"Eu sei o domínio da empresa",idk_company_domain:"Eu não sei o domínio da empresa",continue:"Continuar",forbidden_rule:"Esta opção está desabilitada, contate o administrador da sua empresa.",companyName:"Nome da empresa",createMarkerPlaceholder:"Crie ou selecione um marcador",clickToCreateMarker:"Clique aqui para criar marcador",pleaseInviteUser:"Convide o usuário para ingressar na Tapni para ter dados sincronizados com você.",connectionSynchronized:"Os dados da conexão são sincronizados automaticamente.",viewProfile:"Ver perfil",createConnectionHeader:"Criar nova conexão",createConnectionButton:"Criar conexão",createConnectionSuccess:"Conexão criada.",allow_company_management:"Permitir gestão da empresa",company_join_request:"está solicitando gerenciar seu perfil e associá-lo à conta corporativa.",account_ownership_transfer:"A propriedade da sua conta será transferida para a empresa se você aceitar a solicitação. A empresa poderá modificar seu perfil, editar e adicionar links, ver suas conexões, modificar sua senha, excluir sua conta e muito mais. Certifique-se de verificar com sua empresa antes de aceitar a solicitação.",request_expired:"A solicitação expirou, peça à sua empresa para enviar uma nova.",request_expiration_desc:"Por segurança adicional, a solicitação funcionará apenas por 14 dias após o envio.",invitation_link_not_valid:"O link de convite não é válido!",invitation_link_not_valid2:"Clique novamente no botão do email de convite ou copie o link.",accept_request:"Aceitar solicitação",close:"Fechar",request_accepted:"A solicitação foi aceita com sucesso",companyEmail:"Email da empresa",companyPhone:"Telefone da empresa",addBusinessInformations:"Adicionar informações comerciais",resetFilter:"Redefinir",selectMarkers:"Selecionar marcadores",filterConnectionsHeader:"Filtrar conexões",selectConnectionType:"Selecionar tipo de conexão",all:"Todos",direct:"Direto",form:"Formulário",manually:"Manual",scan:"Digitalizar",sortOptions:"Opções de ordenação",date:"Data de criação",fullName:"Nome completo",descending:"Descendente",ascending:"Ascendente",selectDateRange:"Selecionar período",follow_up_reminder:"Lembrete de acompanhamento",now:"Agora",one_hour:"1 hora",one_day:"1 dia",three_days:"3 dias",one_week:"1 semana",two_weeks:"2 semanas",one_month:"1 mês",custom:"Escolher horário",set_reminder:"Definir lembrete",select_date_time:"Selecione a data e a hora",enter_reminder_text:"Insira o texto do lembrete",reminder_created:"Lembrete criado com sucesso",connectionNameLabel:"Insira o nome da conexão",connectionEmailLabel:"Insira o email privado",privatePhoneLabel:"Insira o telefone privado",companyNameLabel:"Insira o nome da empresa",businessEmail:"Email corporativo",businessEmailLabel:"Insira o email corporativo",businessPhone:"Telefone corporativo",businessPhoneLabel:"Insira o telefone corporativo",noteLabel:"Insira a nota",markersLabel:"Adicionar marcadores de conexão",showScan:"Mostrar digitalização",hideScan:"Ocultar digitalização",create_connection:"Criar conexão",create_manually:"Criar manualmente",create_using_scanner:"Digitalizar cartão de visita",companyTitle:"Cargo",companyTitleLabel:"Insira o cargo",allConnectionsLabel:"Todos os tipos de conexão",directConnectionsLabel:"Conexão direta no app com usuários Tapni",formConnectionsLabel:"Conexões preenchidas no formulário",manualConnectionsLabel:"Conexões criadas manualmente",scanConnectionsLabel:"Conexões criadas pelo scanner de cartões",analyticsHeader:"Análises",analyticsProfileViews:"Visualizações de perfil",analyticsLinkClicks:"Cliques no link",analyticsClickTroughRatio:"Taxa de cliques",analyticsTotalConnections:"Total de conexões",analyticsTopLinks:"Links mais populares",analyticsProfileVisits:"Visitas ao perfil",analyticsLinkVisits:"Visitas ao link",analyticsNewConnections:"Novas conexões",analyticsTopCountries:"Países principais",analyticsTopReferers:"Principais referenciadores",please_wait:"Por favor, aguarde...",click_here:"clique aqui",if_redirect_not_directly:"Se o redirecionamento não for realizado automaticamente",you_will_be_redirected:"Você será redirecionado para o aplicativo Tapni.",use_tapni_on_the_web:"Use Tapni na Web",login_by_scanning_qr_code:"Entre escaneando o QR Code",open_tapni_app_on_your_phone:"1. Abra o app Tapni no seu telefone",go_to_settings_link_a_device:"2. Vá em Configurações > Vincular um dispositivo",point_your_phone_at_this_qr_code:"3. Aponte seu telefone para este QR Code",choose_other_login_methods:"Escolha outros métodos de login",no_sso_logins:"Sua empresa não usa login SSO, por favor contate o administrador",mfa:"Autenticação Multifator",otp_title:"Insira o código MFA para continuar",otp_code:"Código MFA",otp_subtitle:"Insira o código do seu aplicativo autenticador",otp_p1:"Se você tiver problemas com o MFA, <br> contate-nos em",change_language:"Mudar idioma",welcome_account:"Bem-vindo ao Centro de Contas",security:"Segurança",security_p:"Gerencie suas opções de autenticação e status da conta",general:"Geral",general_p:"Gerencie seus dados pessoais e outras preferências",billing:"Faturamento",billing_p:"Gerencie suas assinaturas e perfis de pagamento",apps:"Aplicativos",apps_p:"Veja seus apps ativos e explore outros",apps_my:"Meus apps",mfa_auth:"Autenticação em 2 fatores",mfa_auth_enabled:"Sua conta está protegida por MFA.",mfa_auth_p:"Proteja sua conta contra acesso não autorizado ativando a autenticação multifator (MFA)",mfa_auth_qr:"Escaneie o QR code acima ou insira a chave secreta no seu aplicativo autenticador.",change_password:"Alterar senha",active_account:"Conta ativa",active_account_p:"Quando desativada, sua conta ficará temporariamente desativada até ser reativada.",delete_account:"Excluir conta",delete_account_p:"Excluir conta",permanent_delete:"Exclusão permanente",permanent_delete_p:"Se você excluir sua conta, todos os seus dados serão permanentemente excluídos. Esta ação não pode ser desfeita. Se você não tiver certeza, pode desativar temporariamente sua conta.",personal_details:"Detalhes pessoais",app_language_p:"Traduza o app para o idioma de sua preferência",app_region:"Região",app_region_p:"Selecione sua região para experiência de faturamento e suporte personalizada"}},wr=()=>Promise.resolve().then(()=>ji),Hi=[{path:"/welcome",name:"AuthWelcome",component:wr},{path:"/login",name:"AuthLogin",component:()=>Promise.resolve().then(()=>zs)},{path:"/callback/saml",name:"Callback",alias:["/callback/okta","/callback/auth","/callback/redirect"],component:()=>Promise.resolve().then(()=>op)},{path:"/qr",name:"AuthQR",component:()=>Promise.resolve().then(()=>wp)},{path:"/security",name:"AuthSecurity",component:()=>Promise.resolve().then(()=>td)},{path:"/billing",name:"AuthBilling",component:()=>Promise.resolve().then(()=>Bd)},{path:"/apps",name:"AuthApps",component:()=>Promise.resolve().then(()=>xp)},{path:"/apps/:app",name:"AuthApp",component:()=>Promise.resolve().then(()=>Kp)},{path:"/general",name:"AuthGeneral",component:()=>Promise.resolve().then(()=>ku)},{path:"/account",name:"AuthAccount",component:()=>Promise.resolve().then(()=>hc)},{path:"/reset",name:"AuthReset",component:()=>Promise.resolve().then(()=>Ju)},{path:"/register",name:"AuthRegister",component:()=>Promise.resolve().then(()=>jc)},{path:"/verify",name:"AuthVerify",component:()=>Promise.resolve().then(()=>tl)},{path:"/",name:"404",component:wr}],kr=en.createRouter({history:en.createWebHistory("/"),routes:Hi}),Cr={namespaced:!0,state:{$storex:{},view:"",lang:"en",realm:"app",refreshing:!1,loggedInUserId:"",apiRoot:"",account:{},device:{},loggedInAccounts:{},ssoLang:{en:hr.state,de:mr.state,es:fr.state,fr:gr.state,it:_r.state,sr:vr.state,tr:yr.state,cn:qi.state,kr:br.state,pt:Vi.state,ja:Fi.state},display:"npm",redirect_uri:"https://tapni.com/app/callback/auth",response_type:"token",state:"",allowedOriginsAuth:["https://business.tapni.com","https://business-dev.tapni.com","https://tapni.com","https://tapni.co","https://t.link","https://my.tapni.com","https://my.tapni.co","https://dev.tapni.co","https://dev.tapni.com","https://auth.tapni.com","https://auth.tapni.co","https://dev.mailsign.link","https://mailsign.link","https://sign.tapni.com","https://qrcodetoolkit.com","https://qr.tapni.com","https://designer.tapni.com","https://designer-dev.tapni.com","http://localhost:8080","https://localhost:8080","http://localhost:8081","http://localhost:7777","https://localhost:7777","http://localhost:8086","https://localhost:8085","http://localhost:8085","http://localhost","https://localhost","https://bigeye.tapni.com","https://bigeye-dev.tapni.com"]},mutations:{setAccountSettings(n,e){n.account=e},setStorageItem(n,e){n.$storex[e.name]=e.data},setStorage(n,e){n.$storex={...n.$storex,...e}},setLoggedInAccounts(n,e){n.loggedInAccounts={},e.forEach(t=>{n.loggedInAccounts[t.username]=t})},setLoggedInUserId(n,e){n.loggedInUserId=e},setRefreshTokens(n,e){n.$storex.refreshTokens=e},setRefreshToken(n,e){if(!e)return;let t=n.$storex.refreshTokens?n.$storex.refreshTokens.split(","):[];t=[e,...t.filter(o=>o!==e)],n.$storex.refreshTokens=t.join(",")},setToken(n,e){n.$storex.token=e},updateLang(n,e){n.lang=e},setView(n,e){n.view=e},setRedirectUri(n,e){n.redirect_uri=e},setDisplay(n,e){n.display=e},setState(n,e){n.state=e},setResponseType(n,e){n.response_type=e},setRealm(n,e){n.realm=e},setApiRoot(n,e){n.apiRoot=e},addAllowedOrigin(n,e){n.allowedOriginsAuth.includes(e)||n.allowedOriginsAuth.push(e)}},actions:{async getAccountSettings({state:n,commit:e,dispatch:t}){const[o,r]=await fe(Fe.getAccountSettings());if(o)return t("errorHandler",o);r.data.success&&e("setAccountSettings",r.data.data)},setStorageItem({commit:n},e){n("setStorageItem",e)},setStorage({commit:n},e){n("setStorage",e)},errorHandler({dispatch:n},e){if(e&&e.response&&e.response.data&&e.response.data.error){if(e.response.data.error==="ACCESS_DENIED")return n("logout");if(e.response.data.error==="OTP_REQUIRED")return X.$emit("toggleOTPField",!0);!e.response.data.error.includes("Network Error")&&!e.response.data.error.includes("TOKEN_EXPIRED")&&!e.response.data.error.includes("Cannot read properties")&&n("errorSnack",e.response.data.error)}return e},errorSnack({commit:n},e){let t=document.getElementById("snackbar"),o=document.getElementById("errorMessage"),r=document.getElementById("errorSnack");o.innerHTML=e,t.classList.add("show-snack"),r.classList.add("active-snack"),setTimeout(function(){r.classList.remove("active-snack"),t.classList.remove("show-snack")},3e3)},successSnack({commit:n},e){let t=document.getElementById("snackbar"),o=document.getElementById("successMessage"),r=document.getElementById("successSnack");o.innerHTML=e,t.classList.add("show-snack"),r.classList.add("active-snack"),setTimeout(function(){r.classList.remove("active-snack"),t.classList.remove("show-snack")},3e3)},closeSnacks({commit:n}){document.getElementById("snackbar").classList.remove("show-snack"),document.getElementById("successSnack").classList.remove("active-snack"),document.getElementById("errorSnack").classList.remove("active-snack")},async eventLog({commit:n,dispatch:e},t){const[o,r]=await fe(In.eventLog(t));return o?e("errorHandler",o):r},async maintenance({commit:n}){const[e,t]=await fe(mo.get("https://status.tapni.co/data/maintenance.json"));if(e)return console.error(e);if(t){let o=t.data;typeof t.data=="string"&&(o=JSON.parse(t.data)),o.api&&o.api.maintenanceActive&&(location.href="https://t.link/maintenance?msg="+o.api.msg)}},async loginSetup({commit:n,dispatch:e},t){t.data.refreshToken&&n("setRefreshToken",t.data.refreshToken),t.data.token&&n("setToken",t.data.token),n("setLoggedInUserId",t.data.data.id),n("setStorage",{UserId:t.data.data.id,username:t.data.data.username,localUser:t.data.data}),t.isModal===!0&&e("setLoggedInAccounts",[{id:t.data.data.id,username:t.data.data.username,name:t.data.data.name,refreshToken:t.data.refreshToken,photo:t.data.data.photo}])},async switchAccount({commit:n,dispatch:e,state:t},o){t.loggedInAccounts[o]&&(n("setStorage",{username:o,UserId:t.loggedInAccounts[o].id,localUser:t.loggedInAccounts[o]}),n("setLoggedInUserId",t.loggedInAccounts[o].id),n("setRefreshToken",t.loggedInAccounts[o].refreshToken),await e("refreshTokenAction",t.loggedInAccounts[o])),X.$emit("ssoEvent",{name:"switchAccount",data:{username:o}})},async refreshTokenAction({dispatch:n,commit:e,state:t,getters:o},r){if(t.refreshing)return null;t.refreshing=!0;const[i,s]=await fe(Fe.refreshToken({id:r.id,refreshToken:o.refreshTokens[0],refreshTokenAction:!0}));i&&i.response&&i.response.data.error==="ACCESS_DENIED"&&(n("logout",{refreshToken:o.refreshTokens[0]}),setTimeout(()=>location.reload(),1500)),s&&s.data&&(e("setToken",s.data.token),X.$emit("ssoEvent",{name:"setStorage",data:t.$storex})),t.refreshing=!1},async login({commit:n,state:e,dispatch:t},o){const[r,i]=await fe(Fe.login(o));if(r)return t("errorHandler",r);if(i.data.success)return e.display!=="popup"&&(t("loginSetup",{...i,isModal:o.isModal}),await t("getLoggedInAccounts")),t("loginSuccess",{...i,isModal:o.isModal}),!0},loginSuccess({commit:n,state:e,dispatch:t,getters:o},r){if(e.display==="redirect")return e.redirect_uri&&!e.allowedOriginsAuth.some(i=>e.redirect_uri.startsWith(i))?console.error("Redirect URI not allowed"):kr.push("/account");e.display==="popup"?e.allowedOriginsAuth.forEach(i=>{var s;(s=window.parent)==null||s.postMessage({code:r.data.auth_code,state:e.state},i)}):e.display==="npm"&&(X.$emit("ssoEvent",{name:"setLoading",data:!0}),X.$emit("ssoEvent",{name:"setStorage",data:e.$storex}),X.$emit("ssoEvent",{name:"getUser",data:{username:r.data.data.username}}),t("setLoggedInAccounts",[{id:r.data.data.id,username:r.data.data.username,name:r.data.data.name,refreshToken:r.data.refreshToken,photo:r.data.data.photo}]),r.isModal&&(t("successSnack",e.ssoLang[o.appLanguage].success_login),setTimeout(()=>{location.reload()},1500)),X.$emit("ssoEvent",{name:"redirect",data:"/"+r.data.data.username+"#edit"}))},async register({commit:n,dispatch:e},t){const[o,r]=await fe(Fe.register(t));return o?e("errorHandler",o):r},async verify({commit:n,dispatch:e},t){const[o,r]=await fe(Fe.verify(t));return o?e("errorHandler",o):r},async reset({commit:n,state:e,getters:t,dispatch:o},r){const[i,s]=await fe(Fe.sendResetEmail(r));if(i)return o("errorHandler",i);s.data.success&&o("successSnack",e.ssoLang[t.appLanguage].password_reset_success)},async exchangeAuthCode({commit:n,dispatch:e},t){const[o,r]=await fe(Fe.exchangeAuthCode(t));if(o)return e("errorHandler",o);await e("loginSetup",r),await e("getLoggedInAccounts"),e("loginSuccess",r)},async changePassword({commit:n,dispatch:e},t){const[o,r]=await fe(Fe.changePassword(t));return o?e("errorHandler",o):r.data.success},async newPassword({commit:n,dispatch:e},t){const[o,r]=await fe(In.newPassword(t));return o?e("errorHandler",o):r.data.success},async deleteAccount({commit:n,dispatch:e},t){const[o,r]=await fe(In.deleteAccount(t));return o?e("errorHandler",o):r.data.success},async registerDevice({commit:n,dispatch:e}){const t=await fo.Device.getId(),o=await fo.Device.getInfo();let r={device_id:t.uuid,platform:o.platform,device_info:{model:o.model,manufacturer:o.manufacturer,operatingSystem:o.operatingSystem,osVersion:o.osVersion,isVirtual:o.isVirtual,webViewVersion:o.webViewVersion}};const[i,s]=await fe(pr.registerDevice(r));return i?e("errorHandler",i):s},async addFcmToken({commit:n,dispatch:e},t){const[o,r]=await fe(pr.addFcmToken(t));return o?e("errorHandler",o):r},async acceptCompanyInvitation({commit:n,dispatch:e},t){const[o,r]=await fe(ko.acceptCompanyInvitation(t));return o?e("errorHandler",o):r},async logout({commit:n,dispatch:e,state:t},{refreshToken:o,sendRequest:r=!0}){r&&o&&Fe.logout({token:o}),t.$storex&&(t.$storex.username="",t.$storex.UserId="",t.$storex.localUser="",n("setToken","")),n("setLoggedInUserId","");const i=await e("unsetRefreshToken",o);if(i.length>=1)Object.keys(t.loggedInAccounts).forEach(s=>{t.loggedInAccounts[s].refreshToken===i[0]&&(n("setStorage",{username:s,UserId:t.loggedInAccounts[s].id,localUser:t.loggedInAccounts[s]}),n("setRefreshToken",i[0]),n("setLoggedInUserId",t.loggedInAccounts[s].id),e("refreshTokenAction",t.loggedInAccounts[s]).then(()=>{X.$emit("ssoEvent",{name:"switchAccount",data:{username:s}})}))});else{if(t.display==="redirect")return kr.push("/welcome");t.display==="npm"&&X.$emit("ssoEvent",{name:"redirect",data:"/welcome"})}},async getCompanyBySSOEmail({commit:n,dispatch:e},t){const[o,r]=await fe(ko.getBySSOEmail(t.email));if(o)return e("errorHandler",o);if(r.data.success)return r.data},async getLoggedInAccounts({getters:n,dispatch:e}){if(n.refreshTokens&&n.refreshTokens.length>=1){const[t,o]=await fe(Fe.getLoggedInAccounts({refreshTokens:n.refreshTokens}));if(t)return e("errorHandler",t);o&&o.data&&o.data.success&&e("setLoggedInAccounts",o.data.accounts)}},async loginUsingQR({commit:n,dispatch:e},t){const[o,r]=await fe(In.loginUsingQR(t));return o?e("errorHandler",o):r.data.success},setLoggedInAccounts({commit:n},e){n("setLoggedInAccounts",e),X.$emit("ssoEvent",{name:"setLoggedInAccounts",data:e})},setLoggedInUserId({commit:n},e){n("setLoggedInUserId",e)},setRefreshToken({commit:n},e){n("setRefreshToken",e)},async unsetRefreshToken({commit:n,state:e,dispatch:t,getters:o},r){let i=o.refreshTokens;return i=i==null?void 0:i.filter(s=>s!==r),n("setRefreshTokens",i.join(",")),i},setToken({commit:n},e){n("setToken",e)},updateLang({commit:n},e){n("updateLang",e)},setView({commit:n},e){n("setView",e)},setRedirectUri({commit:n},e){n("setRedirectUri",e)},setDisplay({commit:n},e){n("setDisplay",e)},setState({commit:n},e){n("setState",e)},setResponseType({commit:n},e){n("setResponseType",e)},setRealm({commit:n},e){n("setRealm",e)}},getters:{isLoggedIn:n=>!!n.$storex.token&&n.$storex.token!==""&&n.$storex.token!=="null",renderView:(n,e,t)=>{var o;return n.display!=="npm"?(o=t.route)==null?void 0:o.name:n.view},appRealm:n=>n.realm,appLanguage:n=>n.lang,accessToken:n=>n.$storex.token,refreshTokens:n=>n.$storex.refreshTokens.split(","),apiRoot:n=>n.apiRoot}},ft=ar.createStore({modules:{auth:Cr}}),ce=(n=null,e="v1")=>{const t=e;let o="https://api.tapni.com/"+e+"/";ft.getters["auth/apiRoot"]&&(o=ft.getters["auth/apiRoot"]+"/"+e+"/");let r=mo.create({baseURL:o,headers:{Authorization:`Bearer ${ft.getters["auth/accessToken"]}`,"X-Client-Name":"sso-"+t.platform,"X-Client-Version":t.version}});return r.interceptors.request.use(async function(i){if(["post","put","delete"].includes(i.method.toLowerCase())?i.data={...i.data,lang:ft.getters["auth/appLanguage"],realm:ft.getters["auth/appRealm"]||"app"}:i.method.toLowerCase()==="get"&&(i.params={...i.params,lang:ft.getters["auth/appLanguage"],realm:ft.getters["auth/appRealm"]||"app"}),ft.getters["auth/accessToken"]&&!n){const s=or.jwtDecode(ft.getters["auth/accessToken"]);if(s.exp-30<Math.floor(Date.now()/1e3))return ft.dispatch("auth/refreshTokenAction",s).then(()=>(i.headers={...i.headers,Authorization:`Bearer ${ft.getters["auth/accessToken"]}`},i))}return i}),r};let St;fo.Device.getId().then(n=>St=n.uuid);const Fe={register(n){return n.device_id=St,ce().post("/users/register",n)},login(n){return n.device_id=St,ce().post("/users/login",n)},logout(n){return n.device_id=St,ce().post("/users/logout",n)},refreshToken(n){return ce(!0).get(`/users/refresh-token?UserId=${n.id}&token=${n.refreshToken}`)},getLoggedInAccounts(n){return ce().post("/users/tokens",n)},sendResetEmail(n){return n.device_id=St,ce().post("/users/reset",n)},changePassword(n){return ce().put("/users/password",n,{headers:{Authorization:"Bearer "+n.token}})},verify(n){return ce().get("/users/verify",{params:{c:n.code,e:n.email,captchatoken:n.captchaToken}})},googleUrl(n){return ce().get("/users/google/url")},google(n){return n.device_id=St,ce().post("/users/google",n)},googleSDK(n){return n.device_id=St,ce().post("/users/google/sdk",n)},appleSDK(n){return n.device_id=St,ce().post("/users/apple/sdk",n)},microsoftSDK(n){return n.device_id=St,ce().post("/users/microsoft/sdk",n)},oktaSDK(n){return n.device_id=St,ce().post("/users/okta/sdk",n)},samlLoginUrl(n){return ce().post("/saml/url",n)},exchangeAuthCode(n){return ce().post("/users/auth-code",n)},setMfa(n){return ce().post("/users/set-mfa",n)},getAccountSettings(){return ce().get("/users/settings")},async getRecordById(n){return ce().post("/objects/record/"+n.id,n)},async getRecords(n){return ce().post("/objects/records",n)}},Er=tt.registerPlugin("GoogleAuth",{web:()=>Promise.resolve().then(()=>$p).then(n=>new n.GoogleAuthWeb)}),Tr={data(){return{googleLoad:!1}},computed:{displayGoogleLogin(){return!0}},mounted(){Er.initialize()},methods:{async googleLogin(){var t;this.googleLoad=!0;let[n,e]=await fe(Er.signIn());if(n)return this.googleLoad=!1;if(this.referral&&(e.ref=this.referral),e.authentication&&(e.authentication.accessToken||e.authentication.idToken)){this.referral&&(e.ref=this.referral),this.display==="popup"&&(e.response_type="code");const[o,r]=await fe(Fe.googleSDK(e,this.$storex));if(o)return this.googleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(o);if(r.data.success){if(this.display==="popup")return(t=window.parent)==null?void 0:t.postMessage({code:r.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(r),await this.getLoggedInAccounts(),this.loginSuccess({...r,isModal:this.isModal}),setTimeout(()=>{this.googleLoad=!1},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)}else this.googleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})}}},Ki=tt.registerPlugin("SignInWithApple",{web:()=>Promise.resolve().then(()=>Yp).then(n=>new n.SignInWithAppleWeb)}),Sr={data(){return{appleLoad:!1}},computed:{displayAppleLogin(){return Capacitor.isNativePlatform()&&Capacitor.getPlatform()==="ios"||!Capacitor.isNativePlatform()&&this.isiOS}},methods:{async appleLogin(){var t;this.appleLoad=!0;const[n,e]=await fe(Ki.authorize({clientId:"co.tapni.applelogin",redirectURI:"https://"+window.location.host+"/login",scopes:"email name"}));if(n)return this.appleLoad=!1;if(e.response.tokenData=or.jwtDecode(e.response.identityToken),e&&e.response&&e.response.identityToken){this.referral&&(e.response.ref=this.referral),this.display==="popup"&&(e.response_type="code");const[o,r]=await fe(Fe.appleSDK(e.response,this.$storex));if(o)return this.appleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(o);if(r.data.success){if(this.display==="popup")return(t=window.parent)==null?void 0:t.postMessage({code:r.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(r),await this.getLoggedInAccounts(),this.loginSuccess({...r,isModal:this.isModal}),setTimeout(()=>{this.appleLoad=!1},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)}else this.appleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})}}};/*! @azure/msal-browser v2.38.3 2023-10-27 *//*! *****************************************************************************
|
|
133
|
+
Compartilhe-os no seu site e nas redes sociais, e ganhe dinheiro enquanto oferecemos uma ótima experiência de conexão.`,referral_p8:"Nota de pagamento",referral_p9:"Paypal (Mundo todo) e Transferências bancárias (UE) <br> Valor mínimo para pagamento é 25€.",referral_p10:"Solicitar pagamento",referral_p11:"Pagamento solicitado",your_connections:"Suas conexões",connections_p1:"Entre em contato com as pessoas que você conheceu",connections_p2:"<br><br>Nenhuma conexão até agora. <br> Vamos começar💥",connections_p3:"Nenhuma conexão encontrada.",connection_success:"Solicitação de conexão enviada com sucesso",exchange_success:"Contato trocado com sucesso.",create_free_account:"Crie uma conta gratuita Tapni e mantenha seus contatos atualizados!",connection_edit:"Gerenciar conexão",connection_edit_success:"Conexão atualizada com sucesso",connection_delete_success:"Conexão excluída com sucesso",search:"Buscar",devices_p1:"Lista de compatibilidade de dispositivos",devices_p2:"A Tapni usa tecnologia compatível com a maioria dos iPhones e Androids recentes.",devices_p3:"Alguns Androids podem ter o NFC desligado. Se sua Tapni não funcionar em um Android, procure NFC nas configurações e certifique-se de que está ligado.",devices_p4:"com widget NFC do iOS 14 no centro de controle",download_p1:"Baixe o App Tapni",download_p2:"Disponível para dispositivos Apple e Android",user_not_found:"Usuário não encontrado",user_not_found_p:"Não conseguimos encontrar o usuário em nosso banco de dados🤷",taps:"toques",private_profile:"Perfil privado",private_profile_p:"é um perfil privado. <br> O perfil é visível usando apenas tags Tapni ",profile_bio_p:"Escreva algo sobre você ou sua marca",add_to_contacts:"Adicionar aos contatos",drag_and_drop_links:"Arraste e solte os links na ordem desejada",no_links:"Não há links em seu perfil.",add_link:"Adicionar link",direct_link_p1:"Os visitantes serão redirecionados automaticamente para:",profile_not_active:"Seu perfil atualmente não está ativo <br> e apenas você pode vê-lo quando estiver logado.",profile_not_public:"Seu perfil atualmente não é público <br> e apenas quem te tocar pode vê-lo.",activate_profile_now:"Ative seu perfil agora",publish_profile_now:"Torne seu perfil público agora",link_add_p1:"Escolha um tipo de link",link_add_not_found:"Nenhum link encontrado 🤷",link_add_not_found_p2:"Se sentimos falta da sua plataforma favorita, envie-nos um email (<b>support@tapni.com</b>) ou mensagem nas redes sociais (<b>@tapni</b>)",link_add_not_found_p3:"Faremos o possível para suportar todas as plataformas 😉",featured:"Destaques",social_media:"Redes sociais",contact:"Contato",finance:"Finanças",portfolio:"Portfólio",music:"Música",business:"Negócios",fun:"Diversão",ecommerce:"Ecommerce",more:"Mais",email_username:"Email / Usuário",username:"Nome de usuário",password:"Senha",sign_in:"Entrar",sign_in_with:"Entrar com",sign_in_with_new:"Entrar com nova conta",sign_up_with:"Registrar com",select_sign_method:"Selecione um método de login",verify_account:"Verificar conta",terms_by_signing_in:"Ao entrar, você concorda com nossos",terms_by_registering:"Ao se registrar, você concorda com nossos",terms_by_submitting:"Ao enviar este formulário, você concorda com nossos Termos de Serviço",terms_of_service:"Termos de Serviço",and:"e",refresh:"Atualizar",privacy_policy:"Política de Privacidade",create_account:"Criar conta",reset_password:"Redefinir senha",reset_password_p1:"Se você não conseguiu redefinir sua senha,<br> entre em contato conosco em ",reset_password_p2:"Se você não conseguiu redefinir sua senha,<br> entre em contato conosco em",create_new_account:"Criar nova conta",maintenance_p1:"Voltaremos em breve",maintenance_p2:"Explore as coleções Tapni enquanto isso",maintenance_p3:"A Tapni está em manutenção programada <br> e deve voltar em alguns minutos.",offline_p1:"Sem conexão com a Internet",offline_p2:"Verifique sua conexão e atualize a página",offline_p3_1:"Enquanto estiver offline,",offline_p3_2:"você pode compartilhar sua carta de contato usando este QR code",products_p1:"Impressione todos que você conhece 😎 <br> Garanta já o seu 👇",cards:"Cartões",stickers:"Adesivos",keychains:"Chaveiros",explore_collection:"Explorar coleção",register:"Registrar",register_success:"Você está quase lá. Confirme seu email.",register_success_modal:"Conectado com outra conta com sucesso.",check_your_inbox:"Verifique sua caixa de entrada",tapni_tags:"Tags Tapni",tapni_tags_p1:"Configure tags conectadas ao seu perfil",tapni_tags_p2:"Não há tags conectadas ao seu perfil. <br> Conecte uma agora!",verify_account_p1:"Se você não recebeu um código, verifique sua <br> pasta de spam ou entre em contato conosco em",verify_account_success:"Conta verificada com sucesso. Por favor, altere sua senha agora.",verify_account_success2:"Conta verificada com sucesso. Tudo pronto!🥳",welcome:"Bem-vindo",welcome_p1:"ao futuro dos cartões de visita",how_it_works:"Como funciona",already_registered:"Já registrado",error:"Erro",success:"Sucesso",copied:"Copiado para a área de transferência",connect_validate:"Um dos dois campos de contato deve ser fornecido",connect_validate_name:"Por favor, insira seu nome",connect_validate_email:"Por favor, insira um email válido",link_validate:"Dados do link inválidos.",link_text_contact_card:"Carta de contato",link_text_custom_link:"Link personalizado",link_text_menu:"Menu",link_text_phone:"Telefone",save_to_apple_wallet:"Adicionar ao Apple Wallet",save_to_google_wallet:"Adicionar ao Google Wallet",card:"Cartão",sticker:"Adesivo",keychain:"Chaveiro",band:"Pulseira",case:"Capa",standee:"Totem",decoded:"Decodificado",wristbanditz:"Wristbanditz",update_p1:"Versão desatualizada do app detectada",update_p2:"Atualizar",update_p3:"Atualize o app para a versão mais recente",company_domain:"Domínio da sua empresa",search_company_domain:"Pesquisar domínio da empresa",enter_company_email:"Inserir email corporativo",company_not_found:"Empresa não encontrada",ik_company_domain:"Eu sei o domínio da empresa",idk_company_domain:"Eu não sei o domínio da empresa",continue:"Continuar",forbidden_rule:"Esta opção está desabilitada, contate o administrador da sua empresa.",companyName:"Nome da empresa",createMarkerPlaceholder:"Crie ou selecione um marcador",clickToCreateMarker:"Clique aqui para criar marcador",pleaseInviteUser:"Convide o usuário para ingressar na Tapni para ter dados sincronizados com você.",connectionSynchronized:"Os dados da conexão são sincronizados automaticamente.",viewProfile:"Ver perfil",createConnectionHeader:"Criar nova conexão",createConnectionButton:"Criar conexão",createConnectionSuccess:"Conexão criada.",allow_company_management:"Permitir gestão da empresa",company_join_request:"está solicitando gerenciar seu perfil e associá-lo à conta corporativa.",account_ownership_transfer:"A propriedade da sua conta será transferida para a empresa se você aceitar a solicitação. A empresa poderá modificar seu perfil, editar e adicionar links, ver suas conexões, modificar sua senha, excluir sua conta e muito mais. Certifique-se de verificar com sua empresa antes de aceitar a solicitação.",request_expired:"A solicitação expirou, peça à sua empresa para enviar uma nova.",request_expiration_desc:"Por segurança adicional, a solicitação funcionará apenas por 14 dias após o envio.",invitation_link_not_valid:"O link de convite não é válido!",invitation_link_not_valid2:"Clique novamente no botão do email de convite ou copie o link.",accept_request:"Aceitar solicitação",close:"Fechar",request_accepted:"A solicitação foi aceita com sucesso",companyEmail:"Email da empresa",companyPhone:"Telefone da empresa",addBusinessInformations:"Adicionar informações comerciais",resetFilter:"Redefinir",selectMarkers:"Selecionar marcadores",filterConnectionsHeader:"Filtrar conexões",selectConnectionType:"Selecionar tipo de conexão",all:"Todos",direct:"Direto",form:"Formulário",manually:"Manual",scan:"Digitalizar",sortOptions:"Opções de ordenação",date:"Data de criação",fullName:"Nome completo",descending:"Descendente",ascending:"Ascendente",selectDateRange:"Selecionar período",follow_up_reminder:"Lembrete de acompanhamento",now:"Agora",one_hour:"1 hora",one_day:"1 dia",three_days:"3 dias",one_week:"1 semana",two_weeks:"2 semanas",one_month:"1 mês",custom:"Escolher horário",set_reminder:"Definir lembrete",select_date_time:"Selecione a data e a hora",enter_reminder_text:"Insira o texto do lembrete",reminder_created:"Lembrete criado com sucesso",connectionNameLabel:"Insira o nome da conexão",connectionEmailLabel:"Insira o email privado",privatePhoneLabel:"Insira o telefone privado",companyNameLabel:"Insira o nome da empresa",businessEmail:"Email corporativo",businessEmailLabel:"Insira o email corporativo",businessPhone:"Telefone corporativo",businessPhoneLabel:"Insira o telefone corporativo",noteLabel:"Insira a nota",markersLabel:"Adicionar marcadores de conexão",showScan:"Mostrar digitalização",hideScan:"Ocultar digitalização",create_connection:"Criar conexão",create_manually:"Criar manualmente",create_using_scanner:"Digitalizar cartão de visita",companyTitle:"Cargo",companyTitleLabel:"Insira o cargo",allConnectionsLabel:"Todos os tipos de conexão",directConnectionsLabel:"Conexão direta no app com usuários Tapni",formConnectionsLabel:"Conexões preenchidas no formulário",manualConnectionsLabel:"Conexões criadas manualmente",scanConnectionsLabel:"Conexões criadas pelo scanner de cartões",analyticsHeader:"Análises",analyticsProfileViews:"Visualizações de perfil",analyticsLinkClicks:"Cliques no link",analyticsClickTroughRatio:"Taxa de cliques",analyticsTotalConnections:"Total de conexões",analyticsTopLinks:"Links mais populares",analyticsProfileVisits:"Visitas ao perfil",analyticsLinkVisits:"Visitas ao link",analyticsNewConnections:"Novas conexões",analyticsTopCountries:"Países principais",analyticsTopReferers:"Principais referenciadores",please_wait:"Por favor, aguarde...",click_here:"clique aqui",if_redirect_not_directly:"Se o redirecionamento não for realizado automaticamente",you_will_be_redirected:"Você será redirecionado para o aplicativo Tapni.",use_tapni_on_the_web:"Use Tapni na Web",login_by_scanning_qr_code:"Entre escaneando o QR Code",open_tapni_app_on_your_phone:"1. Abra o app Tapni no seu telefone",go_to_settings_link_a_device:"2. Vá em Configurações > Vincular um dispositivo",point_your_phone_at_this_qr_code:"3. Aponte seu telefone para este QR Code",choose_other_login_methods:"Escolha outros métodos de login",no_sso_logins:"Sua empresa não usa login SSO, por favor contate o administrador",mfa:"Autenticação Multifator",otp_title:"Insira o código MFA para continuar",otp_code:"Código MFA",otp_subtitle:"Insira o código do seu aplicativo autenticador",otp_p1:"Se você tiver problemas com o MFA, <br> contate-nos em",change_language:"Mudar idioma",welcome_account:"Bem-vindo ao Centro de Contas",security:"Segurança",security_p:"Gerencie suas opções de autenticação e status da conta",general:"Geral",general_p:"Gerencie seus dados pessoais e outras preferências",billing:"Faturamento",billing_p:"Gerencie suas assinaturas e perfis de pagamento",apps:"Aplicativos",apps_p:"Veja seus apps ativos e explore outros",apps_my:"Meus apps",mfa_auth:"Autenticação em 2 fatores",mfa_auth_enabled:"Sua conta está protegida por MFA.",mfa_auth_p:"Proteja sua conta contra acesso não autorizado ativando a autenticação multifator (MFA)",mfa_auth_qr:"Escaneie o QR code acima ou insira a chave secreta no seu aplicativo autenticador.",change_password:"Alterar senha",active_account:"Conta ativa",active_account_p:"Quando desativada, sua conta ficará temporariamente desativada até ser reativada.",delete_account:"Excluir conta",delete_account_p:"Excluir conta",permanent_delete:"Exclusão permanente",permanent_delete_p:"Se você excluir sua conta, todos os seus dados serão permanentemente excluídos. Esta ação não pode ser desfeita. Se você não tiver certeza, pode desativar temporariamente sua conta.",personal_details:"Detalhes pessoais",app_language_p:"Traduza o app para o idioma de sua preferência",app_region:"Região",app_region_p:"Selecione sua região para experiência de faturamento e suporte personalizada"}},wr=()=>Promise.resolve().then(()=>ji),Hi=[{path:"/welcome",name:"AuthWelcome",component:wr},{path:"/login",name:"AuthLogin",component:()=>Promise.resolve().then(()=>zs)},{path:"/callback/saml",name:"Callback",alias:["/callback/okta","/callback/auth","/callback/redirect"],component:()=>Promise.resolve().then(()=>op)},{path:"/qr",name:"AuthQR",component:()=>Promise.resolve().then(()=>wp)},{path:"/security",name:"AuthSecurity",component:()=>Promise.resolve().then(()=>td)},{path:"/billing",name:"AuthBilling",component:()=>Promise.resolve().then(()=>Bd)},{path:"/apps",name:"AuthApps",component:()=>Promise.resolve().then(()=>xp)},{path:"/apps/:app",name:"AuthApp",component:()=>Promise.resolve().then(()=>Kp)},{path:"/general",name:"AuthGeneral",component:()=>Promise.resolve().then(()=>ku)},{path:"/account",name:"AuthAccount",component:()=>Promise.resolve().then(()=>hc)},{path:"/reset",name:"AuthReset",component:()=>Promise.resolve().then(()=>Ju)},{path:"/register",name:"AuthRegister",component:()=>Promise.resolve().then(()=>jc)},{path:"/verify",name:"AuthVerify",component:()=>Promise.resolve().then(()=>tl)},{path:"/",name:"404",component:wr}],kr=en.createRouter({history:en.createWebHistory("/"),routes:Hi}),Cr={namespaced:!0,state:{$storex:{},view:"",lang:"en",realm:"app",refreshing:!1,loggedInUserId:"",apiRoot:"",account:{},device:{},loggedInAccounts:{},ssoLang:{en:hr.state,de:mr.state,es:fr.state,fr:gr.state,it:_r.state,sr:yr.state,tr:vr.state,cn:qi.state,kr:br.state,pt:Vi.state,ja:Fi.state},display:"npm",redirect_uri:"https://tapni.com/app/callback/auth",response_type:"token",state:"",allowedOriginsAuth:["https://business.tapni.com","https://business-dev.tapni.com","https://tapni.com","https://tapni.co","https://t.link","https://my.tapni.com","https://my.tapni.co","https://dev.tapni.co","https://dev.tapni.com","https://auth.tapni.com","https://auth.tapni.co","https://dev.mailsign.link","https://mailsign.link","https://sign.tapni.com","https://qrcodetoolkit.com","https://qr.tapni.com","https://designer.tapni.com","https://designer-dev.tapni.com","http://localhost:8080","https://localhost:8080","http://localhost:8081","http://localhost:7777","https://localhost:7777","http://localhost:8086","https://localhost:8085","http://localhost:8085","http://localhost","https://localhost","https://bigeye.tapni.com","https://bigeye-dev.tapni.com"]},mutations:{setAccountSettings(n,e){n.account=e},setStorageItem(n,e){n.$storex[e.name]=e.data},setStorage(n,e){n.$storex={...n.$storex,...e}},setLoggedInAccounts(n,e){n.loggedInAccounts={},e.forEach(t=>{n.loggedInAccounts[t.username]=t})},setLoggedInUserId(n,e){n.loggedInUserId=e},setRefreshTokens(n,e){n.$storex.refreshTokens=e},setRefreshToken(n,e){if(!e)return;let t=n.$storex.refreshTokens?n.$storex.refreshTokens.split(","):[];t=[e,...t.filter(o=>o!==e)],n.$storex.refreshTokens=t.join(",")},setToken(n,e){n.$storex.token=e},updateLang(n,e){n.lang=e},setView(n,e){n.view=e},setRedirectUri(n,e){n.redirect_uri=e},setDisplay(n,e){n.display=e},setState(n,e){n.state=e},setResponseType(n,e){n.response_type=e},setRealm(n,e){n.realm=e},setApiRoot(n,e){n.apiRoot=e},addAllowedOrigin(n,e){n.allowedOriginsAuth.includes(e)||n.allowedOriginsAuth.push(e)}},actions:{async getAccountSettings({state:n,commit:e,dispatch:t}){const[o,r]=await fe(Fe.getAccountSettings());if(o)return t("errorHandler",o);r.data.success&&e("setAccountSettings",r.data.data)},setStorageItem({commit:n},e){n("setStorageItem",e)},setStorage({commit:n},e){n("setStorage",e)},errorHandler({dispatch:n},e){if(e&&e.response&&e.response.data&&e.response.data.error){if(e.response.data.error==="ACCESS_DENIED")return n("logout");if(e.response.data.error==="OTP_REQUIRED")return X.$emit("toggleOTPField",!0);!e.response.data.error.includes("Network Error")&&!e.response.data.error.includes("TOKEN_EXPIRED")&&!e.response.data.error.includes("Cannot read properties")&&n("errorSnack",e.response.data.error)}return e},errorSnack({commit:n},e){let t=document.getElementById("snackbar"),o=document.getElementById("errorMessage"),r=document.getElementById("errorSnack");o.innerHTML=e,t.classList.add("show-snack"),r.classList.add("active-snack"),setTimeout(function(){r.classList.remove("active-snack"),t.classList.remove("show-snack")},3e3)},successSnack({commit:n},e){let t=document.getElementById("snackbar"),o=document.getElementById("successMessage"),r=document.getElementById("successSnack");o.innerHTML=e,t.classList.add("show-snack"),r.classList.add("active-snack"),setTimeout(function(){r.classList.remove("active-snack"),t.classList.remove("show-snack")},3e3)},closeSnacks({commit:n}){document.getElementById("snackbar").classList.remove("show-snack"),document.getElementById("successSnack").classList.remove("active-snack"),document.getElementById("errorSnack").classList.remove("active-snack")},async eventLog({commit:n,dispatch:e},t){const[o,r]=await fe(In.eventLog(t));return o?e("errorHandler",o):r},async maintenance({commit:n}){const[e,t]=await fe(mo.get("https://status.tapni.co/data/maintenance.json"));if(e)return console.error(e);if(t){let o=t.data;typeof t.data=="string"&&(o=JSON.parse(t.data)),o.api&&o.api.maintenanceActive&&(location.href="https://t.link/maintenance?msg="+o.api.msg)}},async loginSetup({commit:n,dispatch:e},t){t.data.refreshToken&&n("setRefreshToken",t.data.refreshToken),t.data.token&&n("setToken",t.data.token),n("setLoggedInUserId",t.data.data.id),n("setStorage",{UserId:t.data.data.id,username:t.data.data.username,localUser:t.data.data}),t.isModal===!0&&e("setLoggedInAccounts",[{id:t.data.data.id,username:t.data.data.username,name:t.data.data.name,refreshToken:t.data.refreshToken,photo:t.data.data.photo}])},async switchAccount({commit:n,dispatch:e,state:t},o){t.loggedInAccounts[o]&&(n("setStorage",{username:o,UserId:t.loggedInAccounts[o].id,localUser:t.loggedInAccounts[o]}),n("setLoggedInUserId",t.loggedInAccounts[o].id),n("setRefreshToken",t.loggedInAccounts[o].refreshToken),await e("refreshTokenAction",t.loggedInAccounts[o])),X.$emit("ssoEvent",{name:"switchAccount",data:{username:o}})},async refreshTokenAction({dispatch:n,commit:e,state:t,getters:o},r){if(t.refreshing)return null;t.refreshing=!0;const[i,s]=await fe(Fe.refreshToken({id:r.id,refreshToken:o.refreshTokens[0],refreshTokenAction:!0}));i&&i.response&&i.response.data.error==="ACCESS_DENIED"&&(n("logout",{refreshToken:o.refreshTokens[0]}),setTimeout(()=>location.reload(),1500)),s&&s.data&&(e("setToken",s.data.token),X.$emit("ssoEvent",{name:"setStorage",data:t.$storex})),t.refreshing=!1},async login({commit:n,state:e,dispatch:t},o){const[r,i]=await fe(Fe.login(o));if(r)return t("errorHandler",r);if(i.data.success)return e.display!=="popup"&&(t("loginSetup",{...i,isModal:o.isModal}),await t("getLoggedInAccounts")),t("loginSuccess",{...i,isModal:o.isModal}),!0},loginSuccess({commit:n,state:e,dispatch:t,getters:o},r){if(e.display==="redirect")return e.redirect_uri&&!e.allowedOriginsAuth.some(i=>e.redirect_uri.startsWith(i))?console.error("Redirect URI not allowed"):kr.push("/account");e.display==="popup"?e.allowedOriginsAuth.forEach(i=>{var s;(s=window.parent)==null||s.postMessage({code:r.data.auth_code,state:e.state},i)}):e.display==="npm"&&(X.$emit("ssoEvent",{name:"setLoading",data:!0}),X.$emit("ssoEvent",{name:"setStorage",data:e.$storex}),X.$emit("ssoEvent",{name:"getUser",data:{username:r.data.data.username}}),t("setLoggedInAccounts",[{id:r.data.data.id,username:r.data.data.username,name:r.data.data.name,refreshToken:r.data.refreshToken,photo:r.data.data.photo}]),r.isModal&&(t("successSnack",e.ssoLang[o.appLanguage].success_login),setTimeout(()=>{location.reload()},1500)),X.$emit("ssoEvent",{name:"redirect",data:"/"+r.data.data.username+"#edit"}))},async register({commit:n,dispatch:e},t){const[o,r]=await fe(Fe.register(t));return o?e("errorHandler",o):r},async verify({commit:n,dispatch:e},t){const[o,r]=await fe(Fe.verify(t));return o?e("errorHandler",o):r},async reset({commit:n,state:e,getters:t,dispatch:o},r){const[i,s]=await fe(Fe.sendResetEmail(r));if(i)return o("errorHandler",i);s.data.success&&o("successSnack",e.ssoLang[t.appLanguage].password_reset_success)},async exchangeAuthCode({commit:n,dispatch:e},t){const[o,r]=await fe(Fe.exchangeAuthCode(t));if(o)return e("errorHandler",o);await e("loginSetup",r),await e("getLoggedInAccounts"),e("loginSuccess",r)},async changePassword({commit:n,dispatch:e},t){const[o,r]=await fe(Fe.changePassword(t));return o?e("errorHandler",o):r.data.success},async newPassword({commit:n,dispatch:e},t){const[o,r]=await fe(In.newPassword(t));return o?e("errorHandler",o):r.data.success},async deleteAccount({commit:n,dispatch:e},t){const[o,r]=await fe(In.deleteAccount(t));return o?e("errorHandler",o):r.data.success},async registerDevice({commit:n,dispatch:e}){const t=await fo.Device.getId(),o=await fo.Device.getInfo();let r={device_id:t.uuid,platform:o.platform,device_info:{model:o.model,manufacturer:o.manufacturer,operatingSystem:o.operatingSystem,osVersion:o.osVersion,isVirtual:o.isVirtual,webViewVersion:o.webViewVersion}};const[i,s]=await fe(pr.registerDevice(r));return i?e("errorHandler",i):s},async addFcmToken({commit:n,dispatch:e},t){const[o,r]=await fe(pr.addFcmToken(t));return o?e("errorHandler",o):r},async acceptCompanyInvitation({commit:n,dispatch:e},t){const[o,r]=await fe(ko.acceptCompanyInvitation(t));return o?e("errorHandler",o):r},async logout({commit:n,dispatch:e,state:t},{refreshToken:o,sendRequest:r=!0}){r&&o&&Fe.logout({token:o}),t.$storex&&(t.$storex.username="",t.$storex.UserId="",t.$storex.localUser="",n("setToken","")),n("setLoggedInUserId","");const i=await e("unsetRefreshToken",o);if(i.length>=1)Object.keys(t.loggedInAccounts).forEach(s=>{t.loggedInAccounts[s].refreshToken===i[0]&&(n("setStorage",{username:s,UserId:t.loggedInAccounts[s].id,localUser:t.loggedInAccounts[s]}),n("setRefreshToken",i[0]),n("setLoggedInUserId",t.loggedInAccounts[s].id),e("refreshTokenAction",t.loggedInAccounts[s]).then(()=>{X.$emit("ssoEvent",{name:"switchAccount",data:{username:s}})}))});else{if(t.display==="redirect")return kr.push("/welcome");t.display==="npm"&&X.$emit("ssoEvent",{name:"redirect",data:"/welcome"})}},async getCompanyBySSOEmail({commit:n,dispatch:e},t){const[o,r]=await fe(ko.getBySSOEmail(t.email));if(o)return e("errorHandler",o);if(r.data.success)return r.data},async getLoggedInAccounts({getters:n,dispatch:e}){if(n.refreshTokens&&n.refreshTokens.length>=1){const[t,o]=await fe(Fe.getLoggedInAccounts({refreshTokens:n.refreshTokens}));if(t)return e("errorHandler",t);o&&o.data&&o.data.success&&e("setLoggedInAccounts",o.data.accounts)}},async loginUsingQR({commit:n,dispatch:e},t){const[o,r]=await fe(In.loginUsingQR(t));return o?e("errorHandler",o):r.data.success},setLoggedInAccounts({commit:n},e){n("setLoggedInAccounts",e),X.$emit("ssoEvent",{name:"setLoggedInAccounts",data:e})},setLoggedInUserId({commit:n},e){n("setLoggedInUserId",e)},setRefreshToken({commit:n},e){n("setRefreshToken",e)},async unsetRefreshToken({commit:n,state:e,dispatch:t,getters:o},r){let i=o.refreshTokens;return i=i==null?void 0:i.filter(s=>s!==r),n("setRefreshTokens",i.join(",")),i},setToken({commit:n},e){n("setToken",e)},updateLang({commit:n},e){n("updateLang",e)},setView({commit:n},e){n("setView",e)},setRedirectUri({commit:n},e){n("setRedirectUri",e)},setDisplay({commit:n},e){n("setDisplay",e)},setState({commit:n},e){n("setState",e)},setResponseType({commit:n},e){n("setResponseType",e)},setRealm({commit:n},e){n("setRealm",e)}},getters:{isLoggedIn:n=>!!n.$storex.token&&n.$storex.token!==""&&n.$storex.token!=="null",renderView:(n,e,t)=>{var o;return n.display!=="npm"?(o=t.route)==null?void 0:o.name:n.view},appRealm:n=>n.realm,appLanguage:n=>n.lang,accessToken:n=>n.$storex.token,refreshTokens:n=>n.$storex.refreshTokens.split(","),apiRoot:n=>n.apiRoot}},ft=ar.createStore({modules:{auth:Cr}}),ce=(n=null,e="v1")=>{const t=e;let o="https://api.tapni.com/"+e+"/";ft.getters["auth/apiRoot"]&&(o=ft.getters["auth/apiRoot"]+"/"+e+"/");let r=mo.create({baseURL:o,headers:{Authorization:`Bearer ${ft.getters["auth/accessToken"]}`,"X-Client-Name":"sso-"+t.platform,"X-Client-Version":t.version}});return r.interceptors.request.use(async function(i){if(["post","put","delete"].includes(i.method.toLowerCase())?i.data={...i.data,lang:ft.getters["auth/appLanguage"],realm:ft.getters["auth/appRealm"]||"app"}:i.method.toLowerCase()==="get"&&(i.params={...i.params,lang:ft.getters["auth/appLanguage"],realm:ft.getters["auth/appRealm"]||"app"}),ft.getters["auth/accessToken"]&&!n){const s=or.jwtDecode(ft.getters["auth/accessToken"]);if(s.exp-30<Math.floor(Date.now()/1e3))return ft.dispatch("auth/refreshTokenAction",s).then(()=>(i.headers={...i.headers,Authorization:`Bearer ${ft.getters["auth/accessToken"]}`},i))}return i}),r};let St;fo.Device.getId().then(n=>St=n.uuid);const Fe={register(n){return n.device_id=St,ce().post("/users/register",n)},login(n){return n.device_id=St,ce().post("/users/login",n)},logout(n){return n.device_id=St,ce().post("/users/logout",n)},refreshToken(n){return ce(!0).get(`/users/refresh-token?UserId=${n.id}&token=${n.refreshToken}`)},getLoggedInAccounts(n){return ce().post("/users/tokens",n)},sendResetEmail(n){return n.device_id=St,ce().post("/users/reset",n)},changePassword(n){return ce().put("/users/password",n,{headers:{Authorization:"Bearer "+n.token}})},verify(n){return ce().get("/users/verify",{params:{c:n.code,e:n.email,captchatoken:n.captchaToken}})},googleUrl(n){return ce().get("/users/google/url")},google(n){return n.device_id=St,ce().post("/users/google",n)},googleSDK(n){return n.device_id=St,ce().post("/users/google/sdk",n)},appleSDK(n){return n.device_id=St,ce().post("/users/apple/sdk",n)},microsoftSDK(n){return n.device_id=St,ce().post("/users/microsoft/sdk",n)},oktaSDK(n){return n.device_id=St,ce().post("/users/okta/sdk",n)},samlLoginUrl(n){return ce().post("/saml/url",n)},exchangeAuthCode(n){return ce().post("/users/auth-code",n)},setMfa(n){return ce().post("/users/set-mfa",n)},getAccountSettings(){return ce().get("/users/settings")},async getRecordById(n){return ce().post("/objects/record/"+n.id,n)},async getRecords(n){return ce().post("/objects/records",n)}},Er=tt.registerPlugin("GoogleAuth",{web:()=>Promise.resolve().then(()=>$p).then(n=>new n.GoogleAuthWeb)}),Tr={data(){return{googleLoad:!1}},computed:{displayGoogleLogin(){return!0}},mounted(){Er.initialize()},methods:{async googleLogin(){var t;this.googleLoad=!0;let[n,e]=await fe(Er.signIn());if(n)return this.googleLoad=!1;if(this.referral&&(e.ref=this.referral),e.authentication&&(e.authentication.accessToken||e.authentication.idToken)){this.referral&&(e.ref=this.referral),this.display==="popup"&&(e.response_type="code");const[o,r]=await fe(Fe.googleSDK(e,this.$storex));if(o)return this.googleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(o);if(r.data.success){if(this.display==="popup")return(t=window.parent)==null?void 0:t.postMessage({code:r.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(r),await this.getLoggedInAccounts(),this.loginSuccess({...r,isModal:this.isModal}),setTimeout(()=>{this.googleLoad=!1},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)}else this.googleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})}}},Ki=tt.registerPlugin("SignInWithApple",{web:()=>Promise.resolve().then(()=>Yp).then(n=>new n.SignInWithAppleWeb)}),Sr={data(){return{appleLoad:!1}},computed:{displayAppleLogin(){return Capacitor.isNativePlatform()&&Capacitor.getPlatform()==="ios"||!Capacitor.isNativePlatform()&&this.isiOS}},methods:{async appleLogin(){var t;this.appleLoad=!0;const[n,e]=await fe(Ki.authorize({clientId:"co.tapni.applelogin",redirectURI:"https://"+window.location.host+"/login",scopes:"email name"}));if(n)return this.appleLoad=!1;if(e.response.tokenData=or.jwtDecode(e.response.identityToken),e&&e.response&&e.response.identityToken){this.referral&&(e.response.ref=this.referral),this.display==="popup"&&(e.response_type="code");const[o,r]=await fe(Fe.appleSDK(e.response,this.$storex));if(o)return this.appleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(o);if(r.data.success){if(this.display==="popup")return(t=window.parent)==null?void 0:t.postMessage({code:r.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(r),await this.getLoggedInAccounts(),this.loginSuccess({...r,isModal:this.isModal}),setTimeout(()=>{this.appleLoad=!1},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)}else this.appleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})}}};/*! @azure/msal-browser v2.38.3 2023-10-27 *//*! *****************************************************************************
|
|
134
134
|
Copyright (c) Microsoft Corporation.
|
|
135
135
|
|
|
136
136
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -156,11 +156,11 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
|
|
|
156
156
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
157
157
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
158
158
|
PERFORMANCE OF THIS SOFTWARE.
|
|
159
|
-
***************************************************************************** */var To=function(n,e){return To=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])},To(n,e)};function Ye(n,e){To(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var he=function(){return he=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},he.apply(this,arguments)};function ne(n,e,t,o){function r(i){return i instanceof t?i:new t(function(s){s(i)})}return new(t||(t=Promise))(function(i,s){function c(u){try{h(o.next(u))}catch(g){s(g)}}function l(u){try{h(o.throw(u))}catch(g){s(g)}}function h(u){u.done?i(u.value):r(u.value).then(c,l)}h((o=o.apply(n,[])).next())})}function oe(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(h){return function(u){return l([h,u])}}function l(h){if(o)throw new TypeError("Generator is already executing.");for(;t;)try{if(o=1,r&&(i=h[0]&2?r.return:h[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,h[1])).done)return i;switch(r=0,i&&(h=[h[0]&2,i.value]),h[0]){case 0:case 1:i=h;break;case 4:return t.label++,{value:h[1],done:!1};case 5:t.label++,r=h[1],h=[0];continue;case 7:h=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){t.label=h[1];break}if(h[0]===6&&t.label<i[1]){t.label=i[1],i=h;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(h);break}i[2]&&t.ops.pop(),t.trys.pop();continue}h=e.call(n,t)}catch(u){h=[6,u],r=0}finally{o=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function $n(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;for(var o=Array(n),r=0,e=0;e<t;e++)for(var i=arguments[e],s=0,c=i.length;s<c;s++,r++)o[r]=i[s];return o}/*! @azure/msal-common v13.3.1 2023-10-27 */var b={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",REGIONAL_AUTH_NON_MSI_QUERY_STRING:"allowestsrnonmsi=true",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},An=[b.OPENID_SCOPE,b.PROFILE_SCOPE,b.OFFLINE_ACCESS_SCOPE],Ar=$n(An,[b.EMAIL_SCOPE]),ot;(function(n){n.CONTENT_TYPE="Content-Type",n.RETRY_AFTER="Retry-After",n.CCS_HEADER="X-AnchorMailbox",n.WWWAuthenticate="WWW-Authenticate",n.AuthenticationInfo="Authentication-Info",n.X_MS_REQUEST_ID="x-ms-request-id",n.X_MS_HTTP_VERSION="x-ms-httpver"})(ot||(ot={}));var Ne;(function(n){n.ID_TOKEN="idtoken",n.CLIENT_INFO="client.info",n.ADAL_ID_TOKEN="adal.idtoken",n.ERROR="error",n.ERROR_DESC="error.description",n.ACTIVE_ACCOUNT="active-account",n.ACTIVE_ACCOUNT_FILTERS="active-account-filters"})(Ne||(Ne={}));var on;(function(n){n.COMMON="common",n.ORGANIZATIONS="organizations",n.CONSUMERS="consumers"})(on||(on={}));var ae;(function(n){n.CLIENT_ID="client_id",n.REDIRECT_URI="redirect_uri",n.RESPONSE_TYPE="response_type",n.RESPONSE_MODE="response_mode",n.GRANT_TYPE="grant_type",n.CLAIMS="claims",n.SCOPE="scope",n.ERROR="error",n.ERROR_DESCRIPTION="error_description",n.ACCESS_TOKEN="access_token",n.ID_TOKEN="id_token",n.REFRESH_TOKEN="refresh_token",n.EXPIRES_IN="expires_in",n.STATE="state",n.NONCE="nonce",n.PROMPT="prompt",n.SESSION_STATE="session_state",n.CLIENT_INFO="client_info",n.CODE="code",n.CODE_CHALLENGE="code_challenge",n.CODE_CHALLENGE_METHOD="code_challenge_method",n.CODE_VERIFIER="code_verifier",n.CLIENT_REQUEST_ID="client-request-id",n.X_CLIENT_SKU="x-client-SKU",n.X_CLIENT_VER="x-client-VER",n.X_CLIENT_OS="x-client-OS",n.X_CLIENT_CPU="x-client-CPU",n.X_CLIENT_CURR_TELEM="x-client-current-telemetry",n.X_CLIENT_LAST_TELEM="x-client-last-telemetry",n.X_MS_LIB_CAPABILITY="x-ms-lib-capability",n.X_APP_NAME="x-app-name",n.X_APP_VER="x-app-ver",n.POST_LOGOUT_URI="post_logout_redirect_uri",n.ID_TOKEN_HINT="id_token_hint",n.DEVICE_CODE="device_code",n.CLIENT_SECRET="client_secret",n.CLIENT_ASSERTION="client_assertion",n.CLIENT_ASSERTION_TYPE="client_assertion_type",n.TOKEN_TYPE="token_type",n.REQ_CNF="req_cnf",n.OBO_ASSERTION="assertion",n.REQUESTED_TOKEN_USE="requested_token_use",n.ON_BEHALF_OF="on_behalf_of",n.FOCI="foci",n.CCS_HEADER="X-AnchorMailbox",n.RETURN_SPA_CODE="return_spa_code",n.NATIVE_BROKER="nativebroker",n.LOGOUT_HINT="logout_hint"})(ae||(ae={}));var gn;(function(n){n.ACCESS_TOKEN="access_token",n.XMS_CC="xms_cc"})(gn||(gn={}));var Ve={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},Rn;(function(n){n.ACCOUNT="account",n.SID="sid",n.LOGIN_HINT="login_hint",n.ID_TOKEN="id_token",n.DOMAIN_HINT="domain_hint",n.ORGANIZATIONS="organizations",n.CONSUMERS="consumers",n.ACCOUNT_ID="accountIdentifier",n.HOMEACCOUNT_ID="homeAccountIdentifier"})(Rn||(Rn={}));var Rr={PLAIN:"plain",S256:"S256"},Qn;(function(n){n.QUERY="query",n.FRAGMENT="fragment",n.FORM_POST="form_post"})(Qn||(Qn={}));var Wn;(function(n){n.IMPLICIT_GRANT="implicit",n.AUTHORIZATION_CODE_GRANT="authorization_code",n.CLIENT_CREDENTIALS_GRANT="client_credentials",n.RESOURCE_OWNER_PASSWORD_GRANT="password",n.REFRESH_TOKEN_GRANT="refresh_token",n.DEVICE_CODE_GRANT="device_code",n.JWT_BEARER="urn:ietf:params:oauth:grant-type:jwt-bearer"})(Wn||(Wn={}));var jt;(function(n){n.MSSTS_ACCOUNT_TYPE="MSSTS",n.ADFS_ACCOUNT_TYPE="ADFS",n.MSAV1_ACCOUNT_TYPE="MSA",n.GENERIC_ACCOUNT_TYPE="Generic"})(jt||(jt={}));var Pe;(function(n){n.CACHE_KEY_SEPARATOR="-",n.CLIENT_INFO_SEPARATOR="."})(Pe||(Pe={}));var Z;(function(n){n.ID_TOKEN="IdToken",n.ACCESS_TOKEN="AccessToken",n.ACCESS_TOKEN_WITH_AUTH_SCHEME="AccessToken_With_AuthScheme",n.REFRESH_TOKEN="RefreshToken"})(Z||(Z={}));var qt;(function(n){n[n.ADFS=1001]="ADFS",n[n.MSA=1002]="MSA",n[n.MSSTS=1003]="MSSTS",n[n.GENERIC=1004]="GENERIC",n[n.ACCESS_TOKEN=2001]="ACCESS_TOKEN",n[n.REFRESH_TOKEN=2002]="REFRESH_TOKEN",n[n.ID_TOKEN=2003]="ID_TOKEN",n[n.APP_METADATA=3001]="APP_METADATA",n[n.UNDEFINED=9999]="UNDEFINED"})(qt||(qt={}));var So="appmetadata",$i="client_info",Nn="1",Pn={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},ut;(function(n){n.CONFIG="config",n.CACHE="cache",n.NETWORK="network",n.HARDCODED_VALUES="hardcoded_values"})(ut||(ut={}));var Be={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},ge;(function(n){n.BEARER="Bearer",n.POP="pop",n.SSH="ssh-cert"})(ge||(ge={}));var Mn={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Nr={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Yn;(function(n){n.username="username",n.password="password"})(Yn||(Yn={}));var _n;(function(n){n[n.httpSuccess=200]="httpSuccess",n[n.httpBadRequest=400]="httpBadRequest"})(_n||(_n={}));var $t;(function(n){n.FAILED_AUTO_DETECTION="1",n.INTERNAL_CACHE="2",n.ENVIRONMENT_VARIABLE="3",n.IMDS="4"})($t||($t={}));var Ln;(function(n){n.CONFIGURED_MATCHES_DETECTED="1",n.CONFIGURED_NO_AUTO_DETECTION="2",n.CONFIGURED_NOT_DETECTED="3",n.AUTO_DETECTION_REQUESTED_SUCCESSFUL="4",n.AUTO_DETECTION_REQUESTED_FAILED="5"})(Ln||(Ln={}));var Qt;(function(n){n.NO_CACHE_HIT="0",n.FORCE_REFRESH="1",n.NO_CACHED_ACCESS_TOKEN="2",n.CACHED_ACCESS_TOKEN_EXPIRED="3",n.REFRESH_CACHED_ACCESS_TOKEN="4",n.CLAIMS_REQUESTED_CACHE_SKIPPED="5"})(Qt||(Qt={}));var Io;(function(n){n.Jwt="JWT",n.Jwk="JWK",n.Pop="pop"})(Io||(Io={}));/*! @azure/msal-common v13.3.1 2023-10-27 */var Jn={unexpectedError:{code:"unexpected_error",desc:"Unexpected error in authentication."},postRequestFailed:{code:"post_request_failed",desc:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."}},Y=function(n){Ye(e,n);function e(t,o,r){var i=this,s=o?t+": "+o:t;return i=n.call(this,s)||this,Object.setPrototypeOf(i,e.prototype),i.errorCode=t||b.EMPTY_STRING,i.errorMessage=o||b.EMPTY_STRING,i.subError=r||b.EMPTY_STRING,i.name="AuthError",i}return e.prototype.setCorrelationId=function(t){this.correlationId=t},e.createUnexpectedError=function(t){return new e(Jn.unexpectedError.code,Jn.unexpectedError.desc+": "+t)},e.createPostRequestFailed=function(t){return new e(Jn.postRequestFailed.code,Jn.postRequestFailed.desc+": "+t)},e}(Error);/*! @azure/msal-common v13.3.1 2023-10-27 */var Xn={createNewGuid:function(){var n="Crypto interface - createNewGuid() has not been implemented";throw Y.createUnexpectedError(n)},base64Decode:function(){var n="Crypto interface - base64Decode() has not been implemented";throw Y.createUnexpectedError(n)},base64Encode:function(){var n="Crypto interface - base64Encode() has not been implemented";throw Y.createUnexpectedError(n)},generatePkceCodes:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - generatePkceCodes() has not been implemented",Y.createUnexpectedError(n)})})},getPublicKeyThumbprint:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - getPublicKeyThumbprint() has not been implemented",Y.createUnexpectedError(n)})})},removeTokenBindingKey:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - removeTokenBindingKey() has not been implemented",Y.createUnexpectedError(n)})})},clearKeystore:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - clearKeystore() has not been implemented",Y.createUnexpectedError(n)})})},signJwt:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - signJwt() has not been implemented",Y.createUnexpectedError(n)})})},hashString:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - hashString() has not been implemented",Y.createUnexpectedError(n)})})}};/*! @azure/msal-common v13.3.1 2023-10-27 */var D={clientInfoDecodingError:{code:"client_info_decoding_error",desc:"The client info could not be parsed/decoded correctly. Please review the trace to determine the root cause."},clientInfoEmptyError:{code:"client_info_empty_error",desc:"The client info was empty. Please review the trace to determine the root cause."},tokenParsingError:{code:"token_parsing_error",desc:"Token cannot be parsed. Please review stack trace to determine root cause."},nullOrEmptyToken:{code:"null_or_empty_token",desc:"The token is null or empty. Please review the trace to determine the root cause."},endpointResolutionError:{code:"endpoints_resolution_error",desc:"Error: could not resolve endpoints. Please check network and try again."},networkError:{code:"network_error",desc:"Network request failed. Please check network trace to determine root cause."},unableToGetOpenidConfigError:{code:"openid_config_error",desc:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints."},hashNotDeserialized:{code:"hash_not_deserialized",desc:"The hash parameters could not be deserialized. Please review the trace to determine the root cause."},blankGuidGenerated:{code:"blank_guid_generated",desc:"The guid generated was blank. Please review the trace to determine the root cause."},invalidStateError:{code:"invalid_state",desc:"State was not the expected format. Please check the logs to determine whether the request was sent using ProtocolUtils.setRequestState()."},stateMismatchError:{code:"state_mismatch",desc:"State mismatch error. Please check your network. Continued requests may cause cache overflow."},stateNotFoundError:{code:"state_not_found",desc:"State not found"},nonceMismatchError:{code:"nonce_mismatch",desc:"Nonce mismatch error. This may be caused by a race condition in concurrent requests."},nonceNotFoundError:{code:"nonce_not_found",desc:"nonce not found"},authTimeNotFoundError:{code:"auth_time_not_found",desc:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information."},maxAgeTranspiredError:{code:"max_age_transpired",desc:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication."},noTokensFoundError:{code:"no_tokens_found",desc:"No tokens were found for the given scopes, and no authorization code was passed to acquireToken. You must retrieve an authorization code before making a call to acquireToken()."},multipleMatchingTokens:{code:"multiple_matching_tokens",desc:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account."},multipleMatchingAccounts:{code:"multiple_matching_accounts",desc:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account"},multipleMatchingAppMetadata:{code:"multiple_matching_appMetadata",desc:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata"},tokenRequestCannotBeMade:{code:"request_cannot_be_made",desc:"Token request cannot be made without authorization code or refresh token."},appendEmptyScopeError:{code:"cannot_append_empty_scope",desc:"Cannot append null or empty scope to ScopeSet. Please check the stack trace for more info."},removeEmptyScopeError:{code:"cannot_remove_empty_scope",desc:"Cannot remove null or empty scope from ScopeSet. Please check the stack trace for more info."},appendScopeSetError:{code:"cannot_append_scopeset",desc:"Cannot append ScopeSet due to error."},emptyInputScopeSetError:{code:"empty_input_scopeset",desc:"Empty input ScopeSet cannot be processed."},DeviceCodePollingCancelled:{code:"device_code_polling_cancelled",desc:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true."},DeviceCodeExpired:{code:"device_code_expired",desc:"Device code is expired."},DeviceCodeUnknownError:{code:"device_code_unknown_error",desc:"Device code stopped polling for unknown reasons."},NoAccountInSilentRequest:{code:"no_account_in_silent_request",desc:"Please pass an account object, silent flow is not supported without account information"},invalidCacheRecord:{code:"invalid_cache_record",desc:"Cache record object was null or undefined."},invalidCacheEnvironment:{code:"invalid_cache_environment",desc:"Invalid environment when attempting to create cache entry"},noAccountFound:{code:"no_account_found",desc:"No account found in cache for given key."},CachePluginError:{code:"no cache plugin set on CacheManager",desc:"ICachePlugin needs to be set before using readFromStorage or writeFromStorage"},noCryptoObj:{code:"no_crypto_object",desc:"No crypto object detected. This is required for the following operation: "},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},unexpectedAccountType:{code:"unexpected_account_type",desc:"Unexpected account type."},unexpectedCredentialType:{code:"unexpected_credential_type",desc:"Unexpected credential type."},invalidAssertion:{code:"invalid_assertion",desc:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515"},invalidClientCredential:{code:"invalid_client_credential",desc:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential"},tokenRefreshRequired:{code:"token_refresh_required",desc:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired."},userTimeoutReached:{code:"user_timeout_reached",desc:"User defined timeout for device code polling reached"},tokenClaimsRequired:{code:"token_claims_cnf_required_for_signedjwt",desc:"Cannot generate a POP jwt if the token_claims are not populated"},noAuthorizationCodeFromServer:{code:"authorization_code_missing_from_server_response",desc:"Server response does not contain an authorization code to proceed"},noAzureRegionDetected:{code:"no_azure_region_detected",desc:"No azure region was detected and no fallback was made available"},accessTokenEntityNullError:{code:"access_token_entity_null",desc:"Access token entity is null, please check logs and cache to ensure a valid access token is present."},bindingKeyNotRemovedError:{code:"binding_key_not_removed",desc:"Could not remove the credential's binding key from storage."},logoutNotSupported:{code:"end_session_endpoint_not_supported",desc:"Provided authority does not support logout."},keyIdMissing:{code:"key_id_missing",desc:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key."},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},userCanceledError:{code:"user_canceled",desc:"User canceled the flow."}},K=function(n){Ye(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="ClientAuthError",Object.setPrototypeOf(r,e.prototype),r}return e.createClientInfoDecodingError=function(t){return new e(D.clientInfoDecodingError.code,D.clientInfoDecodingError.desc+" Failed with error: "+t)},e.createClientInfoEmptyError=function(){return new e(D.clientInfoEmptyError.code,""+D.clientInfoEmptyError.desc)},e.createTokenParsingError=function(t){return new e(D.tokenParsingError.code,D.tokenParsingError.desc+" Failed with error: "+t)},e.createTokenNullOrEmptyError=function(t){return new e(D.nullOrEmptyToken.code,D.nullOrEmptyToken.desc+" Raw Token Value: "+t)},e.createEndpointDiscoveryIncompleteError=function(t){return new e(D.endpointResolutionError.code,D.endpointResolutionError.desc+" Detail: "+t)},e.createNetworkError=function(t,o){return new e(D.networkError.code,D.networkError.desc+" | Fetch client threw: "+o+" | Attempted to reach: "+t.split("?")[0])},e.createUnableToGetOpenidConfigError=function(t){return new e(D.unableToGetOpenidConfigError.code,D.unableToGetOpenidConfigError.desc+" Attempted to retrieve endpoints from: "+t)},e.createHashNotDeserializedError=function(t){return new e(D.hashNotDeserialized.code,D.hashNotDeserialized.desc+" Given Object: "+t)},e.createInvalidStateError=function(t,o){return new e(D.invalidStateError.code,D.invalidStateError.desc+" Invalid State: "+t+", Root Err: "+o)},e.createStateMismatchError=function(){return new e(D.stateMismatchError.code,D.stateMismatchError.desc)},e.createStateNotFoundError=function(t){return new e(D.stateNotFoundError.code,D.stateNotFoundError.desc+": "+t)},e.createNonceMismatchError=function(){return new e(D.nonceMismatchError.code,D.nonceMismatchError.desc)},e.createAuthTimeNotFoundError=function(){return new e(D.authTimeNotFoundError.code,D.authTimeNotFoundError.desc)},e.createMaxAgeTranspiredError=function(){return new e(D.maxAgeTranspiredError.code,D.maxAgeTranspiredError.desc)},e.createNonceNotFoundError=function(t){return new e(D.nonceNotFoundError.code,D.nonceNotFoundError.desc+": "+t)},e.createMultipleMatchingTokensInCacheError=function(){return new e(D.multipleMatchingTokens.code,D.multipleMatchingTokens.desc+".")},e.createMultipleMatchingAccountsInCacheError=function(){return new e(D.multipleMatchingAccounts.code,D.multipleMatchingAccounts.desc)},e.createMultipleMatchingAppMetadataInCacheError=function(){return new e(D.multipleMatchingAppMetadata.code,D.multipleMatchingAppMetadata.desc)},e.createTokenRequestCannotBeMadeError=function(){return new e(D.tokenRequestCannotBeMade.code,D.tokenRequestCannotBeMade.desc)},e.createAppendEmptyScopeToSetError=function(t){return new e(D.appendEmptyScopeError.code,D.appendEmptyScopeError.desc+" Given Scope: "+t)},e.createRemoveEmptyScopeFromSetError=function(t){return new e(D.removeEmptyScopeError.code,D.removeEmptyScopeError.desc+" Given Scope: "+t)},e.createAppendScopeSetError=function(t){return new e(D.appendScopeSetError.code,D.appendScopeSetError.desc+" Detail Error: "+t)},e.createEmptyInputScopeSetError=function(){return new e(D.emptyInputScopeSetError.code,""+D.emptyInputScopeSetError.desc)},e.createDeviceCodeCancelledError=function(){return new e(D.DeviceCodePollingCancelled.code,""+D.DeviceCodePollingCancelled.desc)},e.createDeviceCodeExpiredError=function(){return new e(D.DeviceCodeExpired.code,""+D.DeviceCodeExpired.desc)},e.createDeviceCodeUnknownError=function(){return new e(D.DeviceCodeUnknownError.code,""+D.DeviceCodeUnknownError.desc)},e.createNoAccountInSilentRequestError=function(){return new e(D.NoAccountInSilentRequest.code,""+D.NoAccountInSilentRequest.desc)},e.createNullOrUndefinedCacheRecord=function(){return new e(D.invalidCacheRecord.code,D.invalidCacheRecord.desc)},e.createInvalidCacheEnvironmentError=function(){return new e(D.invalidCacheEnvironment.code,D.invalidCacheEnvironment.desc)},e.createNoAccountFoundError=function(){return new e(D.noAccountFound.code,D.noAccountFound.desc)},e.createCachePluginError=function(){return new e(D.CachePluginError.code,""+D.CachePluginError.desc)},e.createNoCryptoObjectError=function(t){return new e(D.noCryptoObj.code,""+D.noCryptoObj.desc+t)},e.createInvalidCacheTypeError=function(){return new e(D.invalidCacheType.code,""+D.invalidCacheType.desc)},e.createUnexpectedAccountTypeError=function(){return new e(D.unexpectedAccountType.code,""+D.unexpectedAccountType.desc)},e.createUnexpectedCredentialTypeError=function(){return new e(D.unexpectedCredentialType.code,""+D.unexpectedCredentialType.desc)},e.createInvalidAssertionError=function(){return new e(D.invalidAssertion.code,""+D.invalidAssertion.desc)},e.createInvalidCredentialError=function(){return new e(D.invalidClientCredential.code,""+D.invalidClientCredential.desc)},e.createRefreshRequiredError=function(){return new e(D.tokenRefreshRequired.code,D.tokenRefreshRequired.desc)},e.createUserTimeoutReachedError=function(){return new e(D.userTimeoutReached.code,D.userTimeoutReached.desc)},e.createTokenClaimsRequiredError=function(){return new e(D.tokenClaimsRequired.code,D.tokenClaimsRequired.desc)},e.createNoAuthCodeInServerResponseError=function(){return new e(D.noAuthorizationCodeFromServer.code,D.noAuthorizationCodeFromServer.desc)},e.createBindingKeyNotRemovedError=function(){return new e(D.bindingKeyNotRemovedError.code,D.bindingKeyNotRemovedError.desc)},e.createLogoutNotSupportedError=function(){return new e(D.logoutNotSupported.code,D.logoutNotSupported.desc)},e.createKeyIdMissingError=function(){return new e(D.keyIdMissing.code,D.keyIdMissing.desc)},e.createNoNetworkConnectivityError=function(){return new e(D.noNetworkConnectivity.code,D.noNetworkConnectivity.desc)},e.createUserCanceledError=function(){return new e(D.userCanceledError.code,D.userCanceledError.desc)},e}(Y);/*! @azure/msal-common v13.3.1 2023-10-27 */var H=function(){function n(){}return n.decodeAuthToken=function(e){if(n.isEmpty(e))throw K.createTokenNullOrEmptyError(e);var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,o=t.exec(e);if(!o||o.length<4)throw K.createTokenParsingError("Given token is malformed: "+JSON.stringify(e));var r={header:o[1],JWSPayload:o[2],JWSSig:o[3]};return r},n.isEmpty=function(e){return typeof e>"u"||!e||e.length===0},n.isEmptyObj=function(e){if(e&&!n.isEmpty(e))try{var t=JSON.parse(e);return Object.keys(t).length===0}catch{}return!0},n.startsWith=function(e,t){return e.indexOf(t)===0},n.endsWith=function(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length},n.queryStringToObject=function(e){var t={},o=e.split("&"),r=function(i){return decodeURIComponent(i.replace(/\+/g," "))};return o.forEach(function(i){if(i.trim()){var s=i.split(/=(.+)/g,2),c=s[0],l=s[1];c&&l&&(t[r(c)]=r(l))}}),t},n.trimArrayEntries=function(e){return e.map(function(t){return t.trim()})},n.removeEmptyStringsFromArray=function(e){return e.filter(function(t){return!n.isEmpty(t)})},n.jsonParseHelper=function(e){try{return JSON.parse(e)}catch{return null}},n.matchPattern=function(e,t){var o=new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?"));return o.test(t)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ze;(function(n){n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Info=2]="Info",n[n.Verbose=3]="Verbose",n[n.Trace=4]="Trace"})(ze||(ze={}));var Ao=function(){function n(e,t,o){this.level=ze.Info;var r=function(){},i=e||n.createDefaultLoggerOptions();this.localCallback=i.loggerCallback||r,this.piiLoggingEnabled=i.piiLoggingEnabled||!1,this.level=typeof i.logLevel=="number"?i.logLevel:ze.Info,this.correlationId=i.correlationId||b.EMPTY_STRING,this.packageName=t||b.EMPTY_STRING,this.packageVersion=o||b.EMPTY_STRING}return n.createDefaultLoggerOptions=function(){return{loggerCallback:function(){},piiLoggingEnabled:!1,logLevel:ze.Info}},n.prototype.clone=function(e,t,o){return new n({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:o||this.correlationId},e,t)},n.prototype.logMessage=function(e,t){if(!(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)){var o=new Date().toUTCString(),r;H.isEmpty(t.correlationId)?H.isEmpty(this.correlationId)?r="["+o+"]":r="["+o+"] : ["+this.correlationId+"]":r="["+o+"] : ["+t.correlationId+"]";var i=r+" : "+this.packageName+"@"+this.packageVersion+" : "+ze[t.logLevel]+" - "+e;this.executeCallback(t.logLevel,i,t.containsPii||!1)}},n.prototype.executeCallback=function(e,t,o){this.localCallback&&this.localCallback(e,t,o)},n.prototype.error=function(e,t){this.logMessage(e,{logLevel:ze.Error,containsPii:!1,correlationId:t||b.EMPTY_STRING})},n.prototype.errorPii=function(e,t){this.logMessage(e,{logLevel:ze.Error,containsPii:!0,correlationId:t||b.EMPTY_STRING})},n.prototype.warning=function(e,t){this.logMessage(e,{logLevel:ze.Warning,containsPii:!1,correlationId:t||b.EMPTY_STRING})},n.prototype.warningPii=function(e,t){this.logMessage(e,{logLevel:ze.Warning,containsPii:!0,correlationId:t||b.EMPTY_STRING})},n.prototype.info=function(e,t){this.logMessage(e,{logLevel:ze.Info,containsPii:!1,correlationId:t||b.EMPTY_STRING})},n.prototype.infoPii=function(e,t){this.logMessage(e,{logLevel:ze.Info,containsPii:!0,correlationId:t||b.EMPTY_STRING})},n.prototype.verbose=function(e,t){this.logMessage(e,{logLevel:ze.Verbose,containsPii:!1,correlationId:t||b.EMPTY_STRING})},n.prototype.verbosePii=function(e,t){this.logMessage(e,{logLevel:ze.Verbose,containsPii:!0,correlationId:t||b.EMPTY_STRING})},n.prototype.trace=function(e,t){this.logMessage(e,{logLevel:ze.Trace,containsPii:!1,correlationId:t||b.EMPTY_STRING})},n.prototype.tracePii=function(e,t){this.logMessage(e,{logLevel:ze.Trace,containsPii:!0,correlationId:t||b.EMPTY_STRING})},n.prototype.isPiiLoggingEnabled=function(){return this.piiLoggingEnabled||!1},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Pr="@azure/msal-common",Ro="13.3.1";/*! @azure/msal-common v13.3.1 2023-10-27 */var On;(function(n){n[n.None=0]="None",n.AzurePublic="https://login.microsoftonline.com",n.AzurePpe="https://login.windows-ppe.net",n.AzureChina="https://login.chinacloudapi.cn",n.AzureGermany="https://login.microsoftonline.de",n.AzureUsGovernment="https://login.microsoftonline.us"})(On||(On={}));/*! @azure/msal-common v13.3.1 2023-10-27 */var re={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},claimsRequestParsingError:{code:"claims_request_parsing_error",desc:"Could not parse the given claims request object."},authorityUriInsecure:{code:"authority_uri_insecure",desc:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options"},urlParseError:{code:"url_parse_error",desc:"URL could not be parsed into appropriate segments."},urlEmptyError:{code:"empty_url_error",desc:"URL was empty or null."},emptyScopesError:{code:"empty_input_scopes_error",desc:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token."},nonArrayScopesError:{code:"nonarray_input_scopes_error",desc:"Scopes cannot be passed as non-array."},clientIdSingleScopeError:{code:"clientid_input_scopes_error",desc:"Client ID can only be provided as a single scope."},invalidPrompt:{code:"invalid_prompt_value",desc:"Supported prompt values are 'login', 'select_account', 'consent', 'create', 'none' and 'no_session'. Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest"},invalidClaimsRequest:{code:"invalid_claims",desc:"Given claims parameter must be a stringified JSON object."},tokenRequestEmptyError:{code:"token_request_empty",desc:"Token request was empty and not found in cache."},logoutRequestEmptyError:{code:"logout_request_empty",desc:"The logout request was null or undefined."},invalidCodeChallengeMethod:{code:"invalid_code_challenge_method",desc:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".'},invalidCodeChallengeParams:{code:"pkce_params_missing",desc:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request"},invalidCloudDiscoveryMetadata:{code:"invalid_cloud_discovery_metadata",desc:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields"},invalidAuthorityMetadata:{code:"invalid_authority_metadata",desc:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields."},untrustedAuthority:{code:"untrusted_authority",desc:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter."},invalidAzureCloudInstance:{code:"invalid_azure_cloud_instance",desc:"Invalid AzureCloudInstance provided. Please refer MSAL JS docs: aks.ms/msaljs/azure_cloud_instance for valid values"},missingSshJwk:{code:"missing_ssh_jwk",desc:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme."},missingSshKid:{code:"missing_ssh_kid",desc:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme."},missingNonceAuthenticationHeader:{code:"missing_nonce_authentication_header",desc:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce."},invalidAuthenticationHeader:{code:"invalid_authentication_header",desc:"Invalid authentication header provided"},authorityMismatch:{code:"authority_mismatch",desc:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."}},we=function(n){Ye(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="ClientConfigurationError",Object.setPrototypeOf(r,e.prototype),r}return e.createRedirectUriEmptyError=function(){return new e(re.redirectUriNotSet.code,re.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(re.postLogoutUriNotSet.code,re.postLogoutUriNotSet.desc)},e.createClaimsRequestParsingError=function(t){return new e(re.claimsRequestParsingError.code,re.claimsRequestParsingError.desc+" Given value: "+t)},e.createInsecureAuthorityUriError=function(t){return new e(re.authorityUriInsecure.code,re.authorityUriInsecure.desc+" Given URI: "+t)},e.createUrlParseError=function(t){return new e(re.urlParseError.code,re.urlParseError.desc+" Given Error: "+t)},e.createUrlEmptyError=function(){return new e(re.urlEmptyError.code,re.urlEmptyError.desc)},e.createEmptyScopesArrayError=function(){return new e(re.emptyScopesError.code,""+re.emptyScopesError.desc)},e.createClientIdSingleScopeError=function(t){return new e(re.clientIdSingleScopeError.code,re.clientIdSingleScopeError.desc+" Given Scopes: "+t)},e.createInvalidPromptError=function(t){return new e(re.invalidPrompt.code,re.invalidPrompt.desc+" Given value: "+t)},e.createInvalidClaimsRequestError=function(){return new e(re.invalidClaimsRequest.code,re.invalidClaimsRequest.desc)},e.createEmptyLogoutRequestError=function(){return new e(re.logoutRequestEmptyError.code,re.logoutRequestEmptyError.desc)},e.createEmptyTokenRequestError=function(){return new e(re.tokenRequestEmptyError.code,re.tokenRequestEmptyError.desc)},e.createInvalidCodeChallengeMethodError=function(){return new e(re.invalidCodeChallengeMethod.code,re.invalidCodeChallengeMethod.desc)},e.createInvalidCodeChallengeParamsError=function(){return new e(re.invalidCodeChallengeParams.code,re.invalidCodeChallengeParams.desc)},e.createInvalidCloudDiscoveryMetadataError=function(){return new e(re.invalidCloudDiscoveryMetadata.code,re.invalidCloudDiscoveryMetadata.desc)},e.createInvalidAuthorityMetadataError=function(){return new e(re.invalidAuthorityMetadata.code,re.invalidAuthorityMetadata.desc)},e.createUntrustedAuthorityError=function(){return new e(re.untrustedAuthority.code,re.untrustedAuthority.desc)},e.createInvalidAzureCloudInstanceError=function(){return new e(re.invalidAzureCloudInstance.code,re.invalidAzureCloudInstance.desc)},e.createMissingSshJwkError=function(){return new e(re.missingSshJwk.code,re.missingSshJwk.desc)},e.createMissingSshKidError=function(){return new e(re.missingSshKid.code,re.missingSshKid.desc)},e.createMissingNonceAuthenticationHeadersError=function(){return new e(re.missingNonceAuthenticationHeader.code,re.missingNonceAuthenticationHeader.desc)},e.createInvalidAuthenticationHeaderError=function(t,o){return new e(re.invalidAuthenticationHeader.code,re.invalidAuthenticationHeader.desc+". Invalid header: "+t+". Details: "+o)},e.createAuthorityMismatchError=function(){return new e(re.authorityMismatch.code,re.authorityMismatch.desc)},e}(K);/*! @azure/msal-common v13.3.1 2023-10-27 */var He=function(){function n(e){var t=this,o=e?H.trimArrayEntries($n(e)):[],r=o?H.removeEmptyStringsFromArray(o):[];this.validateInputScopes(r),this.scopes=new Set,r.forEach(function(i){return t.scopes.add(i)})}return n.fromString=function(e){var t=e||b.EMPTY_STRING,o=t.split(" ");return new n(o)},n.createSearchScopes=function(e){var t=new n(e);return t.containsOnlyOIDCScopes()?t.removeScope(b.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t},n.prototype.validateInputScopes=function(e){if(!e||e.length<1)throw we.createEmptyScopesArrayError()},n.prototype.containsScope=function(e){var t=this.printScopesLowerCase().split(" "),o=new n(t);return H.isEmpty(e)?!1:o.scopes.has(e.toLowerCase())},n.prototype.containsScopeSet=function(e){var t=this;return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(function(o){return t.containsScope(o)})},n.prototype.containsOnlyOIDCScopes=function(){var e=this,t=0;return Ar.forEach(function(o){e.containsScope(o)&&(t+=1)}),this.scopes.size===t},n.prototype.appendScope=function(e){H.isEmpty(e)||this.scopes.add(e.trim())},n.prototype.appendScopes=function(e){var t=this;try{e.forEach(function(o){return t.appendScope(o)})}catch(o){throw K.createAppendScopeSetError(o)}},n.prototype.removeScope=function(e){if(H.isEmpty(e))throw K.createRemoveEmptyScopeFromSetError(e);this.scopes.delete(e.trim())},n.prototype.removeOIDCScopes=function(){var e=this;Ar.forEach(function(t){e.scopes.delete(t)})},n.prototype.unionScopeSets=function(e){if(!e)throw K.createEmptyInputScopeSetError();var t=new Set;return e.scopes.forEach(function(o){return t.add(o.toLowerCase())}),this.scopes.forEach(function(o){return t.add(o.toLowerCase())}),t},n.prototype.intersectingScopeSets=function(e){if(!e)throw K.createEmptyInputScopeSetError();e.containsOnlyOIDCScopes()||e.removeOIDCScopes();var t=this.unionScopeSets(e),o=e.getScopeCount(),r=this.getScopeCount(),i=t.size;return i<r+o},n.prototype.getScopeCount=function(){return this.scopes.size},n.prototype.asArray=function(){var e=[];return this.scopes.forEach(function(t){return e.push(t)}),e},n.prototype.printScopes=function(){if(this.scopes){var e=this.asArray();return e.join(" ")}return b.EMPTY_STRING},n.prototype.printScopesLowerCase=function(){return this.printScopes().toLowerCase()},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */function Zn(n,e){if(H.isEmpty(n))throw K.createClientInfoEmptyError();try{var t=e.base64Decode(n);return JSON.parse(t)}catch(o){throw K.createClientInfoDecodingError(o.message)}}function vn(n){if(H.isEmpty(n))throw K.createClientInfoDecodingError("Home account ID was empty.");var e=n.split(Pe.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?b.EMPTY_STRING:e[1]}}/*! @azure/msal-common v13.3.1 2023-10-27 */var $e;(function(n){n[n.Default=0]="Default",n[n.Adfs=1]="Adfs",n[n.Dsts=2]="Dsts",n[n.Ciam=3]="Ciam"})($e||($e={}));/*! @azure/msal-common v13.3.1 2023-10-27 */var Ue=function(){function n(){}return n.prototype.generateAccountId=function(){var e=[this.homeAccountId,this.environment];return e.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.prototype.generateAccountKey=function(){return n.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})},n.prototype.generateType=function(){switch(this.authorityType){case jt.ADFS_ACCOUNT_TYPE:return qt.ADFS;case jt.MSAV1_ACCOUNT_TYPE:return qt.MSA;case jt.MSSTS_ACCOUNT_TYPE:return qt.MSSTS;case jt.GENERIC_ACCOUNT_TYPE:return qt.GENERIC;default:throw K.createUnexpectedAccountTypeError()}},n.prototype.getAccountInfo=function(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,idTokenClaims:this.idTokenClaims,nativeAccountId:this.nativeAccountId}},n.generateAccountCacheKey=function(e){var t=[e.homeAccountId,e.environment||b.EMPTY_STRING,e.tenantId||b.EMPTY_STRING];return t.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.createAccount=function(e,t,o,r,i,s,c,l){var h,u,g,f,w,C,P=new n;P.authorityType=jt.MSSTS_ACCOUNT_TYPE,P.clientInfo=e,P.homeAccountId=t,P.nativeAccountId=l;var M=c||r&&r.getPreferredCache();if(!M)throw K.createInvalidCacheEnvironmentError();if(P.environment=M,P.realm=((h=o==null?void 0:o.claims)===null||h===void 0?void 0:h.tid)||b.EMPTY_STRING,o){P.idTokenClaims=o.claims,P.localAccountId=((u=o==null?void 0:o.claims)===null||u===void 0?void 0:u.oid)||((g=o==null?void 0:o.claims)===null||g===void 0?void 0:g.sub)||b.EMPTY_STRING;var j=(f=o==null?void 0:o.claims)===null||f===void 0?void 0:f.preferred_username,N=!((w=o==null?void 0:o.claims)===null||w===void 0)&&w.emails?o.claims.emails[0]:null;P.username=j||N||b.EMPTY_STRING,P.name=(C=o==null?void 0:o.claims)===null||C===void 0?void 0:C.name}return P.cloudGraphHostName=i,P.msGraphHost=s,P},n.createGenericAccount=function(e,t,o,r,i,s){var c,l,h,u,g=new n;g.authorityType=o&&o.authorityType===$e.Adfs?jt.ADFS_ACCOUNT_TYPE:jt.GENERIC_ACCOUNT_TYPE,g.homeAccountId=e,g.realm=b.EMPTY_STRING;var f=s||o&&o.getPreferredCache();if(!f)throw K.createInvalidCacheEnvironmentError();return t&&(g.localAccountId=((c=t==null?void 0:t.claims)===null||c===void 0?void 0:c.oid)||((l=t==null?void 0:t.claims)===null||l===void 0?void 0:l.sub)||b.EMPTY_STRING,g.username=((h=t==null?void 0:t.claims)===null||h===void 0?void 0:h.upn)||b.EMPTY_STRING,g.name=((u=t==null?void 0:t.claims)===null||u===void 0?void 0:u.name)||b.EMPTY_STRING,g.idTokenClaims=t==null?void 0:t.claims),g.environment=f,g.cloudGraphHostName=r,g.msGraphHost=i,g},n.generateHomeAccountId=function(e,t,o,r,i){var s,c=!((s=i==null?void 0:i.claims)===null||s===void 0)&&s.sub?i.claims.sub:b.EMPTY_STRING;if(t===$e.Adfs||t===$e.Dsts)return c;if(e)try{var l=Zn(e,r);if(!H.isEmpty(l.uid)&&!H.isEmpty(l.utid))return""+l.uid+Pe.CLIENT_INFO_SEPARATOR+l.utid}catch{}return o.verbose("No client info in response"),c},n.isAccountEntity=function(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1},n.accountInfoIsEqual=function(e,t,o){if(!e||!t)return!1;var r=!0;if(o){var i=e.idTokenClaims||{},s=t.idTokenClaims||{};r=i.iat===s.iat&&i.nonce===s.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&r},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var It=function(){function n(e,t){if(H.isEmpty(e))throw K.createTokenNullOrEmptyError(e);this.rawToken=e,this.claims=n.extractTokenClaims(e,t)}return n.extractTokenClaims=function(e,t){var o=H.decodeAuthToken(e);try{var r=o.JWSPayload,i=t.base64Decode(r);return JSON.parse(i)}catch(s){throw K.createTokenParsingError(s)}},n.checkMaxAge=function(e,t){var o=3e5;if(t===0||Date.now()-o>e+t)throw K.createMaxAgeTranspiredError()},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Je=function(){function n(e,t,o){this.clientId=e,this.cryptoImpl=t,this.commonLogger=o.clone(Pr,Ro)}return n.prototype.getAllAccounts=function(){var e=this,t=this.getAccountKeys();if(t.length<1)return[];var o=t.reduce(function(i,s){var c=e.getAccount(s);return c&&i.push(c),i},[]);if(o.length<1)return[];var r=o.map(function(i){return e.getAccountInfoFromEntity(i)});return r},n.prototype.getAccountInfoFilteredBy=function(e){var t=this.getAccountsFilteredBy(e);return t.length>0?this.getAccountInfoFromEntity(t[0]):null},n.prototype.getAccountInfoFromEntity=function(e){var t=e.getAccountInfo(),o=this.getIdToken(t);return o&&(t.idToken=o.secret,t.idTokenClaims=new It(o.secret,this.cryptoImpl).claims),t},n.prototype.saveCacheRecord=function(e){return ne(this,void 0,void 0,function(){return oe(this,function(t){switch(t.label){case 0:if(!e)throw K.createNullOrUndefinedCacheRecord();return e.account&&this.setAccount(e.account),e.idToken&&this.setIdTokenCredential(e.idToken),e.accessToken?[4,this.saveAccessToken(e.accessToken)]:[3,2];case 1:t.sent(),t.label=2;case 2:return e.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata),[2]}})})},n.prototype.saveAccessToken=function(e){return ne(this,void 0,void 0,function(){var t,o,r,i,s=this;return oe(this,function(c){switch(c.label){case 0:return t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},o=this.getTokenKeys(),r=He.fromString(e.target),i=[],o.accessToken.forEach(function(l){if(s.accessTokenKeyMatchesFilter(l,t,!1)){var h=s.getAccessTokenCredential(l);if(h&&s.credentialMatchesFilter(h,t)){var u=He.fromString(h.target);u.intersectingScopeSets(r)&&i.push(s.removeAccessToken(l))}}}),[4,Promise.all(i)];case 1:return c.sent(),this.setAccessTokenCredential(e),[2]}})})},n.prototype.getAccountsFilteredBy=function(e){var t=this,o=this.getAccountKeys(),r=[];return o.forEach(function(i){if(t.isAccountKey(i,e.homeAccountId,e.realm)){var s=t.getAccount(i);s&&(e.homeAccountId&&!t.matchHomeAccountId(s,e.homeAccountId)||e.localAccountId&&!t.matchLocalAccountId(s,e.localAccountId)||e.username&&!t.matchUsername(s,e.username)||e.environment&&!t.matchEnvironment(s,e.environment)||e.realm&&!t.matchRealm(s,e.realm)||e.nativeAccountId&&!t.matchNativeAccountId(s,e.nativeAccountId)||r.push(s))}}),r},n.prototype.isAccountKey=function(e,t,o){return!(e.split(Pe.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||o&&!e.toLowerCase().includes(o.toLowerCase()))},n.prototype.isCredentialKey=function(e){if(e.split(Pe.CACHE_KEY_SEPARATOR).length<6)return!1;var t=e.toLowerCase();if(t.indexOf(Z.ID_TOKEN.toLowerCase())===-1&&t.indexOf(Z.ACCESS_TOKEN.toLowerCase())===-1&&t.indexOf(Z.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&t.indexOf(Z.REFRESH_TOKEN.toLowerCase())===-1)return!1;if(t.indexOf(Z.REFRESH_TOKEN.toLowerCase())>-1){var o=""+Z.REFRESH_TOKEN+Pe.CACHE_KEY_SEPARATOR+this.clientId+Pe.CACHE_KEY_SEPARATOR,r=""+Z.REFRESH_TOKEN+Pe.CACHE_KEY_SEPARATOR+Nn+Pe.CACHE_KEY_SEPARATOR;if(t.indexOf(o.toLowerCase())===-1&&t.indexOf(r.toLowerCase())===-1)return!1}else if(t.indexOf(this.clientId.toLowerCase())===-1)return!1;return!0},n.prototype.credentialMatchesFilter=function(e,t){return!(t.clientId&&!this.matchClientId(e,t.clientId)||t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash)||typeof t.homeAccountId=="string"&&!this.matchHomeAccountId(e,t.homeAccountId)||t.environment&&!this.matchEnvironment(e,t.environment)||t.realm&&!this.matchRealm(e,t.realm)||t.credentialType&&!this.matchCredentialType(e,t.credentialType)||t.familyId&&!this.matchFamilyId(e,t.familyId)||t.target&&!this.matchTarget(e,t.target)||(t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash||e.credentialType===Z.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(t.tokenType&&!this.matchTokenType(e,t.tokenType)||t.tokenType===ge.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId)))},n.prototype.getAppMetadataFilteredBy=function(e){return this.getAppMetadataFilteredByInternal(e.environment,e.clientId)},n.prototype.getAppMetadataFilteredByInternal=function(e,t){var o=this,r=this.getKeys(),i={};return r.forEach(function(s){if(o.isAppMetadata(s)){var c=o.getAppMetadata(s);c&&(e&&!o.matchEnvironment(c,e)||t&&!o.matchClientId(c,t)||(i[s]=c))}}),i},n.prototype.getAuthorityMetadataByAlias=function(e){var t=this,o=this.getAuthorityMetadataKeys(),r=null;return o.forEach(function(i){if(!(!t.isAuthorityMetadata(i)||i.indexOf(t.clientId)===-1)){var s=t.getAuthorityMetadata(i);s&&s.aliases.indexOf(e)!==-1&&(r=s)}}),r},n.prototype.removeAllAccounts=function(){return ne(this,void 0,void 0,function(){var e,t,o=this;return oe(this,function(r){switch(r.label){case 0:return e=this.getAccountKeys(),t=[],e.forEach(function(i){t.push(o.removeAccount(i))}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},n.prototype.removeAccount=function(e){return ne(this,void 0,void 0,function(){var t;return oe(this,function(o){switch(o.label){case 0:if(t=this.getAccount(e),!t)throw K.createNoAccountFoundError();return[4,this.removeAccountContext(t)];case 1:return o.sent(),this.removeItem(e),[2]}})})},n.prototype.removeAccountContext=function(e){return ne(this,void 0,void 0,function(){var t,o,r,i=this;return oe(this,function(s){switch(s.label){case 0:return t=this.getTokenKeys(),o=e.generateAccountId(),r=[],t.idToken.forEach(function(c){c.indexOf(o)===0&&i.removeIdToken(c)}),t.accessToken.forEach(function(c){c.indexOf(o)===0&&r.push(i.removeAccessToken(c))}),t.refreshToken.forEach(function(c){c.indexOf(o)===0&&i.removeRefreshToken(c)}),[4,Promise.all(r)];case 1:return s.sent(),[2]}})})},n.prototype.removeAccessToken=function(e){return ne(this,void 0,void 0,function(){var t,o,r;return oe(this,function(i){switch(i.label){case 0:if(t=this.getAccessTokenCredential(e),!t)return[2];if(t.credentialType.toLowerCase()!==Z.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())return[3,4];if(t.tokenType!==ge.POP)return[3,4];if(o=t,r=o.keyId,!r)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.cryptoImpl.removeTokenBindingKey(r)];case 2:return i.sent(),[3,4];case 3:throw i.sent(),K.createBindingKeyNotRemovedError();case 4:return[2,this.removeItem(e)]}})})},n.prototype.removeAppMetadata=function(){var e=this,t=this.getKeys();return t.forEach(function(o){e.isAppMetadata(o)&&e.removeItem(o)}),!0},n.prototype.readCacheRecord=function(e,t,o){var r=this.getTokenKeys(),i=this.readAccountFromCache(e),s=this.getIdToken(e,r),c=this.getAccessToken(e,t,r),l=this.getRefreshToken(e,!1,r),h=this.readAppMetadataFromCache(o);return i&&s&&(i.idTokenClaims=new It(s.secret,this.cryptoImpl).claims),{account:i,idToken:s,accessToken:c,refreshToken:l,appMetadata:h}},n.prototype.readAccountFromCache=function(e){var t=Ue.generateAccountCacheKey(e);return this.getAccount(t)},n.prototype.getIdToken=function(e,t){var o=this;this.commonLogger.trace("CacheManager - getIdToken called");var r={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Z.ID_TOKEN,clientId:this.clientId,realm:e.tenantId},i=this.getIdTokensByFilter(r,t),s=i.length;return s<1?(this.commonLogger.info("CacheManager:getIdToken - No token found"),null):s>1?(this.commonLogger.info("CacheManager:getIdToken - Multiple id tokens found, clearing them"),i.forEach(function(c){o.removeIdToken(c.generateCredentialKey())}),null):(this.commonLogger.info("CacheManager:getIdToken - Returning id token"),i[0])},n.prototype.getIdTokensByFilter=function(e,t){var o=this,r=t&&t.idToken||this.getTokenKeys().idToken,i=[];return r.forEach(function(s){if(o.idTokenKeyMatchesFilter(s,he({clientId:o.clientId},e))){var c=o.getIdTokenCredential(s);c&&o.credentialMatchesFilter(c,e)&&i.push(c)}}),i},n.prototype.idTokenKeyMatchesFilter=function(e,t){var o=e.toLowerCase();return!(t.clientId&&o.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&o.indexOf(t.homeAccountId.toLowerCase())===-1)},n.prototype.removeIdToken=function(e){this.removeItem(e)},n.prototype.removeRefreshToken=function(e){this.removeItem(e)},n.prototype.getAccessToken=function(e,t,o){var r=this;this.commonLogger.trace("CacheManager - getAccessToken called");var i=He.createSearchScopes(t.scopes),s=t.authenticationScheme||ge.BEARER,c=s&&s.toLowerCase()!==ge.BEARER.toLowerCase()?Z.ACCESS_TOKEN_WITH_AUTH_SCHEME:Z.ACCESS_TOKEN,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:c,clientId:this.clientId,realm:e.tenantId,target:i,tokenType:s,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},h=o&&o.accessToken||this.getTokenKeys().accessToken,u=[];h.forEach(function(f){if(r.accessTokenKeyMatchesFilter(f,l,!0)){var w=r.getAccessTokenCredential(f);w&&r.credentialMatchesFilter(w,l)&&u.push(w)}});var g=u.length;return g<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):g>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),u.forEach(function(f){r.removeAccessToken(f.generateCredentialKey())}),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),u[0])},n.prototype.accessTokenKeyMatchesFilter=function(e,t,o){var r=e.toLowerCase();if(t.clientId&&r.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&r.indexOf(t.homeAccountId.toLowerCase())===-1||t.realm&&r.indexOf(t.realm.toLowerCase())===-1||t.requestedClaimsHash&&r.indexOf(t.requestedClaimsHash.toLowerCase())===-1)return!1;if(t.target)for(var i=t.target.asArray(),s=0;s<i.length;s++){if(o&&!r.includes(i[s].toLowerCase()))return!1;if(!o&&r.includes(i[s].toLowerCase()))return!0}return!0},n.prototype.getAccessTokensByFilter=function(e){var t=this,o=this.getTokenKeys(),r=[];return o.accessToken.forEach(function(i){if(t.accessTokenKeyMatchesFilter(i,e,!0)){var s=t.getAccessTokenCredential(i);s&&t.credentialMatchesFilter(s,e)&&r.push(s)}}),r},n.prototype.getRefreshToken=function(e,t,o){var r=this;this.commonLogger.trace("CacheManager - getRefreshToken called");var i=t?Nn:void 0,s={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Z.REFRESH_TOKEN,clientId:this.clientId,familyId:i},c=o&&o.refreshToken||this.getTokenKeys().refreshToken,l=[];c.forEach(function(u){if(r.refreshTokenKeyMatchesFilter(u,s)){var g=r.getRefreshTokenCredential(u);g&&r.credentialMatchesFilter(g,s)&&l.push(g)}});var h=l.length;return h<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])},n.prototype.refreshTokenKeyMatchesFilter=function(e,t){var o=e.toLowerCase();return!(t.familyId&&o.indexOf(t.familyId.toLowerCase())===-1||!t.familyId&&t.clientId&&o.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&o.indexOf(t.homeAccountId.toLowerCase())===-1)},n.prototype.readAppMetadataFromCache=function(e){var t={environment:e,clientId:this.clientId},o=this.getAppMetadataFilteredBy(t),r=Object.keys(o).map(function(s){return o[s]}),i=r.length;if(i<1)return null;if(i>1)throw K.createMultipleMatchingAppMetadataInCacheError();return r[0]},n.prototype.isAppMetadataFOCI=function(e){var t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===Nn)},n.prototype.matchHomeAccountId=function(e,t){return typeof e.homeAccountId=="string"&&t===e.homeAccountId},n.prototype.matchLocalAccountId=function(e,t){return typeof e.localAccountId=="string"&&t===e.localAccountId},n.prototype.matchUsername=function(e,t){return typeof e.username=="string"&&t.toLowerCase()===e.username.toLowerCase()},n.prototype.matchUserAssertionHash=function(e,t){return!!(e.userAssertionHash&&t===e.userAssertionHash)},n.prototype.matchEnvironment=function(e,t){var o=this.getAuthorityMetadataByAlias(t);return!!(o&&o.aliases.indexOf(e.environment)>-1)},n.prototype.matchCredentialType=function(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()},n.prototype.matchClientId=function(e,t){return!!(e.clientId&&t===e.clientId)},n.prototype.matchFamilyId=function(e,t){return!!(e.familyId&&t===e.familyId)},n.prototype.matchRealm=function(e,t){return!!(e.realm&&t===e.realm)},n.prototype.matchNativeAccountId=function(e,t){return!!(e.nativeAccountId&&t===e.nativeAccountId)},n.prototype.matchTarget=function(e,t){var o=e.credentialType!==Z.ACCESS_TOKEN&&e.credentialType!==Z.ACCESS_TOKEN_WITH_AUTH_SCHEME;if(o||!e.target)return!1;var r=He.fromString(e.target);return r.containsScopeSet(t)},n.prototype.matchTokenType=function(e,t){return!!(e.tokenType&&e.tokenType===t)},n.prototype.matchKeyId=function(e,t){return!!(e.keyId&&e.keyId===t)},n.prototype.isAppMetadata=function(e){return e.indexOf(So)!==-1},n.prototype.isAuthorityMetadata=function(e){return e.indexOf(Pn.CACHE_KEY)!==-1},n.prototype.generateAuthorityMetadataCacheKey=function(e){return Pn.CACHE_KEY+"-"+this.clientId+"-"+e},n.toObject=function(e,t){for(var o in t)e[o]=t[o];return e},n}(),Qi=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.setAccount=function(){var t="Storage interface - setAccount() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAccount=function(){var t="Storage interface - getAccount() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setIdTokenCredential=function(){var t="Storage interface - setIdTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getIdTokenCredential=function(){var t="Storage interface - getIdTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setAccessTokenCredential=function(){var t="Storage interface - setAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAccessTokenCredential=function(){var t="Storage interface - getAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setRefreshTokenCredential=function(){var t="Storage interface - setRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getRefreshTokenCredential=function(){var t="Storage interface - getRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setAppMetadata=function(){var t="Storage interface - setAppMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAppMetadata=function(){var t="Storage interface - getAppMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setServerTelemetry=function(){var t="Storage interface - setServerTelemetry() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getServerTelemetry=function(){var t="Storage interface - getServerTelemetry() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setAuthorityMetadata=function(){var t="Storage interface - setAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAuthorityMetadata=function(){var t="Storage interface - getAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAuthorityMetadataKeys=function(){var t="Storage interface - getAuthorityMetadataKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setThrottlingCache=function(){var t="Storage interface - setThrottlingCache() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getThrottlingCache=function(){var t="Storage interface - getThrottlingCache() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.removeItem=function(){var t="Storage interface - removeItem() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.containsKey=function(){var t="Storage interface - containsKey() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getKeys=function(){var t="Storage interface - getKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAccountKeys=function(){var t="Storage interface - getAccountKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getTokenKeys=function(){var t="Storage interface - getTokenKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.clear=function(){return ne(this,void 0,void 0,function(){var t;return oe(this,function(o){throw t="Storage interface - clear() has not been implemented for the cacheStorage interface.",Y.createUnexpectedError(t)})})},e.prototype.updateCredentialCacheKey=function(){var t="Storage interface - updateCredentialCacheKey() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e}(Je);/*! @azure/msal-common v13.3.1 2023-10-27 */var Wi=300,Mr={tokenRenewalOffsetSeconds:Wi,preventCorsPreflight:!1},Yi={loggerCallback:function(){},piiLoggingEnabled:!1,logLevel:ze.Info,correlationId:b.EMPTY_STRING},Ji={claimsBasedCachingEnabled:!0},Xi={sendGetRequestAsync:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Network interface - sendGetRequestAsync() has not been implemented",Y.createUnexpectedError(n)})})},sendPostRequestAsync:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Network interface - sendPostRequestAsync() has not been implemented",Y.createUnexpectedError(n)})})}},Zi={sku:b.SKU,version:Ro,cpu:b.EMPTY_STRING,os:b.EMPTY_STRING},ea={clientSecret:b.EMPTY_STRING,clientAssertion:void 0},ta={azureCloudInstance:On.None,tenant:""+b.DEFAULT_COMMON_TENANT},na={application:{appName:"",appVersion:""}};function oa(n){var e=n.authOptions,t=n.systemOptions,o=n.loggerOptions,r=n.cacheOptions,i=n.storageInterface,s=n.networkInterface,c=n.cryptoInterface,l=n.clientCredentials,h=n.libraryInfo,u=n.telemetry,g=n.serverTelemetryManager,f=n.persistencePlugin,w=n.serializableCache,C=he(he({},Yi),o);return{authOptions:ra(e),systemOptions:he(he({},Mr),t),loggerOptions:C,cacheOptions:he(he({},Ji),r),storageInterface:i||new Qi(e.clientId,Xn,new Ao(C)),networkInterface:s||Xi,cryptoInterface:c||Xn,clientCredentials:l||ea,libraryInfo:he(he({},Zi),h),telemetry:he(he({},na),u),serverTelemetryManager:g||null,persistencePlugin:f||null,serializableCache:w||null}}function ra(n){return he({clientCapabilities:[],azureCloudOptions:ta,skipAuthorityMetadataCache:!1},n)}/*! @azure/msal-common v13.3.1 2023-10-27 */var rn=function(n){Ye(e,n);function e(t,o,r){var i=n.call(this,t,o,r)||this;return i.name="ServerError",Object.setPrototypeOf(i,e.prototype),i}return e}(Y);/*! @azure/msal-common v13.3.1 2023-10-27 */var eo=function(){function n(){}return n.generateThrottlingStorageKey=function(e){return Mn.THROTTLING_PREFIX+"."+JSON.stringify(e)},n.preProcess=function(e,t){var o,r=n.generateThrottlingStorageKey(t),i=e.getThrottlingCache(r);if(i){if(i.throttleTime<Date.now()){e.removeItem(r);return}throw new rn(((o=i.errorCodes)===null||o===void 0?void 0:o.join(" "))||b.EMPTY_STRING,i.errorMessage,i.subError)}},n.postProcess=function(e,t,o){if(n.checkResponseStatus(o)||n.checkResponseForRetryAfter(o)){var r={throttleTime:n.calculateThrottleTime(parseInt(o.headers[ot.RETRY_AFTER])),error:o.body.error,errorCodes:o.body.error_codes,errorMessage:o.body.error_description,subError:o.body.suberror};e.setThrottlingCache(n.generateThrottlingStorageKey(t),r)}},n.checkResponseStatus=function(e){return e.status===429||e.status>=500&&e.status<600},n.checkResponseForRetryAfter=function(e){return e.headers?e.headers.hasOwnProperty(ot.RETRY_AFTER)&&(e.status<200||e.status>=300):!1},n.calculateThrottleTime=function(e){var t=e<=0?0:e,o=Date.now()/1e3;return Math.floor(Math.min(o+(t||Mn.DEFAULT_THROTTLE_TIME_SECONDS),o+Mn.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)},n.removeThrottle=function(e,t,o,r){var i={clientId:t,authority:o.authority,scopes:o.scopes,homeAccountIdentifier:r,claims:o.claims,authenticationScheme:o.authenticationScheme,resourceRequestMethod:o.resourceRequestMethod,resourceRequestUri:o.resourceRequestUri,shrClaims:o.shrClaims,sshKid:o.sshKid},s=this.generateThrottlingStorageKey(i);e.removeItem(s)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ia=function(){function n(e,t){this.networkClient=e,this.cacheManager=t}return n.prototype.sendPostRequest=function(e,t,o){return ne(this,void 0,void 0,function(){var r,i;return oe(this,function(s){switch(s.label){case 0:eo.preProcess(this.cacheManager,e),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.networkClient.sendPostRequestAsync(t,o)];case 2:return r=s.sent(),[3,4];case 3:throw i=s.sent(),i instanceof Y?i:K.createNetworkError(t,i);case 4:return eo.postProcess(this.cacheManager,e,r),[2,r]}})})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var rt;(function(n){n.HOME_ACCOUNT_ID="home_account_id",n.UPN="UPN"})(rt||(rt={}));/*! @azure/msal-common v13.3.1 2023-10-27 */var an=function(){function n(){}return n.validateRedirectUri=function(e){if(H.isEmpty(e))throw we.createRedirectUriEmptyError()},n.validatePrompt=function(e){var t=[];for(var o in Ve)t.push(Ve[o]);if(t.indexOf(e)<0)throw we.createInvalidPromptError(e)},n.validateClaims=function(e){try{JSON.parse(e)}catch{throw we.createInvalidClaimsRequestError()}},n.validateCodeChallengeParams=function(e,t){if(H.isEmpty(e)||H.isEmpty(t))throw we.createInvalidCodeChallengeParamsError();this.validateCodeChallengeMethod(t)},n.validateCodeChallengeMethod=function(e){if([Rr.PLAIN,Rr.S256].indexOf(e)<0)throw we.createInvalidCodeChallengeMethodError()},n.sanitizeEQParams=function(e,t){return e?(t.forEach(function(o,r){e[r]&&delete e[r]}),Object.fromEntries(Object.entries(e).filter(function(o){var r=o[1];return r!==""}))):{}},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var zn=function(){function n(){this.parameters=new Map}return n.prototype.addResponseTypeCode=function(){this.parameters.set(ae.RESPONSE_TYPE,encodeURIComponent(b.CODE_RESPONSE_TYPE))},n.prototype.addResponseTypeForTokenAndIdToken=function(){this.parameters.set(ae.RESPONSE_TYPE,encodeURIComponent(b.TOKEN_RESPONSE_TYPE+" "+b.ID_TOKEN_RESPONSE_TYPE))},n.prototype.addResponseMode=function(e){this.parameters.set(ae.RESPONSE_MODE,encodeURIComponent(e||Qn.QUERY))},n.prototype.addNativeBroker=function(){this.parameters.set(ae.NATIVE_BROKER,encodeURIComponent("1"))},n.prototype.addScopes=function(e,t){t===void 0&&(t=!0);var o=t?$n(e||[],An):e||[],r=new He(o);this.parameters.set(ae.SCOPE,encodeURIComponent(r.printScopes()))},n.prototype.addClientId=function(e){this.parameters.set(ae.CLIENT_ID,encodeURIComponent(e))},n.prototype.addRedirectUri=function(e){an.validateRedirectUri(e),this.parameters.set(ae.REDIRECT_URI,encodeURIComponent(e))},n.prototype.addPostLogoutRedirectUri=function(e){an.validateRedirectUri(e),this.parameters.set(ae.POST_LOGOUT_URI,encodeURIComponent(e))},n.prototype.addIdTokenHint=function(e){this.parameters.set(ae.ID_TOKEN_HINT,encodeURIComponent(e))},n.prototype.addDomainHint=function(e){this.parameters.set(Rn.DOMAIN_HINT,encodeURIComponent(e))},n.prototype.addLoginHint=function(e){this.parameters.set(Rn.LOGIN_HINT,encodeURIComponent(e))},n.prototype.addCcsUpn=function(e){this.parameters.set(ot.CCS_HEADER,encodeURIComponent("UPN:"+e))},n.prototype.addCcsOid=function(e){this.parameters.set(ot.CCS_HEADER,encodeURIComponent("Oid:"+e.uid+"@"+e.utid))},n.prototype.addSid=function(e){this.parameters.set(Rn.SID,encodeURIComponent(e))},n.prototype.addClaims=function(e,t){var o=this.addClientCapabilitiesToClaims(e,t);an.validateClaims(o),this.parameters.set(ae.CLAIMS,encodeURIComponent(o))},n.prototype.addCorrelationId=function(e){this.parameters.set(ae.CLIENT_REQUEST_ID,encodeURIComponent(e))},n.prototype.addLibraryInfo=function(e){this.parameters.set(ae.X_CLIENT_SKU,e.sku),this.parameters.set(ae.X_CLIENT_VER,e.version),e.os&&this.parameters.set(ae.X_CLIENT_OS,e.os),e.cpu&&this.parameters.set(ae.X_CLIENT_CPU,e.cpu)},n.prototype.addApplicationTelemetry=function(e){e!=null&&e.appName&&this.parameters.set(ae.X_APP_NAME,e.appName),e!=null&&e.appVersion&&this.parameters.set(ae.X_APP_VER,e.appVersion)},n.prototype.addPrompt=function(e){an.validatePrompt(e),this.parameters.set(""+ae.PROMPT,encodeURIComponent(e))},n.prototype.addState=function(e){H.isEmpty(e)||this.parameters.set(ae.STATE,encodeURIComponent(e))},n.prototype.addNonce=function(e){this.parameters.set(ae.NONCE,encodeURIComponent(e))},n.prototype.addCodeChallengeParams=function(e,t){if(an.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(ae.CODE_CHALLENGE,encodeURIComponent(e)),this.parameters.set(ae.CODE_CHALLENGE_METHOD,encodeURIComponent(t));else throw we.createInvalidCodeChallengeParamsError()},n.prototype.addAuthorizationCode=function(e){this.parameters.set(ae.CODE,encodeURIComponent(e))},n.prototype.addDeviceCode=function(e){this.parameters.set(ae.DEVICE_CODE,encodeURIComponent(e))},n.prototype.addRefreshToken=function(e){this.parameters.set(ae.REFRESH_TOKEN,encodeURIComponent(e))},n.prototype.addCodeVerifier=function(e){this.parameters.set(ae.CODE_VERIFIER,encodeURIComponent(e))},n.prototype.addClientSecret=function(e){this.parameters.set(ae.CLIENT_SECRET,encodeURIComponent(e))},n.prototype.addClientAssertion=function(e){H.isEmpty(e)||this.parameters.set(ae.CLIENT_ASSERTION,encodeURIComponent(e))},n.prototype.addClientAssertionType=function(e){H.isEmpty(e)||this.parameters.set(ae.CLIENT_ASSERTION_TYPE,encodeURIComponent(e))},n.prototype.addOboAssertion=function(e){this.parameters.set(ae.OBO_ASSERTION,encodeURIComponent(e))},n.prototype.addRequestTokenUse=function(e){this.parameters.set(ae.REQUESTED_TOKEN_USE,encodeURIComponent(e))},n.prototype.addGrantType=function(e){this.parameters.set(ae.GRANT_TYPE,encodeURIComponent(e))},n.prototype.addClientInfo=function(){this.parameters.set($i,"1")},n.prototype.addExtraQueryParameters=function(e){var t=this,o=an.sanitizeEQParams(e,this.parameters);Object.keys(o).forEach(function(r){t.parameters.set(r,e[r])})},n.prototype.addClientCapabilitiesToClaims=function(e,t){var o;if(!e)o={};else try{o=JSON.parse(e)}catch{throw we.createInvalidClaimsRequestError()}return t&&t.length>0&&(o.hasOwnProperty(gn.ACCESS_TOKEN)||(o[gn.ACCESS_TOKEN]={}),o[gn.ACCESS_TOKEN][gn.XMS_CC]={values:t}),JSON.stringify(o)},n.prototype.addUsername=function(e){this.parameters.set(Yn.username,encodeURIComponent(e))},n.prototype.addPassword=function(e){this.parameters.set(Yn.password,encodeURIComponent(e))},n.prototype.addPopToken=function(e){H.isEmpty(e)||(this.parameters.set(ae.TOKEN_TYPE,ge.POP),this.parameters.set(ae.REQ_CNF,encodeURIComponent(e)))},n.prototype.addSshJwk=function(e){H.isEmpty(e)||(this.parameters.set(ae.TOKEN_TYPE,ge.SSH),this.parameters.set(ae.REQ_CNF,encodeURIComponent(e)))},n.prototype.addServerTelemetry=function(e){this.parameters.set(ae.X_CLIENT_CURR_TELEM,e.generateCurrentRequestHeaderValue()),this.parameters.set(ae.X_CLIENT_LAST_TELEM,e.generateLastRequestHeaderValue())},n.prototype.addThrottling=function(){this.parameters.set(ae.X_MS_LIB_CAPABILITY,Mn.X_MS_LIB_CAPABILITY_VALUE)},n.prototype.addLogoutHint=function(e){this.parameters.set(ae.LOGOUT_HINT,encodeURIComponent(e))},n.prototype.createQueryString=function(){var e=new Array;return this.parameters.forEach(function(t,o){e.push(o+"="+t)}),e.join("&")},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var No=function(){function n(e,t){this.config=oa(e),this.logger=new Ao(this.config.loggerOptions,Pr,Ro),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new ia(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}return n.prototype.createTokenRequestHeaders=function(e){var t={};if(t[ot.CONTENT_TYPE]=b.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case rt.HOME_ACCOUNT_ID:try{var o=vn(e.credential);t[ot.CCS_HEADER]="Oid:"+o.uid+"@"+o.utid}catch(r){this.logger.verbose("Could not parse home account ID for CCS Header: "+r)}break;case rt.UPN:t[ot.CCS_HEADER]="UPN: "+e.credential;break}return t},n.prototype.executePostToTokenEndpoint=function(e,t,o,r){return ne(this,void 0,void 0,function(){var i;return oe(this,function(s){switch(s.label){case 0:return[4,this.networkManager.sendPostRequest(r,e,{body:t,headers:o})];case 1:return i=s.sent(),this.config.serverTelemetryManager&&i.status<500&&i.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),[2,i]}})})},n.prototype.updateAuthority=function(e){if(!e.discoveryComplete())throw K.createEndpointDiscoveryIncompleteError("Updated authority has not completed endpoint discovery.");this.authority=e},n.prototype.createTokenQueryParameters=function(e){var t=new zn;return e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.createQueryString()},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Po=function(){function n(){}return n.prototype.generateAccountId=function(){return n.generateAccountIdForCacheKey(this.homeAccountId,this.environment)},n.prototype.generateCredentialId=function(){return n.generateCredentialIdForCacheKey(this.credentialType,this.clientId,this.realm,this.familyId)},n.prototype.generateTarget=function(){return n.generateTargetForCacheKey(this.target)},n.prototype.generateCredentialKey=function(){return n.generateCredentialCacheKey(this.homeAccountId,this.environment,this.credentialType,this.clientId,this.realm,this.target,this.familyId,this.tokenType,this.requestedClaimsHash)},n.prototype.generateType=function(){switch(this.credentialType){case Z.ID_TOKEN:return qt.ID_TOKEN;case Z.ACCESS_TOKEN:case Z.ACCESS_TOKEN_WITH_AUTH_SCHEME:return qt.ACCESS_TOKEN;case Z.REFRESH_TOKEN:return qt.REFRESH_TOKEN;default:throw K.createUnexpectedCredentialTypeError()}},n.generateCredentialCacheKey=function(e,t,o,r,i,s,c,l,h){var u=[this.generateAccountIdForCacheKey(e,t),this.generateCredentialIdForCacheKey(o,r,i,c),this.generateTargetForCacheKey(s),this.generateClaimsHashForCacheKey(h),this.generateSchemeForCacheKey(l)];return u.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.generateAccountIdForCacheKey=function(e,t){var o=[e,t];return o.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.generateCredentialIdForCacheKey=function(e,t,o,r){var i=e===Z.REFRESH_TOKEN&&r||t,s=[e,i,o||b.EMPTY_STRING];return s.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.generateTargetForCacheKey=function(e){return(e||b.EMPTY_STRING).toLowerCase()},n.generateClaimsHashForCacheKey=function(e){return(e||b.EMPTY_STRING).toLowerCase()},n.generateSchemeForCacheKey=function(e){return e&&e.toLowerCase()!==ge.BEARER.toLowerCase()?e.toLowerCase():b.EMPTY_STRING},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var sn=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.createIdTokenEntity=function(t,o,r,i,s){var c=new e;return c.credentialType=Z.ID_TOKEN,c.homeAccountId=t,c.environment=o,c.clientId=i,c.secret=r,c.realm=s,c},e.isIdTokenEntity=function(t){return t?t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("realm")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")&&t.credentialType===Z.ID_TOKEN:!1},e}(Po);/*! @azure/msal-common v13.3.1 2023-10-27 */var pt=function(){function n(){}return n.nowSeconds=function(){return Math.round(new Date().getTime()/1e3)},n.isTokenExpired=function(e,t){var o=Number(e)||0,r=n.nowSeconds()+t;return r>o},n.wasClockTurnedBack=function(e){var t=Number(e);return t>n.nowSeconds()},n.delay=function(e,t){return new Promise(function(o){return setTimeout(function(){return o(t)},e)})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var cn=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.createAccessTokenEntity=function(t,o,r,i,s,c,l,h,u,g,f,w,C,P,M){var j,N,T=new e;T.homeAccountId=t,T.credentialType=Z.ACCESS_TOKEN,T.secret=r;var B=pt.nowSeconds();if(T.cachedAt=B.toString(),T.expiresOn=l.toString(),T.extendedExpiresOn=h.toString(),g&&(T.refreshOn=g.toString()),T.environment=o,T.clientId=i,T.realm=s,T.target=c,T.userAssertionHash=w,T.tokenType=H.isEmpty(f)?ge.BEARER:f,P&&(T.requestedClaims=P,T.requestedClaimsHash=M),((j=T.tokenType)===null||j===void 0?void 0:j.toLowerCase())!==ge.BEARER.toLowerCase())switch(T.credentialType=Z.ACCESS_TOKEN_WITH_AUTH_SCHEME,T.tokenType){case ge.POP:var V=It.extractTokenClaims(r,u);if(!(!((N=V==null?void 0:V.cnf)===null||N===void 0)&&N.kid))throw K.createTokenClaimsRequiredError();T.keyId=V.cnf.kid;break;case ge.SSH:T.keyId=C}return T},e.isAccessTokenEntity=function(t){return t?t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("realm")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")&&t.hasOwnProperty("target")&&(t.credentialType===Z.ACCESS_TOKEN||t.credentialType===Z.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1},e}(Po);/*! @azure/msal-common v13.3.1 2023-10-27 */var yn=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.createRefreshTokenEntity=function(t,o,r,i,s,c){var l=new e;return l.clientId=i,l.credentialType=Z.REFRESH_TOKEN,l.environment=o,l.homeAccountId=t,l.secret=r,l.userAssertionHash=c,s&&(l.familyId=s),l},e.isRefreshTokenEntity=function(t){return t?t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")&&t.credentialType===Z.REFRESH_TOKEN:!1},e}(Po);/*! @azure/msal-common v13.3.1 2023-10-27 */var Lr=["interaction_required","consent_required","login_required"],aa=["message_only","additional_action","basic_action","user_password_expired","consent_required"],bn={noTokensFoundError:{code:"no_tokens_found",desc:"No refresh token found in the cache. Please sign-in."},native_account_unavailable:{code:"native_account_unavailable",desc:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API."}},gt=function(n){Ye(e,n);function e(t,o,r,i,s,c,l){var h=n.call(this,t,o,r)||this;return Object.setPrototypeOf(h,e.prototype),h.timestamp=i||b.EMPTY_STRING,h.traceId=s||b.EMPTY_STRING,h.correlationId=c||b.EMPTY_STRING,h.claims=l||b.EMPTY_STRING,h.name="InteractionRequiredAuthError",h}return e.isInteractionRequiredError=function(t,o,r){var i=!!t&&Lr.indexOf(t)>-1,s=!!r&&aa.indexOf(r)>-1,c=!!o&&Lr.some(function(l){return o.indexOf(l)>-1});return i||c||s},e.createNoTokensFoundError=function(){return new e(bn.noTokensFoundError.code,bn.noTokensFoundError.desc)},e.createNativeAccountUnavailableError=function(){return new e(bn.native_account_unavailable.code,bn.native_account_unavailable.desc)},e}(Y);/*! @azure/msal-common v13.3.1 2023-10-27 */var xn=function(){function n(e,t,o,r,i){this.account=e||null,this.idToken=t||null,this.accessToken=o||null,this.refreshToken=r||null,this.appMetadata=i||null}return n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Ft=function(){function n(){}return n.setRequestState=function(e,t,o){var r=n.generateLibraryState(e,o);return H.isEmpty(t)?r:""+r+b.RESOURCE_DELIM+t},n.generateLibraryState=function(e,t){if(!e)throw K.createNoCryptoObjectError("generateLibraryState");var o={id:e.createNewGuid()};t&&(o.meta=t);var r=JSON.stringify(o);return e.base64Encode(r)},n.parseRequestState=function(e,t){if(!e)throw K.createNoCryptoObjectError("parseRequestState");if(H.isEmpty(t))throw K.createInvalidStateError(t,"Null, undefined or empty state");try{var o=t.split(b.RESOURCE_DELIM),r=o[0],i=o.length>1?o.slice(1).join(b.RESOURCE_DELIM):b.EMPTY_STRING,s=e.base64Decode(r),c=JSON.parse(s);return{userRequestState:H.isEmpty(i)?b.EMPTY_STRING:i,libraryState:c}}catch(l){throw K.createInvalidStateError(t,l)}},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var de=function(){function n(e){if(this._urlString=e,H.isEmpty(this._urlString))throw we.createUrlEmptyError();H.isEmpty(this.getHash())&&(this._urlString=n.canonicalizeUri(e))}return Object.defineProperty(n.prototype,"urlString",{get:function(){return this._urlString},enumerable:!1,configurable:!0}),n.canonicalizeUri=function(e){if(e){var t=e.toLowerCase();return H.endsWith(t,"?")?t=t.slice(0,-1):H.endsWith(t,"?/")&&(t=t.slice(0,-2)),H.endsWith(t,"/")||(t+="/"),t}return e},n.prototype.validateAsUri=function(){var e;try{e=this.getUrlComponents()}catch(t){throw we.createUrlParseError(t)}if(!e.HostNameAndPort||!e.PathSegments)throw we.createUrlParseError("Given url string: "+this.urlString);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw we.createInsecureAuthorityUriError(this.urlString)},n.appendQueryString=function(e,t){return H.isEmpty(t)?e:e.indexOf("?")<0?e+"?"+t:e+"&"+t},n.removeHashFromUrl=function(e){return n.canonicalizeUri(e.split("#")[0])},n.prototype.replaceTenantPath=function(e){var t=this.getUrlComponents(),o=t.PathSegments;return e&&o.length!==0&&(o[0]===on.COMMON||o[0]===on.ORGANIZATIONS)&&(o[0]=e),n.constructAuthorityUriFromObject(t)},n.prototype.getHash=function(){return n.parseHash(this.urlString)},n.prototype.getUrlComponents=function(){var e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw we.createUrlParseError("Given url string: "+this.urlString);var o={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]},r=o.AbsolutePath.split("/");return r=r.filter(function(i){return i&&i.length>0}),o.PathSegments=r,!H.isEmpty(o.QueryString)&&o.QueryString.endsWith("/")&&(o.QueryString=o.QueryString.substring(0,o.QueryString.length-1)),o},n.getDomainFromUrl=function(e){var t=RegExp("^([^:/?#]+://)?([^/?#]*)"),o=e.match(t);if(!o)throw we.createUrlParseError("Given url string: "+e);return o[2]},n.getAbsoluteUrl=function(e,t){if(e[0]===b.FORWARD_SLASH){var o=new n(t),r=o.getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+e}return e},n.parseHash=function(e){var t=e.indexOf("#"),o=e.indexOf("#/");return o>-1?e.substring(o+2):t>-1?e.substring(t+1):b.EMPTY_STRING},n.parseQueryString=function(e){var t=e.indexOf("?"),o=e.indexOf("/?");return o>-1?e.substring(o+2):t>-1?e.substring(t+1):b.EMPTY_STRING},n.constructAuthorityUriFromObject=function(e){return new n(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))},n.getDeserializedHash=function(e){if(H.isEmpty(e))return{};var t=n.parseHash(e),o=H.queryStringToObject(H.isEmpty(t)?e:t);if(!o)throw K.createHashNotDeserializedError(JSON.stringify(o));return o},n.getDeserializedQueryString=function(e){if(H.isEmpty(e))return{};var t=n.parseQueryString(e),o=H.queryStringToObject(H.isEmpty(t)?e:t);if(!o)throw K.createHashNotDeserializedError(JSON.stringify(o));return o},n.hashContainsKnownProperties=function(e){if(H.isEmpty(e)||e.indexOf("=")<0)return!1;var t=n.getDeserializedHash(e);return!!(t.code||t.error_description||t.error||t.state)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var R;(function(n){n.AcquireTokenByCode="acquireTokenByCode",n.AcquireTokenByRefreshToken="acquireTokenByRefreshToken",n.AcquireTokenSilent="acquireTokenSilent",n.AcquireTokenSilentAsync="acquireTokenSilentAsync",n.AcquireTokenPopup="acquireTokenPopup",n.CryptoOptsGetPublicKeyThumbprint="cryptoOptsGetPublicKeyThumbprint",n.CryptoOptsSignJwt="cryptoOptsSignJwt",n.SilentCacheClientAcquireToken="silentCacheClientAcquireToken",n.SilentIframeClientAcquireToken="silentIframeClientAcquireToken",n.SilentRefreshClientAcquireToken="silentRefreshClientAcquireToken",n.SsoSilent="ssoSilent",n.StandardInteractionClientGetDiscoveredAuthority="standardInteractionClientGetDiscoveredAuthority",n.FetchAccountIdWithNativeBroker="fetchAccountIdWithNativeBroker",n.NativeInteractionClientAcquireToken="nativeInteractionClientAcquireToken",n.BaseClientCreateTokenRequestHeaders="baseClientCreateTokenRequestHeaders",n.BrokerHandhshake="brokerHandshake",n.AcquireTokenByRefreshTokenInBroker="acquireTokenByRefreshTokenInBroker",n.AcquireTokenByBroker="acquireTokenByBroker",n.RefreshTokenClientExecuteTokenRequest="refreshTokenClientExecuteTokenRequest",n.RefreshTokenClientAcquireToken="refreshTokenClientAcquireToken",n.RefreshTokenClientAcquireTokenWithCachedRefreshToken="refreshTokenClientAcquireTokenWithCachedRefreshToken",n.RefreshTokenClientAcquireTokenByRefreshToken="refreshTokenClientAcquireTokenByRefreshToken",n.RefreshTokenClientCreateTokenRequestBody="refreshTokenClientCreateTokenRequestBody",n.AcquireTokenFromCache="acquireTokenFromCache",n.AcquireTokenBySilentIframe="acquireTokenBySilentIframe",n.InitializeBaseRequest="initializeBaseRequest",n.InitializeSilentRequest="initializeSilentRequest",n.InitializeClientApplication="initializeClientApplication",n.SilentIframeClientTokenHelper="silentIframeClientTokenHelper",n.SilentHandlerInitiateAuthRequest="silentHandlerInitiateAuthRequest",n.SilentHandlerMonitorIframeForHash="silentHandlerMonitorIframeForHash",n.SilentHandlerLoadFrame="silentHandlerLoadFrame",n.StandardInteractionClientCreateAuthCodeClient="standardInteractionClientCreateAuthCodeClient",n.StandardInteractionClientGetClientConfiguration="standardInteractionClientGetClientConfiguration",n.StandardInteractionClientInitializeAuthorizationRequest="standardInteractionClientInitializeAuthorizationRequest",n.StandardInteractionClientInitializeAuthorizationCodeRequest="standardInteractionClientInitializeAuthorizationCodeRequest",n.GetAuthCodeUrl="getAuthCodeUrl",n.HandleCodeResponseFromServer="handleCodeResponseFromServer",n.HandleCodeResponseFromHash="handleCodeResponseFromHash",n.UpdateTokenEndpointAuthority="updateTokenEndpointAuthority",n.AuthClientAcquireToken="authClientAcquireToken",n.AuthClientExecuteTokenRequest="authClientExecuteTokenRequest",n.AuthClientCreateTokenRequestBody="authClientCreateTokenRequestBody",n.AuthClientCreateQueryString="authClientCreateQueryString",n.PopTokenGenerateCnf="popTokenGenerateCnf",n.PopTokenGenerateKid="popTokenGenerateKid",n.HandleServerTokenResponse="handleServerTokenResponse",n.AuthorityFactoryCreateDiscoveredInstance="authorityFactoryCreateDiscoveredInstance",n.AuthorityResolveEndpointsAsync="authorityResolveEndpointsAsync",n.AuthorityGetCloudDiscoveryMetadataFromNetwork="authorityGetCloudDiscoveryMetadataFromNetwork",n.AuthorityUpdateCloudDiscoveryMetadata="authorityUpdateCloudDiscoveryMetadata",n.AuthorityGetEndpointMetadataFromNetwork="authorityGetEndpointMetadataFromNetwork",n.AuthorityUpdateEndpointMetadata="authorityUpdateEndpointMetadata",n.AuthorityUpdateMetadataWithRegionalInformation="authorityUpdateMetadataWithRegionalInformation",n.RegionDiscoveryDetectRegion="regionDiscoveryDetectRegion",n.RegionDiscoveryGetRegionFromIMDS="regionDiscoveryGetRegionFromIMDS",n.RegionDiscoveryGetCurrentVersion="regionDiscoveryGetCurrentVersion",n.AcquireTokenByCodeAsync="acquireTokenByCodeAsync",n.GetEndpointMetadataFromNetwork="getEndpointMetadataFromNetwork",n.GetCloudDiscoveryMetadataFromNetworkMeasurement="getCloudDiscoveryMetadataFromNetworkMeasurement",n.HandleRedirectPromiseMeasurement="handleRedirectPromiseMeasurement",n.UpdateCloudDiscoveryMetadataMeasurement="updateCloudDiscoveryMetadataMeasurement",n.UsernamePasswordClientAcquireToken="usernamePasswordClientAcquireToken",n.NativeMessageHandlerHandshake="nativeMessageHandlerHandshake",n.ClearTokensAndKeysWithClaims="clearTokensAndKeysWithClaims"})(R||(R={}));var to;(function(n){n[n.NotStarted=0]="NotStarted",n[n.InProgress=1]="InProgress",n[n.Completed=2]="Completed"})(to||(to={}));var sa=new Set(["accessTokenSize","durationMs","idTokenSize","matsSilentStatus","matsHttpStatus","refreshTokenSize","queuedTimeMs","startTimeMs","status"]);/*! @azure/msal-common v13.3.1 2023-10-27 */var Mo;(function(n){n.SW="sw",n.UHW="uhw"})(Mo||(Mo={}));var wn=function(){function n(e,t){this.cryptoUtils=e,this.performanceClient=t}return n.prototype.generateCnf=function(e){var t,o;return ne(this,void 0,void 0,function(){var r,i,s;return oe(this,function(c){switch(c.label){case 0:return(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.PopTokenGenerateCnf,e.correlationId),(o=this.performanceClient)===null||o===void 0||o.setPreQueueTime(R.PopTokenGenerateKid,e.correlationId),[4,this.generateKid(e)];case 1:return r=c.sent(),i=this.cryptoUtils.base64Encode(JSON.stringify(r)),s={kid:r.kid,reqCnfString:i},[4,this.cryptoUtils.hashString(i)];case 2:return[2,(s.reqCnfHash=c.sent(),s)]}})})},n.prototype.generateKid=function(e){var t;return ne(this,void 0,void 0,function(){var o;return oe(this,function(r){switch(r.label){case 0:return(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.PopTokenGenerateKid,e.correlationId),[4,this.cryptoUtils.getPublicKeyThumbprint(e)];case 1:return o=r.sent(),[2,{kid:o,xms_ksl:Mo.SW}]}})})},n.prototype.signPopToken=function(e,t,o){return ne(this,void 0,void 0,function(){return oe(this,function(r){return[2,this.signPayload(e,t,o)]})})},n.prototype.signPayload=function(e,t,o,r){return ne(this,void 0,void 0,function(){var i,s,c,l,h,u;return oe(this,function(g){switch(g.label){case 0:return i=o.resourceRequestMethod,s=o.resourceRequestUri,c=o.shrClaims,l=o.shrNonce,h=s?new de(s):void 0,u=h==null?void 0:h.getUrlComponents(),[4,this.cryptoUtils.signJwt(he({at:e,ts:pt.nowSeconds(),m:i==null?void 0:i.toUpperCase(),u:u==null?void 0:u.HostNameAndPort,nonce:l||this.cryptoUtils.createNewGuid(),p:u==null?void 0:u.AbsolutePath,q:u!=null&&u.QueryString?[[],u.QueryString]:void 0,client_claims:c||void 0},r),t,o.correlationId)];case 1:return[2,g.sent()]}})})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Lo=function(){function n(){}return n.prototype.generateAppMetadataKey=function(){return n.generateAppMetadataCacheKey(this.environment,this.clientId)},n.generateAppMetadataCacheKey=function(e,t){var o=[So,e,t];return o.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.createAppMetadataEntity=function(e,t,o){var r=new n;return r.clientId=e,r.environment=t,o&&(r.familyId=o),r},n.isAppMetadataEntity=function(e,t){return t?e.indexOf(So)===0&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("environment"):!1},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ca=function(){function n(e,t){this.cache=e,this.hasChanged=t}return Object.defineProperty(n.prototype,"cacheHasChanged",{get:function(){return this.hasChanged},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tokenCache",{get:function(){return this.cache},enumerable:!1,configurable:!0}),n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var no=function(){function n(e,t,o,r,i,s,c){this.clientId=e,this.cacheStorage=t,this.cryptoObj=o,this.logger=r,this.serializableCache=i,this.persistencePlugin=s,this.performanceClient=c}return n.prototype.validateServerAuthorizationCodeResponse=function(e,t,o){if(!e.state||!t)throw e.state?K.createStateNotFoundError("Cached State"):K.createStateNotFoundError("Server State");if(decodeURIComponent(e.state)!==decodeURIComponent(t))throw K.createStateMismatchError();if(e.error||e.error_description||e.suberror)throw gt.isInteractionRequiredError(e.error,e.error_description,e.suberror)?new gt(e.error||b.EMPTY_STRING,e.error_description,e.suberror,e.timestamp||b.EMPTY_STRING,e.trace_id||b.EMPTY_STRING,e.correlation_id||b.EMPTY_STRING,e.claims||b.EMPTY_STRING):new rn(e.error||b.EMPTY_STRING,e.error_description,e.suberror);e.client_info&&Zn(e.client_info,o)},n.prototype.validateTokenResponse=function(e){if(e.error||e.error_description||e.suberror){if(gt.isInteractionRequiredError(e.error,e.error_description,e.suberror))throw new gt(e.error,e.error_description,e.suberror,e.timestamp||b.EMPTY_STRING,e.trace_id||b.EMPTY_STRING,e.correlation_id||b.EMPTY_STRING,e.claims||b.EMPTY_STRING);var t=e.error_codes+" - ["+e.timestamp+"]: "+e.error_description+" - Correlation ID: "+e.correlation_id+" - Trace ID: "+e.trace_id;throw new rn(e.error,t,e.suberror)}},n.prototype.handleServerTokenResponse=function(e,t,o,r,i,s,c,l,h){var u;return ne(this,void 0,void 0,function(){var g,f,w,C,P,M,j;return oe(this,function(N){switch(N.label){case 0:if((u=this.performanceClient)===null||u===void 0||u.addQueueMeasurement(R.HandleServerTokenResponse,e.correlation_id),e.id_token){if(g=new It(e.id_token||b.EMPTY_STRING,this.cryptoObj),i&&!H.isEmpty(i.nonce)&&g.claims.nonce!==i.nonce)throw K.createNonceMismatchError();if(r.maxAge||r.maxAge===0){if(f=g.claims.auth_time,!f)throw K.createAuthTimeNotFoundError();It.checkMaxAge(f,r.maxAge)}}this.homeAccountIdentifier=Ue.generateHomeAccountId(e.client_info||b.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,g),i&&i.state&&(w=Ft.parseRequestState(this.cryptoObj,i.state)),e.key_id=e.key_id||r.sshKid||void 0,C=this.generateCacheRecord(e,t,o,r,g,s,i),N.label=1;case 1:return N.trys.push([1,,5,8]),this.persistencePlugin&&this.serializableCache?(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),P=new ca(this.serializableCache,!0),[4,this.persistencePlugin.beforeCacheAccess(P)]):[3,3];case 2:N.sent(),N.label=3;case 3:return c&&!l&&C.account&&(M=C.account.generateAccountKey(),j=this.cacheStorage.getAccount(M),!j)?(this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),[2,n.generateAuthenticationResult(this.cryptoObj,t,C,!1,r,g,w,void 0,h)]):[4,this.cacheStorage.saveCacheRecord(C)];case 4:return N.sent(),[3,8];case 5:return this.persistencePlugin&&this.serializableCache&&P?(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),[4,this.persistencePlugin.afterCacheAccess(P)]):[3,7];case 6:N.sent(),N.label=7;case 7:return[7];case 8:return[2,n.generateAuthenticationResult(this.cryptoObj,t,C,!1,r,g,w,e,h)]}})})},n.prototype.generateCacheRecord=function(e,t,o,r,i,s,c){var l=t.getPreferredCache();if(H.isEmpty(l))throw K.createInvalidCacheEnvironmentError();var h,u;!H.isEmpty(e.id_token)&&i&&(h=sn.createIdTokenEntity(this.homeAccountIdentifier,l,e.id_token||b.EMPTY_STRING,this.clientId,i.claims.tid||b.EMPTY_STRING),u=this.generateAccountEntity(e,i,t,c));var g=null;if(!H.isEmpty(e.access_token)){var f=e.scope?He.fromString(e.scope):new He(r.scopes||[]),w=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,C=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,P=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,M=o+w,j=M+C,N=P&&P>0?o+P:void 0;g=cn.createAccessTokenEntity(this.homeAccountIdentifier,l,e.access_token||b.EMPTY_STRING,this.clientId,i?i.claims.tid||b.EMPTY_STRING:t.tenant,f.printScopes(),M,j,this.cryptoObj,N,e.token_type,s,e.key_id,r.claims,r.requestedClaimsHash)}var T=null;H.isEmpty(e.refresh_token)||(T=yn.createRefreshTokenEntity(this.homeAccountIdentifier,l,e.refresh_token||b.EMPTY_STRING,this.clientId,e.foci,s));var B=null;return H.isEmpty(e.foci)||(B=Lo.createAppMetadataEntity(this.clientId,l,e.foci)),new xn(u,h,g,T,B)},n.prototype.generateAccountEntity=function(e,t,o,r){var i=o.authorityType,s=r?r.cloud_graph_host_name:b.EMPTY_STRING,c=r?r.msgraph_host:b.EMPTY_STRING;if(i===$e.Adfs)return this.logger.verbose("Authority type is ADFS, creating ADFS account"),Ue.createGenericAccount(this.homeAccountIdentifier,t,o,s,c);if(H.isEmpty(e.client_info)&&o.protocolMode==="AAD")throw K.createClientInfoEmptyError();return e.client_info?Ue.createAccount(e.client_info,this.homeAccountIdentifier,t,o,s,c):Ue.createGenericAccount(this.homeAccountIdentifier,t,o,s,c)},n.generateAuthenticationResult=function(e,t,o,r,i,s,c,l,h){var u,g,f;return ne(this,void 0,void 0,function(){var w,C,P,M,j,N,T,B,V,G,J;return oe(this,function(I){switch(I.label){case 0:if(w=b.EMPTY_STRING,C=[],P=null,j=b.EMPTY_STRING,!o.accessToken)return[3,4];if(o.accessToken.tokenType!==ge.POP)return[3,2];if(N=new wn(e),T=o.accessToken,B=T.secret,V=T.keyId,!V)throw K.createKeyIdMissingError();return[4,N.signPopToken(B,V,i)];case 1:return w=I.sent(),[3,3];case 2:w=o.accessToken.secret,I.label=3;case 3:C=He.fromString(o.accessToken.target).asArray(),P=new Date(Number(o.accessToken.expiresOn)*1e3),M=new Date(Number(o.accessToken.extendedExpiresOn)*1e3),I.label=4;case 4:return o.appMetadata&&(j=o.appMetadata.familyId===Nn?Nn:b.EMPTY_STRING),G=(s==null?void 0:s.claims.oid)||(s==null?void 0:s.claims.sub)||b.EMPTY_STRING,J=(s==null?void 0:s.claims.tid)||b.EMPTY_STRING,l!=null&&l.spa_accountid&&o.account&&(o.account.nativeAccountId=l==null?void 0:l.spa_accountid),[2,{authority:t.canonicalAuthority,uniqueId:G,tenantId:J,scopes:C,account:o.account?o.account.getAccountInfo():null,idToken:s?s.rawToken:b.EMPTY_STRING,idTokenClaims:s?s.claims:{},accessToken:w,fromCache:r,expiresOn:P,correlationId:i.correlationId,requestId:h||b.EMPTY_STRING,extExpiresOn:M,familyId:j,tokenType:((u=o.accessToken)===null||u===void 0?void 0:u.tokenType)||b.EMPTY_STRING,state:c?c.userRequestState:b.EMPTY_STRING,cloudGraphHostName:((g=o.account)===null||g===void 0?void 0:g.cloudGraphHostName)||b.EMPTY_STRING,msGraphHost:((f=o.account)===null||f===void 0?void 0:f.msGraphHost)||b.EMPTY_STRING,code:l==null?void 0:l.spa_code,fromNativeBroker:!1}]}})})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Or=function(n){Ye(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.includeRedirectUri=!0,r}return e.prototype.getAuthCodeUrl=function(t){var o,r;return ne(this,void 0,void 0,function(){var i;return oe(this,function(s){switch(s.label){case 0:return(o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.GetAuthCodeUrl,t.correlationId),(r=this.performanceClient)===null||r===void 0||r.setPreQueueTime(R.AuthClientCreateQueryString,t.correlationId),[4,this.createAuthCodeUrlQueryString(t)];case 1:return i=s.sent(),[2,de.appendQueryString(this.authority.authorizationEndpoint,i)]}})})},e.prototype.acquireToken=function(t,o){var r,i,s,c,l,h;return ne(this,void 0,void 0,function(){var u,g,f,w,C,P,M=this;return oe(this,function(j){switch(j.label){case 0:if(!t||!t.code)throw K.createTokenRequestCannotBeMadeError();return(r=this.performanceClient)===null||r===void 0||r.addQueueMeasurement(R.AuthClientAcquireToken,t.correlationId),u=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement("AuthCodeClientAcquireToken",t.correlationId),this.logger.info("in acquireToken call in auth-code client"),g=pt.nowSeconds(),(s=this.performanceClient)===null||s===void 0||s.setPreQueueTime(R.AuthClientExecuteTokenRequest,t.correlationId),[4,this.executeTokenRequest(this.authority,t)];case 1:return f=j.sent(),w=(c=f.headers)===null||c===void 0?void 0:c[ot.X_MS_REQUEST_ID],C=(l=f.headers)===null||l===void 0?void 0:l[ot.X_MS_HTTP_VERSION],C&&(u==null||u.addStaticFields({httpVerAuthority:C})),P=new no(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient),P.validateTokenResponse(f.body),(h=this.performanceClient)===null||h===void 0||h.setPreQueueTime(R.HandleServerTokenResponse,t.correlationId),[2,P.handleServerTokenResponse(f.body,this.authority,g,t,o,void 0,void 0,void 0,w).then(function(N){return u==null||u.endMeasurement({success:!0}),N}).catch(function(N){throw M.logger.verbose("Error in fetching token in ACC",t.correlationId),u==null||u.endMeasurement({errorCode:N.errorCode,subErrorCode:N.subError,success:!1}),N})]}})})},e.prototype.handleFragmentResponse=function(t,o){var r=new no(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null),i=new de(t),s=de.getDeserializedHash(i.getHash());if(r.validateServerAuthorizationCodeResponse(s,o,this.cryptoUtils),!s.code)throw K.createNoAuthCodeInServerResponseError();return he(he({},s),{code:s.code})},e.prototype.getLogoutUri=function(t){if(!t)throw we.createEmptyLogoutRequestError();var o=this.createLogoutUrlQueryString(t);return de.appendQueryString(this.authority.endSessionEndpoint,o)},e.prototype.executeTokenRequest=function(t,o){var r,i;return ne(this,void 0,void 0,function(){var s,c,l,h,u,g,f;return oe(this,function(w){switch(w.label){case 0:return(r=this.performanceClient)===null||r===void 0||r.addQueueMeasurement(R.AuthClientExecuteTokenRequest,o.correlationId),(i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.AuthClientCreateTokenRequestBody,o.correlationId),s=this.createTokenQueryParameters(o),c=de.appendQueryString(t.tokenEndpoint,s),[4,this.createTokenRequestBody(o)];case 1:if(l=w.sent(),h=void 0,o.clientInfo)try{u=Zn(o.clientInfo,this.cryptoUtils),h={credential:""+u.uid+Pe.CLIENT_INFO_SEPARATOR+u.utid,type:rt.HOME_ACCOUNT_ID}}catch(C){this.logger.verbose("Could not parse client info for CCS Header: "+C)}return g=this.createTokenRequestHeaders(h||o.ccsCredential),f={clientId:this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:o.scopes,claims:o.claims,authenticationScheme:o.authenticationScheme,resourceRequestMethod:o.resourceRequestMethod,resourceRequestUri:o.resourceRequestUri,shrClaims:o.shrClaims,sshKid:o.sshKid},[2,this.executePostToTokenEndpoint(c,l,g,f)]}})})},e.prototype.createTokenRequestBody=function(t){var o,r;return ne(this,void 0,void 0,function(){var i,s,c,l,h,u,g,g,f;return oe(this,function(w){switch(w.label){case 0:return(o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.AuthClientCreateTokenRequestBody,t.correlationId),i=new zn,i.addClientId(this.config.authOptions.clientId),this.includeRedirectUri?i.addRedirectUri(t.redirectUri):an.validateRedirectUri(t.redirectUri),i.addScopes(t.scopes),i.addAuthorizationCode(t.code),i.addLibraryInfo(this.config.libraryInfo),i.addApplicationTelemetry(this.config.telemetry.application),i.addThrottling(),this.serverTelemetryManager&&i.addServerTelemetry(this.serverTelemetryManager),t.codeVerifier&&i.addCodeVerifier(t.codeVerifier),this.config.clientCredentials.clientSecret&&i.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(s=this.config.clientCredentials.clientAssertion,i.addClientAssertion(s.assertion),i.addClientAssertionType(s.assertionType)),i.addGrantType(Wn.AUTHORIZATION_CODE_GRANT),i.addClientInfo(),t.authenticationScheme!==ge.POP?[3,2]:(c=new wn(this.cryptoUtils,this.performanceClient),(r=this.performanceClient)===null||r===void 0||r.setPreQueueTime(R.PopTokenGenerateCnf,t.correlationId),[4,c.generateCnf(t)]);case 1:return l=w.sent(),i.addPopToken(l.reqCnfString),[3,3];case 2:if(t.authenticationScheme===ge.SSH)if(t.sshJwk)i.addSshJwk(t.sshJwk);else throw we.createMissingSshJwkError();w.label=3;case 3:if(h=t.correlationId||this.config.cryptoInterface.createNewGuid(),i.addCorrelationId(h),(!H.isEmptyObj(t.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&i.addClaims(t.claims,this.config.authOptions.clientCapabilities),u=void 0,t.clientInfo)try{g=Zn(t.clientInfo,this.cryptoUtils),u={credential:""+g.uid+Pe.CLIENT_INFO_SEPARATOR+g.utid,type:rt.HOME_ACCOUNT_ID}}catch(C){this.logger.verbose("Could not parse client info for CCS Header: "+C)}else u=t.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&u)switch(u.type){case rt.HOME_ACCOUNT_ID:try{g=vn(u.credential),i.addCcsOid(g)}catch(C){this.logger.verbose("Could not parse home account ID for CCS Header: "+C)}break;case rt.UPN:i.addCcsUpn(u.credential);break}return t.tokenBodyParameters&&i.addExtraQueryParameters(t.tokenBodyParameters),t.enableSpaAuthorizationCode&&(!t.tokenBodyParameters||!t.tokenBodyParameters[ae.RETURN_SPA_CODE])&&i.addExtraQueryParameters((f={},f[ae.RETURN_SPA_CODE]="1",f)),[2,i.createQueryString()]}})})},e.prototype.createAuthCodeUrlQueryString=function(t){var o;return ne(this,void 0,void 0,function(){var r,i,s,c,l,h,h,h,u,g;return oe(this,function(f){switch(f.label){case 0:if((o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.AuthClientCreateQueryString,t.correlationId),r=new zn,r.addClientId(this.config.authOptions.clientId),i=$n(t.scopes||[],t.extraScopesToConsent||[]),r.addScopes(i),r.addRedirectUri(t.redirectUri),s=t.correlationId||this.config.cryptoInterface.createNewGuid(),r.addCorrelationId(s),r.addResponseMode(t.responseMode),r.addResponseTypeCode(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addClientInfo(),t.codeChallenge&&t.codeChallengeMethod&&r.addCodeChallengeParams(t.codeChallenge,t.codeChallengeMethod),t.prompt&&r.addPrompt(t.prompt),t.domainHint&&r.addDomainHint(t.domainHint),t.prompt!==Ve.SELECT_ACCOUNT)if(t.sid&&t.prompt===Ve.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),r.addSid(t.sid);else if(t.account){if(c=this.extractAccountSid(t.account),l=this.extractLoginHint(t.account),l){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),r.addLoginHint(l);try{h=vn(t.account.homeAccountId),r.addCcsOid(h)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(c&&t.prompt===Ve.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),r.addSid(c);try{h=vn(t.account.homeAccountId),r.addCcsOid(h)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(t.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),r.addLoginHint(t.loginHint),r.addCcsUpn(t.loginHint);else if(t.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),r.addLoginHint(t.account.username);try{h=vn(t.account.homeAccountId),r.addCcsOid(h)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else t.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),r.addLoginHint(t.loginHint),r.addCcsUpn(t.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");return t.nonce&&r.addNonce(t.nonce),t.state&&r.addState(t.state),(!H.isEmpty(t.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(t.claims,this.config.authOptions.clientCapabilities),t.extraQueryParameters&&r.addExtraQueryParameters(t.extraQueryParameters),t.nativeBroker?(r.addNativeBroker(),t.authenticationScheme!==ge.POP?[3,2]:(u=new wn(this.cryptoUtils),[4,u.generateCnf(t)])):[3,2];case 1:g=f.sent(),r.addPopToken(g.reqCnfString),f.label=2;case 2:return[2,r.createQueryString()]}})})},e.prototype.createLogoutUrlQueryString=function(t){var o=new zn;return t.postLogoutRedirectUri&&o.addPostLogoutRedirectUri(t.postLogoutRedirectUri),t.correlationId&&o.addCorrelationId(t.correlationId),t.idTokenHint&&o.addIdTokenHint(t.idTokenHint),t.state&&o.addState(t.state),t.logoutHint&&o.addLogoutHint(t.logoutHint),t.extraQueryParameters&&o.addExtraQueryParameters(t.extraQueryParameters),o.createQueryString()},e.prototype.extractAccountSid=function(t){var o;return((o=t.idTokenClaims)===null||o===void 0?void 0:o.sid)||null},e.prototype.extractLoginHint=function(t){var o;return((o=t.idTokenClaims)===null||o===void 0?void 0:o.login_hint)||null},e}(No);/*! @azure/msal-common v13.3.1 2023-10-27 */var zr=function(n){Ye(e,n);function e(t,o){return n.call(this,t,o)||this}return e.prototype.acquireToken=function(t){var o,r,i,s,c,l,h;return ne(this,void 0,void 0,function(){var u,g,f,w,C,P,M=this;return oe(this,function(j){switch(j.label){case 0:return(o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.RefreshTokenClientAcquireToken,t.correlationId),u=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.RefreshTokenClientAcquireToken,t.correlationId),this.logger.verbose("RefreshTokenClientAcquireToken called",t.correlationId),g=pt.nowSeconds(),(i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.RefreshTokenClientExecuteTokenRequest,t.correlationId),[4,this.executeTokenRequest(t,this.authority)];case 1:return f=j.sent(),w=(s=f.headers)===null||s===void 0?void 0:s[ot.X_MS_HTTP_VERSION],u==null||u.addStaticFields({refreshTokenSize:((c=f.body.refresh_token)===null||c===void 0?void 0:c.length)||0}),w&&(u==null||u.addStaticFields({httpVerToken:w})),C=(l=f.headers)===null||l===void 0?void 0:l[ot.X_MS_REQUEST_ID],P=new no(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),P.validateTokenResponse(f.body),(h=this.performanceClient)===null||h===void 0||h.setPreQueueTime(R.HandleServerTokenResponse,t.correlationId),[2,P.handleServerTokenResponse(f.body,this.authority,g,t,void 0,void 0,!0,t.forceCache,C).then(function(N){return u==null||u.endMeasurement({success:!0}),N}).catch(function(N){throw M.logger.verbose("Error in fetching refresh token",t.correlationId),u==null||u.endMeasurement({errorCode:N.errorCode,subErrorCode:N.subError,success:!1}),N})]}})})},e.prototype.acquireTokenByRefreshToken=function(t){var o,r,i,s;return ne(this,void 0,void 0,function(){var c,l,h;return oe(this,function(u){if(!t)throw we.createEmptyTokenRequestError();if((o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.RefreshTokenClientAcquireTokenByRefreshToken,t.correlationId),!t.account)throw K.createNoAccountInSilentRequestError();if(c=this.cacheManager.isAppMetadataFOCI(t.account.environment),c)try{return(r=this.performanceClient)===null||r===void 0||r.setPreQueueTime(R.RefreshTokenClientAcquireTokenWithCachedRefreshToken,t.correlationId),[2,this.acquireTokenWithCachedRefreshToken(t,!0)]}catch(g){if(l=g instanceof gt&&g.errorCode===bn.noTokensFoundError.code,h=g instanceof rn&&g.errorCode===Nr.INVALID_GRANT_ERROR&&g.subError===Nr.CLIENT_MISMATCH_ERROR,l||h)return(i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.RefreshTokenClientAcquireTokenWithCachedRefreshToken,t.correlationId),[2,this.acquireTokenWithCachedRefreshToken(t,!1)];throw g}return(s=this.performanceClient)===null||s===void 0||s.setPreQueueTime(R.RefreshTokenClientAcquireTokenWithCachedRefreshToken,t.correlationId),[2,this.acquireTokenWithCachedRefreshToken(t,!1)]})})},e.prototype.acquireTokenWithCachedRefreshToken=function(t,o){var r,i,s;return ne(this,void 0,void 0,function(){var c,l,h;return oe(this,function(u){if((r=this.performanceClient)===null||r===void 0||r.addQueueMeasurement(R.RefreshTokenClientAcquireTokenWithCachedRefreshToken,t.correlationId),c=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(R.RefreshTokenClientAcquireTokenWithCachedRefreshToken,t.correlationId),this.logger.verbose("RefreshTokenClientAcquireTokenWithCachedRefreshToken called",t.correlationId),l=this.cacheManager.getRefreshToken(t.account,o),!l)throw c==null||c.discardMeasurement(),gt.createNoTokensFoundError();return c==null||c.endMeasurement({success:!0}),h=he(he({},t),{refreshToken:l.secret,authenticationScheme:t.authenticationScheme||ge.BEARER,ccsCredential:{credential:t.account.homeAccountId,type:rt.HOME_ACCOUNT_ID}}),(s=this.performanceClient)===null||s===void 0||s.setPreQueueTime(R.RefreshTokenClientAcquireToken,t.correlationId),[2,this.acquireToken(h)]})})},e.prototype.executeTokenRequest=function(t,o){var r,i,s;return ne(this,void 0,void 0,function(){var c,l,h,u,g,f;return oe(this,function(w){switch(w.label){case 0:return(r=this.performanceClient)===null||r===void 0||r.addQueueMeasurement(R.RefreshTokenClientExecuteTokenRequest,t.correlationId),c=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(R.RefreshTokenClientExecuteTokenRequest,t.correlationId),(s=this.performanceClient)===null||s===void 0||s.setPreQueueTime(R.RefreshTokenClientCreateTokenRequestBody,t.correlationId),l=this.createTokenQueryParameters(t),h=de.appendQueryString(o.tokenEndpoint,l),[4,this.createTokenRequestBody(t)];case 1:return u=w.sent(),g=this.createTokenRequestHeaders(t.ccsCredential),f={clientId:this.config.authOptions.clientId,authority:o.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid},[2,this.executePostToTokenEndpoint(h,u,g,f).then(function(C){return c==null||c.endMeasurement({success:!0}),C}).catch(function(C){throw c==null||c.endMeasurement({success:!1}),C})]}})})},e.prototype.createTokenRequestBody=function(t){var o,r,i;return ne(this,void 0,void 0,function(){var s,c,l,h,u,g,f;return oe(this,function(w){switch(w.label){case 0:return(o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.RefreshTokenClientCreateTokenRequestBody,t.correlationId),s=t.correlationId,c=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.BaseClientCreateTokenRequestHeaders,s),l=new zn,l.addClientId(this.config.authOptions.clientId),l.addScopes(t.scopes),l.addGrantType(Wn.REFRESH_TOKEN_GRANT),l.addClientInfo(),l.addLibraryInfo(this.config.libraryInfo),l.addApplicationTelemetry(this.config.telemetry.application),l.addThrottling(),this.serverTelemetryManager&&l.addServerTelemetry(this.serverTelemetryManager),l.addCorrelationId(s),l.addRefreshToken(t.refreshToken),this.config.clientCredentials.clientSecret&&l.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(h=this.config.clientCredentials.clientAssertion,l.addClientAssertion(h.assertion),l.addClientAssertionType(h.assertionType)),t.authenticationScheme!==ge.POP?[3,2]:(u=new wn(this.cryptoUtils,this.performanceClient),(i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.PopTokenGenerateCnf,t.correlationId),[4,u.generateCnf(t)]);case 1:return g=w.sent(),l.addPopToken(g.reqCnfString),[3,3];case 2:if(t.authenticationScheme===ge.SSH)if(t.sshJwk)l.addSshJwk(t.sshJwk);else throw c==null||c.endMeasurement({success:!1}),we.createMissingSshJwkError();w.label=3;case 3:if((!H.isEmptyObj(t.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&l.addClaims(t.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&t.ccsCredential)switch(t.ccsCredential.type){case rt.HOME_ACCOUNT_ID:try{f=vn(t.ccsCredential.credential),l.addCcsOid(f)}catch(C){this.logger.verbose("Could not parse home account ID for CCS Header: "+C)}break;case rt.UPN:l.addCcsUpn(t.ccsCredential.credential);break}return c==null||c.endMeasurement({success:!0}),[2,l.createQueryString()]}})})},e}(No);/*! @azure/msal-common v13.3.1 2023-10-27 */var la=function(n){Ye(e,n);function e(t,o){return n.call(this,t,o)||this}return e.prototype.acquireToken=function(t){return ne(this,void 0,void 0,function(){var o,r;return oe(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.acquireCachedToken(t)];case 1:return[2,i.sent()];case 2:if(o=i.sent(),o instanceof K&&o.errorCode===D.tokenRefreshRequired.code)return r=new zr(this.config,this.performanceClient),[2,r.acquireTokenByRefreshToken(t)];throw o;case 3:return[2]}})})},e.prototype.acquireCachedToken=function(t){var o,r,i,s,c;return ne(this,void 0,void 0,function(){var l,h;return oe(this,function(u){switch(u.label){case 0:if(!t)throw we.createEmptyTokenRequestError();if(t.forceRefresh)throw(o=this.serverTelemetryManager)===null||o===void 0||o.setCacheOutcome(Qt.FORCE_REFRESH),this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because forceRefresh is true."),K.createRefreshRequiredError();if(!this.config.cacheOptions.claimsBasedCachingEnabled&&!H.isEmptyObj(t.claims))throw(r=this.serverTelemetryManager)===null||r===void 0||r.setCacheOutcome(Qt.CLAIMS_REQUESTED_CACHE_SKIPPED),this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because claims-based caching is disabled and claims were requested."),K.createRefreshRequiredError();if(!t.account)throw K.createNoAccountInSilentRequestError();if(l=t.authority||this.authority.getPreferredCache(),h=this.cacheManager.readCacheRecord(t.account,t,l),h.accessToken){if(pt.wasClockTurnedBack(h.accessToken.cachedAt)||pt.isTokenExpired(h.accessToken.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw(s=this.serverTelemetryManager)===null||s===void 0||s.setCacheOutcome(Qt.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token is expired or will expire within "+this.config.systemOptions.tokenRenewalOffsetSeconds+" seconds."),K.createRefreshRequiredError();if(h.accessToken.refreshOn&&pt.isTokenExpired(h.accessToken.refreshOn,0))throw(c=this.serverTelemetryManager)===null||c===void 0||c.setCacheOutcome(Qt.REFRESH_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'."),K.createRefreshRequiredError()}else throw(i=this.serverTelemetryManager)===null||i===void 0||i.setCacheOutcome(Qt.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."),K.createRefreshRequiredError();return this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[4,this.generateResultFromCacheRecord(h,t)];case 1:return[2,u.sent()]}})})},e.prototype.generateResultFromCacheRecord=function(t,o){return ne(this,void 0,void 0,function(){var r,i;return oe(this,function(s){switch(s.label){case 0:if(t.idToken&&(r=new It(t.idToken.secret,this.config.cryptoInterface)),o.maxAge||o.maxAge===0){if(i=r==null?void 0:r.claims.auth_time,!i)throw K.createAuthTimeNotFoundError();It.checkMaxAge(i,o.maxAge)}return[4,no.generateAuthenticationResult(this.cryptoUtils,this.authority,t,!0,o,r)];case 1:return[2,s.sent()]}})})},e}(No);/*! @azure/msal-common v13.3.1 2023-10-27 */function da(n){return n.hasOwnProperty("authorization_endpoint")&&n.hasOwnProperty("token_endpoint")&&n.hasOwnProperty("issuer")&&n.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v13.3.1 2023-10-27 */var xr={endpointMetadata:{"https://login.microsoftonline.com/common/":{token_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/common/":{token_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/common/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/common/":{token_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/consumers/":{token_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/consumers/":{token_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/consumers/":{token_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/organizations/":{token_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/organizations/":{token_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/organizations/":{token_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"}},instanceDiscoveryMetadata:{"https://login.microsoftonline.com/common/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.chinacloudapi.cn/common/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/common/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.us/common/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/common/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.com/consumers/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.chinacloudapi.cn/consumers/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.us/consumers/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.com/organizations/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.chinacloudapi.cn/organizations/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.us/organizations/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}}},Br=xr.endpointMetadata,Ur=xr.instanceDiscoveryMetadata;/*! @azure/msal-common v13.3.1 2023-10-27 */var Bn;(function(n){n.AAD="AAD",n.OIDC="OIDC"})(Bn||(Bn={}));/*! @azure/msal-common v13.3.1 2023-10-27 */var Oo=function(){function n(){this.expiresAt=pt.nowSeconds()+Pn.REFRESH_TIME_SECONDS}return n.prototype.updateCloudDiscoveryMetadata=function(e,t){this.aliases=e.aliases,this.preferred_cache=e.preferred_cache,this.preferred_network=e.preferred_network,this.aliasesFromNetwork=t},n.prototype.updateEndpointMetadata=function(e,t){this.authorization_endpoint=e.authorization_endpoint,this.token_endpoint=e.token_endpoint,this.end_session_endpoint=e.end_session_endpoint,this.issuer=e.issuer,this.endpointsFromNetwork=t,this.jwks_uri=e.jwks_uri},n.prototype.updateCanonicalAuthority=function(e){this.canonical_authority=e},n.prototype.resetExpiresAt=function(){this.expiresAt=pt.nowSeconds()+Pn.REFRESH_TIME_SECONDS},n.prototype.isExpired=function(){return this.expiresAt<=pt.nowSeconds()},n.isAuthorityMetadataEntity=function(e,t){return t?e.indexOf(Pn.CACHE_KEY)===0&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri"):!1},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */function ua(n){return n.hasOwnProperty("tenant_discovery_endpoint")&&n.hasOwnProperty("metadata")}/*! @azure/msal-common v13.3.1 2023-10-27 */function pa(n){return n.hasOwnProperty("error")&&n.hasOwnProperty("error_description")}/*! @azure/msal-common v13.3.1 2023-10-27 */var ha=function(){function n(e,t,o){this.networkInterface=e,this.performanceClient=t,this.correlationId=o}return n.prototype.detectRegion=function(e,t){var o,r,i,s;return ne(this,void 0,void 0,function(){var c,l,h,u,g;return oe(this,function(f){switch(f.label){case 0:if((o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.RegionDiscoveryDetectRegion,this.correlationId),c=e,c)return[3,8];l=n.IMDS_OPTIONS,f.label=1;case 1:return f.trys.push([1,6,,7]),(r=this.performanceClient)===null||r===void 0||r.setPreQueueTime(R.RegionDiscoveryGetRegionFromIMDS,this.correlationId),[4,this.getRegionFromIMDS(b.IMDS_VERSION,l)];case 2:return h=f.sent(),h.status===_n.httpSuccess&&(c=h.body,t.region_source=$t.IMDS),h.status!==_n.httpBadRequest?[3,5]:((i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.RegionDiscoveryGetCurrentVersion,this.correlationId),[4,this.getCurrentVersion(l)]);case 3:return u=f.sent(),u?((s=this.performanceClient)===null||s===void 0||s.setPreQueueTime(R.RegionDiscoveryGetRegionFromIMDS,this.correlationId),[4,this.getRegionFromIMDS(u,l)]):(t.region_source=$t.FAILED_AUTO_DETECTION,[2,null]);case 4:g=f.sent(),g.status===_n.httpSuccess&&(c=g.body,t.region_source=$t.IMDS),f.label=5;case 5:return[3,7];case 6:return f.sent(),t.region_source=$t.FAILED_AUTO_DETECTION,[2,null];case 7:return[3,9];case 8:t.region_source=$t.ENVIRONMENT_VARIABLE,f.label=9;case 9:return c||(t.region_source=$t.FAILED_AUTO_DETECTION),[2,c||null]}})})},n.prototype.getRegionFromIMDS=function(e,t){var o;return ne(this,void 0,void 0,function(){return oe(this,function(r){return(o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.RegionDiscoveryGetRegionFromIMDS,this.correlationId),[2,this.networkInterface.sendGetRequestAsync(b.IMDS_ENDPOINT+"?api-version="+e+"&format=text",t,b.IMDS_TIMEOUT)]})})},n.prototype.getCurrentVersion=function(e){var t;return ne(this,void 0,void 0,function(){var o;return oe(this,function(r){switch(r.label){case 0:(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.RegionDiscoveryGetCurrentVersion,this.correlationId),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(b.IMDS_ENDPOINT+"?format=json",e)];case 2:return o=r.sent(),o.status===_n.httpBadRequest&&o.body&&o.body["newest-versions"]&&o.body["newest-versions"].length>0?[2,o.body["newest-versions"][0]]:[2,null];case 3:return r.sent(),[2,null];case 4:return[2]}})})},n.IMDS_OPTIONS={headers:{Metadata:"true"}},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Un=function(){function n(e,t,o,r,i,s,c){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=o,this.authorityOptions=r,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=i,this.performanceClient=s,this.correlationId=c,this.regionDiscovery=new ha(t,this.performanceClient,this.correlationId)}return n.prototype.getAuthorityType=function(e){if(e.HostNameAndPort.endsWith(b.CIAM_AUTH_URL))return $e.Ciam;var t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case b.ADFS:return $e.Adfs;case b.DSTS:return $e.Dsts}return $e.Default},Object.defineProperty(n.prototype,"authorityType",{get:function(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"protocolMode",{get:function(){return this.authorityOptions.protocolMode},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"options",{get:function(){return this.authorityOptions},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"canonicalAuthority",{get:function(){return this._canonicalAuthority.urlString},set:function(e){this._canonicalAuthority=new de(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"canonicalAuthorityUrlComponents",{get:function(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hostnameAndPort",{get:function(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tenant",{get:function(){return this.canonicalAuthorityUrlComponents.PathSegments[0]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"authorizationEndpoint",{get:function(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tokenEndpoint",{get:function(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"deviceCodeEndpoint",{get:function(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"endSessionEndpoint",{get:function(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw K.createLogoutNotSupportedError();return this.replacePath(this.metadata.end_session_endpoint)}else throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"selfSignedJwtAudience",{get:function(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"jwksUri",{get:function(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),n.prototype.canReplaceTenant=function(e){return e.PathSegments.length===1&&!n.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===$e.Default&&this.protocolMode===Bn.AAD},n.prototype.replaceTenant=function(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)},n.prototype.replacePath=function(e){var t=this,o=e,r=new de(this.metadata.canonical_authority),i=r.getUrlComponents(),s=i.PathSegments,c=this.canonicalAuthorityUrlComponents.PathSegments;return c.forEach(function(l,h){var u=s[h];if(h===0&&t.canReplaceTenant(i)){var g=new de(t.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];u!==g&&(t.logger.verbose("Replacing tenant domain name "+u+" with id "+g),u=g)}l!==u&&(o=o.replace("/"+u+"/","/"+l+"/"))}),this.replaceTenant(o)},Object.defineProperty(n.prototype,"defaultOpenIdConfigurationEndpoint",{get:function(){return this.authorityType===$e.Adfs||this.authorityType===$e.Dsts||this.protocolMode===Bn.OIDC?this.canonicalAuthority+".well-known/openid-configuration":this.canonicalAuthority+"v2.0/.well-known/openid-configuration"},enumerable:!1,configurable:!0}),n.prototype.discoveryComplete=function(){return!!this.metadata},n.prototype.resolveEndpointsAsync=function(){var e,t,o;return ne(this,void 0,void 0,function(){var r,i,s,c;return oe(this,function(l){switch(l.label){case 0:return(e=this.performanceClient)===null||e===void 0||e.addQueueMeasurement(R.AuthorityResolveEndpointsAsync,this.correlationId),r=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort),r||(r=new Oo,r.updateCanonicalAuthority(this.canonicalAuthority)),(t=this.performanceClient)===null||t===void 0||t.setPreQueueTime(R.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId),[4,this.updateCloudDiscoveryMetadata(r)];case 1:return i=l.sent(),this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,r.preferred_network),(o=this.performanceClient)===null||o===void 0||o.setPreQueueTime(R.AuthorityUpdateEndpointMetadata,this.correlationId),[4,this.updateEndpointMetadata(r)];case 2:return s=l.sent(),i!==ut.CACHE&&s!==ut.CACHE&&(r.resetExpiresAt(),r.updateCanonicalAuthority(this.canonicalAuthority)),c=this.cacheManager.generateAuthorityMetadataCacheKey(r.preferred_cache),this.cacheManager.setAuthorityMetadata(c,r),this.metadata=r,[2]}})})},n.prototype.updateEndpointMetadata=function(e){var t,o,r,i,s,c;return ne(this,void 0,void 0,function(){var l,h;return oe(this,function(u){switch(u.label){case 0:return(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.AuthorityUpdateEndpointMetadata,this.correlationId),l=this.getEndpointMetadataFromConfig(),l?(e.updateEndpointMetadata(l,!1),[2,ut.CONFIG]):this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!e.isExpired()?[2,ut.CACHE]:((o=this.performanceClient)===null||o===void 0||o.setPreQueueTime(R.AuthorityGetEndpointMetadataFromNetwork,this.correlationId),[4,this.getEndpointMetadataFromNetwork()]);case 1:return l=u.sent(),l?!((r=this.authorityOptions.azureRegionConfiguration)===null||r===void 0)&&r.azureRegion?((i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId),[4,this.updateMetadataWithRegionalInformation(l)]):[3,3]:[3,4];case 2:l=u.sent(),u.label=3;case 3:return e.updateEndpointMetadata(l,!0),[2,ut.NETWORK];case 4:return h=this.getEndpointMetadataFromHardcodedValues(),h&&!this.authorityOptions.skipAuthorityMetadataCache?!((s=this.authorityOptions.azureRegionConfiguration)===null||s===void 0)&&s.azureRegion?((c=this.performanceClient)===null||c===void 0||c.setPreQueueTime(R.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId),[4,this.updateMetadataWithRegionalInformation(h)]):[3,6]:[3,7];case 5:h=u.sent(),u.label=6;case 6:return e.updateEndpointMetadata(h,!1),[2,ut.HARDCODED_VALUES];case 7:throw K.createUnableToGetOpenidConfigError(this.defaultOpenIdConfigurationEndpoint)}})})},n.prototype.isAuthoritySameType=function(e){var t=new de(e.canonical_authority),o=t.getUrlComponents().PathSegments;return o.length===this.canonicalAuthorityUrlComponents.PathSegments.length},n.prototype.getEndpointMetadataFromConfig=function(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw we.createInvalidAuthorityMetadataError()}return null},n.prototype.getEndpointMetadataFromNetwork=function(){var e;return ne(this,void 0,void 0,function(){var t,o;return oe(this,function(r){switch(r.label){case 0:(e=this.performanceClient)===null||e===void 0||e.addQueueMeasurement(R.AuthorityGetEndpointMetadataFromNetwork,this.correlationId),t={},r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint,t)];case 2:return o=r.sent(),[2,da(o.body)?o.body:null];case 3:return r.sent(),[2,null];case 4:return[2]}})})},n.prototype.getEndpointMetadataFromHardcodedValues=function(){return this.canonicalAuthority in Br?Br[this.canonicalAuthority]:null},n.prototype.updateMetadataWithRegionalInformation=function(e){var t,o,r,i;return ne(this,void 0,void 0,function(){var s,c;return oe(this,function(l){switch(l.label){case 0:return(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId),s=(o=this.authorityOptions.azureRegionConfiguration)===null||o===void 0?void 0:o.azureRegion,s?s!==b.AZURE_REGION_AUTO_DISCOVER_FLAG?(this.regionDiscoveryMetadata.region_outcome=Ln.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=s,[2,n.replaceWithRegionalInformation(e,s)]):((r=this.performanceClient)===null||r===void 0||r.setPreQueueTime(R.RegionDiscoveryDetectRegion,this.correlationId),[4,this.regionDiscovery.detectRegion((i=this.authorityOptions.azureRegionConfiguration)===null||i===void 0?void 0:i.environmentRegion,this.regionDiscoveryMetadata)]):[3,2];case 1:if(c=l.sent(),c)return this.regionDiscoveryMetadata.region_outcome=Ln.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=c,[2,n.replaceWithRegionalInformation(e,c)];this.regionDiscoveryMetadata.region_outcome=Ln.AUTO_DETECTION_REQUESTED_FAILED,l.label=2;case 2:return[2,e]}})})},n.prototype.updateCloudDiscoveryMetadata=function(e){var t,o;return ne(this,void 0,void 0,function(){var r,i,s;return oe(this,function(c){switch(c.label){case 0:return(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId),this.logger.verbose("Attempting to get cloud discovery metadata in the config"),this.logger.verbosePii("Known Authorities: "+(this.authorityOptions.knownAuthorities||b.NOT_APPLICABLE)),this.logger.verbosePii("Authority Metadata: "+(this.authorityOptions.authorityMetadata||b.NOT_APPLICABLE)),this.logger.verbosePii("Canonical Authority: "+(e.canonical_authority||b.NOT_APPLICABLE)),r=this.getCloudDiscoveryMetadataFromConfig(),r?(this.logger.verbose("Found cloud discovery metadata in the config."),e.updateCloudDiscoveryMetadata(r,!1),[2,ut.CONFIG]):(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the cache."),i=e.isExpired(),this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!i?(this.logger.verbose("Found metadata in the cache."),[2,ut.CACHE]):(i&&this.logger.verbose("The metadata entity is expired."),this.logger.verbose("Did not find cloud discovery metadata in the cache... Attempting to get cloud discovery metadata from the network."),(o=this.performanceClient)===null||o===void 0||o.setPreQueueTime(R.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId),[4,this.getCloudDiscoveryMetadataFromNetwork()]));case 1:if(r=c.sent(),r)return this.logger.verbose("cloud discovery metadata was successfully returned from getCloudDiscoveryMetadataFromNetwork()"),e.updateCloudDiscoveryMetadata(r,!0),[2,ut.NETWORK];if(this.logger.verbose("Did not find cloud discovery metadata from the network... Attempting to get cloud discovery metadata from hardcoded values."),s=this.getCloudDiscoveryMetadataFromHarcodedValues(),s&&!this.options.skipAuthorityMetadataCache)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),e.updateCloudDiscoveryMetadata(s,!1),[2,ut.HARDCODED_VALUES];throw this.logger.error("Did not find cloud discovery metadata from hardcoded values... Metadata could not be obtained from config, cache, network or hardcoded values. Throwing Untrusted Authority Error."),we.createUntrustedAuthorityError()}})})},n.prototype.getCloudDiscoveryMetadataFromConfig=function(){if(this.authorityType===$e.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),n.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");var e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),t=n.getCloudDiscoveryMetadataFromNetworkResponse(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),t)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),t;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),we.createInvalidCloudDiscoveryMetadataError()}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),n.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null},n.prototype.getCloudDiscoveryMetadataFromNetwork=function(){var e;return ne(this,void 0,void 0,function(){var t,o,r,i,s,c,l,h;return oe(this,function(u){switch(u.label){case 0:(e=this.performanceClient)===null||e===void 0||e.addQueueMeasurement(R.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId),t=""+b.AAD_INSTANCE_DISCOVERY_ENDPT+this.canonicalAuthority+"oauth2/v2.0/authorize",o={},r=null,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(t,o)];case 2:if(i=u.sent(),s=void 0,c=void 0,ua(i.body))s=i.body,c=s.metadata,this.logger.verbosePii("tenant_discovery_endpoint is: "+s.tenant_discovery_endpoint);else if(pa(i.body)){if(this.logger.warning("A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: "+i.status),s=i.body,s.error===b.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),[2,null];this.logger.warning("The CloudInstanceDiscoveryErrorResponse error is "+s.error),this.logger.warning("The CloudInstanceDiscoveryErrorResponse error description is "+s.error_description),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),c=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),[2,null];return this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),r=n.getCloudDiscoveryMetadataFromNetworkResponse(c,this.hostnameAndPort),[3,4];case 3:return l=u.sent(),l instanceof Y?this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
|
|
159
|
+
***************************************************************************** */var To=function(n,e){return To=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])},To(n,e)};function Ye(n,e){To(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var he=function(){return he=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},he.apply(this,arguments)};function ne(n,e,t,o){function r(i){return i instanceof t?i:new t(function(s){s(i)})}return new(t||(t=Promise))(function(i,s){function c(u){try{h(o.next(u))}catch(g){s(g)}}function l(u){try{h(o.throw(u))}catch(g){s(g)}}function h(u){u.done?i(u.value):r(u.value).then(c,l)}h((o=o.apply(n,[])).next())})}function oe(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(h){return function(u){return l([h,u])}}function l(h){if(o)throw new TypeError("Generator is already executing.");for(;t;)try{if(o=1,r&&(i=h[0]&2?r.return:h[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,h[1])).done)return i;switch(r=0,i&&(h=[h[0]&2,i.value]),h[0]){case 0:case 1:i=h;break;case 4:return t.label++,{value:h[1],done:!1};case 5:t.label++,r=h[1],h=[0];continue;case 7:h=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){t.label=h[1];break}if(h[0]===6&&t.label<i[1]){t.label=i[1],i=h;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(h);break}i[2]&&t.ops.pop(),t.trys.pop();continue}h=e.call(n,t)}catch(u){h=[6,u],r=0}finally{o=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function $n(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;for(var o=Array(n),r=0,e=0;e<t;e++)for(var i=arguments[e],s=0,c=i.length;s<c;s++,r++)o[r]=i[s];return o}/*! @azure/msal-common v13.3.1 2023-10-27 */var b={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",REGIONAL_AUTH_NON_MSI_QUERY_STRING:"allowestsrnonmsi=true",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},An=[b.OPENID_SCOPE,b.PROFILE_SCOPE,b.OFFLINE_ACCESS_SCOPE],Ar=$n(An,[b.EMAIL_SCOPE]),ot;(function(n){n.CONTENT_TYPE="Content-Type",n.RETRY_AFTER="Retry-After",n.CCS_HEADER="X-AnchorMailbox",n.WWWAuthenticate="WWW-Authenticate",n.AuthenticationInfo="Authentication-Info",n.X_MS_REQUEST_ID="x-ms-request-id",n.X_MS_HTTP_VERSION="x-ms-httpver"})(ot||(ot={}));var Ne;(function(n){n.ID_TOKEN="idtoken",n.CLIENT_INFO="client.info",n.ADAL_ID_TOKEN="adal.idtoken",n.ERROR="error",n.ERROR_DESC="error.description",n.ACTIVE_ACCOUNT="active-account",n.ACTIVE_ACCOUNT_FILTERS="active-account-filters"})(Ne||(Ne={}));var on;(function(n){n.COMMON="common",n.ORGANIZATIONS="organizations",n.CONSUMERS="consumers"})(on||(on={}));var ae;(function(n){n.CLIENT_ID="client_id",n.REDIRECT_URI="redirect_uri",n.RESPONSE_TYPE="response_type",n.RESPONSE_MODE="response_mode",n.GRANT_TYPE="grant_type",n.CLAIMS="claims",n.SCOPE="scope",n.ERROR="error",n.ERROR_DESCRIPTION="error_description",n.ACCESS_TOKEN="access_token",n.ID_TOKEN="id_token",n.REFRESH_TOKEN="refresh_token",n.EXPIRES_IN="expires_in",n.STATE="state",n.NONCE="nonce",n.PROMPT="prompt",n.SESSION_STATE="session_state",n.CLIENT_INFO="client_info",n.CODE="code",n.CODE_CHALLENGE="code_challenge",n.CODE_CHALLENGE_METHOD="code_challenge_method",n.CODE_VERIFIER="code_verifier",n.CLIENT_REQUEST_ID="client-request-id",n.X_CLIENT_SKU="x-client-SKU",n.X_CLIENT_VER="x-client-VER",n.X_CLIENT_OS="x-client-OS",n.X_CLIENT_CPU="x-client-CPU",n.X_CLIENT_CURR_TELEM="x-client-current-telemetry",n.X_CLIENT_LAST_TELEM="x-client-last-telemetry",n.X_MS_LIB_CAPABILITY="x-ms-lib-capability",n.X_APP_NAME="x-app-name",n.X_APP_VER="x-app-ver",n.POST_LOGOUT_URI="post_logout_redirect_uri",n.ID_TOKEN_HINT="id_token_hint",n.DEVICE_CODE="device_code",n.CLIENT_SECRET="client_secret",n.CLIENT_ASSERTION="client_assertion",n.CLIENT_ASSERTION_TYPE="client_assertion_type",n.TOKEN_TYPE="token_type",n.REQ_CNF="req_cnf",n.OBO_ASSERTION="assertion",n.REQUESTED_TOKEN_USE="requested_token_use",n.ON_BEHALF_OF="on_behalf_of",n.FOCI="foci",n.CCS_HEADER="X-AnchorMailbox",n.RETURN_SPA_CODE="return_spa_code",n.NATIVE_BROKER="nativebroker",n.LOGOUT_HINT="logout_hint"})(ae||(ae={}));var gn;(function(n){n.ACCESS_TOKEN="access_token",n.XMS_CC="xms_cc"})(gn||(gn={}));var Ve={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},Rn;(function(n){n.ACCOUNT="account",n.SID="sid",n.LOGIN_HINT="login_hint",n.ID_TOKEN="id_token",n.DOMAIN_HINT="domain_hint",n.ORGANIZATIONS="organizations",n.CONSUMERS="consumers",n.ACCOUNT_ID="accountIdentifier",n.HOMEACCOUNT_ID="homeAccountIdentifier"})(Rn||(Rn={}));var Rr={PLAIN:"plain",S256:"S256"},Qn;(function(n){n.QUERY="query",n.FRAGMENT="fragment",n.FORM_POST="form_post"})(Qn||(Qn={}));var Wn;(function(n){n.IMPLICIT_GRANT="implicit",n.AUTHORIZATION_CODE_GRANT="authorization_code",n.CLIENT_CREDENTIALS_GRANT="client_credentials",n.RESOURCE_OWNER_PASSWORD_GRANT="password",n.REFRESH_TOKEN_GRANT="refresh_token",n.DEVICE_CODE_GRANT="device_code",n.JWT_BEARER="urn:ietf:params:oauth:grant-type:jwt-bearer"})(Wn||(Wn={}));var jt;(function(n){n.MSSTS_ACCOUNT_TYPE="MSSTS",n.ADFS_ACCOUNT_TYPE="ADFS",n.MSAV1_ACCOUNT_TYPE="MSA",n.GENERIC_ACCOUNT_TYPE="Generic"})(jt||(jt={}));var Pe;(function(n){n.CACHE_KEY_SEPARATOR="-",n.CLIENT_INFO_SEPARATOR="."})(Pe||(Pe={}));var Z;(function(n){n.ID_TOKEN="IdToken",n.ACCESS_TOKEN="AccessToken",n.ACCESS_TOKEN_WITH_AUTH_SCHEME="AccessToken_With_AuthScheme",n.REFRESH_TOKEN="RefreshToken"})(Z||(Z={}));var qt;(function(n){n[n.ADFS=1001]="ADFS",n[n.MSA=1002]="MSA",n[n.MSSTS=1003]="MSSTS",n[n.GENERIC=1004]="GENERIC",n[n.ACCESS_TOKEN=2001]="ACCESS_TOKEN",n[n.REFRESH_TOKEN=2002]="REFRESH_TOKEN",n[n.ID_TOKEN=2003]="ID_TOKEN",n[n.APP_METADATA=3001]="APP_METADATA",n[n.UNDEFINED=9999]="UNDEFINED"})(qt||(qt={}));var So="appmetadata",$i="client_info",Nn="1",Pn={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},ut;(function(n){n.CONFIG="config",n.CACHE="cache",n.NETWORK="network",n.HARDCODED_VALUES="hardcoded_values"})(ut||(ut={}));var Be={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},ge;(function(n){n.BEARER="Bearer",n.POP="pop",n.SSH="ssh-cert"})(ge||(ge={}));var Mn={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Nr={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Yn;(function(n){n.username="username",n.password="password"})(Yn||(Yn={}));var _n;(function(n){n[n.httpSuccess=200]="httpSuccess",n[n.httpBadRequest=400]="httpBadRequest"})(_n||(_n={}));var $t;(function(n){n.FAILED_AUTO_DETECTION="1",n.INTERNAL_CACHE="2",n.ENVIRONMENT_VARIABLE="3",n.IMDS="4"})($t||($t={}));var Ln;(function(n){n.CONFIGURED_MATCHES_DETECTED="1",n.CONFIGURED_NO_AUTO_DETECTION="2",n.CONFIGURED_NOT_DETECTED="3",n.AUTO_DETECTION_REQUESTED_SUCCESSFUL="4",n.AUTO_DETECTION_REQUESTED_FAILED="5"})(Ln||(Ln={}));var Qt;(function(n){n.NO_CACHE_HIT="0",n.FORCE_REFRESH="1",n.NO_CACHED_ACCESS_TOKEN="2",n.CACHED_ACCESS_TOKEN_EXPIRED="3",n.REFRESH_CACHED_ACCESS_TOKEN="4",n.CLAIMS_REQUESTED_CACHE_SKIPPED="5"})(Qt||(Qt={}));var Io;(function(n){n.Jwt="JWT",n.Jwk="JWK",n.Pop="pop"})(Io||(Io={}));/*! @azure/msal-common v13.3.1 2023-10-27 */var Jn={unexpectedError:{code:"unexpected_error",desc:"Unexpected error in authentication."},postRequestFailed:{code:"post_request_failed",desc:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."}},Y=function(n){Ye(e,n);function e(t,o,r){var i=this,s=o?t+": "+o:t;return i=n.call(this,s)||this,Object.setPrototypeOf(i,e.prototype),i.errorCode=t||b.EMPTY_STRING,i.errorMessage=o||b.EMPTY_STRING,i.subError=r||b.EMPTY_STRING,i.name="AuthError",i}return e.prototype.setCorrelationId=function(t){this.correlationId=t},e.createUnexpectedError=function(t){return new e(Jn.unexpectedError.code,Jn.unexpectedError.desc+": "+t)},e.createPostRequestFailed=function(t){return new e(Jn.postRequestFailed.code,Jn.postRequestFailed.desc+": "+t)},e}(Error);/*! @azure/msal-common v13.3.1 2023-10-27 */var Xn={createNewGuid:function(){var n="Crypto interface - createNewGuid() has not been implemented";throw Y.createUnexpectedError(n)},base64Decode:function(){var n="Crypto interface - base64Decode() has not been implemented";throw Y.createUnexpectedError(n)},base64Encode:function(){var n="Crypto interface - base64Encode() has not been implemented";throw Y.createUnexpectedError(n)},generatePkceCodes:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - generatePkceCodes() has not been implemented",Y.createUnexpectedError(n)})})},getPublicKeyThumbprint:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - getPublicKeyThumbprint() has not been implemented",Y.createUnexpectedError(n)})})},removeTokenBindingKey:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - removeTokenBindingKey() has not been implemented",Y.createUnexpectedError(n)})})},clearKeystore:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - clearKeystore() has not been implemented",Y.createUnexpectedError(n)})})},signJwt:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - signJwt() has not been implemented",Y.createUnexpectedError(n)})})},hashString:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Crypto interface - hashString() has not been implemented",Y.createUnexpectedError(n)})})}};/*! @azure/msal-common v13.3.1 2023-10-27 */var D={clientInfoDecodingError:{code:"client_info_decoding_error",desc:"The client info could not be parsed/decoded correctly. Please review the trace to determine the root cause."},clientInfoEmptyError:{code:"client_info_empty_error",desc:"The client info was empty. Please review the trace to determine the root cause."},tokenParsingError:{code:"token_parsing_error",desc:"Token cannot be parsed. Please review stack trace to determine root cause."},nullOrEmptyToken:{code:"null_or_empty_token",desc:"The token is null or empty. Please review the trace to determine the root cause."},endpointResolutionError:{code:"endpoints_resolution_error",desc:"Error: could not resolve endpoints. Please check network and try again."},networkError:{code:"network_error",desc:"Network request failed. Please check network trace to determine root cause."},unableToGetOpenidConfigError:{code:"openid_config_error",desc:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints."},hashNotDeserialized:{code:"hash_not_deserialized",desc:"The hash parameters could not be deserialized. Please review the trace to determine the root cause."},blankGuidGenerated:{code:"blank_guid_generated",desc:"The guid generated was blank. Please review the trace to determine the root cause."},invalidStateError:{code:"invalid_state",desc:"State was not the expected format. Please check the logs to determine whether the request was sent using ProtocolUtils.setRequestState()."},stateMismatchError:{code:"state_mismatch",desc:"State mismatch error. Please check your network. Continued requests may cause cache overflow."},stateNotFoundError:{code:"state_not_found",desc:"State not found"},nonceMismatchError:{code:"nonce_mismatch",desc:"Nonce mismatch error. This may be caused by a race condition in concurrent requests."},nonceNotFoundError:{code:"nonce_not_found",desc:"nonce not found"},authTimeNotFoundError:{code:"auth_time_not_found",desc:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information."},maxAgeTranspiredError:{code:"max_age_transpired",desc:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication."},noTokensFoundError:{code:"no_tokens_found",desc:"No tokens were found for the given scopes, and no authorization code was passed to acquireToken. You must retrieve an authorization code before making a call to acquireToken()."},multipleMatchingTokens:{code:"multiple_matching_tokens",desc:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account."},multipleMatchingAccounts:{code:"multiple_matching_accounts",desc:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account"},multipleMatchingAppMetadata:{code:"multiple_matching_appMetadata",desc:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata"},tokenRequestCannotBeMade:{code:"request_cannot_be_made",desc:"Token request cannot be made without authorization code or refresh token."},appendEmptyScopeError:{code:"cannot_append_empty_scope",desc:"Cannot append null or empty scope to ScopeSet. Please check the stack trace for more info."},removeEmptyScopeError:{code:"cannot_remove_empty_scope",desc:"Cannot remove null or empty scope from ScopeSet. Please check the stack trace for more info."},appendScopeSetError:{code:"cannot_append_scopeset",desc:"Cannot append ScopeSet due to error."},emptyInputScopeSetError:{code:"empty_input_scopeset",desc:"Empty input ScopeSet cannot be processed."},DeviceCodePollingCancelled:{code:"device_code_polling_cancelled",desc:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true."},DeviceCodeExpired:{code:"device_code_expired",desc:"Device code is expired."},DeviceCodeUnknownError:{code:"device_code_unknown_error",desc:"Device code stopped polling for unknown reasons."},NoAccountInSilentRequest:{code:"no_account_in_silent_request",desc:"Please pass an account object, silent flow is not supported without account information"},invalidCacheRecord:{code:"invalid_cache_record",desc:"Cache record object was null or undefined."},invalidCacheEnvironment:{code:"invalid_cache_environment",desc:"Invalid environment when attempting to create cache entry"},noAccountFound:{code:"no_account_found",desc:"No account found in cache for given key."},CachePluginError:{code:"no cache plugin set on CacheManager",desc:"ICachePlugin needs to be set before using readFromStorage or writeFromStorage"},noCryptoObj:{code:"no_crypto_object",desc:"No crypto object detected. This is required for the following operation: "},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},unexpectedAccountType:{code:"unexpected_account_type",desc:"Unexpected account type."},unexpectedCredentialType:{code:"unexpected_credential_type",desc:"Unexpected credential type."},invalidAssertion:{code:"invalid_assertion",desc:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515"},invalidClientCredential:{code:"invalid_client_credential",desc:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential"},tokenRefreshRequired:{code:"token_refresh_required",desc:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired."},userTimeoutReached:{code:"user_timeout_reached",desc:"User defined timeout for device code polling reached"},tokenClaimsRequired:{code:"token_claims_cnf_required_for_signedjwt",desc:"Cannot generate a POP jwt if the token_claims are not populated"},noAuthorizationCodeFromServer:{code:"authorization_code_missing_from_server_response",desc:"Server response does not contain an authorization code to proceed"},noAzureRegionDetected:{code:"no_azure_region_detected",desc:"No azure region was detected and no fallback was made available"},accessTokenEntityNullError:{code:"access_token_entity_null",desc:"Access token entity is null, please check logs and cache to ensure a valid access token is present."},bindingKeyNotRemovedError:{code:"binding_key_not_removed",desc:"Could not remove the credential's binding key from storage."},logoutNotSupported:{code:"end_session_endpoint_not_supported",desc:"Provided authority does not support logout."},keyIdMissing:{code:"key_id_missing",desc:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key."},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},userCanceledError:{code:"user_canceled",desc:"User canceled the flow."}},K=function(n){Ye(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="ClientAuthError",Object.setPrototypeOf(r,e.prototype),r}return e.createClientInfoDecodingError=function(t){return new e(D.clientInfoDecodingError.code,D.clientInfoDecodingError.desc+" Failed with error: "+t)},e.createClientInfoEmptyError=function(){return new e(D.clientInfoEmptyError.code,""+D.clientInfoEmptyError.desc)},e.createTokenParsingError=function(t){return new e(D.tokenParsingError.code,D.tokenParsingError.desc+" Failed with error: "+t)},e.createTokenNullOrEmptyError=function(t){return new e(D.nullOrEmptyToken.code,D.nullOrEmptyToken.desc+" Raw Token Value: "+t)},e.createEndpointDiscoveryIncompleteError=function(t){return new e(D.endpointResolutionError.code,D.endpointResolutionError.desc+" Detail: "+t)},e.createNetworkError=function(t,o){return new e(D.networkError.code,D.networkError.desc+" | Fetch client threw: "+o+" | Attempted to reach: "+t.split("?")[0])},e.createUnableToGetOpenidConfigError=function(t){return new e(D.unableToGetOpenidConfigError.code,D.unableToGetOpenidConfigError.desc+" Attempted to retrieve endpoints from: "+t)},e.createHashNotDeserializedError=function(t){return new e(D.hashNotDeserialized.code,D.hashNotDeserialized.desc+" Given Object: "+t)},e.createInvalidStateError=function(t,o){return new e(D.invalidStateError.code,D.invalidStateError.desc+" Invalid State: "+t+", Root Err: "+o)},e.createStateMismatchError=function(){return new e(D.stateMismatchError.code,D.stateMismatchError.desc)},e.createStateNotFoundError=function(t){return new e(D.stateNotFoundError.code,D.stateNotFoundError.desc+": "+t)},e.createNonceMismatchError=function(){return new e(D.nonceMismatchError.code,D.nonceMismatchError.desc)},e.createAuthTimeNotFoundError=function(){return new e(D.authTimeNotFoundError.code,D.authTimeNotFoundError.desc)},e.createMaxAgeTranspiredError=function(){return new e(D.maxAgeTranspiredError.code,D.maxAgeTranspiredError.desc)},e.createNonceNotFoundError=function(t){return new e(D.nonceNotFoundError.code,D.nonceNotFoundError.desc+": "+t)},e.createMultipleMatchingTokensInCacheError=function(){return new e(D.multipleMatchingTokens.code,D.multipleMatchingTokens.desc+".")},e.createMultipleMatchingAccountsInCacheError=function(){return new e(D.multipleMatchingAccounts.code,D.multipleMatchingAccounts.desc)},e.createMultipleMatchingAppMetadataInCacheError=function(){return new e(D.multipleMatchingAppMetadata.code,D.multipleMatchingAppMetadata.desc)},e.createTokenRequestCannotBeMadeError=function(){return new e(D.tokenRequestCannotBeMade.code,D.tokenRequestCannotBeMade.desc)},e.createAppendEmptyScopeToSetError=function(t){return new e(D.appendEmptyScopeError.code,D.appendEmptyScopeError.desc+" Given Scope: "+t)},e.createRemoveEmptyScopeFromSetError=function(t){return new e(D.removeEmptyScopeError.code,D.removeEmptyScopeError.desc+" Given Scope: "+t)},e.createAppendScopeSetError=function(t){return new e(D.appendScopeSetError.code,D.appendScopeSetError.desc+" Detail Error: "+t)},e.createEmptyInputScopeSetError=function(){return new e(D.emptyInputScopeSetError.code,""+D.emptyInputScopeSetError.desc)},e.createDeviceCodeCancelledError=function(){return new e(D.DeviceCodePollingCancelled.code,""+D.DeviceCodePollingCancelled.desc)},e.createDeviceCodeExpiredError=function(){return new e(D.DeviceCodeExpired.code,""+D.DeviceCodeExpired.desc)},e.createDeviceCodeUnknownError=function(){return new e(D.DeviceCodeUnknownError.code,""+D.DeviceCodeUnknownError.desc)},e.createNoAccountInSilentRequestError=function(){return new e(D.NoAccountInSilentRequest.code,""+D.NoAccountInSilentRequest.desc)},e.createNullOrUndefinedCacheRecord=function(){return new e(D.invalidCacheRecord.code,D.invalidCacheRecord.desc)},e.createInvalidCacheEnvironmentError=function(){return new e(D.invalidCacheEnvironment.code,D.invalidCacheEnvironment.desc)},e.createNoAccountFoundError=function(){return new e(D.noAccountFound.code,D.noAccountFound.desc)},e.createCachePluginError=function(){return new e(D.CachePluginError.code,""+D.CachePluginError.desc)},e.createNoCryptoObjectError=function(t){return new e(D.noCryptoObj.code,""+D.noCryptoObj.desc+t)},e.createInvalidCacheTypeError=function(){return new e(D.invalidCacheType.code,""+D.invalidCacheType.desc)},e.createUnexpectedAccountTypeError=function(){return new e(D.unexpectedAccountType.code,""+D.unexpectedAccountType.desc)},e.createUnexpectedCredentialTypeError=function(){return new e(D.unexpectedCredentialType.code,""+D.unexpectedCredentialType.desc)},e.createInvalidAssertionError=function(){return new e(D.invalidAssertion.code,""+D.invalidAssertion.desc)},e.createInvalidCredentialError=function(){return new e(D.invalidClientCredential.code,""+D.invalidClientCredential.desc)},e.createRefreshRequiredError=function(){return new e(D.tokenRefreshRequired.code,D.tokenRefreshRequired.desc)},e.createUserTimeoutReachedError=function(){return new e(D.userTimeoutReached.code,D.userTimeoutReached.desc)},e.createTokenClaimsRequiredError=function(){return new e(D.tokenClaimsRequired.code,D.tokenClaimsRequired.desc)},e.createNoAuthCodeInServerResponseError=function(){return new e(D.noAuthorizationCodeFromServer.code,D.noAuthorizationCodeFromServer.desc)},e.createBindingKeyNotRemovedError=function(){return new e(D.bindingKeyNotRemovedError.code,D.bindingKeyNotRemovedError.desc)},e.createLogoutNotSupportedError=function(){return new e(D.logoutNotSupported.code,D.logoutNotSupported.desc)},e.createKeyIdMissingError=function(){return new e(D.keyIdMissing.code,D.keyIdMissing.desc)},e.createNoNetworkConnectivityError=function(){return new e(D.noNetworkConnectivity.code,D.noNetworkConnectivity.desc)},e.createUserCanceledError=function(){return new e(D.userCanceledError.code,D.userCanceledError.desc)},e}(Y);/*! @azure/msal-common v13.3.1 2023-10-27 */var H=function(){function n(){}return n.decodeAuthToken=function(e){if(n.isEmpty(e))throw K.createTokenNullOrEmptyError(e);var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,o=t.exec(e);if(!o||o.length<4)throw K.createTokenParsingError("Given token is malformed: "+JSON.stringify(e));var r={header:o[1],JWSPayload:o[2],JWSSig:o[3]};return r},n.isEmpty=function(e){return typeof e>"u"||!e||e.length===0},n.isEmptyObj=function(e){if(e&&!n.isEmpty(e))try{var t=JSON.parse(e);return Object.keys(t).length===0}catch{}return!0},n.startsWith=function(e,t){return e.indexOf(t)===0},n.endsWith=function(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length},n.queryStringToObject=function(e){var t={},o=e.split("&"),r=function(i){return decodeURIComponent(i.replace(/\+/g," "))};return o.forEach(function(i){if(i.trim()){var s=i.split(/=(.+)/g,2),c=s[0],l=s[1];c&&l&&(t[r(c)]=r(l))}}),t},n.trimArrayEntries=function(e){return e.map(function(t){return t.trim()})},n.removeEmptyStringsFromArray=function(e){return e.filter(function(t){return!n.isEmpty(t)})},n.jsonParseHelper=function(e){try{return JSON.parse(e)}catch{return null}},n.matchPattern=function(e,t){var o=new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?"));return o.test(t)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ze;(function(n){n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Info=2]="Info",n[n.Verbose=3]="Verbose",n[n.Trace=4]="Trace"})(ze||(ze={}));var Ao=function(){function n(e,t,o){this.level=ze.Info;var r=function(){},i=e||n.createDefaultLoggerOptions();this.localCallback=i.loggerCallback||r,this.piiLoggingEnabled=i.piiLoggingEnabled||!1,this.level=typeof i.logLevel=="number"?i.logLevel:ze.Info,this.correlationId=i.correlationId||b.EMPTY_STRING,this.packageName=t||b.EMPTY_STRING,this.packageVersion=o||b.EMPTY_STRING}return n.createDefaultLoggerOptions=function(){return{loggerCallback:function(){},piiLoggingEnabled:!1,logLevel:ze.Info}},n.prototype.clone=function(e,t,o){return new n({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:o||this.correlationId},e,t)},n.prototype.logMessage=function(e,t){if(!(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)){var o=new Date().toUTCString(),r;H.isEmpty(t.correlationId)?H.isEmpty(this.correlationId)?r="["+o+"]":r="["+o+"] : ["+this.correlationId+"]":r="["+o+"] : ["+t.correlationId+"]";var i=r+" : "+this.packageName+"@"+this.packageVersion+" : "+ze[t.logLevel]+" - "+e;this.executeCallback(t.logLevel,i,t.containsPii||!1)}},n.prototype.executeCallback=function(e,t,o){this.localCallback&&this.localCallback(e,t,o)},n.prototype.error=function(e,t){this.logMessage(e,{logLevel:ze.Error,containsPii:!1,correlationId:t||b.EMPTY_STRING})},n.prototype.errorPii=function(e,t){this.logMessage(e,{logLevel:ze.Error,containsPii:!0,correlationId:t||b.EMPTY_STRING})},n.prototype.warning=function(e,t){this.logMessage(e,{logLevel:ze.Warning,containsPii:!1,correlationId:t||b.EMPTY_STRING})},n.prototype.warningPii=function(e,t){this.logMessage(e,{logLevel:ze.Warning,containsPii:!0,correlationId:t||b.EMPTY_STRING})},n.prototype.info=function(e,t){this.logMessage(e,{logLevel:ze.Info,containsPii:!1,correlationId:t||b.EMPTY_STRING})},n.prototype.infoPii=function(e,t){this.logMessage(e,{logLevel:ze.Info,containsPii:!0,correlationId:t||b.EMPTY_STRING})},n.prototype.verbose=function(e,t){this.logMessage(e,{logLevel:ze.Verbose,containsPii:!1,correlationId:t||b.EMPTY_STRING})},n.prototype.verbosePii=function(e,t){this.logMessage(e,{logLevel:ze.Verbose,containsPii:!0,correlationId:t||b.EMPTY_STRING})},n.prototype.trace=function(e,t){this.logMessage(e,{logLevel:ze.Trace,containsPii:!1,correlationId:t||b.EMPTY_STRING})},n.prototype.tracePii=function(e,t){this.logMessage(e,{logLevel:ze.Trace,containsPii:!0,correlationId:t||b.EMPTY_STRING})},n.prototype.isPiiLoggingEnabled=function(){return this.piiLoggingEnabled||!1},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Pr="@azure/msal-common",Ro="13.3.1";/*! @azure/msal-common v13.3.1 2023-10-27 */var On;(function(n){n[n.None=0]="None",n.AzurePublic="https://login.microsoftonline.com",n.AzurePpe="https://login.windows-ppe.net",n.AzureChina="https://login.chinacloudapi.cn",n.AzureGermany="https://login.microsoftonline.de",n.AzureUsGovernment="https://login.microsoftonline.us"})(On||(On={}));/*! @azure/msal-common v13.3.1 2023-10-27 */var re={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},claimsRequestParsingError:{code:"claims_request_parsing_error",desc:"Could not parse the given claims request object."},authorityUriInsecure:{code:"authority_uri_insecure",desc:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options"},urlParseError:{code:"url_parse_error",desc:"URL could not be parsed into appropriate segments."},urlEmptyError:{code:"empty_url_error",desc:"URL was empty or null."},emptyScopesError:{code:"empty_input_scopes_error",desc:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token."},nonArrayScopesError:{code:"nonarray_input_scopes_error",desc:"Scopes cannot be passed as non-array."},clientIdSingleScopeError:{code:"clientid_input_scopes_error",desc:"Client ID can only be provided as a single scope."},invalidPrompt:{code:"invalid_prompt_value",desc:"Supported prompt values are 'login', 'select_account', 'consent', 'create', 'none' and 'no_session'. Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest"},invalidClaimsRequest:{code:"invalid_claims",desc:"Given claims parameter must be a stringified JSON object."},tokenRequestEmptyError:{code:"token_request_empty",desc:"Token request was empty and not found in cache."},logoutRequestEmptyError:{code:"logout_request_empty",desc:"The logout request was null or undefined."},invalidCodeChallengeMethod:{code:"invalid_code_challenge_method",desc:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".'},invalidCodeChallengeParams:{code:"pkce_params_missing",desc:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request"},invalidCloudDiscoveryMetadata:{code:"invalid_cloud_discovery_metadata",desc:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields"},invalidAuthorityMetadata:{code:"invalid_authority_metadata",desc:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields."},untrustedAuthority:{code:"untrusted_authority",desc:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter."},invalidAzureCloudInstance:{code:"invalid_azure_cloud_instance",desc:"Invalid AzureCloudInstance provided. Please refer MSAL JS docs: aks.ms/msaljs/azure_cloud_instance for valid values"},missingSshJwk:{code:"missing_ssh_jwk",desc:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme."},missingSshKid:{code:"missing_ssh_kid",desc:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme."},missingNonceAuthenticationHeader:{code:"missing_nonce_authentication_header",desc:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce."},invalidAuthenticationHeader:{code:"invalid_authentication_header",desc:"Invalid authentication header provided"},authorityMismatch:{code:"authority_mismatch",desc:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."}},we=function(n){Ye(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="ClientConfigurationError",Object.setPrototypeOf(r,e.prototype),r}return e.createRedirectUriEmptyError=function(){return new e(re.redirectUriNotSet.code,re.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(re.postLogoutUriNotSet.code,re.postLogoutUriNotSet.desc)},e.createClaimsRequestParsingError=function(t){return new e(re.claimsRequestParsingError.code,re.claimsRequestParsingError.desc+" Given value: "+t)},e.createInsecureAuthorityUriError=function(t){return new e(re.authorityUriInsecure.code,re.authorityUriInsecure.desc+" Given URI: "+t)},e.createUrlParseError=function(t){return new e(re.urlParseError.code,re.urlParseError.desc+" Given Error: "+t)},e.createUrlEmptyError=function(){return new e(re.urlEmptyError.code,re.urlEmptyError.desc)},e.createEmptyScopesArrayError=function(){return new e(re.emptyScopesError.code,""+re.emptyScopesError.desc)},e.createClientIdSingleScopeError=function(t){return new e(re.clientIdSingleScopeError.code,re.clientIdSingleScopeError.desc+" Given Scopes: "+t)},e.createInvalidPromptError=function(t){return new e(re.invalidPrompt.code,re.invalidPrompt.desc+" Given value: "+t)},e.createInvalidClaimsRequestError=function(){return new e(re.invalidClaimsRequest.code,re.invalidClaimsRequest.desc)},e.createEmptyLogoutRequestError=function(){return new e(re.logoutRequestEmptyError.code,re.logoutRequestEmptyError.desc)},e.createEmptyTokenRequestError=function(){return new e(re.tokenRequestEmptyError.code,re.tokenRequestEmptyError.desc)},e.createInvalidCodeChallengeMethodError=function(){return new e(re.invalidCodeChallengeMethod.code,re.invalidCodeChallengeMethod.desc)},e.createInvalidCodeChallengeParamsError=function(){return new e(re.invalidCodeChallengeParams.code,re.invalidCodeChallengeParams.desc)},e.createInvalidCloudDiscoveryMetadataError=function(){return new e(re.invalidCloudDiscoveryMetadata.code,re.invalidCloudDiscoveryMetadata.desc)},e.createInvalidAuthorityMetadataError=function(){return new e(re.invalidAuthorityMetadata.code,re.invalidAuthorityMetadata.desc)},e.createUntrustedAuthorityError=function(){return new e(re.untrustedAuthority.code,re.untrustedAuthority.desc)},e.createInvalidAzureCloudInstanceError=function(){return new e(re.invalidAzureCloudInstance.code,re.invalidAzureCloudInstance.desc)},e.createMissingSshJwkError=function(){return new e(re.missingSshJwk.code,re.missingSshJwk.desc)},e.createMissingSshKidError=function(){return new e(re.missingSshKid.code,re.missingSshKid.desc)},e.createMissingNonceAuthenticationHeadersError=function(){return new e(re.missingNonceAuthenticationHeader.code,re.missingNonceAuthenticationHeader.desc)},e.createInvalidAuthenticationHeaderError=function(t,o){return new e(re.invalidAuthenticationHeader.code,re.invalidAuthenticationHeader.desc+". Invalid header: "+t+". Details: "+o)},e.createAuthorityMismatchError=function(){return new e(re.authorityMismatch.code,re.authorityMismatch.desc)},e}(K);/*! @azure/msal-common v13.3.1 2023-10-27 */var He=function(){function n(e){var t=this,o=e?H.trimArrayEntries($n(e)):[],r=o?H.removeEmptyStringsFromArray(o):[];this.validateInputScopes(r),this.scopes=new Set,r.forEach(function(i){return t.scopes.add(i)})}return n.fromString=function(e){var t=e||b.EMPTY_STRING,o=t.split(" ");return new n(o)},n.createSearchScopes=function(e){var t=new n(e);return t.containsOnlyOIDCScopes()?t.removeScope(b.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t},n.prototype.validateInputScopes=function(e){if(!e||e.length<1)throw we.createEmptyScopesArrayError()},n.prototype.containsScope=function(e){var t=this.printScopesLowerCase().split(" "),o=new n(t);return H.isEmpty(e)?!1:o.scopes.has(e.toLowerCase())},n.prototype.containsScopeSet=function(e){var t=this;return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(function(o){return t.containsScope(o)})},n.prototype.containsOnlyOIDCScopes=function(){var e=this,t=0;return Ar.forEach(function(o){e.containsScope(o)&&(t+=1)}),this.scopes.size===t},n.prototype.appendScope=function(e){H.isEmpty(e)||this.scopes.add(e.trim())},n.prototype.appendScopes=function(e){var t=this;try{e.forEach(function(o){return t.appendScope(o)})}catch(o){throw K.createAppendScopeSetError(o)}},n.prototype.removeScope=function(e){if(H.isEmpty(e))throw K.createRemoveEmptyScopeFromSetError(e);this.scopes.delete(e.trim())},n.prototype.removeOIDCScopes=function(){var e=this;Ar.forEach(function(t){e.scopes.delete(t)})},n.prototype.unionScopeSets=function(e){if(!e)throw K.createEmptyInputScopeSetError();var t=new Set;return e.scopes.forEach(function(o){return t.add(o.toLowerCase())}),this.scopes.forEach(function(o){return t.add(o.toLowerCase())}),t},n.prototype.intersectingScopeSets=function(e){if(!e)throw K.createEmptyInputScopeSetError();e.containsOnlyOIDCScopes()||e.removeOIDCScopes();var t=this.unionScopeSets(e),o=e.getScopeCount(),r=this.getScopeCount(),i=t.size;return i<r+o},n.prototype.getScopeCount=function(){return this.scopes.size},n.prototype.asArray=function(){var e=[];return this.scopes.forEach(function(t){return e.push(t)}),e},n.prototype.printScopes=function(){if(this.scopes){var e=this.asArray();return e.join(" ")}return b.EMPTY_STRING},n.prototype.printScopesLowerCase=function(){return this.printScopes().toLowerCase()},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */function Zn(n,e){if(H.isEmpty(n))throw K.createClientInfoEmptyError();try{var t=e.base64Decode(n);return JSON.parse(t)}catch(o){throw K.createClientInfoDecodingError(o.message)}}function yn(n){if(H.isEmpty(n))throw K.createClientInfoDecodingError("Home account ID was empty.");var e=n.split(Pe.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?b.EMPTY_STRING:e[1]}}/*! @azure/msal-common v13.3.1 2023-10-27 */var $e;(function(n){n[n.Default=0]="Default",n[n.Adfs=1]="Adfs",n[n.Dsts=2]="Dsts",n[n.Ciam=3]="Ciam"})($e||($e={}));/*! @azure/msal-common v13.3.1 2023-10-27 */var Ue=function(){function n(){}return n.prototype.generateAccountId=function(){var e=[this.homeAccountId,this.environment];return e.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.prototype.generateAccountKey=function(){return n.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})},n.prototype.generateType=function(){switch(this.authorityType){case jt.ADFS_ACCOUNT_TYPE:return qt.ADFS;case jt.MSAV1_ACCOUNT_TYPE:return qt.MSA;case jt.MSSTS_ACCOUNT_TYPE:return qt.MSSTS;case jt.GENERIC_ACCOUNT_TYPE:return qt.GENERIC;default:throw K.createUnexpectedAccountTypeError()}},n.prototype.getAccountInfo=function(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,idTokenClaims:this.idTokenClaims,nativeAccountId:this.nativeAccountId}},n.generateAccountCacheKey=function(e){var t=[e.homeAccountId,e.environment||b.EMPTY_STRING,e.tenantId||b.EMPTY_STRING];return t.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.createAccount=function(e,t,o,r,i,s,c,l){var h,u,g,f,w,C,P=new n;P.authorityType=jt.MSSTS_ACCOUNT_TYPE,P.clientInfo=e,P.homeAccountId=t,P.nativeAccountId=l;var M=c||r&&r.getPreferredCache();if(!M)throw K.createInvalidCacheEnvironmentError();if(P.environment=M,P.realm=((h=o==null?void 0:o.claims)===null||h===void 0?void 0:h.tid)||b.EMPTY_STRING,o){P.idTokenClaims=o.claims,P.localAccountId=((u=o==null?void 0:o.claims)===null||u===void 0?void 0:u.oid)||((g=o==null?void 0:o.claims)===null||g===void 0?void 0:g.sub)||b.EMPTY_STRING;var j=(f=o==null?void 0:o.claims)===null||f===void 0?void 0:f.preferred_username,N=!((w=o==null?void 0:o.claims)===null||w===void 0)&&w.emails?o.claims.emails[0]:null;P.username=j||N||b.EMPTY_STRING,P.name=(C=o==null?void 0:o.claims)===null||C===void 0?void 0:C.name}return P.cloudGraphHostName=i,P.msGraphHost=s,P},n.createGenericAccount=function(e,t,o,r,i,s){var c,l,h,u,g=new n;g.authorityType=o&&o.authorityType===$e.Adfs?jt.ADFS_ACCOUNT_TYPE:jt.GENERIC_ACCOUNT_TYPE,g.homeAccountId=e,g.realm=b.EMPTY_STRING;var f=s||o&&o.getPreferredCache();if(!f)throw K.createInvalidCacheEnvironmentError();return t&&(g.localAccountId=((c=t==null?void 0:t.claims)===null||c===void 0?void 0:c.oid)||((l=t==null?void 0:t.claims)===null||l===void 0?void 0:l.sub)||b.EMPTY_STRING,g.username=((h=t==null?void 0:t.claims)===null||h===void 0?void 0:h.upn)||b.EMPTY_STRING,g.name=((u=t==null?void 0:t.claims)===null||u===void 0?void 0:u.name)||b.EMPTY_STRING,g.idTokenClaims=t==null?void 0:t.claims),g.environment=f,g.cloudGraphHostName=r,g.msGraphHost=i,g},n.generateHomeAccountId=function(e,t,o,r,i){var s,c=!((s=i==null?void 0:i.claims)===null||s===void 0)&&s.sub?i.claims.sub:b.EMPTY_STRING;if(t===$e.Adfs||t===$e.Dsts)return c;if(e)try{var l=Zn(e,r);if(!H.isEmpty(l.uid)&&!H.isEmpty(l.utid))return""+l.uid+Pe.CLIENT_INFO_SEPARATOR+l.utid}catch{}return o.verbose("No client info in response"),c},n.isAccountEntity=function(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1},n.accountInfoIsEqual=function(e,t,o){if(!e||!t)return!1;var r=!0;if(o){var i=e.idTokenClaims||{},s=t.idTokenClaims||{};r=i.iat===s.iat&&i.nonce===s.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&r},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var It=function(){function n(e,t){if(H.isEmpty(e))throw K.createTokenNullOrEmptyError(e);this.rawToken=e,this.claims=n.extractTokenClaims(e,t)}return n.extractTokenClaims=function(e,t){var o=H.decodeAuthToken(e);try{var r=o.JWSPayload,i=t.base64Decode(r);return JSON.parse(i)}catch(s){throw K.createTokenParsingError(s)}},n.checkMaxAge=function(e,t){var o=3e5;if(t===0||Date.now()-o>e+t)throw K.createMaxAgeTranspiredError()},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Je=function(){function n(e,t,o){this.clientId=e,this.cryptoImpl=t,this.commonLogger=o.clone(Pr,Ro)}return n.prototype.getAllAccounts=function(){var e=this,t=this.getAccountKeys();if(t.length<1)return[];var o=t.reduce(function(i,s){var c=e.getAccount(s);return c&&i.push(c),i},[]);if(o.length<1)return[];var r=o.map(function(i){return e.getAccountInfoFromEntity(i)});return r},n.prototype.getAccountInfoFilteredBy=function(e){var t=this.getAccountsFilteredBy(e);return t.length>0?this.getAccountInfoFromEntity(t[0]):null},n.prototype.getAccountInfoFromEntity=function(e){var t=e.getAccountInfo(),o=this.getIdToken(t);return o&&(t.idToken=o.secret,t.idTokenClaims=new It(o.secret,this.cryptoImpl).claims),t},n.prototype.saveCacheRecord=function(e){return ne(this,void 0,void 0,function(){return oe(this,function(t){switch(t.label){case 0:if(!e)throw K.createNullOrUndefinedCacheRecord();return e.account&&this.setAccount(e.account),e.idToken&&this.setIdTokenCredential(e.idToken),e.accessToken?[4,this.saveAccessToken(e.accessToken)]:[3,2];case 1:t.sent(),t.label=2;case 2:return e.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata),[2]}})})},n.prototype.saveAccessToken=function(e){return ne(this,void 0,void 0,function(){var t,o,r,i,s=this;return oe(this,function(c){switch(c.label){case 0:return t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},o=this.getTokenKeys(),r=He.fromString(e.target),i=[],o.accessToken.forEach(function(l){if(s.accessTokenKeyMatchesFilter(l,t,!1)){var h=s.getAccessTokenCredential(l);if(h&&s.credentialMatchesFilter(h,t)){var u=He.fromString(h.target);u.intersectingScopeSets(r)&&i.push(s.removeAccessToken(l))}}}),[4,Promise.all(i)];case 1:return c.sent(),this.setAccessTokenCredential(e),[2]}})})},n.prototype.getAccountsFilteredBy=function(e){var t=this,o=this.getAccountKeys(),r=[];return o.forEach(function(i){if(t.isAccountKey(i,e.homeAccountId,e.realm)){var s=t.getAccount(i);s&&(e.homeAccountId&&!t.matchHomeAccountId(s,e.homeAccountId)||e.localAccountId&&!t.matchLocalAccountId(s,e.localAccountId)||e.username&&!t.matchUsername(s,e.username)||e.environment&&!t.matchEnvironment(s,e.environment)||e.realm&&!t.matchRealm(s,e.realm)||e.nativeAccountId&&!t.matchNativeAccountId(s,e.nativeAccountId)||r.push(s))}}),r},n.prototype.isAccountKey=function(e,t,o){return!(e.split(Pe.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||o&&!e.toLowerCase().includes(o.toLowerCase()))},n.prototype.isCredentialKey=function(e){if(e.split(Pe.CACHE_KEY_SEPARATOR).length<6)return!1;var t=e.toLowerCase();if(t.indexOf(Z.ID_TOKEN.toLowerCase())===-1&&t.indexOf(Z.ACCESS_TOKEN.toLowerCase())===-1&&t.indexOf(Z.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&t.indexOf(Z.REFRESH_TOKEN.toLowerCase())===-1)return!1;if(t.indexOf(Z.REFRESH_TOKEN.toLowerCase())>-1){var o=""+Z.REFRESH_TOKEN+Pe.CACHE_KEY_SEPARATOR+this.clientId+Pe.CACHE_KEY_SEPARATOR,r=""+Z.REFRESH_TOKEN+Pe.CACHE_KEY_SEPARATOR+Nn+Pe.CACHE_KEY_SEPARATOR;if(t.indexOf(o.toLowerCase())===-1&&t.indexOf(r.toLowerCase())===-1)return!1}else if(t.indexOf(this.clientId.toLowerCase())===-1)return!1;return!0},n.prototype.credentialMatchesFilter=function(e,t){return!(t.clientId&&!this.matchClientId(e,t.clientId)||t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash)||typeof t.homeAccountId=="string"&&!this.matchHomeAccountId(e,t.homeAccountId)||t.environment&&!this.matchEnvironment(e,t.environment)||t.realm&&!this.matchRealm(e,t.realm)||t.credentialType&&!this.matchCredentialType(e,t.credentialType)||t.familyId&&!this.matchFamilyId(e,t.familyId)||t.target&&!this.matchTarget(e,t.target)||(t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash||e.credentialType===Z.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(t.tokenType&&!this.matchTokenType(e,t.tokenType)||t.tokenType===ge.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId)))},n.prototype.getAppMetadataFilteredBy=function(e){return this.getAppMetadataFilteredByInternal(e.environment,e.clientId)},n.prototype.getAppMetadataFilteredByInternal=function(e,t){var o=this,r=this.getKeys(),i={};return r.forEach(function(s){if(o.isAppMetadata(s)){var c=o.getAppMetadata(s);c&&(e&&!o.matchEnvironment(c,e)||t&&!o.matchClientId(c,t)||(i[s]=c))}}),i},n.prototype.getAuthorityMetadataByAlias=function(e){var t=this,o=this.getAuthorityMetadataKeys(),r=null;return o.forEach(function(i){if(!(!t.isAuthorityMetadata(i)||i.indexOf(t.clientId)===-1)){var s=t.getAuthorityMetadata(i);s&&s.aliases.indexOf(e)!==-1&&(r=s)}}),r},n.prototype.removeAllAccounts=function(){return ne(this,void 0,void 0,function(){var e,t,o=this;return oe(this,function(r){switch(r.label){case 0:return e=this.getAccountKeys(),t=[],e.forEach(function(i){t.push(o.removeAccount(i))}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},n.prototype.removeAccount=function(e){return ne(this,void 0,void 0,function(){var t;return oe(this,function(o){switch(o.label){case 0:if(t=this.getAccount(e),!t)throw K.createNoAccountFoundError();return[4,this.removeAccountContext(t)];case 1:return o.sent(),this.removeItem(e),[2]}})})},n.prototype.removeAccountContext=function(e){return ne(this,void 0,void 0,function(){var t,o,r,i=this;return oe(this,function(s){switch(s.label){case 0:return t=this.getTokenKeys(),o=e.generateAccountId(),r=[],t.idToken.forEach(function(c){c.indexOf(o)===0&&i.removeIdToken(c)}),t.accessToken.forEach(function(c){c.indexOf(o)===0&&r.push(i.removeAccessToken(c))}),t.refreshToken.forEach(function(c){c.indexOf(o)===0&&i.removeRefreshToken(c)}),[4,Promise.all(r)];case 1:return s.sent(),[2]}})})},n.prototype.removeAccessToken=function(e){return ne(this,void 0,void 0,function(){var t,o,r;return oe(this,function(i){switch(i.label){case 0:if(t=this.getAccessTokenCredential(e),!t)return[2];if(t.credentialType.toLowerCase()!==Z.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())return[3,4];if(t.tokenType!==ge.POP)return[3,4];if(o=t,r=o.keyId,!r)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.cryptoImpl.removeTokenBindingKey(r)];case 2:return i.sent(),[3,4];case 3:throw i.sent(),K.createBindingKeyNotRemovedError();case 4:return[2,this.removeItem(e)]}})})},n.prototype.removeAppMetadata=function(){var e=this,t=this.getKeys();return t.forEach(function(o){e.isAppMetadata(o)&&e.removeItem(o)}),!0},n.prototype.readCacheRecord=function(e,t,o){var r=this.getTokenKeys(),i=this.readAccountFromCache(e),s=this.getIdToken(e,r),c=this.getAccessToken(e,t,r),l=this.getRefreshToken(e,!1,r),h=this.readAppMetadataFromCache(o);return i&&s&&(i.idTokenClaims=new It(s.secret,this.cryptoImpl).claims),{account:i,idToken:s,accessToken:c,refreshToken:l,appMetadata:h}},n.prototype.readAccountFromCache=function(e){var t=Ue.generateAccountCacheKey(e);return this.getAccount(t)},n.prototype.getIdToken=function(e,t){var o=this;this.commonLogger.trace("CacheManager - getIdToken called");var r={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Z.ID_TOKEN,clientId:this.clientId,realm:e.tenantId},i=this.getIdTokensByFilter(r,t),s=i.length;return s<1?(this.commonLogger.info("CacheManager:getIdToken - No token found"),null):s>1?(this.commonLogger.info("CacheManager:getIdToken - Multiple id tokens found, clearing them"),i.forEach(function(c){o.removeIdToken(c.generateCredentialKey())}),null):(this.commonLogger.info("CacheManager:getIdToken - Returning id token"),i[0])},n.prototype.getIdTokensByFilter=function(e,t){var o=this,r=t&&t.idToken||this.getTokenKeys().idToken,i=[];return r.forEach(function(s){if(o.idTokenKeyMatchesFilter(s,he({clientId:o.clientId},e))){var c=o.getIdTokenCredential(s);c&&o.credentialMatchesFilter(c,e)&&i.push(c)}}),i},n.prototype.idTokenKeyMatchesFilter=function(e,t){var o=e.toLowerCase();return!(t.clientId&&o.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&o.indexOf(t.homeAccountId.toLowerCase())===-1)},n.prototype.removeIdToken=function(e){this.removeItem(e)},n.prototype.removeRefreshToken=function(e){this.removeItem(e)},n.prototype.getAccessToken=function(e,t,o){var r=this;this.commonLogger.trace("CacheManager - getAccessToken called");var i=He.createSearchScopes(t.scopes),s=t.authenticationScheme||ge.BEARER,c=s&&s.toLowerCase()!==ge.BEARER.toLowerCase()?Z.ACCESS_TOKEN_WITH_AUTH_SCHEME:Z.ACCESS_TOKEN,l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:c,clientId:this.clientId,realm:e.tenantId,target:i,tokenType:s,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},h=o&&o.accessToken||this.getTokenKeys().accessToken,u=[];h.forEach(function(f){if(r.accessTokenKeyMatchesFilter(f,l,!0)){var w=r.getAccessTokenCredential(f);w&&r.credentialMatchesFilter(w,l)&&u.push(w)}});var g=u.length;return g<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):g>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),u.forEach(function(f){r.removeAccessToken(f.generateCredentialKey())}),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),u[0])},n.prototype.accessTokenKeyMatchesFilter=function(e,t,o){var r=e.toLowerCase();if(t.clientId&&r.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&r.indexOf(t.homeAccountId.toLowerCase())===-1||t.realm&&r.indexOf(t.realm.toLowerCase())===-1||t.requestedClaimsHash&&r.indexOf(t.requestedClaimsHash.toLowerCase())===-1)return!1;if(t.target)for(var i=t.target.asArray(),s=0;s<i.length;s++){if(o&&!r.includes(i[s].toLowerCase()))return!1;if(!o&&r.includes(i[s].toLowerCase()))return!0}return!0},n.prototype.getAccessTokensByFilter=function(e){var t=this,o=this.getTokenKeys(),r=[];return o.accessToken.forEach(function(i){if(t.accessTokenKeyMatchesFilter(i,e,!0)){var s=t.getAccessTokenCredential(i);s&&t.credentialMatchesFilter(s,e)&&r.push(s)}}),r},n.prototype.getRefreshToken=function(e,t,o){var r=this;this.commonLogger.trace("CacheManager - getRefreshToken called");var i=t?Nn:void 0,s={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:Z.REFRESH_TOKEN,clientId:this.clientId,familyId:i},c=o&&o.refreshToken||this.getTokenKeys().refreshToken,l=[];c.forEach(function(u){if(r.refreshTokenKeyMatchesFilter(u,s)){var g=r.getRefreshTokenCredential(u);g&&r.credentialMatchesFilter(g,s)&&l.push(g)}});var h=l.length;return h<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])},n.prototype.refreshTokenKeyMatchesFilter=function(e,t){var o=e.toLowerCase();return!(t.familyId&&o.indexOf(t.familyId.toLowerCase())===-1||!t.familyId&&t.clientId&&o.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&o.indexOf(t.homeAccountId.toLowerCase())===-1)},n.prototype.readAppMetadataFromCache=function(e){var t={environment:e,clientId:this.clientId},o=this.getAppMetadataFilteredBy(t),r=Object.keys(o).map(function(s){return o[s]}),i=r.length;if(i<1)return null;if(i>1)throw K.createMultipleMatchingAppMetadataInCacheError();return r[0]},n.prototype.isAppMetadataFOCI=function(e){var t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===Nn)},n.prototype.matchHomeAccountId=function(e,t){return typeof e.homeAccountId=="string"&&t===e.homeAccountId},n.prototype.matchLocalAccountId=function(e,t){return typeof e.localAccountId=="string"&&t===e.localAccountId},n.prototype.matchUsername=function(e,t){return typeof e.username=="string"&&t.toLowerCase()===e.username.toLowerCase()},n.prototype.matchUserAssertionHash=function(e,t){return!!(e.userAssertionHash&&t===e.userAssertionHash)},n.prototype.matchEnvironment=function(e,t){var o=this.getAuthorityMetadataByAlias(t);return!!(o&&o.aliases.indexOf(e.environment)>-1)},n.prototype.matchCredentialType=function(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()},n.prototype.matchClientId=function(e,t){return!!(e.clientId&&t===e.clientId)},n.prototype.matchFamilyId=function(e,t){return!!(e.familyId&&t===e.familyId)},n.prototype.matchRealm=function(e,t){return!!(e.realm&&t===e.realm)},n.prototype.matchNativeAccountId=function(e,t){return!!(e.nativeAccountId&&t===e.nativeAccountId)},n.prototype.matchTarget=function(e,t){var o=e.credentialType!==Z.ACCESS_TOKEN&&e.credentialType!==Z.ACCESS_TOKEN_WITH_AUTH_SCHEME;if(o||!e.target)return!1;var r=He.fromString(e.target);return r.containsScopeSet(t)},n.prototype.matchTokenType=function(e,t){return!!(e.tokenType&&e.tokenType===t)},n.prototype.matchKeyId=function(e,t){return!!(e.keyId&&e.keyId===t)},n.prototype.isAppMetadata=function(e){return e.indexOf(So)!==-1},n.prototype.isAuthorityMetadata=function(e){return e.indexOf(Pn.CACHE_KEY)!==-1},n.prototype.generateAuthorityMetadataCacheKey=function(e){return Pn.CACHE_KEY+"-"+this.clientId+"-"+e},n.toObject=function(e,t){for(var o in t)e[o]=t[o];return e},n}(),Qi=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.setAccount=function(){var t="Storage interface - setAccount() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAccount=function(){var t="Storage interface - getAccount() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setIdTokenCredential=function(){var t="Storage interface - setIdTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getIdTokenCredential=function(){var t="Storage interface - getIdTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setAccessTokenCredential=function(){var t="Storage interface - setAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAccessTokenCredential=function(){var t="Storage interface - getAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setRefreshTokenCredential=function(){var t="Storage interface - setRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getRefreshTokenCredential=function(){var t="Storage interface - getRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setAppMetadata=function(){var t="Storage interface - setAppMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAppMetadata=function(){var t="Storage interface - getAppMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setServerTelemetry=function(){var t="Storage interface - setServerTelemetry() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getServerTelemetry=function(){var t="Storage interface - getServerTelemetry() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setAuthorityMetadata=function(){var t="Storage interface - setAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAuthorityMetadata=function(){var t="Storage interface - getAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAuthorityMetadataKeys=function(){var t="Storage interface - getAuthorityMetadataKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.setThrottlingCache=function(){var t="Storage interface - setThrottlingCache() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getThrottlingCache=function(){var t="Storage interface - getThrottlingCache() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.removeItem=function(){var t="Storage interface - removeItem() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.containsKey=function(){var t="Storage interface - containsKey() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getKeys=function(){var t="Storage interface - getKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getAccountKeys=function(){var t="Storage interface - getAccountKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.getTokenKeys=function(){var t="Storage interface - getTokenKeys() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e.prototype.clear=function(){return ne(this,void 0,void 0,function(){var t;return oe(this,function(o){throw t="Storage interface - clear() has not been implemented for the cacheStorage interface.",Y.createUnexpectedError(t)})})},e.prototype.updateCredentialCacheKey=function(){var t="Storage interface - updateCredentialCacheKey() has not been implemented for the cacheStorage interface.";throw Y.createUnexpectedError(t)},e}(Je);/*! @azure/msal-common v13.3.1 2023-10-27 */var Wi=300,Mr={tokenRenewalOffsetSeconds:Wi,preventCorsPreflight:!1},Yi={loggerCallback:function(){},piiLoggingEnabled:!1,logLevel:ze.Info,correlationId:b.EMPTY_STRING},Ji={claimsBasedCachingEnabled:!0},Xi={sendGetRequestAsync:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Network interface - sendGetRequestAsync() has not been implemented",Y.createUnexpectedError(n)})})},sendPostRequestAsync:function(){return ne(this,void 0,void 0,function(){var n;return oe(this,function(e){throw n="Network interface - sendPostRequestAsync() has not been implemented",Y.createUnexpectedError(n)})})}},Zi={sku:b.SKU,version:Ro,cpu:b.EMPTY_STRING,os:b.EMPTY_STRING},ea={clientSecret:b.EMPTY_STRING,clientAssertion:void 0},ta={azureCloudInstance:On.None,tenant:""+b.DEFAULT_COMMON_TENANT},na={application:{appName:"",appVersion:""}};function oa(n){var e=n.authOptions,t=n.systemOptions,o=n.loggerOptions,r=n.cacheOptions,i=n.storageInterface,s=n.networkInterface,c=n.cryptoInterface,l=n.clientCredentials,h=n.libraryInfo,u=n.telemetry,g=n.serverTelemetryManager,f=n.persistencePlugin,w=n.serializableCache,C=he(he({},Yi),o);return{authOptions:ra(e),systemOptions:he(he({},Mr),t),loggerOptions:C,cacheOptions:he(he({},Ji),r),storageInterface:i||new Qi(e.clientId,Xn,new Ao(C)),networkInterface:s||Xi,cryptoInterface:c||Xn,clientCredentials:l||ea,libraryInfo:he(he({},Zi),h),telemetry:he(he({},na),u),serverTelemetryManager:g||null,persistencePlugin:f||null,serializableCache:w||null}}function ra(n){return he({clientCapabilities:[],azureCloudOptions:ta,skipAuthorityMetadataCache:!1},n)}/*! @azure/msal-common v13.3.1 2023-10-27 */var rn=function(n){Ye(e,n);function e(t,o,r){var i=n.call(this,t,o,r)||this;return i.name="ServerError",Object.setPrototypeOf(i,e.prototype),i}return e}(Y);/*! @azure/msal-common v13.3.1 2023-10-27 */var eo=function(){function n(){}return n.generateThrottlingStorageKey=function(e){return Mn.THROTTLING_PREFIX+"."+JSON.stringify(e)},n.preProcess=function(e,t){var o,r=n.generateThrottlingStorageKey(t),i=e.getThrottlingCache(r);if(i){if(i.throttleTime<Date.now()){e.removeItem(r);return}throw new rn(((o=i.errorCodes)===null||o===void 0?void 0:o.join(" "))||b.EMPTY_STRING,i.errorMessage,i.subError)}},n.postProcess=function(e,t,o){if(n.checkResponseStatus(o)||n.checkResponseForRetryAfter(o)){var r={throttleTime:n.calculateThrottleTime(parseInt(o.headers[ot.RETRY_AFTER])),error:o.body.error,errorCodes:o.body.error_codes,errorMessage:o.body.error_description,subError:o.body.suberror};e.setThrottlingCache(n.generateThrottlingStorageKey(t),r)}},n.checkResponseStatus=function(e){return e.status===429||e.status>=500&&e.status<600},n.checkResponseForRetryAfter=function(e){return e.headers?e.headers.hasOwnProperty(ot.RETRY_AFTER)&&(e.status<200||e.status>=300):!1},n.calculateThrottleTime=function(e){var t=e<=0?0:e,o=Date.now()/1e3;return Math.floor(Math.min(o+(t||Mn.DEFAULT_THROTTLE_TIME_SECONDS),o+Mn.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)},n.removeThrottle=function(e,t,o,r){var i={clientId:t,authority:o.authority,scopes:o.scopes,homeAccountIdentifier:r,claims:o.claims,authenticationScheme:o.authenticationScheme,resourceRequestMethod:o.resourceRequestMethod,resourceRequestUri:o.resourceRequestUri,shrClaims:o.shrClaims,sshKid:o.sshKid},s=this.generateThrottlingStorageKey(i);e.removeItem(s)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ia=function(){function n(e,t){this.networkClient=e,this.cacheManager=t}return n.prototype.sendPostRequest=function(e,t,o){return ne(this,void 0,void 0,function(){var r,i;return oe(this,function(s){switch(s.label){case 0:eo.preProcess(this.cacheManager,e),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.networkClient.sendPostRequestAsync(t,o)];case 2:return r=s.sent(),[3,4];case 3:throw i=s.sent(),i instanceof Y?i:K.createNetworkError(t,i);case 4:return eo.postProcess(this.cacheManager,e,r),[2,r]}})})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var rt;(function(n){n.HOME_ACCOUNT_ID="home_account_id",n.UPN="UPN"})(rt||(rt={}));/*! @azure/msal-common v13.3.1 2023-10-27 */var an=function(){function n(){}return n.validateRedirectUri=function(e){if(H.isEmpty(e))throw we.createRedirectUriEmptyError()},n.validatePrompt=function(e){var t=[];for(var o in Ve)t.push(Ve[o]);if(t.indexOf(e)<0)throw we.createInvalidPromptError(e)},n.validateClaims=function(e){try{JSON.parse(e)}catch{throw we.createInvalidClaimsRequestError()}},n.validateCodeChallengeParams=function(e,t){if(H.isEmpty(e)||H.isEmpty(t))throw we.createInvalidCodeChallengeParamsError();this.validateCodeChallengeMethod(t)},n.validateCodeChallengeMethod=function(e){if([Rr.PLAIN,Rr.S256].indexOf(e)<0)throw we.createInvalidCodeChallengeMethodError()},n.sanitizeEQParams=function(e,t){return e?(t.forEach(function(o,r){e[r]&&delete e[r]}),Object.fromEntries(Object.entries(e).filter(function(o){var r=o[1];return r!==""}))):{}},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var zn=function(){function n(){this.parameters=new Map}return n.prototype.addResponseTypeCode=function(){this.parameters.set(ae.RESPONSE_TYPE,encodeURIComponent(b.CODE_RESPONSE_TYPE))},n.prototype.addResponseTypeForTokenAndIdToken=function(){this.parameters.set(ae.RESPONSE_TYPE,encodeURIComponent(b.TOKEN_RESPONSE_TYPE+" "+b.ID_TOKEN_RESPONSE_TYPE))},n.prototype.addResponseMode=function(e){this.parameters.set(ae.RESPONSE_MODE,encodeURIComponent(e||Qn.QUERY))},n.prototype.addNativeBroker=function(){this.parameters.set(ae.NATIVE_BROKER,encodeURIComponent("1"))},n.prototype.addScopes=function(e,t){t===void 0&&(t=!0);var o=t?$n(e||[],An):e||[],r=new He(o);this.parameters.set(ae.SCOPE,encodeURIComponent(r.printScopes()))},n.prototype.addClientId=function(e){this.parameters.set(ae.CLIENT_ID,encodeURIComponent(e))},n.prototype.addRedirectUri=function(e){an.validateRedirectUri(e),this.parameters.set(ae.REDIRECT_URI,encodeURIComponent(e))},n.prototype.addPostLogoutRedirectUri=function(e){an.validateRedirectUri(e),this.parameters.set(ae.POST_LOGOUT_URI,encodeURIComponent(e))},n.prototype.addIdTokenHint=function(e){this.parameters.set(ae.ID_TOKEN_HINT,encodeURIComponent(e))},n.prototype.addDomainHint=function(e){this.parameters.set(Rn.DOMAIN_HINT,encodeURIComponent(e))},n.prototype.addLoginHint=function(e){this.parameters.set(Rn.LOGIN_HINT,encodeURIComponent(e))},n.prototype.addCcsUpn=function(e){this.parameters.set(ot.CCS_HEADER,encodeURIComponent("UPN:"+e))},n.prototype.addCcsOid=function(e){this.parameters.set(ot.CCS_HEADER,encodeURIComponent("Oid:"+e.uid+"@"+e.utid))},n.prototype.addSid=function(e){this.parameters.set(Rn.SID,encodeURIComponent(e))},n.prototype.addClaims=function(e,t){var o=this.addClientCapabilitiesToClaims(e,t);an.validateClaims(o),this.parameters.set(ae.CLAIMS,encodeURIComponent(o))},n.prototype.addCorrelationId=function(e){this.parameters.set(ae.CLIENT_REQUEST_ID,encodeURIComponent(e))},n.prototype.addLibraryInfo=function(e){this.parameters.set(ae.X_CLIENT_SKU,e.sku),this.parameters.set(ae.X_CLIENT_VER,e.version),e.os&&this.parameters.set(ae.X_CLIENT_OS,e.os),e.cpu&&this.parameters.set(ae.X_CLIENT_CPU,e.cpu)},n.prototype.addApplicationTelemetry=function(e){e!=null&&e.appName&&this.parameters.set(ae.X_APP_NAME,e.appName),e!=null&&e.appVersion&&this.parameters.set(ae.X_APP_VER,e.appVersion)},n.prototype.addPrompt=function(e){an.validatePrompt(e),this.parameters.set(""+ae.PROMPT,encodeURIComponent(e))},n.prototype.addState=function(e){H.isEmpty(e)||this.parameters.set(ae.STATE,encodeURIComponent(e))},n.prototype.addNonce=function(e){this.parameters.set(ae.NONCE,encodeURIComponent(e))},n.prototype.addCodeChallengeParams=function(e,t){if(an.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(ae.CODE_CHALLENGE,encodeURIComponent(e)),this.parameters.set(ae.CODE_CHALLENGE_METHOD,encodeURIComponent(t));else throw we.createInvalidCodeChallengeParamsError()},n.prototype.addAuthorizationCode=function(e){this.parameters.set(ae.CODE,encodeURIComponent(e))},n.prototype.addDeviceCode=function(e){this.parameters.set(ae.DEVICE_CODE,encodeURIComponent(e))},n.prototype.addRefreshToken=function(e){this.parameters.set(ae.REFRESH_TOKEN,encodeURIComponent(e))},n.prototype.addCodeVerifier=function(e){this.parameters.set(ae.CODE_VERIFIER,encodeURIComponent(e))},n.prototype.addClientSecret=function(e){this.parameters.set(ae.CLIENT_SECRET,encodeURIComponent(e))},n.prototype.addClientAssertion=function(e){H.isEmpty(e)||this.parameters.set(ae.CLIENT_ASSERTION,encodeURIComponent(e))},n.prototype.addClientAssertionType=function(e){H.isEmpty(e)||this.parameters.set(ae.CLIENT_ASSERTION_TYPE,encodeURIComponent(e))},n.prototype.addOboAssertion=function(e){this.parameters.set(ae.OBO_ASSERTION,encodeURIComponent(e))},n.prototype.addRequestTokenUse=function(e){this.parameters.set(ae.REQUESTED_TOKEN_USE,encodeURIComponent(e))},n.prototype.addGrantType=function(e){this.parameters.set(ae.GRANT_TYPE,encodeURIComponent(e))},n.prototype.addClientInfo=function(){this.parameters.set($i,"1")},n.prototype.addExtraQueryParameters=function(e){var t=this,o=an.sanitizeEQParams(e,this.parameters);Object.keys(o).forEach(function(r){t.parameters.set(r,e[r])})},n.prototype.addClientCapabilitiesToClaims=function(e,t){var o;if(!e)o={};else try{o=JSON.parse(e)}catch{throw we.createInvalidClaimsRequestError()}return t&&t.length>0&&(o.hasOwnProperty(gn.ACCESS_TOKEN)||(o[gn.ACCESS_TOKEN]={}),o[gn.ACCESS_TOKEN][gn.XMS_CC]={values:t}),JSON.stringify(o)},n.prototype.addUsername=function(e){this.parameters.set(Yn.username,encodeURIComponent(e))},n.prototype.addPassword=function(e){this.parameters.set(Yn.password,encodeURIComponent(e))},n.prototype.addPopToken=function(e){H.isEmpty(e)||(this.parameters.set(ae.TOKEN_TYPE,ge.POP),this.parameters.set(ae.REQ_CNF,encodeURIComponent(e)))},n.prototype.addSshJwk=function(e){H.isEmpty(e)||(this.parameters.set(ae.TOKEN_TYPE,ge.SSH),this.parameters.set(ae.REQ_CNF,encodeURIComponent(e)))},n.prototype.addServerTelemetry=function(e){this.parameters.set(ae.X_CLIENT_CURR_TELEM,e.generateCurrentRequestHeaderValue()),this.parameters.set(ae.X_CLIENT_LAST_TELEM,e.generateLastRequestHeaderValue())},n.prototype.addThrottling=function(){this.parameters.set(ae.X_MS_LIB_CAPABILITY,Mn.X_MS_LIB_CAPABILITY_VALUE)},n.prototype.addLogoutHint=function(e){this.parameters.set(ae.LOGOUT_HINT,encodeURIComponent(e))},n.prototype.createQueryString=function(){var e=new Array;return this.parameters.forEach(function(t,o){e.push(o+"="+t)}),e.join("&")},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var No=function(){function n(e,t){this.config=oa(e),this.logger=new Ao(this.config.loggerOptions,Pr,Ro),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new ia(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}return n.prototype.createTokenRequestHeaders=function(e){var t={};if(t[ot.CONTENT_TYPE]=b.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case rt.HOME_ACCOUNT_ID:try{var o=yn(e.credential);t[ot.CCS_HEADER]="Oid:"+o.uid+"@"+o.utid}catch(r){this.logger.verbose("Could not parse home account ID for CCS Header: "+r)}break;case rt.UPN:t[ot.CCS_HEADER]="UPN: "+e.credential;break}return t},n.prototype.executePostToTokenEndpoint=function(e,t,o,r){return ne(this,void 0,void 0,function(){var i;return oe(this,function(s){switch(s.label){case 0:return[4,this.networkManager.sendPostRequest(r,e,{body:t,headers:o})];case 1:return i=s.sent(),this.config.serverTelemetryManager&&i.status<500&&i.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),[2,i]}})})},n.prototype.updateAuthority=function(e){if(!e.discoveryComplete())throw K.createEndpointDiscoveryIncompleteError("Updated authority has not completed endpoint discovery.");this.authority=e},n.prototype.createTokenQueryParameters=function(e){var t=new zn;return e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.createQueryString()},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Po=function(){function n(){}return n.prototype.generateAccountId=function(){return n.generateAccountIdForCacheKey(this.homeAccountId,this.environment)},n.prototype.generateCredentialId=function(){return n.generateCredentialIdForCacheKey(this.credentialType,this.clientId,this.realm,this.familyId)},n.prototype.generateTarget=function(){return n.generateTargetForCacheKey(this.target)},n.prototype.generateCredentialKey=function(){return n.generateCredentialCacheKey(this.homeAccountId,this.environment,this.credentialType,this.clientId,this.realm,this.target,this.familyId,this.tokenType,this.requestedClaimsHash)},n.prototype.generateType=function(){switch(this.credentialType){case Z.ID_TOKEN:return qt.ID_TOKEN;case Z.ACCESS_TOKEN:case Z.ACCESS_TOKEN_WITH_AUTH_SCHEME:return qt.ACCESS_TOKEN;case Z.REFRESH_TOKEN:return qt.REFRESH_TOKEN;default:throw K.createUnexpectedCredentialTypeError()}},n.generateCredentialCacheKey=function(e,t,o,r,i,s,c,l,h){var u=[this.generateAccountIdForCacheKey(e,t),this.generateCredentialIdForCacheKey(o,r,i,c),this.generateTargetForCacheKey(s),this.generateClaimsHashForCacheKey(h),this.generateSchemeForCacheKey(l)];return u.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.generateAccountIdForCacheKey=function(e,t){var o=[e,t];return o.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.generateCredentialIdForCacheKey=function(e,t,o,r){var i=e===Z.REFRESH_TOKEN&&r||t,s=[e,i,o||b.EMPTY_STRING];return s.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.generateTargetForCacheKey=function(e){return(e||b.EMPTY_STRING).toLowerCase()},n.generateClaimsHashForCacheKey=function(e){return(e||b.EMPTY_STRING).toLowerCase()},n.generateSchemeForCacheKey=function(e){return e&&e.toLowerCase()!==ge.BEARER.toLowerCase()?e.toLowerCase():b.EMPTY_STRING},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var sn=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.createIdTokenEntity=function(t,o,r,i,s){var c=new e;return c.credentialType=Z.ID_TOKEN,c.homeAccountId=t,c.environment=o,c.clientId=i,c.secret=r,c.realm=s,c},e.isIdTokenEntity=function(t){return t?t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("realm")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")&&t.credentialType===Z.ID_TOKEN:!1},e}(Po);/*! @azure/msal-common v13.3.1 2023-10-27 */var pt=function(){function n(){}return n.nowSeconds=function(){return Math.round(new Date().getTime()/1e3)},n.isTokenExpired=function(e,t){var o=Number(e)||0,r=n.nowSeconds()+t;return r>o},n.wasClockTurnedBack=function(e){var t=Number(e);return t>n.nowSeconds()},n.delay=function(e,t){return new Promise(function(o){return setTimeout(function(){return o(t)},e)})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var cn=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.createAccessTokenEntity=function(t,o,r,i,s,c,l,h,u,g,f,w,C,P,M){var j,N,T=new e;T.homeAccountId=t,T.credentialType=Z.ACCESS_TOKEN,T.secret=r;var B=pt.nowSeconds();if(T.cachedAt=B.toString(),T.expiresOn=l.toString(),T.extendedExpiresOn=h.toString(),g&&(T.refreshOn=g.toString()),T.environment=o,T.clientId=i,T.realm=s,T.target=c,T.userAssertionHash=w,T.tokenType=H.isEmpty(f)?ge.BEARER:f,P&&(T.requestedClaims=P,T.requestedClaimsHash=M),((j=T.tokenType)===null||j===void 0?void 0:j.toLowerCase())!==ge.BEARER.toLowerCase())switch(T.credentialType=Z.ACCESS_TOKEN_WITH_AUTH_SCHEME,T.tokenType){case ge.POP:var V=It.extractTokenClaims(r,u);if(!(!((N=V==null?void 0:V.cnf)===null||N===void 0)&&N.kid))throw K.createTokenClaimsRequiredError();T.keyId=V.cnf.kid;break;case ge.SSH:T.keyId=C}return T},e.isAccessTokenEntity=function(t){return t?t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("realm")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")&&t.hasOwnProperty("target")&&(t.credentialType===Z.ACCESS_TOKEN||t.credentialType===Z.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1},e}(Po);/*! @azure/msal-common v13.3.1 2023-10-27 */var vn=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.createRefreshTokenEntity=function(t,o,r,i,s,c){var l=new e;return l.clientId=i,l.credentialType=Z.REFRESH_TOKEN,l.environment=o,l.homeAccountId=t,l.secret=r,l.userAssertionHash=c,s&&(l.familyId=s),l},e.isRefreshTokenEntity=function(t){return t?t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")&&t.credentialType===Z.REFRESH_TOKEN:!1},e}(Po);/*! @azure/msal-common v13.3.1 2023-10-27 */var Lr=["interaction_required","consent_required","login_required"],aa=["message_only","additional_action","basic_action","user_password_expired","consent_required"],bn={noTokensFoundError:{code:"no_tokens_found",desc:"No refresh token found in the cache. Please sign-in."},native_account_unavailable:{code:"native_account_unavailable",desc:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API."}},gt=function(n){Ye(e,n);function e(t,o,r,i,s,c,l){var h=n.call(this,t,o,r)||this;return Object.setPrototypeOf(h,e.prototype),h.timestamp=i||b.EMPTY_STRING,h.traceId=s||b.EMPTY_STRING,h.correlationId=c||b.EMPTY_STRING,h.claims=l||b.EMPTY_STRING,h.name="InteractionRequiredAuthError",h}return e.isInteractionRequiredError=function(t,o,r){var i=!!t&&Lr.indexOf(t)>-1,s=!!r&&aa.indexOf(r)>-1,c=!!o&&Lr.some(function(l){return o.indexOf(l)>-1});return i||c||s},e.createNoTokensFoundError=function(){return new e(bn.noTokensFoundError.code,bn.noTokensFoundError.desc)},e.createNativeAccountUnavailableError=function(){return new e(bn.native_account_unavailable.code,bn.native_account_unavailable.desc)},e}(Y);/*! @azure/msal-common v13.3.1 2023-10-27 */var xn=function(){function n(e,t,o,r,i){this.account=e||null,this.idToken=t||null,this.accessToken=o||null,this.refreshToken=r||null,this.appMetadata=i||null}return n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Ft=function(){function n(){}return n.setRequestState=function(e,t,o){var r=n.generateLibraryState(e,o);return H.isEmpty(t)?r:""+r+b.RESOURCE_DELIM+t},n.generateLibraryState=function(e,t){if(!e)throw K.createNoCryptoObjectError("generateLibraryState");var o={id:e.createNewGuid()};t&&(o.meta=t);var r=JSON.stringify(o);return e.base64Encode(r)},n.parseRequestState=function(e,t){if(!e)throw K.createNoCryptoObjectError("parseRequestState");if(H.isEmpty(t))throw K.createInvalidStateError(t,"Null, undefined or empty state");try{var o=t.split(b.RESOURCE_DELIM),r=o[0],i=o.length>1?o.slice(1).join(b.RESOURCE_DELIM):b.EMPTY_STRING,s=e.base64Decode(r),c=JSON.parse(s);return{userRequestState:H.isEmpty(i)?b.EMPTY_STRING:i,libraryState:c}}catch(l){throw K.createInvalidStateError(t,l)}},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var de=function(){function n(e){if(this._urlString=e,H.isEmpty(this._urlString))throw we.createUrlEmptyError();H.isEmpty(this.getHash())&&(this._urlString=n.canonicalizeUri(e))}return Object.defineProperty(n.prototype,"urlString",{get:function(){return this._urlString},enumerable:!1,configurable:!0}),n.canonicalizeUri=function(e){if(e){var t=e.toLowerCase();return H.endsWith(t,"?")?t=t.slice(0,-1):H.endsWith(t,"?/")&&(t=t.slice(0,-2)),H.endsWith(t,"/")||(t+="/"),t}return e},n.prototype.validateAsUri=function(){var e;try{e=this.getUrlComponents()}catch(t){throw we.createUrlParseError(t)}if(!e.HostNameAndPort||!e.PathSegments)throw we.createUrlParseError("Given url string: "+this.urlString);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw we.createInsecureAuthorityUriError(this.urlString)},n.appendQueryString=function(e,t){return H.isEmpty(t)?e:e.indexOf("?")<0?e+"?"+t:e+"&"+t},n.removeHashFromUrl=function(e){return n.canonicalizeUri(e.split("#")[0])},n.prototype.replaceTenantPath=function(e){var t=this.getUrlComponents(),o=t.PathSegments;return e&&o.length!==0&&(o[0]===on.COMMON||o[0]===on.ORGANIZATIONS)&&(o[0]=e),n.constructAuthorityUriFromObject(t)},n.prototype.getHash=function(){return n.parseHash(this.urlString)},n.prototype.getUrlComponents=function(){var e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw we.createUrlParseError("Given url string: "+this.urlString);var o={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]},r=o.AbsolutePath.split("/");return r=r.filter(function(i){return i&&i.length>0}),o.PathSegments=r,!H.isEmpty(o.QueryString)&&o.QueryString.endsWith("/")&&(o.QueryString=o.QueryString.substring(0,o.QueryString.length-1)),o},n.getDomainFromUrl=function(e){var t=RegExp("^([^:/?#]+://)?([^/?#]*)"),o=e.match(t);if(!o)throw we.createUrlParseError("Given url string: "+e);return o[2]},n.getAbsoluteUrl=function(e,t){if(e[0]===b.FORWARD_SLASH){var o=new n(t),r=o.getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+e}return e},n.parseHash=function(e){var t=e.indexOf("#"),o=e.indexOf("#/");return o>-1?e.substring(o+2):t>-1?e.substring(t+1):b.EMPTY_STRING},n.parseQueryString=function(e){var t=e.indexOf("?"),o=e.indexOf("/?");return o>-1?e.substring(o+2):t>-1?e.substring(t+1):b.EMPTY_STRING},n.constructAuthorityUriFromObject=function(e){return new n(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))},n.getDeserializedHash=function(e){if(H.isEmpty(e))return{};var t=n.parseHash(e),o=H.queryStringToObject(H.isEmpty(t)?e:t);if(!o)throw K.createHashNotDeserializedError(JSON.stringify(o));return o},n.getDeserializedQueryString=function(e){if(H.isEmpty(e))return{};var t=n.parseQueryString(e),o=H.queryStringToObject(H.isEmpty(t)?e:t);if(!o)throw K.createHashNotDeserializedError(JSON.stringify(o));return o},n.hashContainsKnownProperties=function(e){if(H.isEmpty(e)||e.indexOf("=")<0)return!1;var t=n.getDeserializedHash(e);return!!(t.code||t.error_description||t.error||t.state)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var R;(function(n){n.AcquireTokenByCode="acquireTokenByCode",n.AcquireTokenByRefreshToken="acquireTokenByRefreshToken",n.AcquireTokenSilent="acquireTokenSilent",n.AcquireTokenSilentAsync="acquireTokenSilentAsync",n.AcquireTokenPopup="acquireTokenPopup",n.CryptoOptsGetPublicKeyThumbprint="cryptoOptsGetPublicKeyThumbprint",n.CryptoOptsSignJwt="cryptoOptsSignJwt",n.SilentCacheClientAcquireToken="silentCacheClientAcquireToken",n.SilentIframeClientAcquireToken="silentIframeClientAcquireToken",n.SilentRefreshClientAcquireToken="silentRefreshClientAcquireToken",n.SsoSilent="ssoSilent",n.StandardInteractionClientGetDiscoveredAuthority="standardInteractionClientGetDiscoveredAuthority",n.FetchAccountIdWithNativeBroker="fetchAccountIdWithNativeBroker",n.NativeInteractionClientAcquireToken="nativeInteractionClientAcquireToken",n.BaseClientCreateTokenRequestHeaders="baseClientCreateTokenRequestHeaders",n.BrokerHandhshake="brokerHandshake",n.AcquireTokenByRefreshTokenInBroker="acquireTokenByRefreshTokenInBroker",n.AcquireTokenByBroker="acquireTokenByBroker",n.RefreshTokenClientExecuteTokenRequest="refreshTokenClientExecuteTokenRequest",n.RefreshTokenClientAcquireToken="refreshTokenClientAcquireToken",n.RefreshTokenClientAcquireTokenWithCachedRefreshToken="refreshTokenClientAcquireTokenWithCachedRefreshToken",n.RefreshTokenClientAcquireTokenByRefreshToken="refreshTokenClientAcquireTokenByRefreshToken",n.RefreshTokenClientCreateTokenRequestBody="refreshTokenClientCreateTokenRequestBody",n.AcquireTokenFromCache="acquireTokenFromCache",n.AcquireTokenBySilentIframe="acquireTokenBySilentIframe",n.InitializeBaseRequest="initializeBaseRequest",n.InitializeSilentRequest="initializeSilentRequest",n.InitializeClientApplication="initializeClientApplication",n.SilentIframeClientTokenHelper="silentIframeClientTokenHelper",n.SilentHandlerInitiateAuthRequest="silentHandlerInitiateAuthRequest",n.SilentHandlerMonitorIframeForHash="silentHandlerMonitorIframeForHash",n.SilentHandlerLoadFrame="silentHandlerLoadFrame",n.StandardInteractionClientCreateAuthCodeClient="standardInteractionClientCreateAuthCodeClient",n.StandardInteractionClientGetClientConfiguration="standardInteractionClientGetClientConfiguration",n.StandardInteractionClientInitializeAuthorizationRequest="standardInteractionClientInitializeAuthorizationRequest",n.StandardInteractionClientInitializeAuthorizationCodeRequest="standardInteractionClientInitializeAuthorizationCodeRequest",n.GetAuthCodeUrl="getAuthCodeUrl",n.HandleCodeResponseFromServer="handleCodeResponseFromServer",n.HandleCodeResponseFromHash="handleCodeResponseFromHash",n.UpdateTokenEndpointAuthority="updateTokenEndpointAuthority",n.AuthClientAcquireToken="authClientAcquireToken",n.AuthClientExecuteTokenRequest="authClientExecuteTokenRequest",n.AuthClientCreateTokenRequestBody="authClientCreateTokenRequestBody",n.AuthClientCreateQueryString="authClientCreateQueryString",n.PopTokenGenerateCnf="popTokenGenerateCnf",n.PopTokenGenerateKid="popTokenGenerateKid",n.HandleServerTokenResponse="handleServerTokenResponse",n.AuthorityFactoryCreateDiscoveredInstance="authorityFactoryCreateDiscoveredInstance",n.AuthorityResolveEndpointsAsync="authorityResolveEndpointsAsync",n.AuthorityGetCloudDiscoveryMetadataFromNetwork="authorityGetCloudDiscoveryMetadataFromNetwork",n.AuthorityUpdateCloudDiscoveryMetadata="authorityUpdateCloudDiscoveryMetadata",n.AuthorityGetEndpointMetadataFromNetwork="authorityGetEndpointMetadataFromNetwork",n.AuthorityUpdateEndpointMetadata="authorityUpdateEndpointMetadata",n.AuthorityUpdateMetadataWithRegionalInformation="authorityUpdateMetadataWithRegionalInformation",n.RegionDiscoveryDetectRegion="regionDiscoveryDetectRegion",n.RegionDiscoveryGetRegionFromIMDS="regionDiscoveryGetRegionFromIMDS",n.RegionDiscoveryGetCurrentVersion="regionDiscoveryGetCurrentVersion",n.AcquireTokenByCodeAsync="acquireTokenByCodeAsync",n.GetEndpointMetadataFromNetwork="getEndpointMetadataFromNetwork",n.GetCloudDiscoveryMetadataFromNetworkMeasurement="getCloudDiscoveryMetadataFromNetworkMeasurement",n.HandleRedirectPromiseMeasurement="handleRedirectPromiseMeasurement",n.UpdateCloudDiscoveryMetadataMeasurement="updateCloudDiscoveryMetadataMeasurement",n.UsernamePasswordClientAcquireToken="usernamePasswordClientAcquireToken",n.NativeMessageHandlerHandshake="nativeMessageHandlerHandshake",n.ClearTokensAndKeysWithClaims="clearTokensAndKeysWithClaims"})(R||(R={}));var to;(function(n){n[n.NotStarted=0]="NotStarted",n[n.InProgress=1]="InProgress",n[n.Completed=2]="Completed"})(to||(to={}));var sa=new Set(["accessTokenSize","durationMs","idTokenSize","matsSilentStatus","matsHttpStatus","refreshTokenSize","queuedTimeMs","startTimeMs","status"]);/*! @azure/msal-common v13.3.1 2023-10-27 */var Mo;(function(n){n.SW="sw",n.UHW="uhw"})(Mo||(Mo={}));var wn=function(){function n(e,t){this.cryptoUtils=e,this.performanceClient=t}return n.prototype.generateCnf=function(e){var t,o;return ne(this,void 0,void 0,function(){var r,i,s;return oe(this,function(c){switch(c.label){case 0:return(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.PopTokenGenerateCnf,e.correlationId),(o=this.performanceClient)===null||o===void 0||o.setPreQueueTime(R.PopTokenGenerateKid,e.correlationId),[4,this.generateKid(e)];case 1:return r=c.sent(),i=this.cryptoUtils.base64Encode(JSON.stringify(r)),s={kid:r.kid,reqCnfString:i},[4,this.cryptoUtils.hashString(i)];case 2:return[2,(s.reqCnfHash=c.sent(),s)]}})})},n.prototype.generateKid=function(e){var t;return ne(this,void 0,void 0,function(){var o;return oe(this,function(r){switch(r.label){case 0:return(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.PopTokenGenerateKid,e.correlationId),[4,this.cryptoUtils.getPublicKeyThumbprint(e)];case 1:return o=r.sent(),[2,{kid:o,xms_ksl:Mo.SW}]}})})},n.prototype.signPopToken=function(e,t,o){return ne(this,void 0,void 0,function(){return oe(this,function(r){return[2,this.signPayload(e,t,o)]})})},n.prototype.signPayload=function(e,t,o,r){return ne(this,void 0,void 0,function(){var i,s,c,l,h,u;return oe(this,function(g){switch(g.label){case 0:return i=o.resourceRequestMethod,s=o.resourceRequestUri,c=o.shrClaims,l=o.shrNonce,h=s?new de(s):void 0,u=h==null?void 0:h.getUrlComponents(),[4,this.cryptoUtils.signJwt(he({at:e,ts:pt.nowSeconds(),m:i==null?void 0:i.toUpperCase(),u:u==null?void 0:u.HostNameAndPort,nonce:l||this.cryptoUtils.createNewGuid(),p:u==null?void 0:u.AbsolutePath,q:u!=null&&u.QueryString?[[],u.QueryString]:void 0,client_claims:c||void 0},r),t,o.correlationId)];case 1:return[2,g.sent()]}})})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Lo=function(){function n(){}return n.prototype.generateAppMetadataKey=function(){return n.generateAppMetadataCacheKey(this.environment,this.clientId)},n.generateAppMetadataCacheKey=function(e,t){var o=[So,e,t];return o.join(Pe.CACHE_KEY_SEPARATOR).toLowerCase()},n.createAppMetadataEntity=function(e,t,o){var r=new n;return r.clientId=e,r.environment=t,o&&(r.familyId=o),r},n.isAppMetadataEntity=function(e,t){return t?e.indexOf(So)===0&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("environment"):!1},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ca=function(){function n(e,t){this.cache=e,this.hasChanged=t}return Object.defineProperty(n.prototype,"cacheHasChanged",{get:function(){return this.hasChanged},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tokenCache",{get:function(){return this.cache},enumerable:!1,configurable:!0}),n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var no=function(){function n(e,t,o,r,i,s,c){this.clientId=e,this.cacheStorage=t,this.cryptoObj=o,this.logger=r,this.serializableCache=i,this.persistencePlugin=s,this.performanceClient=c}return n.prototype.validateServerAuthorizationCodeResponse=function(e,t,o){if(!e.state||!t)throw e.state?K.createStateNotFoundError("Cached State"):K.createStateNotFoundError("Server State");if(decodeURIComponent(e.state)!==decodeURIComponent(t))throw K.createStateMismatchError();if(e.error||e.error_description||e.suberror)throw gt.isInteractionRequiredError(e.error,e.error_description,e.suberror)?new gt(e.error||b.EMPTY_STRING,e.error_description,e.suberror,e.timestamp||b.EMPTY_STRING,e.trace_id||b.EMPTY_STRING,e.correlation_id||b.EMPTY_STRING,e.claims||b.EMPTY_STRING):new rn(e.error||b.EMPTY_STRING,e.error_description,e.suberror);e.client_info&&Zn(e.client_info,o)},n.prototype.validateTokenResponse=function(e){if(e.error||e.error_description||e.suberror){if(gt.isInteractionRequiredError(e.error,e.error_description,e.suberror))throw new gt(e.error,e.error_description,e.suberror,e.timestamp||b.EMPTY_STRING,e.trace_id||b.EMPTY_STRING,e.correlation_id||b.EMPTY_STRING,e.claims||b.EMPTY_STRING);var t=e.error_codes+" - ["+e.timestamp+"]: "+e.error_description+" - Correlation ID: "+e.correlation_id+" - Trace ID: "+e.trace_id;throw new rn(e.error,t,e.suberror)}},n.prototype.handleServerTokenResponse=function(e,t,o,r,i,s,c,l,h){var u;return ne(this,void 0,void 0,function(){var g,f,w,C,P,M,j;return oe(this,function(N){switch(N.label){case 0:if((u=this.performanceClient)===null||u===void 0||u.addQueueMeasurement(R.HandleServerTokenResponse,e.correlation_id),e.id_token){if(g=new It(e.id_token||b.EMPTY_STRING,this.cryptoObj),i&&!H.isEmpty(i.nonce)&&g.claims.nonce!==i.nonce)throw K.createNonceMismatchError();if(r.maxAge||r.maxAge===0){if(f=g.claims.auth_time,!f)throw K.createAuthTimeNotFoundError();It.checkMaxAge(f,r.maxAge)}}this.homeAccountIdentifier=Ue.generateHomeAccountId(e.client_info||b.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,g),i&&i.state&&(w=Ft.parseRequestState(this.cryptoObj,i.state)),e.key_id=e.key_id||r.sshKid||void 0,C=this.generateCacheRecord(e,t,o,r,g,s,i),N.label=1;case 1:return N.trys.push([1,,5,8]),this.persistencePlugin&&this.serializableCache?(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),P=new ca(this.serializableCache,!0),[4,this.persistencePlugin.beforeCacheAccess(P)]):[3,3];case 2:N.sent(),N.label=3;case 3:return c&&!l&&C.account&&(M=C.account.generateAccountKey(),j=this.cacheStorage.getAccount(M),!j)?(this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),[2,n.generateAuthenticationResult(this.cryptoObj,t,C,!1,r,g,w,void 0,h)]):[4,this.cacheStorage.saveCacheRecord(C)];case 4:return N.sent(),[3,8];case 5:return this.persistencePlugin&&this.serializableCache&&P?(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),[4,this.persistencePlugin.afterCacheAccess(P)]):[3,7];case 6:N.sent(),N.label=7;case 7:return[7];case 8:return[2,n.generateAuthenticationResult(this.cryptoObj,t,C,!1,r,g,w,e,h)]}})})},n.prototype.generateCacheRecord=function(e,t,o,r,i,s,c){var l=t.getPreferredCache();if(H.isEmpty(l))throw K.createInvalidCacheEnvironmentError();var h,u;!H.isEmpty(e.id_token)&&i&&(h=sn.createIdTokenEntity(this.homeAccountIdentifier,l,e.id_token||b.EMPTY_STRING,this.clientId,i.claims.tid||b.EMPTY_STRING),u=this.generateAccountEntity(e,i,t,c));var g=null;if(!H.isEmpty(e.access_token)){var f=e.scope?He.fromString(e.scope):new He(r.scopes||[]),w=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,C=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,P=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,M=o+w,j=M+C,N=P&&P>0?o+P:void 0;g=cn.createAccessTokenEntity(this.homeAccountIdentifier,l,e.access_token||b.EMPTY_STRING,this.clientId,i?i.claims.tid||b.EMPTY_STRING:t.tenant,f.printScopes(),M,j,this.cryptoObj,N,e.token_type,s,e.key_id,r.claims,r.requestedClaimsHash)}var T=null;H.isEmpty(e.refresh_token)||(T=vn.createRefreshTokenEntity(this.homeAccountIdentifier,l,e.refresh_token||b.EMPTY_STRING,this.clientId,e.foci,s));var B=null;return H.isEmpty(e.foci)||(B=Lo.createAppMetadataEntity(this.clientId,l,e.foci)),new xn(u,h,g,T,B)},n.prototype.generateAccountEntity=function(e,t,o,r){var i=o.authorityType,s=r?r.cloud_graph_host_name:b.EMPTY_STRING,c=r?r.msgraph_host:b.EMPTY_STRING;if(i===$e.Adfs)return this.logger.verbose("Authority type is ADFS, creating ADFS account"),Ue.createGenericAccount(this.homeAccountIdentifier,t,o,s,c);if(H.isEmpty(e.client_info)&&o.protocolMode==="AAD")throw K.createClientInfoEmptyError();return e.client_info?Ue.createAccount(e.client_info,this.homeAccountIdentifier,t,o,s,c):Ue.createGenericAccount(this.homeAccountIdentifier,t,o,s,c)},n.generateAuthenticationResult=function(e,t,o,r,i,s,c,l,h){var u,g,f;return ne(this,void 0,void 0,function(){var w,C,P,M,j,N,T,B,V,G,J;return oe(this,function(I){switch(I.label){case 0:if(w=b.EMPTY_STRING,C=[],P=null,j=b.EMPTY_STRING,!o.accessToken)return[3,4];if(o.accessToken.tokenType!==ge.POP)return[3,2];if(N=new wn(e),T=o.accessToken,B=T.secret,V=T.keyId,!V)throw K.createKeyIdMissingError();return[4,N.signPopToken(B,V,i)];case 1:return w=I.sent(),[3,3];case 2:w=o.accessToken.secret,I.label=3;case 3:C=He.fromString(o.accessToken.target).asArray(),P=new Date(Number(o.accessToken.expiresOn)*1e3),M=new Date(Number(o.accessToken.extendedExpiresOn)*1e3),I.label=4;case 4:return o.appMetadata&&(j=o.appMetadata.familyId===Nn?Nn:b.EMPTY_STRING),G=(s==null?void 0:s.claims.oid)||(s==null?void 0:s.claims.sub)||b.EMPTY_STRING,J=(s==null?void 0:s.claims.tid)||b.EMPTY_STRING,l!=null&&l.spa_accountid&&o.account&&(o.account.nativeAccountId=l==null?void 0:l.spa_accountid),[2,{authority:t.canonicalAuthority,uniqueId:G,tenantId:J,scopes:C,account:o.account?o.account.getAccountInfo():null,idToken:s?s.rawToken:b.EMPTY_STRING,idTokenClaims:s?s.claims:{},accessToken:w,fromCache:r,expiresOn:P,correlationId:i.correlationId,requestId:h||b.EMPTY_STRING,extExpiresOn:M,familyId:j,tokenType:((u=o.accessToken)===null||u===void 0?void 0:u.tokenType)||b.EMPTY_STRING,state:c?c.userRequestState:b.EMPTY_STRING,cloudGraphHostName:((g=o.account)===null||g===void 0?void 0:g.cloudGraphHostName)||b.EMPTY_STRING,msGraphHost:((f=o.account)===null||f===void 0?void 0:f.msGraphHost)||b.EMPTY_STRING,code:l==null?void 0:l.spa_code,fromNativeBroker:!1}]}})})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Or=function(n){Ye(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.includeRedirectUri=!0,r}return e.prototype.getAuthCodeUrl=function(t){var o,r;return ne(this,void 0,void 0,function(){var i;return oe(this,function(s){switch(s.label){case 0:return(o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.GetAuthCodeUrl,t.correlationId),(r=this.performanceClient)===null||r===void 0||r.setPreQueueTime(R.AuthClientCreateQueryString,t.correlationId),[4,this.createAuthCodeUrlQueryString(t)];case 1:return i=s.sent(),[2,de.appendQueryString(this.authority.authorizationEndpoint,i)]}})})},e.prototype.acquireToken=function(t,o){var r,i,s,c,l,h;return ne(this,void 0,void 0,function(){var u,g,f,w,C,P,M=this;return oe(this,function(j){switch(j.label){case 0:if(!t||!t.code)throw K.createTokenRequestCannotBeMadeError();return(r=this.performanceClient)===null||r===void 0||r.addQueueMeasurement(R.AuthClientAcquireToken,t.correlationId),u=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement("AuthCodeClientAcquireToken",t.correlationId),this.logger.info("in acquireToken call in auth-code client"),g=pt.nowSeconds(),(s=this.performanceClient)===null||s===void 0||s.setPreQueueTime(R.AuthClientExecuteTokenRequest,t.correlationId),[4,this.executeTokenRequest(this.authority,t)];case 1:return f=j.sent(),w=(c=f.headers)===null||c===void 0?void 0:c[ot.X_MS_REQUEST_ID],C=(l=f.headers)===null||l===void 0?void 0:l[ot.X_MS_HTTP_VERSION],C&&(u==null||u.addStaticFields({httpVerAuthority:C})),P=new no(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient),P.validateTokenResponse(f.body),(h=this.performanceClient)===null||h===void 0||h.setPreQueueTime(R.HandleServerTokenResponse,t.correlationId),[2,P.handleServerTokenResponse(f.body,this.authority,g,t,o,void 0,void 0,void 0,w).then(function(N){return u==null||u.endMeasurement({success:!0}),N}).catch(function(N){throw M.logger.verbose("Error in fetching token in ACC",t.correlationId),u==null||u.endMeasurement({errorCode:N.errorCode,subErrorCode:N.subError,success:!1}),N})]}})})},e.prototype.handleFragmentResponse=function(t,o){var r=new no(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null),i=new de(t),s=de.getDeserializedHash(i.getHash());if(r.validateServerAuthorizationCodeResponse(s,o,this.cryptoUtils),!s.code)throw K.createNoAuthCodeInServerResponseError();return he(he({},s),{code:s.code})},e.prototype.getLogoutUri=function(t){if(!t)throw we.createEmptyLogoutRequestError();var o=this.createLogoutUrlQueryString(t);return de.appendQueryString(this.authority.endSessionEndpoint,o)},e.prototype.executeTokenRequest=function(t,o){var r,i;return ne(this,void 0,void 0,function(){var s,c,l,h,u,g,f;return oe(this,function(w){switch(w.label){case 0:return(r=this.performanceClient)===null||r===void 0||r.addQueueMeasurement(R.AuthClientExecuteTokenRequest,o.correlationId),(i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.AuthClientCreateTokenRequestBody,o.correlationId),s=this.createTokenQueryParameters(o),c=de.appendQueryString(t.tokenEndpoint,s),[4,this.createTokenRequestBody(o)];case 1:if(l=w.sent(),h=void 0,o.clientInfo)try{u=Zn(o.clientInfo,this.cryptoUtils),h={credential:""+u.uid+Pe.CLIENT_INFO_SEPARATOR+u.utid,type:rt.HOME_ACCOUNT_ID}}catch(C){this.logger.verbose("Could not parse client info for CCS Header: "+C)}return g=this.createTokenRequestHeaders(h||o.ccsCredential),f={clientId:this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:o.scopes,claims:o.claims,authenticationScheme:o.authenticationScheme,resourceRequestMethod:o.resourceRequestMethod,resourceRequestUri:o.resourceRequestUri,shrClaims:o.shrClaims,sshKid:o.sshKid},[2,this.executePostToTokenEndpoint(c,l,g,f)]}})})},e.prototype.createTokenRequestBody=function(t){var o,r;return ne(this,void 0,void 0,function(){var i,s,c,l,h,u,g,g,f;return oe(this,function(w){switch(w.label){case 0:return(o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.AuthClientCreateTokenRequestBody,t.correlationId),i=new zn,i.addClientId(this.config.authOptions.clientId),this.includeRedirectUri?i.addRedirectUri(t.redirectUri):an.validateRedirectUri(t.redirectUri),i.addScopes(t.scopes),i.addAuthorizationCode(t.code),i.addLibraryInfo(this.config.libraryInfo),i.addApplicationTelemetry(this.config.telemetry.application),i.addThrottling(),this.serverTelemetryManager&&i.addServerTelemetry(this.serverTelemetryManager),t.codeVerifier&&i.addCodeVerifier(t.codeVerifier),this.config.clientCredentials.clientSecret&&i.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(s=this.config.clientCredentials.clientAssertion,i.addClientAssertion(s.assertion),i.addClientAssertionType(s.assertionType)),i.addGrantType(Wn.AUTHORIZATION_CODE_GRANT),i.addClientInfo(),t.authenticationScheme!==ge.POP?[3,2]:(c=new wn(this.cryptoUtils,this.performanceClient),(r=this.performanceClient)===null||r===void 0||r.setPreQueueTime(R.PopTokenGenerateCnf,t.correlationId),[4,c.generateCnf(t)]);case 1:return l=w.sent(),i.addPopToken(l.reqCnfString),[3,3];case 2:if(t.authenticationScheme===ge.SSH)if(t.sshJwk)i.addSshJwk(t.sshJwk);else throw we.createMissingSshJwkError();w.label=3;case 3:if(h=t.correlationId||this.config.cryptoInterface.createNewGuid(),i.addCorrelationId(h),(!H.isEmptyObj(t.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&i.addClaims(t.claims,this.config.authOptions.clientCapabilities),u=void 0,t.clientInfo)try{g=Zn(t.clientInfo,this.cryptoUtils),u={credential:""+g.uid+Pe.CLIENT_INFO_SEPARATOR+g.utid,type:rt.HOME_ACCOUNT_ID}}catch(C){this.logger.verbose("Could not parse client info for CCS Header: "+C)}else u=t.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&u)switch(u.type){case rt.HOME_ACCOUNT_ID:try{g=yn(u.credential),i.addCcsOid(g)}catch(C){this.logger.verbose("Could not parse home account ID for CCS Header: "+C)}break;case rt.UPN:i.addCcsUpn(u.credential);break}return t.tokenBodyParameters&&i.addExtraQueryParameters(t.tokenBodyParameters),t.enableSpaAuthorizationCode&&(!t.tokenBodyParameters||!t.tokenBodyParameters[ae.RETURN_SPA_CODE])&&i.addExtraQueryParameters((f={},f[ae.RETURN_SPA_CODE]="1",f)),[2,i.createQueryString()]}})})},e.prototype.createAuthCodeUrlQueryString=function(t){var o;return ne(this,void 0,void 0,function(){var r,i,s,c,l,h,h,h,u,g;return oe(this,function(f){switch(f.label){case 0:if((o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.AuthClientCreateQueryString,t.correlationId),r=new zn,r.addClientId(this.config.authOptions.clientId),i=$n(t.scopes||[],t.extraScopesToConsent||[]),r.addScopes(i),r.addRedirectUri(t.redirectUri),s=t.correlationId||this.config.cryptoInterface.createNewGuid(),r.addCorrelationId(s),r.addResponseMode(t.responseMode),r.addResponseTypeCode(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addClientInfo(),t.codeChallenge&&t.codeChallengeMethod&&r.addCodeChallengeParams(t.codeChallenge,t.codeChallengeMethod),t.prompt&&r.addPrompt(t.prompt),t.domainHint&&r.addDomainHint(t.domainHint),t.prompt!==Ve.SELECT_ACCOUNT)if(t.sid&&t.prompt===Ve.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),r.addSid(t.sid);else if(t.account){if(c=this.extractAccountSid(t.account),l=this.extractLoginHint(t.account),l){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),r.addLoginHint(l);try{h=yn(t.account.homeAccountId),r.addCcsOid(h)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(c&&t.prompt===Ve.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),r.addSid(c);try{h=yn(t.account.homeAccountId),r.addCcsOid(h)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(t.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),r.addLoginHint(t.loginHint),r.addCcsUpn(t.loginHint);else if(t.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),r.addLoginHint(t.account.username);try{h=yn(t.account.homeAccountId),r.addCcsOid(h)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else t.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),r.addLoginHint(t.loginHint),r.addCcsUpn(t.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");return t.nonce&&r.addNonce(t.nonce),t.state&&r.addState(t.state),(!H.isEmpty(t.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(t.claims,this.config.authOptions.clientCapabilities),t.extraQueryParameters&&r.addExtraQueryParameters(t.extraQueryParameters),t.nativeBroker?(r.addNativeBroker(),t.authenticationScheme!==ge.POP?[3,2]:(u=new wn(this.cryptoUtils),[4,u.generateCnf(t)])):[3,2];case 1:g=f.sent(),r.addPopToken(g.reqCnfString),f.label=2;case 2:return[2,r.createQueryString()]}})})},e.prototype.createLogoutUrlQueryString=function(t){var o=new zn;return t.postLogoutRedirectUri&&o.addPostLogoutRedirectUri(t.postLogoutRedirectUri),t.correlationId&&o.addCorrelationId(t.correlationId),t.idTokenHint&&o.addIdTokenHint(t.idTokenHint),t.state&&o.addState(t.state),t.logoutHint&&o.addLogoutHint(t.logoutHint),t.extraQueryParameters&&o.addExtraQueryParameters(t.extraQueryParameters),o.createQueryString()},e.prototype.extractAccountSid=function(t){var o;return((o=t.idTokenClaims)===null||o===void 0?void 0:o.sid)||null},e.prototype.extractLoginHint=function(t){var o;return((o=t.idTokenClaims)===null||o===void 0?void 0:o.login_hint)||null},e}(No);/*! @azure/msal-common v13.3.1 2023-10-27 */var zr=function(n){Ye(e,n);function e(t,o){return n.call(this,t,o)||this}return e.prototype.acquireToken=function(t){var o,r,i,s,c,l,h;return ne(this,void 0,void 0,function(){var u,g,f,w,C,P,M=this;return oe(this,function(j){switch(j.label){case 0:return(o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.RefreshTokenClientAcquireToken,t.correlationId),u=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.RefreshTokenClientAcquireToken,t.correlationId),this.logger.verbose("RefreshTokenClientAcquireToken called",t.correlationId),g=pt.nowSeconds(),(i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.RefreshTokenClientExecuteTokenRequest,t.correlationId),[4,this.executeTokenRequest(t,this.authority)];case 1:return f=j.sent(),w=(s=f.headers)===null||s===void 0?void 0:s[ot.X_MS_HTTP_VERSION],u==null||u.addStaticFields({refreshTokenSize:((c=f.body.refresh_token)===null||c===void 0?void 0:c.length)||0}),w&&(u==null||u.addStaticFields({httpVerToken:w})),C=(l=f.headers)===null||l===void 0?void 0:l[ot.X_MS_REQUEST_ID],P=new no(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),P.validateTokenResponse(f.body),(h=this.performanceClient)===null||h===void 0||h.setPreQueueTime(R.HandleServerTokenResponse,t.correlationId),[2,P.handleServerTokenResponse(f.body,this.authority,g,t,void 0,void 0,!0,t.forceCache,C).then(function(N){return u==null||u.endMeasurement({success:!0}),N}).catch(function(N){throw M.logger.verbose("Error in fetching refresh token",t.correlationId),u==null||u.endMeasurement({errorCode:N.errorCode,subErrorCode:N.subError,success:!1}),N})]}})})},e.prototype.acquireTokenByRefreshToken=function(t){var o,r,i,s;return ne(this,void 0,void 0,function(){var c,l,h;return oe(this,function(u){if(!t)throw we.createEmptyTokenRequestError();if((o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.RefreshTokenClientAcquireTokenByRefreshToken,t.correlationId),!t.account)throw K.createNoAccountInSilentRequestError();if(c=this.cacheManager.isAppMetadataFOCI(t.account.environment),c)try{return(r=this.performanceClient)===null||r===void 0||r.setPreQueueTime(R.RefreshTokenClientAcquireTokenWithCachedRefreshToken,t.correlationId),[2,this.acquireTokenWithCachedRefreshToken(t,!0)]}catch(g){if(l=g instanceof gt&&g.errorCode===bn.noTokensFoundError.code,h=g instanceof rn&&g.errorCode===Nr.INVALID_GRANT_ERROR&&g.subError===Nr.CLIENT_MISMATCH_ERROR,l||h)return(i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.RefreshTokenClientAcquireTokenWithCachedRefreshToken,t.correlationId),[2,this.acquireTokenWithCachedRefreshToken(t,!1)];throw g}return(s=this.performanceClient)===null||s===void 0||s.setPreQueueTime(R.RefreshTokenClientAcquireTokenWithCachedRefreshToken,t.correlationId),[2,this.acquireTokenWithCachedRefreshToken(t,!1)]})})},e.prototype.acquireTokenWithCachedRefreshToken=function(t,o){var r,i,s;return ne(this,void 0,void 0,function(){var c,l,h;return oe(this,function(u){if((r=this.performanceClient)===null||r===void 0||r.addQueueMeasurement(R.RefreshTokenClientAcquireTokenWithCachedRefreshToken,t.correlationId),c=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(R.RefreshTokenClientAcquireTokenWithCachedRefreshToken,t.correlationId),this.logger.verbose("RefreshTokenClientAcquireTokenWithCachedRefreshToken called",t.correlationId),l=this.cacheManager.getRefreshToken(t.account,o),!l)throw c==null||c.discardMeasurement(),gt.createNoTokensFoundError();return c==null||c.endMeasurement({success:!0}),h=he(he({},t),{refreshToken:l.secret,authenticationScheme:t.authenticationScheme||ge.BEARER,ccsCredential:{credential:t.account.homeAccountId,type:rt.HOME_ACCOUNT_ID}}),(s=this.performanceClient)===null||s===void 0||s.setPreQueueTime(R.RefreshTokenClientAcquireToken,t.correlationId),[2,this.acquireToken(h)]})})},e.prototype.executeTokenRequest=function(t,o){var r,i,s;return ne(this,void 0,void 0,function(){var c,l,h,u,g,f;return oe(this,function(w){switch(w.label){case 0:return(r=this.performanceClient)===null||r===void 0||r.addQueueMeasurement(R.RefreshTokenClientExecuteTokenRequest,t.correlationId),c=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(R.RefreshTokenClientExecuteTokenRequest,t.correlationId),(s=this.performanceClient)===null||s===void 0||s.setPreQueueTime(R.RefreshTokenClientCreateTokenRequestBody,t.correlationId),l=this.createTokenQueryParameters(t),h=de.appendQueryString(o.tokenEndpoint,l),[4,this.createTokenRequestBody(t)];case 1:return u=w.sent(),g=this.createTokenRequestHeaders(t.ccsCredential),f={clientId:this.config.authOptions.clientId,authority:o.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid},[2,this.executePostToTokenEndpoint(h,u,g,f).then(function(C){return c==null||c.endMeasurement({success:!0}),C}).catch(function(C){throw c==null||c.endMeasurement({success:!1}),C})]}})})},e.prototype.createTokenRequestBody=function(t){var o,r,i;return ne(this,void 0,void 0,function(){var s,c,l,h,u,g,f;return oe(this,function(w){switch(w.label){case 0:return(o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.RefreshTokenClientCreateTokenRequestBody,t.correlationId),s=t.correlationId,c=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.BaseClientCreateTokenRequestHeaders,s),l=new zn,l.addClientId(this.config.authOptions.clientId),l.addScopes(t.scopes),l.addGrantType(Wn.REFRESH_TOKEN_GRANT),l.addClientInfo(),l.addLibraryInfo(this.config.libraryInfo),l.addApplicationTelemetry(this.config.telemetry.application),l.addThrottling(),this.serverTelemetryManager&&l.addServerTelemetry(this.serverTelemetryManager),l.addCorrelationId(s),l.addRefreshToken(t.refreshToken),this.config.clientCredentials.clientSecret&&l.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(h=this.config.clientCredentials.clientAssertion,l.addClientAssertion(h.assertion),l.addClientAssertionType(h.assertionType)),t.authenticationScheme!==ge.POP?[3,2]:(u=new wn(this.cryptoUtils,this.performanceClient),(i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.PopTokenGenerateCnf,t.correlationId),[4,u.generateCnf(t)]);case 1:return g=w.sent(),l.addPopToken(g.reqCnfString),[3,3];case 2:if(t.authenticationScheme===ge.SSH)if(t.sshJwk)l.addSshJwk(t.sshJwk);else throw c==null||c.endMeasurement({success:!1}),we.createMissingSshJwkError();w.label=3;case 3:if((!H.isEmptyObj(t.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&l.addClaims(t.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&t.ccsCredential)switch(t.ccsCredential.type){case rt.HOME_ACCOUNT_ID:try{f=yn(t.ccsCredential.credential),l.addCcsOid(f)}catch(C){this.logger.verbose("Could not parse home account ID for CCS Header: "+C)}break;case rt.UPN:l.addCcsUpn(t.ccsCredential.credential);break}return c==null||c.endMeasurement({success:!0}),[2,l.createQueryString()]}})})},e}(No);/*! @azure/msal-common v13.3.1 2023-10-27 */var la=function(n){Ye(e,n);function e(t,o){return n.call(this,t,o)||this}return e.prototype.acquireToken=function(t){return ne(this,void 0,void 0,function(){var o,r;return oe(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.acquireCachedToken(t)];case 1:return[2,i.sent()];case 2:if(o=i.sent(),o instanceof K&&o.errorCode===D.tokenRefreshRequired.code)return r=new zr(this.config,this.performanceClient),[2,r.acquireTokenByRefreshToken(t)];throw o;case 3:return[2]}})})},e.prototype.acquireCachedToken=function(t){var o,r,i,s,c;return ne(this,void 0,void 0,function(){var l,h;return oe(this,function(u){switch(u.label){case 0:if(!t)throw we.createEmptyTokenRequestError();if(t.forceRefresh)throw(o=this.serverTelemetryManager)===null||o===void 0||o.setCacheOutcome(Qt.FORCE_REFRESH),this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because forceRefresh is true."),K.createRefreshRequiredError();if(!this.config.cacheOptions.claimsBasedCachingEnabled&&!H.isEmptyObj(t.claims))throw(r=this.serverTelemetryManager)===null||r===void 0||r.setCacheOutcome(Qt.CLAIMS_REQUESTED_CACHE_SKIPPED),this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because claims-based caching is disabled and claims were requested."),K.createRefreshRequiredError();if(!t.account)throw K.createNoAccountInSilentRequestError();if(l=t.authority||this.authority.getPreferredCache(),h=this.cacheManager.readCacheRecord(t.account,t,l),h.accessToken){if(pt.wasClockTurnedBack(h.accessToken.cachedAt)||pt.isTokenExpired(h.accessToken.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw(s=this.serverTelemetryManager)===null||s===void 0||s.setCacheOutcome(Qt.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token is expired or will expire within "+this.config.systemOptions.tokenRenewalOffsetSeconds+" seconds."),K.createRefreshRequiredError();if(h.accessToken.refreshOn&&pt.isTokenExpired(h.accessToken.refreshOn,0))throw(c=this.serverTelemetryManager)===null||c===void 0||c.setCacheOutcome(Qt.REFRESH_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'."),K.createRefreshRequiredError()}else throw(i=this.serverTelemetryManager)===null||i===void 0||i.setCacheOutcome(Qt.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."),K.createRefreshRequiredError();return this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[4,this.generateResultFromCacheRecord(h,t)];case 1:return[2,u.sent()]}})})},e.prototype.generateResultFromCacheRecord=function(t,o){return ne(this,void 0,void 0,function(){var r,i;return oe(this,function(s){switch(s.label){case 0:if(t.idToken&&(r=new It(t.idToken.secret,this.config.cryptoInterface)),o.maxAge||o.maxAge===0){if(i=r==null?void 0:r.claims.auth_time,!i)throw K.createAuthTimeNotFoundError();It.checkMaxAge(i,o.maxAge)}return[4,no.generateAuthenticationResult(this.cryptoUtils,this.authority,t,!0,o,r)];case 1:return[2,s.sent()]}})})},e}(No);/*! @azure/msal-common v13.3.1 2023-10-27 */function da(n){return n.hasOwnProperty("authorization_endpoint")&&n.hasOwnProperty("token_endpoint")&&n.hasOwnProperty("issuer")&&n.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v13.3.1 2023-10-27 */var xr={endpointMetadata:{"https://login.microsoftonline.com/common/":{token_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/common/":{token_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/common/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/common/":{token_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/consumers/":{token_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/consumers/":{token_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/consumers/":{token_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/organizations/":{token_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/organizations/":{token_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/organizations/":{token_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"}},instanceDiscoveryMetadata:{"https://login.microsoftonline.com/common/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.chinacloudapi.cn/common/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/common/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.us/common/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/common/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.com/consumers/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.chinacloudapi.cn/consumers/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.us/consumers/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.com/organizations/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.chinacloudapi.cn/organizations/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},"https://login.microsoftonline.us/organizations/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}}},Br=xr.endpointMetadata,Ur=xr.instanceDiscoveryMetadata;/*! @azure/msal-common v13.3.1 2023-10-27 */var Bn;(function(n){n.AAD="AAD",n.OIDC="OIDC"})(Bn||(Bn={}));/*! @azure/msal-common v13.3.1 2023-10-27 */var Oo=function(){function n(){this.expiresAt=pt.nowSeconds()+Pn.REFRESH_TIME_SECONDS}return n.prototype.updateCloudDiscoveryMetadata=function(e,t){this.aliases=e.aliases,this.preferred_cache=e.preferred_cache,this.preferred_network=e.preferred_network,this.aliasesFromNetwork=t},n.prototype.updateEndpointMetadata=function(e,t){this.authorization_endpoint=e.authorization_endpoint,this.token_endpoint=e.token_endpoint,this.end_session_endpoint=e.end_session_endpoint,this.issuer=e.issuer,this.endpointsFromNetwork=t,this.jwks_uri=e.jwks_uri},n.prototype.updateCanonicalAuthority=function(e){this.canonical_authority=e},n.prototype.resetExpiresAt=function(){this.expiresAt=pt.nowSeconds()+Pn.REFRESH_TIME_SECONDS},n.prototype.isExpired=function(){return this.expiresAt<=pt.nowSeconds()},n.isAuthorityMetadataEntity=function(e,t){return t?e.indexOf(Pn.CACHE_KEY)===0&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri"):!1},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */function ua(n){return n.hasOwnProperty("tenant_discovery_endpoint")&&n.hasOwnProperty("metadata")}/*! @azure/msal-common v13.3.1 2023-10-27 */function pa(n){return n.hasOwnProperty("error")&&n.hasOwnProperty("error_description")}/*! @azure/msal-common v13.3.1 2023-10-27 */var ha=function(){function n(e,t,o){this.networkInterface=e,this.performanceClient=t,this.correlationId=o}return n.prototype.detectRegion=function(e,t){var o,r,i,s;return ne(this,void 0,void 0,function(){var c,l,h,u,g;return oe(this,function(f){switch(f.label){case 0:if((o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.RegionDiscoveryDetectRegion,this.correlationId),c=e,c)return[3,8];l=n.IMDS_OPTIONS,f.label=1;case 1:return f.trys.push([1,6,,7]),(r=this.performanceClient)===null||r===void 0||r.setPreQueueTime(R.RegionDiscoveryGetRegionFromIMDS,this.correlationId),[4,this.getRegionFromIMDS(b.IMDS_VERSION,l)];case 2:return h=f.sent(),h.status===_n.httpSuccess&&(c=h.body,t.region_source=$t.IMDS),h.status!==_n.httpBadRequest?[3,5]:((i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.RegionDiscoveryGetCurrentVersion,this.correlationId),[4,this.getCurrentVersion(l)]);case 3:return u=f.sent(),u?((s=this.performanceClient)===null||s===void 0||s.setPreQueueTime(R.RegionDiscoveryGetRegionFromIMDS,this.correlationId),[4,this.getRegionFromIMDS(u,l)]):(t.region_source=$t.FAILED_AUTO_DETECTION,[2,null]);case 4:g=f.sent(),g.status===_n.httpSuccess&&(c=g.body,t.region_source=$t.IMDS),f.label=5;case 5:return[3,7];case 6:return f.sent(),t.region_source=$t.FAILED_AUTO_DETECTION,[2,null];case 7:return[3,9];case 8:t.region_source=$t.ENVIRONMENT_VARIABLE,f.label=9;case 9:return c||(t.region_source=$t.FAILED_AUTO_DETECTION),[2,c||null]}})})},n.prototype.getRegionFromIMDS=function(e,t){var o;return ne(this,void 0,void 0,function(){return oe(this,function(r){return(o=this.performanceClient)===null||o===void 0||o.addQueueMeasurement(R.RegionDiscoveryGetRegionFromIMDS,this.correlationId),[2,this.networkInterface.sendGetRequestAsync(b.IMDS_ENDPOINT+"?api-version="+e+"&format=text",t,b.IMDS_TIMEOUT)]})})},n.prototype.getCurrentVersion=function(e){var t;return ne(this,void 0,void 0,function(){var o;return oe(this,function(r){switch(r.label){case 0:(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.RegionDiscoveryGetCurrentVersion,this.correlationId),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(b.IMDS_ENDPOINT+"?format=json",e)];case 2:return o=r.sent(),o.status===_n.httpBadRequest&&o.body&&o.body["newest-versions"]&&o.body["newest-versions"].length>0?[2,o.body["newest-versions"][0]]:[2,null];case 3:return r.sent(),[2,null];case 4:return[2]}})})},n.IMDS_OPTIONS={headers:{Metadata:"true"}},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Un=function(){function n(e,t,o,r,i,s,c){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=o,this.authorityOptions=r,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=i,this.performanceClient=s,this.correlationId=c,this.regionDiscovery=new ha(t,this.performanceClient,this.correlationId)}return n.prototype.getAuthorityType=function(e){if(e.HostNameAndPort.endsWith(b.CIAM_AUTH_URL))return $e.Ciam;var t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case b.ADFS:return $e.Adfs;case b.DSTS:return $e.Dsts}return $e.Default},Object.defineProperty(n.prototype,"authorityType",{get:function(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"protocolMode",{get:function(){return this.authorityOptions.protocolMode},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"options",{get:function(){return this.authorityOptions},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"canonicalAuthority",{get:function(){return this._canonicalAuthority.urlString},set:function(e){this._canonicalAuthority=new de(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"canonicalAuthorityUrlComponents",{get:function(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hostnameAndPort",{get:function(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tenant",{get:function(){return this.canonicalAuthorityUrlComponents.PathSegments[0]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"authorizationEndpoint",{get:function(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tokenEndpoint",{get:function(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"deviceCodeEndpoint",{get:function(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"endSessionEndpoint",{get:function(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw K.createLogoutNotSupportedError();return this.replacePath(this.metadata.end_session_endpoint)}else throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"selfSignedJwtAudience",{get:function(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"jwksUri",{get:function(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),n.prototype.canReplaceTenant=function(e){return e.PathSegments.length===1&&!n.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===$e.Default&&this.protocolMode===Bn.AAD},n.prototype.replaceTenant=function(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)},n.prototype.replacePath=function(e){var t=this,o=e,r=new de(this.metadata.canonical_authority),i=r.getUrlComponents(),s=i.PathSegments,c=this.canonicalAuthorityUrlComponents.PathSegments;return c.forEach(function(l,h){var u=s[h];if(h===0&&t.canReplaceTenant(i)){var g=new de(t.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];u!==g&&(t.logger.verbose("Replacing tenant domain name "+u+" with id "+g),u=g)}l!==u&&(o=o.replace("/"+u+"/","/"+l+"/"))}),this.replaceTenant(o)},Object.defineProperty(n.prototype,"defaultOpenIdConfigurationEndpoint",{get:function(){return this.authorityType===$e.Adfs||this.authorityType===$e.Dsts||this.protocolMode===Bn.OIDC?this.canonicalAuthority+".well-known/openid-configuration":this.canonicalAuthority+"v2.0/.well-known/openid-configuration"},enumerable:!1,configurable:!0}),n.prototype.discoveryComplete=function(){return!!this.metadata},n.prototype.resolveEndpointsAsync=function(){var e,t,o;return ne(this,void 0,void 0,function(){var r,i,s,c;return oe(this,function(l){switch(l.label){case 0:return(e=this.performanceClient)===null||e===void 0||e.addQueueMeasurement(R.AuthorityResolveEndpointsAsync,this.correlationId),r=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort),r||(r=new Oo,r.updateCanonicalAuthority(this.canonicalAuthority)),(t=this.performanceClient)===null||t===void 0||t.setPreQueueTime(R.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId),[4,this.updateCloudDiscoveryMetadata(r)];case 1:return i=l.sent(),this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,r.preferred_network),(o=this.performanceClient)===null||o===void 0||o.setPreQueueTime(R.AuthorityUpdateEndpointMetadata,this.correlationId),[4,this.updateEndpointMetadata(r)];case 2:return s=l.sent(),i!==ut.CACHE&&s!==ut.CACHE&&(r.resetExpiresAt(),r.updateCanonicalAuthority(this.canonicalAuthority)),c=this.cacheManager.generateAuthorityMetadataCacheKey(r.preferred_cache),this.cacheManager.setAuthorityMetadata(c,r),this.metadata=r,[2]}})})},n.prototype.updateEndpointMetadata=function(e){var t,o,r,i,s,c;return ne(this,void 0,void 0,function(){var l,h;return oe(this,function(u){switch(u.label){case 0:return(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.AuthorityUpdateEndpointMetadata,this.correlationId),l=this.getEndpointMetadataFromConfig(),l?(e.updateEndpointMetadata(l,!1),[2,ut.CONFIG]):this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!e.isExpired()?[2,ut.CACHE]:((o=this.performanceClient)===null||o===void 0||o.setPreQueueTime(R.AuthorityGetEndpointMetadataFromNetwork,this.correlationId),[4,this.getEndpointMetadataFromNetwork()]);case 1:return l=u.sent(),l?!((r=this.authorityOptions.azureRegionConfiguration)===null||r===void 0)&&r.azureRegion?((i=this.performanceClient)===null||i===void 0||i.setPreQueueTime(R.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId),[4,this.updateMetadataWithRegionalInformation(l)]):[3,3]:[3,4];case 2:l=u.sent(),u.label=3;case 3:return e.updateEndpointMetadata(l,!0),[2,ut.NETWORK];case 4:return h=this.getEndpointMetadataFromHardcodedValues(),h&&!this.authorityOptions.skipAuthorityMetadataCache?!((s=this.authorityOptions.azureRegionConfiguration)===null||s===void 0)&&s.azureRegion?((c=this.performanceClient)===null||c===void 0||c.setPreQueueTime(R.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId),[4,this.updateMetadataWithRegionalInformation(h)]):[3,6]:[3,7];case 5:h=u.sent(),u.label=6;case 6:return e.updateEndpointMetadata(h,!1),[2,ut.HARDCODED_VALUES];case 7:throw K.createUnableToGetOpenidConfigError(this.defaultOpenIdConfigurationEndpoint)}})})},n.prototype.isAuthoritySameType=function(e){var t=new de(e.canonical_authority),o=t.getUrlComponents().PathSegments;return o.length===this.canonicalAuthorityUrlComponents.PathSegments.length},n.prototype.getEndpointMetadataFromConfig=function(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw we.createInvalidAuthorityMetadataError()}return null},n.prototype.getEndpointMetadataFromNetwork=function(){var e;return ne(this,void 0,void 0,function(){var t,o;return oe(this,function(r){switch(r.label){case 0:(e=this.performanceClient)===null||e===void 0||e.addQueueMeasurement(R.AuthorityGetEndpointMetadataFromNetwork,this.correlationId),t={},r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint,t)];case 2:return o=r.sent(),[2,da(o.body)?o.body:null];case 3:return r.sent(),[2,null];case 4:return[2]}})})},n.prototype.getEndpointMetadataFromHardcodedValues=function(){return this.canonicalAuthority in Br?Br[this.canonicalAuthority]:null},n.prototype.updateMetadataWithRegionalInformation=function(e){var t,o,r,i;return ne(this,void 0,void 0,function(){var s,c;return oe(this,function(l){switch(l.label){case 0:return(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId),s=(o=this.authorityOptions.azureRegionConfiguration)===null||o===void 0?void 0:o.azureRegion,s?s!==b.AZURE_REGION_AUTO_DISCOVER_FLAG?(this.regionDiscoveryMetadata.region_outcome=Ln.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=s,[2,n.replaceWithRegionalInformation(e,s)]):((r=this.performanceClient)===null||r===void 0||r.setPreQueueTime(R.RegionDiscoveryDetectRegion,this.correlationId),[4,this.regionDiscovery.detectRegion((i=this.authorityOptions.azureRegionConfiguration)===null||i===void 0?void 0:i.environmentRegion,this.regionDiscoveryMetadata)]):[3,2];case 1:if(c=l.sent(),c)return this.regionDiscoveryMetadata.region_outcome=Ln.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=c,[2,n.replaceWithRegionalInformation(e,c)];this.regionDiscoveryMetadata.region_outcome=Ln.AUTO_DETECTION_REQUESTED_FAILED,l.label=2;case 2:return[2,e]}})})},n.prototype.updateCloudDiscoveryMetadata=function(e){var t,o;return ne(this,void 0,void 0,function(){var r,i,s;return oe(this,function(c){switch(c.label){case 0:return(t=this.performanceClient)===null||t===void 0||t.addQueueMeasurement(R.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId),this.logger.verbose("Attempting to get cloud discovery metadata in the config"),this.logger.verbosePii("Known Authorities: "+(this.authorityOptions.knownAuthorities||b.NOT_APPLICABLE)),this.logger.verbosePii("Authority Metadata: "+(this.authorityOptions.authorityMetadata||b.NOT_APPLICABLE)),this.logger.verbosePii("Canonical Authority: "+(e.canonical_authority||b.NOT_APPLICABLE)),r=this.getCloudDiscoveryMetadataFromConfig(),r?(this.logger.verbose("Found cloud discovery metadata in the config."),e.updateCloudDiscoveryMetadata(r,!1),[2,ut.CONFIG]):(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the cache."),i=e.isExpired(),this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!i?(this.logger.verbose("Found metadata in the cache."),[2,ut.CACHE]):(i&&this.logger.verbose("The metadata entity is expired."),this.logger.verbose("Did not find cloud discovery metadata in the cache... Attempting to get cloud discovery metadata from the network."),(o=this.performanceClient)===null||o===void 0||o.setPreQueueTime(R.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId),[4,this.getCloudDiscoveryMetadataFromNetwork()]));case 1:if(r=c.sent(),r)return this.logger.verbose("cloud discovery metadata was successfully returned from getCloudDiscoveryMetadataFromNetwork()"),e.updateCloudDiscoveryMetadata(r,!0),[2,ut.NETWORK];if(this.logger.verbose("Did not find cloud discovery metadata from the network... Attempting to get cloud discovery metadata from hardcoded values."),s=this.getCloudDiscoveryMetadataFromHarcodedValues(),s&&!this.options.skipAuthorityMetadataCache)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),e.updateCloudDiscoveryMetadata(s,!1),[2,ut.HARDCODED_VALUES];throw this.logger.error("Did not find cloud discovery metadata from hardcoded values... Metadata could not be obtained from config, cache, network or hardcoded values. Throwing Untrusted Authority Error."),we.createUntrustedAuthorityError()}})})},n.prototype.getCloudDiscoveryMetadataFromConfig=function(){if(this.authorityType===$e.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),n.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");var e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),t=n.getCloudDiscoveryMetadataFromNetworkResponse(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),t)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),t;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),we.createInvalidCloudDiscoveryMetadataError()}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),n.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null},n.prototype.getCloudDiscoveryMetadataFromNetwork=function(){var e;return ne(this,void 0,void 0,function(){var t,o,r,i,s,c,l,h;return oe(this,function(u){switch(u.label){case 0:(e=this.performanceClient)===null||e===void 0||e.addQueueMeasurement(R.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId),t=""+b.AAD_INSTANCE_DISCOVERY_ENDPT+this.canonicalAuthority+"oauth2/v2.0/authorize",o={},r=null,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(t,o)];case 2:if(i=u.sent(),s=void 0,c=void 0,ua(i.body))s=i.body,c=s.metadata,this.logger.verbosePii("tenant_discovery_endpoint is: "+s.tenant_discovery_endpoint);else if(pa(i.body)){if(this.logger.warning("A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: "+i.status),s=i.body,s.error===b.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),[2,null];this.logger.warning("The CloudInstanceDiscoveryErrorResponse error is "+s.error),this.logger.warning("The CloudInstanceDiscoveryErrorResponse error description is "+s.error_description),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),c=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),[2,null];return this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),r=n.getCloudDiscoveryMetadataFromNetworkResponse(c,this.hostnameAndPort),[3,4];case 3:return l=u.sent(),l instanceof Y?this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
|
|
160
160
|
Error: `+l.errorCode+`
|
|
161
161
|
Error Description: `+l.errorMessage):(h=l,this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
|
|
162
162
|
Error: `+h.name+`
|
|
163
|
-
Error Description: `+h.message)),[2,null];case 4:return r||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),r=n.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,r]}})})},n.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in Ur?Ur[this.canonicalAuthority]:null},n.prototype.isInKnownAuthorities=function(){var e=this,t=this.authorityOptions.knownAuthorities.filter(function(o){return de.getDomainFromUrl(o).toLowerCase()===e.hostnameAndPort});return t.length>0},n.generateAuthority=function(e,t){var o;if(t&&t.azureCloudInstance!==On.None){var r=t.tenant?t.tenant:b.DEFAULT_COMMON_TENANT;o=t.azureCloudInstance+"/"+r+"/"}return o||e},n.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},n.getCloudDiscoveryMetadataFromNetworkResponse=function(e,t){for(var o=0;o<e.length;o++){var r=e[o];if(r.aliases.indexOf(t)>-1)return r}return null},n.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},n.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},n.isPublicCloudAuthority=function(e){return b.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},n.buildRegionalAuthorityString=function(e,t,o){var r=new de(e);r.validateAsUri();var i=r.getUrlComponents(),s=t+"."+i.HostNameAndPort;this.isPublicCloudAuthority(i.HostNameAndPort)&&(s=t+"."+b.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var c=de.constructAuthorityUriFromObject(he(he({},r.getUrlComponents()),{HostNameAndPort:s})).urlString;return o?c+"?"+o:c},n.replaceWithRegionalInformation=function(e,t){return e.authorization_endpoint=n.buildRegionalAuthorityString(e.authorization_endpoint,t),e.token_endpoint=n.buildRegionalAuthorityString(e.token_endpoint,t,b.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=n.buildRegionalAuthorityString(e.end_session_endpoint,t)),e},n.transformCIAMAuthority=function(e){var t=e.endsWith(b.FORWARD_SLASH)?e:""+e+b.FORWARD_SLASH,o=new de(e),r=o.getUrlComponents();if(r.PathSegments.length===0&&r.HostNameAndPort.endsWith(b.CIAM_AUTH_URL)){var i=r.HostNameAndPort.split(".")[0];t=""+t+i+b.AAD_TENANT_DOMAIN_SUFFIX}return t},n.reservedTenantDomains=new Set(["{tenant}","{tenantid}",on.COMMON,on.CONSUMERS,on.ORGANIZATIONS]),n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var oo=function(){function n(){}return n.createDiscoveredInstance=function(e,t,o,r,i,s,c){return ne(this,void 0,void 0,function(){var l,h,u;return oe(this,function(g){switch(g.label){case 0:s==null||s.addQueueMeasurement(R.AuthorityFactoryCreateDiscoveredInstance,c),l=Un.transformCIAMAuthority(e),h=n.createInstance(l,t,o,r,i,s,c),g.label=1;case 1:return g.trys.push([1,3,,4]),s==null||s.setPreQueueTime(R.AuthorityResolveEndpointsAsync,c),[4,h.resolveEndpointsAsync()];case 2:return g.sent(),[2,h];case 3:throw u=g.sent(),K.createEndpointDiscoveryIncompleteError(u);case 4:return[2]}})})},n.createInstance=function(e,t,o,r,i,s,c){if(H.isEmpty(e))throw we.createUrlEmptyError();return new Un(e,t,o,r,i,s,c)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ro=function(){function n(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return n.isServerTelemetryEntity=function(e,t){var o=e.indexOf(Be.CACHE_KEY)===0,r=!0;return t&&(r=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),o&&r},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Dr=function(){function n(){}return n.isThrottlingEntity=function(e,t){var o=!1;e&&(o=e.indexOf(Mn.THROTTLING_PREFIX)===0);var r=!0;return t&&(r=t.hasOwnProperty("throttleTime")),o&&r},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ma={sendGetRequestAsync:function(){var n="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(n))},sendPostRequestAsync:function(){var n="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(n))}};/*! @azure/msal-common v13.3.1 2023-10-27 */var io={missingKidError:{code:"missing_kid_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided."},missingAlgError:{code:"missing_alg_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."}},jr=function(n){Ye(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="JoseHeaderError",Object.setPrototypeOf(r,e.prototype),r}return e.createMissingKidError=function(){return new e(io.missingKidError.code,io.missingKidError.desc)},e.createMissingAlgError=function(){return new e(io.missingAlgError.code,io.missingAlgError.desc)},e}(Y);/*! @azure/msal-common v13.3.1 2023-10-27 */var fa=function(){function n(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return n.getShrHeaderString=function(e){if(!e.kid)throw jr.createMissingKidError();if(!e.alg)throw jr.createMissingAlgError();var t=new n({typ:e.typ||Io.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ga=function(){function n(e,t){this.cacheOutcome=Qt.NO_CACHE_HIT,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||b.EMPTY_STRING,this.wrapperVer=e.wrapperVer||b.EMPTY_STRING,this.telemetryCacheKey=Be.CACHE_KEY+Pe.CACHE_KEY_SEPARATOR+e.clientId}return n.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+Be.VALUE_SEPARATOR+this.cacheOutcome,t=[this.wrapperSKU,this.wrapperVer].join(Be.VALUE_SEPARATOR),o=this.getRegionDiscoveryFields(),r=[e,o].join(Be.VALUE_SEPARATOR);return[Be.SCHEMA_VERSION,r,t].join(Be.CATEGORY_SEPARATOR)},n.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),t=n.maxErrorsToSend(e),o=e.failedRequests.slice(0,2*t).join(Be.VALUE_SEPARATOR),r=e.errors.slice(0,t).join(Be.VALUE_SEPARATOR),i=e.errors.length,s=t<i?Be.OVERFLOW_TRUE:Be.OVERFLOW_FALSE,c=[i,s].join(Be.VALUE_SEPARATOR);return[Be.SCHEMA_VERSION,e.cacheHits,o,r,c].join(Be.CATEGORY_SEPARATOR)},n.prototype.cacheFailedRequest=function(e){var t=this.getLastRequests();t.errors.length>=Be.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),H.isEmpty(e.subError)?H.isEmpty(e.errorCode)?e&&e.toString()?t.errors.push(e.toString()):t.errors.push(Be.UNKNOWN_ERROR):t.errors.push(e.errorCode):t.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)},n.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},n.prototype.getLastRequests=function(){var e=new ro,t=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return t||e},n.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),t=n.maxErrorsToSend(e),o=e.errors.length;if(t===o)this.cacheManager.removeItem(this.telemetryCacheKey);else{var r=new ro;r.failedRequests=e.failedRequests.slice(t*2),r.errors=e.errors.slice(t),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)}},n.maxErrorsToSend=function(e){var t,o=0,r=0,i=e.errors.length;for(t=0;t<i;t++){var s=e.failedRequests[2*t]||b.EMPTY_STRING,c=e.failedRequests[2*t+1]||b.EMPTY_STRING,l=e.errors[t]||b.EMPTY_STRING;if(r+=s.toString().length+c.toString().length+l.length+3,r<Be.MAX_LAST_HEADER_BYTES)o+=1;else break}return o},n.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||b.EMPTY_STRING),e.push(this.regionSource||b.EMPTY_STRING),e.push(this.regionOutcome||b.EMPTY_STRING),e.join(",")},n.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},n.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var qr=function(){function n(e,t,o,r,i,s){this.authority=t,this.libraryName=r,this.libraryVersion=i,this.applicationTelemetry=s,this.clientId=e,this.logger=o,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.queueMeasurements=new Map,this.preQueueTimeByCorrelationId=new Map}return n.prototype.startPerformanceMeasurement=function(e,t){return{}},n.prototype.startPerformanceMeasuremeant=function(e,t){return{}},n.prototype.getIntFields=function(){return sa},n.prototype.getPreQueueTime=function(e,t){var o=this.preQueueTimeByCorrelationId.get(t);if(o){if(o.name!==e){this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue time found for "+e+", unable to add queue measurement");return}}else{this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: "+t+", unable to add queue measurement");return}return o.time},n.prototype.calculateQueuedTime=function(e,t){return e<1?(this.logger.trace("PerformanceClient: preQueueTime should be a positive integer and not "+e),0):t<1?(this.logger.trace("PerformanceClient: currentTime should be a positive integer and not "+t),0):t<e?(this.logger.trace("PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved"),0):t-e},n.prototype.addQueueMeasurement=function(e,t,o,r){if(!t){this.logger.trace("PerformanceClient.addQueueMeasurement: correlationId not provided for "+e+", cannot add queue measurement");return}if(o===0)this.logger.trace("PerformanceClient.addQueueMeasurement: queue time provided for "+e+" is "+o);else if(!o){this.logger.trace("PerformanceClient.addQueueMeasurement: no queue time provided for "+e);return}var i={eventName:e,queueTime:o,manuallyCompleted:r},s=this.queueMeasurements.get(t);if(s)s.push(i),this.queueMeasurements.set(t,s);else{this.logger.trace("PerformanceClient.addQueueMeasurement: adding correlationId "+t+" to queue measurements");var c=[i];this.queueMeasurements.set(t,c)}this.preQueueTimeByCorrelationId.delete(t)},n.prototype.startMeasurement=function(e,t){var o=this,r,i,s=t||this.generateId();t||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",s),this.logger.trace("PerformanceClient: Performance measurement started for "+e,s);var c=this.startPerformanceMeasuremeant(e,s);c.startMeasurement();var l={eventId:this.generateId(),status:to.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:s,appName:(r=this.applicationTelemetry)===null||r===void 0?void 0:r.appName,appVersion:(i=this.applicationTelemetry)===null||i===void 0?void 0:i.appVersion};return this.cacheEventByCorrelationId(l),{endMeasurement:function(h){return o.endMeasurement(he(he({},l),h),c)},discardMeasurement:function(){return o.discardMeasurements(l.correlationId)},addStaticFields:function(h){return o.addStaticFields(h,l.correlationId)},increment:function(h){return o.increment(h,l.correlationId)},measurement:c,event:l}},n.prototype.endMeasurement=function(e,t){var o=this,r,i,s=this.eventsByCorrelationId.get(e.correlationId);if(!s)return this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId),null;var c=e.eventId===s.eventId,l={totalQueueTime:0,totalQueueCount:0,manuallyCompletedCount:0};c?(l=this.getQueueInfo(e.correlationId),this.discardCache(s.correlationId)):(r=s.incompleteSubMeasurements)===null||r===void 0||r.delete(e.eventId),t==null||t.endMeasurement();var h=t==null?void 0:t.flushMeasurement();if(!h)return this.logger.trace("PerformanceClient: Performance measurement not taken",s.correlationId),null;if(this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+h+" ms",e.correlationId),!c)return s[e.name+"DurationMs"]=Math.floor(h),he({},s);var u=he(he({},s),e),g=0;return(i=u.incompleteSubMeasurements)===null||i===void 0||i.forEach(function(f){o.logger.trace("PerformanceClient: Incomplete submeasurement "+f.name+" found for "+e.name,u.correlationId),g++}),u.incompleteSubMeasurements=void 0,u=he(he({},u),{durationMs:Math.round(h),queuedTimeMs:l.totalQueueTime,queuedCount:l.totalQueueCount,queuedManuallyCompletedCount:l.manuallyCompletedCount,status:to.Completed,incompleteSubsCount:g}),this.truncateIntegralFields(u,this.getIntFields()),this.emitEvents([u],e.correlationId),u},n.prototype.addStaticFields=function(e,t){this.logger.trace("PerformanceClient: Updating static fields");var o=this.eventsByCorrelationId.get(t);o?this.eventsByCorrelationId.set(t,he(he({},o),e)):this.logger.trace("PerformanceClient: Event not found for",t)},n.prototype.increment=function(e,t){this.logger.trace("PerformanceClient: Updating counters");var o=this.eventsByCorrelationId.get(t);if(o)for(var r in e)o.hasOwnProperty(r)||(o[r]=0),o[r]+=e[r];else this.logger.trace("PerformanceClient: Event not found for",t)},n.prototype.cacheEventByCorrelationId=function(e){var t=this.eventsByCorrelationId.get(e.correlationId);t?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),t.incompleteSubMeasurements=t.incompleteSubMeasurements||new Map,t.incompleteSubMeasurements.set(e.eventId,{name:e.name,startTimeMs:e.startTimeMs})):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,he({},e)))},n.prototype.getQueueInfo=function(e){var t=this.queueMeasurements.get(e);t||this.logger.trace("PerformanceClient: no queue measurements found for for correlationId: "+e);var o=0,r=0,i=0;return t==null||t.forEach(function(s){o+=s.queueTime,r++,i+=s.manuallyCompleted?1:0}),{totalQueueTime:o,totalQueueCount:r,manuallyCompletedCount:i}},n.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},n.prototype.discardCache=function(e){this.discardMeasurements(e),this.logger.trace("PerformanceClient: QueueMeasurements discarded",e),this.queueMeasurements.delete(e),this.logger.trace("PerformanceClient: Pre-queue times discarded",e),this.preQueueTimeByCorrelationId.delete(e)},n.prototype.addPerformanceCallback=function(e){var t=this.generateId();return this.callbacks.set(t,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+t),t},n.prototype.removePerformanceCallback=function(e){var t=this.callbacks.delete(e);return t?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),t},n.prototype.emitEvents=function(e,t){var o=this;this.logger.verbose("PerformanceClient: Emitting performance events",t),this.callbacks.forEach(function(r,i){o.logger.trace("PerformanceClient: Emitting event to callback "+i,t),r.apply(null,[e])})},n.prototype.truncateIntegralFields=function(e,t){t.forEach(function(o){o in e&&typeof e[o]=="number"&&(e[o]=Math.floor(e[o]))})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Fr=function(){function n(){}return n.prototype.startMeasurement=function(){},n.prototype.endMeasurement=function(){},n.prototype.flushMeasurement=function(){return null},n}(),_a=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new Fr},e.prototype.startPerformanceMeasurement=function(){return new Fr},e.prototype.calculateQueuedTime=function(t,o){return 0},e.prototype.addQueueMeasurement=function(t,o,r){},e.prototype.setPreQueueTime=function(t,o){},e}(qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var U={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors."},popupWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},spaCodeAndNativeAccountPresent:{code:"spa_code_and_nativeAccountId_present",desc:"Request cannot contain both spa code and native account id."},databaseUnavailable:{code:"database_unavailable",desc:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},F=function(n){xe(e,n);function e(t,o){var r=n.call(this,t,o)||this;return Object.setPrototypeOf(r,e.prototype),r.name="BrowserAuthError",r}return e.createPkceNotGeneratedError=function(t){return new e(U.pkceNotGenerated.code,U.pkceNotGenerated.desc+" Detail:"+t)},e.createCryptoNotAvailableError=function(t){return new e(U.cryptoDoesNotExist.code,U.cryptoDoesNotExist.desc+" Detail:"+t)},e.createHttpMethodNotImplementedError=function(t){return new e(U.httpMethodNotImplementedError.code,U.httpMethodNotImplementedError.desc+" Given Method: "+t)},e.createEmptyNavigationUriError=function(){return new e(U.emptyNavigateUriError.code,U.emptyNavigateUriError.desc)},e.createEmptyHashError=function(t){return new e(U.hashEmptyError.code,U.hashEmptyError.desc+" Given Url: "+t)},e.createHashDoesNotContainStateError=function(){return new e(U.hashDoesNotContainStateError.code,U.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(U.hashDoesNotContainKnownPropertiesError.code,U.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(U.unableToParseStateError.code,U.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(U.stateInteractionTypeMismatchError.code,U.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(U.interactionInProgress.code,U.interactionInProgress.desc)},e.createPopupWindowError=function(t){var o=U.popupWindowError.desc;return o=H.isEmpty(t)?o:o+" Details: "+t,new e(U.popupWindowError.code,o)},e.createEmptyWindowCreatedError=function(){return new e(U.emptyWindowError.code,U.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(U.userCancelledError.code,U.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(U.monitorPopupTimeoutError.code,U.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(U.monitorIframeTimeoutError.code,U.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(t){return new e(U.redirectInIframeError.code,U.redirectInIframeError.desc+" (window.parent !== window) => "+t)},e.createBlockReloadInHiddenIframeError=function(){return new e(U.blockTokenRequestsInHiddenIframeError.code,U.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(U.blockAcquireTokenInPopupsError.code,U.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(U.iframeClosedPrematurelyError.code,U.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(U.silentLogoutUnsupportedError.code,U.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(U.noAccountError.code,U.noAccountError.desc)},e.createSilentPromptValueError=function(t){return new e(U.silentPromptValueError.code,U.silentPromptValueError.desc+" Given value: "+t)},e.createUnableToParseTokenRequestCacheError=function(){return new e(U.unableToParseTokenRequestCacheError.code,U.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(U.noTokenRequestCacheError.code,U.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(U.authRequestNotSet.code,U.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(U.noCachedAuthorityError.code,U.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(U.invalidCacheType.code,""+U.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(U.notInBrowserEnvironment.code,U.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(U.databaseNotOpen.code,U.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(U.noNetworkConnectivity.code,U.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(t,o){return new e(U.postRequestFailed.code,U.postRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+o.split("?")[0])},e.createGetRequestFailedError=function(t,o){return new e(U.getRequestFailed.code,U.getRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+o.split("?")[0])},e.createFailedToParseNetworkResponseError=function(t){return new e(U.failedToParseNetworkResponse.code,U.failedToParseNetworkResponse.desc+" | Attempted to reach: "+t.split("?")[0])},e.createUnableToLoadTokenError=function(t){return new e(U.unableToLoadTokenError.code,U.unableToLoadTokenError.desc+" | "+t)},e.createSigningKeyNotFoundInStorageError=function(t){return new e(U.signingKeyNotFoundInStorage.code,U.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+t)},e.createAuthCodeRequiredError=function(){return new e(U.authCodeRequired.code,U.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(U.authCodeOrNativeAccountRequired.code,U.authCodeOrNativeAccountRequired.desc)},e.createSpaCodeAndNativeAccountIdPresentError=function(){return new e(U.spaCodeAndNativeAccountPresent.code,U.spaCodeAndNativeAccountPresent.desc)},e.createDatabaseUnavailableError=function(){return new e(U.databaseUnavailable.code,U.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(U.unableToAcquireTokenFromNativePlatform.code,U.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(U.nativeHandshakeTimeout.code,U.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(U.nativeExtensionNotInstalled.code,U.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(U.nativeConnectionNotEstablished.code,U.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(U.nativeBrokerCalledBeforeInitialize.code,U.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(U.nativePromptNotSupported.code,U.nativePromptNotSupported.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var _t={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},Dn={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},Vt;(function(n){n.HandshakeRequest="Handshake",n.HandshakeResponse="HandshakeResponse",n.GetToken="GetToken",n.Response="Response"})(Vt||(Vt={}));var Ae;(function(n){n.LocalStorage="localStorage",n.SessionStorage="sessionStorage",n.MemoryStorage="memoryStorage"})(Ae||(Ae={}));var At;(function(n){n.GET="GET",n.POST="POST"})(At||(At={}));var ue;(function(n){n.AUTHORITY="authority",n.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",n.SESSION_STATE="session.state",n.REQUEST_STATE="request.state",n.NONCE_IDTOKEN="nonce.id_token",n.ORIGIN_URI="request.origin",n.RENEW_STATUS="token.renew.status",n.URL_HASH="urlHash",n.REQUEST_PARAMS="request.params",n.SCOPES="scopes",n.INTERACTION_STATUS_KEY="interaction.status",n.CCS_CREDENTIAL="ccs.credential",n.CORRELATION_ID="request.correlationId",n.NATIVE_REQUEST="request.native",n.REDIRECT_CONTEXT="request.redirect.context"})(ue||(ue={}));var Rt;(function(n){n.ACCOUNT_KEYS="msal.account.keys",n.TOKEN_KEYS="msal.token.keys"})(Rt||(Rt={}));var kn;(function(n){n.WRAPPER_SKU="wrapper.sku",n.WRAPPER_VER="wrapper.version"})(kn||(kn={}));var ke;(function(n){n[n.acquireTokenRedirect=861]="acquireTokenRedirect",n[n.acquireTokenPopup=862]="acquireTokenPopup",n[n.ssoSilent=863]="ssoSilent",n[n.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",n[n.handleRedirectPromise=865]="handleRedirectPromise",n[n.acquireTokenByCode=866]="acquireTokenByCode",n[n.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",n[n.logout=961]="logout",n[n.logoutPopup=962]="logoutPopup"})(ke||(ke={}));var $;(function(n){n.Redirect="redirect",n.Popup="popup",n.Silent="silent",n.None="none"})($||($={}));var Vr;(function(n){n.Startup="startup",n.Login="login",n.Logout="logout",n.AcquireToken="acquireToken",n.SsoSilent="ssoSilent",n.HandleRedirect="handleRedirect",n.None="none"})(Vr||(Vr={}));var Hr={scopes:An},Cn="jwk",Kr;(function(n){n.React="@azure/msal-react",n.Angular="@azure/msal-angular"})(Kr||(Kr={}));var zo="msal.db",va=1,ya=zo+".keys",Xe;(function(n){n[n.Default=0]="Default",n[n.AccessToken=1]="AccessToken",n[n.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",n[n.RefreshToken=3]="RefreshToken",n[n.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",n[n.Skip=5]="Skip"})(Xe||(Xe={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ze={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},storageNotSupportedError:{code:"storage_not_supported",desc:"Given storage configuration option was not supported."},noRedirectCallbacksSet:{code:"no_redirect_callbacks",desc:"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},stubPcaInstanceCalled:{code:"stubbed_public_client_application_called",desc:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors"},inMemRedirectUnavailable:{code:"in_mem_redirect_unavailable",desc:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."},entropyNotProvided:{code:"entropy_not_provided",desc:"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option."}},ao=function(n){xe(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="BrowserConfigurationAuthError",Object.setPrototypeOf(r,e.prototype),r}return e.createRedirectUriEmptyError=function(){return new e(Ze.redirectUriNotSet.code,Ze.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(Ze.postLogoutUriNotSet.code,Ze.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(t){return new e(Ze.storageNotSupportedError.code,Ze.storageNotSupportedError.desc+" Given Location: "+t)},e.createRedirectCallbacksNotSetError=function(){return new e(Ze.noRedirectCallbacksSet.code,Ze.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(Ze.stubPcaInstanceCalled.code,Ze.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(Ze.inMemRedirectUnavailable.code,Ze.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(Ze.entropyNotProvided.code,Ze.entropyNotProvided.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Gr=function(){function n(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return n.prototype.validateWindowStorage=function(e){if(e!==Ae.LocalStorage&&e!==Ae.SessionStorage)throw ao.createStorageNotSupportedError(e);var t=!!window[e];if(!t)throw ao.createStorageNotSupportedError(e)},n.prototype.getItem=function(e){return this.windowStorage.getItem(e)},n.prototype.setItem=function(e,t){this.windowStorage.setItem(e,t)},n.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},n.prototype.getKeys=function(){return Object.keys(this.windowStorage)},n.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var xo=function(){function n(){this.cache=new Map}return n.prototype.getItem=function(e){return this.cache.get(e)||null},n.prototype.setItem=function(e,t){this.cache.set(e,t)},n.prototype.removeItem=function(e){this.cache.delete(e)},n.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(t,o){e.push(o)}),e},n.prototype.containsKey=function(e){return this.cache.has(e)},n.prototype.clear=function(){this.cache.clear()},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var $r=function(){function n(){}return n.extractBrowserRequestState=function(e,t){if(H.isEmpty(t))return null;try{var o=Ft.parseRequestState(e,t);return o.libraryState.meta}catch(r){throw K.createInvalidStateError(t,r)}},n.parseServerResponseFromHash=function(e){if(!e)return{};var t=new de(e);return de.getDeserializedHash(t.getHash())},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Bo=function(n){xe(e,n);function e(t,o,r,i){var s=n.call(this,t,r,i)||this;return s.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,s.cacheConfig=o,s.logger=i,s.internalStorage=new xo,s.browserStorage=s.setupBrowserStorage(s.cacheConfig.cacheLocation),s.temporaryCacheStorage=s.setupTemporaryCacheStorage(s.cacheConfig.temporaryCacheLocation,s.cacheConfig.cacheLocation),o.cacheMigrationEnabled&&(s.migrateCacheEntries(),s.createKeyMaps()),s}return e.prototype.setupBrowserStorage=function(t){switch(t){case Ae.LocalStorage:case Ae.SessionStorage:try{return new Gr(t)}catch(o){this.logger.verbose(o);break}}return this.cacheConfig.cacheLocation=Ae.MemoryStorage,new xo},e.prototype.setupTemporaryCacheStorage=function(t,o){switch(o){case Ae.LocalStorage:case Ae.SessionStorage:try{return new Gr(t||Ae.SessionStorage)}catch(r){return this.logger.verbose(r),this.internalStorage}case Ae.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var t=this,o=b.CACHE_PREFIX+"."+Ne.ID_TOKEN,r=b.CACHE_PREFIX+"."+Ne.CLIENT_INFO,i=b.CACHE_PREFIX+"."+Ne.ERROR,s=b.CACHE_PREFIX+"."+Ne.ERROR_DESC,c=this.browserStorage.getItem(o),l=this.browserStorage.getItem(r),h=this.browserStorage.getItem(i),u=this.browserStorage.getItem(s),g=[c,l,h,u],f=[Ne.ID_TOKEN,Ne.CLIENT_INFO,Ne.ERROR,Ne.ERROR_DESC];f.forEach(function(w,C){return t.migrateCacheEntry(w,g[C])})},e.prototype.migrateCacheEntry=function(t,o){o&&this.setTemporaryCache(t,o,!0)},e.prototype.createKeyMaps=function(){var t=this;this.logger.trace("BrowserCacheManager - createKeyMaps called.");var o=this.getItem(Rt.ACCOUNT_KEYS),r=this.getItem(Rt.TOKEN_KEYS+"."+this.clientId);if(o&&r){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}var i=this.browserStorage.getKeys();i.forEach(function(s){if(t.isCredentialKey(s)){var c=t.getItem(s);if(c){var l=t.validateAndParseJson(c);if(l&&l.hasOwnProperty("credentialType"))switch(l.credentialType){case Z.ID_TOKEN:if(sn.isIdTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - idToken with key: "+s+" found, saving key to token key map");var h=Je.toObject(new sn,l),u=t.updateCredentialCacheKey(s,h);t.addTokenKey(u,Z.ID_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed idToken validation on key: "+s);break;case Z.ACCESS_TOKEN:case Z.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(cn.isAccessTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - accessToken with key: "+s+" found, saving key to token key map");var g=Je.toObject(new cn,l),u=t.updateCredentialCacheKey(s,g);t.addTokenKey(u,Z.ACCESS_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed accessToken validation on key: "+s);break;case Z.REFRESH_TOKEN:if(yn.isRefreshTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - refreshToken with key: "+s+" found, saving key to token key map");var f=Je.toObject(new yn,l),u=t.updateCredentialCacheKey(s,f);t.addTokenKey(u,Z.REFRESH_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: "+s);break}}}if(t.isAccountKey(s)){var c=t.getItem(s);if(c){var w=t.validateAndParseJson(c);w&&Ue.isAccountEntity(w)&&(t.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - account with key: "+s+" found, saving key to account key map"),t.addAccountKeyToMap(s))}}})},e.prototype.validateAndParseJson=function(t){try{var o=JSON.parse(t);return o&&typeof o=="object"?o:null}catch{return null}},e.prototype.getItem=function(t){return this.browserStorage.getItem(t)},e.prototype.setItem=function(t,o){this.browserStorage.setItem(t,o)},e.prototype.getAccount=function(t){this.logger.trace("BrowserCacheManager.getAccount called");var o=this.getItem(t);if(!o)return this.removeAccountKeyFromMap(t),null;var r=this.validateAndParseJson(o);return!r||!Ue.isAccountEntity(r)?(this.removeAccountKeyFromMap(t),null):Je.toObject(new Ue,r)},e.prototype.setAccount=function(t){this.logger.trace("BrowserCacheManager.setAccount called");var o=t.generateAccountKey();this.setItem(o,JSON.stringify(t)),this.addAccountKeyToMap(o)},e.prototype.getAccountKeys=function(){this.logger.trace("BrowserCacheManager.getAccountKeys called");var t=this.getItem(Rt.ACCOUNT_KEYS);return t?JSON.parse(t):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])},e.prototype.addAccountKeyToMap=function(t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii("BrowserCacheManager.addAccountKeyToMap called with key: "+t);var o=this.getAccountKeys();o.indexOf(t)===-1?(o.push(t),this.setItem(Rt.ACCOUNT_KEYS,JSON.stringify(o)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")},e.prototype.removeAccountKeyFromMap=function(t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii("BrowserCacheManager.removeAccountKeyFromMap called with key: "+t);var o=this.getAccountKeys(),r=o.indexOf(t);r>-1?(o.splice(r,1),this.setItem(Rt.ACCOUNT_KEYS,JSON.stringify(o)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")},e.prototype.removeAccount=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){return n.prototype.removeAccount.call(this,t),this.removeAccountKeyFromMap(t),[2]})})},e.prototype.removeIdToken=function(t){n.prototype.removeIdToken.call(this,t),this.removeTokenKey(t,Z.ID_TOKEN)},e.prototype.removeAccessToken=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){return n.prototype.removeAccessToken.call(this,t),this.removeTokenKey(t,Z.ACCESS_TOKEN),[2]})})},e.prototype.removeRefreshToken=function(t){n.prototype.removeRefreshToken.call(this,t),this.removeTokenKey(t,Z.REFRESH_TOKEN)},e.prototype.getTokenKeys=function(){this.logger.trace("BrowserCacheManager.getTokenKeys called");var t=this.getItem(Rt.TOKEN_KEYS+"."+this.clientId);if(t){var o=this.validateAndParseJson(t);if(o&&o.hasOwnProperty("idToken")&&o.hasOwnProperty("accessToken")&&o.hasOwnProperty("refreshToken"))return o;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}},e.prototype.addTokenKey=function(t,o){this.logger.trace("BrowserCacheManager addTokenKey called");var r=this.getTokenKeys();switch(o){case Z.ID_TOKEN:r.idToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(t));break;case Z.ACCESS_TOKEN:r.accessToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),r.accessToken.push(t));break;case Z.REFRESH_TOKEN:r.refreshToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(t));break;default:this.logger.error("BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: "+o),K.createUnexpectedCredentialTypeError()}this.setItem(Rt.TOKEN_KEYS+"."+this.clientId,JSON.stringify(r))},e.prototype.removeTokenKey=function(t,o){this.logger.trace("BrowserCacheManager removeTokenKey called");var r=this.getTokenKeys();switch(o){case Z.ID_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: "+t+" from map");var i=r.idToken.indexOf(t);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),r.idToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case Z.ACCESS_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: "+t+" from map");var s=r.accessToken.indexOf(t);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),r.accessToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case Z.REFRESH_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: "+t+" from map");var c=r.refreshToken.indexOf(t);c>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),r.refreshToken.splice(c,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:this.logger.error("BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: "+o),K.createUnexpectedCredentialTypeError()}this.setItem(Rt.TOKEN_KEYS+"."+this.clientId,JSON.stringify(r))},e.prototype.getIdTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ID_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!sn.isIdTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),Je.toObject(new sn,r))},e.prototype.setIdTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.ID_TOKEN)},e.prototype.getAccessTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ACCESS_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!cn.isAccessTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),Je.toObject(new cn,r))},e.prototype.setAccessTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.ACCESS_TOKEN)},e.prototype.getRefreshTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.REFRESH_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!yn.isRefreshTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),Je.toObject(new yn,r))},e.prototype.setRefreshTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.REFRESH_TOKEN)},e.prototype.getAppMetadata=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!Lo.isAppMetadataEntity(t,r)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Je.toObject(new Lo,r))},e.prototype.setAppMetadata=function(t){this.logger.trace("BrowserCacheManager.setAppMetadata called");var o=t.generateAppMetadataKey();this.setItem(o,JSON.stringify(t))},e.prototype.getServerTelemetry=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!ro.isServerTelemetryEntity(t,r)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),Je.toObject(new ro,r))},e.prototype.setServerTelemetry=function(t,o){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(t,JSON.stringify(o))},e.prototype.getAuthorityMetadata=function(t){var o=this.internalStorage.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var r=this.validateAndParseJson(o);return r&&Oo.isAuthorityMetadataEntity(t,r)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Je.toObject(new Oo,r)):null},e.prototype.getAuthorityMetadataKeys=function(){var t=this,o=this.internalStorage.getKeys();return o.filter(function(r){return t.isAuthorityMetadata(r)})},e.prototype.setWrapperMetadata=function(t,o){this.internalStorage.setItem(kn.WRAPPER_SKU,t),this.internalStorage.setItem(kn.WRAPPER_VER,o)},e.prototype.getWrapperMetadata=function(){var t=this.internalStorage.getItem(kn.WRAPPER_SKU)||b.EMPTY_STRING,o=this.internalStorage.getItem(kn.WRAPPER_VER)||b.EMPTY_STRING;return[t,o]},e.prototype.setAuthorityMetadata=function(t,o){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(t,JSON.stringify(o))},e.prototype.getActiveAccount=function(){var t=this.generateCacheKey(Ne.ACTIVE_ACCOUNT_FILTERS),o=this.getItem(t);if(!o){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");var r=this.generateCacheKey(Ne.ACTIVE_ACCOUNT),i=this.getItem(r);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;var s=this.getAccountInfoByFilter({localAccountId:i})[0]||null;return s?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(s),s):null}var c=this.validateAndParseJson(o);return c?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:c.homeAccountId,localAccountId:c.localAccountId})[0]||null):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)},e.prototype.setActiveAccount=function(t){var o=this.generateCacheKey(Ne.ACTIVE_ACCOUNT_FILTERS),r=this.generateCacheKey(Ne.ACTIVE_ACCOUNT);if(t){this.logger.verbose("setActiveAccount: Active account set");var i={homeAccountId:t.homeAccountId,localAccountId:t.localAccountId};this.browserStorage.setItem(o,JSON.stringify(i)),this.browserStorage.setItem(r,t.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(o),this.browserStorage.removeItem(r)},e.prototype.getAccountInfoByFilter=function(t){var o=this.getAllAccounts();return this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total "+o.length+" accounts found"),o.filter(function(r){return!(t.username&&t.username.toLowerCase()!==r.username.toLowerCase()||t.homeAccountId&&t.homeAccountId!==r.homeAccountId||t.localAccountId&&t.localAccountId!==r.localAccountId||t.tenantId&&t.tenantId!==r.tenantId||t.environment&&t.environment!==r.environment)})},e.prototype.getAccountInfoByHints=function(t,o){var r=this.getAllAccounts().filter(function(i){if(o){var s=i.idTokenClaims&&i.idTokenClaims.sid;return o===s}return t?t===i.username:!1});if(r.length===1)return r[0];if(r.length>1)throw K.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!Dr.isThrottlingEntity(t,r)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Je.toObject(new Dr,r))},e.prototype.setThrottlingCache=function(t,o){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(t,JSON.stringify(o))},e.prototype.getTemporaryCache=function(t,o){var r=o?this.generateCacheKey(t):t;if(this.cacheConfig.storeAuthStateInCookie){var i=this.getItemCookie(r);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),i}var s=this.temporaryCacheStorage.getItem(r);if(!s){if(this.cacheConfig.cacheLocation===Ae.LocalStorage){var c=this.browserStorage.getItem(r);if(c)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),c}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),s},e.prototype.setTemporaryCache=function(t,o,r){var i=r?this.generateCacheKey(t):t;this.temporaryCacheStorage.setItem(i,o),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(i,o))},e.prototype.removeItem=function(t){this.browserStorage.removeItem(t),this.temporaryCacheStorage.removeItem(t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(t))},e.prototype.containsKey=function(t){return this.browserStorage.containsKey(t)||this.temporaryCacheStorage.containsKey(t)},e.prototype.getKeys=function(){return Eo(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.removeAllAccounts()];case 1:return o.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(r){(t.browserStorage.containsKey(r)||t.temporaryCacheStorage.containsKey(r))&&(r.indexOf(b.CACHE_PREFIX)!==-1||r.indexOf(t.clientId)!==-1)&&t.removeItem(r)}),this.internalStorage.clear(),[2]}})})},e.prototype.clearTokensAndKeysWithClaims=function(){return z(this,void 0,void 0,function(){var t,o,r=this;return x(this,function(i){switch(i.label){case 0:return this.logger.trace("BrowserCacheManager.clearTokensAndKeysWithClaims called"),t=this.getTokenKeys(),o=[],t.accessToken.forEach(function(s){var c=r.getAccessTokenCredential(s);c!=null&&c.requestedClaimsHash&&s.includes(c.requestedClaimsHash.toLowerCase())&&o.push(r.removeAccessToken(s))}),[4,Promise.all(o)];case 1:return i.sent(),o.length>0&&this.logger.warning(o.length+" access tokens with claims in the cache keys have been removed from the cache."),[2]}})})},e.prototype.setItemCookie=function(t,o,r){var i=encodeURIComponent(t)+"="+encodeURIComponent(o)+";path=/;SameSite=Lax;";if(r){var s=this.getCookieExpirationTime(r);i+="expires="+s+";"}this.cacheConfig.secureCookies&&(i+="Secure;"),document.cookie=i},e.prototype.getItemCookie=function(t){for(var o=encodeURIComponent(t)+"=",r=document.cookie.split(";"),i=0;i<r.length;i++){for(var s=r[i];s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(o)===0)return decodeURIComponent(s.substring(o.length,s.length))}return b.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var t=this,o=b.CACHE_PREFIX+"."+this.clientId,r=document.cookie.split(";");r.forEach(function(i){for(;i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(o)===0){var s=i.split("=")[0];t.clearItemCookie(s)}})},e.prototype.clearItemCookie=function(t){this.setItemCookie(t,b.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(t){var o=new Date,r=new Date(o.getTime()+t*this.COOKIE_LIFE_MULTIPLIER);return r.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(t){var o=this.validateAndParseJson(t);return o?JSON.stringify(t):H.startsWith(t,b.CACHE_PREFIX)||H.startsWith(t,Ne.ADAL_ID_TOKEN)?t:b.CACHE_PREFIX+"."+this.clientId+"."+t},e.prototype.generateAuthorityKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.AUTHORITY+"."+o)},e.prototype.generateNonceKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.NONCE_IDTOKEN+"."+o)},e.prototype.generateStateKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.REQUEST_STATE+"."+o)},e.prototype.getCachedAuthority=function(t){var o=this.generateStateKey(t),r=this.getTemporaryCache(o);if(!r)return null;var i=this.generateAuthorityKey(r);return this.getTemporaryCache(i)},e.prototype.updateCacheEntries=function(t,o,r,i,s){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var c=this.generateStateKey(t);this.setTemporaryCache(c,t,!1);var l=this.generateNonceKey(t);this.setTemporaryCache(l,o,!1);var h=this.generateAuthorityKey(t);if(this.setTemporaryCache(h,r,!1),s){var u={credential:s.homeAccountId,type:rt.HOME_ACCOUNT_ID};this.setTemporaryCache(ue.CCS_CREDENTIAL,JSON.stringify(u),!0)}else if(!H.isEmpty(i)){var u={credential:i,type:rt.UPN};this.setTemporaryCache(ue.CCS_CREDENTIAL,JSON.stringify(u),!0)}},e.prototype.resetRequestCache=function(t){var o=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),H.isEmpty(t)||this.getKeys().forEach(function(r){r.indexOf(t)!==-1&&o.removeItem(r)}),t&&(this.removeItem(this.generateStateKey(t)),this.removeItem(this.generateNonceKey(t)),this.removeItem(this.generateAuthorityKey(t))),this.removeItem(this.generateCacheKey(ue.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(ue.ORIGIN_URI)),this.removeItem(this.generateCacheKey(ue.URL_HASH)),this.removeItem(this.generateCacheKey(ue.CORRELATION_ID)),this.removeItem(this.generateCacheKey(ue.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(ue.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(t){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),t){var o=this.generateStateKey(t),r=this.temporaryCacheStorage.getItem(o);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+r),this.resetRequestCache(r||b.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(t){var o=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(r){if(r.indexOf(ue.REQUEST_STATE)!==-1){var i=o.temporaryCacheStorage.getItem(r);if(i){var s=$r.extractBrowserRequestState(o.cryptoImpl,i);s&&s.interactionType===t&&(o.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+i),o.resetRequestCache(i))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(t,o){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var r=o.base64Encode(JSON.stringify(t));this.setTemporaryCache(ue.REQUEST_PARAMS,r,!0)},e.prototype.getCachedRequest=function(t,o){this.logger.trace("BrowserCacheManager.getCachedRequest called");var r=this.getTemporaryCache(ue.REQUEST_PARAMS,!0);if(!r)throw F.createNoTokenRequestCacheError();var i=this.validateAndParseJson(o.base64Decode(r));if(!i)throw F.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(ue.REQUEST_PARAMS)),H.isEmpty(i.authority)){var s=this.generateAuthorityKey(t),c=this.getTemporaryCache(s);if(!c)throw F.createNoCachedAuthorityError();i.authority=c}return i},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var t=this.getTemporaryCache(ue.NATIVE_REQUEST,!0);if(!t)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var o=this.validateAndParseJson(t);return o||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(t){var o=this.getInteractionInProgress();return t?o===this.clientId:!!o},e.prototype.getInteractionInProgress=function(){var t=b.CACHE_PREFIX+"."+ue.INTERACTION_STATUS_KEY;return this.getTemporaryCache(t,!1)},e.prototype.setInteractionInProgress=function(t){var o=b.CACHE_PREFIX+"."+ue.INTERACTION_STATUS_KEY;if(t){if(this.getInteractionInProgress())throw F.createInteractionInProgressError();this.setTemporaryCache(o,this.clientId,!1)}else!t&&this.getInteractionInProgress()===this.clientId&&this.removeItem(o)},e.prototype.getLegacyLoginHint=function(){var t=this.getTemporaryCache(Ne.ADAL_ID_TOKEN);t&&(this.browserStorage.removeItem(Ne.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var o=this.getTemporaryCache(Ne.ID_TOKEN,!0);o&&(this.removeItem(this.generateCacheKey(Ne.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var r=o||t;if(r){var i=new It(r,this.cryptoImpl);if(i.claims&&i.claims.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),i.claims.preferred_username;if(i.claims&&i.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),i.claims.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null},e.prototype.updateCredentialCacheKey=function(t,o){var r=o.generateCredentialKey();if(t!==r){var i=this.getItem(t);if(i)return this.removeItem(t),this.setItem(r,i),this.logger.verbose("Updated an outdated "+o.credentialType+" cache key"),r;this.logger.error("Attempted to update an outdated "+o.credentialType+" cache key but no item matching the outdated key was found in storage")}return t},e.prototype.getRedirectRequestContext=function(){return this.getTemporaryCache(ue.REDIRECT_CONTEXT,!0)},e.prototype.setRedirectRequestContext=function(t){this.setTemporaryCache(ue.REDIRECT_CONTEXT,t,!0)},e}(Je),ba=function(n,e){var t={cacheLocation:Ae.MemoryStorage,temporaryCacheLocation:Ae.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};return new Bo(n,t,Xn,e)};/*! @azure/msal-browser v2.38.3 2023-10-27 */var Uo="@azure/msal-browser",jn="2.38.3";/*! @azure/msal-browser v2.38.3 2023-10-27 */var wa=function(){function n(){}return n.prototype.sendGetRequestAsync=function(e,t){return z(this,void 0,void 0,function(){var o,r,i;return x(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,fetch(e,{method:At.GET,headers:this.getFetchHeaders(t)})];case 1:return o=s.sent(),[3,3];case 2:throw r=s.sent(),window.navigator.onLine?F.createGetRequestFailedError(r,e):F.createNoNetworkConnectivityError();case 3:return s.trys.push([3,5,,6]),i={headers:this.getHeaderDict(o.headers)},[4,o.json()];case 4:return[2,(i.body=s.sent(),i.status=o.status,i)];case 5:throw s.sent(),F.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},n.prototype.sendPostRequestAsync=function(e,t){return z(this,void 0,void 0,function(){var o,r,i,s;return x(this,function(c){switch(c.label){case 0:o=t&&t.body||b.EMPTY_STRING,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,fetch(e,{method:At.POST,headers:this.getFetchHeaders(t),body:o})];case 2:return r=c.sent(),[3,4];case 3:throw i=c.sent(),window.navigator.onLine?F.createPostRequestFailedError(i,e):F.createNoNetworkConnectivityError();case 4:return c.trys.push([4,6,,7]),s={headers:this.getHeaderDict(r.headers)},[4,r.json()];case 5:return[2,(s.body=c.sent(),s.status=r.status,s)];case 6:throw c.sent(),F.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},n.prototype.getFetchHeaders=function(e){var t=new Headers;if(!(e&&e.headers))return t;var o=e.headers;return Object.keys(o).forEach(function(r){t.append(r,o[r])}),t},n.prototype.getHeaderDict=function(e){var t={};return e.forEach(function(o,r){t[r]=o}),t},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ka=function(){function n(){}return n.prototype.sendGetRequestAsync=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.sendRequestAsync(e,At.GET,t)]})})},n.prototype.sendPostRequestAsync=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.sendRequestAsync(e,At.POST,t)]})})},n.prototype.sendRequestAsync=function(e,t,o){var r=this;return new Promise(function(i,s){var c=new XMLHttpRequest;if(c.open(t,e,!0),r.setXhrHeaders(c,o),c.onload=function(){(c.status<200||c.status>=300)&&(t===At.POST?s(F.createPostRequestFailedError("Failed with status "+c.status,e)):s(F.createGetRequestFailedError("Failed with status "+c.status,e)));try{var l=JSON.parse(c.responseText),h={headers:r.getHeaderDict(c),body:l,status:c.status};i(h)}catch{s(F.createFailedToParseNetworkResponseError(e))}},c.onerror=function(){window.navigator.onLine?t===At.POST?s(F.createPostRequestFailedError("Failed with status "+c.status,e)):s(F.createGetRequestFailedError("Failed with status "+c.status,e)):s(F.createNoNetworkConnectivityError())},t===At.POST&&o&&o.body)c.send(o.body);else if(t===At.GET)c.send();else throw F.createHttpMethodNotImplementedError(t)})},n.prototype.setXhrHeaders=function(e,t){if(t&&t.headers){var o=t.headers;Object.keys(o).forEach(function(r){e.setRequestHeader(r,o[r])})}},n.prototype.getHeaderDict=function(e){var t=e.getAllResponseHeaders(),o=t.trim().split(/[\r\n]+/),r={};return o.forEach(function(i){var s=i.split(": "),c=s.shift(),l=s.join(": ");c&&l&&(r[c]=l)}),r},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ee=function(){function n(){}return n.clearHash=function(e){e.location.hash=b.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,b.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},n.replaceHash=function(e){var t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):b.EMPTY_STRING},n.isInIframe=function(){return window.parent!==window},n.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(_t.POPUP_NAME_PREFIX+".")===0},n.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},n.getHomepage=function(){var e=new de(window.location.href),t=e.getUrlComponents();return t.Protocol+"//"+t.HostNameAndPort+"/"},n.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new wa:new ka},n.blockReloadInHiddenIframes=function(){var e=de.hashContainsKnownProperties(window.location.hash);if(e&&n.isInIframe())throw F.createBlockReloadInHiddenIframeError()},n.blockRedirectInIframe=function(e,t){var o=n.isInIframe();if(e===$.Redirect&&o&&!t)throw F.createRedirectInIframeError(o)},n.blockAcquireTokenInPopups=function(){if(n.isInPopup())throw F.createBlockAcquireTokenInPopupsError()},n.blockNonBrowserEnvironment=function(e){if(!e)throw F.createNonBrowserEnvironmentError()},n.blockNativeBrokerCalledBeforeInitialized=function(e,t){if(e&&!t)throw F.createNativeBrokerCalledBeforeInitialize()},n.detectIEOrEdge=function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE "),o=e.indexOf("Trident/"),r=e.indexOf("Edge/"),i=t>0||o>0,s=r>0;return i||s},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Qr=function(){function n(e,t,o,r,i,s,c,l,h){this.config=e,this.browserStorage=t,this.browserCrypto=o,this.networkClient=this.config.system.networkClient,this.eventHandler=i,this.navigationClient=s,this.nativeMessageHandler=l,this.correlationId=h||this.browserCrypto.createNewGuid(),this.logger=r.clone(_t.MSAL_SKU,jn,this.correlationId),this.performanceClient=c}return n.prototype.clearCacheOnLogout=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){switch(t.label){case 0:if(!e)return[3,5];Ue.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(Ue.generateAccountCacheKey(e))];case 2:return t.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return t.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return t.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return t.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return t.sent(),[3,9];case 8:return t.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},n.prototype.initializeBaseRequest=function(e,t){return z(this,void 0,void 0,function(){var o,r,i,s;return x(this,function(c){switch(c.label){case 0:return this.performanceClient.addQueueMeasurement(R.InitializeBaseRequest,e.correlationId),this.logger.verbose("Initializing BaseAuthRequest"),o=e.authority||this.config.auth.authority,t?[4,this.validateRequestAuthority(o,t)]:[3,2];case 1:c.sent(),c.label=2;case 2:if(r=Eo(e&&e.scopes||[]),i=Q(Q({},e),{correlationId:this.correlationId,authority:o,scopes:r}),!i.authenticationScheme)i.authenticationScheme=ge.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(i.authenticationScheme===ge.SSH){if(!e.sshJwk)throw we.createMissingSshJwkError();if(!e.sshKid)throw we.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+i.authenticationScheme+'" as configured in Auth request')}return this.config.cache.claimsBasedCachingEnabled&&e.claims&&!H.isEmptyObj(e.claims)?(s=i,[4,this.browserCrypto.hashString(e.claims)]):[3,4];case 3:s.requestedClaimsHash=c.sent(),c.label=4;case 4:return[2,i]}})})},n.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var t=e||this.config.auth.redirectUri||Ee.getCurrentUri();return de.getAbsoluteUrl(t,Ee.getCurrentUri())},n.prototype.validateRequestAuthority=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(r.label){case 0:return[4,this.getDiscoveredAuthority(e)];case 1:if(o=r.sent(),!o.isAlias(t.environment))throw we.createAuthorityMismatchError();return[2]}})})},n.prototype.initializeServerTelemetryManager=function(e,t){this.logger.verbose("initializeServerTelemetryManager called");var o={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new ga(o,this.browserStorage)},n.prototype.getDiscoveredAuthority=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),t={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,oo.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,t,this.logger)]):[3,2];case 1:return[2,o.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,oo.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,t,this.logger)];case 3:return[2,o.sent()]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var En=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(t){return z(this,void 0,void 0,function(){var o,r;return x(this,function(i){switch(i.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),this.logger.verbose("initializeAuthorizationRequest called",t.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return o=i.sent(),r=Q(Q({},t),{redirectUri:t.redirectUri,code:b.EMPTY_STRING,codeVerifier:o.verifier}),t.codeChallenge=o.challenge,t.codeChallengeMethod=b.S256_CODE_CHALLENGE_METHOD,[2,r]}})})},e.prototype.initializeLogoutRequest=function(t){this.logger.verbose("initializeLogoutRequest called",t==null?void 0:t.correlationId);var o=Q({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},t);if(t)if(t.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(t.account){var r=this.getLogoutHintFromIdTokenClaims(t.account);r&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),o.logoutHint=r)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!t||t.postLogoutRedirectUri!==null?t&&t.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(t.postLogoutRedirectUri,Ee.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",o.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Ee.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(Ee.getCurrentUri(),Ee.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",o.correlationId),o},e.prototype.getLogoutHintFromIdTokenClaims=function(t){var o=t.idTokenClaims;if(o){if(o.login_hint)return o.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null},e.prototype.createAuthCodeClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientCreateAuthCodeClient,this.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new Or(i,this.performanceClient)]}})})},e.prototype.getClientConfiguration=function(t,o,r){return z(this,void 0,void 0,function(){var i,s;return x(this,function(c){switch(c.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientGetClientConfiguration,this.correlationId),this.logger.verbose("getClientConfiguration called",this.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),[4,this.getDiscoveredAuthority(o,r)];case 1:return i=c.sent(),s=this.config.system.loggerOptions,[2,{authOptions:{clientId:this.config.auth.clientId,authority:i,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:s.loggerCallback,piiLoggingEnabled:s.piiLoggingEnabled,logLevel:s.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:_t.MSAL_SKU,version:jn,cpu:b.EMPTY_STRING,os:b.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(t,o,r){if(this.logger.verbose("validateAndExtractStateFromHash called",r),!t.state)throw F.createHashDoesNotContainStateError();var i=$r.extractBrowserRequestState(this.browserCrypto,t.state);if(!i)throw F.createUnableToParseStateError();if(i.interactionType!==o)throw F.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",r),t.state},e.prototype.getDiscoveredAuthority=function(t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l;return x(this,function(h){switch(h.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),this.logger.verbose("getDiscoveredAuthority called",this.correlationId),i=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},c=t||this.config.auth.authority,l=Un.generateAuthority(c,o||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),this.performanceClient.setPreQueueTime(R.AuthorityFactoryCreateDiscoveredInstance,this.correlationId),[4,oo.createDiscoveredInstance(l,this.config.system.networkClient,this.browserStorage,s,this.logger,this.performanceClient,this.correlationId).then(function(u){return i.endMeasurement({success:!0}),u}).catch(function(u){throw i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})];case 1:return[2,h.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId),this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),r=this.getRedirectUri(t.redirectUri),i={interactionType:o},s=Ft.setRequestState(this.browserCrypto,t&&t.state||b.EMPTY_STRING,i),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,this.correlationId),l=[{}],[4,this.initializeBaseRequest(t)];case 1:return c=Q.apply(void 0,[Q.apply(void 0,l.concat([g.sent()])),{redirectUri:r,state:s,nonce:t.nonce||this.browserCrypto.createNewGuid(),responseMode:Qn.FRAGMENT}]),h=t.account||this.browserStorage.getActiveAccount(),h&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+h.homeAccountId,this.correlationId),c.account=h),H.isEmpty(c.loginHint)&&!h&&(u=this.browserStorage.getLegacyLoginHint(),u&&(c.loginHint=u)),[2,c]}})})},e}(Qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Do=function(){function n(e,t,o,r,i){this.authModule=e,this.browserStorage=t,this.authCodeRequest=o,this.logger=r,this.performanceClient=i}return n.prototype.handleCodeResponseFromHash=function(e,t,o,r){return z(this,void 0,void 0,function(){var i,s,c;return x(this,function(l){if(this.performanceClient.addQueueMeasurement(R.HandleCodeResponseFromHash,this.authCodeRequest.correlationId),this.logger.verbose("InteractionHandler.handleCodeResponse called"),H.isEmpty(e))throw F.createEmptyHashError(e);if(i=this.browserStorage.generateStateKey(t),s=this.browserStorage.getTemporaryCache(i),!s)throw K.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(e,s)}catch(h){throw h instanceof rn&&h.subError===U.userCancelledError.code?F.createUserCancelledError():h}return this.performanceClient.setPreQueueTime(R.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),[2,this.handleCodeResponseFromServer(c,t,o,r)]})})},n.prototype.handleCodeResponseFromServer=function(e,t,o,r,i){return i===void 0&&(i=!0),z(this,void 0,void 0,function(){var s,c,l,h,u,g;return x(this,function(f){switch(f.label){case 0:if(this.performanceClient.addQueueMeasurement(R.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),s=this.browserStorage.generateStateKey(t),c=this.browserStorage.getTemporaryCache(s),!c)throw K.createStateNotFoundError("Cached State");return l=this.browserStorage.generateNonceKey(c),h=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?(this.performanceClient.setPreQueueTime(R.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,o,r)]):[3,2];case 1:f.sent(),f.label=2;case 2:return i&&(e.nonce=h||void 0),e.state=c,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(u=this.checkCcsCredentials(),u&&(this.authCodeRequest.ccsCredential=u)),this.performanceClient.setPreQueueTime(R.AuthClientAcquireToken,this.authCodeRequest.correlationId),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return g=f.sent(),this.browserStorage.cleanRequestByState(t),[2,g]}})})},n.prototype.updateTokenEndpointAuthority=function(e,t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(R.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),r="https://"+e+"/"+t.tenant+"/",[4,oo.createDiscoveredInstance(r,o,this.browserStorage,t.options,this.logger,this.performanceClient,this.authCodeRequest.correlationId)];case 1:return i=s.sent(),this.authModule.updateAuthority(i),[2]}})})},n.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(ue.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: "+e)}return null},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wr=function(n){xe(e,n);function e(t,o,r,i,s,c){var l=n.call(this,t,o,r,i,c)||this;return l.browserCrypto=s,l}return e.prototype.initiateAuthRequest=function(t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),H.isEmpty(t)?[3,7]:(o.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ue.ORIGIN_URI,o.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ue.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+t),r={apiId:ke.acquireTokenRedirect,timeout:o.redirectTimeout,noHistory:!1},typeof o.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),i=o.onRedirectNavigate(t),i===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,o.navigationClient.navigateExternal(t,r)])));case 1:return s.sent(),[2];case 2:return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),[4,o.navigationClient.navigateExternal(t,r)];case 5:return s.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),F.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(t,o,r,i){return z(this,void 0,void 0,function(){var s,c,l,h,u,g,f;return x(this,function(w){switch(w.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),H.isEmpty(t))throw F.createEmptyHashError(t);if(this.browserStorage.setInteractionInProgress(!1),s=this.browserStorage.generateStateKey(o),c=this.browserStorage.getTemporaryCache(s),!c)throw K.createStateNotFoundError("Cached State");try{l=this.authModule.handleFragmentResponse(t,c)}catch(C){throw C instanceof rn&&C.subError===U.userCancelledError.code?F.createUserCancelledError():C}return h=this.browserStorage.generateNonceKey(c),u=this.browserStorage.getTemporaryCache(h),this.authCodeRequest.code=l.code,l.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(l.cloud_instance_host_name,r,i)]:[3,2];case 1:w.sent(),w.label=2;case 2:return l.nonce=u||void 0,l.state=c,l.client_info?this.authCodeRequest.clientInfo=l.client_info:(g=this.checkCcsCredentials(),g&&(this.authCodeRequest.ccsCredential=g)),[4,this.authModule.acquireToken(this.authCodeRequest,l)];case 3:return f=w.sent(),this.browserStorage.cleanRequestByState(o),[2,f]}})})},e}(Do);/*! @azure/msal-browser v2.38.3 2023-10-27 */var te;(function(n){n.INITIALIZE_START="msal:initializeStart",n.INITIALIZE_END="msal:initializeEnd",n.ACCOUNT_ADDED="msal:accountAdded",n.ACCOUNT_REMOVED="msal:accountRemoved",n.LOGIN_START="msal:loginStart",n.LOGIN_SUCCESS="msal:loginSuccess",n.LOGIN_FAILURE="msal:loginFailure",n.ACQUIRE_TOKEN_START="msal:acquireTokenStart",n.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",n.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",n.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",n.SSO_SILENT_START="msal:ssoSilentStart",n.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",n.SSO_SILENT_FAILURE="msal:ssoSilentFailure",n.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",n.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",n.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",n.HANDLE_REDIRECT_START="msal:handleRedirectStart",n.HANDLE_REDIRECT_END="msal:handleRedirectEnd",n.POPUP_OPENED="msal:popupOpened",n.LOGOUT_START="msal:logoutStart",n.LOGOUT_SUCCESS="msal:logoutSuccess",n.LOGOUT_FAILURE="msal:logoutFailure",n.LOGOUT_END="msal:logoutEnd",n.RESTORE_FROM_BFCACHE="msal:restoreFromBFCache"})(te||(te={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wt;(function(n){n.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",n.USER_CANCEL="USER_CANCEL",n.NO_NETWORK="NO_NETWORK",n.TRANSIENT_ERROR="TRANSIENT_ERROR",n.PERSISTENT_ERROR="PERSISTENT_ERROR",n.DISABLED="DISABLED",n.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(Wt||(Wt={}));var qn={extensionError:{code:"ContentError"},userSwitch:{code:"user_switch",desc:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."},tokensNotFoundInCache:{code:"tokens_not_found_in_internal_memory_cache",desc:"Tokens not cached in MSAL JS internal memory, please make the WAM request"}},Nt=function(n){xe(e,n);function e(t,o,r){var i=n.call(this,t,o)||this;return Object.setPrototypeOf(i,e.prototype),i.name="NativeAuthError",i.ext=r,i}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===Wt.PERSISTENT_ERROR||this.ext.status===Wt.DISABLED))return!0;switch(this.errorCode){case qn.extensionError.code:return!0;default:return!1}},e.createError=function(t,o,r){if(r&&r.status)switch(r.status){case Wt.ACCOUNT_UNAVAILABLE:return gt.createNativeAccountUnavailableError();case Wt.USER_INTERACTION_REQUIRED:return new gt(t,o);case Wt.USER_CANCEL:return F.createUserCancelledError();case Wt.NO_NETWORK:return F.createNoNetworkConnectivityError()}return new e(t,o,r)},e.createUserSwitchError=function(){return new e(qn.userSwitch.code,qn.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(qn.tokensNotFoundInCache.code,qn.tokensNotFoundInCache.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Yr=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c;return x(this,function(l){switch(l.label){case 0:return o=this.performanceClient.startMeasurement(R.SilentCacheClientAcquireToken,t.correlationId),r=this.initializeServerTelemetryManager(ke.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(r,t.authority,t.azureCloudOptions)];case 1:i=l.sent(),this.logger.verbose("Silent auth client created"),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,i.acquireCachedToken(t)];case 3:return s=l.sent(),o.endMeasurement({success:!0,fromCache:!0}),[2,s];case 4:throw c=l.sent(),c instanceof F&&c.errorCode===U.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),o.endMeasurement({errorCode:c instanceof Y&&c.errorCode||void 0,subErrorCode:c instanceof Y&&c.subError||void 0,success:!1}),c;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new la(i,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(t,o){return z(this,void 0,void 0,function(){var r;return x(this,function(i){switch(i.label){case 0:return this.performanceClient.addQueueMeasurement(R.InitializeSilentRequest,this.correlationId),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,this.correlationId),r=[Q({},t)],[4,this.initializeBaseRequest(t,o)];case 1:return[2,Q.apply(void 0,[Q.apply(void 0,r.concat([i.sent()])),{account:o,forceRefresh:t.forceRefresh||!1}])]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Tn=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g,f,w){var C=n.call(this,t,o,r,i,s,c,h,u,w)||this;return C.apiId=l,C.accountId=g,C.nativeMessageHandler=u,C.nativeStorageManager=f,C.silentCacheClient=new Yr(t,C.nativeStorageManager,r,i,s,c,h,u,w),C}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),o=this.performanceClient.startMeasurement(R.NativeInteractionClientAcquireToken,t.correlationId),r=pt.nowSeconds(),[4,this.initializeNativeRequest(t)];case 1:i=u.sent(),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,i)];case 3:return s=u.sent(),o.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,s];case 4:return u.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return c={method:Vt.GetToken,request:i},[4,this.nativeMessageHandler.sendMessage(c)];case 6:return l=u.sent(),h=this.validateNativeResponse(l),[2,this.handleNativeResponse(h,i,r).then(function(g){return o.endMeasurement({success:!0,isNativeBroker:!0,requestId:g.requestId}),g}).catch(function(g){throw o.endMeasurement({success:!1,errorCode:g.errorCode,subErrorCode:g.subError,isNativeBroker:!0}),g})]}})})},e.prototype.createSilentCacheRequest=function(t,o){return{authority:t.authority,correlationId:this.correlationId,scopes:He.fromString(t.scope).asArray(),account:o,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c;return x(this,function(l){switch(l.label){case 0:if(!t)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),K.createNoAccountFoundError();if(r=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t}),!r)throw K.createNoAccountFoundError();l.label=1;case 1:return l.trys.push([1,3,,4]),i=this.createSilentCacheRequest(o,r),[4,this.silentCacheClient.acquireToken(i)];case 2:return s=l.sent(),[2,s];case 3:throw c=l.sent(),c;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l;return x(this,function(h){switch(h.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(t)];case 1:o=h.sent(),r={method:Vt.GetToken,request:o},h.label=2;case 2:return h.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(r)];case 3:return i=h.sent(),this.validateNativeResponse(i),[3,5];case 4:if(s=h.sent(),s instanceof Nt&&s.isFatal())throw s;return[3,5];case 5:return this.browserStorage.setTemporaryCache(ue.NATIVE_REQUEST,JSON.stringify(o),!0),c={apiId:ke.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},l=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(t.redirectUri),[4,this.navigationClient.navigateExternal(l,c)];case 6:return h.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return z(this,void 0,void 0,function(){var t,o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(t=this.browserStorage.getCachedNativeRequest(),!t)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];o=t.prompt,r=Ir(t,["prompt"]),o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ue.NATIVE_REQUEST)),i={method:Vt.GetToken,request:r},s=pt.nowSeconds(),u.label=1;case 1:return u.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(i)];case 2:return c=u.sent(),this.validateNativeResponse(c),l=this.handleNativeResponse(c,r,s),this.browserStorage.setInteractionInProgress(!1),[2,l];case 3:throw h=u.sent(),this.browserStorage.setInteractionInProgress(!1),h;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(t,o,r){return z(this,void 0,void 0,function(){var i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),t.account.id!==o.accountId)throw Nt.createUserSwitchError();return[4,this.getDiscoveredAuthority(o.authority)];case 1:return i=g.sent(),s=i.getPreferredCache(),c=this.createIdTokenObj(t),l=this.createHomeAccountIdentifier(t,c),h=this.createAccountEntity(t,l,c,s),[4,this.generateAuthenticationResult(t,o,c,h,i.canonicalAuthority,r)];case 2:return u=g.sent(),this.cacheAccount(h),this.cacheNativeTokens(t,o,l,h,c,u.accessToken,u.tenantId,r),[2,u]}})})},e.prototype.createIdTokenObj=function(t){return new It(t.id_token||b.EMPTY_STRING,this.browserCrypto)},e.prototype.createHomeAccountIdentifier=function(t,o){var r=Ue.generateHomeAccountId(t.client_info||b.EMPTY_STRING,$e.Default,this.logger,this.browserCrypto,o);return r},e.prototype.createAccountEntity=function(t,o,r,i){return Ue.createAccount(t.client_info,o,r,void 0,void 0,void 0,i,t.account.id)},e.prototype.generateScopes=function(t,o){return t.scope?He.fromString(t.scope):He.fromString(o.scope)},e.prototype.generatePopAccessToken=function(t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:if(o.tokenType!==ge.POP)return[3,2];if(t.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),[2,t.shr];if(r=new wn(this.browserCrypto),i={resourceRequestMethod:o.resourceRequestMethod,resourceRequestUri:o.resourceRequestUri,shrClaims:o.shrClaims,shrNonce:o.shrNonce},!o.keyId)throw K.createKeyIdMissingError();return[4,r.signPopToken(t.access_token,o.keyId,i)];case 1:return[2,s.sent()];case 2:return[2,t.access_token]}})})},e.prototype.generateAuthenticationResult=function(t,o,r,i,s,c){return z(this,void 0,void 0,function(){var l,h,u,g,f,w,C,P;return x(this,function(M){switch(M.label){case 0:return l=this.addTelemetryFromNativeResponse(t),h=t.scope?He.fromString(t.scope):He.fromString(o.scope),u=t.account.properties||{},g=u.UID||r.claims.oid||r.claims.sub||b.EMPTY_STRING,f=u.TenantId||r.claims.tid||b.EMPTY_STRING,[4,this.generatePopAccessToken(t,o)];case 1:return w=M.sent(),C=o.tokenType===ge.POP?ge.POP:ge.BEARER,P={authority:s,uniqueId:g,tenantId:f,scopes:h.asArray(),account:i.getAccountInfo(),idToken:t.id_token,idTokenClaims:r.claims,accessToken:w,fromCache:l?this.isResponseFromCache(l):!1,expiresOn:new Date(Number(c+t.expires_in)*1e3),tokenType:C,correlationId:this.correlationId,state:t.state,fromNativeBroker:!0},[2,P]}})})},e.prototype.cacheAccount=function(t){var o=this;this.browserStorage.setAccount(t),this.browserStorage.removeAccountContext(t).catch(function(r){o.logger.error("Error occurred while removing account context from browser storage. "+r)})},e.prototype.cacheNativeTokens=function(t,o,r,i,s,c,l,h){var u=sn.createIdTokenEntity(r,o.authority,t.id_token||b.EMPTY_STRING,o.clientId,s.claims.tid||b.EMPTY_STRING),g=o.tokenType===ge.POP?b.SHR_NONCE_VALIDITY:(typeof t.expires_in=="string"?parseInt(t.expires_in,10):t.expires_in)||0,f=h+g,w=this.generateScopes(t,o),C=cn.createAccessTokenEntity(r,o.authority,c,o.clientId,s?s.claims.tid||b.EMPTY_STRING:l,w.printScopes(),f,0,this.browserCrypto),P=new xn(i,u,C);this.nativeStorageManager.saveCacheRecord(P)},e.prototype.addTelemetryFromNativeResponse=function(t){var o=this.getMATSFromResponse(t);return o?(this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:o.broker_version,matsAccountJoinOnStart:o.account_join_on_start,matsAccountJoinOnEnd:o.account_join_on_end,matsDeviceJoin:o.device_join,matsPromptBehavior:o.prompt_behavior,matsApiErrorCode:o.api_error_code,matsUiVisible:o.ui_visible,matsSilentCode:o.silent_code,matsSilentBiSubCode:o.silent_bi_sub_code,matsSilentMessage:o.silent_message,matsSilentStatus:o.silent_status,matsHttpStatus:o.http_status,matsHttpEventCount:o.http_event_count},this.correlationId),o):null},e.prototype.validateNativeResponse=function(t){if(t.hasOwnProperty("access_token")&&t.hasOwnProperty("id_token")&&t.hasOwnProperty("client_info")&&t.hasOwnProperty("account")&&t.hasOwnProperty("scope")&&t.hasOwnProperty("expires_in"))return t;throw Nt.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(t){if(t.properties.MATS)try{return JSON.parse(t.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(t){return typeof t.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!t.is_cached},e.prototype.initializeNativeRequest=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f,w=this;return x(this,function(C){switch(C.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),o=t.authority||this.config.auth.authority,t.account?[4,this.validateRequestAuthority(o,t.account)]:[3,2];case 1:C.sent(),C.label=2;case 2:return r=new de(o),r.validateAsUri(),i=t.scopes,s=Ir(t,["scopes"]),c=new He(i||[]),c.appendScopes(An),l=function(){switch(w.apiId){case ke.ssoSilent:case ke.acquireTokenSilent_silentFlow:return w.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Ve.NONE}if(!t.prompt){w.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(t.prompt){case Ve.NONE:case Ve.CONSENT:case Ve.LOGIN:return w.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),t.prompt;default:throw w.logger.trace("initializeNativeRequest: prompt = "+t.prompt+" is not compatible with native flow"),F.createNativePromptParameterNotSupportedError()}},h=Q(Q({},s),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:r.urlString,scope:c.printScopes(),redirectUri:this.getRedirectUri(t.redirectUri),prompt:l(),correlationId:this.correlationId,tokenType:t.authenticationScheme,windowTitleSubstring:document.title,extraParameters:Q(Q(Q({},t.extraQueryParameters),t.tokenQueryParameters),{telemetry:Dn.MATS_TELEMETRY}),extendedExpiryToken:!1}),t.authenticationScheme!==ge.POP?[3,4]:(u={resourceRequestUri:t.resourceRequestUri,resourceRequestMethod:t.resourceRequestMethod,shrClaims:t.shrClaims,shrNonce:t.shrNonce},g=new wn(this.browserCrypto),[4,g.generateCnf(u)]);case 3:f=C.sent(),h.reqCnf=f.reqCnfString,h.keyId=f.kid,C.label=4;case 4:return[2,h]}})})},e}(Qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var ln=function(){function n(e,t,o,r){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=r,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=o,this.handshakeEvent=o.startMeasurement(R.NativeMessageHandlerHandshake)}return n.prototype.sendMessage=function(e){return z(this,void 0,void 0,function(){var t,o=this;return x(this,function(r){return this.logger.trace("NativeMessageHandler - sendMessage called."),t={channel:Dn.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:e},this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: "+JSON.stringify(t)),this.messageChannel.port1.postMessage(t),[2,new Promise(function(i,s){o.resolvers.set(t.responseId,{resolve:i,reject:s})})]})})},n.createProvider=function(e,t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:e.trace("NativeMessageHandler - createProvider called."),s.label=1;case 1:return s.trys.push([1,3,,5]),r=new n(e,t,o,Dn.PREFERRED_EXTENSION_ID),[4,r.sendHandshakeRequest()];case 2:return s.sent(),[2,r];case 3:return s.sent(),i=new n(e,t,o),[4,i.sendHandshakeRequest()];case 4:return s.sent(),[2,i];case 5:return[2]}})})},n.prototype.sendHandshakeRequest=function(){return z(this,void 0,void 0,function(){var e,t=this;return x(this,function(o){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:Dn.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:Vt.HandshakeRequest}},this.handshakeEvent.addStaticFields({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=function(r){t.onChannelMessage(r)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(r,i){t.handshakeResolvers.set(e.responseId,{resolve:r,reject:i}),t.timeoutId=window.setTimeout(function(){window.removeEventListener("message",t.windowListener,!1),t.messageChannel.port1.close(),t.messageChannel.port2.close(),t.handshakeEvent.endMeasurement({extensionHandshakeTimedOut:!0,success:!1}),i(F.createNativeHandshakeTimeoutError()),t.handshakeResolvers.delete(e.responseId)},t.handshakeTimeoutMs)})]})})},n.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var t=e.data;if(!(!t.channel||t.channel!==Dn.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===Vt.HandshakeRequest){this.logger.verbose(t.extensionId?"Extension with id: "+t.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var o=this.handshakeResolvers.get(t.responseId);o&&(this.handshakeEvent.endMeasurement({success:!1,extensionInstalled:!1}),o.reject(F.createNativeExtensionNotInstalledError()))}}},n.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var t=e.data,o=this.resolvers.get(t.responseId),r=this.handshakeResolvers.get(t.responseId);try{var i=t.body.method;if(i===Vt.Response){if(!o)return;var s=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(s)),s.status!=="Success")o.reject(Nt.createError(s.code,s.description,s.ext));else if(s.result)s.result.code&&s.result.description?o.reject(Nt.createError(s.result.code,s.result.description,s.result.ext)):o.resolve(s.result);else throw Y.createUnexpectedError("Event does not contain result.");this.resolvers.delete(t.responseId)}else if(i===Vt.HandshakeResponse){if(!r)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),this.handshakeEvent.endMeasurement({extensionInstalled:!0,success:!0}),r.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(c){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+c.toString()),this.logger.errorPii("Unable to parse "+e),o?o.reject(c):r&&r.reject(c)}},n.prototype.getExtensionId=function(){return this.extensionId},n.prototype.getExtensionVersion=function(){return this.extensionVersion},n.isNativeAvailable=function(e,t,o,r){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!o)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(r)switch(r){case ge.BEARER:case ge.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ca=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,l,u,g)||this;return f.nativeStorage=h,f}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f=this;return x(this,function(w){switch(w.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Redirect)];case 1:o=w.sent(),this.browserStorage.updateCacheEntries(o.state,o.nonce,o.authority,o.loginHint||b.EMPTY_STRING,o.account||null),r=this.initializeServerTelemetryManager(ke.acquireTokenRedirect),i=function(C){C.persisted&&(f.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),f.browserStorage.cleanRequestByState(o.state),f.eventHandler.emitEvent(te.RESTORE_FROM_BFCACHE,$.Redirect))},w.label=2;case 2:return w.trys.push([2,7,,8]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),[4,this.initializeAuthorizationCodeRequest(o)];case 3:return s=w.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(r,o.authority,o.azureCloudOptions)];case 4:return c=w.sent(),this.logger.verbose("Auth code client created"),l=new Wr(c,this.browserStorage,s,this.logger,this.browserCrypto,this.performanceClient),[4,c.getAuthCodeUrl(Q(Q({},o),{nativeBroker:ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}))];case 5:return h=w.sent(),u=this.getRedirectStartPage(t.redirectStartPage),this.logger.verbosePii("Redirect start page: "+u),window.addEventListener("pageshow",i),[4,l.initiateAuthRequest(h,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:u,onRedirectNavigate:t.onRedirectNavigate})];case 6:return[2,w.sent()];case 7:throw g=w.sent(),g instanceof Y&&g.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),r.cacheFailedRequest(g),this.browserStorage.cleanRequestByState(o.state),g;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f,w,C;return x(this,function(P){switch(P.label){case 0:o=this.initializeServerTelemetryManager(ke.handleRedirectPromise),P.label=1;case 1:if(P.trys.push([1,10,,11]),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(r=this.getRedirectResponseHash(t||window.location.hash),!r)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType($.Redirect),[2,null];i=void 0;try{s=de.getDeserializedHash(r),i=this.validateAndExtractStateFromHash(s,$.Redirect),this.logger.verbose("State extracted from hash")}catch(M){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+M),this.browserStorage.cleanRequestByInteractionType($.Redirect),[2,null]}return c=this.browserStorage.getTemporaryCache(ue.ORIGIN_URI,!0)||b.EMPTY_STRING,l=de.removeHashFromUrl(c),h=de.removeHashFromUrl(window.location.href),l===h&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(r,i,o)]):[3,3];case 2:return u=P.sent(),c.indexOf("#")>-1&&Ee.replaceHash(c),[2,u];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(r,i,o)]);case 4:return!Ee.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(ue.URL_HASH,r,!0),g={apiId:ke.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},f=!0,!c||c==="null"?(w=Ee.getHomepage(),this.browserStorage.setTemporaryCache(ue.ORIGIN_URI,w,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(w,g)]):[3,6]):[3,9];case 5:return f=P.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+c),[4,this.navigationClient.navigateInternal(c,g)];case 7:f=P.sent(),P.label=8;case 8:if(!f)return[2,this.handleHash(r,i,o)];P.label=9;case 9:return[2,null];case 10:throw C=P.sent(),C instanceof Y&&C.setCorrelationId(this.correlationId),o.cacheFailedRequest(C),this.browserStorage.cleanRequestByInteractionType($.Redirect),C;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(t){this.logger.verbose("getRedirectResponseHash called");var o=de.hashContainsKnownProperties(t);if(o)return Ee.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),t;var r=this.browserStorage.getTemporaryCache(ue.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ue.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),r},e.prototype.handleHash=function(t,o,r){return z(this,void 0,void 0,function(){var i,s,c,l,h,u,g,f=this;return x(this,function(w){switch(w.label){case 0:if(i=this.browserStorage.getCachedRequest(o,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),s=de.getDeserializedHash(t),s.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return c=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,s.accountId,this.nativeStorage,i.correlationId),l=Ft.parseRequestState(this.browserCrypto,o).userRequestState,[2,c.acquireToken(Q(Q({},i),{state:l,prompt:void 0})).finally(function(){f.browserStorage.cleanRequestByState(o)})]}if(h=this.browserStorage.getCachedAuthority(o),!h)throw F.createNoCachedAuthorityError();return this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,i.correlationId),[4,this.createAuthCodeClient(r,h)];case 1:return u=w.sent(),this.logger.verbose("Auth code client created"),eo.removeThrottle(this.browserStorage,this.config.auth.clientId,i),g=new Wr(u,this.browserStorage,i,this.logger,this.browserCrypto,this.performanceClient),[4,g.handleCodeResponseFromHash(t,o,u.authority,this.networkClient)];case 2:return[2,w.sent()]}})})},e.prototype.logout=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:this.logger.verbose("logoutRedirect called"),o=this.initializeLogoutRequest(t),r=this.initializeServerTelemetryManager(ke.logout),u.label=1;case 1:return u.trys.push([1,10,,11]),this.eventHandler.emitEvent(te.LOGOUT_START,$.Redirect,t),[4,this.clearCacheOnLogout(o.account)];case 2:return u.sent(),i={apiId:ke.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,o.correlationId),[4,this.createAuthCodeClient(r,t&&t.authority)];case 3:return s=u.sent(),this.logger.verbose("Auth code client created"),c=s.getLogoutUri(o),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,$.Redirect,o),t&&typeof t.onRedirectNavigate=="function"?(l=t.onRedirectNavigate(c),l===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(c,i)])):[3,7];case 4:return u.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),u.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(c,i)];case 8:return u.sent(),[2];case 9:return[3,11];case 10:throw h=u.sent(),h instanceof Y&&h.setCorrelationId(this.correlationId),r.cacheFailedRequest(h),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,$.Redirect,null,h),this.eventHandler.emitEvent(te.LOGOUT_END,$.Redirect),h;case 11:return this.eventHandler.emitEvent(te.LOGOUT_END,$.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(t){var o=t||window.location.href;return de.getAbsoluteUrl(o,Ee.getCurrentUri())},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ea=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,l,u,g)||this;return f.unloadWindow=f.unloadWindow.bind(f),f.nativeStorage=h,f}return e.prototype.acquireToken=function(t){try{var o=this.generatePopupName(t.scopes||An,t.authority||this.config.auth.authority),r=t.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(t,o,r);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var i=this.openSizedPopup("about:blank",o,r);return this.acquireTokenPopupAsync(t,o,r,i)}catch(s){return Promise.reject(s)}},e.prototype.logout=function(t){try{this.logger.verbose("logoutPopup called");var o=this.initializeLogoutRequest(t),r=this.generateLogoutPopupName(o),i=t&&t.authority,s=t&&t.mainWindowRedirectUri,c=(t==null?void 0:t.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(o,r,c,i,void 0,s);this.logger.verbose("asyncPopup set to false, opening popup");var l=this.openSizedPopup("about:blank",r,c);return this.logoutPopupAsync(o,r,c,i,l,s)}catch(h){return Promise.reject(h)}},e.prototype.acquireTokenPopupAsync=function(t,o,r,i){return z(this,void 0,void 0,function(){var s,c,l,h,u,g,f,w,C,P,M,j,N,T,B,V,G,J=this;return x(this,function(I){switch(I.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),s=this.initializeServerTelemetryManager(ke.acquireTokenPopup),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Popup)];case 1:c=I.sent(),this.browserStorage.updateCacheEntries(c.state,c.nonce,c.authority,c.loginHint||b.EMPTY_STRING,c.account||null),I.label=2;case 2:return I.trys.push([2,8,,9]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),[4,this.initializeAuthorizationCodeRequest(c)];case 3:return l=I.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(s,c.authority,c.azureCloudOptions)];case 4:return h=I.sent(),this.logger.verbose("Auth code client created"),u=ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme),g=void 0,u&&(g=this.performanceClient.startMeasurement(R.FetchAccountIdWithNativeBroker,t.correlationId)),[4,h.getAuthCodeUrl(Q(Q({},c),{nativeBroker:u}))];case 5:return f=I.sent(),w=new Do(h,this.browserStorage,l,this.logger,this.performanceClient),C={popup:i,popupName:o,popupWindowAttributes:r},P=this.initiateAuthRequest(f,C),this.eventHandler.emitEvent(te.POPUP_OPENED,$.Popup,{popupWindow:P},null),[4,this.monitorPopupForHash(P)];case 6:if(M=I.sent(),j=de.getDeserializedHash(M),N=this.validateAndExtractStateFromHash(j,$.Popup,c.correlationId),eo.removeThrottle(this.browserStorage,this.config.auth.clientId,l),j.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),g&&g.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return T=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,j.accountId,this.nativeStorage,c.correlationId),B=Ft.parseRequestState(this.browserCrypto,N).userRequestState,[2,T.acquireToken(Q(Q({},c),{state:B,prompt:void 0})).finally(function(){J.browserStorage.cleanRequestByState(N)})]}return[4,w.handleCodeResponseFromHash(M,N,h.authority,this.networkClient)];case 7:return V=I.sent(),[2,V];case 8:throw G=I.sent(),i&&i.close(),G instanceof Y&&G.setCorrelationId(this.correlationId),s.cacheFailedRequest(G),this.browserStorage.cleanRequestByState(c.state),G;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(t,o,r,i,s,c){return z(this,void 0,void 0,function(){var l,h,u,g,f,w,C;return x(this,function(P){switch(P.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(te.LOGOUT_START,$.Popup,t),l=this.initializeServerTelemetryManager(ke.logoutPopup),P.label=1;case 1:return P.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(t.account)];case 2:return P.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(l,i)];case 3:return h=P.sent(),this.logger.verbose("Auth code client created"),u=h.getLogoutUri(t),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,$.Popup,t),g=this.openPopup(u,{popupName:o,popupWindowAttributes:r,popup:s}),this.eventHandler.emitEvent(te.POPUP_OPENED,$.Popup,{popupWindow:g},null),[4,this.waitForLogoutPopup(g)];case 4:return P.sent(),c?(f={apiId:ke.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},w=de.getAbsoluteUrl(c,Ee.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: "+w),this.navigationClient.navigateInternal(w,f)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw C=P.sent(),s&&s.close(),C instanceof Y&&C.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,$.Popup,null,C),this.eventHandler.emitEvent(te.LOGOUT_END,$.Popup),l.cacheFailedRequest(C),C;case 6:return this.eventHandler.emitEvent(te.LOGOUT_END,$.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(t,o){if(H.isEmpty(t))throw this.logger.error("Navigate url is empty"),F.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+t),this.openPopup(t,o)},e.prototype.monitorPopupForHash=function(t){var o=this;return new Promise(function(r,i){var s=o.config.system.windowHashTimeout/o.config.system.pollIntervalMilliseconds,c=0;o.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var l=setInterval(function(){if(t.closed){o.logger.error("PopupHandler.monitorPopupForHash - window closed"),o.cleanPopup(),clearInterval(l),i(F.createUserCancelledError());return}var h=b.EMPTY_STRING,u=b.EMPTY_STRING;try{h=t.location.href,u=t.location.hash}catch{}H.isEmpty(h)||h==="about:blank"||(o.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),c++,u?(o.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(l),o.cleanPopup(t),de.hashContainsKnownProperties(u)?(o.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),r(u)):(o.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."),o.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+u),i(F.createHashDoesNotContainKnownPropertiesError()))):c>s&&(o.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(l),i(F.createMonitorPopupTimeoutError())))},o.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(t){var o=this;return new Promise(function(r){o.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var i=setInterval(function(){t.closed&&(o.logger.error("PopupHandler.waitForLogoutPopup - window closed"),o.cleanPopup(),clearInterval(i),r());var s=b.EMPTY_STRING;try{s=t.location.href}catch{}H.isEmpty(s)||s==="about:blank"||(o.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(i),o.cleanPopup(t),r())},o.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(t,o){try{var r=void 0;if(o.popup?(r=o.popup,this.logger.verbosePii("Navigating popup window to: "+t),r.location.assign(t)):typeof o.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+t),r=this.openSizedPopup(t,o.popupName,o.popupWindowAttributes)),!r)throw F.createEmptyWindowCreatedError();return r.focus&&r.focus(),this.currentWindow=r,window.addEventListener("beforeunload",this.unloadWindow),r}catch(i){throw this.logger.error("error opening popup "+i.message),this.browserStorage.setInteractionInProgress(!1),F.createPopupWindowError(i.toString())}},e.prototype.openSizedPopup=function(t,o,r){var i,s,c,l,h=window.screenLeft?window.screenLeft:window.screenX,u=window.screenTop?window.screenTop:window.screenY,g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,w=(i=r.popupSize)===null||i===void 0?void 0:i.width,C=(s=r.popupSize)===null||s===void 0?void 0:s.height,P=(c=r.popupPosition)===null||c===void 0?void 0:c.top,M=(l=r.popupPosition)===null||l===void 0?void 0:l.left;return(!w||w<0||w>g)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),w=_t.POPUP_WIDTH),(!C||C<0||C>f)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),C=_t.POPUP_HEIGHT),(!P||P<0||P>f)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),P=Math.max(0,f/2-_t.POPUP_HEIGHT/2+u)),(!M||M<0||M>g)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),M=Math.max(0,g/2-_t.POPUP_WIDTH/2+h)),window.open(t,o,"width="+w+", height="+C+", top="+P+", left="+M+", scrollbars=yes")},e.prototype.unloadWindow=function(t){this.browserStorage.cleanRequestByInteractionType($.Popup),this.currentWindow&&this.currentWindow.close(),t.preventDefault()},e.prototype.cleanPopup=function(t){t&&t.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(t,o){return _t.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+t.join("-")+"."+o+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(t){var o=t.account&&t.account.homeAccountId;return _t.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+o+"."+this.correlationId},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ta=function(){function n(){}return n.prototype.navigateInternal=function(e,t){return n.defaultNavigateWindow(e,t)},n.prototype.navigateExternal=function(e,t){return n.defaultNavigateWindow(e,t)},n.defaultNavigateWindow=function(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(o){setTimeout(function(){o(!0)},t.timeout)})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Sa=6e4,jo=6e3,Ia=3e4,Aa=2e3;function Ra(n,e){var t=n.auth,o=n.cache,r=n.system,i=n.telemetry,s={clientId:b.EMPTY_STRING,authority:""+b.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:b.EMPTY_STRING,authorityMetadata:b.EMPTY_STRING,redirectUri:b.EMPTY_STRING,postLogoutRedirectUri:b.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Bn.AAD,azureCloudOptions:{azureCloudInstance:On.None,tenant:b.EMPTY_STRING},skipAuthorityMetadataCache:!1},c={cacheLocation:Ae.SessionStorage,temporaryCacheLocation:Ae.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(o&&o.cacheLocation===Ae.LocalStorage),claimsBasedCachingEnabled:!0},l={loggerCallback:function(){},logLevel:ze.Info,piiLoggingEnabled:!1},h=Q(Q({},Mr),{loggerOptions:l,networkClient:e?Ee.getBrowserNetworkClient():ma,navigationClient:new Ta,loadFrameTimeout:0,windowHashTimeout:(r==null?void 0:r.loadFrameTimeout)||Sa,iframeHashTimeout:(r==null?void 0:r.loadFrameTimeout)||jo,navigateFrameWait:e&&Ee.detectIEOrEdge()?500:0,redirectNavigationTimeout:Ia,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(r==null?void 0:r.nativeBrokerHandshakeTimeout)||Aa,pollIntervalMilliseconds:_t.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),u=Q(Q({},r),{loggerOptions:(r==null?void 0:r.loggerOptions)||l}),g={application:{appName:b.EMPTY_STRING,appVersion:b.EMPTY_STRING}},f={auth:Q(Q({},s),t),cache:Q(Q({},c),o),system:Q(Q({},h),u),telemetry:Q(Q({},g),i)};return f}/*! @azure/msal-browser v2.38.3 2023-10-27 */var Jr=function(n){xe(e,n);function e(t,o,r,i,s,c){var l=n.call(this,t,o,r,i,c)||this;return l.navigateFrameWait=s.navigateFrameWait,l.pollIntervalMilliseconds=s.pollIntervalMilliseconds,l}return e.prototype.initiateAuthRequest=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){switch(o.label){case 0:if(this.performanceClient.addQueueMeasurement(R.SilentHandlerInitiateAuthRequest,this.authCodeRequest.correlationId),H.isEmpty(t))throw this.logger.info("Navigate url is empty"),F.createEmptyNavigationUriError();return this.navigateFrameWait?(this.performanceClient.setPreQueueTime(R.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),[4,this.loadFrame(t)]):[3,2];case 1:return[2,o.sent()];case 2:return[2,this.loadFrameSync(t)]}})})},e.prototype.monitorIframeForHash=function(t,o){var r=this;return this.performanceClient.addQueueMeasurement(R.SilentHandlerMonitorIframeForHash,this.authCodeRequest.correlationId),new Promise(function(i,s){o<jo&&r.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+o+"ms) than the default ("+jo+"ms). This may result in timeouts.");var c=window.performance.now(),l=c+o,h=setInterval(function(){if(window.performance.now()>l){r.removeHiddenIframe(t),clearInterval(h),s(F.createMonitorIframeTimeoutError());return}var u=b.EMPTY_STRING,g=t.contentWindow;try{u=g?g.location.href:b.EMPTY_STRING}catch{}if(!H.isEmpty(u)){var f=g?g.location.hash:b.EMPTY_STRING;if(de.hashContainsKnownProperties(f)){r.removeHiddenIframe(t),clearInterval(h),i(f);return}}},r.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(t){var o=this;return this.performanceClient.addQueueMeasurement(R.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),new Promise(function(r,i){var s=o.createHiddenIframe();setTimeout(function(){if(!s){i("Unable to load iframe");return}s.src=t,r(s)},o.navigateFrameWait)})},e.prototype.loadFrameSync=function(t){var o=this.createHiddenIframe();return o.src=t,o},e.prototype.createHiddenIframe=function(){var t=document.createElement("iframe");return t.style.visibility="hidden",t.style.position="absolute",t.style.width=t.style.height="0",t.style.border="0",t.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(t),t},e.prototype.removeHiddenIframe=function(t){document.body===t.parentNode&&document.body.removeChild(t)},e}(Do);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Na=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g,f){var w=n.call(this,t,o,r,i,s,c,h,g,f)||this;return w.apiId=l,w.nativeStorage=u,w}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c;return x(this,function(l){switch(l.label){case 0:if(this.performanceClient.addQueueMeasurement(R.SilentIframeClientAcquireToken,t.correlationId),this.logger.verbose("acquireTokenByIframe called"),o=this.performanceClient.startMeasurement(R.SilentIframeClientAcquireToken,t.correlationId),H.isEmpty(t.loginHint)&&H.isEmpty(t.sid)&&(!t.account||H.isEmpty(t.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),t.prompt&&t.prompt!==Ve.NONE&&t.prompt!==Ve.NO_SESSION)throw o.endMeasurement({success:!1}),F.createSilentPromptValueError(t.prompt);return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(Q(Q({},t),{prompt:t.prompt||Ve.NONE}),$.Silent)];case 1:r=l.sent(),this.browserStorage.updateCacheEntries(r.state,r.nonce,r.authority,r.loginHint||b.EMPTY_STRING,r.account||null),i=this.initializeServerTelemetryManager(this.apiId),l.label=2;case 2:return l.trys.push([2,5,,6]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(i,r.authority,r.azureCloudOptions)];case 3:return s=l.sent(),this.logger.verbose("Auth code client created"),this.performanceClient.setPreQueueTime(R.SilentIframeClientTokenHelper,t.correlationId),[4,this.silentTokenHelper(s,r).then(function(h){return o.endMeasurement({success:!0,fromCache:!1,requestId:h.requestId}),h})];case 4:return[2,l.sent()];case 5:throw c=l.sent(),c instanceof Y&&c.setCorrelationId(this.correlationId),i.cacheFailedRequest(c),this.browserStorage.cleanRequestByState(r.state),o.endMeasurement({errorCode:c instanceof Y&&c.errorCode||void 0,subErrorCode:c instanceof Y&&c.subError||void 0,success:!1}),c;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c,l,h,u,g,f,w=this;return x(this,function(C){switch(C.label){case 0:return this.performanceClient.addQueueMeasurement(R.SilentIframeClientTokenHelper,o.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,o.correlationId),[4,this.initializeAuthorizationCodeRequest(o)];case 1:return r=C.sent(),this.performanceClient.setPreQueueTime(R.GetAuthCodeUrl,o.correlationId),[4,t.getAuthCodeUrl(Q(Q({},o),{nativeBroker:ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,o.authenticationScheme)}))];case 2:return i=C.sent(),s=new Jr(t,this.browserStorage,r,this.logger,this.config.system,this.performanceClient),this.performanceClient.setPreQueueTime(R.SilentHandlerInitiateAuthRequest,o.correlationId),[4,s.initiateAuthRequest(i)];case 3:return c=C.sent(),this.performanceClient.setPreQueueTime(R.SilentHandlerMonitorIframeForHash,o.correlationId),[4,s.monitorIframeForHash(c,this.config.system.iframeHashTimeout)];case 4:if(l=C.sent(),h=de.getDeserializedHash(l),u=this.validateAndExtractStateFromHash(h,$.Silent,r.correlationId),h.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return g=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,h.accountId,this.browserStorage,this.correlationId),f=Ft.parseRequestState(this.browserCrypto,u).userRequestState,[2,g.acquireToken(Q(Q({},o),{state:f,prompt:o.prompt||Ve.NONE})).finally(function(){w.browserStorage.cleanRequestByState(u)})]}return this.performanceClient.setPreQueueTime(R.HandleCodeResponseFromHash,o.correlationId),[2,s.handleCodeResponseFromHash(l,u,t.authority,this.networkClient)]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Pa=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l=this;return x(this,function(h){switch(h.label){case 0:return this.performanceClient.addQueueMeasurement(R.SilentRefreshClientAcquireToken,t.correlationId),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,t.correlationId),r=[Q({},t)],[4,this.initializeBaseRequest(t,t.account)];case 1:return o=Q.apply(void 0,r.concat([h.sent()])),i=this.performanceClient.startMeasurement(R.SilentRefreshClientAcquireToken,o.correlationId),s=this.initializeServerTelemetryManager(ke.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(s,o.authority,o.azureCloudOptions)];case 2:return c=h.sent(),this.logger.verbose("Refresh token client created"),this.performanceClient.setPreQueueTime(R.RefreshTokenClientAcquireTokenByRefreshToken,t.correlationId),[2,c.acquireTokenByRefreshToken(o).then(function(u){return i.endMeasurement({success:!0,fromCache:u.fromCache,requestId:u.requestId}),u}).catch(function(u){throw u instanceof Y&&u.setCorrelationId(l.correlationId),s.cacheFailedRequest(u),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new zr(i,this.performanceClient)]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ma=function(){function n(e,t){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=t,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return n.prototype.addEventCallback=function(e){if(typeof window<"u"){var t=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(t,e),this.logger.verbose("Event callback registered with id: "+t),t}return null},n.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},n.prototype.enableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))},n.prototype.disableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))},n.prototype.emitEvent=function(e,t,o,r){var i=this;if(typeof window<"u"){var s={eventType:e,interactionType:t||null,payload:o||null,error:r||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(c,l){i.logger.verbose("Emitting event to callback "+l+": "+e),c.apply(null,[s])})}},n.prototype.handleAccountCacheChange=function(e){try{var t=e.newValue||e.oldValue;if(!t)return;var o=JSON.parse(t);if(typeof o!="object"||!Ue.isAccountEntity(o))return;var r=Je.toObject(new Ue,o),i=r.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(te.ACCOUNT_ADDED,void 0,i)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(te.ACCOUNT_REMOVED,void 0,i))}catch{return}},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ke=function(){function n(){}return n.decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Xr=function(){function n(e){this.cryptoObj=e}return n.prototype.generateGuid=function(){try{var e=new Uint8Array(16);return this.cryptoObj.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,Ke.decimalToHex(e[0])+Ke.decimalToHex(e[1])+Ke.decimalToHex(e[2])+Ke.decimalToHex(e[3])+"-"+Ke.decimalToHex(e[4])+Ke.decimalToHex(e[5])+"-"+Ke.decimalToHex(e[6])+Ke.decimalToHex(e[7])+"-"+Ke.decimalToHex(e[8])+Ke.decimalToHex(e[9])+"-"+Ke.decimalToHex(e[10])+Ke.decimalToHex(e[11])+Ke.decimalToHex(e[12])+Ke.decimalToHex(e[13])+Ke.decimalToHex(e[14])+Ke.decimalToHex(e[15])}catch{for(var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",o="0123456789abcdef",r=0,i=b.EMPTY_STRING,s=0;s<36;s++)t[s]!=="-"&&t[s]!=="4"&&(r=Math.random()*16|0),t[s]==="x"?i+=o[r]:t[s]==="y"?(r&=3,r|=8,i+=o[r]):i+=t[s];return i}},n.prototype.isGuid=function(e){var t=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return t.test(e)},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ht=function(){function n(){}return n.stringToUtf8Arr=function(e){for(var t,o=0,r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),o+=t<128?1:t<2048?2:t<65536?3:t<2097152?4:t<67108864?5:6;for(var s=new Uint8Array(o),c=0,l=0;c<o;l++)t=e.charCodeAt(l),t<128?s[c++]=t:t<2048?(s[c++]=192+(t>>>6),s[c++]=128+(t&63)):t<65536?(s[c++]=224+(t>>>12),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):t<2097152?(s[c++]=240+(t>>>18),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):t<67108864?(s[c++]=248+(t>>>24),s[c++]=128+(t>>>18&63),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):(s[c++]=252+(t>>>30),s[c++]=128+(t>>>24&63),s[c++]=128+(t>>>18&63),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63));return s},n.stringToArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),o=new Uint8Array(t),r=0;r<e.length;r++)o[r]=e.charCodeAt(r);return t},n.utf8ArrToString=function(e){for(var t=b.EMPTY_STRING,o=void 0,r=e.length,i=0;i<r;i++)o=e[i],t+=String.fromCharCode(o>251&&o<254&&i+5<r?(o-252)*1073741824+(e[++i]-128<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>247&&o<252&&i+4<r?(o-248<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>239&&o<248&&i+3<r?(o-240<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>223&&o<240&&i+2<r?(o-224<<12)+(e[++i]-128<<6)+e[++i]-128:o>191&&o<224&&i+1<r?(o-192<<6)+e[++i]-128:o);return t},n.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Zr=function(){function n(){}return n.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},n.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},n.prototype.encode=function(e){var t=Ht.stringToUtf8Arr(e);return this.base64EncArr(t)},n.prototype.base64EncArr=function(e){for(var t=(3-e.length%3)%3,o=b.EMPTY_STRING,r=void 0,i=e.length,s=0,c=0;c<i;c++)r=c%3,s|=e[c]<<(16>>>r&24),(r===2||e.length-c===1)&&(o+=String.fromCharCode(this.uint6ToB64(s>>>18&63),this.uint6ToB64(s>>>12&63),this.uint6ToB64(s>>>6&63),this.uint6ToB64(s&63)),s=0);return t===0?o:o.substring(0,o.length-t)+(t===1?"=":"==")},n.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var La=function(){function n(){}return n.prototype.decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("Invalid base64 string")}var o=this.base64DecToArr(t);return Ht.utf8ArrToString(o)},n.prototype.base64DecToArr=function(e,t){for(var o=e.replace(/[^A-Za-z0-9\+\/]/g,b.EMPTY_STRING),r=o.length,i=t?Math.ceil((r*3+1>>>2)/t)*t:r*3+1>>>2,s=new Uint8Array(i),c=void 0,l=void 0,h=0,u=0,g=0;g<r;g++)if(l=g&3,h|=this.b64ToUint6(o.charCodeAt(g))<<18-6*l,l===3||r-g===1){for(c=0;c<3&&u<i;c++,u++)s[u]=h>>>(16>>>c&24)&255;h=0}return s},n.prototype.b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Oa=32,za=function(){function n(e){this.base64Encode=new Zr,this.cryptoObj=e}return n.prototype.generateCodes=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return t=o.sent(),[2,{verifier:e,challenge:t}]}})})},n.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(Oa);this.cryptoObj.getRandomValues(e);var t=this.base64Encode.urlEncodeArr(e);return t}catch(o){throw F.createPkceNotGeneratedError(o)}},n.prototype.generateCodeChallengeFromVerifier=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return t=r.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(t))];case 2:throw o=r.sent(),F.createPkceNotGeneratedError(o);case 3:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var xa=function(){function n(){}return n.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.crypto.subtle.generateKey(e,t,o)]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,window.crypto.subtle.exportKey(Cn,e)]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){return x(this,function(i){return[2,window.crypto.subtle.importKey(Cn,e,t,o,r)]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.crypto.subtle.sign(e,t,o)]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,window.crypto.subtle.digest(e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ba=function(){function n(){}return n.prototype.initPrng=function(e){return window.msrCrypto.initPrng(Eo(e))},n.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.msrCrypto.subtle.generateKey(e,t,o)]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,window.msrCrypto.subtle.exportKey(Cn,e)]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){return x(this,function(i){return[2,window.msrCrypto.subtle.importKey(Cn,e,t,o,r)]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.msrCrypto.subtle.sign(e,t,o)]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,window.msrCrypto.subtle.digest(e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ua=function(){function n(){}return n.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,new Promise(function(i,s){var c=window.msCrypto.subtle.generateKey(e,t,o);c.addEventListener("complete",function(l){i(l.target.result)}),c.addEventListener("error",function(l){s(l)})})]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,new Promise(function(o,r){var i=window.msCrypto.subtle.exportKey(Cn,e);i.addEventListener("complete",function(s){var c=s.target.result,l=Ht.utf8ArrToString(new Uint8Array(c)).replace(/\r/g,b.EMPTY_STRING).replace(/\n/g,b.EMPTY_STRING).replace(/\t/g,b.EMPTY_STRING).split(" ").join(b.EMPTY_STRING).replace("\0",b.EMPTY_STRING);try{o(JSON.parse(l))}catch(h){r(h)}}),i.addEventListener("error",function(s){r(s)})})]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){var i,s;return x(this,function(c){return i=Ht.getSortedObjectString(e),s=Ht.stringToArrayBuffer(i),[2,new Promise(function(l,h){var u=window.msCrypto.subtle.importKey(Cn,s,t,o,r);u.addEventListener("complete",function(g){l(g.target.result)}),u.addEventListener("error",function(g){h(g)})})]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,new Promise(function(i,s){var c=window.msCrypto.subtle.sign(e,t,o);c.addEventListener("complete",function(l){i(l.target.result)}),c.addEventListener("error",function(l){s(l)})})]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,new Promise(function(r,i){var s=window.msCrypto.subtle.digest(e,t.buffer);s.addEventListener("complete",function(c){r(c.target.result)}),s.addEventListener("error",function(c){i(c)})})]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Da="RSASSA-PKCS1-v1_5",ei="SHA-256",ja=2048,qa=new Uint8Array([1,0,1]),ti=function(){function n(e,t){var o,r;if(this.logger=e,this.cryptoOptions=t,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new xa;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new Ua;else if(this.hasMsrCrypto()&&(!((o=this.cryptoOptions)===null||o===void 0)&&o.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new Ba;else throw this.hasMsrCrypto()&&this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"),this.logger.error("BrowserCrypto: No crypto interfaces available."),F.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((r=this.cryptoOptions)===null||r===void 0)&&r.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),ao.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:Da,hash:ei,modulusLength:ja,publicExponent:qa}}return n.prototype.hasIECrypto=function(){return"msCrypto"in window},n.prototype.hasBrowserCrypto=function(){return"crypto"in window},n.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},n.prototype.sha256Digest=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return t=Ht.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:ei},t)]})})},n.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},n.prototype.generateKeyPair=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,t)]})})},n.prototype.exportJwk=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,this.subtleCrypto.exportKey(e)]})})},n.prototype.importJwk=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,t,o)]})})},n.prototype.sign=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Fa=function(){function n(){this.dbName=zo,this.version=va,this.tableName=ya,this.dbOpen=!1}return n.prototype.open=function(){return z(this,void 0,void 0,function(){var e=this;return x(this,function(t){return[2,new Promise(function(o,r){var i=window.indexedDB.open(e.dbName,e.version);i.addEventListener("upgradeneeded",function(s){var c=s;c.target.result.createObjectStore(e.tableName)}),i.addEventListener("success",function(s){var c=s;e.db=c.target.result,e.dbOpen=!0,o()}),i.addEventListener("error",function(){return r(F.createDatabaseUnavailableError())})})]})})},n.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},n.prototype.validateDbIsOpen=function(){return z(this,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return this.dbOpen?[3,2]:[4,this.open()];case 1:return[2,e.sent()];case 2:return[2]}})})},n.prototype.getItem=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readonly"),c=s.objectStore(t.tableName),l=c.get(e);l.addEventListener("success",function(h){var u=h;t.closeConnection(),r(u.target.result)}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.setItem=function(e,t){return z(this,void 0,void 0,function(){var o=this;return x(this,function(r){switch(r.label){case 0:return[4,this.validateDbIsOpen()];case 1:return r.sent(),[2,new Promise(function(i,s){if(!o.db)return s(F.createDatabaseNotOpenError());var c=o.db.transaction([o.tableName],"readwrite"),l=c.objectStore(o.tableName),h=l.put(t,e);h.addEventListener("success",function(){o.closeConnection(),i()}),h.addEventListener("error",function(u){o.closeConnection(),s(u)})})]}})})},n.prototype.removeItem=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readwrite"),c=s.objectStore(t.tableName),l=c.delete(e);l.addEventListener("success",function(){t.closeConnection(),r()}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.getKeys=function(){return z(this,void 0,void 0,function(){var e=this;return x(this,function(t){switch(t.label){case 0:return[4,this.validateDbIsOpen()];case 1:return t.sent(),[2,new Promise(function(o,r){if(!e.db)return r(F.createDatabaseNotOpenError());var i=e.db.transaction([e.tableName],"readonly"),s=i.objectStore(e.tableName),c=s.getAllKeys();c.addEventListener("success",function(l){var h=l;e.closeConnection(),o(h.target.result)}),c.addEventListener("error",function(l){e.closeConnection(),r(l)})})]}})})},n.prototype.containsKey=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readonly"),c=s.objectStore(t.tableName),l=c.count(e);l.addEventListener("success",function(h){var u=h;t.closeConnection(),r(u.target.result===1)}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.deleteDatabase=function(){return z(this,void 0,void 0,function(){return x(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(t,o){var r=window.indexedDB.deleteDatabase(zo);r.addEventListener("success",function(){return t(!0)}),r.addEventListener("blocked",function(){return t(!0)}),r.addEventListener("error",function(){return o(!1)})})]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ni=function(){function n(e,t){this.inMemoryCache=new xo,this.indexedDBCache=new Fa,this.logger=e,this.storeName=t}return n.prototype.handleDatabaseAccessError=function(e){if(e instanceof F&&e.errorCode===U.databaseUnavailable.code)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e},n.prototype.getItem=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:if(t=this.inMemoryCache.getItem(e),t)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.getItem(e)];case 2:return[2,r.sent()];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2,t]}})})},n.prototype.setItem=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(r.label){case 0:this.inMemoryCache.setItem(e,t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,t)];case 2:return r.sent(),[3,4];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2]}})})},n.prototype.removeItem=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:this.inMemoryCache.removeItem(e),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.indexedDBCache.removeItem(e)];case 2:return o.sent(),[3,4];case 3:return t=o.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2]}})})},n.prototype.getKeys=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),this.logger.verbose("In-memory cache is empty, now querying persistent storage."),[4,this.indexedDBCache.getKeys()];case 2:return[2,o.sent()];case 3:return t=o.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2,e]}})})},n.prototype.containsKey=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:if(t=this.inMemoryCache.containsKey(e),t)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.containsKey(e)];case 2:return[2,r.sent()];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2,t]}})})},n.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},n.prototype.clearPersistent=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.logger.verbose("Deleting persistent keystore"),[4,this.indexedDBCache.deleteDatabase()];case 1:return e=o.sent(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return t=o.sent(),this.handleDatabaseAccessError(t),[2,!1];case 3:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var so;(function(n){n.asymmetricKeys="asymmetricKeys",n.symmetricKeys="symmetricKeys"})(so||(so={}));var Va=function(){function n(e){this.logger=e,this.asymmetricKeys=new ni(this.logger,so.asymmetricKeys),this.symmetricKeys=new ni(this.logger,so.symmetricKeys)}return n.prototype.clear=function(){return z(this,void 0,void 0,function(){var e;return x(this,function(t){switch(t.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return t.sent(),[2,!0];case 3:return e=t.sent(),e instanceof Error?this.logger.error("Clearing keystore failed with error: "+e.message):this.logger.error("Clearing keystore failed with unknown error"),[2,!1];case 4:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ha=function(){function n(e,t,o){this.logger=e,this.browserCrypto=new ti(this.logger,o),this.b64Encode=new Zr,this.b64Decode=new La,this.guidGenerator=new Xr(this.browserCrypto),this.pkceGenerator=new za(this.browserCrypto),this.cache=new Va(this.logger),this.performanceClient=t}return n.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},n.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},n.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},n.prototype.generatePkceCodes=function(){return z(this,void 0,void 0,function(){return x(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},n.prototype.getPublicKeyThumbprint=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:return o=(t=this.performanceClient)===null||t===void 0?void 0:t.startMeasurement(R.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(n.EXTRACTABLE,n.POP_KEY_USAGES)];case 1:return r=g.sent(),[4,this.browserCrypto.exportJwk(r.publicKey)];case 2:return i=g.sent(),s={e:i.e,kty:i.kty,n:i.n},c=Ht.getSortedObjectString(s),[4,this.hashString(c)];case 3:return l=g.sent(),[4,this.browserCrypto.exportJwk(r.privateKey)];case 4:return h=g.sent(),[4,this.browserCrypto.importJwk(h,!1,["sign"])];case 5:return u=g.sent(),[4,this.cache.asymmetricKeys.setItem(l,{privateKey:u,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return g.sent(),o&&o.endMeasurement({success:!0}),[2,l]}})})},n.prototype.removeTokenBindingKey=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return o.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return t=o.sent(),[2,!t]}})})},n.prototype.clearKeystore=function(){return z(this,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},n.prototype.signJwt=function(e,t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l,h,u,g,f,w,C,P,M,j;return x(this,function(N){switch(N.label){case 0:return i=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.CryptoOptsSignJwt,o),[4,this.cache.asymmetricKeys.getItem(t)];case 1:if(s=N.sent(),!s)throw F.createSigningKeyNotFoundInStorageError(t);return[4,this.browserCrypto.exportJwk(s.publicKey)];case 2:return c=N.sent(),l=Ht.getSortedObjectString(c),h=this.b64Encode.urlEncode(JSON.stringify({kid:t})),u=fa.getShrHeaderString({kid:h,alg:c.alg}),g=this.b64Encode.urlEncode(u),e.cnf={jwk:JSON.parse(l)},f=this.b64Encode.urlEncode(JSON.stringify(e)),w=g+"."+f,C=Ht.stringToArrayBuffer(w),[4,this.browserCrypto.sign(s.privateKey,C)];case 3:return P=N.sent(),M=this.b64Encode.urlEncodeArr(new Uint8Array(P)),j=w+"."+M,i&&i.endMeasurement({success:!0}),[2,j]}})})},n.prototype.hashString=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return t=r.sent(),o=new Uint8Array(t),[2,this.b64Encode.urlEncodeArr(o)]}})})},n.POP_KEY_USAGES=["sign","verify"],n.EXTRACTABLE=!0,n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var oi=function(){function n(e,t){this.correlationId=t,this.measureName=n.makeMeasureName(e,t),this.startMark=n.makeStartMark(e,t),this.endMark=n.makeEndMark(e,t)}return n.makeMeasureName=function(e,t){return"msal.measure."+e+"."+t},n.makeStartMark=function(e,t){return"msal.start."+e+"."+t},n.makeEndMark=function(e,t){return"msal.end."+e+"."+t},n.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},n.flushMeasurements=function(e,t){if(n.supportsBrowserPerformance())try{t.forEach(function(o){var r=n.makeMeasureName(o.name,e),i=window.performance.getEntriesByName(r,"measure");i.length>0&&(window.performance.clearMeasures(r),window.performance.clearMarks(n.makeStartMark(r,e)),window.performance.clearMarks(n.makeEndMark(r,e)))})}catch{}},n.prototype.startMeasurement=function(){if(n.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},n.prototype.endMeasurement=function(){if(n.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},n.prototype.flushMeasurement=function(){if(n.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var t=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),t}}catch{}return null},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ka=function(n){xe(e,n);function e(t,o,r,i,s,c,l){var h=n.call(this,t,o,r,i,s,c)||this;return h.browserCrypto=new ti(h.logger,l),h.guidGenerator=new Xr(h.browserCrypto),h}return e.prototype.startPerformanceMeasuremeant=function(t,o){return new oi(t,o)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var t;return((t=document.visibilityState)===null||t===void 0?void 0:t.toString())||null},e.prototype.deleteIncompleteSubMeasurements=function(t){var o=this.eventsByCorrelationId.get(t.event.correlationId),r=o&&o.eventId===t.event.eventId,i=[];r&&(o!=null&&o.incompleteSubMeasurements)&&o.incompleteSubMeasurements.forEach(function(s){i.push(Q({},s))}),i.length>0&&oi.flushMeasurements(t.event.correlationId,i)},e.prototype.supportsBrowserPerformanceNow=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.now=="function"},e.prototype.startMeasurement=function(t,o){var r=this,i=this.getPageVisibility(),s=n.prototype.startMeasurement.call(this,t,o);return Q(Q({},s),{endMeasurement:function(c){var l=s.endMeasurement(Q({startPageVisibility:i,endPageVisibility:r.getPageVisibility()},c));return r.deleteIncompleteSubMeasurements(s),l},discardMeasurement:function(){s.discardMeasurement(),r.deleteIncompleteSubMeasurements(s),s.measurement.flushMeasurement()}})},e.prototype.setPreQueueTime=function(t,o){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for "+t);return}if(!o){this.logger.trace("BrowserPerformanceClient: correlationId for "+t+" not provided, unable to set telemetry queue time");return}var r=this.preQueueTimeByCorrelationId.get(o);r&&(this.logger.trace("BrowserPerformanceClient: Incomplete pre-queue "+r.name+" found",o),this.addQueueMeasurement(r.name,o,void 0,!0)),this.preQueueTimeByCorrelationId.set(o,{name:t,time:window.performance.now()})},e.prototype.addQueueMeasurement=function(t,o,r,i){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to add queue measurement for "+t);return}if(!o){this.logger.trace("BrowserPerformanceClient: correlationId for "+t+" not provided, unable to add queue measurement");return}var s=n.prototype.getPreQueueTime.call(this,t,o);if(s){var c=window.performance.now(),l=r||n.prototype.calculateQueuedTime.call(this,s,c);return n.prototype.addQueueMeasurement.call(this,t,o,l,i)}},e}(qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ga=function(){function n(e,t,o,r){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=o,this.cryptoObj=r}return n.prototype.loadExternalTokens=function(e,t,o){if(this.logger.info("TokenCache - loadExternalTokens called"),!t.id_token)throw F.createUnableToLoadTokenError("Please ensure server response includes id token.");var r=new It(t.id_token,this.cryptoObj),i,s;if(e.account){var c=this.loadAccount(r,e.account.environment,void 0,void 0,e.account.homeAccountId);i=new xn(c,this.loadIdToken(r,c.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,t,c.homeAccountId,e.account.environment,e.account.tenantId,o),this.loadRefreshToken(e,t,c.homeAccountId,e.account.environment))}else if(e.authority){var l=Un.generateAuthority(e.authority,e.azureCloudOptions),h={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};if(s=new Un(l,this.config.system.networkClient,this.storage,h,this.logger),o.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var c=this.loadAccount(r,s.hostnameAndPort,o.clientInfo,s.authorityType);i=new xn(c,this.loadIdToken(r,c.homeAccountId,s.hostnameAndPort,s.tenant),this.loadAccessToken(e,t,c.homeAccountId,s.hostnameAndPort,s.tenant,o),this.loadRefreshToken(e,t,c.homeAccountId,s.hostnameAndPort))}else if(t.client_info){this.logger.trace("TokenCache - homeAccountId from response");var c=this.loadAccount(r,s.hostnameAndPort,t.client_info,s.authorityType);i=new xn(c,this.loadIdToken(r,c.homeAccountId,s.hostnameAndPort,s.tenant),this.loadAccessToken(e,t,c.homeAccountId,s.hostnameAndPort,s.tenant,o),this.loadRefreshToken(e,t,c.homeAccountId,s.hostnameAndPort))}else throw F.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw F.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,r,i,s)},n.prototype.loadAccount=function(e,t,o,r,i){var s;if(i?s=i:r!==void 0&&o&&(s=Ue.generateHomeAccountId(o,r,this.logger,this.cryptoObj,e)),!s)throw F.createUnableToLoadTokenError("Unexpected missing homeAccountId");var c=o?Ue.createAccount(o,s,e,void 0,void 0,void 0,t):Ue.createGenericAccount(s,e,void 0,void 0,void 0,t);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(c),c;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadIdToken=function(e,t,o,r){var i=sn.createIdTokenEntity(t,o,e.rawToken,this.config.auth.clientId,r);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(i),i;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadAccessToken=function(e,t,o,r,i,s){if(!t.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!t.expires_in)throw F.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!s.extendedExpiresOn)throw F.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var c=new He(e.scopes).printScopes(),l=s.expiresOn||t.expires_in+new Date().getTime()/1e3,h=s.extendedExpiresOn,u=cn.createAccessTokenEntity(o,r,t.access_token,this.config.auth.clientId,i,c,l,h,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(u),u;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadRefreshToken=function(e,t,o,r){if(!t.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var i=yn.createRefreshTokenEntity(o,r,t.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(i),i;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.generateAuthenticationResult=function(e,t,o,r){var i,s,c,l=b.EMPTY_STRING,h=[],u=null,g;o!=null&&o.accessToken&&(l=o.accessToken.secret,h=He.fromString(o.accessToken.target).asArray(),u=new Date(Number(o.accessToken.expiresOn)*1e3),g=new Date(Number(o.accessToken.extendedExpiresOn)*1e3));var f=(t==null?void 0:t.claims.oid)||(t==null?void 0:t.claims.sub)||b.EMPTY_STRING,w=(t==null?void 0:t.claims.tid)||b.EMPTY_STRING;return{authority:r?r.canonicalAuthority:b.EMPTY_STRING,uniqueId:f,tenantId:w,scopes:h,account:o!=null&&o.account?o.account.getAccountInfo():null,idToken:t?t.rawToken:b.EMPTY_STRING,idTokenClaims:t?t.claims:{},accessToken:l,fromCache:!0,expiresOn:u,correlationId:e.correlationId||b.EMPTY_STRING,requestId:b.EMPTY_STRING,extExpiresOn:g,familyId:b.EMPTY_STRING,tokenType:((i=o==null?void 0:o.accessToken)===null||i===void 0?void 0:i.tokenType)||b.EMPTY_STRING,state:b.EMPTY_STRING,cloudGraphHostName:((s=o==null?void 0:o.account)===null||s===void 0?void 0:s.cloudGraphHostName)||b.EMPTY_STRING,msGraphHost:((c=o==null?void 0:o.account)===null||c===void 0?void 0:c.msGraphHost)||b.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var $a=function(n){xe(e,n);function e(t){var o=n.call(this,t)||this;return o.includeRedirectUri=!1,o}return e}(Or);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Qa=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,h,u,g)||this;return f.apiId=l,f}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!t.code)throw F.createAuthCodeRequiredError();return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Silent)];case 1:o=u.sent(),this.browserStorage.updateCacheEntries(o.state,o.nonce,o.authority,o.loginHint||b.EMPTY_STRING,o.account||null),r=this.initializeServerTelemetryManager(this.apiId),u.label=2;case 2:return u.trys.push([2,4,,5]),i=Q(Q({},o),{code:t.code}),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,t.correlationId),[4,this.getClientConfiguration(r,o.authority)];case 3:return s=u.sent(),c=new $a(s),this.logger.verbose("Auth code client created"),l=new Jr(c,this.browserStorage,i,this.logger,this.config.system,this.performanceClient),[2,l.handleCodeResponseFromServer({code:t.code,msgraph_host:t.msGraphHost,cloud_graph_host_name:t.cloudGraphHostName,cloud_instance_host_name:t.cloudInstanceHostName},o.state,c.authority,this.networkClient,!1)];case 4:throw h=u.sent(),h instanceof Y&&h.setCorrelationId(this.correlationId),r.cacheFailedRequest(h),this.browserStorage.cleanRequestByState(o.state),h;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wa=function(){function n(e){this.isBrowserEnvironment=typeof window<"u",this.config=Ra(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new Ao(this.config.system.loggerOptions,Uo,jn),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.isBrowserEnvironment?new Ka(this.config.auth.clientId,this.config.auth.authority,this.logger,Uo,jn,this.config.telemetry.application,this.config.system.cryptoOptions):new _a(this.config.auth.clientId,this.config.auth.authority,this.logger,Uo,jn,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new Ha(this.logger,this.performanceClient,this.config.system.cryptoOptions):Xn,this.eventHandler=new Ma(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new Bo(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):ba(this.config.auth.clientId,this.logger);var t={cacheLocation:Ae.MemoryStorage,temporaryCacheLocation:Ae.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};this.nativeInternalStorage=new Bo(this.config.auth.clientId,t,this.browserCrypto,this.logger),this.tokenCache=new Ga(this.config,this.browserStorage,this.logger,this.browserCrypto),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}return n.prototype.initialize=function(){return z(this,void 0,void 0,function(){var e,t,o,r,i;return x(this,function(s){switch(s.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(e=this.config.system.allowNativeBroker,t=this.performanceClient.startMeasurement(R.InitializeClientApplication),this.eventHandler.emitEvent(te.INITIALIZE_START),!e)return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),o=this,[4,ln.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)];case 2:return o.nativeExtensionProvider=s.sent(),[3,4];case 3:return r=s.sent(),this.logger.verbose(r),[3,4];case 4:return this.config.cache.claimsBasedCachingEnabled?[3,6]:(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),i=this.performanceClient.startMeasurement(R.ClearTokensAndKeysWithClaims),[4,this.browserStorage.clearTokensAndKeysWithClaims()]);case 5:s.sent(),i.endMeasurement({success:!0}),s.label=6;case 6:return this.initialized=!0,this.eventHandler.emitEvent(te.INITIALIZE_END),t.endMeasurement({allowNativeBroker:e,success:!0}),[2]}})})},n.prototype.handleRedirectPromise=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s,c,l,h,u=this;return x(this,function(g){return this.logger.verbose("handleRedirectPromise called"),Ee.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),t=this.getAllAccounts(),this.isBrowserEnvironment?(o=e||b.EMPTY_STRING,r=this.redirectResponse.get(o),typeof r>"u"?(this.eventHandler.emitEvent(te.HANDLE_REDIRECT_START,$.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),i=this.browserStorage.getCachedNativeRequest(),s=void 0,i&&ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),c=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,i.accountId,this.nativeInternalStorage,i.correlationId),s=c.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),l=this.browserStorage.getTemporaryCache(ue.CORRELATION_ID,!0)||b.EMPTY_STRING,h=this.createRedirectClient(l),s=h.handleRedirectPromise(e)),r=s.then(function(f){if(f){var w=t.length<u.getAllAccounts().length;w?(u.eventHandler.emitEvent(te.LOGIN_SUCCESS,$.Redirect,f),u.logger.verbose("handleRedirectResponse returned result, login success")):(u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Redirect,f),u.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return u.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,$.Redirect),f}).catch(function(f){throw t.length>0?u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Redirect,null,f):u.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Redirect,null,f),u.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,$.Redirect),f}),this.redirectResponse.set(o,r)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,r]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},n.prototype.acquireTokenRedirect=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s,c=this;return x(this,function(l){return t=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",t),this.preflightBrowserEnvironmentCheck($.Redirect),o=this.getAllAccounts().length>0,o?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Redirect,e):this.eventHandler.emitEvent(te.LOGIN_START,$.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(i=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),r=i.acquireTokenRedirect(e).catch(function(h){if(h instanceof Nt&&h.isFatal()){c.nativeExtensionProvider=void 0;var u=c.createRedirectClient(e.correlationId);return u.acquireToken(e)}else if(h instanceof gt){c.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var u=c.createRedirectClient(e.correlationId);return u.acquireToken(e)}throw c.browserStorage.setInteractionInProgress(!1),h})):(s=this.createRedirectClient(e.correlationId),r=s.acquireToken(e)),[2,r.catch(function(h){throw o?c.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Redirect,null,h):c.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Redirect,null,h),h})]})})},n.prototype.acquireTokenPopup=function(e){var t=this,o=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(R.AcquireTokenPopup,o);try{this.logger.verbose("acquireTokenPopup called",o),this.preflightBrowserEnvironmentCheck($.Popup)}catch(l){return Promise.reject(l)}var i=this.getAllAccounts();i.length>0?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Popup,e):this.eventHandler.emitEvent(te.LOGIN_START,$.Popup,e);var s;if(this.canUseNative(e))s=this.acquireTokenNative(e,ke.acquireTokenPopup).then(function(l){return t.browserStorage.setInteractionInProgress(!1),r.endMeasurement({success:!0,isNativeBroker:!0,requestId:l.requestId}),l}).catch(function(l){if(l instanceof Nt&&l.isFatal()){t.nativeExtensionProvider=void 0;var h=t.createPopupClient(e.correlationId);return h.acquireToken(e)}else if(l instanceof gt){t.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var h=t.createPopupClient(e.correlationId);return h.acquireToken(e)}throw t.browserStorage.setInteractionInProgress(!1),l});else{var c=this.createPopupClient(e.correlationId);s=c.acquireToken(e)}return s.then(function(l){var h=i.length<t.getAllAccounts().length;return h?t.eventHandler.emitEvent(te.LOGIN_SUCCESS,$.Popup,l):t.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Popup,l),r.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),r.endMeasurement({success:!0,requestId:l.requestId}),l}).catch(function(l){return i.length>0?t.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Popup,null,l):t.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Popup,null,l),r.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),Promise.reject(l)})},n.prototype.trackPageVisibilityWithMeasurement=function(){var e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))},n.prototype.ssoSilent=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i,s,c=this;return x(this,function(l){return o=this.getRequestCorrelationId(e),r=Q(Q({},e),{prompt:e.prompt,correlationId:o}),this.preflightBrowserEnvironmentCheck($.Silent),this.ssoSilentMeasurement=this.performanceClient.startMeasurement(R.SsoSilent,o),(t=this.ssoSilentMeasurement)===null||t===void 0||t.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",o),this.eventHandler.emitEvent(te.SSO_SILENT_START,$.Silent,r),this.canUseNative(r)?i=this.acquireTokenNative(r,ke.ssoSilent).catch(function(h){if(h instanceof Nt&&h.isFatal()){c.nativeExtensionProvider=void 0;var u=c.createSilentIframeClient(r.correlationId);return u.acquireToken(r)}throw h}):(s=this.createSilentIframeClient(r.correlationId),i=s.acquireToken(r)),[2,i.then(function(h){var u,g;return c.eventHandler.emitEvent(te.SSO_SILENT_SUCCESS,$.Silent,h),(u=c.ssoSilentMeasurement)===null||u===void 0||u.addStaticFields({accessTokenSize:h.accessToken.length,idTokenSize:h.idToken.length}),(g=c.ssoSilentMeasurement)===null||g===void 0||g.endMeasurement({success:!0,isNativeBroker:h.fromNativeBroker,requestId:h.requestId}),h}).catch(function(h){var u;throw c.eventHandler.emitEvent(te.SSO_SILENT_FAILURE,$.Silent,null,h),(u=c.ssoSilentMeasurement)===null||u===void 0||u.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h}).finally(function(){document.removeEventListener("visibilitychange",c.trackPageVisibilityWithMeasurement)})]})})},n.prototype.acquireTokenByCode=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s=this;return x(this,function(c){t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck($.Silent),this.logger.trace("acquireTokenByCode called",t),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_START,$.Silent,e),o=this.performanceClient.startMeasurement(R.AcquireTokenByCode,e.correlationId);try{if(e.code&&e.nativeAccountId)throw F.createSpaCodeAndNativeAccountIdPresentError();if(e.code)return r=e.code,i=this.hybridAuthCodeResponses.get(r),i?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),o.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),i=this.acquireTokenByCodeAsync(Q(Q({},e),{correlationId:t})).then(function(l){return s.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_SUCCESS,$.Silent,l),s.hybridAuthCodeResponses.delete(r),o.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),o.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),l}).catch(function(l){throw s.hybridAuthCodeResponses.delete(r),s.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,$.Silent,null,l),o.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l}),this.hybridAuthCodeResponses.set(r,i)),[2,i];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,ke.acquireTokenByCode,e.nativeAccountId).catch(function(l){throw l instanceof Nt&&l.isFatal()&&(s.nativeExtensionProvider=void 0),l})];throw F.createUnableToAcquireTokenFromNativePlatformError()}else throw F.createAuthCodeOrNativeAccountIdRequiredError()}catch(l){throw this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,$.Silent,null,l),o.endMeasurement({errorCode:l instanceof Y&&l.errorCode||void 0,subErrorCode:l instanceof Y&&l.subError||void 0,success:!1}),l}return[2]})})},n.prototype.acquireTokenByCodeAsync=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i=this;return x(this,function(s){switch(s.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(R.AcquireTokenByCodeAsync,e.correlationId),(t=this.acquireTokenByCodeAsyncMeasurement)===null||t===void 0||t.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),o=this.createSilentAuthCodeClient(e.correlationId),[4,o.acquireToken(e).then(function(c){var l;return(l=i.acquireTokenByCodeAsyncMeasurement)===null||l===void 0||l.endMeasurement({success:!0,fromCache:c.fromCache,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),c}).catch(function(c){var l;throw(l=i.acquireTokenByCodeAsyncMeasurement)===null||l===void 0||l.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),c}).finally(function(){document.removeEventListener("visibilitychange",i.trackPageVisibilityWithMeasurement)})];case 1:return r=s.sent(),[2,r]}})})},n.prototype.acquireTokenFromCache=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){switch(this.performanceClient.addQueueMeasurement(R.AcquireTokenFromCache,t.correlationId),o.cacheLookupPolicy){case Xe.Default:case Xe.AccessToken:case Xe.AccessTokenAndRefreshToken:return[2,e.acquireToken(t)];default:throw K.createRefreshRequiredError()}return[2]})})},n.prototype.acquireTokenByRefreshToken=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(this.performanceClient.addQueueMeasurement(R.AcquireTokenByRefreshToken,e.correlationId),t.cacheLookupPolicy){case Xe.Default:case Xe.AccessTokenAndRefreshToken:case Xe.RefreshToken:case Xe.RefreshTokenAndNetwork:return o=this.createSilentRefreshClient(e.correlationId),this.performanceClient.setPreQueueTime(R.SilentRefreshClientAcquireToken,e.correlationId),[2,o.acquireToken(e)];default:throw K.createRefreshRequiredError()}return[2]})})},n.prototype.acquireTokenBySilentIframe=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return this.performanceClient.addQueueMeasurement(R.AcquireTokenBySilentIframe,e.correlationId),t=this.createSilentIframeClient(e.correlationId),this.performanceClient.setPreQueueTime(R.SilentIframeClientAcquireToken,e.correlationId),[2,t.acquireToken(e)]})})},n.prototype.logout=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return t=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),[2,this.logoutRedirect(Q({correlationId:t},e))]})})},n.prototype.logoutRedirect=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){return t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck($.Redirect),o=this.createRedirectClient(t),[2,o.logout(e)]})})},n.prototype.logoutPopup=function(e){try{var t=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck($.Popup);var o=this.createPopupClient(t);return o.logout(e)}catch(r){return Promise.reject(r)}},n.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},n.prototype.getAccountByUsername=function(e){if(this.logger.trace("getAccountByUsername called"),!e)return this.logger.warning("getAccountByUsername: No username provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({username:e});return t?(this.logger.verbose("getAccountByUsername: Account matching username found, returning"),this.logger.verbosePii("getAccountByUsername: Returning signed-in accounts matching username: "+e),t):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},n.prototype.getAccountByHomeId=function(e){if(this.logger.trace("getAccountByHomeId called"),!e)return this.logger.warning("getAccountByHomeId: No homeAccountId provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({homeAccountId:e});return t?(this.logger.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),this.logger.verbosePii("getAccountByHomeId: Returning signed-in accounts matching homeAccountId: "+e),t):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},n.prototype.getAccountByLocalId=function(e){if(this.logger.trace("getAccountByLocalId called"),!e)return this.logger.warning("getAccountByLocalId: No localAccountId provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({localAccountId:e});return t?(this.logger.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),this.logger.verbosePii("getAccountByLocalId: Returning signed-in accounts matching localAccountId: "+e),t):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},n.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},n.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},n.prototype.preflightBrowserEnvironmentCheck=function(e,t){if(t===void 0&&(t=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),Ee.blockNonBrowserEnvironment(this.isBrowserEnvironment),Ee.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),Ee.blockReloadInHiddenIframes(),Ee.blockAcquireTokenInPopups(),Ee.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===$.Redirect&&this.config.cache.cacheLocation===Ae.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw ao.createInMemoryRedirectUnavailableError();(e===$.Redirect||e===$.Popup)&&this.preflightInteractiveRequest(t)},n.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),Ee.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},n.prototype.acquireTokenNative=function(e,t,o){return z(this,void 0,void 0,function(){var r;return x(this,function(i){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw F.createNativeConnectionNotEstablishedError();return r=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,o||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,r.acquireToken(e)]})})},n.prototype.canUseNative=function(e,t){if(this.logger.trace("canUseNative called"),!ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case Ve.NONE:case Ve.CONSENT:case Ve.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = "+e.prompt+" is not compatible with native flow, returning false"),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},n.prototype.getNativeAccountId=function(e){var t=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return t&&t.nativeAccountId||""},n.prototype.createPopupClient=function(e){return new Ea(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createRedirectClient=function(e){return new Ca(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createSilentIframeClient=function(e){return new Na(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createSilentCacheClient=function(e){return new Yr(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.createSilentRefreshClient=function(e){return new Pa(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.createSilentAuthCodeClient=function(e){return new Qa(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},n.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},n.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},n.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},n.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},n.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},n.prototype.getTokenCache=function(){return this.tokenCache},n.prototype.getLogger=function(){return this.logger},n.prototype.setLogger=function(e){this.logger=e},n.prototype.initializeWrapperLibrary=function(e,t){this.browserStorage.setWrapperMetadata(e,t)},n.prototype.setNavigationClient=function(e){this.navigationClient=e},n.prototype.getConfiguration=function(){return this.config},n.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():b.EMPTY_STRING},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ya=function(n){xe(e,n);function e(t){var o=n.call(this,t)||this;return o.astsAsyncMeasurement=void 0,o.activeSilentTokenRequests=new Map,o.trackPageVisibility=o.trackPageVisibility.bind(o),o}return e.prototype.loginRedirect=function(t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){return o=this.getRequestCorrelationId(t),this.logger.verbose("loginRedirect called",o),[2,this.acquireTokenRedirect(Q({correlationId:o},t||Hr))]})})},e.prototype.loginPopup=function(t){var o=this.getRequestCorrelationId(t);return this.logger.verbose("loginPopup called",o),this.acquireTokenPopup(Q({correlationId:o},t||Hr))},e.prototype.acquireTokenSilent=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u=this;return x(this,function(g){if(o=this.getRequestCorrelationId(t),r=this.performanceClient.startMeasurement(R.AcquireTokenSilent,o),r.addStaticFields({cacheLookupPolicy:t.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck($.Silent),this.logger.verbose("acquireTokenSilent called",o),i=t.account||this.getActiveAccount(),!i)throw F.createNoAccountError();return s={clientId:this.config.auth.clientId,authority:t.authority||b.EMPTY_STRING,scopes:t.scopes,homeAccountIdentifier:i.homeAccountId,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid},c=JSON.stringify(s),l=this.activeSilentTokenRequests.get(c),typeof l>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",o),this.performanceClient.setPreQueueTime(R.AcquireTokenSilentAsync,o),h=this.acquireTokenSilentAsync(Q(Q({},t),{correlationId:o}),i).then(function(f){return u.activeSilentTokenRequests.delete(c),r.addStaticFields({accessTokenSize:f.accessToken.length,idTokenSize:f.idToken.length}),r.endMeasurement({success:!0,fromCache:f.fromCache,isNativeBroker:f.fromNativeBroker,cacheLookupPolicy:t.cacheLookupPolicy,requestId:f.requestId}),f}).catch(function(f){throw u.activeSilentTokenRequests.delete(c),r.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f}),this.activeSilentTokenRequests.set(c,h),[2,h]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",o),r.discardMeasurement(),[2,l])})})},e.prototype.trackPageVisibility=function(){this.astsAsyncMeasurement&&(this.logger.info("Perf: Visibility change detected"),this.astsAsyncMeasurement.increment({visibilityChangeCount:1}))},e.prototype.acquireTokenSilentAsync=function(t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l,h,u=this;return x(this,function(g){switch(g.label){case 0:return this.performanceClient.addQueueMeasurement(R.AcquireTokenSilentAsync,t.correlationId),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Silent,t),this.astsAsyncMeasurement=this.performanceClient.startMeasurement(R.AcquireTokenSilentAsync,t.correlationId),(r=this.astsAsyncMeasurement)===null||r===void 0||r.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibility),ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,t.authenticationScheme)&&o.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),s=Q(Q({},t),{account:o}),i=this.acquireTokenNative(s,ke.acquireTokenSilent_silentFlow).catch(function(f){return z(u,void 0,void 0,function(){var w;return x(this,function(C){if(f instanceof Nt&&f.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,w=this.createSilentIframeClient(t.correlationId),[2,w.acquireToken(t)];throw f})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),c=this.createSilentCacheClient(t.correlationId),this.performanceClient.setPreQueueTime(R.InitializeSilentRequest,t.correlationId),[4,c.initializeSilentRequest(t,o)];case 2:l=g.sent(),h=Q(Q({},t),{cacheLookupPolicy:t.cacheLookupPolicy||Xe.Default}),this.performanceClient.setPreQueueTime(R.AcquireTokenFromCache,l.correlationId),i=this.acquireTokenFromCache(c,l,h).catch(function(f){if(h.cacheLookupPolicy===Xe.AccessToken)throw f;return Ee.blockReloadInHiddenIframes(),u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_NETWORK_START,$.Silent,l),u.performanceClient.setPreQueueTime(R.AcquireTokenByRefreshToken,l.correlationId),u.acquireTokenByRefreshToken(l,h).catch(function(w){var C=w instanceof rn,P=w instanceof gt,M=w.errorCode===bn.noTokensFoundError.code,j=w.errorCode===_t.INVALID_GRANT_ERROR;if((!C||!j||P||h.cacheLookupPolicy===Xe.AccessTokenAndRefreshToken||h.cacheLookupPolicy===Xe.RefreshToken)&&h.cacheLookupPolicy!==Xe.Skip&&!M)throw w;return u.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",t.correlationId),u.performanceClient.setPreQueueTime(R.AcquireTokenBySilentIframe,l.correlationId),u.acquireTokenBySilentIframe(l)})}),g.label=3;case 3:return[2,i.then(function(f){var w;return u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Silent,f),(w=u.astsAsyncMeasurement)===null||w===void 0||w.endMeasurement({success:!0,fromCache:f.fromCache,isNativeBroker:f.fromNativeBroker,requestId:f.requestId}),f}).catch(function(f){var w;throw u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Silent,null,f),(w=u.astsAsyncMeasurement)===null||w===void 0||w.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f}).finally(function(){document.removeEventListener("visibilitychange",u.trackPageVisibility)})]}})})},e}(Wa);class Ja extends tt.WebPlugin{async login(e){const t=this.createContext(e);try{return await this.acquireTokenSilently(t,e.scopes).catch(()=>this.acquireTokenInteractively(t,e.scopes))}catch(o){throw console.error("MSAL: Error occurred while logging in",o),o}}logout(e){const t=this.createContext(e);return t.getAllAccounts()[0]?t.logoutPopup():Promise.reject(new Error("Nothing to sign out from."))}logoutAll(e){return this.logout(e)}createContext(e){var t,o,r;const i={auth:{clientId:e.clientId,domainHint:e.domainHint,authority:(t=e.authorityUrl)!==null&&t!==void 0?t:`https://login.microsoftonline.com/${(o=e.tenant)!==null&&o!==void 0?o:"common"}`,knownAuthorities:e.knownAuthorities,redirectUri:(r=e.redirectUri)!==null&&r!==void 0?r:this.getCurrentUrl()},cache:{cacheLocation:"localStorage"}};return new Ya(i)}getCurrentUrl(){return window.location.href.split(/[?#]/)[0]}async acquireTokenInteractively(e,t){const{accessToken:o,idToken:r}=await e.acquireTokenPopup({scopes:t,prompt:"select_account"});return{accessToken:o,idToken:r,scopes:t}}async acquireTokenSilently(e,t){const{accessToken:o,idToken:r}=await e.acquireTokenSilent({scopes:t,account:e.getAllAccounts()[0]});return{accessToken:o,idToken:r,scopes:t}}}const Xa=tt.registerPlugin("MsAuthPlugin",{web:()=>new Ja}),ri={data(){return{microsoftLoad:!1,microsoftSSOLoad:!1}},computed:{displayMicrosoftSSOLogin(){return!1}},methods:{async microsoftLogin(n,e={}){var r;n==="sso"?this.microsoftSSOLoad=!0:this.microsoftLoad=!0;const[t,o]=await fe(Xa.login({clientId:n==="sso"?e.clientID:"9cd47053-080a-4df8-8fd8-ca4389163fde",tenant:n==="sso"?e.tenant:"consumers",scopes:["User.Read"],knownAuthorities:[],keyHash:"4+5wCp8QcLptlO0aeP5RDTTOWyg=",redirectUri:`${window.location.origin}/login`}));if(t)return console.error("MsAuthPlugin Error: "+JSON.stringify(t)),this.microsoftLoad=!1;if(this.referral&&(o.ref=this.referral),this.display==="popup"&&(o.response_type="code"),o&&(o.accessToken||o.idToken)){const[i,s]=await fe(Fe.microsoftSDK(o,this.$storex));if(i)return this.microsoftLoad=!1,this.microsoftSSOLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(i);if(s.data.success){if(this.display==="popup")return(r=window.parent)==null?void 0:r.postMessage({code:s.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(s),await this.getLoggedInAccounts(),this.loginSuccess({...s,isModal:this.isModal}),setTimeout(()=>{this.microsoftLoad=!1,this.microsoftSSOLoad=!1},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)}else this.microsoftLoad=!1,this.microsoftSSOLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})}}},Za=n=>{try{return window.crypto.getRandomValues(n)}catch{for(let t=0;t<n.length;t++)n[t]=Math.floor(Math.random()*256);return n}},es=async n=>{try{return await window.crypto.subtle.digest("SHA-256",n)}catch{const t=rr.sha256(n);return new Uint8Array(t.match(/.{1,2}/g).map(o=>parseInt(o,16))).buffer}},ts=async(n,e,t)=>{try{return await window.crypto.subtle.encrypt(n,e,t)}catch{throw new Error("Encryption not supported in this environment")}},ns=async(n,e,t)=>{try{return await window.crypto.subtle.decrypt(n,e,t)}catch{throw new Error("Decryption not supported in this environment")}},Fn={getFirstBrowserLanguage(){let n=window.navigator,e=["language","browserLanguage","systemLanguage","userLanguage"],t,o;if(Array.isArray(n.languages)){for(t=0;t<n.languages.length;t++)if(o=n.languages[t],o&&o.length)return o.slice(0,2)}for(t=0;t<e.length;t++)if(o=n[e[t]],o&&o.length)return o.slice(0,2);return null},compareLangKeys(){const n=Object.keys(hr.state),e=Object.keys(mr.state),t=Object.keys(fr.state),o=Object.keys(br.state),r=Object.keys(_r.state),i=Object.keys(gr.state),s=Object.keys(vr.state),c=Object.keys(yr.state);console.log("In en but not in de",n.filter(l=>!e.includes(l))),console.log("In de but not in en",e.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in es",n.filter(l=>!t.includes(l))),console.log("In es but not in en",t.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in kr",n.filter(l=>!o.includes(l))),console.log("In kr but not in en",o.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in it",n.filter(l=>!r.includes(l))),console.log("In it but not in en",r.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in fr",n.filter(l=>!i.includes(l))),console.log("In fr but not in en",i.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in sr",n.filter(l=>!s.includes(l))),console.log("In sr but not in en",s.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in tr",n.filter(l=>!c.includes(l))),console.log("In tr but not in en",c.filter(l=>!n.includes(l))),console.log()},base64ImageToBlob(n){const e=n.split(";base64,"),t=e[0].split(":")[1],o=window.atob(e[1]),r=new Uint8Array(o.length);for(let i=0;i<o.length;++i)r[i]=o.charCodeAt(i);return new Blob([r],{type:t})},blobToBase64(n){const e=new FileReader;return e.readAsDataURL(n),new Promise(t=>{e.onloadend=()=>{t(e.result)}})},base64toFile(n,e){for(var t=n.split(","),o=t[0].match(/:(.*?);/)[1],r=atob(t[1]),i=r.length,s=new Uint8Array(i);i--;)s[i]=r.charCodeAt(i);return new File([s],e,{type:o})},fileToBase64(n){new Promise((e,t)=>{const o=new FileReader;o.readAsDataURL(n),o.onload=()=>e(o.result),o.onerror=r=>t(r)})},getUTMParams(n){let e={};return n.utm_source&&(e.utm_source=n.utm_source),n.utm_medium&&(e.utm_medium=n.utm_medium),n.utm_campaign&&(e.utm_campaign=n.utm_campaign),n.utm_term&&(e.utm_term=n.utm_term),n.utm_content&&(e.utm_content=n.utm_content),e},cropCardScan(n,e){const t=new window.Image,o=document.createElement("canvas"),r=o.getContext("2d");t.src="data:image/jpeg;base64,"+n,t.onload=()=>{const i=t.width,s=t.width/1.65,c=0,l=t.height/2-s/2,h=i,u=s;o.width=h,o.height=u,r.drawImage(t,c,l,i,s,0,0,h,u);const g=o.toDataURL();return e(g),g}},generateRandomString(n){let e=new Uint32Array(n);return Za(e),Array.from(e,t=>("0"+t.toString(16)).substr(-2)).join("")},async pkceChallengeFromVerifier(n){try{const t=new TextEncoder().encode(n),o=await es(t);return btoa(String.fromCharCode.apply(null,new Uint8Array(o))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch{const t=rr.sha256(n);return btoa(String.fromCharCode.apply(null,new Uint8Array(t.match(/.{1,2}/g).map(r=>parseInt(r,16))))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},async encryptAES(n,e,t){try{let r=new TextEncoder().encode(t);return await ts({name:"AES-CBC",iv:e},n,r)}catch(o){throw o}},async decryptAES(n,e,t){try{const o=l=>Uint8Array.from(atob(l),h=>h.charCodeAt(0));t=t.replace(/ /g,"+");const r=new TextEncoder,i=new TextDecoder;n=r.encode(n),e=r.encode(e),t=o(t);const s=await window.crypto.subtle.importKey("raw",n,"AES-CBC",!0,["encrypt","decrypt"]);let c=await ns({name:"AES-CBC",iv:e},s,t);return c=i.decode(c),c=c.replace(/ /g,"+"),c=atob(c),c}catch(o){throw o}}},ii={data(){return{oktaAuth:null}},computed:{},watch:{},methods:{async exchangeCode(n){var r,i;let[e,t]=await fe(mo.post(n.domain+"/v1/token",new URLSearchParams({code:n.code,client_id:n.clientID,grant_type:"authorization_code",redirect_uri:this.isNative?"tapni://t.link/callback/okta":location.origin+"/callback/okta",code_verifier:localStorage.getItem("pkce_code_verifier")})));if(e)return this.errorHandler(e);localStorage.removeItem("pkce_code_verifier");let o={accessToken:(r=t.data)==null?void 0:r.access_token,domain:n.domain};if(this.display==="popup"&&(o.response_type="code"),[e,t]=await fe(Fe.oktaSDK(o,this.$storex)),e)return this.oktaLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(e);if(t.data.success){if(this.display==="popup")return(i=window.parent)==null?void 0:i.postMessage({code:t.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(t),await this.getLoggedInAccounts(),this.$router.push("/"+t.data.data.username+"#edit"),setTimeout(()=>{this.appleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)},async oktaLogin(n){const e=tt.Capacitor.getPlatform()||"web";let t=btoa("domain="+n.domain+"&client_id="+n.clientID+"&platform="+e+"&rand="+Fn.generateRandomString(28)),o=Fn.generateRandomString(28);localStorage.setItem("pkce_code_verifier",o);let r=await Fn.pkceChallengeFromVerifier(o),i=n.domain+"/v1/authorize",s;this.isNative?s="tapni://t.link/callback/okta":s=location.origin+"/callback/okta";let c=i+"?response_type=code&client_id="+encodeURIComponent(n.clientID)+"&state="+encodeURIComponent(t)+"&scope="+encodeURIComponent("openid email profile")+"&redirect_uri="+encodeURIComponent(s)+"&code_challenge="+encodeURIComponent(r)+"&code_challenge_method=S256",l=this,h;window.addEventListener("message",async u=>{if(!this.allowedOriginsAuth.includes(u.origin))return console.error("Origin is not allowed!");u.data.type==="okta"&&(h=u.data.code,await l.exchangeCode({domain:n.domain,code:h,clientID:n.clientID}))},{once:!0}),this.isNative?await Vn.Browser.open({url:c,presentationStyle:"popover"}):window.open(c,"popup","width=600,height=600")},async handleOktaRedirect(){let n=this.$route.query.code,e,t,o,r,i={type:"okta"};if(n&&(i.code=n),this.$route.query.state){e=this.$route.query.state,e=atob(e);const s=new URLSearchParams(e);t=s.get("client_id"),o=s.get("domain"),r=s.get("platform")}window.opener?(window.opener.postMessage(i,location.origin),window.close()):(this.isNative&&this.isiOS&&await Vn.Browser.close(),X.$emit("ssoEvent",{name:"setLoading",data:!0}),n&&t&&o&&await this.exchangeCode({code:n,clientID:t,domain:o,platform:r}),localStorage.removeItem("pkce_code_verifier"),X.$emit("ssoEvent",{name:"setLoading",data:!1}))}}},ai={data(){return{code_verifier:"",code_challenge:"",shouldCloseWindow:!1,popupWindow:null,checkInterval:null}},computed:{},watch:{"$route.path"(n){n==="/callback/saml"&&this.handleSamlRedirect(n)}},methods:{closeWindow(){try{window.close()}catch{}},async samlLogin(n){this.code_verifier=Fn.generateRandomString(28),localStorage.setItem("pkce_code_verifier",this.code_verifier),this.code_challenge=await Fn.pkceChallengeFromVerifier(this.code_verifier);const e=tt.Capacitor.getPlatform();let t=`code_challenge=${this.code_challenge}&platform=${e}&redirect_uri=${location.origin+(this.display==="npm"?"/app":"")+"/callback/saml"}&realm=${this.realm}&display=${this.display}`,o=btoa(t);n=`${n}&RelayState=${o}`;let r=this;window.addEventListener("message",async i=>{var l;if(!this.allowedOriginsAuth.includes(i.origin))return console.error("Origin is not allowed! "+i.origin);const s=i.data.code,c=localStorage.getItem("pkce_code_verifier");if(s){if(r.display==="popup")return(l=window.parent)==null?void 0:l.postMessage({code:s,state:i.data.state,code_verifier:c},"*");c&&(await r.exchangeAuthCode({code:i.data.code,code_verifier:c}),localStorage.removeItem("pkce_code_verifier"))}},{once:!0}),this.isNative?this.popupWindow=await Vn.Browser.open({url:n,presentationStyle:"popover"}):(this.checkInterval=setInterval(()=>{var c;const i=localStorage.getItem("auth_code"),s=localStorage.getItem("pkce_code_verifier");i&&(clearInterval(this.checkInterval),localStorage.removeItem("auth_code"),localStorage.removeItem("pkce_code_verifier"),(c=window.parent)==null||c.postMessage({code:i,state:this.$route.query.state,code_verifier:s},"*"),s&&(this.display==="npm"||this.display==="redirect")&&this.exchangeAuthCode({code:i,code_verifier:s}))},500),this.popupWindow=window.open(window.location.origin+(this.display==="npm"?"/app":"")+"/callback/redirect?uri="+btoa(n),"popup","width=600,height=600"))},async handleSamlRedirect(){var e;let n;if(this.$route.query.code&&(n=this.$route.query.code),window.opener)window.opener.postMessage({type:"saml",code:n},"*"),this.closeWindow();else{if(this.isNative&&this.isiOS&&await Vn.Browser.close(),X.$emit("ssoEvent",{name:"setLoading",data:!0}),n&&((this.display==="popup"||this.display==="npm")&&(localStorage.setItem("auth_code",n),this.shouldCloseWindow=!0,(e=window.parent)==null||e.postMessage({code:n,state:this.$route.query.state},"*"),this.closeWindow()),this.display==="redirect"||location.host==="auth.tapni.com")){let t="https://auth.tapni.com/callback/auth";return this.realm==="dashboard"&&(t="https://business.tapni.com/login"),location.href=t+"?code="+n+"&code_verifier="+localStorage.getItem("pkce_code_verifier")}X.$emit("ssoEvent",{name:"setLoading",data:!1})}}}},si={data(){return{isQrCodeLogin:!1,qrCode:null,qrCodeHash:null,qrCodeRefreshInterval:null,poolingInterval:null}},props:{isModal:{type:Boolean,required:!1,default:!1}},computed:{displayQRLogin(){return this.$route.name==="AuthLogin"&&this.display!=="npm"}},mounted(){this.$route.name==="AuthQR"&&this.changeLoginToQr()},methods:{async changeLoginToQr(){this.isQrCodeLogin=!0,await a.nextTick(),await this.initQrCodeLogin()},generateRandomHash(){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=n.length;let t="";const o=new Uint32Array(32);return window.crypto.getRandomValues(o),o.forEach(r=>{t+=n.charAt(r%e)}),t},refreshQrCode(){var n,e;this.qrCode&&((e=(n=document.getElementById("qrCodeContainer"))==null?void 0:n.childNodes[0])==null||e.remove()),this.qrCodeHash=this.generateRandomHash(),this.qrCode=new ir({width:300,height:300,type:"png",image:"",imageOptions:{margin:15},data:this.qrCodeHash,dotsOptions:{type:"extra-rounded",color:"#000000"},cornersSquareOptions:{type:"extra-rounded",color:"#000000"},cornersDotOptions:{type:"",color:"#000000"},backgroundOptions:{color:"#ffffff00"}}),this.qrCode.append(document.getElementById("qrCodeContainer"))},async startQrCodePooling(){this.poolingInterval=setInterval(async()=>{const[n,e]=await fe(ko.qrCodePooling({qrToken:this.qrCodeHash},this.$storex));if(n)return this.errorHandler(n);e.data.auth_code&&(this.display!=="popup"&&(this.loginSetup({...e,isModal:this.isModal}),await this.getLoggedInAccounts()),this.loginSuccess({...e,isModal:this.isModal}),clearInterval(this.poolingInterval),clearInterval(this.qrCodeRefreshInterval))},2e3)},async initQrCodeLogin(){this.refreshQrCode(),await a.nextTick(),await this.startQrCodePooling(),this.qrCodeRefreshInterval=setInterval(()=>{this.refreshQrCode()},6e4)}}},os={name:"AuthLogin",mixins:[Tr,Sr,ri,ii,ai,We,si],data(){return{loading:!0,submitted:!1,emailOrUsername:"",password:"",captcha:"",revealPassword:!1,emailLogin:!0,isSSOLogin:!1,otpToken:"",showOTP:!1}},computed:{displayFormLogin(){return this.emailLogin},displayResetPasswordLogin(){return!this.isSSOLogin},displayRegisterLogin(){return!0}},async mounted(){if(!this.isModal){if(this.$route.path==="/login/callback/okta")return await this.handleOktaRedirect();if(this.$route.path==="/login/callback/saml")return await this.handleSamlRedirect();this.$route.query.qrLogin&&this.changeLoginToQr(),setTimeout(()=>{this.$storex&&this.$storex.token?this.$router.push(this.home):X.$emit("ssoEvent",{name:"setLoading",data:!1})},2500)}X.$on("toggleOTPField",()=>{this.showOTP=!this.showOTP})},methods:{async ssoLoginSubmit(){this.loading=!0;const n=await this.getCompanyBySSOEmail({email:this.emailOrUsername});this.loading=!1;let e;if(!(!n||n.error))if(e=Object.keys(n.sso),e.length)e[0]==="azure"&&this.microsoftLogin("sso",n.sso.azure.sso),e[0]==="okta"&&this.oktaLogin(n.sso.okta.sso),e[0]==="saml"&&this.samlLogin(n.sso.saml.sso.loginUrl);else return this.errorSnack(this.ssoLang[this.appLanguage].no_sso_logins)},async submit(){if(this.submitted)return;if(this.submitted=!0,this.isSSOLogin)return this.ssoLoginSubmit();this.emailOrUsername=this.emailOrUsername.trim();let e={response_type:this.$route.query.response_type||"token",isModal:this.isModal,captcha:this.captcha,password:this.password,otpToken:this.otpToken};this.emailOrUsername.indexOf("@")!==-1?e.email=this.emailOrUsername:e.username=this.emailOrUsername;const[t,o]=await fe(this.login(e));t&&console.error(t),this.submitted=!1,o===!0&&(this.emailOrUsername="",this.password="")},close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},createAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalRegister",data:{}})}},watch:{emailOrUsername(n){n.includes("@")&&(this.$storex.verifyEmail=n)},"$route.path":async function(n){if(n==="/login/callback/okta")return await this.handleOktaRedirect();if(n==="/login/callback/saml")return await this.handleSamlRedirect()}}},rs={class:"bold no-bottom center-text text-[22px]",style:{"margin-top":"63px"}},is={key:0},as={key:1},ss={key:1},cs={class:"page-login-field half-top"},ls=["placeholder"],ds={key:0,class:"page-login-field half-bottom"},us=["type","placeholder"],ps={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},hs={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},ms={key:1,class:"page-login-field half-bottom"},fs=["placeholder"],gs={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},_s={key:0},vs={key:1,class:"button--loading button__loader"},ys={key:0},bs={key:1,class:"button--loading-black button__loader"},ws={key:0},ks={key:1,class:"button--loading-black button__loader"},Cs={key:0},Es={key:1,class:"button--loading-black button__loader"},Ts={key:0},Ss={key:1,class:"button--loading-black button__loader"},Is={key:0},As={key:1,class:"button--loading-black button__loader"},Rs={class:"close-text center-text half-top color-black"},Ns={class:"",href:"https://tapni.com/policies/terms-of-service"},Ps={href:"https://tapni.com/policies/privacy-policy"},Ms={key:2,class:"page-login-links"},Ls={class:"forgot center-text pointer small-top"};function Os(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[15]||(e[15]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),autocomplete:"on",style:a.normalizeStyle(n.isModal?"max-width: 500px;":"")},[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[16]||(e[16]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h2",rs,[r.isSSOLogin?(a.openBlock(),a.createElementBlock("span",is,a.toDisplayString(this.ssoLang[this.appLanguage].enter_company_email),1)):(a.openBlock(),a.createElementBlock("span",as,a.toDisplayString(this.ssoLang[this.appLanguage].login),1))]),e[34]||(e[34]=a.createElementVNode("p",{class:"half-bottom small-top center-text color-black"},null,-1)),i.displayFormLogin?(a.openBlock(),a.createElementBlock("span",ss,[a.createElementVNode("div",cs,[e[17]||(e[17]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/user.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=c=>r.emailOrUsername=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),autocorrect:"off",autocapitalize:"off",spellcheck:"false",type:"text",name:"email",placeholder:r.isSSOLogin?n.ssoLang[this.appLanguage].email:n.ssoLang[this.appLanguage].email_username,required:""},null,40,ls),[[a.vModelText,r.emailOrUsername]]),e[18]||(e[18]=a.createElementVNode("em",null,null,-1))]),r.isSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",ds,[e[19]||(e[19]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,name:"password",required:"",minlength:"8"},null,8,us),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[4]||(e[4]=c=>r.revealPassword=!r.revealPassword),class:"pointer"},[a.withDirectives(a.createElementVNode("img",ps,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",hs,null,512),[[a.vShow,r.revealPassword]])])])),r.showOTP?(a.openBlock(),a.createElementBlock("div",ms,[e[20]||(e[20]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.otpToken=c),type:"text",placeholder:n.ssoLang[this.appLanguage].otp_code,name:"otpToken",required:"",minlength:"6"},null,8,fs),[[a.vModelText,r.otpToken]]),e[21]||(e[21]=a.createElementVNode("em",null,null,-1))])):a.createCommentVNode("",!0),a.createElementVNode("button",gs,[r.submitted?(a.openBlock(),a.createElementBlock("span",vs)):(a.openBlock(),a.createElementBlock("span",_s,a.toDisplayString(n.ssoLang[n.appLanguage].login),1))])])):a.createCommentVNode("",!0),e[35]||(e[35]=a.createElementVNode("div",{class:"decoration decoration-lines-thin half-top half-bottom"},null,-1)),a.withDirectives(a.createElementVNode("span",null,[n.displayAppleLogin?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[6]||(e[6]=(...c)=>n.appleLogin&&n.appleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[22]||(e[22]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/apple-logo.png",style:{position:"absolute","margin-left":"-11px",padding:"8px 0",height:"100%"}},null,-1)),n.appleLoad?(a.openBlock(),a.createElementBlock("span",bs)):(a.openBlock(),a.createElementBlock("span",ys,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Apple",1))])):a.createCommentVNode("",!0),n.displayGoogleLogin?(a.openBlock(),a.createElementBlock("a",{key:1,onClick:e[7]||(e[7]=(...c)=>n.googleLogin&&n.googleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[23]||(e[23]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/g-logo.png",style:{position:"absolute","margin-left":"-10px",padding:"8px 0",height:"100%"}},null,-1)),n.googleLoad?(a.openBlock(),a.createElementBlock("span",ks)):(a.openBlock(),a.createElementBlock("span",ws,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Google",1))])):a.createCommentVNode("",!0),n.displayMicrosoftSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[8]||(e[8]=(...c)=>n.microsoftLogin&&n.microsoftLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[24]||(e[24]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/outlook.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftLoad?(a.openBlock(),a.createElementBlock("span",Es)):(a.openBlock(),a.createElementBlock("span",Cs,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Outlook",1))])),n.displayMicrosoftSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:3,onClick:e[9]||(e[9]=c=>r.isSSOLogin=!0),class:"button-center button button-90 google-button pointer"},[e[25]||(e[25]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/sso-key.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftSSOLoad?(a.openBlock(),a.createElementBlock("span",Ss)):(a.openBlock(),a.createElementBlock("span",Ts,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" SSO",1))])),n.displayMicrosoftSSOLogin?(a.openBlock(),a.createElementBlock("a",{key:4,onClick:e[10]||(e[10]=c=>n.microsoftLogin("sso")),class:"button-center button button-90 google-button pointer"},[e[26]||(e[26]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/sso-key.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftSSOLoad?(a.openBlock(),a.createElementBlock("span",Is,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" SSO",1)):(a.openBlock(),a.createElementBlock("span",As))])):a.createCommentVNode("",!0),i.displayFormLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:5,onClick:e[11]||(e[11]=c=>r.emailLogin=!0),class:"button-center button button-90 google-button pointer"},[e[27]||(e[27]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",style:{position:"absolute","margin-left":"-8px",padding:"12px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Email",1)])),n.displayQRLogin?(a.openBlock(),a.createElementBlock("a",{key:6,onClick:e[12]||(e[12]=c=>n.$router.push("/qr")),class:"button-center button button-90 google-button pointer"},[e[28]||(e[28]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/qr.png",style:{position:"absolute","margin-left":"-5px",padding:"15px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" QR",1)])):a.createCommentVNode("",!0),e[29]||(e[29]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1))],512),[[a.vShow,!r.isSSOLogin]]),a.createElementVNode("p",Rs,[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].terms_by_signing_in)+" ",1),e[30]||(e[30]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("a",Ns,a.toDisplayString(n.ssoLang[this.appLanguage].terms_of_service),1),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[n.appLanguage].and)+" ",1),a.createElementVNode("a",Ps,a.toDisplayString(n.ssoLang[this.appLanguage].privacy_policy),1)]),e[36]||(e[36]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),n.isModal?(a.openBlock(),a.createElementBlock("div",{key:3,class:"page-login-links",onClick:e[14]||(e[14]=(...c)=>i.createAccountModal&&i.createAccountModal(...c))},[a.createElementVNode("a",Ls,[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].or)+" ",1),e[32]||(e[32]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[n.appLanguage].create_new_account),1)]),e[33]||(e[33]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Ms,[i.displayRegisterLogin?(a.openBlock(),a.createBlock(s,{key:0,class:"forgot float-right",to:"/register"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].create_account),1)]),_:1})):a.createCommentVNode("",!0),i.displayResetPasswordLogin?(a.openBlock(),a.createBlock(s,{key:1,class:"create float-left",to:"/reset"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].reset_password),1)]),_:1})):a.createCommentVNode("",!0),r.isSSOLogin?(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[13]||(e[13]=c=>r.isSSOLogin=!1),class:"create float-left pointer"},a.toDisplayString(n.ssoLang[n.appLanguage].go_back),1)):a.createCommentVNode("",!0),e[31]||(e[31]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const qo=nt(os,[["render",Os]]),zs=Object.freeze(Object.defineProperty({__proto__:null,default:qo},Symbol.toStringTag,{value:"Module"})),xs={WEB_VERSION:"1.0.1",SUPPORTED_LANGUAGES:["en","de","es","kr","it","fr","sr","tr","cn","pt","ja"]},Bs={mixins:[We],props:{isModal:{type:Boolean,default:!1}},data(){return{expanded:!1,addAccountReady:!1}},computed:{appVersion(){return xs.WEB_VERSION}},async mounted(){if(!this.isLoggedIn)return this.$router.push("/");await this.getAccountSettings()},methods:{continueTo(n){},addAccount(){this.$router.push("/login")},switchAccount(n){},toggleLanguageModal(){X.$emit("toggleSSOLanguageModal")},logoutAccount(){this.logout({refreshToken:this.refreshTokens[0],sendRequest:!0})}}},Us={class:"page-login content-boxed content-boxed-padding center-text",style:{"margin-top":"-1px",overflow:"hidden",border:"solid 0px #ffffff"}},Ds={class:"bold full-top no-bottom center-text text-[24px]"},js={class:"full-bottom half-top center-text font-16"},uh={key:1,class:"full-top full-bottom"},ph={class:"page-login-links center-text"},qs={class:"container left-text"},Fs={class:"firstRow"},Vs=["src"],Hs=["src"],Ks={class:"firstRow"},Gs=["src"],$s=["src"],Qs={class:"firstRow"},Ws=["src"],Ys=["src"],Js={class:"firstRow"},Xs=["src"],Zs=["src"],ec={class:"firstRow"},tc=["src"],nc=["src"],oc={class:"firstRow"},rc=["src"],ic=["src"],ac={class:"firstRow"},sc=["src"],cc={class:"red-text"},lc=["src"],dc={class:"moreFooter"},uc={class:"app-version",style:{"margin-top":"10px"}};function pc(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Us,[e[12]||(e[12]=a.createElementVNode("br",null,null,-1)),a.createCommentVNode("",!0),a.createElementVNode("h1",Ds,a.toDisplayString(n.ssoLang[n.appLanguage].welcome_account),1),a.createElementVNode("p",js,a.toDisplayString(n.account.email),1),(n.display,a.createCommentVNode("",!0)),a.createElementVNode("div",qs,[a.createCommentVNode("",!0),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:1,class:"settingRow",onClick:e[4]||(e[4]=c=>n.$emit("update:viewProp","AuthGeneral"))},[a.createElementVNode("div",Fs,[a.createElementVNode("img",{src:n.getIcon("user-black.svg"),class:"withBackground"},null,8,Vs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].general),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Hs)])])):(a.openBlock(),a.createBlock(s,{key:2,to:"/general",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",Ks,[a.createElementVNode("img",{src:n.getIcon("user-black.svg"),class:"withBackground"},null,8,Gs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].general),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,$s)])]),_:1})),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:3,class:"settingRow",onClick:e[5]||(e[5]=c=>n.$emit("update:viewProp","AuthSecurity"))},[a.createElementVNode("div",Qs,[a.createElementVNode("img",{src:n.getIcon("shield-black.svg"),class:"withBackground"},null,8,Ws),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].security),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Ys)])])):(a.openBlock(),a.createBlock(s,{key:4,to:"/security",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",Js,[a.createElementVNode("img",{src:n.getIcon("shield-black.svg"),class:"withBackground"},null,8,Xs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].security),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Zs)])]),_:1})),a.createCommentVNode("",!0),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:6,class:"settingRow",onClick:e[6]||(e[6]=c=>n.$emit("update:viewProp","AuthBilling"))},[a.createElementVNode("div",ec,[a.createElementVNode("img",{src:n.getIcon("billing-card-black.svg"),class:"withBackground"},null,8,tc),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,nc)])])):(a.openBlock(),a.createBlock(s,{key:7,to:"/billing",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",oc,[a.createElementVNode("img",{src:n.getIcon("billing-card-black.svg"),class:"withBackground"},null,8,rc),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,ic)])]),_:1})),t.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:8,class:"settingRow",onClick:e[7]||(e[7]=(...c)=>i.logoutAccount&&i.logoutAccount(...c))},[a.createElementVNode("div",ac,[a.createElementVNode("img",{src:n.getIcon("logout-red.svg"),class:"withBackground"},null,8,sc),a.createElementVNode("h4",cc,a.toDisplayString(n.ssoLang[n.appLanguage].logout),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,lc)])])),a.createElementVNode("div",dc,[a.createElementVNode("p",uc,a.toDisplayString(n.ssoLang[n.appLanguage].version)+": "+a.toDisplayString(i.appVersion),1),a.createCommentVNode("",!0)])])])}const Fo=nt(Bs,[["render",pc]]),hc=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"})),mc={name:"AuthRegister",mixins:[Tr,Sr,ri,We],props:{isModal:{type:Boolean,required:!1,default:!1}},data(){return{usernameRegister:!1,loading:!0,submitted:!1,formButtonText:"REGISTER",username:"",email:"",password:"",revealPassword:!1,emailLogin:!0,invitationCode:"",referral:""}},mounted(){this.isModal||(this.isLoggedIn?this.$router.push(this.home):!this.$route.query.state&&!this.$route.query.oauth&&!this.$route.params.oauth&&X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.invitationCode=this.$route.query.ic||"",this.$route.query.username&&(this.usernameRegister=!0,this.emailLogin=!0,this.username=this.$route.query.username),this.$route.query.ref?this.referral=this.$route.query.ref:this.$storex.referral&&(this.referral=this.$storex.referral))},methods:{async submit(){if(this.password.length<8)return this.errorSnack(this.ssoLang[this.appLanguage].password_8_chars);if(this.password.search(/[a-z]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_lowercase);if(this.password.search(/[A-Z]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_uppercase);if(this.password.search(/[0-9]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_number);if(this.submitted)return;this.submitted=!0,this.email=this.email.trim(),this.username=this.username.trim();let n={response_type:this.response_type,email:this.email,username:this.username,password:this.password,ic:this.invitationCode,captchaToken:await this.getCaptchaToken("account_verify"),ref:this.referral},e=await this.register(n);this.submitted=!1,e.data&&e.data.success&&(e.data.message==="SUCCESS_REGISTER"?(this.isModal?X.$emit("ssoEvent",{name:"toggleAddAccountModalVerify",data:!1}):this.$router.push("/verify"),this.successSnack(this.ssoLang[this.appLanguage].register_success),this.formButtonText=this.ssoLang[this.appLanguage].check_your_inbox):e.data.message==="SUCCESS_LOGIN"&&(this.display!=="popup"&&(await this.loginSetup({...e,isModal:n.isModal}),await this.getLoggedInAccounts()),await this.loginSuccess({...e,isModal:n.isModal})))},close(){X.$emit("ssoEvent",{name:"toggleAddAccountModal",data:!0})},loginAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalLogin",data:!1})}},watch:{email(n){this.$storex.verifyEmail=n},referral(n){this.$storex.referral=n}}},fc={class:"bold no-bottom center-text text-[24px]",style:{"margin-top":"63px"}},gc={class:"half-bottom small-top center-text color-black"},_c={key:0},vc={key:1},yc={class:"page-login-field half-top"},bc=["placeholder"],wc={class:"page-login-field half-top"},kc=["placeholder","disabled"],Cc={class:"page-login-field half-top half-bottom"},Ec=["type","placeholder"],Tc={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Sc={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},Ic={type:"submit",class:"button black-button google-button bg-tapni-grey pointer button-90 button-center uppercase button-rounded bold full-top"},Ac={key:0},Rc={key:1,class:"button--loading button__loader"},Nc={key:0},Pc={key:1,class:"button--loading-black button__loader"},Mc={key:0},Lc={key:1,class:"button--loading-black button__loader"},Oc={class:"close-text center-text half-top color-black"},zc={class:"",href:"https://tapni.co/policies/terms-of-service"},xc={href:"https://tapni.co/policies/privacy-policy"},Bc={key:4,class:"page-login-links"},Uc={class:"forgot center-text pointer small-top"};function Dc(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[11]||(e[11]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),autocomplete:"on",style:a.normalizeStyle(t.isModal?"max-width: 500px;":"")},[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[12]||(e[12]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h1",fc,a.toDisplayString(n.ssoLang[this.appLanguage].register),1),a.createElementVNode("p",gc,[r.usernameRegister?(a.openBlock(),a.createElementBlock("span",_c,[a.createTextVNode(" t.link/"+a.toDisplayString(r.username)+" "+a.toDisplayString(n.ssoLang[this.appLanguage].username_is_free)+" ✅ ",1),e[13]||(e[13]=a.createElementVNode("br",null,null,-1))])):a.createCommentVNode("",!0)]),r.emailLogin?(a.openBlock(),a.createElementBlock("span",vc,[a.createElementVNode("div",yc,[e[14]||(e[14]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"60%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=c=>r.email=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,name:"email",required:""},null,40,bc),[[a.vModelText,r.email]]),e[15]||(e[15]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",wc,[e[16]||(e[16]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/user.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.username=c),onKeydown:e[4]||(e[4]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",placeholder:n.ssoLang[this.appLanguage].username,name:"username",required:"",disabled:r.usernameRegister,class:a.normalizeClass({"input-disabled":r.usernameRegister})},null,42,kc),[[a.vModelText,r.username]]),e[17]||(e[17]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",Cc,[e[18]||(e[18]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,name:"password",required:"",minlength:"8"},null,8,Ec),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[6]||(e[6]=c=>r.revealPassword=!r.revealPassword),class:"pointer"},[a.withDirectives(a.createElementVNode("img",Tc,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",Sc,null,512),[[a.vShow,r.revealPassword]])])]),a.createElementVNode("button",Ic,[r.submitted?(a.openBlock(),a.createElementBlock("span",Rc)):(a.openBlock(),a.createElementBlock("span",Ac,a.toDisplayString(r.formButtonText),1))])])):a.createCommentVNode("",!0),e[26]||(e[26]=a.createElementVNode("div",{class:"decoration decoration-lines-thin half-top half-bottom"},null,-1)),n.displayAppleLogin?(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[7]||(e[7]=(...c)=>n.appleLogin&&n.appleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[19]||(e[19]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/apple-logo.png",style:{position:"absolute","margin-left":"-11px",padding:"8px 0",height:"100%"}},null,-1)),n.appleLoad?(a.openBlock(),a.createElementBlock("span",Pc)):(a.openBlock(),a.createElementBlock("span",Nc,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Apple",1))])):a.createCommentVNode("",!0),a.createElementVNode("a",{onClick:e[8]||(e[8]=(...c)=>n.googleLogin&&n.googleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[20]||(e[20]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/g-logo.png",style:{position:"absolute","margin-left":"-9px",padding:"8px 0",height:"100%"}},null,-1)),n.googleLoad?(a.openBlock(),a.createElementBlock("span",Lc)):(a.openBlock(),a.createElementBlock("span",Mc,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Google",1))]),r.emailLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:3,onClick:e[9]||(e[9]=c=>r.emailLogin=!0),class:"button-center button button-90 google-button pointer"},[e[21]||(e[21]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",style:{position:"absolute","margin-left":"-8px",padding:"12px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Email",1)])),e[27]||(e[27]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),a.createElementVNode("p",Oc,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].terms_by_registering)+" ",1),e[22]||(e[22]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("a",zc,a.toDisplayString(n.ssoLang[this.appLanguage].terms_of_service),1),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].and)+" ",1),a.createElementVNode("a",xc,a.toDisplayString(n.ssoLang[this.appLanguage].privacy_policy),1)]),e[28]||(e[28]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:5,class:"page-login-links",onClick:e[10]||(e[10]=(...c)=>i.loginAccountModal&&i.loginAccountModal(...c))},[a.createElementVNode("a",Uc,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].or)+" ",1),e[24]||(e[24]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].sign_in_with_new),1)]),e[25]||(e[25]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Bc,[a.createVNode(s,{class:"create float-right",to:"/verify"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[23]||(e[23]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const Vo=nt(mc,[["render",Dc]]),jc=Object.freeze(Object.defineProperty({__proto__:null,default:Vo},Symbol.toStringTag,{value:"Module"})),qc={name:"AuthVerify",mixins:[We],props:{isModal:{type:Boolean,required:!1,default:!1}},data(){return{loading:!0,submitted:!1,action:"verify",email:"",code:"",captcha:""}},mounted(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route&&this.init()},methods:{init(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route.hash==="#reset"&&(this.action="reset"),this.$route.query.e&&(this.email=this.$route.query.e),this.$route.query.c&&(this.code=this.$route.query.c),X.$emit("ssoEvent",{name:"setLoading",data:!1})},async submit(){if(this.code.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);this.email=this.email.trim(),this.code=this.code.trim();let n={code:this.code,email:this.email,captchaToken:await this.getCaptchaToken("account_verify")};if(this.submitted)return!1;this.submitted=!0;let e=await this.verify(n);this.submitted=!1,e&&e.data&&e.data.success===!0?(this.action==="reset"&&(this.$router.push("/reset?c="+this.code+"&e="+this.email),this.successSnack(this.ssoLang[this.appLanguage].verify_account_success)),this.action==="verify"&&(this.isModal&&(this.email="",this.code="",X.$emit("closeModal")),await this.loginSetup(e),await this.getLoggedInAccounts(),this.$storex.verifyEmail="",this.$router.push("/"+e.data.data.username+"#edit"),this.successSnack(this.ssoLang[this.appLanguage].verify_account_success2))):this.submitted=!1},registerAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalRegister",data:!1})},close(){X.$emit("ssoEvent",{name:"toggleAddAccountModal",data:!0})}},watch:{"$storage.verifyEmail"(n){n&&(this.email=n)},"route.name"(n,e){!e&&n&&this.init()},"route.query":{handler(n){this.isEmpty(n)||this.init()},deep:!0}}},Fc={class:"bold no-bottom center-text text-[24px]",style:{"margin-top":"63px"}},Vc={class:"page-login-field half-top"},Hc=["placeholder"],Kc={class:"page-login-field half-top"},Gc=["placeholder"],$c={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Qc={key:0,class:"uppercase"},Wc={key:1,class:"button--loading button__loader"},Yc={class:"close-text center-text half-top color-black"},Jc=["innerHTML"],Xc={key:1,class:"page-login-links"},Zc={key:2,class:"page-login-links"};function el(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[6]||(e[6]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),style:a.normalizeStyle(t.isModal?"max-width: 500px;":"")},[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h1",Fc,a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1),e[16]||(e[16]=a.createElementVNode("p",{class:"half-bottom half-top center-text color-black"},null,-1)),a.createElementVNode("div",Vc,[e[8]||(e[8]=a.createElementVNode("i",{style:{"padding-top":"15px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"80%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"emailInput","onUpdate:modelValue":e[1]||(e[1]=c=>r.email=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,required:""},null,40,Hc),[[a.vModelText,r.email]]),e[9]||(e[9]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",Kc,[e[10]||(e[10]=a.createElementVNode("i",{style:{"padding-top":"15px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/password2.png",class:"responsive-image",style:{width:"100%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"codeInput","onUpdate:modelValue":e[3]||(e[3]=c=>r.code=c),onKeydown:e[4]||(e[4]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"tel",placeholder:n.ssoLang[this.appLanguage].code,required:""},null,40,Gc),[[a.vModelText,r.code]]),e[11]||(e[11]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("button",$c,[r.submitted?(a.openBlock(),a.createElementBlock("span",Wc)):(a.openBlock(),a.createElementBlock("span",Qc,a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1))]),e[17]||(e[17]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),a.createElementVNode("p",Yc,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].verify_account_p1},null,8,Jc),e[12]||(e[12]=a.createElementVNode("a",{href:"mailto:support@tapni.com?subject=Email Verification"}," support@tapni.com",-1))]),e[18]||(e[18]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),t.isModal?(a.openBlock(),a.createElementBlock("div",Zc,[a.createElementVNode("a",{class:"forgot center-text pointer small-top",onClick:e[5]||(e[5]=a.withModifiers((...c)=>i.registerAccountModal&&i.registerAccountModal(...c),["prevent"]))},[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].or)+" ",1),e[14]||(e[14]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].create_new_account),1)]),e[15]||(e[15]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Xc,[a.createVNode(s,{class:"create float-right",to:"/register"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].register),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[13]||(e[13]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const Ho=nt(qc,[["render",el],["__scopeId","data-v-96f72130"]]),tl=Object.freeze(Object.defineProperty({__proto__:null,default:Ho},Symbol.toStringTag,{value:"Module"}));var ci={exports:{}};(function(n,e){(function(t,o){n.exports=o()})(window,function(){return function(t){var o={};function r(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=t,r.c=o,r.d=function(i,s,c){r.o(i,s)||Object.defineProperty(i,s,{enumerable:!0,get:c})},r.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},r.t=function(i,s){if(1&s&&(i=r(i)),8&s||4&s&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&s&&typeof i!="string")for(var l in i)r.d(c,l,(function(h){return i[h]}).bind(null,l));return c},r.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(s,"a",s),s},r.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},r.p="",r(r.s=12)}([function(t,o,r){var i;t.exports=(i=i||function(s,c){var l=Object.create||function(){function T(){}return function(B){var V;return T.prototype=B,V=new T,T.prototype=null,V}}(),h={},u=h.lib={},g=u.Base={extend:function(T){var B=l(this);return T&&B.mixIn(T),B.hasOwnProperty("init")&&this.init!==B.init||(B.init=function(){B.$super.init.apply(this,arguments)}),B.init.prototype=B,B.$super=this,B},create:function(){var T=this.extend();return T.init.apply(T,arguments),T},init:function(){},mixIn:function(T){for(var B in T)T.hasOwnProperty(B)&&(this[B]=T[B]);T.hasOwnProperty("toString")&&(this.toString=T.toString)},clone:function(){return this.init.prototype.extend(this)}},f=u.WordArray=g.extend({init:function(T,B){T=this.words=T||[],this.sigBytes=B??4*T.length},toString:function(T){return(T||C).stringify(this)},concat:function(T){var B=this.words,V=T.words,G=this.sigBytes,J=T.sigBytes;if(this.clamp(),G%4)for(var I=0;I<J;I++){var W=V[I>>>2]>>>24-I%4*8&255;B[G+I>>>2]|=W<<24-(G+I)%4*8}else for(I=0;I<J;I+=4)B[G+I>>>2]=V[I>>>2];return this.sigBytes+=J,this},clamp:function(){var T=this.words,B=this.sigBytes;T[B>>>2]&=4294967295<<32-B%4*8,T.length=s.ceil(B/4)},clone:function(){var T=g.clone.call(this);return T.words=this.words.slice(0),T},random:function(T){for(var B,V=[],G=function(W){W=W;var ie=987654321,ee=4294967295;return function(){var ve=((ie=36969*(65535&ie)+(ie>>16)&ee)<<16)+(W=18e3*(65535&W)+(W>>16)&ee)ⅇreturn ve/=4294967296,(ve+=.5)*(s.random()>.5?1:-1)}},J=0;J<T;J+=4){var I=G(4294967296*(B||s.random()));B=987654071*I(),V.push(4294967296*I()|0)}return new f.init(V,T)}}),w=h.enc={},C=w.Hex={stringify:function(T){for(var B=T.words,V=T.sigBytes,G=[],J=0;J<V;J++){var I=B[J>>>2]>>>24-J%4*8&255;G.push((I>>>4).toString(16)),G.push((15&I).toString(16))}return G.join("")},parse:function(T){for(var B=T.length,V=[],G=0;G<B;G+=2)V[G>>>3]|=parseInt(T.substr(G,2),16)<<24-G%8*4;return new f.init(V,B/2)}},P=w.Latin1={stringify:function(T){for(var B=T.words,V=T.sigBytes,G=[],J=0;J<V;J++){var I=B[J>>>2]>>>24-J%4*8&255;G.push(String.fromCharCode(I))}return G.join("")},parse:function(T){for(var B=T.length,V=[],G=0;G<B;G++)V[G>>>2]|=(255&T.charCodeAt(G))<<24-G%4*8;return new f.init(V,B)}},M=w.Utf8={stringify:function(T){try{return decodeURIComponent(escape(P.stringify(T)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(T){return P.parse(unescape(encodeURIComponent(T)))}},j=u.BufferedBlockAlgorithm=g.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(T){typeof T=="string"&&(T=M.parse(T)),this._data.concat(T),this._nDataBytes+=T.sigBytes},_process:function(T){var B=this._data,V=B.words,G=B.sigBytes,J=this.blockSize,I=G/(4*J),W=(I=T?s.ceil(I):s.max((0|I)-this._minBufferSize,0))*J,ie=s.min(4*W,G);if(W){for(var ee=0;ee<W;ee+=J)this._doProcessBlock(V,ee);var ve=V.splice(0,W);B.sigBytes-=ie}return new f.init(ve,ie)},clone:function(){var T=g.clone.call(this);return T._data=this._data.clone(),T},_minBufferSize:0}),N=(u.Hasher=j.extend({cfg:g.extend(),init:function(T){this.cfg=this.cfg.extend(T),this.reset()},reset:function(){j.reset.call(this),this._doReset()},update:function(T){return this._append(T),this._process(),this},finalize:function(T){return T&&this._append(T),this._doFinalize()},blockSize:16,_createHelper:function(T){return function(B,V){return new T.init(V).finalize(B)}},_createHmacHelper:function(T){return function(B,V){return new N.HMAC.init(T,V).finalize(B)}}}),h.algo={});return h}(Math),i)},function(t,o,r){var i,s,c,l;t.exports=(i=r(0),c=(s=i).lib.Base,l=s.enc.Utf8,void(s.algo.HMAC=c.extend({init:function(h,u){h=this._hasher=new h.init,typeof u=="string"&&(u=l.parse(u));var g=h.blockSize,f=4*g;u.sigBytes>f&&(u=h.finalize(u)),u.clamp();for(var w=this._oKey=u.clone(),C=this._iKey=u.clone(),P=w.words,M=C.words,j=0;j<g;j++)P[j]^=1549556828,M[j]^=909522486;w.sigBytes=C.sigBytes=f,this.reset()},reset:function(){var h=this._hasher;h.reset(),h.update(this._iKey)},update:function(h){return this._hasher.update(h),this},finalize:function(h){var u=this._hasher,g=u.finalize(h);return u.reset(),u.finalize(this._oKey.clone().concat(g))}})))},function(t,o,r){var i;t.exports=(i=r(0),i.enc.Hex)},function(t,o,r){var i,s,c,l,h,u;t.exports=(u=r(0),s=(i=u).lib,c=s.Base,l=s.WordArray,(h=i.x64={}).Word=c.extend({init:function(g,f){this.high=g,this.low=f}}),h.WordArray=c.extend({init:function(g,f){g=this.words=g||[],this.sigBytes=f??8*g.length},toX32:function(){for(var g=this.words,f=g.length,w=[],C=0;C<f;C++){var P=g[C];w.push(P.high),w.push(P.low)}return l.create(w,this.sigBytes)},clone:function(){for(var g=c.clone.call(this),f=g.words=this.words.slice(0),w=f.length,C=0;C<w;C++)f[C]=f[C].clone();return g}}),u)},function(t,o,r){var i;t.exports=(i=r(0),r(9),r(1),i.HmacSHA1)},function(t,o,r){var i;t.exports=(i=r(0),r(10),r(1),i.HmacSHA256)},function(t,o,r){var i;t.exports=(i=r(0),r(3),r(11),r(1),i.HmacSHA512)},function(t,o){function r(i,s){var c=i.indexOf(s);if(c===-1)throw new Error("Invalid character found: "+s);return c}t.exports=function(i,s){var c;switch(s){case"RFC3548":case"RFC4648":c="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",i=i.replace(/=+$/,"");break;case"RFC4648-HEX":c="0123456789ABCDEFGHIJKLMNOPQRSTUV",i=i.replace(/=+$/,"");break;case"Crockford":c="0123456789ABCDEFGHJKMNPQRSTVWXYZ",i=i.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1");break;default:throw new Error("Unknown base32 variant: "+s)}for(var l=i.length,h=0,u=0,g=0,f=new Uint8Array(5*l/8|0),w=0;w<l;w++)u=u<<5|r(c,i[w]),(h+=5)>=8&&(f[g++]=u>>>h-8&255,h-=8);return f.buffer}},function(t,o){t.exports=function(r,i,s){var c,l;switch(s=s||{},i){case"RFC3548":case"RFC4648":c="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",l=!0;break;case"RFC4648-HEX":c="0123456789ABCDEFGHIJKLMNOPQRSTUV",l=!0;break;case"Crockford":c="0123456789ABCDEFGHJKMNPQRSTVWXYZ",l=!1;break;default:throw new Error("Unknown base32 variant: "+i)}for(var h=s.padding!==void 0?s.padding:l,u=r.byteLength,g=new Uint8Array(r),f=0,w=0,C="",P=0;P<u;P++)for(w=w<<8|g[P],f+=8;f>=5;)C+=c[w>>>f-5&31],f-=5;if(f>0&&(C+=c[w<<5-f&31]),h)for(;C.length%8!=0;)C+="=";return C}},function(t,o,r){var i,s,c,l,h,u,g,f;t.exports=(f=r(0),s=(i=f).lib,c=s.WordArray,l=s.Hasher,h=i.algo,u=[],g=h.SHA1=l.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(w,C){for(var P=this._hash.words,M=P[0],j=P[1],N=P[2],T=P[3],B=P[4],V=0;V<80;V++){if(V<16)u[V]=0|w[C+V];else{var G=u[V-3]^u[V-8]^u[V-14]^u[V-16];u[V]=G<<1|G>>>31}var J=(M<<5|M>>>27)+B+u[V];J+=V<20?1518500249+(j&N|~j&T):V<40?1859775393+(j^N^T):V<60?(j&N|j&T|N&T)-1894007588:(j^N^T)-899497514,B=T,T=N,N=j<<30|j>>>2,j=M,M=J}P[0]=P[0]+M|0,P[1]=P[1]+j|0,P[2]=P[2]+N|0,P[3]=P[3]+T|0,P[4]=P[4]+B|0},_doFinalize:function(){var w=this._data,C=w.words,P=8*this._nDataBytes,M=8*w.sigBytes;return C[M>>>5]|=128<<24-M%32,C[14+(M+64>>>9<<4)]=Math.floor(P/4294967296),C[15+(M+64>>>9<<4)]=P,w.sigBytes=4*C.length,this._process(),this._hash},clone:function(){var w=l.clone.call(this);return w._hash=this._hash.clone(),w}}),i.SHA1=l._createHelper(g),i.HmacSHA1=l._createHmacHelper(g),f.SHA1)},function(t,o,r){var i;t.exports=(i=r(0),function(s){var c=i,l=c.lib,h=l.WordArray,u=l.Hasher,g=c.algo,f=[],w=[];(function(){function M(B){for(var V=s.sqrt(B),G=2;G<=V;G++)if(!(B%G))return!1;return!0}function j(B){return 4294967296*(B-(0|B))|0}for(var N=2,T=0;T<64;)M(N)&&(T<8&&(f[T]=j(s.pow(N,.5))),w[T]=j(s.pow(N,1/3)),T++),N++})();var C=[],P=g.SHA256=u.extend({_doReset:function(){this._hash=new h.init(f.slice(0))},_doProcessBlock:function(M,j){for(var N=this._hash.words,T=N[0],B=N[1],V=N[2],G=N[3],J=N[4],I=N[5],W=N[6],ie=N[7],ee=0;ee<64;ee++){if(ee<16)C[ee]=0|M[j+ee];else{var ve=C[ee-15],Re=(ve<<25|ve>>>7)^(ve<<14|ve>>>18)^ve>>>3,le=C[ee-2],Me=(le<<15|le>>>17)^(le<<13|le>>>19)^le>>>10;C[ee]=Re+C[ee-7]+Me+C[ee-16]}var yt=T&B^T&V^B&V,Pt=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),at=ie+((J<<26|J>>>6)^(J<<21|J>>>11)^(J<<7|J>>>25))+(J&I^~J&W)+w[ee]+C[ee];ie=W,W=I,I=J,J=G+at|0,G=V,V=B,B=T,T=at+(Pt+yt)|0}N[0]=N[0]+T|0,N[1]=N[1]+B|0,N[2]=N[2]+V|0,N[3]=N[3]+G|0,N[4]=N[4]+J|0,N[5]=N[5]+I|0,N[6]=N[6]+W|0,N[7]=N[7]+ie|0},_doFinalize:function(){var M=this._data,j=M.words,N=8*this._nDataBytes,T=8*M.sigBytes;return j[T>>>5]|=128<<24-T%32,j[14+(T+64>>>9<<4)]=s.floor(N/4294967296),j[15+(T+64>>>9<<4)]=N,M.sigBytes=4*j.length,this._process(),this._hash},clone:function(){var M=u.clone.call(this);return M._hash=this._hash.clone(),M}});c.SHA256=u._createHelper(P),c.HmacSHA256=u._createHmacHelper(P)}(Math),i.SHA256)},function(t,o,r){var i;t.exports=(i=r(0),r(3),function(){var s=i,c=s.lib.Hasher,l=s.x64,h=l.Word,u=l.WordArray,g=s.algo;function f(){return h.create.apply(h,arguments)}var w=[f(1116352408,3609767458),f(1899447441,602891725),f(3049323471,3964484399),f(3921009573,2173295548),f(961987163,4081628472),f(1508970993,3053834265),f(2453635748,2937671579),f(2870763221,3664609560),f(3624381080,2734883394),f(310598401,1164996542),f(607225278,1323610764),f(1426881987,3590304994),f(1925078388,4068182383),f(2162078206,991336113),f(2614888103,633803317),f(3248222580,3479774868),f(3835390401,2666613458),f(4022224774,944711139),f(264347078,2341262773),f(604807628,2007800933),f(770255983,1495990901),f(1249150122,1856431235),f(1555081692,3175218132),f(1996064986,2198950837),f(2554220882,3999719339),f(2821834349,766784016),f(2952996808,2566594879),f(3210313671,3203337956),f(3336571891,1034457026),f(3584528711,2466948901),f(113926993,3758326383),f(338241895,168717936),f(666307205,1188179964),f(773529912,1546045734),f(1294757372,1522805485),f(1396182291,2643833823),f(1695183700,2343527390),f(1986661051,1014477480),f(2177026350,1206759142),f(2456956037,344077627),f(2730485921,1290863460),f(2820302411,3158454273),f(3259730800,3505952657),f(3345764771,106217008),f(3516065817,3606008344),f(3600352804,1432725776),f(4094571909,1467031594),f(275423344,851169720),f(430227734,3100823752),f(506948616,1363258195),f(659060556,3750685593),f(883997877,3785050280),f(958139571,3318307427),f(1322822218,3812723403),f(1537002063,2003034995),f(1747873779,3602036899),f(1955562222,1575990012),f(2024104815,1125592928),f(2227730452,2716904306),f(2361852424,442776044),f(2428436474,593698344),f(2756734187,3733110249),f(3204031479,2999351573),f(3329325298,3815920427),f(3391569614,3928383900),f(3515267271,566280711),f(3940187606,3454069534),f(4118630271,4000239992),f(116418474,1914138554),f(174292421,2731055270),f(289380356,3203993006),f(460393269,320620315),f(685471733,587496836),f(852142971,1086792851),f(1017036298,365543100),f(1126000580,2618297676),f(1288033470,3409855158),f(1501505948,4234509866),f(1607167915,987167468),f(1816402316,1246189591)],C=[];(function(){for(var M=0;M<80;M++)C[M]=f()})();var P=g.SHA512=c.extend({_doReset:function(){this._hash=new u.init([new h.init(1779033703,4089235720),new h.init(3144134277,2227873595),new h.init(1013904242,4271175723),new h.init(2773480762,1595750129),new h.init(1359893119,2917565137),new h.init(2600822924,725511199),new h.init(528734635,4215389547),new h.init(1541459225,327033209)])},_doProcessBlock:function(M,j){for(var N=this._hash.words,T=N[0],B=N[1],V=N[2],G=N[3],J=N[4],I=N[5],W=N[6],ie=N[7],ee=T.high,ve=T.low,Re=B.high,le=B.low,Me=V.high,yt=V.low,Pt=G.high,at=G.low,dn=J.high,Jt=J.low,un=I.high,Xt=I.low,Sn=W.high,Ce=W.low,Se=ie.high,Kt=ie.low,De=ee,Le=ve,Mt=Re,bt=le,Qe=Me,st=yt,Gt=Pt,Lt=at,Ge=dn,Ie=Jt,ct=un,Ot=Xt,zt=Sn,ht=Ce,pn=Se,wt=Kt,je=0;je<80;je++){var mt=C[je];if(je<16)var Oe=mt.high=0|M[j+2*je],lt=mt.low=0|M[j+2*je+1];else{var hn=C[je-15],qe=hn.high,xt=hn.low,m=(qe>>>1|xt<<31)^(qe>>>8|xt<<24)^qe>>>7,d=(xt>>>1|qe<<31)^(xt>>>8|qe<<24)^(xt>>>7|qe<<25),p=C[je-2],_=p.high,k=p.low,S=(_>>>19|k<<13)^(_<<3|k>>>29)^_>>>6,L=(k>>>19|_<<13)^(k<<3|_>>>29)^(k>>>6|_<<26),se=C[je-7],ye=se.high,_e=se.low,be=C[je-16],me=be.high,lo=be.low;Oe=(Oe=(Oe=m+ye+((lt=d+_e)>>>0<d>>>0?1:0))+S+((lt+=L)>>>0<L>>>0?1:0))+me+((lt+=lo)>>>0<lo>>>0?1:0),mt.high=Oe,mt.low=lt}var kt,Jo=Ge&ct^~Ge&zt,uo=Ie&Ot^~Ie&ht,Xo=De&Mt^De&Qe^Mt&Qe,Zo=Le&bt^Le&st^bt&st,po=(De>>>28|Le<<4)^(De<<30|Le>>>2)^(De<<25|Le>>>7),ho=(Le>>>28|De<<4)^(Le<<30|De>>>2)^(Le<<25|De>>>7),er=(Ge>>>14|Ie<<18)^(Ge>>>18|Ie<<14)^(Ge<<23|Ie>>>9),tr=(Ie>>>14|Ge<<18)^(Ie>>>18|Ge<<14)^(Ie<<23|Ge>>>9),v=w[je],y=v.high,E=v.low,A=pn+er+((kt=wt+tr)>>>0<wt>>>0?1:0),O=ho+Zo;pn=zt,wt=ht,zt=ct,ht=Ot,ct=Ge,Ot=Ie,Ge=Gt+(A=(A=(A=A+Jo+((kt+=uo)>>>0<uo>>>0?1:0))+y+((kt+=E)>>>0<E>>>0?1:0))+Oe+((kt+=lt)>>>0<lt>>>0?1:0))+((Ie=Lt+kt|0)>>>0<Lt>>>0?1:0)|0,Gt=Qe,Lt=st,Qe=Mt,st=bt,Mt=De,bt=Le,De=A+(po+Xo+(O>>>0<ho>>>0?1:0))+((Le=kt+O|0)>>>0<kt>>>0?1:0)|0}ve=T.low=ve+Le,T.high=ee+De+(ve>>>0<Le>>>0?1:0),le=B.low=le+bt,B.high=Re+Mt+(le>>>0<bt>>>0?1:0),yt=V.low=yt+st,V.high=Me+Qe+(yt>>>0<st>>>0?1:0),at=G.low=at+Lt,G.high=Pt+Gt+(at>>>0<Lt>>>0?1:0),Jt=J.low=Jt+Ie,J.high=dn+Ge+(Jt>>>0<Ie>>>0?1:0),Xt=I.low=Xt+Ot,I.high=un+ct+(Xt>>>0<Ot>>>0?1:0),Ce=W.low=Ce+ht,W.high=Sn+zt+(Ce>>>0<ht>>>0?1:0),Kt=ie.low=Kt+wt,ie.high=Se+pn+(Kt>>>0<wt>>>0?1:0)},_doFinalize:function(){var M=this._data,j=M.words,N=8*this._nDataBytes,T=8*M.sigBytes;return j[T>>>5]|=128<<24-T%32,j[30+(T+128>>>10<<5)]=Math.floor(N/4294967296),j[31+(T+128>>>10<<5)]=N,M.sigBytes=4*j.length,this._process(),this._hash.toX32()},clone:function(){var M=c.clone.call(this);return M._hash=this._hash.clone(),M},blockSize:32});s.SHA512=c._createHelper(P),s.HmacSHA512=c._createHmacHelper(P)}(),i.SHA512)},function(t,o,r){r.r(o);var i,s=r(0),c=r.n(s),l=r(4),h=r.n(l),u=r(5),g=r.n(u),f=r(6),w=r.n(f),C=r(2),P=r.n(C);function M(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function j(v){for(var y=1;y<arguments.length;y++){var E=arguments[y]!=null?arguments[y]:{};y%2?M(Object(E),!0).forEach(function(A){N(v,A,E[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(E)):M(Object(E)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(E,A))})}return v}function N(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function T(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function B(v){return Object.keys(v).map(function(y){return v[y]})}(function(v){v.SHA1="sha1",v.SHA256="sha256",v.SHA512="sha512"})(i||(i={}));var V,G=B(i);(function(v){v.ASCII="ascii",v.BASE64="base64",v.HEX="hex",v.LATIN1="latin1",v.UTF8="utf8"})(V||(V={}));var J,I=B(V);(function(v){v.HOTP="hotp",v.TOTP="totp"})(J||(J={}));var W=B(J),ie=function(){throw new Error("Please provide an options.createDigest implementation.")};function ee(v){return/^(\d+)$/.test(v)}function ve(v,y,E){if(v.length>=y)return v;var A=Array(y+1).join(E);return"".concat(A).concat(v).slice(-1*y)}function Re(v){var y="otpauth://".concat(v.type,"/{labelPrefix}:{accountName}?secret={secret}{query}"),E=[];if(W.indexOf(v.type)<0)throw new Error("Expecting options.type to be one of ".concat(W.join(", "),". Received ").concat(v.type,"."));if(v.type==="hotp"){if(v.counter==null||typeof v.counter!="number")throw new Error('Expecting options.counter to be a number when options.type is "hotp".');E.push("&counter=".concat(v.counter))}return v.type==="totp"&&v.step&&E.push("&period=".concat(v.step)),v.digits&&E.push("&digits=".concat(v.digits)),v.algorithm&&E.push("&algorithm=".concat(v.algorithm.toUpperCase())),v.issuer&&E.push("&issuer=".concat(encodeURIComponent(v.issuer))),y.replace("{labelPrefix}",encodeURIComponent(v.issuer||v.accountName)).replace("{accountName}",encodeURIComponent(v.accountName)).replace("{secret}",v.secret).replace("{query}",E.join(""))}function le(v){return(le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}function Me(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function yt(v,y){return!y||le(y)!=="object"&&typeof y!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(v):y}function Pt(v){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(v)}function at(v,y){return(at=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(v,y)}function dn(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function Jt(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function un(v){if(typeof v.createDigest!="function")throw new Error("Expecting options.createDigest to be a function.");if(typeof v.createHmacKey!="function")throw new Error("Expecting options.createHmacKey to be a function.");if(typeof v.digits!="number")throw new Error("Expecting options.digits to be a number.");if(!v.algorithm||G.indexOf(v.algorithm)<0)throw new Error("Expecting options.algorithm to be one of ".concat(G.join(", "),". Received ").concat(v.algorithm,"."));if(!v.encoding||I.indexOf(v.encoding)<0)throw new Error("Expecting options.encoding to be one of ".concat(I.join(", "),". Received ").concat(v.encoding,"."))}var Xt=function(v,y,E){return nn.from(y,E).toString("hex")};function Sn(v){var y=function(E){for(var A=1;A<arguments.length;A++){var O=arguments[A]!=null?arguments[A]:{};A%2?dn(Object(O),!0).forEach(function(q){Jt(E,q,O[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(O)):dn(Object(O)).forEach(function(q){Object.defineProperty(E,q,Object.getOwnPropertyDescriptor(O,q))})}return E}({},{algorithm:i.SHA1,createHmacKey:Xt,createDigest:ie,digits:6,encoding:V.ASCII},{},v);return un(y),Object.freeze(y)}function Ce(v,y,E){var A=function(q){return ve(q.toString(16),16,"0")}(y),O=E.createHmacKey(E.algorithm,v,E.encoding);return E.createDigest(E.algorithm,O,A)}function Se(v,y,E){return function(A,O){var q=nn.from(A,"hex"),pe=15&q[q.length-1],et=((127&q[pe])<<24|(255&q[pe+1])<<16|(255&q[pe+2])<<8|255&q[pe+3])%Math.pow(10,O);return ve(String(et),O,"0")}(E.digest||Ce(v,y,E),E.digits)}function Kt(v,y,E,A,O){return Re({algorithm:O.algorithm,digits:O.digits,type:J.HOTP,accountName:v,counter:A,issuer:y,secret:E})}var De=function(v){function y(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,y),yt(this,Pt(y).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&at(O,q)}(y,v),E=y,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new y(O)}},{key:"allOptions",value:function(){return Sn(this.options)}},{key:"generate",value:function(O,q){return Se(O,q,this.allOptions())}},{key:"check",value:function(O,q,pe){return function(et,Bt,Zt,nr){return!!ee(et)&&et===Se(Bt,Zt,nr)}(O,q,pe,this.allOptions())}},{key:"verify",value:function(O){if(le(O)!=="object")throw new Error("Expecting argument 0 of verify to be an object");return this.check(O.token,O.secret,O.counter)}},{key:"keyuri",value:function(O,q,pe,et){return Kt(O,q,pe,et,this.allOptions())}}])&&Me(E.prototype,A),y}(function(){function v(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")})(this,v),this._defaultOptions=Object.freeze(j({},A)),this._options=Object.freeze({})}var y,E;return y=v,(E=[{key:"create",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new v(A)}},{key:"clone",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=this.create(j({},this._defaultOptions,{},A));return O.options=this._options,O}},{key:"allOptions",value:function(){return this.options}},{key:"resetOptions",value:function(){this._options=Object.freeze({})}},{key:"options",get:function(){return Object.freeze(j({},this._defaultOptions,{},this._options))},set:function(A){this._options=Object.freeze(j({},this._options,{},A))}}])&&T(y.prototype,E),v}());function Le(v){return(Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}function Mt(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function bt(v,y){return!y||Le(y)!=="object"&&typeof y!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(v):y}function Qe(v){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(v)}function st(v,y){return(st=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(v,y)}function Gt(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function Lt(v){for(var y=1;y<arguments.length;y++){var E=arguments[y]!=null?arguments[y]:{};y%2?Gt(Object(E),!0).forEach(function(A){Ge(v,A,E[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(E)):Gt(Object(E)).forEach(function(A){Object.defineProperty(v,A,Object.getOwnPropertyDescriptor(E,A))})}return v}function Ge(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function Ie(v,y){return function(E){if(Array.isArray(E))return E}(v)||function(E,A){if(Symbol.iterator in Object(E)||Object.prototype.toString.call(E)==="[object Arguments]"){var O=[],q=!0,pe=!1,et=void 0;try{for(var Bt,Zt=E[Symbol.iterator]();!(q=(Bt=Zt.next()).done)&&(O.push(Bt.value),!A||O.length!==A);q=!0);}catch(nr){pe=!0,et=nr}finally{try{q||Zt.return==null||Zt.return()}finally{if(pe)throw et}}return O}}(v,y)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ct(v){if(typeof v=="number")return[Math.abs(v),Math.abs(v)];if(Array.isArray(v)){var y=Ie(v,2),E=y[0],A=y[1];if(typeof E=="number"&&typeof A=="number")return[Math.abs(E),Math.abs(A)]}throw new Error("Expecting options.window to be an number or [number, number].")}function Ot(v){if(un(v),ct(v.window),typeof v.epoch!="number")throw new Error("Expecting options.epoch to be a number.");if(typeof v.step!="number")throw new Error("Expecting options.step to be a number.")}var zt=function(v,y,E){var A=v.length,O=nn.from(v,y).toString("hex");if(A<E){var q=new Array(E-A+1).join(O);return nn.from(q,"hex").slice(0,E).toString("hex")}return O},ht=function(v,y,E){switch(v){case i.SHA1:return zt(y,E,20);case i.SHA256:return zt(y,E,32);case i.SHA512:return zt(y,E,64);default:throw new Error("Expecting algorithm to be one of ".concat(G.join(", "),". Received ").concat(v,"."))}};function pn(v){var y=Lt({},{algorithm:i.SHA1,createDigest:ie,createHmacKey:ht,digits:6,encoding:V.ASCII,epoch:Date.now(),step:30,window:0},{},v);return Ot(y),Object.freeze(y)}function wt(v,y){var E,A;return Se(v,(E=y.epoch,A=y.step,Math.floor(E/A/1e3)),y)}function je(v,y,E,A){var O=[];if(A===0)return O;for(var q=1;q<=A;q++){var pe=y*q*E;O.push(v+pe)}return O}function mt(v,y,E){return!!ee(v)&&v===wt(y,E)}function Oe(v,y,E,A){var O=null;return v.some(function(q,pe){return!!mt(y,E,Lt({},A,{epoch:q}))&&(O=pe+1,!0)}),O}function lt(v,y,E){if(mt(v,y,E))return 0;var A,O,q,pe,et,Bt=(A=E.epoch,O=E.step,q=E.window,pe=ct(q),{current:A,past:je(A,-1,et=1e3*O,pe[0]),future:je(A,1,et,pe[1])}),Zt=Oe(Bt.past,v,y,E);return Zt!==null?-1*Zt:Oe(Bt.future,v,y,E)}function hn(v,y){return Math.floor(v/1e3)%y}function qe(v,y,E,A){return Re({algorithm:A.algorithm,digits:A.digits,step:A.step,type:J.TOTP,accountName:v,issuer:y,secret:E})}var xt=function(v){function y(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,y),bt(this,Qe(y).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&st(O,q)}(y,v),E=y,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new y(O)}},{key:"allOptions",value:function(){return pn(this.options)}},{key:"generate",value:function(O){return wt(O,this.allOptions())}},{key:"checkDelta",value:function(O,q){return lt(O,q,this.allOptions())}},{key:"check",value:function(O,q){return typeof this.checkDelta(O,q)=="number"}},{key:"verify",value:function(O){if(Le(O)!=="object")throw new Error("Expecting argument 0 of verify to be an object");return this.check(O.token,O.secret)}},{key:"timeRemaining",value:function(){var O,q,pe=this.allOptions();return O=pe.epoch,(q=pe.step)-hn(O,q)}},{key:"timeUsed",value:function(){var O=this.allOptions();return hn(O.epoch,O.step)}},{key:"keyuri",value:function(O,q,pe){return qe(O,q,pe,this.allOptions())}}])&&Mt(E.prototype,A),y}(De);function m(v){return(m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}function d(v,y){for(var E=0;E<y.length;E++){var A=y[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}function p(v,y){return!y||m(y)!=="object"&&typeof y!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(v):y}function _(v){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)})(v)}function k(v,y){return(k=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(v,y)}function S(v,y){var E=Object.keys(v);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(v);y&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(v,O).enumerable})),E.push.apply(E,A)}return E}function L(v,y,E){return y in v?Object.defineProperty(v,y,{value:E,enumerable:!0,configurable:!0,writable:!0}):v[y]=E,v}function se(v){var y=function(E){for(var A=1;A<arguments.length;A++){var O=arguments[A]!=null?arguments[A]:{};A%2?S(Object(O),!0).forEach(function(q){L(E,q,O[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(O)):S(Object(O)).forEach(function(q){Object.defineProperty(E,q,Object.getOwnPropertyDescriptor(O,q))})}return E}({},{algorithm:i.SHA1,createDigest:ie,createHmacKey:ht,digits:6,encoding:V.HEX,epoch:Date.now(),step:30,window:0},{},v);return function(E){if(Ot(E),typeof E.keyDecoder!="function")throw new Error("Expecting options.keyDecoder to be a function.");if(E.keyEncoder&&typeof E.keyEncoder!="function")throw new Error("Expecting options.keyEncoder to be a function.")}(y),Object.freeze(y)}function ye(v,y){return y.keyEncoder(v,y.encoding)}function _e(v,y){return y.keyDecoder(v,y.encoding)}function be(v,y){return ye(y.createRandomBytes(v,y.encoding),y)}var me=function(v){function y(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,y),p(this,_(y).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&k(O,q)}(y,v),E=y,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new y(O)}},{key:"allOptions",value:function(){return se(this.options)}},{key:"generate",value:function(O){return function(q,pe){return wt(_e(q,pe),pe)}(O,this.allOptions())}},{key:"checkDelta",value:function(O,q){return function(pe,et,Bt){return lt(pe,_e(et,Bt),Bt)}(O,q,this.allOptions())}},{key:"encode",value:function(O){return ye(O,this.allOptions())}},{key:"decode",value:function(O){return _e(O,this.allOptions())}},{key:"generateSecret",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;return be(O,this.allOptions())}}])&&d(E.prototype,A),y}(xt),lo=c.a.lib.WordArray,kt=function(v,y,E){var A=function(pe){switch(pe){case i.SHA1:return h.a;case i.SHA256:return g.a;case i.SHA512:return w.a;default:throw new Error("Expecting argument 0 to be one of ".concat(G.join(", "),". Received ").concat(pe,"."))}}(v),O=P.a.parse(E),q=P.a.parse(y);return String(A(O,q))},Jo=r(7),uo=r.n(Jo),Xo=r(8),Zo=r.n(Xo);function po(v){return(po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y})(v)}r.d(o,"hotp",function(){return ho}),r.d(o,"totp",function(){return er}),r.d(o,"authenticator",function(){return tr}),(typeof window>"u"?"undefined":po(window))==="object"&&window.Buffer===void 0&&(window.Buffer=buffer.Buffer);var ho=new De({createDigest:kt}),er=new xt({createDigest:kt}),tr=new me({createDigest:kt,createRandomBytes:function(v,y){var E=lo.random(v);return nn.from(E.toString(),"hex").toString(y)},keyDecoder:function(v,y){var E=uo()(v.toUpperCase(),"RFC4648");return nn.from(E).toString(y)},keyEncoder:function(v,y){return Zo()(nn.from(v,y),"RFC4648",{padding:!1})}})}])})})(ci);var li=ci.exports;const nl={name:"AuthSecurity",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{accountDelete:!1,changePassword:!1,password:"",passwordRepeat:"",currentPassword:"",otpSecret:null,mfaEnable:!1,qrCodeHash:null,qrCodeRefreshInterval:null,poolingInterval:null,loading:!1}},async mounted(){this.isLoggedIn||this.$router.push("/login"),this.renderView==="AuthSecurity"&&(await this.getAccountSettings(),this.generateOTPQrCode())},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},async deleteAccountSubmit(){await this.deleteAccount()===!0&&(this.successSnack(this.ssoLang[this.appLanguage].profile_delete_account_success),setTimeout(this.$store.dispatch("logout"),1e3))},generateOTPQrCode(){const n=this.account.email;if(this.account.mfaEnabled)this.mfaEnable=!0;else{const e="Tapni",t=li.authenticator.generateSecret();this.otpSecret=t;const o=li.authenticator.keyuri(n,e,t);new ir({width:200,height:200,data:o}).append(document.getElementById("qrCodeContainer"))}},async cancelMFA(){X.$emit("ssoEvent",{name:"mfaCancel",data:!0})},async validateMFA(){if(!this.otp||this.otp.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);this.loading=!0;let n={otpToken:this.otp,otpSecret:this.otpSecret,enable:this.mfaEnable};this.mfaEnable||delete n.otpSecret;const[e,t]=await fe(Fe.setMfa(n,this.$storex));if(e)return X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(e);t.data.success&&(this.getAccountSettings(),this.successSnack(t.data.message)),this.loading=!1},async submitChangePassword(){if(this.password.length<8)return this.errorSnack(this.ssoLang[this.appLanguage].password_8_chars);if(this.password!==this.passwordRepeat)return this.errorSnack(this.ssoLang[this.appLanguage].password_not_match);await this.newPassword({currentPassword:this.currentPassword,password:this.password,passwordRepeat:this.passwordRepeat})===!0&&(this.successSnack(this.ssoLang[this.appLanguage].password_change_success),this.changePassword=!1)}}},ol={class:"page-login content-boxed content-boxed-padding"},rl={class:"subheaderContainer full-top"},il=["src"],al=["src"],sl={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},cl={class:"container center-text"},ll={class:"full-top"},dl={class:"settingRow"},ul={class:"firstRow"},pl={class:"ios-switch",style:{display:"inline-block"}},hl={class:"center-text half-top"},ml={class:"firstRow"},fl={class:"center-text no-margin"},gl={class:"margin-center left-text padding-left small-top"},_l={class:""},vl=["placeholder"],yl=["innerHTML"],bl={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},wl={key:0},kl={key:1,class:"button--loading button__loader"},Cl={class:"close-text center-text half-top"},El=["innerHTML"],Tl={key:1,class:"margin-center small-top",style:{width:"100%"}},Sl={class:"left-text"},Il={key:0},Al={key:1},Rl={class:"firstRow"},Nl=["src"],Pl=["placeholder"],Ml={class:"small-text small-top-padding small-bottom"},Ll=["placeholder"],Ol={class:"small-text small-top-padding small-bottom"},zl=["placeholder"],xl={class:"small-text small-top-padding small-bottom"},Bl={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},Ul={key:0},Dl={key:1,class:"button--loading button__loader"},jl={class:"center-text font-13 half-top half-bottom"},ql=["innerHTML"],Fl={class:"firstRow"},Vl={class:"red-text"},Hl=["src"],Kl={class:"center-text half-top"},Gl={class:"settingRow full-top"},$l={class:"firstRow"},Ql={class:"ios-switch",style:{display:"inline-block"}},Wl={class:"left-text small-top"},Yl={type:"submit",class:"button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},Jl={key:0},Xl={key:1,class:"button--loading button__loader"},Zl={class:"small-bottom red-text"};function ed(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",ol,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[15]||(e[15]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",rl,[n.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=c=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,il)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,al)]),_:1})),a.createElementVNode("h2",sl,a.toDisplayString(n.ssoLang[n.appLanguage].security),1)]),a.createElementVNode("div",cl,[a.createElementVNode("p",null,a.toDisplayString(n.ssoLang[n.appLanguage].security_p),1),a.createElementVNode("div",ll,[a.createElementVNode("div",dl,[a.createElementVNode("div",ul,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth),1),a.createElementVNode("div",pl,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",name:"ios-switch",class:"ios-switch-checkbox",id:"mfa-open-switch","onUpdate:modelValue":e[2]||(e[2]=c=>r.mfaEnable=c)},null,512),[[a.vModelCheckbox,r.mfaEnable]]),e[16]||(e[16]=a.createElementVNode("label",{class:"ios-switch-label",for:"mfa-open-switch"},null,-1))])])]),a.withDirectives(a.createElementVNode("div",hl,[e[17]||(e[17]=a.createElementVNode("div",{id:"qrCodeContainer",class:"qrCodeRounded",style:{"max-width":"100%"}},null,-1)),e[18]||(e[18]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",{class:"settingRow",onClick:e[3]||(e[3]=c=>n.copy(r.otpSecret))},[a.createElementVNode("div",ml,[a.createElementVNode("h4",fl,a.toDisplayString(r.otpSecret),1)])]),a.createElementVNode("div",gl,[a.createElementVNode("p",_l,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_qr),1)])],512),[[a.vShow,r.mfaEnable&&!n.account.mfaEnabled]]),n.account.mfaEnabled!==r.mfaEnable?(a.openBlock(),a.createElementBlock("form",{key:0,onSubmit:e[6]||(e[6]=a.withModifiers((...c)=>i.validateMFA&&i.validateMFA(...c),["prevent"])),class:"half-top"},[a.createElementVNode("div",null,[a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":e[4]||(e[4]=c=>n.otp=c),placeholder:n.ssoLang[n.appLanguage].otp_code,class:"edit-input h-40 lh-40",style:{margin:"0 auto",height:"25px",width:"100%"},required:"",onKeydown:e[5]||(e[5]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"]))},null,40,vl),[[a.vModelText,n.otp]]),a.createElementVNode("p",{class:"small-top full-bottom padding-left left-text",innerHTML:n.ssoLang[n.appLanguage].otp_subtitle},null,8,yl)]),a.createElementVNode("button",bl,[r.loading?(a.openBlock(),a.createElementBlock("span",kl)):(a.openBlock(),a.createElementBlock("span",wl,a.toDisplayString(n.ssoLang[n.appLanguage].continue),1))]),a.createElementVNode("p",Cl,[a.createElementVNode("span",{innerHTML:n.ssoLang[n.appLanguage].otp_p1},null,8,El),e[19]||(e[19]=a.createElementVNode("a",{href:"mailto:support@tapni.com?subject=MFA Authentication Problem"}," support@tapni.com",-1))])],32)):(a.openBlock(),a.createElementBlock("div",Tl,[a.createElementVNode("div",Sl,[r.mfaEnable?(a.openBlock(),a.createElementBlock("p",Il,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_enabled),1)):(a.openBlock(),a.createElementBlock("p",Al,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_p),1))])])),a.createElementVNode("div",{class:"settingRow full-top",onClick:e[7]||(e[7]=c=>r.changePassword=!r.changePassword)},[a.createElementVNode("div",Rl,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].change_password),1),a.createElementVNode("img",{class:a.normalizeClass(["transition-icon",{"rotate-icon":!!r.changePassword}]),src:n.getIcon("arrow-gray-down.svg")},null,10,Nl)])]),a.withDirectives(a.createElementVNode("form",{onSubmit:e[11]||(e[11]=a.withModifiers((...c)=>i.submitChangePassword&&i.submitChangePassword(...c),["prevent"])),class:"center-text half-top"},[a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[8]||(e[8]=c=>r.currentPassword=c),placeholder:n.ssoLang[n.appLanguage].password_current_p,class:"edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,Pl),[[a.vModelText,r.currentPassword]]),a.createElementVNode("p",Ml,a.toDisplayString(n.ssoLang[n.appLanguage].password_current),1),a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[9]||(e[9]=c=>r.password=c),placeholder:n.ssoLang[n.appLanguage].password_new_p,class:"bg-white edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,Ll),[[a.vModelText,r.password]]),a.createElementVNode("p",Ol,a.toDisplayString(n.ssoLang[n.appLanguage].password_new),1),a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[10]||(e[10]=c=>r.passwordRepeat=c),placeholder:n.ssoLang[n.appLanguage].password_new_repeat_p,class:"edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,zl),[[a.vModelText,r.passwordRepeat]]),a.createElementVNode("p",xl,a.toDisplayString(n.ssoLang[n.appLanguage].password_new_repeat),1),a.createElementVNode("button",Bl,[r.loading?(a.openBlock(),a.createElementBlock("span",Dl)):(a.openBlock(),a.createElementBlock("span",Ul,a.toDisplayString(n.ssoLang[n.appLanguage].password_update),1))]),a.createElementVNode("p",jl,[a.createElementVNode("span",{innerHTML:n.ssoLang[n.appLanguage].password_reset},null,8,ql),a.createVNode(s,{to:"/reset",exact:"",class:"color-black"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].by_clicking_here),1)]),_:1})])],544),[[a.vShow,r.changePassword]]),a.createElementVNode("div",{class:"settingRow full-top",onClick:e[12]||(e[12]=c=>r.accountDelete=!r.accountDelete)},[a.createElementVNode("div",Fl,[a.createElementVNode("h4",Vl,a.toDisplayString(n.ssoLang[n.appLanguage].delete_account),1),a.createElementVNode("img",{class:a.normalizeClass(["transition-icon",{"rotate-icon":!!r.accountDelete}]),src:n.getIcon("arrow-gray-down.svg")},null,10,Hl)])]),a.withDirectives(a.createElementVNode("div",Kl,[a.createElementVNode("div",Gl,[a.createElementVNode("div",$l,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].active_account),1),a.createElementVNode("div",Ql,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",name:"ios-switch",class:"ios-switch-checkbox",id:"active-open-switch","onUpdate:modelValue":e[13]||(e[13]=c=>n.account.is_active=c)},null,512),[[a.vModelCheckbox,n.account.is_active]]),e[20]||(e[20]=a.createElementVNode("label",{class:"ios-switch-label",for:"active-open-switch"},null,-1))])])]),a.createElementVNode("p",Wl,a.toDisplayString(n.ssoLang[n.appLanguage].active_account_p),1),a.createElementVNode("form",{onSubmit:e[14]||(e[14]=a.withModifiers((...c)=>i.deleteAccountSubmit&&i.deleteAccountSubmit(...c),["prevent"]))},[a.createElementVNode("button",Yl,[r.loading?(a.openBlock(),a.createElementBlock("span",Xl)):(a.openBlock(),a.createElementBlock("span",Jl,a.toDisplayString(n.ssoLang[n.appLanguage].permanent_delete),1))]),a.createElementVNode("p",Zl,a.toDisplayString(n.ssoLang[n.appLanguage].permanent_delete_p),1)],32)],512),[[a.vShow,r.accountDelete]])])])])}const Ko=nt(nl,[["render",ed],["__scopeId","data-v-64ae2517"]]),td=Object.freeze(Object.defineProperty({__proto__:null,default:Ko},Symbol.toStringTag,{value:"Module"})),nd={name:"AuthBilling",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,subscriptions:[],showCancelModal:!1,selectedSubscription:null,cancelFeedback:""}},async mounted(){this.isLoggedIn||this.$router.push("/login"),await this.getAccountSettings(),this.loadSubscriptions()},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},loadSubscriptions(){if(this.account.billing){const n=this.account.billing,e=[];for(const t in n)t!=="region"&&t!=="currency"&&t!=="paymentProfiles"&&typeof n[t]=="object"&&n[t].subscriptionId&&e.push(n[t]);this.subscriptions=e}},formatCurrency(n,e){return`${{EUR:"€",USD:"$",GBP:"£"}[e==null?void 0:e.toUpperCase()]||e||""}${(n==null?void 0:n.toFixed(2))||"0.00"}`},formatInterval(n){return n?`per ${n}`:""},formatDate(n){return n?new Date(n*1e3).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):""},getStatusText(n){return{trialing:"Trial",active:"Active",past_due:"Past Due",canceled:"Canceled",unpaid:"Unpaid"}[n]||n},getStatusClass(n){return`status-${n}`},openCancelModal(n){this.selectedSubscription=n,this.showCancelModal=!0,this.cancelFeedback=""},closeCancelModal(){this.showCancelModal=!1,this.selectedSubscription=null,this.cancelFeedback=""},async confirmCancel(){var n,e;if(this.selectedSubscription){if(this.selectedSubscription.paymentGateway==="revenuecat"){X.$emit("ssoEvent",{name:"subscriptionCancelled",data:{subscriptionId:this.selectedSubscription.subscriptionId,paymentGateway:this.selectedSubscription.paymentGateway,feedback:this.cancelFeedback}}),this.closeCancelModal();return}this.loading=!0;try{const t=await ce(!1,"v2").post("checkout/cancel/"+this.selectedSubscription.subscriptionId,{feedback:this.cancelFeedback});if(t.data.success)X.$emit("showToast",{type:"success",message:"Subscription canceled successfully"}),await this.getAccountSettings(),this.loadSubscriptions(),this.closeCancelModal();else throw new Error(t.data.message||"Failed to cancel subscription")}catch(t){console.error("Error canceling subscription:",t),X.$emit("showToast",{type:"error",message:((e=(n=t.response)==null?void 0:n.data)==null?void 0:e.message)||"Failed to cancel subscription. Please try again."})}finally{this.loading=!1}}}}},od={class:"page-login content-boxed content-boxed-padding tapni-auth-billing"},rd={class:"subheaderContainer full-top"},id=["src"],ad=["src"],sd={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},cd={class:"container left-text"},ld={class:"center-text"},dd={class:"full-top"},ud={key:0,class:"no-subscriptions center-text full-top"},pd={key:1},hd={class:"subscription-header"},md={class:"subscription-info"},fd={class:"subscription-name"},gd={class:"subscription-details"},_d={class:"detail-row"},vd={class:"detail-value"},yd={class:"detail-row"},bd={class:"detail-value"},wd={class:"detail-row"},kd={class:"detail-value"},Cd={key:0,class:"detail-row"},Ed={class:"detail-value"},Td={key:1,class:"detail-row"},Sd={class:"detail-value"},Id={key:0,class:"subscription-actions"},Ad=["onClick","disabled"],Rd={class:"modal-content"},Nd={class:"modal-header"},Pd={class:"modal-body"},Md={class:"modal-text"},Ld={class:"feedback-section"},Od={class:"modal-footer"},zd=["disabled"];function xd(n,e,t,o,r,i){var c;const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",od,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...l)=>i.close&&i.close(...l)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",rd,[n.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=l=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,id)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,ad)]),_:1})),a.createElementVNode("h2",sd,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1)]),a.createElementVNode("div",cd,[a.createElementVNode("p",ld,a.toDisplayString(n.ssoLang[n.appLanguage].billing_p),1),a.createElementVNode("div",dd,[r.subscriptions.length===0?(a.openBlock(),a.createElementBlock("div",ud,e[8]||(e[8]=[a.createElementVNode("p",{class:"gray-text"},"There are no active subscriptions at this point.",-1)]))):(a.openBlock(),a.createElementBlock("div",pd,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.subscriptions,l=>(a.openBlock(),a.createElementBlock("div",{key:l.subscriptionId,class:"subscription-card half-bottom"},[a.createElementVNode("div",hd,[a.createElementVNode("div",md,[a.createElementVNode("h3",fd,a.toDisplayString(l.subscriptionName),1),a.createElementVNode("span",{class:a.normalizeClass(["subscription-status",i.getStatusClass(l.status)])},a.toDisplayString(i.getStatusText(l.status)),3)])]),a.createElementVNode("div",gd,[a.createElementVNode("div",_d,[e[9]||(e[9]=a.createElementVNode("span",{class:"detail-label"},"Amount:",-1)),a.createElementVNode("span",vd,a.toDisplayString(i.formatCurrency(l.amount,l.currency)),1)]),a.createElementVNode("div",yd,[e[10]||(e[10]=a.createElementVNode("span",{class:"detail-label"},"Billing:",-1)),a.createElementVNode("span",bd,a.toDisplayString(i.formatInterval(l.interval)),1)]),a.createElementVNode("div",wd,[e[11]||(e[11]=a.createElementVNode("span",{class:"detail-label"},"Licenses:",-1)),a.createElementVNode("span",kd,a.toDisplayString(l.licenses),1)]),l.isTrial?(a.openBlock(),a.createElementBlock("div",Cd,[e[12]||(e[12]=a.createElementVNode("span",{class:"detail-label"},"Trial Ends:",-1)),a.createElementVNode("span",Ed,a.toDisplayString(i.formatDate(l.trialEnd)),1)])):l.endDate?(a.openBlock(),a.createElementBlock("div",Td,[e[13]||(e[13]=a.createElementVNode("span",{class:"detail-label"},"Next Billing:",-1)),a.createElementVNode("span",Sd,a.toDisplayString(i.formatDate(l.endDate)),1)])):a.createCommentVNode("",!0)]),l.status!=="canceled"?(a.openBlock(),a.createElementBlock("div",Id,[a.createElementVNode("button",{onClick:h=>i.openCancelModal(l),class:"cancel-button",disabled:r.loading},a.toDisplayString(r.loading?"Processing...":"Cancel Subscription"),9,Ad)])):a.createCommentVNode("",!0)]))),128))]))])]),r.showCancelModal?(a.openBlock(),a.createElementBlock("div",{key:1,class:"modal-overlay",onClick:e[6]||(e[6]=a.withModifiers((...l)=>i.closeCancelModal&&i.closeCancelModal(...l),["self"]))},[a.createElementVNode("div",Rd,[a.createElementVNode("div",Nd,[e[14]||(e[14]=a.createElementVNode("h3",null,"Cancel Subscription",-1)),a.createElementVNode("button",{onClick:e[2]||(e[2]=(...l)=>i.closeCancelModal&&i.closeCancelModal(...l)),class:"close-button"},"×")]),a.createElementVNode("div",Pd,[a.createElementVNode("p",Md,[e[15]||(e[15]=a.createTextVNode(" Are you sure you want to cancel your subscription to ")),a.createElementVNode("b",null,a.toDisplayString((c=r.selectedSubscription)==null?void 0:c.subscriptionName),1),e[16]||(e[16]=a.createTextVNode("? "))]),a.createElementVNode("div",Ld,[e[17]||(e[17]=a.createElementVNode("label",{class:"feedback-label"},"We'd love to know why you're canceling (optional):",-1)),a.withDirectives(a.createElementVNode("textarea",{"onUpdate:modelValue":e[3]||(e[3]=l=>r.cancelFeedback=l),class:"feedback-textarea",placeholder:"Your feedback helps us improve our service...",rows:"4"},null,512),[[a.vModelText,r.cancelFeedback]])])]),a.createElementVNode("div",Od,[a.createElementVNode("button",{onClick:e[4]||(e[4]=(...l)=>i.closeCancelModal&&i.closeCancelModal(...l)),class:"button-secondary"}," Keep Subscription "),a.createElementVNode("button",{onClick:e[5]||(e[5]=(...l)=>i.confirmCancel&&i.confirmCancel(...l)),class:"button-danger",disabled:r.loading},a.toDisplayString(r.loading?"Canceling...":"Confirm Cancellation"),9,zd)])])])):a.createCommentVNode("",!0)])}const Go=nt(nd,[["render",xd]]),Bd=Object.freeze(Object.defineProperty({__proto__:null,default:Go},Symbol.toStringTag,{value:"Module"}));(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('@keyframes spinner-circle-animation-ed866313{0%,39%,to{opacity:0}40%{opacity:1}}.spinner[data-v-ed866313]{position:relative;width:var(--vs-spinner-size);height:var(--vs-spinner-size);margin:0;padding:0}.spinner-circle[data-v-ed866313]{width:100%;height:100%;position:absolute;left:0;top:0}.spinner-circle[data-v-ed866313]:before{content:"";display:block;margin:0 auto;width:15%;height:15%;background-color:var(--vs-spinner-color);border-radius:100%;-webkit-animation:spinner-circle-animation-ed866313 1.2s infinite ease-in-out both;animation:spinner-circle-animation-ed866313 1.2s infinite ease-in-out both}.spinner-circle[data-v-ed866313]:nth-child(2){transform:rotate(30deg)}.spinner-circle[data-v-ed866313]:nth-child(3){transform:rotate(60deg)}.spinner-circle[data-v-ed866313]:nth-child(4){transform:rotate(90deg)}.spinner-circle[data-v-ed866313]:nth-child(5){transform:rotate(120deg)}.spinner-circle[data-v-ed866313]:nth-child(6){transform:rotate(150deg)}.spinner-circle[data-v-ed866313]:nth-child(7){transform:rotate(180deg)}.spinner-circle[data-v-ed866313]:nth-child(8){transform:rotate(210deg)}.spinner-circle[data-v-ed866313]:nth-child(9){transform:rotate(240deg)}.spinner-circle[data-v-ed866313]:nth-child(10){transform:rotate(270deg)}.spinner-circle[data-v-ed866313]:nth-child(11){transform:rotate(300deg)}.spinner-circle[data-v-ed866313]:nth-child(12){transform:rotate(330deg)}.spinner-circle[data-v-ed866313]:nth-child(2):before{animation-delay:-1.1s}.spinner-circle[data-v-ed866313]:nth-child(3):before{animation-delay:-1s}.spinner-circle[data-v-ed866313]:nth-child(4):before{animation-delay:-.9s}.spinner-circle[data-v-ed866313]:nth-child(5):before{animation-delay:-.8s}.spinner-circle[data-v-ed866313]:nth-child(6):before{animation-delay:-.7s}.spinner-circle[data-v-ed866313]:nth-child(7):before{animation-delay:-.6s}.spinner-circle[data-v-ed866313]:nth-child(8):before{animation-delay:-.5s}.spinner-circle[data-v-ed866313]:nth-child(9):before{animation-delay:-.4s}.spinner-circle[data-v-ed866313]:nth-child(10):before{animation-delay:-.3s}.spinner-circle[data-v-ed866313]:nth-child(11):before{animation-delay:-.2s}.spinner-circle[data-v-ed866313]:nth-child(12):before{animation-delay:-.1s}:root{--vs-input-bg: #fff;--vs-input-outline: #3b82f6;--vs-input-placeholder-color: #52525b;--vs-padding: .25rem .5rem;--vs-border: 1px solid #e4e4e7;--vs-border-radius: 4px;--vs-font-size: 16px;--vs-font-weight: 400;--vs-font-family: inherit;--vs-text-color: #18181b;--vs-line-height: 1.5;--vs-menu-offset-top: 8px;--vs-menu-height: 200px;--vs-menu-padding: 0;--vs-menu-border: 1px solid #e4e4e7;--vs-menu-bg: #fff;--vs-menu-box-shadow: none;--vs-menu-z-index: 2;--vs-option-padding: 8px 12px;--vs-option-font-size: var(--vs-font-size);--vs-option-font-weight: var(--vs-font-weight);--vs-option-text-color: var(--vs-text-color);--vs-option-bg: var(--vs-menu-bg);--vs-option-hover-color: #dbeafe;--vs-option-focused-color: var(--vs-option-hover-color);--vs-option-selected-color: #93c5fd;--vs-option-disabled-color: #f4f4f5;--vs-option-disabled-text-color: #52525b;--vs-multi-value-gap: 0px;--vs-multi-value-padding: 4px;--vs-multi-value-margin: 4px 0px 4px 6px;--vs-multi-value-font-size: 14px;--vs-multi-value-font-weight: 400;--vs-multi-value-line-height: 1;--vs-multi-value-text-color: #3f3f46;--vs-multi-value-bg: #f4f4f5;--vs-multi-value-xmark-size: 16px;--vs-multi-value-xmark-color: var(--vs-multi-value-text-color);--vs-indicators-gap: 4px;--vs-icon-size: 20px;--vs-icon-color: var(--vs-text-color);--vs-spinner-color: var(--vs-text-color);--vs-spinner-size: 20px;--vs-dropdown-transition: transform .25s ease-out}.vue-select[data-v-7f19f42a]{position:relative;box-sizing:border-box;width:100%}.vue-select[data-v-7f19f42a] *{box-sizing:border-box}.vue-select.open .single-value[data-v-7f19f42a]{position:absolute;opacity:.4}.vue-select.open .dropdown-icon[data-v-7f19f42a]{transform:rotate(180deg)}.vue-select.typing .single-value[data-v-7f19f42a]{opacity:0}.control[data-v-7f19f42a]{display:flex;min-height:32px;border:var(--vs-border);border-radius:var(--vs-border-radius);background-color:var(--vs-input-bg)}.control.focused[data-v-7f19f42a]{box-shadow:0 0 0 1px var(--vs-input-outline);border-color:var(--vs-input-outline)}.value-container[data-v-7f19f42a]{position:relative;display:flex;flex-wrap:wrap;align-items:center;flex-basis:100%;flex-grow:1}.value-container.multi[data-v-7f19f42a]{gap:var(--vs-multi-value-gap)}.single-value[data-v-7f19f42a]{display:flex;align-items:center;padding:var(--vs-padding);font-size:var(--vs-font-size);font-weight:var(--vs-font-weight);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);z-index:0}.multi-value[data-v-7f19f42a]{appearance:none;display:flex;align-items:center;gap:var(--vs-multi-value-gap);padding:var(--vs-multi-value-padding);margin:var(--vs-multi-value-margin);border:0;font-size:var(--vs-multi-value-font-size);font-weight:var(--vs-multi-value-font-weight);color:var(--vs-multi-value-text-color);line-height:var(--vs-multi-value-line-height);background:var(--vs-multi-value-bg);outline:none;cursor:pointer}.multi-value svg[data-v-7f19f42a]{width:var(--vs-multi-value-xmark-size);height:var(--vs-multi-value-xmark-size);fill:var(--vs-multi-value-xmark-color)}.search-input[data-v-7f19f42a]{appearance:none;display:inline-block;max-width:100%;flex-grow:1;width:0;margin:0;padding:0;border:0;background:none;padding:var(--vs-padding);font-size:var(--vs-font-size);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);outline:none;z-index:1}.search-input[data-v-7f19f42a]::placeholder{color:var(--vs-input-placeholder-color)}.indicators-container[data-v-7f19f42a]{display:flex;align-items:center;flex-shrink:0;gap:var(--vs-indicators-gap);padding:var(--vs-padding)}.clear-button[data-v-7f19f42a]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);color:var(--vs-icon-color);background:none;outline:none;cursor:pointer}.dropdown-icon[data-v-7f19f42a]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);color:var(--vs-icon-color);background:none;outline:none;cursor:pointer;transition:var(--vs-dropdown-transition)}.menu[data-v-7f19f42a]{position:absolute;left:0;right:0;padding:var(--vs-menu-padding);margin-top:var(--vs-menu-offset-top);max-height:var(--vs-menu-height);overflow-y:auto;border:var(--vs-menu-border);border-radius:var(--vs-border-radius);box-shadow:var(--vs-menu-box-shadow);background-color:var(--vs-menu-bg);z-index:var(--vs-menu-z-index)}.menu-option[data-v-7f19f42a]{display:flex;width:100%;border:0;margin:0;padding:var(--vs-option-padding);font-size:var(--vs-option-font-size);font-weight:var(--vs-option-font-weight);font-family:var(--vs-font-family);color:var(--vs-option-text-color);background-color:var(--vs-option-bg);text-align:-webkit-auto;cursor:pointer}.menu-option[data-v-7f19f42a]:hover{background-color:var(--vs-option-hover-color)}.menu-option.focused[data-v-7f19f42a]{background-color:var(--vs-option-focused-color)}.menu-option.selected[data-v-7f19f42a]{background-color:var(--vs-option-selected-color)}.menu-option.disabled[data-v-7f19f42a]{background-color:var(--vs-option-disabled-color);color:var(--vs-option-disabled-text-color)}.no-results[data-v-7f19f42a]{padding:var(--vs-option-padding);font-size:var(--vs-font-size);font-family:var(--vs-font-family);color:var(--vs-text-color)}')),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const co=(n,e)=>{const t=n.__vccOpts||n;for(const[o,r]of e)t[o]=r;return t},Ud={},Dd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"};function jd(n,e){return a.openBlock(),a.createElementBlock("svg",Dd,e[0]||(e[0]=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)]))}const qd=co(Ud,[["render",jd]]),Fd={},Vd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"};function Hd(n,e){return a.openBlock(),a.createElementBlock("svg",Vd,e[0]||(e[0]=[a.createElementVNode("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"},null,-1)]))}const di=co(Fd,[["render",Hd]]),Kd=["aria-disabled","aria-selected"],Gd=a.defineComponent({__name:"MenuOption",props:{menu:{},index:{},isFocused:{type:Boolean},isSelected:{type:Boolean},isDisabled:{type:Boolean}},emits:["select"],setup(n,{emit:e}){const t=n,o=e,r=a.ref(null);return a.watch(()=>t.isFocused,()=>{if(t.isFocused&&t.menu){const i=t.menu.children[t.index],s=i.offsetTop,c=s+i.clientHeight,l=t.menu.scrollTop,h=t.menu.clientHeight;s<l?t.menu.scrollTop=s:c>l+h&&(t.menu.scrollTop=c-h)}}),(i,s)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"option",ref:r,tabindex:"-1",role:"option",class:a.normalizeClass({focused:i.isFocused,selected:i.isSelected,disabled:i.isDisabled}),"aria-disabled":i.isDisabled,"aria-selected":i.isSelected,onClick:s[0]||(s[0]=c=>o("select")),onKeydown:s[1]||(s[1]=a.withKeys(c=>o("select"),["enter"]))},[a.renderSlot(i.$slots,"default")],42,Kd))}}),$d={},Qd={className:"spinner"};function Wd(n,e){return a.openBlock(),a.createElementBlock("div",Qd,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(12,t=>a.createElementVNode("div",{key:t,class:"spinner-circle"})),64))])}const Yd=co($d,[["render",Wd],["__scopeId","data-v-ed866313"]]),Jd=["aria-expanded","aria-describedby","aria-description","aria-labelledby","aria-label","aria-required"],Xd=["onClick"],Zd=["id","disabled","placeholder"],eu={class:"indicators-container"},tu=["disabled"],nu=["disabled"],ou=["aria-label","aria-multiselectable"],ru={key:0,class:"no-results"},iu={name:"AuthGeneral",mixins:[We],components:{VueSelect:co(a.defineComponent({__name:"Select",props:a.mergeModels({options:{},displayedOptions:{},placeholder:{default:"Select an option"},isClearable:{type:Boolean,default:!0},isDisabled:{type:Boolean,default:!1},isSearchable:{type:Boolean,default:!0},isMulti:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},shouldAutofocusOption:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},teleport:{default:void 0},inputId:{default:void 0},aria:{default:void 0},filterBy:{type:Function,default:(n,e,t)=>e.toLowerCase().includes(t.toLowerCase())},getOptionLabel:{type:Function,default:n=>n.label},getMultiValueLabel:{type:Function,default:n=>n.label}},{modelValue:{required:!0,validator:(n,e)=>e.isMulti?Array.isArray(n):!Array.isArray(n)},modelModifiers:{}}),emits:a.mergeModels(["optionSelected","optionDeselected","search"],["update:modelValue"]),setup(n,{emit:e}){const t=n,o=e,r=a.useModel(n,"modelValue"),i=a.ref(null),s=a.ref(null),c=a.ref(null),l=a.ref(""),h=a.ref(!1),u=a.ref(-1),g=a.computed(()=>{const I=t.displayedOptions||t.options,W=ie=>ie.filter(ee=>!r.value.includes(ee.value));if(t.isSearchable&&l.value){const ie=I.filter(ee=>{const ve=t.isMulti?t.getMultiValueLabel(ee):t.getOptionLabel(ee);return t.filterBy(ee,ve,l.value)});return t.isMulti?W(ie):ie}return t.isMulti?W(I):I}),f=a.computed(()=>{if(t.isMulti&&Array.isArray(r.value))return r.value.map(W=>t.options.find(ie=>ie.value===W));t.isMulti&&!Array.isArray(r.value)&&console.warn(`[vue3-select-component warn]: The v-model provided should be an array when using \`isMulti\` prop, instead it was: ${r.value}`);const I=t.options.find(W=>W.value===r.value);return I?[I]:[]}),w=I=>{h.value=!0,t.shouldAutofocusOption&&(u.value=t.options.findIndex(W=>!W.disabled)),I!=null&&I.focusInput&&s.value&&s.value.focus()},C=()=>{h.value=!1,l.value=""},P=()=>{h.value?C():w()},M=I=>{I.disabled||(t.isMulti?r.value.push(I.value):r.value=I.value,o("optionSelected",I),l.value="",t.closeOnSelect&&(h.value=!1),s.value&&s.value.blur())},j=I=>{t.isMulti&&!t.isDisabled&&(r.value=r.value.filter(W=>W!==I.value),o("optionDeselected",I))},N=()=>{t.isMulti?(r.value=[],o("optionDeselected",null)):(r.value=void 0,o("optionDeselected",f.value[0])),h.value=!1,l.value="",s.value&&s.value.blur()},T=I=>{if(h.value){const W=u.value;if(I.key==="ArrowDown"){I.preventDefault();const ee=g.value.findIndex((Re,le)=>!Re.disabled&&le>W),ve=g.value.findIndex(Re=>!Re.disabled);u.value=ee===-1?ve:ee}if(I.key==="ArrowUp"){I.preventDefault();const ee=g.value.reduce((Re,le,Me)=>!le.disabled&&Me<W?Me:Re,-1),ve=g.value.reduce((Re,le,Me)=>le.disabled?Re:Me,-1);u.value=ee===-1?ve:ee}if(I.key==="Enter"){const ee=g.value[W];I.preventDefault(),ee&&M(ee)}if(I.code==="Space"&&l.value.length===0){const ee=g.value[W];I.preventDefault(),ee&&M(ee)}I.key==="Escape"&&(I.preventDefault(),h.value=!1,l.value="");const ie=t.isMulti?r.value.length>0:!!r.value;I.key==="Backspace"&&l.value.length===0&&ie&&(I.preventDefault(),t.isMulti?r.value=r.value.slice(0,-1):r.value=void 0)}},B=I=>{!h.value&&l.value.length===0&&(I.preventDefault(),I.stopImmediatePropagation(),w())},V=I=>{I.key==="Tab"?C():I.key==="Space"&&B(I)},G=I=>{i.value&&!i.value.contains(I.target)&&(h.value=!1,l.value="")},J=()=>{if(i.value){const I=i.value.getBoundingClientRect();return{left:`${I.x}px`,top:`${I.y+I.height}px`}}return console.warn("Unable to calculate dynamic menu position because of missing internal DOM reference."),{top:"0px",left:"0px"}};return a.watch(()=>l.value,()=>{o("search",l.value),l.value&&!h.value&&w()}),a.onMounted(()=>{document.addEventListener("click",G),document.addEventListener("keydown",T)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",G),document.removeEventListener("keydown",T)}),(I,W)=>{var ie,ee,ve,Re;return a.openBlock(),a.createElementBlock("div",{ref_key:"container",ref:i,dir:"auto",class:a.normalizeClass(["vue-select",{open:h.value,typing:h.value&&l.value.length>0,disabled:I.isDisabled}])},[a.createElementVNode("div",{class:a.normalizeClass(["control",{focused:h.value}])},[a.createElementVNode("div",{class:a.normalizeClass(["value-container",{multi:I.isMulti}]),role:"combobox","aria-expanded":h.value,"aria-describedby":I.placeholder,"aria-description":I.placeholder,"aria-labelledby":(ie=I.aria)==null?void 0:ie.labelledby,"aria-label":f.value.length?f.value.map(I.isMulti?I.getMultiValueLabel:I.getOptionLabel).join(", "):"","aria-required":(ee=I.aria)==null?void 0:ee.required},[!t.isMulti&&f.value[0]?(a.openBlock(),a.createElementBlock("div",{key:0,class:"single-value",onClick:W[0]||(W[0]=le=>t.isDisabled?null:w({focusInput:!0}))},[a.renderSlot(I.$slots,"value",{option:f.value[0]},()=>[a.createTextVNode(a.toDisplayString(I.getOptionLabel(f.value[0])),1)],!0)])):a.createCommentVNode("",!0),t.isMulti&&f.value.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(f.value,le=>a.renderSlot(I.$slots,"tag",{key:le.value,option:le,removeOption:()=>j(le)},()=>[a.createElementVNode("button",{type:"button",class:"multi-value",onClick:Me=>j(le)},[a.createTextVNode(a.toDisplayString(I.getMultiValueLabel(le)),1),a.createVNode(di)],8,Xd)],!0)),128)):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("input",{id:I.inputId,ref_key:"input",ref:s,"onUpdate:modelValue":W[1]||(W[1]=le=>l.value=le),class:"search-input",type:"text","aria-autocomplete":"list",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",tabindex:"0",disabled:I.isDisabled,placeholder:f.value.length===0?I.placeholder:"",onMousedown:W[2]||(W[2]=le=>w()),onKeydown:V},null,40,Zd),[[a.vModelText,l.value]])],10,Jd),a.createElementVNode("div",eu,[f.value.length>0&&I.isClearable&&!I.isLoading?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"clear-button",tabindex:"-1",disabled:I.isDisabled,onClick:N},[a.renderSlot(I.$slots,"clear",{},()=>[a.createVNode(di)],!0)],8,tu)):a.createCommentVNode("",!0),I.isLoading?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("button",{key:1,type:"button",class:"dropdown-icon",tabindex:"-1",disabled:I.isDisabled,onClick:P},[a.renderSlot(I.$slots,"dropdown",{},()=>[a.createVNode(qd)],!0)],8,nu)),a.renderSlot(I.$slots,"loading",{},()=>[I.isLoading?(a.openBlock(),a.createBlock(Yd,{key:0})):a.createCommentVNode("",!0)],!0)])],2),(a.openBlock(),a.createBlock(a.Teleport,{to:I.teleport,disabled:!I.teleport,defer:!0},[h.value?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"menu",ref:c,class:"menu",role:"listbox","aria-label":(ve=I.aria)==null?void 0:ve.labelledby,"aria-multiselectable":I.isMulti,style:a.normalizeStyle({width:t.teleport?`${(Re=i.value)==null?void 0:Re.getBoundingClientRect().width}px`:"100%",top:t.teleport?J().top:"unset",left:t.teleport?J().left:"unset"})},[a.renderSlot(I.$slots,"menu-header",{},void 0,!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(g.value,(le,Me)=>(a.openBlock(),a.createBlock(Gd,{key:Me,type:"button",class:a.normalizeClass(["menu-option",{focused:u.value===Me,selected:le.value===r.value}]),menu:c.value,index:Me,"is-focused":u.value===Me,"is-selected":le.value===r.value,"is-disabled":le.disabled||!1,onSelect:yt=>M(le)},{default:a.withCtx(()=>[a.renderSlot(I.$slots,"option",{option:le},()=>[a.createTextVNode(a.toDisplayString(I.getOptionLabel(le)),1)],!0)]),_:2},1032,["class","menu","index","is-focused","is-selected","is-disabled","onSelect"]))),128)),g.value.length===0?(a.openBlock(),a.createElementBlock("div",ru,[a.renderSlot(I.$slots,"no-options",{},()=>[W[3]||(W[3]=a.createTextVNode(" No results found "))],!0)])):a.createCommentVNode("",!0)],12,ou)):a.createCommentVNode("",!0)],8,["to","disabled"]))],2)}}}),[["__scopeId","data-v-7f19f42a"]])},props:{isModal:{type:Boolean,default:!1},payload:{type:Object,default:{}}},data(){return{loading:!1}},watch:{"account.lang":{handler(n){n&&(this.updateLang(n),this.display==="npm"&&this.$store.commit("setLanguage",n))},immediate:!0}},async mounted(){this.isLoggedIn||this.$router.push("/login"),await this.getAccountSettings()},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},async submitGeneralUpdate(){var o;this.loading=!0;const n={name:this.account.name,lang:this.account.lang,email:this.account.email,region:(o=this.account.billing)==null?void 0:o.region},[e,t]=await fe(In.updateAccount(n));e?this.errorHandler(e):t.data.success&&(this.successSnack(this.ssoLang[this.appLanguage].profile_update_success),await this.getAccountSettings()),this.loading=!1}}},au={class:"page-login content-boxed content-boxed-padding tapni-auth-general"},su={class:"subheaderContainer full-top"},cu=["src"],lu=["src"],du={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},uu={class:"container left-text"},pu={class:"center-text"},hu={class:"full-top bold small-bottom"},mu=["placeholder"],fu=["placeholder"],gu={class:"full-top bold"},_u={class:"full-top bold"},vu={type:"submit",class:"button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},yu={key:0},bu={key:1,class:"button--loading button__loader"};function wu(n,e,t,o,r,i){const s=a.resolveComponent("router-link"),c=a.resolveComponent("VueSelect");return a.openBlock(),a.createElementBlock("div",au,[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...l)=>i.close&&i.close(...l)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",su,[t.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=l=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,cu)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,lu)]),_:1})),a.createElementVNode("h2",du,a.toDisplayString(n.ssoLang[n.appLanguage].general),1)]),a.createElementVNode("div",uu,[a.createElementVNode("p",pu,a.toDisplayString(n.ssoLang[n.appLanguage].general_p),1),a.createElementVNode("form",{class:"full-top",onSubmit:e[6]||(e[6]=a.withModifiers((...l)=>i.submitGeneralUpdate&&i.submitGeneralUpdate(...l),["prevent"]))},[a.createElementVNode("h3",hu,a.toDisplayString(n.ssoLang[n.appLanguage].personal_details),1),a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":e[2]||(e[2]=l=>n.account.name=l),placeholder:n.ssoLang[n.appLanguage].name,class:"edit-input h-40 lh-40 small-bottom",required:"",style:{width:"100%"}},null,8,mu),[[a.vModelText,n.account.name]]),a.withDirectives(a.createElementVNode("input",{disabled:"",type:"email","onUpdate:modelValue":e[3]||(e[3]=l=>n.account.email=l),placeholder:n.ssoLang[n.appLanguage].email,class:"bg-white edit-input h-40 lh-40 small-bottom",required:"",style:{width:"100%"}},null,8,fu),[[a.vModelText,n.account.email]]),a.createElementVNode("h3",gu,a.toDisplayString(n.ssoLang[n.appLanguage].app_region),1),n.account.billing?(a.openBlock(),a.createBlock(c,{key:0,modelValue:n.account.billing.region,"onUpdate:modelValue":e[4]||(e[4]=l=>n.account.billing.region=l),options:[{label:"United States",value:"us"},{label:"United Kingdom",value:"uk"},{label:"European Union",value:"eu"},{label:"Mexico",value:"mx"},{label:"Mauritius",value:"mu"},{label:"Colombia",value:"co"},{label:"Serbia",value:"rs"},{label:"Singapore",value:"sg"},{label:"China",value:"cn"}],isClearable:!1,placeholder:"Select region"},null,8,["modelValue"])):a.createCommentVNode("",!0),a.createCommentVNode("",!0),a.createElementVNode("h3",_u,a.toDisplayString(n.ssoLang[n.appLanguage].app_language),1),a.createVNode(c,{modelValue:n.account.lang,"onUpdate:modelValue":e[5]||(e[5]=l=>n.account.lang=l),options:[{label:n.ssoLang[n.appLanguage].english,value:"en"},{label:n.ssoLang[n.appLanguage].german,value:"de"},{label:n.ssoLang[n.appLanguage].spanish,value:"es"},{label:n.ssoLang[n.appLanguage].italian,value:"it"},{label:n.ssoLang[n.appLanguage].french,value:"fr"},{label:n.ssoLang[n.appLanguage].turkish,value:"tr"},{label:n.ssoLang[n.appLanguage].serbian,value:"sr"},{label:n.ssoLang[n.appLanguage].korean,value:"kr"},{label:n.ssoLang[n.appLanguage].chinese,value:"cn"},{label:n.ssoLang[n.appLanguage].portuguese,value:"pt"},{label:n.ssoLang[n.appLanguage].japanese,value:"ja"}],isClearable:!1,placeholder:"Select language"},null,8,["modelValue","options"]),e[8]||(e[8]=a.createElementVNode("p",null,"Translate the app on your preferred language.",-1)),a.createElementVNode("button",vu,[r.loading?(a.openBlock(),a.createElementBlock("span",bu)):(a.openBlock(),a.createElementBlock("span",yu,a.toDisplayString(n.ssoLang[n.appLanguage].save),1))])],32)])])}const $o=nt(iu,[["render",wu]]),ku=Object.freeze(Object.defineProperty({__proto__:null,default:$o},Symbol.toStringTag,{value:"Module"})),Cu={name:"AuthReset",mixins:[We],data(){return{loading:!0,submitted:!1,passwordChange:!1,email:"",password:"",passwordRepeat:"",code:"",captcha:"",revealPassword:!1,revealPassword2:!1}},mounted(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route.query.c&&(this.code=this.$route.query.c,this.passwordChange=!0),this.$route.query.e&&(this.email=this.$route.query.e),X.$emit("ssoEvent",{name:"setLoading",data:!1})},methods:{async resetEmail(){if(this.submitted)return;this.submitted=!0,this.email=this.email.trim();let n={email:this.email,captchaToken:await this.getCaptchaToken("password_reset")};await this.reset(n),this.submitted=!1,await this.$router.push("/verify?e="+this.email+"#reset")},async changePw(){if(this.code.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);if(this.password!==this.passwordRepeat)return this.errorSnack(this.ssoLang[this.appLanguage].password_not_match);if(this.submitted)return;this.submitted=!0,this.email=this.email.trim(),this.code=this.code.trim();let n={email:this.email,code:this.code,password:this.password,passwordRepeat:this.passwordRepeat,captchaToken:await this.getCaptchaToken("password_reset")},e=await this.changePassword(n);this.submitted=!1,e===!0&&(this.$router.push("/login"),this.successSnack(this.ssoLang[this.appLanguage].password_reseted_success))}},watch:{email(n){this.$storex.verifyEmail=n}}},Eu={class:"bold no-bottom center-text text-[22px]",style:{"margin-top":"63px"}},Tu={class:"page-login-field half-top color-black"},Su=["placeholder"],Iu={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Au={key:0,class:"uppercase"},Ru={key:1,class:"button--loading button__loader"},Nu={class:"close-text center-text half-top color-black"},Pu=["innerHTML"],Mu=["href"],Lu={class:"page-login-links"},Ou={class:"bold no-bottom center-text",style:{"margin-top":"63px"}},zu={class:"half-bottom small-top center-text color-black"},xu={class:"page-login-field half-top"},Bu=["type","placeholder"],Uu={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Du={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},ju={class:"page-login-field half-top"},qu=["type","placeholder"],Fu={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Vu={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},Hu={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Ku={key:0,class:"uppercase"},Gu={key:1,class:"button--loading button__loader"},$u={class:"close-text center-text half-top color-black"},Qu=["innerHTML"],Wu=["href"];function Yu(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return r.passwordChange?(a.openBlock(),a.createElementBlock("form",{key:1,class:"page-login content-boxed content-boxed-padding",onSubmit:e[7]||(e[7]=a.withModifiers((...c)=>i.changePw&&i.changePw(...c),["prevent"]))},[a.createElementVNode("h3",Ou,a.toDisplayString(n.ssoLang[this.appLanguage].password_change),1),a.createElementVNode("p",zu,a.toDisplayString(n.ssoLang[this.appLanguage].password_new),1),a.createElementVNode("div",xu,[e[14]||(e[14]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,required:""},null,8,Bu),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[4]||(e[4]=c=>r.revealPassword=!r.revealPassword)},[a.withDirectives(a.createElementVNode("img",Uu,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",Du,null,512),[[a.vShow,r.revealPassword]])])]),a.createElementVNode("div",ju,[e[15]||(e[15]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.passwordRepeat=c),type:r.revealPassword2?"text":"password",placeholder:n.ssoLang[this.appLanguage].password_repeat,required:""},null,8,qu),[[a.vModelDynamic,r.passwordRepeat]]),a.createElementVNode("em",{onClick:e[6]||(e[6]=c=>r.revealPassword2=!r.revealPassword2)},[a.withDirectives(a.createElementVNode("img",Fu,null,512),[[a.vShow,!r.revealPassword2]]),a.withDirectives(a.createElementVNode("img",Vu,null,512),[[a.vShow,r.revealPassword2]])])]),a.createElementVNode("button",Hu,[r.submitted?(a.openBlock(),a.createElementBlock("span",Gu)):(a.openBlock(),a.createElementBlock("span",Ku,a.toDisplayString(n.ssoLang[this.appLanguage].password_change),1))]),e[17]||(e[17]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("p",$u,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].reset_password_p2},null,8,Qu),e[16]||(e[16]=a.createTextVNode()),a.createElementVNode("a",{href:"mailto:support@tapni.com?subject="+n.ssoLang[this.appLanguage].password_reset_t}," support@tapni.com",8,Wu)])],32)):(a.openBlock(),a.createElementBlock("form",{key:0,class:"page-login content-boxed content-boxed-padding",onSubmit:e[2]||(e[2]=a.withModifiers((...c)=>i.resetEmail&&i.resetEmail(...c),["prevent"])),autocomplete:"on"},[a.createElementVNode("h3",Eu,a.toDisplayString(n.ssoLang[this.appLanguage].reset_password),1),e[11]||(e[11]=a.createElementVNode("p",{class:"half-bottom small-top center-text color-black"},null,-1)),a.createElementVNode("div",Tu,[e[8]||(e[8]=a.createElementVNode("i",{style:{"padding-top":"10px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"80%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"emailInput","onUpdate:modelValue":e[0]||(e[0]=c=>r.email=c),onKeydown:e[1]||(e[1]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,required:""},null,40,Su),[[a.vModelText,r.email]]),e[9]||(e[9]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("button",Iu,[r.submitted?(a.openBlock(),a.createElementBlock("span",Ru)):(a.openBlock(),a.createElementBlock("span",Au,a.toDisplayString(n.ssoLang[this.appLanguage].reset_password),1))]),e[12]||(e[12]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("p",Nu,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].reset_password_p1},null,8,Pu),a.createElementVNode("a",{href:"mailto:support@tapni.com?subject="+n.ssoLang[this.appLanguage].password_reset_t}," support@tapni.com",8,Mu)]),e[13]||(e[13]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("div",Lu,[a.createVNode(s,{class:"create float-right",to:"/verify"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[10]||(e[10]=a.createElementVNode("div",{class:"clear"},null,-1))])],32))}const Qo=nt(Cu,[["render",Yu],["__scopeId","data-v-707a4b16"]]),Ju=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"})),Xu={name:"AuthCallback",mixins:[ii,ai,We],data(){return{}},async mounted(){if(this.$route.path==="/callback/redirect")return location.href=atob(this.$route.query.uri);if(this.$route.path==="/callback/auth"&&this.exchangeAuthCode({code:this.$route.query.code,code_verifier:this.$route.query.code_verifier}),this.$route.path==="/callback/okta")return await this.handleOktaRedirect();if(this.$route.path==="/callback/saml")return await this.handleSamlRedirect()},methods:{inAppRedirect(){let n=pi.sanitizeUrl(location.href);return n=n.replace("http","tapni"),n=n.replace("https","tapni"),window.open(n)}}},Zu={class:"page-login content-boxed content-boxed-padding"},ep={key:0,style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"260px"}},tp={key:1,style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"260px"}};function np(n,e,t,o,r,i){return a.openBlock(),a.createElementBlock("div",Zu,[(n.$route.query.platform==="android"||n.$route.query.platform==="ios")&&!n.isNative?(a.openBlock(),a.createElementBlock("h5",ep,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].you_will_be_redirected),1),e[1]||(e[1]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].if_redirect_not_directly)+", ",1),a.createElementVNode("span",{onClick:e[0]||(e[0]=(...s)=>i.inAppRedirect&&i.inAppRedirect(...s)),style:{color:"blue",cursor:"pointer"}},a.toDisplayString(n.ssoLang[this.appLanguage].click_here),1),e[2]||(e[2]=a.createTextVNode(". "))])):(a.openBlock(),a.createElementBlock("h4",tp,a.toDisplayString(n.ssoLang[this.appLanguage].please_wait),1))])}const Wo=nt(Xu,[["render",np]]),op=Object.freeze(Object.defineProperty({__proto__:null,default:Wo},Symbol.toStringTag,{value:"Module"})),Yt=tt.registerPlugin("Preferences",{web:()=>Promise.resolve().then(()=>Xp).then(n=>new n.PreferencesWeb)}),vt={async setObject(n,e){await Yt.set({key:n,value:JSON.stringify(e)})},async getAll(){const n=await this.keys(),e={};for(const t of n)e[t]=await Yt.get({key:t});return e},async setAll(n){const e=Object.keys(n);for(const t of e)await this.setItem(t,n[t])},async getObject(n){const e=await Yt.get({key:n});return JSON.parse(e.value)},async setItem(n,e){return await Yt.set({key:n,value:e})},async getItem(n){const{value:e}=await Yt.get({key:n});return e},async removeItem(n){return await Yt.remove({key:n})},async keys(){const{keys:n}=await Yt.keys();return n},async clear(){return await Yt.clear()}},it="vrs_",Yo={async _initialize(n){let e=await vt.getItem(it);if(e===null)await vt.setItem(it,JSON.stringify(n));else{let t=JSON.parse(e);this._objectDefaults(n,t),await vt.setItem(it,JSON.stringify(t))}},_objectDefaults(n,e){Object.keys(n).reduce((t,o)=>{let r=n[o];return typeof r=="object"?this._objectDefaults(e[o],r):e.hasOwnProperty(o)||(e[o]=r),t},[])},async getRaw(){let n=await vt.getItem(it);return JSON.parse(n)},async setRaw(n){let e=JSON.stringify(n);await vt.setItem(it,e)},async set(n,e){if(e===void 0)return this.remove(n);await vt.setItem(it+n,this.serialize(e));let t=this.getKeys();return t.indexOf(n)===-1&&t.push(n),await vt.setItem(it,this.serialize(t)),e},async get(n){let e=await vt.getItem(it+n);return e===null?null:this.deserialize(e)},async remove(n){let e=await this.get(n);await vt.removeItem(it+n);let t=await this.getKeys(),o=t.indexOf("test");return o!==-1&&t.splice(o,1),await vt.setItem(it,this.serialize(t)),e},async getAll(){let n=[],e=await this.getKeys();for(let t=0;t<e.length;t++)n[e[t]]=this.get(e[t]);return n},async getKeys(){return await this.deserialize(vt.getItem(it))},async clear(){await this.set(it,"[]");let n=this.getKeys();for(let e=0;e<n.length;e++)await this.remove(it+n[e])},serialize:function(n){return JSON.stringify(n)},deserialize:function(n,e){if(!n)return e;let t=JSON.parse(n);return t!==void 0?t:e}},rp={name:"ReactiveStorage",data(){return{strgReady:!1,strg:null}},async created(){this.strgReady=a.reactive({value:!1}),await Yo._initialize(this.options);let n=await Yo.getRaw();const e=a.reactive(n);this.strg=e,this.strgReady.value=!0,a.watch(e,async()=>{await Yo.setRaw(e)},{deep:!0})}},ip={key:0,href:"/",class:"header-logo"},ap=["src"],sp={class:"snackbar snackbar-boxed",id:"snackbar"},cp={class:"snack-body",id:"errorSnack"},lp={id:"errorMessage"},dp={class:"snack-body",id:"successSnack"},up={id:"successMessage"},pp=Object.assign({name:"TapniAuth",mixins:[rp,We],data(){return{storeInterval:null,isSetup:!1,isTapstackOrigin:typeof window<"u"?/(^|\.)tapstack\.com$/i.test(new URL(window.location.origin).hostname):!1}},components:{AuthCallback:Wo,AuthReset:Qo,AuthVerify:Ho,AuthSecurity:Ko,AuthRegister:Vo,AuthLogin:qo,AuthAccount:Fo,AuthBilling:Go,AuthWelcome:wo,AuthGeneral:$o},props:{viewProp:{type:String,default:""},isModal:{type:Boolean,default:!1},payload:{type:Object,default:{}},options:{type:Object,default:{token:"",refreshTokens:"",username:"",UserId:"",verifyEmail:"",subdomain:"",localUser:""}}},computed:{initialized(){return this.isSetup||this.isModal},headerLogoUrl(){return this.isTapstackOrigin?"https://cdn.tapni.co/company-media/e411a6e5-e8c1-40b3-aa4c-1214cfb43e8a/gallery/image/f910fa207addf7d3f7337faf098c4f82c79f755a3cf0032099655f2204e6a1e6.png":"https://cdn.tapni.co/images/logo-dark.png"},containerStyle(){return{maxHeight:this.isModal?"90vh":"auto",overflowY:this.isModal?"auto":"hidden"}}},async mounted(){this.checkAndClearStorage(),this.applyBgStyle(),this.setView(this.viewProp),this.updateMetadata(),X.$on("ssoEvent",this.ssoOutgoingEvent),X.$on("ssoLogout",n=>this.logout(n)),X.$on("getLoggedInAccounts",()=>this.getLoggedInAccounts()),X.$on("refreshTokenAction",n=>this.refreshTokenAction({...n,storage:this.$storex})),X.$on("switchAccount",n=>this.switchAccount(n)),X.$on("setToken",n=>this.setToken(n)),X.$on("setStorageItem",n=>this.setStorageItem(n)),this.isNative&&this.$nextTick(()=>{try{this.$store&&this.$store.state&&this.$store.state.auth&&this.$store.commit("auth/addAllowedOrigin","capacitor://localhost")}catch(n){console.error("Failed to add capacitor origin to allowed origins:",n)}})},methods:{checkAndClearStorage(){const n=new URLSearchParams(window.location.search);if(n.get("clean")==="true"){localStorage.clear(),sessionStorage.clear(),n.delete("clean");const e=window.location.pathname+(n.toString()?"?"+n.toString():"")+window.location.hash;window.history.replaceState({},"",e),console.log("Storage cleared due to clean=true parameter")}},async init(){this.$store.commit("auth/setApiRoot",this.$apiRoot||_i.env.VITE_APP_API_ROOT),this.setStorage(this.strg),!this.isSetup&&(this.isSetup=!0,await this.getLoggedInAccounts(),this.$emit("ssoLibraryReady",this.$storex))},ssoOutgoingEvent(n){this.$emit("ssoEvent",n)},ssoIncomingEvent(n){X.$emit(n.name,n.data)},updateMetadata(){if(!(typeof window>"u"))if(this.isTapstackOrigin){document.title="Tapstack - The modern stack for interactive docs and tools";const n=document.querySelector('meta[name="description"]');n&&n.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences with Tapstack.");const e=document.querySelector('meta[property="og:title"]');e&&e.setAttribute("content","Tapstack - The modern stack for interactive docs and tools");const t=document.querySelector('meta[property="og:description"]');t&&t.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences.");const o=document.querySelector('meta[property="twitter:title"]');o&&o.setAttribute("content","Tapstack - The modern stack for interactive docs and tools");const r=document.querySelector('meta[property="twitter:description"]');r&&r.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences with Tapstack.")}else document.title="Tapni - Share everything with just a tap"},applyBgStyle(){this.display==="redirect"?document.getElementsByTagName("html")[0].style="background: #dfeefe;":document.getElementsByTagName("html")[0].style=""}},watch:{viewProp(n){this.setView(n)},display(){this.applyBgStyle()},"strgReady.value"(n){n&&this.$nextTick(()=>{this.init()})},$storex:{handler(n){clearInterval(this.storeInterval),this.storeInterval=setTimeout(()=>{Object.keys(n).forEach(e=>{this.strg[e]=n[e]})},250)},deep:!0}}},{setup(n){return window.Buffer=Si,document.addEventListener("DOMContentLoaded",function(){const e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js?render=undefined",document.head.appendChild(e)}),(e,t)=>(a.openBlock(),a.createElementBlock("div",{id:"ssoapp",style:a.normalizeStyle(e.containerStyle)},[e.display==="redirect"||e.renderView.includes("Auth")?(a.openBlock(),a.createElementBlock("a",ip,[a.createElementVNode("img",{src:e.headerLogoUrl,class:"header-logo-img"},null,8,ap)])):a.createCommentVNode("",!0),e.initialized&&e.renderView==="AuthWelcome"?(a.openBlock(),a.createBlock(wo,{key:1})):e.initialized&&e.renderView==="AuthLogin"?(a.openBlock(),a.createBlock(qo,{key:2,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthGeneral"?(a.openBlock(),a.createBlock($o,{key:3,isModal:n.isModal,"onUpdate:viewProp":e.setView},null,8,["isModal","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthAccount"?(a.openBlock(),a.createBlock(Fo,{key:4,isModal:n.isModal,"onUpdate:viewProp":e.setView},null,8,["isModal","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthRegister"?(a.openBlock(),a.createBlock(Vo,{key:5,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthVerify"?(a.openBlock(),a.createBlock(Ho,{key:6,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthSecurity"?(a.openBlock(),a.createBlock(Ko,{key:7,isModal:n.isModal,payload:n.payload,"onUpdate:viewProp":e.setView},null,8,["isModal","payload","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthBilling"?(a.openBlock(),a.createBlock(Go,{key:8,isModal:n.isModal,payload:n.payload,"onUpdate:viewProp":e.setView},null,8,["isModal","payload","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthReset"?(a.openBlock(),a.createBlock(Qo,{key:9})):e.initialized&&e.renderView==="AuthCallback"?(a.openBlock(),a.createBlock(Wo,{key:10})):e.display!=="npm"?(a.openBlock(),a.createBlock(a.unref(en.RouterView),{key:11})):a.createCommentVNode("",!0),a.createElementVNode("div",sp,[a.createElementVNode("p",cp,[a.createElementVNode("span",lp,a.toDisplayString(e.ssoLang[e.appLanguage].error),1),a.createElementVNode("a",{onClick:t[0]||(t[0]=(...o)=>e.closeSnacks&&e.closeSnacks(...o)),style:{position:"absolute",right:"10px",top:"10px",width:"50px",height:"50px"}},t[2]||(t[2]=[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/notification-close.png",style:{width:"100%"}},null,-1)]))]),a.createElementVNode("p",dp,[a.createElementVNode("span",up,a.toDisplayString(e.ssoLang[e.appLanguage].success),1),a.createElementVNode("a",{onClick:t[1]||(t[1]=(...o)=>e.closeSnacks&&e.closeSnacks(...o)),style:{position:"absolute",right:"10px",top:"10px",width:"50px",height:"50px"}},t[3]||(t[3]=[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/notification-close.png",style:{width:"100%"}},null,-1)]))])])],4))}}),hp={install:(n,{store:e,apiRoot:t})=>{n.component("TapniAuth",pp),e.hasModule("auth")||e.registerModule("auth",Cr),n.config.globalProperties.$apiRoot=t}},mp={name:"AuthQR",mixins:[We,si]},fp={class:"page-login content-boxed content-boxed-padding"},gp={style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"130px"}},_p={class:"center-text"},vp={style:{margin:"0 auto",width:"85%","text-align":"left"}},yp={class:"center-text"};function bp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",fp,[a.createElementVNode("h5",gp,a.toDisplayString(n.ssoLang[n.appLanguage].use_tapni_on_the_web),1),e[6]||(e[6]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",_p,[e[3]||(e[3]=a.createElementVNode("div",{id:"qrCodeContainer",class:"qrCodeRounded",style:{"max-width":"100%"}},null,-1)),e[4]||(e[4]=a.createElementVNode("br",null,null,-1)),e[5]||(e[5]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",vp,[a.createElementVNode("h2",yp,a.toDisplayString(n.ssoLang[n.appLanguage].login_by_scanning_qr_code),1),e[0]||(e[0]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].open_tapni_app_on_your_phone),1),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].go_to_settings_link_a_device),1),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].point_your_phone_at_this_qr_code),1),e[1]||(e[1]=a.createElementVNode("br",null,null,-1)),e[2]||(e[2]=a.createElementVNode("br",null,null,-1))]),a.createVNode(s,{to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].choose_other_login_methods),1)]),_:1})])])}const wp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(mp,[["render",bp]])},Symbol.toStringTag,{value:"Module"})),kp={async getRecordById(n){return ce().post("/objects/record/"+n.id,n)},async getRecords(n){return ce().post("/objects/records",n)}},Cp={name:"AuthApps",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,apps:[]}},async mounted(){this.isLoggedIn||this.$router.push("/login");const n=await kp.getRecords({objectId:"6dc545ea-2e2f-4720-b4fe-c5ebdd8af063",query:{fields:["t_apps_name","t_apps_icon","t_apps_url"],relations:[]}});this.apps=n.data.records},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})}}},Ep={class:"page-login content-boxed content-boxed-padding"},Tp={class:"subheaderContainer full-top"},Sp=["src"],Ip={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},Ap={class:"container left-text"},Rp={class:"center-text"},Np={class:"full-top"},Pp=["href"],Mp={class:"firstRow"},Lp=["src"],Op=["src"];function zp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Ep,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[1]||(e[1]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",Tp,[n.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:0,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,Sp)]),_:1})),a.createElementVNode("h2",Ip,a.toDisplayString(n.ssoLang[n.appLanguage].apps),1)]),a.createElementVNode("div",Ap,[a.createElementVNode("p",Rp,a.toDisplayString(n.ssoLang[n.appLanguage].apps_p),1),a.createElementVNode("div",Np,[a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.apps,c=>(a.openBlock(),a.createElementBlock("a",{key:c.id,href:c.t_apps_url,target:"_blank",class:"settingRow half-bottom"},[a.createElementVNode("div",Mp,[a.createElementVNode("img",{src:n.getIcon(c.t_apps_icon),class:"withBackground"},null,8,Lp),a.createElementVNode("h4",null,a.toDisplayString(c.t_apps_name),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Op)])],8,Pp))),128))])])])}const xp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(Cp,[["render",zp],["__scopeId","data-v-2f7f5584"]])},Symbol.toStringTag,{value:"Module"})),Bp={name:"AuthCustomApp",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,app:{}}},async mounted(){this.isLoggedIn||this.$router.push("/login");const n=await Fe.getRecordById({id:this.$route.params.app,query:{fields:["t_apps_name","t_apps_icon","t_apps_url"],relations:[]}});this.app=n.data.record},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})}}},Up={class:"page-login content-boxed content-boxed-padding"},Dp={class:"subheaderContainer full-top"},jp=["src"],qp={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},Fp={class:"container left-text"},Vp={class:"center-text"};function Hp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Up,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[1]||(e[1]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",Dp,[n.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:0,to:"/apps",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,jp)]),_:1})),a.createElementVNode("h2",qp,a.toDisplayString(r.app.t_apps_name),1)]),a.createElementVNode("div",Fp,[a.createElementVNode("p",Vp,a.toDisplayString(n.ssoLang[n.appLanguage].apps_p),1),e[2]||(e[2]=a.createElementVNode("div",{class:"full-top"},null,-1))])])}const Kp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(Bp,[["render",Hp],["__scopeId","data-v-36b27d1f"]])},Symbol.toStringTag,{value:"Module"}));class Gp extends tt.WebPlugin{constructor(){super()}loadScript(){if(typeof document>"u")return;const e="gapi";if(document==null?void 0:document.getElementById(e))return;const o=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.defer=!0,r.async=!0,r.id=e,r.onload=this.platformJsLoaded.bind(this),r.src="https://apis.google.com/js/platform.js",o.appendChild(r)}initialize(e={clientId:"",scopes:[],grantOfflineAccess:!1}){var t,o;if(typeof window>"u")return;const r=(t=document.getElementsByName("google-signin-client_id")[0])===null||t===void 0?void 0:t.content,i=e.clientId||r||"";return i||console.warn("GoogleAuthPlugin - clientId is empty"),this.options={clientId:i,grantOfflineAccess:(o=e.grantOfflineAccess)!==null&&o!==void 0?o:!1,scopes:e.scopes||[]},this.gapiLoaded=new Promise(s=>{window.gapiResolve=s,this.loadScript()}),this.addUserChangeListener(),this.gapiLoaded}platformJsLoaded(){gapi.load("auth2",()=>{const e={client_id:this.options.clientId,plugin_name:"CodetrixStudioCapacitorGoogleAuth"};this.options.scopes.length&&(e.scope=this.options.scopes.join(" ")),gapi.auth2.init(e),window.gapiResolve()})}async signIn(){return new Promise(async(e,t)=>{var o;try{let r;const i=(o=this.options.grantOfflineAccess)!==null&&o!==void 0?o:!1;i?r=(await gapi.auth2.getAuthInstance().grantOfflineAccess()).code:await gapi.auth2.getAuthInstance().signIn();const s=gapi.auth2.getAuthInstance().currentUser.get();i&&await s.reloadAuthResponse();const c=this.getUserFrom(s);c.serverAuthCode=r,e(c)}catch(r){t(r)}})}async refresh(){const e=await gapi.auth2.getAuthInstance().currentUser.get().reloadAuthResponse();return{accessToken:e.access_token,idToken:e.id_token,refreshToken:""}}async signOut(){return gapi.auth2.getAuthInstance().signOut()}async addUserChangeListener(){await this.gapiLoaded,gapi.auth2.getAuthInstance().currentUser.listen(e=>{this.notifyListeners("userChange",e.isSignedIn()?this.getUserFrom(e):null)})}getUserFrom(e){const t={},o=e.getBasicProfile();t.email=o.getEmail(),t.familyName=o.getFamilyName(),t.givenName=o.getGivenName(),t.id=o.getId(),t.imageUrl=o.getImageUrl(),t.name=o.getName();const r=e.getAuthResponse(!0);return t.authentication={accessToken:r.access_token,idToken:r.id_token,refreshToken:""},t}}const $p=Object.freeze(Object.defineProperty({__proto__:null,GoogleAuthWeb:Gp},Symbol.toStringTag,{value:"Module"}));var ui={exports:{}};/*!
|
|
163
|
+
Error Description: `+h.message)),[2,null];case 4:return r||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),r=n.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,r]}})})},n.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in Ur?Ur[this.canonicalAuthority]:null},n.prototype.isInKnownAuthorities=function(){var e=this,t=this.authorityOptions.knownAuthorities.filter(function(o){return de.getDomainFromUrl(o).toLowerCase()===e.hostnameAndPort});return t.length>0},n.generateAuthority=function(e,t){var o;if(t&&t.azureCloudInstance!==On.None){var r=t.tenant?t.tenant:b.DEFAULT_COMMON_TENANT;o=t.azureCloudInstance+"/"+r+"/"}return o||e},n.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},n.getCloudDiscoveryMetadataFromNetworkResponse=function(e,t){for(var o=0;o<e.length;o++){var r=e[o];if(r.aliases.indexOf(t)>-1)return r}return null},n.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw K.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},n.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},n.isPublicCloudAuthority=function(e){return b.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},n.buildRegionalAuthorityString=function(e,t,o){var r=new de(e);r.validateAsUri();var i=r.getUrlComponents(),s=t+"."+i.HostNameAndPort;this.isPublicCloudAuthority(i.HostNameAndPort)&&(s=t+"."+b.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var c=de.constructAuthorityUriFromObject(he(he({},r.getUrlComponents()),{HostNameAndPort:s})).urlString;return o?c+"?"+o:c},n.replaceWithRegionalInformation=function(e,t){return e.authorization_endpoint=n.buildRegionalAuthorityString(e.authorization_endpoint,t),e.token_endpoint=n.buildRegionalAuthorityString(e.token_endpoint,t,b.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=n.buildRegionalAuthorityString(e.end_session_endpoint,t)),e},n.transformCIAMAuthority=function(e){var t=e.endsWith(b.FORWARD_SLASH)?e:""+e+b.FORWARD_SLASH,o=new de(e),r=o.getUrlComponents();if(r.PathSegments.length===0&&r.HostNameAndPort.endsWith(b.CIAM_AUTH_URL)){var i=r.HostNameAndPort.split(".")[0];t=""+t+i+b.AAD_TENANT_DOMAIN_SUFFIX}return t},n.reservedTenantDomains=new Set(["{tenant}","{tenantid}",on.COMMON,on.CONSUMERS,on.ORGANIZATIONS]),n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var oo=function(){function n(){}return n.createDiscoveredInstance=function(e,t,o,r,i,s,c){return ne(this,void 0,void 0,function(){var l,h,u;return oe(this,function(g){switch(g.label){case 0:s==null||s.addQueueMeasurement(R.AuthorityFactoryCreateDiscoveredInstance,c),l=Un.transformCIAMAuthority(e),h=n.createInstance(l,t,o,r,i,s,c),g.label=1;case 1:return g.trys.push([1,3,,4]),s==null||s.setPreQueueTime(R.AuthorityResolveEndpointsAsync,c),[4,h.resolveEndpointsAsync()];case 2:return g.sent(),[2,h];case 3:throw u=g.sent(),K.createEndpointDiscoveryIncompleteError(u);case 4:return[2]}})})},n.createInstance=function(e,t,o,r,i,s,c){if(H.isEmpty(e))throw we.createUrlEmptyError();return new Un(e,t,o,r,i,s,c)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ro=function(){function n(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return n.isServerTelemetryEntity=function(e,t){var o=e.indexOf(Be.CACHE_KEY)===0,r=!0;return t&&(r=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),o&&r},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Dr=function(){function n(){}return n.isThrottlingEntity=function(e,t){var o=!1;e&&(o=e.indexOf(Mn.THROTTLING_PREFIX)===0);var r=!0;return t&&(r=t.hasOwnProperty("throttleTime")),o&&r},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ma={sendGetRequestAsync:function(){var n="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(n))},sendPostRequestAsync:function(){var n="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Y.createUnexpectedError(n))}};/*! @azure/msal-common v13.3.1 2023-10-27 */var io={missingKidError:{code:"missing_kid_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided."},missingAlgError:{code:"missing_alg_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."}},jr=function(n){Ye(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="JoseHeaderError",Object.setPrototypeOf(r,e.prototype),r}return e.createMissingKidError=function(){return new e(io.missingKidError.code,io.missingKidError.desc)},e.createMissingAlgError=function(){return new e(io.missingAlgError.code,io.missingAlgError.desc)},e}(Y);/*! @azure/msal-common v13.3.1 2023-10-27 */var fa=function(){function n(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return n.getShrHeaderString=function(e){if(!e.kid)throw jr.createMissingKidError();if(!e.alg)throw jr.createMissingAlgError();var t=new n({typ:e.typ||Io.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var ga=function(){function n(e,t){this.cacheOutcome=Qt.NO_CACHE_HIT,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||b.EMPTY_STRING,this.wrapperVer=e.wrapperVer||b.EMPTY_STRING,this.telemetryCacheKey=Be.CACHE_KEY+Pe.CACHE_KEY_SEPARATOR+e.clientId}return n.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+Be.VALUE_SEPARATOR+this.cacheOutcome,t=[this.wrapperSKU,this.wrapperVer].join(Be.VALUE_SEPARATOR),o=this.getRegionDiscoveryFields(),r=[e,o].join(Be.VALUE_SEPARATOR);return[Be.SCHEMA_VERSION,r,t].join(Be.CATEGORY_SEPARATOR)},n.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),t=n.maxErrorsToSend(e),o=e.failedRequests.slice(0,2*t).join(Be.VALUE_SEPARATOR),r=e.errors.slice(0,t).join(Be.VALUE_SEPARATOR),i=e.errors.length,s=t<i?Be.OVERFLOW_TRUE:Be.OVERFLOW_FALSE,c=[i,s].join(Be.VALUE_SEPARATOR);return[Be.SCHEMA_VERSION,e.cacheHits,o,r,c].join(Be.CATEGORY_SEPARATOR)},n.prototype.cacheFailedRequest=function(e){var t=this.getLastRequests();t.errors.length>=Be.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),H.isEmpty(e.subError)?H.isEmpty(e.errorCode)?e&&e.toString()?t.errors.push(e.toString()):t.errors.push(Be.UNKNOWN_ERROR):t.errors.push(e.errorCode):t.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)},n.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},n.prototype.getLastRequests=function(){var e=new ro,t=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return t||e},n.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),t=n.maxErrorsToSend(e),o=e.errors.length;if(t===o)this.cacheManager.removeItem(this.telemetryCacheKey);else{var r=new ro;r.failedRequests=e.failedRequests.slice(t*2),r.errors=e.errors.slice(t),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)}},n.maxErrorsToSend=function(e){var t,o=0,r=0,i=e.errors.length;for(t=0;t<i;t++){var s=e.failedRequests[2*t]||b.EMPTY_STRING,c=e.failedRequests[2*t+1]||b.EMPTY_STRING,l=e.errors[t]||b.EMPTY_STRING;if(r+=s.toString().length+c.toString().length+l.length+3,r<Be.MAX_LAST_HEADER_BYTES)o+=1;else break}return o},n.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||b.EMPTY_STRING),e.push(this.regionSource||b.EMPTY_STRING),e.push(this.regionOutcome||b.EMPTY_STRING),e.join(",")},n.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},n.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var qr=function(){function n(e,t,o,r,i,s){this.authority=t,this.libraryName=r,this.libraryVersion=i,this.applicationTelemetry=s,this.clientId=e,this.logger=o,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.queueMeasurements=new Map,this.preQueueTimeByCorrelationId=new Map}return n.prototype.startPerformanceMeasurement=function(e,t){return{}},n.prototype.startPerformanceMeasuremeant=function(e,t){return{}},n.prototype.getIntFields=function(){return sa},n.prototype.getPreQueueTime=function(e,t){var o=this.preQueueTimeByCorrelationId.get(t);if(o){if(o.name!==e){this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue time found for "+e+", unable to add queue measurement");return}}else{this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: "+t+", unable to add queue measurement");return}return o.time},n.prototype.calculateQueuedTime=function(e,t){return e<1?(this.logger.trace("PerformanceClient: preQueueTime should be a positive integer and not "+e),0):t<1?(this.logger.trace("PerformanceClient: currentTime should be a positive integer and not "+t),0):t<e?(this.logger.trace("PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved"),0):t-e},n.prototype.addQueueMeasurement=function(e,t,o,r){if(!t){this.logger.trace("PerformanceClient.addQueueMeasurement: correlationId not provided for "+e+", cannot add queue measurement");return}if(o===0)this.logger.trace("PerformanceClient.addQueueMeasurement: queue time provided for "+e+" is "+o);else if(!o){this.logger.trace("PerformanceClient.addQueueMeasurement: no queue time provided for "+e);return}var i={eventName:e,queueTime:o,manuallyCompleted:r},s=this.queueMeasurements.get(t);if(s)s.push(i),this.queueMeasurements.set(t,s);else{this.logger.trace("PerformanceClient.addQueueMeasurement: adding correlationId "+t+" to queue measurements");var c=[i];this.queueMeasurements.set(t,c)}this.preQueueTimeByCorrelationId.delete(t)},n.prototype.startMeasurement=function(e,t){var o=this,r,i,s=t||this.generateId();t||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",s),this.logger.trace("PerformanceClient: Performance measurement started for "+e,s);var c=this.startPerformanceMeasuremeant(e,s);c.startMeasurement();var l={eventId:this.generateId(),status:to.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:s,appName:(r=this.applicationTelemetry)===null||r===void 0?void 0:r.appName,appVersion:(i=this.applicationTelemetry)===null||i===void 0?void 0:i.appVersion};return this.cacheEventByCorrelationId(l),{endMeasurement:function(h){return o.endMeasurement(he(he({},l),h),c)},discardMeasurement:function(){return o.discardMeasurements(l.correlationId)},addStaticFields:function(h){return o.addStaticFields(h,l.correlationId)},increment:function(h){return o.increment(h,l.correlationId)},measurement:c,event:l}},n.prototype.endMeasurement=function(e,t){var o=this,r,i,s=this.eventsByCorrelationId.get(e.correlationId);if(!s)return this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId),null;var c=e.eventId===s.eventId,l={totalQueueTime:0,totalQueueCount:0,manuallyCompletedCount:0};c?(l=this.getQueueInfo(e.correlationId),this.discardCache(s.correlationId)):(r=s.incompleteSubMeasurements)===null||r===void 0||r.delete(e.eventId),t==null||t.endMeasurement();var h=t==null?void 0:t.flushMeasurement();if(!h)return this.logger.trace("PerformanceClient: Performance measurement not taken",s.correlationId),null;if(this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+h+" ms",e.correlationId),!c)return s[e.name+"DurationMs"]=Math.floor(h),he({},s);var u=he(he({},s),e),g=0;return(i=u.incompleteSubMeasurements)===null||i===void 0||i.forEach(function(f){o.logger.trace("PerformanceClient: Incomplete submeasurement "+f.name+" found for "+e.name,u.correlationId),g++}),u.incompleteSubMeasurements=void 0,u=he(he({},u),{durationMs:Math.round(h),queuedTimeMs:l.totalQueueTime,queuedCount:l.totalQueueCount,queuedManuallyCompletedCount:l.manuallyCompletedCount,status:to.Completed,incompleteSubsCount:g}),this.truncateIntegralFields(u,this.getIntFields()),this.emitEvents([u],e.correlationId),u},n.prototype.addStaticFields=function(e,t){this.logger.trace("PerformanceClient: Updating static fields");var o=this.eventsByCorrelationId.get(t);o?this.eventsByCorrelationId.set(t,he(he({},o),e)):this.logger.trace("PerformanceClient: Event not found for",t)},n.prototype.increment=function(e,t){this.logger.trace("PerformanceClient: Updating counters");var o=this.eventsByCorrelationId.get(t);if(o)for(var r in e)o.hasOwnProperty(r)||(o[r]=0),o[r]+=e[r];else this.logger.trace("PerformanceClient: Event not found for",t)},n.prototype.cacheEventByCorrelationId=function(e){var t=this.eventsByCorrelationId.get(e.correlationId);t?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),t.incompleteSubMeasurements=t.incompleteSubMeasurements||new Map,t.incompleteSubMeasurements.set(e.eventId,{name:e.name,startTimeMs:e.startTimeMs})):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,he({},e)))},n.prototype.getQueueInfo=function(e){var t=this.queueMeasurements.get(e);t||this.logger.trace("PerformanceClient: no queue measurements found for for correlationId: "+e);var o=0,r=0,i=0;return t==null||t.forEach(function(s){o+=s.queueTime,r++,i+=s.manuallyCompleted?1:0}),{totalQueueTime:o,totalQueueCount:r,manuallyCompletedCount:i}},n.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},n.prototype.discardCache=function(e){this.discardMeasurements(e),this.logger.trace("PerformanceClient: QueueMeasurements discarded",e),this.queueMeasurements.delete(e),this.logger.trace("PerformanceClient: Pre-queue times discarded",e),this.preQueueTimeByCorrelationId.delete(e)},n.prototype.addPerformanceCallback=function(e){var t=this.generateId();return this.callbacks.set(t,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+t),t},n.prototype.removePerformanceCallback=function(e){var t=this.callbacks.delete(e);return t?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),t},n.prototype.emitEvents=function(e,t){var o=this;this.logger.verbose("PerformanceClient: Emitting performance events",t),this.callbacks.forEach(function(r,i){o.logger.trace("PerformanceClient: Emitting event to callback "+i,t),r.apply(null,[e])})},n.prototype.truncateIntegralFields=function(e,t){t.forEach(function(o){o in e&&typeof e[o]=="number"&&(e[o]=Math.floor(e[o]))})},n}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Fr=function(){function n(){}return n.prototype.startMeasurement=function(){},n.prototype.endMeasurement=function(){},n.prototype.flushMeasurement=function(){return null},n}(),_a=function(n){Ye(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new Fr},e.prototype.startPerformanceMeasurement=function(){return new Fr},e.prototype.calculateQueuedTime=function(t,o){return 0},e.prototype.addQueueMeasurement=function(t,o,r){},e.prototype.setPreQueueTime=function(t,o){},e}(qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var U={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors."},popupWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},spaCodeAndNativeAccountPresent:{code:"spa_code_and_nativeAccountId_present",desc:"Request cannot contain both spa code and native account id."},databaseUnavailable:{code:"database_unavailable",desc:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},F=function(n){xe(e,n);function e(t,o){var r=n.call(this,t,o)||this;return Object.setPrototypeOf(r,e.prototype),r.name="BrowserAuthError",r}return e.createPkceNotGeneratedError=function(t){return new e(U.pkceNotGenerated.code,U.pkceNotGenerated.desc+" Detail:"+t)},e.createCryptoNotAvailableError=function(t){return new e(U.cryptoDoesNotExist.code,U.cryptoDoesNotExist.desc+" Detail:"+t)},e.createHttpMethodNotImplementedError=function(t){return new e(U.httpMethodNotImplementedError.code,U.httpMethodNotImplementedError.desc+" Given Method: "+t)},e.createEmptyNavigationUriError=function(){return new e(U.emptyNavigateUriError.code,U.emptyNavigateUriError.desc)},e.createEmptyHashError=function(t){return new e(U.hashEmptyError.code,U.hashEmptyError.desc+" Given Url: "+t)},e.createHashDoesNotContainStateError=function(){return new e(U.hashDoesNotContainStateError.code,U.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(U.hashDoesNotContainKnownPropertiesError.code,U.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(U.unableToParseStateError.code,U.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(U.stateInteractionTypeMismatchError.code,U.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(U.interactionInProgress.code,U.interactionInProgress.desc)},e.createPopupWindowError=function(t){var o=U.popupWindowError.desc;return o=H.isEmpty(t)?o:o+" Details: "+t,new e(U.popupWindowError.code,o)},e.createEmptyWindowCreatedError=function(){return new e(U.emptyWindowError.code,U.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(U.userCancelledError.code,U.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(U.monitorPopupTimeoutError.code,U.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(U.monitorIframeTimeoutError.code,U.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(t){return new e(U.redirectInIframeError.code,U.redirectInIframeError.desc+" (window.parent !== window) => "+t)},e.createBlockReloadInHiddenIframeError=function(){return new e(U.blockTokenRequestsInHiddenIframeError.code,U.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(U.blockAcquireTokenInPopupsError.code,U.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(U.iframeClosedPrematurelyError.code,U.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(U.silentLogoutUnsupportedError.code,U.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(U.noAccountError.code,U.noAccountError.desc)},e.createSilentPromptValueError=function(t){return new e(U.silentPromptValueError.code,U.silentPromptValueError.desc+" Given value: "+t)},e.createUnableToParseTokenRequestCacheError=function(){return new e(U.unableToParseTokenRequestCacheError.code,U.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(U.noTokenRequestCacheError.code,U.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(U.authRequestNotSet.code,U.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(U.noCachedAuthorityError.code,U.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(U.invalidCacheType.code,""+U.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(U.notInBrowserEnvironment.code,U.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(U.databaseNotOpen.code,U.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(U.noNetworkConnectivity.code,U.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(t,o){return new e(U.postRequestFailed.code,U.postRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+o.split("?")[0])},e.createGetRequestFailedError=function(t,o){return new e(U.getRequestFailed.code,U.getRequestFailed.desc+" | Network client threw: "+t+" | Attempted to reach: "+o.split("?")[0])},e.createFailedToParseNetworkResponseError=function(t){return new e(U.failedToParseNetworkResponse.code,U.failedToParseNetworkResponse.desc+" | Attempted to reach: "+t.split("?")[0])},e.createUnableToLoadTokenError=function(t){return new e(U.unableToLoadTokenError.code,U.unableToLoadTokenError.desc+" | "+t)},e.createSigningKeyNotFoundInStorageError=function(t){return new e(U.signingKeyNotFoundInStorage.code,U.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+t)},e.createAuthCodeRequiredError=function(){return new e(U.authCodeRequired.code,U.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(U.authCodeOrNativeAccountRequired.code,U.authCodeOrNativeAccountRequired.desc)},e.createSpaCodeAndNativeAccountIdPresentError=function(){return new e(U.spaCodeAndNativeAccountPresent.code,U.spaCodeAndNativeAccountPresent.desc)},e.createDatabaseUnavailableError=function(){return new e(U.databaseUnavailable.code,U.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(U.unableToAcquireTokenFromNativePlatform.code,U.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(U.nativeHandshakeTimeout.code,U.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(U.nativeExtensionNotInstalled.code,U.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(U.nativeConnectionNotEstablished.code,U.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(U.nativeBrokerCalledBeforeInitialize.code,U.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(U.nativePromptNotSupported.code,U.nativePromptNotSupported.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var _t={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},Dn={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},Vt;(function(n){n.HandshakeRequest="Handshake",n.HandshakeResponse="HandshakeResponse",n.GetToken="GetToken",n.Response="Response"})(Vt||(Vt={}));var Ae;(function(n){n.LocalStorage="localStorage",n.SessionStorage="sessionStorage",n.MemoryStorage="memoryStorage"})(Ae||(Ae={}));var At;(function(n){n.GET="GET",n.POST="POST"})(At||(At={}));var ue;(function(n){n.AUTHORITY="authority",n.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",n.SESSION_STATE="session.state",n.REQUEST_STATE="request.state",n.NONCE_IDTOKEN="nonce.id_token",n.ORIGIN_URI="request.origin",n.RENEW_STATUS="token.renew.status",n.URL_HASH="urlHash",n.REQUEST_PARAMS="request.params",n.SCOPES="scopes",n.INTERACTION_STATUS_KEY="interaction.status",n.CCS_CREDENTIAL="ccs.credential",n.CORRELATION_ID="request.correlationId",n.NATIVE_REQUEST="request.native",n.REDIRECT_CONTEXT="request.redirect.context"})(ue||(ue={}));var Rt;(function(n){n.ACCOUNT_KEYS="msal.account.keys",n.TOKEN_KEYS="msal.token.keys"})(Rt||(Rt={}));var kn;(function(n){n.WRAPPER_SKU="wrapper.sku",n.WRAPPER_VER="wrapper.version"})(kn||(kn={}));var ke;(function(n){n[n.acquireTokenRedirect=861]="acquireTokenRedirect",n[n.acquireTokenPopup=862]="acquireTokenPopup",n[n.ssoSilent=863]="ssoSilent",n[n.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",n[n.handleRedirectPromise=865]="handleRedirectPromise",n[n.acquireTokenByCode=866]="acquireTokenByCode",n[n.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",n[n.logout=961]="logout",n[n.logoutPopup=962]="logoutPopup"})(ke||(ke={}));var $;(function(n){n.Redirect="redirect",n.Popup="popup",n.Silent="silent",n.None="none"})($||($={}));var Vr;(function(n){n.Startup="startup",n.Login="login",n.Logout="logout",n.AcquireToken="acquireToken",n.SsoSilent="ssoSilent",n.HandleRedirect="handleRedirect",n.None="none"})(Vr||(Vr={}));var Hr={scopes:An},Cn="jwk",Kr;(function(n){n.React="@azure/msal-react",n.Angular="@azure/msal-angular"})(Kr||(Kr={}));var zo="msal.db",ya=1,va=zo+".keys",Xe;(function(n){n[n.Default=0]="Default",n[n.AccessToken=1]="AccessToken",n[n.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",n[n.RefreshToken=3]="RefreshToken",n[n.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",n[n.Skip=5]="Skip"})(Xe||(Xe={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ze={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},storageNotSupportedError:{code:"storage_not_supported",desc:"Given storage configuration option was not supported."},noRedirectCallbacksSet:{code:"no_redirect_callbacks",desc:"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},stubPcaInstanceCalled:{code:"stubbed_public_client_application_called",desc:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors"},inMemRedirectUnavailable:{code:"in_mem_redirect_unavailable",desc:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."},entropyNotProvided:{code:"entropy_not_provided",desc:"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option."}},ao=function(n){xe(e,n);function e(t,o){var r=n.call(this,t,o)||this;return r.name="BrowserConfigurationAuthError",Object.setPrototypeOf(r,e.prototype),r}return e.createRedirectUriEmptyError=function(){return new e(Ze.redirectUriNotSet.code,Ze.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(Ze.postLogoutUriNotSet.code,Ze.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(t){return new e(Ze.storageNotSupportedError.code,Ze.storageNotSupportedError.desc+" Given Location: "+t)},e.createRedirectCallbacksNotSetError=function(){return new e(Ze.noRedirectCallbacksSet.code,Ze.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(Ze.stubPcaInstanceCalled.code,Ze.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(Ze.inMemRedirectUnavailable.code,Ze.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(Ze.entropyNotProvided.code,Ze.entropyNotProvided.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Gr=function(){function n(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return n.prototype.validateWindowStorage=function(e){if(e!==Ae.LocalStorage&&e!==Ae.SessionStorage)throw ao.createStorageNotSupportedError(e);var t=!!window[e];if(!t)throw ao.createStorageNotSupportedError(e)},n.prototype.getItem=function(e){return this.windowStorage.getItem(e)},n.prototype.setItem=function(e,t){this.windowStorage.setItem(e,t)},n.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},n.prototype.getKeys=function(){return Object.keys(this.windowStorage)},n.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var xo=function(){function n(){this.cache=new Map}return n.prototype.getItem=function(e){return this.cache.get(e)||null},n.prototype.setItem=function(e,t){this.cache.set(e,t)},n.prototype.removeItem=function(e){this.cache.delete(e)},n.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(t,o){e.push(o)}),e},n.prototype.containsKey=function(e){return this.cache.has(e)},n.prototype.clear=function(){this.cache.clear()},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var $r=function(){function n(){}return n.extractBrowserRequestState=function(e,t){if(H.isEmpty(t))return null;try{var o=Ft.parseRequestState(e,t);return o.libraryState.meta}catch(r){throw K.createInvalidStateError(t,r)}},n.parseServerResponseFromHash=function(e){if(!e)return{};var t=new de(e);return de.getDeserializedHash(t.getHash())},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Bo=function(n){xe(e,n);function e(t,o,r,i){var s=n.call(this,t,r,i)||this;return s.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,s.cacheConfig=o,s.logger=i,s.internalStorage=new xo,s.browserStorage=s.setupBrowserStorage(s.cacheConfig.cacheLocation),s.temporaryCacheStorage=s.setupTemporaryCacheStorage(s.cacheConfig.temporaryCacheLocation,s.cacheConfig.cacheLocation),o.cacheMigrationEnabled&&(s.migrateCacheEntries(),s.createKeyMaps()),s}return e.prototype.setupBrowserStorage=function(t){switch(t){case Ae.LocalStorage:case Ae.SessionStorage:try{return new Gr(t)}catch(o){this.logger.verbose(o);break}}return this.cacheConfig.cacheLocation=Ae.MemoryStorage,new xo},e.prototype.setupTemporaryCacheStorage=function(t,o){switch(o){case Ae.LocalStorage:case Ae.SessionStorage:try{return new Gr(t||Ae.SessionStorage)}catch(r){return this.logger.verbose(r),this.internalStorage}case Ae.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var t=this,o=b.CACHE_PREFIX+"."+Ne.ID_TOKEN,r=b.CACHE_PREFIX+"."+Ne.CLIENT_INFO,i=b.CACHE_PREFIX+"."+Ne.ERROR,s=b.CACHE_PREFIX+"."+Ne.ERROR_DESC,c=this.browserStorage.getItem(o),l=this.browserStorage.getItem(r),h=this.browserStorage.getItem(i),u=this.browserStorage.getItem(s),g=[c,l,h,u],f=[Ne.ID_TOKEN,Ne.CLIENT_INFO,Ne.ERROR,Ne.ERROR_DESC];f.forEach(function(w,C){return t.migrateCacheEntry(w,g[C])})},e.prototype.migrateCacheEntry=function(t,o){o&&this.setTemporaryCache(t,o,!0)},e.prototype.createKeyMaps=function(){var t=this;this.logger.trace("BrowserCacheManager - createKeyMaps called.");var o=this.getItem(Rt.ACCOUNT_KEYS),r=this.getItem(Rt.TOKEN_KEYS+"."+this.clientId);if(o&&r){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}var i=this.browserStorage.getKeys();i.forEach(function(s){if(t.isCredentialKey(s)){var c=t.getItem(s);if(c){var l=t.validateAndParseJson(c);if(l&&l.hasOwnProperty("credentialType"))switch(l.credentialType){case Z.ID_TOKEN:if(sn.isIdTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - idToken with key: "+s+" found, saving key to token key map");var h=Je.toObject(new sn,l),u=t.updateCredentialCacheKey(s,h);t.addTokenKey(u,Z.ID_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed idToken validation on key: "+s);break;case Z.ACCESS_TOKEN:case Z.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(cn.isAccessTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - accessToken with key: "+s+" found, saving key to token key map");var g=Je.toObject(new cn,l),u=t.updateCredentialCacheKey(s,g);t.addTokenKey(u,Z.ACCESS_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed accessToken validation on key: "+s);break;case Z.REFRESH_TOKEN:if(vn.isRefreshTokenEntity(l)){t.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - refreshToken with key: "+s+" found, saving key to token key map");var f=Je.toObject(new vn,l),u=t.updateCredentialCacheKey(s,f);t.addTokenKey(u,Z.REFRESH_TOKEN);return}else t.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),t.logger.tracePii("BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: "+s);break}}}if(t.isAccountKey(s)){var c=t.getItem(s);if(c){var w=t.validateAndParseJson(c);w&&Ue.isAccountEntity(w)&&(t.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),t.logger.tracePii("BrowserCacheManager:createKeyMaps - account with key: "+s+" found, saving key to account key map"),t.addAccountKeyToMap(s))}}})},e.prototype.validateAndParseJson=function(t){try{var o=JSON.parse(t);return o&&typeof o=="object"?o:null}catch{return null}},e.prototype.getItem=function(t){return this.browserStorage.getItem(t)},e.prototype.setItem=function(t,o){this.browserStorage.setItem(t,o)},e.prototype.getAccount=function(t){this.logger.trace("BrowserCacheManager.getAccount called");var o=this.getItem(t);if(!o)return this.removeAccountKeyFromMap(t),null;var r=this.validateAndParseJson(o);return!r||!Ue.isAccountEntity(r)?(this.removeAccountKeyFromMap(t),null):Je.toObject(new Ue,r)},e.prototype.setAccount=function(t){this.logger.trace("BrowserCacheManager.setAccount called");var o=t.generateAccountKey();this.setItem(o,JSON.stringify(t)),this.addAccountKeyToMap(o)},e.prototype.getAccountKeys=function(){this.logger.trace("BrowserCacheManager.getAccountKeys called");var t=this.getItem(Rt.ACCOUNT_KEYS);return t?JSON.parse(t):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])},e.prototype.addAccountKeyToMap=function(t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii("BrowserCacheManager.addAccountKeyToMap called with key: "+t);var o=this.getAccountKeys();o.indexOf(t)===-1?(o.push(t),this.setItem(Rt.ACCOUNT_KEYS,JSON.stringify(o)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")},e.prototype.removeAccountKeyFromMap=function(t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii("BrowserCacheManager.removeAccountKeyFromMap called with key: "+t);var o=this.getAccountKeys(),r=o.indexOf(t);r>-1?(o.splice(r,1),this.setItem(Rt.ACCOUNT_KEYS,JSON.stringify(o)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")},e.prototype.removeAccount=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){return n.prototype.removeAccount.call(this,t),this.removeAccountKeyFromMap(t),[2]})})},e.prototype.removeIdToken=function(t){n.prototype.removeIdToken.call(this,t),this.removeTokenKey(t,Z.ID_TOKEN)},e.prototype.removeAccessToken=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){return n.prototype.removeAccessToken.call(this,t),this.removeTokenKey(t,Z.ACCESS_TOKEN),[2]})})},e.prototype.removeRefreshToken=function(t){n.prototype.removeRefreshToken.call(this,t),this.removeTokenKey(t,Z.REFRESH_TOKEN)},e.prototype.getTokenKeys=function(){this.logger.trace("BrowserCacheManager.getTokenKeys called");var t=this.getItem(Rt.TOKEN_KEYS+"."+this.clientId);if(t){var o=this.validateAndParseJson(t);if(o&&o.hasOwnProperty("idToken")&&o.hasOwnProperty("accessToken")&&o.hasOwnProperty("refreshToken"))return o;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}},e.prototype.addTokenKey=function(t,o){this.logger.trace("BrowserCacheManager addTokenKey called");var r=this.getTokenKeys();switch(o){case Z.ID_TOKEN:r.idToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(t));break;case Z.ACCESS_TOKEN:r.accessToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),r.accessToken.push(t));break;case Z.REFRESH_TOKEN:r.refreshToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(t));break;default:this.logger.error("BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: "+o),K.createUnexpectedCredentialTypeError()}this.setItem(Rt.TOKEN_KEYS+"."+this.clientId,JSON.stringify(r))},e.prototype.removeTokenKey=function(t,o){this.logger.trace("BrowserCacheManager removeTokenKey called");var r=this.getTokenKeys();switch(o){case Z.ID_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: "+t+" from map");var i=r.idToken.indexOf(t);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),r.idToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case Z.ACCESS_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: "+t+" from map");var s=r.accessToken.indexOf(t);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),r.accessToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case Z.REFRESH_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: "+t+" from map");var c=r.refreshToken.indexOf(t);c>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),r.refreshToken.splice(c,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:this.logger.error("BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: "+o),K.createUnexpectedCredentialTypeError()}this.setItem(Rt.TOKEN_KEYS+"."+this.clientId,JSON.stringify(r))},e.prototype.getIdTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ID_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!sn.isIdTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),Je.toObject(new sn,r))},e.prototype.setIdTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.ID_TOKEN)},e.prototype.getAccessTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ACCESS_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!cn.isAccessTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),Je.toObject(new cn,r))},e.prototype.setAccessTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.ACCESS_TOKEN)},e.prototype.getRefreshTokenCredential=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.REFRESH_TOKEN),null;var r=this.validateAndParseJson(o);return!r||!vn.isRefreshTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(t,Z.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),Je.toObject(new vn,r))},e.prototype.setRefreshTokenCredential=function(t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var o=t.generateCredentialKey();this.setItem(o,JSON.stringify(t)),this.addTokenKey(o,Z.REFRESH_TOKEN)},e.prototype.getAppMetadata=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!Lo.isAppMetadataEntity(t,r)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Je.toObject(new Lo,r))},e.prototype.setAppMetadata=function(t){this.logger.trace("BrowserCacheManager.setAppMetadata called");var o=t.generateAppMetadataKey();this.setItem(o,JSON.stringify(t))},e.prototype.getServerTelemetry=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!ro.isServerTelemetryEntity(t,r)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),Je.toObject(new ro,r))},e.prototype.setServerTelemetry=function(t,o){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(t,JSON.stringify(o))},e.prototype.getAuthorityMetadata=function(t){var o=this.internalStorage.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var r=this.validateAndParseJson(o);return r&&Oo.isAuthorityMetadataEntity(t,r)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Je.toObject(new Oo,r)):null},e.prototype.getAuthorityMetadataKeys=function(){var t=this,o=this.internalStorage.getKeys();return o.filter(function(r){return t.isAuthorityMetadata(r)})},e.prototype.setWrapperMetadata=function(t,o){this.internalStorage.setItem(kn.WRAPPER_SKU,t),this.internalStorage.setItem(kn.WRAPPER_VER,o)},e.prototype.getWrapperMetadata=function(){var t=this.internalStorage.getItem(kn.WRAPPER_SKU)||b.EMPTY_STRING,o=this.internalStorage.getItem(kn.WRAPPER_VER)||b.EMPTY_STRING;return[t,o]},e.prototype.setAuthorityMetadata=function(t,o){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(t,JSON.stringify(o))},e.prototype.getActiveAccount=function(){var t=this.generateCacheKey(Ne.ACTIVE_ACCOUNT_FILTERS),o=this.getItem(t);if(!o){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");var r=this.generateCacheKey(Ne.ACTIVE_ACCOUNT),i=this.getItem(r);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;var s=this.getAccountInfoByFilter({localAccountId:i})[0]||null;return s?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(s),s):null}var c=this.validateAndParseJson(o);return c?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:c.homeAccountId,localAccountId:c.localAccountId})[0]||null):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)},e.prototype.setActiveAccount=function(t){var o=this.generateCacheKey(Ne.ACTIVE_ACCOUNT_FILTERS),r=this.generateCacheKey(Ne.ACTIVE_ACCOUNT);if(t){this.logger.verbose("setActiveAccount: Active account set");var i={homeAccountId:t.homeAccountId,localAccountId:t.localAccountId};this.browserStorage.setItem(o,JSON.stringify(i)),this.browserStorage.setItem(r,t.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(o),this.browserStorage.removeItem(r)},e.prototype.getAccountInfoByFilter=function(t){var o=this.getAllAccounts();return this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total "+o.length+" accounts found"),o.filter(function(r){return!(t.username&&t.username.toLowerCase()!==r.username.toLowerCase()||t.homeAccountId&&t.homeAccountId!==r.homeAccountId||t.localAccountId&&t.localAccountId!==r.localAccountId||t.tenantId&&t.tenantId!==r.tenantId||t.environment&&t.environment!==r.environment)})},e.prototype.getAccountInfoByHints=function(t,o){var r=this.getAllAccounts().filter(function(i){if(o){var s=i.idTokenClaims&&i.idTokenClaims.sid;return o===s}return t?t===i.username:!1});if(r.length===1)return r[0];if(r.length>1)throw K.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(t){var o=this.getItem(t);if(!o)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var r=this.validateAndParseJson(o);return!r||!Dr.isThrottlingEntity(t,r)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Je.toObject(new Dr,r))},e.prototype.setThrottlingCache=function(t,o){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(t,JSON.stringify(o))},e.prototype.getTemporaryCache=function(t,o){var r=o?this.generateCacheKey(t):t;if(this.cacheConfig.storeAuthStateInCookie){var i=this.getItemCookie(r);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),i}var s=this.temporaryCacheStorage.getItem(r);if(!s){if(this.cacheConfig.cacheLocation===Ae.LocalStorage){var c=this.browserStorage.getItem(r);if(c)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),c}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),s},e.prototype.setTemporaryCache=function(t,o,r){var i=r?this.generateCacheKey(t):t;this.temporaryCacheStorage.setItem(i,o),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(i,o))},e.prototype.removeItem=function(t){this.browserStorage.removeItem(t),this.temporaryCacheStorage.removeItem(t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(t))},e.prototype.containsKey=function(t){return this.browserStorage.containsKey(t)||this.temporaryCacheStorage.containsKey(t)},e.prototype.getKeys=function(){return Eo(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.removeAllAccounts()];case 1:return o.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(r){(t.browserStorage.containsKey(r)||t.temporaryCacheStorage.containsKey(r))&&(r.indexOf(b.CACHE_PREFIX)!==-1||r.indexOf(t.clientId)!==-1)&&t.removeItem(r)}),this.internalStorage.clear(),[2]}})})},e.prototype.clearTokensAndKeysWithClaims=function(){return z(this,void 0,void 0,function(){var t,o,r=this;return x(this,function(i){switch(i.label){case 0:return this.logger.trace("BrowserCacheManager.clearTokensAndKeysWithClaims called"),t=this.getTokenKeys(),o=[],t.accessToken.forEach(function(s){var c=r.getAccessTokenCredential(s);c!=null&&c.requestedClaimsHash&&s.includes(c.requestedClaimsHash.toLowerCase())&&o.push(r.removeAccessToken(s))}),[4,Promise.all(o)];case 1:return i.sent(),o.length>0&&this.logger.warning(o.length+" access tokens with claims in the cache keys have been removed from the cache."),[2]}})})},e.prototype.setItemCookie=function(t,o,r){var i=encodeURIComponent(t)+"="+encodeURIComponent(o)+";path=/;SameSite=Lax;";if(r){var s=this.getCookieExpirationTime(r);i+="expires="+s+";"}this.cacheConfig.secureCookies&&(i+="Secure;"),document.cookie=i},e.prototype.getItemCookie=function(t){for(var o=encodeURIComponent(t)+"=",r=document.cookie.split(";"),i=0;i<r.length;i++){for(var s=r[i];s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(o)===0)return decodeURIComponent(s.substring(o.length,s.length))}return b.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var t=this,o=b.CACHE_PREFIX+"."+this.clientId,r=document.cookie.split(";");r.forEach(function(i){for(;i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(o)===0){var s=i.split("=")[0];t.clearItemCookie(s)}})},e.prototype.clearItemCookie=function(t){this.setItemCookie(t,b.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(t){var o=new Date,r=new Date(o.getTime()+t*this.COOKIE_LIFE_MULTIPLIER);return r.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(t){var o=this.validateAndParseJson(t);return o?JSON.stringify(t):H.startsWith(t,b.CACHE_PREFIX)||H.startsWith(t,Ne.ADAL_ID_TOKEN)?t:b.CACHE_PREFIX+"."+this.clientId+"."+t},e.prototype.generateAuthorityKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.AUTHORITY+"."+o)},e.prototype.generateNonceKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.NONCE_IDTOKEN+"."+o)},e.prototype.generateStateKey=function(t){var o=Ft.parseRequestState(this.cryptoImpl,t).libraryState.id;return this.generateCacheKey(ue.REQUEST_STATE+"."+o)},e.prototype.getCachedAuthority=function(t){var o=this.generateStateKey(t),r=this.getTemporaryCache(o);if(!r)return null;var i=this.generateAuthorityKey(r);return this.getTemporaryCache(i)},e.prototype.updateCacheEntries=function(t,o,r,i,s){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var c=this.generateStateKey(t);this.setTemporaryCache(c,t,!1);var l=this.generateNonceKey(t);this.setTemporaryCache(l,o,!1);var h=this.generateAuthorityKey(t);if(this.setTemporaryCache(h,r,!1),s){var u={credential:s.homeAccountId,type:rt.HOME_ACCOUNT_ID};this.setTemporaryCache(ue.CCS_CREDENTIAL,JSON.stringify(u),!0)}else if(!H.isEmpty(i)){var u={credential:i,type:rt.UPN};this.setTemporaryCache(ue.CCS_CREDENTIAL,JSON.stringify(u),!0)}},e.prototype.resetRequestCache=function(t){var o=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),H.isEmpty(t)||this.getKeys().forEach(function(r){r.indexOf(t)!==-1&&o.removeItem(r)}),t&&(this.removeItem(this.generateStateKey(t)),this.removeItem(this.generateNonceKey(t)),this.removeItem(this.generateAuthorityKey(t))),this.removeItem(this.generateCacheKey(ue.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(ue.ORIGIN_URI)),this.removeItem(this.generateCacheKey(ue.URL_HASH)),this.removeItem(this.generateCacheKey(ue.CORRELATION_ID)),this.removeItem(this.generateCacheKey(ue.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(ue.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(t){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),t){var o=this.generateStateKey(t),r=this.temporaryCacheStorage.getItem(o);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+r),this.resetRequestCache(r||b.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(t){var o=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(r){if(r.indexOf(ue.REQUEST_STATE)!==-1){var i=o.temporaryCacheStorage.getItem(r);if(i){var s=$r.extractBrowserRequestState(o.cryptoImpl,i);s&&s.interactionType===t&&(o.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+i),o.resetRequestCache(i))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(t,o){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var r=o.base64Encode(JSON.stringify(t));this.setTemporaryCache(ue.REQUEST_PARAMS,r,!0)},e.prototype.getCachedRequest=function(t,o){this.logger.trace("BrowserCacheManager.getCachedRequest called");var r=this.getTemporaryCache(ue.REQUEST_PARAMS,!0);if(!r)throw F.createNoTokenRequestCacheError();var i=this.validateAndParseJson(o.base64Decode(r));if(!i)throw F.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(ue.REQUEST_PARAMS)),H.isEmpty(i.authority)){var s=this.generateAuthorityKey(t),c=this.getTemporaryCache(s);if(!c)throw F.createNoCachedAuthorityError();i.authority=c}return i},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var t=this.getTemporaryCache(ue.NATIVE_REQUEST,!0);if(!t)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var o=this.validateAndParseJson(t);return o||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(t){var o=this.getInteractionInProgress();return t?o===this.clientId:!!o},e.prototype.getInteractionInProgress=function(){var t=b.CACHE_PREFIX+"."+ue.INTERACTION_STATUS_KEY;return this.getTemporaryCache(t,!1)},e.prototype.setInteractionInProgress=function(t){var o=b.CACHE_PREFIX+"."+ue.INTERACTION_STATUS_KEY;if(t){if(this.getInteractionInProgress())throw F.createInteractionInProgressError();this.setTemporaryCache(o,this.clientId,!1)}else!t&&this.getInteractionInProgress()===this.clientId&&this.removeItem(o)},e.prototype.getLegacyLoginHint=function(){var t=this.getTemporaryCache(Ne.ADAL_ID_TOKEN);t&&(this.browserStorage.removeItem(Ne.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var o=this.getTemporaryCache(Ne.ID_TOKEN,!0);o&&(this.removeItem(this.generateCacheKey(Ne.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var r=o||t;if(r){var i=new It(r,this.cryptoImpl);if(i.claims&&i.claims.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),i.claims.preferred_username;if(i.claims&&i.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),i.claims.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null},e.prototype.updateCredentialCacheKey=function(t,o){var r=o.generateCredentialKey();if(t!==r){var i=this.getItem(t);if(i)return this.removeItem(t),this.setItem(r,i),this.logger.verbose("Updated an outdated "+o.credentialType+" cache key"),r;this.logger.error("Attempted to update an outdated "+o.credentialType+" cache key but no item matching the outdated key was found in storage")}return t},e.prototype.getRedirectRequestContext=function(){return this.getTemporaryCache(ue.REDIRECT_CONTEXT,!0)},e.prototype.setRedirectRequestContext=function(t){this.setTemporaryCache(ue.REDIRECT_CONTEXT,t,!0)},e}(Je),ba=function(n,e){var t={cacheLocation:Ae.MemoryStorage,temporaryCacheLocation:Ae.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};return new Bo(n,t,Xn,e)};/*! @azure/msal-browser v2.38.3 2023-10-27 */var Uo="@azure/msal-browser",jn="2.38.3";/*! @azure/msal-browser v2.38.3 2023-10-27 */var wa=function(){function n(){}return n.prototype.sendGetRequestAsync=function(e,t){return z(this,void 0,void 0,function(){var o,r,i;return x(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,fetch(e,{method:At.GET,headers:this.getFetchHeaders(t)})];case 1:return o=s.sent(),[3,3];case 2:throw r=s.sent(),window.navigator.onLine?F.createGetRequestFailedError(r,e):F.createNoNetworkConnectivityError();case 3:return s.trys.push([3,5,,6]),i={headers:this.getHeaderDict(o.headers)},[4,o.json()];case 4:return[2,(i.body=s.sent(),i.status=o.status,i)];case 5:throw s.sent(),F.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},n.prototype.sendPostRequestAsync=function(e,t){return z(this,void 0,void 0,function(){var o,r,i,s;return x(this,function(c){switch(c.label){case 0:o=t&&t.body||b.EMPTY_STRING,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,fetch(e,{method:At.POST,headers:this.getFetchHeaders(t),body:o})];case 2:return r=c.sent(),[3,4];case 3:throw i=c.sent(),window.navigator.onLine?F.createPostRequestFailedError(i,e):F.createNoNetworkConnectivityError();case 4:return c.trys.push([4,6,,7]),s={headers:this.getHeaderDict(r.headers)},[4,r.json()];case 5:return[2,(s.body=c.sent(),s.status=r.status,s)];case 6:throw c.sent(),F.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},n.prototype.getFetchHeaders=function(e){var t=new Headers;if(!(e&&e.headers))return t;var o=e.headers;return Object.keys(o).forEach(function(r){t.append(r,o[r])}),t},n.prototype.getHeaderDict=function(e){var t={};return e.forEach(function(o,r){t[r]=o}),t},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ka=function(){function n(){}return n.prototype.sendGetRequestAsync=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.sendRequestAsync(e,At.GET,t)]})})},n.prototype.sendPostRequestAsync=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.sendRequestAsync(e,At.POST,t)]})})},n.prototype.sendRequestAsync=function(e,t,o){var r=this;return new Promise(function(i,s){var c=new XMLHttpRequest;if(c.open(t,e,!0),r.setXhrHeaders(c,o),c.onload=function(){(c.status<200||c.status>=300)&&(t===At.POST?s(F.createPostRequestFailedError("Failed with status "+c.status,e)):s(F.createGetRequestFailedError("Failed with status "+c.status,e)));try{var l=JSON.parse(c.responseText),h={headers:r.getHeaderDict(c),body:l,status:c.status};i(h)}catch{s(F.createFailedToParseNetworkResponseError(e))}},c.onerror=function(){window.navigator.onLine?t===At.POST?s(F.createPostRequestFailedError("Failed with status "+c.status,e)):s(F.createGetRequestFailedError("Failed with status "+c.status,e)):s(F.createNoNetworkConnectivityError())},t===At.POST&&o&&o.body)c.send(o.body);else if(t===At.GET)c.send();else throw F.createHttpMethodNotImplementedError(t)})},n.prototype.setXhrHeaders=function(e,t){if(t&&t.headers){var o=t.headers;Object.keys(o).forEach(function(r){e.setRequestHeader(r,o[r])})}},n.prototype.getHeaderDict=function(e){var t=e.getAllResponseHeaders(),o=t.trim().split(/[\r\n]+/),r={};return o.forEach(function(i){var s=i.split(": "),c=s.shift(),l=s.join(": ");c&&l&&(r[c]=l)}),r},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ee=function(){function n(){}return n.clearHash=function(e){e.location.hash=b.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,b.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},n.replaceHash=function(e){var t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):b.EMPTY_STRING},n.isInIframe=function(){return window.parent!==window},n.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(_t.POPUP_NAME_PREFIX+".")===0},n.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},n.getHomepage=function(){var e=new de(window.location.href),t=e.getUrlComponents();return t.Protocol+"//"+t.HostNameAndPort+"/"},n.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new wa:new ka},n.blockReloadInHiddenIframes=function(){var e=de.hashContainsKnownProperties(window.location.hash);if(e&&n.isInIframe())throw F.createBlockReloadInHiddenIframeError()},n.blockRedirectInIframe=function(e,t){var o=n.isInIframe();if(e===$.Redirect&&o&&!t)throw F.createRedirectInIframeError(o)},n.blockAcquireTokenInPopups=function(){if(n.isInPopup())throw F.createBlockAcquireTokenInPopupsError()},n.blockNonBrowserEnvironment=function(e){if(!e)throw F.createNonBrowserEnvironmentError()},n.blockNativeBrokerCalledBeforeInitialized=function(e,t){if(e&&!t)throw F.createNativeBrokerCalledBeforeInitialize()},n.detectIEOrEdge=function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE "),o=e.indexOf("Trident/"),r=e.indexOf("Edge/"),i=t>0||o>0,s=r>0;return i||s},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Qr=function(){function n(e,t,o,r,i,s,c,l,h){this.config=e,this.browserStorage=t,this.browserCrypto=o,this.networkClient=this.config.system.networkClient,this.eventHandler=i,this.navigationClient=s,this.nativeMessageHandler=l,this.correlationId=h||this.browserCrypto.createNewGuid(),this.logger=r.clone(_t.MSAL_SKU,jn,this.correlationId),this.performanceClient=c}return n.prototype.clearCacheOnLogout=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){switch(t.label){case 0:if(!e)return[3,5];Ue.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(Ue.generateAccountCacheKey(e))];case 2:return t.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return t.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return t.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return t.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return t.sent(),[3,9];case 8:return t.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},n.prototype.initializeBaseRequest=function(e,t){return z(this,void 0,void 0,function(){var o,r,i,s;return x(this,function(c){switch(c.label){case 0:return this.performanceClient.addQueueMeasurement(R.InitializeBaseRequest,e.correlationId),this.logger.verbose("Initializing BaseAuthRequest"),o=e.authority||this.config.auth.authority,t?[4,this.validateRequestAuthority(o,t)]:[3,2];case 1:c.sent(),c.label=2;case 2:if(r=Eo(e&&e.scopes||[]),i=Q(Q({},e),{correlationId:this.correlationId,authority:o,scopes:r}),!i.authenticationScheme)i.authenticationScheme=ge.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(i.authenticationScheme===ge.SSH){if(!e.sshJwk)throw we.createMissingSshJwkError();if(!e.sshKid)throw we.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+i.authenticationScheme+'" as configured in Auth request')}return this.config.cache.claimsBasedCachingEnabled&&e.claims&&!H.isEmptyObj(e.claims)?(s=i,[4,this.browserCrypto.hashString(e.claims)]):[3,4];case 3:s.requestedClaimsHash=c.sent(),c.label=4;case 4:return[2,i]}})})},n.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var t=e||this.config.auth.redirectUri||Ee.getCurrentUri();return de.getAbsoluteUrl(t,Ee.getCurrentUri())},n.prototype.validateRequestAuthority=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(r.label){case 0:return[4,this.getDiscoveredAuthority(e)];case 1:if(o=r.sent(),!o.isAlias(t.environment))throw we.createAuthorityMismatchError();return[2]}})})},n.prototype.initializeServerTelemetryManager=function(e,t){this.logger.verbose("initializeServerTelemetryManager called");var o={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new ga(o,this.browserStorage)},n.prototype.getDiscoveredAuthority=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),t={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,oo.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,t,this.logger)]):[3,2];case 1:return[2,o.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,oo.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,t,this.logger)];case 3:return[2,o.sent()]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var En=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(t){return z(this,void 0,void 0,function(){var o,r;return x(this,function(i){switch(i.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),this.logger.verbose("initializeAuthorizationRequest called",t.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return o=i.sent(),r=Q(Q({},t),{redirectUri:t.redirectUri,code:b.EMPTY_STRING,codeVerifier:o.verifier}),t.codeChallenge=o.challenge,t.codeChallengeMethod=b.S256_CODE_CHALLENGE_METHOD,[2,r]}})})},e.prototype.initializeLogoutRequest=function(t){this.logger.verbose("initializeLogoutRequest called",t==null?void 0:t.correlationId);var o=Q({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},t);if(t)if(t.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(t.account){var r=this.getLogoutHintFromIdTokenClaims(t.account);r&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),o.logoutHint=r)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!t||t.postLogoutRedirectUri!==null?t&&t.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(t.postLogoutRedirectUri,Ee.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",o.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Ee.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",o.correlationId),o.postLogoutRedirectUri=de.getAbsoluteUrl(Ee.getCurrentUri(),Ee.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",o.correlationId),o},e.prototype.getLogoutHintFromIdTokenClaims=function(t){var o=t.idTokenClaims;if(o){if(o.login_hint)return o.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null},e.prototype.createAuthCodeClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientCreateAuthCodeClient,this.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new Or(i,this.performanceClient)]}})})},e.prototype.getClientConfiguration=function(t,o,r){return z(this,void 0,void 0,function(){var i,s;return x(this,function(c){switch(c.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientGetClientConfiguration,this.correlationId),this.logger.verbose("getClientConfiguration called",this.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),[4,this.getDiscoveredAuthority(o,r)];case 1:return i=c.sent(),s=this.config.system.loggerOptions,[2,{authOptions:{clientId:this.config.auth.clientId,authority:i,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:s.loggerCallback,piiLoggingEnabled:s.piiLoggingEnabled,logLevel:s.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:_t.MSAL_SKU,version:jn,cpu:b.EMPTY_STRING,os:b.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(t,o,r){if(this.logger.verbose("validateAndExtractStateFromHash called",r),!t.state)throw F.createHashDoesNotContainStateError();var i=$r.extractBrowserRequestState(this.browserCrypto,t.state);if(!i)throw F.createUnableToParseStateError();if(i.interactionType!==o)throw F.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",r),t.state},e.prototype.getDiscoveredAuthority=function(t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l;return x(this,function(h){switch(h.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),this.logger.verbose("getDiscoveredAuthority called",this.correlationId),i=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},c=t||this.config.auth.authority,l=Un.generateAuthority(c,o||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),this.performanceClient.setPreQueueTime(R.AuthorityFactoryCreateDiscoveredInstance,this.correlationId),[4,oo.createDiscoveredInstance(l,this.config.system.networkClient,this.browserStorage,s,this.logger,this.performanceClient,this.correlationId).then(function(u){return i.endMeasurement({success:!0}),u}).catch(function(u){throw i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})];case 1:return[2,h.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:return this.performanceClient.addQueueMeasurement(R.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId),this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),r=this.getRedirectUri(t.redirectUri),i={interactionType:o},s=Ft.setRequestState(this.browserCrypto,t&&t.state||b.EMPTY_STRING,i),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,this.correlationId),l=[{}],[4,this.initializeBaseRequest(t)];case 1:return c=Q.apply(void 0,[Q.apply(void 0,l.concat([g.sent()])),{redirectUri:r,state:s,nonce:t.nonce||this.browserCrypto.createNewGuid(),responseMode:Qn.FRAGMENT}]),h=t.account||this.browserStorage.getActiveAccount(),h&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+h.homeAccountId,this.correlationId),c.account=h),H.isEmpty(c.loginHint)&&!h&&(u=this.browserStorage.getLegacyLoginHint(),u&&(c.loginHint=u)),[2,c]}})})},e}(Qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Do=function(){function n(e,t,o,r,i){this.authModule=e,this.browserStorage=t,this.authCodeRequest=o,this.logger=r,this.performanceClient=i}return n.prototype.handleCodeResponseFromHash=function(e,t,o,r){return z(this,void 0,void 0,function(){var i,s,c;return x(this,function(l){if(this.performanceClient.addQueueMeasurement(R.HandleCodeResponseFromHash,this.authCodeRequest.correlationId),this.logger.verbose("InteractionHandler.handleCodeResponse called"),H.isEmpty(e))throw F.createEmptyHashError(e);if(i=this.browserStorage.generateStateKey(t),s=this.browserStorage.getTemporaryCache(i),!s)throw K.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(e,s)}catch(h){throw h instanceof rn&&h.subError===U.userCancelledError.code?F.createUserCancelledError():h}return this.performanceClient.setPreQueueTime(R.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),[2,this.handleCodeResponseFromServer(c,t,o,r)]})})},n.prototype.handleCodeResponseFromServer=function(e,t,o,r,i){return i===void 0&&(i=!0),z(this,void 0,void 0,function(){var s,c,l,h,u,g;return x(this,function(f){switch(f.label){case 0:if(this.performanceClient.addQueueMeasurement(R.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),s=this.browserStorage.generateStateKey(t),c=this.browserStorage.getTemporaryCache(s),!c)throw K.createStateNotFoundError("Cached State");return l=this.browserStorage.generateNonceKey(c),h=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?(this.performanceClient.setPreQueueTime(R.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,o,r)]):[3,2];case 1:f.sent(),f.label=2;case 2:return i&&(e.nonce=h||void 0),e.state=c,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(u=this.checkCcsCredentials(),u&&(this.authCodeRequest.ccsCredential=u)),this.performanceClient.setPreQueueTime(R.AuthClientAcquireToken,this.authCodeRequest.correlationId),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return g=f.sent(),this.browserStorage.cleanRequestByState(t),[2,g]}})})},n.prototype.updateTokenEndpointAuthority=function(e,t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(R.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),r="https://"+e+"/"+t.tenant+"/",[4,oo.createDiscoveredInstance(r,o,this.browserStorage,t.options,this.logger,this.performanceClient,this.authCodeRequest.correlationId)];case 1:return i=s.sent(),this.authModule.updateAuthority(i),[2]}})})},n.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(ue.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: "+e)}return null},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wr=function(n){xe(e,n);function e(t,o,r,i,s,c){var l=n.call(this,t,o,r,i,c)||this;return l.browserCrypto=s,l}return e.prototype.initiateAuthRequest=function(t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),H.isEmpty(t)?[3,7]:(o.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ue.ORIGIN_URI,o.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ue.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+t),r={apiId:ke.acquireTokenRedirect,timeout:o.redirectTimeout,noHistory:!1},typeof o.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),i=o.onRedirectNavigate(t),i===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,o.navigationClient.navigateExternal(t,r)])));case 1:return s.sent(),[2];case 2:return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),[4,o.navigationClient.navigateExternal(t,r)];case 5:return s.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),F.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(t,o,r,i){return z(this,void 0,void 0,function(){var s,c,l,h,u,g,f;return x(this,function(w){switch(w.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),H.isEmpty(t))throw F.createEmptyHashError(t);if(this.browserStorage.setInteractionInProgress(!1),s=this.browserStorage.generateStateKey(o),c=this.browserStorage.getTemporaryCache(s),!c)throw K.createStateNotFoundError("Cached State");try{l=this.authModule.handleFragmentResponse(t,c)}catch(C){throw C instanceof rn&&C.subError===U.userCancelledError.code?F.createUserCancelledError():C}return h=this.browserStorage.generateNonceKey(c),u=this.browserStorage.getTemporaryCache(h),this.authCodeRequest.code=l.code,l.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(l.cloud_instance_host_name,r,i)]:[3,2];case 1:w.sent(),w.label=2;case 2:return l.nonce=u||void 0,l.state=c,l.client_info?this.authCodeRequest.clientInfo=l.client_info:(g=this.checkCcsCredentials(),g&&(this.authCodeRequest.ccsCredential=g)),[4,this.authModule.acquireToken(this.authCodeRequest,l)];case 3:return f=w.sent(),this.browserStorage.cleanRequestByState(o),[2,f]}})})},e}(Do);/*! @azure/msal-browser v2.38.3 2023-10-27 */var te;(function(n){n.INITIALIZE_START="msal:initializeStart",n.INITIALIZE_END="msal:initializeEnd",n.ACCOUNT_ADDED="msal:accountAdded",n.ACCOUNT_REMOVED="msal:accountRemoved",n.LOGIN_START="msal:loginStart",n.LOGIN_SUCCESS="msal:loginSuccess",n.LOGIN_FAILURE="msal:loginFailure",n.ACQUIRE_TOKEN_START="msal:acquireTokenStart",n.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",n.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",n.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",n.SSO_SILENT_START="msal:ssoSilentStart",n.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",n.SSO_SILENT_FAILURE="msal:ssoSilentFailure",n.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",n.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",n.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",n.HANDLE_REDIRECT_START="msal:handleRedirectStart",n.HANDLE_REDIRECT_END="msal:handleRedirectEnd",n.POPUP_OPENED="msal:popupOpened",n.LOGOUT_START="msal:logoutStart",n.LOGOUT_SUCCESS="msal:logoutSuccess",n.LOGOUT_FAILURE="msal:logoutFailure",n.LOGOUT_END="msal:logoutEnd",n.RESTORE_FROM_BFCACHE="msal:restoreFromBFCache"})(te||(te={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wt;(function(n){n.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",n.USER_CANCEL="USER_CANCEL",n.NO_NETWORK="NO_NETWORK",n.TRANSIENT_ERROR="TRANSIENT_ERROR",n.PERSISTENT_ERROR="PERSISTENT_ERROR",n.DISABLED="DISABLED",n.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(Wt||(Wt={}));var qn={extensionError:{code:"ContentError"},userSwitch:{code:"user_switch",desc:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."},tokensNotFoundInCache:{code:"tokens_not_found_in_internal_memory_cache",desc:"Tokens not cached in MSAL JS internal memory, please make the WAM request"}},Nt=function(n){xe(e,n);function e(t,o,r){var i=n.call(this,t,o)||this;return Object.setPrototypeOf(i,e.prototype),i.name="NativeAuthError",i.ext=r,i}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===Wt.PERSISTENT_ERROR||this.ext.status===Wt.DISABLED))return!0;switch(this.errorCode){case qn.extensionError.code:return!0;default:return!1}},e.createError=function(t,o,r){if(r&&r.status)switch(r.status){case Wt.ACCOUNT_UNAVAILABLE:return gt.createNativeAccountUnavailableError();case Wt.USER_INTERACTION_REQUIRED:return new gt(t,o);case Wt.USER_CANCEL:return F.createUserCancelledError();case Wt.NO_NETWORK:return F.createNoNetworkConnectivityError()}return new e(t,o,r)},e.createUserSwitchError=function(){return new e(qn.userSwitch.code,qn.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(qn.tokensNotFoundInCache.code,qn.tokensNotFoundInCache.desc)},e}(Y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Yr=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c;return x(this,function(l){switch(l.label){case 0:return o=this.performanceClient.startMeasurement(R.SilentCacheClientAcquireToken,t.correlationId),r=this.initializeServerTelemetryManager(ke.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(r,t.authority,t.azureCloudOptions)];case 1:i=l.sent(),this.logger.verbose("Silent auth client created"),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,i.acquireCachedToken(t)];case 3:return s=l.sent(),o.endMeasurement({success:!0,fromCache:!0}),[2,s];case 4:throw c=l.sent(),c instanceof F&&c.errorCode===U.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),o.endMeasurement({errorCode:c instanceof Y&&c.errorCode||void 0,subErrorCode:c instanceof Y&&c.subError||void 0,success:!1}),c;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new la(i,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(t,o){return z(this,void 0,void 0,function(){var r;return x(this,function(i){switch(i.label){case 0:return this.performanceClient.addQueueMeasurement(R.InitializeSilentRequest,this.correlationId),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,this.correlationId),r=[Q({},t)],[4,this.initializeBaseRequest(t,o)];case 1:return[2,Q.apply(void 0,[Q.apply(void 0,r.concat([i.sent()])),{account:o,forceRefresh:t.forceRefresh||!1}])]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Tn=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g,f,w){var C=n.call(this,t,o,r,i,s,c,h,u,w)||this;return C.apiId=l,C.accountId=g,C.nativeMessageHandler=u,C.nativeStorageManager=f,C.silentCacheClient=new Yr(t,C.nativeStorageManager,r,i,s,c,h,u,w),C}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),o=this.performanceClient.startMeasurement(R.NativeInteractionClientAcquireToken,t.correlationId),r=pt.nowSeconds(),[4,this.initializeNativeRequest(t)];case 1:i=u.sent(),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,i)];case 3:return s=u.sent(),o.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,s];case 4:return u.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return c={method:Vt.GetToken,request:i},[4,this.nativeMessageHandler.sendMessage(c)];case 6:return l=u.sent(),h=this.validateNativeResponse(l),[2,this.handleNativeResponse(h,i,r).then(function(g){return o.endMeasurement({success:!0,isNativeBroker:!0,requestId:g.requestId}),g}).catch(function(g){throw o.endMeasurement({success:!1,errorCode:g.errorCode,subErrorCode:g.subError,isNativeBroker:!0}),g})]}})})},e.prototype.createSilentCacheRequest=function(t,o){return{authority:t.authority,correlationId:this.correlationId,scopes:He.fromString(t.scope).asArray(),account:o,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c;return x(this,function(l){switch(l.label){case 0:if(!t)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),K.createNoAccountFoundError();if(r=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t}),!r)throw K.createNoAccountFoundError();l.label=1;case 1:return l.trys.push([1,3,,4]),i=this.createSilentCacheRequest(o,r),[4,this.silentCacheClient.acquireToken(i)];case 2:return s=l.sent(),[2,s];case 3:throw c=l.sent(),c;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l;return x(this,function(h){switch(h.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(t)];case 1:o=h.sent(),r={method:Vt.GetToken,request:o},h.label=2;case 2:return h.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(r)];case 3:return i=h.sent(),this.validateNativeResponse(i),[3,5];case 4:if(s=h.sent(),s instanceof Nt&&s.isFatal())throw s;return[3,5];case 5:return this.browserStorage.setTemporaryCache(ue.NATIVE_REQUEST,JSON.stringify(o),!0),c={apiId:ke.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},l=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(t.redirectUri),[4,this.navigationClient.navigateExternal(l,c)];case 6:return h.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return z(this,void 0,void 0,function(){var t,o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(t=this.browserStorage.getCachedNativeRequest(),!t)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];o=t.prompt,r=Ir(t,["prompt"]),o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ue.NATIVE_REQUEST)),i={method:Vt.GetToken,request:r},s=pt.nowSeconds(),u.label=1;case 1:return u.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(i)];case 2:return c=u.sent(),this.validateNativeResponse(c),l=this.handleNativeResponse(c,r,s),this.browserStorage.setInteractionInProgress(!1),[2,l];case 3:throw h=u.sent(),this.browserStorage.setInteractionInProgress(!1),h;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(t,o,r){return z(this,void 0,void 0,function(){var i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),t.account.id!==o.accountId)throw Nt.createUserSwitchError();return[4,this.getDiscoveredAuthority(o.authority)];case 1:return i=g.sent(),s=i.getPreferredCache(),c=this.createIdTokenObj(t),l=this.createHomeAccountIdentifier(t,c),h=this.createAccountEntity(t,l,c,s),[4,this.generateAuthenticationResult(t,o,c,h,i.canonicalAuthority,r)];case 2:return u=g.sent(),this.cacheAccount(h),this.cacheNativeTokens(t,o,l,h,c,u.accessToken,u.tenantId,r),[2,u]}})})},e.prototype.createIdTokenObj=function(t){return new It(t.id_token||b.EMPTY_STRING,this.browserCrypto)},e.prototype.createHomeAccountIdentifier=function(t,o){var r=Ue.generateHomeAccountId(t.client_info||b.EMPTY_STRING,$e.Default,this.logger,this.browserCrypto,o);return r},e.prototype.createAccountEntity=function(t,o,r,i){return Ue.createAccount(t.client_info,o,r,void 0,void 0,void 0,i,t.account.id)},e.prototype.generateScopes=function(t,o){return t.scope?He.fromString(t.scope):He.fromString(o.scope)},e.prototype.generatePopAccessToken=function(t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:if(o.tokenType!==ge.POP)return[3,2];if(t.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),[2,t.shr];if(r=new wn(this.browserCrypto),i={resourceRequestMethod:o.resourceRequestMethod,resourceRequestUri:o.resourceRequestUri,shrClaims:o.shrClaims,shrNonce:o.shrNonce},!o.keyId)throw K.createKeyIdMissingError();return[4,r.signPopToken(t.access_token,o.keyId,i)];case 1:return[2,s.sent()];case 2:return[2,t.access_token]}})})},e.prototype.generateAuthenticationResult=function(t,o,r,i,s,c){return z(this,void 0,void 0,function(){var l,h,u,g,f,w,C,P;return x(this,function(M){switch(M.label){case 0:return l=this.addTelemetryFromNativeResponse(t),h=t.scope?He.fromString(t.scope):He.fromString(o.scope),u=t.account.properties||{},g=u.UID||r.claims.oid||r.claims.sub||b.EMPTY_STRING,f=u.TenantId||r.claims.tid||b.EMPTY_STRING,[4,this.generatePopAccessToken(t,o)];case 1:return w=M.sent(),C=o.tokenType===ge.POP?ge.POP:ge.BEARER,P={authority:s,uniqueId:g,tenantId:f,scopes:h.asArray(),account:i.getAccountInfo(),idToken:t.id_token,idTokenClaims:r.claims,accessToken:w,fromCache:l?this.isResponseFromCache(l):!1,expiresOn:new Date(Number(c+t.expires_in)*1e3),tokenType:C,correlationId:this.correlationId,state:t.state,fromNativeBroker:!0},[2,P]}})})},e.prototype.cacheAccount=function(t){var o=this;this.browserStorage.setAccount(t),this.browserStorage.removeAccountContext(t).catch(function(r){o.logger.error("Error occurred while removing account context from browser storage. "+r)})},e.prototype.cacheNativeTokens=function(t,o,r,i,s,c,l,h){var u=sn.createIdTokenEntity(r,o.authority,t.id_token||b.EMPTY_STRING,o.clientId,s.claims.tid||b.EMPTY_STRING),g=o.tokenType===ge.POP?b.SHR_NONCE_VALIDITY:(typeof t.expires_in=="string"?parseInt(t.expires_in,10):t.expires_in)||0,f=h+g,w=this.generateScopes(t,o),C=cn.createAccessTokenEntity(r,o.authority,c,o.clientId,s?s.claims.tid||b.EMPTY_STRING:l,w.printScopes(),f,0,this.browserCrypto),P=new xn(i,u,C);this.nativeStorageManager.saveCacheRecord(P)},e.prototype.addTelemetryFromNativeResponse=function(t){var o=this.getMATSFromResponse(t);return o?(this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:o.broker_version,matsAccountJoinOnStart:o.account_join_on_start,matsAccountJoinOnEnd:o.account_join_on_end,matsDeviceJoin:o.device_join,matsPromptBehavior:o.prompt_behavior,matsApiErrorCode:o.api_error_code,matsUiVisible:o.ui_visible,matsSilentCode:o.silent_code,matsSilentBiSubCode:o.silent_bi_sub_code,matsSilentMessage:o.silent_message,matsSilentStatus:o.silent_status,matsHttpStatus:o.http_status,matsHttpEventCount:o.http_event_count},this.correlationId),o):null},e.prototype.validateNativeResponse=function(t){if(t.hasOwnProperty("access_token")&&t.hasOwnProperty("id_token")&&t.hasOwnProperty("client_info")&&t.hasOwnProperty("account")&&t.hasOwnProperty("scope")&&t.hasOwnProperty("expires_in"))return t;throw Nt.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(t){if(t.properties.MATS)try{return JSON.parse(t.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(t){return typeof t.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!t.is_cached},e.prototype.initializeNativeRequest=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f,w=this;return x(this,function(C){switch(C.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),o=t.authority||this.config.auth.authority,t.account?[4,this.validateRequestAuthority(o,t.account)]:[3,2];case 1:C.sent(),C.label=2;case 2:return r=new de(o),r.validateAsUri(),i=t.scopes,s=Ir(t,["scopes"]),c=new He(i||[]),c.appendScopes(An),l=function(){switch(w.apiId){case ke.ssoSilent:case ke.acquireTokenSilent_silentFlow:return w.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Ve.NONE}if(!t.prompt){w.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(t.prompt){case Ve.NONE:case Ve.CONSENT:case Ve.LOGIN:return w.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),t.prompt;default:throw w.logger.trace("initializeNativeRequest: prompt = "+t.prompt+" is not compatible with native flow"),F.createNativePromptParameterNotSupportedError()}},h=Q(Q({},s),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:r.urlString,scope:c.printScopes(),redirectUri:this.getRedirectUri(t.redirectUri),prompt:l(),correlationId:this.correlationId,tokenType:t.authenticationScheme,windowTitleSubstring:document.title,extraParameters:Q(Q(Q({},t.extraQueryParameters),t.tokenQueryParameters),{telemetry:Dn.MATS_TELEMETRY}),extendedExpiryToken:!1}),t.authenticationScheme!==ge.POP?[3,4]:(u={resourceRequestUri:t.resourceRequestUri,resourceRequestMethod:t.resourceRequestMethod,shrClaims:t.shrClaims,shrNonce:t.shrNonce},g=new wn(this.browserCrypto),[4,g.generateCnf(u)]);case 3:f=C.sent(),h.reqCnf=f.reqCnfString,h.keyId=f.kid,C.label=4;case 4:return[2,h]}})})},e}(Qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var ln=function(){function n(e,t,o,r){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=r,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=o,this.handshakeEvent=o.startMeasurement(R.NativeMessageHandlerHandshake)}return n.prototype.sendMessage=function(e){return z(this,void 0,void 0,function(){var t,o=this;return x(this,function(r){return this.logger.trace("NativeMessageHandler - sendMessage called."),t={channel:Dn.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:e},this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: "+JSON.stringify(t)),this.messageChannel.port1.postMessage(t),[2,new Promise(function(i,s){o.resolvers.set(t.responseId,{resolve:i,reject:s})})]})})},n.createProvider=function(e,t,o){return z(this,void 0,void 0,function(){var r,i;return x(this,function(s){switch(s.label){case 0:e.trace("NativeMessageHandler - createProvider called."),s.label=1;case 1:return s.trys.push([1,3,,5]),r=new n(e,t,o,Dn.PREFERRED_EXTENSION_ID),[4,r.sendHandshakeRequest()];case 2:return s.sent(),[2,r];case 3:return s.sent(),i=new n(e,t,o),[4,i.sendHandshakeRequest()];case 4:return s.sent(),[2,i];case 5:return[2]}})})},n.prototype.sendHandshakeRequest=function(){return z(this,void 0,void 0,function(){var e,t=this;return x(this,function(o){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:Dn.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:Vt.HandshakeRequest}},this.handshakeEvent.addStaticFields({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=function(r){t.onChannelMessage(r)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(r,i){t.handshakeResolvers.set(e.responseId,{resolve:r,reject:i}),t.timeoutId=window.setTimeout(function(){window.removeEventListener("message",t.windowListener,!1),t.messageChannel.port1.close(),t.messageChannel.port2.close(),t.handshakeEvent.endMeasurement({extensionHandshakeTimedOut:!0,success:!1}),i(F.createNativeHandshakeTimeoutError()),t.handshakeResolvers.delete(e.responseId)},t.handshakeTimeoutMs)})]})})},n.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var t=e.data;if(!(!t.channel||t.channel!==Dn.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===Vt.HandshakeRequest){this.logger.verbose(t.extensionId?"Extension with id: "+t.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var o=this.handshakeResolvers.get(t.responseId);o&&(this.handshakeEvent.endMeasurement({success:!1,extensionInstalled:!1}),o.reject(F.createNativeExtensionNotInstalledError()))}}},n.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var t=e.data,o=this.resolvers.get(t.responseId),r=this.handshakeResolvers.get(t.responseId);try{var i=t.body.method;if(i===Vt.Response){if(!o)return;var s=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(s)),s.status!=="Success")o.reject(Nt.createError(s.code,s.description,s.ext));else if(s.result)s.result.code&&s.result.description?o.reject(Nt.createError(s.result.code,s.result.description,s.result.ext)):o.resolve(s.result);else throw Y.createUnexpectedError("Event does not contain result.");this.resolvers.delete(t.responseId)}else if(i===Vt.HandshakeResponse){if(!r)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),this.handshakeEvent.endMeasurement({extensionInstalled:!0,success:!0}),r.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(c){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+c.toString()),this.logger.errorPii("Unable to parse "+e),o?o.reject(c):r&&r.reject(c)}},n.prototype.getExtensionId=function(){return this.extensionId},n.prototype.getExtensionVersion=function(){return this.extensionVersion},n.isNativeAvailable=function(e,t,o,r){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!o)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(r)switch(r){case ge.BEARER:case ge.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ca=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,l,u,g)||this;return f.nativeStorage=h,f}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f=this;return x(this,function(w){switch(w.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Redirect)];case 1:o=w.sent(),this.browserStorage.updateCacheEntries(o.state,o.nonce,o.authority,o.loginHint||b.EMPTY_STRING,o.account||null),r=this.initializeServerTelemetryManager(ke.acquireTokenRedirect),i=function(C){C.persisted&&(f.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),f.browserStorage.cleanRequestByState(o.state),f.eventHandler.emitEvent(te.RESTORE_FROM_BFCACHE,$.Redirect))},w.label=2;case 2:return w.trys.push([2,7,,8]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),[4,this.initializeAuthorizationCodeRequest(o)];case 3:return s=w.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(r,o.authority,o.azureCloudOptions)];case 4:return c=w.sent(),this.logger.verbose("Auth code client created"),l=new Wr(c,this.browserStorage,s,this.logger,this.browserCrypto,this.performanceClient),[4,c.getAuthCodeUrl(Q(Q({},o),{nativeBroker:ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}))];case 5:return h=w.sent(),u=this.getRedirectStartPage(t.redirectStartPage),this.logger.verbosePii("Redirect start page: "+u),window.addEventListener("pageshow",i),[4,l.initiateAuthRequest(h,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:u,onRedirectNavigate:t.onRedirectNavigate})];case 6:return[2,w.sent()];case 7:throw g=w.sent(),g instanceof Y&&g.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),r.cacheFailedRequest(g),this.browserStorage.cleanRequestByState(o.state),g;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u,g,f,w,C;return x(this,function(P){switch(P.label){case 0:o=this.initializeServerTelemetryManager(ke.handleRedirectPromise),P.label=1;case 1:if(P.trys.push([1,10,,11]),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(r=this.getRedirectResponseHash(t||window.location.hash),!r)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType($.Redirect),[2,null];i=void 0;try{s=de.getDeserializedHash(r),i=this.validateAndExtractStateFromHash(s,$.Redirect),this.logger.verbose("State extracted from hash")}catch(M){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+M),this.browserStorage.cleanRequestByInteractionType($.Redirect),[2,null]}return c=this.browserStorage.getTemporaryCache(ue.ORIGIN_URI,!0)||b.EMPTY_STRING,l=de.removeHashFromUrl(c),h=de.removeHashFromUrl(window.location.href),l===h&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(r,i,o)]):[3,3];case 2:return u=P.sent(),c.indexOf("#")>-1&&Ee.replaceHash(c),[2,u];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(r,i,o)]);case 4:return!Ee.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(ue.URL_HASH,r,!0),g={apiId:ke.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},f=!0,!c||c==="null"?(w=Ee.getHomepage(),this.browserStorage.setTemporaryCache(ue.ORIGIN_URI,w,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(w,g)]):[3,6]):[3,9];case 5:return f=P.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+c),[4,this.navigationClient.navigateInternal(c,g)];case 7:f=P.sent(),P.label=8;case 8:if(!f)return[2,this.handleHash(r,i,o)];P.label=9;case 9:return[2,null];case 10:throw C=P.sent(),C instanceof Y&&C.setCorrelationId(this.correlationId),o.cacheFailedRequest(C),this.browserStorage.cleanRequestByInteractionType($.Redirect),C;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(t){this.logger.verbose("getRedirectResponseHash called");var o=de.hashContainsKnownProperties(t);if(o)return Ee.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),t;var r=this.browserStorage.getTemporaryCache(ue.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ue.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),r},e.prototype.handleHash=function(t,o,r){return z(this,void 0,void 0,function(){var i,s,c,l,h,u,g,f=this;return x(this,function(w){switch(w.label){case 0:if(i=this.browserStorage.getCachedRequest(o,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),s=de.getDeserializedHash(t),s.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return c=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,s.accountId,this.nativeStorage,i.correlationId),l=Ft.parseRequestState(this.browserCrypto,o).userRequestState,[2,c.acquireToken(Q(Q({},i),{state:l,prompt:void 0})).finally(function(){f.browserStorage.cleanRequestByState(o)})]}if(h=this.browserStorage.getCachedAuthority(o),!h)throw F.createNoCachedAuthorityError();return this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,i.correlationId),[4,this.createAuthCodeClient(r,h)];case 1:return u=w.sent(),this.logger.verbose("Auth code client created"),eo.removeThrottle(this.browserStorage,this.config.auth.clientId,i),g=new Wr(u,this.browserStorage,i,this.logger,this.browserCrypto,this.performanceClient),[4,g.handleCodeResponseFromHash(t,o,u.authority,this.networkClient)];case 2:return[2,w.sent()]}})})},e.prototype.logout=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:this.logger.verbose("logoutRedirect called"),o=this.initializeLogoutRequest(t),r=this.initializeServerTelemetryManager(ke.logout),u.label=1;case 1:return u.trys.push([1,10,,11]),this.eventHandler.emitEvent(te.LOGOUT_START,$.Redirect,t),[4,this.clearCacheOnLogout(o.account)];case 2:return u.sent(),i={apiId:ke.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,o.correlationId),[4,this.createAuthCodeClient(r,t&&t.authority)];case 3:return s=u.sent(),this.logger.verbose("Auth code client created"),c=s.getLogoutUri(o),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,$.Redirect,o),t&&typeof t.onRedirectNavigate=="function"?(l=t.onRedirectNavigate(c),l===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(c,i)])):[3,7];case 4:return u.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),u.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(c,i)];case 8:return u.sent(),[2];case 9:return[3,11];case 10:throw h=u.sent(),h instanceof Y&&h.setCorrelationId(this.correlationId),r.cacheFailedRequest(h),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,$.Redirect,null,h),this.eventHandler.emitEvent(te.LOGOUT_END,$.Redirect),h;case 11:return this.eventHandler.emitEvent(te.LOGOUT_END,$.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(t){var o=t||window.location.href;return de.getAbsoluteUrl(o,Ee.getCurrentUri())},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ea=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,l,u,g)||this;return f.unloadWindow=f.unloadWindow.bind(f),f.nativeStorage=h,f}return e.prototype.acquireToken=function(t){try{var o=this.generatePopupName(t.scopes||An,t.authority||this.config.auth.authority),r=t.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(t,o,r);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var i=this.openSizedPopup("about:blank",o,r);return this.acquireTokenPopupAsync(t,o,r,i)}catch(s){return Promise.reject(s)}},e.prototype.logout=function(t){try{this.logger.verbose("logoutPopup called");var o=this.initializeLogoutRequest(t),r=this.generateLogoutPopupName(o),i=t&&t.authority,s=t&&t.mainWindowRedirectUri,c=(t==null?void 0:t.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(o,r,c,i,void 0,s);this.logger.verbose("asyncPopup set to false, opening popup");var l=this.openSizedPopup("about:blank",r,c);return this.logoutPopupAsync(o,r,c,i,l,s)}catch(h){return Promise.reject(h)}},e.prototype.acquireTokenPopupAsync=function(t,o,r,i){return z(this,void 0,void 0,function(){var s,c,l,h,u,g,f,w,C,P,M,j,N,T,B,V,G,J=this;return x(this,function(I){switch(I.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),s=this.initializeServerTelemetryManager(ke.acquireTokenPopup),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Popup)];case 1:c=I.sent(),this.browserStorage.updateCacheEntries(c.state,c.nonce,c.authority,c.loginHint||b.EMPTY_STRING,c.account||null),I.label=2;case 2:return I.trys.push([2,8,,9]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,t.correlationId),[4,this.initializeAuthorizationCodeRequest(c)];case 3:return l=I.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(s,c.authority,c.azureCloudOptions)];case 4:return h=I.sent(),this.logger.verbose("Auth code client created"),u=ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme),g=void 0,u&&(g=this.performanceClient.startMeasurement(R.FetchAccountIdWithNativeBroker,t.correlationId)),[4,h.getAuthCodeUrl(Q(Q({},c),{nativeBroker:u}))];case 5:return f=I.sent(),w=new Do(h,this.browserStorage,l,this.logger,this.performanceClient),C={popup:i,popupName:o,popupWindowAttributes:r},P=this.initiateAuthRequest(f,C),this.eventHandler.emitEvent(te.POPUP_OPENED,$.Popup,{popupWindow:P},null),[4,this.monitorPopupForHash(P)];case 6:if(M=I.sent(),j=de.getDeserializedHash(M),N=this.validateAndExtractStateFromHash(j,$.Popup,c.correlationId),eo.removeThrottle(this.browserStorage,this.config.auth.clientId,l),j.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),g&&g.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return T=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,j.accountId,this.nativeStorage,c.correlationId),B=Ft.parseRequestState(this.browserCrypto,N).userRequestState,[2,T.acquireToken(Q(Q({},c),{state:B,prompt:void 0})).finally(function(){J.browserStorage.cleanRequestByState(N)})]}return[4,w.handleCodeResponseFromHash(M,N,h.authority,this.networkClient)];case 7:return V=I.sent(),[2,V];case 8:throw G=I.sent(),i&&i.close(),G instanceof Y&&G.setCorrelationId(this.correlationId),s.cacheFailedRequest(G),this.browserStorage.cleanRequestByState(c.state),G;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(t,o,r,i,s,c){return z(this,void 0,void 0,function(){var l,h,u,g,f,w,C;return x(this,function(P){switch(P.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(te.LOGOUT_START,$.Popup,t),l=this.initializeServerTelemetryManager(ke.logoutPopup),P.label=1;case 1:return P.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(t.account)];case 2:return P.sent(),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(l,i)];case 3:return h=P.sent(),this.logger.verbose("Auth code client created"),u=h.getLogoutUri(t),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,$.Popup,t),g=this.openPopup(u,{popupName:o,popupWindowAttributes:r,popup:s}),this.eventHandler.emitEvent(te.POPUP_OPENED,$.Popup,{popupWindow:g},null),[4,this.waitForLogoutPopup(g)];case 4:return P.sent(),c?(f={apiId:ke.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},w=de.getAbsoluteUrl(c,Ee.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: "+w),this.navigationClient.navigateInternal(w,f)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw C=P.sent(),s&&s.close(),C instanceof Y&&C.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,$.Popup,null,C),this.eventHandler.emitEvent(te.LOGOUT_END,$.Popup),l.cacheFailedRequest(C),C;case 6:return this.eventHandler.emitEvent(te.LOGOUT_END,$.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(t,o){if(H.isEmpty(t))throw this.logger.error("Navigate url is empty"),F.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+t),this.openPopup(t,o)},e.prototype.monitorPopupForHash=function(t){var o=this;return new Promise(function(r,i){var s=o.config.system.windowHashTimeout/o.config.system.pollIntervalMilliseconds,c=0;o.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var l=setInterval(function(){if(t.closed){o.logger.error("PopupHandler.monitorPopupForHash - window closed"),o.cleanPopup(),clearInterval(l),i(F.createUserCancelledError());return}var h=b.EMPTY_STRING,u=b.EMPTY_STRING;try{h=t.location.href,u=t.location.hash}catch{}H.isEmpty(h)||h==="about:blank"||(o.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),c++,u?(o.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(l),o.cleanPopup(t),de.hashContainsKnownProperties(u)?(o.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),r(u)):(o.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."),o.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+u),i(F.createHashDoesNotContainKnownPropertiesError()))):c>s&&(o.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(l),i(F.createMonitorPopupTimeoutError())))},o.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(t){var o=this;return new Promise(function(r){o.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var i=setInterval(function(){t.closed&&(o.logger.error("PopupHandler.waitForLogoutPopup - window closed"),o.cleanPopup(),clearInterval(i),r());var s=b.EMPTY_STRING;try{s=t.location.href}catch{}H.isEmpty(s)||s==="about:blank"||(o.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(i),o.cleanPopup(t),r())},o.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(t,o){try{var r=void 0;if(o.popup?(r=o.popup,this.logger.verbosePii("Navigating popup window to: "+t),r.location.assign(t)):typeof o.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+t),r=this.openSizedPopup(t,o.popupName,o.popupWindowAttributes)),!r)throw F.createEmptyWindowCreatedError();return r.focus&&r.focus(),this.currentWindow=r,window.addEventListener("beforeunload",this.unloadWindow),r}catch(i){throw this.logger.error("error opening popup "+i.message),this.browserStorage.setInteractionInProgress(!1),F.createPopupWindowError(i.toString())}},e.prototype.openSizedPopup=function(t,o,r){var i,s,c,l,h=window.screenLeft?window.screenLeft:window.screenX,u=window.screenTop?window.screenTop:window.screenY,g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,w=(i=r.popupSize)===null||i===void 0?void 0:i.width,C=(s=r.popupSize)===null||s===void 0?void 0:s.height,P=(c=r.popupPosition)===null||c===void 0?void 0:c.top,M=(l=r.popupPosition)===null||l===void 0?void 0:l.left;return(!w||w<0||w>g)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),w=_t.POPUP_WIDTH),(!C||C<0||C>f)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),C=_t.POPUP_HEIGHT),(!P||P<0||P>f)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),P=Math.max(0,f/2-_t.POPUP_HEIGHT/2+u)),(!M||M<0||M>g)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),M=Math.max(0,g/2-_t.POPUP_WIDTH/2+h)),window.open(t,o,"width="+w+", height="+C+", top="+P+", left="+M+", scrollbars=yes")},e.prototype.unloadWindow=function(t){this.browserStorage.cleanRequestByInteractionType($.Popup),this.currentWindow&&this.currentWindow.close(),t.preventDefault()},e.prototype.cleanPopup=function(t){t&&t.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(t,o){return _t.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+t.join("-")+"."+o+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(t){var o=t.account&&t.account.homeAccountId;return _t.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+o+"."+this.correlationId},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ta=function(){function n(){}return n.prototype.navigateInternal=function(e,t){return n.defaultNavigateWindow(e,t)},n.prototype.navigateExternal=function(e,t){return n.defaultNavigateWindow(e,t)},n.defaultNavigateWindow=function(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(o){setTimeout(function(){o(!0)},t.timeout)})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Sa=6e4,jo=6e3,Ia=3e4,Aa=2e3;function Ra(n,e){var t=n.auth,o=n.cache,r=n.system,i=n.telemetry,s={clientId:b.EMPTY_STRING,authority:""+b.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:b.EMPTY_STRING,authorityMetadata:b.EMPTY_STRING,redirectUri:b.EMPTY_STRING,postLogoutRedirectUri:b.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Bn.AAD,azureCloudOptions:{azureCloudInstance:On.None,tenant:b.EMPTY_STRING},skipAuthorityMetadataCache:!1},c={cacheLocation:Ae.SessionStorage,temporaryCacheLocation:Ae.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(o&&o.cacheLocation===Ae.LocalStorage),claimsBasedCachingEnabled:!0},l={loggerCallback:function(){},logLevel:ze.Info,piiLoggingEnabled:!1},h=Q(Q({},Mr),{loggerOptions:l,networkClient:e?Ee.getBrowserNetworkClient():ma,navigationClient:new Ta,loadFrameTimeout:0,windowHashTimeout:(r==null?void 0:r.loadFrameTimeout)||Sa,iframeHashTimeout:(r==null?void 0:r.loadFrameTimeout)||jo,navigateFrameWait:e&&Ee.detectIEOrEdge()?500:0,redirectNavigationTimeout:Ia,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(r==null?void 0:r.nativeBrokerHandshakeTimeout)||Aa,pollIntervalMilliseconds:_t.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),u=Q(Q({},r),{loggerOptions:(r==null?void 0:r.loggerOptions)||l}),g={application:{appName:b.EMPTY_STRING,appVersion:b.EMPTY_STRING}},f={auth:Q(Q({},s),t),cache:Q(Q({},c),o),system:Q(Q({},h),u),telemetry:Q(Q({},g),i)};return f}/*! @azure/msal-browser v2.38.3 2023-10-27 */var Jr=function(n){xe(e,n);function e(t,o,r,i,s,c){var l=n.call(this,t,o,r,i,c)||this;return l.navigateFrameWait=s.navigateFrameWait,l.pollIntervalMilliseconds=s.pollIntervalMilliseconds,l}return e.prototype.initiateAuthRequest=function(t){return z(this,void 0,void 0,function(){return x(this,function(o){switch(o.label){case 0:if(this.performanceClient.addQueueMeasurement(R.SilentHandlerInitiateAuthRequest,this.authCodeRequest.correlationId),H.isEmpty(t))throw this.logger.info("Navigate url is empty"),F.createEmptyNavigationUriError();return this.navigateFrameWait?(this.performanceClient.setPreQueueTime(R.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),[4,this.loadFrame(t)]):[3,2];case 1:return[2,o.sent()];case 2:return[2,this.loadFrameSync(t)]}})})},e.prototype.monitorIframeForHash=function(t,o){var r=this;return this.performanceClient.addQueueMeasurement(R.SilentHandlerMonitorIframeForHash,this.authCodeRequest.correlationId),new Promise(function(i,s){o<jo&&r.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+o+"ms) than the default ("+jo+"ms). This may result in timeouts.");var c=window.performance.now(),l=c+o,h=setInterval(function(){if(window.performance.now()>l){r.removeHiddenIframe(t),clearInterval(h),s(F.createMonitorIframeTimeoutError());return}var u=b.EMPTY_STRING,g=t.contentWindow;try{u=g?g.location.href:b.EMPTY_STRING}catch{}if(!H.isEmpty(u)){var f=g?g.location.hash:b.EMPTY_STRING;if(de.hashContainsKnownProperties(f)){r.removeHiddenIframe(t),clearInterval(h),i(f);return}}},r.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(t){var o=this;return this.performanceClient.addQueueMeasurement(R.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),new Promise(function(r,i){var s=o.createHiddenIframe();setTimeout(function(){if(!s){i("Unable to load iframe");return}s.src=t,r(s)},o.navigateFrameWait)})},e.prototype.loadFrameSync=function(t){var o=this.createHiddenIframe();return o.src=t,o},e.prototype.createHiddenIframe=function(){var t=document.createElement("iframe");return t.style.visibility="hidden",t.style.position="absolute",t.style.width=t.style.height="0",t.style.border="0",t.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(t),t},e.prototype.removeHiddenIframe=function(t){document.body===t.parentNode&&document.body.removeChild(t)},e}(Do);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Na=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g,f){var w=n.call(this,t,o,r,i,s,c,h,g,f)||this;return w.apiId=l,w.nativeStorage=u,w}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c;return x(this,function(l){switch(l.label){case 0:if(this.performanceClient.addQueueMeasurement(R.SilentIframeClientAcquireToken,t.correlationId),this.logger.verbose("acquireTokenByIframe called"),o=this.performanceClient.startMeasurement(R.SilentIframeClientAcquireToken,t.correlationId),H.isEmpty(t.loginHint)&&H.isEmpty(t.sid)&&(!t.account||H.isEmpty(t.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),t.prompt&&t.prompt!==Ve.NONE&&t.prompt!==Ve.NO_SESSION)throw o.endMeasurement({success:!1}),F.createSilentPromptValueError(t.prompt);return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(Q(Q({},t),{prompt:t.prompt||Ve.NONE}),$.Silent)];case 1:r=l.sent(),this.browserStorage.updateCacheEntries(r.state,r.nonce,r.authority,r.loginHint||b.EMPTY_STRING,r.account||null),i=this.initializeServerTelemetryManager(this.apiId),l.label=2;case 2:return l.trys.push([2,5,,6]),this.performanceClient.setPreQueueTime(R.StandardInteractionClientCreateAuthCodeClient,t.correlationId),[4,this.createAuthCodeClient(i,r.authority,r.azureCloudOptions)];case 3:return s=l.sent(),this.logger.verbose("Auth code client created"),this.performanceClient.setPreQueueTime(R.SilentIframeClientTokenHelper,t.correlationId),[4,this.silentTokenHelper(s,r).then(function(h){return o.endMeasurement({success:!0,fromCache:!1,requestId:h.requestId}),h})];case 4:return[2,l.sent()];case 5:throw c=l.sent(),c instanceof Y&&c.setCorrelationId(this.correlationId),i.cacheFailedRequest(c),this.browserStorage.cleanRequestByState(r.state),o.endMeasurement({errorCode:c instanceof Y&&c.errorCode||void 0,subErrorCode:c instanceof Y&&c.subError||void 0,success:!1}),c;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(t,o){return z(this,void 0,void 0,function(){var r,i,s,c,l,h,u,g,f,w=this;return x(this,function(C){switch(C.label){case 0:return this.performanceClient.addQueueMeasurement(R.SilentIframeClientTokenHelper,o.correlationId),this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationCodeRequest,o.correlationId),[4,this.initializeAuthorizationCodeRequest(o)];case 1:return r=C.sent(),this.performanceClient.setPreQueueTime(R.GetAuthCodeUrl,o.correlationId),[4,t.getAuthCodeUrl(Q(Q({},o),{nativeBroker:ln.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,o.authenticationScheme)}))];case 2:return i=C.sent(),s=new Jr(t,this.browserStorage,r,this.logger,this.config.system,this.performanceClient),this.performanceClient.setPreQueueTime(R.SilentHandlerInitiateAuthRequest,o.correlationId),[4,s.initiateAuthRequest(i)];case 3:return c=C.sent(),this.performanceClient.setPreQueueTime(R.SilentHandlerMonitorIframeForHash,o.correlationId),[4,s.monitorIframeForHash(c,this.config.system.iframeHashTimeout)];case 4:if(l=C.sent(),h=de.getDeserializedHash(l),u=this.validateAndExtractStateFromHash(h,$.Silent,r.correlationId),h.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw F.createNativeConnectionNotEstablishedError();return g=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,h.accountId,this.browserStorage,this.correlationId),f=Ft.parseRequestState(this.browserCrypto,u).userRequestState,[2,g.acquireToken(Q(Q({},o),{state:f,prompt:o.prompt||Ve.NONE})).finally(function(){w.browserStorage.cleanRequestByState(u)})]}return this.performanceClient.setPreQueueTime(R.HandleCodeResponseFromHash,o.correlationId),[2,s.handleCodeResponseFromHash(l,u,t.authority,this.networkClient)]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Pa=function(n){xe(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l=this;return x(this,function(h){switch(h.label){case 0:return this.performanceClient.addQueueMeasurement(R.SilentRefreshClientAcquireToken,t.correlationId),this.performanceClient.setPreQueueTime(R.InitializeBaseRequest,t.correlationId),r=[Q({},t)],[4,this.initializeBaseRequest(t,t.account)];case 1:return o=Q.apply(void 0,r.concat([h.sent()])),i=this.performanceClient.startMeasurement(R.SilentRefreshClientAcquireToken,o.correlationId),s=this.initializeServerTelemetryManager(ke.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(s,o.authority,o.azureCloudOptions)];case 2:return c=h.sent(),this.logger.verbose("Refresh token client created"),this.performanceClient.setPreQueueTime(R.RefreshTokenClientAcquireTokenByRefreshToken,t.correlationId),[2,c.acquireTokenByRefreshToken(o).then(function(u){return i.endMeasurement({success:!0,fromCache:u.fromCache,requestId:u.requestId}),u}).catch(function(u){throw u instanceof Y&&u.setCorrelationId(l.correlationId),s.cacheFailedRequest(u),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(t,o,r){return z(this,void 0,void 0,function(){var i;return x(this,function(s){switch(s.label){case 0:return this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(t,o,r)];case 1:return i=s.sent(),[2,new zr(i,this.performanceClient)]}})})},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ma=function(){function n(e,t){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=t,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return n.prototype.addEventCallback=function(e){if(typeof window<"u"){var t=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(t,e),this.logger.verbose("Event callback registered with id: "+t),t}return null},n.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},n.prototype.enableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))},n.prototype.disableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))},n.prototype.emitEvent=function(e,t,o,r){var i=this;if(typeof window<"u"){var s={eventType:e,interactionType:t||null,payload:o||null,error:r||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(c,l){i.logger.verbose("Emitting event to callback "+l+": "+e),c.apply(null,[s])})}},n.prototype.handleAccountCacheChange=function(e){try{var t=e.newValue||e.oldValue;if(!t)return;var o=JSON.parse(t);if(typeof o!="object"||!Ue.isAccountEntity(o))return;var r=Je.toObject(new Ue,o),i=r.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(te.ACCOUNT_ADDED,void 0,i)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(te.ACCOUNT_REMOVED,void 0,i))}catch{return}},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ke=function(){function n(){}return n.decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Xr=function(){function n(e){this.cryptoObj=e}return n.prototype.generateGuid=function(){try{var e=new Uint8Array(16);return this.cryptoObj.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,Ke.decimalToHex(e[0])+Ke.decimalToHex(e[1])+Ke.decimalToHex(e[2])+Ke.decimalToHex(e[3])+"-"+Ke.decimalToHex(e[4])+Ke.decimalToHex(e[5])+"-"+Ke.decimalToHex(e[6])+Ke.decimalToHex(e[7])+"-"+Ke.decimalToHex(e[8])+Ke.decimalToHex(e[9])+"-"+Ke.decimalToHex(e[10])+Ke.decimalToHex(e[11])+Ke.decimalToHex(e[12])+Ke.decimalToHex(e[13])+Ke.decimalToHex(e[14])+Ke.decimalToHex(e[15])}catch{for(var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",o="0123456789abcdef",r=0,i=b.EMPTY_STRING,s=0;s<36;s++)t[s]!=="-"&&t[s]!=="4"&&(r=Math.random()*16|0),t[s]==="x"?i+=o[r]:t[s]==="y"?(r&=3,r|=8,i+=o[r]):i+=t[s];return i}},n.prototype.isGuid=function(e){var t=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return t.test(e)},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ht=function(){function n(){}return n.stringToUtf8Arr=function(e){for(var t,o=0,r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),o+=t<128?1:t<2048?2:t<65536?3:t<2097152?4:t<67108864?5:6;for(var s=new Uint8Array(o),c=0,l=0;c<o;l++)t=e.charCodeAt(l),t<128?s[c++]=t:t<2048?(s[c++]=192+(t>>>6),s[c++]=128+(t&63)):t<65536?(s[c++]=224+(t>>>12),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):t<2097152?(s[c++]=240+(t>>>18),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):t<67108864?(s[c++]=248+(t>>>24),s[c++]=128+(t>>>18&63),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63)):(s[c++]=252+(t>>>30),s[c++]=128+(t>>>24&63),s[c++]=128+(t>>>18&63),s[c++]=128+(t>>>12&63),s[c++]=128+(t>>>6&63),s[c++]=128+(t&63));return s},n.stringToArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),o=new Uint8Array(t),r=0;r<e.length;r++)o[r]=e.charCodeAt(r);return t},n.utf8ArrToString=function(e){for(var t=b.EMPTY_STRING,o=void 0,r=e.length,i=0;i<r;i++)o=e[i],t+=String.fromCharCode(o>251&&o<254&&i+5<r?(o-252)*1073741824+(e[++i]-128<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>247&&o<252&&i+4<r?(o-248<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>239&&o<248&&i+3<r?(o-240<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:o>223&&o<240&&i+2<r?(o-224<<12)+(e[++i]-128<<6)+e[++i]-128:o>191&&o<224&&i+1<r?(o-192<<6)+e[++i]-128:o);return t},n.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Zr=function(){function n(){}return n.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},n.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,b.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},n.prototype.encode=function(e){var t=Ht.stringToUtf8Arr(e);return this.base64EncArr(t)},n.prototype.base64EncArr=function(e){for(var t=(3-e.length%3)%3,o=b.EMPTY_STRING,r=void 0,i=e.length,s=0,c=0;c<i;c++)r=c%3,s|=e[c]<<(16>>>r&24),(r===2||e.length-c===1)&&(o+=String.fromCharCode(this.uint6ToB64(s>>>18&63),this.uint6ToB64(s>>>12&63),this.uint6ToB64(s>>>6&63),this.uint6ToB64(s&63)),s=0);return t===0?o:o.substring(0,o.length-t)+(t===1?"=":"==")},n.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var La=function(){function n(){}return n.prototype.decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("Invalid base64 string")}var o=this.base64DecToArr(t);return Ht.utf8ArrToString(o)},n.prototype.base64DecToArr=function(e,t){for(var o=e.replace(/[^A-Za-z0-9\+\/]/g,b.EMPTY_STRING),r=o.length,i=t?Math.ceil((r*3+1>>>2)/t)*t:r*3+1>>>2,s=new Uint8Array(i),c=void 0,l=void 0,h=0,u=0,g=0;g<r;g++)if(l=g&3,h|=this.b64ToUint6(o.charCodeAt(g))<<18-6*l,l===3||r-g===1){for(c=0;c<3&&u<i;c++,u++)s[u]=h>>>(16>>>c&24)&255;h=0}return s},n.prototype.b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Oa=32,za=function(){function n(e){this.base64Encode=new Zr,this.cryptoObj=e}return n.prototype.generateCodes=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return t=o.sent(),[2,{verifier:e,challenge:t}]}})})},n.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(Oa);this.cryptoObj.getRandomValues(e);var t=this.base64Encode.urlEncodeArr(e);return t}catch(o){throw F.createPkceNotGeneratedError(o)}},n.prototype.generateCodeChallengeFromVerifier=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return t=r.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(t))];case 2:throw o=r.sent(),F.createPkceNotGeneratedError(o);case 3:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var xa=function(){function n(){}return n.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.crypto.subtle.generateKey(e,t,o)]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,window.crypto.subtle.exportKey(Cn,e)]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){return x(this,function(i){return[2,window.crypto.subtle.importKey(Cn,e,t,o,r)]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.crypto.subtle.sign(e,t,o)]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,window.crypto.subtle.digest(e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ba=function(){function n(){}return n.prototype.initPrng=function(e){return window.msrCrypto.initPrng(Eo(e))},n.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.msrCrypto.subtle.generateKey(e,t,o)]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,window.msrCrypto.subtle.exportKey(Cn,e)]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){return x(this,function(i){return[2,window.msrCrypto.subtle.importKey(Cn,e,t,o,r)]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,window.msrCrypto.subtle.sign(e,t,o)]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,window.msrCrypto.subtle.digest(e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ua=function(){function n(){}return n.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},n.prototype.generateKey=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,new Promise(function(i,s){var c=window.msCrypto.subtle.generateKey(e,t,o);c.addEventListener("complete",function(l){i(l.target.result)}),c.addEventListener("error",function(l){s(l)})})]})})},n.prototype.exportKey=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,new Promise(function(o,r){var i=window.msCrypto.subtle.exportKey(Cn,e);i.addEventListener("complete",function(s){var c=s.target.result,l=Ht.utf8ArrToString(new Uint8Array(c)).replace(/\r/g,b.EMPTY_STRING).replace(/\n/g,b.EMPTY_STRING).replace(/\t/g,b.EMPTY_STRING).split(" ").join(b.EMPTY_STRING).replace("\0",b.EMPTY_STRING);try{o(JSON.parse(l))}catch(h){r(h)}}),i.addEventListener("error",function(s){r(s)})})]})})},n.prototype.importKey=function(e,t,o,r){return z(this,void 0,void 0,function(){var i,s;return x(this,function(c){return i=Ht.getSortedObjectString(e),s=Ht.stringToArrayBuffer(i),[2,new Promise(function(l,h){var u=window.msCrypto.subtle.importKey(Cn,s,t,o,r);u.addEventListener("complete",function(g){l(g.target.result)}),u.addEventListener("error",function(g){h(g)})})]})})},n.prototype.sign=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,new Promise(function(i,s){var c=window.msCrypto.subtle.sign(e,t,o);c.addEventListener("complete",function(l){i(l.target.result)}),c.addEventListener("error",function(l){s(l)})})]})})},n.prototype.digest=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,new Promise(function(r,i){var s=window.msCrypto.subtle.digest(e,t.buffer);s.addEventListener("complete",function(c){r(c.target.result)}),s.addEventListener("error",function(c){i(c)})})]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Da="RSASSA-PKCS1-v1_5",ei="SHA-256",ja=2048,qa=new Uint8Array([1,0,1]),ti=function(){function n(e,t){var o,r;if(this.logger=e,this.cryptoOptions=t,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new xa;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new Ua;else if(this.hasMsrCrypto()&&(!((o=this.cryptoOptions)===null||o===void 0)&&o.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new Ba;else throw this.hasMsrCrypto()&&this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"),this.logger.error("BrowserCrypto: No crypto interfaces available."),F.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((r=this.cryptoOptions)===null||r===void 0)&&r.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),ao.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:Da,hash:ei,modulusLength:ja,publicExponent:qa}}return n.prototype.hasIECrypto=function(){return"msCrypto"in window},n.prototype.hasBrowserCrypto=function(){return"crypto"in window},n.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},n.prototype.sha256Digest=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return t=Ht.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:ei},t)]})})},n.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},n.prototype.generateKeyPair=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,t)]})})},n.prototype.exportJwk=function(e){return z(this,void 0,void 0,function(){return x(this,function(t){return[2,this.subtleCrypto.exportKey(e)]})})},n.prototype.importJwk=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,t,o)]})})},n.prototype.sign=function(e,t){return z(this,void 0,void 0,function(){return x(this,function(o){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,t)]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Fa=function(){function n(){this.dbName=zo,this.version=ya,this.tableName=va,this.dbOpen=!1}return n.prototype.open=function(){return z(this,void 0,void 0,function(){var e=this;return x(this,function(t){return[2,new Promise(function(o,r){var i=window.indexedDB.open(e.dbName,e.version);i.addEventListener("upgradeneeded",function(s){var c=s;c.target.result.createObjectStore(e.tableName)}),i.addEventListener("success",function(s){var c=s;e.db=c.target.result,e.dbOpen=!0,o()}),i.addEventListener("error",function(){return r(F.createDatabaseUnavailableError())})})]})})},n.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},n.prototype.validateDbIsOpen=function(){return z(this,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return this.dbOpen?[3,2]:[4,this.open()];case 1:return[2,e.sent()];case 2:return[2]}})})},n.prototype.getItem=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readonly"),c=s.objectStore(t.tableName),l=c.get(e);l.addEventListener("success",function(h){var u=h;t.closeConnection(),r(u.target.result)}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.setItem=function(e,t){return z(this,void 0,void 0,function(){var o=this;return x(this,function(r){switch(r.label){case 0:return[4,this.validateDbIsOpen()];case 1:return r.sent(),[2,new Promise(function(i,s){if(!o.db)return s(F.createDatabaseNotOpenError());var c=o.db.transaction([o.tableName],"readwrite"),l=c.objectStore(o.tableName),h=l.put(t,e);h.addEventListener("success",function(){o.closeConnection(),i()}),h.addEventListener("error",function(u){o.closeConnection(),s(u)})})]}})})},n.prototype.removeItem=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readwrite"),c=s.objectStore(t.tableName),l=c.delete(e);l.addEventListener("success",function(){t.closeConnection(),r()}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.getKeys=function(){return z(this,void 0,void 0,function(){var e=this;return x(this,function(t){switch(t.label){case 0:return[4,this.validateDbIsOpen()];case 1:return t.sent(),[2,new Promise(function(o,r){if(!e.db)return r(F.createDatabaseNotOpenError());var i=e.db.transaction([e.tableName],"readonly"),s=i.objectStore(e.tableName),c=s.getAllKeys();c.addEventListener("success",function(l){var h=l;e.closeConnection(),o(h.target.result)}),c.addEventListener("error",function(l){e.closeConnection(),r(l)})})]}})})},n.prototype.containsKey=function(e){return z(this,void 0,void 0,function(){var t=this;return x(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(r,i){if(!t.db)return i(F.createDatabaseNotOpenError());var s=t.db.transaction([t.tableName],"readonly"),c=s.objectStore(t.tableName),l=c.count(e);l.addEventListener("success",function(h){var u=h;t.closeConnection(),r(u.target.result===1)}),l.addEventListener("error",function(h){t.closeConnection(),i(h)})})]}})})},n.prototype.deleteDatabase=function(){return z(this,void 0,void 0,function(){return x(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(t,o){var r=window.indexedDB.deleteDatabase(zo);r.addEventListener("success",function(){return t(!0)}),r.addEventListener("blocked",function(){return t(!0)}),r.addEventListener("error",function(){return o(!1)})})]})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ni=function(){function n(e,t){this.inMemoryCache=new xo,this.indexedDBCache=new Fa,this.logger=e,this.storeName=t}return n.prototype.handleDatabaseAccessError=function(e){if(e instanceof F&&e.errorCode===U.databaseUnavailable.code)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e},n.prototype.getItem=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:if(t=this.inMemoryCache.getItem(e),t)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.getItem(e)];case 2:return[2,r.sent()];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2,t]}})})},n.prototype.setItem=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(r.label){case 0:this.inMemoryCache.setItem(e,t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,t)];case 2:return r.sent(),[3,4];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2]}})})},n.prototype.removeItem=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:this.inMemoryCache.removeItem(e),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.indexedDBCache.removeItem(e)];case 2:return o.sent(),[3,4];case 3:return t=o.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2]}})})},n.prototype.getKeys=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),this.logger.verbose("In-memory cache is empty, now querying persistent storage."),[4,this.indexedDBCache.getKeys()];case 2:return[2,o.sent()];case 3:return t=o.sent(),this.handleDatabaseAccessError(t),[3,4];case 4:return[2,e]}})})},n.prototype.containsKey=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:if(t=this.inMemoryCache.containsKey(e),t)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.containsKey(e)];case 2:return[2,r.sent()];case 3:return o=r.sent(),this.handleDatabaseAccessError(o),[3,4];case 4:return[2,t]}})})},n.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},n.prototype.clearPersistent=function(){return z(this,void 0,void 0,function(){var e,t;return x(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.logger.verbose("Deleting persistent keystore"),[4,this.indexedDBCache.deleteDatabase()];case 1:return e=o.sent(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return t=o.sent(),this.handleDatabaseAccessError(t),[2,!1];case 3:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var so;(function(n){n.asymmetricKeys="asymmetricKeys",n.symmetricKeys="symmetricKeys"})(so||(so={}));var Va=function(){function n(e){this.logger=e,this.asymmetricKeys=new ni(this.logger,so.asymmetricKeys),this.symmetricKeys=new ni(this.logger,so.symmetricKeys)}return n.prototype.clear=function(){return z(this,void 0,void 0,function(){var e;return x(this,function(t){switch(t.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return t.sent(),[2,!0];case 3:return e=t.sent(),e instanceof Error?this.logger.error("Clearing keystore failed with error: "+e.message):this.logger.error("Clearing keystore failed with unknown error"),[2,!1];case 4:return[2]}})})},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ha=function(){function n(e,t,o){this.logger=e,this.browserCrypto=new ti(this.logger,o),this.b64Encode=new Zr,this.b64Decode=new La,this.guidGenerator=new Xr(this.browserCrypto),this.pkceGenerator=new za(this.browserCrypto),this.cache=new Va(this.logger),this.performanceClient=t}return n.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},n.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},n.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},n.prototype.generatePkceCodes=function(){return z(this,void 0,void 0,function(){return x(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},n.prototype.getPublicKeyThumbprint=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u;return x(this,function(g){switch(g.label){case 0:return o=(t=this.performanceClient)===null||t===void 0?void 0:t.startMeasurement(R.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(n.EXTRACTABLE,n.POP_KEY_USAGES)];case 1:return r=g.sent(),[4,this.browserCrypto.exportJwk(r.publicKey)];case 2:return i=g.sent(),s={e:i.e,kty:i.kty,n:i.n},c=Ht.getSortedObjectString(s),[4,this.hashString(c)];case 3:return l=g.sent(),[4,this.browserCrypto.exportJwk(r.privateKey)];case 4:return h=g.sent(),[4,this.browserCrypto.importJwk(h,!1,["sign"])];case 5:return u=g.sent(),[4,this.cache.asymmetricKeys.setItem(l,{privateKey:u,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return g.sent(),o&&o.endMeasurement({success:!0}),[2,l]}})})},n.prototype.removeTokenBindingKey=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){switch(o.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return o.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return t=o.sent(),[2,!t]}})})},n.prototype.clearKeystore=function(){return z(this,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},n.prototype.signJwt=function(e,t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l,h,u,g,f,w,C,P,M,j;return x(this,function(N){switch(N.label){case 0:return i=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(R.CryptoOptsSignJwt,o),[4,this.cache.asymmetricKeys.getItem(t)];case 1:if(s=N.sent(),!s)throw F.createSigningKeyNotFoundInStorageError(t);return[4,this.browserCrypto.exportJwk(s.publicKey)];case 2:return c=N.sent(),l=Ht.getSortedObjectString(c),h=this.b64Encode.urlEncode(JSON.stringify({kid:t})),u=fa.getShrHeaderString({kid:h,alg:c.alg}),g=this.b64Encode.urlEncode(u),e.cnf={jwk:JSON.parse(l)},f=this.b64Encode.urlEncode(JSON.stringify(e)),w=g+"."+f,C=Ht.stringToArrayBuffer(w),[4,this.browserCrypto.sign(s.privateKey,C)];case 3:return P=N.sent(),M=this.b64Encode.urlEncodeArr(new Uint8Array(P)),j=w+"."+M,i&&i.endMeasurement({success:!0}),[2,j]}})})},n.prototype.hashString=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){switch(r.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return t=r.sent(),o=new Uint8Array(t),[2,this.b64Encode.urlEncodeArr(o)]}})})},n.POP_KEY_USAGES=["sign","verify"],n.EXTRACTABLE=!0,n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var oi=function(){function n(e,t){this.correlationId=t,this.measureName=n.makeMeasureName(e,t),this.startMark=n.makeStartMark(e,t),this.endMark=n.makeEndMark(e,t)}return n.makeMeasureName=function(e,t){return"msal.measure."+e+"."+t},n.makeStartMark=function(e,t){return"msal.start."+e+"."+t},n.makeEndMark=function(e,t){return"msal.end."+e+"."+t},n.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},n.flushMeasurements=function(e,t){if(n.supportsBrowserPerformance())try{t.forEach(function(o){var r=n.makeMeasureName(o.name,e),i=window.performance.getEntriesByName(r,"measure");i.length>0&&(window.performance.clearMeasures(r),window.performance.clearMarks(n.makeStartMark(r,e)),window.performance.clearMarks(n.makeEndMark(r,e)))})}catch{}},n.prototype.startMeasurement=function(){if(n.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},n.prototype.endMeasurement=function(){if(n.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},n.prototype.flushMeasurement=function(){if(n.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var t=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),t}}catch{}return null},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ka=function(n){xe(e,n);function e(t,o,r,i,s,c,l){var h=n.call(this,t,o,r,i,s,c)||this;return h.browserCrypto=new ti(h.logger,l),h.guidGenerator=new Xr(h.browserCrypto),h}return e.prototype.startPerformanceMeasuremeant=function(t,o){return new oi(t,o)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var t;return((t=document.visibilityState)===null||t===void 0?void 0:t.toString())||null},e.prototype.deleteIncompleteSubMeasurements=function(t){var o=this.eventsByCorrelationId.get(t.event.correlationId),r=o&&o.eventId===t.event.eventId,i=[];r&&(o!=null&&o.incompleteSubMeasurements)&&o.incompleteSubMeasurements.forEach(function(s){i.push(Q({},s))}),i.length>0&&oi.flushMeasurements(t.event.correlationId,i)},e.prototype.supportsBrowserPerformanceNow=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.now=="function"},e.prototype.startMeasurement=function(t,o){var r=this,i=this.getPageVisibility(),s=n.prototype.startMeasurement.call(this,t,o);return Q(Q({},s),{endMeasurement:function(c){var l=s.endMeasurement(Q({startPageVisibility:i,endPageVisibility:r.getPageVisibility()},c));return r.deleteIncompleteSubMeasurements(s),l},discardMeasurement:function(){s.discardMeasurement(),r.deleteIncompleteSubMeasurements(s),s.measurement.flushMeasurement()}})},e.prototype.setPreQueueTime=function(t,o){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for "+t);return}if(!o){this.logger.trace("BrowserPerformanceClient: correlationId for "+t+" not provided, unable to set telemetry queue time");return}var r=this.preQueueTimeByCorrelationId.get(o);r&&(this.logger.trace("BrowserPerformanceClient: Incomplete pre-queue "+r.name+" found",o),this.addQueueMeasurement(r.name,o,void 0,!0)),this.preQueueTimeByCorrelationId.set(o,{name:t,time:window.performance.now()})},e.prototype.addQueueMeasurement=function(t,o,r,i){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to add queue measurement for "+t);return}if(!o){this.logger.trace("BrowserPerformanceClient: correlationId for "+t+" not provided, unable to add queue measurement");return}var s=n.prototype.getPreQueueTime.call(this,t,o);if(s){var c=window.performance.now(),l=r||n.prototype.calculateQueuedTime.call(this,s,c);return n.prototype.addQueueMeasurement.call(this,t,o,l,i)}},e}(qr);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ga=function(){function n(e,t,o,r){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=o,this.cryptoObj=r}return n.prototype.loadExternalTokens=function(e,t,o){if(this.logger.info("TokenCache - loadExternalTokens called"),!t.id_token)throw F.createUnableToLoadTokenError("Please ensure server response includes id token.");var r=new It(t.id_token,this.cryptoObj),i,s;if(e.account){var c=this.loadAccount(r,e.account.environment,void 0,void 0,e.account.homeAccountId);i=new xn(c,this.loadIdToken(r,c.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,t,c.homeAccountId,e.account.environment,e.account.tenantId,o),this.loadRefreshToken(e,t,c.homeAccountId,e.account.environment))}else if(e.authority){var l=Un.generateAuthority(e.authority,e.azureCloudOptions),h={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};if(s=new Un(l,this.config.system.networkClient,this.storage,h,this.logger),o.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var c=this.loadAccount(r,s.hostnameAndPort,o.clientInfo,s.authorityType);i=new xn(c,this.loadIdToken(r,c.homeAccountId,s.hostnameAndPort,s.tenant),this.loadAccessToken(e,t,c.homeAccountId,s.hostnameAndPort,s.tenant,o),this.loadRefreshToken(e,t,c.homeAccountId,s.hostnameAndPort))}else if(t.client_info){this.logger.trace("TokenCache - homeAccountId from response");var c=this.loadAccount(r,s.hostnameAndPort,t.client_info,s.authorityType);i=new xn(c,this.loadIdToken(r,c.homeAccountId,s.hostnameAndPort,s.tenant),this.loadAccessToken(e,t,c.homeAccountId,s.hostnameAndPort,s.tenant,o),this.loadRefreshToken(e,t,c.homeAccountId,s.hostnameAndPort))}else throw F.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw F.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,r,i,s)},n.prototype.loadAccount=function(e,t,o,r,i){var s;if(i?s=i:r!==void 0&&o&&(s=Ue.generateHomeAccountId(o,r,this.logger,this.cryptoObj,e)),!s)throw F.createUnableToLoadTokenError("Unexpected missing homeAccountId");var c=o?Ue.createAccount(o,s,e,void 0,void 0,void 0,t):Ue.createGenericAccount(s,e,void 0,void 0,void 0,t);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(c),c;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadIdToken=function(e,t,o,r){var i=sn.createIdTokenEntity(t,o,e.rawToken,this.config.auth.clientId,r);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(i),i;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadAccessToken=function(e,t,o,r,i,s){if(!t.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!t.expires_in)throw F.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!s.extendedExpiresOn)throw F.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var c=new He(e.scopes).printScopes(),l=s.expiresOn||t.expires_in+new Date().getTime()/1e3,h=s.extendedExpiresOn,u=cn.createAccessTokenEntity(o,r,t.access_token,this.config.auth.clientId,i,c,l,h,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(u),u;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.loadRefreshToken=function(e,t,o,r){if(!t.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var i=vn.createRefreshTokenEntity(o,r,t.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(i),i;throw F.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},n.prototype.generateAuthenticationResult=function(e,t,o,r){var i,s,c,l=b.EMPTY_STRING,h=[],u=null,g;o!=null&&o.accessToken&&(l=o.accessToken.secret,h=He.fromString(o.accessToken.target).asArray(),u=new Date(Number(o.accessToken.expiresOn)*1e3),g=new Date(Number(o.accessToken.extendedExpiresOn)*1e3));var f=(t==null?void 0:t.claims.oid)||(t==null?void 0:t.claims.sub)||b.EMPTY_STRING,w=(t==null?void 0:t.claims.tid)||b.EMPTY_STRING;return{authority:r?r.canonicalAuthority:b.EMPTY_STRING,uniqueId:f,tenantId:w,scopes:h,account:o!=null&&o.account?o.account.getAccountInfo():null,idToken:t?t.rawToken:b.EMPTY_STRING,idTokenClaims:t?t.claims:{},accessToken:l,fromCache:!0,expiresOn:u,correlationId:e.correlationId||b.EMPTY_STRING,requestId:b.EMPTY_STRING,extExpiresOn:g,familyId:b.EMPTY_STRING,tokenType:((i=o==null?void 0:o.accessToken)===null||i===void 0?void 0:i.tokenType)||b.EMPTY_STRING,state:b.EMPTY_STRING,cloudGraphHostName:((s=o==null?void 0:o.account)===null||s===void 0?void 0:s.cloudGraphHostName)||b.EMPTY_STRING,msGraphHost:((c=o==null?void 0:o.account)===null||c===void 0?void 0:c.msGraphHost)||b.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var $a=function(n){xe(e,n);function e(t){var o=n.call(this,t)||this;return o.includeRedirectUri=!1,o}return e}(Or);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Qa=function(n){xe(e,n);function e(t,o,r,i,s,c,l,h,u,g){var f=n.call(this,t,o,r,i,s,c,h,u,g)||this;return f.apiId=l,f}return e.prototype.acquireToken=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h;return x(this,function(u){switch(u.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!t.code)throw F.createAuthCodeRequiredError();return this.performanceClient.setPreQueueTime(R.StandardInteractionClientInitializeAuthorizationRequest,t.correlationId),[4,this.initializeAuthorizationRequest(t,$.Silent)];case 1:o=u.sent(),this.browserStorage.updateCacheEntries(o.state,o.nonce,o.authority,o.loginHint||b.EMPTY_STRING,o.account||null),r=this.initializeServerTelemetryManager(this.apiId),u.label=2;case 2:return u.trys.push([2,4,,5]),i=Q(Q({},o),{code:t.code}),this.performanceClient.setPreQueueTime(R.StandardInteractionClientGetClientConfiguration,t.correlationId),[4,this.getClientConfiguration(r,o.authority)];case 3:return s=u.sent(),c=new $a(s),this.logger.verbose("Auth code client created"),l=new Jr(c,this.browserStorage,i,this.logger,this.config.system,this.performanceClient),[2,l.handleCodeResponseFromServer({code:t.code,msgraph_host:t.msGraphHost,cloud_graph_host_name:t.cloudGraphHostName,cloud_instance_host_name:t.cloudInstanceHostName},o.state,c.authority,this.networkClient,!1)];case 4:throw h=u.sent(),h instanceof Y&&h.setCorrelationId(this.correlationId),r.cacheFailedRequest(h),this.browserStorage.cleanRequestByState(o.state),h;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(F.createSilentLogoutUnsupportedError())},e}(En);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wa=function(){function n(e){this.isBrowserEnvironment=typeof window<"u",this.config=Ra(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new Ao(this.config.system.loggerOptions,Uo,jn),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.isBrowserEnvironment?new Ka(this.config.auth.clientId,this.config.auth.authority,this.logger,Uo,jn,this.config.telemetry.application,this.config.system.cryptoOptions):new _a(this.config.auth.clientId,this.config.auth.authority,this.logger,Uo,jn,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new Ha(this.logger,this.performanceClient,this.config.system.cryptoOptions):Xn,this.eventHandler=new Ma(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new Bo(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):ba(this.config.auth.clientId,this.logger);var t={cacheLocation:Ae.MemoryStorage,temporaryCacheLocation:Ae.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};this.nativeInternalStorage=new Bo(this.config.auth.clientId,t,this.browserCrypto,this.logger),this.tokenCache=new Ga(this.config,this.browserStorage,this.logger,this.browserCrypto),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}return n.prototype.initialize=function(){return z(this,void 0,void 0,function(){var e,t,o,r,i;return x(this,function(s){switch(s.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(e=this.config.system.allowNativeBroker,t=this.performanceClient.startMeasurement(R.InitializeClientApplication),this.eventHandler.emitEvent(te.INITIALIZE_START),!e)return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),o=this,[4,ln.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)];case 2:return o.nativeExtensionProvider=s.sent(),[3,4];case 3:return r=s.sent(),this.logger.verbose(r),[3,4];case 4:return this.config.cache.claimsBasedCachingEnabled?[3,6]:(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),i=this.performanceClient.startMeasurement(R.ClearTokensAndKeysWithClaims),[4,this.browserStorage.clearTokensAndKeysWithClaims()]);case 5:s.sent(),i.endMeasurement({success:!0}),s.label=6;case 6:return this.initialized=!0,this.eventHandler.emitEvent(te.INITIALIZE_END),t.endMeasurement({allowNativeBroker:e,success:!0}),[2]}})})},n.prototype.handleRedirectPromise=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s,c,l,h,u=this;return x(this,function(g){return this.logger.verbose("handleRedirectPromise called"),Ee.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),t=this.getAllAccounts(),this.isBrowserEnvironment?(o=e||b.EMPTY_STRING,r=this.redirectResponse.get(o),typeof r>"u"?(this.eventHandler.emitEvent(te.HANDLE_REDIRECT_START,$.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),i=this.browserStorage.getCachedNativeRequest(),s=void 0,i&&ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),c=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,i.accountId,this.nativeInternalStorage,i.correlationId),s=c.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),l=this.browserStorage.getTemporaryCache(ue.CORRELATION_ID,!0)||b.EMPTY_STRING,h=this.createRedirectClient(l),s=h.handleRedirectPromise(e)),r=s.then(function(f){if(f){var w=t.length<u.getAllAccounts().length;w?(u.eventHandler.emitEvent(te.LOGIN_SUCCESS,$.Redirect,f),u.logger.verbose("handleRedirectResponse returned result, login success")):(u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Redirect,f),u.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return u.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,$.Redirect),f}).catch(function(f){throw t.length>0?u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Redirect,null,f):u.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Redirect,null,f),u.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,$.Redirect),f}),this.redirectResponse.set(o,r)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,r]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},n.prototype.acquireTokenRedirect=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s,c=this;return x(this,function(l){return t=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",t),this.preflightBrowserEnvironmentCheck($.Redirect),o=this.getAllAccounts().length>0,o?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Redirect,e):this.eventHandler.emitEvent(te.LOGIN_START,$.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(i=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),r=i.acquireTokenRedirect(e).catch(function(h){if(h instanceof Nt&&h.isFatal()){c.nativeExtensionProvider=void 0;var u=c.createRedirectClient(e.correlationId);return u.acquireToken(e)}else if(h instanceof gt){c.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var u=c.createRedirectClient(e.correlationId);return u.acquireToken(e)}throw c.browserStorage.setInteractionInProgress(!1),h})):(s=this.createRedirectClient(e.correlationId),r=s.acquireToken(e)),[2,r.catch(function(h){throw o?c.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Redirect,null,h):c.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Redirect,null,h),h})]})})},n.prototype.acquireTokenPopup=function(e){var t=this,o=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(R.AcquireTokenPopup,o);try{this.logger.verbose("acquireTokenPopup called",o),this.preflightBrowserEnvironmentCheck($.Popup)}catch(l){return Promise.reject(l)}var i=this.getAllAccounts();i.length>0?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Popup,e):this.eventHandler.emitEvent(te.LOGIN_START,$.Popup,e);var s;if(this.canUseNative(e))s=this.acquireTokenNative(e,ke.acquireTokenPopup).then(function(l){return t.browserStorage.setInteractionInProgress(!1),r.endMeasurement({success:!0,isNativeBroker:!0,requestId:l.requestId}),l}).catch(function(l){if(l instanceof Nt&&l.isFatal()){t.nativeExtensionProvider=void 0;var h=t.createPopupClient(e.correlationId);return h.acquireToken(e)}else if(l instanceof gt){t.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var h=t.createPopupClient(e.correlationId);return h.acquireToken(e)}throw t.browserStorage.setInteractionInProgress(!1),l});else{var c=this.createPopupClient(e.correlationId);s=c.acquireToken(e)}return s.then(function(l){var h=i.length<t.getAllAccounts().length;return h?t.eventHandler.emitEvent(te.LOGIN_SUCCESS,$.Popup,l):t.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Popup,l),r.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),r.endMeasurement({success:!0,requestId:l.requestId}),l}).catch(function(l){return i.length>0?t.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Popup,null,l):t.eventHandler.emitEvent(te.LOGIN_FAILURE,$.Popup,null,l),r.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),Promise.reject(l)})},n.prototype.trackPageVisibilityWithMeasurement=function(){var e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))},n.prototype.ssoSilent=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i,s,c=this;return x(this,function(l){return o=this.getRequestCorrelationId(e),r=Q(Q({},e),{prompt:e.prompt,correlationId:o}),this.preflightBrowserEnvironmentCheck($.Silent),this.ssoSilentMeasurement=this.performanceClient.startMeasurement(R.SsoSilent,o),(t=this.ssoSilentMeasurement)===null||t===void 0||t.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",o),this.eventHandler.emitEvent(te.SSO_SILENT_START,$.Silent,r),this.canUseNative(r)?i=this.acquireTokenNative(r,ke.ssoSilent).catch(function(h){if(h instanceof Nt&&h.isFatal()){c.nativeExtensionProvider=void 0;var u=c.createSilentIframeClient(r.correlationId);return u.acquireToken(r)}throw h}):(s=this.createSilentIframeClient(r.correlationId),i=s.acquireToken(r)),[2,i.then(function(h){var u,g;return c.eventHandler.emitEvent(te.SSO_SILENT_SUCCESS,$.Silent,h),(u=c.ssoSilentMeasurement)===null||u===void 0||u.addStaticFields({accessTokenSize:h.accessToken.length,idTokenSize:h.idToken.length}),(g=c.ssoSilentMeasurement)===null||g===void 0||g.endMeasurement({success:!0,isNativeBroker:h.fromNativeBroker,requestId:h.requestId}),h}).catch(function(h){var u;throw c.eventHandler.emitEvent(te.SSO_SILENT_FAILURE,$.Silent,null,h),(u=c.ssoSilentMeasurement)===null||u===void 0||u.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h}).finally(function(){document.removeEventListener("visibilitychange",c.trackPageVisibilityWithMeasurement)})]})})},n.prototype.acquireTokenByCode=function(e){return z(this,void 0,void 0,function(){var t,o,r,i,s=this;return x(this,function(c){t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck($.Silent),this.logger.trace("acquireTokenByCode called",t),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_START,$.Silent,e),o=this.performanceClient.startMeasurement(R.AcquireTokenByCode,e.correlationId);try{if(e.code&&e.nativeAccountId)throw F.createSpaCodeAndNativeAccountIdPresentError();if(e.code)return r=e.code,i=this.hybridAuthCodeResponses.get(r),i?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),o.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),i=this.acquireTokenByCodeAsync(Q(Q({},e),{correlationId:t})).then(function(l){return s.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_SUCCESS,$.Silent,l),s.hybridAuthCodeResponses.delete(r),o.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),o.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),l}).catch(function(l){throw s.hybridAuthCodeResponses.delete(r),s.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,$.Silent,null,l),o.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l}),this.hybridAuthCodeResponses.set(r,i)),[2,i];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,ke.acquireTokenByCode,e.nativeAccountId).catch(function(l){throw l instanceof Nt&&l.isFatal()&&(s.nativeExtensionProvider=void 0),l})];throw F.createUnableToAcquireTokenFromNativePlatformError()}else throw F.createAuthCodeOrNativeAccountIdRequiredError()}catch(l){throw this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,$.Silent,null,l),o.endMeasurement({errorCode:l instanceof Y&&l.errorCode||void 0,subErrorCode:l instanceof Y&&l.subError||void 0,success:!1}),l}return[2]})})},n.prototype.acquireTokenByCodeAsync=function(e){var t;return z(this,void 0,void 0,function(){var o,r,i=this;return x(this,function(s){switch(s.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(R.AcquireTokenByCodeAsync,e.correlationId),(t=this.acquireTokenByCodeAsyncMeasurement)===null||t===void 0||t.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),o=this.createSilentAuthCodeClient(e.correlationId),[4,o.acquireToken(e).then(function(c){var l;return(l=i.acquireTokenByCodeAsyncMeasurement)===null||l===void 0||l.endMeasurement({success:!0,fromCache:c.fromCache,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),c}).catch(function(c){var l;throw(l=i.acquireTokenByCodeAsyncMeasurement)===null||l===void 0||l.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),c}).finally(function(){document.removeEventListener("visibilitychange",i.trackPageVisibilityWithMeasurement)})];case 1:return r=s.sent(),[2,r]}})})},n.prototype.acquireTokenFromCache=function(e,t,o){return z(this,void 0,void 0,function(){return x(this,function(r){switch(this.performanceClient.addQueueMeasurement(R.AcquireTokenFromCache,t.correlationId),o.cacheLookupPolicy){case Xe.Default:case Xe.AccessToken:case Xe.AccessTokenAndRefreshToken:return[2,e.acquireToken(t)];default:throw K.createRefreshRequiredError()}return[2]})})},n.prototype.acquireTokenByRefreshToken=function(e,t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){switch(this.performanceClient.addQueueMeasurement(R.AcquireTokenByRefreshToken,e.correlationId),t.cacheLookupPolicy){case Xe.Default:case Xe.AccessTokenAndRefreshToken:case Xe.RefreshToken:case Xe.RefreshTokenAndNetwork:return o=this.createSilentRefreshClient(e.correlationId),this.performanceClient.setPreQueueTime(R.SilentRefreshClientAcquireToken,e.correlationId),[2,o.acquireToken(e)];default:throw K.createRefreshRequiredError()}return[2]})})},n.prototype.acquireTokenBySilentIframe=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return this.performanceClient.addQueueMeasurement(R.AcquireTokenBySilentIframe,e.correlationId),t=this.createSilentIframeClient(e.correlationId),this.performanceClient.setPreQueueTime(R.SilentIframeClientAcquireToken,e.correlationId),[2,t.acquireToken(e)]})})},n.prototype.logout=function(e){return z(this,void 0,void 0,function(){var t;return x(this,function(o){return t=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),[2,this.logoutRedirect(Q({correlationId:t},e))]})})},n.prototype.logoutRedirect=function(e){return z(this,void 0,void 0,function(){var t,o;return x(this,function(r){return t=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck($.Redirect),o=this.createRedirectClient(t),[2,o.logout(e)]})})},n.prototype.logoutPopup=function(e){try{var t=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck($.Popup);var o=this.createPopupClient(t);return o.logout(e)}catch(r){return Promise.reject(r)}},n.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},n.prototype.getAccountByUsername=function(e){if(this.logger.trace("getAccountByUsername called"),!e)return this.logger.warning("getAccountByUsername: No username provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({username:e});return t?(this.logger.verbose("getAccountByUsername: Account matching username found, returning"),this.logger.verbosePii("getAccountByUsername: Returning signed-in accounts matching username: "+e),t):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},n.prototype.getAccountByHomeId=function(e){if(this.logger.trace("getAccountByHomeId called"),!e)return this.logger.warning("getAccountByHomeId: No homeAccountId provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({homeAccountId:e});return t?(this.logger.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),this.logger.verbosePii("getAccountByHomeId: Returning signed-in accounts matching homeAccountId: "+e),t):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},n.prototype.getAccountByLocalId=function(e){if(this.logger.trace("getAccountByLocalId called"),!e)return this.logger.warning("getAccountByLocalId: No localAccountId provided"),null;var t=this.browserStorage.getAccountInfoFilteredBy({localAccountId:e});return t?(this.logger.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),this.logger.verbosePii("getAccountByLocalId: Returning signed-in accounts matching localAccountId: "+e),t):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},n.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},n.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},n.prototype.preflightBrowserEnvironmentCheck=function(e,t){if(t===void 0&&(t=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),Ee.blockNonBrowserEnvironment(this.isBrowserEnvironment),Ee.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),Ee.blockReloadInHiddenIframes(),Ee.blockAcquireTokenInPopups(),Ee.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===$.Redirect&&this.config.cache.cacheLocation===Ae.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw ao.createInMemoryRedirectUnavailableError();(e===$.Redirect||e===$.Popup)&&this.preflightInteractiveRequest(t)},n.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),Ee.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},n.prototype.acquireTokenNative=function(e,t,o){return z(this,void 0,void 0,function(){var r;return x(this,function(i){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw F.createNativeConnectionNotEstablishedError();return r=new Tn(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,o||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,r.acquireToken(e)]})})},n.prototype.canUseNative=function(e,t){if(this.logger.trace("canUseNative called"),!ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case Ve.NONE:case Ve.CONSENT:case Ve.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = "+e.prompt+" is not compatible with native flow, returning false"),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},n.prototype.getNativeAccountId=function(e){var t=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return t&&t.nativeAccountId||""},n.prototype.createPopupClient=function(e){return new Ea(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createRedirectClient=function(e){return new Ca(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createSilentIframeClient=function(e){return new Na(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},n.prototype.createSilentCacheClient=function(e){return new Yr(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.createSilentRefreshClient=function(e){return new Pa(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.createSilentAuthCodeClient=function(e){return new Qa(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ke.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},n.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},n.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},n.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},n.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},n.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},n.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},n.prototype.getTokenCache=function(){return this.tokenCache},n.prototype.getLogger=function(){return this.logger},n.prototype.setLogger=function(e){this.logger=e},n.prototype.initializeWrapperLibrary=function(e,t){this.browserStorage.setWrapperMetadata(e,t)},n.prototype.setNavigationClient=function(e){this.navigationClient=e},n.prototype.getConfiguration=function(){return this.config},n.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():b.EMPTY_STRING},n}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ya=function(n){xe(e,n);function e(t){var o=n.call(this,t)||this;return o.astsAsyncMeasurement=void 0,o.activeSilentTokenRequests=new Map,o.trackPageVisibility=o.trackPageVisibility.bind(o),o}return e.prototype.loginRedirect=function(t){return z(this,void 0,void 0,function(){var o;return x(this,function(r){return o=this.getRequestCorrelationId(t),this.logger.verbose("loginRedirect called",o),[2,this.acquireTokenRedirect(Q({correlationId:o},t||Hr))]})})},e.prototype.loginPopup=function(t){var o=this.getRequestCorrelationId(t);return this.logger.verbose("loginPopup called",o),this.acquireTokenPopup(Q({correlationId:o},t||Hr))},e.prototype.acquireTokenSilent=function(t){return z(this,void 0,void 0,function(){var o,r,i,s,c,l,h,u=this;return x(this,function(g){if(o=this.getRequestCorrelationId(t),r=this.performanceClient.startMeasurement(R.AcquireTokenSilent,o),r.addStaticFields({cacheLookupPolicy:t.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck($.Silent),this.logger.verbose("acquireTokenSilent called",o),i=t.account||this.getActiveAccount(),!i)throw F.createNoAccountError();return s={clientId:this.config.auth.clientId,authority:t.authority||b.EMPTY_STRING,scopes:t.scopes,homeAccountIdentifier:i.homeAccountId,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid},c=JSON.stringify(s),l=this.activeSilentTokenRequests.get(c),typeof l>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",o),this.performanceClient.setPreQueueTime(R.AcquireTokenSilentAsync,o),h=this.acquireTokenSilentAsync(Q(Q({},t),{correlationId:o}),i).then(function(f){return u.activeSilentTokenRequests.delete(c),r.addStaticFields({accessTokenSize:f.accessToken.length,idTokenSize:f.idToken.length}),r.endMeasurement({success:!0,fromCache:f.fromCache,isNativeBroker:f.fromNativeBroker,cacheLookupPolicy:t.cacheLookupPolicy,requestId:f.requestId}),f}).catch(function(f){throw u.activeSilentTokenRequests.delete(c),r.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f}),this.activeSilentTokenRequests.set(c,h),[2,h]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",o),r.discardMeasurement(),[2,l])})})},e.prototype.trackPageVisibility=function(){this.astsAsyncMeasurement&&(this.logger.info("Perf: Visibility change detected"),this.astsAsyncMeasurement.increment({visibilityChangeCount:1}))},e.prototype.acquireTokenSilentAsync=function(t,o){var r;return z(this,void 0,void 0,function(){var i,s,c,l,h,u=this;return x(this,function(g){switch(g.label){case 0:return this.performanceClient.addQueueMeasurement(R.AcquireTokenSilentAsync,t.correlationId),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,$.Silent,t),this.astsAsyncMeasurement=this.performanceClient.startMeasurement(R.AcquireTokenSilentAsync,t.correlationId),(r=this.astsAsyncMeasurement)===null||r===void 0||r.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibility),ln.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,t.authenticationScheme)&&o.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),s=Q(Q({},t),{account:o}),i=this.acquireTokenNative(s,ke.acquireTokenSilent_silentFlow).catch(function(f){return z(u,void 0,void 0,function(){var w;return x(this,function(C){if(f instanceof Nt&&f.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,w=this.createSilentIframeClient(t.correlationId),[2,w.acquireToken(t)];throw f})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),c=this.createSilentCacheClient(t.correlationId),this.performanceClient.setPreQueueTime(R.InitializeSilentRequest,t.correlationId),[4,c.initializeSilentRequest(t,o)];case 2:l=g.sent(),h=Q(Q({},t),{cacheLookupPolicy:t.cacheLookupPolicy||Xe.Default}),this.performanceClient.setPreQueueTime(R.AcquireTokenFromCache,l.correlationId),i=this.acquireTokenFromCache(c,l,h).catch(function(f){if(h.cacheLookupPolicy===Xe.AccessToken)throw f;return Ee.blockReloadInHiddenIframes(),u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_NETWORK_START,$.Silent,l),u.performanceClient.setPreQueueTime(R.AcquireTokenByRefreshToken,l.correlationId),u.acquireTokenByRefreshToken(l,h).catch(function(w){var C=w instanceof rn,P=w instanceof gt,M=w.errorCode===bn.noTokensFoundError.code,j=w.errorCode===_t.INVALID_GRANT_ERROR;if((!C||!j||P||h.cacheLookupPolicy===Xe.AccessTokenAndRefreshToken||h.cacheLookupPolicy===Xe.RefreshToken)&&h.cacheLookupPolicy!==Xe.Skip&&!M)throw w;return u.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",t.correlationId),u.performanceClient.setPreQueueTime(R.AcquireTokenBySilentIframe,l.correlationId),u.acquireTokenBySilentIframe(l)})}),g.label=3;case 3:return[2,i.then(function(f){var w;return u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,$.Silent,f),(w=u.astsAsyncMeasurement)===null||w===void 0||w.endMeasurement({success:!0,fromCache:f.fromCache,isNativeBroker:f.fromNativeBroker,requestId:f.requestId}),f}).catch(function(f){var w;throw u.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,$.Silent,null,f),(w=u.astsAsyncMeasurement)===null||w===void 0||w.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f}).finally(function(){document.removeEventListener("visibilitychange",u.trackPageVisibility)})]}})})},e}(Wa);class Ja extends tt.WebPlugin{async login(e){const t=this.createContext(e);try{return await this.acquireTokenSilently(t,e.scopes).catch(()=>this.acquireTokenInteractively(t,e.scopes))}catch(o){throw console.error("MSAL: Error occurred while logging in",o),o}}logout(e){const t=this.createContext(e);return t.getAllAccounts()[0]?t.logoutPopup():Promise.reject(new Error("Nothing to sign out from."))}logoutAll(e){return this.logout(e)}createContext(e){var t,o,r;const i={auth:{clientId:e.clientId,domainHint:e.domainHint,authority:(t=e.authorityUrl)!==null&&t!==void 0?t:`https://login.microsoftonline.com/${(o=e.tenant)!==null&&o!==void 0?o:"common"}`,knownAuthorities:e.knownAuthorities,redirectUri:(r=e.redirectUri)!==null&&r!==void 0?r:this.getCurrentUrl()},cache:{cacheLocation:"localStorage"}};return new Ya(i)}getCurrentUrl(){return window.location.href.split(/[?#]/)[0]}async acquireTokenInteractively(e,t){const{accessToken:o,idToken:r}=await e.acquireTokenPopup({scopes:t,prompt:"select_account"});return{accessToken:o,idToken:r,scopes:t}}async acquireTokenSilently(e,t){const{accessToken:o,idToken:r}=await e.acquireTokenSilent({scopes:t,account:e.getAllAccounts()[0]});return{accessToken:o,idToken:r,scopes:t}}}const Xa=tt.registerPlugin("MsAuthPlugin",{web:()=>new Ja}),ri={data(){return{microsoftLoad:!1,microsoftSSOLoad:!1}},computed:{displayMicrosoftSSOLogin(){return!1}},methods:{async microsoftLogin(n,e={}){var r;n==="sso"?this.microsoftSSOLoad=!0:this.microsoftLoad=!0;const[t,o]=await fe(Xa.login({clientId:n==="sso"?e.clientID:"9cd47053-080a-4df8-8fd8-ca4389163fde",tenant:n==="sso"?e.tenant:"consumers",scopes:["User.Read"],knownAuthorities:[],keyHash:"4+5wCp8QcLptlO0aeP5RDTTOWyg=",redirectUri:`${window.location.origin}/login`}));if(t)return console.error("MsAuthPlugin Error: "+JSON.stringify(t)),this.microsoftLoad=!1;if(this.referral&&(o.ref=this.referral),this.display==="popup"&&(o.response_type="code"),o&&(o.accessToken||o.idToken)){const[i,s]=await fe(Fe.microsoftSDK(o,this.$storex));if(i)return this.microsoftLoad=!1,this.microsoftSSOLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(i);if(s.data.success){if(this.display==="popup")return(r=window.parent)==null?void 0:r.postMessage({code:s.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(s),await this.getLoggedInAccounts(),this.loginSuccess({...s,isModal:this.isModal}),setTimeout(()=>{this.microsoftLoad=!1,this.microsoftSSOLoad=!1},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)}else this.microsoftLoad=!1,this.microsoftSSOLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})}}},Za=n=>{try{return window.crypto.getRandomValues(n)}catch{for(let t=0;t<n.length;t++)n[t]=Math.floor(Math.random()*256);return n}},es=async n=>{try{return await window.crypto.subtle.digest("SHA-256",n)}catch{const t=rr.sha256(n);return new Uint8Array(t.match(/.{1,2}/g).map(o=>parseInt(o,16))).buffer}},ts=async(n,e,t)=>{try{return await window.crypto.subtle.encrypt(n,e,t)}catch{throw new Error("Encryption not supported in this environment")}},ns=async(n,e,t)=>{try{return await window.crypto.subtle.decrypt(n,e,t)}catch{throw new Error("Decryption not supported in this environment")}},Fn={getFirstBrowserLanguage(){let n=window.navigator,e=["language","browserLanguage","systemLanguage","userLanguage"],t,o;if(Array.isArray(n.languages)){for(t=0;t<n.languages.length;t++)if(o=n.languages[t],o&&o.length)return o.slice(0,2)}for(t=0;t<e.length;t++)if(o=n[e[t]],o&&o.length)return o.slice(0,2);return null},compareLangKeys(){const n=Object.keys(hr.state),e=Object.keys(mr.state),t=Object.keys(fr.state),o=Object.keys(br.state),r=Object.keys(_r.state),i=Object.keys(gr.state),s=Object.keys(yr.state),c=Object.keys(vr.state);console.log("In en but not in de",n.filter(l=>!e.includes(l))),console.log("In de but not in en",e.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in es",n.filter(l=>!t.includes(l))),console.log("In es but not in en",t.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in kr",n.filter(l=>!o.includes(l))),console.log("In kr but not in en",o.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in it",n.filter(l=>!r.includes(l))),console.log("In it but not in en",r.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in fr",n.filter(l=>!i.includes(l))),console.log("In fr but not in en",i.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in sr",n.filter(l=>!s.includes(l))),console.log("In sr but not in en",s.filter(l=>!n.includes(l))),console.log(),console.log("In en but not in tr",n.filter(l=>!c.includes(l))),console.log("In tr but not in en",c.filter(l=>!n.includes(l))),console.log()},base64ImageToBlob(n){const e=n.split(";base64,"),t=e[0].split(":")[1],o=window.atob(e[1]),r=new Uint8Array(o.length);for(let i=0;i<o.length;++i)r[i]=o.charCodeAt(i);return new Blob([r],{type:t})},blobToBase64(n){const e=new FileReader;return e.readAsDataURL(n),new Promise(t=>{e.onloadend=()=>{t(e.result)}})},base64toFile(n,e){for(var t=n.split(","),o=t[0].match(/:(.*?);/)[1],r=atob(t[1]),i=r.length,s=new Uint8Array(i);i--;)s[i]=r.charCodeAt(i);return new File([s],e,{type:o})},fileToBase64(n){new Promise((e,t)=>{const o=new FileReader;o.readAsDataURL(n),o.onload=()=>e(o.result),o.onerror=r=>t(r)})},getUTMParams(n){let e={};return n.utm_source&&(e.utm_source=n.utm_source),n.utm_medium&&(e.utm_medium=n.utm_medium),n.utm_campaign&&(e.utm_campaign=n.utm_campaign),n.utm_term&&(e.utm_term=n.utm_term),n.utm_content&&(e.utm_content=n.utm_content),e},cropCardScan(n,e){const t=new window.Image,o=document.createElement("canvas"),r=o.getContext("2d");t.src="data:image/jpeg;base64,"+n,t.onload=()=>{const i=t.width,s=t.width/1.65,c=0,l=t.height/2-s/2,h=i,u=s;o.width=h,o.height=u,r.drawImage(t,c,l,i,s,0,0,h,u);const g=o.toDataURL();return e(g),g}},generateRandomString(n){let e=new Uint32Array(n);return Za(e),Array.from(e,t=>("0"+t.toString(16)).substr(-2)).join("")},async pkceChallengeFromVerifier(n){try{const t=new TextEncoder().encode(n),o=await es(t);return btoa(String.fromCharCode.apply(null,new Uint8Array(o))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch{const t=rr.sha256(n);return btoa(String.fromCharCode.apply(null,new Uint8Array(t.match(/.{1,2}/g).map(r=>parseInt(r,16))))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},async encryptAES(n,e,t){try{let r=new TextEncoder().encode(t);return await ts({name:"AES-CBC",iv:e},n,r)}catch(o){throw o}},async decryptAES(n,e,t){try{const o=l=>Uint8Array.from(atob(l),h=>h.charCodeAt(0));t=t.replace(/ /g,"+");const r=new TextEncoder,i=new TextDecoder;n=r.encode(n),e=r.encode(e),t=o(t);const s=await window.crypto.subtle.importKey("raw",n,"AES-CBC",!0,["encrypt","decrypt"]);let c=await ns({name:"AES-CBC",iv:e},s,t);return c=i.decode(c),c=c.replace(/ /g,"+"),c=atob(c),c}catch(o){throw o}}},ii={data(){return{oktaAuth:null}},computed:{},watch:{},methods:{async exchangeCode(n){var r,i;let[e,t]=await fe(mo.post(n.domain+"/v1/token",new URLSearchParams({code:n.code,client_id:n.clientID,grant_type:"authorization_code",redirect_uri:this.isNative?"tapni://t.link/callback/okta":location.origin+"/callback/okta",code_verifier:localStorage.getItem("pkce_code_verifier")})));if(e)return this.errorHandler(e);localStorage.removeItem("pkce_code_verifier");let o={accessToken:(r=t.data)==null?void 0:r.access_token,domain:n.domain};if(this.display==="popup"&&(o.response_type="code"),[e,t]=await fe(Fe.oktaSDK(o,this.$storex)),e)return this.oktaLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(e);if(t.data.success){if(this.display==="popup")return(i=window.parent)==null?void 0:i.postMessage({code:t.data.auth_code,state:this.$route.query.state},"*");await this.loginSetup(t),await this.getLoggedInAccounts(),this.$router.push("/"+t.data.data.username+"#edit"),setTimeout(()=>{this.appleLoad=!1,X.$emit("ssoEvent",{name:"setLoading",data:!1})},1e3)}else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)},async oktaLogin(n){const e=tt.Capacitor.getPlatform()||"web";let t=btoa("domain="+n.domain+"&client_id="+n.clientID+"&platform="+e+"&rand="+Fn.generateRandomString(28)),o=Fn.generateRandomString(28);localStorage.setItem("pkce_code_verifier",o);let r=await Fn.pkceChallengeFromVerifier(o),i=n.domain+"/v1/authorize",s;this.isNative?s="tapni://t.link/callback/okta":s=location.origin+"/callback/okta";let c=i+"?response_type=code&client_id="+encodeURIComponent(n.clientID)+"&state="+encodeURIComponent(t)+"&scope="+encodeURIComponent("openid email profile")+"&redirect_uri="+encodeURIComponent(s)+"&code_challenge="+encodeURIComponent(r)+"&code_challenge_method=S256",l=this,h;window.addEventListener("message",async u=>{if(!this.allowedOriginsAuth.includes(u.origin))return console.error("Origin is not allowed!");u.data.type==="okta"&&(h=u.data.code,await l.exchangeCode({domain:n.domain,code:h,clientID:n.clientID}))},{once:!0}),this.isNative?await Vn.Browser.open({url:c,presentationStyle:"popover"}):window.open(c,"popup","width=600,height=600")},async handleOktaRedirect(){let n=this.$route.query.code,e,t,o,r,i={type:"okta"};if(n&&(i.code=n),this.$route.query.state){e=this.$route.query.state,e=atob(e);const s=new URLSearchParams(e);t=s.get("client_id"),o=s.get("domain"),r=s.get("platform")}window.opener?(window.opener.postMessage(i,location.origin),window.close()):(this.isNative&&this.isiOS&&await Vn.Browser.close(),X.$emit("ssoEvent",{name:"setLoading",data:!0}),n&&t&&o&&await this.exchangeCode({code:n,clientID:t,domain:o,platform:r}),localStorage.removeItem("pkce_code_verifier"),X.$emit("ssoEvent",{name:"setLoading",data:!1}))}}},ai={data(){return{code_verifier:"",code_challenge:"",shouldCloseWindow:!1,popupWindow:null,checkInterval:null}},computed:{},watch:{"$route.path"(n){n==="/callback/saml"&&this.handleSamlRedirect(n)}},methods:{closeWindow(){try{window.close()}catch{}},async samlLogin(n){this.code_verifier=Fn.generateRandomString(28),localStorage.setItem("pkce_code_verifier",this.code_verifier),this.code_challenge=await Fn.pkceChallengeFromVerifier(this.code_verifier);const e=tt.Capacitor.getPlatform();let t=`code_challenge=${this.code_challenge}&platform=${e}&redirect_uri=${location.origin+(this.display==="npm"?"/app":"")+"/callback/saml"}&realm=${this.realm}&display=${this.display}`,o=btoa(t);n=`${n}&RelayState=${o}`;let r=this;window.addEventListener("message",async i=>{var l;if(!this.allowedOriginsAuth.includes(i.origin))return console.error("Origin is not allowed! "+i.origin);const s=i.data.code,c=localStorage.getItem("pkce_code_verifier");if(s){if(r.display==="popup")return(l=window.parent)==null?void 0:l.postMessage({code:s,state:i.data.state,code_verifier:c},"*");c&&(await r.exchangeAuthCode({code:i.data.code,code_verifier:c}),localStorage.removeItem("pkce_code_verifier"))}},{once:!0}),this.isNative?this.popupWindow=await Vn.Browser.open({url:n,presentationStyle:"popover"}):(this.checkInterval=setInterval(()=>{var c;const i=localStorage.getItem("auth_code"),s=localStorage.getItem("pkce_code_verifier");i&&(clearInterval(this.checkInterval),localStorage.removeItem("auth_code"),localStorage.removeItem("pkce_code_verifier"),(c=window.parent)==null||c.postMessage({code:i,state:this.$route.query.state,code_verifier:s},"*"),s&&(this.display==="npm"||this.display==="redirect")&&this.exchangeAuthCode({code:i,code_verifier:s}))},500),this.popupWindow=window.open(window.location.origin+(this.display==="npm"?"/app":"")+"/callback/redirect?uri="+btoa(n),"popup","width=600,height=600"))},async handleSamlRedirect(){var e;let n;if(this.$route.query.code&&(n=this.$route.query.code),window.opener)window.opener.postMessage({type:"saml",code:n},"*"),this.closeWindow();else{if(this.isNative&&this.isiOS&&await Vn.Browser.close(),X.$emit("ssoEvent",{name:"setLoading",data:!0}),n&&((this.display==="popup"||this.display==="npm")&&(localStorage.setItem("auth_code",n),this.shouldCloseWindow=!0,(e=window.parent)==null||e.postMessage({code:n,state:this.$route.query.state},"*"),this.closeWindow()),this.display==="redirect"||location.host==="auth.tapni.com")){let t="https://auth.tapni.com/callback/auth";return this.realm==="dashboard"&&(t="https://business.tapni.com/login"),location.href=t+"?code="+n+"&code_verifier="+localStorage.getItem("pkce_code_verifier")}X.$emit("ssoEvent",{name:"setLoading",data:!1})}}}},si={data(){return{isQrCodeLogin:!1,qrCode:null,qrCodeHash:null,qrCodeRefreshInterval:null,poolingInterval:null}},props:{isModal:{type:Boolean,required:!1,default:!1}},computed:{displayQRLogin(){return this.$route.name==="AuthLogin"&&this.display!=="npm"}},mounted(){this.$route.name==="AuthQR"&&this.changeLoginToQr()},methods:{async changeLoginToQr(){this.isQrCodeLogin=!0,await a.nextTick(),await this.initQrCodeLogin()},generateRandomHash(){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=n.length;let t="";const o=new Uint32Array(32);return window.crypto.getRandomValues(o),o.forEach(r=>{t+=n.charAt(r%e)}),t},refreshQrCode(){var n,e;this.qrCode&&((e=(n=document.getElementById("qrCodeContainer"))==null?void 0:n.childNodes[0])==null||e.remove()),this.qrCodeHash=this.generateRandomHash(),this.qrCode=new ir({width:300,height:300,type:"png",image:"",imageOptions:{margin:15},data:this.qrCodeHash,dotsOptions:{type:"extra-rounded",color:"#000000"},cornersSquareOptions:{type:"extra-rounded",color:"#000000"},cornersDotOptions:{type:"",color:"#000000"},backgroundOptions:{color:"#ffffff00"}}),this.qrCode.append(document.getElementById("qrCodeContainer"))},async startQrCodePooling(){this.poolingInterval=setInterval(async()=>{const[n,e]=await fe(ko.qrCodePooling({qrToken:this.qrCodeHash},this.$storex));if(n)return this.errorHandler(n);e.data.auth_code&&(this.display!=="popup"&&(this.loginSetup({...e,isModal:this.isModal}),await this.getLoggedInAccounts()),this.loginSuccess({...e,isModal:this.isModal}),clearInterval(this.poolingInterval),clearInterval(this.qrCodeRefreshInterval))},2e3)},async initQrCodeLogin(){this.refreshQrCode(),await a.nextTick(),await this.startQrCodePooling(),this.qrCodeRefreshInterval=setInterval(()=>{this.refreshQrCode()},6e4)}}},os={name:"AuthLogin",mixins:[Tr,Sr,ri,ii,ai,We,si],data(){return{loading:!0,submitted:!1,emailOrUsername:"",password:"",captcha:"",revealPassword:!1,emailLogin:!0,isSSOLogin:!1,otpToken:"",showOTP:!1}},computed:{displayFormLogin(){return this.emailLogin},displayResetPasswordLogin(){return!this.isSSOLogin},displayRegisterLogin(){return!0}},async mounted(){if(!this.isModal){if(this.$route.path==="/login/callback/okta")return await this.handleOktaRedirect();if(this.$route.path==="/login/callback/saml")return await this.handleSamlRedirect();this.$route.query.qrLogin&&this.changeLoginToQr(),setTimeout(()=>{this.$storex&&this.$storex.token?this.$router.push(this.home):X.$emit("ssoEvent",{name:"setLoading",data:!1})},2500)}X.$on("toggleOTPField",()=>{this.showOTP=!this.showOTP})},methods:{async ssoLoginSubmit(){this.loading=!0;const n=await this.getCompanyBySSOEmail({email:this.emailOrUsername});this.loading=!1;let e;if(!(!n||n.error))if(e=Object.keys(n.sso),e.length)e[0]==="azure"&&this.microsoftLogin("sso",n.sso.azure.sso),e[0]==="okta"&&this.oktaLogin(n.sso.okta.sso),e[0]==="saml"&&this.samlLogin(n.sso.saml.sso.loginUrl);else return this.errorSnack(this.ssoLang[this.appLanguage].no_sso_logins)},async submit(){if(this.submitted)return;if(this.submitted=!0,this.isSSOLogin)return this.ssoLoginSubmit();this.emailOrUsername=this.emailOrUsername.trim();let e={response_type:this.$route.query.response_type||"token",isModal:this.isModal,captcha:this.captcha,password:this.password,otpToken:this.otpToken};this.emailOrUsername.indexOf("@")!==-1?e.email=this.emailOrUsername:e.username=this.emailOrUsername;const[t,o]=await fe(this.login(e));t&&console.error(t),this.submitted=!1,o===!0&&(this.emailOrUsername="",this.password="")},close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},createAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalRegister",data:{}})}},watch:{emailOrUsername(n){n.includes("@")&&(this.$storex.verifyEmail=n)},"$route.path":async function(n){if(n==="/login/callback/okta")return await this.handleOktaRedirect();if(n==="/login/callback/saml")return await this.handleSamlRedirect()}}},rs={class:"bold no-bottom center-text text-[22px]",style:{"margin-top":"63px"}},is={key:0},as={key:1},ss={key:1},cs={class:"page-login-field half-top"},ls=["placeholder"],ds={key:0,class:"page-login-field half-bottom"},us=["type","placeholder"],ps={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},hs={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},ms={key:1,class:"page-login-field half-bottom"},fs=["placeholder"],gs={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},_s={key:0},ys={key:1,class:"button--loading button__loader"},vs={key:0},bs={key:1,class:"button--loading-black button__loader"},ws={key:0},ks={key:1,class:"button--loading-black button__loader"},Cs={key:0},Es={key:1,class:"button--loading-black button__loader"},Ts={key:0},Ss={key:1,class:"button--loading-black button__loader"},Is={key:0},As={key:1,class:"button--loading-black button__loader"},Rs={class:"close-text center-text half-top color-black"},Ns={class:"",href:"https://tapni.com/policies/terms-of-service"},Ps={href:"https://tapni.com/policies/privacy-policy"},Ms={key:2,class:"page-login-links"},Ls={class:"forgot center-text pointer small-top"};function Os(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[15]||(e[15]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),autocomplete:"on",style:a.normalizeStyle(n.isModal?"max-width: 500px;":"")},[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[16]||(e[16]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h2",rs,[r.isSSOLogin?(a.openBlock(),a.createElementBlock("span",is,a.toDisplayString(this.ssoLang[this.appLanguage].enter_company_email),1)):(a.openBlock(),a.createElementBlock("span",as,a.toDisplayString(this.ssoLang[this.appLanguage].login),1))]),e[34]||(e[34]=a.createElementVNode("p",{class:"half-bottom small-top center-text color-black"},null,-1)),i.displayFormLogin?(a.openBlock(),a.createElementBlock("span",ss,[a.createElementVNode("div",cs,[e[17]||(e[17]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/user.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=c=>r.emailOrUsername=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),autocorrect:"off",autocapitalize:"off",spellcheck:"false",type:"text",name:"email",placeholder:r.isSSOLogin?n.ssoLang[this.appLanguage].email:n.ssoLang[this.appLanguage].email_username,required:""},null,40,ls),[[a.vModelText,r.emailOrUsername]]),e[18]||(e[18]=a.createElementVNode("em",null,null,-1))]),r.isSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",ds,[e[19]||(e[19]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,name:"password",required:"",minlength:"8"},null,8,us),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[4]||(e[4]=c=>r.revealPassword=!r.revealPassword),class:"pointer"},[a.withDirectives(a.createElementVNode("img",ps,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",hs,null,512),[[a.vShow,r.revealPassword]])])])),r.showOTP?(a.openBlock(),a.createElementBlock("div",ms,[e[20]||(e[20]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.otpToken=c),type:"text",placeholder:n.ssoLang[this.appLanguage].otp_code,name:"otpToken",required:"",minlength:"6"},null,8,fs),[[a.vModelText,r.otpToken]]),e[21]||(e[21]=a.createElementVNode("em",null,null,-1))])):a.createCommentVNode("",!0),a.createElementVNode("button",gs,[r.submitted?(a.openBlock(),a.createElementBlock("span",ys)):(a.openBlock(),a.createElementBlock("span",_s,a.toDisplayString(n.ssoLang[n.appLanguage].login),1))])])):a.createCommentVNode("",!0),e[35]||(e[35]=a.createElementVNode("div",{class:"decoration decoration-lines-thin half-top half-bottom"},null,-1)),a.withDirectives(a.createElementVNode("span",null,[n.displayAppleLogin?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[6]||(e[6]=(...c)=>n.appleLogin&&n.appleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[22]||(e[22]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/apple-logo.png",style:{position:"absolute","margin-left":"-11px",padding:"8px 0",height:"100%"}},null,-1)),n.appleLoad?(a.openBlock(),a.createElementBlock("span",bs)):(a.openBlock(),a.createElementBlock("span",vs,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Apple",1))])):a.createCommentVNode("",!0),n.displayGoogleLogin?(a.openBlock(),a.createElementBlock("a",{key:1,onClick:e[7]||(e[7]=(...c)=>n.googleLogin&&n.googleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[23]||(e[23]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/g-logo.png",style:{position:"absolute","margin-left":"-10px",padding:"8px 0",height:"100%"}},null,-1)),n.googleLoad?(a.openBlock(),a.createElementBlock("span",ks)):(a.openBlock(),a.createElementBlock("span",ws,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Google",1))])):a.createCommentVNode("",!0),n.displayMicrosoftSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[8]||(e[8]=(...c)=>n.microsoftLogin&&n.microsoftLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[24]||(e[24]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/outlook.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftLoad?(a.openBlock(),a.createElementBlock("span",Es)):(a.openBlock(),a.createElementBlock("span",Cs,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Outlook",1))])),n.displayMicrosoftSSOLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:3,onClick:e[9]||(e[9]=c=>r.isSSOLogin=!0),class:"button-center button button-90 google-button pointer"},[e[25]||(e[25]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/sso-key.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftSSOLoad?(a.openBlock(),a.createElementBlock("span",Ss)):(a.openBlock(),a.createElementBlock("span",Ts,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" SSO",1))])),n.displayMicrosoftSSOLogin?(a.openBlock(),a.createElementBlock("a",{key:4,onClick:e[10]||(e[10]=c=>n.microsoftLogin("sso")),class:"button-center button button-90 google-button pointer"},[e[26]||(e[26]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/sso-key.png",style:{position:"absolute","margin-left":"-8px",padding:"10px 0",height:"100%"}},null,-1)),n.microsoftSSOLoad?(a.openBlock(),a.createElementBlock("span",Is,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" SSO",1)):(a.openBlock(),a.createElementBlock("span",As))])):a.createCommentVNode("",!0),i.displayFormLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:5,onClick:e[11]||(e[11]=c=>r.emailLogin=!0),class:"button-center button button-90 google-button pointer"},[e[27]||(e[27]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",style:{position:"absolute","margin-left":"-8px",padding:"12px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" Email",1)])),n.displayQRLogin?(a.openBlock(),a.createElementBlock("a",{key:6,onClick:e[12]||(e[12]=c=>n.$router.push("/qr")),class:"button-center button button-90 google-button pointer"},[e[28]||(e[28]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/qr.png",style:{position:"absolute","margin-left":"-5px",padding:"15px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[n.appLanguage].sign_in_with)+" QR",1)])):a.createCommentVNode("",!0),e[29]||(e[29]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1))],512),[[a.vShow,!r.isSSOLogin]]),a.createElementVNode("p",Rs,[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].terms_by_signing_in)+" ",1),e[30]||(e[30]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("a",Ns,a.toDisplayString(n.ssoLang[this.appLanguage].terms_of_service),1),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[n.appLanguage].and)+" ",1),a.createElementVNode("a",Ps,a.toDisplayString(n.ssoLang[this.appLanguage].privacy_policy),1)]),e[36]||(e[36]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),n.isModal?(a.openBlock(),a.createElementBlock("div",{key:3,class:"page-login-links",onClick:e[14]||(e[14]=(...c)=>i.createAccountModal&&i.createAccountModal(...c))},[a.createElementVNode("a",Ls,[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].or)+" ",1),e[32]||(e[32]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[n.appLanguage].create_new_account),1)]),e[33]||(e[33]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Ms,[i.displayRegisterLogin?(a.openBlock(),a.createBlock(s,{key:0,class:"forgot float-right",to:"/register"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].create_account),1)]),_:1})):a.createCommentVNode("",!0),i.displayResetPasswordLogin?(a.openBlock(),a.createBlock(s,{key:1,class:"create float-left",to:"/reset"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].reset_password),1)]),_:1})):a.createCommentVNode("",!0),r.isSSOLogin?(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[13]||(e[13]=c=>r.isSSOLogin=!1),class:"create float-left pointer"},a.toDisplayString(n.ssoLang[n.appLanguage].go_back),1)):a.createCommentVNode("",!0),e[31]||(e[31]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const qo=nt(os,[["render",Os]]),zs=Object.freeze(Object.defineProperty({__proto__:null,default:qo},Symbol.toStringTag,{value:"Module"})),xs={WEB_VERSION:"1.0.1",SUPPORTED_LANGUAGES:["en","de","es","kr","it","fr","sr","tr","cn","pt","ja"]},Bs={mixins:[We],props:{isModal:{type:Boolean,default:!1}},data(){return{expanded:!1,addAccountReady:!1}},computed:{appVersion(){return xs.WEB_VERSION}},async mounted(){if(!this.isLoggedIn)return this.$router.push("/");await this.getAccountSettings()},methods:{continueTo(n){},addAccount(){this.$router.push("/login")},switchAccount(n){},toggleLanguageModal(){X.$emit("toggleSSOLanguageModal")},logoutAccount(){this.logout({refreshToken:this.refreshTokens[0],sendRequest:!0})}}},Us={class:"page-login content-boxed content-boxed-padding center-text",style:{"margin-top":"-1px",overflow:"hidden",border:"solid 0px #ffffff"}},Ds={class:"bold full-top no-bottom center-text text-[24px]"},js={class:"full-bottom half-top center-text font-16"},uh={key:1,class:"full-top full-bottom"},ph={class:"page-login-links center-text"},qs={class:"container left-text"},Fs={class:"firstRow"},Vs=["src"],Hs=["src"],Ks={class:"firstRow"},Gs=["src"],$s=["src"],Qs={class:"firstRow"},Ws=["src"],Ys=["src"],Js={class:"firstRow"},Xs=["src"],Zs=["src"],ec={class:"firstRow"},tc=["src"],nc=["src"],oc={class:"firstRow"},rc=["src"],ic=["src"],ac={class:"firstRow"},sc=["src"],cc={class:"red-text"},lc=["src"],dc={class:"moreFooter"},uc={class:"app-version",style:{"margin-top":"10px"}};function pc(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Us,[e[12]||(e[12]=a.createElementVNode("br",null,null,-1)),a.createCommentVNode("",!0),a.createElementVNode("h1",Ds,a.toDisplayString(n.ssoLang[n.appLanguage].welcome_account),1),a.createElementVNode("p",js,a.toDisplayString(n.account.email),1),(n.display,a.createCommentVNode("",!0)),a.createElementVNode("div",qs,[a.createCommentVNode("",!0),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:1,class:"settingRow",onClick:e[4]||(e[4]=c=>n.$emit("update:viewProp","AuthGeneral"))},[a.createElementVNode("div",Fs,[a.createElementVNode("img",{src:n.getIcon("user-black.svg"),class:"withBackground"},null,8,Vs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].general),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Hs)])])):(a.openBlock(),a.createBlock(s,{key:2,to:"/general",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",Ks,[a.createElementVNode("img",{src:n.getIcon("user-black.svg"),class:"withBackground"},null,8,Gs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].general),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,$s)])]),_:1})),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:3,class:"settingRow",onClick:e[5]||(e[5]=c=>n.$emit("update:viewProp","AuthSecurity"))},[a.createElementVNode("div",Qs,[a.createElementVNode("img",{src:n.getIcon("shield-black.svg"),class:"withBackground"},null,8,Ws),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].security),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Ys)])])):(a.openBlock(),a.createBlock(s,{key:4,to:"/security",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",Js,[a.createElementVNode("img",{src:n.getIcon("shield-black.svg"),class:"withBackground"},null,8,Xs),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].security),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Zs)])]),_:1})),a.createCommentVNode("",!0),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:6,class:"settingRow",onClick:e[6]||(e[6]=c=>n.$emit("update:viewProp","AuthBilling"))},[a.createElementVNode("div",ec,[a.createElementVNode("img",{src:n.getIcon("billing-card-black.svg"),class:"withBackground"},null,8,tc),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,nc)])])):(a.openBlock(),a.createBlock(s,{key:7,to:"/billing",class:"settingRow"},{default:a.withCtx(()=>[a.createElementVNode("div",oc,[a.createElementVNode("img",{src:n.getIcon("billing-card-black.svg"),class:"withBackground"},null,8,rc),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,ic)])]),_:1})),t.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:8,class:"settingRow",onClick:e[7]||(e[7]=(...c)=>i.logoutAccount&&i.logoutAccount(...c))},[a.createElementVNode("div",ac,[a.createElementVNode("img",{src:n.getIcon("logout-red.svg"),class:"withBackground"},null,8,sc),a.createElementVNode("h4",cc,a.toDisplayString(n.ssoLang[n.appLanguage].logout),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,lc)])])),a.createElementVNode("div",dc,[a.createElementVNode("p",uc,a.toDisplayString(n.ssoLang[n.appLanguage].version)+": "+a.toDisplayString(i.appVersion),1),a.createCommentVNode("",!0)])])])}const Fo=nt(Bs,[["render",pc]]),hc=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"})),mc={name:"AuthRegister",mixins:[Tr,Sr,ri,We],props:{isModal:{type:Boolean,required:!1,default:!1}},data(){return{usernameRegister:!1,loading:!0,submitted:!1,formButtonText:"REGISTER",username:"",email:"",password:"",revealPassword:!1,emailLogin:!0,invitationCode:"",referral:""}},mounted(){this.isModal||(this.isLoggedIn?this.$router.push(this.home):!this.$route.query.state&&!this.$route.query.oauth&&!this.$route.params.oauth&&X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.invitationCode=this.$route.query.ic||"",this.$route.query.username&&(this.usernameRegister=!0,this.emailLogin=!0,this.username=this.$route.query.username),this.$route.query.ref?this.referral=this.$route.query.ref:this.$storex.referral&&(this.referral=this.$storex.referral))},methods:{async submit(){if(this.password.length<8)return this.errorSnack(this.ssoLang[this.appLanguage].password_8_chars);if(this.password.search(/[a-z]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_lowercase);if(this.password.search(/[A-Z]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_uppercase);if(this.password.search(/[0-9]/)<0)return this.errorSnack(this.ssoLang[this.appLanguage].password_least_one_number);if(this.submitted)return;this.submitted=!0,this.email=this.email.trim(),this.username=this.username.trim();let n={response_type:this.response_type,email:this.email,username:this.username,password:this.password,ic:this.invitationCode,captchaToken:await this.getCaptchaToken("account_verify"),ref:this.referral},e=await this.register(n);this.submitted=!1,e.data&&e.data.success&&(e.data.message==="SUCCESS_REGISTER"?(this.isModal?X.$emit("ssoEvent",{name:"toggleAddAccountModalVerify",data:!1}):this.$router.push("/verify"),this.successSnack(this.ssoLang[this.appLanguage].register_success),this.formButtonText=this.ssoLang[this.appLanguage].check_your_inbox):e.data.message==="SUCCESS_LOGIN"&&(this.display!=="popup"&&(await this.loginSetup({...e,isModal:n.isModal}),await this.getLoggedInAccounts()),await this.loginSuccess({...e,isModal:n.isModal})))},close(){X.$emit("ssoEvent",{name:"toggleAddAccountModal",data:!0})},loginAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalLogin",data:!1})}},watch:{email(n){this.$storex.verifyEmail=n},referral(n){this.$storex.referral=n}}},fc={class:"bold no-bottom center-text text-[24px]",style:{"margin-top":"63px"}},gc={class:"half-bottom small-top center-text color-black"},_c={key:0},yc={key:1},vc={class:"page-login-field half-top"},bc=["placeholder"],wc={class:"page-login-field half-top"},kc=["placeholder","disabled"],Cc={class:"page-login-field half-top half-bottom"},Ec=["type","placeholder"],Tc={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Sc={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},Ic={type:"submit",class:"button black-button google-button bg-tapni-grey pointer button-90 button-center uppercase button-rounded bold full-top"},Ac={key:0},Rc={key:1,class:"button--loading button__loader"},Nc={key:0},Pc={key:1,class:"button--loading-black button__loader"},Mc={key:0},Lc={key:1,class:"button--loading-black button__loader"},Oc={class:"close-text center-text half-top color-black"},zc={class:"",href:"https://tapni.co/policies/terms-of-service"},xc={href:"https://tapni.co/policies/privacy-policy"},Bc={key:4,class:"page-login-links"},Uc={class:"forgot center-text pointer small-top"};function Dc(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[11]||(e[11]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),autocomplete:"on",style:a.normalizeStyle(t.isModal?"max-width: 500px;":"")},[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[12]||(e[12]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h1",fc,a.toDisplayString(n.ssoLang[this.appLanguage].register),1),a.createElementVNode("p",gc,[r.usernameRegister?(a.openBlock(),a.createElementBlock("span",_c,[a.createTextVNode(" t.link/"+a.toDisplayString(r.username)+" "+a.toDisplayString(n.ssoLang[this.appLanguage].username_is_free)+" ✅ ",1),e[13]||(e[13]=a.createElementVNode("br",null,null,-1))])):a.createCommentVNode("",!0)]),r.emailLogin?(a.openBlock(),a.createElementBlock("span",yc,[a.createElementVNode("div",vc,[e[14]||(e[14]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"60%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=c=>r.email=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,name:"email",required:""},null,40,bc),[[a.vModelText,r.email]]),e[15]||(e[15]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",wc,[e[16]||(e[16]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/user.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.username=c),onKeydown:e[4]||(e[4]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",placeholder:n.ssoLang[this.appLanguage].username,name:"username",required:"",disabled:r.usernameRegister,class:a.normalizeClass({"input-disabled":r.usernameRegister})},null,42,kc),[[a.vModelText,r.username]]),e[17]||(e[17]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",Cc,[e[18]||(e[18]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,name:"password",required:"",minlength:"8"},null,8,Ec),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[6]||(e[6]=c=>r.revealPassword=!r.revealPassword),class:"pointer"},[a.withDirectives(a.createElementVNode("img",Tc,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",Sc,null,512),[[a.vShow,r.revealPassword]])])]),a.createElementVNode("button",Ic,[r.submitted?(a.openBlock(),a.createElementBlock("span",Rc)):(a.openBlock(),a.createElementBlock("span",Ac,a.toDisplayString(r.formButtonText),1))])])):a.createCommentVNode("",!0),e[26]||(e[26]=a.createElementVNode("div",{class:"decoration decoration-lines-thin half-top half-bottom"},null,-1)),n.displayAppleLogin?(a.openBlock(),a.createElementBlock("a",{key:2,onClick:e[7]||(e[7]=(...c)=>n.appleLogin&&n.appleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[19]||(e[19]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/apple-logo.png",style:{position:"absolute","margin-left":"-11px",padding:"8px 0",height:"100%"}},null,-1)),n.appleLoad?(a.openBlock(),a.createElementBlock("span",Pc)):(a.openBlock(),a.createElementBlock("span",Nc,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Apple",1))])):a.createCommentVNode("",!0),a.createElementVNode("a",{onClick:e[8]||(e[8]=(...c)=>n.googleLogin&&n.googleLogin(...c)),class:"button-center button button-90 google-button pointer"},[e[20]||(e[20]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/g-logo.png",style:{position:"absolute","margin-left":"-9px",padding:"8px 0",height:"100%"}},null,-1)),n.googleLoad?(a.openBlock(),a.createElementBlock("span",Lc)):(a.openBlock(),a.createElementBlock("span",Mc,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Google",1))]),r.emailLogin?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:3,onClick:e[9]||(e[9]=c=>r.emailLogin=!0),class:"button-center button button-90 google-button pointer"},[e[21]||(e[21]=a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",style:{position:"absolute","margin-left":"-8px",padding:"12px 0",height:"100%"}},null,-1)),a.createElementVNode("span",null,a.toDisplayString(n.ssoLang[this.appLanguage].sign_up_with)+" Email",1)])),e[27]||(e[27]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),a.createElementVNode("p",Oc,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].terms_by_registering)+" ",1),e[22]||(e[22]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("a",zc,a.toDisplayString(n.ssoLang[this.appLanguage].terms_of_service),1),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].and)+" ",1),a.createElementVNode("a",xc,a.toDisplayString(n.ssoLang[this.appLanguage].privacy_policy),1)]),e[28]||(e[28]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),t.isModal?(a.openBlock(),a.createElementBlock("div",{key:5,class:"page-login-links",onClick:e[10]||(e[10]=(...c)=>i.loginAccountModal&&i.loginAccountModal(...c))},[a.createElementVNode("a",Uc,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].or)+" ",1),e[24]||(e[24]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].sign_in_with_new),1)]),e[25]||(e[25]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Bc,[a.createVNode(s,{class:"create float-right",to:"/verify"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[23]||(e[23]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const Vo=nt(mc,[["render",Dc]]),jc=Object.freeze(Object.defineProperty({__proto__:null,default:Vo},Symbol.toStringTag,{value:"Module"})),qc={name:"AuthVerify",mixins:[We],props:{isModal:{type:Boolean,required:!1,default:!1}},data(){return{loading:!0,submitted:!1,action:"verify",email:"",code:"",captcha:""}},mounted(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route&&this.init()},methods:{init(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route.hash==="#reset"&&(this.action="reset"),this.$route.query.e&&(this.email=this.$route.query.e),this.$route.query.c&&(this.code=this.$route.query.c),X.$emit("ssoEvent",{name:"setLoading",data:!1})},async submit(){if(this.code.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);this.email=this.email.trim(),this.code=this.code.trim();let n={code:this.code,email:this.email,captchaToken:await this.getCaptchaToken("account_verify")};if(this.submitted)return!1;this.submitted=!0;let e=await this.verify(n);this.submitted=!1,e&&e.data&&e.data.success===!0?(this.action==="reset"&&(this.$router.push("/reset?c="+this.code+"&e="+this.email),this.successSnack(this.ssoLang[this.appLanguage].verify_account_success)),this.action==="verify"&&(this.isModal&&(this.email="",this.code="",X.$emit("closeModal")),await this.loginSetup(e),await this.getLoggedInAccounts(),this.$storex.verifyEmail="",this.$router.push("/"+e.data.data.username+"#edit"),this.successSnack(this.ssoLang[this.appLanguage].verify_account_success2))):this.submitted=!1},registerAccountModal(){X.$emit("ssoEvent",{name:"toggleAddAccountModalRegister",data:!1})},close(){X.$emit("ssoEvent",{name:"toggleAddAccountModal",data:!0})}},watch:{"$storage.verifyEmail"(n){n&&(this.email=n)},"route.name"(n,e){!e&&n&&this.init()},"route.query":{handler(n){this.isEmpty(n)||this.init()},deep:!0}}},Fc={class:"bold no-bottom center-text text-[24px]",style:{"margin-top":"63px"}},Vc={class:"page-login-field half-top"},Hc=["placeholder"],Kc={class:"page-login-field half-top"},Gc=["placeholder"],$c={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Qc={key:0,class:"uppercase"},Wc={key:1,class:"button--loading button__loader"},Yc={class:"close-text center-text half-top color-black"},Jc=["innerHTML"],Xc={key:1,class:"page-login-links"},Zc={key:2,class:"page-login-links"};function el(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("form",{class:"page-login content-boxed content-boxed-padding",onSubmit:e[6]||(e[6]=a.withModifiers((...c)=>i.submit&&i.submit(...c),["prevent"])),style:a.normalizeStyle(t.isModal?"max-width: 500px;":"")},[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("h1",Fc,a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1),e[16]||(e[16]=a.createElementVNode("p",{class:"half-bottom half-top center-text color-black"},null,-1)),a.createElementVNode("div",Vc,[e[8]||(e[8]=a.createElementVNode("i",{style:{"padding-top":"15px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"80%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"emailInput","onUpdate:modelValue":e[1]||(e[1]=c=>r.email=c),onKeydown:e[2]||(e[2]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,required:""},null,40,Hc),[[a.vModelText,r.email]]),e[9]||(e[9]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("div",Kc,[e[10]||(e[10]=a.createElementVNode("i",{style:{"padding-top":"15px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/password2.png",class:"responsive-image",style:{width:"100%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"codeInput","onUpdate:modelValue":e[3]||(e[3]=c=>r.code=c),onKeydown:e[4]||(e[4]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"tel",placeholder:n.ssoLang[this.appLanguage].code,required:""},null,40,Gc),[[a.vModelText,r.code]]),e[11]||(e[11]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("button",$c,[r.submitted?(a.openBlock(),a.createElementBlock("span",Wc)):(a.openBlock(),a.createElementBlock("span",Qc,a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1))]),e[17]||(e[17]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),a.createElementVNode("p",Yc,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].verify_account_p1},null,8,Jc),e[12]||(e[12]=a.createElementVNode("a",{href:"mailto:support@tapni.com?subject=Email Verification"}," support@tapni.com",-1))]),e[18]||(e[18]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom"},null,-1)),t.isModal?(a.openBlock(),a.createElementBlock("div",Zc,[a.createElementVNode("a",{class:"forgot center-text pointer small-top",onClick:e[5]||(e[5]=a.withModifiers((...c)=>i.registerAccountModal&&i.registerAccountModal(...c),["prevent"]))},[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].or)+" ",1),e[14]||(e[14]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].create_new_account),1)]),e[15]||(e[15]=a.createElementVNode("div",{class:"clear"},null,-1))])):(a.openBlock(),a.createElementBlock("div",Xc,[a.createVNode(s,{class:"create float-right",to:"/register"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].register),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[13]||(e[13]=a.createElementVNode("div",{class:"clear"},null,-1))]))],36)}const Ho=nt(qc,[["render",el],["__scopeId","data-v-96f72130"]]),tl=Object.freeze(Object.defineProperty({__proto__:null,default:Ho},Symbol.toStringTag,{value:"Module"}));var ci={exports:{}};(function(n,e){(function(t,o){n.exports=o()})(window,function(){return function(t){var o={};function r(i){if(o[i])return o[i].exports;var s=o[i]={i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=t,r.c=o,r.d=function(i,s,c){r.o(i,s)||Object.defineProperty(i,s,{enumerable:!0,get:c})},r.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},r.t=function(i,s){if(1&s&&(i=r(i)),8&s||4&s&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&s&&typeof i!="string")for(var l in i)r.d(c,l,(function(h){return i[h]}).bind(null,l));return c},r.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(s,"a",s),s},r.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},r.p="",r(r.s=12)}([function(t,o,r){var i;t.exports=(i=i||function(s,c){var l=Object.create||function(){function T(){}return function(B){var V;return T.prototype=B,V=new T,T.prototype=null,V}}(),h={},u=h.lib={},g=u.Base={extend:function(T){var B=l(this);return T&&B.mixIn(T),B.hasOwnProperty("init")&&this.init!==B.init||(B.init=function(){B.$super.init.apply(this,arguments)}),B.init.prototype=B,B.$super=this,B},create:function(){var T=this.extend();return T.init.apply(T,arguments),T},init:function(){},mixIn:function(T){for(var B in T)T.hasOwnProperty(B)&&(this[B]=T[B]);T.hasOwnProperty("toString")&&(this.toString=T.toString)},clone:function(){return this.init.prototype.extend(this)}},f=u.WordArray=g.extend({init:function(T,B){T=this.words=T||[],this.sigBytes=B??4*T.length},toString:function(T){return(T||C).stringify(this)},concat:function(T){var B=this.words,V=T.words,G=this.sigBytes,J=T.sigBytes;if(this.clamp(),G%4)for(var I=0;I<J;I++){var W=V[I>>>2]>>>24-I%4*8&255;B[G+I>>>2]|=W<<24-(G+I)%4*8}else for(I=0;I<J;I+=4)B[G+I>>>2]=V[I>>>2];return this.sigBytes+=J,this},clamp:function(){var T=this.words,B=this.sigBytes;T[B>>>2]&=4294967295<<32-B%4*8,T.length=s.ceil(B/4)},clone:function(){var T=g.clone.call(this);return T.words=this.words.slice(0),T},random:function(T){for(var B,V=[],G=function(W){W=W;var ie=987654321,ee=4294967295;return function(){var ye=((ie=36969*(65535&ie)+(ie>>16)&ee)<<16)+(W=18e3*(65535&W)+(W>>16)&ee)ⅇreturn ye/=4294967296,(ye+=.5)*(s.random()>.5?1:-1)}},J=0;J<T;J+=4){var I=G(4294967296*(B||s.random()));B=987654071*I(),V.push(4294967296*I()|0)}return new f.init(V,T)}}),w=h.enc={},C=w.Hex={stringify:function(T){for(var B=T.words,V=T.sigBytes,G=[],J=0;J<V;J++){var I=B[J>>>2]>>>24-J%4*8&255;G.push((I>>>4).toString(16)),G.push((15&I).toString(16))}return G.join("")},parse:function(T){for(var B=T.length,V=[],G=0;G<B;G+=2)V[G>>>3]|=parseInt(T.substr(G,2),16)<<24-G%8*4;return new f.init(V,B/2)}},P=w.Latin1={stringify:function(T){for(var B=T.words,V=T.sigBytes,G=[],J=0;J<V;J++){var I=B[J>>>2]>>>24-J%4*8&255;G.push(String.fromCharCode(I))}return G.join("")},parse:function(T){for(var B=T.length,V=[],G=0;G<B;G++)V[G>>>2]|=(255&T.charCodeAt(G))<<24-G%4*8;return new f.init(V,B)}},M=w.Utf8={stringify:function(T){try{return decodeURIComponent(escape(P.stringify(T)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(T){return P.parse(unescape(encodeURIComponent(T)))}},j=u.BufferedBlockAlgorithm=g.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(T){typeof T=="string"&&(T=M.parse(T)),this._data.concat(T),this._nDataBytes+=T.sigBytes},_process:function(T){var B=this._data,V=B.words,G=B.sigBytes,J=this.blockSize,I=G/(4*J),W=(I=T?s.ceil(I):s.max((0|I)-this._minBufferSize,0))*J,ie=s.min(4*W,G);if(W){for(var ee=0;ee<W;ee+=J)this._doProcessBlock(V,ee);var ye=V.splice(0,W);B.sigBytes-=ie}return new f.init(ye,ie)},clone:function(){var T=g.clone.call(this);return T._data=this._data.clone(),T},_minBufferSize:0}),N=(u.Hasher=j.extend({cfg:g.extend(),init:function(T){this.cfg=this.cfg.extend(T),this.reset()},reset:function(){j.reset.call(this),this._doReset()},update:function(T){return this._append(T),this._process(),this},finalize:function(T){return T&&this._append(T),this._doFinalize()},blockSize:16,_createHelper:function(T){return function(B,V){return new T.init(V).finalize(B)}},_createHmacHelper:function(T){return function(B,V){return new N.HMAC.init(T,V).finalize(B)}}}),h.algo={});return h}(Math),i)},function(t,o,r){var i,s,c,l;t.exports=(i=r(0),c=(s=i).lib.Base,l=s.enc.Utf8,void(s.algo.HMAC=c.extend({init:function(h,u){h=this._hasher=new h.init,typeof u=="string"&&(u=l.parse(u));var g=h.blockSize,f=4*g;u.sigBytes>f&&(u=h.finalize(u)),u.clamp();for(var w=this._oKey=u.clone(),C=this._iKey=u.clone(),P=w.words,M=C.words,j=0;j<g;j++)P[j]^=1549556828,M[j]^=909522486;w.sigBytes=C.sigBytes=f,this.reset()},reset:function(){var h=this._hasher;h.reset(),h.update(this._iKey)},update:function(h){return this._hasher.update(h),this},finalize:function(h){var u=this._hasher,g=u.finalize(h);return u.reset(),u.finalize(this._oKey.clone().concat(g))}})))},function(t,o,r){var i;t.exports=(i=r(0),i.enc.Hex)},function(t,o,r){var i,s,c,l,h,u;t.exports=(u=r(0),s=(i=u).lib,c=s.Base,l=s.WordArray,(h=i.x64={}).Word=c.extend({init:function(g,f){this.high=g,this.low=f}}),h.WordArray=c.extend({init:function(g,f){g=this.words=g||[],this.sigBytes=f??8*g.length},toX32:function(){for(var g=this.words,f=g.length,w=[],C=0;C<f;C++){var P=g[C];w.push(P.high),w.push(P.low)}return l.create(w,this.sigBytes)},clone:function(){for(var g=c.clone.call(this),f=g.words=this.words.slice(0),w=f.length,C=0;C<w;C++)f[C]=f[C].clone();return g}}),u)},function(t,o,r){var i;t.exports=(i=r(0),r(9),r(1),i.HmacSHA1)},function(t,o,r){var i;t.exports=(i=r(0),r(10),r(1),i.HmacSHA256)},function(t,o,r){var i;t.exports=(i=r(0),r(3),r(11),r(1),i.HmacSHA512)},function(t,o){function r(i,s){var c=i.indexOf(s);if(c===-1)throw new Error("Invalid character found: "+s);return c}t.exports=function(i,s){var c;switch(s){case"RFC3548":case"RFC4648":c="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",i=i.replace(/=+$/,"");break;case"RFC4648-HEX":c="0123456789ABCDEFGHIJKLMNOPQRSTUV",i=i.replace(/=+$/,"");break;case"Crockford":c="0123456789ABCDEFGHJKMNPQRSTVWXYZ",i=i.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1");break;default:throw new Error("Unknown base32 variant: "+s)}for(var l=i.length,h=0,u=0,g=0,f=new Uint8Array(5*l/8|0),w=0;w<l;w++)u=u<<5|r(c,i[w]),(h+=5)>=8&&(f[g++]=u>>>h-8&255,h-=8);return f.buffer}},function(t,o){t.exports=function(r,i,s){var c,l;switch(s=s||{},i){case"RFC3548":case"RFC4648":c="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",l=!0;break;case"RFC4648-HEX":c="0123456789ABCDEFGHIJKLMNOPQRSTUV",l=!0;break;case"Crockford":c="0123456789ABCDEFGHJKMNPQRSTVWXYZ",l=!1;break;default:throw new Error("Unknown base32 variant: "+i)}for(var h=s.padding!==void 0?s.padding:l,u=r.byteLength,g=new Uint8Array(r),f=0,w=0,C="",P=0;P<u;P++)for(w=w<<8|g[P],f+=8;f>=5;)C+=c[w>>>f-5&31],f-=5;if(f>0&&(C+=c[w<<5-f&31]),h)for(;C.length%8!=0;)C+="=";return C}},function(t,o,r){var i,s,c,l,h,u,g,f;t.exports=(f=r(0),s=(i=f).lib,c=s.WordArray,l=s.Hasher,h=i.algo,u=[],g=h.SHA1=l.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(w,C){for(var P=this._hash.words,M=P[0],j=P[1],N=P[2],T=P[3],B=P[4],V=0;V<80;V++){if(V<16)u[V]=0|w[C+V];else{var G=u[V-3]^u[V-8]^u[V-14]^u[V-16];u[V]=G<<1|G>>>31}var J=(M<<5|M>>>27)+B+u[V];J+=V<20?1518500249+(j&N|~j&T):V<40?1859775393+(j^N^T):V<60?(j&N|j&T|N&T)-1894007588:(j^N^T)-899497514,B=T,T=N,N=j<<30|j>>>2,j=M,M=J}P[0]=P[0]+M|0,P[1]=P[1]+j|0,P[2]=P[2]+N|0,P[3]=P[3]+T|0,P[4]=P[4]+B|0},_doFinalize:function(){var w=this._data,C=w.words,P=8*this._nDataBytes,M=8*w.sigBytes;return C[M>>>5]|=128<<24-M%32,C[14+(M+64>>>9<<4)]=Math.floor(P/4294967296),C[15+(M+64>>>9<<4)]=P,w.sigBytes=4*C.length,this._process(),this._hash},clone:function(){var w=l.clone.call(this);return w._hash=this._hash.clone(),w}}),i.SHA1=l._createHelper(g),i.HmacSHA1=l._createHmacHelper(g),f.SHA1)},function(t,o,r){var i;t.exports=(i=r(0),function(s){var c=i,l=c.lib,h=l.WordArray,u=l.Hasher,g=c.algo,f=[],w=[];(function(){function M(B){for(var V=s.sqrt(B),G=2;G<=V;G++)if(!(B%G))return!1;return!0}function j(B){return 4294967296*(B-(0|B))|0}for(var N=2,T=0;T<64;)M(N)&&(T<8&&(f[T]=j(s.pow(N,.5))),w[T]=j(s.pow(N,1/3)),T++),N++})();var C=[],P=g.SHA256=u.extend({_doReset:function(){this._hash=new h.init(f.slice(0))},_doProcessBlock:function(M,j){for(var N=this._hash.words,T=N[0],B=N[1],V=N[2],G=N[3],J=N[4],I=N[5],W=N[6],ie=N[7],ee=0;ee<64;ee++){if(ee<16)C[ee]=0|M[j+ee];else{var ye=C[ee-15],Re=(ye<<25|ye>>>7)^(ye<<14|ye>>>18)^ye>>>3,le=C[ee-2],Me=(le<<15|le>>>17)^(le<<13|le>>>19)^le>>>10;C[ee]=Re+C[ee-7]+Me+C[ee-16]}var vt=T&B^T&V^B&V,Pt=(T<<30|T>>>2)^(T<<19|T>>>13)^(T<<10|T>>>22),at=ie+((J<<26|J>>>6)^(J<<21|J>>>11)^(J<<7|J>>>25))+(J&I^~J&W)+w[ee]+C[ee];ie=W,W=I,I=J,J=G+at|0,G=V,V=B,B=T,T=at+(Pt+vt)|0}N[0]=N[0]+T|0,N[1]=N[1]+B|0,N[2]=N[2]+V|0,N[3]=N[3]+G|0,N[4]=N[4]+J|0,N[5]=N[5]+I|0,N[6]=N[6]+W|0,N[7]=N[7]+ie|0},_doFinalize:function(){var M=this._data,j=M.words,N=8*this._nDataBytes,T=8*M.sigBytes;return j[T>>>5]|=128<<24-T%32,j[14+(T+64>>>9<<4)]=s.floor(N/4294967296),j[15+(T+64>>>9<<4)]=N,M.sigBytes=4*j.length,this._process(),this._hash},clone:function(){var M=u.clone.call(this);return M._hash=this._hash.clone(),M}});c.SHA256=u._createHelper(P),c.HmacSHA256=u._createHmacHelper(P)}(Math),i.SHA256)},function(t,o,r){var i;t.exports=(i=r(0),r(3),function(){var s=i,c=s.lib.Hasher,l=s.x64,h=l.Word,u=l.WordArray,g=s.algo;function f(){return h.create.apply(h,arguments)}var w=[f(1116352408,3609767458),f(1899447441,602891725),f(3049323471,3964484399),f(3921009573,2173295548),f(961987163,4081628472),f(1508970993,3053834265),f(2453635748,2937671579),f(2870763221,3664609560),f(3624381080,2734883394),f(310598401,1164996542),f(607225278,1323610764),f(1426881987,3590304994),f(1925078388,4068182383),f(2162078206,991336113),f(2614888103,633803317),f(3248222580,3479774868),f(3835390401,2666613458),f(4022224774,944711139),f(264347078,2341262773),f(604807628,2007800933),f(770255983,1495990901),f(1249150122,1856431235),f(1555081692,3175218132),f(1996064986,2198950837),f(2554220882,3999719339),f(2821834349,766784016),f(2952996808,2566594879),f(3210313671,3203337956),f(3336571891,1034457026),f(3584528711,2466948901),f(113926993,3758326383),f(338241895,168717936),f(666307205,1188179964),f(773529912,1546045734),f(1294757372,1522805485),f(1396182291,2643833823),f(1695183700,2343527390),f(1986661051,1014477480),f(2177026350,1206759142),f(2456956037,344077627),f(2730485921,1290863460),f(2820302411,3158454273),f(3259730800,3505952657),f(3345764771,106217008),f(3516065817,3606008344),f(3600352804,1432725776),f(4094571909,1467031594),f(275423344,851169720),f(430227734,3100823752),f(506948616,1363258195),f(659060556,3750685593),f(883997877,3785050280),f(958139571,3318307427),f(1322822218,3812723403),f(1537002063,2003034995),f(1747873779,3602036899),f(1955562222,1575990012),f(2024104815,1125592928),f(2227730452,2716904306),f(2361852424,442776044),f(2428436474,593698344),f(2756734187,3733110249),f(3204031479,2999351573),f(3329325298,3815920427),f(3391569614,3928383900),f(3515267271,566280711),f(3940187606,3454069534),f(4118630271,4000239992),f(116418474,1914138554),f(174292421,2731055270),f(289380356,3203993006),f(460393269,320620315),f(685471733,587496836),f(852142971,1086792851),f(1017036298,365543100),f(1126000580,2618297676),f(1288033470,3409855158),f(1501505948,4234509866),f(1607167915,987167468),f(1816402316,1246189591)],C=[];(function(){for(var M=0;M<80;M++)C[M]=f()})();var P=g.SHA512=c.extend({_doReset:function(){this._hash=new u.init([new h.init(1779033703,4089235720),new h.init(3144134277,2227873595),new h.init(1013904242,4271175723),new h.init(2773480762,1595750129),new h.init(1359893119,2917565137),new h.init(2600822924,725511199),new h.init(528734635,4215389547),new h.init(1541459225,327033209)])},_doProcessBlock:function(M,j){for(var N=this._hash.words,T=N[0],B=N[1],V=N[2],G=N[3],J=N[4],I=N[5],W=N[6],ie=N[7],ee=T.high,ye=T.low,Re=B.high,le=B.low,Me=V.high,vt=V.low,Pt=G.high,at=G.low,dn=J.high,Jt=J.low,un=I.high,Xt=I.low,Sn=W.high,Ce=W.low,Se=ie.high,Kt=ie.low,De=ee,Le=ye,Mt=Re,bt=le,Qe=Me,st=vt,Gt=Pt,Lt=at,Ge=dn,Ie=Jt,ct=un,Ot=Xt,zt=Sn,ht=Ce,pn=Se,wt=Kt,je=0;je<80;je++){var mt=C[je];if(je<16)var Oe=mt.high=0|M[j+2*je],lt=mt.low=0|M[j+2*je+1];else{var hn=C[je-15],qe=hn.high,xt=hn.low,m=(qe>>>1|xt<<31)^(qe>>>8|xt<<24)^qe>>>7,d=(xt>>>1|qe<<31)^(xt>>>8|qe<<24)^(xt>>>7|qe<<25),p=C[je-2],_=p.high,k=p.low,S=(_>>>19|k<<13)^(_<<3|k>>>29)^_>>>6,L=(k>>>19|_<<13)^(k<<3|_>>>29)^(k>>>6|_<<26),se=C[je-7],ve=se.high,_e=se.low,be=C[je-16],me=be.high,lo=be.low;Oe=(Oe=(Oe=m+ve+((lt=d+_e)>>>0<d>>>0?1:0))+S+((lt+=L)>>>0<L>>>0?1:0))+me+((lt+=lo)>>>0<lo>>>0?1:0),mt.high=Oe,mt.low=lt}var kt,Jo=Ge&ct^~Ge&zt,uo=Ie&Ot^~Ie&ht,Xo=De&Mt^De&Qe^Mt&Qe,Zo=Le&bt^Le&st^bt&st,po=(De>>>28|Le<<4)^(De<<30|Le>>>2)^(De<<25|Le>>>7),ho=(Le>>>28|De<<4)^(Le<<30|De>>>2)^(Le<<25|De>>>7),er=(Ge>>>14|Ie<<18)^(Ge>>>18|Ie<<14)^(Ge<<23|Ie>>>9),tr=(Ie>>>14|Ge<<18)^(Ie>>>18|Ge<<14)^(Ie<<23|Ge>>>9),y=w[je],v=y.high,E=y.low,A=pn+er+((kt=wt+tr)>>>0<wt>>>0?1:0),O=ho+Zo;pn=zt,wt=ht,zt=ct,ht=Ot,ct=Ge,Ot=Ie,Ge=Gt+(A=(A=(A=A+Jo+((kt+=uo)>>>0<uo>>>0?1:0))+v+((kt+=E)>>>0<E>>>0?1:0))+Oe+((kt+=lt)>>>0<lt>>>0?1:0))+((Ie=Lt+kt|0)>>>0<Lt>>>0?1:0)|0,Gt=Qe,Lt=st,Qe=Mt,st=bt,Mt=De,bt=Le,De=A+(po+Xo+(O>>>0<ho>>>0?1:0))+((Le=kt+O|0)>>>0<kt>>>0?1:0)|0}ye=T.low=ye+Le,T.high=ee+De+(ye>>>0<Le>>>0?1:0),le=B.low=le+bt,B.high=Re+Mt+(le>>>0<bt>>>0?1:0),vt=V.low=vt+st,V.high=Me+Qe+(vt>>>0<st>>>0?1:0),at=G.low=at+Lt,G.high=Pt+Gt+(at>>>0<Lt>>>0?1:0),Jt=J.low=Jt+Ie,J.high=dn+Ge+(Jt>>>0<Ie>>>0?1:0),Xt=I.low=Xt+Ot,I.high=un+ct+(Xt>>>0<Ot>>>0?1:0),Ce=W.low=Ce+ht,W.high=Sn+zt+(Ce>>>0<ht>>>0?1:0),Kt=ie.low=Kt+wt,ie.high=Se+pn+(Kt>>>0<wt>>>0?1:0)},_doFinalize:function(){var M=this._data,j=M.words,N=8*this._nDataBytes,T=8*M.sigBytes;return j[T>>>5]|=128<<24-T%32,j[30+(T+128>>>10<<5)]=Math.floor(N/4294967296),j[31+(T+128>>>10<<5)]=N,M.sigBytes=4*j.length,this._process(),this._hash.toX32()},clone:function(){var M=c.clone.call(this);return M._hash=this._hash.clone(),M},blockSize:32});s.SHA512=c._createHelper(P),s.HmacSHA512=c._createHmacHelper(P)}(),i.SHA512)},function(t,o,r){r.r(o);var i,s=r(0),c=r.n(s),l=r(4),h=r.n(l),u=r(5),g=r.n(u),f=r(6),w=r.n(f),C=r(2),P=r.n(C);function M(y,v){var E=Object.keys(y);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(y);v&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(y,O).enumerable})),E.push.apply(E,A)}return E}function j(y){for(var v=1;v<arguments.length;v++){var E=arguments[v]!=null?arguments[v]:{};v%2?M(Object(E),!0).forEach(function(A){N(y,A,E[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(E)):M(Object(E)).forEach(function(A){Object.defineProperty(y,A,Object.getOwnPropertyDescriptor(E,A))})}return y}function N(y,v,E){return v in y?Object.defineProperty(y,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):y[v]=E,y}function T(y,v){for(var E=0;E<v.length;E++){var A=v[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(y,A.key,A)}}function B(y){return Object.keys(y).map(function(v){return y[v]})}(function(y){y.SHA1="sha1",y.SHA256="sha256",y.SHA512="sha512"})(i||(i={}));var V,G=B(i);(function(y){y.ASCII="ascii",y.BASE64="base64",y.HEX="hex",y.LATIN1="latin1",y.UTF8="utf8"})(V||(V={}));var J,I=B(V);(function(y){y.HOTP="hotp",y.TOTP="totp"})(J||(J={}));var W=B(J),ie=function(){throw new Error("Please provide an options.createDigest implementation.")};function ee(y){return/^(\d+)$/.test(y)}function ye(y,v,E){if(y.length>=v)return y;var A=Array(v+1).join(E);return"".concat(A).concat(y).slice(-1*v)}function Re(y){var v="otpauth://".concat(y.type,"/{labelPrefix}:{accountName}?secret={secret}{query}"),E=[];if(W.indexOf(y.type)<0)throw new Error("Expecting options.type to be one of ".concat(W.join(", "),". Received ").concat(y.type,"."));if(y.type==="hotp"){if(y.counter==null||typeof y.counter!="number")throw new Error('Expecting options.counter to be a number when options.type is "hotp".');E.push("&counter=".concat(y.counter))}return y.type==="totp"&&y.step&&E.push("&period=".concat(y.step)),y.digits&&E.push("&digits=".concat(y.digits)),y.algorithm&&E.push("&algorithm=".concat(y.algorithm.toUpperCase())),y.issuer&&E.push("&issuer=".concat(encodeURIComponent(y.issuer))),v.replace("{labelPrefix}",encodeURIComponent(y.issuer||y.accountName)).replace("{accountName}",encodeURIComponent(y.accountName)).replace("{secret}",y.secret).replace("{query}",E.join(""))}function le(y){return(le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(y)}function Me(y,v){for(var E=0;E<v.length;E++){var A=v[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(y,A.key,A)}}function vt(y,v){return!v||le(v)!=="object"&&typeof v!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(y):v}function Pt(y){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)})(y)}function at(y,v){return(at=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(y,v)}function dn(y,v){var E=Object.keys(y);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(y);v&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(y,O).enumerable})),E.push.apply(E,A)}return E}function Jt(y,v,E){return v in y?Object.defineProperty(y,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):y[v]=E,y}function un(y){if(typeof y.createDigest!="function")throw new Error("Expecting options.createDigest to be a function.");if(typeof y.createHmacKey!="function")throw new Error("Expecting options.createHmacKey to be a function.");if(typeof y.digits!="number")throw new Error("Expecting options.digits to be a number.");if(!y.algorithm||G.indexOf(y.algorithm)<0)throw new Error("Expecting options.algorithm to be one of ".concat(G.join(", "),". Received ").concat(y.algorithm,"."));if(!y.encoding||I.indexOf(y.encoding)<0)throw new Error("Expecting options.encoding to be one of ".concat(I.join(", "),". Received ").concat(y.encoding,"."))}var Xt=function(y,v,E){return nn.from(v,E).toString("hex")};function Sn(y){var v=function(E){for(var A=1;A<arguments.length;A++){var O=arguments[A]!=null?arguments[A]:{};A%2?dn(Object(O),!0).forEach(function(q){Jt(E,q,O[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(O)):dn(Object(O)).forEach(function(q){Object.defineProperty(E,q,Object.getOwnPropertyDescriptor(O,q))})}return E}({},{algorithm:i.SHA1,createHmacKey:Xt,createDigest:ie,digits:6,encoding:V.ASCII},{},y);return un(v),Object.freeze(v)}function Ce(y,v,E){var A=function(q){return ye(q.toString(16),16,"0")}(v),O=E.createHmacKey(E.algorithm,y,E.encoding);return E.createDigest(E.algorithm,O,A)}function Se(y,v,E){return function(A,O){var q=nn.from(A,"hex"),pe=15&q[q.length-1],et=((127&q[pe])<<24|(255&q[pe+1])<<16|(255&q[pe+2])<<8|255&q[pe+3])%Math.pow(10,O);return ye(String(et),O,"0")}(E.digest||Ce(y,v,E),E.digits)}function Kt(y,v,E,A,O){return Re({algorithm:O.algorithm,digits:O.digits,type:J.HOTP,accountName:y,counter:A,issuer:v,secret:E})}var De=function(y){function v(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,v),vt(this,Pt(v).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&at(O,q)}(v,y),E=v,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new v(O)}},{key:"allOptions",value:function(){return Sn(this.options)}},{key:"generate",value:function(O,q){return Se(O,q,this.allOptions())}},{key:"check",value:function(O,q,pe){return function(et,Bt,Zt,nr){return!!ee(et)&&et===Se(Bt,Zt,nr)}(O,q,pe,this.allOptions())}},{key:"verify",value:function(O){if(le(O)!=="object")throw new Error("Expecting argument 0 of verify to be an object");return this.check(O.token,O.secret,O.counter)}},{key:"keyuri",value:function(O,q,pe,et){return Kt(O,q,pe,et,this.allOptions())}}])&&Me(E.prototype,A),v}(function(){function y(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")})(this,y),this._defaultOptions=Object.freeze(j({},A)),this._options=Object.freeze({})}var v,E;return v=y,(E=[{key:"create",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new y(A)}},{key:"clone",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=this.create(j({},this._defaultOptions,{},A));return O.options=this._options,O}},{key:"allOptions",value:function(){return this.options}},{key:"resetOptions",value:function(){this._options=Object.freeze({})}},{key:"options",get:function(){return Object.freeze(j({},this._defaultOptions,{},this._options))},set:function(A){this._options=Object.freeze(j({},this._options,{},A))}}])&&T(v.prototype,E),y}());function Le(y){return(Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(y)}function Mt(y,v){for(var E=0;E<v.length;E++){var A=v[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(y,A.key,A)}}function bt(y,v){return!v||Le(v)!=="object"&&typeof v!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(y):v}function Qe(y){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)})(y)}function st(y,v){return(st=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(y,v)}function Gt(y,v){var E=Object.keys(y);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(y);v&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(y,O).enumerable})),E.push.apply(E,A)}return E}function Lt(y){for(var v=1;v<arguments.length;v++){var E=arguments[v]!=null?arguments[v]:{};v%2?Gt(Object(E),!0).forEach(function(A){Ge(y,A,E[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(E)):Gt(Object(E)).forEach(function(A){Object.defineProperty(y,A,Object.getOwnPropertyDescriptor(E,A))})}return y}function Ge(y,v,E){return v in y?Object.defineProperty(y,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):y[v]=E,y}function Ie(y,v){return function(E){if(Array.isArray(E))return E}(y)||function(E,A){if(Symbol.iterator in Object(E)||Object.prototype.toString.call(E)==="[object Arguments]"){var O=[],q=!0,pe=!1,et=void 0;try{for(var Bt,Zt=E[Symbol.iterator]();!(q=(Bt=Zt.next()).done)&&(O.push(Bt.value),!A||O.length!==A);q=!0);}catch(nr){pe=!0,et=nr}finally{try{q||Zt.return==null||Zt.return()}finally{if(pe)throw et}}return O}}(y,v)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ct(y){if(typeof y=="number")return[Math.abs(y),Math.abs(y)];if(Array.isArray(y)){var v=Ie(y,2),E=v[0],A=v[1];if(typeof E=="number"&&typeof A=="number")return[Math.abs(E),Math.abs(A)]}throw new Error("Expecting options.window to be an number or [number, number].")}function Ot(y){if(un(y),ct(y.window),typeof y.epoch!="number")throw new Error("Expecting options.epoch to be a number.");if(typeof y.step!="number")throw new Error("Expecting options.step to be a number.")}var zt=function(y,v,E){var A=y.length,O=nn.from(y,v).toString("hex");if(A<E){var q=new Array(E-A+1).join(O);return nn.from(q,"hex").slice(0,E).toString("hex")}return O},ht=function(y,v,E){switch(y){case i.SHA1:return zt(v,E,20);case i.SHA256:return zt(v,E,32);case i.SHA512:return zt(v,E,64);default:throw new Error("Expecting algorithm to be one of ".concat(G.join(", "),". Received ").concat(y,"."))}};function pn(y){var v=Lt({},{algorithm:i.SHA1,createDigest:ie,createHmacKey:ht,digits:6,encoding:V.ASCII,epoch:Date.now(),step:30,window:0},{},y);return Ot(v),Object.freeze(v)}function wt(y,v){var E,A;return Se(y,(E=v.epoch,A=v.step,Math.floor(E/A/1e3)),v)}function je(y,v,E,A){var O=[];if(A===0)return O;for(var q=1;q<=A;q++){var pe=v*q*E;O.push(y+pe)}return O}function mt(y,v,E){return!!ee(y)&&y===wt(v,E)}function Oe(y,v,E,A){var O=null;return y.some(function(q,pe){return!!mt(v,E,Lt({},A,{epoch:q}))&&(O=pe+1,!0)}),O}function lt(y,v,E){if(mt(y,v,E))return 0;var A,O,q,pe,et,Bt=(A=E.epoch,O=E.step,q=E.window,pe=ct(q),{current:A,past:je(A,-1,et=1e3*O,pe[0]),future:je(A,1,et,pe[1])}),Zt=Oe(Bt.past,y,v,E);return Zt!==null?-1*Zt:Oe(Bt.future,y,v,E)}function hn(y,v){return Math.floor(y/1e3)%v}function qe(y,v,E,A){return Re({algorithm:A.algorithm,digits:A.digits,step:A.step,type:J.TOTP,accountName:y,issuer:v,secret:E})}var xt=function(y){function v(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,v),bt(this,Qe(v).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&st(O,q)}(v,y),E=v,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new v(O)}},{key:"allOptions",value:function(){return pn(this.options)}},{key:"generate",value:function(O){return wt(O,this.allOptions())}},{key:"checkDelta",value:function(O,q){return lt(O,q,this.allOptions())}},{key:"check",value:function(O,q){return typeof this.checkDelta(O,q)=="number"}},{key:"verify",value:function(O){if(Le(O)!=="object")throw new Error("Expecting argument 0 of verify to be an object");return this.check(O.token,O.secret)}},{key:"timeRemaining",value:function(){var O,q,pe=this.allOptions();return O=pe.epoch,(q=pe.step)-hn(O,q)}},{key:"timeUsed",value:function(){var O=this.allOptions();return hn(O.epoch,O.step)}},{key:"keyuri",value:function(O,q,pe){return qe(O,q,pe,this.allOptions())}}])&&Mt(E.prototype,A),v}(De);function m(y){return(m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(y)}function d(y,v){for(var E=0;E<v.length;E++){var A=v[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(y,A.key,A)}}function p(y,v){return!v||m(v)!=="object"&&typeof v!="function"?function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(y):v}function _(y){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)})(y)}function k(y,v){return(k=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E})(y,v)}function S(y,v){var E=Object.keys(y);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(y);v&&(A=A.filter(function(O){return Object.getOwnPropertyDescriptor(y,O).enumerable})),E.push.apply(E,A)}return E}function L(y,v,E){return v in y?Object.defineProperty(y,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):y[v]=E,y}function se(y){var v=function(E){for(var A=1;A<arguments.length;A++){var O=arguments[A]!=null?arguments[A]:{};A%2?S(Object(O),!0).forEach(function(q){L(E,q,O[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(O)):S(Object(O)).forEach(function(q){Object.defineProperty(E,q,Object.getOwnPropertyDescriptor(O,q))})}return E}({},{algorithm:i.SHA1,createDigest:ie,createHmacKey:ht,digits:6,encoding:V.HEX,epoch:Date.now(),step:30,window:0},{},y);return function(E){if(Ot(E),typeof E.keyDecoder!="function")throw new Error("Expecting options.keyDecoder to be a function.");if(E.keyEncoder&&typeof E.keyEncoder!="function")throw new Error("Expecting options.keyEncoder to be a function.")}(v),Object.freeze(v)}function ve(y,v){return v.keyEncoder(y,v.encoding)}function _e(y,v){return v.keyDecoder(y,v.encoding)}function be(y,v){return ve(v.createRandomBytes(y,v.encoding),v)}var me=function(y){function v(){return function(O,q){if(!(O instanceof q))throw new TypeError("Cannot call a class as a function")}(this,v),p(this,_(v).apply(this,arguments))}var E,A;return function(O,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(q&&q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),q&&k(O,q)}(v,y),E=v,(A=[{key:"create",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new v(O)}},{key:"allOptions",value:function(){return se(this.options)}},{key:"generate",value:function(O){return function(q,pe){return wt(_e(q,pe),pe)}(O,this.allOptions())}},{key:"checkDelta",value:function(O,q){return function(pe,et,Bt){return lt(pe,_e(et,Bt),Bt)}(O,q,this.allOptions())}},{key:"encode",value:function(O){return ve(O,this.allOptions())}},{key:"decode",value:function(O){return _e(O,this.allOptions())}},{key:"generateSecret",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;return be(O,this.allOptions())}}])&&d(E.prototype,A),v}(xt),lo=c.a.lib.WordArray,kt=function(y,v,E){var A=function(pe){switch(pe){case i.SHA1:return h.a;case i.SHA256:return g.a;case i.SHA512:return w.a;default:throw new Error("Expecting argument 0 to be one of ".concat(G.join(", "),". Received ").concat(pe,"."))}}(y),O=P.a.parse(E),q=P.a.parse(v);return String(A(O,q))},Jo=r(7),uo=r.n(Jo),Xo=r(8),Zo=r.n(Xo);function po(y){return(po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(y)}r.d(o,"hotp",function(){return ho}),r.d(o,"totp",function(){return er}),r.d(o,"authenticator",function(){return tr}),(typeof window>"u"?"undefined":po(window))==="object"&&window.Buffer===void 0&&(window.Buffer=buffer.Buffer);var ho=new De({createDigest:kt}),er=new xt({createDigest:kt}),tr=new me({createDigest:kt,createRandomBytes:function(y,v){var E=lo.random(y);return nn.from(E.toString(),"hex").toString(v)},keyDecoder:function(y,v){var E=uo()(y.toUpperCase(),"RFC4648");return nn.from(E).toString(v)},keyEncoder:function(y,v){return Zo()(nn.from(y,v),"RFC4648",{padding:!1})}})}])})})(ci);var li=ci.exports;const nl={name:"AuthSecurity",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{accountDelete:!1,changePassword:!1,password:"",passwordRepeat:"",currentPassword:"",otpSecret:null,mfaEnable:!1,qrCodeHash:null,qrCodeRefreshInterval:null,poolingInterval:null,loading:!1}},async mounted(){this.isLoggedIn||this.$router.push("/login"),this.renderView==="AuthSecurity"&&(await this.getAccountSettings(),this.generateOTPQrCode())},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},async deleteAccountSubmit(){await this.deleteAccount()===!0&&(this.successSnack(this.ssoLang[this.appLanguage].profile_delete_account_success),setTimeout(this.$store.dispatch("logout"),1e3))},generateOTPQrCode(){const n=this.account.email;if(this.account.mfaEnabled)this.mfaEnable=!0;else{const e="Tapni",t=li.authenticator.generateSecret();this.otpSecret=t;const o=li.authenticator.keyuri(n,e,t);new ir({width:200,height:200,data:o}).append(document.getElementById("qrCodeContainer"))}},async cancelMFA(){X.$emit("ssoEvent",{name:"mfaCancel",data:!0})},async validateMFA(){if(!this.otp||this.otp.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);this.loading=!0;let n={otpToken:this.otp,otpSecret:this.otpSecret,enable:this.mfaEnable};this.mfaEnable||delete n.otpSecret;const[e,t]=await fe(Fe.setMfa(n,this.$storex));if(e)return X.$emit("ssoEvent",{name:"setLoading",data:!1}),this.errorHandler(e);t.data.success&&(this.getAccountSettings(),this.successSnack(t.data.message)),this.loading=!1},async submitChangePassword(){if(this.password.length<8)return this.errorSnack(this.ssoLang[this.appLanguage].password_8_chars);if(this.password!==this.passwordRepeat)return this.errorSnack(this.ssoLang[this.appLanguage].password_not_match);await this.newPassword({currentPassword:this.currentPassword,password:this.password,passwordRepeat:this.passwordRepeat})===!0&&(this.successSnack(this.ssoLang[this.appLanguage].password_change_success),this.changePassword=!1)}}},ol={class:"page-login content-boxed content-boxed-padding"},rl={class:"subheaderContainer full-top"},il=["src"],al=["src"],sl={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},cl={class:"container center-text"},ll={class:"full-top"},dl={class:"settingRow"},ul={class:"firstRow"},pl={class:"ios-switch",style:{display:"inline-block"}},hl={class:"center-text half-top"},ml={class:"firstRow"},fl={class:"center-text no-margin"},gl={class:"margin-center left-text padding-left small-top"},_l={class:""},yl=["placeholder"],vl=["innerHTML"],bl={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},wl={key:0},kl={key:1,class:"button--loading button__loader"},Cl={class:"close-text center-text half-top"},El=["innerHTML"],Tl={key:1,class:"margin-center small-top",style:{width:"100%"}},Sl={class:"left-text"},Il={key:0},Al={key:1},Rl={class:"firstRow"},Nl=["src"],Pl=["placeholder"],Ml={class:"small-text small-top-padding small-bottom"},Ll=["placeholder"],Ol={class:"small-text small-top-padding small-bottom"},zl=["placeholder"],xl={class:"small-text small-top-padding small-bottom"},Bl={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},Ul={key:0},Dl={key:1,class:"button--loading button__loader"},jl={class:"center-text font-13 half-top half-bottom"},ql=["innerHTML"],Fl={class:"firstRow"},Vl={class:"red-text"},Hl=["src"],Kl={class:"center-text half-top"},Gl={class:"settingRow full-top"},$l={class:"firstRow"},Ql={class:"ios-switch",style:{display:"inline-block"}},Wl={class:"left-text small-top"},Yl={type:"submit",class:"button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},Jl={key:0},Xl={key:1,class:"button--loading button__loader"},Zl={class:"small-bottom red-text"};function ed(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",ol,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[15]||(e[15]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",rl,[n.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=c=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,il)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,al)]),_:1})),a.createElementVNode("h2",sl,a.toDisplayString(n.ssoLang[n.appLanguage].security),1)]),a.createElementVNode("div",cl,[a.createElementVNode("p",null,a.toDisplayString(n.ssoLang[n.appLanguage].security_p),1),a.createElementVNode("div",ll,[a.createElementVNode("div",dl,[a.createElementVNode("div",ul,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth),1),a.createElementVNode("div",pl,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",name:"ios-switch",class:"ios-switch-checkbox",id:"mfa-open-switch","onUpdate:modelValue":e[2]||(e[2]=c=>r.mfaEnable=c)},null,512),[[a.vModelCheckbox,r.mfaEnable]]),e[16]||(e[16]=a.createElementVNode("label",{class:"ios-switch-label",for:"mfa-open-switch"},null,-1))])])]),a.withDirectives(a.createElementVNode("div",hl,[e[17]||(e[17]=a.createElementVNode("div",{id:"qrCodeContainer",class:"qrCodeRounded",style:{"max-width":"100%"}},null,-1)),e[18]||(e[18]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",{class:"settingRow",onClick:e[3]||(e[3]=c=>n.copy(r.otpSecret))},[a.createElementVNode("div",ml,[a.createElementVNode("h4",fl,a.toDisplayString(r.otpSecret),1)])]),a.createElementVNode("div",gl,[a.createElementVNode("p",_l,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_qr),1)])],512),[[a.vShow,r.mfaEnable&&!n.account.mfaEnabled]]),n.account.mfaEnabled!==r.mfaEnable?(a.openBlock(),a.createElementBlock("form",{key:0,onSubmit:e[6]||(e[6]=a.withModifiers((...c)=>i.validateMFA&&i.validateMFA(...c),["prevent"])),class:"half-top"},[a.createElementVNode("div",null,[a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":e[4]||(e[4]=c=>n.otp=c),placeholder:n.ssoLang[n.appLanguage].otp_code,class:"edit-input h-40 lh-40",style:{margin:"0 auto",height:"25px",width:"100%"},required:"",onKeydown:e[5]||(e[5]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"]))},null,40,yl),[[a.vModelText,n.otp]]),a.createElementVNode("p",{class:"small-top full-bottom padding-left left-text",innerHTML:n.ssoLang[n.appLanguage].otp_subtitle},null,8,vl)]),a.createElementVNode("button",bl,[r.loading?(a.openBlock(),a.createElementBlock("span",kl)):(a.openBlock(),a.createElementBlock("span",wl,a.toDisplayString(n.ssoLang[n.appLanguage].continue),1))]),a.createElementVNode("p",Cl,[a.createElementVNode("span",{innerHTML:n.ssoLang[n.appLanguage].otp_p1},null,8,El),e[19]||(e[19]=a.createElementVNode("a",{href:"mailto:support@tapni.com?subject=MFA Authentication Problem"}," support@tapni.com",-1))])],32)):(a.openBlock(),a.createElementBlock("div",Tl,[a.createElementVNode("div",Sl,[r.mfaEnable?(a.openBlock(),a.createElementBlock("p",Il,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_enabled),1)):(a.openBlock(),a.createElementBlock("p",Al,a.toDisplayString(n.ssoLang[n.appLanguage].mfa_auth_p),1))])])),a.createElementVNode("div",{class:"settingRow full-top",onClick:e[7]||(e[7]=c=>r.changePassword=!r.changePassword)},[a.createElementVNode("div",Rl,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].change_password),1),a.createElementVNode("img",{class:a.normalizeClass(["transition-icon",{"rotate-icon":!!r.changePassword}]),src:n.getIcon("arrow-gray-down.svg")},null,10,Nl)])]),a.withDirectives(a.createElementVNode("form",{onSubmit:e[11]||(e[11]=a.withModifiers((...c)=>i.submitChangePassword&&i.submitChangePassword(...c),["prevent"])),class:"center-text half-top"},[a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[8]||(e[8]=c=>r.currentPassword=c),placeholder:n.ssoLang[n.appLanguage].password_current_p,class:"edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,Pl),[[a.vModelText,r.currentPassword]]),a.createElementVNode("p",Ml,a.toDisplayString(n.ssoLang[n.appLanguage].password_current),1),a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[9]||(e[9]=c=>r.password=c),placeholder:n.ssoLang[n.appLanguage].password_new_p,class:"bg-white edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,Ll),[[a.vModelText,r.password]]),a.createElementVNode("p",Ol,a.toDisplayString(n.ssoLang[n.appLanguage].password_new),1),a.withDirectives(a.createElementVNode("input",{type:"password","onUpdate:modelValue":e[10]||(e[10]=c=>r.passwordRepeat=c),placeholder:n.ssoLang[n.appLanguage].password_new_repeat_p,class:"edit-input h-40 lh-40",required:"",minlength:"8",style:{width:"100%"}},null,8,zl),[[a.vModelText,r.passwordRepeat]]),a.createElementVNode("p",xl,a.toDisplayString(n.ssoLang[n.appLanguage].password_new_repeat),1),a.createElementVNode("button",Bl,[r.loading?(a.openBlock(),a.createElementBlock("span",Dl)):(a.openBlock(),a.createElementBlock("span",Ul,a.toDisplayString(n.ssoLang[n.appLanguage].password_update),1))]),a.createElementVNode("p",jl,[a.createElementVNode("span",{innerHTML:n.ssoLang[n.appLanguage].password_reset},null,8,ql),a.createVNode(s,{to:"/reset",exact:"",class:"color-black"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].by_clicking_here),1)]),_:1})])],544),[[a.vShow,r.changePassword]]),a.createElementVNode("div",{class:"settingRow full-top",onClick:e[12]||(e[12]=c=>r.accountDelete=!r.accountDelete)},[a.createElementVNode("div",Fl,[a.createElementVNode("h4",Vl,a.toDisplayString(n.ssoLang[n.appLanguage].delete_account),1),a.createElementVNode("img",{class:a.normalizeClass(["transition-icon",{"rotate-icon":!!r.accountDelete}]),src:n.getIcon("arrow-gray-down.svg")},null,10,Hl)])]),a.withDirectives(a.createElementVNode("div",Kl,[a.createElementVNode("div",Gl,[a.createElementVNode("div",$l,[a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].active_account),1),a.createElementVNode("div",Ql,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",name:"ios-switch",class:"ios-switch-checkbox",id:"active-open-switch","onUpdate:modelValue":e[13]||(e[13]=c=>n.account.is_active=c)},null,512),[[a.vModelCheckbox,n.account.is_active]]),e[20]||(e[20]=a.createElementVNode("label",{class:"ios-switch-label",for:"active-open-switch"},null,-1))])])]),a.createElementVNode("p",Wl,a.toDisplayString(n.ssoLang[n.appLanguage].active_account_p),1),a.createElementVNode("form",{onSubmit:e[14]||(e[14]=a.withModifiers((...c)=>i.deleteAccountSubmit&&i.deleteAccountSubmit(...c),["prevent"]))},[a.createElementVNode("button",Yl,[r.loading?(a.openBlock(),a.createElementBlock("span",Xl)):(a.openBlock(),a.createElementBlock("span",Jl,a.toDisplayString(n.ssoLang[n.appLanguage].permanent_delete),1))]),a.createElementVNode("p",Zl,a.toDisplayString(n.ssoLang[n.appLanguage].permanent_delete_p),1)],32)],512),[[a.vShow,r.accountDelete]])])])])}const Ko=nt(nl,[["render",ed],["__scopeId","data-v-64ae2517"]]),td=Object.freeze(Object.defineProperty({__proto__:null,default:Ko},Symbol.toStringTag,{value:"Module"})),nd={name:"AuthBilling",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,subscriptions:[],showCancelModal:!1,selectedSubscription:null,cancelFeedback:""}},async mounted(){this.isLoggedIn||this.$router.push("/login"),await this.getAccountSettings(),this.loadSubscriptions()},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},loadSubscriptions(){if(this.account.billing){const n=this.account.billing,e=[];for(const t in n)t!=="region"&&t!=="currency"&&t!=="paymentProfiles"&&typeof n[t]=="object"&&n[t].subscriptionId&&e.push(n[t]);this.subscriptions=e}},formatCurrency(n,e){return`${{EUR:"€",USD:"$",GBP:"£"}[e==null?void 0:e.toUpperCase()]||e||""}${(n==null?void 0:n.toFixed(2))||"0.00"}`},formatInterval(n){return n?`per ${n}`:""},formatDate(n){return n?new Date(n*1e3).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):""},getStatusText(n){return{trialing:"Trial",active:"Active",past_due:"Past Due",canceled:"Canceled",unpaid:"Unpaid"}[n]||n},getStatusClass(n){return`status-${n}`},openCancelModal(n){this.selectedSubscription=n,this.showCancelModal=!0,this.cancelFeedback=""},closeCancelModal(){this.showCancelModal=!1,this.selectedSubscription=null,this.cancelFeedback=""},async confirmCancel(){var n,e;if(this.selectedSubscription){if(this.selectedSubscription.paymentGateway==="revenuecat"){X.$emit("ssoEvent",{name:"subscriptionCancelled",data:{subscriptionId:this.selectedSubscription.subscriptionId,paymentGateway:this.selectedSubscription.paymentGateway,feedback:this.cancelFeedback}}),this.closeCancelModal();return}this.loading=!0;try{const t=await ce(!1,"v2").post("checkout/cancel/"+this.selectedSubscription.subscriptionId,{feedback:this.cancelFeedback});if(t.data.success)X.$emit("showToast",{type:"success",message:"Subscription canceled successfully"}),await this.getAccountSettings(),this.loadSubscriptions(),this.closeCancelModal();else throw new Error(t.data.message||"Failed to cancel subscription")}catch(t){console.error("Error canceling subscription:",t),X.$emit("showToast",{type:"error",message:((e=(n=t.response)==null?void 0:n.data)==null?void 0:e.message)||"Failed to cancel subscription. Please try again."})}finally{this.loading=!1}}}}},od={class:"page-login content-boxed content-boxed-padding tapni-auth-billing"},rd={class:"subheaderContainer full-top"},id=["src"],ad=["src"],sd={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},cd={class:"container left-text"},ld={class:"center-text"},dd={class:"full-top"},ud={key:0,class:"no-subscriptions center-text full-top"},pd={key:1},hd={class:"subscription-header"},md={class:"subscription-info"},fd={class:"subscription-name"},gd={class:"subscription-details"},_d={class:"detail-row"},yd={class:"detail-value"},vd={class:"detail-row"},bd={class:"detail-value"},wd={class:"detail-row"},kd={class:"detail-value"},Cd={key:0,class:"detail-row"},Ed={class:"detail-value"},Td={key:1,class:"detail-row"},Sd={class:"detail-value"},Id={key:0,class:"subscription-actions"},Ad=["onClick","disabled"],Rd={class:"modal-content"},Nd={class:"modal-header"},Pd={class:"modal-body"},Md={class:"modal-text"},Ld={class:"feedback-section"},Od={class:"modal-footer"},zd=["disabled"];function xd(n,e,t,o,r,i){var c;const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",od,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...l)=>i.close&&i.close(...l)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",rd,[n.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=l=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,id)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,ad)]),_:1})),a.createElementVNode("h2",sd,a.toDisplayString(n.ssoLang[n.appLanguage].billing),1)]),a.createElementVNode("div",cd,[a.createElementVNode("p",ld,a.toDisplayString(n.ssoLang[n.appLanguage].billing_p),1),a.createElementVNode("div",dd,[r.subscriptions.length===0?(a.openBlock(),a.createElementBlock("div",ud,e[8]||(e[8]=[a.createElementVNode("p",{class:"gray-text"},"There are no active subscriptions at this point.",-1)]))):(a.openBlock(),a.createElementBlock("div",pd,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.subscriptions,l=>(a.openBlock(),a.createElementBlock("div",{key:l.subscriptionId,class:"subscription-card half-bottom"},[a.createElementVNode("div",hd,[a.createElementVNode("div",md,[a.createElementVNode("h3",fd,a.toDisplayString(l.subscriptionName),1),a.createElementVNode("span",{class:a.normalizeClass(["subscription-status",i.getStatusClass(l.status)])},a.toDisplayString(i.getStatusText(l.status)),3)])]),a.createElementVNode("div",gd,[a.createElementVNode("div",_d,[e[9]||(e[9]=a.createElementVNode("span",{class:"detail-label"},"Amount:",-1)),a.createElementVNode("span",yd,a.toDisplayString(i.formatCurrency(l.amount,l.currency)),1)]),a.createElementVNode("div",vd,[e[10]||(e[10]=a.createElementVNode("span",{class:"detail-label"},"Billing:",-1)),a.createElementVNode("span",bd,a.toDisplayString(i.formatInterval(l.interval)),1)]),a.createElementVNode("div",wd,[e[11]||(e[11]=a.createElementVNode("span",{class:"detail-label"},"Licenses:",-1)),a.createElementVNode("span",kd,a.toDisplayString(l.licenses),1)]),l.isTrial?(a.openBlock(),a.createElementBlock("div",Cd,[e[12]||(e[12]=a.createElementVNode("span",{class:"detail-label"},"Trial Ends:",-1)),a.createElementVNode("span",Ed,a.toDisplayString(i.formatDate(l.trialEnd)),1)])):l.endDate?(a.openBlock(),a.createElementBlock("div",Td,[e[13]||(e[13]=a.createElementVNode("span",{class:"detail-label"},"Next Billing:",-1)),a.createElementVNode("span",Sd,a.toDisplayString(i.formatDate(l.endDate)),1)])):a.createCommentVNode("",!0)]),l.status!=="canceled"?(a.openBlock(),a.createElementBlock("div",Id,[a.createElementVNode("button",{onClick:h=>i.openCancelModal(l),class:"cancel-button",disabled:r.loading},a.toDisplayString(r.loading?"Processing...":"Cancel Subscription"),9,Ad)])):a.createCommentVNode("",!0)]))),128))]))])]),r.showCancelModal?(a.openBlock(),a.createElementBlock("div",{key:1,class:"modal-overlay",onClick:e[6]||(e[6]=a.withModifiers((...l)=>i.closeCancelModal&&i.closeCancelModal(...l),["self"]))},[a.createElementVNode("div",Rd,[a.createElementVNode("div",Nd,[e[14]||(e[14]=a.createElementVNode("h3",null,"Cancel Subscription",-1)),a.createElementVNode("button",{onClick:e[2]||(e[2]=(...l)=>i.closeCancelModal&&i.closeCancelModal(...l)),class:"close-button"},"×")]),a.createElementVNode("div",Pd,[a.createElementVNode("p",Md,[e[15]||(e[15]=a.createTextVNode(" Are you sure you want to cancel your subscription to ")),a.createElementVNode("b",null,a.toDisplayString((c=r.selectedSubscription)==null?void 0:c.subscriptionName),1),e[16]||(e[16]=a.createTextVNode("? "))]),a.createElementVNode("div",Ld,[e[17]||(e[17]=a.createElementVNode("label",{class:"feedback-label"},"We'd love to know why you're canceling (optional):",-1)),a.withDirectives(a.createElementVNode("textarea",{"onUpdate:modelValue":e[3]||(e[3]=l=>r.cancelFeedback=l),class:"feedback-textarea",placeholder:"Your feedback helps us improve our service...",rows:"4"},null,512),[[a.vModelText,r.cancelFeedback]])])]),a.createElementVNode("div",Od,[a.createElementVNode("button",{onClick:e[4]||(e[4]=(...l)=>i.closeCancelModal&&i.closeCancelModal(...l)),class:"button-secondary"}," Keep Subscription "),a.createElementVNode("button",{onClick:e[5]||(e[5]=(...l)=>i.confirmCancel&&i.confirmCancel(...l)),class:"button-danger",disabled:r.loading},a.toDisplayString(r.loading?"Canceling...":"Confirm Cancellation"),9,zd)])])])):a.createCommentVNode("",!0)])}const Go=nt(nd,[["render",xd]]),Bd=Object.freeze(Object.defineProperty({__proto__:null,default:Go},Symbol.toStringTag,{value:"Module"}));(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('@keyframes spinner-circle-animation-ed866313{0%,39%,to{opacity:0}40%{opacity:1}}.spinner[data-v-ed866313]{position:relative;width:var(--vs-spinner-size);height:var(--vs-spinner-size);margin:0;padding:0}.spinner-circle[data-v-ed866313]{width:100%;height:100%;position:absolute;left:0;top:0}.spinner-circle[data-v-ed866313]:before{content:"";display:block;margin:0 auto;width:15%;height:15%;background-color:var(--vs-spinner-color);border-radius:100%;-webkit-animation:spinner-circle-animation-ed866313 1.2s infinite ease-in-out both;animation:spinner-circle-animation-ed866313 1.2s infinite ease-in-out both}.spinner-circle[data-v-ed866313]:nth-child(2){transform:rotate(30deg)}.spinner-circle[data-v-ed866313]:nth-child(3){transform:rotate(60deg)}.spinner-circle[data-v-ed866313]:nth-child(4){transform:rotate(90deg)}.spinner-circle[data-v-ed866313]:nth-child(5){transform:rotate(120deg)}.spinner-circle[data-v-ed866313]:nth-child(6){transform:rotate(150deg)}.spinner-circle[data-v-ed866313]:nth-child(7){transform:rotate(180deg)}.spinner-circle[data-v-ed866313]:nth-child(8){transform:rotate(210deg)}.spinner-circle[data-v-ed866313]:nth-child(9){transform:rotate(240deg)}.spinner-circle[data-v-ed866313]:nth-child(10){transform:rotate(270deg)}.spinner-circle[data-v-ed866313]:nth-child(11){transform:rotate(300deg)}.spinner-circle[data-v-ed866313]:nth-child(12){transform:rotate(330deg)}.spinner-circle[data-v-ed866313]:nth-child(2):before{animation-delay:-1.1s}.spinner-circle[data-v-ed866313]:nth-child(3):before{animation-delay:-1s}.spinner-circle[data-v-ed866313]:nth-child(4):before{animation-delay:-.9s}.spinner-circle[data-v-ed866313]:nth-child(5):before{animation-delay:-.8s}.spinner-circle[data-v-ed866313]:nth-child(6):before{animation-delay:-.7s}.spinner-circle[data-v-ed866313]:nth-child(7):before{animation-delay:-.6s}.spinner-circle[data-v-ed866313]:nth-child(8):before{animation-delay:-.5s}.spinner-circle[data-v-ed866313]:nth-child(9):before{animation-delay:-.4s}.spinner-circle[data-v-ed866313]:nth-child(10):before{animation-delay:-.3s}.spinner-circle[data-v-ed866313]:nth-child(11):before{animation-delay:-.2s}.spinner-circle[data-v-ed866313]:nth-child(12):before{animation-delay:-.1s}:root{--vs-input-bg: #fff;--vs-input-outline: #3b82f6;--vs-input-placeholder-color: #52525b;--vs-padding: .25rem .5rem;--vs-border: 1px solid #e4e4e7;--vs-border-radius: 4px;--vs-font-size: 16px;--vs-font-weight: 400;--vs-font-family: inherit;--vs-text-color: #18181b;--vs-line-height: 1.5;--vs-menu-offset-top: 8px;--vs-menu-height: 200px;--vs-menu-padding: 0;--vs-menu-border: 1px solid #e4e4e7;--vs-menu-bg: #fff;--vs-menu-box-shadow: none;--vs-menu-z-index: 2;--vs-option-padding: 8px 12px;--vs-option-font-size: var(--vs-font-size);--vs-option-font-weight: var(--vs-font-weight);--vs-option-text-color: var(--vs-text-color);--vs-option-bg: var(--vs-menu-bg);--vs-option-hover-color: #dbeafe;--vs-option-focused-color: var(--vs-option-hover-color);--vs-option-selected-color: #93c5fd;--vs-option-disabled-color: #f4f4f5;--vs-option-disabled-text-color: #52525b;--vs-multi-value-gap: 0px;--vs-multi-value-padding: 4px;--vs-multi-value-margin: 4px 0px 4px 6px;--vs-multi-value-font-size: 14px;--vs-multi-value-font-weight: 400;--vs-multi-value-line-height: 1;--vs-multi-value-text-color: #3f3f46;--vs-multi-value-bg: #f4f4f5;--vs-multi-value-xmark-size: 16px;--vs-multi-value-xmark-color: var(--vs-multi-value-text-color);--vs-indicators-gap: 4px;--vs-icon-size: 20px;--vs-icon-color: var(--vs-text-color);--vs-spinner-color: var(--vs-text-color);--vs-spinner-size: 20px;--vs-dropdown-transition: transform .25s ease-out}.vue-select[data-v-7f19f42a]{position:relative;box-sizing:border-box;width:100%}.vue-select[data-v-7f19f42a] *{box-sizing:border-box}.vue-select.open .single-value[data-v-7f19f42a]{position:absolute;opacity:.4}.vue-select.open .dropdown-icon[data-v-7f19f42a]{transform:rotate(180deg)}.vue-select.typing .single-value[data-v-7f19f42a]{opacity:0}.control[data-v-7f19f42a]{display:flex;min-height:32px;border:var(--vs-border);border-radius:var(--vs-border-radius);background-color:var(--vs-input-bg)}.control.focused[data-v-7f19f42a]{box-shadow:0 0 0 1px var(--vs-input-outline);border-color:var(--vs-input-outline)}.value-container[data-v-7f19f42a]{position:relative;display:flex;flex-wrap:wrap;align-items:center;flex-basis:100%;flex-grow:1}.value-container.multi[data-v-7f19f42a]{gap:var(--vs-multi-value-gap)}.single-value[data-v-7f19f42a]{display:flex;align-items:center;padding:var(--vs-padding);font-size:var(--vs-font-size);font-weight:var(--vs-font-weight);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);z-index:0}.multi-value[data-v-7f19f42a]{appearance:none;display:flex;align-items:center;gap:var(--vs-multi-value-gap);padding:var(--vs-multi-value-padding);margin:var(--vs-multi-value-margin);border:0;font-size:var(--vs-multi-value-font-size);font-weight:var(--vs-multi-value-font-weight);color:var(--vs-multi-value-text-color);line-height:var(--vs-multi-value-line-height);background:var(--vs-multi-value-bg);outline:none;cursor:pointer}.multi-value svg[data-v-7f19f42a]{width:var(--vs-multi-value-xmark-size);height:var(--vs-multi-value-xmark-size);fill:var(--vs-multi-value-xmark-color)}.search-input[data-v-7f19f42a]{appearance:none;display:inline-block;max-width:100%;flex-grow:1;width:0;margin:0;padding:0;border:0;background:none;padding:var(--vs-padding);font-size:var(--vs-font-size);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);outline:none;z-index:1}.search-input[data-v-7f19f42a]::placeholder{color:var(--vs-input-placeholder-color)}.indicators-container[data-v-7f19f42a]{display:flex;align-items:center;flex-shrink:0;gap:var(--vs-indicators-gap);padding:var(--vs-padding)}.clear-button[data-v-7f19f42a]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);color:var(--vs-icon-color);background:none;outline:none;cursor:pointer}.dropdown-icon[data-v-7f19f42a]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);color:var(--vs-icon-color);background:none;outline:none;cursor:pointer;transition:var(--vs-dropdown-transition)}.menu[data-v-7f19f42a]{position:absolute;left:0;right:0;padding:var(--vs-menu-padding);margin-top:var(--vs-menu-offset-top);max-height:var(--vs-menu-height);overflow-y:auto;border:var(--vs-menu-border);border-radius:var(--vs-border-radius);box-shadow:var(--vs-menu-box-shadow);background-color:var(--vs-menu-bg);z-index:var(--vs-menu-z-index)}.menu-option[data-v-7f19f42a]{display:flex;width:100%;border:0;margin:0;padding:var(--vs-option-padding);font-size:var(--vs-option-font-size);font-weight:var(--vs-option-font-weight);font-family:var(--vs-font-family);color:var(--vs-option-text-color);background-color:var(--vs-option-bg);text-align:-webkit-auto;cursor:pointer}.menu-option[data-v-7f19f42a]:hover{background-color:var(--vs-option-hover-color)}.menu-option.focused[data-v-7f19f42a]{background-color:var(--vs-option-focused-color)}.menu-option.selected[data-v-7f19f42a]{background-color:var(--vs-option-selected-color)}.menu-option.disabled[data-v-7f19f42a]{background-color:var(--vs-option-disabled-color);color:var(--vs-option-disabled-text-color)}.no-results[data-v-7f19f42a]{padding:var(--vs-option-padding);font-size:var(--vs-font-size);font-family:var(--vs-font-family);color:var(--vs-text-color)}')),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const co=(n,e)=>{const t=n.__vccOpts||n;for(const[o,r]of e)t[o]=r;return t},Ud={},Dd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"};function jd(n,e){return a.openBlock(),a.createElementBlock("svg",Dd,e[0]||(e[0]=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)]))}const qd=co(Ud,[["render",jd]]),Fd={},Vd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"};function Hd(n,e){return a.openBlock(),a.createElementBlock("svg",Vd,e[0]||(e[0]=[a.createElementVNode("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"},null,-1)]))}const di=co(Fd,[["render",Hd]]),Kd=["aria-disabled","aria-selected"],Gd=a.defineComponent({__name:"MenuOption",props:{menu:{},index:{},isFocused:{type:Boolean},isSelected:{type:Boolean},isDisabled:{type:Boolean}},emits:["select"],setup(n,{emit:e}){const t=n,o=e,r=a.ref(null);return a.watch(()=>t.isFocused,()=>{if(t.isFocused&&t.menu){const i=t.menu.children[t.index],s=i.offsetTop,c=s+i.clientHeight,l=t.menu.scrollTop,h=t.menu.clientHeight;s<l?t.menu.scrollTop=s:c>l+h&&(t.menu.scrollTop=c-h)}}),(i,s)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"option",ref:r,tabindex:"-1",role:"option",class:a.normalizeClass({focused:i.isFocused,selected:i.isSelected,disabled:i.isDisabled}),"aria-disabled":i.isDisabled,"aria-selected":i.isSelected,onClick:s[0]||(s[0]=c=>o("select")),onKeydown:s[1]||(s[1]=a.withKeys(c=>o("select"),["enter"]))},[a.renderSlot(i.$slots,"default")],42,Kd))}}),$d={},Qd={className:"spinner"};function Wd(n,e){return a.openBlock(),a.createElementBlock("div",Qd,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(12,t=>a.createElementVNode("div",{key:t,class:"spinner-circle"})),64))])}const Yd=co($d,[["render",Wd],["__scopeId","data-v-ed866313"]]),Jd=["aria-expanded","aria-describedby","aria-description","aria-labelledby","aria-label","aria-required"],Xd=["onClick"],Zd=["id","disabled","placeholder"],eu={class:"indicators-container"},tu=["disabled"],nu=["disabled"],ou=["aria-label","aria-multiselectable"],ru={key:0,class:"no-results"},iu={name:"AuthGeneral",mixins:[We],components:{VueSelect:co(a.defineComponent({__name:"Select",props:a.mergeModels({options:{},displayedOptions:{},placeholder:{default:"Select an option"},isClearable:{type:Boolean,default:!0},isDisabled:{type:Boolean,default:!1},isSearchable:{type:Boolean,default:!0},isMulti:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},shouldAutofocusOption:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},teleport:{default:void 0},inputId:{default:void 0},aria:{default:void 0},filterBy:{type:Function,default:(n,e,t)=>e.toLowerCase().includes(t.toLowerCase())},getOptionLabel:{type:Function,default:n=>n.label},getMultiValueLabel:{type:Function,default:n=>n.label}},{modelValue:{required:!0,validator:(n,e)=>e.isMulti?Array.isArray(n):!Array.isArray(n)},modelModifiers:{}}),emits:a.mergeModels(["optionSelected","optionDeselected","search"],["update:modelValue"]),setup(n,{emit:e}){const t=n,o=e,r=a.useModel(n,"modelValue"),i=a.ref(null),s=a.ref(null),c=a.ref(null),l=a.ref(""),h=a.ref(!1),u=a.ref(-1),g=a.computed(()=>{const I=t.displayedOptions||t.options,W=ie=>ie.filter(ee=>!r.value.includes(ee.value));if(t.isSearchable&&l.value){const ie=I.filter(ee=>{const ye=t.isMulti?t.getMultiValueLabel(ee):t.getOptionLabel(ee);return t.filterBy(ee,ye,l.value)});return t.isMulti?W(ie):ie}return t.isMulti?W(I):I}),f=a.computed(()=>{if(t.isMulti&&Array.isArray(r.value))return r.value.map(W=>t.options.find(ie=>ie.value===W));t.isMulti&&!Array.isArray(r.value)&&console.warn(`[vue3-select-component warn]: The v-model provided should be an array when using \`isMulti\` prop, instead it was: ${r.value}`);const I=t.options.find(W=>W.value===r.value);return I?[I]:[]}),w=I=>{h.value=!0,t.shouldAutofocusOption&&(u.value=t.options.findIndex(W=>!W.disabled)),I!=null&&I.focusInput&&s.value&&s.value.focus()},C=()=>{h.value=!1,l.value=""},P=()=>{h.value?C():w()},M=I=>{I.disabled||(t.isMulti?r.value.push(I.value):r.value=I.value,o("optionSelected",I),l.value="",t.closeOnSelect&&(h.value=!1),s.value&&s.value.blur())},j=I=>{t.isMulti&&!t.isDisabled&&(r.value=r.value.filter(W=>W!==I.value),o("optionDeselected",I))},N=()=>{t.isMulti?(r.value=[],o("optionDeselected",null)):(r.value=void 0,o("optionDeselected",f.value[0])),h.value=!1,l.value="",s.value&&s.value.blur()},T=I=>{if(h.value){const W=u.value;if(I.key==="ArrowDown"){I.preventDefault();const ee=g.value.findIndex((Re,le)=>!Re.disabled&&le>W),ye=g.value.findIndex(Re=>!Re.disabled);u.value=ee===-1?ye:ee}if(I.key==="ArrowUp"){I.preventDefault();const ee=g.value.reduce((Re,le,Me)=>!le.disabled&&Me<W?Me:Re,-1),ye=g.value.reduce((Re,le,Me)=>le.disabled?Re:Me,-1);u.value=ee===-1?ye:ee}if(I.key==="Enter"){const ee=g.value[W];I.preventDefault(),ee&&M(ee)}if(I.code==="Space"&&l.value.length===0){const ee=g.value[W];I.preventDefault(),ee&&M(ee)}I.key==="Escape"&&(I.preventDefault(),h.value=!1,l.value="");const ie=t.isMulti?r.value.length>0:!!r.value;I.key==="Backspace"&&l.value.length===0&&ie&&(I.preventDefault(),t.isMulti?r.value=r.value.slice(0,-1):r.value=void 0)}},B=I=>{!h.value&&l.value.length===0&&(I.preventDefault(),I.stopImmediatePropagation(),w())},V=I=>{I.key==="Tab"?C():I.key==="Space"&&B(I)},G=I=>{i.value&&!i.value.contains(I.target)&&(h.value=!1,l.value="")},J=()=>{if(i.value){const I=i.value.getBoundingClientRect();return{left:`${I.x}px`,top:`${I.y+I.height}px`}}return console.warn("Unable to calculate dynamic menu position because of missing internal DOM reference."),{top:"0px",left:"0px"}};return a.watch(()=>l.value,()=>{o("search",l.value),l.value&&!h.value&&w()}),a.onMounted(()=>{document.addEventListener("click",G),document.addEventListener("keydown",T)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",G),document.removeEventListener("keydown",T)}),(I,W)=>{var ie,ee,ye,Re;return a.openBlock(),a.createElementBlock("div",{ref_key:"container",ref:i,dir:"auto",class:a.normalizeClass(["vue-select",{open:h.value,typing:h.value&&l.value.length>0,disabled:I.isDisabled}])},[a.createElementVNode("div",{class:a.normalizeClass(["control",{focused:h.value}])},[a.createElementVNode("div",{class:a.normalizeClass(["value-container",{multi:I.isMulti}]),role:"combobox","aria-expanded":h.value,"aria-describedby":I.placeholder,"aria-description":I.placeholder,"aria-labelledby":(ie=I.aria)==null?void 0:ie.labelledby,"aria-label":f.value.length?f.value.map(I.isMulti?I.getMultiValueLabel:I.getOptionLabel).join(", "):"","aria-required":(ee=I.aria)==null?void 0:ee.required},[!t.isMulti&&f.value[0]?(a.openBlock(),a.createElementBlock("div",{key:0,class:"single-value",onClick:W[0]||(W[0]=le=>t.isDisabled?null:w({focusInput:!0}))},[a.renderSlot(I.$slots,"value",{option:f.value[0]},()=>[a.createTextVNode(a.toDisplayString(I.getOptionLabel(f.value[0])),1)],!0)])):a.createCommentVNode("",!0),t.isMulti&&f.value.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(f.value,le=>a.renderSlot(I.$slots,"tag",{key:le.value,option:le,removeOption:()=>j(le)},()=>[a.createElementVNode("button",{type:"button",class:"multi-value",onClick:Me=>j(le)},[a.createTextVNode(a.toDisplayString(I.getMultiValueLabel(le)),1),a.createVNode(di)],8,Xd)],!0)),128)):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("input",{id:I.inputId,ref_key:"input",ref:s,"onUpdate:modelValue":W[1]||(W[1]=le=>l.value=le),class:"search-input",type:"text","aria-autocomplete":"list",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",tabindex:"0",disabled:I.isDisabled,placeholder:f.value.length===0?I.placeholder:"",onMousedown:W[2]||(W[2]=le=>w()),onKeydown:V},null,40,Zd),[[a.vModelText,l.value]])],10,Jd),a.createElementVNode("div",eu,[f.value.length>0&&I.isClearable&&!I.isLoading?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"clear-button",tabindex:"-1",disabled:I.isDisabled,onClick:N},[a.renderSlot(I.$slots,"clear",{},()=>[a.createVNode(di)],!0)],8,tu)):a.createCommentVNode("",!0),I.isLoading?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("button",{key:1,type:"button",class:"dropdown-icon",tabindex:"-1",disabled:I.isDisabled,onClick:P},[a.renderSlot(I.$slots,"dropdown",{},()=>[a.createVNode(qd)],!0)],8,nu)),a.renderSlot(I.$slots,"loading",{},()=>[I.isLoading?(a.openBlock(),a.createBlock(Yd,{key:0})):a.createCommentVNode("",!0)],!0)])],2),(a.openBlock(),a.createBlock(a.Teleport,{to:I.teleport,disabled:!I.teleport,defer:!0},[h.value?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"menu",ref:c,class:"menu",role:"listbox","aria-label":(ye=I.aria)==null?void 0:ye.labelledby,"aria-multiselectable":I.isMulti,style:a.normalizeStyle({width:t.teleport?`${(Re=i.value)==null?void 0:Re.getBoundingClientRect().width}px`:"100%",top:t.teleport?J().top:"unset",left:t.teleport?J().left:"unset"})},[a.renderSlot(I.$slots,"menu-header",{},void 0,!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(g.value,(le,Me)=>(a.openBlock(),a.createBlock(Gd,{key:Me,type:"button",class:a.normalizeClass(["menu-option",{focused:u.value===Me,selected:le.value===r.value}]),menu:c.value,index:Me,"is-focused":u.value===Me,"is-selected":le.value===r.value,"is-disabled":le.disabled||!1,onSelect:vt=>M(le)},{default:a.withCtx(()=>[a.renderSlot(I.$slots,"option",{option:le},()=>[a.createTextVNode(a.toDisplayString(I.getOptionLabel(le)),1)],!0)]),_:2},1032,["class","menu","index","is-focused","is-selected","is-disabled","onSelect"]))),128)),g.value.length===0?(a.openBlock(),a.createElementBlock("div",ru,[a.renderSlot(I.$slots,"no-options",{},()=>[W[3]||(W[3]=a.createTextVNode(" No results found "))],!0)])):a.createCommentVNode("",!0)],12,ou)):a.createCommentVNode("",!0)],8,["to","disabled"]))],2)}}}),[["__scopeId","data-v-7f19f42a"]])},props:{isModal:{type:Boolean,default:!1},payload:{type:Object,default:{}}},data(){return{loading:!1}},watch:{"account.lang":{handler(n){n&&(this.updateLang(n),this.display==="npm"&&this.$store.commit("setLanguage",n))},immediate:!0}},async mounted(){this.isLoggedIn||this.$router.push("/login"),await this.getAccountSettings()},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})},async submitGeneralUpdate(){var o;this.loading=!0;const n={name:this.account.name,lang:this.account.lang,email:this.account.email,region:(o=this.account.billing)==null?void 0:o.region},[e,t]=await fe(In.updateAccount(n));e?this.errorHandler(e):t.data.success&&(this.successSnack(this.ssoLang[this.appLanguage].profile_update_success),await this.getAccountSettings()),this.loading=!1}}},au={class:"page-login content-boxed content-boxed-padding tapni-auth-general"},su={class:"subheaderContainer full-top"},cu=["src"],lu=["src"],du={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},uu={class:"container left-text"},pu={class:"center-text"},hu={class:"full-top bold small-bottom"},mu=["placeholder"],fu=["placeholder"],gu={class:"full-top bold"},_u={class:"full-top bold"},yu={type:"submit",class:"button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"},vu={key:0},bu={key:1,class:"button--loading button__loader"};function wu(n,e,t,o,r,i){const s=a.resolveComponent("router-link"),c=a.resolveComponent("VueSelect");return a.openBlock(),a.createElementBlock("div",au,[t.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...l)=>i.close&&i.close(...l)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[7]||(e[7]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",su,[t.isModal?(a.openBlock(),a.createElementBlock("div",{key:0,class:"pointer left-button",onClick:e[1]||(e[1]=l=>n.$emit("update:viewProp","AuthAccount"))},[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,cu)])):(a.openBlock(),a.createBlock(s,{key:1,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,lu)]),_:1})),a.createElementVNode("h2",du,a.toDisplayString(n.ssoLang[n.appLanguage].general),1)]),a.createElementVNode("div",uu,[a.createElementVNode("p",pu,a.toDisplayString(n.ssoLang[n.appLanguage].general_p),1),a.createElementVNode("form",{class:"full-top",onSubmit:e[6]||(e[6]=a.withModifiers((...l)=>i.submitGeneralUpdate&&i.submitGeneralUpdate(...l),["prevent"]))},[a.createElementVNode("h3",hu,a.toDisplayString(n.ssoLang[n.appLanguage].personal_details),1),a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":e[2]||(e[2]=l=>n.account.name=l),placeholder:n.ssoLang[n.appLanguage].name,class:"edit-input h-40 lh-40 small-bottom",required:"",style:{width:"100%"}},null,8,mu),[[a.vModelText,n.account.name]]),a.withDirectives(a.createElementVNode("input",{disabled:"",type:"email","onUpdate:modelValue":e[3]||(e[3]=l=>n.account.email=l),placeholder:n.ssoLang[n.appLanguage].email,class:"bg-white edit-input h-40 lh-40 small-bottom",required:"",style:{width:"100%"}},null,8,fu),[[a.vModelText,n.account.email]]),a.createElementVNode("h3",gu,a.toDisplayString(n.ssoLang[n.appLanguage].app_region),1),n.account.billing?(a.openBlock(),a.createBlock(c,{key:0,modelValue:n.account.billing.region,"onUpdate:modelValue":e[4]||(e[4]=l=>n.account.billing.region=l),options:[{label:"United States",value:"us"},{label:"United Kingdom",value:"uk"},{label:"European Union",value:"eu"},{label:"Mexico",value:"mx"},{label:"Mauritius",value:"mu"},{label:"Colombia",value:"co"},{label:"Serbia",value:"rs"},{label:"Singapore",value:"sg"},{label:"China",value:"cn"}],isClearable:!1,placeholder:"Select region"},null,8,["modelValue"])):a.createCommentVNode("",!0),a.createCommentVNode("",!0),a.createElementVNode("h3",_u,a.toDisplayString(n.ssoLang[n.appLanguage].app_language),1),a.createVNode(c,{modelValue:n.account.lang,"onUpdate:modelValue":e[5]||(e[5]=l=>n.account.lang=l),options:[{label:n.ssoLang[n.appLanguage].english,value:"en"},{label:n.ssoLang[n.appLanguage].german,value:"de"},{label:n.ssoLang[n.appLanguage].spanish,value:"es"},{label:n.ssoLang[n.appLanguage].italian,value:"it"},{label:n.ssoLang[n.appLanguage].french,value:"fr"},{label:n.ssoLang[n.appLanguage].turkish,value:"tr"},{label:n.ssoLang[n.appLanguage].serbian,value:"sr"},{label:n.ssoLang[n.appLanguage].korean,value:"kr"},{label:n.ssoLang[n.appLanguage].chinese,value:"cn"},{label:n.ssoLang[n.appLanguage].portuguese,value:"pt"},{label:n.ssoLang[n.appLanguage].japanese,value:"ja"}],isClearable:!1,placeholder:"Select language"},null,8,["modelValue","options"]),e[8]||(e[8]=a.createElementVNode("p",null,"Translate the app on your preferred language.",-1)),a.createElementVNode("button",yu,[r.loading?(a.openBlock(),a.createElementBlock("span",bu)):(a.openBlock(),a.createElementBlock("span",vu,a.toDisplayString(n.ssoLang[n.appLanguage].save),1))])],32)])])}const $o=nt(iu,[["render",wu]]),ku=Object.freeze(Object.defineProperty({__proto__:null,default:$o},Symbol.toStringTag,{value:"Module"})),Cu={name:"AuthReset",mixins:[We],data(){return{loading:!0,submitted:!1,passwordChange:!1,email:"",password:"",passwordRepeat:"",code:"",captcha:"",revealPassword:!1,revealPassword2:!1}},mounted(){this.$storex.verifyEmail&&(this.email=this.$storex.verifyEmail),this.$route.query.c&&(this.code=this.$route.query.c,this.passwordChange=!0),this.$route.query.e&&(this.email=this.$route.query.e),X.$emit("ssoEvent",{name:"setLoading",data:!1})},methods:{async resetEmail(){if(this.submitted)return;this.submitted=!0,this.email=this.email.trim();let n={email:this.email,captchaToken:await this.getCaptchaToken("password_reset")};await this.reset(n),this.submitted=!1,await this.$router.push("/verify?e="+this.email+"#reset")},async changePw(){if(this.code.length!==6)return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);if(this.password!==this.passwordRepeat)return this.errorSnack(this.ssoLang[this.appLanguage].password_not_match);if(this.submitted)return;this.submitted=!0,this.email=this.email.trim(),this.code=this.code.trim();let n={email:this.email,code:this.code,password:this.password,passwordRepeat:this.passwordRepeat,captchaToken:await this.getCaptchaToken("password_reset")},e=await this.changePassword(n);this.submitted=!1,e===!0&&(this.$router.push("/login"),this.successSnack(this.ssoLang[this.appLanguage].password_reseted_success))}},watch:{email(n){this.$storex.verifyEmail=n}}},Eu={class:"bold no-bottom center-text text-[22px]",style:{"margin-top":"63px"}},Tu={class:"page-login-field half-top color-black"},Su=["placeholder"],Iu={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Au={key:0,class:"uppercase"},Ru={key:1,class:"button--loading button__loader"},Nu={class:"close-text center-text half-top color-black"},Pu=["innerHTML"],Mu=["href"],Lu={class:"page-login-links"},Ou={class:"bold no-bottom center-text",style:{"margin-top":"63px"}},zu={class:"half-bottom small-top center-text color-black"},xu={class:"page-login-field half-top"},Bu=["type","placeholder"],Uu={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Du={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},ju={class:"page-login-field half-top"},qu=["type","placeholder"],Fu={src:"https://cdn.tapni.co/icons/reveal-password.png",class:"responsive-image password-reveal-icon"},Vu={src:"https://cdn.tapni.co/icons/hide-password.png",class:"responsive-image password-reveal-icon"},Hu={type:"submit",class:"button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top"},Ku={key:0,class:"uppercase"},Gu={key:1,class:"button--loading button__loader"},$u={class:"close-text center-text half-top color-black"},Qu=["innerHTML"],Wu=["href"];function Yu(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return r.passwordChange?(a.openBlock(),a.createElementBlock("form",{key:1,class:"page-login content-boxed content-boxed-padding",onSubmit:e[7]||(e[7]=a.withModifiers((...c)=>i.changePw&&i.changePw(...c),["prevent"]))},[a.createElementVNode("h3",Ou,a.toDisplayString(n.ssoLang[this.appLanguage].password_change),1),a.createElementVNode("p",zu,a.toDisplayString(n.ssoLang[this.appLanguage].password_new),1),a.createElementVNode("div",xu,[e[14]||(e[14]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>r.password=c),type:r.revealPassword?"text":"password",placeholder:n.ssoLang[this.appLanguage].password,required:""},null,8,Bu),[[a.vModelDynamic,r.password]]),a.createElementVNode("em",{onClick:e[4]||(e[4]=c=>r.revealPassword=!r.revealPassword)},[a.withDirectives(a.createElementVNode("img",Uu,null,512),[[a.vShow,!r.revealPassword]]),a.withDirectives(a.createElementVNode("img",Du,null,512),[[a.vShow,r.revealPassword]])])]),a.createElementVNode("div",ju,[e[15]||(e[15]=a.createElementVNode("i",{style:{"padding-top":"15px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/padlock.png",class:"responsive-image",style:{width:"50%"}})],-1)),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[5]||(e[5]=c=>r.passwordRepeat=c),type:r.revealPassword2?"text":"password",placeholder:n.ssoLang[this.appLanguage].password_repeat,required:""},null,8,qu),[[a.vModelDynamic,r.passwordRepeat]]),a.createElementVNode("em",{onClick:e[6]||(e[6]=c=>r.revealPassword2=!r.revealPassword2)},[a.withDirectives(a.createElementVNode("img",Fu,null,512),[[a.vShow,!r.revealPassword2]]),a.withDirectives(a.createElementVNode("img",Vu,null,512),[[a.vShow,r.revealPassword2]])])]),a.createElementVNode("button",Hu,[r.submitted?(a.openBlock(),a.createElementBlock("span",Gu)):(a.openBlock(),a.createElementBlock("span",Ku,a.toDisplayString(n.ssoLang[this.appLanguage].password_change),1))]),e[17]||(e[17]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("p",$u,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].reset_password_p2},null,8,Qu),e[16]||(e[16]=a.createTextVNode()),a.createElementVNode("a",{href:"mailto:support@tapni.com?subject="+n.ssoLang[this.appLanguage].password_reset_t}," support@tapni.com",8,Wu)])],32)):(a.openBlock(),a.createElementBlock("form",{key:0,class:"page-login content-boxed content-boxed-padding",onSubmit:e[2]||(e[2]=a.withModifiers((...c)=>i.resetEmail&&i.resetEmail(...c),["prevent"])),autocomplete:"on"},[a.createElementVNode("h3",Eu,a.toDisplayString(n.ssoLang[this.appLanguage].reset_password),1),e[11]||(e[11]=a.createElementVNode("p",{class:"half-bottom small-top center-text color-black"},null,-1)),a.createElementVNode("div",Tu,[e[8]||(e[8]=a.createElementVNode("i",{style:{"padding-top":"10px","margin-left":"10px"}},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/mail.png",class:"responsive-image",style:{width:"80%"}})],-1)),a.withDirectives(a.createElementVNode("input",{id:"emailInput","onUpdate:modelValue":e[0]||(e[0]=c=>r.email=c),onKeydown:e[1]||(e[1]=a.withKeys(a.withModifiers(()=>{},["prevent"]),["space"])),type:"email",placeholder:n.ssoLang[this.appLanguage].email,required:""},null,40,Su),[[a.vModelText,r.email]]),e[9]||(e[9]=a.createElementVNode("em",null,null,-1))]),a.createElementVNode("button",Iu,[r.submitted?(a.openBlock(),a.createElementBlock("span",Ru)):(a.openBlock(),a.createElementBlock("span",Au,a.toDisplayString(n.ssoLang[this.appLanguage].reset_password),1))]),e[12]||(e[12]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("p",Nu,[a.createElementVNode("span",{innerHTML:n.ssoLang[this.appLanguage].reset_password_p1},null,8,Pu),a.createElementVNode("a",{href:"mailto:support@tapni.com?subject="+n.ssoLang[this.appLanguage].password_reset_t}," support@tapni.com",8,Mu)]),e[13]||(e[13]=a.createElementVNode("div",{class:"decoration decoration-lines-thin no-bottom half-top"},null,-1)),a.createElementVNode("div",Lu,[a.createVNode(s,{class:"create float-right",to:"/verify"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].verify_account),1)]),_:1}),a.createVNode(s,{class:"forgot float-left",to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].sign_in),1)]),_:1}),e[10]||(e[10]=a.createElementVNode("div",{class:"clear"},null,-1))])],32))}const Qo=nt(Cu,[["render",Yu],["__scopeId","data-v-707a4b16"]]),Ju=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"})),Xu={name:"AuthCallback",mixins:[ii,ai,We],data(){return{}},async mounted(){if(this.$route.path==="/callback/redirect")return location.href=atob(this.$route.query.uri);if(this.$route.path==="/callback/auth"&&this.exchangeAuthCode({code:this.$route.query.code,code_verifier:this.$route.query.code_verifier}),this.$route.path==="/callback/okta")return await this.handleOktaRedirect();if(this.$route.path==="/callback/saml")return await this.handleSamlRedirect()},methods:{inAppRedirect(){let n=pi.sanitizeUrl(location.href);return n=n.replace("http","tapni"),n=n.replace("https","tapni"),window.open(n)}}},Zu={class:"page-login content-boxed content-boxed-padding"},ep={key:0,style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"260px"}},tp={key:1,style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"260px"}};function np(n,e,t,o,r,i){return a.openBlock(),a.createElementBlock("div",Zu,[(n.$route.query.platform==="android"||n.$route.query.platform==="ios")&&!n.isNative?(a.openBlock(),a.createElementBlock("h5",ep,[a.createTextVNode(a.toDisplayString(n.ssoLang[this.appLanguage].you_will_be_redirected),1),e[1]||(e[1]=a.createElementVNode("br",null,null,-1)),a.createTextVNode(" "+a.toDisplayString(n.ssoLang[this.appLanguage].if_redirect_not_directly)+", ",1),a.createElementVNode("span",{onClick:e[0]||(e[0]=(...s)=>i.inAppRedirect&&i.inAppRedirect(...s)),style:{color:"blue",cursor:"pointer"}},a.toDisplayString(n.ssoLang[this.appLanguage].click_here),1),e[2]||(e[2]=a.createTextVNode(". "))])):(a.openBlock(),a.createElementBlock("h4",tp,a.toDisplayString(n.ssoLang[this.appLanguage].please_wait),1))])}const Wo=nt(Xu,[["render",np]]),op=Object.freeze(Object.defineProperty({__proto__:null,default:Wo},Symbol.toStringTag,{value:"Module"})),Yt=tt.registerPlugin("Preferences",{web:()=>Promise.resolve().then(()=>Xp).then(n=>new n.PreferencesWeb)}),yt={async setObject(n,e){await Yt.set({key:n,value:JSON.stringify(e)})},async getAll(){const n=await this.keys(),e={};for(const t of n)e[t]=await Yt.get({key:t});return e},async setAll(n){const e=Object.keys(n);for(const t of e)await this.setItem(t,n[t])},async getObject(n){const e=await Yt.get({key:n});return JSON.parse(e.value)},async setItem(n,e){return await Yt.set({key:n,value:e})},async getItem(n){const{value:e}=await Yt.get({key:n});return e},async removeItem(n){return await Yt.remove({key:n})},async keys(){const{keys:n}=await Yt.keys();return n},async clear(){return await Yt.clear()}},it="vrs_",Yo={async _initialize(n){let e=await yt.getItem(it);if(e===null)await yt.setItem(it,JSON.stringify(n));else{let t=JSON.parse(e);this._objectDefaults(n,t),await yt.setItem(it,JSON.stringify(t))}},_objectDefaults(n,e){Object.keys(n).reduce((t,o)=>{let r=n[o];return typeof r=="object"?this._objectDefaults(e[o],r):e.hasOwnProperty(o)||(e[o]=r),t},[])},async getRaw(){let n=await yt.getItem(it);return JSON.parse(n)},async setRaw(n){let e=JSON.stringify(n);await yt.setItem(it,e)},async set(n,e){if(e===void 0)return this.remove(n);await yt.setItem(it+n,this.serialize(e));let t=this.getKeys();return t.indexOf(n)===-1&&t.push(n),await yt.setItem(it,this.serialize(t)),e},async get(n){let e=await yt.getItem(it+n);return e===null?null:this.deserialize(e)},async remove(n){let e=await this.get(n);await yt.removeItem(it+n);let t=await this.getKeys(),o=t.indexOf("test");return o!==-1&&t.splice(o,1),await yt.setItem(it,this.serialize(t)),e},async getAll(){let n=[],e=await this.getKeys();for(let t=0;t<e.length;t++)n[e[t]]=this.get(e[t]);return n},async getKeys(){return await this.deserialize(yt.getItem(it))},async clear(){await this.set(it,"[]");let n=this.getKeys();for(let e=0;e<n.length;e++)await this.remove(it+n[e])},serialize:function(n){return JSON.stringify(n)},deserialize:function(n,e){if(!n)return e;let t=JSON.parse(n);return t!==void 0?t:e}},rp={name:"ReactiveStorage",data(){return{strgReady:!1,strg:null}},async created(){this.strgReady=a.reactive({value:!1}),await Yo._initialize(this.options);let n=await Yo.getRaw();const e=a.reactive(n);this.strg=e,this.strgReady.value=!0,a.watch(e,async()=>{await Yo.setRaw(e)},{deep:!0})}},ip={key:0,href:"/",class:"header-logo"},ap=["src"],sp={class:"snackbar snackbar-boxed",id:"snackbar"},cp={class:"snack-body",id:"errorSnack"},lp={id:"errorMessage"},dp={class:"snack-body",id:"successSnack"},up={id:"successMessage"},pp=Object.assign({name:"TapniAuth",mixins:[rp,We],data(){return{storeInterval:null,isSetup:!1,isTapstackOrigin:typeof window<"u"?/(^|\.)tapstack\.com$/i.test(new URL(window.location.origin).hostname):!1}},components:{AuthCallback:Wo,AuthReset:Qo,AuthVerify:Ho,AuthSecurity:Ko,AuthRegister:Vo,AuthLogin:qo,AuthAccount:Fo,AuthBilling:Go,AuthWelcome:wo,AuthGeneral:$o},props:{viewProp:{type:String,default:""},isModal:{type:Boolean,default:!1},payload:{type:Object,default:{}},options:{type:Object,default:{token:"",refreshTokens:"",username:"",UserId:"",verifyEmail:"",subdomain:"",localUser:""}}},computed:{initialized(){return this.isSetup||this.isModal},headerLogoUrl(){return this.isTapstackOrigin?"https://cdn.tapni.co/company-media/e411a6e5-e8c1-40b3-aa4c-1214cfb43e8a/gallery/image/f910fa207addf7d3f7337faf098c4f82c79f755a3cf0032099655f2204e6a1e6.png":"https://cdn.tapni.co/images/logo-dark.png"},containerStyle(){return{maxHeight:this.isModal?"90vh":"auto",overflowY:this.isModal?"auto":"hidden"}}},async mounted(){this.checkAndClearStorage(),this.applyBgStyle(),this.setView(this.viewProp),this.updateMetadata(),X.$on("ssoEvent",this.ssoOutgoingEvent),X.$on("ssoLogout",n=>this.logout(n)),X.$on("getLoggedInAccounts",()=>this.getLoggedInAccounts()),X.$on("refreshTokenAction",n=>this.refreshTokenAction({...n,storage:this.$storex})),X.$on("switchAccount",n=>this.switchAccount(n)),X.$on("setToken",n=>this.setToken(n)),X.$on("setStorageItem",n=>this.setStorageItem(n)),this.isNative&&this.$nextTick(()=>{try{this.$store&&this.$store.state&&this.$store.state.auth&&this.$store.commit("auth/addAllowedOrigin","capacitor://localhost")}catch(n){console.error("Failed to add capacitor origin to allowed origins:",n)}})},methods:{checkAndClearStorage(){const n=new URLSearchParams(window.location.search);if(n.get("clean")==="true"){localStorage.clear(),sessionStorage.clear(),n.delete("clean");const e=window.location.pathname+(n.toString()?"?"+n.toString():"")+window.location.hash;window.history.replaceState({},"",e),console.log("Storage cleared due to clean=true parameter")}},async init(){this.$store.commit("auth/setApiRoot",this.$apiRoot||_i.env.VITE_APP_API_ROOT),this.setStorage(this.strg),!this.isSetup&&(this.isSetup=!0,await this.getLoggedInAccounts(),this.$emit("ssoLibraryReady",this.$storex))},ssoOutgoingEvent(n){this.$emit("ssoEvent",n)},ssoIncomingEvent(n){X.$emit(n.name,n.data)},updateMetadata(){if(!(typeof window>"u"))if(this.isTapstackOrigin){document.title="Tapstack - The modern stack for interactive docs and tools";const n=document.querySelector('meta[name="description"]');n&&n.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences with Tapstack.");const e=document.querySelector('meta[property="og:title"]');e&&e.setAttribute("content","Tapstack - The modern stack for interactive docs and tools");const t=document.querySelector('meta[property="og:description"]');t&&t.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences.");const o=document.querySelector('meta[property="twitter:title"]');o&&o.setAttribute("content","Tapstack - The modern stack for interactive docs and tools");const r=document.querySelector('meta[property="twitter:description"]');r&&r.setAttribute("content","The modern stack for interactive docs and tools. Build better documentation and developer experiences with Tapstack.")}else document.title="Tapni - Share everything with just a tap"},applyBgStyle(){this.display==="redirect"?document.getElementsByTagName("html")[0].style="background: #dfeefe;":document.getElementsByTagName("html")[0].style=""}},watch:{viewProp(n){this.setView(n)},display(){this.applyBgStyle()},"strgReady.value"(n){n&&this.$nextTick(()=>{this.init()})},$storex:{handler(n){clearInterval(this.storeInterval),this.storeInterval=setTimeout(()=>{Object.keys(n).forEach(e=>{this.strg[e]=n[e]})},250)},deep:!0}}},{setup(n){return window.Buffer=Si,document.addEventListener("DOMContentLoaded",function(){const e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js?render=undefined",document.head.appendChild(e)}),(e,t)=>(a.openBlock(),a.createElementBlock("div",{id:"ssoapp",style:a.normalizeStyle(e.containerStyle)},[e.display==="redirect"||e.renderView.includes("Auth")?(a.openBlock(),a.createElementBlock("a",ip,[a.createElementVNode("img",{src:e.headerLogoUrl,class:"header-logo-img"},null,8,ap)])):a.createCommentVNode("",!0),e.initialized&&e.renderView==="AuthWelcome"?(a.openBlock(),a.createBlock(wo,{key:1})):e.initialized&&e.renderView==="AuthLogin"?(a.openBlock(),a.createBlock(qo,{key:2,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthGeneral"?(a.openBlock(),a.createBlock($o,{key:3,isModal:n.isModal,"onUpdate:viewProp":e.setView},null,8,["isModal","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthAccount"?(a.openBlock(),a.createBlock(Fo,{key:4,isModal:n.isModal,"onUpdate:viewProp":e.setView},null,8,["isModal","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthRegister"?(a.openBlock(),a.createBlock(Vo,{key:5,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthVerify"?(a.openBlock(),a.createBlock(Ho,{key:6,isModal:n.isModal},null,8,["isModal"])):e.initialized&&e.renderView==="AuthSecurity"?(a.openBlock(),a.createBlock(Ko,{key:7,isModal:n.isModal,payload:n.payload,"onUpdate:viewProp":e.setView},null,8,["isModal","payload","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthBilling"?(a.openBlock(),a.createBlock(Go,{key:8,isModal:n.isModal,payload:n.payload,"onUpdate:viewProp":e.setView},null,8,["isModal","payload","onUpdate:viewProp"])):e.initialized&&e.renderView==="AuthReset"?(a.openBlock(),a.createBlock(Qo,{key:9})):e.initialized&&e.renderView==="AuthCallback"?(a.openBlock(),a.createBlock(Wo,{key:10})):e.display!=="npm"?(a.openBlock(),a.createBlock(a.unref(en.RouterView),{key:11})):a.createCommentVNode("",!0),a.createElementVNode("div",sp,[a.createElementVNode("p",cp,[a.createElementVNode("span",lp,a.toDisplayString(e.ssoLang[e.appLanguage].error),1),a.createElementVNode("a",{onClick:t[0]||(t[0]=(...o)=>e.closeSnacks&&e.closeSnacks(...o)),style:{position:"absolute",right:"10px",top:"10px",width:"50px",height:"50px"}},t[2]||(t[2]=[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/notification-close.png",style:{width:"100%"}},null,-1)]))]),a.createElementVNode("p",dp,[a.createElementVNode("span",up,a.toDisplayString(e.ssoLang[e.appLanguage].success),1),a.createElementVNode("a",{onClick:t[1]||(t[1]=(...o)=>e.closeSnacks&&e.closeSnacks(...o)),style:{position:"absolute",right:"10px",top:"10px",width:"50px",height:"50px"}},t[3]||(t[3]=[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/notification-close.png",style:{width:"100%"}},null,-1)]))])])],4))}}),hp={install:(n,{store:e,apiRoot:t})=>{n.component("TapniAuth",pp),e.hasModule("auth")||e.registerModule("auth",Cr),n.config.globalProperties.$apiRoot=t}},mp={name:"AuthQR",mixins:[We,si]},fp={class:"page-login content-boxed content-boxed-padding"},gp={style:{"text-align":"center",width:"80%",margin:"0 auto","margin-top":"130px"}},_p={class:"center-text"},yp={style:{margin:"0 auto",width:"85%","text-align":"left"}},vp={class:"center-text"};function bp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",fp,[a.createElementVNode("h5",gp,a.toDisplayString(n.ssoLang[n.appLanguage].use_tapni_on_the_web),1),e[6]||(e[6]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",_p,[e[3]||(e[3]=a.createElementVNode("div",{id:"qrCodeContainer",class:"qrCodeRounded",style:{"max-width":"100%"}},null,-1)),e[4]||(e[4]=a.createElementVNode("br",null,null,-1)),e[5]||(e[5]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("div",yp,[a.createElementVNode("h2",vp,a.toDisplayString(n.ssoLang[n.appLanguage].login_by_scanning_qr_code),1),e[0]||(e[0]=a.createElementVNode("br",null,null,-1)),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].open_tapni_app_on_your_phone),1),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].go_to_settings_link_a_device),1),a.createElementVNode("h4",null,a.toDisplayString(n.ssoLang[n.appLanguage].point_your_phone_at_this_qr_code),1),e[1]||(e[1]=a.createElementVNode("br",null,null,-1)),e[2]||(e[2]=a.createElementVNode("br",null,null,-1))]),a.createVNode(s,{to:"/login"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.ssoLang[n.appLanguage].choose_other_login_methods),1)]),_:1})])])}const wp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(mp,[["render",bp]])},Symbol.toStringTag,{value:"Module"})),kp={async getRecordById(n){return ce().post("/objects/record/"+n.id,n)},async getRecords(n){return ce().post("/objects/records",n)}},Cp={name:"AuthApps",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,apps:[]}},async mounted(){this.isLoggedIn||this.$router.push("/login");const n=await kp.getRecords({objectId:"6dc545ea-2e2f-4720-b4fe-c5ebdd8af063",query:{fields:["t_apps_name","t_apps_icon","t_apps_url"],relations:[]}});this.apps=n.data.records},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})}}},Ep={class:"page-login content-boxed content-boxed-padding"},Tp={class:"subheaderContainer full-top"},Sp=["src"],Ip={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},Ap={class:"container left-text"},Rp={class:"center-text"},Np={class:"full-top"},Pp=["href"],Mp={class:"firstRow"},Lp=["src"],Op=["src"];function zp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Ep,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[1]||(e[1]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",Tp,[n.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:0,to:"/account",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,Sp)]),_:1})),a.createElementVNode("h2",Ip,a.toDisplayString(n.ssoLang[n.appLanguage].apps),1)]),a.createElementVNode("div",Ap,[a.createElementVNode("p",Rp,a.toDisplayString(n.ssoLang[n.appLanguage].apps_p),1),a.createElementVNode("div",Np,[a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.apps,c=>(a.openBlock(),a.createElementBlock("a",{key:c.id,href:c.t_apps_url,target:"_blank",class:"settingRow half-bottom"},[a.createElementVNode("div",Mp,[a.createElementVNode("img",{src:n.getIcon(c.t_apps_icon),class:"withBackground"},null,8,Lp),a.createElementVNode("h4",null,a.toDisplayString(c.t_apps_name),1),a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg")},null,8,Op)])],8,Pp))),128))])])])}const xp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(Cp,[["render",zp],["__scopeId","data-v-2f7f5584"]])},Symbol.toStringTag,{value:"Module"})),Bp={name:"AuthCustomApp",mixins:[We],props:{payload:{type:Object,default:{}}},data(){return{loading:!1,app:{}}},async mounted(){this.isLoggedIn||this.$router.push("/login");const n=await Fe.getRecordById({id:this.$route.params.app,query:{fields:["t_apps_name","t_apps_icon","t_apps_url"],relations:[]}});this.app=n.data.record},methods:{close(){X.$emit("ssoEvent",{name:"toggleAuthModal",data:!0})}}},Up={class:"page-login content-boxed content-boxed-padding"},Dp={class:"subheaderContainer full-top"},jp=["src"],qp={class:"center-text",style:{"flex-grow":"1","text-align":"center",margin:"0","font-weight":"600"}},Fp={class:"container left-text"},Vp={class:"center-text"};function Hp(n,e,t,o,r,i){const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Up,[n.isModal?(a.openBlock(),a.createElementBlock("a",{key:0,onClick:e[0]||(e[0]=(...c)=>i.close&&i.close(...c)),class:"color-black pull-right pointer",style:{"margin-top":"0px",position:"absolute",right:"-20px","text-align":"right"}},e[1]||(e[1]=[a.createElementVNode("i",{class:"font-17 color-black"},[a.createElementVNode("img",{src:"https://cdn.tapni.co/icons/down-arrow.png",class:"responsive-image",style:{width:"35%"}})],-1)]))):a.createCommentVNode("",!0),a.createElementVNode("div",Dp,[n.isModal?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:0,to:"/apps",class:"button gray-button pointer left-button"},{default:a.withCtx(()=>[a.createElementVNode("img",{src:n.getIcon("arrow-gray-right.svg"),height:"20",width:"20",class:"btn-icon",style:{rotate:"180deg"}},null,8,jp)]),_:1})),a.createElementVNode("h2",qp,a.toDisplayString(r.app.t_apps_name),1)]),a.createElementVNode("div",Fp,[a.createElementVNode("p",Vp,a.toDisplayString(n.ssoLang[n.appLanguage].apps_p),1),e[2]||(e[2]=a.createElementVNode("div",{class:"full-top"},null,-1))])])}const Kp=Object.freeze(Object.defineProperty({__proto__:null,default:nt(Bp,[["render",Hp],["__scopeId","data-v-36b27d1f"]])},Symbol.toStringTag,{value:"Module"}));class Gp extends tt.WebPlugin{constructor(){super()}loadScript(){if(typeof document>"u")return;const e="gapi";if(document==null?void 0:document.getElementById(e))return;const o=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.defer=!0,r.async=!0,r.id=e,r.onload=this.platformJsLoaded.bind(this),r.src="https://apis.google.com/js/platform.js",o.appendChild(r)}initialize(e={clientId:"",scopes:[],grantOfflineAccess:!1}){var t,o;if(typeof window>"u")return;const r=(t=document.getElementsByName("google-signin-client_id")[0])===null||t===void 0?void 0:t.content,i=e.clientId||r||"";return i||console.warn("GoogleAuthPlugin - clientId is empty"),this.options={clientId:i,grantOfflineAccess:(o=e.grantOfflineAccess)!==null&&o!==void 0?o:!1,scopes:e.scopes||[]},this.gapiLoaded=new Promise(s=>{window.gapiResolve=s,this.loadScript()}),this.addUserChangeListener(),this.gapiLoaded}platformJsLoaded(){gapi.load("auth2",()=>{const e={client_id:this.options.clientId,plugin_name:"CodetrixStudioCapacitorGoogleAuth"};this.options.scopes.length&&(e.scope=this.options.scopes.join(" ")),gapi.auth2.init(e),window.gapiResolve()})}async signIn(){return new Promise(async(e,t)=>{var o;try{let r;const i=(o=this.options.grantOfflineAccess)!==null&&o!==void 0?o:!1;i?r=(await gapi.auth2.getAuthInstance().grantOfflineAccess()).code:await gapi.auth2.getAuthInstance().signIn();const s=gapi.auth2.getAuthInstance().currentUser.get();i&&await s.reloadAuthResponse();const c=this.getUserFrom(s);c.serverAuthCode=r,e(c)}catch(r){t(r)}})}async refresh(){const e=await gapi.auth2.getAuthInstance().currentUser.get().reloadAuthResponse();return{accessToken:e.access_token,idToken:e.id_token,refreshToken:""}}async signOut(){return gapi.auth2.getAuthInstance().signOut()}async addUserChangeListener(){await this.gapiLoaded,gapi.auth2.getAuthInstance().currentUser.listen(e=>{this.notifyListeners("userChange",e.isSignedIn()?this.getUserFrom(e):null)})}getUserFrom(e){const t={},o=e.getBasicProfile();t.email=o.getEmail(),t.familyName=o.getFamilyName(),t.givenName=o.getGivenName(),t.id=o.getId(),t.imageUrl=o.getImageUrl(),t.name=o.getName();const r=e.getAuthResponse(!0);return t.authentication={accessToken:r.access_token,idToken:r.id_token,refreshToken:""},t}}const $p=Object.freeze(Object.defineProperty({__proto__:null,GoogleAuthWeb:Gp},Symbol.toStringTag,{value:"Module"}));var ui={exports:{}};/*!
|
|
164
164
|
* $script.js JS loader & dependency manager
|
|
165
165
|
* https://github.com/ded/script.js
|
|
166
166
|
* (c) Dustin Diaz 2014 | License MIT
|